index.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/do/b1-inspect-order-plan/Inspection.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/tool/excel.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/util/excelFountion.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
index.html
@@ -1,42 +1,32 @@ <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta http-equiv="Expires" CONTENT="0"> <meta http-equiv="Cache-Control" CONTENT="no-cache"> <meta http-equiv="Pragma" CONTENT="no-cache"> <link rel='stylesheet' href='/static/luckysheet\plugins\css/pluginsCss.css' /> <link rel='stylesheet' href='/static/luckysheet/plugins/plugins.css' /> <link rel='stylesheet' href='/static/luckysheet/css/luckysheet.css' /> <link rel='stylesheet' href='/static/luckysheet/assets/iconfont/iconfont.css' /> <script src="/static/luckysheet/plugins/js/plugin.js"></script> <script src="/static/example.html/static/luckysheet/luckysheet.umd.js"></script> <!-- <link rel='stylesheet' href='http://10.1.200.86/luckysheet\plugins\css/pluginsCss.css' /> <link rel='stylesheet' href='http://10.1.200.86/luckysheet/plugins/plugins.css' /> <link rel='stylesheet' href='http://10.1.200.86/luckysheet/css/luckysheet.css' /> <link rel='stylesheet' href='http://10.1.200.86/luckysheet/assets/iconfont/iconfont.css' /> <script src="http://10.1.200.86/luckysheet/plugins/js/plugin.js"></script> <script src="http://10.1.200.86/luckysheet/luckysheet.umd.js"></script> --> <title>LIMS实验室管理系统</title> <link rel="icon" type="image/x-icon" href="./static/img/logo.png"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta http-equiv="Expires" CONTENT="0"> <meta http-equiv="Cache-Control" CONTENT="no-cache"> <meta http-equiv="Pragma" CONTENT="no-cache"> <title>LIMS实验室管理系统</title> <link rel="icon" type="image/x-icon" href="./static/img/logo.png"> <!-- <link href="./static/luckysheet/plugins/css/pluginsCss.css" rel="stylesheet" /> <link href="./static/luckysheet/plugins/plugins.css" rel="stylesheet" /> <link href="./static/luckysheet/css/luckysheet.css" rel="stylesheet" /> <link href="./static/luckysheet/assets/iconfont/iconfont.css" rel="stylesheet" /> --> <style> #app{ overflow: hidden; } .el-table-filter__list{ max-height: 70vh !important; overflow-y: scroll !important; } </style> </head> <body> <div id="app"></div> <script type='text/javascript' src='http://10.16.173.59:81/web-apps/apps/api/documents/api.js'></script> </body> <link href="./static/luckysheet/plugins/css/pluginsCss.css" rel="stylesheet" /> <link href="./static/luckysheet/plugins/plugins.css" rel="stylesheet" /> <link href="./static/luckysheet/css/luckysheet.css" rel="stylesheet" /> <link href="./static/luckysheet/assets/iconfont/iconfont.css" rel="stylesheet" /> <style> #app{ overflow: hidden; } .el-table-filter__list{ max-height: 70vh !important; overflow-y: scroll !important; } </style> </head> <body> <div id="app"></div> <script type='text/javascript' src='http://10.16.173.59:81/web-apps/apps/api/documents/api.js'></script> <script src="<%= htmlWebpackPlugin.options.url %>/static/luckysheet/plugins/js/plugin.js"></script> <script src="<%= htmlWebpackPlugin.options.url %>/static/luckysheet/luckysheet.umd.js"></script> </body> </html> src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -981,7 +981,6 @@ row.resValue = row.comValue?Math.abs(row.comValue-20).toFixed(5):'' this.param[row.id].resValue.v.v = row.resValue if(row.ask&&row.resValue){ console.log(row.ask,row.resValue) if(row.ask.includes('<')){ row.insResult = row.resValue<row.ask.split('<')[1]?1:0 }else if(row.ask.includes('>')){ @@ -1002,6 +1001,9 @@ this.saveInsContext() }, wareFormChange(m,type){ if(this.PROJECT!='检测中心'){ return } if(m&&type){ this.wareForm[type] = Number(m) } @@ -1231,6 +1233,9 @@ this.currentTab = null; }, getReportModel(id){ if(this.PROJECT!='检测中心'){ return } this.$axios.post(this.$api.insOrderPlan.getReportModel+'?sampleId='+id, {}).then(res => { this.fibers = res.data['光纤带'] this.fiber = res.data['光纤'] @@ -1617,7 +1622,6 @@ try { let equipValue = JSON.parse(a.insProductResult.equipValue) for (let i = 0; i < equipValue.length; i++) { console.log(444,this.equipForm) if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'){ // 温度循环赋值 this.$set(this.equipForm,`code`+i,equipValue[i].v) @@ -1674,7 +1678,11 @@ } if(this.getInspectionValueType(item.i)==1){ if (!isNaN(parseFloat(c.v.v))) { comValue[(tableCode + (c.r + 1))] = parseFloat(c.v.v) if(c.v.v.includes('^')){ comValue[(tableCode + (c.r + 1))] = c.v.v }else{ comValue[(tableCode + (c.r + 1))] = parseFloat(c.v.v) } } }else{ comValue[(tableCode + (c.r + 1))] = c.v.v @@ -2190,7 +2198,6 @@ }, saveInsContext() { if(this.param){ console.log(33333,this.param) this.$axios.post(this.$api.insOrderPlan.saveInsContext, { param: JSON.stringify(this.param) }).then(res => { src/components/tool/excel.vue
@@ -121,8 +121,8 @@ }, option.myFolderUrl = this.LOCATIONVUE + '/', option.functionButton = '<i class="save_i el-icon-info" title="系统支持的变量:
样品编号
样品型号
序号
检验项
检验子项
设备名称
设备编码
单位
要求值
试验方法 | 检测方法
最终值
结论
计算值
检验值"></i><button onClick="excelClosed()" class="save">保存</button>' console.log(window.luckysheet,luckysheet) window.luckysheet.create(option) console.log(luckysheet) luckysheet.create(option) } } } src/util/excelFountion.js
@@ -133,6 +133,27 @@ } } /** * 计算幂 * * @param str 字符串形式的幂表达式,例如"2^3" * @returns 返回计算后的幂值,如果表达式无效则返回null */ function CalculatePower(str){ try { if(str&&str.includes('^')){ let arr = str.split('^'); if(arr&&arr.length>1){ return Math.pow(arr[0],arr[1]); }else{ return null; } } } catch (error) { } } /** @@ -294,8 +315,13 @@ // 获取单元格对应值 let arr = getAllCell(f) for (var a in comValue) { if(comValue[a]!=='undefine'&&comValue[a]!=='null'&&comValue[a]!==undefined){ arr[a] = comValue[a] if(comValue[a]!=='undefined'&&comValue[a]!=='null'&&comValue[a]!==undefined){ if(typeof(comValue[a])=='string'&&comValue[a].includes('^')){ // 计算幂次 arr[a] = CalculatePower(comValue[a]) }else{ arr[a] = comValue[a] } } } // 解析公式参数,特别是带:的