|
@@ -11,18 +11,21 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="table-box">
|
|
|
- <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
+ <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle"
|
|
|
+ ref="multipleTable"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="55"></el-table-column>
|
|
|
<el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.ShaftLocalName||scope.row.ShaftName||''}}
|
|
|
+ {{ scope.row.localName || scope.row.name || '' }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="ShaftLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
|
|
|
- <el-table-column prop="StructureInfo.ShaftFuncType" :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100"></el-table-column>
|
|
|
+ <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
|
|
|
+ min-width="100"></el-table-column>
|
|
|
+ <el-table-column prop="structureInfo.shaftFuncType" :label="`${inSpaceType}类`" show-overflow-tooltip
|
|
|
+ min-width="100"></el-table-column>
|
|
|
<el-table-column prop="action" label="操作" min-width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
|
|
@@ -30,9 +33,11 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!-- 分页 -->
|
|
|
- <el-pagination class="fr" 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>
|
|
|
+ <el-pagination class="fr" 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>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
@@ -43,8 +48,11 @@
|
|
|
|
|
|
<script>
|
|
|
import { unshaftThroughShaft, queryShaftType, linkShaft } from "@/api/scan/request";
|
|
|
+import { getDataDictionary } from "@/api/dict"
|
|
|
+
|
|
|
import cenoteType from "@/components/ledger/lib/cenoteType";
|
|
|
import { mapGetters } from "vuex";
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
cenoteType
|
|
@@ -80,11 +88,22 @@ export default {
|
|
|
type: String, //选中的tab页
|
|
|
params: Object //查看的竖井关系信息
|
|
|
},
|
|
|
- created() {
|
|
|
- queryShaftType(res => {
|
|
|
- res.Content.forEach(item => {
|
|
|
- this.shaftType[item.Code] = item.Name
|
|
|
+ created() {
|
|
|
+ // 查询 竖井所有类型
|
|
|
+ // queryShaftType(res => {
|
|
|
+ let param = {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 50,
|
|
|
+ "filters": "code = 'shaftFuncType'",
|
|
|
+ "type": "shaft"
|
|
|
+ }
|
|
|
+ getDataDictionary(param, res => {
|
|
|
+ res.content.forEach(item => {
|
|
|
+ item.dataSource && item.dataSource.forEach(i => {
|
|
|
+ this.shaftType[i.code] = i.name
|
|
|
+ })
|
|
|
})
|
|
|
+ this.getTableData()
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
@@ -103,24 +122,24 @@ export default {
|
|
|
getTableData() {
|
|
|
let params = {
|
|
|
data: {
|
|
|
- Filters: this.cenoteType? `ProjectId='${this.projectId}';structureInfo.ShaftFuncType='${this.cenoteType}'`: `ProjectId='${this.projectId}'`,
|
|
|
- Orders: "createTime desc, ShaftID asc",
|
|
|
- PageNumber: this.page.pageNumber,
|
|
|
- PageSize: this.page.pageSize,
|
|
|
+ filters: this.cenoteType ? `projectId='${this.projectId}';structureInfo.shaftFuncType='${this.cenoteType}'` : `projectId='${this.projectId}'`,
|
|
|
+ orders: "createTime desc, id asc",
|
|
|
+ pageNumber: this.page.pageNumber,
|
|
|
+ pageSize: this.page.pageSize,
|
|
|
},
|
|
|
shaftId: this.params.ShaftID
|
|
|
}
|
|
|
- if(this.keycode!=''){
|
|
|
- params.data.Filters += `;ShaftName contain '${this.keycode}' or ShaftLocalName contain '${this.keycode}' or ShaftLocalID contain '${this.keycode}'`
|
|
|
+ if (this.keycode != '') {
|
|
|
+ params.data.filters += `;name contain '${this.keycode}' or localName contain '${this.keycode}' or localId contain '${this.keycode}'`
|
|
|
}
|
|
|
unshaftThroughShaft(params, res => {
|
|
|
- this.tableData = res.Content
|
|
|
+ this.tableData = res.content
|
|
|
this.tableData.forEach(item => {
|
|
|
- if(item.StructureInfo && item.StructureInfo.ShaftFuncType){
|
|
|
- item.StructureInfo.ShaftFuncType = this.shaftType[item.StructureInfo.ShaftFuncType]
|
|
|
+ if (item.structureInfo && item.structureInfo.shaftFuncType) {
|
|
|
+ item.structureInfo.shaftFuncType = this.shaftType[item.structureInfo.shaftFuncType]
|
|
|
}
|
|
|
})
|
|
|
- this.page.total = res.Total
|
|
|
+ this.page.total = res.total
|
|
|
})
|
|
|
},
|
|
|
//选中项修改
|
|
@@ -128,7 +147,7 @@ export default {
|
|
|
this.selections = val;
|
|
|
},
|
|
|
savaRelation() {
|
|
|
- if(this.selections.length){
|
|
|
+ if (this.selections.length) {
|
|
|
let params = {
|
|
|
ShaftId: this.params.ShaftID,
|
|
|
ShaftOtherIdList: this.selections.map(item => {
|
|
@@ -140,7 +159,7 @@ export default {
|
|
|
this.$message.success('关联成功!')
|
|
|
this.$emit('refresh')
|
|
|
})
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.$message('请选择要关联的设备')
|
|
|
}
|
|
|
},
|
|
@@ -165,15 +184,18 @@ export default {
|
|
|
#addEqDialog {
|
|
|
.filters {
|
|
|
margin-bottom: 10px;
|
|
|
+
|
|
|
/deep/ .el-input__inner {
|
|
|
vertical-align: baseline;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.table-box {
|
|
|
height: 370px;
|
|
|
- .fr{
|
|
|
+
|
|
|
+ .fr {
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|