mode
This commit is contained in:
parent
72a1d56e6e
commit
5c7ed555a3
|
@ -148,9 +148,7 @@
|
|||
>确定</el-button
|
||||
>
|
||||
</div>
|
||||
<el-button slot="reference" type="primary">
|
||||
提 交
|
||||
</el-button>
|
||||
<el-button slot="reference" type="primary"> 提 交 </el-button>
|
||||
</el-popover>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
|
@ -346,16 +344,17 @@ export default {
|
|||
result.result[key]["其他类型问卷"].forEach((item, index) => {
|
||||
if (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].answer =
|
||||
this.question[key][index].options[i],this.question[key][index].des = item[1])
|
||||
: null;
|
||||
}else{
|
||||
? ((this.question[key][index].answer =
|
||||
this.question[key][index].options[i]),
|
||||
(this.question[key][index].des = item[1]))
|
||||
: null;
|
||||
} else {
|
||||
this.question[key][index].options[i][0] === item
|
||||
? (this.question[key][index].answer =
|
||||
this.question[key][index].options[i])
|
||||
: null;
|
||||
? (this.question[key][index].answer =
|
||||
this.question[key][index].options[i])
|
||||
: null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -437,7 +436,7 @@ export default {
|
|||
},
|
||||
|
||||
getColumns(value) {
|
||||
if(value.length !== 0) {
|
||||
if (value.length !== 0) {
|
||||
return Object.keys(value[0]).map((key) => {
|
||||
return key;
|
||||
});
|
||||
|
@ -449,14 +448,17 @@ export default {
|
|||
input_form: this.data,
|
||||
}).then((res) => {
|
||||
this.$message.success(res.info);
|
||||
this.$router.push("/company")
|
||||
});
|
||||
},
|
||||
|
||||
submit() {
|
||||
get("/esg/submit_esg_rating_input", {}).then((res) => {
|
||||
this.$message.success(res.info);
|
||||
this.visible = false;
|
||||
if (res.info === "执行成功") {
|
||||
this.$message.success(res.info);
|
||||
this.$router.push("/company");
|
||||
} else {
|
||||
this.$message.warning(res.info);
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
@ -468,7 +470,7 @@ export default {
|
|||
list.forEach((key) => {
|
||||
this.data[key]["其他类型问卷"] = val[key].map((item) => {
|
||||
if (item.options) {
|
||||
if (Object.prototype.hasOwnProperty.call(item,'des')) {
|
||||
if (Object.prototype.hasOwnProperty.call(item, "des")) {
|
||||
if (item.answer[0] === "A") {
|
||||
return [item.answer[0], item.des];
|
||||
} else {
|
||||
|
@ -492,7 +494,7 @@ export default {
|
|||
this.submitStatus = !val["所属行业"] ? true : false;
|
||||
Object.keys(val["公司当年收入(万元)"]).forEach((key) => {
|
||||
state.push(
|
||||
val["公司当年收入(万元)"][key]!==null &&
|
||||
val["公司当年收入(万元)"][key] !== null &&
|
||||
val["公司当年收入(万元)"][key] !== ""
|
||||
? true
|
||||
: false
|
||||
|
@ -502,14 +504,18 @@ export default {
|
|||
array.forEach((key) => {
|
||||
val[key]["近三年公司数据"].forEach((item) => {
|
||||
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) => {
|
||||
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) => {
|
||||
return item;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue