diff --git a/.env.development b/.env.development index f2301ee..a61ffc3 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,11 @@ # 页面标题 -VUE_APP_TITLE = 苦糖果MES-软件开发记录 +VUE_APP_TITLE = 智造大师 # 开发环境配置 ENV = 'development' # 若依管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' +VUE_APP_BASE_API = '/prod-api' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production b/.env.production index 93172c2..63b8337 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 苦糖果MES-软件开发记录 +VUE_APP_TITLE = 智造大师 # 生产环境配置 ENV = 'production' diff --git a/.env.staging b/.env.staging index 12ce6a0..525bf3a 100644 --- a/.env.staging +++ b/.env.staging @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 苦糖果MES-软件开发记录 +VUE_APP_TITLE = 智造大师 NODE_ENV = production diff --git a/.gitignore b/.gitignore index 03d9869..253e46d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,9 +18,9 @@ selenium-debug.log *.njsproj *.sln *.local -.editorconfig -.eslintignore -.eslintrc.js -.env.* +# .editorconfig +# .eslintignore +# .eslintrc.js +# .env.* package-lock.json yarn.lock diff --git a/package.json b/package.json index fd08a43..b71fac5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ktg-mes-ui", "version": "3.8.2", - "description": "苦糖果MES", + "description": "智造大师", "author": "YinJinLu", "license": "MIT", "scripts": { @@ -44,9 +44,12 @@ "dhtmlx-gantt": "^7.1.11", "echarts": "4.9.0", "element-ui": "2.15.6", + "ezuikit-js": "^0.7.2", "file-saver": "2.0.5", + "flv.js": "^1.6.2", "fuse.js": "6.4.3", "highlight.js": "9.18.5", + "jquery": "^3.7.1", "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", diff --git a/public/favicon.ico b/public/favicon.ico index 8e03fd4..a58c261 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html index 925455c..6f7abbb 100644 --- a/public/index.html +++ b/public/index.html @@ -7,6 +7,7 @@ <%= webpackConfig.name %> + 智造大师 diff --git a/src/components/TaskSelect/taskSelectSingle.vue b/src/components/TaskSelect/taskSelectSingle.vue index e7ffe96..297e2e7 100644 --- a/src/components/TaskSelect/taskSelectSingle.vue +++ b/src/components/TaskSelect/taskSelectSingle.vue @@ -167,7 +167,6 @@ workstationId: null, workstationCode: null, workstationName: null, - routeId: null, processId: this.processId, processCode: null, processName: null, @@ -217,7 +216,6 @@ getList() { this.loading = true; listProtask(this.queryParams).then(response => { - debugger; this.protaskList = response.rows; this.total = response.total; this.loading = false; diff --git a/src/components/qcindexSelect/single.vue b/src/components/qcindexSelect/single.vue index 091dfcd..b369c95 100644 --- a/src/components/qcindexSelect/single.vue +++ b/src/components/qcindexSelect/single.vue @@ -130,7 +130,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ diff --git a/src/components/stockSelect/single.vue b/src/components/stockSelect/single.vue index 27d4c7c..65a9650 100644 --- a/src/components/stockSelect/single.vue +++ b/src/components/stockSelect/single.vue @@ -161,7 +161,7 @@ export default { return { showFlag:false, // 遮罩层 - loading: true, + loading: false, // 选中数组 selectedId: null, selectedRow: null, @@ -244,19 +244,19 @@ export default { getList() { this.loading = true; listWmstock(this.queryParams).then(response => { - if(response.rows){ - debugger; - if(this.warehouseCode != null && this.warehouseCode != undefined && this.warehouseCode.indexOf('VIR') >0 ){ - this.wmstockList = response.rows; - }else { - //如果不是查询线边库的物资,则在查询结果中过滤掉线边库的数据 - this.wmstockList = response.rows.filter((el) =>{ - return el.warehouseCode.indexOf('VIR') == -1; - }); - } + // if(response.rows){ + // if(this.warehouseCode.indexOf('VIR') == -1){ + // //如果不是查询线边库的物资,则在查询结果中过滤掉线边库的数据 + // this.wmstockList = response.rows.filter((el) =>{ + // return el.warehouseCode.indexOf('VIR') == -1; + // }); + // } + // this.total = response.total; + // this.loading = false; + // } + this.wmstockList = response.rows this.total = response.total; this.loading = false; - } }); }, /** 查询分类下拉树结构 */ diff --git a/src/components/workorderSelect/single.vue b/src/components/workorderSelect/single.vue index 66d90df..72e7495 100644 --- a/src/components/workorderSelect/single.vue +++ b/src/components/workorderSelect/single.vue @@ -74,7 +74,7 @@ - + diff --git a/src/components/workstationSelect/simpletableSingle.vue b/src/components/workstationSelect/simpletableSingle.vue index 2e11c06..13fd66e 100644 --- a/src/components/workstationSelect/simpletableSingle.vue +++ b/src/components/workstationSelect/simpletableSingle.vue @@ -30,7 +30,7 @@ - + 搜索 @@ -178,7 +178,7 @@ export default { workstationCode: null, workstationName: null, workstationAddress: null, - workshopId: null, + workshopId: "214", workshopCode: null, workshopName: null, processId: null, diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 39b3dad..2cc5270 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -1,33 +1,62 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + + + + + + + + + + + + + + - - + + - - - - - + + + + + + + + + + + + + + + +  选择通知人 + + + + - - + + - + 将文件拖到此处,或点击上传
- 是否更新已经存在的设备数据 + + 是否更新已经存在的设备数据
仅允许导入xls、xlsx格式文件。 - 下载模板 + 下载模板
+ + + + +
+ 取消 + 保存 +
+
\ No newline at end of file + diff --git a/src/views/mes/dv/machinerytype/index.vue b/src/views/mes/dv/machinerytype/index.vue index 1c4d4ad..bcb1314 100644 --- a/src/views/mes/dv/machinerytype/index.vue +++ b/src/views/mes/dv/machinerytype/index.vue @@ -1,6 +1,13 @@ diff --git a/src/views/mes/dv/repair/index.vue b/src/views/mes/dv/repair/index.vue index cbe6e5e..1bc75f6 100644 --- a/src/views/mes/dv/repair/index.vue +++ b/src/views/mes/dv/repair/index.vue @@ -294,7 +294,7 @@ export default { components: {Repairline,MachinerySelectSingle}, data() { return { - autoGenFlag:false, + autoGenFlag:true, optType: undefined, // 遮罩层 loading: true, @@ -427,6 +427,9 @@ export default { this.reset(); this.open = true; this.title = "添加设备维修单"; + genCode('REPAIR_CODE').then(response =>{ + this.form.repairCode = response; + }); }, /** 修改按钮操作 */ handleUpdate(row) { diff --git a/src/views/mes/dv/route/index.vue b/src/views/mes/dv/route/index.vue new file mode 100644 index 0000000..1dc48c6 --- /dev/null +++ b/src/views/mes/dv/route/index.vue @@ -0,0 +1,501 @@ + + + + + diff --git a/src/views/mes/dv/siteConfiguration/index.vue b/src/views/mes/dv/siteConfiguration/index.vue new file mode 100644 index 0000000..bef46da --- /dev/null +++ b/src/views/mes/dv/siteConfiguration/index.vue @@ -0,0 +1,531 @@ + + + + + diff --git a/src/views/mes/dv/subject/index.vue b/src/views/mes/dv/subject/index.vue index c216165..4851fe9 100644 --- a/src/views/mes/dv/subject/index.vue +++ b/src/views/mes/dv/subject/index.vue @@ -281,7 +281,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ diff --git a/src/views/mes/md/bom/index.vue b/src/views/mes/md/bom/index.vue index 400b4a5..01aaadd 100644 --- a/src/views/mes/md/bom/index.vue +++ b/src/views/mes/md/bom/index.vue @@ -464,7 +464,7 @@ export default { maxStock: 0, remark: undefined }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ diff --git a/src/views/mes/md/client/index.vue b/src/views/mes/md/client/index.vue index bf00ab1..878c8ff 100644 --- a/src/views/mes/md/client/index.vue +++ b/src/views/mes/md/client/index.vue @@ -353,7 +353,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, // 遮罩层 loading: true, @@ -485,7 +485,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -510,6 +510,9 @@ export default { this.open = true; this.title = "添加客户"; this.optType = "add"; + genCode('CLIENT_CODE').then(response =>{ + this.form.clientCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/md/mditem/components/sop.vue b/src/views/mes/md/mditem/components/sop.vue index ed48944..b4c1361 100644 --- a/src/views/mes/md/mditem/components/sop.vue +++ b/src/views/mes/md/mditem/components/sop.vue @@ -160,12 +160,10 @@ export default{ }, //图片上传成功 handleImgUplaoded(imgUrl){ - console.log(imgUrl); this.form.sopUrl = imgUrl; }, //图片移除 handleImgRemoved(imgUrl){ - console.log(imgUrl); this.form.sopUrl = null; }, //提交 diff --git a/src/views/mes/md/mditem/index.vue b/src/views/mes/md/mditem/index.vue index 3866b9c..1506532 100644 --- a/src/views/mes/md/mditem/index.vue +++ b/src/views/mes/md/mditem/index.vue @@ -242,7 +242,7 @@ - + @@ -531,7 +531,7 @@ export default { optType: undefined, remark: undefined }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -572,6 +572,9 @@ export default { this.optType = "add"; this.open = true; this.title = "新增物料/产品"; + genCode('ITEM_CODE').then(response =>{ + this.form.itemCode = response; + }); }, /** 修改按钮操作 */ handleUpdate(row) { diff --git a/src/views/mes/md/pallet/index.vue b/src/views/mes/md/pallet/index.vue new file mode 100644 index 0000000..a94728f --- /dev/null +++ b/src/views/mes/md/pallet/index.vue @@ -0,0 +1,640 @@ + + + diff --git a/src/views/mes/md/vendor/index.vue b/src/views/mes/md/vendor/index.vue index 53d892d..00ccbec 100644 --- a/src/views/mes/md/vendor/index.vue +++ b/src/views/mes/md/vendor/index.vue @@ -388,7 +388,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, // 遮罩层 loading: true, @@ -516,7 +516,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -541,6 +541,9 @@ export default { this.open = true; this.title = "添加供应商"; this.optType = "add"; + genCode('VENDOR_CODE').then(response =>{ + this.form.vendorCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/md/workshop/index.vue b/src/views/mes/md/workshop/index.vue index 15d2f4f..7ece110 100644 --- a/src/views/mes/md/workshop/index.vue +++ b/src/views/mes/md/workshop/index.vue @@ -188,7 +188,7 @@ export default { dicts: ['sys_yes_no'], data() { return { - autoGenFlag:false, + autoGenFlag:true, optType: undefined, // 遮罩层 loading: true, @@ -271,7 +271,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -296,6 +296,9 @@ export default { this.open = true; this.title = "添加车间"; this.optType = "add"; + genCode('WORKSHOP_CODE').then(response =>{ + this.form.workshopCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/md/workstation/index.vue b/src/views/mes/md/workstation/index.vue index f94c6d7..5203464 100644 --- a/src/views/mes/md/workstation/index.vue +++ b/src/views/mes/md/workstation/index.vue @@ -1,6 +1,13 @@ diff --git a/src/views/mes/pro/feedback/index.vue b/src/views/mes/pro/feedback/index.vue index d75427e..aa39bd5 100644 --- a/src/views/mes/pro/feedback/index.vue +++ b/src/views/mes/pro/feedback/index.vue @@ -414,8 +414,6 @@ export default { workstationId: null, workstationCode: null, workstationName: null, - routeId: null, - routeCode: null, processId: null, processCode: null, processName: null, @@ -605,8 +603,6 @@ export default { this.form.processId = row.processId; this.form.processCode = row.processCode; this.form.processName = row.processName; - this.form.routeId = row.routeId; - this.form.routeCode = row.routeCode; this.form.isCheck = row.isCheck; if(row.isCheck == 'N'){ this.form.quantityUncheck = 0; diff --git a/src/views/mes/pro/process/index.vue b/src/views/mes/pro/process/index.vue index ecc9649..d0ecbc0 100644 --- a/src/views/mes/pro/process/index.vue +++ b/src/views/mes/pro/process/index.vue @@ -1,122 +1,196 @@ diff --git a/src/views/mes/pro/processType/index.vue b/src/views/mes/pro/processType/index.vue new file mode 100644 index 0000000..9015c90 --- /dev/null +++ b/src/views/mes/pro/processType/index.vue @@ -0,0 +1,288 @@ + + + diff --git a/src/views/mes/pro/production/components/complete.vue b/src/views/mes/pro/production/components/complete.vue new file mode 100644 index 0000000..ea11ccc --- /dev/null +++ b/src/views/mes/pro/production/components/complete.vue @@ -0,0 +1,288 @@ + + + + diff --git a/src/views/mes/pro/production/components/defective.vue b/src/views/mes/pro/production/components/defective.vue new file mode 100644 index 0000000..6eb5fe1 --- /dev/null +++ b/src/views/mes/pro/production/components/defective.vue @@ -0,0 +1,190 @@ + + + + diff --git a/src/views/mes/pro/production/components/ticket.vue b/src/views/mes/pro/production/components/ticket.vue new file mode 100644 index 0000000..195e186 --- /dev/null +++ b/src/views/mes/pro/production/components/ticket.vue @@ -0,0 +1,171 @@ + + + + diff --git a/src/views/mes/pro/production/components/video.vue b/src/views/mes/pro/production/components/video.vue new file mode 100644 index 0000000..360dfa2 --- /dev/null +++ b/src/views/mes/pro/production/components/video.vue @@ -0,0 +1,115 @@ + + + diff --git a/src/views/mes/pro/production/components/webrtcstreamer.js b/src/views/mes/pro/production/components/webrtcstreamer.js new file mode 100644 index 0000000..361ab71 --- /dev/null +++ b/src/views/mes/pro/production/components/webrtcstreamer.js @@ -0,0 +1,306 @@ +var WebRtcStreamer = (function() { + + /** + * Interface with WebRTC-streamer API + * @constructor + * @param {string} videoElement - id of the video element tag + * @param {string} srvurl - url of webrtc-streamer (default is current location) + */ + var WebRtcStreamer = function WebRtcStreamer (videoElement, srvurl) { + if (typeof videoElement === "string") { + this.videoElement = document.getElementById(videoElement); + } else { + this.videoElement = videoElement; + } + this.srvurl = srvurl || location.protocol+"//"+window.location.hostname+":"+window.location.port; + this.pc = null; + + this.mediaConstraints = { offerToReceiveAudio: true, offerToReceiveVideo: true }; + + this.iceServers = null; + this.earlyCandidates = []; + } + + WebRtcStreamer.prototype._handleHttpErrors = function (response) { + if (!response.ok) { + throw Error(response.statusText); + } + return response; + } + + /** + * Connect a WebRTC Stream to videoElement + * @param {string} videourl - id of WebRTC video stream + * @param {string} audiourl - id of WebRTC audio stream + * @param {string} options - options of WebRTC call + * @param {string} stream - local stream to send + */ + WebRtcStreamer.prototype.connect = function(videourl, audiourl, options, localstream) { + this.disconnect(); + + // getIceServers is not already received + if (!this.iceServers) { + console.log("Get IceServers"); + + fetch(this.srvurl + "/api/getIceServers") + .then(this._handleHttpErrors) + .then( (response) => (response.json()) ) + .then( (response) => this.onReceiveGetIceServers(response, videourl, audiourl, options, localstream)) + .catch( (error) => this.onError("getIceServers " + error )) + + } else { + this.onReceiveGetIceServers(this.iceServers, videourl, audiourl, options, localstream); + } + } + + /** + * Disconnect a WebRTC Stream and clear videoElement source + */ + WebRtcStreamer.prototype.disconnect = function() { + if (this.videoElement?.srcObject) { + this.videoElement.srcObject.getTracks().forEach(track => { + track.stop() + this.videoElement.srcObject.removeTrack(track); + }); + } + if (this.pc) { + fetch(this.srvurl + "/api/hangup?peerid=" + this.pc.peerid) + .then(this._handleHttpErrors) + .catch( (error) => this.onError("hangup " + error )) + + + try { + this.pc.close(); + } + catch (e) { + console.log ("Failure close peer connection:" + e); + } + this.pc = null; + } + } + + /* + * GetIceServers callback + */ + WebRtcStreamer.prototype.onReceiveGetIceServers = function(iceServers, videourl, audiourl, options, stream) { + this.iceServers = iceServers; + this.pcConfig = iceServers || {"iceServers": [] }; + try { + this.createPeerConnection(); + + var callurl = this.srvurl + "/api/call?peerid=" + this.pc.peerid + "&url=" + encodeURIComponent(videourl); + if (audiourl) { + callurl += "&audiourl="+encodeURIComponent(audiourl); + } + if (options) { + callurl += "&options="+encodeURIComponent(options); + } + + if (stream) { + this.pc.addStream(stream); + } + + // clear early candidates + this.earlyCandidates.length = 0; + + // create Offer + this.pc.createOffer(this.mediaConstraints).then((sessionDescription) => { + console.log("Create offer:" + JSON.stringify(sessionDescription)); + + this.pc.setLocalDescription(sessionDescription) + .then(() => { + fetch(callurl, { method: "POST", body: JSON.stringify(sessionDescription) }) + .then(this._handleHttpErrors) + .then( (response) => (response.json()) ) + .catch( (error) => this.onError("call " + error )) + .then( (response) => this.onReceiveCall(response) ) + .catch( (error) => this.onError("call " + error )) + + }, (error) => { + console.log ("setLocalDescription error:" + JSON.stringify(error)); + }); + + }, (error) => { + alert("Create offer error:" + JSON.stringify(error)); + }); + + } catch (e) { + this.disconnect(); + alert("connect error: " + e); + } + } + + + WebRtcStreamer.prototype.getIceCandidate = function() { + fetch(this.srvurl + "/api/getIceCandidate?peerid=" + this.pc.peerid) + .then(this._handleHttpErrors) + .then( (response) => (response.json()) ) + .then( (response) => this.onReceiveCandidate(response)) + .catch( (error) => this.onError("getIceCandidate " + error )) + } + + /* + * create RTCPeerConnection + */ + WebRtcStreamer.prototype.createPeerConnection = function() { + console.log("createPeerConnection config: " + JSON.stringify(this.pcConfig)); + this.pc = new RTCPeerConnection(this.pcConfig); + var pc = this.pc; + pc.peerid = Math.random(); + + pc.onicecandidate = (evt) => this.onIceCandidate(evt); + pc.onaddstream = (evt) => this.onAddStream(evt); + pc.oniceconnectionstatechange = (evt) => { + console.log("oniceconnectionstatechange state: " + pc.iceConnectionState); + if (this.videoElement) { + if (pc.iceConnectionState === "connected") { + this.videoElement.style.opacity = "1.0"; + } + else if (pc.iceConnectionState === "disconnected") { + this.videoElement.style.opacity = "0.25"; + } + else if ( (pc.iceConnectionState === "failed") || (pc.iceConnectionState === "closed") ) { + this.videoElement.style.opacity = "0.5"; + } else if (pc.iceConnectionState === "new") { + this.getIceCandidate(); + } + } + } + pc.ondatachannel = function(evt) { + console.log("remote datachannel created:"+JSON.stringify(evt)); + + evt.channel.onopen = function () { + console.log("remote datachannel open"); + this.send("remote channel openned"); + } + evt.channel.onmessage = function (event) { + console.log("remote datachannel recv:"+JSON.stringify(event.data)); + } + } + pc.onicegatheringstatechange = function() { + if (pc.iceGatheringState === "complete") { + const recvs = pc.getReceivers(); + + recvs.forEach((recv) => { + if (recv.track && recv.track.kind === "video") { + console.log("codecs:" + JSON.stringify(recv.getParameters().codecs)) + } + }); + } + } + + try { + var dataChannel = pc.createDataChannel("ClientDataChannel"); + dataChannel.onopen = function() { + console.log("local datachannel open"); + this.send("local channel openned"); + } + dataChannel.onmessage = function(evt) { + console.log("local datachannel recv:"+JSON.stringify(evt.data)); + } + } catch (e) { + console.log("Cannor create datachannel error: " + e); + } + + console.log("Created RTCPeerConnnection with config: " + JSON.stringify(this.pcConfig) ); + return pc; + } + + + /* + * RTCPeerConnection IceCandidate callback + */ + WebRtcStreamer.prototype.onIceCandidate = function (event) { + if (event.candidate) { + if (this.pc.currentRemoteDescription) { + this.addIceCandidate(this.pc.peerid, event.candidate); + } else { + this.earlyCandidates.push(event.candidate); + } + } + else { + console.log("End of candidates."); + } + } + + + WebRtcStreamer.prototype.addIceCandidate = function(peerid, candidate) { + fetch(this.srvurl + "/api/addIceCandidate?peerid="+peerid, { method: "POST", body: JSON.stringify(candidate) }) + .then(this._handleHttpErrors) + .then( (response) => (response.json()) ) + .then( (response) => {console.log("addIceCandidate ok:" + response)}) + .catch( (error) => this.onError("addIceCandidate " + error )) + } + + /* + * RTCPeerConnection AddTrack callback + */ + WebRtcStreamer.prototype.onAddStream = function(event) { + console.log("Remote track added:" + JSON.stringify(event)); + + this.videoElement.srcObject = event.stream; + var promise = this.videoElement.play(); + if (promise !== undefined) { + promise.catch((error) => { + console.warn("error:"+error); + this.videoElement.setAttribute("controls", true); + }); + } + } + + /* + * AJAX /call callback + */ + WebRtcStreamer.prototype.onReceiveCall = function(dataJson) { + + console.log("offer: " + JSON.stringify(dataJson)); + var descr = new RTCSessionDescription(dataJson); + this.pc.setRemoteDescription(descr).then(() => { + console.log ("setRemoteDescription ok"); + while (this.earlyCandidates.length) { + var candidate = this.earlyCandidates.shift(); + this.addIceCandidate(this.pc.peerid, candidate); + } + + this.getIceCandidate() + } + , (error) => { + console.log ("setRemoteDescription error:" + JSON.stringify(error)); + }); + } + + /* + * AJAX /getIceCandidate callback + */ + WebRtcStreamer.prototype.onReceiveCandidate = function(dataJson) { + console.log("candidate: " + JSON.stringify(dataJson)); + if (dataJson) { + for (var i=0; i { console.log ("addIceCandidate OK"); } + , (error) => { console.log ("addIceCandidate error:" + JSON.stringify(error)); } ); + } + this.pc.addIceCandidate(); + } + } + + + /* + * AJAX callback for Error + */ + WebRtcStreamer.prototype.onError = function(status) { + console.log("onError:" + status); + } + + return WebRtcStreamer; + })(); + + if (typeof window !== 'undefined' && typeof window.document !== 'undefined') { + window.WebRtcStreamer = WebRtcStreamer; + } + if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { + module.exports = WebRtcStreamer; + } + \ No newline at end of file diff --git a/src/views/mes/pro/production/index.vue b/src/views/mes/pro/production/index.vue new file mode 100644 index 0000000..756ace1 --- /dev/null +++ b/src/views/mes/pro/production/index.vue @@ -0,0 +1,573 @@ + + + + + diff --git a/src/views/mes/pro/proroute/index.vue b/src/views/mes/pro/proroute/index.vue index bc08c9a..df05d3d 100644 --- a/src/views/mes/pro/proroute/index.vue +++ b/src/views/mes/pro/proroute/index.vue @@ -1,6 +1,13 @@ diff --git a/src/views/mes/pro/proroute/routeprocess.vue b/src/views/mes/pro/proroute/routeprocess.vue index 41ecf43..cf4e956 100644 --- a/src/views/mes/pro/proroute/routeprocess.vue +++ b/src/views/mes/pro/proroute/routeprocess.vue @@ -1,6 +1,6 @@ diff --git a/src/views/mes/pro/schedule/index.vue b/src/views/mes/pro/schedule/index.vue index 91400b9..2d72b4c 100644 --- a/src/views/mes/pro/schedule/index.vue +++ b/src/views/mes/pro/schedule/index.vue @@ -1,6 +1,13 @@ \ No newline at end of file + diff --git a/src/views/mes/wm/itemrecpt/line.vue b/src/views/mes/wm/itemrecpt/line.vue index 4b20b1e..672f5ea 100644 --- a/src/views/mes/wm/itemrecpt/line.vue +++ b/src/views/mes/wm/itemrecpt/line.vue @@ -121,7 +121,7 @@ - + diff --git a/src/views/mes/wm/location/index.vue b/src/views/mes/wm/location/index.vue index 14e45d0..b60a4fa 100644 --- a/src/views/mes/wm/location/index.vue +++ b/src/views/mes/wm/location/index.vue @@ -157,7 +157,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, warehouseId: undefined, // 遮罩层 @@ -242,7 +242,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -267,6 +267,9 @@ export default { this.open = true; this.title = "添加库区设置"; this.optType = "add"; + genCode('LOCATION_CODE').then(response =>{ + this.form.locationCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/wm/outsourceissue/index.vue b/src/views/mes/wm/outsourceissue/index.vue index 608e2a3..d93db38 100644 --- a/src/views/mes/wm/outsourceissue/index.vue +++ b/src/views/mes/wm/outsourceissue/index.vue @@ -250,7 +250,7 @@ export default { components: {Issueline,WorkorderSelect}, data() { return { - autoGenFlag:false, + autoGenFlag:true, optType: undefined, warehouseInfo:[], warehouseOptions:[], @@ -376,7 +376,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -401,6 +401,9 @@ export default { this.open = true; this.title = "添加外协发料单头"; this.optType = "add"; + genCode('OUTSOURCE_ISSUE_CODE').then(response =>{ + this.form.issueCode = response; + }); }, /** 修改按钮操作 */ handleUpdate(row) { diff --git a/src/views/mes/wm/outsourcerecpt/index.vue b/src/views/mes/wm/outsourcerecpt/index.vue index 352d39f..540f57c 100644 --- a/src/views/mes/wm/outsourcerecpt/index.vue +++ b/src/views/mes/wm/outsourcerecpt/index.vue @@ -258,7 +258,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, warehouseInfo:[], warehouseOptions:[], @@ -347,7 +347,7 @@ export default { areaId: null, areaCode: null, areaName: null, recptDate: new Date(), status: "PREPARE", remark: null, attr1: null, attr2: null, attr3: null, attr4: null, createBy: null, createTime: null, updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -372,6 +372,9 @@ export default { this.open = true; this.title = "添加外协入库单"; this.optType = "add"; + genCode('OUTSOURCE_RECPT_CODE').then(response =>{ + this.form.recptCode = response; + }); }, /** 修改按钮操作 */ handleUpdate(row) { diff --git a/src/views/mes/wm/package/index.vue b/src/views/mes/wm/package/index.vue index 34cd3dd..fd062d4 100644 --- a/src/views/mes/wm/package/index.vue +++ b/src/views/mes/wm/package/index.vue @@ -290,7 +290,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, // 遮罩层 loading: true, @@ -430,7 +430,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -467,6 +467,9 @@ export default { this.open = true; this.title = "添加装箱单"; this.optType="add"; + genCode('PACKAGE_CODE').then(response =>{ + this.form.packageCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/wm/productrecpt/index.vue b/src/views/mes/wm/productrecpt/index.vue index 1a6030c..c198877 100644 --- a/src/views/mes/wm/productrecpt/index.vue +++ b/src/views/mes/wm/productrecpt/index.vue @@ -58,7 +58,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['mes:wm:productrecpt:edit']" + v-hasPermi="['mes:productrecpt:edit']" >修改 @@ -69,7 +69,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['mes:wm:productrecpt:remove']" + v-hasPermi="['mes:productrecpt:remove']" >删除 @@ -110,7 +110,7 @@ icon="el-icon-video-play" v-if="scope.row.status =='PREPARE'" @click="handleExecute(scope.row)" - v-hasPermi="['mes:wm:productrecpt:edit']" + v-hasPermi="['mes:productrecpt:edit']" >执行入库 修改 删除
- + + @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status =='PREPARE'"> @@ -188,7 +188,7 @@ - + @@ -197,13 +197,13 @@ - 物料信息 + 物料信息 @@ -223,7 +223,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, warehouseInfo:[], warehouseOptions:[], @@ -302,16 +302,16 @@ export default { }); }, getWarehouseList(){ - getTreeList().then( response =>{ + getTreeList().then( response =>{ this.warehouseOptions = response.data; this.warehouseOptions.map(w =>{ w.children.map(l =>{ - let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName'); + let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName'); l.children = JSON.parse(lstr); }); - - let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName'); - w.children = JSON.parse(wstr); + + let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName'); + w.children = JSON.parse(wstr); }); let ostr=JSON.stringify(this.warehouseOptions).replace(/warehouseId/g,'pId').replace(/warehouseName/g, 'pName'); @@ -359,7 +359,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -383,6 +383,9 @@ export default { this.reset(); this.open = true; this.title = "添加产品入库单"; + genCode('PRODUCTRECPT_CODE').then(response =>{ + this.form.recptCode = response; + }); }, /** 修改按钮操作 */ handleUpdate(row) { @@ -459,7 +462,7 @@ export default { } }, //选择默认的仓库、库区、库位 - handleWarehouseChanged(obj){ + handleWarehouseChanged(obj){ if(obj !=null){ this.form.warehouseId = obj[0]; this.form.locationId = obj[1]; diff --git a/src/views/mes/wm/productsalse/index.vue b/src/views/mes/wm/productsalse/index.vue index 51cfde4..e7ae666 100644 --- a/src/views/mes/wm/productsalse/index.vue +++ b/src/views/mes/wm/productsalse/index.vue @@ -253,7 +253,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, warehouseInfo:[], warehouseOptions:[], @@ -403,7 +403,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -442,6 +442,9 @@ export default { this.open = true; this.title = "添加销售出库单"; this.optType = "add"; + genCode('PRODUCTSALSE_CODE').then(response =>{ + this.form.salseCode = response; + }); }, /** 修改按钮操作 */ handleUpdate(row) { diff --git a/src/views/mes/wm/productsalse/line.vue b/src/views/mes/wm/productsalse/line.vue index b43549f..e6efac9 100644 --- a/src/views/mes/wm/productsalse/line.vue +++ b/src/views/mes/wm/productsalse/line.vue @@ -9,7 +9,8 @@ size="mini" @click="handleAdd" v-hasPermi="['mes:wm:productsalse:add']" - >新增 + >新增 修改 + >修改 删除 + >删除 - + - + - - - + + + - + - + - + - + - - + + - + - + @@ -102,9 +156,13 @@ - + - + @@ -126,29 +184,39 @@ - + - + - + - + {{dict.label}} + >{{ dict.label }} @@ -156,23 +224,39 @@ v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.value" - >{{dict.label}} + >{{ dict.label }} - - - + + + - + - + @@ -186,30 +270,36 @@ diff --git a/src/views/mes/wm/rtissue/index.vue b/src/views/mes/wm/rtissue/index.vue index 2b0ca16..5f6d3ea 100644 --- a/src/views/mes/wm/rtissue/index.vue +++ b/src/views/mes/wm/rtissue/index.vue @@ -220,7 +220,7 @@ export default { }, data() { return { - autoGenFlag:false, + autoGenFlag:true, optType: undefined, warehouseInfo:[], warehouseOptions:[], @@ -349,7 +349,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -374,6 +374,9 @@ export default { this.open = true; this.title = "添加生产退料单头"; this.optType = "add"; + genCode('RTISSUE_CODE').then(response =>{ + this.form.rtCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/wm/rtsalse/index.vue b/src/views/mes/wm/rtsalse/index.vue index 22081ed..414c5a9 100644 --- a/src/views/mes/wm/rtsalse/index.vue +++ b/src/views/mes/wm/rtsalse/index.vue @@ -276,7 +276,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, warehouseInfo:[], warehouseOptions:[], @@ -434,7 +434,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -471,6 +471,9 @@ export default { this.open = true; this.title = "添加产品销售退货单"; this.optType = "add"; + genCode('RTSALSE_CODE').then(response =>{ + this.form.rtCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/wm/rtvendor/index.vue b/src/views/mes/wm/rtvendor/index.vue index 94a0734..10cbe3f 100644 --- a/src/views/mes/wm/rtvendor/index.vue +++ b/src/views/mes/wm/rtvendor/index.vue @@ -249,7 +249,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, // 遮罩层 loading: true, @@ -363,6 +363,9 @@ export default { this.open = true; this.title = "添加供应商退货"; this.optType = "add"; + genCode('WM_RTVENDOR_CODE').then(response =>{ + this.form.rtCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/wm/transfer/index.vue b/src/views/mes/wm/transfer/index.vue index c8a7d27..9dffab3 100644 --- a/src/views/mes/wm/transfer/index.vue +++ b/src/views/mes/wm/transfer/index.vue @@ -297,7 +297,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, // 遮罩层 loading: true, @@ -401,7 +401,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -426,6 +426,9 @@ export default { this.open = true; this.title = "添加转移单"; this.optType = "add"; + genCode('TRANSFER_CODE').then(response =>{ + this.form.transferCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/mes/wm/warehouse/index.vue b/src/views/mes/wm/warehouse/index.vue index 35b1718..7ece9f2 100644 --- a/src/views/mes/wm/warehouse/index.vue +++ b/src/views/mes/wm/warehouse/index.vue @@ -182,7 +182,7 @@ export default { data() { return { //自动生成编码 - autoGenFlag:false, + autoGenFlag:true, optType: undefined, // 遮罩层 loading: true, @@ -262,7 +262,7 @@ export default { updateBy: null, updateTime: null }; - this.autoGenFlag = false; + this.autoGenFlag = true; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -287,6 +287,9 @@ export default { this.open = true; this.title = "添加仓库设置"; this.optType = "add"; + genCode('WAREHOUSE_CODE').then(response =>{ + this.form.warehouseCode = response; + }); }, // 查询明细按钮操作 handleView(row){ diff --git a/src/views/register.vue b/src/views/register.vue index e661ada..e34ca81 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -1,7 +1,7 @@ diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 9d34963..d94f425 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -134,6 +134,7 @@ @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']" >删除 + 恢复默认菜单权限 更多 @@ -254,7 +255,7 @@ \ No newline at end of file + diff --git a/vue.config.js b/vue.config.js index 986bf66..9419505 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,15 +1,15 @@ -'use strict' -const path = require('path') +"use strict"; +const path = require("path"); function resolve(dir) { - return path.join(__dirname, dir) + return path.join(__dirname, dir); } -const CompressionPlugin = require('compression-webpack-plugin') +const CompressionPlugin = require("compression-webpack-plugin"); -const name = process.env.VUE_APP_TITLE || '苦糖果MES-软件开发记录' // 网页标题 +const name = "智造大师"; // 网页标题 -const port = process.env.port || process.env.npm_config_port || 80 // 端口 +const port = process.env.port || process.env.npm_config_port || 80; // 端口 // vue.config.js 配置说明 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions @@ -20,124 +20,126 @@ module.exports = { // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 publicPath: process.env.NODE_ENV === "production" ? "/" : "/", // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) - outputDir: 'dist', + outputDir: "dist", // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) - assetsDir: 'static', + assetsDir: "static", // 是否开启eslint保存检测,有效值:ture | false | 'error' - lintOnSave: process.env.NODE_ENV === 'development', + lintOnSave: process.env.NODE_ENV === "development", // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 productionSourceMap: false, // webpack-dev-server 相关配置 devServer: { - host: '0.0.0.0', + host: "0.0.0.0", port: port, open: true, proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy - [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, + "/prod-api": { + // 蚂蚁工业 + // target: `http://192.168.2.104:8063`, + // 内网 + // target: `http://192.168.50.191:8063`, + // 线上 + target: `http://mes.jshengzheng.com:7072`, changeOrigin: true, - pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '' - } + // pathRewrite: { + // ['^' + process.env.VUE_APP_BASE_API]: '' + // } }, - '/ureport': { - target: 'http://localhost:8080', - ws:false, + "/ureport": { + // target: `http://192.168.2.104:8063`, + // target: `http://192.168.50.191:8063`, + target: `http://mes.jshengzheng.com:7072`, + ws: false, changeOrigin: true, pathRewrite: { - '^/ureport': '/ureport' - } + "^/ureport": "/ureport", + }, }, }, - disableHostCheck: true + disableHostCheck: true, }, css: { loaderOptions: { sass: { - sassOptions: { outputStyle: "expanded" } - } - } + sassOptions: { outputStyle: "expanded" }, + }, + }, }, configureWebpack: { name: name, resolve: { alias: { - '@': resolve('src') - } + "@": resolve("src"), + }, }, plugins: [ // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 new CompressionPlugin({ - test: /\.(js|css|html)?$/i, // 压缩文件格式 - filename: '[path].gz[query]', // 压缩后的文件名 - algorithm: 'gzip', // 使用gzip压缩 - minRatio: 0.8 // 压缩率小于1才会压缩 - }) + test: /\.(js|css|html)?$/i, // 压缩文件格式 + filename: "[path].gz[query]", // 压缩后的文件名 + algorithm: "gzip", // 使用gzip压缩 + minRatio: 0.8, // 压缩率小于1才会压缩 + }), ], }, chainWebpack(config) { - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test + config.plugins.delete("preload"); // TODO: need test + config.plugins.delete("prefetch"); // TODO: need test // set svg-sprite-loader + config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end(); config.module - .rule('svg') - .exclude.add(resolve('src/assets/icons')) - .end() - config.module - .rule('icons') + .rule("icons") .test(/\.svg$/) - .include.add(resolve('src/assets/icons')) + .include.add(resolve("src/assets/icons")) .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') + .use("svg-sprite-loader") + .loader("svg-sprite-loader") .options({ - symbolId: 'icon-[name]' + symbolId: "icon-[name]", }) - .end() + .end(); - config - .when(process.env.NODE_ENV !== 'development', - config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end() - config - .optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - config.optimization.runtimeChunk('single'), + config.when(process.env.NODE_ENV !== "development", (config) => { + config + .plugin("ScriptExtHtmlWebpackPlugin") + .after("html") + .use("script-ext-html-webpack-plugin", [ { - from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 - to: './' //到根目录下 - } - } - ) - } -} + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/, + }, + ]) + .end(); + config.optimization.splitChunks({ + chunks: "all", + cacheGroups: { + libs: { + name: "chunk-libs", + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: "initial", // only package third parties that are initially dependent + }, + elementUI: { + name: "chunk-elementUI", // split elementUI into a single package + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm + }, + commons: { + name: "chunk-commons", + test: resolve("src/components"), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true, + }, + }, + }); + config.optimization.runtimeChunk("single"), + { + from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件 + to: "./", //到根目录下 + }; + }); + }, +};