下拉框bug,状态颜色

This commit is contained in:
jjLv 2024-09-23 10:40:54 +08:00
parent 05f8582e48
commit 8b24a14adf
3 changed files with 8 additions and 6 deletions

View File

@ -2,6 +2,7 @@
<!-- 工程管理 新增编辑 表单组件 --> <!-- 工程管理 新增编辑 表单组件 -->
<div> <div>
<el-form <el-form
v-loading="open"
label-width="100px" label-width="100px"
size="medium" size="medium"
ref="projectParamsRef" ref="projectParamsRef"
@ -136,20 +137,23 @@ export default {
created() { created() {
// this.getRanges() // this.getRanges()
}, },
mounted() { async mounted() {
this.open = true
await this.getRanges()
if (this.crewParams) { if (this.crewParams) {
this.crewParams.proId = Number(this.crewParams.proId) this.crewParams.proId = Number(this.crewParams.proId)
this.ableSelect = this.crewParams.relId this.ableSelect = this.crewParams.relId
Object.assign(this.projectParams, this.crewParams) await Object.assign(this.projectParams, this.crewParams)
this.subSort = 2 this.subSort = 2
} else { } else {
this.subSort = 1 this.subSort = 1
} }
this.getRanges() this.open = false
}, },
data() { data() {
return { return {
columnsListCrew, columnsListCrew,
open: false,
exportList: [], exportList: [],
subSort: '', // 1 / 2 subSort: '', // 1 / 2
ableSelect: undefined, ableSelect: undefined,

View File

@ -121,10 +121,8 @@ export default {
async mounted() { async mounted() {
this.open = true this.open = true
await this.getRanges() await this.getRanges()
console.log(this.editParams)
if (this.editParams) { if (this.editParams) {
await Object.assign(this.deviceParams, this.editParams) await Object.assign(this.deviceParams, this.editParams)
console.log(this.deviceParams)
this.subSort = 2 this.subSort = 2
} else { } else {
this.subSort = 1 this.subSort = 1

View File

@ -56,7 +56,7 @@
<template slot="devStatusName" slot-scope="{ data }"> <template slot="devStatusName" slot-scope="{ data }">
<span <span
v-if="data.devStatusName === '在线'" v-if="data.devStatusName === '在线'"
style="color:aquamarine;" style="color: #11AB21;"
>{{ data.devStatusName }}</span> >{{ data.devStatusName }}</span>
<span <span
v-if="data.devStatusName === '离线'" v-if="data.devStatusName === '离线'"