|
@@ -176,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
|
|
@@ -192,7 +191,6 @@ export default {
|
|
|
// 获取变更记录
|
|
|
async getRecordList() {
|
|
|
const res = await getRecordList({ checkListId: this.checkListId })
|
|
|
- console.log(res)
|
|
|
if (res.code === 200) {
|
|
|
this.changeRecordList = res.data
|
|
|
}
|
|
@@ -254,14 +252,11 @@ 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 {
|
|
@@ -294,6 +289,7 @@ export default {
|
|
|
this.openEdit = true
|
|
|
// 保存更新变更记录
|
|
|
this.getRecordList()
|
|
|
+ this.getList()
|
|
|
this.$message({
|
|
|
message: '保存成功',
|
|
|
type: 'success'
|
|
@@ -389,7 +385,6 @@ export default {
|
|
|
const tems = []
|
|
|
const { templates } = this.data
|
|
|
// 循环都有哪些tem被选择了
|
|
|
- console.log(templates, this.temList, checkedIds)
|
|
|
checkedIds.map(checkedId => {
|
|
|
// 先循环是否有存过模板数据
|
|
|
this.temList.map(g => {
|
|
@@ -410,11 +405,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 }
|
|
|
},
|
|
|
|
|
@@ -439,7 +432,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 }
|
|
@@ -447,8 +443,8 @@ export default {
|
|
|
|
|
|
// 更新检查项到数据库
|
|
|
async updateCheckItemHandle(item) {
|
|
|
- const { isCheck, parentTemplateId } = item
|
|
|
- const res = await updateTemplateCheckStatus({ isCheck, checkListId: this.checkListId, templateId: parentTemplateId })
|
|
|
+ const { isCheck, id } = item
|
|
|
+ const res = await updateTemplateCheckStatus({ isCheck, id, checkListId: this.checkListId })
|
|
|
if (res.code === 200) {
|
|
|
this.getRecordList()
|
|
|
this.$message({
|
|
@@ -460,9 +456,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)
|
|
|
})
|
|
|
}
|
|
|
}
|