|
@@ -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 {
|