chrislee пре 2 година
родитељ
комит
16c11173ad

+ 3 - 3
src/components/work-flow/config/methods.js

@@ -117,8 +117,8 @@ const methods = {
     const scale = this.getScale()
     let left = (event.pageX - containerRect.left - 60) / scale
     let top = (event.clientY - containerRect.top - 20) / scale
-    
-    var temp = {
+
+    const temp = {
       ...this.currentItem,
       id: GenNonDuplicateID(8),
       top: Math.round(top / 20) * 20 + 'px',
@@ -221,7 +221,7 @@ const methods = {
     // 缩放时设置jsPlumb的缩放比率
     pan.on('zoom', e => {
       const { x, y, scale } = e.getTransform()
-      
+
       this.jsPlumb.setZoom(scale)
       // 根据缩放比例,缩放对齐辅助线长度和位置
       this.auxiliaryLinePos.width = (1 / scale) * 100 + '%'

+ 3 - 3
src/components/work-flow/home.vue

@@ -189,7 +189,7 @@ export default {
     this.$nextTick(() => {
       this.init()
     })
-    window.addEventListener("scroll", this.init)
+    window.addEventListener('scroll', this.init)
   },
   methods: {
     ...methods,
@@ -253,8 +253,8 @@ export default {
       })
       return data
     },
-    dataChange(){
-      //通知上层数据变更
+    dataChange () {
+      // 通知上层数据变更
       this.$emit('dataChange')
     }
   }

+ 6 - 6
src/views/modules/home/admin.vue

@@ -541,16 +541,16 @@ export default {
         }
       })
     },
-    contractProdListAddClass({row, rowIndex}){
-      if(row.warningState == '3'){
-        return 'custom-ranking-table-row overdue-row';
+    contractProdListAddClass ({row, rowIndex}) {
+      if (row.warningState == '3') {
+        return 'custom-ranking-table-row overdue-row'
       }
 
-      if(row.warningState == '2'){
-        return 'custom-ranking-table-row warning-row';
+      if (row.warningState === '2') {
+        return 'custom-ranking-table-row warning-row'
       }
 
-      return 'custom-ranking-table-row';
+      return 'custom-ranking-table-row'
     },
     // 报工列表
     getSubmittedRecordList () {

+ 10 - 11
src/views/modules/tech/ctafts-add-or-detail.vue

@@ -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>