|
@@ -137,7 +137,7 @@ export default {
|
|
|
nodeList: [],
|
|
|
lineList: []
|
|
|
}, // 流程图数据
|
|
|
- //工艺流程表格数据
|
|
|
+ // 工艺流程表格数据
|
|
|
workFlowTableData: [],
|
|
|
// 工种列表
|
|
|
workTypeOptions: [],
|
|
@@ -167,7 +167,6 @@ export default {
|
|
|
},
|
|
|
created () {
|
|
|
this.initNode()
|
|
|
-
|
|
|
},
|
|
|
mounted () {
|
|
|
this.initNode()
|
|
@@ -303,28 +302,28 @@ export default {
|
|
|
},
|
|
|
// 保存流程图
|
|
|
saveWorkFlow (workFlowData) {
|
|
|
- console.log("save work flow.")
|
|
|
+ console.log('save work flow.')
|
|
|
this.workFlowData = workFlowData
|
|
|
},
|
|
|
handleClose () {
|
|
|
// this.visible = false
|
|
|
this.$emit('close')
|
|
|
},
|
|
|
- //流程图数据变更通知
|
|
|
- workFlowDataChange(){
|
|
|
+ // 流程图数据变更通知
|
|
|
+ workFlowDataChange () {
|
|
|
this.refreshTable()
|
|
|
},
|
|
|
- //刷新表格
|
|
|
- async refreshTable(){
|
|
|
+ // 刷新表格
|
|
|
+ async refreshTable () {
|
|
|
this.workFlowTableData = []
|
|
|
|
|
|
await this.getWorkTypeOptions()
|
|
|
|
|
|
let flowData = this.$refs.workFlow.getFlowData()
|
|
|
-
|
|
|
+
|
|
|
flowData.nodeList.forEach(item => {
|
|
|
- let workType = this.workTypeOptions.find(t => t.typeId == item.workTypeId)
|
|
|
- if(workType){
|
|
|
+ let workType = this.workTypeOptions.find(t => t.typeId === item.workTypeId)
|
|
|
+ if (workType) {
|
|
|
item.workTypeName = workType.name
|
|
|
}
|
|
|
this.workFlowTableData.push(item)
|
|
@@ -338,7 +337,7 @@ export default {
|
|
|
console.log(data.data)
|
|
|
}
|
|
|
})
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|