|
@@ -9,7 +9,7 @@
|
|
|
<el-step title="发送报告" />
|
|
|
</el-steps>
|
|
|
|
|
|
- <modules v-if="showOne" style="min-height: 34vh;" :data="selectTemplate" :fromradio="fromData.radio" @getFromData="getFromData" @createModule="open_new_template" @deleModule="settingDeleteReportModule" />
|
|
|
+ <modules v-if="showOne" style="min-height: 34vh;" :data="selectTemplate" :report-home="reportHome" :fromradio="fromData.radio" @getFromData="getFromData" @createModule="open_new_template" @deleModule="settingDeleteReportModule" />
|
|
|
|
|
|
<div class="report-leftRight">
|
|
|
<!-- 自定义字段组件 -->
|
|
@@ -37,7 +37,7 @@
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer" :align="reportHome === `模版管理` || reportHome === `自定义字段` ? 'right' : 'center'">
|
|
|
<div v-if="reportHome === `自定义字段`">
|
|
|
- <el-button size="small" type="primary" @click="closeCustom">取消</el-button>
|
|
|
+ <el-button size="small" @click="closeCustom">取消</el-button>
|
|
|
<el-button size="small" type="primary" @click="$refs.custom.confirmUpload()">确定</el-button>
|
|
|
</div>
|
|
|
<el-button v-if="reportHome === `模版管理`" size="small" type="primary" @click="handleClose">确认</el-button>
|
|
@@ -177,18 +177,19 @@ export default {
|
|
|
},
|
|
|
|
|
|
reportReturn() { // 新建模版点击返回
|
|
|
- this.reportHome = '准出报告' // 步骤条
|
|
|
+ this.reportHome = this.tits // 步骤条
|
|
|
this.showOne = true // 模版选择
|
|
|
this.reportTamplate = false // 编辑区域
|
|
|
this.newDailyTemplate = false // 隐藏第二步
|
|
|
this.dailyPreview = false // 隐藏第三步
|
|
|
+ this.customList = []
|
|
|
this.getreportTemplate()
|
|
|
},
|
|
|
|
|
|
open_new_template(val) { // 点击新建模版
|
|
|
- !val ? this.templateId = '新建模版' : this.templateId = { 'name': '编辑模版', 'set_up': val.id }
|
|
|
+ !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 === '新建模版') {
|
|
|
+ if (this.templateId.name === '新建模版') {
|
|
|
this.reportTamplate = true // 编辑区域
|
|
|
this.reportHome = '创建准出报告模版' // 步骤条
|
|
|
this.showOne = false // 模版选择
|
|
@@ -208,7 +209,6 @@ export default {
|
|
|
const res = await settingDeleteReportModule({ id: item.id }, item.id)
|
|
|
if (res.code === 200) {
|
|
|
this.getreportTemplate()
|
|
|
- this.closeDefaultPopover()
|
|
|
this.$message({ message: '已删除’', type: 'success', duration: 1000, offset: 150 })
|
|
|
}
|
|
|
} else {
|
|
@@ -232,10 +232,6 @@ export default {
|
|
|
this.reportHome = '自定义字段'
|
|
|
},
|
|
|
|
|
|
- closeDefaultPopover() { // 模拟点击
|
|
|
- this.$refs.refName.click()
|
|
|
- },
|
|
|
-
|
|
|
getCreateData() { // 保存,下一步
|
|
|
this.$refs.dailyTemplate.reportreleaseCreate(this.updateDaily)
|
|
|
},
|