|
|
@@ -8,20 +8,20 @@
|
|
|
<el-tree :props="treeOption" :data="treeData" :expand-on-click-node="false" @node-click="nodeClick" default-expand-all>
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
<span>{{ node.label }}</span>
|
|
|
- <!--<el-popover
|
|
|
- placement="right"
|
|
|
- width="200"
|
|
|
- trigger="hover"
|
|
|
- >
|
|
|
- <span slot="reference">
|
|
|
- <i class="el-icon-arrow-down"></i>
|
|
|
- </span>
|
|
|
- <div style="display: grid">
|
|
|
- <el-link :underline="false" type="primary">添加下一级</el-link>
|
|
|
- <el-link :underline="false" type="primary">修改</el-link>
|
|
|
- <el-link :underline="false" type="danger">删除</el-link>
|
|
|
- </div>
|
|
|
- </el-popover>-->
|
|
|
+ <!--<el-popover
|
|
|
+ placement="right"
|
|
|
+ width="200"
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <span slot="reference">
|
|
|
+ <i class="el-icon-arrow-down"></i>
|
|
|
+ </span>
|
|
|
+ <div style="display: grid">
|
|
|
+ <el-link :underline="false" type="primary">添加下一级</el-link>
|
|
|
+ <el-link :underline="false" type="primary">修改</el-link>
|
|
|
+ <el-link :underline="false" type="danger">删除</el-link>
|
|
|
+ </div>
|
|
|
+ </el-popover>-->
|
|
|
</span>
|
|
|
</el-tree>
|
|
|
</el-aside>
|
|
|
@@ -192,1238 +192,1241 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { getList as getBuildingListByResidentialOldId,add as buildingAdd,getDetail as buildingGetDetail,update as buildingUpdate,remove as buildingRemove } from '../../api/community/building.js';
|
|
|
- import { getList as getUnitListByBuildingOldId } from "../../api/community/unit.js";
|
|
|
- import { getList as getFloorListByUnitOldId } from "../../api/community/floor.js";
|
|
|
- import { getList as getRoomListByFloorOldId } from "../../api/community/room.js";
|
|
|
- import { mapGetters } from 'vuex';
|
|
|
- import Log from '../../api/tool/MyLog.js';
|
|
|
- import ArrUtil from '../../api/tool/ArrUtil.js';
|
|
|
+import { getList as getBuildingListByResidentialOldId,add as buildingAdd,getDetail as buildingGetDetail,update as buildingUpdate,remove as buildingRemove } from '../../api/community/building.js';
|
|
|
+import { getList as getUnitListByBuildingOldId } from "../../api/community/unit.js";
|
|
|
+import { getList as getFloorListByUnitOldId } from "../../api/community/floor.js";
|
|
|
+import { getList as getRoomListByFloorOldId } from "../../api/community/room.js";
|
|
|
+import { mapGetters } from 'vuex';
|
|
|
+import Log from '../../api/tool/MyLog.js';
|
|
|
+import ArrUtil from '../../api/tool/ArrUtil.js';
|
|
|
|
|
|
- import {batchAddSubmit} from "@/api/community/building";
|
|
|
+import {batchAddSubmit} from "@/api/community/building";
|
|
|
|
|
|
- export default {
|
|
|
- props:{
|
|
|
- residentialId: "",
|
|
|
- residentialName: "",
|
|
|
- visible: false
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- permissionDataList: [],
|
|
|
- loading: false,
|
|
|
- batchVisible: false,
|
|
|
- batchIcon: 'el-icon-circle-plus-outline',
|
|
|
- batchDisabled: false,
|
|
|
- batchText: '提交',
|
|
|
- typeParent: 'parent',
|
|
|
- typeBuilding: 'building',
|
|
|
- typeUnit: 'unit',
|
|
|
- typeFloor: 'floor',
|
|
|
- typeRoom: 'room',
|
|
|
- form: {},
|
|
|
- batchForm: {},
|
|
|
- batchRules: {
|
|
|
- buildingBegin: [
|
|
|
- { required: true, message: '请输入楼栋区间', trigger: 'blur' },
|
|
|
- ],
|
|
|
- buildingEnd: [
|
|
|
- { required: true, message: '请输入楼栋区间', trigger: 'blur' },
|
|
|
- ],
|
|
|
- unitBegin: [
|
|
|
- { required: true, message: '请输入单元区间', trigger: 'blur' },
|
|
|
- ],
|
|
|
- unitEnd: [
|
|
|
- { required: true, message: '请输入单元区间', trigger: 'blur' },
|
|
|
- ],
|
|
|
- floorBegin: [
|
|
|
- { required: true, message: '请输入楼层区间', trigger: 'blur' },
|
|
|
- ],
|
|
|
- floorEnd: [
|
|
|
- { required: true, message: '请输入楼层区间', trigger: 'blur' },
|
|
|
- ],
|
|
|
- roomBegin: [
|
|
|
- { required: true, message: '请输入房屋区间', trigger: 'blur' },
|
|
|
- ],
|
|
|
- roomEnd: [
|
|
|
- { required: true, message: '请输入房屋区间', trigger: 'blur' },
|
|
|
- ],
|
|
|
- },
|
|
|
- treeData: [],
|
|
|
- treeOption:{
|
|
|
- label:"name",
|
|
|
- value: "id",
|
|
|
- children: "children"
|
|
|
- },
|
|
|
+export default {
|
|
|
+ props:{
|
|
|
+ residentialId: "",
|
|
|
+ residentialName: "",
|
|
|
+ visible: false
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ permissionDataList: [],
|
|
|
+ loading: false,
|
|
|
+ batchVisible: false,
|
|
|
+ batchIcon: 'el-icon-circle-plus-outline',
|
|
|
+ batchDisabled: false,
|
|
|
+ batchText: '提交',
|
|
|
+ typeParent: 'parent',
|
|
|
+ typeBuilding: 'building',
|
|
|
+ typeUnit: 'unit',
|
|
|
+ typeFloor: 'floor',
|
|
|
+ typeRoom: 'room',
|
|
|
+ form: {},
|
|
|
+ batchForm: {},
|
|
|
+ batchRules: {
|
|
|
+ buildingBegin: [
|
|
|
+ { required: true, message: '请输入楼栋区间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ buildingEnd: [
|
|
|
+ { required: true, message: '请输入楼栋区间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ unitBegin: [
|
|
|
+ { required: true, message: '请输入单元区间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ unitEnd: [
|
|
|
+ { required: true, message: '请输入单元区间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ floorBegin: [
|
|
|
+ { required: true, message: '请输入楼层区间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ floorEnd: [
|
|
|
+ { required: true, message: '请输入楼层区间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ roomBegin: [
|
|
|
+ { required: true, message: '请输入房屋区间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ roomEnd: [
|
|
|
+ { required: true, message: '请输入房屋区间', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ treeData: [],
|
|
|
+ treeOption:{
|
|
|
+ label:"name",
|
|
|
+ value: "id",
|
|
|
+ children: "children"
|
|
|
+ },
|
|
|
|
|
|
|
|
|
- // treeOption: {
|
|
|
- // nodeKey: 'id',
|
|
|
- // addBtn: false,
|
|
|
- // menu: false,
|
|
|
- // props: {
|
|
|
- // label: 'name',
|
|
|
- // value: 'id',
|
|
|
- // children: 'children'
|
|
|
- // }
|
|
|
- // },
|
|
|
- optionBuilding: {
|
|
|
- labelWidth: 100,
|
|
|
- tip: false,
|
|
|
- viewBtn: true,
|
|
|
- selection: false,
|
|
|
- border: true,
|
|
|
- addBtn: false,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: '楼栋名称',
|
|
|
- prop: 'name',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入楼房名称',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
+ // treeOption: {
|
|
|
+ // nodeKey: 'id',
|
|
|
+ // addBtn: false,
|
|
|
+ // menu: false,
|
|
|
+ // props: {
|
|
|
+ // label: 'name',
|
|
|
+ // value: 'id',
|
|
|
+ // children: 'children'
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ optionBuilding: {
|
|
|
+ labelWidth: 100,
|
|
|
+ tip: false,
|
|
|
+ viewBtn: true,
|
|
|
+ selection: false,
|
|
|
+ border: true,
|
|
|
+ addBtn: false,
|
|
|
+ menuWidth:350,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '楼栋名称',
|
|
|
+ prop: 'name',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请输入楼房名称',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
|
|
|
- prop: 'residentialId',
|
|
|
- display: false,
|
|
|
- hide: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入楼房名称',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "图片",
|
|
|
- prop: "pic",
|
|
|
- type: 'upload',
|
|
|
- hide: true,
|
|
|
- propsHttp: {
|
|
|
- url: 'data'
|
|
|
- },
|
|
|
- listType: 'picture-img',
|
|
|
- span: 24,
|
|
|
- row: true,
|
|
|
- action: "/api/upload/putfile",
|
|
|
- display: true,
|
|
|
- rules: [{
|
|
|
- required: false,
|
|
|
- message: "请输入封面图片",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '单元总数',
|
|
|
- prop: 'unitCount',
|
|
|
- display: false,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: false,
|
|
|
- message: '请输入楼房编号',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '楼层总数',
|
|
|
- prop: 'floorCount',
|
|
|
- display: false,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入楼房层数',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '房间总数',
|
|
|
- prop: 'roomCount',
|
|
|
- display: false,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入房间数量',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '住户总数',
|
|
|
- prop: 'userCount',
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: false,
|
|
|
- message: '请输入楼房地址',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'type',
|
|
|
- value: 'building',
|
|
|
- disabled: true,
|
|
|
- hide: true,
|
|
|
- display: false
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- optionUnit: {
|
|
|
- labelWidth: 100,
|
|
|
- tip: false,
|
|
|
- // addBtn: true,
|
|
|
- viewBtn: true,
|
|
|
- selection: false,
|
|
|
- border: true,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "所属社区",
|
|
|
- prop: "agencyId",
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- rules: [{
|
|
|
+ prop: 'residentialId',
|
|
|
+ display: false,
|
|
|
+ hide: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
required: true,
|
|
|
- message: "请选择所属社区",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ message: '请输入楼房名称',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "图片",
|
|
|
+ prop: "pic",
|
|
|
+ type: 'upload',
|
|
|
+ hide: true,
|
|
|
+ propsHttp: {
|
|
|
+ url: 'data'
|
|
|
},
|
|
|
- {
|
|
|
- label: "所属小区",
|
|
|
- prop: "residentialId",
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- rules: [{
|
|
|
+ listType: 'picture-img',
|
|
|
+ span: 24,
|
|
|
+ row: true,
|
|
|
+ action: "/api/blade-resource/oss/endpoint/put-file",
|
|
|
+ display: true,
|
|
|
+ rules: [{
|
|
|
+ required: false,
|
|
|
+ message: "请输入封面图片",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '单元总数',
|
|
|
+ prop: 'unitCount',
|
|
|
+ display: false,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ message: '请输入楼房编号',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '楼层总数',
|
|
|
+ prop: 'floorCount',
|
|
|
+ display: false,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
required: true,
|
|
|
- message: "请选择所属小区",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "所属楼栋",
|
|
|
- prop: "buildingId",
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- rules: [{
|
|
|
+ message: '请输入楼房层数',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '房间总数',
|
|
|
+ prop: 'roomCount',
|
|
|
+ display: false,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
required: true,
|
|
|
- message: "请选择所属小区",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '单元名称',
|
|
|
- prop: 'name',
|
|
|
- maxlength: 10,
|
|
|
- showWordLimit: true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入楼层名称',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "图片",
|
|
|
- prop: "pic",
|
|
|
- type: 'upload',
|
|
|
- hide: true,
|
|
|
- propsHttp: {
|
|
|
- url: 'data'
|
|
|
- },
|
|
|
- listType: 'picture-img',
|
|
|
- span: 24,
|
|
|
- row: true,
|
|
|
-
|
|
|
- action: "/api/upload/putfile",
|
|
|
- display: true,
|
|
|
- rules: [{
|
|
|
+ message: '请输入房间数量',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '住户总数',
|
|
|
+ prop: 'userCount',
|
|
|
+ hide: true,
|
|
|
+ display: false,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
required: false,
|
|
|
- message: "请输入封面图片",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "负责人姓名",
|
|
|
- prop: "personName",
|
|
|
- labelWidth: 110,
|
|
|
- hide: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入负责人姓名",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- }, {
|
|
|
- label: "负责人电话",
|
|
|
- prop: "personTel",
|
|
|
- labelWidth: 110,
|
|
|
- hide: true,
|
|
|
- rules: [{
|
|
|
+ message: '请输入楼房地址',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'type',
|
|
|
+ value: 'building',
|
|
|
+ disabled: true,
|
|
|
+ hide: true,
|
|
|
+ display: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ optionUnit: {
|
|
|
+ labelWidth: 100,
|
|
|
+ tip: false,
|
|
|
+ // addBtn: true,
|
|
|
+ viewBtn: true,
|
|
|
+ selection: false,
|
|
|
+ border: true,
|
|
|
+ menuWidth:350,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "所属社区",
|
|
|
+ prop: "agencyId",
|
|
|
+ hide: true,
|
|
|
+ display: false,
|
|
|
+ // type:"select",
|
|
|
+ // dicUrl:'',
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择所属社区",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所属小区",
|
|
|
+ prop: "residentialId",
|
|
|
+ hide: true,
|
|
|
+ display: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择所属小区",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所属楼栋",
|
|
|
+ prop: "buildingId",
|
|
|
+ hide: true,
|
|
|
+ display: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择所属小区",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '单元名称',
|
|
|
+ prop: 'name',
|
|
|
+ maxlength: 10,
|
|
|
+ showWordLimit: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
required: true,
|
|
|
- message: "请输入负责人电话",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- }, {
|
|
|
- label: "建筑年代",
|
|
|
- prop: "builtYear",
|
|
|
- hide: true,
|
|
|
- }, {
|
|
|
- label: "产权性质",
|
|
|
- prop: "propertyNature",
|
|
|
- hide: true,
|
|
|
- },
|
|
|
- // {
|
|
|
- // label: "有无电梯",
|
|
|
- // prop: "includingElevator",
|
|
|
- // hide: true,
|
|
|
- // type: "select",
|
|
|
- // search: true,
|
|
|
- // dicUrl: "/api/blade-system/dict-biz/dictionary?code=including_elevator",
|
|
|
- // props: {
|
|
|
- // label: "dictValue",
|
|
|
- // value: "dictKey"
|
|
|
- // },
|
|
|
- // },
|
|
|
- {
|
|
|
- label: "楼层数量",
|
|
|
- prop: "floorCount",
|
|
|
- display: false
|
|
|
- },
|
|
|
- {
|
|
|
- label: "房间数量",
|
|
|
- prop: "roomCount",
|
|
|
- display: false
|
|
|
- },
|
|
|
- {
|
|
|
- label: "住户数量",
|
|
|
- prop: "userNumber",
|
|
|
- display: false,
|
|
|
- hide: true,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'type',
|
|
|
- value: 'unit',
|
|
|
- disabled: true,
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- optionFloor: {
|
|
|
- labelWidth: 100,
|
|
|
- tip: false,
|
|
|
- viewBtn: true,
|
|
|
- selection: false,
|
|
|
- border: true,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: '所属单元',
|
|
|
- prop: 'unitId',
|
|
|
- type: 'select',
|
|
|
- dicData: [],
|
|
|
- disabled: true,
|
|
|
- hide: true,
|
|
|
- props: {
|
|
|
- label: 'name',
|
|
|
- value: 'id'
|
|
|
- },
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请选择所属楼房',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
+ message: '请输入楼层名称',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "图片",
|
|
|
+ prop: "pic",
|
|
|
+ type: 'upload',
|
|
|
+ hide: true,
|
|
|
+ propsHttp: {
|
|
|
+ url: 'data'
|
|
|
},
|
|
|
- {
|
|
|
- label: "所属小区",
|
|
|
- prop: "residentialId",
|
|
|
- hide: true,
|
|
|
- // slot: true,
|
|
|
- cascaderItem: ['buildingId'],
|
|
|
- type: "select",
|
|
|
- dicUrl: "/api/cyzh-community/residential/list?size=900000",
|
|
|
- filterable: true,
|
|
|
- props: {
|
|
|
- label: "name",
|
|
|
- value: "id"
|
|
|
- },
|
|
|
- dicFormatter: (res) => {
|
|
|
- return res.data.records;
|
|
|
- },
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请选择所属小区",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ listType: 'picture-img',
|
|
|
+ span: 24,
|
|
|
+ row: true,
|
|
|
+
|
|
|
+ action: "/api/blade-resource/oss/endpoint/put-file",
|
|
|
+ display: true,
|
|
|
+ rules: [{
|
|
|
+ required: false,
|
|
|
+ message: "请输入封面图片",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "负责人姓名",
|
|
|
+ prop: "personName",
|
|
|
+ labelWidth: 110,
|
|
|
+ hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入负责人姓名",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ label: "负责人电话",
|
|
|
+ prop: "personTel",
|
|
|
+ labelWidth: 110,
|
|
|
+ hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入负责人电话",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ label: "建筑年代",
|
|
|
+ prop: "builtYear",
|
|
|
+ hide: true,
|
|
|
+ }, {
|
|
|
+ label: "产权性质",
|
|
|
+ prop: "propertyNature",
|
|
|
+ hide: true,
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: "有无电梯",
|
|
|
+ // prop: "includingElevator",
|
|
|
+ // hide: true,
|
|
|
+ // type: "select",
|
|
|
+ // search: true,
|
|
|
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=including_elevator",
|
|
|
+ // props: {
|
|
|
+ // label: "dictValue",
|
|
|
+ // value: "dictKey"
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: "楼层数量",
|
|
|
+ prop: "floorCount",
|
|
|
+ display: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "房间数量",
|
|
|
+ prop: "roomCount",
|
|
|
+ display: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "住户数量",
|
|
|
+ prop: "userCount",
|
|
|
+ display: false,
|
|
|
+ hide: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'type',
|
|
|
+ value: 'unit',
|
|
|
+ disabled: true,
|
|
|
+ hide: true,
|
|
|
+ display: false,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ optionFloor: {
|
|
|
+ labelWidth: 100,
|
|
|
+ tip: false,
|
|
|
+ viewBtn: true,
|
|
|
+ selection: false,
|
|
|
+ border: true,
|
|
|
+ menuWidth:350,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '所属单元',
|
|
|
+ prop: 'unitId',
|
|
|
+ type: 'select',
|
|
|
+ dicData: [],
|
|
|
+ disabled: true,
|
|
|
+ hide: true,
|
|
|
+ props: {
|
|
|
+ label: 'name',
|
|
|
+ value: 'id'
|
|
|
},
|
|
|
- {
|
|
|
- label: "所属楼栋",
|
|
|
- prop: "buildingId",
|
|
|
- // slot: true,
|
|
|
- type: "select",
|
|
|
- dicUrl: `/api/cyzh-community/building/list?size=500&residentialId={{key}}`,
|
|
|
- filterable: true,
|
|
|
- props: {
|
|
|
- label: "name",
|
|
|
- value: "id"
|
|
|
- },
|
|
|
- dicFormatter: (res) => {
|
|
|
- return res.data.records;
|
|
|
- },
|
|
|
- rules: [{
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
required: true,
|
|
|
- message: "请选择所属小区",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '楼层名称',
|
|
|
- prop: 'name',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入房间名称',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
+ message: '请选择所属楼房',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所属小区",
|
|
|
+ prop: "residentialId",
|
|
|
+ hide: true,
|
|
|
+ // slot: true,
|
|
|
+ cascaderItem: ['buildingId'],
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/cyzh-community/residential/list?size=9000000",
|
|
|
+ filterable: true,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id"
|
|
|
},
|
|
|
- {
|
|
|
- label: '房间类型',
|
|
|
- prop: 'roomTypeId',
|
|
|
- type: 'select',
|
|
|
- hide: true,
|
|
|
- dicData: [],
|
|
|
- props: {
|
|
|
- label: 'name',
|
|
|
- value: 'id'
|
|
|
- },
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请输入房间类型',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
+ dicFormatter: (res) => {
|
|
|
+ return res.data.records;
|
|
|
},
|
|
|
- {
|
|
|
- label: "负责人姓名",
|
|
|
- prop: "personName",
|
|
|
- hide: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入负责人姓名",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择所属小区",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所属楼栋",
|
|
|
+ prop: "buildingId",
|
|
|
+ // slot: true,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: `/api/cyzh-community/building/list?size=500&residentialId={{key}}`,
|
|
|
+ filterable: true,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id"
|
|
|
},
|
|
|
- {
|
|
|
- label: "负责人电话",
|
|
|
- prop: "personTel",
|
|
|
- hide: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入负责人电话",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ dicFormatter: (res) => {
|
|
|
+ return res.data.records;
|
|
|
},
|
|
|
- {
|
|
|
- label: "建筑年代",
|
|
|
- prop: "builtYear",
|
|
|
- hide: true,
|
|
|
- rules: [{
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择所属小区",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '楼层名称',
|
|
|
+ prop: 'name',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
required: true,
|
|
|
- message: "请输入建筑年代",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "产权性质",
|
|
|
- prop: "propertyNature",
|
|
|
- hide: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入产权性质",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ message: '请输入房间名称',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '房间类型',
|
|
|
+ prop: 'roomTypeId',
|
|
|
+ type: 'select',
|
|
|
+ hide: true,
|
|
|
+ dicData: [],
|
|
|
+ props: {
|
|
|
+ label: 'name',
|
|
|
+ value: 'id'
|
|
|
},
|
|
|
- {
|
|
|
- label: "有无电梯",
|
|
|
- prop: "includingElevator",
|
|
|
- hide: true,
|
|
|
- rules: [{
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
required: true,
|
|
|
- message: "请输入有无电梯",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "房间数量",
|
|
|
- prop: "roomCount",
|
|
|
+ message: '请输入房间类型',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "负责人姓名",
|
|
|
+ prop: "personName",
|
|
|
+ hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入负责人姓名",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "负责人电话",
|
|
|
+ prop: "personTel",
|
|
|
+ hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入负责人电话",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "建筑年代",
|
|
|
+ prop: "builtYear",
|
|
|
+ hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入建筑年代",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "产权性质",
|
|
|
+ prop: "propertyNature",
|
|
|
+ hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入产权性质",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "有无电梯",
|
|
|
+ prop: "includingElevator",
|
|
|
+ hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入有无电梯",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "房间数量",
|
|
|
+ prop: "roomCount",
|
|
|
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入房间数量",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "住户数量",
|
|
|
- prop: "userCount",
|
|
|
- hide: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入住户数量",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入房间数量",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "住户数量",
|
|
|
+ prop: "userCount",
|
|
|
+ hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入住户数量",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'type',
|
|
|
+ value: 'buildingRoom',
|
|
|
+ disabled: true,
|
|
|
+ hide: true,
|
|
|
+ display: false,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ optionRoom: {
|
|
|
+ labelWidth: 100,
|
|
|
+ tip: false,
|
|
|
+ viewBtn: true,
|
|
|
+ selection: false,
|
|
|
+ border: true,
|
|
|
+ menuWidth:350,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "门牌号 ",
|
|
|
+ prop: "name",
|
|
|
+ // search: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入门牌号-限制数字,单元楼下唯一 ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },{
|
|
|
+ label: "所属社区",
|
|
|
+ prop: "agencyId",
|
|
|
+ slot: true,
|
|
|
+ hide: true,
|
|
|
+ type: "select",
|
|
|
+ searchFilterable: true,
|
|
|
+ dicUrl: "/api/cyzh-community/agency/list",
|
|
|
+ cascaderItem: ['residentialId','unitId'],
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id"
|
|
|
},
|
|
|
- {
|
|
|
- prop: 'type',
|
|
|
- value: 'buildingRoom',
|
|
|
- disabled: true,
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- optionRoom: {
|
|
|
- labelWidth: 100,
|
|
|
- tip: false,
|
|
|
- viewBtn: true,
|
|
|
- selection: false,
|
|
|
- border: true,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: "门牌号 ",
|
|
|
- prop: "name",
|
|
|
- // search: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入门牌号-限制数字,单元楼下唯一 ",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },{
|
|
|
- label: "所属社区",
|
|
|
- prop: "agencyId",
|
|
|
- slot: true,
|
|
|
- hide: true,
|
|
|
- type: "select",
|
|
|
- // search: true,
|
|
|
- dicUrl: "/api/cyzh-community/agency/list",
|
|
|
- cascaderItem: ['residentialId','unitId'],
|
|
|
- props: {
|
|
|
- label: "name",
|
|
|
- value: "id"
|
|
|
- },
|
|
|
- dicFormatter: (res)=>{
|
|
|
- return res.data.records;
|
|
|
- },
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请选择所属社区",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },{
|
|
|
- label: "所属小区",
|
|
|
- prop: "residentialId",
|
|
|
- // slot: true,
|
|
|
- type: "select",
|
|
|
- hide: true,
|
|
|
- // search: true,
|
|
|
- cascaderIndex:0,
|
|
|
- // dicUrl: "/grid/estate/getResidentialList",
|
|
|
- dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}",
|
|
|
- dicFormatter: (res)=>{
|
|
|
- return res.data.records;
|
|
|
- },
|
|
|
- dicFlag: false,
|
|
|
- props: {
|
|
|
- label: "name",
|
|
|
- value: "id"
|
|
|
- },
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入所属小区名称",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ dicFormatter: (res)=>{
|
|
|
+ return res.data.records;
|
|
|
},
|
|
|
- {
|
|
|
- label: "所属楼栋",
|
|
|
- prop: "buildingId",
|
|
|
- // slot: true,
|
|
|
- hide: true,
|
|
|
- type: "select",
|
|
|
- // search: true,
|
|
|
- dicFlag: false,
|
|
|
- cascaderIndex:1,
|
|
|
- // dicUrl: "/grid/estate/getUnitList",
|
|
|
- dicUrl: "/api/cyzh-community/unit/list?residentialId={{key}}",
|
|
|
- dicFormatter: (res)=>{
|
|
|
- return res.data.records;
|
|
|
- },
|
|
|
- props: {
|
|
|
- label: "name",
|
|
|
- value: "id"
|
|
|
- },
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入所属单元名称",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择所属社区",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },{
|
|
|
+ label: "所属小区",
|
|
|
+ prop: "residentialId",
|
|
|
+ // slot: true,
|
|
|
+ type: "select",
|
|
|
+ hide: true,
|
|
|
+ cascaderIndex:0,
|
|
|
+ searchFilterable:true,
|
|
|
+ // dicUrl: "/grid/estate/getResidentialList",
|
|
|
+ dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}",
|
|
|
+ dicFormatter: (res)=>{
|
|
|
+ return res.data.records;
|
|
|
},
|
|
|
- {
|
|
|
- label: "所属单元",
|
|
|
- prop: "unitId",
|
|
|
- // slot: true,
|
|
|
- type: "select",
|
|
|
- // search: true,
|
|
|
- dicFlag: false,
|
|
|
- cascaderIndex:1,
|
|
|
- // dicUrl: "/grid/estate/getUnitList",
|
|
|
- dicUrl: "/api/cyzh-community/unit/list?residentialId={{key}}",
|
|
|
- dicFormatter: (res)=>{
|
|
|
- return res.data.records;
|
|
|
- },
|
|
|
- props: {
|
|
|
- label: "name",
|
|
|
- value: "id"
|
|
|
- },
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入所属单元名称",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ dicFlag: false,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id"
|
|
|
},
|
|
|
- {
|
|
|
- label: "所属楼层",
|
|
|
- prop: "floorId",
|
|
|
- // slot: true,
|
|
|
- hide: true,
|
|
|
- type: "select",
|
|
|
- // search: true,
|
|
|
- dicFlag: false,
|
|
|
- cascaderIndex:1,
|
|
|
- // dicUrl: "/grid/estate/getUnitList",
|
|
|
- dicUrl: "/api/cyzh-community/unit/list?residentialId={{key}}",
|
|
|
- dicFormatter: (res)=>{
|
|
|
- return res.data.records;
|
|
|
- },
|
|
|
- props: {
|
|
|
- label: "name",
|
|
|
- value: "id"
|
|
|
- },
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入所属单元名称",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入所属小区名称",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所属楼栋",
|
|
|
+ prop: "buildingId",
|
|
|
+ // slot: true,
|
|
|
+ hide: true,
|
|
|
+ type: "select",
|
|
|
+ dicFlag: false,
|
|
|
+ searchFilterable:true,
|
|
|
+ cascaderIndex:1,
|
|
|
+ dicUrl: "/api/cyzh-community/building/list?residentialId={{key}}",
|
|
|
+ dicFormatter: (res)=>{
|
|
|
+ return res.data.records;
|
|
|
},
|
|
|
- {
|
|
|
- label: "房屋面积",
|
|
|
- prop: "area",
|
|
|
- hide: true,
|
|
|
- },{
|
|
|
- label: "入住用户数量",
|
|
|
- prop: "userCount",
|
|
|
- display: false,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id"
|
|
|
},
|
|
|
- {
|
|
|
- label: "户型",
|
|
|
- prop: "houseType",
|
|
|
- hide: true,
|
|
|
- type: "select",
|
|
|
- // search: true,
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=house_type",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictKey"
|
|
|
- },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入所属单元名称",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所属单元",
|
|
|
+ prop: "unitId",
|
|
|
+ // slot: true,
|
|
|
+ type: "select",
|
|
|
+ dicFlag: false,
|
|
|
+ cascaderIndex:1,
|
|
|
+ searchFilterable:true,
|
|
|
+ // dicUrl: "/api/cyzh-community/residential/list?residentialId={{key}}",
|
|
|
+ dicUrl: "/api/cyzh-community/residential/list?id={{key}}",
|
|
|
+ dicFormatter: (res)=>{
|
|
|
+ return res.data.records;
|
|
|
},
|
|
|
- {
|
|
|
- label: "楼层",
|
|
|
- prop: "floor",
|
|
|
- hide: true,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id"
|
|
|
},
|
|
|
- {
|
|
|
- label: "装饰",
|
|
|
- prop: "ornament",
|
|
|
- hide: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入所属单元名称",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所属楼层",
|
|
|
+ prop: "floorId",
|
|
|
+ // slot: true,
|
|
|
+ hide: true,
|
|
|
+ type: "select",
|
|
|
+ dicFlag: false,
|
|
|
+ cascaderIndex:1,
|
|
|
+ dicUrl: "/api/cyzh-community/unit/list?residentialId={{key}}",
|
|
|
+ dicFormatter: (res)=>{
|
|
|
+ return res.data.records;
|
|
|
},
|
|
|
- {
|
|
|
- label: "房屋朝向",
|
|
|
- prop: "orientation",
|
|
|
- hide: true,
|
|
|
- },{
|
|
|
- label: "序号",
|
|
|
- prop: "serial",
|
|
|
- value: 1,
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- }, {
|
|
|
- label: "备注",
|
|
|
- prop: "remark",
|
|
|
- hide: true,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id"
|
|
|
},
|
|
|
- {
|
|
|
- label: "创建时间",
|
|
|
- prop: "createTime",
|
|
|
- hide: true,
|
|
|
- type: "datetime",
|
|
|
- valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
- display: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入所属单元名称",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "房屋面积",
|
|
|
+ prop: "area",
|
|
|
+ hide: true,
|
|
|
+ },{
|
|
|
+ label: "入住用户数量",
|
|
|
+ prop: "userCount",
|
|
|
+ display: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "户型",
|
|
|
+ prop: "houseType",
|
|
|
+ hide: true,
|
|
|
+ type: "select",
|
|
|
+ // search: true,
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=house_type",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictKey"
|
|
|
},
|
|
|
- {
|
|
|
- prop: 'type',
|
|
|
- valueDefault: 'bed',
|
|
|
- disabled: true,
|
|
|
- hide: true,
|
|
|
- display: false,
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- data: [],
|
|
|
- option: {
|
|
|
- tip: false,
|
|
|
- viewBtn: true,
|
|
|
- selection: false,
|
|
|
- addBtn: false,
|
|
|
- column: []
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "楼层",
|
|
|
+ prop: "floor",
|
|
|
+ hide: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "装饰",
|
|
|
+ prop: "ornament",
|
|
|
+ hide: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "房屋朝向",
|
|
|
+ prop: "orientation",
|
|
|
+ hide: true,
|
|
|
+ },{
|
|
|
+ label: "序号",
|
|
|
+ prop: "serial",
|
|
|
+ value: 1,
|
|
|
+ hide: true,
|
|
|
+ display: false,
|
|
|
+ }, {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remark",
|
|
|
+ hide: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "创建时间",
|
|
|
+ prop: "createTime",
|
|
|
+ hide: true,
|
|
|
+ type: "datetime",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ display: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'type',
|
|
|
+ valueDefault: 'bed',
|
|
|
+ disabled: true,
|
|
|
+ hide: true,
|
|
|
+ display: false,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ data: [],
|
|
|
+ option: {
|
|
|
+ tip: false,
|
|
|
+ viewBtn: true,
|
|
|
+ selection: false,
|
|
|
+ addBtn: false,
|
|
|
+ column: []
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
|
|
|
- mounted() {
|
|
|
+ mounted() {
|
|
|
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['permission']),
|
|
|
+ permissionBuildingList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.building_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.building_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.building_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.building_edit, false)
|
|
|
+ };
|
|
|
},
|
|
|
- computed: {
|
|
|
- ...mapGetters(['permission']),
|
|
|
- permissionBuildingList() {
|
|
|
- return {
|
|
|
- addBtn: this.vaildData(this.permission.building_add, false),
|
|
|
- viewBtn: this.vaildData(this.permission.building_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.building_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.building_edit, false)
|
|
|
- };
|
|
|
- },
|
|
|
- permissionBuildinglayerList() {
|
|
|
- return {
|
|
|
- addBtn: this.vaildData(this.permission.buildinglayer_add, false),
|
|
|
- viewBtn: this.vaildData(this.permission.buildinglayer_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.buildinglayer_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.buildinglayer_edit, false)
|
|
|
- };
|
|
|
- },
|
|
|
- permissionBuildingroomList() {
|
|
|
- return {
|
|
|
- addBtn: this.vaildData(this.permission.buildingroom_add, false),
|
|
|
- viewBtn: this.vaildData(this.permission.buildingroom_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.buildingroom_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.buildingroom_edit, false)
|
|
|
- };
|
|
|
- },
|
|
|
- permissionBedList() {
|
|
|
- return {
|
|
|
- addBtn: this.vaildData(this.permission.bed_add, false),
|
|
|
- viewBtn: this.vaildData(this.permission.bed_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.bed_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.bed_edit, false)
|
|
|
- };
|
|
|
- },
|
|
|
- permissionTreeList() {
|
|
|
- return {
|
|
|
- addBtn: this.vaildData(this.permission.building_add, false),
|
|
|
- viewBtn: this.vaildData(this.permission.building_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.building_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.building_edit, false)
|
|
|
- };
|
|
|
- },
|
|
|
- permissionDataList() {
|
|
|
- return {
|
|
|
- addBtn: this.vaildData(this.permission.building_add, false),
|
|
|
- viewBtn: this.vaildData(this.permission.building_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.building_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.building_edit, false)
|
|
|
- };
|
|
|
- },
|
|
|
- ids() {
|
|
|
- let ids = [];
|
|
|
- this.selectionList.forEach(ele => {
|
|
|
- ids.push(ele.id);
|
|
|
- });
|
|
|
- return ids.join(',');
|
|
|
+ permissionBuildinglayerList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.buildinglayer_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.buildinglayer_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.buildinglayer_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.buildinglayer_edit, false)
|
|
|
+ };
|
|
|
+ },
|
|
|
+ permissionBuildingroomList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.buildingroom_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.buildingroom_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.buildingroom_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.buildingroom_edit, false)
|
|
|
+ };
|
|
|
+ },
|
|
|
+ permissionBedList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.bed_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.bed_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.bed_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.bed_edit, false)
|
|
|
+ };
|
|
|
+ },
|
|
|
+ permissionTreeList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.building_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.building_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.building_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.building_edit, false)
|
|
|
+ };
|
|
|
+ },
|
|
|
+ permissionDataList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.building_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.building_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.building_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.building_edit, false)
|
|
|
+ };
|
|
|
+ },
|
|
|
+ ids() {
|
|
|
+ let ids = [];
|
|
|
+ this.selectionList.forEach(ele => {
|
|
|
+ ids.push(ele.id);
|
|
|
+ });
|
|
|
+ return ids.join(',');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init(){
|
|
|
+ this.option = this.optionBuilding;
|
|
|
+ this.treeData = [{ id: this.residentialId, type: this.typeParent, name: this.residentialName, children: [] }];
|
|
|
+ this.onLoadBuilding(this.residentialId);
|
|
|
+ },
|
|
|
+ rowDataSave(row, loading, done) {
|
|
|
+ row.residentialId = this.residentialId;
|
|
|
+ row.residentialName = this.residentialName;
|
|
|
+ if (row.type == this.typeBuilding) {
|
|
|
+ buildingAdd(row).then(
|
|
|
+ () => {
|
|
|
+ loading();
|
|
|
+ this.onLoadBuilding(this.residentialId);
|
|
|
+ this.$message({ type: 'success', message: '操作成功!' });
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ done();
|
|
|
+ Log.d(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (row.type == this.typeBuildingLayer) {
|
|
|
+ buildingLayerAdd(row).then(
|
|
|
+ () => {
|
|
|
+ loading();
|
|
|
+ this.onLoadUnit(row.buildingId);
|
|
|
+ this.$message({ type: 'success', message: '操作成功!' });
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ done();
|
|
|
+ Log.d(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (row.type == this.typeBuildingRoom) {
|
|
|
+ buildingRoomAdd(row).then(
|
|
|
+ () => {
|
|
|
+ loading();
|
|
|
+ this.onLoadFloor(row.buildingId, row.buildingLayerId);
|
|
|
+ this.$message({ type: 'success', message: '操作成功!' });
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ done();
|
|
|
+ Log.d(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (row.type == this.typeBed) {
|
|
|
+ bedAdd(row).then(
|
|
|
+ () => {
|
|
|
+ loading();
|
|
|
+ this.onLoadRoom(row.buildingId, row.buildingLayerId, row.buildingRoomId);
|
|
|
+ this.$message({ type: 'success', message: '操作成功!' });
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ done();
|
|
|
+ Log.d(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
- init(){
|
|
|
- this.option = this.optionBuilding;
|
|
|
- this.treeData = [{ id: this.residentialId, type: this.typeParent, name: this.residentialName, children: [] }];
|
|
|
- this.onLoadBuilding(this.residentialId);
|
|
|
- },
|
|
|
- rowDataSave(row, loading, done) {
|
|
|
- row.residentialId = this.residentialId;
|
|
|
- row.residentialName = this.residentialName;
|
|
|
- if (row.type == this.typeBuilding) {
|
|
|
- buildingAdd(row).then(
|
|
|
- () => {
|
|
|
- loading();
|
|
|
- this.onLoadBuilding(this.residentialId);
|
|
|
- this.$message({ type: 'success', message: '操作成功!' });
|
|
|
- },
|
|
|
- error => {
|
|
|
- done();
|
|
|
- Log.d(error);
|
|
|
- }
|
|
|
- );
|
|
|
- } else if (row.type == this.typeBuildingLayer) {
|
|
|
- buildingLayerAdd(row).then(
|
|
|
- () => {
|
|
|
- loading();
|
|
|
- this.onLoadUnit(row.buildingId);
|
|
|
- this.$message({ type: 'success', message: '操作成功!' });
|
|
|
- },
|
|
|
- error => {
|
|
|
- done();
|
|
|
- Log.d(error);
|
|
|
- }
|
|
|
- );
|
|
|
- } else if (row.type == this.typeBuildingRoom) {
|
|
|
- buildingRoomAdd(row).then(
|
|
|
- () => {
|
|
|
- loading();
|
|
|
- this.onLoadFloor(row.buildingId, row.buildingLayerId);
|
|
|
- this.$message({ type: 'success', message: '操作成功!' });
|
|
|
- },
|
|
|
- error => {
|
|
|
- done();
|
|
|
- Log.d(error);
|
|
|
- }
|
|
|
- );
|
|
|
- } else if (row.type == this.typeBed) {
|
|
|
- bedAdd(row).then(
|
|
|
- () => {
|
|
|
- loading();
|
|
|
- this.onLoadRoom(row.buildingId, row.buildingLayerId, row.buildingRoomId);
|
|
|
- this.$message({ type: 'success', message: '操作成功!' });
|
|
|
- },
|
|
|
- error => {
|
|
|
- done();
|
|
|
- Log.d(error);
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- rowDataUpdate(row, index, loading, done) {
|
|
|
- if (row.type == this.typeBuilding) {
|
|
|
- buildingUpdate(row).then(
|
|
|
- () => {
|
|
|
- loading();
|
|
|
- this.onLoadBuilding(this.residentialId);
|
|
|
- this.$message({ type: 'success', message: '操作成功!' });
|
|
|
- },
|
|
|
- error => {
|
|
|
- done();
|
|
|
- Log.d(error);
|
|
|
- }
|
|
|
- );
|
|
|
- } else if (row.type == this.typeBuildingLayer) {
|
|
|
- buildingLayerUpdate(row).then(
|
|
|
- () => {
|
|
|
- loading();
|
|
|
- this.onLoadUnit(row.buildingId);
|
|
|
- this.$message({ type: 'success', message: '操作成功!' });
|
|
|
- },
|
|
|
- error => {
|
|
|
- done();
|
|
|
- Log.d(error);
|
|
|
- }
|
|
|
- );
|
|
|
- } else if (row.type == this.typeBuildingRoom) {
|
|
|
- buildingRoomUpdate(row).then(
|
|
|
- () => {
|
|
|
- loading();
|
|
|
- this.onLoadFloor(row.buildingId, row.buildingLayerId);
|
|
|
- this.$message({ type: 'success', message: '操作成功!' });
|
|
|
- },
|
|
|
- error => {
|
|
|
- done();
|
|
|
- Log.d(error);
|
|
|
- }
|
|
|
- );
|
|
|
- } else if (row.type == this.typeBed) {
|
|
|
- bedUpdate(row).then(
|
|
|
- () => {
|
|
|
- loading();
|
|
|
- this.onLoadRoom(row.buildingId, row.buildingLayerId, row.buildingRoomId);
|
|
|
- this.$message({ type: 'success', message: '操作成功!' });
|
|
|
- },
|
|
|
- error => {
|
|
|
- done();
|
|
|
- Log.d(error);
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- rowDataDel(row) {
|
|
|
- this.$confirm('确定将选择数据删除?', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
+ rowDataUpdate(row, index, loading, done) {
|
|
|
+ if (row.type == this.typeBuilding) {
|
|
|
+ buildingUpdate(row).then(
|
|
|
+ () => {
|
|
|
+ loading();
|
|
|
+ this.onLoadBuilding(this.residentialId);
|
|
|
+ this.$message({ type: 'success', message: '操作成功!' });
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ done();
|
|
|
+ Log.d(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (row.type == this.typeBuildingLayer) {
|
|
|
+ buildingLayerUpdate(row).then(
|
|
|
+ () => {
|
|
|
+ loading();
|
|
|
+ this.onLoadUnit(row.buildingId);
|
|
|
+ this.$message({ type: 'success', message: '操作成功!' });
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ done();
|
|
|
+ Log.d(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (row.type == this.typeBuildingRoom) {
|
|
|
+ buildingRoomUpdate(row).then(
|
|
|
+ () => {
|
|
|
+ loading();
|
|
|
+ this.onLoadFloor(row.buildingId, row.buildingLayerId);
|
|
|
+ this.$message({ type: 'success', message: '操作成功!' });
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ done();
|
|
|
+ Log.d(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (row.type == this.typeBed) {
|
|
|
+ bedUpdate(row).then(
|
|
|
+ () => {
|
|
|
+ loading();
|
|
|
+ this.onLoadRoom(row.buildingId, row.buildingLayerId, row.buildingRoomId);
|
|
|
+ this.$message({ type: 'success', message: '操作成功!' });
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ done();
|
|
|
+ Log.d(error);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowDataDel(row) {
|
|
|
+ this.$confirm('确定将选择数据删除?', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ Log.e(row);
|
|
|
+ if (row.type == this.typeBuilding) {
|
|
|
+ return buildingRemove(row.id);
|
|
|
+ } else if (row.type == this.typeBuildingLayer) {
|
|
|
+ return buildingLayerRemove(row.id);
|
|
|
+ } else if (row.type == this.typeBuildingRoom) {
|
|
|
+ return buildingRoomRemove(row.id);
|
|
|
+ } else if (row.type == this.typeBed) {
|
|
|
+ return bedRemove(row.id);
|
|
|
+ }
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- Log.e(row);
|
|
|
- if (row.type == this.typeBuilding) {
|
|
|
- return buildingRemove(row.id);
|
|
|
- } else if (row.type == this.typeBuildingLayer) {
|
|
|
- return buildingLayerRemove(row.id);
|
|
|
- } else if (row.type == this.typeBuildingRoom) {
|
|
|
- return buildingRoomRemove(row.id);
|
|
|
- } else if (row.type == this.typeBed) {
|
|
|
- return bedRemove(row.id);
|
|
|
- }
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- if (row.type == this.typeBuilding) {
|
|
|
- this.onLoadBuilding(this.residentialId);
|
|
|
- } else if (row.type == this.typeBuildingLayer) {
|
|
|
- this.onLoadUnit(row.buildingId);
|
|
|
- } else if (row.type == this.typeBuildingRoom) {
|
|
|
- this.onLoadFloor(row.buildingId, row.buildingLayerId);
|
|
|
- } else if (row.type == this.typeBed) {
|
|
|
- this.onLoadRoom(row.buildingId, row.buildingLayerId, row.buildingRoomId);
|
|
|
- }
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '操作成功!'
|
|
|
- });
|
|
|
+ .then(() => {
|
|
|
+ if (row.type == this.typeBuilding) {
|
|
|
+ this.onLoadBuilding(this.residentialId);
|
|
|
+ } else if (row.type == this.typeBuildingLayer) {
|
|
|
+ this.onLoadUnit(row.buildingId);
|
|
|
+ } else if (row.type == this.typeBuildingRoom) {
|
|
|
+ this.onLoadFloor(row.buildingId, row.buildingLayerId);
|
|
|
+ } else if (row.type == this.typeBed) {
|
|
|
+ this.onLoadRoom(row.buildingId, row.buildingLayerId, row.buildingRoomId);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '操作成功!'
|
|
|
});
|
|
|
- },
|
|
|
- nodeClick(data) {
|
|
|
- // Log.e('======data>>' + JSON.stringify(data));
|
|
|
- if (data.type == this.typeParent) {
|
|
|
- this.initBuildingDatas();
|
|
|
- } else if (data.type == this.typeBuilding) {
|
|
|
- console.log("获取单元树")
|
|
|
- this.initUnitDatas(data);
|
|
|
- } else if (data.type == this.typeUnit) {
|
|
|
- console.log("获取楼层树")
|
|
|
- console.log("所属单元名称:"+data.name)
|
|
|
- // debugger
|
|
|
- this.initFloorDatas(data);
|
|
|
- } else if (data.type == this.typeFloor) {
|
|
|
- console.log("获取房间树")
|
|
|
- console.log("所属楼层:"+data.name)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ nodeClick(data) {
|
|
|
+ // Log.e('======data>>' + JSON.stringify(data));
|
|
|
+ if (data.type == this.typeParent) {
|
|
|
+ this.initBuildingDatas();
|
|
|
+ } else if (data.type == this.typeBuilding) {
|
|
|
+ console.log("获取单元树")
|
|
|
+ this.initUnitDatas(data);
|
|
|
+ } else if (data.type == this.typeUnit) {
|
|
|
+ console.log("获取楼层树")
|
|
|
+ console.log("所属单元名称:"+data.name)
|
|
|
+ // debugger
|
|
|
+ this.initFloorDatas(data);
|
|
|
+ } else if (data.type == this.typeFloor) {
|
|
|
+ console.log("获取房间树")
|
|
|
+ console.log("所属楼层:"+data.name)
|
|
|
|
|
|
- this.initRoomDatas(data);
|
|
|
- }
|
|
|
- },
|
|
|
- beforeOpen(done, type) {
|
|
|
+ this.initRoomDatas(data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeOpen(done, type) {
|
|
|
|
|
|
- console.log('------------->>>' + type);
|
|
|
- console.log('------------->>>' + JSON.stringify(this.form));
|
|
|
+ console.log('------------->>>' + type);
|
|
|
+ console.log('------------->>>' + JSON.stringify(this.form));
|
|
|
|
|
|
- if (['edit', 'view'].includes(type)) {
|
|
|
- if (this.form.type == this.typeBuilding) {
|
|
|
- buildingGetDetail(this.form.id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.form.type = this.typeBuilding;
|
|
|
- this.$set(this, 'form', this.form);
|
|
|
- });
|
|
|
- } else if (this.form.type == this.typeBuildingLayer) {
|
|
|
- buildingLayerGetDetail(this.form.id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.form.type = this.typeBuildingLayer;
|
|
|
- this.$set(this, 'form', this.form);
|
|
|
- });
|
|
|
- } else if (this.form.type == this.typeBuildingRoom) {
|
|
|
- buildingRoomGetDetail(this.form.id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.form.type = this.typeBuildingRoom;
|
|
|
- this.$set(this, 'form', this.form);
|
|
|
- });
|
|
|
- } else if (this.form.type == this.typeBed) {
|
|
|
- bedGetDetail(this.form.id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.form.type = this.typeBed;
|
|
|
- this.$set(this, 'form', this.form);
|
|
|
- });
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.form.pic = "/img/default/building.png"
|
|
|
+ if (['edit', 'view'].includes(type)) {
|
|
|
+ if (this.form.type == this.typeBuilding) {
|
|
|
+ buildingGetDetail(this.form.id).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.form.type = this.typeBuilding;
|
|
|
+ this.$set(this, 'form', this.form);
|
|
|
+ });
|
|
|
+ } else if (this.form.type == this.typeBuildingLayer) {
|
|
|
+ buildingLayerGetDetail(this.form.id).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.form.type = this.typeBuildingLayer;
|
|
|
+ this.$set(this, 'form', this.form);
|
|
|
+ });
|
|
|
+ } else if (this.form.type == this.typeBuildingRoom) {
|
|
|
+ buildingRoomGetDetail(this.form.id).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.form.type = this.typeBuildingRoom;
|
|
|
+ this.$set(this, 'form', this.form);
|
|
|
+ });
|
|
|
+ } else if (this.form.type == this.typeBed) {
|
|
|
+ bedGetDetail(this.form.id).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.form.type = this.typeBed;
|
|
|
+ this.$set(this, 'form', this.form);
|
|
|
+ });
|
|
|
}
|
|
|
- done();
|
|
|
- },
|
|
|
+ }else{
|
|
|
+ this.form.pic = "/img/default/building.png"
|
|
|
+ }
|
|
|
+ done();
|
|
|
+ },
|
|
|
|
|
|
- //加载右侧数据
|
|
|
- onLoadBuilding(id,params={}) {
|
|
|
- this.loading = true;
|
|
|
+ //加载右侧数据
|
|
|
+ onLoadBuilding(id,params={}) {
|
|
|
+ this.loading = true;
|
|
|
|
|
|
- params.residentialId = id;
|
|
|
- console.log("residential")
|
|
|
- getBuildingListByResidentialOldId(1,99999999,params).then(res => {
|
|
|
- this.data = res.data.data.records;
|
|
|
- this.initTreeDatasByBuilding(this.data);
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- onLoadUnit(buildingId,params={}) {
|
|
|
- this.loading = true;
|
|
|
- params.buildingId = buildingId;
|
|
|
- getUnitListByBuildingOldId(1,999999999,params).then(res => {
|
|
|
- this.data = res.data.data.records;
|
|
|
- this.initTreeDatasByUnit(this.data, buildingId);
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- onLoadFloor(buildingId, unitId,params={}) {
|
|
|
- this.loading = true;
|
|
|
- params.unitId = unitId;
|
|
|
- getFloorListByUnitOldId(1,999999999,params).then(res => {
|
|
|
- this.data = res.data.data.records;
|
|
|
- this.initTreeDatasByFloor(this.data, buildingId, unitId);
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- onLoadRoom(buildingId, unitId, floorId,params={}) {
|
|
|
- this.loading = true;
|
|
|
- params.floorId = floorId;
|
|
|
- console.log("楼层id:"+floorId)
|
|
|
- getRoomListByFloorOldId(1, 99999999, params).then(res => {
|
|
|
- this.data = res.data.data.records;
|
|
|
- // debugger
|
|
|
- for (let data of this.data) data.type = this.typeRoom;
|
|
|
- this.initTreeDatasByRoom(this.data, buildingId, unitId, floorId);
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
+ params.residentialId = id;
|
|
|
+ console.log("residential")
|
|
|
+ getBuildingListByResidentialOldId(1,99999999,params).then(res => {
|
|
|
+ this.data = res.data.data.records;
|
|
|
+ this.initTreeDatasByBuilding(this.data);
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onLoadUnit(buildingId,params={}) {
|
|
|
+ this.loading = true;
|
|
|
+ params.buildingId = buildingId;
|
|
|
+ getUnitListByBuildingOldId(1,999999999,params).then(res => {
|
|
|
+ this.data = res.data.data.records;
|
|
|
+ this.initTreeDatasByUnit(this.data, buildingId);
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onLoadFloor(buildingId, unitId,params={}) {
|
|
|
+ this.loading = true;
|
|
|
+ params.unitId = unitId;
|
|
|
+ getFloorListByUnitOldId(1,999999999,params).then(res => {
|
|
|
+ this.data = res.data.data.records;
|
|
|
+ this.initTreeDatasByFloor(this.data, buildingId, unitId);
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onLoadRoom(buildingId, unitId, floorId,params={}) {
|
|
|
+ this.loading = true;
|
|
|
+ params.floorId = floorId;
|
|
|
+ console.log("楼层id:"+floorId)
|
|
|
+ getRoomListByFloorOldId(1, 99999999, params).then(res => {
|
|
|
+ this.data = res.data.data.records;
|
|
|
+ // debugger
|
|
|
+ for (let data of this.data) data.type = this.typeRoom;
|
|
|
+ this.initTreeDatasByRoom(this.data, buildingId, unitId, floorId);
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- // 点击左侧树形Item后初始化右侧数据
|
|
|
- initBuildingDatas() {
|
|
|
- //初始化楼栋
|
|
|
- this.form = { type: this.typeBuilding };
|
|
|
- this.$set(this, 'form', this.form);
|
|
|
- this.$set(this, 'option', this.optionBuilding);
|
|
|
- this.onLoadBuilding(this.residentialId);
|
|
|
- },
|
|
|
- initUnitDatas(data) {
|
|
|
- //初始化单元
|
|
|
- this.form = {
|
|
|
- type: this.typeUnit,
|
|
|
- buildingOldId: data.id
|
|
|
- };
|
|
|
- this.initUnitDicData(data.id, this.optionUnit);
|
|
|
- this.$set(this, 'form', this.form);
|
|
|
- this.$set(this, 'option', this.optionUnit);
|
|
|
- this.onLoadUnit(data.id);
|
|
|
- },
|
|
|
- initFloorDatas(data) {
|
|
|
- //初始化楼层
|
|
|
- this.form = {
|
|
|
- type: this.typeFloor,
|
|
|
- buildingId: data.buildingId,
|
|
|
- unitId: data.id
|
|
|
- };
|
|
|
- this.initFloorDicDatas(data.buildingId, data.id, this.optionFloor);
|
|
|
- this.$set(this, 'form', this.form);
|
|
|
- this.$set(this, 'option', this.optionFloor);
|
|
|
- this.onLoadFloor(data.buildingId, data.id);
|
|
|
- },
|
|
|
- initRoomDatas(data) {
|
|
|
- //初始化房间
|
|
|
- this.form = {
|
|
|
- type: this.typeRoom,
|
|
|
- buildingId: data.buildingId,
|
|
|
- unitId: data.unitId,
|
|
|
- floorId: data.id
|
|
|
- };
|
|
|
- this.initRoomDicData(data.buildingId, data.unitId, data.id);
|
|
|
- this.$set(this, 'form', this.form);
|
|
|
- this.$set(this, 'option', this.optionRoom);
|
|
|
+ // 点击左侧树形Item后初始化右侧数据
|
|
|
+ initBuildingDatas() {
|
|
|
+ //初始化楼栋
|
|
|
+ this.form = { type: this.typeBuilding };
|
|
|
+ this.$set(this, 'form', this.form);
|
|
|
+ this.$set(this, 'option', this.optionBuilding);
|
|
|
+ this.onLoadBuilding(this.residentialId);
|
|
|
+ },
|
|
|
+ initUnitDatas(data) {
|
|
|
+ //初始化单元
|
|
|
+ this.form = {
|
|
|
+ type: this.typeUnit,
|
|
|
+ buildingOldId: data.id
|
|
|
+ };
|
|
|
+ this.initUnitDicData(data.id, this.optionUnit);
|
|
|
+ this.$set(this, 'form', this.form);
|
|
|
+ this.$set(this, 'option', this.optionUnit);
|
|
|
+ this.onLoadUnit(data.id);
|
|
|
+ },
|
|
|
+ initFloorDatas(data) {
|
|
|
+ //初始化楼层
|
|
|
+ this.form = {
|
|
|
+ type: this.typeFloor,
|
|
|
+ buildingId: data.buildingId,
|
|
|
+ unitId: data.id
|
|
|
+ };
|
|
|
+ this.initFloorDicDatas(data.buildingId, data.id, this.optionFloor);
|
|
|
+ this.$set(this, 'form', this.form);
|
|
|
+ this.$set(this, 'option', this.optionFloor);
|
|
|
+ this.onLoadFloor(data.buildingId, data.id);
|
|
|
+ },
|
|
|
+ initRoomDatas(data) {
|
|
|
+ //初始化房间
|
|
|
+ this.form = {
|
|
|
+ type: this.typeRoom,
|
|
|
+ buildingId: data.buildingId,
|
|
|
+ unitId: data.unitId,
|
|
|
+ floorId: data.id
|
|
|
+ };
|
|
|
+ this.initRoomDicData(data.buildingId, data.unitId, data.id);
|
|
|
+ this.$set(this, 'form', this.form);
|
|
|
+ this.$set(this, 'option', this.optionRoom);
|
|
|
|
|
|
- this.onLoadRoom(data.buildingId, data.unitId, data.id);
|
|
|
- },
|
|
|
+ this.onLoadRoom(data.buildingId, data.unitId, data.id);
|
|
|
+ },
|
|
|
|
|
|
- // 点击左侧树形Item后初始化右侧选择项目数据
|
|
|
- initUnitDicData(buildingOldId, option) {
|
|
|
- if (option == null) option = this.optionUnit;
|
|
|
- //初始化上一级下拉数据
|
|
|
- for (let column of option.column) {
|
|
|
- if (column.prop == 'buildingId') {
|
|
|
- column.valueDefault = buildingOldId;
|
|
|
- column.dicData = this.treeData[0].children;
|
|
|
- break;
|
|
|
- }
|
|
|
+ // 点击左侧树形Item后初始化右侧选择项目数据
|
|
|
+ initUnitDicData(buildingOldId, option) {
|
|
|
+ if (option == null) option = this.optionUnit;
|
|
|
+ //初始化上一级下拉数据
|
|
|
+ for (let column of option.column) {
|
|
|
+ if (column.prop == 'buildingId') {
|
|
|
+ column.valueDefault = buildingOldId;
|
|
|
+ column.dicData = this.treeData[0].children;
|
|
|
+ break;
|
|
|
}
|
|
|
- },
|
|
|
- initFloorDicDatas(buildingId, unitId, option) {
|
|
|
- if (option == null) option = this.optionFloor;
|
|
|
- // this.initFloorDicData(buildingId, option);
|
|
|
- //初始化上一级下拉数据
|
|
|
- for (let column of option.column) {
|
|
|
- if (column.prop == 'unitId') {
|
|
|
- column.valueDefault = unitId;
|
|
|
- for (let building of this.treeData[0].children) {
|
|
|
- if (building.id == buildingId) {
|
|
|
- column.dicData = building.children;
|
|
|
- break;
|
|
|
- }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ initFloorDicDatas(buildingId, unitId, option) {
|
|
|
+ if (option == null) option = this.optionFloor;
|
|
|
+ // this.initFloorDicData(buildingId, option);
|
|
|
+ //初始化上一级下拉数据
|
|
|
+ for (let column of option.column) {
|
|
|
+ if (column.prop == 'unitId') {
|
|
|
+ column.valueDefault = unitId;
|
|
|
+ for (let building of this.treeData[0].children) {
|
|
|
+ if (building.id == buildingId) {
|
|
|
+ column.dicData = building.children;
|
|
|
+ break;
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
+ break;
|
|
|
}
|
|
|
- },
|
|
|
- initRoomDicData(buildingId, unitId, floorId) {
|
|
|
- // this.initFloorDicData(buildingId, this.optionRoom);
|
|
|
- this.initFloorDicDatas(buildingId, unitId, this.optionRoom);
|
|
|
- //初始化上一级下拉数据
|
|
|
- // for (let column of this.optionRoom.column) {
|
|
|
- // if (column.prop == 'buildingRoomId') {
|
|
|
- // column.valueDefault = roomId;
|
|
|
- // for (let building of this.treeData[0].children) {
|
|
|
- // if (building.id == buildingId) {
|
|
|
- // for (let layer of building.children) {
|
|
|
- // if (layer.id == layerId) {
|
|
|
- // column.dicData = layer.children;
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ initRoomDicData(buildingId, unitId, floorId) {
|
|
|
+ // this.initFloorDicData(buildingId, this.optionRoom);
|
|
|
+ this.initFloorDicDatas(buildingId, unitId, this.optionRoom);
|
|
|
+ //初始化上一级下拉数据
|
|
|
+ // for (let column of this.optionRoom.column) {
|
|
|
+ // if (column.prop == 'buildingRoomId') {
|
|
|
+ // column.valueDefault = roomId;
|
|
|
+ // for (let building of this.treeData[0].children) {
|
|
|
+ // if (building.id == buildingId) {
|
|
|
+ // for (let layer of building.children) {
|
|
|
+ // if (layer.id == layerId) {
|
|
|
+ // column.dicData = layer.children;
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ },
|
|
|
|
|
|
- // 初始化右侧数据后更新左侧树形数据
|
|
|
- initTreeDatasByBuilding(datas) {
|
|
|
- let treeData = [];
|
|
|
- if (!ArrUtil.isNullOrLength(datas)) {
|
|
|
+ // 初始化右侧数据后更新左侧树形数据
|
|
|
+ initTreeDatasByBuilding(datas) {
|
|
|
+ let treeData = [];
|
|
|
+ if (!ArrUtil.isNullOrLength(datas)) {
|
|
|
+ for (let data of datas) {
|
|
|
+ data.type = this.typeBuilding;
|
|
|
+ //初始化楼栋数据
|
|
|
+ treeData = ArrUtil.add(treeData, {
|
|
|
+ id: data.id,
|
|
|
+ type: "building",
|
|
|
+ leaf: false,
|
|
|
+ name: data.name,
|
|
|
+ children: [],
|
|
|
+ tag: data
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.treeData[0].children = treeData;
|
|
|
+ },
|
|
|
+ initTreeDatasByUnit(datas, buildingId) {
|
|
|
+ // debugger
|
|
|
+ for (let children of this.treeData[0].children) {
|
|
|
+ if (children.id == buildingId) {
|
|
|
+ this.optionUnit.addBtn = children.tag.floorNum > datas.length;
|
|
|
+ let treeData = [];
|
|
|
for (let data of datas) {
|
|
|
- data.type = this.typeBuilding;
|
|
|
- //初始化楼栋数据
|
|
|
+ data.type = this.typeUnit;
|
|
|
treeData = ArrUtil.add(treeData, {
|
|
|
id: data.id,
|
|
|
- type: "building",
|
|
|
- leaf: false,
|
|
|
+ buildingId: buildingId,
|
|
|
+ type: data.type,
|
|
|
name: data.name,
|
|
|
children: [],
|
|
|
tag: data
|
|
|
});
|
|
|
}
|
|
|
+ children.children = treeData;
|
|
|
+ break;
|
|
|
}
|
|
|
- this.treeData[0].children = treeData;
|
|
|
- },
|
|
|
- initTreeDatasByUnit(datas, buildingId) {
|
|
|
- // debugger
|
|
|
- for (let children of this.treeData[0].children) {
|
|
|
- if (children.id == buildingId) {
|
|
|
- this.optionUnit.addBtn = children.tag.floorNum > datas.length;
|
|
|
- let treeData = [];
|
|
|
- for (let data of datas) {
|
|
|
- data.type = this.typeUnit;
|
|
|
- treeData = ArrUtil.add(treeData, {
|
|
|
- id: data.id,
|
|
|
- buildingId: buildingId,
|
|
|
- type: data.type,
|
|
|
- name: data.name,
|
|
|
- children: [],
|
|
|
- tag: data
|
|
|
- });
|
|
|
- }
|
|
|
- children.children = treeData;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- initTreeDatasByFloor(datas, buildingId, unitId) {
|
|
|
- for (let building of this.treeData[0].children) {
|
|
|
- if (building.id == buildingId) {
|
|
|
- for (let layer of building.children) {
|
|
|
- if (layer.id == unitId) {
|
|
|
- this.optionFloor.addBtn = building.tag.roomNum > datas.length;
|
|
|
- let treeData = [];
|
|
|
- for (let data of datas) {
|
|
|
- data.type = this.typeFloor;
|
|
|
- treeData = ArrUtil.add(treeData, {
|
|
|
- id: data.id,
|
|
|
- buildingId: buildingId,
|
|
|
- unitId: unitId,
|
|
|
- type: data.type,
|
|
|
- name: data.name,
|
|
|
- children: [],
|
|
|
- tag: data
|
|
|
- });
|
|
|
- }
|
|
|
- layer.children = treeData;
|
|
|
- break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ initTreeDatasByFloor(datas, buildingId, unitId) {
|
|
|
+ for (let building of this.treeData[0].children) {
|
|
|
+ if (building.id == buildingId) {
|
|
|
+ for (let layer of building.children) {
|
|
|
+ if (layer.id == unitId) {
|
|
|
+ this.optionFloor.addBtn = building.tag.roomNum > datas.length;
|
|
|
+ let treeData = [];
|
|
|
+ for (let data of datas) {
|
|
|
+ data.type = this.typeFloor;
|
|
|
+ treeData = ArrUtil.add(treeData, {
|
|
|
+ id: data.id,
|
|
|
+ buildingId: buildingId,
|
|
|
+ unitId: unitId,
|
|
|
+ type: data.type,
|
|
|
+ name: data.name,
|
|
|
+ children: [],
|
|
|
+ tag: data
|
|
|
+ });
|
|
|
}
|
|
|
+ layer.children = treeData;
|
|
|
+ break;
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
+ break;
|
|
|
}
|
|
|
- },
|
|
|
- initTreeDatasByRoom(datas, buildingId, unitId, floorId) {
|
|
|
- for (let building of this.treeData[0].children) {
|
|
|
- if (building.id == buildingId) {
|
|
|
- for (let unit of building.children) {
|
|
|
- if (unit.id == unitId) {
|
|
|
- for (let floor of unit.children) {
|
|
|
- if (floor.id == floorId) {
|
|
|
- this.optionRoom.addBtn = floor.tag.bedNum > datas.length;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ initTreeDatasByRoom(datas, buildingId, unitId, floorId) {
|
|
|
+ for (let building of this.treeData[0].children) {
|
|
|
+ if (building.id == buildingId) {
|
|
|
+ for (let unit of building.children) {
|
|
|
+ if (unit.id == unitId) {
|
|
|
+ for (let floor of unit.children) {
|
|
|
+ if (floor.id == floorId) {
|
|
|
+ this.optionRoom.addBtn = floor.tag.bedNum > datas.length;
|
|
|
|
|
|
- let treeData = [];
|
|
|
- for (let data of datas) {
|
|
|
- data.type = this.typeRoom;
|
|
|
- treeData = ArrUtil.add(treeData, {
|
|
|
- id: data.id,
|
|
|
- buildingId: buildingId,
|
|
|
- unitId: unitId,
|
|
|
- floorId: floorId,
|
|
|
- type: data.type,
|
|
|
- name: data.name,
|
|
|
- children: [],
|
|
|
- tag: data
|
|
|
- });
|
|
|
- }
|
|
|
- floor.children = treeData;
|
|
|
- break;
|
|
|
+ let treeData = [];
|
|
|
+ for (let data of datas) {
|
|
|
+ data.type = this.typeRoom;
|
|
|
+ treeData = ArrUtil.add(treeData, {
|
|
|
+ id: data.id,
|
|
|
+ buildingId: buildingId,
|
|
|
+ unitId: unitId,
|
|
|
+ floorId: floorId,
|
|
|
+ type: data.type,
|
|
|
+ name: data.name,
|
|
|
+ children: [],
|
|
|
+ tag: data
|
|
|
+ });
|
|
|
}
|
|
|
+ floor.children = treeData;
|
|
|
+ break;
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
+ break;
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
+ break;
|
|
|
}
|
|
|
- },
|
|
|
- batchAdd(){
|
|
|
+ }
|
|
|
+ },
|
|
|
+ batchAdd(){
|
|
|
|
|
|
- this.$refs['batchForm'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.batchForm.residentialId = this.residentialId;
|
|
|
- this.batchDisabled = true;
|
|
|
- this.batchText = '正在创建中···';
|
|
|
- this.batchIcon = 'el-icon-loading';
|
|
|
+ this.$refs['batchForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.batchForm.residentialId = this.residentialId;
|
|
|
+ this.batchDisabled = true;
|
|
|
+ this.batchText = '正在创建中···';
|
|
|
+ this.batchIcon = 'el-icon-loading';
|
|
|
|
|
|
- batchAddSubmit(this.batchForm).then(res => {
|
|
|
- if (res.data.code == 200){
|
|
|
- this.batchVisible = false;
|
|
|
- this.init();
|
|
|
- }else{
|
|
|
- this.batchIcon = 'el-icon-circle-plus-outline';
|
|
|
- this.batchText = '提交';
|
|
|
- this.batchDisabled = false;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- }
|
|
|
- };
|
|
|
+ batchAddSubmit(this.batchForm).then(res => {
|
|
|
+ if (res.data.code == 200){
|
|
|
+ this.batchVisible = false;
|
|
|
+ this.init();
|
|
|
+ }else{
|
|
|
+ this.batchIcon = 'el-icon-circle-plus-outline';
|
|
|
+ this.batchText = '提交';
|
|
|
+ this.batchDisabled = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|