From 27c87cc797f4fc9b0744ed8c44b58dbe4ff3a63c Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期四, 21 三月 2024 18:01:56 +0800 Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/zgyw-ui --- src/views/system/calculate/duty/index.vue | 263 +++++++ src/views/system/calculate/order/index.vue | 430 ++++++++--- src/views/system/calculate/rule/index.vue | 286 +++++++ src/views/system/default-auditing/index.vue | 138 +++ src/views/system/check-result/index.vue | 4 src/views/system/data-manage/index.vue | 4 src/api/platform/rules.js | 44 + src/views/system/calculate/record/index.vue | 450 ++++++++++++ src/views/system/score/index.vue | 91 +- src/views/system/calculate/report/index.vue | 441 ++++++++++++ src/views/system/check-rule/index.vue | 9 11 files changed, 2,000 insertions(+), 160 deletions(-) diff --git a/src/api/platform/rules.js b/src/api/platform/rules.js new file mode 100644 index 0000000..7ff7568 --- /dev/null +++ b/src/api/platform/rules.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 +export function listRules(query) { + return request({ + url: '/platform/rules/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ鏍哥畻瑙勫垯璇︾粏 +export function getRules(id) { + return request({ + url: '/platform/rules/' + id, + method: 'get' + }) +} + +// 鏂板鏍哥畻瑙勫垯 +export function addRules(data) { + return request({ + url: '/platform/rules', + method: 'post', + data: data + }) +} + +// 淇敼鏍哥畻瑙勫垯 +export function updateRules(data) { + return request({ + url: '/platform/rules', + method: 'put', + data: data + }) +} + +// 鍒犻櫎鏍哥畻瑙勫垯 +export function delRules(id) { + return request({ + url: '/platform/rules/' + id, + method: 'delete' + }) +} diff --git a/src/views/system/calculate/duty/index.vue b/src/views/system/calculate/duty/index.vue new file mode 100644 index 0000000..2ac514d --- /dev/null +++ b/src/views/system/calculate/duty/index.vue @@ -0,0 +1,263 @@ +<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="examineId"> + <el-input v-model="queryParams.examineId" 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 type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">鏂板</el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="success" plain icon="el-icon-edit" 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> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + + <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="unitName" /> + <el-table-column label="鍒嗗��" align="center" prop="score" /> + <el-table-column label="杩濈害瑙勫垯" align="center" prop="scoreCategory"> + <template slot-scope="scope"> + <div v-if="scope.row.scoreCategory === 1">瑙嗛鍦ㄧ嚎鐜�</div> + <div v-else-if="scope.row.scoreCategory === 2">瀛樺偍鏁呴殰</div> + <div v-else-if="scope.row.scoreCategory === 4">涓�鏈轰竴妗�24灏忔椂鏈慨澶�</div> + <div v-else-if="scope.row.scoreCategory === 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" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(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" :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="score"> + <el-input v-model="form.score" placeholder="璇疯緭鍏ュ垎鍊�" /> + </el-form-item> + <el-form-item label="鍗曚綅鍚�" prop="unitId"> + <el-select v-model="form.unitId" 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="examineId"> + <el-select v-model="form.examineId" placeholder="璇烽�夋嫨"> + <el-option v-for="item in examineList" :key="item.id" :label="item.value" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="绉垎绫诲瀷" prop="scoreCategory"> + <el-select v-model="form.scoreCategory" placeholder="璇烽�夋嫨"> + <el-option v-for="item in scoreCategoryList" :key="item.id" :label="item.value" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score"; +import { unitSelect } from "@/api/platform/unit"; +import { publishSelect } from "@/api/platform/publish"; + +export default { + name: "Score", + dicts: ['platform_operate_category'], + data() { + return { + operateCategoryList: [ + { id: 2, value: '浜哄伐鎵撳垎' }, + { id: 1, value: '绯荤粺鎵撳垎' }, + ], + scoreCategoryList: [ + { id: 2, value: '瀛樺偍鏁呴殰' }, + { id: 1, value: '瑙嗛鍦ㄧ嚎鐜�' }, + { id: 3, value: '淇濋殰宸ヤ綔' }, + ], + + unitList: [], + examineList: [], + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 杩濈害璁″垎琛ㄦ牸鏁版嵁 + scoreList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + score: null, + unitId: 2, + examineId: null, + operateCategory: null, + scoreCategory: null, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + } + }; + }, + created() { + this.getList(); + this.selectUnit(); + this.selectExamine(); + }, + methods: { + // 杩愮淮鍏徃涓嬫媺鏁版嵁 + selectUnit() { + unitSelect().then(res => { + this.unitList = res.data; + }) + }, + // 杩濈害涓嬫媺鏁版嵁 + selectExamine() { + publishSelect().then(res => { + this.examineList = res.data; + }) + }, + /** 鏌ヨ杩濈害璁″垎鍒楄〃 */ + getList() { + this.loading = true; + listScore(this.queryParams).then(response => { + this.scoreList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + score: null, + unitId: null, + examineId: null, + operateCategory: null, + scoreCategory: null, + createTime: null, + createBy: null + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + 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 + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞杩濈害璁″垎"; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset(); + const id = row.id || this.ids + getScore(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼杩濈害璁″垎"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updateScore(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); + } else { + addScore(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 delScore(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => { }); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('platform/score/export', { + ...this.queryParams + }, `score_${new Date().getTime()}.xlsx`) + } + } +}; +</script> diff --git a/src/views/system/calculate/order/index.vue b/src/views/system/calculate/order/index.vue index 7372335..155ebdc 100644 --- a/src/views/system/calculate/order/index.vue +++ b/src/views/system/calculate/order/index.vue @@ -1,8 +1,49 @@ <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="examineId"> - <el-input v-model="queryParams.examineId" placeholder="璇疯緭鍏ヨ繚绾﹀悕" clearable @keyup.enter.native="handleQuery" /> + <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> + <el-form-item label="鑰冩牳棰戠巼" prop="frequency"> + <el-select v-model="queryParams.frequency" clearable @clear="handleQuery" placeholder="鑰冩牳棰戠巼"> + <el-option + label="鏈堝害鑰冩牳" + value="1"> + </el-option> + <el-option + label="瀛e害鑰冩牳" + value="2"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="鑰冩牳鑼冨洿" prop="examineRange"> + <el-select v-model="queryParams.examineRange" clearable @clear="handleQuery" placeholder="鑰冩牳鑼冨洿"> + <el-option + label="甯傚眬鑰冩牳" + value="2"> + </el-option> + <el-option + label="鍒嗗眬鑰冩牳" + value="1"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="鑰冩牳鏃堕棿"> + <el-date-picker + v-model="daterangeCheckTime" + style="width: 240px" + value-format="yyyy-MM-dd HH:mm:ss" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + ></el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> @@ -11,73 +52,164 @@ </el-form> <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:checkResult:add']"--> +<!-- >鏂板</el-button>--> +<!-- </el-col>--> <el-col :span="1.5"> - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">鏂板</el-button> + <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="success" plain icon="el-icon-edit" 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> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + @click="handleExport" + >瀵煎嚭</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange"> + <el-card class="box-card" v-for="(item) in checkResultList"> + <div slot="header" class="clearfix"> + <span>{{ item.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.examineName }}</span></div> + <div class="text item">鑰冩牳棰戠巼<span class="time">{{ "瀛e害鑰冩牳" }}</span></div> + <div class="text item">鑰冩牳鍒嗘暟<span class="time">{{ item.checkScore }}</span></div> + <div class="text item">鑰冩牳鏃堕棿 + <span class="time">{{ item.checkTime }}</span> + </div> + </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="examineName" /> - <el-table-column label="杩濈害瀵硅薄" align="center" prop="unitName" /> - <el-table-column label="鍒嗗��" align="center" prop="score" /> - <el-table-column label="杩濈害瑙勫垯" align="center" prop="scoreCategory"> - <template slot-scope="scope"> - <div v-if="scope.row.scoreCategory === 1">瑙嗛鍦ㄧ嚎鐜�</div> - <div v-else-if="scope.row.scoreCategory === 2">瀛樺偍鏁呴殰</div> - <div v-else-if="scope.row.scoreCategory === 4">涓�鏈轰竴妗�24灏忔椂鏈慨澶�</div> - <div v-else-if="scope.row.scoreCategory === 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="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-edit" @click="handleUpdate(scope.row)">淇敼</el-button> - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">鍒犻櫎</el-button> + <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" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" - @pagination="getList" /> + <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"> + <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> +<!-- <template slot="extra">--> +<!-- <el-button type="primary" size="small">鎿嶄綔</el-button>--> +<!-- </template>--> + <el-descriptions-item> + <template slot="label"> + <i class="el-icon-user"></i> + 鑰冩牳瀵硅薄 + </template> + {{detail.checkUnitName}} + </el-descriptions-item> + <el-descriptions-item> + <template slot="label"> + <i class="el-icon-s-management"></i> + 鑰冩牳鍚嶇О + </template> + {{detail.examineName}} + </el-descriptions-item> + <el-descriptions-item> + <template slot="label"> + <i class="el-icon-full-screen"></i> + 鑰冩牳鑼冨洿 + </template> + <el-tag size="small">{{detail.examineRange === 1 ? '鍒嗗眬鑰冩牳' : '甯傚眬鑰冩牳'}}</el-tag> + </el-descriptions-item> + <el-descriptions-item> + <template slot="label"> + <i class="el-icon-timer"></i> + 鑰冩牳棰戠巼 + </template> + <el-tag size="small">{{detail.frequency === 1 ? '鏈堝害鑰冩牳' : '瀛e害鑰冩牳'}}</el-tag> + </el-descriptions-item> + <el-descriptions-item> + <template slot="label"> + <i class="el-icon-medal"></i> + 缁煎悎鍒嗘暟 + </template> + <el-tag type="danger" size="small">{{detail.checkScore}}</el-tag> + </el-descriptions-item> + </el-descriptions> + <el-table + :data="tableData" + show-summary + style="width: 100%"> + <el-table-column + prop="name" + label="瑙勫垯鍚�" + width="180"> + </el-table-column> + <el-table-column + prop="content" + label="鎸囨爣" + width="180"> + </el-table-column> + <el-table-column + prop="score" + label="寰楀垎"> + </el-table-column> + </el-table> + </el-dialog> + + <!-- 娣诲姞鎴栦慨鏀硅�冩牳缁撴灉瀵硅瘽妗� --> <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="score"> - <el-input v-model="form.score" placeholder="璇疯緭鍏ュ垎鍊�" /> - </el-form-item> - <el-form-item label="鍗曚綅鍚�" prop="unitId"> - <el-select v-model="form.unitId" 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="examineId"> - <el-select v-model="form.examineId" placeholder="璇烽�夋嫨"> - <el-option v-for="item in examineList" :key="item.id" :label="item.value" :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="绉垎绫诲瀷" prop="scoreCategory"> - <el-select v-model="form.scoreCategory" placeholder="璇烽�夋嫨"> - <el-option v-for="item in scoreCategoryList" :key="item.id" :label="item.value" :value="item.id"> - </el-option> - </el-select> - </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> @@ -88,27 +220,37 @@ </template> <script> -import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score"; -import { unitSelect } from "@/api/platform/unit"; -import { publishSelect } from "@/api/platform/publish"; +import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; export default { - name: "Score", - dicts: ['platform_operate_category'], + name: "CheckResult", data() { return { - operateCategoryList: [ - { id: 2, value: '浜哄伐鎵撳垎' }, - { id: 1, value: '绯荤粺鎵撳垎' }, - ], - scoreCategoryList: [ - { id: 2, value: '瀛樺偍鏁呴殰' }, - { id: 1, value: '瑙嗛鍦ㄧ嚎鐜�' }, - { id: 3, value: '淇濋殰宸ヤ綔' }, - ], + detailTitle: '', + detailOpen: false, + detail:{ - unitList: [], - examineList: [], + }, + 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' + }], + manualScoreOpen: false, + manualScoreForm: {}, + manualScoreTitle: '', // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -121,21 +263,20 @@ showSearch: true, // 鎬绘潯鏁� total: 0, - // 杩濈害璁″垎琛ㄦ牸鏁版嵁 - scoreList: [], + // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁 + checkResultList: [], // 寮瑰嚭灞傛爣棰� title: "", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, + // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 + daterangeCheckTime: [], // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, pageSize: 10, - score: null, - unitId: null, - examineId: null, - operateCategory: null, - scoreCategory: null, + checkUnitId: null, + checkTime: null, }, // 琛ㄥ崟鍙傛暟 form: {}, @@ -146,27 +287,33 @@ }, created() { this.getList(); - this.selectUnit(); - this.selectExamine(); }, methods: { - // 杩愮淮鍏徃涓嬫媺鏁版嵁 - selectUnit() { - unitSelect().then(res => { - this.unitList = res.data; - }) + frequencyFormatter(row) { + if (row.frequency === "1") { + return "鏈堝害鑰冩牳" + } + if (row.frequency === "2") { + return "瀛e害鑰冩牳" + } }, - // 杩濈害涓嬫媺鏁版嵁 - selectExamine() { - publishSelect().then(res => { - this.examineList = res.data; - }) + examineRangeFormatter(row) { + if (row.examineRange === "1") { + return "鍒嗗眬鑰冩牳" + } + if (row.examineRange === "2") { + return "甯傚眬鑰冩牳" + } }, - /** 鏌ヨ杩濈害璁″垎鍒楄〃 */ + /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ getList() { this.loading = true; - listScore(this.queryParams).then(response => { - this.scoreList = response.rows; + if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) { + this.queryParams["start"] = this.daterangeCheckTime[0]; + this.queryParams["end"] = this.daterangeCheckTime[1]; + } + listCheckResult(this.queryParams).then(response => { + this.checkResultList = response.data; this.total = response.total; this.loading = false; }); @@ -180,15 +327,57 @@ reset() { this.form = { id: null, - score: null, - unitId: null, - examineId: null, - operateCategory: null, - scoreCategory: null, + checkUnitId: null, + checkPublishId: null, + checkScore: null, + systemScore: null, + manualScore: null, + checkTime: null, createTime: null, - createBy: null + updateTime: null, + deleted: null }; this.resetForm("form"); + }, + cancelManualScore() { + this.manualScoreForm = {}; + this.manualScoreTitle = ""; + this.manualScoreOpen = false; + }, + submitManualScore() { + if (! this.manualScoreForm.manualScore) { + this.$modal.msgWarning("璇峰~鍐欏垎鏁�"); + return + } + manualScore(this.manualScoreForm).then(res => { + this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); + 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; + this.detail.carOnlineRate = '97%'; + this.detailTitle = row.checkUnitName + '鑰冩牳缁撴灉'; + this.detailOpen = true; + + }, + handlePublish(row) { + let text = row.publish == 1 ? '鍙栨秷鍙戝竷' : '鍙戝竷'; + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭' + text + '鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return publishCheckResult(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess(text + "鎴愬姛"); + }).catch(() => {}); + }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { @@ -197,29 +386,30 @@ }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { + this.daterangeCheckTime = []; 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.title = "娣诲姞鑰冩牳缁撴灉"; }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { this.reset(); const id = row.id || this.ids - getScore(id).then(response => { + getCheckResult(id).then(response => { this.form = response.data; this.open = true; - this.title = "淇敼杩濈害璁″垎"; + this.title = "淇敼鑰冩牳缁撴灉"; }); }, /** 鎻愪氦鎸夐挳 */ @@ -227,13 +417,13 @@ this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - updateScore(this.form).then(response => { + updateCheckResult(this.form).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; this.getList(); }); } else { - addScore(this.form).then(response => { + addCheckResult(this.form).then(response => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; this.getList(); @@ -245,19 +435,43 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎杩濈害璁″垎缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function () { - return delScore(ids); + this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return delCheckResult(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => { }); + }).catch(() => {}); }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('platform/score/export', { + this.download('system/checkResult/export', { ...this.queryParams - }, `score_${new Date().getTime()}.xlsx`) + }, `checkResult_${new Date().getTime()}.xlsx`) } } }; </script> +<style> + .text { + font-size: 14px; + } + .time { + font-size: 13px; + color: #999; + margin-left: 10px; + } + .item { + margin-bottom: 18px; + } + .clearfix:before, + .clearfix:after { + display: table; + content: ""; + } + .clearfix:after { + clear: both + } + .box-card { + width: 480px; + } +</style> diff --git a/src/views/system/calculate/record/index.vue b/src/views/system/calculate/record/index.vue new file mode 100644 index 0000000..1c8e04b --- /dev/null +++ b/src/views/system/calculate/record/index.vue @@ -0,0 +1,450 @@ +<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="ruleName"> + <el-input + v-model="queryParams.ruleName" + placeholder="璇疯緭鍏ヨ鍒欏悕绉�" + clearable + @clear="handleQuery" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="鍒涘缓鏃堕棿" prop="createTime"> + <el-date-picker + v-model="daterangeCreateTime" + style="width: 240px" + value-format="yyyy-MM-dd HH:mm:ss" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + /> + </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="success" + plain + icon="el-icon-edit" + 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"--> +<!-- v-hasPermi="['system:checkRule:export']"--> +<!-- >瀵煎嚭</el-button>--> +<!-- </el-col>--> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + + <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="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="ruleDetail" /> + <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 + size="mini" + type="text" + icon="el-icon-s-check" + @click="handleAudit(scope.row)" + v-hasPermi="['check:rule:audit']" + >瀹℃牳</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate(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" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + <div> + <!-- 娣诲姞鎴栦慨鏀硅�冩牳瑙勫垯瀵硅瘽妗� --> + <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> + <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> + </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-form-item> + <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail"> + <el-input v-model="form.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/> + </el-form-item> + <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail"> + <div class="row-warp"> + <div class="row"> + <div class="row-left">鍙傛暟鍚�</div> + <div class="row-right">鏉′欢</div> + </div> + <div class="row"> + <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div> + <div class="row-right"> + <div>涓嶅皯浜�</div> + <div> + <el-input class="input-w" type="number" v-model="form.videoPointNum"/>{{" %"}} + </div> + </div> + </div> + <div class="row"> + <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div> + <div class="row-right"> + <div>涓嶅皯浜�</div> + <div><el-input class="input-w" type="number" v-model="form.vehicleCheckpointNum"/></div>{{" %"}} + </div> + </div> + <div class="row"> + <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div> + <div class="row-right"> + <div>涓嶅皯浜�</div> + <div> + <el-input class="input-w" type="number" v-model="form.faceChceckpointNum" /></div>{{" %"}} + </div> + </div> + </div> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> + + <!-- 瀹℃牳鑰冩牳瑙勫垯瀵硅瘽妗� --> + <el-dialog :title="title" :visible.sync="auditOpen" width="600px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> + <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/> + </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-form-item> + <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail"> + <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> + <div class="row-warp"> + <div class="row"> + <div class="row-left">鍙傛暟鍚�</div> + <div class="row-right">鏉′欢</div> + </div> + <div class="row"> + <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div> + <div class="row-right"> + <div>涓嶅皯浜�</div> + <div> + <el-input class="input-w" type="number" v-model="form.videoPointNum" disabled/> + </div> + </div> + </div> + <div class="row"> + <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div> + <div class="row-right"> + <div>涓嶅皯浜�</div> + <div><el-input class="input-w" type="number" v-model="form.vehicleCheckpointNum" disabled/></div> + </div> + </div> + <div class="row"> + <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div> + <div class="row-right"> + <div>涓嶅皯浜�</div> + <div> + <el-input class="input-w" type="number" v-model="form.faceChceckpointNum" disabled/></div> + </div> + </div> + </div> + </el-form-item> + <el-form-item label="瀹℃牳缁撴灉" prop="auditState" > + <el-radio-group v-model="form.auditState"> + <el-radio :label="1">閫氳繃</el-radio> + <el-radio :label="2">椹冲洖</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="瀹℃牳璇存槑" prop="auditDescription" > + <el-input v-model="form.auditDescription" type="textarea" show-word-limit maxlength="100" /> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + + </div> +</template> + +<script> +import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule"; + +export default { + name: "CheckRule", + dicts: ['platform_audit_state'], + data() { + return { + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 杩愮淮绫诲瀷 + categoryList: [ + { id: 1, value: '瑙嗛鐩戞帶' }, + { id: 2, value: '杞﹁締璇嗗埆' }, + { id: 3, value: '浜鸿劯璇嗗埆' }, + ], + // 鑰冩牳瑙勫垯琛ㄦ牸鏁版嵁 + checkRuleList: [], + daterangeCreateTime: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏄惁鏄剧ず寮瑰嚭灞� + auditOpen: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + ruleName: null, + createTime: null, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + ruleName: [ + { required: true, message: "瑙勫垯鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], + } + }; + }, + created() { + this.getList(); + }, + methods: { + /** 鏌ヨ鑰冩牳瑙勫垯鍒楄〃 */ + getList() { + this.loading = true; + if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { + this.queryParams["start"] = this.daterangeCreateTime[0]; + this.queryParams["end"] = this.daterangeCreateTime[1]; + } + listCheckRule(this.queryParams).then(response => { + this.checkRuleList = response.data; + this.total = response.total; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.auditOpen = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + ruleName: null, + ruleDetail: null, + videoPointNum: null, + vehicleCheckpointNum: null, + faceChceckpointNum: null, + createTime: null, + updateTime: null, + deleted: null + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + 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 + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞鑰冩牳瑙勫垯"; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset(); + const id = row.id || this.ids + getCheckRule(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼鑰冩牳瑙勫垯"; + + }); + }, + /** 瀹℃牳鎸夐挳鎿嶄綔 */ + handleAudit(row) { + this.reset(); + const id = row.id || this.ids + getCheckRule(id).then(response => { + this.form = response.data; + this.auditOpen = true; + this.title = "瀹℃牳鑰冩牳瑙勫垯"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updateCheckRule(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.auditOpen = false; + this.getList(); + }); + } else { + addCheckRule(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.auditOpen = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return delCheckRule(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); + }, + + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('system/checkRule/export', { + ...this.queryParams + }, `checkRule_${new Date().getTime()}.xlsx`) + } + } +}; +</script> + +<style scoped> +.input-w { + margin-left: 5px; + width: 70px; +} +.row-warp { + display: flex; + flex-direction: column; + justify-content: center; + text-align: center; + border: solid 1px gray; + /*padding: 3px;*/ +} +.row { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + border-bottom: solid 1px gray; + padding: 3px; +} +.row:last-of-type { + border-bottom: none; +} +.row-left { + flex: 2; + border-right: solid 1px gray; +} +.row-right { + flex: 4; + display: flex; + flex-direction: row; + justify-content: center; +} +</style> diff --git a/src/views/system/calculate/report/index.vue b/src/views/system/calculate/report/index.vue new file mode 100644 index 0000000..1bda10d --- /dev/null +++ b/src/views/system/calculate/report/index.vue @@ -0,0 +1,441 @@ +<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> + + <el-form-item label="鏍哥畻鏃堕棿"> + <el-date-picker + v-model="daterangeCheckTime" + style="width: 240px" + value-format="yyyy-MM-dd HH:mm:ss" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + ></el-date-picker> + </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="primary"--> +<!-- plain--> +<!-- icon="el-icon-plus"--> +<!-- size="mini"--> +<!-- @click="handleAdd"--> +<!-- v-hasPermi="['system:checkResult:add']"--> +<!-- >鏂板</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> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + + <el-card class="box-card" v-for="(item) in checkResultList"> + <div slot="header" class="clearfix"> + <span>{{ item.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">鏍哥畻鏃堕棿 + <span class="time">{{ item.checkTime }}</span> + </div> + </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" + :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"> + <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> +<!-- <template slot="extra">--> +<!-- <el-button type="primary" size="small">鎿嶄綔</el-button>--> +<!-- </template>--> + <el-descriptions-item> + <template slot="label"> + <i class="el-icon-user"></i> + 鏍哥畻瀵硅薄 + </template> + {{detail.checkUnitName}} + </el-descriptions-item> + <el-descriptions-item> + <template slot="label"> + <i class="el-icon-s-management"></i> + 鍚堝悓鍚嶇О + </template> + {{detail.checkUnitName}} + </el-descriptions-item> + </el-descriptions> + <el-table + :data="tableData" + show-summary + style="width: 100%"> + <el-table-column + prop="name" + label="瑙勫垯鍚�" + width="180"> + </el-table-column> + <el-table-column + prop="amount" + label="鏁伴噺" + width="180"> + </el-table-column> + <el-table-column + prop="money" + label="閲戦(鍏�)"> + </el-table-column> + <el-table-column + prop="total" + label="鍚堣(鍏�)"> + </el-table-column> + </el-table> + </el-dialog> + + <!-- 娣诲姞鎴栦慨鏀硅�冩牳缁撴灉瀵硅瘽妗� --> + <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> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; + +export default { + name: "CheckResult", + data() { + return { + detailTitle: '', + detailOpen: false, + detail:{ + + }, + tableData: [{ + name: '鎷嗛櫎鐐逛綅', + amount: '100', + money: '100', + total: '10000' + }, { + name: '杩炵画涓ゅぉ', + amount: '100', + money: '100.45', + total: '10045' + }, { + name: '闂撮殧涓夊ぉ', + amount: '100', + money: '100', + total: '10000' + }, { + name: '杩愯鐜�(96%)', + amount: '100', + money: '100.45', + total: '10045' + }], + manualScoreOpen: false, + manualScoreForm: {}, + manualScoreTitle: '', + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁 + checkResultList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 + daterangeCheckTime: [], + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + checkUnitId: null, + checkTime: null, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + } + }; + }, + created() { + this.getList(); + }, + 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 "甯傚眬鑰冩牳" + } + }, + /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ + getList() { + this.loading = true; + if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) { + this.queryParams["start"] = this.daterangeCheckTime[0]; + this.queryParams["end"] = this.daterangeCheckTime[1]; + } + listCheckResult(this.queryParams).then(response => { + this.checkResultList = response.data; + this.total = response.total; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + checkUnitId: null, + checkPublishId: null, + checkScore: null, + systemScore: null, + manualScore: null, + checkTime: null, + createTime: null, + updateTime: null, + deleted: null + }; + this.resetForm("form"); + }, + cancelManualScore() { + this.manualScoreForm = {}; + this.manualScoreTitle = ""; + this.manualScoreOpen = false; + }, + submitManualScore() { + if (! this.manualScoreForm.manualScore) { + this.$modal.msgWarning("璇峰~鍐欏垎鏁�"); + return + } + manualScore(this.manualScoreForm).then(res => { + this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); + 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; + this.detail.carOnlineRate = '97%'; + this.detailTitle = row.checkUnitName + '鑰冩牳缁撴灉'; + this.detailOpen = true; + + }, + handlePublish(row) { + let text = row.publish == 1 ? '鍙栨秷鍙戝竷' : '鍙戝竷'; + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭' + text + '鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return publishCheckResult(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess(text + "鎴愬姛"); + }).catch(() => {}); + + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.daterangeCheckTime = []; + this.resetForm("queryForm"); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + this.single = selection.length!==1 + this.multiple = !selection.length + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞鑰冩牳缁撴灉"; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset(); + const id = row.id || this.ids + getCheckResult(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼鑰冩牳缁撴灉"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updateCheckResult(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); + } else { + addCheckResult(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 delCheckResult(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('system/checkResult/export', { + ...this.queryParams + }, `checkResult_${new Date().getTime()}.xlsx`) + } + } +}; +</script> +<style> + .text { + font-size: 14px; + } + .time { + font-size: 13px; + color: #999; + margin-left: 10px; + } + .item { + margin-bottom: 18px; + } + .clearfix:before, + .clearfix:after { + display: table; + content: ""; + } + .clearfix:after { + clear: both + } + .box-card { + width: 480px; + } +</style> diff --git a/src/views/system/calculate/rule/index.vue b/src/views/system/calculate/rule/index.vue new file mode 100644 index 0000000..ccc20e1 --- /dev/null +++ b/src/views/system/calculate/rule/index.vue @@ -0,0 +1,286 @@ +<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 + type="primary" + plain + icon="el-icon-plus" + size="mini" + @click="handleAdd" + v-hasPermi="['platform:rules: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="['platform:rules: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="['platform:rules:remove']" + >鍒犻櫎 + </el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + @click="handleExport" + v-hasPermi="['platform:rules: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="createTime" width="180"> + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> + </template> + </el-table-column> + <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="['platform:rules:edit']" + >淇敼 + </el-button> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handleDelete(scope.row)" + v-hasPermi="['platform:rules: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> + <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> + <el-input v-model="form.contractName" placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"/> + </el-form-item> + <el-form-item label="閲戦" prop="amount"> + <el-input v-model="form.amount" placeholder="璇疯緭鍏ラ噾棰�"/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { listRules, getRules, delRules, addRules, updateRules } from '@/api/platform/rules' + +export default { + name: 'Rules', + data() { + return { + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 鏍哥畻瑙勫垯琛ㄦ牸鏁版嵁 + rulesList: [], + // 寮瑰嚭灞傛爣棰� + title: '', + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + rulesName: null, + contractName: null, + deleted: null + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: {} + } + }, + created() { + this.getList() + }, + methods: { + /** 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 */ + getList() { + this.loading = true + listRules(this.queryParams).then(response => { + this.rulesList = response.rows + this.total = response.total + this.loading = false + }) + }, + // 鍙栨秷鎸夐挳 + cancel() { + 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') + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1 + 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 + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset() + this.open = true + this.title = '娣诲姞鏍哥畻瑙勫垯' + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset() + const id = row.id || this.ids + getRules(id).then(response => { + this.form = response.data + this.open = true + this.title = '淇敼鏍哥畻瑙勫垯' + }) + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + 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() + }) + } else { + addRules(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) + }).then(() => { + this.getList() + this.$modal.msgSuccess('鍒犻櫎鎴愬姛') + }).catch(() => { + }) + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('platform/rules/export', { + ...this.queryParams + }, `rules_${new Date().getTime()}.xlsx`) + } + } +} +</script> diff --git a/src/views/system/check-result/index.vue b/src/views/system/check-result/index.vue index 536bd3a..9f63175 100644 --- a/src/views/system/check-result/index.vue +++ b/src/views/system/check-result/index.vue @@ -244,11 +244,11 @@ }, { name: '瀛樺偍鏁呴殰', content: '5灏忔椂', - score: '-0.5' + score: '-0.3' }, { name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�', content: '3涓�', - score: '-0.3' + score: '-0.5' }], manualScoreOpen: false, manualScoreForm: {}, diff --git a/src/views/system/check-rule/index.vue b/src/views/system/check-rule/index.vue index b813712..96190cd 100644 --- a/src/views/system/check-rule/index.vue +++ b/src/views/system/check-rule/index.vue @@ -30,15 +30,6 @@ <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - >鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="success" plain icon="el-icon-edit" diff --git a/src/views/system/data-manage/index.vue b/src/views/system/data-manage/index.vue index f0228ea..727e39f 100644 --- a/src/views/system/data-manage/index.vue +++ b/src/views/system/data-manage/index.vue @@ -114,7 +114,7 @@ { name: '', icon: 'el-icon-connection', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' } ], carData: [ - { name: '瑙嗗浘搴撳鎺ョǔ瀹氭��1', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, + { name: '瑙嗗浘搴撳鎺ョǔ瀹氭��', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '鐐逛綅鍦ㄧ嚎鐜�', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, @@ -124,7 +124,7 @@ carData2: [ { name: '杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, - { name: '杞﹁締鍗″彛璁惧url鍙敤鎬�0.5', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, + { name: '杞﹁締鍗″彛璁惧url鍙敤鎬�', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '', icon: 'el-icon-truck', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' } diff --git a/src/views/system/default-auditing/index.vue b/src/views/system/default-auditing/index.vue index 6d65f7b..1b035f0 100644 --- a/src/views/system/default-auditing/index.vue +++ b/src/views/system/default-auditing/index.vue @@ -86,8 +86,14 @@ <el-table v-loading="loading" :data="auditingList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="杩濈害鍗曚綅" align="center" prop="unitName" width="180"/> - <el-table-column label="杩濈害瑙勫垯" align="center" prop="defaultRuleName"width="120" /> - <el-table-column label="杩濈害鎵e垎" align="center" prop="score"width="120" /> + <el-table-column label="鑰冩牳鍚�" align="center" prop="checkPublishId" width="180"> + <template slot-scope="scope"> + <div v-if="scope.row.checkPublishId === 5">瑙嗛鑰冩牳</div> + </template> + </el-table-column> + <el-table-column label="杩濈害瑙勫垯" align="center" prop="defaultRuleName" width="180" /> + <el-table-column label="杩濈害鎵e垎" align="center" prop="score" width="120" /> + <el-table-column label="鍒涘缓浜�" align="center" prop="createBy" /> <el-table-column label="瀹℃牳浜�" align="center" prop="auditingUserName" /> <el-table-column label="瀹℃牳鐘舵��" align="center" prop="auditingStatus" /> <el-table-column label="瀹℃牳璇存槑" align="center" prop="remark" width="180"/> @@ -100,6 +106,7 @@ type="text" icon="el-icon-s-check" @click="handleAuditing(scope.row)" + v-hasPermi="['default:audit']" >瀹℃牳</el-button> <!-- <el-button--> <!-- size="mini"--> @@ -132,6 +139,7 @@ <el-form-item label="杩濈害鍗曚綅"> <el-input v-model="auditingForm.unitName" disabled/> </el-form-item> + <el-form-item label="杩濈害瑙勫垯"> <el-input v-model="auditingForm.defaultRuleName" disabled/> </el-form-item> @@ -151,6 +159,68 @@ <el-button @click="closeAuditing">鍙� 娑�</el-button> </div> </el-dialog> + + <!-- 鏂板鎴栦慨鏀� --> + <el-dialog title="杩濈害瀹℃牳" :visible.sync="open" width="700px"append-to-body> + <el-form ref="auditingForm" :model="auditingForm" :rules="auditingRules" label-width="80px"> + <el-form-item label="杩濈害鍗曚綅" prop="unitName"> + <el-select v-model="form.unitNameList" placeholder="杩濈害鍗曚綅"> + <el-option + v-for="item in unitNameList" + :key="item.id" + :label="item.value" + :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="鑰冩牳鍚�" prop="examineId"> + <el-select v-model="form.examineId" placeholder="鑰冩牳鍚�" > + <el-option + v-for="item in examineList" + :key="item.id" + :label="item.value" + :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="杩濈害瑙勫垯" prop="tempRuleFormList"> + <div class="row-warp"> + <div class="row" v-for="(form) in tempRuleFormList"> + <div class="row-left"> + <div>瑙勫垯</div> + <div class="block"> + <span class="demonstration"></span> + <el-cascader + v-model="value" + :options="options" + :props = "props" + @change="handleChange"></el-cascader> + </div> + </div> + <div class="row-right"> + <div>鏁伴噺</div> + <div class="margin-5"> + <el-input type="number" v-model="form.weight"/> + </div> + </div> + <div class="item-op"> + <el-button @click="removeRule(form)" type="danger" icon="el-icon-delete" circle></el-button> + </div> + </div> + <div style="margin-top: 25px"> + <el-button type="success" @click="nextAdd" size="mini" plain>娣诲姞</el-button> + </div> + </div> + </el-form-item> + <el-form-item label="杩濈害鎵e垎" style="width: 20%"> + <el-input v-model="auditingForm.score"></el-input> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitAuditing">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> </div> </template> @@ -162,9 +232,37 @@ name: "Auditing", data() { return { + options: [{ + value: 'city', + label: '鍓嶇鎰熺煡婧愭不鐞嗗伐浣�', + children: [{ + value: 'fushun', + label: '鏃堕挓鍚屾', + }, { + value: 'rong', + label: 'OSD鏍囪瘑鏈慨澶�', + }, { + value: 'rong', + label: '涓�鏈轰竴妗d笉鍚堟牸', + } + ] + }, + ], auditingOpen: false, auditingForm: {}, unitList: [], + unitNameList: [ + {id:2 , value:"鎴愰兘x杩愮淮"} + ], + // 鑰冩牳妯℃澘 + examineList: [ + {id:1 , value:"杞﹁締鑰冩牳"}, + {id:2 , value:"瑙嗛鑰冩牳"} + ], + // 涓存椂瑙勫垯琛ㄥ崟 + tempRuleForm: {}, + // 涓存椂瑙勫垯琛ㄥ崟鍒楄〃 + tempRuleFormList: [{"ruleId": null, "adjustCoefficient": null}], // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -183,6 +281,7 @@ title: "", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, + auditOpen: false, // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 daterangeAuditingTime: [], // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 @@ -212,6 +311,9 @@ this.getUnitSelect(); }, methods: { + handleChange(value) { + console.log(value); + }, // 鎻愪氦瀹℃牳 submitAuditing() { this.$refs["auditingForm"].validate(valid => { @@ -239,6 +341,8 @@ this.auditingForm = {}; this.auditingOpen = false; }, + + getUnitSelect() { // 杩愮淮鍗曚綅涓嬫媺鍒楄〃 unitSelect().then((res) => { @@ -265,6 +369,7 @@ // 鍙栨秷鎸夐挳 cancel() { this.open = false; + this.auditOpen = false; this.reset(); }, // 琛ㄥ崟閲嶇疆 @@ -304,7 +409,7 @@ handleAdd() { this.reset(); this.open = true; - this.title = "娣诲姞杩濊瀹℃牳"; + this.title = "娣诲姞杩濊璁板綍"; }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { @@ -355,3 +460,30 @@ } }; </script> +<style scoped> +.margin-5 { + margin-left: 5px; +} +.row-warp { + display: flex; + flex-direction: column; +} +.row { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + margin: 5px 0; +} +.row-left { + flex: 1; + display: flex; + flex-direction: row; +} +.row-right { + flex: 1; + display: flex; + flex-direction: row; +} +</style> + diff --git a/src/views/system/score/index.vue b/src/views/system/score/index.vue index ba5dc99..bc0ad7a 100644 --- a/src/views/system/score/index.vue +++ b/src/views/system/score/index.vue @@ -1,14 +1,7 @@ <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="unitId">--> -<!-- <el-input--> -<!-- v-model="queryParams.unitId"--> -<!-- placeholder="璇疯緭鍏ュ崟浣嶅悕"--> -<!-- clearable--> -<!-- @keyup.enter.native="handleQuery"--> -<!-- />--> -<!-- </el-form-item>--> + <el-form-item label="鑰冩牳鍚�" prop="examineId"> <el-input v-model="queryParams.examineId" @@ -17,14 +10,16 @@ @keyup.enter.native="handleQuery" /> </el-form-item> -<!-- <el-form-item label="绉垎绫诲瀷" prop="scoreCategory">--> -<!-- <el-input--> -<!-- v-model="queryParams.scoreCategory"--> -<!-- placeholder="璇疯緭鍏ョН鍒嗙被鍨�"--> -<!-- clearable--> -<!-- @keyup.enter.native="handleQuery"--> -<!-- />--> -<!-- </el-form-item>--> + + <el-form-item label="鑰冩牳瀵硅薄" prop="unitName"> + <el-cascader + v-model="value" + :options="options" + :props = "props" + :show-all-levels="false" + @change="handleChange"></el-cascader> + </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> @@ -32,15 +27,6 @@ </el-form> <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - >鏂板</el-button> - </el-col> <el-col :span="1.5"> <el-button type="success" @@ -76,14 +62,18 @@ <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" > - {{"鎴愰兘x杩愮淮"}} + <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="unitName"> + <template slot-scope="scope"> + <div v-if="scope.row.unitName ==='鎴愰兘x杩愮淮' ">鎴愰兘x杩愮淮</div> + <div v-else>鑷祦浜曞尯</div> + </template> </el-table-column> <el-table-column label="鍒嗗��" align="center" prop="score" /> <el-table-column label="鑰冩牳瑙勫垯" align="center" prop="scoreCategory"> <template slot-scope="scope"> <div v-if="scope.row.scoreCategory === 1">瑙嗛鍦ㄧ嚎鐜�</div> <div v-else-if="scope.row.scoreCategory === 2">瀛樺偍鏁呴殰</div> + <div v-else-if="scope.row.scoreCategory === 3">瑙嗗浘搴撳鎺ョǔ瀹氭��</div> <div v-else-if="scope.row.scoreCategory === 4">涓�鏈轰竴妗�24灏忔椂鏈慨澶�</div> <div v-else-if="scope.row.scoreCategory === 5">鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�</div> </template> @@ -92,13 +82,6 @@ <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 - size="mini" - type="text" - icon="el-icon-s-check" - @click="handleAuditing(scope.row)" - v-hasPermi="['score:publish:audit']" - >瀹℃牳</el-button> <el-button size="mini" type="text" @@ -178,6 +161,44 @@ dicts: ['platform_operate_category'], data() { return { + options: [{ + value: 'city', + label: '鍖哄幙', + children: [{ + value: 'fushun', + label: '瀵岄『鍘�', + }, { + value: 'rong', + label: '鑽e幙', + },{ + value: 'gaoxin', + label: '楂樻柊鍖�', + },{ + value: 'ziliujing', + label: '鑷祦浜曞尯', + },{ + value: 'gongjing', + label: '璐′簳鍖�', + },{ + value: 'daan', + label: '澶у畨鍖�', + },{ + value: 'yantan', + label: '娌挎哗鍖�', + }, + ] + }, { + value: 'company', + label: '鍏徃', + children: [{ + value: 'yunwei', + label: '鎴愰兘x杩愮淮', + }, { + value: 'yunwei2', + label: '鑷础x杩愮淮', + }, ] + }, + ], scoreCategoryList: [ { id: 2, value: '瀛樺偍鏁呴殰' }, { id: 1, value: '瑙嗛鍦ㄧ嚎鐜�' }, @@ -185,8 +206,6 @@ { id: 4, value: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�' }, { id: 5, value: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�' }, ], - - unitList: [], examineList: [], // 閬僵灞� loading: true, -- Gitblit v1.8.0