From c79a020be41892e60021c2a750ea2976dd20f2f3 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 05 十一月 2024 11:19:20 +0800 Subject: [PATCH] 工单审核对话框bug --- src/views/system/data-manage/data-detail/index.vue | 81 ++++++++++++++++++++++++++++------------ 1 files changed, 56 insertions(+), 25 deletions(-) diff --git a/src/views/system/data-manage/data-detail/index.vue b/src/views/system/data-manage/data-detail/index.vue index 7a28b97..00c2aff 100644 --- a/src/views/system/data-manage/data-detail/index.vue +++ b/src/views/system/data-manage/data-detail/index.vue @@ -1,13 +1,16 @@ <template> <div class="app-container"> <div - style="display: flex;flex-direction: row;min-width: 158px;max-width: 158px;margin-bottom: 5px;border-radius: 1px; user-select: none" + style="display: flex;flex-direction: row;min-width: 400px;max-width: 400px;margin-bottom: 5px;border-radius: 1px; user-select: none" v-show="index !== 'image_resource_security'"> <div @click="clickTab(0)" class="tab" :class="{tabActive: 0 === queryParams.dataType, tabInactive: 0 !== queryParams.dataType}">鍏ㄩ儴 </div> <div @click="clickTab(1)" class="tab" :class="{tabActive: 1 === queryParams.dataType, tabInactive: 1 !== queryParams.dataType}">鐪佸巺鑰冩牳 + </div> + <div @click="clickTab(2)" class="tab" + :class="{tabActive: 2 === queryParams.dataType, tabInactive: 2 !== queryParams.dataType}">鍏畨閮ㄨ�冩牳 </div> </div> <el-card class="box-card" v-show="index !== 'image_resource_security'"> @@ -76,14 +79,18 @@ <el-form-item label="鍏抽敭璇�" prop="bayonetNumber"> <el-input v-model="queryParams.keyword" placeholder="鍏抽敭璇嶆悳绱�" clearable @input="handleQuery"/> </el-form-item> - <el-form-item label="鏃堕棿鑼冨洿" prop="timeRange"> - <el-date-picker - v-model="queryParams.timeRange" - type="daterange" - range-separator="鑷�" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡"> - </el-date-picker> + <el-form-item :label="this.optionsName" prop="option" v-show = "this.optionsStatus"> + <el-select v-model="queryParams.option" size="small" clearable> + <el-option v-for="option in options" :key="option.value" :label="option.label" :value="option.value"></el-option> + </el-select> + </el-form-item> + <el-form-item label="鏃堕棿" prop="date"> + <el-date-picker + v-model="queryParams.date" + type="date" + placeholder="閫夋嫨鏃ユ湡" + value-format="yyyy-MM-dd"> + </el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button> @@ -104,7 +111,11 @@ <div> <el-table v-loading="loading" :data="tableData.list"> <el-table-column :prop="item.prop" :label="item.label" :width="item.width" v-for="(item, index) in tableHead" - :key="index" v-if="showListPD(item)"/> + :key="index" v-if="showListPD(item)"> + <template slot-scope="scope"> + <span :class="{'error-text': scope.row[item.error]}"> {{ scope.row[item.prop] }} </span> + </template> + </el-table-column> </el-table> </div> @@ -168,7 +179,7 @@ <script> import {dataCenter} from "@/api/platform/data-center"; -import {videoData, carData, faceData, equipment} from "./list"; +import {carData, equipment, faceData, videoData} from "./list"; import {listSecurity, updateSecurity} from '@/api/platform/resource-security'; import {getToken} from "@/utils/auth"; @@ -195,6 +206,7 @@ url: process.env.VUE_APP_BASE_API + "/platform/resourceSecurity/importData" }, imageResourceSecurity: [], + options: [], resourceForm: {}, resourceOpen: false, totalKiosks: 1157, @@ -225,8 +237,9 @@ pageNum: 1, pageSize: 10, keyword: '', - timeRange: [], + date: '', dataType: 0, + option: null, }, // 琛ㄥ崟鍙傛暟 form: {}, @@ -256,49 +269,69 @@ index: null }; }, + mounted() { + //淇敼椤电鍚� + const obj = Object.assign({},this.$route,{title: this.$route.query.ruleName}) + this.$tab.updatePage(obj); // 鑾峰彇褰撳墠鏃ユ湡 const today = new Date(); - // 灏嗘棩鏈熷噺鍘讳竴澶� - const yesterday = new Date(today.getTime() - 24 * 60 * 60 * 1000); - // 鑾峰彇骞淬�佹湀銆佹棩 - const year = yesterday.getFullYear(); - let month = (yesterday.getMonth() + 1).toString().padStart(2, '0'); // 鏈堜唤鏄粠0寮�濮嬬殑锛屾墍浠ュ姞1 - let day = yesterday.getDate().toString().padStart(2, '0'); + const year = today.getFullYear(); + let month = (today.getMonth() + 1).toString().padStart(2, '0'); // 鏈堜唤鏄粠0寮�濮嬬殑锛屾墍浠ュ姞1 + let day = today.getDate().toString().padStart(2, '0'); // 鎷兼帴鎴� yyyy-MM-dd 鏍煎紡 - let yesterday1 = `${year}-${month}-${day}`; - this.queryParams.timeRange = [yesterday1, yesterday1] + this.queryParams.date = `${year}-${month}-${day}`; this.index = this.$route.query.index; if (this.$route.query.type === '1') { let data = videoData.table.filter(item => item.index === this.$route.query.index)[0] + // if(this.index = 'monitor_qualification'){ + // + // } this.tableHead = data.columns; this.cardList = data.card; this.showList = data.showList; + this.optionsStatus = data.optionsStatus; + this.options = data.options; + this.optionsName = data.optionsName; } if (this.$route.query.type === '2') { let data = carData.table.filter(item => item.index === this.$route.query.index)[0] this.tableHead = data.columns; this.cardList = data.card; this.showList = data.showList; + this.optionsStatus = data.optionsStatus; + this.options = data.options; + this.optionsName = data.optionsName; } if (this.$route.query.type === '3') { let data = faceData.table.filter(item => item.index === this.$route.query.index)[0] this.tableHead = data.columns; this.cardList = data.card; this.showList = data.showList; + this.optionsStatus = data.optionsStatus; + this.options = data.options; + this.optionsName = data.optionsName; } if (this.$route.query.type === '4') { let data = equipment.table.filter(item => item.index === this.$route.query.index)[0] this.tableHead = data.columns; this.cardList = data.card; this.showList = data.showList; + this.optionsStatus = data.optionsStatus; + this.options = data.options; + this.optionsName = data.optionsName; } this.getList(); }, methods: { + getColor(value, prop) { + + // 榛樿棰滆壊 + return 'red'; + }, clickTab(active) { this.queryParams.dataType = active this.getList() @@ -352,10 +385,6 @@ this.loading = true; if (this.index === 'image_resource_security') { this.getSecurityCard() - } - if (this.queryParams.timeRange && this.queryParams.timeRange.length > 0) { - this.queryParams.startTime = this.queryParams.timeRange[0] - this.queryParams.endTime = this.queryParams.timeRange[1] } dataCenter(url, this.queryParams).then(response => { response.data.list = response.data.list && response.data.list.length > 0 ? response.data.list : [] @@ -428,7 +457,9 @@ .tab { padding: 5px 15px; } - +.error-text { + color: red; +} .tab:hover { cursor: pointer; user-select: none; -- Gitblit v1.8.0