Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
29c89cf4a7
@ -113,3 +113,12 @@ export function getCmdList(lineCode, params) {
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
// 获取指令列表
|
||||
export function postCopyCmd(data) {
|
||||
return request({
|
||||
url: `/api/cmd/copy`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { postCopyCmd } from '@/api/management/dictionary'
|
||||
|
||||
export default {
|
||||
name: 'EditCondition',
|
||||
@ -22,8 +23,8 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
fromId: '',
|
||||
fromName: '',
|
||||
fromCode: '',
|
||||
fromName: '',
|
||||
targetIds: '',
|
||||
deviceType: []
|
||||
},
|
||||
@ -78,21 +79,28 @@ export default {
|
||||
this.lineCode = lineCode;
|
||||
this.targetList = [];
|
||||
this.taskStatusList.forEach(item => {
|
||||
item.value = item.id;
|
||||
item.label = item.name;
|
||||
if (item.code != lineCode) {
|
||||
this.targetList.push(item);
|
||||
} else {
|
||||
this.formModel.fromId = item.id;
|
||||
this.formModel.fromName = item.name;
|
||||
}
|
||||
});
|
||||
item.value = item.code;
|
||||
item.label = item.name;
|
||||
if (item.code != lineCode) {
|
||||
this.targetList.push(item);
|
||||
} else {
|
||||
this.formModel.fromCode = item.code;
|
||||
this.formModel.fromName = item.name;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
doSave() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
console.log('确定');
|
||||
this.handleClose();
|
||||
const param = {
|
||||
fromLineCode: this.formModel.fromCode,
|
||||
targetLineCodes: this.formModel.targetIds,
|
||||
operateObjects: this.formModel.deviceType
|
||||
}
|
||||
postCopyCmd(param).then(res => {
|
||||
this.handleClose();
|
||||
this.$message.success('复制指令成功!');
|
||||
})
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
|
Loading…
Reference in New Issue
Block a user