Procházet zdrojové kódy

添加批量配置信息点弹窗页面

zhangyu před 5 roky
rodič
revize
1d78b5078a

+ 43 - 5
src/components/dialogs/config/infoPoint.vue

@@ -1,10 +1,40 @@
 <template>
-  <el-dialog title="按条件批量配置" :visible.sync="dialog.config" width="600px">
-    
+  <el-dialog title="按条件批量配置" :visible.sync="dialog.config" width="900px">
+    <el-form ref="form" :model="form" label-width="85px">
+      <el-form-item label="方案:">
+        <el-radio-group v-model="form.resource">
+          <el-radio label="custom">全新设定</el-radio>
+          <el-radio label="scheme1">预置方案1</el-radio>
+          <el-radio label="scheme2">预置方案2</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item v-show="form.resource == 'custom'" label="优先级:">
+        <el-checkbox-group v-model="form.priority">
+          <el-checkbox label="S" name="priority">(S)关键信息</el-checkbox>
+          <el-checkbox label="M" name="priority">(M)次要信息</el-checkbox>
+          <el-checkbox label="R" name="priority">(R)参考信息</el-checkbox>
+        </el-checkbox-group>
+      </el-form-item>
+      <el-form-item v-show="form.resource == 'custom'" label="一级标签:">
+        <el-checkbox-group v-model="form.firstTag">
+          <el-checkbox label="1" name="firstTag">能耗信息</el-checkbox>
+          <el-checkbox label="2" name="firstTag">基本信息</el-checkbox>
+          <el-checkbox label="3" name="firstTag">台账参数</el-checkbox>
+          <el-checkbox label="4" name="firstTag">通讯参数</el-checkbox>
+        </el-checkbox-group>
+      </el-form-item>
+      <el-form-item v-show="form.resource == 'custom'" label="二级标签:">
+        <span style="color:#bbb;font-size:12px;">二级标签暂未提供,如确实需要请联系产品添加。</span>
+      </el-form-item>
+    </el-form>
+    <div slot="footer">
+      <el-button @click="dialog.config = false">取 消</el-button>
+      <el-button type="primary" @click="onSubmit" :loading="loading">确 认</el-button>
+    </div>
   </el-dialog>
 </template>
 <script>
-import { getListForGuarantee, createGuarantee } from "@/api/scan/request"
+import { getDataDictionary } from "@/api/scan/request"
 import { mapGetters, mapActions } from "vuex"
 export default {
   props: {
@@ -19,7 +49,12 @@ export default {
   },
   data() {
     return {
-      
+      form: {
+        resource: 'custom',
+        priority: [],
+        firstTag: []
+      },
+      loading: false
     };
   },
   created() { },
@@ -27,7 +62,10 @@ export default {
     ...mapGetters("layout", ["projectId", "secret", "userId"])
   },
   methods: {
-    
+    onSubmit() {
+      this.loading = true
+      console.log(this.form);
+    }
   },
   watch: {
     

+ 3 - 1
src/views/ready/collectsetting/index.vue

@@ -47,7 +47,7 @@
                         <div class="label_main" v-for="(tag,tagIndex) in item.details" :key="tagIndex">
                             <p>{{tag.SecondName}}</p>
                             <ul v-for="(detail,detailInd) in tag.details" :key="detailInd">
-                                <el-checkbox :title="detail.InfoPointName" v-model="detail.Visible" @change="boxChange(detail)">{{detail.InfoPointName}}</el-checkbox>
+                                <el-checkbox :title="detail.InfoPointName" :disabled="!detail.UnDisabled" v-model="detail.Visible" @change="boxChange(detail)">{{detail.InfoPointName}}</el-checkbox>
                             </ul>
                         </div>
                     </el-tab-pane>
@@ -714,6 +714,7 @@
                         InfoPointName: item.InfoPointName,
                         InfoPointCode: item.InfoPointCode,
                         Visible: item.Visible,
+                        UnDisabled: item.UnDisabled,
                         SecondName: item.SecondName? item.SecondName: ""
                     })
                 })
@@ -733,6 +734,7 @@
                             InfoPointName: item.InfoPointName,
                             InfoPointCode: item.InfoPointCode,
                             Visible: item.Visible,
+                            UnDisabled: item.UnDisabled
                         })
                     })
                     sound.push(obj)