zhangyu 4 лет назад
Родитель
Сommit
dbb9d4011a

+ 10 - 0
src/api/datacenter.ts

@@ -0,0 +1,10 @@
+/**
+ * 数据中台通用接口文档
+ */
+import httputils from '@/api/httputils'
+const baseApi = '/datacenter';
+
+// 查询建筑信息
+export function buildingQuery(postParams: any): any {
+    return httputils.postJson(`${baseApi}/object/building/query`, postParams)
+}

+ 5 - 0
src/api/equipcomponnet.ts

@@ -0,0 +1,5 @@
+/**
+ * 数据中台专用接口文档
+ */
+import httputils from '@/api/httputils'
+const baseApi = '/equip-componnet';

+ 5 - 0
src/api/labsl.ts

@@ -0,0 +1,5 @@
+/**
+ * 蜡笔森林接口文档
+ */
+import httputils from '@/api/httputils'
+const baseApi = '/labsl';

+ 5 - 0
src/api/meiku.ts

@@ -0,0 +1,5 @@
+/**
+ * 美库接口文档
+ */
+import httputils from '@/api/httputils'
+const baseApi = '/meiku';

+ 59 - 12
src/components/homeView/createCanvasDialog.vue

@@ -35,6 +35,11 @@
                         <el-button v-else class="button-new-tag" size="small" @click="showInput">+ 添加</el-button>
                     </div>
                 </el-form-item>
+                <el-form-item label="所属文件夹" prop="folder">
+                    <el-select v-model="ruleForm.folder" multiple filterable allow-create default-first-option size="small">
+                        <el-option v-for="item in folderData" :key="item.id" :label="item.name" :value="item.name"> </el-option>
+                    </el-select>
+                </el-form-item>
             </el-form>
         </div>
         <div slot="footer" class="dialog-footer">
@@ -44,27 +49,24 @@
     </el-dialog>
 </template>
 <script>
-import graphTypeDialog from "@/components/homeView/graphTypeDialog";
-import { createGraph } from "@/api/home";
+import { buildingQuery } from "@/api/datacenter";
 export default {
-    components: {
-        graphTypeDialog,
-    },
+    components: {},
     data() {
         return {
             buttonStr: "",
             ruleForm: {
                 buildFloor: [],
                 name: "",
+                folder: "",
             },
             rules: {
-                buildFloor: [
-                    {required: true, message: "请选择建筑楼层", trigger: "blur"}
-                ],
+                buildFloor: [{ required: true, message: "请选择建筑楼层", trigger: "blur" }],
                 name: [
                     { required: true, message: "请输入名称", trigger: "blur" },
                     { max: 10, message: "最长为10个文字", trigger: "blur" },
                 ],
+                folder: [{ required: true, message: "请选择所属文件夹", trigger: "blur" }],
             },
             buildFloorData: [],
             value: [],
@@ -72,8 +74,48 @@ export default {
             dynamicTags: [],
             inputValue: "",
             inputVisible: false,
+            folderData: [
+                {
+                    id: 1,
+                    name: "能源系统",
+                    updateName: "能源系统",
+                    checked: false,
+                    showInput: false,
+                },
+                {
+                    id: 2,
+                    name: "排水系统",
+                    updateName: "排水系统",
+                    checked: false,
+                    showInput: false,
+                },
+                {
+                    id: 3,
+                    name: "消防水系统",
+                    updateName: "消防水系统",
+                    checked: false,
+                    showInput: false,
+                },
+                {
+                    id: 4,
+                    name: "公共照明系统公共照明系统公共照明系统公共照明系统",
+                    updateName: "公共照明系统公共照明系统公共照明系统公共照明系统",
+                    checked: false,
+                    showInput: false,
+                },
+                {
+                    id: 5,
+                    name: "暖通空调系统",
+                    updateName: "暖通空调系统",
+                    checked: false,
+                    showInput: false,
+                },
+            ],
         };
     },
+    created() {
+        this.getBuildingFloorData();
+    },
     methods: {
         showDialog() {
             this.outerVisible = true;
@@ -81,6 +123,14 @@ export default {
         handleClose(tag) {
             this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
         },
+        // 获取建筑楼层数据
+        getBuildingFloorData() {
+            const params = {}
+            buildingQuery(params, res => {
+                debugger
+                console.log(res)
+            })
+        },
         // 切换建筑楼层
         handleChangeBuildFloor(val) {
             console.log(val);
@@ -154,12 +204,9 @@ export default {
     /deep/ .el-dialog__header {
         border-bottom: 1px solid #f0f1f2ff;
     }
-    .dialog-bodys {
-        // max-height: 250px;
-    }
     /deep/ .el-dialog__body {
         padding: 16px 120px;
-        height: 270px;
+        max-height: 500px;
         overflow: auto;
     }
     .el-dialog__footer {

+ 4 - 0
src/views/home.vue

@@ -180,6 +180,10 @@ export default {
         batchCreateCanvas(val) {
             alert(`批量创建画布${val}`);
         },
+        // 切换文件夹
+        handleChangeFolder(val) {
+            console.log(val);
+        },
         // 创建拓扑图
         createProject() {
             this.$refs.createGraphDialog.showDialog();