|
@@ -286,14 +286,14 @@
|
|
<a-input v-model.trim="createdUserName" placeholder="请输入操作人"/>
|
|
<a-input v-model.trim="createdUserName" placeholder="请输入操作人"/>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="8">
|
|
<a-col :span="8">
|
|
- <a-button type="primary" @click="getLogBySbId({sbId: record.id,createdUserName})">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 8px" @click="()=>{getLogBySbId({sbId: record.id});createdUserName=''}">重置</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="getLogBySbId(record,createdUserName)">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 8px" @click="()=>{getLogBySbId(record);createdUserName=''}">重置</a-button>
|
|
<a-button style="margin-left: 8px" type="primary" icon="plus" @click="addLogBySb(record)">新增</a-button>
|
|
<a-button style="margin-left: 8px" type="primary" icon="plus" @click="addLogBySb(record)">新增</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
- </a-row>
|
|
|
|
|
|
+ </a-row>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
- <a-table :columns="childColumns1" :data-source="childMap">
|
|
|
|
|
|
+ <a-table rowKey="id" :columns="childColumns1" :data-source="record.childMap">
|
|
<template #sbMeasureLogCredential="text">
|
|
<template #sbMeasureLogCredential="text">
|
|
<a @click="$refs.listModal.base(text)">查看</a>
|
|
<a @click="$refs.listModal.base(text)">查看</a>
|
|
</template>
|
|
</template>
|
|
@@ -420,6 +420,7 @@ export default {
|
|
status: this.$route.query.status || this.status
|
|
status: this.$route.query.status || this.status
|
|
},
|
|
},
|
|
expand: false,
|
|
expand: false,
|
|
|
|
+ record:{},
|
|
depreciationTypeMap: {},
|
|
depreciationTypeMap: {},
|
|
visible: true,
|
|
visible: true,
|
|
dateRange: [],
|
|
dateRange: [],
|
|
@@ -1062,24 +1063,28 @@ export default {
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
onExpand (expanded, record) { // expanded判断展开or收缩操作,record当前行数据
|
|
onExpand (expanded, record) { // expanded判断展开or收缩操作,record当前行数据
|
|
- console.log(expanded, record)
|
|
|
|
this.childMap = []
|
|
this.childMap = []
|
|
- if (expanded) {
|
|
|
|
- this.getLogBySbId({ sbId: record.id })
|
|
|
|
- }
|
|
|
|
|
|
+ getLogBySbId({ sbId: record.id }).then(res => {
|
|
|
|
+ record.childMap = res.data.rows
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- getLogBySbId (params) {
|
|
|
|
- getLogBySbId(params).then(res => {
|
|
|
|
- this.childMap = res.data.rows
|
|
|
|
|
|
+ getLogBySbId(record,createdUserName){
|
|
|
|
+ getLogBySbId({ sbId: record.id,createdUserName }).then(res => {
|
|
|
|
+ record.childMap = res.data.rows
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
addLogBySb (record) {
|
|
addLogBySb (record) {
|
|
|
|
+ this.record = record
|
|
this.$refs.addLogForm.base(record)
|
|
this.$refs.addLogForm.base(record)
|
|
},
|
|
},
|
|
handleLogOk (val) {
|
|
handleLogOk (val) {
|
|
getLogBySbId({ sbId: val.sbId }).then(res => {
|
|
getLogBySbId({ sbId: val.sbId }).then(res => {
|
|
- this.childMap = res.data
|
|
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.record.childMap = res.data.rows
|
|
|
|
+ this.$forceUpdate()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
doImport () {
|
|
doImport () {
|