shaun-sheep 4 jaren geleden
bovenliggende
commit
fe7c933c33

+ 1 - 1
src/components/data_admin/zoneInput.vue

@@ -133,4 +133,4 @@ export default {
     width: 220px;
   }
 }
-</style>
+</style>

+ 69 - 9
src/components/ready/buildfloor/formItems.vue

@@ -8,7 +8,58 @@
           v-if="all||item.Visible"
           :class="{FloorTypeSelect:item.InputMode == 'D1'||item.Unit}"
         >
-          <span v-if="item.InputMode == 'B1'">
+          <!--BIM模型中坐标-->
+          <el-input
+            v-model="form[item.Path]"
+            v-if="item.InfoPointCode == 'BIMLocation'"
+            disabled
+          />
+          <!--二维码相关-->
+          <span v-else-if="item.InfoPointCode == 'DefaultQRCode' ">
+          <el-input
+            v-model="form[item.Path]"
+            v-if="!form[item.Path]"
+            disabled
+          />
+              <el-popover
+                v-else
+                placement="right"
+                width="210"
+                trigger="click">
+        <div style="overflow:hidden;">
+            <img
+              style="width:200px;height:200px;"
+              :src="'/image-service/common/file_get/'+ form[item.Path] +'?systemId=dataPlatform'"
+              alt="二维码"
+            >
+          </div>
+        <el-button slot="reference" type="text">点击查看</el-button>
+      </el-popover>
+          </span>
+          <span v-else-if="item.InfoPointCode == 'QRCodePic' ">
+          <el-input
+            v-model="form[item.Path]"
+            v-if="!form[item.Path]"
+            disabled
+          />
+              <el-popover
+                v-else
+                placement="right"
+                width="210"
+                trigger="click">
+        <div style="overflow:hidden;">
+            <img
+              style="width:200px;height:200px;"
+              :src="'/image-service/common/file_get/'+ form[item.Path] +'?systemId=dataPlatform'"
+              alt="二维码"
+            >
+          </div>
+        <el-button slot="reference" type="text">点击查看</el-button>
+      </el-popover>
+          </span>
+
+          <!--/二维码相关-->
+          <span v-else-if="item.InputMode == 'B1'">
             <el-input
               v-model="form[item.Path]"
               :placeholder="(item.InputMode === 'B1' && item.Path==='FloorLocalID') ? '填写示例:F1、B1?':'' "/>
@@ -28,7 +79,7 @@
             <template slot="append" v-if="item.Unit">{{item.Unit}}</template>
           </el-input>
           <el-input v-model="form[item.Path]" v-else disabled title="暂不支持"></el-input>
-
+          <!--          <div>{{item.InfoPointCode}}</div>-->
         </el-form-item>
       </div>
     </el-form>
@@ -37,7 +88,6 @@
 <script>
   import {getDataDictionary} from "@/api/scan/request";
 
-  //  v-for="item in InforsList" :key="item.InfoPointCode"
   export default {
     props: {
       type: {
@@ -79,6 +129,7 @@
     }
     ,
     methods: {
+
       getInforsPoint() {
         let params = {
           data: {
@@ -89,15 +140,24 @@
           type: this.type
         };
         getDataDictionary(params, res => {
-          this.InforsList = res.Content.map(item => {
+          let arr = res.Content.map(item => {
             if (item.InputMode === 'D1') {
               item.options = JSON.parse(item.DataSource)
             }
-            return item
+            switch (item.InfoPointCode) { //过滤掉待删除的
+              case 'FloorIdentity':
+              case 'RelatedSchedule':
+              case 'OutPeopleFlow':
+              case 'InPeopleFlow':
+              case 'ExsitPeopleNum':
+                break;
+              default:
+                return item
+            }
           })
+          this.InforsList = arr.filter(t => t)
         })
-      }
-      ,
+      },
       submitForm(call) {
         this.$refs.ruleForm.validate((valid) => {
           if (valid) {
@@ -106,8 +166,8 @@
             return false;
           }
         });
-      }
-      ,
+      },
+
     }
   };
 </script>

+ 3 - 0
src/views/ready/buildfloor/addFloor/index.vue

@@ -42,6 +42,9 @@
         showDialog(data) {
           this.floorData = data || {};
           this.floorData = tools.desFormatData(this.floorData)
+          //===测试代码===
+          // this.floorData.DefaultQRCode = 'Eq1101080004a93a45ce15e948dda155e9683803cf46QR'
+          //=====
           this.timeoutSetVal()
           this.dialogVisible = true;
         },

+ 8 - 2
src/views/ready/buildfloor/index.vue

@@ -33,7 +33,7 @@
           </div>
         </div>
       </div>
-      <div class="r-table">
+      <div class="r-table" v-if="buildList.length > 0">
         <div class="action-box">
           <el-button @click="addFloor" size="small" type="default">添加楼层
           </el-button>
@@ -86,6 +86,11 @@
           </el-table>
         </div>
       </div>
+      <div v-else class="r-table" >
+      <div class="center" style="margin-top:300px;">
+        <i class="icon-wushuju iconfont"></i> 请先在左侧创建建筑
+      </div>
+      </div>
     </el-row>
     <!-- 添加-修改楼层 -->
     <addFloor :curBuildId="curBuildId" :curFloorId="curFloorId" :title="floorTitle" @refresh="refresh"
@@ -227,7 +232,7 @@
           //一级循环出来一级标签
           let list = res.Content.filter(i => (i.FirstName !== '工作历') && (i.FirstName !== '能耗信息') && (i.FirstName !== '人员信息'))
           list.map(item => {
-            console.log(item.FirstName)
+            // console.log(item.FirstName)
             if ((item.InputMode === 'D1' || item.InputMode === 'D2' || item.InputMode === 'E2' || item.InputMode === 'D1L') && item.DataSource != undefined) {
               item.options = JSON.parse(item.DataSource)
               if (item.options[0] && item.options[0].Content) {
@@ -317,6 +322,7 @@
       },
       addFloor() {
         this.curFloorId = "";
+        this.floorTitle = "添加楼层";
         this.$refs.addFloorDialog.showDialog();
       },
       // 获取列表