2023甬江建设杯

This commit is contained in:
ky_fanly
2023-11-09 16:42:58 +08:00
parent 9e6a200a7a
commit dd63efcfb7
8 changed files with 30 additions and 88 deletions

View File

@@ -620,6 +620,9 @@
<Content Update="wwwroot\ExcelTemplate\2022年度甬江杯投票.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\ExcelTemplate\2023年度甬江杯投票.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\html\2023qyrczp\index.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

View File

@@ -13,7 +13,7 @@
<body>
<div id="app" v-loading="loading">
<h3 style="text-align:center;">2023年度宁波市“工程结构优质奖”选票结果</h3>
<h3 style="text-align:center;">2023年度宁波市“甬江建设杯”选票结果</h3>
<el-table :data="tableData" style="width: 20%;margin:0 auto;">
<el-table-column prop="login_code" label="专家"> </el-table-column>
<el-table-column prop="is_vote" label="是否投票" width="120">

View File

@@ -13,7 +13,7 @@
<body>
<div id="app" v-loading="loading">
<h3 style="text-align:center;">2023年度宁波市“工程结构优质奖”选票结果</h3>
<h3 style="text-align:center;">2023年度宁波市“甬江建设杯”选票结果</h3>
<el-collapse style="width: 80%;margin:0 auto;">
<el-collapse-item v-for="(prolist,idx) in tableData" :title="prolist.name" :name="idx" v-show="prolist.data.length>0" :key="idx">
<el-table :data="prolist.data" style="width:95%;margin:0 auto;">

View File

@@ -15,7 +15,7 @@ maximum-scale=1.0, user-scalable=no" />
<body>
<div id="app" v-loading="loading">
<h3 style="text-align:center;">2023年度宁波市“工程结构优质奖”选票</h3>
<h3 style="text-align:center;">2023年度宁波市“甬江建设杯”选票</h3>
<el-collapse>
<el-collapse-item v-for="(prolist,idx) in projects" :title="prolist.name" :name="idx" v-show="prolist.data.length>0" :key="idx">
<el-descriptions class="margin-top" title="" :column="1" border v-for="project in prolist.data" :key="project.id">
@@ -45,6 +45,9 @@ maximum-scale=1.0, user-scalable=no" />
white-space: nowrap;
width: 21%;
}
.el-message-box{
width:300px !important;
}
</style>
<script>
new Vue({
@@ -159,16 +162,30 @@ maximum-scale=1.0, user-scalable=no" />
// }).then(a => { }).catch(err => { console.log(err) });
// return;
//}
//房建不少于14
if (select_false_list[0] < 13) {
this.$alert(`<div>房建工程不少于13个淘汰!</div>` + msg2, '错误', {
//房建不少于5
if (select_false_list[0] < 5) {
this.$alert(`<div>房建工程不少于5个淘汰!</div>` + msg2, '错误', {
confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
}).then(a => { }).catch(err => { console.log(err) });
return;
}
//市政不少于1
//市政不少于4
if (select_false_list[1] < 1) {
this.$alert(`<div>房建工程不少于1个淘汰!</div>` + msg2, '错误', {
this.$alert(`<div>市政工程不少于4个淘汰!</div>` + msg2, '错误', {
confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
}).then(a => { }).catch(err => { console.log(err) });
return;
}
//交通不少于1个
if (select_false_list[3] < 1) {
this.$alert(`<div>交通工程不少于1个淘汰</div>` + msg2, '错误', {
confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
}).then(a => { }).catch(err => { console.log(err) });
return;
}
//水利不少于1个
if (select_false_list[4] < 1) {
this.$alert(`<div>水利工程不少于1个淘汰</div>` + msg2, '错误', {
confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
}).then(a => { }).catch(err => { console.log(err) });
return;
@@ -213,76 +230,6 @@ maximum-scale=1.0, user-scalable=no" />
}).catch(() => {
});
//var no_select0 = this.projects0.filter(a => { return !a.vote }).length;
//var no_select1 = this.projects1.filter(a => { return !a.vote }).length;
//var no_select2 = this.projects2.filter(a => { return !a.vote }).length;
//var no_select3 = this.projects3.filter(a => { return !a.vote }).length;
//var no_select4 = this.projects4.filter(a => { return !a.vote }).length;
//var no_select5 = this.projects5.filter(a => { return !a.vote }).length;
//if (no_select0 > 0 || no_select1 > 0 || no_select2 > 0 || no_select3 > 0 || no_select4 > 0 || no_select5 > 0) {
// this.$alert(`<div>请全部选择完毕后再次提交!</div><p>目前[房建工程]未选择的有` + no_select0 + `个</p><p>目前[市政工程]未选择的有` + no_select1 + `个</p><p>目前[轨道工程]未选择的有` + no_select2 + `个</p><p>目前[电力工程]未选择的有` + no_select3 + `个</p><p>目前[交通工程]未选择的有` + no_select4 + `个</p><p>目前[水利工程]未选择的有` + no_select5 + `个</p>`, '错误', {
// confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
// }).then(a => { }).catch(err => { console.log(err) });
// return;
//}
////每个专业必须有一个淘汰
//no_select0 = this.projects0.filter(a => { return a.vote == "false" }).length;
//no_select1 = this.projects1.filter(a => { return a.vote == "false" }).length;
//no_select2 = this.projects2.filter(a => { return a.vote == "false" }).length;
//no_select3 = this.projects3.filter(a => { return a.vote == "false" }).length;
//no_select4 = this.projects4.filter(a => { return a.vote == "false" }).length;
//no_select5 = this.projects5.filter(a => { return a.vote == "false" }).length;
//if (no_select0 < 1 || no_select1 < 1 || no_select2 < 1 || no_select3 < 1 || no_select4 < 1 || no_select5 < 1) {
// this.$alert(`<div>每个专业必须有一个淘汰!</div><p>目前[房建工程]淘汰的有` + no_select0 + `个</p><p>目前[市政工程]淘汰的有` + no_select1 + `个</p><p>目前[轨道工程]淘汰的有` + no_select2 + `个</p><p>目前[电力工程]淘汰的有` + no_select3 + `个</p><p>目前[交通工程]淘汰的有` + no_select4 + `个</p><p>目前[水利工程]淘汰的有` + no_select5 + `个</p>`, '错误', {
// confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
// }).then(a => { }).catch(err => { console.log(err) });
// return;
//}
//var allselects = this.projects0.concat(this.projects1).concat(this.projects2).concat(this.projects3).concat(this.projects4).concat(this.projects5);
//console.log('allselects:', allselects)
//if (allselects.filter(a => { return a.vote == "false" }).length != 8) {
// this.$alert(`<div>淘汰总数只能等于8个</div>`, '错误', {
// confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
// }).then(a => { }).catch(err => { console.log(err) });
// return;
//}
//var allselects = this.projects0.concat(this.projects1).concat(this.projects2).concat(this.projects3).concat(this.projects4).concat(this.projects5);
//this.$confirm('您此次选择了同意' + allselects.filter(a => { return a.vote == "true" }).length + '个,淘汰' + allselects.filter(a => { return a.vote == "false" }).length + '个,是否继续提交?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
//}).then(() => {
// _this.loading = true;
// axios({
// headers: { 'Content-Type': 'application/json;charset=UTF-8' },
// method: 'post',
// url: '/gb/yjb/api/projects/submit-vote',
// data: { 'code': this.logincode, 'projects': allselects },
// responseType: "json",
// }).then(async response => {
// if (response.data.data != true) {
// _this.$alert(`<div>` + response.data.message + `</div>`, '错误', {
// confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
// }).then(a => { }).catch(err => { console.log(err) });
// } else {
// _this.$alert(`<div>提交成功</div>`, '成功', {
// confirmButtonText: '确定', dangerouslyUseHTMLString: true, center: true, closeOnClickModal: true
// }).then(a => { }).catch(err => { console.log(err) });
// }
// _this.loading = false;
// }).catch(async error => {
// console.log(error)
// _this.$message({
// type: 'error',
// message: error.message
// })
// _this.loading = false;
// })
//}).catch(() => {
//});
})
},
load_projects() {
@@ -302,14 +249,6 @@ maximum-scale=1.0, user-scalable=no" />
var _p = _data.filter(a => { return a.type == i; });
_this.projects.push({ name: typeList[i], data: _p })
}
//console.log(_this.projects)
//_this.projects.map(a => { a.vote = !a.vote ? '' : a.vote.toString(); return a; });
//_this.projects0 = _this.projects.filter(a => { return a.type == 0; })
//_this.projects1 = _this.projects.filter(a => { return a.type == 1; })
//_this.projects2 = _this.projects.filter(a => { return a.type == 2; })
//_this.projects3 = _this.projects.filter(a => { return a.type == 3; })
//_this.projects4 = _this.projects.filter(a => { return a.type == 4; })
//_this.projects5 = _this.projects.filter(a => { return a.type == 5; })
_this.alltrue();
_this.loading = false;
}).catch(function (error) {

View File

@@ -112,8 +112,8 @@ namespace Vote.Services.ApiController
}
private async Task<List<ProjectsList2Output>> GetVoteData()
{
var query = from a in rep_Projects2022.DetachedEntities
join b in rep_VoteRecords2022.DetachedEntities
var query = from a in rep_Projects.DetachedEntities
join b in rep_VoteRecords.DetachedEntities
on a.Id equals b.project_id into grouping
from p in grouping.DefaultIfEmpty()
group new { a, p } by new { a.Id, a.name, a.serial_number, a.type } into pp