|
@@ -1,84 +1,82 @@
|
|
|
<template>
|
|
|
- <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task" title="测试日报" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose">
|
|
|
- <div class="blueStripe" />
|
|
|
- <div v-if="reportHome">
|
|
|
- <div style="margin: 2% 0%; font-size: 16pt; color: #333B4A;">
|
|
|
- <el-steps :active="active" align-center finish-status="success">
|
|
|
- <el-step title="选择模版" />
|
|
|
- <el-step title="填写报告" />
|
|
|
- <el-step title="发送报告" />
|
|
|
- </el-steps>
|
|
|
- </div>
|
|
|
- <div v-if="showOne">
|
|
|
- <el-row type="flex" class="row-bg" justify="center">
|
|
|
- <el-col :span="7">模版名称</el-col>
|
|
|
- <el-col :span="6" />
|
|
|
- <el-col :span="5" class="creator">创建人</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row v-for="(item, index) in selectTemplate" :key="index" type="flex" class="row-bg" justify="center">
|
|
|
- <el-col :span="7"><el-radio v-model="fromData.radio" class="_radio" :label="item.id" @change="selectRepot(item.id)">{{ item.name }}</el-radio></el-col>
|
|
|
- <el-col :span="6" />
|
|
|
- <el-col :span="5" class="creator">
|
|
|
- {{ item.value }}
|
|
|
- <span v-if="item.value !== '系统'" class="operation">
|
|
|
- <i class="el-icon-edit didi-hover" />
|
|
|
- <el-popover v-model="visible" placement="bottom" width="300">
|
|
|
- <div>删除模版</div>
|
|
|
- <hr>
|
|
|
- <p>是否要删除模版{{ item.name }}?</p>
|
|
|
- <div style="text-align: right; margin: 0">
|
|
|
- <el-button size="mini" type="primary" @click="visible = false">删除</el-button>
|
|
|
- <el-button type="primary" size="mini" @click="visible = false">取消</el-button>
|
|
|
- </div>
|
|
|
- <i slot="reference" class="el-icon-delete reportModel didi-hover" />
|
|
|
- </el-popover>
|
|
|
- </span>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row type="flex" class="row-bg" justify="center">
|
|
|
- <el-col :span="18">
|
|
|
- <span class="didi-hover" @click="open_new_template()"><i class="el-icon-circle-plus-outline creator" /> 新建模版</span>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? title : `创建${title}模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose">
|
|
|
+ <div v-if="reportHome" class="blueStripe" />
|
|
|
+ <i v-if="!reportHome" class="el-icon-arrow-left report-return didi-hover" @click="reportReturn" />
|
|
|
|
|
|
- <div v-if="reportTamplate">
|
|
|
- <div class="descr" style=" margin-bottom: 2%; height: 435px; overflow:scroll; overflow-x: hidden">
|
|
|
- <NewReportTemplate ref="DailyReport" :message="dailyNewData" @daily="daily" />
|
|
|
- </div>
|
|
|
+ <el-steps v-if="reportHome" :active="active" align-center finish-status="success" class="report-steps">
|
|
|
+ <el-step title="选择模版" />
|
|
|
+ <el-step title="填写报告" />
|
|
|
+ <el-step title="发送报告" />
|
|
|
+ </el-steps>
|
|
|
|
|
|
- <div v-if="showTow">
|
|
|
- <div class="descr" style=" margin-bottom: 2%; height: 435px; overflow:scroll; overflow-x: hidden">
|
|
|
- <DailyReport ref="DailyReport" :message="dailyNewData" @daily="daily" />
|
|
|
- </div>
|
|
|
- <div align="center">
|
|
|
- <el-button size="small" type="primary" @click="handleClose1()">上一步</el-button>
|
|
|
- <el-button size="small" type="primary" @click="created_out()">保存,下一步</el-button>
|
|
|
- </div>
|
|
|
+ <div v-if="showOne" style="min-height: 50vh;">
|
|
|
+ <el-row type="flex" class="row-bg" justify="center">
|
|
|
+ <el-col :span="7">模版名称</el-col>
|
|
|
+ <el-col :span="6" />
|
|
|
+ <el-col :span="5" class="creator">创建人</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row v-for="(item, index) in selectTemplate" :key="index" type="flex" class="row-bg" justify="center">
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-radio v-model="fromData.radio" class="_radio" :label="item.id" @change="selectRepot(item.id)">{{ item.name }}</el-radio>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" />
|
|
|
+ <el-col :span="5" class="creator">
|
|
|
+ {{ item.value }}
|
|
|
+ <span v-if="item.value !== '系统'" class="operation">
|
|
|
+ <i class="el-icon-edit didi-hover" @click="report_update(item.id)" />
|
|
|
+ <el-popover v-model="visible" placement="bottom" width="300">
|
|
|
+ <div>删除模版</div>
|
|
|
+ <hr>
|
|
|
+ <p>是否要删除模版{{ item.name }}?</p>
|
|
|
+ <div style="text-align: right; margin: 0">
|
|
|
+ <el-button size="mini" type="primary" @click="visible = false">删除</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="visible = false">取消</el-button>
|
|
|
+ </div>
|
|
|
+ <i slot="reference" class="el-icon-delete reportModel didi-hover" />
|
|
|
+ </el-popover>
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row type="flex" class="row-bg" justify="center">
|
|
|
+ <el-col :span="18">
|
|
|
+ <span class="didi-hover" @click="open_new_template()"><i class="el-icon-circle-plus-outline creator" /> 新建模版</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 创建模版 -->
|
|
|
+ <div v-if="reportTamplate" class="descr" style=" margin-bottom: 2%; height: 435px; overflow:scroll; overflow-x: hidden">
|
|
|
+ <NewReportTemplate ref="DailyReport" :message="dailyNewData" :template-status="templateStatus" @getreportTemplate="getreportTemplate" />
|
|
|
+ </div>
|
|
|
+ <!-- 创建模版 -->
|
|
|
|
|
|
+ <div v-if="showThree">
|
|
|
+ <div style="margin: 0% 5%;font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
|
|
|
+ 邮件列表
|
|
|
</div>
|
|
|
- <div v-if="showThree">
|
|
|
- <div style="margin: 0% 5%;font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
|
|
|
- 邮件列表
|
|
|
- </div>
|
|
|
- <div style="margin: 1% 5% 3%;">
|
|
|
- <div class="Layout" style="margin-bottom: 10px;"><div class="div1">收件人</div><searchTeam :value.sync="form.name" :clearable="true" :multiple="true" style="width:100%" /></div>
|
|
|
- <div class="Layout"><div class="div1">抄送</div><searchTeam :value.sync="form.names" :clearable="true" :multiple="true" style="width:100%" /></div>
|
|
|
- </div>
|
|
|
- <div style="margin: 0 5%; font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
|
|
|
- 报告预览
|
|
|
+ <div style="margin: 1% 5% 3%;">
|
|
|
+ <div class="Layout" style="margin-bottom: 10px;">
|
|
|
+ <div class="div1">收件人</div>
|
|
|
+ <searchTeam :value.sync="form.name" :clearable="true" :multiple="true" style="width:100%" />
|
|
|
</div>
|
|
|
- <div class="descr" style=" margin-bottom: 2%; height: 300px; overflow:scroll; overflow-x: hidden">
|
|
|
- <testPresenyL id="Gambol" :message="preview" style="width: 100%" />
|
|
|
- </div>
|
|
|
- <div align="center">
|
|
|
- <el-button size="small" type="primary" @click="gou_out()">上一步</el-button>
|
|
|
- <el-button :disabled="send" :loading="send" size="small" type="primary" @click="sendReport(form)">发送</el-button>
|
|
|
+ <div class="Layout">
|
|
|
+ <div class="div1">抄送</div>
|
|
|
+ <searchTeam :value.sync="form.names" :clearable="true" :multiple="true" style="width:100%" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="margin: 0 5%; font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
|
|
|
+ 报告预览
|
|
|
+ </div>
|
|
|
+ <div class="descr" style=" margin-bottom: 2%; height: 300px; overflow:scroll; overflow-x: hidden">
|
|
|
+ <testPresenyL id="Gambol" :message="preview" style="width: 100%" />
|
|
|
+ </div>
|
|
|
+ <div align="center">
|
|
|
+ <el-button size="small" type="primary" @click="gou_out()">上一步</el-button>
|
|
|
+ <el-button :disabled="send" :loading="send" size="small" type="primary" @click="sendReport(form)">发送</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div align="center">
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer" align="center">
|
|
|
<el-button size="small" type="primary" @click="clickTheButton === '下一步'? NextStep() : created_out()">{{ clickTheButton }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -87,22 +85,27 @@
|
|
|
<script>
|
|
|
import '@/views/projectManage/publicCss/index.css'
|
|
|
import '@/styles/PublicStyle/index.scss'
|
|
|
-import DailyReport from '@/views/Platform/presentation/DailyNewsAdded.vue'
|
|
|
+// import DailyReport from '@/views/Platform/presentation/DailyNewsAdded.vue'
|
|
|
import testPresenyL from '@/views/Platform/presentation/testPresenyL.vue'
|
|
|
import { dailyReportSendmail } from '@/api/ResultPage'
|
|
|
+import { settingQueryReportModuleList } from '@/api/reportTemplate'
|
|
|
import html2canvas from 'html2canvas'
|
|
|
import searchTeam from '@/components/select/searchTeam'
|
|
|
import NewReportTemplate from '@/views/Platform/presentation/Templates/NewReportTemplate.vue'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- DailyReport,
|
|
|
+ // DailyReport,
|
|
|
testPresenyL,
|
|
|
searchTeam,
|
|
|
NewReportTemplate
|
|
|
},
|
|
|
+ props: {
|
|
|
+ title: { type: String, default: '' }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ templateStatus: false, // 模版状态
|
|
|
visible: false, // delete
|
|
|
clickTheButton: '下一步', // 点击按钮
|
|
|
reportHome: true, // 报告主页
|
|
@@ -116,10 +119,11 @@ export default {
|
|
|
fromData: {
|
|
|
radio: 1
|
|
|
},
|
|
|
+ bizJson: localStorage.getItem('bizId'),
|
|
|
send: false,
|
|
|
form: {},
|
|
|
preview: {},
|
|
|
- dailyNewData: {},
|
|
|
+ dailyNewData: {}, // 新建模版
|
|
|
dialogDaliy: false,
|
|
|
showOne: true,
|
|
|
showTow: false,
|
|
@@ -129,9 +133,21 @@ export default {
|
|
|
newIndex: '',
|
|
|
active: 1,
|
|
|
daily_task: [],
|
|
|
+ num: 0,
|
|
|
dailys: this.$route.query.id
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ title: {
|
|
|
+ handler(newV) {
|
|
|
+ newV === '测试日报' ? this.num = 3 : ''
|
|
|
+ newV === '准出报告' ? this.num = 4 : ''
|
|
|
+ newV === '提测报告' ? this.num = 1 : ''
|
|
|
+ this.getreportTemplate()
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
this.reportSelectTemplate()
|
|
|
},
|
|
@@ -139,6 +155,12 @@ export default {
|
|
|
this.showThree = false
|
|
|
},
|
|
|
methods: {
|
|
|
+ async getreportTemplate() { // 获取模版list
|
|
|
+ const res = await settingQueryReportModuleList({ bizId: this.bizJson, type: this.num })
|
|
|
+ if (res.code === 200) {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ },
|
|
|
reportSelectTemplate() {
|
|
|
this.$nextTick(() => {
|
|
|
this.selectTemplate = this.selectTemplate.concat(this.reportModel)
|
|
@@ -161,8 +183,8 @@ export default {
|
|
|
this.active = 1
|
|
|
break
|
|
|
case 2:
|
|
|
- this.dailyNewData = newData
|
|
|
- this.dailyNewData.creatask = '编辑'
|
|
|
+ // this.dailyNewData = newData
|
|
|
+ // this.dailyNewData.creatask = '编辑'
|
|
|
this.newIndex = 2
|
|
|
this.showOne = false
|
|
|
this.showTow = true
|
|
@@ -179,8 +201,8 @@ export default {
|
|
|
break
|
|
|
case 4:
|
|
|
this.daily_task = [Number(arr[1])]
|
|
|
- this.dailyNewData = newData
|
|
|
- this.dailyNewData.creatask = '复制'
|
|
|
+ // this.dailyNewData = newData
|
|
|
+ // this.dailyNewData.creatask = '复制'
|
|
|
this.newIndex = 1
|
|
|
this.showOne = false
|
|
|
this.showTow = true
|
|
@@ -189,7 +211,7 @@ export default {
|
|
|
break
|
|
|
case 7:
|
|
|
this.daily_task = newData
|
|
|
- this.dailyNewData.taskIds = newData
|
|
|
+ // this.dailyNewData.taskIds = newData
|
|
|
this.showOne = true
|
|
|
this.showTow = false
|
|
|
this.showThree = false
|
|
@@ -203,18 +225,20 @@ export default {
|
|
|
this.showOne = false
|
|
|
this.showTow = false
|
|
|
this.radio = '1'
|
|
|
+ this.reportTamplate = false // 第二步false
|
|
|
},
|
|
|
- handleClose1() {
|
|
|
- this.active = 1
|
|
|
- this.showOne = true
|
|
|
- this.showTow = false
|
|
|
+
|
|
|
+ report_update() { // 编辑模版
|
|
|
+ this.$refs.DailyReport.getQueryData(3)
|
|
|
},
|
|
|
- created_out() {
|
|
|
- this.$refs.DailyReport.parentHandleclick(this.newIndex, this.daily_task, this.dailys)
|
|
|
+
|
|
|
+ created_out() { // 新建模版
|
|
|
+ this.$refs.DailyReport.getCreateData(3)
|
|
|
},
|
|
|
+
|
|
|
gou_out() {
|
|
|
- this.dailyNewData = this.preview
|
|
|
- this.dailyNewData.creatask = '编辑'
|
|
|
+ // this.dailyNewData = this.preview
|
|
|
+ // this.dailyNewData.creatask = '编辑'
|
|
|
this.active = 2
|
|
|
this.newIndex = 2
|
|
|
this.showOne = false
|
|
@@ -230,17 +254,28 @@ export default {
|
|
|
this.form = {}
|
|
|
this.active = 3
|
|
|
},
|
|
|
- open_new_template() {
|
|
|
- this.reportTamplate = true
|
|
|
- this.clickTheButton = '保存'
|
|
|
- this.reportHome = false
|
|
|
+ reportReturn() { // 新建模版点击返回
|
|
|
+ this.reportHome = true // 步骤条
|
|
|
+ this.showOne = true // 模版选择
|
|
|
+ this.reportTamplate = false // 编辑区域
|
|
|
+ this.clickTheButton = '下一步' // 底部按钮
|
|
|
+ },
|
|
|
+ open_new_template() { // 点击新建模版
|
|
|
+ this.templateStatus = false // 模版状态
|
|
|
+ this.dailyNewData = {}
|
|
|
+ this.reportHome = false // 步骤条
|
|
|
+ this.showOne = false // 模版选择
|
|
|
+ this.reportTamplate = true // 编辑区域
|
|
|
+ this.clickTheButton = '保存' // 底部按钮
|
|
|
},
|
|
|
NextStep() {
|
|
|
switch (Number(this.radio)) {
|
|
|
case 1:
|
|
|
+ this.templateStatus = true // 模版状态
|
|
|
this.dailyNewData = {}
|
|
|
this.dailyNewData.taskIds = this.daily_task
|
|
|
this.dailyNewData.creatask = '新建'
|
|
|
+ this.reportTamplate = true
|
|
|
this.showOne = false
|
|
|
this.showTow = true
|
|
|
this.active = 2
|
|
@@ -275,43 +310,74 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
._radio {
|
|
|
- margin: 3% 0;
|
|
|
- color: #333B4A;
|
|
|
- font-size: 16pt
|
|
|
+ margin: 3% 0;
|
|
|
+ color: #333B4A;
|
|
|
+ font-size: 16pt
|
|
|
}
|
|
|
+
|
|
|
.descr {
|
|
|
- width: 94%;
|
|
|
- margin: auto;
|
|
|
+ width: 94%;
|
|
|
+ margin: auto;
|
|
|
}
|
|
|
-.descr::-webkit-scrollbar{
|
|
|
- width:0;
|
|
|
+
|
|
|
+.descr::-webkit-scrollbar {
|
|
|
+ width: 0;
|
|
|
}
|
|
|
+
|
|
|
.div1 {
|
|
|
- width: 60px;
|
|
|
- font-size: 14px;
|
|
|
- font-family: MicrosoftYaHei;
|
|
|
- color: rgba(51,51,51,1);
|
|
|
- line-height: 19px;
|
|
|
+ width: 60px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: MicrosoftYaHei;
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
+ line-height: 19px;
|
|
|
}
|
|
|
+
|
|
|
.titIcon {
|
|
|
- width:4px;
|
|
|
- height:17px;
|
|
|
- background:#409EFF;
|
|
|
- border-radius:1px;
|
|
|
+ width: 4px;
|
|
|
+ height: 17px;
|
|
|
+ background: #409EFF;
|
|
|
+ border-radius: 1px;
|
|
|
}
|
|
|
+
|
|
|
.el-dialog__header {
|
|
|
padding: 0 !important;
|
|
|
}
|
|
|
+
|
|
|
.reportModel {
|
|
|
- margin-left: 10px;
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
+
|
|
|
.operation {
|
|
|
- margin-left: 30px;
|
|
|
+ margin-left: 30px;
|
|
|
}
|
|
|
+
|
|
|
.creator {
|
|
|
- display: inline-block;
|
|
|
- line-height: 3;
|
|
|
+ display: inline-block;
|
|
|
+ line-height: 3;
|
|
|
+}
|
|
|
+
|
|
|
+.report-dialog {
|
|
|
+ >>>.el-dialog__header {
|
|
|
+ padding: 20px 20px 10px;
|
|
|
+ border-bottom: 1px solid red;
|
|
|
+ }
|
|
|
+ >>>.el-dialog__footer {
|
|
|
+ padding: 15px 20px;
|
|
|
+ text-align: right;
|
|
|
+ border-top: 1px solid red;
|
|
|
+ }
|
|
|
+}
|
|
|
+.report-return {
|
|
|
+ font-size: 18px;
|
|
|
+ position: absolute;
|
|
|
+ top: 23px;
|
|
|
+ left: 11px;
|
|
|
+}
|
|
|
+.report-steps {
|
|
|
+ margin-bottom: 1%;
|
|
|
+ font-size: 16pt;
|
|
|
+ color: #333B4A;
|
|
|
}
|
|
|
</style>
|