Quellcode durchsuchen

fix:异常上报

wang.sq@aliyun.com vor 1 Tag
Ursprung
Commit
34cfc8ddf2

+ 23 - 1
imcs-ui/src/api/resourceProductMgr/productionResourcesMgr.js

@@ -44,6 +44,14 @@ const apiList = {
   updateStatus: {
     method: 'POST',
     url: `/authority/productionresource/updateStatus`
+  },
+  findAllErrorMsg: {
+    method: 'POST',
+    url: `/authority/errorDictionary/findAllErrorDetails`
+  },
+  saveErrorInfo: {
+    method: 'POST',
+    url: `/authority/mesNotice/externalApi/order/mesAbnormalReport`
   }
 }
 
@@ -113,5 +121,19 @@ export default {
       method: 'GET',
     	url: `/authority/productionresource/${id}`
     })
-  }
+  },
+  findAllErrorMsg (data) {
+    return axiosApi({
+      ...apiList.findAllErrorMsg,
+      data
+    })
+  },
+  saveErrorInfo (data) {
+    return axiosApi({
+      ...apiList.saveErrorInfo,
+      data
+    })
+  },
+
+
 }

+ 2 - 1
imcs-ui/src/lang/zh/resource.js

@@ -82,7 +82,8 @@ export default {
 			mode:  '模式',
 			autoCode: '设备业务自动化节点',
         toolAutoCode: '中央刀库设备业务自动化节点',
-			detailConf: '详情配置'
+			detailConf: '详情配置',
+			errorReport: '异常上报'
 	  	},
 	  	// 列表的cell名称
 		table: {

+ 40 - 1
imcs-ui/src/views/zuihou/resourceProductMgr/deviceMgr/Index.vue

@@ -322,6 +322,19 @@
               @click="autoCode(row)"
             />
           </el-tooltip>
+          <el-tooltip
+            v-if="row.capitalNo!=null"
+            class="item"
+            :content="$t('resource.buttons.errorReport')"
+            effect="dark"
+            placement="top-start"
+          >
+            <i
+              class="el-icon-warning-outline table-operation"
+              style="color: #f50"
+              @click="errorReport(row)"
+            />
+          </el-tooltip>
           <el-tooltip
             class="item"
             :content="$t('resource.buttons.detailConf')"
@@ -330,7 +343,7 @@
           >
             <i
               class="el-icon-guide table-operation"
-              style="color: #f50"
+              style="color: #2db7f5"
               @click="detailConf(row)"
             />
           </el-tooltip>
@@ -373,6 +386,15 @@
       @success="editDetailConfSuccess"
     />
 
+    <!-- 异常上报 -->
+    <errorReport
+      ref="errorReport"
+      :dialog-visible="errorReportConf.isVisible"
+      :title="errorReportConf.title"
+      @close="errorReportConfClose"
+      @success="errorReportConfSuccess"
+    />
+
     <el-dialog
       :title="$t('resource.buttons.autoCode')"
       :visible.sync="autoCodeVisible"
@@ -430,6 +452,7 @@ import TenantEdit from "../resourcesMgr/components/Edit";
 import Hardware from "../resourcesMgr/components/Hardware";
 import AutoCode from "../resourcesMgr/components/AutoCode";
 import DetailConf from "../resourcesMgr/components/DetailConf";
+import ErrorReport from "../resourcesMgr/components/ErrorReport";
 import TenantView from "../resourcesMgr/components/View";
 // 【设备管理】-API
 import equipmentMgrApi from "@/api/resourceProductMgr/equipmentMgr";
@@ -455,6 +478,7 @@ export default {
     AutoCode,
     TenantView,
     DetailConf,
+    ErrorReport,
     equipmentMgrApi,
     equipmentPosition,
   },
@@ -479,6 +503,10 @@ export default {
         isVisible: false,
         title: "",
       },
+      errorReportConf: {
+        isVisible: false,
+        title: "",
+      },
       preview: {
         isVisible: false,
         context: "",
@@ -555,6 +583,11 @@ export default {
       this.$refs.detailConf.setTenant(row, this.dicts);
       this.dialogDetailConf.isVisible = true;
     },
+    errorReport(row){
+      this.$refs.errorReport.type = "add";
+      this.$refs.errorReport.setTenant(row, this.dicts);
+      this.errorReportConf.isVisible = true;
+    },
     // 【硬件配置】-确定
     editHardwareSuccess() {
       this.search();
@@ -575,6 +608,12 @@ export default {
     editDetailConfSuccess() {
       this.search();
     },
+    errorReportConfClose() {
+      this.errorReportConf.isVisible = false;
+    },
+    errorReportConfSuccess() {
+      this.search();
+    },
     onSelectChange(selection) {
       this.selection = selection;
     },

+ 284 - 0
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/ErrorReport.vue

@@ -0,0 +1,284 @@
+<template>
+  <el-dialog 
+  	:close-on-click-modal="false" 
+  	:close-on-press-escape="false" 
+  	:title="title" 
+  	:append-to-body="true"
+  	:visible.sync="isVisible" 
+  	:width="width" 
+  	top="50px"
+  >
+    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
+      <el-form-item label='错误类别:' prop="errorType">
+            <el-select clearable v-model="tenant.errorType" placeholder="请选择" @change="selectErrorCode">
+              <el-option
+                v-for="item in ErrorTypeDatas"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+      </el-form-item>
+      <el-form-item label='错误编码:' prop="errorCode">
+            <el-select clearable v-model="tenant.errorCode" placeholder="请选择">
+              <el-option
+                v-for="item in ErrorCodeDatas"
+                :key="item.code"
+                :label="item.description"
+                :value="item.code">
+              </el-option>
+            </el-select>
+      </el-form-item>
+      <el-form-item label='错误描述:' prop="errorCode">
+        <el-input
+          type="textarea"
+          :rows="2"
+          placeholder="请输入内容"
+          v-model="tenant.errorInfo">
+        </el-input>
+      </el-form-item>
+
+
+
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
+      <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
+    </div>
+  </el-dialog>
+</template>
+<script>
+// 【区域管理】-API
+import productionResourcesMgrApi from "@/api/resourceProductMgr/productionResourcesMgr"
+import merge from 'deepmerge'
+
+export default {
+  name: 'DetailConf',
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      type: 'add',
+      tenant: this.initTenant(),
+      screenWidth: 0,
+      width: this.initWidth(),
+      confirmDisabled: false,
+      dicts:{
+        NATION: {}
+      },
+      ErrorTypeDatas:[{
+          value: 1,
+          label: '人'
+        }, {
+          value: 2,
+          label: '机'
+        }, {
+          value: 3,
+          label: '料'
+        }, {
+          value: 4,
+          label: '法'
+        }, {
+          value: 5,
+          label: '环'
+        }],
+      ErrorAllsDatas:[],
+      ErrorCodeDatas:[],
+      roles: [],
+      rules: {
+        errorType: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ],
+        errorCode: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ],
+        errorInfo: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+        this.reset()
+      }
+    }
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+    initTenant () {
+      return {
+        id: '',
+        tenantId: '',
+        capitalNo: '',
+        capitalName: '',
+        capitalType: '',
+        modeSpecification: '',
+        capitalPrice: '',
+        productionDate: '', 
+        productionNo: '',
+        manufacturer: '',    
+      }
+    },
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 991) {
+        return '90%'
+      } else if (this.screenWidth < 1400) {
+        return '45%'
+      } else {
+        return '800px'
+      }
+    },
+    setTenant (val, dict) {
+    	if(val){            
+            for( let key in this.tenant){
+                this.tenant[key] = val[key]
+            }
+            //this.tenant = {...val}           
+    	}
+      this.findErrorMsg()
+      this.dict = dict
+    },
+    findErrorMsg(){
+      productionResourcesMgrApi.findAllErrorMsg(this.tenant)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.ErrorAllsDatas = res.data
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+    },
+    selectErrorCode(val){
+      this.ErrorCodeDatas = []
+      this.$set(this.tenant, 'errorCode', '');
+      this.ErrorAllsDatas.map(item=>{
+        if(item.type == val){
+          this.ErrorCodeDatas.push(item)
+        }
+      })
+    },
+    close () {
+      this.$emit('close')
+    },
+    reset () {
+      // 先清除校验,再清除表单,不然有奇怪的bug
+      this.$refs.form.clearValidate()
+      this.$refs.form.resetFields()
+      this.tenant = this.initTenant()
+    },
+    submitForm () {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.confirmDisabled = true
+          if (this.type === 'add') {
+            this.save()
+          } else {
+            this.update()
+          }
+        } else {
+          return false
+        }
+      })
+    },
+    save () {     
+      
+      let parData = {"errorCode":this.tenant.errorCode,"kapaz":this.tenant.capitalNo, "errorMsg": this.tenant.errorInfo}
+      productionResourcesMgrApi.saveErrorInfo(parData)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.createSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	          this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	          this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+    },
+    update () {
+      this.tenant.ip = ''
+      this.tenant.port = ''  
+      console.log(this.tenant)
+      productionResourcesMgrApi.updateConf(this.tenant)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.updateSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	          this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	          this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        }) 
+    }
+
+  }
+}
+</script>
+<style lang="scss" >
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+  text-align: center;
+}
+.avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}
+.checkUsed{
+	display: inline-block;
+	margin-left: 10px;
+	color: #1890ff;
+}
+</style>

+ 13 - 0
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/tab/accept/index.vue

@@ -2,6 +2,19 @@
   <div class="app-container">
 		<!-- 搜索模块 -->
     <div class="filter-container">
+    	<span>
+    		<span>任务状态:</span>
+		<el-select v-model="value" placeholder="请选择">
+			<el-option
+			v-for="item in options"
+			:key="item.value"
+			:label="item.label"
+			:value="item.value">
+			</el-option>
+		</el-select>
+
+    		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
     	<span>
     		<span>{{$t("lineSide.searchForm.name")}}:</span>
     		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>

+ 1 - 2
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/outNewOrder/index.vue

@@ -135,7 +135,7 @@
       	<template slot-scope="{ row }">
 			
 			<el-tag v-if="row.auditStatus == '0'" type="info">{{$t("common.audio.notSubmitted")}}</el-tag>
-			<el-tag v-if="row.auditStatus == '1'" type="info">{{$t("common.audio.daiAudio")}}</el-tag>
+			<el-tag v-if="row.auditStatus == '1'" type="primary">{{$t("common.audio.daiAudio")}}</el-tag>
 			<el-tag v-if="row.auditStatus == '2'" type="success">{{$t("common.audio.audioOk")}}</el-tag>
 			<el-tag v-if="row.auditStatus == '3'" type="danger">{{$t("common.audio.aduioFail")}}</el-tag>
 		</template>
@@ -490,7 +490,6 @@
 	      this.queryParams.size = params.size ? params.size : this.queryParams.size
 	      // 查询必须参数-新增外部:orderstatus  = 1 and source = 2 and auditStatus = 1
 	      this.queryParams.model.orderStatus = '1'
-		  this.queryParams.model.auditStatus = '1'
 	      this.queryParams.model.source = '2'
 	      orderMgrApi.page(this.queryParams).then(response => {
 	        const res = response.data

+ 1 - 1
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/reviewedOrder/index.vue

@@ -101,7 +101,7 @@
       <!-- 审核状态 -->
       <el-table-column prop="auditStatus" :label='$t("runCenter.table.oder.auditStatus")' align="center" style="width: 9%;">
       	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.auditStatus == '1'" type="info">{{$t("common.audio.daiAudio")}}</el-tag>
+	      	<el-tag v-if="row.auditStatus == '1'" type="primary">{{$t("common.audio.daiAudio")}}</el-tag>
 					<el-tag v-if="row.auditStatus == '2'" type="success">{{$t("common.audio.audioOk")}}</el-tag>
 					<el-tag v-if="row.auditStatus == '3'" type="danger">{{$t("common.audio.aduioFail")}}</el-tag>
 				</template>

+ 2 - 3
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/checkCuttingTools/index.vue

@@ -30,7 +30,7 @@
           </template>
         </el-table-column> -->
       </el-table>
-      <el-button  class="el-button--primary generateTask" @click="applySave()">生成任务</el-button>
+      <el-button  v-if="noCutterData.length>0" class="el-button--primary generateTask" @click="applySave()">生成任务</el-button>
     </div>
     
     <div>
@@ -158,8 +158,7 @@
                 this.tableData.push(item)
               }
             })
-            
-            this.runTaskVisble = this.tableData[0].list.length>0 ? true: false
+            this.runTaskVisble = this.tableData[0].list==null ? false: (this.tableData[0].list.length>0? true: false)
           }
         }).finally(() => this.loading = false)     
 	    },