From 7d99c78c767f5ec13f9bbab6e1251825e92ea009 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期一, 29 四月 2024 17:53:16 +0800
Subject: [PATCH] 合同考核结果定时任务、详情、查询、导出
---
src/views/system/result/detail/index1.vue | 67 ++++++++++++++++++++-------------
1 files changed, 40 insertions(+), 27 deletions(-)
diff --git a/src/views/system/result/detail/index1.vue b/src/views/system/result/detail/index1.vue
index 1eef8d2..72c3c32 100644
--- a/src/views/system/result/detail/index1.vue
+++ b/src/views/system/result/detail/index1.vue
@@ -3,8 +3,8 @@
<div>
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"
style="margin-bottom: 10px">
- <el-menu-item index="1">鐪佸巺鑰冩牳</el-menu-item>
- <el-menu-item index="2">鍖哄煙鑰冩牳</el-menu-item>
+ <el-menu-item index="0">鐪佸巺鑰冩牳</el-menu-item>
+ <el-menu-item index="1">鍖哄煙鑰冩牳</el-menu-item>
</el-menu>
</div>
@@ -26,8 +26,8 @@
</el-card>
</div>
- <div style="margin-top: 35px">
- <el-table :data="tableData" style="width: 100%" v-loading="loading">
+ <div style="margin-top: 35px;margin-bottom: 35px">
+ <el-table :data="tableData" style="width: 100%" v-loading="tableLoading">
<el-table-column label="鑰冩牳鏃堕棿" prop="createTime" align="center">
</el-table-column>
<el-table-column label="鑰冩牳瀵硅薄" prop="deptId" align="center">
@@ -55,27 +55,22 @@
<template slot-scope="scope">
<el-button size="small" type="text" v-show="scope.row.publish != 1">纭鍙戝竷</el-button>
<el-button size="small" type="text" v-show="scope.row.publish == 1">鍙栨秷鍙戝竷</el-button>
- <el-button size="mini" type="text" icon="el-icon-view"
- @click="handleDetail(scope.row, scope.index)">璇︾粏</el-button>
+ <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row.id)">璇︾粏</el-button>
</template>
</el-table-column>
</el-table>
- </div>
- <div style="text-align: right; margin-top: 10px">
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :current-page="queryParams.pageNum" :page-sizes="[5, 10, 20]" :page-size="5"
- layout="total, sizes, prev, pager, next, jumper" :total="4">
- </el-pagination>
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+ @pagination="getList" />
+
</div>
</div>
</template>
<script>
-import { listScore, getScore, delScore, addScore, updateScore, publishScore } from "@/api/platform/check-score";
+import { listScore, getScore, delScore, addScore, updateScore, publishScore, detailScore } from "@/api/platform/check-score";
import { areaSelect } from '@/api/system/dept';
-import { mapState } from 'vuex';
import * as echarts from 'echarts';
let lineChart = null;
let observer = null;
@@ -84,18 +79,21 @@
dicts: ['platform_examine_use', 'platform_examine_category'],
data() {
return {
- activeIndex: '1',
- activeIndex2: '2',
+ activeIndex: '0',
areaList: [],
date: '',
dateRange: '',
+ // 鎬绘潯鏁�
+ total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
+ examineTag: 0
},
tableData: [],
loading: false,
+ tableLoading: false,
searchForm: {
time: null,
}
@@ -113,6 +111,7 @@
this.date = year + '-' + month;
this.queryParams.date = this.date;
this.areaSelect();
+ this.getList(this.$route.query.index);
},
computed: {
@@ -130,17 +129,27 @@
},
/** 瀵艰埅鍒囨崲 */
handleSelect(key) {
- this.activeIndex = key; // 鏇存柊褰撳墠婵�娲荤殑鑿滃崟椤�
- this.getList();
+ this.activeIndex = key;
+ this.queryParams.examineTag = key;
+ this.getChart(this.queryParams.deptId);
+ this.getList(this.queryParams.deptId);
},
/** 鏌ヨ鑰冩牳妯℃澘鍒楄〃 */
- getList(deptId) {
+ getChart(deptId) {
this.loading = true;
lineChart.showLoading();
listScore(this.queryParams).then(response => {
- this.tableData = response.data[deptId];
- this.loading = false;
this.initChart(response.data[deptId]);
+ this.loading = false;
+ });
+ },
+ /** 鏌ヨ鑰冩牳妯℃澘鍒楄〃 */
+ getList() {
+ this.tableLoading = true;
+ detailScore(this.queryParams).then(response => {
+ this.tableData = response.rows;
+ this.total = response.total;
+ this.tableLoading = false;
});
},
handleSizeChange(val) {
@@ -149,9 +158,13 @@
handleCurrentChange(val) {
console.log(`褰撳墠椤�: ${val}`);
},
- handleDetail(index, row) {
- console.log(index, row);
- this.$router.push("/examine/detail/detail")
+ handleDetail(id) {
+ this.$router.push({
+ path: '/examine/detail/detail',
+ query: {
+ id: id,
+ }
+ })
},
handleDelete(index, row) {
console.log(index, row);
@@ -178,7 +191,7 @@
data: dataList.map((item) => item[0]),
},
yAxis: {
- min: 90,
+ min: 'dataMin'
},
series: [
{
@@ -269,14 +282,14 @@
dateChange() {
this.queryParams.date = this.date;
- console.log(this.queryParams);
+ this.getChart(this.queryParams.deptId);
this.getList(this.queryParams.deptId);
}
},
mounted() {
lineChart = echarts.init(this.$refs.chartContent);
- this.getList(this.$route.query.index);
+ this.getChart(this.$route.query.index);
this.observe();
},
beforeDestroy() {
--
Gitblit v1.8.0