| | |
| | | <div class="footerButton"> |
| | | <el-button v-if="operation==='edit'" @click="dialogVisibleCancel">返 回</el-button> |
| | | <el-button v-if="operation!=='edit'" @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button v-if="operation!=='edit'" type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | v-if="operation!=='edit'" |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | if (this.dynamicTags[0].stepname.trim() === '') { |
| | | return this.$message.info('工艺设置第一项不能为空!') |
| | | } |
| | | console.log(this.routeSelectedArr, 3666666) |
| | | console.log(this.dynamicTags, 3) |
| | | const Data = [] |
| | | this.dynamicTags.forEach(item => { |
| | | Data.push({ seq: item.seq, stepcode: this.routeSelectedArr.find(it => it.stepname === item.stepname).stepcode, stepname: item.stepname }) |
| | |
| | | item.stepcode = this.routeSelectedArr.find(it => it.stepname === item.stepname).stepcode |
| | | } |
| | | }) |
| | | console.log(Data, 32) |
| | | |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const data = { |
| | | code: this.dialogForm.code, |
| | | name: this.dialogForm.name, |
| | |
| | | description: this.dialogForm.description, |
| | | Data: Data |
| | | } |
| | | console.log(data, 2) |
| | | |
| | | AddUpdateRoute(this.dialogForm.id, this.operation === 'add' ? 'Add' : 'Update', data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.getRouteSearch() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | } |