|
@@ -23,15 +23,16 @@
|
|
</div>
|
|
</div>
|
|
<div class="moduleList wrap">
|
|
<div class="moduleList wrap">
|
|
<redTipword v-if="!edit" title="检查项" :isedit="edit" />
|
|
<redTipword v-if="!edit" title="检查项" :isedit="edit" />
|
|
- <div v-for="(item, index) in data.templates" :key="item.parentTemplateId" class="item">
|
|
|
|
- <div v-if="item.type === 1" style="width: 690px">
|
|
|
|
|
|
+ <div v-for="(item, index) in data.templates" :key="item.parentTemplateId">
|
|
|
|
+ <div v-if="item.type === 1" class="item">
|
|
<p :id="`s${item.parentTemplateId}`" class="title">
|
|
<p :id="`s${item.parentTemplateId}`" class="title">
|
|
<el-checkbox v-if="!edit" v-model="item.isCheck" :label="item.name" @change="updateCheckItemHandle(item)">{{ item.name }}</el-checkbox>
|
|
<el-checkbox v-if="!edit" v-model="item.isCheck" :label="item.name" @change="updateCheckItemHandle(item)">{{ item.name }}</el-checkbox>
|
|
- <span v-else>{{ item.name }}</span>
|
|
|
|
|
|
+ <span v-else class="fontName">{{ item.name }}</span>
|
|
</p>
|
|
</p>
|
|
<onlineCheckList
|
|
<onlineCheckList
|
|
:module-id="item.parentTemplateId"
|
|
:module-id="item.parentTemplateId"
|
|
:isedit="edit"
|
|
:isedit="edit"
|
|
|
|
+ :styles="{ marginLeft: '24px' }"
|
|
:data="item.onlineModule"
|
|
:data="item.onlineModule"
|
|
:task-id="taskId"
|
|
:task-id="taskId"
|
|
@changeSelectedHandle="changeOnlineSelectedHandle"
|
|
@changeSelectedHandle="changeOnlineSelectedHandle"
|
|
@@ -39,10 +40,10 @@
|
|
@onChangeModuleName="(val, subIdx) => onChangeModuleName(val, subIdx, index)"
|
|
@onChangeModuleName="(val, subIdx) => onChangeModuleName(val, subIdx, index)"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
- <div v-else style="width: 690px">
|
|
|
|
|
|
+ <div v-else class="item">
|
|
<p :id="`s${item.parentTemplateId}`" class="title">
|
|
<p :id="`s${item.parentTemplateId}`" class="title">
|
|
<el-checkbox v-if="!edit" v-model="item.isCheck" :label="item.name" @change="updateCheckItemHandle(item)">{{ item.name }}</el-checkbox>
|
|
<el-checkbox v-if="!edit" v-model="item.isCheck" :label="item.name" @change="updateCheckItemHandle(item)">{{ item.name }}</el-checkbox>
|
|
- <span v-else>{{ item.name }}</span>
|
|
|
|
|
|
+ <span v-else class="fontName">{{ item.name }}</span>
|
|
</p>
|
|
</p>
|
|
<normal-area
|
|
<normal-area
|
|
v-if="edit"
|
|
v-if="edit"
|
|
@@ -50,9 +51,9 @@
|
|
:value.sync="item.content"
|
|
:value.sync="item.content"
|
|
:empty-text="'点击'"
|
|
:empty-text="'点击'"
|
|
:input-button="'修改模板'"
|
|
:input-button="'修改模板'"
|
|
- :styles="{ padding: '0 0px 20px 0px', width: '690px' }"
|
|
|
|
|
|
+ :styles="{ padding: '0 0px 20px 0px', width: '690px', marginLeft: '24px' }"
|
|
/>
|
|
/>
|
|
- <div v-else v-html="item.content" />
|
|
|
|
|
|
+ <div v-else style="margin-left: 24px" v-html="item.content" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -260,7 +261,7 @@ export default {
|
|
t.onlineModule.tableContent.splice(index, 1)
|
|
t.onlineModule.tableContent.splice(index, 1)
|
|
} else {
|
|
} else {
|
|
t.onlineModule.tableContent.splice(index + 1, 0, {
|
|
t.onlineModule.tableContent.splice(index + 1, 0, {
|
|
- module: `模块${index + 1}`,
|
|
|
|
|
|
+ module: '',
|
|
moduleNames: []
|
|
moduleNames: []
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -327,7 +328,7 @@ export default {
|
|
name: this.taskName
|
|
name: this.taskName
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
- this.checkAllTem()
|
|
|
|
|
|
+ // this.checkAllTem()
|
|
},
|
|
},
|
|
|
|
|
|
// 编辑
|
|
// 编辑
|
|
@@ -342,28 +343,28 @@ export default {
|
|
this.edit = true
|
|
this.edit = true
|
|
// 编辑按钮隐藏
|
|
// 编辑按钮隐藏
|
|
this.openEdit = false
|
|
this.openEdit = false
|
|
- this.checkAllTem()
|
|
|
|
|
|
+ // this.checkAllTem()
|
|
},
|
|
},
|
|
|
|
|
|
// 添加和编辑checklist时 如果没有选择模版默认全选。
|
|
// 添加和编辑checklist时 如果没有选择模版默认全选。
|
|
- checkAllTem() {
|
|
|
|
- const { selectedBizTemplateIds } = this.data
|
|
|
|
- if (!selectedBizTemplateIds || selectedBizTemplateIds.length < 1) {
|
|
|
|
- this.temList.map(t => {
|
|
|
|
- this.data.selectedBizTemplateIds.push(t.id)
|
|
|
|
- const { content, isCheck, name, onlineModule, type, id: parentTemplateId } = t
|
|
|
|
- this.data.templates.push({
|
|
|
|
- content,
|
|
|
|
- isCheck,
|
|
|
|
- name,
|
|
|
|
- onlineModule,
|
|
|
|
- type,
|
|
|
|
- parentTemplateId,
|
|
|
|
- belongType: 2 // checklist的模板
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ // checkAllTem() {
|
|
|
|
+ // const { selectedBizTemplateIds } = this.data
|
|
|
|
+ // if (!selectedBizTemplateIds || selectedBizTemplateIds.length < 1) {
|
|
|
|
+ // this.temList.map(t => {
|
|
|
|
+ // this.data.selectedBizTemplateIds.push(t.id)
|
|
|
|
+ // const { content, isCheck, name, onlineModule, type, id: parentTemplateId } = t
|
|
|
|
+ // this.data.templates.push({
|
|
|
|
+ // content,
|
|
|
|
+ // isCheck,
|
|
|
|
+ // name,
|
|
|
|
+ // onlineModule,
|
|
|
|
+ // type,
|
|
|
|
+ // parentTemplateId,
|
|
|
|
+ // belongType: 2 // checklist的模板
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
|
|
// 校验是否该业务线有绑定checklist模板
|
|
// 校验是否该业务线有绑定checklist模板
|
|
RegHasCheckListTem() {
|
|
RegHasCheckListTem() {
|
|
@@ -382,9 +383,15 @@ export default {
|
|
updateSelectedTemHandle(checkedIds) {
|
|
updateSelectedTemHandle(checkedIds) {
|
|
const selectedBizTemplateIds = []
|
|
const selectedBizTemplateIds = []
|
|
const tems = []
|
|
const tems = []
|
|
|
|
+ const newcheckedIds = []
|
|
const { templates } = this.data
|
|
const { templates } = this.data
|
|
// 循环都有哪些tem被选择了
|
|
// 循环都有哪些tem被选择了
|
|
- checkedIds.map(checkedId => {
|
|
|
|
|
|
+ this.temList.forEach(t => {
|
|
|
|
+ if (checkedIds.includes(t.id)) {
|
|
|
|
+ newcheckedIds.push(t.id)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ newcheckedIds.map(checkedId => {
|
|
// 先循环是否有存过模板数据
|
|
// 先循环是否有存过模板数据
|
|
this.temList.map(g => {
|
|
this.temList.map(g => {
|
|
if (g.id === checkedId) {
|
|
if (g.id === checkedId) {
|
|
@@ -492,6 +499,12 @@ export default {
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
margin-top: 40px;
|
|
margin-top: 40px;
|
|
}
|
|
}
|
|
|
|
+ .item {
|
|
|
|
+ width: 690px;
|
|
|
|
+ .fontName {
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.empty {
|
|
.empty {
|