|
@@ -10,7 +10,7 @@
|
|
<span>基本信息:</span>
|
|
<span>基本信息:</span>
|
|
<div>
|
|
<div>
|
|
<label><span style="color:red;">*</span>业务空间名称</label>
|
|
<label><span style="color:red;">*</span>业务空间名称</label>
|
|
- <el-input placeholder="请输入业务空间名称" v-model="RoomLocalName" clearable
|
|
|
|
|
|
+ <el-input placeholder="请输入业务空间名称" v-model="localName" clearable
|
|
style="width:215px;margin-right:10px;"></el-input>
|
|
style="width:215px;margin-right:10px;"></el-input>
|
|
<label>业务空间编码</label>
|
|
<label>业务空间编码</label>
|
|
<el-input placeholder="请输入业务空间编码" v-model="localId" clearable
|
|
<el-input placeholder="请输入业务空间编码" v-model="localId" clearable
|
|
@@ -23,7 +23,7 @@
|
|
style="width:215px;margin-right:10px;"></el-cascader>
|
|
style="width:215px;margin-right:10px;"></el-cascader>
|
|
<label><span style="color:red;">*</span>业务空间类型</label>
|
|
<label><span style="color:red;">*</span>业务空间类型</label>
|
|
<el-select v-model="space" placeholder="请选择空间" style="width:215px;margin-right:10px;" @change="changeSpace">
|
|
<el-select v-model="space" placeholder="请选择空间" style="width:215px;margin-right:10px;" @change="changeSpace">
|
|
- <el-option v-for="item in spaceList" :key="item.Code" :label="item.Name" :value="item.Code">
|
|
|
|
|
|
+ <el-option v-for="item in spaceList" :key="item.code" :label="item.name" :value="item.code">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
@@ -33,7 +33,7 @@
|
|
<i style="cursor: pointer;" :class="showEx"
|
|
<i style="cursor: pointer;" :class="showEx"
|
|
@click="showEx = (showEx == 'el-icon-arrow-up' ? 'el-icon-arrow-down' : 'el-icon-arrow-up')"></i>
|
|
@click="showEx = (showEx == 'el-icon-arrow-up' ? 'el-icon-arrow-down' : 'el-icon-arrow-up')"></i>
|
|
<div v-show="showEx == 'el-icon-arrow-up'" v-loading="loadingOtherMsg">
|
|
<div v-show="showEx == 'el-icon-arrow-up'" v-loading="loadingOtherMsg">
|
|
- <zoneInput v-show="otherList.length" :inputList="otherList" labelWidth="140px" ref="zoneInput"></zoneInput>
|
|
|
|
|
|
+ <zoneInput v-show="otherList.length" labelWidth="140px" ref="zoneInput"></zoneInput>
|
|
<p v-show="!otherList.length">请选择业务空间类型</p>
|
|
<p v-show="!otherList.length">请选择业务空间类型</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -48,9 +48,8 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import locationPointMsg from '@/views/data_admin/buildGraphy/locationPointMsg'
|
|
import locationPointMsg from '@/views/data_admin/buildGraphy/locationPointMsg'
|
|
-import { queryDictionaryHead, zoneCreate } from '@/api/scan/request';
|
|
|
|
-import { getDataDictionary } from "@/api/dict";
|
|
|
|
-
|
|
|
|
|
|
+import { zoneCreate } from '@/api/scan/request';
|
|
|
|
+import { getDataDictionary, queryPhysicsAllType } from "@/api/dict";
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import zoneInput from '@/components/data_admin/zoneInput'
|
|
import zoneInput from '@/components/data_admin/zoneInput'
|
|
|
|
|
|
@@ -58,19 +57,17 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
floorProps: {
|
|
floorProps: {
|
|
- value: 'BuildID',
|
|
|
|
- label: 'BuildLocalName',
|
|
|
|
- children: 'Floor'
|
|
|
|
|
|
+ value: 'id',
|
|
|
|
+ label: 'localName',
|
|
|
|
+ children: 'floor'
|
|
},
|
|
},
|
|
options: [],//建筑楼层
|
|
options: [],//建筑楼层
|
|
spaceList: [],//空间列表
|
|
spaceList: [],//空间列表
|
|
space: '',//当前空间
|
|
space: '',//当前空间
|
|
buildFloor: [],//建筑楼层信息
|
|
buildFloor: [],//建筑楼层信息
|
|
- zoneName: '',//业务空间名称
|
|
|
|
- zoneLocalId: '',//业务空间编码
|
|
|
|
showEx: 'el-icon-arrow-down',//下拉菜单
|
|
showEx: 'el-icon-arrow-down',//下拉菜单
|
|
- RoomLocalID: '',//业务空间本地编码
|
|
|
|
- RoomLocalName: '',//业务空间名称
|
|
|
|
|
|
+ localId: '',//业务空间本地编码
|
|
|
|
+ localName: '',//业务空间名称
|
|
otherList: [],//可补充信息list
|
|
otherList: [],//可补充信息list
|
|
loadingOtherMsg: false,
|
|
loadingOtherMsg: false,
|
|
}
|
|
}
|
|
@@ -91,33 +88,33 @@ export default {
|
|
//创建
|
|
//创建
|
|
createZ() {
|
|
createZ() {
|
|
let param = {
|
|
let param = {
|
|
- Content: []
|
|
|
|
|
|
+ content: []
|
|
}
|
|
}
|
|
let zObj = this.$refs.zoneInput.getFormData();
|
|
let zObj = this.$refs.zoneInput.getFormData();
|
|
- zObj.Pic = this.$refs.pointMsg.choImg.concat();
|
|
|
|
- zObj.Pic = zObj.Pic.map(item => ({
|
|
|
|
- Id: item.ObjectId,
|
|
|
|
- Key: item.Key,
|
|
|
|
- Name: item.Name,
|
|
|
|
- Type: item.Type
|
|
|
|
|
|
+ zObj.pic = this.$refs.pointMsg.choImg.concat();
|
|
|
|
+ zObj.pic = zObj.pic.map(item => ({
|
|
|
|
+ id: item.ObjectId,
|
|
|
|
+ key: item.Key,
|
|
|
|
+ name: item.Name,
|
|
|
|
+ type: item.Type
|
|
}))
|
|
}))
|
|
- if (this.RoomLocalName && this.buildFloor.length && this.space) {
|
|
|
|
|
|
+ if (this.localName && this.buildFloor.length && this.space) {
|
|
zObj.classCode = this.space;
|
|
zObj.classCode = this.space;
|
|
- zObj.localName = this.RoomLocalName;
|
|
|
|
- zObj.localId = this.RoomLocalID;
|
|
|
|
|
|
+ zObj.localName = this.localName;
|
|
|
|
+ zObj.localId = this.localId;
|
|
zObj.buildingId = this.buildFloor[0];
|
|
zObj.buildingId = this.buildFloor[0];
|
|
zObj.floorId = this.buildFloor[1];
|
|
zObj.floorId = this.buildFloor[1];
|
|
param.content = [zObj];
|
|
param.content = [zObj];
|
|
zoneCreate(param, res => {
|
|
zoneCreate(param, res => {
|
|
this.$message.success("创建成功");
|
|
this.$message.success("创建成功");
|
|
this.$refs.pointMsg.clearImg();
|
|
this.$refs.pointMsg.clearImg();
|
|
- this.RoomLocalName = ''
|
|
|
|
- this.RoomLocalID = ''
|
|
|
|
|
|
+ this.localName = ''
|
|
|
|
+ this.localId = ''
|
|
this.buildFloor = []
|
|
this.buildFloor = []
|
|
this.space = ''
|
|
this.space = ''
|
|
this.otherList = []
|
|
this.otherList = []
|
|
})
|
|
})
|
|
- } else if (!this.RoomLocalName) {
|
|
|
|
|
|
+ } else if (!this.localName) {
|
|
this.$message("请输入业务空间名称");
|
|
this.$message("请输入业务空间名称");
|
|
} else if (!this.buildFloor.length) {
|
|
} else if (!this.buildFloor.length) {
|
|
this.$message("请选择所属建筑楼层");
|
|
this.$message("请选择所属建筑楼层");
|
|
@@ -128,11 +125,11 @@ export default {
|
|
//获取空间列表
|
|
//获取空间列表
|
|
getSpaceList() {
|
|
getSpaceList() {
|
|
let pa = {
|
|
let pa = {
|
|
- Filters: `parentId='Space'`
|
|
|
|
|
|
+ type: `space`
|
|
}
|
|
}
|
|
- queryDictionaryHead(pa, res => {
|
|
|
|
- this.spaceList = res.Content.filter((item => {
|
|
|
|
- return item.Name != '元空间'
|
|
|
|
|
|
+ queryPhysicsAllType(pa, res => {
|
|
|
|
+ this.spaceList = res.content.filter((item => {
|
|
|
|
+ return item.name != '元空间'
|
|
}));
|
|
}));
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -153,7 +150,8 @@ export default {
|
|
item.inputValue = null;
|
|
item.inputValue = null;
|
|
return filterCode.indexOf(item.code) == -1
|
|
return filterCode.indexOf(item.code) == -1
|
|
});
|
|
});
|
|
- this.otherList = res.Content;
|
|
|
|
|
|
+ this.otherList = res.content;
|
|
|
|
+ console.log(this.otherList);
|
|
this.$refs.zoneInput.init(this.otherList);
|
|
this.$refs.zoneInput.init(this.otherList);
|
|
})
|
|
})
|
|
},
|
|
},
|