chris 3 жил өмнө
parent
commit
d119c2222e

+ 0 - 2
src/api/production.js

@@ -26,7 +26,6 @@ export function getMonitoringList (params) {
   })
 }
 
-
 // 获取生产监控详情
 export function getMonitoringDetail (productionId) {
   return request({
@@ -35,7 +34,6 @@ export function getMonitoringDetail (productionId) {
   })
 }
 
-
 // 获取生产记录列表信息
 export function getRecordingList (params) {
   return request({

+ 2 - 2
src/views/modules/msg-center/notice.vue

@@ -80,7 +80,7 @@
         width="150"
         label="操作">
         <template slot-scope="scope">
-          <el-button type="text" size="small" @click="detailHandle(scope.row.noticeId)">查看</el-button>
+          <el-button type="text" size="small" @click="detailHandle(scope.row)">查看</el-button>
           <el-button type="text" size="small" @click="checkHandle(scope.row.noticeId)">设为已读</el-button>
         </template>
       </el-table-column>
@@ -147,7 +147,7 @@
         this.getNoticeList()
       },
       // 查看消息
-      detailHandle (id) {
+      detailHandle (row) {
         // todo
       }
     }

+ 12 - 13
src/views/modules/production/monitoring-details.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="production">
-    <el-dialog title="生产监控详情" 
-      width="70%" 
-      :close-on-click-modal="false" 
+    <el-dialog title="生产监控详情"
+      width="70%"
+      :close-on-click-modal="false"
       :visible.sync="visible">
       <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
         <el-row class="my-row">
@@ -123,9 +123,9 @@
           info: null,
           open: (type, info) => {
             if (info.meta.workTypeId && info.meta.prop !== 'end') {
-              this.getOperatorList(info.meta.workTypeId);
+              this.getOperatorList(info.meta.workTypeId)
             }
-            
+
             const conf = this.drawerConf
             conf.visible = true
             conf.type = type
@@ -140,7 +140,6 @@
               this.$set(this.nodeSetting, 'type', info.meta.type)
               this.$set(this.nodeSetting, 'workTypeId', info.meta.workTypeId)
               this.$set(this.nodeSetting, 'operatorIds', info.meta.operatorIds)
-              
             } else {
               conf.title = '连线'
               if (this.$refs.linkSetting) this.$refs.linkSetting.resetFields()
@@ -282,7 +281,7 @@
           mouldName: [{required: true, message: '请输入模板名称', trigger: 'blur'}]
         },
         dataRule1: {
-           operatorIds: [{ required: true, message: '操作人员不能为空', trigger: 'change' }]
+          operatorIds: [{ required: true, message: '操作人员不能为空', trigger: 'change' }]
         }
       }
     },
@@ -307,7 +306,7 @@
               await this.dataForm.proTechnologyStepList.forEach((v, i) => {
                 // eslint-disable-next-line no-unused-vars
                 const sortNo = []
-                
+
                 const datas = v.sort((a, b) => Number(a['sortNo']) - Number(b['sortNo']))
                 let length = datas.length
                 datas.forEach((item, index) => {
@@ -348,7 +347,7 @@
                   }
                 })
               })
-              
+
               this.$nextTick(() => {
                 setTimeout(() => {
                   this.nodeList = datanode
@@ -369,16 +368,16 @@
             if (this.drawerConf.type === drawerType.node) {
               if (!conf.info.meta) conf.info.meta = {}
               Object.keys(this.nodeSetting).forEach(key => {
-                if (key == 'operatorIds') {
-                  let idList = this.nodeSetting[key];
-                  let nameList = [];
+                if (key === 'operatorIds') {
+                  let idList = this.nodeSetting[key]
+                  let nameList = []
                   idList.forEach(id => {
                     let name = this.operatorList.find(item => {
                       return item.userId === id
                     }).name
                     nameList.push(name)
                   })
-                 
+
                   this.$set(conf.info.meta, 'desc', nameList.join(','))
                 }
                 this.$set(conf.info.meta, key, this.nodeSetting[key])

+ 13 - 14
src/views/modules/production/recording-details.vue

@@ -1,9 +1,9 @@
 
 <template>
   <div class="production">
-    <el-dialog title="生产记录详情" 
-      width="70%" 
-      :close-on-click-modal="false" 
+    <el-dialog title="生产记录详情"
+      width="70%"
+      :close-on-click-modal="false"
       :visible.sync="visible">
       <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
         <el-row class="my-row" style="height: 350px; background-color: #efefef;">
@@ -117,9 +117,9 @@
           info: null,
           open: (type, info) => {
             if (info.meta.workTypeId && info.meta.prop !== 'end') {
-              this.getOperatorList(info.meta.workTypeId);
+              this.getOperatorList(info.meta.workTypeId)
             }
-            
+
             const conf = this.drawerConf
             conf.visible = true
             conf.type = type
@@ -134,7 +134,6 @@
               this.$set(this.nodeSetting, 'type', info.meta.type)
               this.$set(this.nodeSetting, 'workTypeId', info.meta.workTypeId)
               this.$set(this.nodeSetting, 'operatorIds', info.meta.operatorIds)
-              
             } else {
               conf.title = '连线'
               if (this.$refs.linkSetting) this.$refs.linkSetting.resetFields()
@@ -276,7 +275,7 @@
           mouldName: [{required: true, message: '请输入模板名称', trigger: 'blur'}]
         },
         dataRule1: {
-           operatorIds: [{ required: true, message: '操作人员不能为空', trigger: 'change' }]
+          operatorIds: [{ required: true, message: '操作人员不能为空', trigger: 'change' }]
         }
       }
     },
@@ -287,7 +286,7 @@
         this.display = disable
         this.nodeList = []
         this.linkList = []
-        this.mouldId = id;
+        this.mouldId = id
 
         await getMonitoringDetail(id).then(async ({data}) => {
           if (data && data.code === '200') {
@@ -300,7 +299,7 @@
               await this.dataForm.proTechnologyStepList.forEach((v, i) => {
                 // eslint-disable-next-line no-unused-vars
                 const sortNo = []
-                
+
                 const datas = v.sort((a, b) => Number(a['sortNo']) - Number(b['sortNo']))
                 let length = datas.length
                 datas.forEach((item, index) => {
@@ -341,7 +340,7 @@
                   }
                 })
               })
-              
+
               this.$nextTick(() => {
                 setTimeout(() => {
                   this.nodeList = datanode
@@ -362,16 +361,16 @@
             if (this.drawerConf.type === drawerType.node) {
               if (!conf.info.meta) conf.info.meta = {}
               Object.keys(this.nodeSetting).forEach(key => {
-                if (key == 'operatorIds') {
-                  let idList = this.nodeSetting[key];
-                  let nameList = [];
+                if (key === 'operatorIds') {
+                  let idList = this.nodeSetting[key]
+                  let nameList = []
                   idList.forEach(id => {
                     let name = this.operatorList.find(item => {
                       return item.userId === id
                     }).name
                     nameList.push(name)
                   })
-                 
+
                   this.$set(conf.info.meta, 'desc', nameList.join(','))
                 }
                 this.$set(conf.info.meta, key, this.nodeSetting[key])

+ 25 - 25
src/views/modules/production/scheduling-details.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="production">
-    <el-dialog title="排产" 
-      width="70%" 
-      :close-on-click-modal="false" 
+    <el-dialog title="排产"
+      width="70%"
+      :close-on-click-modal="false"
       :visible.sync="visible">
       <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
         <el-row class="my-row" style="height: 350px; background-color: #efefef;">
@@ -89,7 +89,7 @@
 </template>
 
 <script>
-  import { getProduct, getWorkType, getStepId } from '@/api/crafts'
+  import { getStepId } from '@/api/crafts'
   import { getInfo, plan } from '@/api/production'
   import { workTypeMasterList } from '@/api/worktype'
   import { uuid } from '../common/vue-super-flow/utils'
@@ -115,9 +115,9 @@
           info: null,
           open: (type, info) => {
             if (info.meta.workTypeId && info.meta.prop !== 'end') {
-              this.getOperatorList(info.meta.workTypeId);
+              this.getOperatorList(info.meta.workTypeId)
             }
-            
+
             const conf = this.drawerConf
             conf.visible = true
             conf.type = type
@@ -132,7 +132,6 @@
               this.$set(this.nodeSetting, 'type', info.meta.type)
               this.$set(this.nodeSetting, 'workTypeId', info.meta.workTypeId)
               this.$set(this.nodeSetting, 'operatorIds', info.meta.operatorIds)
-              
             } else {
               conf.title = '连线'
               if (this.$refs.linkSetting) this.$refs.linkSetting.resetFields()
@@ -275,7 +274,7 @@
         datas: {},
         dataRule: {},
         dataRule1: {
-           operatorIds: [{ required: true, message: '操作人员不能为空', trigger: 'change' }]
+          operatorIds: [{ required: true, message: '操作人员不能为空', trigger: 'change' }]
         }
       }
     },
@@ -285,11 +284,11 @@
         this.visible = true
         this.nodeList = []
         this.linkList = []
-        this.productionId = id;
+        this.productionId = id
 
         await getInfo(id).then(async ({data}) => {
           if (data && data.code === '200') {
-            this.dataForm = {...this.dataForm, proTechnologyStepLists :data.data}
+            this.dataForm = {...this.dataForm, proTechnologyStepLists: data.data}
             // 图纸
             if (this.dataForm.proTechnologyStepLists) {
               const dataline = []
@@ -331,7 +330,7 @@
                   }
                 })
               })
-              
+
               this.$nextTick(() => {
                 setTimeout(() => {
                   this.nodeList = datanode
@@ -343,12 +342,12 @@
         })
       },
       // 按工种ID查询操作人列表
-      getOperatorList(workTypeId) {
+      getOperatorList (workTypeId) {
         workTypeMasterList(workTypeId).then(({data}) => {
           if (data && data.code === '200') {
             this.operatorList = []
             data.data.forEach(item => {
-              this.operatorList.push(item);
+              this.operatorList.push(item)
             })
           }
         })
@@ -363,16 +362,16 @@
             if (this.drawerConf.type === drawerType.node) {
               if (!conf.info.meta) conf.info.meta = {}
               Object.keys(this.nodeSetting).forEach(key => {
-                if (key == 'operatorIds') {
-                  let idList = this.nodeSetting[key];
-                  let nameList = [];
+                if (key === 'operatorIds') {
+                  let idList = this.nodeSetting[key]
+                  let nameList = []
                   idList.forEach(id => {
                     let name = this.operatorList.find(item => {
                       return item.userId === id
                     }).name
                     nameList.push(name)
                   })
-                 
+
                   this.$set(conf.info.meta, 'desc', nameList.join(','))
                 }
                 this.$set(conf.info.meta, key, this.nodeSetting[key])
@@ -400,14 +399,15 @@
         }
 
         this.$refs['dataForm'].validate((valid) => {
-          if(valid) {
+          if (valid) {
+            // eslint-disable-next-line no-unused-vars
             const proTechnologyStepLists = []
-         
+
             let productionPlanSteps = []
             for (let index = 0; index < this.datas.nodeList.length; index++) {
-              const v = this.datas.nodeList[index];
-               let tmp = v.meta.operatorIds || []
-              if(v.meta.prop !== 'end' && tmp.length == 0){
+              const v = this.datas.nodeList[index]
+              let tmp = v.meta.operatorIds || []
+              if (v.meta.prop !== 'end' && tmp.length === 0) {
                 this.$message.error(`请选择 ${v.meta.name} 的操作人员!`)
                 return
               }
@@ -420,7 +420,7 @@
             }
             plan(submitData).then(({data}) => {
               if (data && data.code === '200') {
-                  this.$message({
+                this.$message({
                   message: '操作成功',
                   type: 'success',
                   duration: 1500,
@@ -430,7 +430,7 @@
                   }
                 })
               } else {
-                 this.$message.error(data.msg)
+                this.$message.error(data.msg)
               }
             })
           }
@@ -498,7 +498,7 @@
             }
           }
         })
-      },
+      }
     }
   }
 </script>

+ 35 - 35
src/views/modules/production/scheduling-mould-details.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="production">
-    <el-dialog title="排产模板详情" 
-      width="70%" 
-      :close-on-click-modal="false" 
+    <el-dialog title="排产模板详情"
+      width="70%"
+      :close-on-click-modal="false"
       :visible.sync="visible">
       <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
         <el-row class="my-row">
@@ -143,9 +143,9 @@
           info: null,
           open: (type, info) => {
             if (info.meta.workTypeId && info.meta.prop !== 'end') {
-              this.getOperatorList(info.meta.workTypeId);
+              this.getOperatorList(info.meta.workTypeId)
             }
-            
+
             const conf = this.drawerConf
             conf.visible = true
             conf.type = type
@@ -160,7 +160,6 @@
               this.$set(this.nodeSetting, 'type', info.meta.type)
               this.$set(this.nodeSetting, 'workTypeId', info.meta.workTypeId)
               this.$set(this.nodeSetting, 'operatorIds', info.meta.operatorIds)
-              
             } else {
               conf.title = '连线'
               if (this.$refs.linkSetting) this.$refs.linkSetting.resetFields()
@@ -301,15 +300,15 @@
           mouldName: [{required: true, message: '请输入模板名称', trigger: 'blur'}]
         },
         dataRule1: {
-           operatorIds: [{ required: true, message: '操作人员不能为空', trigger: 'change' }]
+          operatorIds: [{ required: true, message: '操作人员不能为空', trigger: 'change' }]
         }
       }
     },
     methods: {
       // 初始化产品名称列表
-      async initProductList() {
+      async initProductList () {
         getProductList().then(({data}) => {
-          if(data && data.code === '200') {
+          if (data && data.code === '200') {
             data.data.forEach(item => {
               this.productList.push(item)
             })
@@ -322,15 +321,15 @@
         this.display = disable
         this.nodeList = []
         this.linkList = []
-        this.mouldId = id;
-        if(!disable){
-          await this.initProductList();
+        this.mouldId = id
+        if (!disable) {
+          await this.initProductList()
         }
 
         await getMouldDetail(id).then(async ({data}) => {
           if (data && data.code === '200') {
             this.dataForm = data.data
-            
+
             // 图纸
             if (this.dataForm.proTechnologyStepList) {
               const dataline = []
@@ -374,7 +373,7 @@
                   }
                 })
               })
-              
+
               this.$nextTick(() => {
                 setTimeout(() => {
                   this.nodeList = datanode
@@ -385,11 +384,11 @@
           }
         })
       },
-      //根据产品ID查询步骤详情
-      async productChange(productId) {
+      // 根据产品ID查询步骤详情
+      async productChange (productId) {
         getMouldDetailByProductId(productId).then(async ({data}) => {
-           if (data && data.code === '200') {
-            this.dataForm = {...this.dataForm, proTechnologyStepLists :data.data}
+          if (data && data.code === '200') {
+            this.dataForm = {...this.dataForm, proTechnologyStepLists: data.data}
             // 图纸
             if (this.dataForm.proTechnologyStepLists) {
               const dataline = []
@@ -431,7 +430,7 @@
                   }
                 })
               })
-              
+
               this.$nextTick(() => {
                 setTimeout(() => {
                   this.nodeList = datanode
@@ -443,12 +442,12 @@
         })
       },
       // 按工种ID查询操作人列表
-      getOperatorList(workTypeId) {
+      getOperatorList (workTypeId) {
         workTypeMasterList(workTypeId).then(({data}) => {
           if (data && data.code === '200') {
             this.operatorList = []
             data.data.forEach(item => {
-              this.operatorList.push(item);
+              this.operatorList.push(item)
             })
           }
         })
@@ -463,16 +462,16 @@
             if (this.drawerConf.type === drawerType.node) {
               if (!conf.info.meta) conf.info.meta = {}
               Object.keys(this.nodeSetting).forEach(key => {
-                if (key == 'operatorIds') {
-                  let idList = this.nodeSetting[key];
-                  let nameList = [];
+                if (key === 'operatorIds') {
+                  let idList = this.nodeSetting[key]
+                  let nameList = []
                   idList.forEach(id => {
                     let name = this.operatorList.find(item => {
                       return item.userId === id
                     }).name
                     nameList.push(name)
                   })
-                 
+
                   this.$set(conf.info.meta, 'desc', nameList.join(','))
                 }
                 this.$set(conf.info.meta, key, this.nodeSetting[key])
@@ -500,14 +499,15 @@
         }
 
         this.$refs['dataForm'].validate((valid) => {
-          if(valid) {
+          if (valid) {
+            // eslint-disable-next-line no-unused-vars
             const proTechnologyStepLists = []
-         
+
             let productionPlanSteps = []
             for (let index = 0; index < this.datas.nodeList.length; index++) {
-              const v = this.datas.nodeList[index];
-               let tmp = v.meta.operatorIds || []
-              if(v.meta.prop !== 'end' && tmp.length == 0){
+              const v = this.datas.nodeList[index]
+              let tmp = v.meta.operatorIds || []
+              if (v.meta.prop !== 'end' && tmp.length === 0) {
                 this.$message.error(`请选择 ${v.meta.name} 的操作人员!`)
                 return
               }
@@ -520,11 +520,11 @@
               stepList: productionPlanSteps
             }
 
-            if(this.mouldId === 0) {
+            if (this.mouldId === 0) {
               // 新增
               saveProdProductionMould(submitData).then(({data}) => {
                 if (data && data.code === '200') {
-                    this.$message({
+                  this.$message({
                     message: '操作成功',
                     type: 'success',
                     duration: 1500,
@@ -539,10 +539,10 @@
               })
             } else {
               // 更新
-              submitData.mouldId = this.mouldId;
+              submitData.mouldId = this.mouldId
               updateProdProductionMould(submitData).then(({data}) => {
                 if (data && data.code === '200') {
-                    this.$message({
+                  this.$message({
                     message: '操作成功',
                     type: 'success',
                     duration: 1500,
@@ -621,7 +621,7 @@
             }
           }
         })
-      },
+      }
     }
   }
 </script>

+ 2 - 1
src/views/modules/tech/ctafts-add-or-detail.vue

@@ -579,7 +579,8 @@
               'sortNo': 0,
               'stepId': data.id,
               'stepName': data.meta.name,
-              'workTypeId':  v.meta.prop === 'end' ? '4' : (data.meta.workTypeId || null),
+              // eslint-disable-next-line no-undef
+              'workTypeId': v.meta.prop === 'end' ? '4' : (data.meta.workTypeId || null),
               'type': data.meta.type || null,
               'coordinate': data.coordinate.join(',')
             }])