diff --git a/src/api/mes/pro/workorder.js b/src/api/mes/pro/workorder.js index 9c2deef..a9405cf 100644 --- a/src/api/mes/pro/workorder.js +++ b/src/api/mes/pro/workorder.js @@ -59,4 +59,13 @@ export function listItems(query) { method: 'get', params: query }) +} + +// 删除 +export function deleteShopFace(data) { + return request({ + url: '/mes/pro/workorder/deleteShopFace', + method: 'post', + data: data + }) } \ No newline at end of file diff --git a/src/assets/images/logo-b.png b/src/assets/images/logo-b.png index 34438bf..57ce112 100644 Binary files a/src/assets/images/logo-b.png and b/src/assets/images/logo-b.png differ diff --git a/src/assets/images/logo-small.png b/src/assets/images/logo-small.png index a2a8566..ab080eb 100644 Binary files a/src/assets/images/logo-small.png and b/src/assets/images/logo-small.png differ 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/views/mes/dv/machinery/index.vue b/src/views/mes/dv/machinery/index.vue index 6c4e89e..4ee802d 100644 --- a/src/views/mes/dv/machinery/index.vue +++ b/src/views/mes/dv/machinery/index.vue @@ -315,15 +315,8 @@ v-model="form.machineryTypeId" :options="machineryTypeOptions" :normalizer="normalizer" - disabled - v-if="optType == 'view'" - /> - @@ -382,7 +375,7 @@ - + @@ -587,7 +580,7 @@ export default { idList: "", workshopCode: "", workshopName: "", - workshopId: "", + workshopId: "214", }, defaultPropss: { children: "children", @@ -656,15 +649,15 @@ export default { machineryName: [ { required: true, message: "设备名称不能为空", trigger: "blur" }, ], - workshopId: [ - { required: true, message: "车间不能为空", trigger: "blur" }, - ], + // workshopId: [ + // { required: true, message: "车间不能为空", trigger: "blur" }, + // ], machineryTypeId: [ { required: true, message: "设备分类不能为空", trigger: "blur" }, ], - workshopName: [ - { required: true, message: "所属车间不能为空", trigger: "blur" }, - ], + // workshopName: [ + // { required: true, message: "所属车间不能为空", trigger: "blur" }, + // ], }, }; }, @@ -727,6 +720,12 @@ export default { this.queryParamsdata = data; this.handleQuery(); }, + // 节点单击事件 + handleNode(data) { + console.log(data); + this.form.machineryTypeName = data.machineryTypeName; + this.form.machineryTypeCode = data.code; + }, // 取消按钮 cancel() { this.open = false; @@ -743,7 +742,7 @@ export default { machineryTypeId: null, machineryTypeCode: null, machineryTypeName: null, - workshopId: null, + workshopId: "214", workshopCode: null, workshopName: null, status: "STOP", @@ -809,7 +808,7 @@ export default { // this.$emit("getSelectList", this.selectList); }, - //选择关联的设备 + //选择车间 handleAccompanyId(val) { this.form.workshopCode = val.workshopCode; this.form.workshopName = val.workshopName; diff --git a/src/views/mes/dv/route/index.vue b/src/views/mes/dv/route/index.vue index d824938..1dc48c6 100644 --- a/src/views/mes/dv/route/index.vue +++ b/src/views/mes/dv/route/index.vue @@ -201,7 +201,7 @@ - + @@ -346,7 +346,7 @@ export default { proAgvlineId: null, lineCode: null, lineName: null, - workshopId: null, + workshopId: "214", enableFlag: "Y", remark: null, }; diff --git a/src/views/mes/md/workstation/index.vue b/src/views/mes/md/workstation/index.vue index 2526722..5203464 100644 --- a/src/views/mes/md/workstation/index.vue +++ b/src/views/mes/md/workstation/index.vue @@ -245,7 +245,7 @@ /> - + @@ -564,7 +564,7 @@ export default { workstationCode: null, workstationName: null, workstationAddress: null, - workshopId: null, + workshopId: "214", workshopCode: null, workshopName: null, processId: null, @@ -670,6 +670,7 @@ export default { this.$refs["form"].validate((valid) => { if (valid) { if (this.form.workstationId != null) { + this.form.processId = this.form.processId.join(","); updateWorkstation(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); this.open = false; diff --git a/src/views/mes/pro/production/components/lib/initPlugin.js b/src/views/mes/pro/production/components/lib/initPlugin.js new file mode 100644 index 0000000..5eb9278 --- /dev/null +++ b/src/views/mes/pro/production/components/lib/initPlugin.js @@ -0,0 +1,91 @@ + +import { getPubKey, setEncrypt } from './pubKey' +var initCount = 0; +var oWebControl; +/** + * + * @param {*} id :组件容器id + * @param {*} iWidth :组件容器宽 + * @param {*} iHeight :组件容器高 + * @param {*}cbIntegrationCallBack:消息推送回调函数 + * @param {*} argument:初始化api参数 + * @param {*} completeCallBack:初始化成功回调函数 + * @param {*} plugErrorCallBack:插件启动失败回调函数 + */ +const initPlugin = (id, iWidth, iHeight, argument, cbIntegrationCallBack = () => { }, completeCallBack = () => { }, plugErrorCallBack = () => { }) => { + // eslint-disable-next-line no-undef + oWebControl = new WebControl({ + szPluginContainer: id, // 指定容器id + iServicePortStart: 15900, // 指定起止端口号,建议使用该值 + iServicePortEnd: 15909, + szClassId: "23BF3B0A-2C56-4D97-9C03-0CB103AA8F11", // 用于IE10使用ActiveX的clsid + cbConnectSuccess: function () { // 创建WebControl实例成功 + oWebControl.JS_StartService("window", { // WebControl实例创建成功后需要启动服务 + dllPath: "./VideoPluginConnect.dll" // 值"./VideoPluginConnect.dll"写死 + }).then(function () { // 启动插件服务成功 + oWebControl.JS_SetWindowControlCallback({ // 设置消息回调 + cbIntegrationCallBack: cbIntegrationCallBack + }); + + oWebControl.JS_CreateWnd(id, iWidth, iHeight).then(function () { //JS_CreateWnd创建视频播放窗口,宽高可设定 + init(argument, iWidth, iHeight,completeCallBack()); // 创建播放实例成功后初始化 + + }); + + }, function () { // 启动插件服务失败 + + }); + }, + // eslint-disable-next-line no-unused-vars + cbConnectError: function (e) { // 创建WebControl实例失败 + oWebControl = null; + // eslint-disable-next-line no-undef + // $(id).html("插件未启动,正在尝试启动,请稍候..."); + // eslint-disable-next-line no-undef + WebControl.JS_WakeUp("VideoWebPlugin://"); // 程序未启动时执行error函数,采用wakeup来启动程序 + + initCount++; + if (initCount < 2) { + setTimeout(function () { + initPlugin(id, iWidth, iHeight, argument, cbIntegrationCallBack,completeCallBack,plugErrorCallBack); + }, 1000) + } else { + + // eslint-disable-next-line no-undef + // $(id).html("插件启动失败,请检查插件是否安装!"); + plugErrorCallBack() + + } + }, + // eslint-disable-next-line no-unused-vars + cbConnectClose: function (bNormalClose) { + // 异常断开:bNormalClose = false + // JS_Disconnect正常断开:bNormalClose = true + console.log("cbConnectClose"); + oWebControl = null; + } + }); + return oWebControl +} + + +//初始化 +function init(argument, iWidth, iHeight,callback=()=>{}) { + getPubKey(oWebControl, function () { + + oWebControl.JS_RequestInterface({ + funcName: "init", + argument: JSON.stringify({ + ...argument, + secret: setEncrypt(argument.secret) + }) + // eslint-disable-next-line no-unused-vars + }).then(function (oData) { + callback() + //oWebControl.JS_Resize(iWidth, iHeight); // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题 + + }); + }) +} + +export default initPlugin \ No newline at end of file diff --git a/src/views/mes/pro/production/components/lib/pubKey.js b/src/views/mes/pro/production/components/lib/pubKey.js new file mode 100644 index 0000000..32b9d8a --- /dev/null +++ b/src/views/mes/pro/production/components/lib/pubKey.js @@ -0,0 +1,24 @@ +var pubKey; +//获取公钥 +export function getPubKey(oWebControl,callback) { + // eslint-disable-next-line no-undef + oWebControl.JS_RequestInterface({ + funcName: "getRSAPubKey", + argument: JSON.stringify({ + keyLength: 1024 + }) + }).then(function (oData) { + if (oData.responseMsg.data) { + pubKey = oData.responseMsg.data; + callback() + } + }) +} + +//RSA加密 +export function setEncrypt(value) { + // eslint-disable-next-line no-undef + var encrypt = new JSEncrypt(); + encrypt.setPublicKey(pubKey); + return encrypt.encrypt(value); +} \ No newline at end of file diff --git a/src/views/mes/pro/production/components/video.vue b/src/views/mes/pro/production/components/video.vue index f1910ca..0ae7bda 100644 --- a/src/views/mes/pro/production/components/video.vue +++ b/src/views/mes/pro/production/components/video.vue @@ -1,296 +1,251 @@ - - - + \ No newline at end of file diff --git a/src/views/mes/pro/production/index.vue b/src/views/mes/pro/production/index.vue index cc8d1b6..9e2d0a9 100644 --- a/src/views/mes/pro/production/index.vue +++ b/src/views/mes/pro/production/index.vue @@ -146,11 +146,7 @@
- +
@@ -251,6 +247,7 @@