diff --git a/20220330_Vote/Ewide.Web.Entry/wwwroot/html/yjbvote20251222/index.html b/20220330_Vote/Ewide.Web.Entry/wwwroot/html/yjbvote20251222/index.html index 2c96820..567872b 100644 --- a/20220330_Vote/Ewide.Web.Entry/wwwroot/html/yjbvote20251222/index.html +++ b/20220330_Vote/Ewide.Web.Entry/wwwroot/html/yjbvote20251222/index.html @@ -128,30 +128,32 @@ maximum-scale=1.0, user-scalable=no"/> async submit() { let _this = this; await this.checkcode().then(a => { - if (a == false) + if (a === false) return; - var msg1 = ""; - var msg2 = ""; - var all_no_select_num = 0; - var select_false_list = []; - var all_select_false_num = 0; - var all_select_true_num = 0; - var allselects = []; - for (var i = 0; i < _this.projects.length; i++) { - var _p = _this.projects[i]; + let msg1 = ""; + let msg2 = ""; + let all_no_select_num = 0; + let select_false_list = []; + let all_select_false_num = 0; + let all_select_true_num = 0; + let allselects = []; + for (let i = 0; i < _this.projects.length; i++) { + let _p = _this.projects[i]; if (_p.data.length > 0) { - // var no_select = _p.data.filter(a => { return !a.vote }).length; + // let no_select = _p.data.filter(a => { return !a.vote }).length; // all_no_select_num += no_select; // if (no_select > 0) { // msg1 += `
目前[` + _p.name + `]未选择的有` + no_select + `个
`; // } - var select_false = _p.data.filter(a => { + let select_false = _p.data.filter(a => { return a.vote == "false" }).length; select_false_list.push(select_false); // if (select_false < 1) { - if(_p.name!=="电力工程") - msg2 += `目前[` + _p.name + `]淘汰的有 ` + select_false + ` 个\n`; + if (_p.name === "电力工程" && select_false === 0) { + } else { + msg2 += `[` + _p.name + `]淘汰的有 ` + select_false + ` 个; \n`; + } // } all_select_false_num += select_false; all_select_true_num += _p.data.filter(a => { @@ -182,7 +184,7 @@ maximum-scale=1.0, user-scalable=no"/> // }).catch(err => { // console.log(err) // }); - alert("房屋建筑工程不少于 10 个淘汰!\n\n" + msg2); + alert("房屋建筑工程不少于 10 个淘汰!\n目前:\n" + msg2); return; } //市政不少于4个 @@ -193,7 +195,7 @@ maximum-scale=1.0, user-scalable=no"/> // }).catch(err => { // console.log(err) // }); - alert("市政基础设施工程不少于 5 个淘汰!\n\n" + msg2); + alert("市政基础设施工程不少于 5 个淘汰!\n目前:\n" + msg2); return; } //交通不少于1个 @@ -204,7 +206,7 @@ maximum-scale=1.0, user-scalable=no"/> // }).catch(err => { // console.log(err) // }); - alert("轨道交通工程不少于 2 个淘汰!\n\n" + msg2); + alert("轨道交通工程不少于 2 个淘汰!\n目前:\n" + msg2); return; } ////水利不少于1个 @@ -221,10 +223,12 @@ maximum-scale=1.0, user-scalable=no"/> alert("淘汰总数必须大于17个"); return; } - this.$confirm('您此次选择了同意' + all_select_true_num + '个,淘汰' + all_select_false_num + '个,是否继续提交?', '提示', { + this.$confirm(`您此次选择了同意` + all_select_true_num + `个,淘汰` + all_select_false_num + `个,是否继续提交?