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/calculate/order/index.vue | 133 +++++++++++++++++++++----------------------- 1 files changed, 63 insertions(+), 70 deletions(-) diff --git a/src/views/system/calculate/order/index.vue b/src/views/system/calculate/order/index.vue index f694391..9aa6437 100644 --- a/src/views/system/calculate/order/index.vue +++ b/src/views/system/calculate/order/index.vue @@ -1,14 +1,17 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> - <el-form-item label="鑰冩牳瀵硅薄" prop="checkUnitId"> - <el-input - v-model="queryParams.checkUnitName" - placeholder="璇疯緭鍏ヨ�冩牳瀵硅薄" - clearable - @clear="handleQuery" - @keyup.enter.native="handleQuery" - /> + <el-form-item label="鑰冩牳瀵硅薄" prop="unitId"> + <el-select v-model="queryParams.unitId" @change="handleQuery" clearable placeholder="鑰冩牳瀵硅薄"> + <el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="鍙戝竷鐘舵��" prop="unitId"> + <el-select v-model="queryParams.publish" @change="handleQuery" clearable placeholder="鍙戝竷鐘舵��"> + <el-option label="鏈彂甯�" :value="0" /> + <el-option label="宸插彂甯�" :value="1" /> + </el-select> </el-form-item> <el-form-item label="鑰冩牳鏃堕棿"> <el-date-picker @@ -62,19 +65,23 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-card class="box-card" v-for="item in checkResultList" :key="item.id"> - <div slot="header" class="clearfix"> - <span>{{ item.contractName }}</span> - <el-button style="float: right; padding: 3px 6px" type="text" @click="handleDetail(item)">璇︽儏</el-button> - </div> - <div class="text item">鑰冩牳<span class="time">{{ item.unitName }}</span></div> - <div class="text item">鑰冩牳鍒嗘暟<span class="time">{{ item.score }}</span></div> - <div class="text item">鑰冩牳鏃堕棿 - <span class="time">{{ item.checkTime }}</span> - <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">纭鍙戝竷</el-button> - <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">宸插彂甯�</el-button> - </div> - </el-card> + <el-row v-loading="loading"> + <el-col :span="8" v-for="(item, index) in checkResultList" :key="index"> + <el-card class="box-card"> + <div slot="header" class="clearfix"> + <span>{{ item.contractName }}</span> + <el-button style="float: right; padding: 3px 6px" type="text" @click="handleDetail(item)">璇︽儏</el-button> + </div> + <div class="text item">鑰冩牳瀵硅薄<span class="time">{{ item.unitName }}</span></div> + <div class="text item">鑰冩牳鍒嗘暟<span class="time">{{ item.score }}</span></div> + <div class="text item">鑰冩牳鏃堕棿 + <span class="time">{{ item.checkTime }}</span> + <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">纭鍙戝竷</el-button> + <el-button size="small" round style="float: right;" disabled v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">宸插彂甯�</el-button> + </div> + </el-card> + </el-col> + </el-row> <pagination @@ -122,18 +129,24 @@ show-summary style="width: 100%"> <el-table-column - prop="name" + prop="ruleName" label="瑙勫垯鍚�" - width="180"> + :show-overflow-tooltip="true" + width="300"> </el-table-column> <el-table-column - prop="content" - label="鎸囨爣" - width="180"> + label="鎵e噺鏂瑰紡" + align="center" + prop="deductCategory" + width="180px"> + </el-table-column> + <el-table-column + prop="num" + label="鎸囨爣"> </el-table-column> <el-table-column prop="score" - label="寰楀垎"> + label="鎵e垎"> </el-table-column> </el-table> </el-dialog> @@ -151,7 +164,8 @@ </template> <script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; +import { resultRecord, listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; +import { unitSelect } from "@/api/platform/unit"; export default { name: "CheckResult", @@ -162,23 +176,7 @@ detail:{ }, - tableData: [{ - name: '瑙嗛骞冲潎鍦ㄧ嚎鐜�', - content: '97%', - score: '-5' - }, { - name: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�', - content: '5涓�', - score: '-0.5' - }, { - name: '瀛樺偍鏁呴殰', - content: '5灏忔椂', - score: '-0.3' - }, { - name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�', - content: '3涓�', - score: '-0.5' - }], + tableData: [], manualScoreOpen: false, manualScoreForm: {}, manualScoreTitle: '', @@ -213,36 +211,29 @@ form: {}, // 琛ㄥ崟鏍¢獙 rules: { - } + }, + unitList: [] }; }, created() { this.getList(); + this.getUnitSelect(); }, methods: { - frequencyFormatter(row) { - if (row.frequency === "1") { - return "鏈堝害鑰冩牳" - } - if (row.frequency === "2") { - return "瀛e害鑰冩牳" - } - }, - examineRangeFormatter(row) { - if (row.examineRange === "1") { - return "鍒嗗眬鑰冩牳" - } - if (row.examineRange === "2") { - return "甯傚眬鑰冩牳" - } + getUnitSelect() { + // 杩愮淮鍗曚綅涓嬫媺鍒楄〃 + unitSelect().then((res) => { + this.unitList = res.data; + }) }, /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ getList() { this.loading = true; if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) { - this.queryParams["start"] = this.daterangeCheckTime[0]; - this.queryParams["end"] = this.daterangeCheckTime[1]; + this.queryParams["createStartTime"] = this.daterangeCheckTime[0]; + this.queryParams["createEndTime"] = this.daterangeCheckTime[1]; } + console.log("this.queryParams", this.queryParams) listCheckResult(this.queryParams).then(response => { this.checkResultList = response.rows; this.total = response.total; @@ -293,11 +284,12 @@ this.manualScoreOpen = true; }, handleDetail(row) { + resultRecord(row.id).then(res => { + this.tableData = res.rows; + }) this.detail = row; - this.detail.carOnlineRate = '97%'; - this.detailTitle = '鑰冩牳缁撴灉'; + this.detailTitle = '鑰冩牳缁撴灉璇︽儏'; this.detailOpen = true; - }, handlePublish(row) { let text = row.publish == 1 ? '鍙栨秷鍙戝竷' : '鍙戝竷'; @@ -312,13 +304,13 @@ }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { - this.queryParams.pageNum = 1; this.getList(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { this.daterangeCheckTime = []; this.resetForm("queryForm"); + this.queryParams = {}; this.handleQuery(); }, // 澶氶�夋閫変腑鏁版嵁 @@ -375,9 +367,9 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('system/checkResult/export', { + this.download('check/result/export', { ...this.queryParams - }, `checkResult_${new Date().getTime()}.xlsx`) + }, `鍚堝悓鑰冩牳缁撴灉_${new Date().getTime()}.xlsx`) }, } @@ -404,6 +396,7 @@ clear: both } .box-card { - width: 350px; + width: 400px; + margin-bottom: 20px; } </style> -- Gitblit v1.8.0