commit
This commit is contained in:
@@ -1,170 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.nav-card .el-card__body {
|
||||
padding: 5px !important;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.jsdelivr.net/npm/echarts@4.1.0/dist/echarts.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@4.0.2"></script>
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5" style="width: 100%">
|
||||
<el-date-picker
|
||||
clearable="false"
|
||||
placeholder="选择年份"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<div ref="Dpie" id="Dpie" class="echarts" style="width: 100%; height: 300px"></div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-row class="pl5 pr5">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" prop="xmmc" show-overflow-tooltip width="400"></el-table-column>
|
||||
<el-table-column label="申报人" prop="username"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex" width="100"></el-table-column>
|
||||
<el-table-column label="申报单位" prop="dwname" show-overflow-tooltip width="150"></el-table-column>
|
||||
<el-table-column label="院级工会" prop="ghname" show-overflow-tooltip width="150"></el-table-column>
|
||||
<el-table-column label="职务职称" prop="zwzc" width="100"></el-table-column>
|
||||
<el-table-column label="状态" prop="statename" sortable width="200"></el-table-column>
|
||||
<el-table-column label="申报日期" prop="sbrq" sortable width="100"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-size="pageForm.pageSize"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
layout="total, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<template #view>
|
||||
<syr-info-new ref="viewInfo"></syr-info-new>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
smm: {
|
||||
status: 'table'
|
||||
},
|
||||
statePlotData: [],
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
state: null,
|
||||
year: ''
|
||||
},
|
||||
dataList: [],
|
||||
stateOptions: {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
data: []
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '状态',
|
||||
type: 'pie',
|
||||
radius: '55%',
|
||||
center: ['50%', '60%'],
|
||||
data: [],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'syr-info-new': httpVueLoader('/components/syr/SyrInfoNew.vue'),
|
||||
},
|
||||
methods: {
|
||||
async initStatePlot() {
|
||||
const {data} = await $.get('/platform/syr/cxtj/statetj/statePlotData', {year: this.pageForm.year})
|
||||
this.dataList = data
|
||||
let legendData = []
|
||||
for (let o of data) {
|
||||
legendData.push(o.name)
|
||||
}
|
||||
this.stateOptions.legend.data = legendData
|
||||
this.stateOptions.series[0].data = data
|
||||
|
||||
var myChart = echarts.init(document.getElementById('Dpie'));
|
||||
myChart.setOption(this.stateOptions)
|
||||
},
|
||||
stateClick(e) {
|
||||
let stateObj = this.dataList.find(o => {
|
||||
return o.name === e.data.name
|
||||
})
|
||||
this.pageForm.state = stateObj.id
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
const {data} = await $.post('/platform/syr/cxtj/statetj/pageData', this.pageForm, true)
|
||||
this.tableData = data.list
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val
|
||||
this.pageData()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.state = null
|
||||
this.pageData()
|
||||
this.initStatePlot()
|
||||
},
|
||||
async openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initStatePlot()
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = moment().format('YYYY')
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user