|
@@ -146,16 +146,21 @@
|
|
v-if="tableData.length > 0"
|
|
v-if="tableData.length > 0"
|
|
style="display: flex;justify-content: space-between;width: 150px;"
|
|
style="display: flex;justify-content: space-between;width: 150px;"
|
|
>
|
|
>
|
|
- <div>
|
|
|
|
|
|
+ <div style="margin-right:10px">
|
|
<el-button type="primary" size="mini" @click="upTea"
|
|
<el-button type="primary" size="mini" @click="upTea"
|
|
>上一个</el-button
|
|
>上一个</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
- <div>
|
|
|
|
|
|
+ <div style="margin-right:10px">
|
|
<el-button type="primary" size="mini" @click="nextTea"
|
|
<el-button type="primary" size="mini" @click="nextTea"
|
|
>下一个</el-button
|
|
>下一个</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div style="margin-right:10px">
|
|
|
|
+ <el-button type="primary" size="mini" @click="saveBtn"
|
|
|
|
+ >保存</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
@@ -250,8 +255,22 @@
|
|
: ''
|
|
: ''
|
|
)
|
|
)
|
|
"
|
|
"
|
|
- v-model.number="k.sco2"
|
|
|
|
|
|
+ v-model="k.sco2"
|
|
v-stopMousewheel
|
|
v-stopMousewheel
|
|
|
|
+ @input="val => {
|
|
|
|
+ // 只允许输入数字(整数或小数)
|
|
|
|
+ let num = val.replace(/[^0-9.]/g, '');
|
|
|
|
+ // 防止多个小数点
|
|
|
|
+ num = num.replace(/\.{2,}/g, '.');
|
|
|
|
+ num = num.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.');
|
|
|
|
+ // 防止小数点开头
|
|
|
|
+ if(num !== '' && num[0] === '.') num = '';
|
|
|
|
+ // 防止小数点后多余数字
|
|
|
|
+ if(num.split('.').length > 1 && num.split('.')[1].length > 2) {
|
|
|
|
+ num = num.split('.')[0] + '.' + num.split('.')[1].slice(0, 2);
|
|
|
|
+ }
|
|
|
|
+ k.sco2 = num;
|
|
|
|
+ }"
|
|
></el-input>
|
|
></el-input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -848,6 +867,8 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
];
|
|
];
|
|
|
|
+
|
|
|
|
+ console.log("params",params[0])
|
|
// return console.log(params);
|
|
// return console.log(params);
|
|
this.ajax
|
|
this.ajax
|
|
.post(this.$store.state.api + "updateExamineCogDataCopy", params)
|
|
.post(this.$store.state.api + "updateExamineCogDataCopy", params)
|
|
@@ -1011,7 +1032,9 @@ export default {
|
|
console.log("getTestExamineByUserId", res);
|
|
console.log("getTestExamineByUserId", res);
|
|
|
|
|
|
if (res.data[0].length > 0) {
|
|
if (res.data[0].length > 0) {
|
|
- let val = JSON.parse(res.data[0][0].json);
|
|
|
|
|
|
+ let _data = res.data[0].find(i=>i.id==this.digTid)
|
|
|
|
+ if(_data){
|
|
|
|
+ let val = JSON.parse(_data.json);
|
|
|
|
|
|
this.PageBaseData.forEach(e => {
|
|
this.PageBaseData.forEach(e => {
|
|
val.forEach(i => {
|
|
val.forEach(i => {
|
|
@@ -1032,6 +1055,7 @@ export default {
|
|
this.PageBaseDataTwo = val;
|
|
this.PageBaseDataTwo = val;
|
|
// 弹框计算自评分数,与二级指标个数
|
|
// 弹框计算自评分数,与二级指标个数
|
|
this.getTwoRigData();
|
|
this.getTwoRigData();
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
// 清空自评分数,与二级指标个数
|
|
// 清空自评分数,与二级指标个数
|
|
this.DigSelfSco = 0;
|
|
this.DigSelfSco = 0;
|
|
@@ -1146,6 +1170,44 @@ export default {
|
|
}else if(this.pType == 2 && this.timeB){
|
|
}else if(this.pType == 2 && this.timeB){
|
|
this.copyTableData = this.tableData.filter(i=>i.time == this.timeB)
|
|
this.copyTableData = this.tableData.filter(i=>i.time == this.timeB)
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ //保存按钮
|
|
|
|
+ saveBtn(){
|
|
|
|
+ let PageBaseDataCopy = JSON.parse(JSON.stringify(this.PageBaseData));
|
|
|
|
+
|
|
|
|
+ for (const e of PageBaseDataCopy) {
|
|
|
|
+ for (const k of e.children) {
|
|
|
|
+ if (k.testid.test.length > 0) {
|
|
|
|
+ k.testid.test = k.testid.test.map(item => item.courseId);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let params = [
|
|
|
|
+ {
|
|
|
|
+ uid: this.userid,
|
|
|
|
+ tid: this.digTid,
|
|
|
|
+ typ: this.pType,
|
|
|
|
+ // json: JSON.stringify(PageBaseDataCopy)
|
|
|
|
+ json: JSON.stringify(PageBaseDataCopy),
|
|
|
|
+ rjson: JSON.stringify({
|
|
|
|
+ rjson: PageBaseDataCopy,
|
|
|
|
+ text: `按人员,进行修改`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ ];
|
|
|
|
+ // return console.log(params);
|
|
|
|
+ this.ajax
|
|
|
|
+ .post(this.$store.state.api + "updateExamineCogDataCopy", params)
|
|
|
|
+ .then(res => {
|
|
|
|
+ // console.log("updateExamineCogDataCopy", res);
|
|
|
|
+ // this.CopDigSco();
|
|
|
|
+ this.getDigData();
|
|
|
|
+ this.$message.success("保存成功")
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ console.log(error);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|