From 3c6bdb6f439ff7af04765259fd6a91b6d201d095 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期四, 19 六月 2025 17:12:25 +0800 Subject: [PATCH] 工单,数据中心用户查看数据的权限,合同考核每日,以及导出每日和按月 --- src/views/system/work-order/threshold/index.vue | 126 +++++++++++++++++++++++++++++++----------- 1 files changed, 93 insertions(+), 33 deletions(-) diff --git a/src/views/system/work-order/threshold/index.vue b/src/views/system/work-order/threshold/index.vue index 1139da9..2f38eae 100644 --- a/src/views/system/work-order/threshold/index.vue +++ b/src/views/system/work-order/threshold/index.vue @@ -26,14 +26,14 @@ v-hasPermi="['ycl:threshold:edit']" @click="showEdit('video')" v-if="!ifEditVideo" - >淇敼 + >淇敼 </el-button> <el-button size="mini" type="primary" @click="saveEdit('video')" v-if="ifEditVideo" - >淇濆瓨 + >淇濆瓨 </el-button> </div> </div> @@ -45,6 +45,7 @@ justify-content: space-between; " > + <div> <div style=" @@ -64,13 +65,13 @@ :key="item.id" > <el-input - v-model="videoList[index].value" + v-model="videoList[index].valueAuto" size="mini" style="width: 100px" :type="item.countType=='int'?'number':''" v-if="ifEditVideo" ></el-input> - <span v-else>{{ item.value }}</span> + <span v-else>{{ item.valueAuto }}</span> <span class="unit" v-if="item.countType=='percent'">%</span> <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> @@ -87,13 +88,13 @@ :key="item.id" > <el-input - v-model="videoList[index].valueAuto" + v-model="videoList[index].value" size="mini" style="width: 100px" :type="item.countType=='int'?'number':''" v-if="ifEditVideo" ></el-input> - <span v-else>{{ item.valueAuto }}</span> + <span v-else>{{ item.value }}</span> <span class="unit" v-if="item.countType=='percent'">%</span> <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> @@ -115,14 +116,14 @@ v-hasPermi="['ycl:threshold:edit']" @click="showEdit('face')" v-if="!ifEditFace" - >淇敼 + >淇敼 </el-button> <el-button size="mini" type="primary" @click="saveEdit('face')" v-if="ifEditFace" - >淇濆瓨 + >淇濆瓨 </el-button> </div> </div> @@ -153,13 +154,13 @@ :key="item.id" > <el-input - v-model="faceList[index].value" + v-model="faceList[index].valueAuto" size="mini" style="width: 100px" :type="item.countType=='int'?'number':''" v-if="ifEditFace" ></el-input> - <span v-else>{{ item.value }}</span> + <span v-else>{{ item.valueAuto }}</span> <span class="unit" v-if="item.countType=='percent'">%</span> <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> @@ -176,22 +177,23 @@ :key="item.id" > <el-input - v-model="faceList[index].valueAuto" + v-model="faceList[index].value" size="mini" style="width: 100px" :type="item.countType=='int'?'number':''" v-if="ifEditFace" ></el-input> - <span v-else>{{ item.valueAuto }}</span> + <span v-else>{{ item.value }}</span> <span class="unit" v-if="item.countType=='percent'">%</span> <span class="unit" v-if="item.countType=='second'">绉�</span> - </el-form-item + </el-form-item > </el-form> </div> </div> </div> - </el-card></el-col + </el-card> + </el-col > <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"> <el-card style="margin-bottom: 20px; height: 350px; margin-right: 20px;color: #656565;"> @@ -205,14 +207,14 @@ v-hasPermi="['ycl:threshold:edit']" @click="showEdit('car')" v-if="!ifEditCar" - >淇敼 + >淇敼 </el-button> <el-button size="mini" type="primary" @click="saveEdit('car')" v-if="ifEditCar" - >淇濆瓨 + >淇濆瓨 </el-button> </div> </div> @@ -243,13 +245,13 @@ :key="item.id" > <el-input - v-model="carList[index].value" + v-model="carList[index].valueAuto" size="mini" style="width: 100px" :type="item.countType=='int'?'number':''" v-if="ifEditCar" ></el-input> - <span v-else>{{ item.value }}</span> + <span v-else>{{ item.valueAuto }}</span> <span class="unit" v-if="item.countType=='percent'">%</span> <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> @@ -266,13 +268,13 @@ :key="item.id" > <el-input - v-model="carList[index].valueAuto" + v-model="carList[index].value" size="mini" style="width: 100px" :type="item.countType=='int'?'number':''" v-if="ifEditCar" ></el-input> - <span v-else>{{ item.valueAuto }}</span> + <span v-else>{{ item.value }}</span> <span class="unit" v-if="item.countType=='percent'">%</span> <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> @@ -280,7 +282,8 @@ </div> </div> </div> - </el-card></el-col + </el-card> + </el-col > </el-row> @@ -305,7 +308,8 @@ <el-button size="small" type="success" @click="whiteOpen" plain>鏂板</el-button> <el-button size="small" type="danger" @click="bathDelete" plain>鍒犻櫎</el-button> <el-button type="primary" plain icon="el-icon-top" v-loading="download" size="mini" @click="handleExport" - >瀵煎嚭鐧藉悕鍗�</el-button> + >瀵煎嚭鐧藉悕鍗� + </el-button> <el-popover style="margin-left: 10px" placement="bottom" trigger="hover" content="瀵煎叆鐧藉悕鍗�"> <div class="bottom_"> <el-upload @@ -323,11 +327,33 @@ </div> <div> <el-button class="bottom_" type="primary" size="small" v-loading="upload" @click="handleImport" - >瀵煎叆</el-button> + >瀵煎叆 + </el-button> </div> - <el-button type="primary" size="small" plain icon="el-icon-bottom" slot="reference" >瀵煎叆鐧藉悕鍗�</el-button> + <el-button type="primary" size="small" plain icon="el-icon-bottom" slot="reference">瀵煎叆鐧藉悕鍗�</el-button> </el-popover> + + <el-popover style="margin-left: 10px" placement="bottom" content="娣诲姞鏁呴殰绫诲瀷"> + <div class="bottom_"> + <el-form ref = "addErrorForm" :model="addErrorForm" v-loading="addErrorLoading" rules="addErrorFormRules" :inline="true" > + <el-form-item label="鏁呴殰绫诲瀷" prop="errorTypeList"> + <el-select v-model="addErrorForm.errorTypeList" multiple> + <el-option v-for="dict in dict.type.error_type" + :value="dict.value" + :key="dict.value" + :label="dict.label"/> + </el-select> + </el-form-item> + </el-form> + </div> + <div> + <el-button class="bottom_" type="primary" size="small" @click="addError" plain>纭</el-button> + </div> + <el-button style="margin-left: 10px" size="small" type="primary" slot="reference" plain>娣诲姞鏁呴殰绫诲瀷</el-button> + </el-popover> + </el-row> + <el-row class="content-warp"> <el-col :span="24"> <el-table v-loading="loading" :data="workOrderWhiteList" @selection-change="handleSelectionChange"> @@ -339,7 +365,8 @@ <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="handleWhiteUpdate(scope.row)" - >淇敼</el-button> + >淇敼 + </el-button> </template> </el-table-column> </el-table> @@ -355,7 +382,7 @@ </el-col> </el-row> -<!-- 鏂板鐧藉悕鍗�--> + <!-- 鏂板鐧藉悕鍗�--> <el-dialog :title="title" :visible.sync="whiteShow" @@ -363,14 +390,15 @@ :close-on-click-modal="false" :before-close="whiteClose"> <div> - <el-form :model="whiteForm" label-position="top" :rules="whiteFormRules" ref="whiteForm" size="small" class="add-form"> - <el-form-item label="鐐逛綅" prop="serialNumber" > + <el-form :model="whiteForm" label-position="top" :rules="whiteFormRules" ref="whiteForm" size="small" + class="add-form"> + <el-form-item label="鐐逛綅" prop="serialNumber"> <el-select v-model="whiteForm.pointName" filterable remote reserve-keyword - :disabled = "whiteForm.id" + :disabled="whiteForm.id" placeholder="鍥芥爣鐮�/鐐逛綅鍚嶇О鎼滅储" :remote-method="remoteGetPoints" @change="setPointId" @@ -425,13 +453,16 @@ whiteExport } from "@/api/platform/threshold"; -import { pointSelectData } from "@/api/platform/point"; +import {pointSelectData} from "@/api/platform/point"; +import {addError} from "../../../../api/platform/threshold"; + export default { dicts: ["image_qualify", "video_qualify", "error_type"], name: "Threshold", data() { return { download: false, + addErrorLoading: false, scrollPosition: 0, // 鐢ㄤ簬淇濆瓨婊氬姩浣嶇疆 // 涓嬫媺鍔犺浇 selectLoading: false, @@ -476,6 +507,13 @@ videoForm: {}, carForm: {}, faceForm: {}, + addErrorForm: {}, + // 鏂板妗嗘牎楠� + addErrorFormRules: { + errorTypeList: [ + {required: true, message: "璇烽�夋嫨鏁呴殰绫诲瀷", trigger: "blur"} + ], + }, // 琛ㄥ崟鏍¢獙 faceRules: { monitorType: [ @@ -555,7 +593,7 @@ {required: true, message: "璁惧涓嶈兘涓虹┖", trigger: "blur"}, ], errorTypeList: [ - { required: true, message: "璇烽�夋嫨鏁呴殰绫诲瀷", trigger: "blur" } + {required: true, message: "璇烽�夋嫨鏁呴殰绫诲瀷", trigger: "blur"} ], }, // 瀵煎叆鏂囦欢璺緞 @@ -593,7 +631,7 @@ this.download = true whiteExport().then(res => { // 灏嗕簩杩涘埗鏁版嵁杞崲涓� Blob 瀵硅薄 - let blob = new Blob([res], { type: 'application/octet-stream' }); + let blob = new Blob([res], {type: 'application/octet-stream'}); // 鍒涘缓涓嬭浇閾炬帴 let downloadLink = document.createElement('a'); @@ -963,6 +1001,19 @@ this.whiteShow = false; this.whiteReset(); }, + // 鏂板鏁呴殰绫诲瀷 + addError() { + this.$refs["addErrorForm"].validate((valid) => { + if (valid) { + this.addErrorLoading = true + addError(this.addErrorForm).then((response) => { + this.$modal.msgSuccess("娣诲姞鎴愬姛"); + this.getWhiteList(); + }); + this.addErrorLoading = false + } + }); + }, // 鐧藉悕鍗曟鎻愪氦 whiteSubmit() { this.$refs["whiteForm"].validate((valid) => { @@ -1031,7 +1082,7 @@ this.upload = false this.fileList = [] this.getWhiteList() - }).catch(()=>{ + }).catch(() => { this.upload = false }) } @@ -1046,17 +1097,21 @@ ::v-deep .el-input-half-width { width: calc(50% - 6px); /* 鍑忓幓涓�浜涢棿闅� */ } + ::v-deep .table-row { display: flex; flex-direction: row; } + ::v-deep .table-row-item { width: 120px; text-align: center; } + .fixedWidth { width: 200px; } + .threshold { display: flex; flex-direction: row; @@ -1066,19 +1121,24 @@ font-weight: bold; font-size: large; } + ::v-deep .el-form-item { margin-bottom: 0px; /* 鏍规嵁闇�姹傝皟鏁磋繖涓�� */ } + ::v-deep .el-form-item__label { color: #8d8d8d; } + .unit { margin-left: 5px; display: inline-block; } + .content-warp { margin-top: 10px; } + .bottom_ { width: 100%; margin-bottom: 8px; -- Gitblit v1.8.0