2022年度甬江杯投票系统
This commit is contained in:
@@ -20,7 +20,24 @@
|
||||
<div id="app" v-loading="loading">
|
||||
<h3 style="text-align:center;">2021年度宁波市“甬江建设杯”选票结果</h3>
|
||||
<el-collapse style="width: 80%;margin:0 auto;">
|
||||
<el-collapse-item title="房建工程" name="1">
|
||||
<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;">
|
||||
<el-table-column prop="serial_number" label="序号" width="120"> </el-table-column>
|
||||
<el-table-column prop="name" label="工程名称"> </el-table-column>
|
||||
<el-table-column prop="no_count" label="不同意票数" width="120"> </el-table-column>
|
||||
<el-table-column prop="yes_count" label="同意票数" width="120"> </el-table-column>
|
||||
<el-table-column prop="is_agree" label="是否通过" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="info" v-if="scope.row.is_agree==true">通过</el-tag>
|
||||
<el-tag type="danger" v-else>不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-collapse-item>
|
||||
|
||||
|
||||
|
||||
@*<el-collapse-item title="房建工程" name="1">
|
||||
<el-table :data="tableData0" style="width:95%;margin:0 auto;">
|
||||
<el-table-column prop="serial_number" label="序号" width="120"> </el-table-column>
|
||||
<el-table-column prop="name" label="工程名称"> </el-table-column>
|
||||
@@ -103,8 +120,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-collapse-item>
|
||||
</el-collapsestyle="width:>
|
||||
</el-collapse-item>*@
|
||||
@*</el-collapsestyle="width:>*@
|
||||
|
||||
|
||||
<h3 style="text-align:center;">
|
||||
@@ -125,6 +142,7 @@
|
||||
el: '#app',
|
||||
data: function () {
|
||||
return {
|
||||
tableData: [],
|
||||
tableData0: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
@@ -146,7 +164,7 @@
|
||||
location = '/gb/yjb/manage/expert'
|
||||
},
|
||||
export_excel() {
|
||||
this.download('/gb/yjb/api/projects/download', this.dateFormat("YYYYmmddHHMMss", new Date()) + "-2021年度甬江杯投票.xlsx", this.loading_false);
|
||||
this.download('/gb/yjb/api/projects/download', this.dateFormat("YYYYmmddHHMMSS", new Date()) + "-2022年度甬江杯投票.xlsx", this.loading_false);
|
||||
},
|
||||
check_login() {
|
||||
this.token = window.sessionStorage.getItem('__TOKEN');
|
||||
@@ -167,13 +185,21 @@
|
||||
Authorization: 'Bearer ' + _this.token
|
||||
}
|
||||
}).then(function (response) {
|
||||
_this.tableData0 = response.data.data.data0
|
||||
_this.tableData1 = response.data.data.data1
|
||||
_this.tableData2 = response.data.data.data2
|
||||
_this.tableData3 = response.data.data.data3
|
||||
_this.tableData4 = response.data.data.data4
|
||||
_this.tableData5 = response.data.data.data5
|
||||
console.log(_this.tableData0)
|
||||
console.log(response)
|
||||
var _data = response.data.data.data
|
||||
var typeList = response.data.data.typeList
|
||||
for (var i = 0; i < typeList.length; i++) {
|
||||
var _p = _data.filter(a => { return a.type == i; });
|
||||
_this.tableData.push({ name: typeList[i], data: _p })
|
||||
}
|
||||
console.log(_this.tableData)
|
||||
//_this.tableData0 = response.data.data.data0
|
||||
//_this.tableData1 = response.data.data.data1
|
||||
//_this.tableData2 = response.data.data.data2
|
||||
//_this.tableData3 = response.data.data.data3
|
||||
//_this.tableData4 = response.data.data.data4
|
||||
//_this.tableData5 = response.data.data.data5
|
||||
//console.log(_this.tableData0)
|
||||
_this.loading = false;
|
||||
}).catch(function (error) {
|
||||
console.log(error)
|
||||
|
||||
Reference in New Issue
Block a user