| | |
| | | "> |
| | | <span v-if="state > 1 || (n.u != userId && n.u != undefined && n.u != '')">{{ n.v.v }}</span> |
| | | <el-date-picker v-else v-model="n.v.v" type="datetime" placeholder="" format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" @change="m => saveInsContext(n.i)"> |
| | | value-format="yyyy-MM-dd HH:mm:ss" @change="(val) => changeTestTime(val, n, 'testStartTime')"> |
| | | </el-date-picker> |
| | | </template> |
| | | <template v-else-if="n.v.ps != undefined && n.v.ps.value === '终止时间' |
| | | "> |
| | | <span v-if="state > 1 || (n.u != userId && n.u != undefined && n.u != '')">{{ n.v.v }}</span> |
| | | <el-date-picker v-else v-model="n.v.v" type="datetime" placeholder="" format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" @change="m => saveInsContext(n.i)"> |
| | | value-format="yyyy-MM-dd HH:mm:ss" @change="(val) => changeTestTime(val, n, 'testEndTime')"> |
| | | </el-date-picker> |
| | | </template> |
| | | <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)"></span> |
| | |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null, |
| | | testEndTime: null, |
| | | testStartTime: null, |
| | | testEndTime: [], |
| | | testStartTime: [], |
| | | }; |
| | | }); |
| | | // 去重模板,返回有几个模板 |
| | |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null, |
| | | testEndTime: null, |
| | | testStartTime: null, |
| | | testEndTime: [], |
| | | testStartTime: [], |
| | | }; |
| | | }); |
| | | if (this.currentSample.index == undefined) |
| | |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null, |
| | | testEndTime: null, |
| | | testStartTime: null, |
| | | testEndTime: [], |
| | | testStartTime: [], |
| | | }; |
| | | }); |
| | | // 处理页面列表数据 |
| | |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null, |
| | | testEndTime: null, |
| | | testStartTime: null, |
| | | testEndTime: [], |
| | | testStartTime: [], |
| | | }; |
| | | }); |
| | | this.getTableLists0(list); |
| | |
| | | (n) => n.v.ps != undefined && n.v.ps.value === "最终值" |
| | | ); //最终值列表 |
| | | a.template.forEach((b) => { |
| | | // console.log(444444, b) |
| | | if ( |
| | | b.v.ps != undefined && |
| | | b.v.ps.value === "序号" && |
| | |
| | | b.i && this.param[b.i] && this.param[b.i].equipName.push(b); |
| | | } |
| | | if (b.v.ps != undefined && b.v.ps.value === "起始时间") { |
| | | this.$set(b.v, "v", ""); |
| | | b.u = ""; |
| | | this.$set(b.v, "v", ''); |
| | | let obj = this.currentSample.insProduct.find(m => m.id == b.i) |
| | | if (obj) { |
| | | this.$set(b, "u", obj.checkUserId); |
| | | } |
| | | // b.v.v = '' |
| | | b.i && this.param[b.i] && (this.param[b.i].testStartTime = b); |
| | | this.param[b.i].testStartTime = [] |
| | | b.i && this.param[b.i] && this.param[b.i].testStartTime.push(b); |
| | | } |
| | | if (b.v.ps != undefined && b.v.ps.value === "终止时间") { |
| | | this.$set(b.v, "v", ""); |
| | | b.u = ""; |
| | | let obj = this.currentSample.insProduct.find(m => m.id == b.i) |
| | | if (obj) { |
| | | this.$set(b, "u", obj.checkUserId); |
| | | } |
| | | // b.v.v = '' |
| | | b.i && this.param[b.i] && (this.param[b.i].testEndTime = b); |
| | | this.param[b.i].testEndTime = [] |
| | | b.i && this.param[b.i] && this.param[b.i].testEndTime.push(b); |
| | | } |
| | | if (b.v.ps != undefined && b.v.ps.value === "最终值") { |
| | | // b.v.v = '' |
| | |
| | | } |
| | | try { |
| | | // 起始时间赋值 |
| | | let testStartTime = JSON.parse(a.insProductResult.testStartTime); |
| | | for (let i = 0; i < testStartTime.length; i++) { |
| | | this.param[a.id].testStartTime.v.v = testStartTime.v; |
| | | } |
| | | } catch (e) { } |
| | | this.$set(this.param[a.id].testStartTime[0].v, 'v', a.insProductResult.testStartTime[0]) |
| | | } catch (e) { |
| | | |
| | | } |
| | | try { |
| | | // 终止时间赋值 |
| | | let testEndTime = JSON.parse(a.insProductResult.testEndTime); |
| | | for (let i = 0; i < testEndTime.length; i++) { |
| | | this.param[a.id].testEndTime.v.v = testEndTime.v; |
| | | } |
| | | this.$set(this.param[a.id].testEndTime[0].v, 'v', a.insProductResult.testEndTime[0]) |
| | | } catch (e) { } |
| | | try { |
| | | // 最终值赋值 |
| | |
| | | break; |
| | | // 赋值起始时间 |
| | | case "testEndTime": |
| | | this.tableList[0][m] = value ? value.v.v : ""; |
| | | if (value && value.length > 0) { |
| | | this.tableList[0].insProductResult[m] = []; |
| | | value.forEach((a, i) => { |
| | | let obj = { |
| | | v: a.v.v, |
| | | }; |
| | | this.tableList[0].insProductResult[m].push(obj); |
| | | }); |
| | | try { |
| | | this.tableList[0].insProductResult[m] = JSON.stringify( |
| | | this.tableList[0].insProductResult[m] |
| | | ); |
| | | } catch (error) { |
| | | console.log(888, error); |
| | | } |
| | | } |
| | | // this.tableList[0].insProductResult[m] = value ? value.v.v : ""; |
| | | break; |
| | | // 赋值终止时间 |
| | | case "testStartTime": |
| | | this.tableList[0][m] = value ? value.v.v : ""; |
| | | if (value && value.length > 0) { |
| | | this.tableList[0].insProductResult[m] = []; |
| | | value.forEach((a, i) => { |
| | | let obj = { |
| | | v: a.v.v, |
| | | }; |
| | | this.tableList[0].insProductResult[m].push(obj); |
| | | }); |
| | | try { |
| | | this.tableList[0].insProductResult[m] = JSON.stringify( |
| | | this.tableList[0].insProductResult[m] |
| | | ); |
| | | } catch (error) { |
| | | console.log(888, error); |
| | | } |
| | | } |
| | | // this.tableList[0].insProductResult[m] = value ? value.v.v : ""; |
| | | break; |
| | | // 赋值最终值 |
| | | case "resValue": |
| | |
| | | console.log("changeEquip----", e); |
| | | } |
| | | }, |
| | | // 起始时间/终止时间保存 |
| | | changeTestTime(val, n, type) { |
| | | // this.param[n.i][type] |
| | | // console.log(22222, val, n, type, this.param) |
| | | this.$set(this.param[n.i][type][0].v, 'v', val) |
| | | this.saveInsContext(n.i); |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition({ type: 1 }).then((res) => { |
| | | let data = []; |
| | |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null, |
| | | testEndTime: null, |
| | | testStartTime: null, |
| | | testEndTime: [], |
| | | testStartTime: [], |
| | | }; |
| | | }); |
| | | // 页面数据处理 |