|
@@ -28,6 +28,31 @@
|
|
v-if="allData.type == 1"
|
|
v-if="allData.type == 1"
|
|
>保存</el-button
|
|
>保存</el-button
|
|
> -->
|
|
> -->
|
|
|
|
+
|
|
|
|
+ <div style="margin: 0 20px;" v-if="timeListA.length>1 && pType == 1">
|
|
|
|
+ <el-select v-model="timeA" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in timeListA"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div style="margin: 0 20px;" v-if="timeListB.length>1 && pType == 2">
|
|
|
|
+ <el-select v-model="timeB" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in timeListB"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<el-button
|
|
<el-button
|
|
v-if="allData.type != 2"
|
|
v-if="allData.type != 2"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -210,11 +235,22 @@ export default {
|
|
diaIframe: false, //数据来源弹框
|
|
diaIframe: false, //数据来源弹框
|
|
aArray: [],
|
|
aArray: [],
|
|
bArray: [],
|
|
bArray: [],
|
|
|
|
+ timeListB:[],
|
|
|
|
+ timeListA:[],
|
|
|
|
+ timeA:"",
|
|
|
|
+ timeB:"",
|
|
|
|
+ testExamineBaseList:[],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
pType(newVal, oldVal) {
|
|
pType(newVal, oldVal) {
|
|
this.getPageBase();
|
|
this.getPageBase();
|
|
|
|
+ },
|
|
|
|
+ timeA(){
|
|
|
|
+ this.getPageBase();
|
|
|
|
+ },
|
|
|
|
+ timeB(){
|
|
|
|
+ this.getPageBase();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -294,7 +330,7 @@ export default {
|
|
this.$confirm("提交后无法修改,是否确定提交?", "提示", {
|
|
this.$confirm("提交后无法修改,是否确定提交?", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
- type: " info"
|
|
|
|
|
|
+ type: "info"
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
let params = [
|
|
let params = [
|
|
@@ -304,11 +340,12 @@ export default {
|
|
org: this.org,
|
|
org: this.org,
|
|
type: this.pType,
|
|
type: this.pType,
|
|
json: JSON.stringify(this.PageBaseData),
|
|
json: JSON.stringify(this.PageBaseData),
|
|
- ttype: 2
|
|
|
|
|
|
+ ttype: 2,
|
|
|
|
+ tid:this.testExamineBaseList[0].id
|
|
}
|
|
}
|
|
];
|
|
];
|
|
this.ajax
|
|
this.ajax
|
|
- .post(this.$store.state.api + "addTestExamineWorks", params)
|
|
|
|
|
|
+ .post(this.$store.state.api + "addTestExamineWorks2", params)
|
|
.then(res => {
|
|
.then(res => {
|
|
this.getData();
|
|
this.getData();
|
|
})
|
|
})
|
|
@@ -344,14 +381,15 @@ export default {
|
|
org: this.org,
|
|
org: this.org,
|
|
type: this.pType,
|
|
type: this.pType,
|
|
json: JSON.stringify(PageBaseDataCopy),
|
|
json: JSON.stringify(PageBaseDataCopy),
|
|
- ttype: 1
|
|
|
|
|
|
+ ttype: 1,
|
|
|
|
+ tid:this.testExamineBaseList[0].id
|
|
}
|
|
}
|
|
];
|
|
];
|
|
// return console.log(params);
|
|
// return console.log(params);
|
|
this.ajax
|
|
this.ajax
|
|
- .post(this.$store.state.api + "addTestExamineWorks", params)
|
|
|
|
|
|
+ .post(this.$store.state.api + "addTestExamineWorks2", params)
|
|
.then(res => {
|
|
.then(res => {
|
|
- console.log("addTestExamineWorks", res);
|
|
|
|
|
|
+ console.log("addTestExamineWorks2", res);
|
|
// this.getData();
|
|
// this.getData();
|
|
// this.handleData();
|
|
// this.handleData();
|
|
})
|
|
})
|
|
@@ -368,10 +406,11 @@ export default {
|
|
this.tabLoad = true;
|
|
this.tabLoad = true;
|
|
let params = {
|
|
let params = {
|
|
uid: this.userid,
|
|
uid: this.userid,
|
|
- type: this.pType
|
|
|
|
|
|
+ type: this.pType,
|
|
|
|
+ tid:this.testExamineBaseList[0].id
|
|
};
|
|
};
|
|
this.ajax
|
|
this.ajax
|
|
- .get(this.$store.state.api + "getTestExamineByUserId", params)
|
|
|
|
|
|
+ .get(this.$store.state.api + "getTestExamineByUserId2", params)
|
|
.then(res => {
|
|
.then(res => {
|
|
console.log("getTestExamineByUserId", res);
|
|
console.log("getTestExamineByUserId", res);
|
|
|
|
|
|
@@ -420,14 +459,16 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
typ: this.pType,
|
|
typ: this.pType,
|
|
org: this.org,
|
|
org: this.org,
|
|
- oid: this.oid
|
|
|
|
|
|
+ oid: this.oid,
|
|
|
|
+ time:this.pType==1?this.timeA:this.timeB
|
|
};
|
|
};
|
|
this.ajax
|
|
this.ajax
|
|
- .get(this.$store.state.api + "selectTestExamineBase", params)
|
|
|
|
|
|
+ .get(this.$store.state.api + "selectTestExamineBase2", params)
|
|
.then(res => {
|
|
.then(res => {
|
|
// console.log("resresresres", res.data[0]);
|
|
// console.log("resresresres", res.data[0]);
|
|
// this.allData = res.data[0][0];
|
|
// this.allData = res.data[0][0];
|
|
-
|
|
|
|
|
|
+ let testExamineBaseList = res.data[0];
|
|
|
|
+ this.testExamineBaseList = testExamineBaseList;
|
|
console.log("selectTestExamineBase", res.data[0][0]);
|
|
console.log("selectTestExamineBase", res.data[0][0]);
|
|
this.PageBaseData = JSON.parse(res.data[0][0].json);
|
|
this.PageBaseData = JSON.parse(res.data[0][0].json);
|
|
// 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
|
|
// 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
|
|
@@ -444,15 +485,20 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
typ: type,
|
|
typ: type,
|
|
org: this.org,
|
|
org: this.org,
|
|
- oid: this.oid
|
|
|
|
|
|
+ oid: this.oid,
|
|
|
|
+ time:type==1?this.timeA:this.timeB
|
|
};
|
|
};
|
|
this.ajax
|
|
this.ajax
|
|
- .get(this.$store.state.api + "selectTestExamineBase", params)
|
|
|
|
|
|
+ .get(this.$store.state.api + "selectTestExamineBase2", params)
|
|
.then(res => {
|
|
.then(res => {
|
|
if(type == 1){
|
|
if(type == 1){
|
|
this.aArray = res.data[0];
|
|
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 {
|
|
}else {
|
|
this.bArray = res.data[0];
|
|
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){
|
|
if(!this.bArray.length){
|
|
this.pType = 1
|
|
this.pType = 1
|
|
}
|
|
}
|