|
@@ -6,10 +6,10 @@
|
|
|
<div style="display: flex; white-space: nowrap; font-family:SimSuncss">
|
|
|
<span style="flex:1;font-weight: bold;font-size: 24px;color: #3a8ee6">{{ fromCreateData.name }}</span>
|
|
|
<span style="flex:2;margin:1% 0 0 20px;font-size: 17px;">by {{ fromCreateData.submitter }}</span>
|
|
|
- <span style="flex:1;">
|
|
|
+ <!-- <span style="flex:1;">
|
|
|
<el-button type="primary" size="mini" style="margin:0 2% 0 0%;" @click="dialogTableVisible = true">发送报告</el-button>
|
|
|
<el-button size="mini" @click="dialogTableVisible = true">下载测试报告</el-button>
|
|
|
- </span>
|
|
|
+ </span> -->
|
|
|
</div>
|
|
|
<div class="titleStyle" style="margin:1% 0;">一. 提测详情</div>
|
|
|
<div v-if="oneShow">
|
|
@@ -89,17 +89,17 @@
|
|
|
<el-form>
|
|
|
<div v-if="oneShow" class="marage">新增配置 : {{ fromCreateData.configInfo }}</div><br>
|
|
|
<div class="marage">其他 : {{ fromCreateData.others }}</div><br>
|
|
|
- <el-button style="float:right; margin:8% 50%;" @click="open()"> 返 回 </el-button>
|
|
|
+ <!-- <el-button style="float:right; margin:8% 50%;" @click="open()"> 返 回 </el-button> -->
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<el-dialog title="邮件预览" width="70%" center :visible.sync="dialogTableVisible" @open="dasd()">
|
|
|
- <div align="center">
|
|
|
+ <!-- <div align="center">
|
|
|
<el-button type="primary" size="mini" @click="dialogFormVisible = true">确定发送</el-button>
|
|
|
<el-button size="mini" @click="download()">确定下载</el-button>
|
|
|
- </div>
|
|
|
- <div id="resumeId" class="eleStyle_one">
|
|
|
+ </div> -->
|
|
|
+ <!-- <div id="resumeId" class="eleStyle_one">
|
|
|
<div style="height:100%;width:94%; background:#ffffff; margin: 3%; border-radius: 4px; overflow: hidden;">
|
|
|
<div style="padding:2% 9%;">
|
|
|
<div style="display: flex; white-space: nowrap; font-family:SimSuncss">
|
|
@@ -189,10 +189,10 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</el-dialog>
|
|
|
<!-- 发送报告 -->
|
|
|
- <el-dialog title="发送邮件" width="30%" :visible.sync="dialogFormVisible">
|
|
|
+ <!-- <el-dialog title="发送邮件" width="30%" :visible.sync="dialogFormVisible">
|
|
|
<el-form label-position="center" :model="form" label-width="80px">
|
|
|
<el-form-item label="发送 : ">
|
|
|
<el-input v-model="form.name" placeholder="请填写邮箱前缀,邮箱名以 , 分割" />
|
|
@@ -201,29 +201,37 @@
|
|
|
<el-input v-model="form.names" placeholder="请填写邮箱前缀,邮箱名以 , 分割" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ {{ message }}
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
+
|
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="sendReport(form)">确 定</el-button>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { launchTestSendmail } from '@/api/ResultPage'
|
|
|
-import html2canvas from 'html2canvas'
|
|
|
-import { launchTest } from '@/api/testPresentetion'
|
|
|
+// import { launchTestSendmail } from '@/api/ResultPage'
|
|
|
+// import html2canvas from 'html2canvas'
|
|
|
+// import { launchTest } from '@/api/testPresentetion'
|
|
|
|
|
|
export default {
|
|
|
name: 'AcceptTheReport',
|
|
|
+ props: {
|
|
|
+ message: {
|
|
|
+ type: Object,
|
|
|
+ required: true
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
configInfo1: { color: 'green' },
|
|
|
dependentComponents1: { color: 'green' },
|
|
|
lateStatus1: { color: 'red' },
|
|
|
safeStatus1: { color: 'green' },
|
|
|
- dialogTableVisible: false,
|
|
|
- dialogFormVisible: false,
|
|
|
+ // dialogTableVisible: false,
|
|
|
+ // dialogFormVisible: false,
|
|
|
form: {},
|
|
|
dependentCom: '',
|
|
|
config: '',
|
|
@@ -246,77 +254,75 @@ export default {
|
|
|
this.idGet()
|
|
|
},
|
|
|
methods: {
|
|
|
- dasd() {
|
|
|
- this.idGet()
|
|
|
- },
|
|
|
- download() {
|
|
|
- this.getPdf('resumeId', this.name)
|
|
|
- },
|
|
|
+ // dasd() {
|
|
|
+ // this.idGet()
|
|
|
+ // },
|
|
|
+ // download() {
|
|
|
+ // this.getPdf('resumeId', this.name)
|
|
|
+ // },
|
|
|
idGet() {
|
|
|
- launchTest({ id: this.$route.query.id }).then((res) => {
|
|
|
- this.fromCreateData = res.data
|
|
|
- if (this.fromCreateData.type === 2) {
|
|
|
- this.towShow = false
|
|
|
- this.oneShow = true
|
|
|
- } else {
|
|
|
- this.oneShow = false
|
|
|
- this.towShow = true
|
|
|
- }
|
|
|
- this.name = this.fromCreateData.name
|
|
|
- this.joinTestOne = this.fromCreateData.joinTest
|
|
|
- this.moduleInfoOne = this.fromCreateData.moduleInfo
|
|
|
- if (this.fromCreateData.safeInfo !== '') {
|
|
|
- this.showData = true
|
|
|
- this.safeStatus = '是'
|
|
|
- this.safeStatus1.color = 'red'
|
|
|
- } else {
|
|
|
- this.showData = false
|
|
|
- this.safeStatus = '否'
|
|
|
- this.safeStatus1.color = 'green'
|
|
|
- }
|
|
|
- if (this.fromCreateData.lateReason !== '') {
|
|
|
- this.showDelay = true
|
|
|
- this.lateStatus = '是'
|
|
|
- } else {
|
|
|
- this.showDelay = false
|
|
|
- this.lateStatus = '否'
|
|
|
- this.lateStatus1.color = 'green'
|
|
|
- }
|
|
|
- if (this.fromCreateData.configInfo !== '') {
|
|
|
- this.showDelay1 = true
|
|
|
- this.config = '是'
|
|
|
- } else {
|
|
|
- this.showDelay1 = false
|
|
|
- this.config = '否'
|
|
|
- this.configInfo1.color = 'red'
|
|
|
- }
|
|
|
- if (this.fromCreateData.dependentComponents !== '') {
|
|
|
- this.showDelay2 = true
|
|
|
- this.dependentCom = '是'
|
|
|
- } else {
|
|
|
- this.showDelay2 = false
|
|
|
- this.dependentCom = '否'
|
|
|
- this.dependentComponents1.color = 'red'
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- open() { this.$router.push({ path: '/Platform/presentation/Assumptions' }) },
|
|
|
- sendReport(e) {
|
|
|
- var ele = this.fromCreateData
|
|
|
- setTimeout(() => {
|
|
|
- var that = this
|
|
|
- html2canvas(document.getElementById('resumeId'), { useCORS: true }).then(function(canvas) {
|
|
|
- var imgData = canvas.toDataURL('image/png')
|
|
|
- var sendImgData = imgData.substring(imgData.indexOf(',') + 1)
|
|
|
- var postData = { 'reportId': ele.id, 'imgStr': sendImgData, 'url': window.location.href, 'emailUser': e.name, 'copyTo': e.names }
|
|
|
- launchTestSendmail(postData).then(res => {
|
|
|
- that.dialogFormVisible = false
|
|
|
- that.dialogTableVisible = false
|
|
|
- res.code === 200 ? that.$message.success('发送测试报告成功') : that.$message.error('发送测试报告失败,请联系管理员!')
|
|
|
- })
|
|
|
- })
|
|
|
- }, 500)
|
|
|
+ // launchTest({ id: this.$route.query.id }).then((res) => {
|
|
|
+ this.fromCreateData = this.message
|
|
|
+ if (this.fromCreateData.type === 2) {
|
|
|
+ this.towShow = false
|
|
|
+ this.oneShow = true
|
|
|
+ } else {
|
|
|
+ this.oneShow = false
|
|
|
+ this.towShow = true
|
|
|
+ }
|
|
|
+ this.name = this.fromCreateData.name
|
|
|
+ this.joinTestOne = this.fromCreateData.joinTest
|
|
|
+ this.moduleInfoOne = this.fromCreateData.moduleInfo
|
|
|
+ if (this.fromCreateData.safeInfo !== '') {
|
|
|
+ this.showData = true
|
|
|
+ this.safeStatus = '是'
|
|
|
+ this.safeStatus1.color = 'red'
|
|
|
+ } else {
|
|
|
+ this.showData = false
|
|
|
+ this.safeStatus = '否'
|
|
|
+ this.safeStatus1.color = 'green'
|
|
|
+ }
|
|
|
+ if (this.fromCreateData.lateReason !== '') {
|
|
|
+ this.showDelay = true
|
|
|
+ this.lateStatus = '是'
|
|
|
+ } else {
|
|
|
+ this.showDelay = false
|
|
|
+ this.lateStatus = '否'
|
|
|
+ this.lateStatus1.color = 'green'
|
|
|
+ }
|
|
|
+ if (this.fromCreateData.configInfo !== '') {
|
|
|
+ this.showDelay1 = true
|
|
|
+ this.config = '是'
|
|
|
+ } else {
|
|
|
+ this.showDelay1 = false
|
|
|
+ this.config = '否'
|
|
|
+ this.configInfo1.color = 'red'
|
|
|
+ }
|
|
|
+ if (this.fromCreateData.dependentComponents !== '') {
|
|
|
+ this.showDelay2 = true
|
|
|
+ this.dependentCom = '是'
|
|
|
+ } else {
|
|
|
+ this.showDelay2 = false
|
|
|
+ this.dependentCom = '否'
|
|
|
+ this.dependentComponents1.color = 'red'
|
|
|
+ }
|
|
|
+ // })
|
|
|
}
|
|
|
+ // open() { this.$router.push({ path: '/Platform/presentation/Assumptions' }) }
|
|
|
+ // sendReport(e) {
|
|
|
+ // var ele = this.fromCreateData
|
|
|
+ // setTimeout(() => {
|
|
|
+ // var that = this
|
|
|
+ // html2canvas(document.getElementById('resumeId'), { useCORS: true }).then(function(canvas) {
|
|
|
+ // var imgData = canvas.toDataURL('image/png')
|
|
|
+ // var sendImgData = imgData.substring(imgData.indexOf(',') + 1)
|
|
|
+ // var postData = { 'reportId': ele.id, 'imgStr': sendImgData, 'url': window.location.href, 'emailUser': e.name, 'copyTo': e.names }
|
|
|
+ // launchTestSendmail(postData).then(res => {
|
|
|
+ // res.code === 200 ? that.$message.success('发送测试报告成功') : that.$message.error('发送测试报告失败,请联系管理员!')
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }, 500)
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
</script>
|