|
@@ -1,9 +1,9 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
- <el-form-item label="分区名称" prop="divisionName">
|
|
|
|
|
|
+ <el-form-item label="分区名称" prop="zoningName">
|
|
<el-input
|
|
<el-input
|
|
- v-model="queryParams.divisionName"
|
|
|
|
|
|
+ v-model="queryParams.zoningName"
|
|
placeholder="请输入分区名称"
|
|
placeholder="请输入分区名称"
|
|
clearable
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
@@ -77,12 +77,12 @@
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="divisionList" @selection-change="handleSelectionChange">
|
|
|
|
|
|
+ <el-table v-loading="loading" :data="zoningList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column label="序号" align="center" prop="id" />
|
|
<el-table-column label="序号" align="center" prop="id" />
|
|
- <el-table-column label="建筑编码" align="center" prop="bldgCode" />
|
|
|
|
- <el-table-column label="分区编码" align="center" prop="divisionCode" />
|
|
|
|
- <el-table-column label="分区名称" align="center" prop="divisionName" />
|
|
|
|
|
|
+ <el-table-column label="分区编码" align="center" prop="zoningCode" />
|
|
|
|
+ <el-table-column label="分区名称" align="center" prop="zoningName" />
|
|
|
|
+ <el-table-column label="所在建筑" align="center" prop="bldgName" />
|
|
<el-table-column label="楼层" align="center" prop="floor" />
|
|
<el-table-column label="楼层" align="center" prop="floor" />
|
|
<el-table-column label="房间号" align="center" prop="roomNo" />
|
|
<el-table-column label="房间号" align="center" prop="roomNo" />
|
|
<el-table-column label="建筑划分面积" align="center" prop="bldgLdArea" />
|
|
<el-table-column label="建筑划分面积" align="center" prop="bldgLdArea" />
|
|
@@ -118,14 +118,14 @@
|
|
<!-- 添加或修改建筑区域划分对话框 -->
|
|
<!-- 添加或修改建筑区域划分对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
- <el-form-item label="建筑编码" prop="bldgCode">
|
|
|
|
- <el-input v-model="form.bldgCode" placeholder="请输入建筑编码" />
|
|
|
|
|
|
+ <el-form-item label="分区编码" prop="zoningCode">
|
|
|
|
+ <el-input v-model="form.zoningCode" placeholder="请输入分区编码" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="分区编码" prop="divisionCode">
|
|
|
|
- <el-input v-model="form.divisionCode" placeholder="请输入分区编码" />
|
|
|
|
|
|
+ <el-form-item label="分区名称" prop="zoningName">
|
|
|
|
+ <el-input v-model="form.zoningName" placeholder="请输入分区名称" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="分区名称" prop="divisionName">
|
|
|
|
- <el-input v-model="form.divisionName" placeholder="请输入分区名称" />
|
|
|
|
|
|
+ <el-form-item label="所在建筑" prop="bldgName">
|
|
|
|
+ <el-input v-model="form.bldgCode" placeholder="请输入建筑编码" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="楼层" prop="floor">
|
|
<el-form-item label="楼层" prop="floor">
|
|
<el-input v-model="form.floor" placeholder="请输入楼层" />
|
|
<el-input v-model="form.floor" placeholder="请输入楼层" />
|
|
@@ -149,10 +149,10 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { listDivision, getDivision, delDivision, addDivision, updateDivision } from "@/api/basecfg/zoning";
|
|
|
|
|
|
+import { listZoning, getZoning, delZoning, addZoning, updateZoning } from "@/api/basecfg/zoning";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: "Division",
|
|
|
|
|
|
+ name: "Zonin",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 遮罩层
|
|
// 遮罩层
|
|
@@ -168,7 +168,7 @@ export default {
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
// 建筑区域划分表格数据
|
|
// 建筑区域划分表格数据
|
|
- divisionList: [],
|
|
|
|
|
|
+ zoningList: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
@@ -178,8 +178,8 @@ export default {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
bldgCode: null,
|
|
bldgCode: null,
|
|
- divisionCode: null,
|
|
|
|
- divisionName: null,
|
|
|
|
|
|
+ zoningCode: null,
|
|
|
|
+ zoningName: null,
|
|
floor: null,
|
|
floor: null,
|
|
roomNo: null,
|
|
roomNo: null,
|
|
bldgLdArea: null,
|
|
bldgLdArea: null,
|
|
@@ -189,13 +189,10 @@ export default {
|
|
form: {},
|
|
form: {},
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
- bldgCode: [
|
|
|
|
- { required: true, message: "建筑编码不能为空", trigger: "blur" }
|
|
|
|
- ],
|
|
|
|
- divisionCode: [
|
|
|
|
|
|
+ zoningCode: [
|
|
{ required: true, message: "分区编码不能为空", trigger: "blur" }
|
|
{ required: true, message: "分区编码不能为空", trigger: "blur" }
|
|
],
|
|
],
|
|
- divisionName: [
|
|
|
|
|
|
+ zoningName: [
|
|
{ required: true, message: "分区名称不能为空", trigger: "blur" }
|
|
{ required: true, message: "分区名称不能为空", trigger: "blur" }
|
|
],
|
|
],
|
|
}
|
|
}
|
|
@@ -208,8 +205,8 @@ export default {
|
|
/** 查询建筑区域划分列表 */
|
|
/** 查询建筑区域划分列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listDivision(this.queryParams).then(response => {
|
|
|
|
- this.divisionList = response.rows;
|
|
|
|
|
|
+ listZoning(this.queryParams).then(response => {
|
|
|
|
+ this.zoningList = response.rows;
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
@@ -224,8 +221,8 @@ export default {
|
|
this.form = {
|
|
this.form = {
|
|
id: null,
|
|
id: null,
|
|
bldgCode: null,
|
|
bldgCode: null,
|
|
- divisionCode: null,
|
|
|
|
- divisionName: null,
|
|
|
|
|
|
+ zoningCode: null,
|
|
|
|
+ zoningName: null,
|
|
floor: null,
|
|
floor: null,
|
|
roomNo: null,
|
|
roomNo: null,
|
|
bldgLdArea: null,
|
|
bldgLdArea: null,
|
|
@@ -259,7 +256,7 @@ export default {
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
this.reset();
|
|
const id = row.id || this.ids
|
|
const id = row.id || this.ids
|
|
- getDivision(id).then(response => {
|
|
|
|
|
|
+ getZoning(id).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "修改建筑区域划分";
|
|
this.title = "修改建筑区域划分";
|
|
@@ -270,13 +267,13 @@ export default {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.id != null) {
|
|
if (this.form.id != null) {
|
|
- updateDivision(this.form).then(response => {
|
|
|
|
|
|
+ updateZoning(this.form).then(response => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- addDivision(this.form).then(response => {
|
|
|
|
|
|
+ addZoning(this.form).then(response => {
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
@@ -289,7 +286,7 @@ export default {
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids;
|
|
const ids = row.id || this.ids;
|
|
this.$modal.confirm('是否确认删除建筑区域划分编号为"' + ids + '"的数据项?').then(function() {
|
|
this.$modal.confirm('是否确认删除建筑区域划分编号为"' + ids + '"的数据项?').then(function() {
|
|
- return delDivision(ids);
|
|
|
|
|
|
+ return delZoning(ids);
|
|
}).then(() => {
|
|
}).then(() => {
|
|
this.getList();
|
|
this.getList();
|
|
this.$modal.msgSuccess("删除成功");
|
|
this.$modal.msgSuccess("删除成功");
|
|
@@ -297,9 +294,9 @@ export default {
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
handleExport() {
|
|
- this.download('ems/division/export', {
|
|
|
|
|
|
+ this.download('ems/basecfg/area/building/zoning/export', {
|
|
...this.queryParams
|
|
...this.queryParams
|
|
- }, `division_${new Date().getTime()}.xlsx`)
|
|
|
|
|
|
+ }, `zoning_${new Date().getTime()}.xlsx`)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|