|
@@ -15,19 +15,26 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-button>添加竖井</el-button>
|
|
|
- <el-button>刷新</el-button>
|
|
|
+ <el-button @click="getTableHeader">刷新</el-button>
|
|
|
<el-button v-show="!onlyRead">撤销</el-button>
|
|
|
</el-row>
|
|
|
<div class="tableBox">
|
|
|
- <div class="tableLeft">
|
|
|
+ <div class="center middle_sty" style="flex:1;" v-show="tableData && !tableData.length">
|
|
|
+ <p>
|
|
|
+ <i class="iconwushuju iconfont"></i>
|
|
|
+ 暂无数据
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="tableLeft" v-show="tableData && tableData.length">
|
|
|
<handson-table ref="table"></handson-table>
|
|
|
</div>
|
|
|
- <div class="tableRight">
|
|
|
+ <div class="tableRight" v-show="tableData && tableData.length">
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-pagination
|
|
|
class="right"
|
|
|
+ v-show="tableData && tableData.length"
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="page.pageNumber"
|
|
@@ -67,7 +74,7 @@ export default {
|
|
|
pageSize: 20,
|
|
|
pageSizes: [10, 20, 50, 100],
|
|
|
pageNumber: 1,
|
|
|
- total: 400
|
|
|
+ total: 0
|
|
|
},
|
|
|
tableData: [],
|
|
|
param: {
|
|
@@ -120,27 +127,31 @@ export default {
|
|
|
formatHeaderData(list) {
|
|
|
let arr = tools.copyArr(list)
|
|
|
let data = arr.map((item) => {
|
|
|
- return item.Name;
|
|
|
- })
|
|
|
- data.unshift("操作", "当前关联的资产", "所属系统实例", "包含的部件");
|
|
|
- debugger;
|
|
|
+ if (item.Field == "SpaceCount" || item.Field == "SpaceList"){
|
|
|
+ return undefined
|
|
|
+ } else {
|
|
|
+ return item.Name
|
|
|
+ }
|
|
|
+ }).filter(d => d)
|
|
|
+ data.unshift("关联的元空间");
|
|
|
return data;
|
|
|
},
|
|
|
formatHeaderType(list) {
|
|
|
let arr = tools.copyArr(list)
|
|
|
let data = arr.map(item => {
|
|
|
-
|
|
|
- if (item.Field == "") {
|
|
|
- item.renderer = text.picType
|
|
|
- }
|
|
|
- if (item.data == "infos." + "Archive" ||
|
|
|
- item.data == "infos." + "CheckReport" ||
|
|
|
- item.data == "infos." + "InsuranceFile") {
|
|
|
- item.renderer = text.fileType
|
|
|
+ if (item.Field == "SpaceCount" || item.Field == "SpaceList") {
|
|
|
+ return undefined
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ data: item.Field,
|
|
|
+ readOnly: true
|
|
|
+ }
|
|
|
}
|
|
|
+ }).filter(d => d)
|
|
|
+ data.unshift({
|
|
|
+ data: "SpaceCount",
|
|
|
+ readOnly: true
|
|
|
})
|
|
|
- data.unshift("操作", "当前关联的资产", "所属系统实例", "包含的部件");
|
|
|
- debugger;
|
|
|
return data;
|
|
|
},
|
|
|
async getTableData() {
|
|
@@ -164,6 +175,8 @@ export default {
|
|
|
}
|
|
|
await getCenoteTableData(params, (res) => {
|
|
|
this.tableData = res.Content
|
|
|
+ this.page.pageNumber = res.PageNumber
|
|
|
+ this.page.total = res.Total
|
|
|
if(this.tableData && this.tableData.length){
|
|
|
this.initTable()
|
|
|
}
|
|
@@ -176,8 +189,6 @@ export default {
|
|
|
columns: this.formatHeaderType(this.tableHeader),
|
|
|
rowHeights: 30,
|
|
|
maxRows: this.tableData.length,
|
|
|
- fixedRowsTop: 1,
|
|
|
- fixedColumnsLeft: 4,
|
|
|
contextMenu: {
|
|
|
items: {
|
|
|
remove_row: {
|
|
@@ -275,13 +286,8 @@ export default {
|
|
|
},
|
|
|
//切换竖井类型
|
|
|
changeFloor(value) {
|
|
|
- const id = value.ID;
|
|
|
- if (!!this.param.deviceId) {
|
|
|
- if(this.$refs.tableMain)
|
|
|
- this.$refs.tableMain.getHeaderData(this.param);
|
|
|
- } else {
|
|
|
- return;
|
|
|
- }
|
|
|
+ this.cenoteId = value.ID
|
|
|
+ this.getTableHeader()
|
|
|
},
|
|
|
|
|
|
//修改设备族
|
|
@@ -294,12 +300,15 @@ export default {
|
|
|
} else {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
- handleSizeChange() {
|
|
|
-
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.page.pageSize = val
|
|
|
+ this.getTableHeader()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.page.pageNumber = val
|
|
|
+ this.getTableHeader()
|
|
|
},
|
|
|
- handleCurrentChange() {},
|
|
|
}
|
|
|
};
|
|
|
</script>
|