Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master
| | |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .custom-dialog .el-dialog__body { |
| | | max-width: 1000px; /* 设置最大宽度 */ |
| | | } |
| | | </style> |
| | | <template> |
| | | <div v-loading="loading" class="inspection"> |
| | |
| | | <el-button type="primary" @click="submit()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="数据采集" :visible.sync="dataGetDia" min-width="400px" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"> |
| | | <el-dialog title="数据采集-计算数据选择" :visible.sync="dataGetDia" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" custom-class="custom-dialog"> |
| | | <div> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | |
| | | <tr> |
| | | <td :rowspan="item.child.length">{{item.faName}}</td> |
| | | <td>{{ item.child[0].name }}</td> |
| | | <td> |
| | | <td style="text-align: left;"> |
| | | <el-checkbox-group |
| | | v-model="getDataIndex"> |
| | | v-model="getDataIndex" :max="item.child[0].maxNum"> |
| | | <el-checkbox v-for="(n,j) in item.child[0].arr" :label="j" :key="j+'ppppppppp'">{{n}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(m,i) in item.child" :key="i+'bbbbbbbbbbbbbb'" v-show="i>0"> |
| | | <td>{{ m.name }}</td> |
| | | <td> |
| | | <td style="text-align: left;"> |
| | | <el-checkbox-group |
| | | v-model="getDataIndex"> |
| | | v-model="getDataIndex" :max="m.maxNum"> |
| | | <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j+'bbbbbbbbbbbbbb'">{{n}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | |
| | | child:[] |
| | | } |
| | | for(let j in data[i]){ |
| | | console.log(j,data[i][j]) |
| | | if(j!='frequency'&&data[i][j]&&!data[i][j].isCalculation){ |
| | | this.dataAcquisitionInfo[i+','+j] = { |
| | | value:data[i][j].result, |
| | | frequency:data[i].frequency |
| | | } |
| | | }else if(j!='frequency'&&data[i][j]&&data[i][j].isCalculation){ |
| | | let str0 = i+','+j |
| | | let list = this.tableList[0].arr |
| | | let maxNum = 0 |
| | | list.forEach((item,index)=>{ |
| | | let num0 = 0; |
| | | let str = '' |
| | | item.forEach(m=>{ |
| | | if(m.v.ps&&(m.v.ps.value=='检验子项'||m.v.ps.value=='检验项')){ |
| | | if(m.v.ps&&m.v.ps.value=='检验项'){ |
| | | if(num0==0){ |
| | | str = m.v.v+',' |
| | | num0++ |
| | | } |
| | | } |
| | | if(m.v.ps&&m.v.ps.value=='检验子项'){ |
| | | if(num0==1){ |
| | | str = str+m.v.v |
| | | } |
| | | } |
| | | let num = 0; |
| | | list[index].forEach(n=>{ |
| | | if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('检验值')){ |
| | | num++ |
| | | } |
| | | }) |
| | | if(str0==str){ |
| | | maxNum = num |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | console.log(44444444444,maxNum) |
| | | let obj0 = { |
| | | name:j, |
| | | arr:data[i][j].result |
| | | arr:data[i][j].result, |
| | | maxNum:maxNum |
| | | } |
| | | obj.child.push(obj0) |
| | | } |
| | |
| | | this.getDataIndex.sort((a, b) => a - b); |
| | | for (let i in this.dataAcquisitionInfoNew){ |
| | | for(let j in this.dataAcquisitionInfoNew[i]){ |
| | | if(j!='frequency'&&this.dataAcquisitionInfoNew[i][j].isCalculation){ |
| | | if(j!='frequency'&&this.dataAcquisitionInfoNew[i]&&this.dataAcquisitionInfoNew[i][j]&&this.dataAcquisitionInfoNew[i][j].isCalculation){ |
| | | let arr = [] |
| | | for(let k = 0;k<this.dataAcquisitionInfoNew[i][j].result.length;k++){ |
| | | if(this.getDataIndex.includes(k)){ |
| | |
| | | <el-form-item class="fomItemInput1"> |
| | | <template v-slot="label"> |
| | | 公式: |
| | | <el-tooltip class="itemFomItem" effect="dark" content="求参数最大值,参数个数最少两个,如:MAX(A1,B2)" placement="top"> |
| | | <label>MAX()</label> |
| | | </el-tooltip> |
| | | <el-tooltip class="itemFomItem" effect="dark" content="求参数最小值,参数个数最少两个,如:MIN(A1,B2)" placement="top"> |
| | | <label>MIN()</label> |
| | | </el-tooltip> |
| | | <el-tooltip class="itemFomItem" effect="dark" content="求和,参数个数最少两个,如:SUM(A1,B2)" placement="top"> |
| | | <label>SUM()</label> |
| | | </el-tooltip> |
| | | <el-tooltip class="itemFomItem" effect="dark" content="求绝对值,参数个数最少一个,如:ABS(A1)" placement="top"> |
| | | <label>ABS()</label> |
| | | </el-tooltip> |
| | | <el-tooltip class="itemFomItem" effect="dark" content="求平均值,参数个数最少两个个,如:AVERAGE(A1,B2)" placement="top"> |
| | | <label>AVERAGE()</label> |
| | | </el-tooltip> |
| | | <el-tooltip class="itemFomItem" effect="dark" content="求中值,参数个数最少两个个,如:MEDIAN(A1,B2)" placement="top"> |
| | | <label>MEDIAN()</label> |
| | | <el-tooltip v-for="(formula, key) in formulas" class="itemFomItem" effect="dark" :content="formula.content" :key="key" |
| | | placement="top"> |
| | | <label>{{ formula.label }}()</label> |
| | | </el-tooltip> |
| | | <el-input type="textarea" autosi:autosize="{ minRows: 2, maxRows: 4}" ze placeholder="请输入内容" |
| | | v-model="configForm.formula" @change="evalResult"> |
| | |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | | formulas: [ |
| | | { |
| | | label: "MAX", |
| | | content: "求参数最大值,参数个数最少两个,如:MAX(A1,B2)" |
| | | }, |
| | | { |
| | | label: "MIN", |
| | | content: "求参数最小值,参数个数最少两个,如:MIN(A1,B2)" |
| | | }, |
| | | { |
| | | label: "SUM", |
| | | content: "求和,参数个数最少两个,如:SUM(A1,B2)" |
| | | }, |
| | | { |
| | | label: "ABS", |
| | | content: "求绝对值,参数个数最少一个,如:ABS(A1)" |
| | | }, |
| | | { |
| | | label: "AVERAGE", |
| | | content: "求平均值,参数个数最少两个个,如:AVERAGE(A1,B2)" |
| | | }, |
| | | { |
| | | label: "MEDIAN", |
| | | content: "求中值,参数个数最少两个个,如:MEDIAN(A1,B2)" |
| | | }, |
| | | ], |
| | | dialogVisible4: false, |
| | | tableList: [], |
| | | page: { |
| | |
| | | }, |
| | | dialogVisible3: false, |
| | | configForm: { |
| | | formula: "" |
| | | formula: "", |
| | | collectUrl: "", |
| | | storageUrl: "", |
| | | entrustCode: "", |
| | | sampleCode: "", |
| | | dbFileName: "" |
| | | }, |
| | | domains: [ |
| | | { |
| | |
| | | this.$set(this.configForm, "collectUrl", this.tableList[0].collectUrl); |
| | | this.$set(this.configForm, "storageUrl", this.tableList[0].storageUrl); |
| | | this.$set(this.configForm, "ip", this.tableList[0].ip); |
| | | this.$set( |
| | | this.configForm, |
| | | "entrustCode", |
| | | this.tableList[0].entrustCode |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "sampleCode", |
| | | this.tableList[0].sampleCode |
| | | ); |
| | | this.$set( |
| | | this.configForm, |
| | | "dbFileName", |
| | | this.tableList[0].dbFileName |
| | | ); |
| | | } |
| | | }, |
| | | init() { |
| | |
| | | .then(res => { |
| | | this.tableList = res.data; |
| | | this.tableList.forEach(i => { |
| | | // replace(/=/g, ' ') |
| | | let isIncludes = false |
| | | if (i.formula && i.formula != "") { |
| | | this.formulas.forEach(j => { |
| | | if (i.formula.includes(j.label)) { |
| | | isIncludes = true |
| | | } |
| | | }) |
| | | } |
| | | if (!isIncludes && i.formula) { |
| | | i.formula = i.formula.slice(1, -1) |
| | | } |
| | | i.sample = i.sample |
| | | .replace(/"/g, "") |
| | | .replace(/],/g, ";") |
| | |
| | | ) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | | this.tableList = res.data; |
| | | // this.tableList = res.data; |
| | | this.dialogVisible4 = false; |
| | | this.init(); |
| | | this.$message.success("操作成功"); |
| | |
| | | const data = res.data; |
| | | if (data[0]) { |
| | | this.domains.splice(0, 1); |
| | | let formula = data[0].formula |
| | | let isIncludes = false |
| | | if (formula && formula != "") { |
| | | for (let key in this.formulas) { |
| | | if (formula.includes(this.formulas[key].label)) { |
| | | isIncludes = true |
| | | } |
| | | } |
| | | } |
| | | if (!isIncludes && formula) { |
| | | let formulaValue = formula.slice(1, -1) |
| | | this.$set(this.configForm, "formula", formulaValue); |
| | | } else { |
| | | this.$set(this.configForm, "formula", data[0].formula); |
| | | } |
| | | data.forEach(i => { |
| | | this.domains.push({ |
| | | referx: i.referx, |
| | |
| | | } |
| | | }); |
| | | this.domains.forEach((i, index) => { |
| | | let isIncludes = false |
| | | if (this.configForm.formula && this.configForm.formula != "") { |
| | | for (let formula in this.formulas) { |
| | | if (this.configForm.formula.includes(this.formulas[formula].label)) { |
| | | isIncludes = true |
| | | } |
| | | } |
| | | } |
| | | if (isIncludes === false) { |
| | | i.formula = "(" + this.configForm.formula + ")"; |
| | | } else { |
| | | i.formula = this.configForm.formula; |
| | | } |
| | | i.deviceId = this.deviceId; |
| | | i.inspectionItem = this.configForm.inspectionItem; |
| | | i.inspectionItemSubclass = this.configForm.inspectionItemSubclass; |
| | |
| | | lang: option.lang, //语言设置 |
| | | //定制 |
| | | customization: { |
| | | autosave: false, //是否自动保存 |
| | | autosave: true, //是否自动保存 |
| | | chat: true, |
| | | comments: false, |
| | | help: false, |
| | |
| | | <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i> |
| | | <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" > |
| | | </div> |
| | | <div style="height: 80vh;"> |
| | | <div style="height: 80vh;" v-if="issuedVisible"> |
| | | <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |