From bce10b2db48c97a23543189368ceb6a8f3737fb3 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 03 四月 2024 14:24:46 +0800 Subject: [PATCH] 核算ui+考核结果ui --- src/views/system/calculate/rule/index.vue | 322 ++++++------- src/views/system/rule/province/index.vue | 27 - src/api/platform/calculate-rule.js | 20 src/views/system/result/city/detail.vue | 362 ++++++++------ src/api/platform/calculate-record.js | 44 + src/views/system/result/city/index.vue | 27 src/views/system/result/province/index.vue | 4 src/views/system/calculate/record/index.vue | 286 +++++++---- src/views/system/calculate/report/index.vue | 141 ++--- src/views/system/rule/city/index.vue | 96 +-- src/views/system/result/default/index.vue | 7 11 files changed, 723 insertions(+), 613 deletions(-) diff --git a/src/api/platform/calculate-record.js b/src/api/platform/calculate-record.js new file mode 100644 index 0000000..f31a1e8 --- /dev/null +++ b/src/api/platform/calculate-record.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 鏌ヨ鏍哥畻璁板綍鍒楄〃 +export function listRecord(query) { + return request({ + url: '/calculate/record/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ鏍哥畻璁板綍璇︾粏 +export function getRecord(id) { + return request({ + url: '/calculate/record/' + id, + method: 'get' + }) +} + +// 鏂板鏍哥畻璁板綍 +export function addRecord(data) { + return request({ + url: '/calculate/record', + method: 'post', + data: data + }) +} + +// 淇敼鏍哥畻璁板綍 +export function updateRecord(data) { + return request({ + url: '/calculate/record', + method: 'put', + data: data + }) +} + +// 鍒犻櫎鏍哥畻璁板綍 +export function delRecord(id) { + return request({ + url: '/calculate/record/' + id, + method: 'delete' + }) +} diff --git a/src/api/platform/calculate-rule.js b/src/api/platform/calculate-rule.js index 6e4aa59..0f5adc2 100644 --- a/src/api/platform/calculate-rule.js +++ b/src/api/platform/calculate-rule.js @@ -1,44 +1,44 @@ import request from '@/utils/request' // 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 -export function listRules(query) { +export function listRule(query) { return request({ - url: '/check/calculateRule/list', + url: '/calculate/rule/list', method: 'get', params: query }) } // 鏌ヨ鏍哥畻瑙勫垯璇︾粏 -export function getRules(id) { +export function getRule(id) { return request({ - url: '/check/calculateRule/' + id, + url: '/calculate/rule/' + id, method: 'get' }) } // 鏂板鏍哥畻瑙勫垯 -export function addRules(data) { +export function addRule(data) { return request({ - url: '/check/calculateRule', + url: '/calculate/rule', method: 'post', data: data }) } // 淇敼鏍哥畻瑙勫垯 -export function updateRules(data) { +export function updateRule(data) { return request({ - url: '/check/calculateRule', + url: '/calculate/rule', method: 'put', data: data }) } // 鍒犻櫎鏍哥畻瑙勫垯 -export function delRules(id) { +export function delRule(id) { return request({ - url: '/check/calculateRule/' + id, + url: '/calculate/rule/' + id, method: 'delete' }) } diff --git a/src/views/system/calculate/record/index.vue b/src/views/system/calculate/record/index.vue index cf3960d..bde3514 100644 --- a/src/views/system/calculate/record/index.vue +++ b/src/views/system/calculate/record/index.vue @@ -1,21 +1,25 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName"> - <el-input - v-model="queryParams.rulesName" - placeholder="璇疯緭鍏ヨ鍒欏悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> + <el-form-item label="鍗曚綅鍚�" prop="checkUnitId"> + <el-select v-model="queryParams.checkUnitId" clearable @clear="handleQuery" placeholder="璇烽�夋嫨鍗曚綅"> + <el-option + label="鎴愰兘x杩愮淮" + value="1"> + </el-option> + <el-option + label="鎴愰兘a杩愮淮" + value="2"> + </el-option> + </el-select> </el-form-item> - <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> - <el-input - v-model="queryParams.contractName" - placeholder="璇疯緭鍏ュ悎鍚屽悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> + <el-form-item label="鏍哥畻鏃ユ湡" prop="date" > + <el-date-picker clearable + v-model="queryParams.date" + type="date" + value-format="yyyy-MM-dd" + placeholder="璇烽�夋嫨鏍哥畻鏃ユ湡"> + </el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> @@ -26,33 +30,85 @@ <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button + type="primary" + plain + icon="el-icon-plus" + size="mini" + @click="handleAdd" + v-hasPermi="['system:record:add']" + >鏂板</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="success" + plain + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['system:record:edit']" + >淇敼</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="danger" + plain + icon="el-icon-delete" + size="mini" + :disabled="multiple" + @click="handleDelete" + v-hasPermi="['system:record:remove']" + >鍒犻櫎</el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" - >瀵煎嚭 - </el-button> + v-hasPermi="['system:record:export']" + >瀵煎嚭</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" :data="rulesList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center"/> - <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="rulesName"/> - <el-table-column label="鍚堝悓鍚嶇О" align="center" prop="contractName"/> - <el-table-column label="閲戦(鍏�)" align="center" prop="amount"/> - <el-table-column label="鏁伴噺" align="center" prop="num"> - 100 - </el-table-column> - <el-table-column label="鍚堣(鍏�)" align="center" prop="money"> - <template slot-scope="scope" > - {{scope.row.amount*100}} + <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="鏍哥畻璁板綍鏃ユ湡" align="center" prop="date" width="180"> + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.date, '{y}-{m}-{d}') }}</span> </template> </el-table-column> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> + <el-table-column label="鏍哥畻瑙勫垯" align="center" prop="ruleId"> <template slot-scope="scope"> - <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> + <div v-if="scope.row.ruleId == 1">鎴愰兘x杩愮淮鑰冩牳缁撴灉搴旂敤瑙勫垯</div> + </template> + </el-table-column> + <el-table-column label="鍗曚綅鍚�" align="center" prop="unitId" > + <template slot-scope="scope"> + <div v-if="scope.row.unitId == 2">鎴愰兘x杩愮淮</div> + </template> + </el-table-column> + <el-table-column label="鎬绘湇鍔¤垂" align="center" prop="totalMount" /> + <el-table-column label="鎵e噺鏈嶅姟璐�" align="center" prop="deductAmount" /> + <el-table-column label="鑰冩牳鍒嗘暟" align="center" prop="score" /> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate(scope.row)" + v-hasPermi="['system:record:edit']" + >淇敼</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handleDelete(scope.row)" + v-hasPermi="['system:record:remove']" + >鍒犻櫎</el-button> </template> </el-table-column> </el-table> @@ -65,19 +121,38 @@ @pagination="getList" /> - <!-- 娣诲姞鎴栦慨鏀规牳绠楄鍒欏璇濇 --> + <!-- 娣诲姞鎴栦慨鏀规牳绠楄褰曞璇濇 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName"> - <el-input v-model="form.rulesName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�"/> + <el-form ref="form" :model="form" :rules="rules" label-width="100px"> + <el-form-item label="鏍哥畻瀵硅薄" prop="checkUnitId"> + <el-select v-model="queryParams.checkUnitId" clearable @clear="handleQuery" placeholder="鏍哥畻瀵硅薄"> + <el-option + label="鎴愰兘x杩愮淮" + value="1"> + </el-option> + <el-option + label="鎴愰兘a杩愮淮" + value="2"> + </el-option> + </el-select> </el-form-item> - <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> - <el-input v-model="form.contractName" placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"/> + <el-form-item label="鏍哥畻璁板綍鏃ユ湡" prop="date" > + <el-date-picker clearable + v-model="form.date" + type="date" + value-format="yyyy-MM-dd" + placeholder="璇烽�夋嫨鏍哥畻璁板綍鏃ユ湡"> + </el-date-picker> </el-form-item> - <el-form-item label="閲戦" prop="amount"> - <el-input v-model="form.amount" placeholder="璇疯緭鍏ラ噾棰�"/> + <el-form-item label="鎬绘湇鍔¤垂" prop="totalMount"> + <el-input v-model="form.totalMount" placeholder="璇疯緭鍏ユ�绘湇鍔¤垂" /> </el-form-item> - + <el-form-item label="鎵e噺鏈嶅姟璐�" prop="deductAmount"> + <el-input v-model="form.deductAmount" placeholder="璇疯緭鍏ユ墸鍑忔湇鍔¤垂" /> + </el-form-item> + <el-form-item label="鑰冩牳鍒嗘暟" prop="score"> + <el-input v-model="form.score" placeholder="璇疯緭鍏ヨ�冩牳鍒嗘暟" /> + </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> @@ -88,13 +163,12 @@ </template> <script> -import { listRules, getRules, delRules, addRules, updateRules } from '@/api/platform/calculate-rule' +import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/platform/calculate-record"; export default { - name: 'Rules', + name: "Record", data() { return { - num: 100, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -107,126 +181,132 @@ showSearch: true, // 鎬绘潯鏁� total: 0, - // 鏍哥畻瑙勫垯琛ㄦ牸鏁版嵁 - rulesList: [], + // 鏍哥畻璁板綍琛ㄦ牸鏁版嵁 + recordList: [], // 寮瑰嚭灞傛爣棰� - title: '', + title: "", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, pageSize: 10, - rulesName: null, - contractName: null, - deleted: null + date: null, + ruleId: null, + unitId: null, + totalMount: null, + deductAmount: null, + score: null }, // 琛ㄥ崟鍙傛暟 form: {}, // 琛ㄥ崟鏍¢獙 - rules: {} - } + rules: { + id: [ + { required: true, message: "$comment涓嶈兘涓虹┖", trigger: "blur" } + ], + } + }; }, created() { - this.getList() + this.getList(); }, methods: { - /** 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 */ + /** 鏌ヨ鏍哥畻璁板綍鍒楄〃 */ getList() { - this.loading = true - listRules(this.queryParams).then(response => { - this.rulesList = response.rows - this.total = response.total - this.loading = false - }) + this.loading = true; + listRecord(this.queryParams).then(response => { + this.recordList = response.rows; + this.total = response.total; + this.loading = false; + }); }, // 鍙栨秷鎸夐挳 cancel() { - this.open = false - this.reset() + this.open = false; + this.reset(); }, // 琛ㄥ崟閲嶇疆 reset() { this.form = { id: null, - rulesName: null, - contractName: null, - amount: null, - createTime: null, - updateTime: null, - deleted: null - } - this.resetForm('form') + date: null, + ruleId: null, + unitId: null, + totalMount: null, + deductAmount: null, + score: null + }; + this.resetForm("form"); }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { - this.queryParams.pageNum = 1 - this.getList() + this.queryParams.pageNum = 1; + this.getList(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { - this.resetForm('queryForm') - this.handleQuery() + this.resetForm("queryForm"); + this.handleQuery(); }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) - this.single = selection.length !== 1 + this.single = selection.length!==1 this.multiple = !selection.length }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { - this.reset() - this.open = true - this.title = '娣诲姞鏍哥畻瑙勫垯' + this.reset(); + this.open = true; + this.title = "娣诲姞鏍哥畻璁板綍"; }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { - this.reset() + this.reset(); const id = row.id || this.ids - getRules(id).then(response => { - this.form = response.data - this.open = true - this.title = '淇敼鏍哥畻瑙勫垯' - }) + getRecord(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼鏍哥畻璁板綍"; + }); }, /** 鎻愪氦鎸夐挳 */ submitForm() { - this.$refs['form'].validate(valid => { + this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - updateRules(this.form).then(response => { - this.$modal.msgSuccess('淇敼鎴愬姛') - this.open = false - this.getList() - }) + updateRecord(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); } else { - addRules(this.form).then(response => { - this.$modal.msgSuccess('鏂板鎴愬姛') - this.open = false - this.getList() - }) + addRecord(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); } } - }) + }); }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { - const ids = row.id || this.ids - this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delRules(ids) + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻璁板綍缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return delRecord(ids); }).then(() => { - this.getList() - this.$modal.msgSuccess('鍒犻櫎鎴愬姛') - }).catch(() => { - }) + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('platform/rules/export', { + this.download('system/record/export', { ...this.queryParams - }, `rules_${new Date().getTime()}.xlsx`) + }, `record_${new Date().getTime()}.xlsx`) } } -} +}; </script> diff --git a/src/views/system/calculate/report/index.vue b/src/views/system/calculate/report/index.vue index ba3f141..6ed15a4 100644 --- a/src/views/system/calculate/report/index.vue +++ b/src/views/system/calculate/report/index.vue @@ -63,48 +63,21 @@ <el-card class="box-card" v-for="(item) in checkResultList"> <div slot="header" class="clearfix"> - <span>{{ item.checkUnitName }}</span> + <span>{{ checkUnitName }}</span> <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">璇︽儏</el-button> </div> - <div class="text item">鍚堝悓<span class="time">{{ item.checkUnitName }}</span></div> - <div class="text item">鏍哥畻閲戦<span class="time">{{ "40090" }}</span></div> - <div class="text item">鑰冩牳鍒嗘暟<span class="time">{{ item.checkScore }}</span></div> - <div class="text item">鏍哥畻鏃堕棿 + <div class="text item">鍚堝悓<span class="time">{{ checkUnitName }}</span></div> + <div class="text item">鎬婚噾棰�<span class="time">{{ "1000鍏�" }}</span></div> + <div class="text item">鎵e噺閲戦<span class="time">{{ "10鍏�" }}</span></div> + <div class="text item">鍓╀綑閲戦<span class="time">{{ "990鍏�" }}</span></div> + <div class="text item">鏈�鏂版牳绠楁椂闂� <span class="time">{{ item.checkTime }}</span> </div> + <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">纭鍙戝竷</el-button> + <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">宸插彂甯�</el-button> </el-card> - <!-- <el-table v-loading="loading" :data="checkResultList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="checkUnitName" /> - <el-table-column label="鑰冩牳" align="center" prop="examineName" /> - <el-table-column label="鑰冩牳鑼冨洿":formatter="examineRangeFormatter" align="center" prop="examineRange" /> - <el-table-column label="鑰冩牳棰戠巼" :formatter="frequencyFormatter" align="center" prop="frequency" /> - <el-table-column label="鑰冩牳鍒嗘暟" falign="center" prop="checkScore" /> - <el-table-column label="鑰冩牳鏃堕棿" align="center" prop="checkTime" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-view" - @click="handleDetail(scope.row)" - >璇︽儏</el-button> - <el-button - type="text" - size="mini" - icon="el-icon-edit" - @click="handleSetManualScore(scope.row)" - >浜哄伐鎵撳垎</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> + <pagination v-show="total>0" @@ -112,15 +85,7 @@ :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" - /> --> - - <el-dialog :title="manualScoreTitle" :visible.sync="manualScoreOpen" width="500px" append-to-body> - <el-input v-model="manualScoreForm.manualScore" type="number" placeholder="璇蜂负璇ュ崟浣嶆墦鍒�"/> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitManualScore">纭� 瀹�</el-button> - <el-button @click="cancelManualScore">鍙� 娑�</el-button> - </div> - </el-dialog> + /> <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="700px" append-to-body> <el-descriptions class="margin-top" :column="3" border> @@ -132,37 +97,35 @@ <i class="el-icon-user"></i> 鏍哥畻瀵硅薄 </template> - {{detail.checkUnitName}} + {{checkUnitName}} </el-descriptions-item> <el-descriptions-item> <template slot="label"> <i class="el-icon-s-management"></i> 鍚堝悓鍚嶇О </template> - {{detail.checkUnitName}} + {{checkUnitName}} </el-descriptions-item> </el-descriptions> <el-table :data="tableData" show-summary + :summary-method="getSummaries" style="width: 100%"> <el-table-column - prop="name" - label="瑙勫垯鍚�" + prop="time" + label="鏍哥畻鏃ユ湡" width="180"> </el-table-column> <el-table-column - prop="amount" - label="鏁伴噺" - width="180"> + prop="score" + label="鑰冩牳鍒嗘暟" + width="180" + doNotSum> </el-table-column> <el-table-column prop="money" - label="閲戦(鍏�)"> - </el-table-column> - <el-table-column - prop="total" - label="鍚堣(鍏�)"> + label="鎵e噺閲戦(鍏�)"> </el-table-column> </el-table> </el-dialog> @@ -191,27 +154,16 @@ detail:{ }, + checkUnitName:'鎴愰兘x杩愮淮', tableData: [{ - name: '瀛樺偍鏁呴殰', - amount: '100', - money: '100', - total: '10000' + time: '2024-03-03', + score: '94', + money: '10', }, { - name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�', - amount: '100', - money: '100.45', - total: '10045' - }, { - name: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�', - amount: '100', - money: '100', - total: '10000' - }, { - name: '瑙嗛杩愯鐜�(96%)', - amount: '100', - money: '100.45', - total: '10045' - }], + time: '2024-04-03', + score: '95', + money: '0', + }, ], manualScoreOpen: false, manualScoreForm: {}, manualScoreTitle: '', @@ -277,7 +229,7 @@ this.queryParams["end"] = this.daterangeCheckTime[1]; } listCheckResult(this.queryParams).then(response => { - this.checkResultList = response.data; + this.checkResultList = response.rows; this.total = response.total; this.loading = false; }); @@ -318,12 +270,6 @@ this.cancelManualScore(); this.getList(); }) - }, - handleSetManualScore(row) { - this.manualScoreForm.id = row.id; - this.manualScoreForm.manualScore = parseInt(row.manualScore); - this.manualScoreTitle = row.checkUnitName + '浜哄伐鎵撳垎' - this.manualScoreOpen = true; }, handleDetail(row) { this.detail = row; @@ -411,6 +357,35 @@ this.download('system/checkResult/export', { ...this.queryParams }, `checkResult_${new Date().getTime()}.xlsx`) + }, + getSummaries(param) { + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '鍚堣'; + return; + } + const values = data.map(item => Number(item[column.property])); + if (!values.every(value => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + sums[index] += ' 鍏�'; + if (column.property === 'score') { + sums[index] = '-'; // 鎴栬�呭叾浠栦綘鎯宠鏄剧ず鐨勫唴瀹� + } + } else { + sums[index] = 'N/A'; + } + }); + + return sums; } } }; diff --git a/src/views/system/calculate/rule/index.vue b/src/views/system/calculate/rule/index.vue index fd45f98..3054654 100644 --- a/src/views/system/calculate/rule/index.vue +++ b/src/views/system/calculate/rule/index.vue @@ -1,36 +1,5 @@ <template> <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName"> - <el-input - v-model="queryParams.rulesName" - placeholder="璇疯緭鍏ヨ鍒欏悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> - <el-input - v-model="queryParams.contractName" - placeholder="璇疯緭鍏ュ悎鍚屽悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="閫昏緫鍒犻櫎" prop="deleted"> - <el-input - v-model="queryParams.deleted" - placeholder="璇疯緭鍏ラ�昏緫鍒犻櫎" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button @@ -39,54 +8,37 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - >鏂板 - </el-button> + v-hasPermi="['system:rule:add']" + >鏂板</el-button> </el-col> <el-col :span="1.5"> <el-button - type="success" + type="info" plain - icon="el-icon-edit" + icon="el-icon-sort" size="mini" - :disabled="single" - @click="handleUpdate" - >淇敼 - </el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎 - </el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - >瀵煎嚭 - </el-button> + @click="toggleExpandAll" + >灞曞紑/鎶樺彔</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" :data="rulesList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center"/> - <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="rulesName"/> - <el-table-column label="鍚堝悓鍚嶇О" align="center" prop="contractName"/> - <el-table-column label="閲戦" align="center" prop="amount"/> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> + <el-table + v-if="refreshTable" + v-loading="loading" + :data="ruleList" + row-key="id" + :default-expand-all="isExpandAll" + :tree-props="{children: 'children', hasChildren: 'hasChildren'}" + > + <el-table-column label="瑙勫垯鍚嶇О" prop="name" /> + <el-table-column label="鍗曚綅id" align="center" prop="unitId" > <template slot-scope="scope"> - <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> + <div v-if="scope.row.unitId == 2">鎴愰兘x杩愮淮</div> </template> </el-table-column> + <el-table-column label="鎵e垎绯绘暟" align="center" prop="value" /> + <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="description" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -94,38 +46,46 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - >淇敼 - </el-button> + v-hasPermi="['system:rule:edit']" + >淇敼</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-plus" + @click="handleAdd(scope.row)" + v-hasPermi="['system:rule:add']" + >鏂板</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" - >鍒犻櫎 - </el-button> + v-hasPermi="['system:rule:remove']" + >鍒犻櫎</el-button> </template> </el-table-column> </el-table> - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> - <!-- 娣诲姞鎴栦慨鏀规牳绠楄鍒欏璇濇 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName"> - <el-input v-model="form.rulesName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�"/> + <el-form-item label="瑙勫垯鍚�" prop="name"> + <el-input v-model="form.name" placeholder="璇疯緭鍏�" /> </el-form-item> - <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> - <el-input v-model="form.contractName" placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"/> + <el-form-item label="妯℃澘鍚�" prop="templateId"> + <el-input v-model="form.templateId" placeholder="璇疯緭鍏�" /> </el-form-item> - <el-form-item label="閲戦" prop="amount"> - <el-input v-model="form.amount" placeholder="璇疯緭鍏ラ噾棰�"/> + <el-form-item label="鐖惰鍒�" prop="parentId"> + <treeselect v-model="form.parentId" :options="ruleOptions" :normalizer="normalizer" placeholder="璇烽�夋嫨" /> + </el-form-item> + <el-form-item label="鑰冩牳瀵硅薄" prop="unitId"> + <el-input v-model="form.unitId" placeholder="璇疯緭鍏ュ崟浣峣d" /> + </el-form-item> + <el-form-item label="鎵e垎绯绘暟" prop="value"> + <el-input v-model="form.value" placeholder="璇疯緭鍏ユ墸鍒嗙郴鏁�" /> + </el-form-item> + <el-form-item label="瑙勫垯鎻忚堪" prop="description"> + <el-input v-model="form.description" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -137,144 +97,170 @@ </template> <script> -import { listRules, getRules, delRules, addRules, updateRules } from '@/api/platform/calculate-rule' +import { listRule, getRule, delRule, addRule, updateRule } from "@/api/platform/calculate-rule"; +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { - name: 'Rules', + name: "Rule", + components: { + Treeselect + }, data() { return { // 閬僵灞� loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, // 鏄剧ず鎼滅储鏉′欢 showSearch: true, - // 鎬绘潯鏁� - total: 0, // 鏍哥畻瑙勫垯琛ㄦ牸鏁版嵁 - rulesList: [], + ruleList: [], + // 鏍哥畻瑙勫垯鏍戦�夐」 + ruleOptions: [], // 寮瑰嚭灞傛爣棰� - title: '', + title: "", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, + // 鏄惁灞曞紑锛岄粯璁ゅ叏閮ㄥ睍寮� + isExpandAll: true, + // 閲嶆柊娓叉煋琛ㄦ牸鐘舵�� + refreshTable: true, // 鏌ヨ鍙傛暟 queryParams: { - pageNum: 1, - pageSize: 10, - rulesName: null, - contractName: null, - deleted: null + name: null, + templateId: null, + parentId: null, + unitId: null, + value: null, + description: null }, // 琛ㄥ崟鍙傛暟 form: {}, // 琛ㄥ崟鏍¢獙 - rules: {} - } + rules: { + } + }; }, created() { - this.getList() + this.getList(); }, methods: { /** 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 */ getList() { - this.loading = true - listRules(this.queryParams).then(response => { - this.rulesList = response.rows - this.total = response.total - this.loading = false - }) + this.loading = true; + listRule(this.queryParams).then(response => { + this.ruleList = this.handleTree(response.data, "id", "parentId"); + this.loading = false; + }); + }, + /** 杞崲鏍哥畻瑙勫垯鏁版嵁缁撴瀯 */ + normalizer(node) { + if (node.children && !node.children.length) { + delete node.children; + } + return { + id: node.id, + label: node.name, + children: node.children + }; + }, + /** 鏌ヨ鏍哥畻瑙勫垯涓嬫媺鏍戠粨鏋� */ + getTreeselect() { + listRule().then(response => { + this.ruleOptions = []; + const data = { id: 0, name: '椤剁骇鑺傜偣', children: [] }; + data.children = this.handleTree(response.data, "id", "parentId"); + this.ruleOptions.push(data); + }); }, // 鍙栨秷鎸夐挳 cancel() { - this.open = false - this.reset() + this.open = false; + this.reset(); }, // 琛ㄥ崟閲嶇疆 reset() { this.form = { id: null, - rulesName: null, - contractName: null, - amount: null, - createTime: null, - updateTime: null, - deleted: null - } - this.resetForm('form') + name: null, + templateId: null, + parentId: null, + unitId: null, + value: null, + description: null + }; + this.resetForm("form"); }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { - this.queryParams.pageNum = 1 - this.getList() + this.getList(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { - this.resetForm('queryForm') - this.handleQuery() - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length !== 1 - this.multiple = !selection.length + this.resetForm("queryForm"); + this.handleQuery(); }, /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset() - this.open = true - this.title = '娣诲姞鏍哥畻瑙勫垯' + handleAdd(row) { + this.reset(); + this.getTreeselect(); + if (row != null && row.id) { + this.form.parentId = row.id; + } else { + this.form.parentId = 0; + } + this.open = true; + this.title = "娣诲姞鏍哥畻瑙勫垯"; + }, + /** 灞曞紑/鎶樺彔鎿嶄綔 */ + toggleExpandAll() { + this.refreshTable = false; + this.isExpandAll = !this.isExpandAll; + this.$nextTick(() => { + this.refreshTable = true; + }); }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { - this.reset() - const id = row.id || this.ids - getRules(id).then(response => { - this.form = response.data - this.open = true - this.title = '淇敼鏍哥畻瑙勫垯' - }) + this.reset(); + this.getTreeselect(); + if (row != null) { + this.form.parentId = row.id; + } + getRule(row.id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼鏍哥畻瑙勫垯"; + }); }, /** 鎻愪氦鎸夐挳 */ submitForm() { - this.$refs['form'].validate(valid => { + this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - updateRules(this.form).then(response => { - this.$modal.msgSuccess('淇敼鎴愬姛') - this.open = false - this.getList() - }) + updateRule(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); } else { - addRules(this.form).then(response => { - this.$modal.msgSuccess('鏂板鎴愬姛') - this.open = false - this.getList() - }) + addRule(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); } } - }) + }); }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { - const ids = row.id || this.ids - this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delRules(ids) + this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻瑙勫垯缂栧彿涓�"' + row.id + '"鐨勬暟鎹」锛�').then(function() { + return delRule(row.id); }).then(() => { - this.getList() - this.$modal.msgSuccess('鍒犻櫎鎴愬姛') - }).catch(() => { - }) - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('platform/rules/export', { - ...this.queryParams - }, `rules_${new Date().getTime()}.xlsx`) + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); } } -} +}; </script> diff --git a/src/views/system/result/city/detail.vue b/src/views/system/result/city/detail.vue index 19a2a07..3eb00c4 100644 --- a/src/views/system/result/city/detail.vue +++ b/src/views/system/result/city/detail.vue @@ -5,6 +5,39 @@ <el-container> <el-main style="padding-top: 0px"> <h2>鑰冩牳鍒嗘暟鏄庣粏</h2> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form-item label="鑰冩牳瀵硅薄" prop="ruleName"> + <el-select + v-model="queryParams.address" + placeholder="璇烽�夋嫨鍖哄煙" + clearable + > + <el-option label="鑷础甯�" value="鑷础甯�"/> + <el-option label="娌挎哗鍖�" value="娌挎哗鍖�"/> + <el-option label="澶у畨鍖�" value="澶у畨鍖�"/> + <el-option label="璐′簳鍖�" value="璐′簳鍖�"/> + <el-option label="鑷祦浜曞尯" value="鑷祦浜曞尯"/> + <el-option label="楂樻柊鍖�" value="楂樻柊鍖�"/> + <el-option label="鑽e幙" value="鑽e幙"/> + <el-option label="瀵岄『鍘�" value="瀵岄『鍘�"/> + </el-select> + </el-form-item> + <el-form-item label="鑰冩牳鏃ユ湡" prop="createTime"> + <div class="block"> + <el-date-picker + v-model="value2" + align="right" + type="date" + placeholder="閫夋嫨鏃ユ湡" + :picker-options="pickerOptions"> + </el-date-picker> + </div> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button @@ -31,13 +64,12 @@ <el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="鑰冩牳鍚�" align="center" prop="examineName" /> - <el-table-column label="鑰冩牳绫诲瀷" align="center" prop="examineCategory"> - <template slot-scope="scope"> - <div v-if="scope.row.examineCategory == 1">鐪佸巺鑰冩牳</div> - <div v-else-if="scope.row.examineCategory == 2">甯傚眬鑰冩牳</div> - <div v-else-if="scope.row.examineCategory == 3">鍚堝悓鑰冩牳</div> - </template> + <el-table-column label="鑰冩牳瑙勫垯" align="center" prop="ruleId"> + <template slot-scope="scope"> + <div v-if="scope.row.ruleId == 5">涓�鏈轰竴妗f敞鍐岀巼</div> + <div v-else-if="scope.row.ruleId == 4">涓�鏈轰竴妗e悎鏍肩巼</div> + <div v-else-if="scope.row.ruleId == 3">骞冲彴鍦ㄧ嚎鐜�</div> + </template> </el-table-column> <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="unitName"> <template slot-scope="scope"> @@ -46,17 +78,7 @@ </template> </el-table-column> <el-table-column label="鍒嗗��" align="center" prop="score" /> - <el-table-column label="鑰冩牳瑙勫垯" align="center" prop="ruleCategory"> - <template slot-scope="scope"> - <div v-if="scope.row.ruleCategory == 1">瑙嗛鍦ㄧ嚎鐜�</div> - <div v-else-if="scope.row.ruleCategory == 2">瀛樺偍鏁呴殰</div> - <div v-else-if="scope.row.ruleCategory == 3">瑙嗗浘搴撳鎺ョǔ瀹氭��</div> - <div v-else-if="scope.row.ruleCategory == 4">涓�鏈轰竴妗�24灏忔椂鏈慨澶�</div> - <div v-else-if="scope.row.ruleCategory == 5">鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�</div> - </template> - </el-table-column> - <el-table-column label="鍒涘缓浜�" align="center" prop="createBy" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" /> + <el-table-column label="鑰冩牳鏃堕棿" align="center" prop="createTime" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -74,7 +96,13 @@ </template> </el-table-column> </el-table> - + <pagination + v-show="total>0" + :total="scoreTotal" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getRuleList" + /> </el-main> </el-container> <el-container> @@ -101,39 +129,13 @@ @click="handleDelete" >鍒犻櫎</el-button> </el-col> - <!-- <el-col :span="1.5">--> - <!-- <el-button--> - <!-- type="warning"--> - <!-- plain--> - <!-- icon="el-icon-download"--> - <!-- size="mini"--> - <!-- @click="handleExport"--> - <!-- v-hasPermi="['system:checkRule:export']"--> - <!-- >瀵煎嚭</el-button>--> - <!-- </el-col>--> <right-toolbar :showSearch.sync="showSearch" @queryTable="getRuleList"></right-toolbar> </el-row> <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" /> - <el-table-column label="杩愮淮绫诲埆" align="center" prop="category"> - <template slot-scope="scope"> - <div v-if="scope.row.category === 1">瑙嗛鐩戞帶</div> - <div v-else-if="scope.row.category === 2">杞﹁締璇嗗埆</div> - <div v-else-if="scope.row.category === 3">浜鸿劯璇嗗埆</div> - </template> - </el-table-column> - <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="ruleDetail" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" /> - <el-table-column label="瀹℃牳鐘舵��" align="center" prop="auditState"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_audit_state" :value="scope.row.auditState"/> - </template> - </el-table-column> - <el-table-column label="瀹℃牳浜�" align="center" prop="auditUser" /> - <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="auditTime" /> - <el-table-column label="瀹℃牳鎰忚" align="center" prop="auditDescription" /> + <el-table-column label="瑙勫垯鏉冮噸" align="center" prop="ruleWeight" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -165,113 +167,78 @@ <el-container> <el-main> <h2>鑰冩牳鎴愮哗</h2> - <el-collapse v-model="activeNames" @change="handleChange" > - <el-collapse-item name="1"> - <template slot="title"> - <div style="width: 10%" >鑷祦浜曞尯</div><div style="margin-left: 75%">寰楀垎:0.97</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item name="2"> - <template slot="title"> - <div style="width: 10%">璐′簳鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="澶у畨鍖�" name="3"> - <template slot="title"> - <div style="width: 10%">澶у畨鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="娌挎哗鍖�" name="4"> - <template slot="title"> - <div style="width: 10%">娌挎哗鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="鑽e幙" name="5"> - <template slot="title"> - <div style="width: 10%">鑽e幙</div><div style="margin-left: 75%">寰楀垎:0.93</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="瀵岄『鍖�" name="6"> - <template slot="title"> - <div style="width: 10%">瀵岄『鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="楂樻柊鍖�" name="7"> - <template slot="title"> - <div style="width: 10%">楂樻柊鍖�</div><div style="margin-left: 75%;">寰楀垎:0.96</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - </el-collapse> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form-item label="鑰冩牳瀵硅薄" prop="ruleName"> + <el-select + v-model="queryParams.address" + placeholder="璇烽�夋嫨鍖哄煙" + clearable + > + <el-option label="鑷础甯�" value="鑷础甯�"/> + <el-option label="娌挎哗鍖�" value="娌挎哗鍖�"/> + <el-option label="澶у畨鍖�" value="澶у畨鍖�"/> + <el-option label="璐′簳鍖�" value="璐′簳鍖�"/> + <el-option label="鑷祦浜曞尯" value="鑷祦浜曞尯"/> + <el-option label="楂樻柊鍖�" value="楂樻柊鍖�"/> + <el-option label="鑽e幙" value="鑽e幙"/> + <el-option label="瀵岄『鍘�" value="瀵岄『鍘�"/> + </el-select> + </el-form-item> + <el-form-item label="鑰冩牳鏃ユ湡" prop="createTime"> + <div class="block"> + <el-date-picker + v-model="value2" + align="right" + type="date" + placeholder="閫夋嫨鏃ユ湡" + :picker-options="pickerOptions"> + </el-date-picker> + </div> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> + + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + @click="handleExport" + v-hasPermi="['system:checkRule:export']" + >瀵煎嚭</el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getRuleList"></right-toolbar> + </el-row> + <el-table v-loading="loading" :data="checkResultList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="鑰冩牳鏃ユ湡" align="center" prop="date" width="120px"/> + <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="target" width="120px"/> + <el-table-column label="骞冲彴鍦ㄧ嚎鐜�(鏉冮噸锛�0.5)" align="center" prop="platformOnline" width="120px"/> + <el-table-column label="涓�鏈轰竴妗e悎鏍肩巼(鏉冮噸锛�0.5)" align="center" prop="monitorQualification" width="120px"/> + <el-table-column label="涓�鏈轰竴妗f敞鍐岀巼(鏉冮噸锛�0.5)" align="center" prop="monitorRegistration" width="120px"/> + <el-table-column label="妗f鑰冩牳姣�(鏉冮噸锛�0.5)" align="center" prop="archivesRate" width="120px"/> + <el-table-column label="鐐逛綅鍦ㄧ嚎鐜�(鏉冮噸锛�1)" align="center" prop="siteOnline" width="120px"/> + <el-table-column label="褰曞儚鍙敤鐜�(鏉冮噸锛�1)" align="center" prop="videoAvailable" width="120px"/> + <el-table-column label="鏍囨敞姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="annotationAccuracy" width="120px"/> + <el-table-column label="鏍℃椂姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="timingAccuracy" width="120px"/> + <el-table-column label="閲嶇偣鐐逛綅鍦ㄧ嚎鐜�(鏉冮噸锛�0.5)" align="center" prop="keySiteOnline" width="120px"/> + <el-table-column label="閲嶇偣鐐逛綅褰曞儚鍙敤鐜�(鏉冮噸锛�0.5)" align="center" prop="keyVideoAvailable" width="120px"/> + <el-table-column label="閲嶇偣鐐逛綅鏍囨敞姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="keyAnnotationAccuracy" width="120px"/> + <el-table-column label="閲嶇偣鐐逛綅鎸夋椂姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="keyTimingAccuracy" width="120px"/> + <el-table-column label="閲嶇偣鎸囨尌鍥惧儚鍏畨閮ㄥ贰妫�缁撴灉(鏉冮噸锛�0.2)" align="center" prop="keyCommandImageInspection" width="120px"/> + <el-table-column label="閲嶇偣鎸囨尌鍥惧儚鐩綍鏍�(鏉冮噸锛�0.8)" align="center" prop="keyCommandImageDirectoryTree" width="120px"/> + <el-table-column label="鍦ㄧ嚎妫�鏌ュ钩鍙伴儴缃插強杩愯鐜�(鏉冮噸锛�0.075)" align="center" prop="onlineInspectionPlatform" width="120px"/> + <el-table-column label="瑙嗛浼犺緭缃戣祫浜у噯纭巼(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionAssetsAccuracy" width="120px"/> + <el-table-column label="瑙嗛浼犺緭缃戣祫浜у急鍙d护寰楀垎姣斾緥(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionAssetsWeakPasswordScore" width="120px"/> + <el-table-column label="瑙嗛浼犺緭缃戝嵄闄╄祫浜у緱鍒嗘瘮閲�(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionDangerousAssetsScore" width="120px"/> + <el-table-column label="瑙嗛浼犺緭缃戣竟鐣屽畬鏁存�ф娴嬫墸鍒嗛」(鏉冮噸锛�0.2)" align="center" prop="videoTransmissionBoundaryIntegrityDetection" width="120px"/> + <el-table-column label="鏈堣繍琛岀巼" align="center" prop="operatingRate"/> + </el-table> </el-main> </el-container> @@ -481,7 +448,58 @@ // 鎬绘潯鏁� total: 0, // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁 - checkResultList: [], + checkResultList: [ + { + date: '2024-04-02', + target: '鑷祦浜曞尯', + platformOnline: '97%', + monitorQualification: '97%', + monitorRegistration: '97%', + archivesRate: '97%', + siteOnline: '97%', + videoAvailable: '97%', + annotationAccuracy: '97%', + timingAccuracy: '97%', + keySiteOnline: '97%', + keyVideoAvailable: '97%', + keyAnnotationAccuracy: '97%', + keyTimingAccuracy: '97%', + keyCommandImageInspection: '97%', + keyCommandImageDirectoryTree: '97%', + onlineInspectionPlatform: '97%', + videoTransmissionAssetsAccuracy: '97%', + videoTransmissionAssetsWeakPasswordScore: '97%', + videoTransmissionDangerousAssetsScore: '97%', + videoTransmissionBoundaryIntegrityDetection: '97%', + operatingRate: '97%', + }, + { + date: '2024-04-03', + target: '鑷祦浜曞尯', + platformOnline: '97%', + monitorQualification: '97%', + monitorRegistration: '97%', + archivesRate: '97%', + siteOnline: '97%', + videoAvailable: '97%', + annotationAccuracy: '97%', + timingAccuracy: '97%', + keySiteOnline: '97%', + keyVideoAvailable: '97%', + keyAnnotationAccuracy: '97%', + keyTimingAccuracy: '97%', + keyCommandImageInspection: '97%', + keyCommandImageDirectoryTree: '97%', + onlineInspectionPlatform: '97%', + videoTransmissionAssetsAccuracy: '97%', + videoTransmissionAssetsWeakPasswordScore: '97%', + videoTransmissionDangerousAssetsScore: '97%', + videoTransmissionBoundaryIntegrityDetection: '97%', + operatingRate: '97%', + } + + ], + scoreTotal: 3, // 寮瑰嚭灞傛爣棰� title: "", // 鏄惁鏄剧ず寮瑰嚭灞� @@ -490,13 +508,18 @@ ruleDetailOpen: false, // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 daterangeCheckTime: [], + // 琛ㄥ崟鍙傛暟 form: {}, scoreForm: {}, ruleForm: {}, jsonRule: {}, // 鑰冩牳瑙勫垯鍒楄〃 - ruleList: [], + ruleList: [ + {ruleName: '骞冲彴鍦ㄧ嚎鐜�',ruleWeight: 0.5}, + {ruleName: '涓�鏈轰竴妗e悎鏍肩巼',ruleWeight: 0.5}, + {ruleName: '涓�鏈轰竴妗e湪绾跨巼',ruleWeight: 0.5}, + ], // 鑰冩牳璁″垎琛ㄦ牸鏁版嵁 scoreList: [], //杩濈害瑙勫垯璇锋眰鍙傛暟 @@ -513,6 +536,33 @@ pageSize: 10, examineCategory: 2, }, + pickerOptions: { + disabledDate(time) { + return time.getTime() > Date.now(); + }, + shortcuts: [{ + text: '浠婂ぉ', + onClick(picker) { + picker.$emit('pick', new Date()); + } + }, { + text: '鏄ㄥぉ', + onClick(picker) { + const date = new Date(); + date.setTime(date.getTime() - 3600 * 1000 * 24); + picker.$emit('pick', date); + } + }, { + text: '涓�鍛ㄥ墠', + onClick(picker) { + const date = new Date(); + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit('pick', date); + } + }] + }, + value1: '', + value2: '', // 琛ㄥ崟鏍¢獙 rules: { } @@ -525,7 +575,7 @@ console.log(this.$route.query.detail,"detail------------") } // 鑰冩牳瑙勫垯鍒楄〃 - this.getRuleList(); + // this.getRuleList(); // 鑰冩牳绉垎鍒楄〃 this.getScoreList(); // this.selectUnit(); diff --git a/src/views/system/result/city/index.vue b/src/views/system/result/city/index.vue index 3d41c4c..8a934dc 100644 --- a/src/views/system/result/city/index.vue +++ b/src/views/system/result/city/index.vue @@ -82,20 +82,29 @@ <div class="text item">鑰冩牳鏍囩<span class="time">{{ "鍥涘尯澶╃綉浜屾湡" }}</span></div> <div class="text item">鑰冩牳鑼冨洿<span class="time">{{ "甯傚尯鑰冩牳" }}</span></div> <div class="text item">鑰冩牳棰戠巼<span class="time">{{ "瀛e害" }}</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:city:publish']">纭鍙戝竷</el-button> - <el-button size="small" round style="float: right;" v-show="item.publish == 1" disabled="true" v-hasPermi="['result:city:publish']">宸插彂甯�</el-button> - </div> + <el-tooltip effect="dark" placement="right-start"> + <div slot="content"> + 瀵岄『鍘匡細6.5 + <br/>娌挎哗鍖猴細6.5 + <br/>璐′簳鍖猴細6.5 + <br/>楂樻柊鍖猴細6.5 + <br/>澶у畨鍖猴細6.5 + <br/>鑷祦浜曞尯锛�6.5 + <br/>鑽e幙锛�6.5 + </div> + <span class="text item">{{ "鑰冩牳鎴愮哗" }}</span> + </el-tooltip> + <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">纭鍙戝竷</el-button> + <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">宸插彂甯�</el-button> </el-card> - <!-- <pagination + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" - /> --> + /> <el-dialog :title="detailName" :visible.sync="detail" width="800px" append-to-body> <el-form label-position="left" inline class="table-expand"> @@ -219,6 +228,7 @@ </div> </el-dialog> </div> + </template> <script> @@ -303,7 +313,7 @@ this.queryParams["end"] = this.daterangeCheckTime[1]; } listCheckResult(this.queryParams).then(response => { - this.checkResultList = response.data; + this.checkResultList = response.rows; this.total = response.total; this.loading = false; }); @@ -456,6 +466,7 @@ .item { margin-bottom: 18px; } + .clearfix:before, .clearfix:after { display: table; diff --git a/src/views/system/result/default/index.vue b/src/views/system/result/default/index.vue index 0fdde76..cb2b248 100644 --- a/src/views/system/result/default/index.vue +++ b/src/views/system/result/default/index.vue @@ -90,6 +90,13 @@ </div> </el-card> + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> <el-dialog :title="manualScoreTitle" :visible.sync="manualScoreOpen" width="500px" append-to-body> <el-input v-model="manualScoreForm.manualScore" type="number" placeholder="璇蜂负璇ュ崟浣嶆墦鍒�"/> <div slot="footer" class="dialog-footer"> diff --git a/src/views/system/result/province/index.vue b/src/views/system/result/province/index.vue index 26b7b80..4b58e48 100644 --- a/src/views/system/result/province/index.vue +++ b/src/views/system/result/province/index.vue @@ -89,13 +89,13 @@ </div> </el-card> - <!-- <pagination + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" - /> --> + /> <el-dialog :title="detailName" :visible.sync="detail" width="800px" append-to-body> <el-form label-position="left" inline class="table-expand"> diff --git a/src/views/system/rule/city/index.vue b/src/views/system/rule/city/index.vue index 155408c..a12a111 100644 --- a/src/views/system/rule/city/index.vue +++ b/src/views/system/rule/city/index.vue @@ -65,30 +65,22 @@ <el-table v-loading="loading" :data="checkRuleList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" /> - <el-table-column label="杩愮淮绫诲埆" align="center" prop="examineCategory"> + <el-table-column label="鑰冩牳绫诲瀷" align="center" prop="examineCategory"> <template slot-scope="scope"> - <div v-if="scope.row.examineCategory === 1">鐪佸巺鑰冩牳</div> - <div v-else-if="scope.row.examineCategory === 2">鍖哄幙鑰冩牳</div> - <div v-else-if="scope.row.examineCategory === 3">鍏徃鑰冩牳</div> + <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory"/> </template> </el-table-column> - <el-table-column label="杩愮淮绫诲埆" align="center" prop="category"> + <el-table-column label="瑙勫垯绫诲瀷" align="center" prop="ruleCategory"> <template slot-scope="scope"> - <div v-if="scope.row.category === 1">瑙嗛鐩戞帶</div> - <div v-else-if="scope.row.category === 2">杞﹁締璇嗗埆</div> - <div v-else-if="scope.row.category === 3">浜鸿劯璇嗗埆</div> + <dict-tag :options="dict.type.platform_rule_category" :value="scope.row.ruleCategory"/> </template> </el-table-column> - <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="ruleDetail" /> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" /> <el-table-column label="瀹℃牳鐘舵��" align="center" prop="auditState"> <template slot-scope="scope"> <dict-tag :options="dict.type.platform_audit_state" :value="scope.row.auditState"/> </template> </el-table-column> - <el-table-column label="瀹℃牳浜�" align="center" prop="auditUser" /> - <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="auditTime" /> - <el-table-column label="瀹℃牳鎰忚" align="center" prop="auditDescription" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -129,26 +121,24 @@ <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> </el-form-item> <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> - <el-select v-model="form.examineCategory" placeholder="瑙勫垯绫诲瀷"> - <el-option - v-for="item in examineList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> + <el-radio-group v-model="form.examineCategory" placeholder="鑰冩牳绫诲瀷"> + <el-radio + v-for="dict in dict.type.plateform_examine_category" + :key="dict.value" + :value="dict.value"> + {{dict.label}}</el-radio> + </el-radio-group> </el-form-item> <el-form-item label="瑙勫垯绫诲瀷" prop="category"> - <el-select v-model="form.category" placeholder="瑙勫垯绫诲瀷"> - <el-option - v-for="item in categoryList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> + <el-radio-group v-model="form.examineCategory" placeholder="鑰冩牳绫诲瀷"> + <el-radio + v-for="dict in dict.type.plateform_rule_category" + :key="dict.value" + :value="dict.value"> + {{dict.label}}</el-radio> + </el-radio-group> </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail"> + <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDescription"> <el-input v-model="form.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/> </el-form-item> <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail"> @@ -198,26 +188,24 @@ <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/> </el-form-item> <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> - <el-select v-model="form.examineCategory" placeholder="瑙勫垯绫诲瀷"> - <el-option - v-for="item in examineList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> + <el-radio-group v-model="form.examineCategory" placeholder="鑰冩牳绫诲瀷"> + <el-radio + v-for="dict in dict.type.plateform_examine_category" + :key="dict.value" + :value="dict.value"> + {{dict.label}}</el-radio> + </el-radio-group> </el-form-item> <el-form-item label="瑙勫垯绫诲瀷" prop="category"> - <el-select v-model="form.category" placeholder="瑙勫垯绫诲瀷" disabled> - <el-option - v-for="item in categoryList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> + <el-radio-group v-model="form.examineCategory" placeholder="鑰冩牳绫诲瀷"> + <el-radio + v-for="dict in dict.type.plateform_rule_category" + :key="dict.value" + :value="dict.value"> + {{dict.label}}</el-radio> + </el-radio-group> </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail"> + <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDescription"> <el-input v-model="form.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" disabled/> </el-form-item> <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail" disabled> @@ -276,7 +264,7 @@ export default { name: "CheckRule", - dicts: ['platform_audit_state'], + dicts: ['platform_audit_state','platform_examine_category','platform_rule_category'], data() { return { // 閬僵灞� @@ -291,18 +279,6 @@ showSearch: true, // 鎬绘潯鏁� total: 0, - // 杩愮淮绫诲瀷 - categoryList: [ - { id: 1, value: '瑙嗛鐩戞帶' }, - { id: 2, value: '杞﹁締璇嗗埆' }, - { id: 3, value: '浜鸿劯璇嗗埆' }, - ], - // 杩愮淮绫诲瀷 - examineList: [ - { id: 1, value: '鐪佸巺鑰冩牳' }, - { id: 2, value: '鍖哄幙鑰冩牳' }, - { id: 3, value: '浜鸿劯璇嗗埆' }, - ], // 鑰冩牳瑙勫垯琛ㄦ牸鏁版嵁 checkRuleList: [], daterangeCreateTime: [], @@ -341,7 +317,7 @@ this.queryParams["end"] = this.daterangeCreateTime[1]; } listCheckRule(this.queryParams).then(response => { - this.checkRuleList = response.data; + this.checkRuleList = response.rows; this.total = response.total; this.loading = false; }); diff --git a/src/views/system/rule/province/index.vue b/src/views/system/rule/province/index.vue index 155408c..c6200ca 100644 --- a/src/views/system/rule/province/index.vue +++ b/src/views/system/rule/province/index.vue @@ -65,18 +65,14 @@ <el-table v-loading="loading" :data="checkRuleList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" /> - <el-table-column label="杩愮淮绫诲埆" align="center" prop="examineCategory"> + <el-table-column label="鑰冩牳绫诲埆" align="center" prop="examineCategory"> <template slot-scope="scope"> - <div v-if="scope.row.examineCategory === 1">鐪佸巺鑰冩牳</div> - <div v-else-if="scope.row.examineCategory === 2">鍖哄幙鑰冩牳</div> - <div v-else-if="scope.row.examineCategory === 3">鍏徃鑰冩牳</div> + <dict-tag :options="dict.type.examineCategory" :value="scope.row.examineCategory"/> </template> </el-table-column> - <el-table-column label="杩愮淮绫诲埆" align="center" prop="category"> + <el-table-column label="瑙勫垯绫诲瀷" align="center" prop="ruleCategory"> <template slot-scope="scope"> - <div v-if="scope.row.category === 1">瑙嗛鐩戞帶</div> - <div v-else-if="scope.row.category === 2">杞﹁締璇嗗埆</div> - <div v-else-if="scope.row.category === 3">浜鸿劯璇嗗埆</div> + <dict-tag :options="dict.type.ruleCategory" :value="scope.row.ruleCategory"/> </template> </el-table-column> <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="ruleDetail" /> @@ -86,9 +82,6 @@ <dict-tag :options="dict.type.platform_audit_state" :value="scope.row.auditState"/> </template> </el-table-column> - <el-table-column label="瀹℃牳浜�" align="center" prop="auditUser" /> - <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="auditTime" /> - <el-table-column label="瀹℃牳鎰忚" align="center" prop="auditDescription" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -291,18 +284,6 @@ showSearch: true, // 鎬绘潯鏁� total: 0, - // 杩愮淮绫诲瀷 - categoryList: [ - { id: 1, value: '瑙嗛鐩戞帶' }, - { id: 2, value: '杞﹁締璇嗗埆' }, - { id: 3, value: '浜鸿劯璇嗗埆' }, - ], - // 杩愮淮绫诲瀷 - examineList: [ - { id: 1, value: '鐪佸巺鑰冩牳' }, - { id: 2, value: '鍖哄幙鑰冩牳' }, - { id: 3, value: '浜鸿劯璇嗗埆' }, - ], // 鑰冩牳瑙勫垯琛ㄦ牸鏁版嵁 checkRuleList: [], daterangeCreateTime: [], -- Gitblit v1.8.0