From 487b2f2a353b89ab46cd9b784226b600b7b915b8 Mon Sep 17 00:00:00 2001 From: yantian yue <306727702@qq.com> Date: 星期二, 17 十月 2023 15:33:05 +0800 Subject: [PATCH] 新增OPCUA模块 --- guns-vip-main/src/main/webapp/assets/modular/kb/formula/formulaView.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/guns-vip-main/src/main/webapp/assets/modular/kb/formula/formulaView.js b/guns-vip-main/src/main/webapp/assets/modular/kb/formula/formulaView.js index 9813ae3..7f6c962 100644 --- a/guns-vip-main/src/main/webapp/assets/modular/kb/formula/formulaView.js +++ b/guns-vip-main/src/main/webapp/assets/modular/kb/formula/formulaView.js @@ -7,6 +7,29 @@ var form = layui.form; var element = layui.element; + /** + * 閰嶆柟閰嶇疆瀛愪俊鎭鐞� + */ + var FormulaChildInfo = { + tableId: "formulaChildInfoTable" + }; + + $('#imgs').attr("src", "http://localhost:8081/img/9f2f070828381f30fdf1be0da9014c086f06f0ad.jpg"); + + /** + * 鍒濆鍖栬〃鏍肩殑鍒� + */ + FormulaChildInfo.initColumn = function () { + return [[ + {field: 'id', hide: true, title: 'id'}, + {type:"numbers" ,title:'宸ユ',width:40}, + {field: 'operationSteps', sort: true, title: '鎿嶄綔鍐呭'}, + {field: 'techRequirement', sort: true, title: '鎶�鏈姹�'}, + {field: 'operationType', sort: true, title: '绫诲瀷'}, + ]]; + }; + + initLineInfo(); var ajax = new $ax(Feng.ctxPath + "/workOrder/list?state=3"); @@ -22,6 +45,37 @@ $('#recipeCode').text(msg.recipeCode); var radioElement = $('#sex1'); + var queryData = {}; + queryData['formulaCode'] = msg.recipeCode; + // 娓叉煋琛ㄦ牸 + table.render({ + elem: '#' + FormulaChildInfo.tableId, + url: Feng.ctxPath + '/formulaChildInfo/list', + page: false, + // height: "full-158", + height: 460, + cellMinWidth: 100, + where: queryData, + cols: FormulaChildInfo.initColumn(), + done: function (res, curr, count) { + console.log(res); + //寰楀埌褰撳墠椤电爜 + console.log(curr); + //寰楀埌鏁版嵁鎬婚噺 + console.log(count); + // 鏍规嵁鏉′欢鍒ゆ柇鍔犺儗鏅壊 + $.each(res.data, function (index, item) { + console.log(item) + console.log(item.spareField1) + if (item.spareField1 === "3") { + // 娉�1 + $("#formulaChildInfoTable").next().find('tbody tr[data-index="' + index + + '"]').css("background-color", "#00ff66"); + } + }); + } + }); + function initLineInfo(){ $.ajax({ type: "POST", -- Gitblit v1.9.3