|
@@ -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
|
|
|
}
|
|
@@ -174,7 +176,6 @@ export default {
|
|
|
|
|
|
// 获取业务线下绑定的可以选checklist列表
|
|
|
async getBizBindTemList() {
|
|
|
- console.log(1111)
|
|
|
const { bizId = null } = store.state.global || {}
|
|
|
const res = await getBizBindTemList({ name: '', bizId })
|
|
|
this.temList = res.data
|
|
@@ -189,8 +190,7 @@ export default {
|
|
|
|
|
|
// 获取变更记录
|
|
|
async getRecordList() {
|
|
|
- const res = await getRecordList({ taskId: this.taskId })
|
|
|
- console.log(res)
|
|
|
+ const res = await getRecordList({ checkListId: this.checkListId })
|
|
|
if (res.code === 200) {
|
|
|
this.changeRecordList = res.data
|
|
|
}
|
|
@@ -252,14 +252,10 @@ export default {
|
|
|
},
|
|
|
|
|
|
changeOnlineModuleRow(type, mId, index) {
|
|
|
- console.log(type, mId, index, this.data.templates)
|
|
|
this.data.templates.map(t => {
|
|
|
if (t.parentTemplateId === mId) {
|
|
|
if (type === 'del') {
|
|
|
- console.log(t.onlineModule)
|
|
|
const delModuleNames = t.onlineModule.tableContent[index].moduleNames
|
|
|
- const test = t.onlineModule.onlineOrder.filter(t => !delModuleNames.includes(t))
|
|
|
- console.log(delModuleNames, test)
|
|
|
t.onlineModule.onlineOrder = t.onlineModule.onlineOrder.filter(t => !delModuleNames.includes(t))
|
|
|
t.onlineModule.tableContent.splice(index, 1)
|
|
|
} else {
|
|
@@ -292,6 +288,7 @@ export default {
|
|
|
this.openEdit = true
|
|
|
// 保存更新变更记录
|
|
|
this.getRecordList()
|
|
|
+ this.getList()
|
|
|
this.$message({
|
|
|
message: '保存成功',
|
|
|
type: 'success'
|
|
@@ -387,7 +384,6 @@ export default {
|
|
|
const tems = []
|
|
|
const { templates } = this.data
|
|
|
// 循环都有哪些tem被选择了
|
|
|
- console.log(templates, this.temList, checkedIds)
|
|
|
checkedIds.map(checkedId => {
|
|
|
// 先循环是否有存过模板数据
|
|
|
this.temList.map(g => {
|
|
@@ -408,11 +404,9 @@ export default {
|
|
|
})
|
|
|
tems.map((h, index) => templates.map(j => {
|
|
|
if (h.parentTemplateId === j.parentTemplateId) {
|
|
|
- console.log(h, j)
|
|
|
tems[index] = { ...j }
|
|
|
}
|
|
|
}))
|
|
|
- console.log(tems)
|
|
|
this.data = { ...this.data, templates: tems, selectedBizTemplateIds }
|
|
|
},
|
|
|
|
|
@@ -437,7 +431,10 @@ export default {
|
|
|
} else if (!hasTask) {
|
|
|
tasks = [...this.data.tasks, task]
|
|
|
} else {
|
|
|
- console.log('已经添加过该任务')
|
|
|
+ this.$message({
|
|
|
+ message: '已经添加过该任务',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
return
|
|
|
}
|
|
|
this.data = { ...this.data, tasks }
|
|
@@ -445,8 +442,8 @@ export default {
|
|
|
|
|
|
// 更新检查项到数据库
|
|
|
async updateCheckItemHandle(item) {
|
|
|
- const { isCheck, parentTemplateId } = item
|
|
|
- const res = await updateTemplateCheckStatus({ isCheck, taskId: this.taskId, templateId: parentTemplateId })
|
|
|
+ const { isCheck, id } = item
|
|
|
+ const res = await updateTemplateCheckStatus({ isCheck, id, checkListId: this.checkListId })
|
|
|
if (res.code === 200) {
|
|
|
this.getRecordList()
|
|
|
this.$message({
|
|
@@ -458,9 +455,7 @@ export default {
|
|
|
|
|
|
// 修改线上问题模块
|
|
|
onChangeModuleName: _.debounce(function(val, subIdx, index) {
|
|
|
- console.log(val, subIdx, index, this.data)
|
|
|
this.data.templates[index].onlineModule.tableContent[subIdx].module = val
|
|
|
- console.log(this.data)
|
|
|
})
|
|
|
}
|
|
|
}
|