From 549240a042edad52f9642721e7b1f51b90ddaf34 Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期二, 16 四月 2024 15:18:38 +0800 Subject: [PATCH] Merge branch 'master' into dev-threejs --- src/views/system/calculate/rule/index.vue | 4 src/views/system/point/index.vue | 2 src/views/system/result/detail/detail.vue | 698 ++++++++++++++++++++++ src/views/system/platform/index.vue | 29 src/views/system/rule/default/index.vue | 3 src/views/system/equipment/index.vue | 76 - src/router/index.js | 13 src/views/system/calculate/record/index.vue | 5 src/views/system/score/index.vue | 0 src/views/system/result/default/index.vue | 1 src/views/system/work-order/index.vue | 259 ++----- src/views/system/calculate/order/index.vue | 10 src/views/system/template/default/index.vue | 2 src/views/system/threshold/index.vue | 58 src/views/system/result/index.vue | 180 +++++ src/main.js | 1 src/views/system/result/detail/index1.vue | 329 ++++++++++ src/components/FileUpload/index.vue | 9 src/api/platform/work-order.js | 24 src/views/system/calculate/report/index.vue | 68 + src/views/system/report/index.vue | 34 src/views/system/template/index.vue | 7 src/views/system/unit/index.vue | 6 23 files changed, 1,454 insertions(+), 364 deletions(-) diff --git a/src/api/platform/work-order.js b/src/api/platform/work-order.js index 38bdefa..c59a54d 100644 --- a/src/api/platform/work-order.js +++ b/src/api/platform/work-order.js @@ -78,3 +78,27 @@ data: data }) } + +// 鑾峰彇宸ュ崟杩愮淮鎯呭喌 +export function getYwCondition(data) { + return request({ + url: '/work-order/yw-condition/' + data, + method: 'get' + }) +} + +// 鑾峰彇宸ュ崟杩愮淮瀹℃牳璁板綍 +export function getYwAuditingList(data) { + return request({ + url: '/work-order/yw-auditing-list/' + data, + method: 'get' + }) +} + +// 鑾峰彇宸ュ崟杩愮淮鎯呭喌璁板綍 +export function getYwConditionList(data) { + return request({ + url: '/work-order/yw-condition-list/' + data, + method: 'get' + }) +} diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 1e8728c..4401262 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -28,9 +28,12 @@ <!-- 鏂囦欢鍒楄〃 --> <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul"> <li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList"> - <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank"> + <el-link @click="handleDownload(file.url)" :underline="false" target="_blank"> <span class="el-icon-document"> {{ getFileName(file.name) }} </span> </el-link> + <!-- <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank"> + <span class="el-icon-document"> {{ getFileName(file.name) }} </span> + </el-link> --> <div class="ele-upload-list__item-content-action"> <el-link :underline="false" @click="handleDelete(index)" type="danger">鍒犻櫎</el-link> </div> @@ -189,6 +192,10 @@ strs += list[i].url + separator; } return strs != '' ? strs.substr(0, strs.length - 1) : ''; + }, + /** 涓嬭浇鎸夐挳鎿嶄綔 */ + handleDownload (data) { + this.$download.resource(data); } } }; diff --git a/src/main.js b/src/main.js index 7944e09..ba602b0 100644 --- a/src/main.js +++ b/src/main.js @@ -58,6 +58,7 @@ Vue.prototype.download = download Vue.prototype.handleTree = handleTree Vue.prototype.getToken = getToken +Vue.prototype.$uploadUrl = process.env.VUE_APP_BASE_API + "/common/upload" // 鍏ㄥ眬缁勪欢鎸傝浇 Vue.component('DictTag', DictTag) diff --git a/src/router/index.js b/src/router/index.js index b9f2252..1d08e0d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -73,6 +73,19 @@ ] }, { + path: '/contract/score', + component: Layout, + hidden: true, + children: [ + { + path: 'index', + name: 'score', + component: () => import('@/views/system/score/default/index'), + meta: { title: '鍚堝悓绉垎', activeMenu: '/system/score' } + } + ] + }, + { path: '/check-result/contract', component: Layout, hidden: true, diff --git a/src/views/system/calculate/order/index.vue b/src/views/system/calculate/order/index.vue index c944342..6685b32 100644 --- a/src/views/system/calculate/order/index.vue +++ b/src/views/system/calculate/order/index.vue @@ -75,13 +75,16 @@ <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 0" type="text" @click="handleDetail(item)">璇︽儏</el-button> + <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> @@ -347,7 +350,7 @@ handleDetail(row) { this.detail = row; this.detail.carOnlineRate = '97%'; - this.detailTitle = row.checkUnitName + '鑰冩牳缁撴灉'; + this.detailTitle = '鑰冩牳缁撴灉'; this.detailOpen = true; }, @@ -430,7 +433,8 @@ this.download('system/checkResult/export', { ...this.queryParams }, `checkResult_${new Date().getTime()}.xlsx`) - } + }, + } }; </script> diff --git a/src/views/system/calculate/record/index.vue b/src/views/system/calculate/record/index.vue index b321768..16306e6 100644 --- a/src/views/system/calculate/record/index.vue +++ b/src/views/system/calculate/record/index.vue @@ -44,7 +44,6 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['system:record:edit']" >淇敼</el-button> </el-col> <el-col :span="1.5"> @@ -55,7 +54,6 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['system:record:remove']" >鍒犻櫎</el-button> </el-col> <el-col :span="1.5"> @@ -65,7 +63,6 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['system:record:export']" >瀵煎嚭</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> @@ -98,14 +95,12 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['system:record:edit']" >淇敼</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" - v-hasPermi="['system:record:remove']" >鍒犻櫎</el-button> </template> </el-table-column> diff --git a/src/views/system/calculate/report/index.vue b/src/views/system/calculate/report/index.vue index 6dea7bd..3dab356 100644 --- a/src/views/system/calculate/report/index.vue +++ b/src/views/system/calculate/report/index.vue @@ -67,9 +67,7 @@ <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">鏍哥畻</el-button> </div> <div class="text item">鍚堝悓<span class="time">{{ checkUnitName }}</span></div> - <div class="text item">鎬婚噾棰�<span class="time">{{ "1000鍏�" }}</span></div> <div class="text item">鎵e噺閲戦<span class="time">{{ "10鍏�" }}</span></div> - <div class="text item">鍓╀綑閲戦<span class="time">{{ "990鍏�" }}</span></div> <div class="text item">鏈�鏂版牳绠楁椂闂� <span class="time">{{ item.checkTime }}</span> </div> @@ -118,32 +116,41 @@ <el-table-column prop="score" label="鑰冩牳鍒嗘暟" - width="180" + doNotSum + > + <template slot-scope="scope"> + <el-link @click="toScorePage(scope.row)">{{scope.row.score}}</el-link> + </template> + </el-table-column> + <el-table-column + prop="ruleName" + label="閫傜敤瑙勫垯" doNotSum> </el-table-column> - <el-table-column - prop="score" - label="鎵e垎绯绘暟" - width="180"> - <template slot-scope="scope"> - <el-tooltip class="item" effect="dark" :content="'鑰冩牳瑙勫垯锛�' + scope.row.description" placement="top"> - <span>{{ scope.row.value }}</span> - </el-tooltip> - </template> - </el-table-column> - <el-table-column - label="鎵e噺閲戦(鍏�)" + <el-table-column + prop="score" + label="鎵e垎绯绘暟" + > + <template slot-scope="scope"> + <el-tooltip class="item" effect="dark" :content="'鑰冩牳瑙勫垯锛�' + scope.row.description" placement="top"> + <span>{{ scope.row.value }}</span> + </el-tooltip> + </template> + </el-table-column> + <el-table-column + label="鎵e噺閲戦(鍏�)" prop="money" - width="180"> - <template slot-scope="scope"> + width="180"> + <template slot-scope="scope"> <el-input type="number" :precision="2" :step="0.1" :min="0" :max="1000000" v-model="scope.row.money" - placeholder="璇疯緭鍏ユ墸鍑忛噾棰�"> - </el-input> - </template> - </el-table-column> + disabled + placeholder="璇疯緭鍏ユ墸鍑忛噾棰�"> + </el-input> + </template> + </el-table-column> </el-table> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> @@ -179,15 +186,17 @@ tableData: [{ time: '2024-03-03', score: '94', - value: '0.01', - money: '', + value: '1%', + ruleName: '<95', + money: '10', description: '姣忓皯1鍒嗘墸褰撴湀鎬绘湇鍔¤垂鐨�1%銆備緥濡傦細褰撴湀鑰冩牳寰楀垎91.5鍒嗭紝鎵i櫎褰撴湀鏈嶅姟璐�3.5%鐨勯噾棰�', }, { time: '2024-04-03', score: '95', value: '0', - money: '', - description: '姣忓皯1鍒嗘墸褰撴湀鎬绘湇鍔¤垂鐨�1%銆備緥濡傦細褰撴湀鑰冩牳寰楀垎91.5鍒嗭紝鎵i櫎褰撴湀鏈嶅姟璐�3.5%鐨勯噾棰�', + ruleName: '鈮�95', + money: '0', + description: '涓嶆墸娆�', }, ], manualScoreOpen: false, manualScoreForm: {}, @@ -385,6 +394,7 @@ ...this.queryParams }, `checkResult_${new Date().getTime()}.xlsx`) }, + /** 鍚堣琛� */ getSummaries(param) { const { columns, data } = param; const sums = []; @@ -411,12 +421,16 @@ sums[index] = '-'; // 鎴栬�呭叾浠栦綘鎯宠鏄剧ず鐨勫唴瀹� } } else { - sums[index] = 'N/A'; + sums[index] = '-'; } }); return sums; - } + }, + toScorePage() { + // 浣跨敤Vue Router杩涜椤甸潰璺宠浆 + this.$router.push('/contract/score/index'); + }, } }; </script> diff --git a/src/views/system/calculate/rule/index.vue b/src/views/system/calculate/rule/index.vue index 6831222..5782a74 100644 --- a/src/views/system/calculate/rule/index.vue +++ b/src/views/system/calculate/rule/index.vue @@ -8,7 +8,6 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['system:rule:add']" >鏂板</el-button> </el-col> <el-col :span="1.5"> @@ -46,21 +45,18 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['system:rule:edit']" >淇敼</el-button> <el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)" - v-hasPermi="['system:rule:add']" >鏂板</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" - v-hasPermi="['system:rule:remove']" >鍒犻櫎</el-button> </template> </el-table-column> diff --git a/src/views/system/equipment/index.vue b/src/views/system/equipment/index.vue index ada2e73..1b6dd83 100644 --- a/src/views/system/equipment/index.vue +++ b/src/views/system/equipment/index.vue @@ -16,28 +16,24 @@ <p>璁惧鎬绘暟</p > </div> <div class="dashboard-item"> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> + <p>浜鸿劯璁惧鏁�</p > + </div> + <div class="dashboard-item"> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> + <p>杞﹁締璁惧鏁�</p > + </div> + <div class="dashboard-item"> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> + <p>瑙嗛璁惧鏁�</p > + </div> + <div class="dashboard-item"> <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> <p>姝e父鏁�</p > </div> <div class="dashboard-item"> <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> <p>寮傚父鏁�</p > - </div> - <div class="dashboard-item"> - <h3>{{ count.totalViews }}</h3> - <p>鐢熸垚寮傚父宸ュ崟鏁�</p > - </div> - <div class="dashboard-item"> - <h3>{{ count.noStore }}</h3> - <p>鏃犲瓨鍌�</p > - </div> - <div class="dashboard-item"> - <h3>{{ count.partStore }}</h3> - <p>閮ㄥ垎瀛樺偍</p > - </div> - <div class="dashboard-item"> - <h3>{{ count.viewsPercentage }}%</h3> - <p>璁惧杩愯鐜�</p > </div> </div> </el-col> @@ -84,21 +80,6 @@ /> </el-select> </el-form-item> - <el-form-item label="鏄惁鐢熸垚寮傚父宸ュ崟" prop="defaultOrder" label-width="130px"> - <el-select - v-model="queryParams.defaultOrder" - placeholder="鏄惁鐢熸垚寮傚父宸ュ崟" - clearable - style="width: 170px" - > - <el-option - v-for="dict in dict.type.platform_yes_no" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> @@ -130,16 +111,8 @@ <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> </template> </el-table-column> - <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" width="180" v-if="columns[3].visible"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/> - </template> - </el-table-column> - <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180" v-if="columns[4].visible"/> - <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180" v-if="columns[5].visible"/> - <el-table-column label="淇′护鏃跺欢(ms)" align="center" prop="sipDelay" width="180" v-if="columns[6].visible"/> - <el-table-column label="瑙嗛鏃跺欢(ms)" align="center" prop="videoDelay" width="180" v-if="columns[7].visible"/> - <el-table-column label="鍏抽敭甯ф椂寤�(ms)" align="center" prop="iframeDelay" width="180" v-if="columns[8].visible"/> + <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180" v-if="columns[3].visible"/> + <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180" v-if="columns[4].visible"/> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right"> <template slot-scope="scope"> <el-button @@ -176,25 +149,12 @@ </el-col> <el-col :span="24"> <el-form-item label="鍦板潃锛�">{{ form.address }}</el-form-item> - <el-form-item label="鏄惁鐢熸垚寮傚父宸ュ崟锛�"> - <div v-if="form.defaultOrder === 1">鏄�</div> - <div v-else-if="form.defaultOrder === 2">鍚�</div> - </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="瀹夎鏃堕棿锛�">{{ form.installedTime }}</el-form-item> </el-col> <el-col :span="24"> <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }}</el-form-item> - </el-col> - <el-col :span="24"> - <el-form-item label="淇′护鏃跺欢(ms)锛�"></el-form-item> - </el-col> - <el-col :span="24"> - <el-form-item label="瑙嗛鏃跺欢(ms)锛�"></el-form-item> - </el-col> - <el-col :span="24"> - <el-form-item label="鍏抽敭甯ф椂寤�(ms)锛�"></el-form-item> </el-col> </el-row> </el-form> @@ -217,12 +177,8 @@ { key: 0, label: `鏍囩`, visible: true }, { key: 1, label: `鍖哄煙`, visible: true }, { key: 2, label: `璁惧鐘舵�乣, visible: true }, - { key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true }, - { key: 4, label: `鏁版嵁鏃堕棿`, visible: true }, - { key: 5, label: `绠$悊鍗曚綅`, visible: true }, - { key: 6, label: `淇′护鏃跺欢`, visible: true }, - { key: 7, label: `瑙嗛鏃跺欢`, visible: true }, - { key: 8, label: `鍏抽敭甯ф椂寤禶, visible: true } + { key: 3, label: `鏁版嵁鏃堕棿`, visible: true }, + { key: 4, label: `绠$悊鍗曚綅`, visible: true }, ], count: { totalPosts: 0, diff --git a/src/views/system/platform/index.vue b/src/views/system/platform/index.vue index 34d5f02..3bbe042 100644 --- a/src/views/system/platform/index.vue +++ b/src/views/system/platform/index.vue @@ -21,10 +21,6 @@ <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> <p>寮傚父鏁�</p > </div> - <div class="dashboard-item"> - <h3>{{ count.totalViews }}</h3> - <p>鐢熸垚寮傚父宸ュ崟鏁�</p > - </div> </div> </el-col> </el-row> @@ -61,21 +57,7 @@ /> </el-select> </el-form-item> - <el-form-item label="鏄惁鐢熸垚寮傚父宸ュ崟" prop="defaultOrder" label-width="130px"> - <el-select - v-model="queryParams.status" - placeholder="鏄惁鐢熸垚寮傚父宸ュ崟" - clearable - style="width: 170px" - > - <el-option - v-for="dict in dict.type.platform_yes_no" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </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> @@ -139,11 +121,6 @@ <dict-tag :options="dict.type.camera_state" :value="scope.row.status"/> </template> </el-table-column> - <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" width="180"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.status"/> - </template> - </el-table-column> <!-- <el-table-column label="澶囨敞" align="center" prop="remark" /> --> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> @@ -164,7 +141,7 @@ </template> </el-table-column> </el-table> - + <pagination v-show="total>0" :total="total" @@ -409,4 +386,4 @@ .dashboard-item { text-align: center; } -</style> \ No newline at end of file +</style> diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue index 5a84703..578d5c0 100644 --- a/src/views/system/point/index.vue +++ b/src/views/system/point/index.vue @@ -84,7 +84,7 @@ <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="pointName" /> + <el-table-column label="鐐逛綅绫诲瀷" align="center" prop="pointType" /> <el-table-column label="鏍囩" align="center" prop="tag" > <span>{{important}}</span> </el-table-column> diff --git a/src/views/system/report/index.vue b/src/views/system/report/index.vue index 950f1e9..474fafb 100644 --- a/src/views/system/report/index.vue +++ b/src/views/system/report/index.vue @@ -93,7 +93,11 @@ <el-table-column label="鐐逛綅" align="center" prop="pointName" /> <el-table-column label="鎶ュ绫诲瀷" align="center" prop="reportType" /> <el-table-column label="鎶ュ鍐呭" align="center" prop="reportContent" show-overflow-tooltip="true" /> - <el-table-column label="涓婃姤鏉愭枡" align="center" prop="reportMaterials" /> + <el-table-column label="涓婃姤鏉愭枡" align="center" prop="reportMaterials" show-overflow-tooltip="true"> + <template slot-scope="scope"> + <div v-for="(item, index) in scope.row.reportMaterials.split(',')" :key="index">{{ item.substring(item.lastIndexOf("/") + 1) }}</div> + </template> + </el-table-column> <el-table-column label="鏁呴殰绫诲瀷" align="center" prop="errorType" /> <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="auditingTime" width="180"> <template slot-scope="scope"> @@ -169,15 +173,16 @@ <el-option label="璁惧閬楀け" value="璁惧閬楀け"/> </el-select> </el-form-item> - <el-form-item label="鏈夋晥鏃堕棿"> + <el-form-item label="鎶ュ鏃堕棿" prop="expirTime"> <el-date-picker - v-model="expirTime" + v-model="form.expirTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" - start-placeholder="鐢熸晥鏃ユ湡" - end-placeholder="澶辨晥鏃ユ湡" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + @change="handleExpirTimeChange" ></el-date-picker> </el-form-item> <el-form-item label="鎶ュ鍐呭" prop="reportContent"> @@ -222,7 +227,7 @@ <el-input type="textarea" v-html="auditingForm.reportContent" disabled /> </el-form-item> <el-form-item label="涓婃姤鏉愭枡"> - <el-link :href="auditingForm.reportMaterials" :underline="false">{{ auditingForm.reportMaterials }}</el-link> + <el-link v-for="item in auditingForm.reportMaterials != null ? auditingForm.reportMaterials.split(',') : auditingForm.reportMaterials" :underline="false" :key="item" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) }}</el-link> </el-form-item> <el-form-item label="瀹℃牳缁撴灉"> <el-radio-group v-model="auditingForm.status"> @@ -328,7 +333,7 @@ { required: true, message: "璇烽�夋嫨鏁呴殰绫诲瀷", trigger: "blur" } ], expirTime: [ - { required: true, message: "璇烽�夋嫨鏈夋晥鏃堕棿", trigger: "blur" } + { required: true, message: "璇烽�夋嫨鎶ュ鏃堕棿", trigger: "blur" } ], } }; @@ -454,13 +459,14 @@ this.auditingForm = {} }); }, + handleExpirTimeChange() { + if (null != this.form.expirTime && '' != this.form.expirTime) { + this.form["beginCreateTime"] = this.form.expirTime[0]; + this.form["endCreateTime"] = this.form.expirTime[1]; + } + }, /** 鎻愪氦鎸夐挳 */ submitForm() { - - if (null != this.expirTime && '' != this.expirTime) { - this.form["beginCreateTime"] = this.expirTime[0]; - this.form["endCreateTime"] = this.expirTime[1]; - } // todo 鍒ゆ柇鏄簨鍓嶆姤澶� @@ -497,6 +503,10 @@ this.download('report/export', { ...this.queryParams }, `report_${new Date().getTime()}.xlsx`) + }, + /** 涓嬭浇鎸夐挳鎿嶄綔 */ + handleDownload (data) { + this.$download.resource(data); } } }; diff --git a/src/views/system/result/default/index.vue b/src/views/system/result/default/index.vue index cb2b248..24237f5 100644 --- a/src/views/system/result/default/index.vue +++ b/src/views/system/result/default/index.vue @@ -78,6 +78,7 @@ <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> diff --git a/src/views/system/result/detail/detail.vue b/src/views/system/result/detail/detail.vue new file mode 100644 index 0000000..d6f25ac --- /dev/null +++ b/src/views/system/result/detail/detail.vue @@ -0,0 +1,698 @@ +<template> + <div class="app-container"> + <el-page-header @back="goBack" content="璇︽儏椤甸潰"> + </el-page-header> + + <el-container> + <el-main> + <h2>鑰冩牳瑙勫垯</h2> + <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" /> + <el-table-column label="瑙勫垯鏉冮噸" align="center" prop="ruleWeight" /> + <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="handleRuleUpdate(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="getRuleList" + /> + </el-main> + </el-container> + + <el-container> + <el-main> + <h2>鑰冩牳鎴愮哗</h2> + <el-row :gutter="10" class="mb8"> + <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="getRuleList"></right-toolbar> + </el-row> + <el-table v-loading="loading" :data="checkResultList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="鑰冩牳鏃ユ湡" align="center" prop="date" width="120px" fixed/> + <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="target" width="120px"/> + <el-table-column label="骞冲彴鍦ㄧ嚎鐜�(鏉冮噸锛�0.5)" align="center" prop="platformOnline" width="120px"/> + <el-table-column label="涓�鏈轰竴妗e悎鏍肩巼(鏉冮噸锛�0.5)" align="center" prop="monitorQualification" width="120px"/> + <el-table-column label="涓�鏈轰竴妗f敞鍐岀巼(鏉冮噸锛�0.5)" align="center" prop="monitorRegistration" width="120px"/> + <el-table-column label="妗f鑰冩牳姣�(鏉冮噸锛�0.5)" align="center" prop="archivesRate" width="120px"/> + <el-table-column label="鐐逛綅鍦ㄧ嚎鐜�(鏉冮噸锛�1)" align="center" prop="siteOnline" width="120px"/> + <el-table-column label="褰曞儚鍙敤鐜�(鏉冮噸锛�1)" align="center" prop="videoAvailable" width="120px"/> + <el-table-column label="鏍囨敞姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="annotationAccuracy" width="120px"/> + <el-table-column label="鏍℃椂姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="timingAccuracy" width="120px"/> + <el-table-column label="閲嶇偣鐐逛綅鍦ㄧ嚎鐜�(鏉冮噸锛�0.5)" align="center" prop="keySiteOnline" width="120px"/> + <el-table-column label="閲嶇偣鐐逛綅褰曞儚鍙敤鐜�(鏉冮噸锛�0.5)" align="center" prop="keyVideoAvailable" width="120px"/> + <el-table-column label="閲嶇偣鐐逛綅鏍囨敞姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="keyAnnotationAccuracy" width="120px"/> + <el-table-column label="閲嶇偣鐐逛綅鎸夋椂姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="keyTimingAccuracy" width="120px"/> + <el-table-column label="閲嶇偣鎸囨尌鍥惧儚鍏畨閮ㄥ贰妫�缁撴灉(鏉冮噸锛�0.2)" align="center" prop="keyCommandImageInspection" width="120px"/> + <el-table-column label="閲嶇偣鎸囨尌鍥惧儚鐩綍鏍�(鏉冮噸锛�0.8)" align="center" prop="keyCommandImageDirectoryTree" width="120px"/> + <el-table-column label="鍦ㄧ嚎妫�鏌ュ钩鍙伴儴缃插強杩愯鐜�(鏉冮噸锛�0.075)" align="center" prop="onlineInspectionPlatform" width="120px"/> + <el-table-column label="瑙嗛浼犺緭缃戣祫浜у噯纭巼(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionAssetsAccuracy" width="120px"/> + <el-table-column label="瑙嗛浼犺緭缃戣祫浜у急鍙d护寰楀垎姣斾緥(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionAssetsWeakPasswordScore" width="120px"/> + <el-table-column label="瑙嗛浼犺緭缃戝嵄闄╄祫浜у緱鍒嗘瘮閲�(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionDangerousAssetsScore" width="120px"/> + <el-table-column label="瑙嗛浼犺緭缃戣竟鐣屽畬鏁存�ф娴嬫墸鍒嗛」(鏉冮噸锛�0.2)" align="center" prop="videoTransmissionBoundaryIntegrityDetection" width="120px"/> + <el-table-column label="鏈堣繍琛岀巼" align="center" prop="operatingRate"/> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate(scope.row,scope.index)" + >淇敼</el-button> + </template> + </el-table-column> + </el-table> + </el-main> + </el-container> + + <!-- 娣诲姞鎴栦慨鏀硅�冩牳瑙勫垯瀵硅瘽妗� --> + <el-dialog :title="title" :visible.sync="ruleOpen" width="600px" append-to-body> + <el-form ref="form" :model="ruleForm" :rules="rules" label-width="80px"> + <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> + <el-input v-model="ruleForm.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> + </el-form-item> + <el-form-item label="瑙勫垯绫诲瀷" prop="category"> + <el-select v-model="ruleForm.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="ruleForm.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="ruleForm.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="ruleForm.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="ruleForm.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> + + <!-- 瑙勫垯璇︽儏 --> + <el-dialog title="瑙勫垯璇︽儏" :visible.sync="ruleDetailOpen" width="50%" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> + <el-input class="input" disabled v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> + </el-form-item> + <el-form-item label="杩愮淮鍏徃" prop="companyName"> + <el-input class="input" disabled :value ="companyName" placeholder="璇疯緭鍏ヨ繍缁村叕鍙稿悕绉�"></el-input> + </el-form-item> + <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDesc"> + <el-input class="input" disabled v-model="form.ruleDesc" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" /> + </el-form-item> + <el-form-item label="瑙勫垯璁剧疆"> + <div > + <div class="line"> + <div class="line-left">鏃堕挓鍚屾锛堣秴杩嚶�3绉掍负涓嶅悎鏍硷級24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> + <div class="line-right"><el-input disabled v-model="jsonRule.overTime" type="text"/></div>鍒� + </div> + <div class="line"> + <div class="line-left">OSD鏍囪瘑涓嶆弧瓒炽�奊AT 751-2008 瑙嗛鍥惧儚鏂囧瓧鏍囨敞瑙勮寖銆嬶紝24灏忔椂鍐呮湭淇鐨勶細鏍囨墸闄ょ浉鍏抽暅澶存暟閲�*</div> + <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒� + </div> + <div class="line"> + <div class="line-left">鐢ㄦ埛鎶芥锛屼竴鏈轰竴妗f暟鎹」涓嶅悎鏍硷紙鎻愪緵铏氬亣鏁版嵁鎴栭敊璇暟鎹负涓嶅悎鏍硷級锛�24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> + <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒� + </div> + </div> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="cancel">鍏抽棴</el-button> + </div> + </el-dialog> + + <!-- 娣诲姞鎴栦慨鏀硅�冩牳璁″垎瀵硅瘽妗� --> + <el-dialog :title="title" :visible.sync="scoreOpen" width="500px" append-to-body> + <el-form ref="form" :model="scoreForm" :rules="rules" label-width="80px"> + <el-form-item label="鍒嗗��" prop="score"> + <el-input v-model="scoreForm.score" placeholder="璇疯緭鍏ュ垎鍊�" /> + </el-form-item> + <el-form-item label="鑰冩牳鍚�" prop="examineId"> + <el-select v-model="scoreForm.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="unitId"> + <el-select v-model="scoreForm.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="ruleCategory"> + <el-select v-model="scoreForm.ruleCategory" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in ruleCategoryList" + :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 { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; +import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule"; +import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/check-score"; +import {unitSelect} from "@/api/platform/unit"; +import {publishSelect} from "@/api/platform/check-publish"; + +export default { + name: "CheckResult", + dicts: ['platform_audit_state'], + data() { + return { + activeIndex: '1', + activeIndex2: '1', + activeNames: ['1'], + companyName: "鎴愰兘x杩愮淮鍏徃", + detailTitle: '', + detailOpen: false, + detail:{ + }, + examineList: [], + unitList: [ + {id:2,value: '鎴愰兘x杩愮淮'}, + {id:3,value: '鑷祦浜曞尯'}, + ], + ruleCategoryList: [ + { id: 1, value: '瑙嗛鍦ㄧ嚎鐜�' }, + { id: 2, value: '瀛樺偍鏁呴殰' }, + { id: 3, value: '瑙嗗浘搴撳鎺ョǔ瀹氭��' }, + { id: 4, value: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�' }, + { id: 5, value: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�' }, + ], + 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' + }], + // 杩愮淮绫诲瀷 + categoryList: [ + { id: 1, value: '瑙嗛鐩戞帶' }, + { id: 2, value: '杞﹁締璇嗗埆' }, + { id: 3, value: '浜鸿劯璇嗗埆' }, + ], + manualScoreOpen: false, + manualScoreForm: {}, + manualScoreTitle: '', + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁 + checkResultList: [ + { + date: '2024-04-02', + target: '鑷祦浜曞尯', + platformOnline: '97%', + monitorQualification: '97%', + monitorRegistration: '97%', + archivesRate: '97%', + siteOnline: '97%', + videoAvailable: '97%', + annotationAccuracy: '97%', + timingAccuracy: '97%', + keySiteOnline: '97%', + keyVideoAvailable: '97%', + keyAnnotationAccuracy: '97%', + keyTimingAccuracy: '97%', + keyCommandImageInspection: '97%', + keyCommandImageDirectoryTree: '97%', + onlineInspectionPlatform: '97%', + videoTransmissionAssetsAccuracy: '97%', + videoTransmissionAssetsWeakPasswordScore: '97%', + videoTransmissionDangerousAssetsScore: '97%', + videoTransmissionBoundaryIntegrityDetection: '97%', + operatingRate: '97%', + }, + { + date: '2024-04-03', + target: '鑷祦浜曞尯', + platformOnline: '97%', + monitorQualification: '97%', + monitorRegistration: '97%', + archivesRate: '97%', + siteOnline: '97%', + videoAvailable: '97%', + annotationAccuracy: '97%', + timingAccuracy: '97%', + keySiteOnline: '97%', + keyVideoAvailable: '97%', + keyAnnotationAccuracy: '97%', + keyTimingAccuracy: '97%', + keyCommandImageInspection: '97%', + keyCommandImageDirectoryTree: '97%', + onlineInspectionPlatform: '97%', + videoTransmissionAssetsAccuracy: '97%', + videoTransmissionAssetsWeakPasswordScore: '97%', + videoTransmissionDangerousAssetsScore: '97%', + videoTransmissionBoundaryIntegrityDetection: '97%', + operatingRate: '97%', + } + + ], + scoreTotal: 3, + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + scoreOpen: false, + ruleOpen: false, + ruleDetailOpen: false, + // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 + daterangeCheckTime: [], + + // 琛ㄥ崟鍙傛暟 + form: {}, + scoreForm: {}, + ruleForm: {}, + jsonRule: {}, + // 鑰冩牳瑙勫垯鍒楄〃 + ruleList: [ + {ruleName: '骞冲彴鍦ㄧ嚎鐜�',ruleWeight: 0.5}, + {ruleName: '涓�鏈轰竴妗e悎鏍肩巼',ruleWeight: 0.5}, + {ruleName: '涓�鏈轰竴妗e湪绾跨巼',ruleWeight: 0.5}, + ], + // 鑰冩牳璁″垎琛ㄦ牸鏁版嵁 + scoreList: [], + //杩濈害瑙勫垯璇锋眰鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + ruleName: null, + ruleStatus: null, + createTime: null, + }, + //鑰冩牳鍒嗘暟璇锋眰鍙傛暟 + scoreQueryParams: { + pageNum: 1, + pageSize: 10, + examineCategory: 2, + }, + pickerOptions: { + disabledDate(time) { + return time.getTime() > Date.now(); + }, + shortcuts: [{ + text: '浠婂ぉ', + onClick(picker) { + picker.$emit('pick', new Date()); + } + }, { + text: '鏄ㄥぉ', + onClick(picker) { + const date = new Date(); + date.setTime(date.getTime() - 3600 * 1000 * 24); + picker.$emit('pick', date); + } + }, { + text: '涓�鍛ㄥ墠', + onClick(picker) { + const date = new Date(); + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit('pick', date); + } + }] + }, + value1: '', + value2: '', + // 琛ㄥ崟鏍¢獙 + rules: { + } + }; + }, + created() { + //鑰冩牳鎴愮哗璇︽儏璺宠浆鍙傛暟鎺ユ敹 + if(this.$route.query.detail){ + this.detail = this.$route.query.detail + console.log(this.$route.query.detail,"detail------------") + } + // 鑰冩牳瑙勫垯鍒楄〃 + // this.getRuleList(); + // 鑰冩牳绉垎鍒楄〃 + this.getScoreList(); + // this.selectUnit(); + this.selectExamine(); + }, + methods: { + handleChange(val) { + console.log(val); + }, + // 杩愮淮鍏徃涓嬫媺鏁版嵁 + // selectUnit() { + // unitSelect().then(res => { + // this.unitList = res.data; + // }) + // }, + // 鑰冩牳涓嬫媺鏁版嵁 + selectExamine() { + publishSelect().then(res => { + this.examineList = res.data; + }) + }, + /** 鏌ヨ鑰冩牳璁″垎鍒楄〃 */ + getScoreList() { + this.loading = true; + listScore(this.scoreQueryParams).then(response => { + this.scoreList = response.rows; + this.loading = false; + }); + }, + /** 鏌ヨ杩濈害瑙勫垯鍒楄〃 */ + getRuleList() { + 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.ruleList = response.data; + this.total = response.total; + this.loading = false; + }); + }, + 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 "甯傚眬鑰冩牳" + } + }, + /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ + getCheckResult() { + this.loading = true; + getCheckResult(id).then(response => { + this.detail = response.data; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.scoreOpen = false; + this.ruleOpen = false; + this.ruleDetailOpen = false; + this.ruleDetailOpen = 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; + }, + + 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 = "娣诲姞鑰冩牳缁撴灉"; + }, + /** 淇敼绉垎鎸夐挳鎿嶄綔 */ + handleScoreUpdate(row) { + this.reset(); + const id = row.id || this.ids + getScore(id).then(response => { + this.scoreForm = response.data; + this.scoreOpen = true; + this.title = "淇敼鑰冩牳璁″垎"; + }); + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleRuleUpdate(row) { + this.reset(); + const id = row.id || this.ids + getCheckRule(id).then(response => { + this.ruleForm = response.data; + this.ruleOpen = true; + this.title = "淇敼鑰冩牳瑙勫垯"; + + }); + }, + // 璇︽儏鎸夐挳 + handleRuleDetail(row) { + this.ruleDetailOpen = true; + this.form = row; + this.jsonRule = JSON.parse(this.form.ruleDetail); + }, + /** 鎻愪氦鎸夐挳 */ + 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`) + }, + handleSelect(key, keyPath) { + console.log(key, keyPath); + }, + } +}; +</script> +<style scoped> + +.line { + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; +} + +.line-right { + width: 50px; +} +.input{ + width: 200px; +} + +.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; +} +.header-container { + display: flex; + align-items: center; /* 鍨傜洿灞呬腑 */ +} + +.header-container h2 { + margin-right: 10px; /* 鏍规嵁闇�瑕佽皟鏁存爣棰樺拰鑿滃崟涔嬮棿鐨勯棿璺� */ +} + +</style> diff --git a/src/views/system/result/detail/index1.vue b/src/views/system/result/detail/index1.vue new file mode 100644 index 0000000..6417889 --- /dev/null +++ b/src/views/system/result/detail/index1.vue @@ -0,0 +1,329 @@ +<template> + <div style="padding: 5px"> + <div> + <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" style="margin-bottom: 10px"> + <el-menu-item index="1">鐪佸巺鑰冩牳</el-menu-item> + <el-menu-item index="2">鍖哄煙鑰冩牳</el-menu-item> + </el-menu> + </div> + + <div class="data-chart-container"> + <el-card class="data-card" :body-style="{ height: '100%' }"> + <div class="card-content"> + <div class="title-container"> + <h1>鑰冩牳鎴愮哗</h1> + </div> + <div class="chart-container"> + <div id="chartContent" ref="chartContent"></div> + </div> + </div> + </el-card> + </div> + + <div style="margin-top: 35px"> + <el-table + :data="tableData" + style="width: 100%"> + <el-table-column + label="鑰冩牳鏃堕棿" + prop="time" + align="center"> + </el-table-column> + <el-table-column + label="鏍囩" + prop="tag" + align="center"> + </el-table-column> + <el-table-column + label="鑰冩牳绫诲瀷" + prop="category" + align="center"> + </el-table-column> + <el-table-column + label="鑰冩牳棰戠巼" + prop="frequency" + align="center"> + </el-table-column> + <el-table-column + label="鍒嗘暟" + prop="score" + align="center"> + </el-table-column> + <el-table-column + label="鐘舵��" + prop="state" + align="center"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.platform_examine_use" :value="scope.row.state"/> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button size="small" type="text" v-show="scope.row.publish != 1">纭鍙戝竷</el-button> + <el-button size="small" type="text" v-show="scope.row.publish == 1">鍙栨秷鍙戝竷</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-view" + @click="handleDetail(scope.row,scope.index)" + >璇︾粏</el-button> + </template> + </el-table-column> + </el-table> + </div> + + <div style="text-align: right; margin-top: 10px"> + <el-pagination + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="currentPage4" + :page-sizes="[5, 10, 20]" + :page-size="5" + layout="total, sizes, prev, pager, next, jumper" + :total="4"> + </el-pagination> + </div> + + </div> +</template> + +<script> +import * as echarts from 'echarts'; +let lineChart = null; +let observer = null; +export default { + name: 'index', + dicts: ['platform_examine_use'], + data() { + return { + activeIndex: '1', + activeIndex2: '1', + dateRange: '', + company: '', + dataList: [ + { + name: '鍏ㄩ儴', + complete: { '4.5': 95.5, '4.6': 95.3, '4.7': 96.0, '4.8': 97.2, '4.9': 96.5 , + '4.10': 95.5, '4.11': 95.3, '4.12': 96.0, '4.13': 97.2, '4.14': 96.5 }, + waiting: { '4.5': 94.8, '4.6': 91.3, '4.7': 95.3, '4.8': 92.3, '4.9': 93.3, + '4.10': 94.8, '4.11': 91.3, '4.12': 95.3, '4.13': 92.3, '4.14': 93.3 }, + pending: { '4.5': 91.6, '4.6': 92.6, '4.7': 93.7, '4.8': 94.0, '4.9': 95.9 + ,'4.10': 91.6, '4.11': 92.6, '4.12': 93.7, '4.13': 94.0, '4.14': 95.9 } + } + ], + tableData: [ + { + time: '2024-04-15', + tag: '鐪佸巺鑰冩牳', + category: '杞﹁締鑰冩牳', + frequency: '鏈堝害鑰冩牳', + score: '96.5', + state: '0', + publish: '0' + }, + { + time: '2024-04-15', + tag: '鐪佸巺鑰冩牳', + category: '浜鸿劯鑰冩牳', + frequency: '鏈堝害鑰冩牳', + score: '93.3', + state: '0', + publish: '0' + }, + { + time: '2024-04-15', + tag: '鐪佸巺鑰冩牳', + category: '瑙嗛鑰冩牳', + frequency: '鏈堝害鑰冩牳', + score: '95.9', + state: '0', + publish: '0' + }, + { + time: '2024-04-14', + tag: '鐪佸巺鑰冩牳', + category: '杞﹁締鑰冩牳', + frequency: '鏈堝害鑰冩牳', + score: '96.5', + state: '1', + publish: '1' + }, + ], + searchForm: { + time: null, + } + } + }, + methods: { + + handleSizeChange(val) { + console.log(`姣忛〉 ${val} 鏉); + }, + handleCurrentChange(val) { + console.log(`褰撳墠椤�: ${val}`); + }, + handleDetail(index, row) { + console.log(index, row); + this.$router.push("/examine/detail/detail") + }, + handleDelete(index, row) { + console.log(index, row); + }, + initChart() { + const option = { + legend: { + right: 'right', + top: 'top', + icon: 'rect', + orient: "vertical", + data: [ + { + name: '杞﹁締鑰冩牳', + itemStyle: { + color: 'rgba(62, 144, 247, 1)' + } + }, + { + name: '浜鸿劯鑰冩牳', + itemStyle: { + color: 'rgba(85, 192, 191, 1)' + } + }, + { + name: '瑙嗛鑰冩牳', + itemStyle: { + color: 'rgba(255, 165, 0, 1)' + } + }, + ], + }, + grid: { + left: 0, + right: 0, + bottom: 0, + top: '20%', + containLabel: true + }, + tooltip: {}, + xAxis: { + type: 'category', + data: Object.keys(this.acitveData.complete), + }, + yAxis: { + min: 90, + }, + series: [ + { + name: '杞﹁締鑰冩牳', + data: Object.entries(this.acitveData.complete).map(([key, value]) => value), + type: 'line', + itemStyle: { + color: 'rgba(62, 144, 247, 1)' + } + }, + { + name: '浜鸿劯鑰冩牳', + data: Object.entries(this.acitveData.waiting).map(([key, value]) => value), + type: 'line', + itemStyle: { + color: 'rgba(85, 192, 191, 1)' + } + }, + { + name: '瑙嗛鑰冩牳', + data: Object.entries(this.acitveData.pending).map(([key, value]) => value), + type: 'line', + itemStyle: { + color: 'rgba(255, 165, 0, 1)' + } + } + ] + }; + lineChart.setOption(option, true); + }, + + + // 鐩戝惉鍙樺寲 + observe() { + if (!observer) { + observer = new ResizeObserver(entries => { + this.handleResize(); + }) + } + observer.observe(this.$refs.chartContent); + }, + // 绐楀彛鍙樻崲 + handleResize() { + if (lineChart) { + lineChart.resize(); + } + } + + }, + mounted() { + this.acitveData = this.dataList[0]; + this.company = this.acitveData.name; + lineChart = echarts.init(this.$refs.chartContent); + this.initChart(); + this.observe(); + }, + beforeDestroy() { + if (lineChart) { + lineChart.dispose(); + observer.unobserve(this.$refs.chartContent); + } + }, + handleSelect(key, keyPath) { + console.log(key, keyPath); + }, +} +</script> + +<style lang="scss" scoped> +.data-chart-container { + height: 400px; + margin-bottom: 20px; + + .data-card { + height: 100%; + + .card-content { + width: 100%; + height: 100%; + position: relative; + } + } +} + +.title-container { + position: absolute; + display: flex; + justify-content: space-between; + align-items: center; + z-index: 2; + + + .more-button { + cursor: pointer; + font-size: 16px; + padding: 0 10px; + } +} + +.chart-container { + + width: 100%; + height: 100%; + + #chartContent { + width: 100%; + height: 100%; + } +} + +.select-container { + margin: 0 20px; + width: 180px; +} + +</style> diff --git a/src/views/system/result/index.vue b/src/views/system/result/index.vue index 0d78705..2ef8485 100644 --- a/src/views/system/result/index.vue +++ b/src/views/system/result/index.vue @@ -1,6 +1,23 @@ <template> <div id="warp"> - <el-row> + <div class="data-chart-container"> + <el-card class="data-card" :body-style="{ height: '100%' }"> + <div class="card-content"> + <div class="title-container"> + <h1>鑰冩牳鎴愮哗</h1> + <div class="select-container"> + <el-date-picker v-model="date" type="date" placeholder="閫夋嫨鏃ユ湡"> + </el-date-picker> + </div> + </div> + + <div class="echart-container"> + <div id="barChart" ref="barChart"></div> + </div> + </div> + </el-card> + </div> + <el-row :gutter="100"> <el-col :span="6"> <div class="city-warp"> <div class="city"> @@ -8,6 +25,9 @@ 鑷祦浜� </div> <div class="score-warp"> + <div class="score-item"> + <div style="font-size: 15px;margin-bottom: 15px">2024骞�4鏈�12鏃�</div> + </div> <div class="score-item"> <div>瑙嗛锛�</div> <div class="score">99.5</div> @@ -17,7 +37,7 @@ <div class="score">87</div> </div> <div class="score-item"> - <div>鐩戞帶锛�</div> + <div>杞﹁締锛�</div> <div class="score">94</div> </div> </div> @@ -36,6 +56,9 @@ </div> <div class="score-warp"> <div class="score-item"> + <div style="font-size: 15px;margin-bottom: 15px">2024骞�4鏈�12鏃�</div> + </div> + <div class="score-item"> <div>瑙嗛锛�</div> <div class="score">99.5</div> </div> @@ -44,9 +67,10 @@ <div class="score">87</div> </div> <div class="score-item"> - <div>鐩戞帶锛�</div> + <div>杞﹁締锛�</div> <div class="score">94</div> </div> + </div> <div class="bottom-publish"> <el-button size="medium" type="success">鍙戝竷</el-button> @@ -63,6 +87,9 @@ </div> <div class="score-warp"> <div class="score-item"> + <div style="font-size: 15px;margin-bottom: 15px">2024骞�4鏈�12鏃�</div> + </div> + <div class="score-item"> <div>瑙嗛锛�</div> <div class="score">99.5</div> </div> @@ -71,9 +98,10 @@ <div class="score">87</div> </div> <div class="score-item"> - <div>鐩戞帶锛�</div> + <div>杞﹁締锛�</div> <div class="score">94</div> </div> + </div> <div class="bottom-publish"> <el-button size="medium" type="success">鍙戝竷</el-button> @@ -90,6 +118,9 @@ </div> <div class="score-warp"> <div class="score-item"> + <div style="font-size: 15px;margin-bottom: 15px">2024骞�4鏈�12鏃�</div> + </div> + <div class="score-item"> <div>瑙嗛锛�</div> <div class="score">99.5</div> </div> @@ -98,9 +129,10 @@ <div class="score">87</div> </div> <div class="score-item"> - <div>鐩戞帶锛�</div> + <div>杞﹁締锛�</div> <div class="score">94</div> </div> + </div> <div class="bottom-publish"> <el-button size="medium" type="success">鍙戝竷</el-button> @@ -113,7 +145,7 @@ </el-row> - <el-row style="margin-top: 30px"> + <el-row style="margin-top: 30px" :gutter="100"> <el-col :span="6"> <div class="city-warp"> <div class="city"> @@ -121,6 +153,9 @@ 楂樻柊鍖� </div> <div class="score-warp"> + <div class="score-item"> + <div style="font-size: 15px;margin-bottom: 15px">2024骞�4鏈�12鏃�</div> + </div> <div class="score-item"> <div>瑙嗛锛�</div> <div class="score">99.5</div> @@ -130,7 +165,7 @@ <div class="score">87</div> </div> <div class="score-item"> - <div>鐩戞帶锛�</div> + <div>杞﹁締锛�</div> <div class="score">94</div> </div> </div> @@ -149,6 +184,9 @@ </div> <div class="score-warp"> <div class="score-item"> + <div style="font-size: 15px;margin-bottom: 15px">2024骞�4鏈�12鏃�</div> + </div> + <div class="score-item"> <div>瑙嗛锛�</div> <div class="score">99.5</div> </div> @@ -157,7 +195,7 @@ <div class="score">87</div> </div> <div class="score-item"> - <div>鐩戞帶锛�</div> + <div>杞﹁締锛�</div> <div class="score">94</div> </div> </div> @@ -176,6 +214,9 @@ </div> <div class="score-warp"> <div class="score-item"> + <div style="font-size: 15px;margin-bottom: 15px">2024骞�4鏈�12鏃�</div> + </div> + <div class="score-item"> <div>瑙嗛锛�</div> <div class="score">99.5</div> </div> @@ -184,9 +225,10 @@ <div class="score">87</div> </div> <div class="score-item"> - <div>鐩戞帶锛�</div> + <div>杞﹁締锛�</div> <div class="score">94</div> </div> + </div> <div class="bottom-publish"> <el-button size="medium" type="success">鍙戝竷</el-button> @@ -201,22 +243,93 @@ </template> <script> +import * as echarts from 'echarts'; +let observer = null; +let chart = null; export default { name: 'index', data() { return { - + activeIndex: '1', + activeIndex2: '1', + date: '', + company: '', + dataList: { + name: ['瀵岄『鍘�', '鑽e幙', '楂樻柊鍖�', '鑷祦浜曞尯', '璐′簳鍖�', '澶у畨鍖�', '娌挎哗鍖�'], + data1: [95, 96, 97, 95, 94.5, 93.6, 94.5], + data2: [93.7, 93.5, 94.3, 96.5, 95.3, 94.2, 93.3], + data3: [98.3, 94.3, 93.3, 95.5, 96.8, 96.1, 95.8], + }, } }, methods: { jumpDetail() { this.$router.push("/examine/detail") + }, + initEchart() { + const option = { + grid: { + left: 0, + right: 0, + bottom: 0, + top: '20%', + containLabel: true + }, + legend: { + right: 'right', + top: 'top', + icon: 'rect', + orient: "vertical", + }, + tooltip: {}, + xAxis: { + type: 'category', + axisLabel: { + }, + data: this.dataList.name + }, + yAxis: { + min: 90, + }, + series: [ + { + type: 'bar', + name: '瑙嗛鑰冩牳', + data: this.dataList.data1, + itemStyle: { + color: 'rgba(255, 165, 0, 1)' + } + }, + { + type: 'bar', + name: '浜鸿劯鑰冩牳', + data: this.dataList.data2, + itemStyle: { + color: 'rgba(85, 192, 191, 1)' + } + }, + { + type: 'bar', + name: '杞﹁締鑰冩牳', + data: this.dataList.data3, + itemStyle: { + color: 'rgba(62, 144, 247, 1)' + } + }, + ] + } + chart.setOption(option, true); + } + }, + mounted() { + chart = echarts.init(this.$refs.barChart); + this.initEchart(); } } </script> -<style scoped> +<style lang = "scss" scoped> .score-warp { display: flex; flex-direction: column; @@ -227,6 +340,7 @@ .score-item { display: flex; flex-direction: row; + } .score { width: 60px; @@ -258,6 +372,48 @@ } .title { font-size: larger; - margin-bottom: 25px; + margin-bottom: 5px; +} +.data-chart-container { + height: 400px; + margin-bottom: 20px; + + .data-card { + height: 100%; + + .card-content { + width: 100%; + height: 100%; + position: relative; + } + } +} +.title-container { + position: absolute; + display: flex; + justify-content: space-between; + align-items: center; + z-index: 2; + + + .more-button { + cursor: pointer; + font-size: 16px; + padding: 0 10px; + } +} + +.echart-container { + width: 100%; + height: 100%; + + #barChart { + width: 100%; + height: 100%; + } +} +.select-container { + margin: 0 20px; + width: 180px; } </style> diff --git a/src/views/system/rule/default/index.vue b/src/views/system/rule/default/index.vue index 2cf4c33..1a6dacd 100644 --- a/src/views/system/rule/default/index.vue +++ b/src/views/system/rule/default/index.vue @@ -85,21 +85,18 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['system:rule:edit']" >淇敼</el-button> <el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)" - v-hasPermi="['system:rule:add']" >鏂板</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" - v-hasPermi="['system:rule:remove']" >鍒犻櫎</el-button> </template> </el-table-column> diff --git a/src/views/system/score/city/index.vue b/src/views/system/score/index.vue similarity index 100% rename from src/views/system/score/city/index.vue rename to src/views/system/score/index.vue diff --git a/src/views/system/template/default/index.vue b/src/views/system/template/default/index.vue index 418ad37..516bdac 100644 --- a/src/views/system/template/default/index.vue +++ b/src/views/system/template/default/index.vue @@ -154,7 +154,7 @@ </div> </div> <div class="row-right"> - <div>鏁板��</div> + <div>鎵e垎绯绘暟</div> <div class="margin-5"> <el-input type="number" v-model="form.weight"/> </div> diff --git a/src/views/system/template/index.vue b/src/views/system/template/index.vue index 9fe7f3c..e1480c5 100644 --- a/src/views/system/template/index.vue +++ b/src/views/system/template/index.vue @@ -88,12 +88,11 @@ <el-card class="box-card" v-for="item in checkTemplateList" :key="item"> <div class="text item">妯℃澘鍚嶇О锛歿{ item.templateName }}</div> - <div class="text item">鑰冩牳绫诲瀷锛歿{ item.examineCategory == 0 ? '鐪佸巺鑰冩牳' : '鍖哄煙鑰冩牳' }}</div> + <div class="text item">鑰冩牳绫诲瀷锛歿{ item.examineCategory == 0 ? '鐪佸巺鑰冩牳' : '甯傚眬鑰冩牳' }}</div> <div class="text item">鑰冩牳瀵硅薄锛歿{ item.deptId }}</div> - <div class="text item">鍙戝竷鐘舵�侊細{{ item.status == 0 ? '鍚敤' : '鍋滅敤' }}</div> + <div class="text item">浣跨敤鐘舵�侊細{{ item.status == 0 ? '鍚敤' : '鍋滅敤' }}</div> <div class="bottom clearfix"> - <el-button type="text" class="button" @click="">瀹℃牳</el-button> - <el-button type="text" class="button" @click="">鍙戝竷</el-button> + <el-button type="text" class="button" @click="">鍚敤</el-button> <el-button type="text" class="button" @click="">澶嶅埗</el-button> <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button> <el-button type="text" class="button" @click="handleDelete(item)">鍒犻櫎</el-button> diff --git a/src/views/system/threshold/index.vue b/src/views/system/threshold/index.vue index 5b536ca..2f3d7f1 100644 --- a/src/views/system/threshold/index.vue +++ b/src/views/system/threshold/index.vue @@ -1,18 +1,18 @@ <template> <div class="app-container"> - <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="['ycl:threshold:add']" - >鏂板 - </el-button> - </el-col> - </el-row> +<!-- <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="['ycl:threshold:add']"--> +<!-- >鏂板--> +<!-- </el-button>--> +<!-- </el-col>--> +<!-- </el-row>--> <el-table v-loading="loading" :data="thresholdList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center"/> @@ -26,15 +26,17 @@ <el-table-column label="瓒呮椂澶╂暟" align="center" prop="timeout"/> <el-table-column label="宸ュ崟闃堝��" align="center" prop="indicator"> <template slot-scope="scope"> - <div v-for="item in JSON.parse(scope.row.indicator)" :key="item"> - {{ item.label }}锛歿{ item.value }} + <div v-for="item in JSON.parse(scope.row.indicator)" :key="item" style="display: flex;flex-direction: row"> + <div style="width: 120px;text-align: right">{{ item.label }}</div> + <div style="width: 60px;text-align: right">{{ item.value}}</div> </div> </template> </el-table-column> <el-table-column label="涓嬪彂闃堝��" align="center" prop="indicator"> <template slot-scope="scope"> - <div v-for="item in JSON.parse(scope.row.indicator)" :key="item"> - {{ item.label }}锛歿{ item.value2 }} + <div v-for="item in JSON.parse(scope.row.indicator)" :key="item" style="display: flex;flex-direction: row"> + <div style="width: 120px;text-align: right">{{ item.label }}</div> + <div style="width: 60px;text-align: right">{{ item.value2}}</div> </div> </template> </el-table-column> @@ -48,14 +50,14 @@ v-hasPermi="['ycl:threshold:edit']" >淇敼 </el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['ycl:threshold:remove']" - >鍒犻櫎 - </el-button> +<!-- <el-button--> +<!-- size="mini"--> +<!-- type="text"--> +<!-- icon="el-icon-delete"--> +<!-- @click="handleDelete(scope.row)"--> +<!-- v-hasPermi="['ycl:threshold:remove']"--> +<!-- >鍒犻櫎--> +<!-- </el-button>--> </template> </el-table-column> </el-table> @@ -334,7 +336,7 @@ } </script> <style> -.el-input-half-width { - width: calc(50% - 6px); /* 鍑忓幓涓�浜涢棿闅� */ +.el-input-half-width { + width: calc(50% - 6px); /* 鍑忓幓涓�浜涢棿闅� */ } -</style> \ No newline at end of file +</style> diff --git a/src/views/system/unit/index.vue b/src/views/system/unit/index.vue index 4409bfa..1cf35f6 100644 --- a/src/views/system/unit/index.vue +++ b/src/views/system/unit/index.vue @@ -123,7 +123,7 @@ <el-input v-model="form.unitName" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�" /> </el-form-item> <el-form-item label="鍗曚綅璐﹀彿" prop="unitAdminAccount"> - <el-input v-model="form.unitAdminAccount" placeholder="璇疯緭鍏ュ崟浣嶇鐞嗗憳璐﹀彿" /> + <el-input v-model="form.unitAdminAccount" placeholder="璇疯緭鍏ュ崟浣嶇鐞嗗憳璐﹀彿" :disabled="account" /> </el-form-item> <el-form-item label="鍗曚綅鑱旂郴浜�" prop="unitContact"> <el-input v-model="form.unitContact" placeholder="璇疯緭鍏ュ崟浣嶈仈绯讳汉" /> @@ -150,6 +150,8 @@ name: "Unit", data() { return { + // 璐﹀彿涓嶅彲淇敼 + account: true, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -274,12 +276,14 @@ }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { + this.account = false; this.reset(); this.open = true; this.title = "娣诲姞杩愮淮鍗曚綅"; }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { + this.account = true; this.reset(); const id = row.id || this.ids getUnit(id).then(response => { diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue index ad79c56..fd607ab 100644 --- a/src/views/system/work-order/index.vue +++ b/src/views/system/work-order/index.vue @@ -16,6 +16,14 @@ <el-option label="璁惧閬楀け" value="璁惧閬楀け"></el-option> </el-select> </el-form-item> + <el-form-item label="瀹℃牳鐘舵��" prop="status"> + <el-select v-model="queryParams.status" placeholder="瀹℃牳鐘舵��" clearable @clear="handleQuery"> + <el-option label="宸蹭笅鍙�" value="DISTRIBUTED"></el-option> + <el-option label="杩愮淮宸插鐞�" value="YW_HANDLE"></el-option> + <el-option label="瀹℃牳閫氳繃" value="AUDITING_SUCCESS"></el-option> + <el-option label="瀹℃牳涓嶉�氳繃" value="AUDITING_FAIL"></el-option> + </el-select> + </el-form-item> <el-form-item label="杩愮淮澶勭悊鏃堕棿"> <el-date-picker clearable @@ -67,17 +75,6 @@ type="text" @click="handleYwCondition(item)" >杩愮淮鎯呭喌</el-button> - <!-- <el-button--> - <!-- size="mini"--> - <!-- type="text"--> - <!-- @click="handleYwResult(scope.row)"--> - <!-- >杩愮淮缁撴灉</el-button>--> -<!-- <el-button--> -<!-- size="mini"--> -<!-- type="text"--> -<!-- @click="handleCheckResult(item)"--> -<!-- v-hasPermi="['work:order:result']"--> -<!-- >妫�娴嬬粨鏋�</el-button>--> <el-button size="mini" type="text" @@ -142,9 +139,15 @@ <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> <el-input v-model="auditingForm.ywPeopleName" disabled /> </el-form-item> + <el-form-item label="鐜板満鎯呭喌" v-if="auditingForm.condition"> + <el-input type="textarea" v-html="auditingForm.condition" disabled /> + </el-form-item> + <el-form-item label="浣愯瘉鏉愭枡" v-if="auditingForm.proofMaterials"> + <el-link v-for="item in auditingForm.proofMaterials != null ? auditingForm.proofMaterials.split(',') : auditingForm.proofMaterials" :underline="false" :key="item" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) }}</el-link> + </el-form-item> <el-form-item label="瀹℃牳缁撴灉" prop="auditingResult"> - <el-radio v-model="auditingForm.auditingResult" label="pass">閫氳繃</el-radio> - <el-radio v-model="auditingForm.auditingResult" label="return">椹冲洖</el-radio> + <el-radio v-model="auditingForm.auditingResult" label="AUDITING_SUCCESS">閫氳繃</el-radio> + <el-radio v-model="auditingForm.auditingResult" label="AUDITING_FAIL">椹冲洖</el-radio> </el-form-item> <el-form-item label="瀹℃牳澶囨敞" prop="auditingRemark"> <el-input v-model="auditingForm.auditingRemark" type="textarea" maxlength="30" show-word-limit/> @@ -157,7 +160,7 @@ </el-dialog> <el-dialog title="杩愮淮鎯呭喌璁板綍" :visible.sync="ywConditionOpen" width="500px" append-to-body> - <el-form ref="ywConditionForm" :model="ywConditionForm" :rules="ywConditionRules" label-width="80px"> + <el-form ref="form" :model="form" :rules="ywConditionRules" label-width="80px"> <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> <el-input v-model="ywConditionForm.workOrderNo" disabled /> </el-form-item> @@ -167,36 +170,11 @@ <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> <el-input v-model="ywConditionForm.ywPeopleName" disabled /> </el-form-item> - <el-form-item label="鐜板満鍥剧墖" prop="picture"> - <el-upload - class="avatar-uploader" - action="/dev-api/common/upload" - name="file" - :headers="{'Authorization': 'Bearer ' + getToken()}" - :on-success="pictureUploadSuccess" - :on-remove="pictureRemove" - :file-list="pictureList" - list-type="picture"> - <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> - <div slot="tip" class="el-upload__tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div> - </el-upload> + <el-form-item label="鐜板満鎯呭喌" prop="ywCondition"> + <editor v-model="form.ywCondition" :min-height="192"/> </el-form-item> - <el-form-item label="浣愯瘉鏉愭枡" prop="certificates"> - <el-upload - class="avatar-uploader" - action="/dev-api/common/upload" - name="file" - :headers="{'Authorization': 'Bearer ' + getToken()}" - :on-success="certificateUploadSuccess" - :on-remove="certificateRemove" - :file-list="certificateList" - list-type="picture"> - <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> - <div slot="tip" class="el-upload__tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div> - </el-upload> - </el-form-item> - <el-form-item label="杩愮淮鎯呭喌" prop="ywCondition"> - <el-input v-model="ywConditionForm.ywCondition" type="textarea" maxlength="150" show-word-limit/> + <el-form-item label="浣愯瘉鏉愭枡" prop="ywProofMaterials"> + <file-upload v-model="form.ywProofMaterials"/> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -206,80 +184,10 @@ </el-dialog> - <el-dialog title="杩愮淮缁撴灉璁板綍" :visible.sync="ywResultOpen" width="500px" append-to-body> - <el-form ref="ywResultForm" :model="ywResultForm" :rules="ywResultRules" label-width="80px"> - <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> - <el-input v-model="ywResultForm.workOrderNo" disabled /> - </el-form-item> - <el-form-item label="杩愮淮鍗曚綅" prop="unitName"> - <el-input v-model="ywResultForm.unitName" disabled /> - </el-form-item> - <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> - <el-input v-model="ywResultForm.ywPeopleName" disabled /> - </el-form-item> - <el-form-item label="杩愮淮缁撴灉" prop="ywResult"> - <el-input v-model="ywResultForm.ywResult" type="textarea" maxlength="150" show-word-limit/> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitYwResult">纭� 瀹�</el-button> - <el-button @click="cancelYwResult">鍙� 娑�</el-button> - </div> - </el-dialog> - - <el-dialog title="杩愮淮妫�娴嬬粨鏋�" :visible.sync="checkResultOpen" width="550px" append-to-body> - <el-form ref="ywResultForm" :model="checkResultForm" :rules="checkResultRules" label-width="120px"> - <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> - <el-input v-model="checkResultForm.workOrderNo" disabled /> - </el-form-item> - <el-form-item label="杩愮淮鍗曚綅" prop="unitName"> - <el-input v-model="checkResultForm.unitName" disabled /> - </el-form-item> - <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> - <el-input v-model="checkResultForm.ywPeopleName" disabled /> - </el-form-item> - <el-form-item label="杩愮淮妫�娴嬬粨鏋�" prop="ywCheckResult"> - <file-upload v-model="checkResultForm.ywCheckResult"/> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitYwResult">纭� 瀹�</el-button> - <el-button @click="cancelCheckResult">鍙� 娑�</el-button> - </div> - </el-dialog> - - <!-- 娣诲姞鎴栦慨鏀硅繍缁村伐鍗曞璇濇 --> - <el-dialog :title="title" :visible.sync="open" width="550px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> - <el-input v-model="form.workOrderNo" placeholder="璇疯緭鍏ュ伐鍗曞彿" /> - </el-form-item> - <el-form-item label="杩愮淮澶勭悊鏃堕棿" prop="ywHandleTime"> - <el-date-picker clearable - v-model="form.ywHandleTime" - type="date" - value-format="yyyy-MM-dd" - placeholder="璇烽�夋嫨杩愮淮澶勭悊鏃堕棿"> - </el-date-picker> - </el-form-item> - <el-form-item label="杩愮淮鎯呭喌" prop="ywCondition"> - <el-input v-model="form.ywCondition" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> - </el-form-item> - <el-form-item label="杩愮淮妫�娴嬬粨鏋�" prop="ywCheckResult"> - <el-input v-model="form.ywCheckResult" type="textarea" 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> - - <!-- 杩囩▼鍥� --> <el-dialog title="杩囩▼鍥�" :visible.sync="flowOpen" width="1200px" :close-on-click-modal="false" append-to-body> <div> - <el-steps :active="2" :space="500"> + <el-steps :active="ywAuditingList.length != 0 ? 3 : ywHandleList.length != 0 ? 2 : 1" :space="500"> <el-step title="浜х敓宸ュ崟"> <template slot="description"> <div> @@ -295,88 +203,54 @@ <div class="flow-item-x"> 鍒涘缓鏃堕棿锛歿{flowForm.createTime}} </div> - <div class="flow-item-x"> - 澶勭悊鏈熼檺锛�<el-tag type="danger" size="small">12灏忔椂</el-tag> + <div class="flow-item-x" v-if="flowForm.processingPeriod"> + 澶勭悊鏈熼檺锛�<el-tag type="danger" size="small">{{ flowForm.processingPeriod }}</el-tag> </div> </div> </template> </el-step> <el-step title="杩愮淮澶勭悊"> <template slot="description"> - <div class="y-item"> + <div class="y-item" v-for="(item, index) in ywHandleList"> <div class="y-item-1"> <div class="flow-item-x"> - 杩愮淮鐘舵�侊細<el-tag type="danger" size="small">缁撴灉涓婃姤</el-tag> + 鐜板満鎯呭喌锛� + <el-tooltip class="item" effect="dark" :content="item.ywCondition" placement="top"> + <el-tag size="small" class="line-limit-length">{{ item.ywCondition }}</el-tag> + </el-tooltip> </div> - <div class="flow-item-x"> - 杩愮淮浜哄憳锛�<el-tag type="danger" size="small">{{flowForm.ywPeopleName}}</el-tag> - </div> + <!-- <div class="flow-item-x"> + <el-tag size="small" v-for="file in item.ywProofMaterials != null ? item.ywProofMaterials.split(',') : item.ywProofMaterials" :key="file" @click="handleDownload(file)">{{ file.substring(file.lastIndexOf("/") + 1) }}</el-tag> + </div> --> </div> <div class="y-item-2"> <div > - {{flowForm.ywHandleTime}} + {{ parseTime(item.createTime) }} </div> <div > - 绗嚑娆★細1 + 绗嚑娆★細{{ index + 1 }} </div> </div> </div> - <div class="y-item"> - <div class="y-item-1"> - <div class="flow-item-x"> - 杩愮淮鐘舵�侊細<el-tag type="danger" size="small">缁撴灉涓婃姤</el-tag> - </div> - <div class="flow-item-x"> - 杩愮淮浜哄憳锛�<el-tag type="danger" size="small">{{flowForm.ywPeopleName}}</el-tag> - </div> - </div> - <div class="y-item-2"> - <div > - {{flowForm.ywHandleTime}} - </div> - <div > - 绗嚑娆★細2 - </div> - </div> - </div> - </template> </el-step> <el-step title="缁撴灉瀹℃牳"> <template slot="description"> - <div class="y-item"> + <div class="y-item" v-for="(item, index) in ywAuditingList"> <div class="y-item-1"> <div class="flow-item-x"> - 瀹℃牳缁撴灉锛�<el-tag type="danger" size="small">椹冲洖</el-tag> + 瀹℃牳缁撴灉锛�<el-tag :type="item.result == '瀹℃牳閫氳繃' ? 'success' : 'danger'" size="small">{{ item.result }}</el-tag> </div> <div class="flow-item-x"> - 瀹℃牳璇存槑锛�<el-tag type="danger" size="small">鏈垚鍔熷鐞�</el-tag> + 瀹℃牳璇存槑锛�<el-tag size="small" v-if="item.remark">{{ item.remark }}</el-tag> </div> </div> <div class="y-item-2"> <div > - {{flowForm.ywHandleTime}} + {{ parseTime(item.createTime) }} </div> <div > - 绗嚑娆★細1 - </div> - </div> - </div> - <div class="y-item"> - <div class="y-item-1"> - <div class="flow-item-x"> - 瀹℃牳鐘舵�侊細<el-tag type="info" size="small">瀹℃牳涓�</el-tag> - </div> - <div class="flow-item-x"> - 瀹℃牳璇存槑锛� - </div> - </div> - <div class="y-item-2"> - <div > - {{flowForm.ywHandleTime}} - </div> - <div > - 绗嚑娆★細2 + 绗嚑娆★細{{ index + 1 }} </div> </div> </div> @@ -408,13 +282,16 @@ } </style> <script> -import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition } from "@/api/platform/work-order"; +import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition, getYwCondition, getYwConditionList, getYwAuditingList } from "@/api/platform/work-order"; +import { addReport } from "@/api/platform/report"; export default { name: "Work-order", components: { }, data() { return { + ywHandleList: [], + ywAuditingList: [], reportFormRules: { reportContent: [ { required: true, message: "鎶ュ鍐呭涓嶈兘涓虹┖", trigger: "blur" } @@ -426,7 +303,7 @@ reportOpen: false, reportForm: { reportType: "浜嬪悗鎶ュ", - pointId: "鐞间簬闀�3琛�1鍙锋憚鍍忓ご", + pointId: "", errorType: "", reportContent: "", reportMaterials: "" @@ -515,11 +392,15 @@ this.getList(); }, methods: { + /** 涓嬭浇鎸夐挳鎿嶄綔 */ + handleDownload (data) { + this.$download.resource(data); + }, // 鎶ュ submitReportForm() { this.$refs["reportForm"].validate(valid => { if (valid) { - addReport(this.form).then(response => { + addReport(this.reportForm).then(response => { this.$modal.msgSuccess("鎴愬姛鎻愪氦鎶ュ"); this.open = false; this.getList(); @@ -535,12 +416,20 @@ // 瀹℃牳鎸夐挳 handleAuditing(row) { this.auditingForm = row; - this.auditingOpen = true; + getYwCondition(row.id).then(response => { + if (response.data) { + this.auditingForm.condition = response.data.ywCondition; + this.auditingForm.proofMaterials = response.data.ywProofMaterials; + } + this.auditingOpen = true; + }); }, // 杩愮淮鎯呭喌鎸夐挳 handleYwCondition(row) { + this.form = {}; this.ywConditionForm = row; this.ywConditionOpen = true; + this.form.id = row.id; }, // 杩愮淮缁撴灉鎸夐挳 handleYwResult(row) { @@ -554,8 +443,18 @@ }, // 杩囩▼鍥炬煡鐪� handleFlow(row) { - this.flowOpen = true; this.flowForm = row; + getYwAuditingList(row.id).then(response => { + if (response.data) { + this.ywAuditingList = response.data; + } + }); + getYwConditionList(row.id).then(response => { + if (response.data) { + this.ywHandleList = response.data; + } + this.flowOpen = true; + }); }, // 鎻愪氦瀹℃牳 submitAuditing() { @@ -564,6 +463,7 @@ auditing(this.auditingForm).then(res => { this.auditingOpen = false; this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); + this.getList(); }) } }) @@ -601,11 +501,12 @@ }, // 鎻愪氦杩愮淮鎯呭喌 submitYwCondition() { - this.$refs["ywConditionForm"].validate(valid => { + this.$refs["form"].validate(valid => { if (valid) { - ywCondition(this.ywConditionForm).then(res => { + ywCondition(this.form).then(res => { this.ywConditionOpen = false; this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); + this.getList(); }) } }) @@ -634,10 +535,9 @@ getList() { this.loading = true; this.queryParams.params = {}; - if (null != this.daterangeYwHandleTime && '' != this.daterangeYwHandleTime) { - this.queryParams["start"] = this.daterangeYwHandleTime[0]; - this.queryParams["end"] = this.daterangeYwHandleTime[1]; - } + this.queryParams["start"] = this.daterangeYwHandleTime[0]; + this.queryParams["end"] = this.daterangeYwHandleTime[1]; + if (this.queryParams["status"] == "") { this.queryParams["status"] = "DISTRIBUTED"; } listWorkOrder(this.queryParams).then(response => { this.workOrderList = response.data; this.total = response.total; @@ -767,4 +667,11 @@ height: 150px; padding: 10px; } + +.line-limit-length { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 200px; +} </style> -- Gitblit v1.8.0