Ver código fonte

设施环境配置页优化

luoaoxuan 1 ano atrás
pai
commit
e00c2f5f72

+ 14 - 83
src/views/system/fasc/defaultSettingDialog.vue

@@ -2,7 +2,9 @@
     <el-dialog
         title="配置默认数据"
         :visible.sync="dialogVisible"
-        width="60%"
+        width="65%"
+        style="margin-top:5vh"
+        top
         append-to-body
         class="dialog"
         :close-on-click-modal="false"
@@ -120,7 +122,7 @@
                                     v-model="form.kai_shi_shi_jian_"
                                     :clearable="false"
                                     type="date"
-                                    placeholder="选择查询的月份"
+                                    placeholder="选择监测开始时间"
                                     :picker-options="pickerOptions"
                                     value-format="yyyy-MM-dd"
                                     size="mini"
@@ -178,27 +180,27 @@ export default {
             default: () => []
         },
         week: {
-            type: String,
+            type: [String, Number],
             default: ''
         },
         month: {
-            type: String,
+            type: [String, Number],
             default: ''
         },
         quarter: {
-            type: String,
+            type: [String, Number],
             default: ''
         },
         halfYear: {
-            type: String,
+            type: [String, Number],
             default: ''
         },
         year: {
-            type: String,
+            type: [String, Number],
             default: ''
         },
         sep: {
-            type: String,
+            type: [String, Number],
             default: ''
         }
     },
@@ -237,79 +239,7 @@ export default {
                 { label: '半年监测', value: '每半年' },
                 { label: '年监测', value: '每年' },
                 { label: '按时间间隔监测', value: '间隔' }
-            ],
-            config: {
-                '01-室内温湿度监控': {
-                    keyword: '',
-                    path: '/sshjgl/wdjc/snwsdjkcd'
-                },
-                '02-冰箱温度监控': {
-                    keyword: '冰箱,冰柜,冷藏,冷冻,低温,恒温,生化培养箱',
-                    path: '/sshjgl/wdjc/bxwdjc',
-                    showDevice: true
-                },
-                '03-温浴箱温度监控': {
-                    keyword: '',
-                    path: '/sshjgl/wdjc/wyxwdjkywh',
-                    showDevice: true
-                },
-                '04-阴凉柜温度监控': {
-                    keyword: '',
-                    path: '/sshjgl/wdjc/ylgwdjc',
-                    showDevice: true
-                },
-                '05-纯水机水质监测': {
-                    keyword: '',
-                    path: '/sshjgl/csjszjcb',
-                    showDevice: true
-                },
-                '06-每日安全检查': {
-                    keyword: '',
-                    path: '/sshjgl/aqgl/mraqjc'
-                },
-                // '07-每月安全检查': {
-                //     keyword: '',
-                //     path: '/sshjgl/aqgl/myaqjc'
-                // },
-                '08-含氯有效性监测': {
-                    keyword: '',
-                    path: '/sshjgl/aqgl/hlyxxjc'
-                },
-                // '09-紫外灯辐照测定': {
-                //     keyword: '',
-                //     path: '/sshjgl/aqgl/zwdfzd',
-                //     showDevice: true
-                // },
-                '10-洗眼器检查': {
-                    keyword: '',
-                    path: '/sshjgl/aqgl/xyqjc',
-                    showDevice: true
-                },
-                '11-紧急淋浴器检查': {
-                    keyword: '',
-                    path: '/sshjgl/aqgl/jjlyqjc',
-                    showDevice: true
-                },
-                '12-紫外灯消毒': {
-                    keyword: '',
-                    path: '/sshjgl/aqgl/jykzwdxdjlb',
-                    showDevice: true
-                },
-                '13-高压灭菌': {
-                    keyword: '',
-                    path: '/sshjgl/aqgl/gymjjlb',
-                    showDevice: true
-                },
-                '14-空气消毒机': {
-                    keyword: '',
-                    path: '/sshjgl/aqgl/xdjsyjlb',
-                    showDevice: true
-                },
-                '15-日常防护消毒': {
-                    keyword: '',
-                    path: '/sshjgl/aqgl/rcfhxd'
-                }
-            }
+            ]
         }
     },
     computed: {
@@ -318,7 +248,7 @@ export default {
                 if (this.form.zhou_qi_ !== '间隔') {
                     return this.form.zhou_qi_.split('每')[1] + '监测日期:'
                 }
-                return '间隔时间'
+                return '间隔时间'
             }
             return ''
         }
@@ -365,7 +295,8 @@ export default {
                 this.sepCheck = val
             }
         },
-        'form.zhou_qi_' (val) {
+        'form.zhou_qi_' (val, old) {
+            if (!old) return
             this.dayCheck = []
             this.weekCheck = ''
             this.monthCheck = ''

+ 8 - 19
src/views/system/fasc/facilityEnvConfig.vue

@@ -59,7 +59,7 @@
                 </div>
                 <!-- <el-divider /> -->
                 <div class="table">
-                    <el-alert type="success" title="设施环境设备" :closable="false" />
+                    <el-alert type="success" title="配置详情" :closable="false" />
                     <div class="hearder">
                         <div class="search">
                             <div class="search-item">
@@ -458,9 +458,6 @@ export default {
         },
         isEdit () {
             return !!(this.parentData instanceof Object && this.parentData.mainId)
-        },
-        labelShow () {
-            return this.form.zhou_qi_.split('每')[1] + '监测日期:'
         }
     },
     watch: {
@@ -488,7 +485,8 @@ export default {
                                 jian_ce_ri_qi_: this.form.jian_ce_ri_qi_,
                                 ri_qi_lie_biao_: this.form.ri_qi_lie_biao_,
                                 zi_wai_deng_wai_j: this.$utils.guid(),
-                                lie_biao_shu_ju_: this.form.lie_biao_shu_ju_
+                                lie_biao_shu_ju_: this.form.lie_biao_shu_ju_,
+                                kai_shi_shi_jian_: ''
                             })
                         }
                     })
@@ -535,16 +533,6 @@ export default {
                         break
                 }
             }
-        },
-        'form.zhou_qi_' (val) {
-            this.dayCheck = []
-            this.weekCheck = ''
-            this.monthCheck = ''
-            this.quarterCheck = ''
-            this.halfYearCheck = ''
-            this.yearCheck = ''
-            this.sepCheck = ''
-            this.nextDate = ''
         }
     },
     mounted () {
@@ -577,7 +565,8 @@ export default {
                 if (!data.length) {
                     return this.$message.warning(``)
                 }
-                this.form = data[0]
+                Object.assign(this.form, data[0])
+                // this.form = data[0]
                 const jian_ce_ri_qi_ = data[0].jian_ce_ri_qi_
                 const ri_qi_lie_biao_ = data[0].ri_qi_lie_biao_
                 if (this.form.jian_ce_ri_qi_) {
@@ -606,7 +595,7 @@ export default {
                                 this.yearCheck = +jian_ce_ri_qi_.split('每年第')[1].split('个月')[0]
                                 break
                             case '间隔':
-                                this.sepCheck = ri_qi_lie_biao_
+                                this.sepCheck = +ri_qi_lie_biao_
                                 break
                             default:
                                 break
@@ -1253,8 +1242,8 @@ export default {
             text-align: left
         }
         .el-form-item__content{
-             font-size: 12px !important;
-           display: flex;
+            font-size: 12px !important;
+            display: flex;
          }
     }
 </style>

+ 7 - 4
src/views/system/fasc/fecDialog.vue

@@ -189,7 +189,7 @@
                                     v-model="form.kai_shi_shi_jian_"
                                     :clearable="false"
                                     type="date"
-                                    placeholder="选择查询的月份"
+                                    placeholder="选择监测开始时间"
                                     :picker-options="pickerOptions"
                                     value-format="yyyy-MM-dd"
                                     size="mini"
@@ -301,13 +301,14 @@ export default {
                 if (this.form.jian_ce_zhou_qi_ !== '间隔') {
                     return this.form.jian_ce_zhou_qi_.split('每')[1] + '监测日期:'
                 }
-                return '间隔时间'
+                return '间隔时间'
             }
             return ''
         }
     },
     watch: {
-        'form.jian_ce_zhou_qi_' (val) {
+        'form.jian_ce_zhou_qi_' (val, old) {
+            if (!old) return
             this.dayCheck = []
             this.weekCheck = ''
             this.monthCheck = ''
@@ -609,7 +610,9 @@ export default {
             this.isEdit = !!(row && row.zi_wai_deng_wai_j)
             // 编辑
             if (this.isEdit) {
-                this.form = JSON.parse(JSON.stringify(row))
+                // this.form = JSON.parse(JSON.stringify(row))
+                const temp = JSON.parse(JSON.stringify(row))
+                Object.assign(this.form, temp)
             } else {
                 this.form.zi_wai_deng_wai_j = this.$utils.guid()
                 this.form.bu_men_ = parentForm.bian_zhi_bu_men_