Jelajahi Sumber

设备登记报警主机增加是否关联登记簿字段

jingyuanchao 1 tahun lalu
induk
melakukan
1221c8e67a
1 mengubah file dengan 10 tambahan dan 2 penghapusan
  1. 10 2
      src/views/system/device/index.vue

+ 10 - 2
src/views/system/device/index.vue

@@ -334,7 +334,13 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row> </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="关联登记簿"   v-if="form.deviceType == 1"  prop="inBook">
+              <el-switch v-model="form.inBook" :active-value="1" :inactive-value="0"></el-switch>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -498,6 +504,7 @@ export default {
         hostId: null,
         channel: null,
         definition:"1",
+        inBook: 0,
       },
       // 表单校验
 
@@ -584,7 +591,7 @@ export default {
       this.changeSelect(data);
       this.handleQuery();
     },
-    changeSelect(val) {      
+    changeSelect(val) {
       if(!val || !val.id) return;
       getHostByOrgId(val).then((response) => {
         this.form.hostId = null;
@@ -723,6 +730,7 @@ export default {
       const id = row.id || this.ids;
       getDevice(id).then((response) => {
         this.form = response.data;
+       // this.form.inBook=response.data.inBook.toString();
         this.devices = response.devices;
         this.hostList = response.hostList;
         this.open = true;