|
@@ -26,15 +26,8 @@
|
|
|
<handson-table ref="table"></handson-table>
|
|
|
</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">
|
|
|
</el-pagination>
|
|
|
<!-- 不支持的输入方式 -->
|
|
@@ -59,7 +52,7 @@ import showTools from "@/utils/handsontable/notShow"
|
|
|
import text from "@/utils/handsontable/mainText"
|
|
|
import cenoteType from "@/components/ledger/lib/cenoteType";
|
|
|
import handsonTable from "@/components/common/handsontable";
|
|
|
-import { getDataDictionary, getCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace, BeatchQueryParam } from "@/api/scan/request"
|
|
|
+import { getDataDictionary, queryCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace, BeatchQueryParam } from "@/api/scan/request"
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -90,11 +83,11 @@ export default {
|
|
|
},
|
|
|
tableData: [],
|
|
|
copyTableData: [],
|
|
|
- tableExample:null,
|
|
|
+ tableExample: null,
|
|
|
myDialog: {
|
|
|
update: false,//临时维护信息点
|
|
|
},
|
|
|
- inputMap: { }, //信息点和输入方式映射表
|
|
|
+ inputMap: {}, //信息点和输入方式映射表
|
|
|
updateInputShow: false, //是否显示临时维护输入框
|
|
|
updateInfoPoint: '',//临时维护信息点
|
|
|
updateInput: '', //临时维护信息点值
|
|
@@ -102,14 +95,14 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters("layout", [
|
|
|
- "projectId",
|
|
|
- "secret",
|
|
|
- "userId"
|
|
|
+ "projectId",
|
|
|
+ "secret",
|
|
|
+ "userId"
|
|
|
]),
|
|
|
- showTypes () {
|
|
|
- return this.onlyRead?
|
|
|
- [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]:
|
|
|
- [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
|
|
|
+ showTypes() {
|
|
|
+ return this.onlyRead ?
|
|
|
+ [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
|
|
|
+ [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -142,7 +135,7 @@ export default {
|
|
|
await getDataDictionary(param, res => {
|
|
|
this.tableHeader = res.Content;
|
|
|
this.tableHeader.forEach(item => {
|
|
|
- if(item.Path && item.InputMode){
|
|
|
+ if (item.Path && item.InputMode) {
|
|
|
this.inputMap[item.Path] = item.InputMode
|
|
|
}
|
|
|
})
|
|
@@ -151,17 +144,18 @@ export default {
|
|
|
},
|
|
|
async getTableData() {//获取表格数据
|
|
|
let params = {
|
|
|
- Filters: this.cenoteId? `ProjectId='${this.projectId}';structureInfo.ShaftFuncType='${this.cenoteId}'`: `ProjectId='${this.projectId}'`,
|
|
|
+ Cascade: [{ Name: 'spaceList' }],
|
|
|
+ Filters: this.cenoteId ? `ProjectId='${this.projectId}';structureInfo.ShaftFuncType='${this.cenoteId}'` : `ProjectId='${this.projectId}'`,
|
|
|
Orders: "createTime desc, ShaftID asc",
|
|
|
PageNumber: this.page.pageNumber,
|
|
|
PageSize: this.page.pageSize
|
|
|
}
|
|
|
- await getCenoteTableData(params, (res) => {
|
|
|
+ await queryCenoteTableData(params, (res) => {
|
|
|
this.tableData = res.Content
|
|
|
this.copyTableData = tools.deepCopy(res.Content)
|
|
|
this.page.pageNumber = res.PageNumber
|
|
|
this.page.total = res.Total
|
|
|
- if(this.tableData && this.tableData.length){
|
|
|
+ if (this.tableData && this.tableData.length) {
|
|
|
if (this.onlyRead) {
|
|
|
this.getBatch(res.Content)
|
|
|
}
|
|
@@ -175,7 +169,7 @@ export default {
|
|
|
Content: [],
|
|
|
Projection: []
|
|
|
}, keyList = [];
|
|
|
- //生成要修改字段列表
|
|
|
+ //生成要修改字段列表
|
|
|
change.map(item => {
|
|
|
let key = item[1].split(".")[0]
|
|
|
if (item[1] && keyList.indexOf(key) == -1) {
|
|
@@ -223,7 +217,7 @@ export default {
|
|
|
},
|
|
|
// 添加竖井
|
|
|
handleCreateTableData() {
|
|
|
- this.$router.push({ name: 'cenoteadd'})
|
|
|
+ this.$router.push({ name: 'cenoteadd' })
|
|
|
},
|
|
|
// 删除表格行
|
|
|
handleDeleteTableRow() {
|
|
@@ -233,7 +227,7 @@ export default {
|
|
|
}
|
|
|
let param = []
|
|
|
params.map(item => {
|
|
|
- param.push({ShaftID: item.ShaftID})
|
|
|
+ param.push({ ShaftID: item.ShaftID })
|
|
|
})
|
|
|
this.$confirm("此操作将删除竖井,是否继续?", "提示", {
|
|
|
confirmButtonText: '确定',
|
|
@@ -297,10 +291,14 @@ export default {
|
|
|
let arr = tools.copyArr(list);
|
|
|
let data = showTools.headerTypeFilter(arr, "shaft", this.onlyRead, this.showType)
|
|
|
data.unshift({
|
|
|
- data: "SpaceCount",
|
|
|
- renderer: tools.num,
|
|
|
+ data: "SpaceList",
|
|
|
+ renderer: (instance, td, row, col, prop, value, cellProperties) => {
|
|
|
+ td.style.color = "#409EFF";
|
|
|
+ td.innerHTML = `<span>${value?value.length:0}</span>`
|
|
|
+ return td;
|
|
|
+ },
|
|
|
readOnly: true
|
|
|
- },{
|
|
|
+ }, {
|
|
|
data: "OtheRelations",
|
|
|
renderer: (instance, td, row, col, prop, value, cellProperties) => {
|
|
|
td.style.color = "#409EFF";
|
|
@@ -343,13 +341,13 @@ export default {
|
|
|
//其他的开始判断
|
|
|
let val = this.tableExample.colToProp(row.col)
|
|
|
let inputMode = this.inputMap[val]
|
|
|
- let name = infos.ShaftLocalName?infos.ShaftLocalName:infos.ShaftName
|
|
|
+ let name = infos.ShaftLocalName ? infos.ShaftLocalName : infos.ShaftName
|
|
|
this.shaftId = infos.ShaftID //要操作的数据id
|
|
|
//点击关联的元空间
|
|
|
- if (val === "SpaceCount") {
|
|
|
+ if (val === "SpaceList") {
|
|
|
this.$router.push({
|
|
|
- path:'/ledger/relatedSpace',
|
|
|
- query:{ShaftId: this.shaftId,name:name,onlyRead:this.onlyRead}
|
|
|
+ path: '/ledger/relatedSpace',
|
|
|
+ query: { ShaftId: this.shaftId, name: name, onlyRead: this.onlyRead }
|
|
|
})
|
|
|
return false
|
|
|
} else if (val === "OtheRelations") {
|
|
@@ -375,7 +373,7 @@ export default {
|
|
|
this.updateInput = ''
|
|
|
},
|
|
|
//更新临时维护信息点
|
|
|
- handleClickUpdate(){
|
|
|
+ handleClickUpdate() {
|
|
|
tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
|
|
|
this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
|
|
|
this.updateInputShow = false
|
|
@@ -489,7 +487,7 @@ export default {
|
|
|
item,
|
|
|
head.Path,
|
|
|
// child.error ? "表号功能号格式错误" : "表号功能号不存在"
|
|
|
- child.error ? child.value? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
|
|
|
+ child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
|
|
|
);
|
|
|
}
|
|
|
});
|
|
@@ -535,7 +533,7 @@ export default {
|
|
|
padding: 5px 15px;
|
|
|
margin-right: 5px;
|
|
|
box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
|
|
|
- .table_right_box::after{
|
|
|
+ .table_right_box::after {
|
|
|
display: block;
|
|
|
content: "";
|
|
|
clear: both;
|
|
@@ -547,7 +545,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>
|