|
@@ -6,19 +6,11 @@
|
|
<el-row class="left">
|
|
<el-row class="left">
|
|
<span style="float:right;">当前筛选条件下共{{page.total || '--'}}租户</span>
|
|
<span style="float:right;">当前筛选条件下共{{page.total || '--'}}租户</span>
|
|
<el-select v-model="onlyRead" @change="getTableHeader" style="width:100px;margin-right:10px;vertical-align:bottom;">
|
|
<el-select v-model="onlyRead" @change="getTableHeader" style="width:100px;margin-right:10px;vertical-align:bottom;">
|
|
- <el-option
|
|
|
|
- v-for="item in options"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
|
|
<el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
|
|
- <el-option
|
|
|
|
- v-for="item in showTypes"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
|
|
+ <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<!-- <div v-show="onlyRead" style="width:200px;display:inline-block;text-align:left;color:gray;font-size:12px;">
|
|
<!-- <div v-show="onlyRead" style="width:200px;display:inline-block;text-align:left;color:gray;font-size:12px;">
|
|
@@ -27,10 +19,11 @@
|
|
</div> -->
|
|
</div> -->
|
|
<el-button @click="handleCreateTableData">添加租户</el-button>
|
|
<el-button @click="handleCreateTableData">添加租户</el-button>
|
|
<el-button @click="getTableHeader">刷新</el-button>
|
|
<el-button @click="getTableHeader">刷新</el-button>
|
|
|
|
+ <el-button >管理租赁空间</el-button>
|
|
<el-button v-show="!onlyRead" @click="undo">撤销</el-button>
|
|
<el-button v-show="!onlyRead" @click="undo">撤销</el-button>
|
|
</el-row>
|
|
</el-row>
|
|
<div class="tableBox">
|
|
<div class="tableBox">
|
|
- <div class="center middle_sty" style="flex:2;" v-show="tableData && !tableData.length">
|
|
|
|
|
|
+ <div class="center middle_sty" v-show="tableData && !tableData.length">
|
|
<p>
|
|
<p>
|
|
<i class="icon-wushuju iconfont"></i>
|
|
<i class="icon-wushuju iconfont"></i>
|
|
暂无数据
|
|
暂无数据
|
|
@@ -39,34 +32,9 @@
|
|
<div class="tableLeft" v-show="tableData && tableData.length">
|
|
<div class="tableLeft" v-show="tableData && tableData.length">
|
|
<handson-table ref="table"></handson-table>
|
|
<handson-table ref="table"></handson-table>
|
|
</div>
|
|
</div>
|
|
- <div class="tableRight">
|
|
|
|
- <div v-show="isTableRightShow">
|
|
|
|
- <div class="table_right_box"><span class="iconfont close_right" @click="handleCloseRight"></span></div>
|
|
|
|
- <h5>管理租赁空间</h5>
|
|
|
|
- <p style="margin-bottom: 10px;">以下为关联的业务空间id</p>
|
|
|
|
- <el-input
|
|
|
|
- type="textarea"
|
|
|
|
- :autosize="{ minRows: 6, maxRows: 10}"
|
|
|
|
- :disabled="onlyRead"
|
|
|
|
- placeholder="请输入业务空间id,以“,”分割"
|
|
|
|
- v-model="roomId">
|
|
|
|
- </el-input>
|
|
|
|
- <el-row class="right" v-show="!onlyRead">
|
|
|
|
- <el-button @click="handleCloseRight">取消</el-button>
|
|
|
|
- <el-button type="primary" @click="saveSpaceList">保存</el-button>
|
|
|
|
- </el-row>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
- <el-pagination
|
|
|
|
- class="right"
|
|
|
|
- v-show="tableData && tableData.length"
|
|
|
|
- @size-change="handleSizeChange"
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- :current-page="page.pageNumber"
|
|
|
|
- :page-sizes="page.pageSizes"
|
|
|
|
- :page-size="page.pageSize"
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
|
+ <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
|
+ :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
|
|
:total="page.total">
|
|
:total="page.total">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
<!-- 不支持的输入方式 -->
|
|
<!-- 不支持的输入方式 -->
|
|
@@ -82,6 +50,8 @@
|
|
<el-button type="primary" @click="handleClickUpdate">确 认</el-button>
|
|
<el-button type="primary" @click="handleClickUpdate">确 认</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <!-- 右侧关联的业务空间抽屉 -->
|
|
|
|
+ <roomCountDrawer ref="roomCountDrawer" :readonly="onlyRead"></roomCountDrawer>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -89,7 +59,7 @@ import tools from "@/utils/scan/tools"
|
|
import handsonUtils from "@/utils/hasontableUtils"
|
|
import handsonUtils from "@/utils/hasontableUtils"
|
|
import showTools from "@/utils/handsontable/notShow"
|
|
import showTools from "@/utils/handsontable/notShow"
|
|
import text from "@/utils/handsontable/mainText"
|
|
import text from "@/utils/handsontable/mainText"
|
|
-
|
|
|
|
|
|
+import roomCountDrawer from "@/components/ledger/rentList/roomCountDrawer"
|
|
import floorCascader from "@/components/ledger/lib/floorCascader"
|
|
import floorCascader from "@/components/ledger/lib/floorCascader"
|
|
import handsonTable from "@/components/common/handsontable"
|
|
import handsonTable from "@/components/common/handsontable"
|
|
import { getDataDictionary, getRentTableHeader, getRentTableData, updataRentTableData, deleteRentTableData, saveRentRelateSpace, BeatchQueryParam } from "@/api/scan/request"
|
|
import { getDataDictionary, getRentTableHeader, getRentTableData, updataRentTableData, deleteRentTableData, saveRentRelateSpace, BeatchQueryParam } from "@/api/scan/request"
|
|
@@ -97,7 +67,8 @@ import { mapGetters, mapActions } from "vuex";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
floorCascader,
|
|
floorCascader,
|
|
- handsonTable
|
|
|
|
|
|
+ handsonTable,
|
|
|
|
+ roomCountDrawer
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -137,35 +108,31 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters("layout", [
|
|
|
|
- "projectId",
|
|
|
|
- "secret",
|
|
|
|
- "userId"
|
|
|
|
- ]),
|
|
|
|
- showTypes () {
|
|
|
|
- return this.onlyRead?
|
|
|
|
- [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]:
|
|
|
|
- [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
|
|
|
|
|
|
+ ...mapGetters("layout", ["projectId", "secret", "userId"]),
|
|
|
|
+ showTypes() {
|
|
|
|
+ return this.onlyRead ?
|
|
|
|
+ [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
|
|
|
|
+ [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getTableHeader()
|
|
this.getTableHeader()
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- projectId() {
|
|
|
|
- this.getTableHeader()
|
|
|
|
|
|
+ projectId() {
|
|
|
|
+ this.getTableHeader()
|
|
|
|
+ },
|
|
|
|
+ showTypes: {
|
|
|
|
+ handler(newName, oldName) {
|
|
|
|
+ if (newName && newName[0] && newName[0].value) {
|
|
|
|
+ this.showType = newName[0].value
|
|
|
|
+ } else {
|
|
|
|
+ this.showType = ""
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- showTypes: {
|
|
|
|
- handler(newName, oldName) {
|
|
|
|
- if (newName && newName[0] && newName[0].value) {
|
|
|
|
- this.showType = newName[0].value
|
|
|
|
- } else {
|
|
|
|
- this.showType = ""
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- immediate: true,
|
|
|
|
- deep: true
|
|
|
|
- }
|
|
|
|
|
|
+ immediate: true,
|
|
|
|
+ deep: true
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 获取表头数据(初始化表格)
|
|
// 获取表头数据(初始化表格)
|
|
@@ -181,7 +148,7 @@ export default {
|
|
await getDataDictionary(param, res => {
|
|
await getDataDictionary(param, res => {
|
|
this.tableHeader = res.Content;
|
|
this.tableHeader = res.Content;
|
|
this.tableHeader.forEach(item => {
|
|
this.tableHeader.forEach(item => {
|
|
- if(item.Path && item.InputMode){
|
|
|
|
|
|
+ if (item.Path && item.InputMode) {
|
|
this.inputMap[item.Path] = item.InputMode
|
|
this.inputMap[item.Path] = item.InputMode
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -199,7 +166,7 @@ export default {
|
|
this.copyTableData = tools.deepCopy(res.Content)
|
|
this.copyTableData = tools.deepCopy(res.Content)
|
|
this.page.pageNumber = res.PageNumber
|
|
this.page.pageNumber = res.PageNumber
|
|
this.page.total = res.Total
|
|
this.page.total = res.Total
|
|
- if(this.tableData && this.tableData.length){
|
|
|
|
|
|
+ if (this.tableData && this.tableData.length) {
|
|
if (this.onlyRead) {
|
|
if (this.onlyRead) {
|
|
this.getBatch(res.Content)
|
|
this.getBatch(res.Content)
|
|
}
|
|
}
|
|
@@ -213,7 +180,7 @@ export default {
|
|
Content: [],
|
|
Content: [],
|
|
Projection: []
|
|
Projection: []
|
|
}, keyList = [];
|
|
}, keyList = [];
|
|
- //生成要修改字段列表
|
|
|
|
|
|
+ //生成要修改字段列表
|
|
change.map(item => {
|
|
change.map(item => {
|
|
let key = item[1].split(".")[0]
|
|
let key = item[1].split(".")[0]
|
|
if (item[1] && keyList.indexOf(key) == -1) {
|
|
if (item[1] && keyList.indexOf(key) == -1) {
|
|
@@ -238,7 +205,7 @@ export default {
|
|
param.Content.push(item);
|
|
param.Content.push(item);
|
|
});
|
|
});
|
|
await updataRentTableData(param, (res) => {
|
|
await updataRentTableData(param, (res) => {
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//保存元空间关联
|
|
//保存元空间关联
|
|
@@ -271,7 +238,7 @@ export default {
|
|
}
|
|
}
|
|
let param = []
|
|
let param = []
|
|
params.map(item => {
|
|
params.map(item => {
|
|
- param.push({TenantID: item.TenantID})
|
|
|
|
|
|
+ param.push({ TenantID: item.TenantID })
|
|
})
|
|
})
|
|
this.$confirm("此操作将删除租户,是否继续?", "提示", {
|
|
this.$confirm("此操作将删除租户,是否继续?", "提示", {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -339,7 +306,7 @@ export default {
|
|
formatHeaderData(list) {//格式化表头显示的数据
|
|
formatHeaderData(list) {//格式化表头显示的数据
|
|
let arr = tools.copyArr(list)
|
|
let arr = tools.copyArr(list)
|
|
let data = showTools.headerTextFilter(arr, "tenant", this.onlyRead, this.showType)
|
|
let data = showTools.headerTextFilter(arr, "tenant", this.onlyRead, this.showType)
|
|
- data.unshift("操作","所属楼层","租赁空间");
|
|
|
|
|
|
+ data.unshift("操作", "所属楼层", "租赁空间");
|
|
return data;
|
|
return data;
|
|
},
|
|
},
|
|
formatHeaderType(list) {//格式化表头头映射的数据
|
|
formatHeaderType(list) {//格式化表头头映射的数据
|
|
@@ -400,12 +367,14 @@ export default {
|
|
}
|
|
}
|
|
//点击关联的元空间
|
|
//点击关联的元空间
|
|
if (val === "RoomCount") {
|
|
if (val === "RoomCount") {
|
|
- if(infos && infos.RoomID) {
|
|
|
|
- this.roomId = infos.RoomID
|
|
|
|
- } else {
|
|
|
|
- this.roomId = ""
|
|
|
|
- }
|
|
|
|
- this.isTableRightShow = true;
|
|
|
|
|
|
+ // if (infos && infos.RoomID) {
|
|
|
|
+ // this.roomId = infos.RoomID
|
|
|
|
+ // } else {
|
|
|
|
+ // this.roomId = ""
|
|
|
|
+ // }
|
|
|
|
+ // this.isTableRightShow = true;
|
|
|
|
+ console.log(infos)
|
|
|
|
+ this.$refs.roomCountDrawer.showDrawer()
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
|
|
if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
|
|
@@ -421,7 +390,7 @@ export default {
|
|
this.updateInput = ''
|
|
this.updateInput = ''
|
|
},
|
|
},
|
|
//更新临时维护信息点
|
|
//更新临时维护信息点
|
|
- handleClickUpdate(){
|
|
|
|
|
|
+ handleClickUpdate() {
|
|
tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
|
|
tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
|
|
this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
|
|
this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
|
|
this.updateInputShow = false
|
|
this.updateInputShow = false
|
|
@@ -535,7 +504,7 @@ export default {
|
|
item,
|
|
item,
|
|
head.Path,
|
|
head.Path,
|
|
// child.error ? "表号功能号格式错误" : "表号功能号不存在"
|
|
// child.error ? "表号功能号格式错误" : "表号功能号不存在"
|
|
- child.error ? child.value? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
|
|
|
|
|
|
+ child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
|
|
);
|
|
);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -563,7 +532,7 @@ export default {
|
|
}
|
|
}
|
|
.search-header {
|
|
.search-header {
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
- padding:0 10px 10px 10px;
|
|
|
|
|
|
+ padding: 0 10px 10px 10px;
|
|
border-bottom: 1px solid #bcbcbc;
|
|
border-bottom: 1px solid #bcbcbc;
|
|
}
|
|
}
|
|
.tableBox {
|
|
.tableBox {
|
|
@@ -581,7 +550,7 @@ export default {
|
|
padding: 5px 15px;
|
|
padding: 5px 15px;
|
|
margin-right: 5px;
|
|
margin-right: 5px;
|
|
box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
|
|
box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
|
|
- .table_right_box::after{
|
|
|
|
|
|
+ .table_right_box::after {
|
|
display: block;
|
|
display: block;
|
|
content: "";
|
|
content: "";
|
|
clear: both;
|
|
clear: both;
|
|
@@ -593,7 +562,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-.el-pagination button, .el-pagination span:not([class*=suffix]) {
|
|
|
|
- vertical-align: middle;
|
|
|
|
|
|
+.el-pagination button,
|
|
|
|
+.el-pagination span:not([class*="suffix"]) {
|
|
|
|
+ vertical-align: middle;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|