|
@@ -264,18 +264,11 @@
|
|
|
:text="yesNoMap[text]" />
|
|
|
</span>
|
|
|
<div slot="expandedRowRender" slot-scope="record" style="width:100%;">
|
|
|
-
|
|
|
- <a-card title="设备更改记录" :bordered="false" style="width:100%;position: relative; z-inde:9999">
|
|
|
+ <a-card :bordered="false" style="width:100%;position: relative; z-inde:9999">
|
|
|
<a slot="extra" @click="addLogBySb(record)">新增</a>
|
|
|
- <a-table :columns="childColumns1" :data-source="childMap[1]">
|
|
|
- </a-table>
|
|
|
- </a-card>
|
|
|
-
|
|
|
- <a-card title="检定记录" :bordered="false" style="width:100%">
|
|
|
- <a-table :columns="childColumns2" :data-source="childMap[2]">
|
|
|
+ <a-table :columns="childColumns1" :data-source="childMap">
|
|
|
</a-table>
|
|
|
</a-card>
|
|
|
-
|
|
|
</div>
|
|
|
</s-table>
|
|
|
</div>
|
|
@@ -399,7 +392,7 @@ export default {
|
|
|
lineMap: {},
|
|
|
unitMap: {},
|
|
|
areaList: {},
|
|
|
- childMap: {},
|
|
|
+ childMap: [],
|
|
|
companyList: {},
|
|
|
projectList: {},
|
|
|
isChildMap: {},
|
|
@@ -643,58 +636,14 @@ export default {
|
|
|
dataIndex: 'sbName'
|
|
|
},
|
|
|
{
|
|
|
- title: '设备位号',
|
|
|
+ title: '操作类型',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'sbPositionNo'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '设备位置',
|
|
|
- checked: true,
|
|
|
- width: 200,
|
|
|
- dataIndex: 'sbPositionName'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '设备类型',
|
|
|
- checked: true,
|
|
|
- width: 200,
|
|
|
- dataIndex: 'typeName'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '规格型号',
|
|
|
- checked: true,
|
|
|
- width: 200,
|
|
|
- dataIndex: 'model'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '更改内容',
|
|
|
- checked: true,
|
|
|
- width: 200,
|
|
|
- dataIndex: 'content'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '操作时间',
|
|
|
- checked: true,
|
|
|
- width: 200,
|
|
|
- dataIndex: 'createdTime'
|
|
|
- }
|
|
|
- ],
|
|
|
- childColumns2: [
|
|
|
- {
|
|
|
- title: '序号',
|
|
|
- dataIndex: 'index',
|
|
|
- width: 100,
|
|
|
- checked: true,
|
|
|
+ dataIndex: 'otherType',
|
|
|
customRender: (text, record, index) => {
|
|
|
- return index + 1
|
|
|
+ return this.BaseTool.Object.getField(this.otherTypeMap, text)
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- title: '设备名称',
|
|
|
- checked: true,
|
|
|
- width: 200,
|
|
|
- dataIndex: 'sbName'
|
|
|
- },
|
|
|
{
|
|
|
title: '设备位号',
|
|
|
checked: true,
|
|
@@ -707,31 +656,20 @@ export default {
|
|
|
width: 200,
|
|
|
dataIndex: 'positionName'
|
|
|
},
|
|
|
- {
|
|
|
- title: '设备类型',
|
|
|
- checked: true,
|
|
|
- width: 200,
|
|
|
- dataIndex: 'typeName'
|
|
|
- },
|
|
|
{
|
|
|
title: '规格型号',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
dataIndex: 'sbModel'
|
|
|
},
|
|
|
- {
|
|
|
- title: '检定有效期',
|
|
|
- checked: true,
|
|
|
- width: 200,
|
|
|
- dataIndex: 'nextCheckDate'
|
|
|
- },
|
|
|
{
|
|
|
title: '操作时间',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'updateTime'
|
|
|
+ dataIndex: 'createdTime'
|
|
|
}
|
|
|
],
|
|
|
+ otherTypeMap: {},
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
parameter = {
|
|
@@ -766,6 +704,8 @@ export default {
|
|
|
this.queryParam.parentId = this.$route.query.parentId
|
|
|
this.queryParam.parentName = this.$route.query.parentName
|
|
|
this.tableOption()
|
|
|
+ this.otherTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_MEASURE_OTHER_TYPE)
|
|
|
+
|
|
|
this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
|
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
|
|
|
this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
|
|
@@ -1022,10 +962,10 @@ export default {
|
|
|
},
|
|
|
onExpand (expanded, record) { // expanded判断展开or收缩操作,record当前行数据
|
|
|
console.log(expanded, record)
|
|
|
- this.childMap = {}
|
|
|
+ this.childMap = []
|
|
|
if (expanded) {
|
|
|
getLogBySbId({ sbId: record.id }).then(res => {
|
|
|
- this.childMap = res.data
|
|
|
+ this.childMap = res.data.rows
|
|
|
})
|
|
|
}
|
|
|
},
|