From 16eb67ab6b103663d30cad9ba74360f982e131cb Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 03 九月 2024 10:34:59 +0800 Subject: [PATCH] 自定义列显隐控制 --- src/views/system/work-order/threshold/index.vue | 408 +++++---------------------------------------------------- 1 files changed, 41 insertions(+), 367 deletions(-) diff --git a/src/views/system/work-order/threshold/index.vue b/src/views/system/work-order/threshold/index.vue index 345e441..0ab6263 100644 --- a/src/views/system/work-order/threshold/index.vue +++ b/src/views/system/work-order/threshold/index.vue @@ -15,7 +15,7 @@ <!-- </el-row>--> <el-row> <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"> - <el-card style="margin-bottom: 20px; height: 450px; margin-right: 20px"> + <el-card style="margin-bottom: 20px; height: 450px; margin-right: 20px;color: #656565;"> <div style="display: flex; justify-content: space-between"> <div class="header鈥攖ext">瑙嗛</div> <div> @@ -71,8 +71,8 @@ v-if="ifEditVideo" ></el-input> <span v-else>{{ item.value }}</span> - <span v-if="item.countType=='percent'">%</span> - <span v-if="item.countType=='second'">绉�</span> + <span class="unit" v-if="item.countType=='percent'">%</span> + <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> </el-form> </div> @@ -94,8 +94,8 @@ v-if="ifEditVideo" ></el-input> <span v-else>{{ item.valueAuto }}</span> - <span v-if="item.countType=='percent'">%</span> - <span v-if="item.countType=='second'">绉�</span> + <span class="unit" v-if="item.countType=='percent'">%</span> + <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> </el-form> </div> @@ -104,7 +104,7 @@ </el-card> </el-col> <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"> - <el-card style="margin-bottom: 20px; height: 450px; margin-right: 20px"> + <el-card style="margin-bottom: 20px; height: 450px; margin-right: 20px;color: #656565;"> <div style="display: flex; justify-content: space-between"> <div class="header鈥攖ext">浜鸿劯</div> <div> @@ -160,8 +160,8 @@ v-if="ifEditFace" ></el-input> <span v-else>{{ item.value }}</span> - <span v-if="item.countType=='percent'">%</span> - <span v-if="item.countType=='second'">绉�</span> + <span class="unit" v-if="item.countType=='percent'">%</span> + <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> </el-form> </div> @@ -183,8 +183,8 @@ v-if="ifEditFace" ></el-input> <span v-else>{{ item.valueAuto }}</span> - <span v-if="item.countType=='percent'">%</span> - <span v-if="item.countType=='second'">绉�</span> + <span class="unit" v-if="item.countType=='percent'">%</span> + <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item > </el-form> @@ -194,7 +194,7 @@ </el-card></el-col > <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"> - <el-card style="margin-bottom: 20px; height: 450px; margin-right: 20px"> + <el-card style="margin-bottom: 20px; height: 450px; margin-right: 20px;color: #656565;"> <div style="display: flex; justify-content: space-between"> <div class="header鈥攖ext">杞﹁締</div> <div> @@ -250,8 +250,8 @@ v-if="ifEditCar" ></el-input> <span v-else>{{ item.value }}</span> - <span v-if="item.countType=='percent'">%</span> - <span v-if="item.countType=='second'">绉�</span> + <span class="unit" v-if="item.countType=='percent'">%</span> + <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> </el-form> </div> @@ -273,8 +273,8 @@ v-if="ifEditCar" ></el-input> <span v-else>{{ item.valueAuto }}</span> - <span v-if="item.countType=='percent'">%</span> - <span v-if="item.countType=='second'">绉�</span> + <span class="unit" v-if="item.countType=='percent'">%</span> + <span class="unit" v-if="item.countType=='second'">绉�</span> </el-form-item> </el-form> </div> @@ -283,339 +283,6 @@ </el-card></el-col > </el-row> - - <!-- 浜鸿劯闃堝�� --> - <el-dialog - title="淇敼浜鸿劯宸ュ崟闃堝��" - :visible.sync="faceOpen" - width="700px" - append-to-body - > - <el-form - ref="faceForm" - :model="faceForm" - label-width="150px" - :inline="true" - > - <el-form-item class="fixedWidth" label="鎶撴媿閲�" prop="captureNum"> - <el-input - clearable - size="small" - v-model="faceForm.captureNum" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="faceForm.captureNumAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item class="fixedWidth" label="杩囪溅缂哄け鐜�" prop="timelyRate"> - <el-input - clearable - size="small" - v-model="faceForm.timelyRate" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="faceForm.timelyRateAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item class="fixedWidth" label="寤惰繜閲�" prop="delayAmount"> - <el-input - clearable - size="small" - v-model="faceForm.delayAmount" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="faceForm.delayAmountAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item - class="fixedWidth" - label="璁惧娲昏穬鐜�" - prop="deviceActiveRate" - > - <el-input - clearable - size="small" - v-model="faceForm.deviceActiveRate" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="faceForm.deviceActiveRateAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item - class="fixedWidth" - label="鎶撴媿鍙婃椂鐜�" - prop="timelyCapture" - > - <el-input - clearable - size="small" - v-model="faceForm.timelyCapture" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="faceForm.timelyCaptureAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item - class="fixedWidth" - label="鏃堕挓鍑嗙‘鐜�" - prop="deviceActiveRate" - > - <el-input - clearable - size="small" - v-model="faceForm.timeAccuracy" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="faceForm.timeAccuracyAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="editFace">纭� 瀹�</el-button> - <el-button @click="cancelFace">鍙� 娑�</el-button> - </div> - </el-dialog> - - <!-- 杞﹁締闃堝�� --> - <el-dialog - title="淇敼杞﹁締宸ュ崟闃堝��" - :visible.sync="carOpen" - width="700px" - append-to-body - > - <el-form - ref="faceForm" - :model="faceForm" - label-width="150px" - :inline="true" - > - <el-form-item class="fixedWidth" label="杩囪溅鏁版嵁閲�" prop="passCarNum"> - <el-input - clearable - size="small" - v-model="carForm.passCarNum" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="carForm.passCarNumAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item - class="fixedWidth" - label="杩囪溅缂哄け鐜�" - prop="passCarMissRate" - > - <el-input - clearable - size="small" - v-model="carForm.passCarMissRate" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="carForm.passCarMissRateAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item - class="fixedWidth" - label="鏈夋晥杩囪溅鏁版嵁閲�" - prop="passCarEffectiveNum" - > - <el-input - clearable - size="small" - v-model="carForm.passCarEffectiveNum" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="carForm.passCarEffectiveNumAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item - class="fixedWidth" - label="璁惧娲昏穬鐜�" - prop="deviceActiveRate" - > - <el-input - clearable - size="small" - v-model="carForm.deviceActiveRate" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="carForm.deviceActiveRateAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item - class="fixedWidth" - label="鎶撴媿鍙婃椂鐜�" - prop="timelyCapture" - > - <el-input - clearable - size="small" - v-model="carForm.timelyCapture" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="carForm.timelyCaptureAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - <el-form-item class="fixedWidth" label="鏃堕挓鍑嗙‘鐜�" prop="timeAccuracy"> - <el-input - clearable - size="small" - v-model="carForm.timeAccuracy" - placeholder="宸ュ崟闃堝��" - /> - <el-input - clearable - size="small" - v-model="carForm.timeAccuracyAuto" - placeholder="涓嬪彂闃堝��" - /> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="editCar">纭� 瀹�</el-button> - <el-button @click="cancelCar">鍙� 娑�</el-button> - </div> - </el-dialog> - - <!-- 瑙嗛闃堝�� --> - <el-dialog - title="淇敼瑙嗛宸ュ崟闃堝��" - :visible.sync="videoOpen" - width="700px" - append-to-body - > - <el-form - ref="videoForm" - :model="videoForm" - label-width="100px" - :inline="true" - > - <el-form-item - class="fixedWidth" - label="鍥惧儚璐ㄩ噺" - prop="imageQuality" - label-width="100px" - > - <el-select - v-model="videoForm.imageQuality" - placeholder="宸ュ崟闃堝��" - @change="handleModeNameChange" - > - <el-option - :key="dict.value" - :label="dict.value" - v-for="dict in dict.type.image_qualify" - /> - </el-select> - <el-select - v-model="videoForm.imageQualityAuto" - placeholder="涓嬪彂闃堝��" - @change="handleModeNameChange" - > - <el-option - :key="dict.value" - :label="dict.value" - v-for="dict in dict.type.image_qualify" - /> - </el-select> - </el-form-item> - <el-form-item - class="fixedWidth" - label="瑙嗛璐ㄩ噺" - prop="videoQuality" - label-width="100px" - > - <el-select - v-model="videoForm.videoQuality" - placeholder="宸ュ崟闃堝��" - @change="handleModeNameChange" - > - <el-option - :key="dict.value" - :label="dict.value" - v-for="dict in dict.type.video_qualify" - /> - </el-select> - <el-select - v-model="videoForm.videoQualityAuto" - placeholder="涓嬪彂闃堝��" - @change="handleModeNameChange" - > - <el-option - :key="dict.value" - :label="dict.value" - v-for="dict in dict.type.video_qualify" - /> - </el-select> - </el-form-item> - <el-form-item - class="fixedWidth" - label="鏍囨敞鍑嗙‘鐜�" - prop="annotationAccuracy" - label-width="100px" - > - <el-input - v-model="videoForm.annotationAccuracy" - type="number" - size="small" - placeholder="宸ュ崟闃堝��" - ></el-input> - <el-input - v-model="videoForm.annotationAccuracy" - type="number" - size="small" - placeholder="涓嬪彂闃堝��" - ></el-input> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="editVideo">纭� 瀹�</el-button> - <el-button @click="cancelVideo">鍙� 娑�</el-button> - </div> - </el-dialog> </div> </template> @@ -906,28 +573,28 @@ this.resetForm("carForm"); }, /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, + // handleQuery() { + // this.queryParams.pageNum = 1; + // this.getList(); + // }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.resetForm("queryForm"); - this.handleQuery(); - }, + // resetQuery() { + // this.resetForm("queryForm"); + // this.handleQuery(); + // }, // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map((item) => item.id); - this.single = selection.length !== 1; - this.multiple = !selection.length; - }, + // 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 = "娣诲姞杩愮淮闃堝��"; - this.handleModeNameChange(); - }, + // handleAdd() { + // this.reset(); + // this.open = true; + // this.title = "娣诲姞杩愮淮闃堝��"; + // this.handleModeNameChange(); + // }, /** 淇敼鎸夐挳鎿嶄綔 */ updateWho(row) { if (row.monitorType === "face") { @@ -1111,4 +778,11 @@ ::v-deep .el-form-item { margin-bottom: 0px; /* 鏍规嵁闇�姹傝皟鏁磋繖涓�� */ } +::v-deep .el-form-item__label { + color: #8d8d8d; +} +.unit { + margin-left: 5px; + display: inline-block; +} </style> -- Gitblit v1.8.0