|
@@ -259,7 +259,7 @@
|
|
|
label="故障部位">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- type="selection" prop="ids"
|
|
|
+ type="selection" prop="faultId"
|
|
|
label="ID"
|
|
|
width="55"></el-table-column>
|
|
|
</el-table>
|
|
@@ -2577,34 +2577,100 @@ export default {
|
|
|
// 选择型号,循环故障清单
|
|
|
selectSimType(val){
|
|
|
console.log(val);
|
|
|
- console.log('newValue');
|
|
|
simTypeTask(val).then(response => {
|
|
|
console.log(response.data)
|
|
|
console.log('response')
|
|
|
- // let jsonString = '';
|
|
|
- // const obj = {};
|
|
|
- // for (let i = 0; i < 6; i++) {
|
|
|
- // obj[i] = response.data.selectedData[i]['name'];
|
|
|
- // }
|
|
|
- // console.log(obj)
|
|
|
- // jsonString = JSON.stringify(obj);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- const arr = [];
|
|
|
- arr['ids'] = 1;
|
|
|
- arr['xinghao'] = 'FZD04B型侦毒器';
|
|
|
- arr['xianxiang'] = '开机无响应';
|
|
|
- arr['name'] = '1.电源开关';
|
|
|
- console.log(arr);
|
|
|
- console.log(JSON.stringify(arr));
|
|
|
- console.log('JSON.stringify(arr)');
|
|
|
- this.tableData = [{
|
|
|
- ids:1,
|
|
|
- xinghao: 'FZD04B型侦毒器',
|
|
|
- xianxiang: '开机无响应',
|
|
|
- name: '1.电源开关',
|
|
|
- }];
|
|
|
+ let text = '';
|
|
|
+ if(val=='0001'){
|
|
|
+ let xianxiang = 'FZD04B型侦毒器';
|
|
|
+ console.log(response.data.selectedData[0].children[0].name)
|
|
|
+ console.log('response.data.selectedData[0].children[0].name')
|
|
|
+ // text = [{
|
|
|
+ // xinghao: xianxiang,
|
|
|
+ // xianxiang: response.data.selectedData[0].name,
|
|
|
+ // name: response.data.selectedData[0].children[0].name,
|
|
|
+ // faultId:response.data.selectedData[0].children[0].faultId,
|
|
|
+ // },{
|
|
|
+ // xinghao: xianxiang,
|
|
|
+ // xianxiang: response.data.selectedData[0].name,
|
|
|
+ // name: response.data.selectedData[0].children[1].name,
|
|
|
+ // faultId:response.data.selectedData[0].children[1].faultId,
|
|
|
+ // },{
|
|
|
+ // xinghao:xianxiang,
|
|
|
+ // xianxiang: response.data.selectedData[1].name,
|
|
|
+ // name: response.data.selectedData[1].children[0].name,
|
|
|
+ // faultId:response.data.selectedData[1].children[0].faultId,
|
|
|
+ // },{
|
|
|
+ // xinghao: xianxiang,
|
|
|
+ // xianxiang: response.data.selectedData[1].name,
|
|
|
+ // name: response.data.selectedData[1].children[1].name,
|
|
|
+ // faultId:response.data.selectedData[1].children[1].faultId,
|
|
|
+ // },{
|
|
|
+ // xinghao:xianxiang,
|
|
|
+ // xianxiang: response.data.selectedData[2].name,
|
|
|
+ // name: response.data.selectedData[2].children[0].name,
|
|
|
+ // faultId:response.data.selectedData[2].children[0].faultId,
|
|
|
+ // },{
|
|
|
+ // xinghao: xianxiang,
|
|
|
+ // xianxiang: response.data.selectedData[2].name,
|
|
|
+ // name: response.data.selectedData[2].children[1].name,
|
|
|
+ // faultId:response.data.selectedData[2].children[1].faultId,
|
|
|
+ // },{
|
|
|
+ // xinghao:xianxiang,
|
|
|
+ // xianxiang: response.data.selectedData[3].name,
|
|
|
+ // name: response.data.selectedData[3].children[0].name,
|
|
|
+ // faultId:response.data.selectedData[3].children[0].faultId,
|
|
|
+ // },{
|
|
|
+ // xinghao: xianxiang,
|
|
|
+ // xianxiang: response.data.selectedData[3].name,
|
|
|
+ // name: response.data.selectedData[3].children[1].name,
|
|
|
+ // faultId:response.data.selectedData[3].children[1].faultId,
|
|
|
+ // },];
|
|
|
+ text = [{
|
|
|
+ ids:1,
|
|
|
+ xinghao: 'FZD04B型侦毒器',
|
|
|
+ xianxiang: '开机无响应',
|
|
|
+ name: '1.电源开关',
|
|
|
+ },{
|
|
|
+ ids:2,
|
|
|
+ name: '2.DC/DC转换芯片',
|
|
|
+ },{
|
|
|
+ ids:3,
|
|
|
+ xianxiang: '开机后按抽气开关,微电机不工作',
|
|
|
+ name: '3.微电机',
|
|
|
+ },{
|
|
|
+ ids:4,
|
|
|
+ name: '4.Q2',
|
|
|
+ },{
|
|
|
+ ids:5,
|
|
|
+ xianxiang: '抽气流量不足',
|
|
|
+ name: '5.滤网',
|
|
|
+ },{
|
|
|
+ ids:6,
|
|
|
+ name: '6.调速电位器',
|
|
|
+ },{
|
|
|
+ ids:7,
|
|
|
+ xianxiang: '开机后按下加热开关,加热灯不亮,也未加热',
|
|
|
+ name: '7.加热指示灯',
|
|
|
+ },{
|
|
|
+ ids:8,
|
|
|
+ name: '8.热敏开关',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ ids:9,
|
|
|
+ xianxiang: '不能正常工作',
|
|
|
+ name: '9.外壳及零件',
|
|
|
+ },{
|
|
|
+ ids:10,
|
|
|
+ xianxiang: '电压低',
|
|
|
+ name: '10.供电模块',
|
|
|
+ },{
|
|
|
+ ids:11,
|
|
|
+ xianxiang: '抽气指示灯不亮',
|
|
|
+ name: '11.抽气指示灯',
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ this.tableData = text;
|
|
|
});
|
|
|
|
|
|
},
|
|
@@ -2768,9 +2834,7 @@ export default {
|
|
|
name: undefined,
|
|
|
simType:undefined,
|
|
|
taskType:1,
|
|
|
- faultId:'000100010001,000100010002',
|
|
|
- // postIds: [],
|
|
|
- // roleIds: []
|
|
|
+ faultIds:['000100020003'],
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -2858,8 +2922,8 @@ export default {
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- console.log(this.form)
|
|
|
- return false;
|
|
|
+ // console.log(this.form)
|
|
|
+ // return false;
|
|
|
addTask(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|