Pārlūkot izejas kodu

修复设施环境详情编辑报错问题

cfort 11 mēneši atpakaļ
vecāks
revīzija
9c7b0161b6

+ 1 - 1
src/views/system/fasc/facilityEnvConfig.vue

@@ -744,7 +744,7 @@ export default {
                 if (this.deviceIsRequired && item.deviceno1_ === '') {
                     return this.$message.warning(`子表第${i + 1}行设备信息缺失!`)
                 }
-                if (this.shouldRequired('fang_jian_') && item.fang_jian_ === '') {
+                if (this.form.lei_xing_ === '01-室内温湿度监控' && item.fang_jian_ === '') {
                     return this.$message.warning(`子表第${i + 1}行房间信息缺失!`)
                 }
                 if (item.lie_biao_shu_ju_) {

+ 6 - 6
src/views/system/fasc/fecDialog.vue

@@ -51,10 +51,7 @@
                     </el-row>
                     <el-row>
                         <el-col :span="12">
-                            <el-form-item v-if="shouldRequired('fang_jian_')" label="房间:">
-                                <template slot="label">
-                                    <span class="required">房间:</span>
-                                </template>
+                            <el-form-item v-if="lei_xing_!=='01-室内温湿度监控'" label="房间:">
                                 <ibps-link-data
                                     v-model="form.fang_jian_"
                                     style="width:80%"
@@ -70,6 +67,9 @@
                                 />
                             </el-form-item>
                             <el-form-item v-else label="房间:">
+                                <template slot="label">
+                                    <span class="required">房间:</span>
+                                </template>
                                 <ibps-link-data
                                     v-model="form.fang_jian_"
                                     style="width:80%"
@@ -640,8 +640,8 @@ export default {
             if (this.deviceIsRequired && this.form.deviceno1_ === '') {
                 throw new Error('请先选择设备!')
             }
-            if (this.shouldRequired('fang_jian_') && this.form.fang_jian_ === '') {
-                throw new Error('请先选择房间!')
+            if (this.lei_xing_ === '01-室内温湿度监控' && this.form.fang_jian_ === '') {
+                throw new Error('室内温湿度类型必须填写房间!')
             }
             if (this.form.lie_biao_shu_ju_) {
                 const lie_biao_shu_ju_ = JSON.parse(this.form.lie_biao_shu_ju_)