Browse Source

Merge remote-tracking branch 'origin/master' into master

yejian 3 years ago
parent
commit
59c5e84c01

+ 120 - 118
imcs-ui/package.json

@@ -1,118 +1,120 @@
-{
-  "name": "zuihou-ui",
-  "version": "1.0.0",
-  "description": "zuihou-admin-cloud 前端项目",
-  "author": "zuihou",
-  "license": "Apache 2.0",
-  "scripts": {
-    "dev": "vue-cli-service serve",
-    "build:prod": "vue-cli-service build",
-    "build:boot": "vue-cli-service build --mode boot",
-    "build:docker": "vue-cli-service build --mode docker",
-    "build:stage": "vue-cli-service build --mode staging",
-    "preview": "node build/index.js --preview",
-    "lint": "eslint --ext .js,.vue src",
-    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
-    "new": "plop"
-  },
-  "keywords": [
-    "vue",
-    "admin",
-    "dashboard",
-    "element-ui",
-    "management-system"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/zuihou/zuihou-ui"
-  },
-  "bugs": {
-    "url": "https://github.com/zuihou/zuihou-ui/issues"
-  },
-  "dependencies": {
-    "@riophae/vue-treeselect": "0.0.38",
-    "axios": "^0.21.4",
-    "chromedriver": "^79.0.0",
-    "clipboard": "2.0.4",
-    "codemirror": "^5.64.0",
-    "driver.js": "0.9.5",
-    "dropzone": "5.5.1",
-    "echarts": "^5.2.2",
-    "element-ui": "2.15.6",
-    "file-saver": "2.0.1",
-    "fuse.js": "3.4.4",
-    "jsbarcode": "^3.11.3",
-    "jsonlint": "1.6.3",
-    "jszip": "^3.7.1",
-    "moment": "^2.29.1",
-    "normalize.css": "7.0.0",
-    "nprogress": "0.2.0",
-    "path-to-regexp": "2.4.0",
-    "screenfull": "4.2.0",
-    "showdown": "^1.9.1",
-    "sortablejs": "1.8.4",
-    "spark-md5": "^3.0.1",
-    "tui-editor": "1.3.3",
-    "vue": "2.6.10",
-    "vue-count-to": "^1.0.13",
-    "vue-echarts": "^6.0.0-rc.5",
-    "vue-i18n": "7.3.2",
-    "vue-lazyload": "^1.3.3",
-    "vue-print-nb": "^1.6.0",
-    "vue-progressbar": "^0.7.5",
-    "vue-router": "3.0.2",
-    "vue-seamless-scroll": "^1.1.23",
-    "vue-simple-uploader": "^0.7.4",
-    "vue-splitpane": "1.0.4",
-    "vuedraggable": "2.20.0",
-    "vuescroll": "^4.17.3",
-    "vuex": "3.1.0",
-    "xlsx": "^0.17.4"
-  },
-  "devDependencies": {
-    "@babel/core": "7.0.0",
-    "@babel/register": "7.0.0",
-    "@vue/cli-plugin-babel": "3.5.3",
-    "@vue/cli-plugin-eslint": "3.5.1",
-    "@vue/cli-plugin-unit-jest": "^3.9.0",
-    "@vue/cli-service": "3.5.3",
-    "@vue/test-utils": "1.0.0-beta.29",
-    "autoprefixer": "^9.5.1",
-    "babel-core": "7.0.0-bridge.0",
-    "babel-eslint": "10.0.1",
-    "babel-jest": "23.6.0",
-    "chalk": "2.4.2",
-    "chokidar": "2.1.5",
-    "compression-webpack-plugin": "^1.1.12",
-    "connect": "3.6.6",
-    "eslint": "5.15.3",
-    "eslint-plugin-vue": "5.2.2",
-    "html-webpack-plugin": "3.2.0",
-    "husky": "1.3.1",
-    "less": "^3.13.1",
-    "less-loader": "^5.0.0",
-    "lint-staged": "8.1.5",
-    "mockjs": "1.0.1-beta3",
-    "node-sass": "^4.14.1",
-    "sass-loader": "^7.1.0",
-    "plop": "2.3.0",
-    "pug": "^3.0.2",
-    "pug-plain-loader": "^1.1.0",
-    "qs": "^6.10.2",
-    "runjs": "^4.3.2",
-    "script-ext-html-webpack-plugin": "2.1.3",
-    "script-loader": "0.7.2",
-    "serve-static": "^1.13.2",
-    "svg-sprite-loader": "4.1.3",
-    "svgo": "1.2.0",
-    "vue-template-compiler": "2.6.10"
-  },
-  "engines": {
-    "node": ">=8.9",
-    "npm": ">= 3.0.0"
-  },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions"
-  ]
-}
+{
+  "name": "zuihou-ui",
+  "version": "1.0.0",
+  "description": "zuihou-admin-cloud 前端项目",
+  "author": "zuihou",
+  "license": "Apache 2.0",
+  "scripts": {
+    "dev": "vue-cli-service serve",
+    "build:prod": "vue-cli-service build",
+    "build:boot": "vue-cli-service build --mode boot",
+    "build:docker": "vue-cli-service build --mode docker",
+    "build:stage": "vue-cli-service build --mode staging",
+    "preview": "node build/index.js --preview",
+    "lint": "eslint --ext .js,.vue src",
+    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
+    "new": "plop"
+  },
+  "keywords": [
+    "vue",
+    "admin",
+    "dashboard",
+    "element-ui",
+    "management-system"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/zuihou/zuihou-ui"
+  },
+  "bugs": {
+    "url": "https://github.com/zuihou/zuihou-ui/issues"
+  },
+  "dependencies": {
+    "@kugatsu/vuenotification": "^1.1.4",
+    "@riophae/vue-treeselect": "0.0.38",
+    "axios": "^0.21.4",
+    "chromedriver": "^79.0.0",
+    "clipboard": "2.0.4",
+    "codemirror": "^5.64.0",
+    "driver.js": "0.9.5",
+    "dropzone": "5.5.1",
+    "echarts": "^5.2.2",
+    "element-ui": "2.15.6",
+    "file-saver": "2.0.1",
+    "fuse.js": "3.4.4",
+    "gsap": "^3.10.2",
+    "jsbarcode": "^3.11.3",
+    "jsonlint": "1.6.3",
+    "jszip": "^3.7.1",
+    "moment": "^2.29.1",
+    "normalize.css": "7.0.0",
+    "nprogress": "0.2.0",
+    "path-to-regexp": "2.4.0",
+    "screenfull": "4.2.0",
+    "showdown": "^1.9.1",
+    "sortablejs": "1.8.4",
+    "spark-md5": "^3.0.1",
+    "tui-editor": "1.3.3",
+    "vue": "2.6.10",
+    "vue-count-to": "^1.0.13",
+    "vue-echarts": "^6.0.0-rc.5",
+    "vue-i18n": "7.3.2",
+    "vue-lazyload": "^1.3.3",
+    "vue-print-nb": "^1.6.0",
+    "vue-progressbar": "^0.7.5",
+    "vue-router": "3.0.2",
+    "vue-seamless-scroll": "^1.1.23",
+    "vue-simple-uploader": "^0.7.4",
+    "vue-splitpane": "1.0.4",
+    "vuedraggable": "2.20.0",
+    "vuescroll": "^4.17.3",
+    "vuex": "3.1.0",
+    "xlsx": "^0.17.4"
+  },
+  "devDependencies": {
+    "@babel/core": "7.0.0",
+    "@babel/register": "7.0.0",
+    "@vue/cli-plugin-babel": "3.5.3",
+    "@vue/cli-plugin-eslint": "3.5.1",
+    "@vue/cli-plugin-unit-jest": "^3.9.0",
+    "@vue/cli-service": "3.5.3",
+    "@vue/test-utils": "1.0.0-beta.29",
+    "autoprefixer": "^9.5.1",
+    "babel-core": "7.0.0-bridge.0",
+    "babel-eslint": "10.0.1",
+    "babel-jest": "23.6.0",
+    "chalk": "2.4.2",
+    "chokidar": "2.1.5",
+    "compression-webpack-plugin": "^1.1.12",
+    "connect": "3.6.6",
+    "eslint": "5.15.3",
+    "eslint-plugin-vue": "5.2.2",
+    "html-webpack-plugin": "3.2.0",
+    "husky": "1.3.1",
+    "less": "^3.13.1",
+    "less-loader": "^5.0.0",
+    "lint-staged": "8.1.5",
+    "mockjs": "1.0.1-beta3",
+    "node-sass": "^4.14.1",
+    "sass-loader": "^7.1.0",
+    "plop": "2.3.0",
+    "pug": "^3.0.2",
+    "pug-plain-loader": "^1.1.0",
+    "qs": "^6.10.2",
+    "runjs": "^4.3.2",
+    "script-ext-html-webpack-plugin": "2.1.3",
+    "script-loader": "0.7.2",
+    "serve-static": "^1.13.2",
+    "svg-sprite-loader": "4.1.3",
+    "svgo": "1.2.0",
+    "vue-template-compiler": "2.6.10"
+  },
+  "engines": {
+    "node": ">=8.9",
+    "npm": ">= 3.0.0"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions"
+  ]
+}

+ 2 - 2
imcs-ui/src/lang/zh/prepare.js

@@ -137,7 +137,7 @@ export default {
 	  		technFenxi: '工序分析',
 	  		autoPg: '自动化程序管理',
 	  		setUse: '设为使用',
-	  		loadTechn: '导入工艺',
+	  		loadTechn: '导',
 	  		copyVision: '复制一个版本',
 	  		expandsEve: '展开产品所有节点',
 	  		audioStatus: '提交审核',
@@ -248,7 +248,7 @@ export default {
 			// 【托盘管理】列表table字段名称
 			tray: {
 				no: '物料编码',
-				name: '托名称',
+				name: '托名称',
         materialType: '物料类型',
         factory: '生产分厂/制造商',
 

+ 61 - 2
imcs-ui/src/layout/index.vue

@@ -54,12 +54,58 @@ export default {
         withoutAnimation: this.sidebar.withoutAnimation,
         mobile: this.device === 'mobile'
       }
-    }
+    },
+    websocketMsg() {
+	      return this.$store.getters.STAFF_UPDATE.msg
+	  },
+  },
+  watch: {
+	  	websocketMsg(curVal, oldVal) {
+	      	let obj = JSON.parse(curVal)
+	      	this.openMessageTips(obj)
+	    }
+	},
+  mounted() {
+    // 判断长连接,是否已经开启      
+	  	if(this.$store.state.websocket.websock == null){
+	  		// 页面刚进入时开启长连接
+    		this.$store.dispatch('STAFF_WEBSOCKET')	        
+	  	}      
   },
   methods: {
     handleClickOutside() {
       this.$store.commit('setting/closeSidebar', { withoutAnimation: false })
-    }
+    },
+    openMessageTips(data){      //排除数字大屏         
+      if(this.$route.fullPath.indexOf("/largeScreen/twoDatasModel")<0){
+        console.log("接收websocket的推送信息 == ", data)        
+        if(data!=null && data.type == 'PUSH_TYPE_DATA_SCREEN'){          
+          this.$nextTick(()=> {
+              let datas = data.data.warnMap.warnData.records              
+              datas.forEach((data)=>{
+                  let msg = data.feedback ? data.feedback : " 响应超时 ";
+                  let content = "<a href='#/developer/warnLong'>"+(data.resourceName? "["+ data.resourceName +"] " : "" )+(data.procedureName? data.procedureName : "")
+                   + (data.instructionName? "("+data.instructionName+")" : "") + msg+"</a>";                  
+                  this.$notification.error(content, { messageIsHTML: true, timer:60, title:"异常警报", showCloseIcn:true });
+              })
+          });
+        }
+      }
+    },
+    // 组件销毁的时候,关闭websocket连接
+	  websocketClose() { 
+	      this.$store.getters.STAFF_UPDATE.lockReconnect = true
+	      this.$store.getters.STAFF_UPDATE.websock.close() // 离开路由之后断开websocket连接
+	      clearTimeout(this.$store.getters.STAFF_UPDATE.reconnectData) // 离开清除 timeout
+	      clearTimeout(this.$store.getters.STAFF_UPDATE.timeoutObj) // 离开清除 timeout
+	      clearTimeout(this.$store.getters.STAFF_UPDATE.serverTimeoutObj) // 离开清除 timeout
+	    },
+	  	// websocket信息变更
+	  onmessage() {
+	      this.$store.getters.STAFF_UPDATE.websock.onmessage = function(evt) {	       
+		     	console.log("websocket获取数据==="+evt)
+	      }
+	  },
   }
 }
 </script>
@@ -106,4 +152,17 @@ export default {
   .mobile .fixed-header {
     width: 100%;
   }
+
+  .dialog-notice{
+    position: fixed;
+    bottom: 85px;
+    display: inline-block;
+    max-width: 300px;
+    left: 0;
+    right: 0;
+    margin: 0 auto 10px auto;
+    background-color: #000;
+    text-align: center;
+    z-index: 9999;
+}
 </style>

+ 14 - 0
imcs-ui/src/main.js

@@ -25,6 +25,7 @@ import uploader from 'vue-simple-uploader'
 import VueLazyload from 'vue-lazyload'
 // 日期格式化
 import $moment from 'moment' //引入文件
+$moment.suppressDeprecationWarnings = true;
 Vue.use($moment);//赋值使用。this.$moment()
 
 // 打印
@@ -70,6 +71,19 @@ Object.keys(filters).forEach(key => {
 // 注册打印
 Vue.use(Print) 
 
+//注册全局弹框
+//import Notice from "@/components/Notice/index.js"
+//Vue.use(Notice)
+import VueNotification from "@kugatsu/vuenotification"; 
+Vue.use(VueNotification, {
+  timer: 20,
+  error:{
+    background: "white",
+    color: "red"
+  },
+  position: "bottomRight",
+});
+
 Vue.config.productionTip = false
 
 new Vue({

+ 1 - 1
imcs-ui/src/views/zuihou/developer/warnLong/Index.vue

@@ -101,7 +101,7 @@
       <!-- 处理状态 -->
       <el-table-column prop="optType" :label='$t("developer.table.warnLong.goodsType")' align="center" width="120px">
       	<template slot-scope="{ row }">
-      		    <el-tag v-if="row.status == '0'" type="success">{{$t("developer.common.status.start")}}</el-tag>
+      		    <el-tag v-if="row.status == '0'" type="failed">{{$t("developer.common.status.start")}}</el-tag>
 	      	    <el-tag v-if="row.status == '1'" type="success">{{$t("developer.common.status.end")}}</el-tag>
 					
 		</template>

+ 32 - 0
imcs-ui/src/views/zuihou/largeScreen/twoDatasModel/Index.vue

@@ -582,6 +582,29 @@
 						 this.mashingOneList.data = this.mashingOneList.data.concat(this.mashingTwoList.data)	
 						
 						 //this.$ref.runningTime.innerHmtl =  ((allDatas[0] + 5/360)/60).toFixed(1)
+                         
+						 let datas = data.data.warnMap.warnData.records
+						 let that = this
+						 this.yujingList = datas.map((data)=>{						    
+						    let msg = data.feedback ? data.feedback : " 响应超时 ";
+							let arr = data.createTime;                            							 
+							let time = arr[0] + "-" + arr[1] + "-" + arr[2] + "\t" + arr[3] + ":" + arr[4];	
+                            let itemname = "["+ data.resourceName +"] "+data.procedureName+"("+data.instructionName+")" + msg; 	
+                            if(data.status == '0'){
+							    setTimeout(function(){
+								    that.$notify({
+								    title: '预警提示',
+									message: itemname + "\t" + "请管理人员去产线查看",
+									type: 'warning',
+									position: 'bottom-right',									
+									duration: 5000,
+									customClass:'notifyStyle', 
+								   });								
+								},8000);							    
+							}						
+						    return {itemname:itemname , time: time}
+						 });
+
 
 					})
 			    }	
@@ -717,6 +740,15 @@
 	.timeprogress .el-progress-bar__inner {
 	  text-align:center;
 	}
+	.notifyStyle {
+	  background-color:#000088 !important;	  
+	}
+	.notifyStyle .el-notification__content{
+	   color: #fff !important;
+	}
+	.notifyStyle .el-notification__title {
+	   color: #fff !important;
+	}
 </style>
 <!-- 本组件样式 -->
 <style lang="scss" scoped>

+ 1 - 1
imcs-ui/src/views/zuihou/prepareProductMgr/material/components/View.vue

@@ -36,7 +36,7 @@
 		      </template>
 	      </el-table-column>
 	      <!-- CheckBox -->
-	      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
+	      <el-table-column align="center" type="selection" width="50" :reserve-selection="false" />
 	      <el-table-column prop="furnaceBatchNo" label='原炉(批)号' :show-overflow-tooltip="true" width="150px"></el-table-column>
 	      <el-table-column prop="meterialCode" label='物料编码' :show-overflow-tooltip="true" width="200px"></el-table-column>
 <!--	      <el-table-column prop="tradeMark" label='材料牌号' :show-overflow-tooltip="true" width="150px"></el-table-column>-->

+ 1 - 1
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/AutoCodeEdit.vue

@@ -194,7 +194,7 @@ export default {
       width: this.initWidth(),
       confirmDisabled: false,
       parentIds: [],
-      machineNodes:[{label:'上传程序',value:"1"},{label:'执行程序',value:"2"},{label:'刀具校验',value:"3"}],
+      machineNodes:[{label:'上传程序',value:"1"},{label:'执行程序',value:"2"},{label:'坐标系校验',value:"3"}],
       agvNodes:[{label:'舱体线接驳位',value:"1"},{label:'框体线接驳位',value:"2"},{label:'保障中心线接驳位',value:"3"}],
       robotNodes:[{label:'舱体线机器人',value:"1"},{label:'伺服舵机',value:"2"},{label:'框体线机器人',value:"3"}],      
       robotAction:[{label:'取',value:"1"},{label:'放',value:"2"}],

+ 1 - 1
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/TenantCodeEdit.vue

@@ -70,7 +70,7 @@
       <el-table-column prop="command" label='指令' align="center" width="100px">           
            <template slot-scope="{ row }">              
               <el-tag  v-if=" row.category =='1' "> 
-                    {{ row.command == "1" ? '上传程序':(row.command == "2" ? '执行程序': '刀具校验' )  }}        	      
+                    {{ row.command == "1" ? '上传程序':(row.command == "2" ? '执行程序': '坐标系校验' )  }}        	      
               </el-tag>
               <el-tag  v-if=" row.category =='2' "> 
                      搬运