From b3be6406c8105376eef209af3bd6635cb95fa81d Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 24 九月 2024 12:15:22 +0800 Subject: [PATCH] 增加部级考核标签 --- src/views/system/check/result/detail/index.vue | 93 +++++++++++++++++++++++++++++----------------- 1 files changed, 59 insertions(+), 34 deletions(-) diff --git a/src/views/system/check/result/detail/index.vue b/src/views/system/check/result/detail/index.vue index f72a15c..c7507dd 100644 --- a/src/views/system/check/result/detail/index.vue +++ b/src/views/system/check/result/detail/index.vue @@ -2,9 +2,10 @@ <div style="padding: 0px 10px"> <div> <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" - style="margin-bottom: 10px"> + style="margin-bottom: 10px"> <el-menu-item index="0">鐪佸巺鑰冩牳</el-menu-item> <el-menu-item index="1">鍖哄幙鑰冩牳</el-menu-item> + <el-menu-item index="2">鍏畨閮ㄨ�冩牳</el-menu-item> </el-menu> </div> @@ -15,7 +16,7 @@ <h1>鑰冩牳鎴愮哗</h1> <div class="select-container"> <el-date-picker v-model="date" format="yyyy-MM" value-format="yyyy-MM" type="month" placeholder="閫夋嫨鏃ユ湡" - @change="dateChange"> + @change="dateChange"> </el-date-picker> </div> </div> @@ -37,12 +38,16 @@ </el-table-column> <el-table-column label="鏍囩" prop="examineTag" align="center"> <template slot-scope="scope"> - {{ scope.row.examineTag == 0 ? '鐪佸巺鑰冩牳' : '鍖哄幙鑰冩牳' }} + {{ + scope.row.examineTag === 0 ? '鐪佸巺鑰冩牳' : + scope.row.examineTag === 1 ? '鍖哄幙鑰冩牳' : + scope.row.examineTag === 2 ? '鍏畨閮ㄨ�冩牳' : '鏈煡' + }} </template> </el-table-column> <el-table-column label="鑰冩牳绫诲瀷" prop="examineCategory" align="center"> <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory" /> + <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory"/> </template> </el-table-column> @@ -51,32 +56,37 @@ </el-table-column> <el-table-column label="鐘舵��" prop="publish" align="center"> <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_is_publish" :value="scope.row.publish" /> + <dict-tag :options="dict.type.platform_is_publish" :value="scope.row.publish"/> </template> </el-table-column> <el-table-column label="鎿嶄綔" align="center"> <template slot-scope="scope"> <div style="display: flex;justify-content: center;"> - <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" v-if="scope.row.publish === 'UNPUBLISHED'" >纭鍙戝竷</el-button> - <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" v-if="scope.row.publish === 'PUBLISHED'">鍙栨秷鍙戝竷</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-view" - @click="handleDetail(scope.row.id)" - >璇︾粏</el-button> + <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" + v-if="scope.row.publish === 'UNPUBLISHED'">纭鍙戝竷 + </el-button> + <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" + v-if="scope.row.publish === 'PUBLISHED'">鍙栨秷鍙戝竷 + </el-button> + <el-button + size="mini" + type="text" + icon="el-icon-view" + @click="handleDetail(scope.row.id)" + >璇︾粏 + </el-button> </div> </template> </el-table-column> </el-table> - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParamsList.pageNum" - :limit.sync="queryParamsList.pageSize" - @pagination="getList" - /> + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParamsList.pageNum" + :limit.sync="queryParamsList.pageSize" + @pagination="getList" + /> </div> @@ -84,14 +94,23 @@ </template> <script> -import { chartScore, getScore, delScore, addScore, updateScore, publishScore, detailScore } from "@/api/platform/check-score"; -import { areaSelect } from '@/api/system/dept'; +import { + chartScore, + getScore, + delScore, + addScore, + updateScore, + publishScore, + detailScore +} from "@/api/platform/check-score"; +import {areaSelect} from '@/api/system/dept'; import * as echarts from 'echarts'; + let lineChart = null; let observer = null; export default { name: 'index', - dicts: ['platform_examine_category','platform_is_publish'], + dicts: ['platform_examine_category', 'platform_is_publish'], data() { return { activeIndex: '0', @@ -114,7 +133,7 @@ pageNum: 1, pageSize: 10, deptId: null, - examineTag:0 + examineTag: 0 }, tableData: [], tableLoading: false, @@ -136,26 +155,32 @@ this.date = year + '-' + month; this.queryParams.date = this.date; let examineTag = this.$route.query.examineTag; - if (examineTag === '2') { examineTag = '0' } - if (examineTag === '3') { examineTag = '1' } + if (examineTag === '2') { + examineTag = '0' + } + if (examineTag === '3') { + examineTag = '1' + } this.queryParams.examineTag = examineTag; this.queryParamsList.examineTag = examineTag; this.activeIndex = examineTag; this.areaSelect(); this.getList(this.$route.query.index); }, - computed: { - - }, + computed: {}, methods: { //鍙戝竷 handlePublish(row) { const getExamineCategoryText = category => { switch (category) { - case 1: return '瑙嗛鑰冩牳'; - case 2: return '杞﹁締鑰冩牳'; - case 3: return '浜鸿劯鑰冩牳'; - default: return '鏈煡'; + case 1: + return '瑙嗛鑰冩牳'; + case 2: + return '杞﹁締鑰冩牳'; + case 3: + return '浜鸿劯鑰冩牳'; + default: + return '鏈煡'; } }; @@ -293,7 +318,7 @@ if (!data) return this.getAllDay().map((item) => [item, []]); const tempGroup = {}; data.forEach((item) => { - let { createTime } = item; + let {createTime} = item; let tempTime = createTime.split('-'); createTime = tempTime[1] + '-' + tempTime[2]; if (!tempGroup[createTime]) { -- Gitblit v1.8.0