This commit is contained in:
xuyucheng 2022-04-22 14:50:41 +08:00
parent 72a1d56e6e
commit 5c7ed555a3
1 changed files with 26 additions and 20 deletions

View File

@ -148,9 +148,7 @@
>确定</el-button >确定</el-button
> >
</div> </div>
<el-button slot="reference" type="primary"> <el-button slot="reference" type="primary"> </el-button>
</el-button>
</el-popover> </el-popover>
</el-footer> </el-footer>
</el-container> </el-container>
@ -348,8 +346,9 @@ export default {
for (let i in this.question[key][index].options) { for (let i in this.question[key][index].options) {
if (Array.isArray(item)) { if (Array.isArray(item)) {
this.question[key][index].options[i][0] === item[0] this.question[key][index].options[i][0] === item[0]
? (this.question[key][index].answer = ? ((this.question[key][index].answer =
this.question[key][index].options[i],this.question[key][index].des = item[1]) this.question[key][index].options[i]),
(this.question[key][index].des = item[1]))
: null; : null;
} else { } else {
this.question[key][index].options[i][0] === item this.question[key][index].options[i][0] === item
@ -449,14 +448,17 @@ export default {
input_form: this.data, input_form: this.data,
}).then((res) => { }).then((res) => {
this.$message.success(res.info); this.$message.success(res.info);
this.$router.push("/company")
}); });
}, },
submit() { submit() {
get("/esg/submit_esg_rating_input", {}).then((res) => { get("/esg/submit_esg_rating_input", {}).then((res) => {
if (res.info === "执行成功") {
this.$message.success(res.info); this.$message.success(res.info);
this.visible = false; this.$router.push("/company");
} else {
this.$message.warning(res.info);
}
}); });
}, },
}, },
@ -468,7 +470,7 @@ export default {
list.forEach((key) => { list.forEach((key) => {
this.data[key]["其他类型问卷"] = val[key].map((item) => { this.data[key]["其他类型问卷"] = val[key].map((item) => {
if (item.options) { if (item.options) {
if (Object.prototype.hasOwnProperty.call(item,'des')) { if (Object.prototype.hasOwnProperty.call(item, "des")) {
if (item.answer[0] === "A") { if (item.answer[0] === "A") {
return [item.answer[0], item.des]; return [item.answer[0], item.des];
} else { } else {
@ -502,14 +504,18 @@ export default {
array.forEach((key) => { array.forEach((key) => {
val[key]["近三年公司数据"].forEach((item) => { val[key]["近三年公司数据"].forEach((item) => {
Object.keys(item).forEach((keys) => { Object.keys(item).forEach((keys) => {
state.push(item[keys] !== null && item[keys] !== ""? true : false); state.push(
item[keys] !== null && item[keys] !== "" ? true : false
);
}); });
}); });
val[key]["其他类型问卷"].forEach((item) => { val[key]["其他类型问卷"].forEach((item) => {
state.push(item !== null && item !== "" &&item !==undefined ? true : false); state.push(
item !== null && item !== "" && item !== undefined ? true : false
);
}); });
}); });
console.log(state) console.log(state);
this.submitStatus = state.every((item) => { this.submitStatus = state.every((item) => {
return item; return item;
}); });