|
@@ -29,7 +29,7 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 准出报告 -->
|
|
|
- <newReleaeTemplate v-if="newDailyTemplate" ref="dailyTemplate" class="daily" :template-id="fromData.radio" :task-ids="daily_taskIds" @SaveNextStep="SaveNextStep" />
|
|
|
+ <newReleaeTemplate v-if="newDailyTemplate" ref="dailyTemplate" class="daily" :custom="customList" :template-id="fromData.radio" :task-ids="daily_taskIds" @SaveNextStep="SaveNextStep" />
|
|
|
|
|
|
<!-- 准出预览 -->
|
|
|
<releaePreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" @loading="loading = false" />
|
|
@@ -119,8 +119,10 @@ export default {
|
|
|
},
|
|
|
init(index, newData) {
|
|
|
this.dialogDaliy = true
|
|
|
+ console.log(newData, 'fjids')
|
|
|
switch (index) {
|
|
|
case 2: // 编辑
|
|
|
+ this.customList = newData.customFields
|
|
|
this.daily_taskIds = null // 关联任务
|
|
|
this.fromData.radio = newData // 选择的模块
|
|
|
this.reportHome = '准出报告' // 步骤条
|
|
@@ -186,7 +188,7 @@ export default {
|
|
|
this.getreportTemplate()
|
|
|
},
|
|
|
|
|
|
- open_new_template(val) { // 点击新建模版
|
|
|
+ open_new_template(val, show) { // 点击新建模版
|
|
|
!val ? this.templateId = { 'name': '新建模版', from: this.customList.length === 0 ? this.temporary.from : [] } : this.templateId = { 'name': '编辑模版', 'set_up': val.id }
|
|
|
this.tits = this.reportHome
|
|
|
if (this.templateId.name === '新建模版') {
|
|
@@ -194,7 +196,7 @@ export default {
|
|
|
this.reportHome = '创建准出报告模版' // 步骤条
|
|
|
this.showOne = false // 模版选择
|
|
|
} else {
|
|
|
- if (val.creator === localStorage.getItem('username')) {
|
|
|
+ if (val.creator === localStorage.getItem('username') || show) {
|
|
|
this.reportTamplate = true // 编辑区域
|
|
|
this.reportHome = '编辑准出报告模版' // 步骤条
|
|
|
this.showOne = false // 模版选择
|
|
@@ -204,8 +206,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- async settingDeleteReportModule(item) {
|
|
|
- if (item.creator === localStorage.getItem('username')) {
|
|
|
+ async settingDeleteReportModule(item, show) {
|
|
|
+ if (item.creator === localStorage.getItem('username') || show) {
|
|
|
const res = await settingDeleteReportModule({ id: item.id }, item.id)
|
|
|
if (res.code === 200) {
|
|
|
this.getreportTemplate()
|