From 7d312ba048cd9767286c6bc5b8c3f7e94c160c9f Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 30 四月 2024 13:48:39 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/system/calculate/order/index.vue | 196 ++++++----------- src/views/system/point/index.vue | 330 +++++++++-------------------- src/api/platform/check-result.js | 12 vue.config.js | 10 src/views/system/contract/index.vue | 2 src/views/system/result/detail/index1.vue | 8 src/api/platform/contract-score.js | 2 src/api/system/dept.js | 8 src/views/system/score/default/index.vue | 57 ++++ src/views/system/report/index.vue | 7 10 files changed, 254 insertions(+), 378 deletions(-) diff --git a/src/api/platform/check-result.js b/src/api/platform/check-result.js index 578e87a..23b723b 100644 --- a/src/api/platform/check-result.js +++ b/src/api/platform/check-result.js @@ -3,12 +3,20 @@ // 鏌ヨ鑰冩牳缁撴灉鍒楄〃 export function listCheckResult(query) { return request({ - url: '/check/result/list', - method: 'get', + url: '/check/result/list?pageNum=' + query.pageNum + '&pageSize=' + query.pageSize, + method: 'post', data: query }) } +// 鏌ヨ鑰冩牳缁撴灉璇︽儏 +export function resultRecord(id) { + return request({ + url: '/check/result/record/list?resultId=' + id, + method: 'get' + }) +} + // 鏌ヨ鑰冩牳缁撴灉璇︾粏 export function getCheckResult(id) { return request({ diff --git a/src/api/platform/contract-score.js b/src/api/platform/contract-score.js index 8e111ea..da595be 100644 --- a/src/api/platform/contract-score.js +++ b/src/api/platform/contract-score.js @@ -3,7 +3,7 @@ // 鏌ヨ杩濊瀹℃牳鍒楄〃 export function listAuditing(data) { return request({ - url: '/contract/score/list', + url: '/contract/score/list?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize, method: 'post', data: data }) diff --git a/src/api/system/dept.js b/src/api/system/dept.js index 277263c..70be0eb 100644 --- a/src/api/system/dept.js +++ b/src/api/system/dept.js @@ -65,3 +65,11 @@ method: 'get' }) } + +// 鑾峰彇绾ц仈鏁版嵁 +export function cascader() { + return request({ + url: '/system/dept/cascader', + method: 'get' + }) +} diff --git a/src/views/system/calculate/order/index.vue b/src/views/system/calculate/order/index.vue index 6cba56b..9aa6437 100644 --- a/src/views/system/calculate/order/index.vue +++ b/src/views/system/calculate/order/index.vue @@ -1,25 +1,16 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> - <el-form-item label="鑰冩牳瀵硅薄" prop="checkUnitId"> - <el-input - v-model="queryParams.checkUnitName" - placeholder="璇疯緭鍏ヨ�冩牳瀵硅薄" - clearable - @clear="handleQuery" - @keyup.enter.native="handleQuery" - /> + <el-form-item label="鑰冩牳瀵硅薄" prop="unitId"> + <el-select v-model="queryParams.unitId" @change="handleQuery" clearable placeholder="鑰冩牳瀵硅薄"> + <el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id"> + </el-option> + </el-select> </el-form-item> - <el-form-item label="鑰冩牳棰戠巼" prop="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-form-item label="鍙戝竷鐘舵��" prop="unitId"> + <el-select v-model="queryParams.publish" @change="handleQuery" clearable placeholder="鍙戝竷鐘舵��"> + <el-option label="鏈彂甯�" :value="0" /> + <el-option label="宸插彂甯�" :value="1" /> </el-select> </el-form-item> <el-form-item label="鑰冩牳鏃堕棿"> @@ -74,53 +65,24 @@ <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>{{ checkUnitName }}</span> - <el-button style="float: right; padding: 3px 6px" type="text" @click="handleDetail(item)">璇︽儏</el-button> - <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">鎵撳垎</el-button> - </div> - <div class="text item">鑰冩牳<span class="time">{{ 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> - <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">纭鍙戝竷</el-button> - <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">宸插彂甯�</el-button> - </div> - </el-card> + <el-row v-loading="loading"> + <el-col :span="8" v-for="(item, index) in checkResultList" :key="index"> + <el-card class="box-card"> + <div slot="header" class="clearfix"> + <span>{{ item.contractName }}</span> + <el-button style="float: right; padding: 3px 6px" type="text" @click="handleDetail(item)">璇︽儏</el-button> + </div> + <div class="text item">鑰冩牳瀵硅薄<span class="time">{{ item.unitName }}</span></div> + <div class="text item">鑰冩牳鍒嗘暟<span class="time">{{ item.score }}</span></div> + <div class="text item">鑰冩牳鏃堕棿 + <span class="time">{{ item.checkTime }}</span> + <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">纭鍙戝竷</el-button> + <el-button size="small" round style="float: right;" disabled v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">宸插彂甯�</el-button> + </div> + </el-card> + </el-col> + </el-row> - <!-- <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" @@ -128,7 +90,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="璇蜂负璇ュ崟浣嶆墦鍒�"/> @@ -140,36 +102,26 @@ <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> - {{checkUnitName}} + {{detail.unitName}} </el-descriptions-item> <el-descriptions-item> <template slot="label"> <i class="el-icon-s-management"></i> - 鑰冩牳鍚嶇О + 鍚堝悓鍚嶇О </template> - {{examineName}} - </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> + {{detail.contractName}} </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-tag type="danger" size="small">{{detail.score}}</el-tag> </el-descriptions-item> </el-descriptions> <el-table @@ -177,18 +129,24 @@ show-summary style="width: 100%"> <el-table-column - prop="name" + prop="ruleName" label="瑙勫垯鍚�" - width="180"> + :show-overflow-tooltip="true" + width="300"> </el-table-column> <el-table-column - prop="content" - label="鎸囨爣" - width="180"> + label="鎵e噺鏂瑰紡" + align="center" + prop="deductCategory" + width="180px"> + </el-table-column> + <el-table-column + prop="num" + label="鎸囨爣"> </el-table-column> <el-table-column prop="score" - label="寰楀垎"> + label="鎵e垎"> </el-table-column> </el-table> </el-dialog> @@ -206,7 +164,8 @@ </template> <script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; +import { resultRecord, listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; +import { unitSelect } from "@/api/platform/unit"; export default { name: "CheckResult", @@ -217,25 +176,7 @@ detail:{ }, - checkUnitName: '鎴愰兘x杩愮淮', - examineName: '鎴愰兘x杩愮淮鑰冩牳', - tableData: [{ - name: '瑙嗛骞冲潎鍦ㄧ嚎鐜�', - content: '97%', - score: '-5' - }, { - name: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�', - content: '5涓�', - score: '-0.5' - }, { - name: '瀛樺偍鏁呴殰', - content: '5灏忔椂', - score: '-0.3' - }, { - name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�', - content: '3涓�', - score: '-0.5' - }], + tableData: [], manualScoreOpen: false, manualScoreForm: {}, manualScoreTitle: '', @@ -270,36 +211,29 @@ form: {}, // 琛ㄥ崟鏍¢獙 rules: { - } + }, + unitList: [] }; }, created() { this.getList(); + this.getUnitSelect(); }, methods: { - frequencyFormatter(row) { - if (row.frequency === "1") { - return "鏈堝害鑰冩牳" - } - if (row.frequency === "2") { - return "瀛e害鑰冩牳" - } - }, - examineRangeFormatter(row) { - if (row.examineRange === "1") { - return "鍒嗗眬鑰冩牳" - } - if (row.examineRange === "2") { - return "甯傚眬鑰冩牳" - } + getUnitSelect() { + // 杩愮淮鍗曚綅涓嬫媺鍒楄〃 + unitSelect().then((res) => { + this.unitList = res.data; + }) }, /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ getList() { this.loading = true; if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) { - this.queryParams["start"] = this.daterangeCheckTime[0]; - this.queryParams["end"] = this.daterangeCheckTime[1]; + this.queryParams["createStartTime"] = this.daterangeCheckTime[0]; + this.queryParams["createEndTime"] = this.daterangeCheckTime[1]; } + console.log("this.queryParams", this.queryParams) listCheckResult(this.queryParams).then(response => { this.checkResultList = response.rows; this.total = response.total; @@ -350,11 +284,12 @@ this.manualScoreOpen = true; }, handleDetail(row) { + resultRecord(row.id).then(res => { + this.tableData = res.rows; + }) this.detail = row; - this.detail.carOnlineRate = '97%'; - this.detailTitle = '鑰冩牳缁撴灉'; + this.detailTitle = '鑰冩牳缁撴灉璇︽儏'; this.detailOpen = true; - }, handlePublish(row) { let text = row.publish == 1 ? '鍙栨秷鍙戝竷' : '鍙戝竷'; @@ -369,13 +304,13 @@ }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { - this.queryParams.pageNum = 1; this.getList(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { this.daterangeCheckTime = []; this.resetForm("queryForm"); + this.queryParams = {}; this.handleQuery(); }, // 澶氶�夋閫変腑鏁版嵁 @@ -432,9 +367,9 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('system/checkResult/export', { + this.download('check/result/export', { ...this.queryParams - }, `checkResult_${new Date().getTime()}.xlsx`) + }, `鍚堝悓鑰冩牳缁撴灉_${new Date().getTime()}.xlsx`) }, } @@ -461,6 +396,7 @@ clear: both } .box-card { - width: 480px; + width: 400px; + margin-bottom: 20px; } </style> diff --git a/src/views/system/contract/index.vue b/src/views/system/contract/index.vue index 61ac223..8a0d0e7 100644 --- a/src/views/system/contract/index.vue +++ b/src/views/system/contract/index.vue @@ -33,7 +33,7 @@ <el-collapse-item v-for="(item, index) in ruleData" :key="index" :title="item.ruleName" :name="index"> <div class="inline-input-container" v-for="(item, index) in item.children" :key="index"> <b>{{ item.ruleDesc }}</b> <br v-if="item.ruleDesc"/> - <el-tooltip class="item" v-for="(item, index) in item.children" :key="index" effect="dark" :content="item.deductCategory == '鍒嗘暟涔樹互鏁伴噺' ? '鎵�' + item.calcFraction + '涔樹互鏁伴噺 ' : item.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�' ? '鎵�' + item.calcFraction + '鍒�/' + item.calcUnit + '灏忔椂' : item.deductCategory + ' ' + item.calcFraction" placement="top"> + <el-tooltip class="item" v-for="(item, index) in item.children" :key="index" effect="dark" :content="item.deductCategory == '鍒嗘暟涔樹互鏁伴噺' ? '鎵�' + item.calcFraction + '鍒�*鏁伴噺 ' : item.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�' ? '鎵�' + item.calcFraction + '鍒�/' + item.calcUnit + '灏忔椂' : '鎵�' + item.calcFraction + '鍒�'" placement="top"> <span>{{ item.ruleCondition }}<br/></span> <!-- {{ item.deductCategory }} {{ item.calcFraction }}{{ item.calcUnit ? "/" + item.calcUnit : '' }} --> </el-tooltip> diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue index c8b775e..6d51e3f 100644 --- a/src/views/system/point/index.vue +++ b/src/views/system/point/index.vue @@ -2,28 +2,7 @@ <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="pointName"> - <el-input - v-model="queryParams.pointName" - placeholder="璇疯緭鍏ョ偣浣嶅悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鐐逛綅寮�濮嬫椂闂�" prop="startTime"> - <el-date-picker clearable - v-model="queryParams.startTime" - type="date" - value-format="yyyy-MM-dd" - placeholder="璇烽�夋嫨鐐逛綅寮�濮嬫椂闂�"> - </el-date-picker> - </el-form-item> - <el-form-item label="鐐逛綅缁撴潫鏃堕棿" prop="endTime"> - <el-date-picker clearable - v-model="queryParams.endTime" - type="date" - value-format="yyyy-MM-dd" - placeholder="璇烽�夋嫨鐐逛綅缁撴潫鏃堕棿"> - </el-date-picker> + <el-input v-model="queryParams.pointName" 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> @@ -32,74 +11,40 @@ </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="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" - v-hasPermi="['point:edit']" - >淇敼</el-button> + <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" + v-hasPermi="['point: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="['point:remove']" - >鍒犻櫎</el-button> + <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" + v-hasPermi="['point:remove']">鍒犻櫎</el-button> </el-col> <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-top" - size="mini" - @click="handleImportPoint" - v-hasPermi="['point:import']" - >瀵煎叆鐐逛綅</el-button> + <el-button type="warning" plain icon="el-icon-top" size="mini" @click="handleImportPoint" + v-hasPermi="['point:import']">瀵煎叆鐐逛綅</el-button> </el-col> <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-receiving" - size="mini" - @click="handleEditBatch" - v-hasPermi="['point:edit']" - >鎵归噺淇敼</el-button> + <el-button type="danger" plain icon="el-icon-receiving" size="mini" @click="handleEditBatch" + v-hasPermi="['point:edit']">鎵归噺淇敼</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table v-loading="loading" :data="pointList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="鐐逛綅绫诲瀷" align="center" prop="pointType" /> - <el-table-column label="鏍囩" align="center" prop="tag" > - <span>{{important}}</span> - </el-table-column> - <el-table-column label="鐐逛綅寮�濮嬫椂闂�" align="center" prop="startTime" width="180"> + <el-table-column label="鐐逛綅鍚嶇О" prop="pointName" width="200" /> + <el-table-column label="鏍囩" align="center" width="90"> <template slot-scope="scope"> - <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> - <el-table-column label="鐐逛綅缁撴潫鏃堕棿" align="center" prop="endTime" width="180"> - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span> + <dict-tag :options="dict.type.point_tag" :value="scope.row.pointTags" /> </template> </el-table-column> <el-table-column label="杩愮淮鍗曚綅" align="center" prop="unitName" /> @@ -111,35 +56,19 @@ <div v-else-if="scope.row.category === 3">浜鸿劯璇嗗埆</div> </template> </el-table-column> - <el-table-column label="杩愮淮鐘舵��" align="center" prop="status" /> <el-table-column label="澶囨敞" align="center" prop="remark" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <el-table-column label="鎿嶄綔" align="center" fixed="right" 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="['point:edit']" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['point:remove']" - >鍒犻櫎</el-button> + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" + v-hasPermi="['point:edit']">淇敼</el-button> + <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" + v-hasPermi="['point: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" - /> + <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> @@ -147,51 +76,34 @@ <el-form-item label="鐐逛綅鍚嶇О" prop="pointName"> <el-input v-model="form.pointName" placeholder="璇疯緭鍏ョ偣浣嶅悕绉�" /> </el-form-item> - <el-form-item label="鐐逛綅鏍囩" prop="tag"> - <el-select v-model="form.tag" placeholder="鐐逛綅鏍囩"> - <el-option label="鏅�氱偣浣�" value="鏅�氱偣浣�"/> - <el-option label="閲嶇偣鐐逛綅" value="閲嶇偣鐐逛綅"/> + <el-form-item label="鐐逛綅鏍囩" prop="pointTag"> + <el-select v-model="form.pointTag" placeholder="鐐逛綅鏍囩" multiple clearable> + <el-option v-for="dict in dict.type.point_tag" :key="dict.value" :label="dict.label" :value="dict.value" /> </el-select> </el-form-item> - <el-form-item label="鐐逛綅鎵�鍦ㄥ湴" prop="region"> - <el-cascader v-model="form.region" :options="regionList" placeholder="鐐逛綅鎵�鍦ㄥ湴" :props="props" collapse-tags></el-cascader> - </el-form-item> + <!-- <el-form-item label="鐐逛綅鎵�鍦ㄥ湴" prop="region">--> + <!-- <el-cascader v-model="form.region" :options="regionList" placeholder="鐐逛綅鎵�鍦ㄥ湴" :props="props" collapse-tags></el-cascader>--> + <!-- </el-form-item>--> <el-form-item label="璁惧绫诲瀷" prop="category"> - <el-select v-model="form.category" placeholder="璁惧绫诲瀷"> - <el-option label="浜鸿劯璇嗗埆" value="2"/> - <el-option label="瑙嗛鐩戞帶" value="1"/> - <el-option label="杞﹁締鐩戞帶" value="3"/> + <el-select v-model="form.category" placeholder="璁惧绫诲瀷"> + <el-option label="浜鸿劯璇嗗埆" value="2" /> + <el-option label="瑙嗛鐩戞帶" value="1" /> + <el-option label="杞﹁締鐩戞帶" value="3" /> </el-select> </el-form-item> - <el-form-item label="鐩戠閮ㄩ棬" prop="category"> - <el-select v-model="form.deptName" placeholder="鐩戠閮ㄩ棬"> - <el-option label="鐪佸巺" value="鐪佸巺"/> - <el-option label="鑷础鑽e幙鍏畨灞�" value="鑷础鑽e幙鍏畨灞�"/> - <el-option label="鑷础瀵岄『鍏畨灞�" value="鑷础瀵岄『鍏畨灞�"/> - </el-select> + <el-form-item label="鐩戠閮ㄩ棬" prop="deptId"> + <el-cascader v-model="form.deptId" :options="deptOptions" :show-all-levels="false" clearable + :props="{ checkStrictly: true }"> + </el-cascader> </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-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="timezone"> - <el-date-picker - @change="dateChange" - v-model="form.timezone" - type="daterange" - align="right" - unlink-panels - range-separator="鑷�" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - > - </el-date-picker> + <el-form-item label="鐐逛綅澶囨敞" prop="remark"> + <el-input type="textarea" v-model="form.remark"/> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -204,30 +116,14 @@ <el-dialog title="鎵归噺淇敼杩愮淮鍗曚綅" :visible.sync="batchOpen" width="600px" append-to-body> <el-form ref="form" :model="batchEditForm" :rules="batchRules" label-width="120px"> <el-form-item label="鐐逛綅閫夋嫨" prop="ids"> - <el-cascader @change="cos" v-model="batchEditForm.ids" :options="regionList" placeholder="璇烽�夋嫨鍖哄煙" :props="props" collapse-tags></el-cascader> + <el-cascader @change="cos" v-model="batchEditForm.ids" :options="regionList" placeholder="璇烽�夋嫨鍖哄煙" + :props="props" collapse-tags></el-cascader> </el-form-item> <el-form-item label="杩愮淮鍗曚綅" prop="unitId"> - <el-select v-model="batchEditForm.unitId" placeholder="閫夋嫨杩愮淮鍗曚綅"> - <el-option - v-for="item in unitList" - :key="item.id" - :label="item.value" - :value="item.id"> + <el-select v-model="batchEditForm.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="timezone"> - <el-date-picker - @change="dateChange" - v-model="batchEditForm.timezone" - type="daterange" - align="right" - unlink-panels - range-separator="鑷�" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - > - </el-date-picker> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -242,29 +138,27 @@ <script> import { listPoint, getPoint, delPoint, addPoint, batchEdit, updatePoint } from "@/api/platform/point"; import { unitSelect } from "@/api/platform/unit"; -import { getCascader } from '../../../api/platform/region' +import { getCascader } from '@/api/platform/region' +import { cascader } from '@/api/system/dept' export default { name: "Point", + dicts: ['point_tag'], data() { return { + deptOptions: [], // 鎵归噺淇敼琛ㄥ崟 batchEditForm: { ids: [], unitId: null, timezone: null, - startTime: null, - endTime: null }, // 鎵归噺淇敼寮圭獥 batchOpen: false, props: { multiple: true }, regionList: [], - // 姝e湪淇敼绗嚑涓� - editingIndex: null, // 閬僵灞� loading: true, - important: '閲嶇偣鐐逛綅', // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� @@ -285,35 +179,26 @@ editOpen: false, // 杩愮淮鍗曚綅 unitList: [], - // 杩愮淮鏃跺尯 - timezone:[], // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, pageSize: 10, pointName: null, - startTime: null, - endTime: null, unitId: null, status: null, }, // 琛ㄥ崟鍙傛暟 - form: {}, - // 鎵归噺琛ㄥ崟鍐呭 - formList:[], - // 涓存椂琛ㄥ崟鏁版嵁 - tempForm: {}, - // 涓存椂琛ㄥ崟鏁版嵁鍒楄〃 - tempFormList: [], + form: { + }, // 琛ㄥ崟鏍¢獙 rules: { pointName: [ { required: true, message: "鐐逛綅鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } ], - region: [ - { required: true, message: "鐐逛綅鎵�鍦ㄥ湴涓嶈兘涓虹┖", trigger: "change" } + pointTag: [ + { required: true, message: "鐐逛綅鏍囩涓嶈兘涓虹┖", trigger: "change" } ], - deptName: [ + deptId: [ { required: true, message: "鐩戠閮ㄩ棬涓嶈兘涓虹┖", trigger: "change" } ], category: [ @@ -331,7 +216,8 @@ created() { this.getList(); this.getUnitSelect(); - this.getCascader(); + // this.getCascader(); + this.getDeptCascader(); }, methods: { // 鐐逛綅瀵煎叆 @@ -357,42 +243,24 @@ handleEditBatch() { this.batchOpen = true; }, - removeRegion(item) { - this.tempFormList = this.tempFormList.filter(data => data !== item) - }, + // 鑾峰彇鍖哄幙绾ц仈 getCascader() { getCascader().then(res => { this.regionList = res.data; }) }, - // 鐐逛綅椤逛慨鏀瑰畬鎴� - editFinishItem(index) { - this.editingIndex = null; - let form = this.tempFormList[index]; - form.startTime = form.timezone[0]; - form.endTime = form.timezone[1]; - this.formList[index] = form; + // 鑾峰彇閮ㄩ棬绾ц仈 + getDeptCascader() { + cascader().then(res => { + this.deptOptions = res.data; + }) }, - // 鐐逛綅椤逛慨鏀� - editPointItem(index) { - if (this.editingIndex !== index && this.editingIndex !== null) { - this.$modal.msgWarning("璇峰厛瀹屾垚涓婁竴涓慨鏀�"); - } else { - this.editingIndex = index; - this.tempFormList[index] = this.formList[index]; - } - }, + // 鏃堕棿閫夋嫨鍙戠敓鍙樺寲 dateChange() { this.tempForm.startTime = this.tempForm.timezone[0]; this.tempForm.endTime = this.tempForm.timezone[1]; - }, - // 缁х画娣诲姞鐐逛綅 - nextAdd() { - let item = {} - // this.formList.push(item); - this.tempFormList.push(item); }, getUnitSelect() { // 杩愮淮鍗曚綅涓嬫媺鍒楄〃 @@ -414,24 +282,19 @@ this.open = false; this.reset(); }, - updateCancel() { - this.editOpen = false; - this.reset(); - }, // 琛ㄥ崟閲嶇疆 reset() { this.form = { id: null, pointName: null, - startTime: null, - endTime: null, unitId: null, + deptId: [], status: null, remark: null, createTime: null, updateTime: null, deleted: null, - pointDetail: "" + pointTag: [] }; this.resetForm("form"); }, @@ -463,38 +326,47 @@ const id = row.id || this.ids getPoint(id).then(response => { this.form = response.data; - this.form.timezone = [this.form.startTime, this.form.endTime] - if (this.form.pointDetail) { - this.tempFormList = JSON.parse(this.form.pointDetail) - } + this.form.pointTag = response.data.pointTags; + this.form.deptId = response.data.deptIds + this.form.category = this.form.category + '' this.open = true; this.title = "淇敼杩愮淮鐐逛綅"; }); }, /** 鎻愪氦鎸夐挳 */ submitForm() { - if (this.tempFormList) { - this.form.pointDetail = JSON.stringify(this.tempFormList) - } - if (this.form.id != null) { - updatePoint(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - addPoint(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.reset() - this.getList(); - }); - } + this.$refs['form'].validate(valid => { + if (valid) { + if (this.form.deptId && this.form.deptId.length > 0) { + this.form.deptId = this.form.deptId[this.form.deptId.length - 1] + } + let temp = { + ...this.form, + category: parseInt(this.form.category) + }; + if (temp.id != null) { + updatePoint(temp).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); + } else { + addPoint(temp).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.reset() + this.getList(); + }); + } + } else { + console.log("error") + } + }) }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎杩愮淮鐐逛綅缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭鍒犻櫎杩愮淮鐐逛綅缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function () { return delPoint(ids); }).then(() => { this.getList(); diff --git a/src/views/system/report/index.vue b/src/views/system/report/index.vue index 3bdc812..3c0a06c 100644 --- a/src/views/system/report/index.vue +++ b/src/views/system/report/index.vue @@ -60,7 +60,8 @@ <div class="info-item"> <div class="info-label">涓婃姤鏉愭枡</div> <div class="info-list"> - <div class="list-item" v-for="file in formatFileList(scope.row.reportMaterials)" :key="file" @click="showFile(file)"> + <div class="list-item" v-for="file in formatFileList(scope.row.reportMaterials)" :key="file" + @click="showFile(file)"> <div class="item-icon"> <i class="el-icon-document"></i> </div> @@ -141,7 +142,7 @@ <editor v-model="form.reportContent" :min-height="192" /> </el-form-item> <el-form-item label="涓婃姤鏉愭枡" prop="reportMaterials"> - <file-upload v-model="form.reportMaterials" /> + <file-upload v-model="form.reportMaterials" :fileType='fileType' /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -211,6 +212,8 @@ name: "Report", data() { return { + fileType: ["doc", "xls", "xlsx", "ppt", "txt", "pdf", "png", "jpg"], + // 鐐逛綅list pointList: [], // 閬僵灞� diff --git a/src/views/system/result/detail/index1.vue b/src/views/system/result/detail/index1.vue index f8e4941..84e0a50 100644 --- a/src/views/system/result/detail/index1.vue +++ b/src/views/system/result/detail/index1.vue @@ -1,5 +1,5 @@ <template> - <div style="padding: 0px 10px" > + <div style="padding: 0px 10px"> <div> <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" style="margin-bottom: 10px"> @@ -84,7 +84,7 @@ </template> <script> -import { listScore, getScore, delScore, addScore, updateScore, publishScore,detailScore } from "@/api/platform/check-score"; +import { listScore, getScore, delScore, addScore, updateScore, publishScore, detailScore } from "@/api/platform/check-score"; import { areaSelect } from '@/api/system/dept'; import * as echarts from 'echarts'; let lineChart = null; @@ -108,7 +108,7 @@ pageNum: 1, pageSize: 10, deptId: null, - examineTag:0 + examineTag: 0 }, queryParamsList: { pageNum: 1, @@ -254,7 +254,7 @@ data: dataList.map((item) => item[0]), }, yAxis: { - + min: 'dataMin' }, series: [ { diff --git a/src/views/system/score/default/index.vue b/src/views/system/score/default/index.vue index 538e637..f2db340 100644 --- a/src/views/system/score/default/index.vue +++ b/src/views/system/score/default/index.vue @@ -44,12 +44,13 @@ <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="contractName" width="180" /> - <el-table-column label="鑰冩牳瑙勫垯" align="center" prop="ruleName" width="120" :show-overflow-tooltip="true" /> - <el-table-column label="鑰冩牳鎸囨爣" align="center" prop="num" width="120" /> - <el-table-column label="鑰冩牳鎵e垎" align="center" prop="score" width="120" /> - <el-table-column label="鍒涘缓浜�" align="center" prop="createUser" /> + <el-table-column label="鑰冩牳鍗曚綅" align="center" prop="unitName"/> + <el-table-column label="鑰冩牳鍚堝悓" align="center" prop="contractName"/> + <el-table-column label="鑰冩牳瑙勫垯" align="center" prop="ruleName" :show-overflow-tooltip="true" /> + <el-table-column label="鎵e噺鏂瑰紡" align="center" prop="deductCategory"/> + <el-table-column label="鑰冩牳鎸囨爣" align="center" prop="num"/> + <el-table-column label="鑰冩牳鎵e垎" align="center" prop="score"/> + <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180px"/> <el-table-column label="瀹℃牳鐘舵��" align="center" prop="auditingStatus"> <template slot-scope="scope"> <el-tag @@ -60,6 +61,7 @@ <el-table-column label="瀹℃牳浜�" align="center" prop="auditingUser" /> <el-table-column label="鎿嶄綔" align="center" fixed="right" class-name="small-padding fixed-width"> <template slot-scope="scope"> + <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">璇︽儏</el-button> <el-button size="mini" type="text" icon="el-icon-s-check" @click="handleAuditing(scope.row)" v-hasPermi="['default:audit']" v-if="scope.row.auditingStatus === '寰呭鏍�'">瀹℃牳</el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" @@ -120,7 +122,14 @@ <el-cascader ref="cascader" v-model="form.ruleIdsArray" :options="options" @change="handleChange"> <template slot-scope="{ data }"> <el-tooltip class="item" :disabled="data.label.length < 16 && !data.deductCategory" effect="dark" - :content="data.label.length < 16 ? data.deductCategory ? data.deductCategory + ' ' + data.calcFraction + (data.calcUnit ? '/' + data.calcUnit : '') : '' : (data.deductCategory ? data.label + ' ' + data.deductCategory + ' ' + data.calcFraction + (data.calcUnit ? '/' + data.calcUnit : '') : data.label)" + :content=" + data.label.length < 16 ? + data.deductCategory ? + data.deductCategory == '鍒嗘暟涔樹互鏁伴噺' ? '鎵�' + data.calcFraction + '鍒�*鏁伴噺 ' : data.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�' ? '鎵�' + data.calcFraction + '鍒�/' + data.calcUnit + '灏忔椂' : '鎵�' + data.calcFraction + '鍒�' : + '' : + (data.deductCategory ? + data.label + ' ' + (data.deductCategory == '鍒嗘暟涔樹互鏁伴噺' ? '鎵�' + data.calcFraction + '鍒�*鏁伴噺 ' : data.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�' ? '鎵�' + data.calcFraction + '鍒�/' + data.calcUnit + '灏忔椂' : '鎵�' + data.calcFraction + '鍒�') : + data.label)" placement="left"> <span>{{ data.label }}</span> </el-tooltip> @@ -146,6 +155,31 @@ <el-button @click="cancel">鍙� 娑�</el-button> </div> </el-dialog> + + <!-- 璇︽儏 --> + <el-dialog title="杩愮淮鑰冩牳璇︽儏" :visible.sync="openView" width="800px" append-to-body> + <el-form ref="form" :model="view" label-width="150px" size="mini"> + <el-row> + <el-col> + <el-form-item label="鑰冩牳鍗曚綅锛�">{{ view.unitName }}</el-form-item> + <el-form-item label="鑰冩牳鍚堝悓锛�">{{ view.contractName }} </el-form-item> + <el-form-item label="鑰冩牳瑙勫垯锛�">{{ view.ruleName }} </el-form-item> + <el-form-item label="鑰冩牳鎸囨爣锛�">{{ view.num }} </el-form-item> + <el-form-item label="鑰冩牳鎵e垎锛�">{{ view.score }} </el-form-item> + <el-form-item label="鍒涘缓浜猴細">{{ view.createUser }} </el-form-item> + <el-form-item label="鍒涘缓鏃堕棿锛�">{{ view.createTime }} </el-form-item> + <el-form-item label="瀹℃牳鐘舵�侊細">{{ view.auditingStatus }} </el-form-item> + <el-form-item label="瀹℃牳澶囨敞锛�">{{ view.remark }} </el-form-item> + <el-form-item label="瀹℃牳浜猴細">{{ view.auditingUser }} </el-form-item> + <el-form-item label="瀹℃牳鏃堕棿锛�">{{ view.auditingTime }} </el-form-item> + </el-col> + </el-row> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="openView = false">鍏� 闂�</el-button> + </div> + </el-dialog> + </div> </template> @@ -158,6 +192,8 @@ name: "Auditing", data() { return { + view: {}, + openView: false, needNum: false, options: [], auditingOpen: false, @@ -241,6 +277,11 @@ this.getUnitSelect(); }, methods: { + /** 璇︾粏鎸夐挳鎿嶄綔 */ + handleView(row) { + this.openView = true; + this.view = row; + }, /** * 閫夋嫨瑙勫垯 */ @@ -248,6 +289,7 @@ let item = this.$refs['cascader'].getCheckedNodes()[0].data; this.calcObj = item; this.form.contractId = item.contractId; + this.form.deductCategory = item.deductCategory == '鍒嗘暟涔樹互鏁伴噺' ? '鎵�' + item.calcFraction + '鍒�*鏁伴噺 ' : item.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�' ? '鎵�' + item.calcFraction + '鍒�/' + item.calcUnit + '灏忔椂' : '鎵�' + item.calcFraction + '鍒�'; if (item.deductCategory == "鎵f寚瀹氬垎鏁�") { this.needNum = false; this.form.score = item.calcFraction; @@ -366,6 +408,7 @@ this.daterangeAuditingTime = []; this.daterangeCreateTime = []; this.resetForm("queryForm"); + this.queryParams = {}; this.handleQuery(); }, // 澶氶�夋閫変腑鏁版嵁 diff --git a/vue.config.js b/vue.config.js index 4d77887..a0c8509 100644 --- a/vue.config.js +++ b/vue.config.js @@ -35,9 +35,15 @@ proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, - // target: `http://192.168.3.64:8080`, + // target: `http://localhost:8080`, + + // 浠樼珛楹� + target: `http://192.168.3.64:8080`, + + // 榫氱剷鑼� // target: `http://192.168.3.87:8080`, + + // 鍚戝煿 // target: `http://192.168.3.88:8085`, changeOrigin: true, pathRewrite: { -- Gitblit v1.8.0