|
@@ -1,3 +1,4 @@
|
|
|
|
|
+// eslint-disable
|
|
|
<template>
|
|
<template>
|
|
|
<div class="container">
|
|
<div class="container">
|
|
|
<div class="page-title">
|
|
<div class="page-title">
|
|
@@ -7,16 +8,30 @@
|
|
|
<div class="score-list">
|
|
<div class="score-list">
|
|
|
<div class="score-item" :key="index" v-for="(item, index) in List">
|
|
<div class="score-item" :key="index" v-for="(item, index) in List">
|
|
|
<div class="text1">{{ index + 1 }}.{{ item.label }}</div>
|
|
<div class="text1">{{ index + 1 }}.{{ item.label }}</div>
|
|
|
- <template>
|
|
|
|
|
- <el-radio v-model="item.value" :label="true">是</el-radio>
|
|
|
|
|
- <el-radio v-model="item.value" :label="false">否</el-radio>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <div style="margin-top:10px">
|
|
|
|
|
+ <template>
|
|
|
|
|
+ <el-radio
|
|
|
|
|
+ @change="changeRadio(item, true)"
|
|
|
|
|
+ v-model="item.value"
|
|
|
|
|
+ :label="true"
|
|
|
|
|
+ >是</el-radio
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-radio
|
|
|
|
|
+ @change="changeRadio(item, false)"
|
|
|
|
|
+ v-model="item.value"
|
|
|
|
|
+ :label="false"
|
|
|
|
|
+ >否</el-radio
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </div>
|
|
|
<div>
|
|
<div>
|
|
|
<template>
|
|
<template>
|
|
|
<van-uploader
|
|
<van-uploader
|
|
|
- :after-read="afterReads"
|
|
|
|
|
|
|
+ :after-read="(file, detail) => afterReads(file, detail, index)"
|
|
|
:before-read="beforeRead"
|
|
:before-read="beforeRead"
|
|
|
- :before-delete="beforeDeletes"
|
|
|
|
|
|
|
+ :before-delete="
|
|
|
|
|
+ (file, detail) => beforeDeletes(file, detail, index)
|
|
|
|
|
+ "
|
|
|
v-model="item.img"
|
|
v-model="item.img"
|
|
|
class="miniImg"
|
|
class="miniImg"
|
|
|
>
|
|
>
|
|
@@ -29,10 +44,23 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="score-card">
|
|
|
|
|
|
|
+ <!-- <div class="score-card">
|
|
|
<div class="name">
|
|
<div class="name">
|
|
|
其他
|
|
其他
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ class="textarea"
|
|
|
|
|
+ placeholder="请输入…"
|
|
|
|
|
+ v-model="supervisor"
|
|
|
|
|
+ :autosize="{ maxHeight: 200, minHeight: 160 }"
|
|
|
|
|
+ :maxlength="150"
|
|
|
|
|
+ ></van-field>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ <div class="score-card">
|
|
|
|
|
+ <div class="name">
|
|
|
|
|
+ 检查情况
|
|
|
|
|
+ </div>
|
|
|
<van-field
|
|
<van-field
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
class="textarea"
|
|
class="textarea"
|
|
@@ -112,6 +140,7 @@ export default {
|
|
|
imgs: []
|
|
imgs: []
|
|
|
},
|
|
},
|
|
|
img: [],
|
|
img: [],
|
|
|
|
|
+ supervisor: "",
|
|
|
submitList: {},
|
|
submitList: {},
|
|
|
List: []
|
|
List: []
|
|
|
};
|
|
};
|
|
@@ -126,20 +155,25 @@ export default {
|
|
|
recordId: this.$route.query.recordId,
|
|
recordId: this.$route.query.recordId,
|
|
|
type: item.type,
|
|
type: item.type,
|
|
|
value: item.value,
|
|
value: item.value,
|
|
|
- img: this.img
|
|
|
|
|
|
|
+ img: item.imgArr
|
|
|
|
|
+ // supervisor: this.supervisor
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.categories.forEach(item => {
|
|
this.categories.forEach(item => {
|
|
|
- item.value = Boolean;
|
|
|
|
|
|
|
+ item.value = undefined;
|
|
|
|
|
+ item.imgArr = [];
|
|
|
this.List.push(item);
|
|
this.List.push(item);
|
|
|
});
|
|
});
|
|
|
console.log(this.List);
|
|
console.log(this.List);
|
|
|
},
|
|
},
|
|
|
mounted() {},
|
|
mounted() {},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ changeRadio(item, flag) {
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
|
+ },
|
|
|
afterRead(file, detail) {
|
|
afterRead(file, detail) {
|
|
|
this.$toast.loading({
|
|
this.$toast.loading({
|
|
|
message: "加载中...",
|
|
message: "加载中...",
|
|
@@ -156,7 +190,7 @@ export default {
|
|
|
this.form.file = imgs;
|
|
this.form.file = imgs;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- afterReads(file, detail) {
|
|
|
|
|
|
|
+ afterReads(file, detail, index) {
|
|
|
this.$toast.loading({
|
|
this.$toast.loading({
|
|
|
message: "加载中...",
|
|
message: "加载中...",
|
|
|
forbidClick: true
|
|
forbidClick: true
|
|
@@ -166,11 +200,14 @@ export default {
|
|
|
base64: file.content
|
|
base64: file.content
|
|
|
})
|
|
})
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
- this.img.push(res);
|
|
|
|
|
|
|
+ this.List[index].imgArr.push(res);
|
|
|
|
|
+ console.log(this.List);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- beforeDeletes(file, detail) {
|
|
|
|
|
- this.img.splice(detail.index, 1);
|
|
|
|
|
|
|
+ beforeDeletes(file, detail, index) {
|
|
|
|
|
+ this.List[index].imgArr.splice(detail.index, 1);
|
|
|
|
|
+ // this.img.splice(detail.index, 1);
|
|
|
|
|
+ // console.log(item);
|
|
|
},
|
|
},
|
|
|
beforeDelete(file, detail) {
|
|
beforeDelete(file, detail) {
|
|
|
let submitForm = { ...this.form };
|
|
let submitForm = { ...this.form };
|
|
@@ -194,31 +231,32 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
save() {
|
|
save() {
|
|
|
- // let form = { ...this.form };
|
|
|
|
|
- // this.$toast.loading({
|
|
|
|
|
- // message: "加载中...",
|
|
|
|
|
- // forbidClick: true
|
|
|
|
|
- // });
|
|
|
|
|
- // delete form.imgs;
|
|
|
|
|
- // form.userId = this.$store.state.userInfo.id;
|
|
|
|
|
- // form.recordId = this.$route.query.recordId;
|
|
|
|
|
- // this.$http
|
|
|
|
|
- // .post("/recordCheck/save", form, { body: "json" })
|
|
|
|
|
- // .then(() => {
|
|
|
|
|
- // this.saving = false;
|
|
|
|
|
- // this.$toast.success("成功");
|
|
|
|
|
- // // setTimeout(() => {
|
|
|
|
|
- // // this.$router.go(-1);
|
|
|
|
|
- // // }, 1500);
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch(e => {
|
|
|
|
|
- // console.log(e);
|
|
|
|
|
- // this.saving = false;
|
|
|
|
|
- // this.$message.error(e.error);
|
|
|
|
|
- // });
|
|
|
|
|
|
|
+ let form = { ...this.form };
|
|
|
|
|
+ this.$toast.loading({
|
|
|
|
|
+ message: "加载中...",
|
|
|
|
|
+ forbidClick: true
|
|
|
|
|
+ });
|
|
|
|
|
+ delete form.imgs;
|
|
|
|
|
+ form.userId = this.$store.state.userInfo.id;
|
|
|
|
|
+ form.recordId = this.$route.query.recordId;
|
|
|
|
|
+ console.log(form);
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post("/recordCheck/save", form, { body: "json" })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.saving = false;
|
|
|
|
|
+ this.$toast.success("成功");
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
|
+ // this.$router.go(-1);
|
|
|
|
|
+ // }, 1500);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ this.saving = false;
|
|
|
|
|
+ this.$message.error(e.error);
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
submit() {
|
|
submit() {
|
|
|
- // this.save();
|
|
|
|
|
|
|
+ this.save();
|
|
|
this.$toast.loading({
|
|
this.$toast.loading({
|
|
|
message: "加载中...",
|
|
message: "加载中...",
|
|
|
forbidClick: true
|
|
forbidClick: true
|