| | |
| | | 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> |
| | |
| | | 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> |
| | |
| | | <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;"> |
| | |
| | | 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> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card></el-col |
| | | </el-card> |
| | | </el-col |
| | | > |
| | | </el-row> |
| | | |
| | |
| | | <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 |
| | |
| | | </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"> |
| | |
| | | <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> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- 新增白名单--> |
| | | <!-- 新增白名单--> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="whiteShow" |
| | |
| | | :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" |
| | |
| | | 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, |
| | |
| | | videoForm: {}, |
| | | carForm: {}, |
| | | faceForm: {}, |
| | | addErrorForm: {}, |
| | | // 新增框校验 |
| | | addErrorFormRules: { |
| | | errorTypeList: [ |
| | | {required: true, message: "请选择故障类型", trigger: "blur"} |
| | | ], |
| | | }, |
| | | // 表单校验 |
| | | faceRules: { |
| | | monitorType: [ |
| | |
| | | {required: true, message: "设备不能为空", trigger: "blur"}, |
| | | ], |
| | | errorTypeList: [ |
| | | { required: true, message: "请选择故障类型", trigger: "blur" } |
| | | {required: true, message: "请选择故障类型", trigger: "blur"} |
| | | ], |
| | | }, |
| | | // 导入文件路径 |
| | |
| | | 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'); |
| | |
| | | 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) => { |
| | |
| | | this.upload = false |
| | | this.fileList = [] |
| | | this.getWhiteList() |
| | | }).catch(()=>{ |
| | | }).catch(() => { |
| | | this.upload = false |
| | | }) |
| | | } |
| | |
| | | ::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; |
| | |
| | | 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; |