|
@@ -143,7 +143,8 @@ export default {
|
|
|
data: {},
|
|
|
temList: [],
|
|
|
commentlist: [], // 评价列表
|
|
|
- changeRecordList: [] // 变更记录列表
|
|
|
+ changeRecordList: [], // 变更记录列表
|
|
|
+ checkListId: -1
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -153,8 +154,6 @@ export default {
|
|
|
this.getList()
|
|
|
// 获取评论列表
|
|
|
this.getCommentList()
|
|
|
- // 获取变更记录
|
|
|
- this.getRecordList()
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取checklist详情
|
|
@@ -166,6 +165,9 @@ export default {
|
|
|
// 如果绑定过
|
|
|
this.showEmpty = false
|
|
|
this.data = res.data
|
|
|
+ this.checkListId = res.data.id
|
|
|
+ // 获取变更记录
|
|
|
+ this.getRecordList()
|
|
|
} else {
|
|
|
this.showEmpty = true
|
|
|
}
|
|
@@ -189,7 +191,7 @@ export default {
|
|
|
|
|
|
// 获取变更记录
|
|
|
async getRecordList() {
|
|
|
- const res = await getRecordList({ taskId: this.taskId })
|
|
|
+ const res = await getRecordList({ checkListId: this.checkListId })
|
|
|
console.log(res)
|
|
|
if (res.code === 200) {
|
|
|
this.changeRecordList = res.data
|
|
@@ -446,7 +448,7 @@ export default {
|
|
|
// 更新检查项到数据库
|
|
|
async updateCheckItemHandle(item) {
|
|
|
const { isCheck, parentTemplateId } = item
|
|
|
- const res = await updateTemplateCheckStatus({ isCheck, taskId: this.taskId, templateId: parentTemplateId })
|
|
|
+ const res = await updateTemplateCheckStatus({ isCheck, checkListId: this.checkListId, templateId: parentTemplateId })
|
|
|
if (res.code === 200) {
|
|
|
this.getRecordList()
|
|
|
this.$message({
|