|
|
@@ -31,7 +31,7 @@
|
|
|
> -->
|
|
|
|
|
|
<div style="margin: 0 20px;" v-if="timeListA.length>0 && pType == 1">
|
|
|
- <el-select v-model="timeA" placeholder="请选择">
|
|
|
+ <el-select v-model="timeA" @change="getPageBase()" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in timeListA"
|
|
|
:key="item.value"
|
|
|
@@ -43,7 +43,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div style="margin: 0 20px;" v-if="timeListB.length>0 && pType == 2">
|
|
|
- <el-select v-model="timeB" placeholder="请选择">
|
|
|
+ <el-select v-model="timeB" @change="getPageBase()" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in timeListB"
|
|
|
:key="item.value"
|
|
|
@@ -268,27 +268,29 @@ export default {
|
|
|
pType(newVal, oldVal) {
|
|
|
this.getPageBase();
|
|
|
},
|
|
|
- timeA(){
|
|
|
- this.getPageBase();
|
|
|
- },
|
|
|
- timeB(){
|
|
|
- this.getPageBase();
|
|
|
- }
|
|
|
+ // timeA(){
|
|
|
+ // this.getPageBase();
|
|
|
+ // },
|
|
|
+ // timeB(){
|
|
|
+ // this.getPageBase();
|
|
|
+ // }
|
|
|
},
|
|
|
computed: {},
|
|
|
- // activated() {
|
|
|
+ activated() {
|
|
|
// // 当组件被激活时调用
|
|
|
// this.getPageBase();
|
|
|
- // this.getPageBase2(1)
|
|
|
+ // if (this.pType == 1) {
|
|
|
+ this.getPageBase()
|
|
|
+ // }else{
|
|
|
// this.getPageBase2(2)
|
|
|
- // },
|
|
|
- mounted() {
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ // mounted() {
|
|
|
// this.getPageBase();
|
|
|
- this.getPageBase2(1)
|
|
|
- this.getPageBase2(2)
|
|
|
-
|
|
|
+ // this.getPageBase2(1)
|
|
|
+ // this.getPageBase2(2)
|
|
|
// console.log(JSON.stringify(this.TeaTabJson));
|
|
|
- },
|
|
|
+ // },
|
|
|
methods: {
|
|
|
// 禁用滚轮事件
|
|
|
handleWheel(event) {
|
|
|
@@ -491,25 +493,7 @@ export default {
|
|
|
this.testExamineBaseList = testExamineBaseList;
|
|
|
console.log("selectTestExamineBase", res.data[0][0]);
|
|
|
this.PageBaseData = JSON.parse(res.data[0][0].json);
|
|
|
- // 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
|
|
|
- this.getData();
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- },
|
|
|
- // 获取页面基础ui信息
|
|
|
- getPageBase2(type) {
|
|
|
- let params = {
|
|
|
- typ: type,
|
|
|
- org: this.org,
|
|
|
- oid: this.oid,
|
|
|
- time:type==1?this.timeA:this.timeB
|
|
|
- };
|
|
|
- this.ajax
|
|
|
- .get(this.$store.state.api + "selectTestExamineBase2", params)
|
|
|
- .then(res => {
|
|
|
- if(type == 1){
|
|
|
+ if(this.pType == 1){
|
|
|
this.aArray = res.data[0];
|
|
|
this.timeListA = this.aArray.map(i=>{return {value:i.time,label:i.timeLabel}})
|
|
|
if(this.timeListA.length>0)this.timeA = this.timeListA[0].value;
|
|
|
@@ -521,11 +505,43 @@ export default {
|
|
|
this.pType = 1
|
|
|
}
|
|
|
}
|
|
|
+ // 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
|
|
|
+ this.getData();
|
|
|
})
|
|
|
.catch(error => {
|
|
|
console.log(error);
|
|
|
});
|
|
|
},
|
|
|
+ // 获取页面基础ui信息
|
|
|
+ // getPageBase2() {
|
|
|
+ // console.log('6666');
|
|
|
+
|
|
|
+ // let params = {
|
|
|
+ // typ: this.pType,
|
|
|
+ // org: this.org,
|
|
|
+ // oid: this.oid,
|
|
|
+ // time:this.pType==1?this.timeA:this.timeB
|
|
|
+ // };
|
|
|
+ // this.ajax
|
|
|
+ // .get(this.$store.state.api + "selectTestExamineBase2", params)
|
|
|
+ // .then(res => {
|
|
|
+ // if(this.pType == 1){
|
|
|
+ // this.aArray = res.data[0];
|
|
|
+ // this.timeListA = this.aArray.map(i=>{return {value:i.time,label:i.timeLabel}})
|
|
|
+ // if(this.timeListA.length>0)this.timeA = this.timeListA[0].value;
|
|
|
+ // }else {
|
|
|
+ // this.bArray = res.data[0];
|
|
|
+ // this.timeListB = this.bArray.map(i=>{return {value:i.time,label:i.timeLabel}})
|
|
|
+ // if(this.timeListB.length>0)this.timeB = this.timeListB[0].value;
|
|
|
+ // if(!this.bArray.length){
|
|
|
+ // this.pType = 1
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch(error => {
|
|
|
+ // console.log(error);
|
|
|
+ // });
|
|
|
+ // },
|
|
|
async handleData() {
|
|
|
for (const e of this.PageBaseData) {
|
|
|
for (const k of e.children) {
|