提交 84cade2b authored 作者: lihuihui's avatar lihuihui

update: 优化更新

上级 24b0b1ff
......@@ -59,8 +59,9 @@
</div>
<div class="mian-btn">
<el-button type="primary" @click="stepsIndex--" v-if="stepsIndex != 0">上一步</el-button>
<el-button type="primary" @click="stepsIndex++" v-if="stepsIndex != 2">下一步</el-button>
<el-button type="primary" @click="submitReport" v-else>完成</el-button>
<el-button v-if="stepsIndex == 0" type="primary" @click="registerNextBtn">下一步</el-button>
<el-button v-if="stepsIndex == 1" type="primary" @click="formNextBtn">下一步</el-button>
<el-button type="primary" @click="submitReport" v-if="stepsIndex == 2">完成</el-button>
</div>
</div>
</div>
......@@ -89,11 +90,31 @@ export default {
this.getReport()
},
methods: {
registerNextBtn() {
if (this.registerIndex === 4) {
this.stepsIndex++
} else {
this.$message({ message: '请完成当前步骤', type: 'warning' })
}
},
formNextBtn() {
const isNull = Object.values(this.form).findIndex(item => { return item === '' })
if (isNull === -1) {
this.stepsIndex++
} else {
this.$message({ message: '请在发布视频完善信息', type: 'warning' })
}
},
// 提交报告
submitReport() {
const isNull = Object.values(this.form).findIndex(item => { return item === '' })
if (isNull !== -1) {
this.$message('请在发布视频完善信息')
this.$message({ message: '请在发布视频完善信息', type: 'warning' })
return false
}
console.log(this.dataIndex, '123')
if (this.dataIndex !== 4) {
this.$message({ message: '请完成当前步骤', type: 'warning' })
return false
}
const params = [{ type: 1, commit_report: this.form }]
......@@ -105,6 +126,8 @@ export default {
setTimeout(() => {
this.$router.push({ path: '/works-show' })
}, 3000)
}).catch(err => {
this.$message.error(err.message || '稍后再试')
})
},
// 获取报告
......@@ -118,7 +141,8 @@ export default {
const styles = {
1: { w: '50px', t: '30px', l: '320px', text: '第二步:点击右上角,进入菜单' },
2: { w: '200px', t: '300px', l: '100px', text: '第三步:点击”创作者服务中心“' },
3: { w: '50px', t: '190px', l: '290px', text: '第四步:点击”数据中心“' }
3: { w: '50px', t: '190px', l: '290px', text: '第四步:点击”数据中心“' },
4: { w: '0px', t: '0px', l: '0px', text: '完成' }
}
if (this.dataIndex < 4) this.dataIndex++
const getStyle = styles[this.dataIndex]
......@@ -179,6 +203,7 @@ export default {
color: #000;
margin-left: 30px;
max-width: 300px;
min-width: 300px;
}
.dy-box {
min-width: 375px;
......
......@@ -46,7 +46,6 @@ export default {
}
},
created() {
console.log(this.data.completions[0])
if (this.data.completions[0].commit_answer !== '') {
this.inputList = []
this.data.completions[0].commit_answer.split(';').forEach(item => {
......
<template>
<div class="product-analysis-report">
<div class="page-mian">
<div class="pdf-left">
<div class="pdf-left" ref="pdf">
<embed class="embed" width="100%" height="100%" :src="cases.pdf_uris[0]" />
</div>
<div class="right-content">
......@@ -54,6 +54,8 @@ export default {
}
},
mounted() {
this.$refs.pdf.style.height = `${document.documentElement.clientHeight - 40}px`
console.log(this.$refs.pdf)
this.getCommitCase()
},
methods: {
......@@ -96,12 +98,13 @@ export default {
// 业绩比较基准数据
const comparesCount = []
this.$refs.compares[0].inputList.forEach(item => {
comparesCount.push(`${item.input1},${item.input2}`)
comparesCount.push(`${item.input1.split(';').join('')},${item.input2.split(';').join('')}`)
})
const comparesData = {
id: this.$refs.compares[0].data.completions[0].id,
commit_answer: comparesCount.join(';')
}
this.$refs.compares[0].data.completions[0].commit_answer = comparesCount.join(';')
// 风险收益特征数据
const featuresCount = []
this.$refs.features[0].data.completions.forEach(item => {
......@@ -129,8 +132,11 @@ export default {
{ tag: 'title', value: this.titleValue }
]
}
console.log(data, 'data')
window.localStorage.reportData = JSON.stringify(data)
this.$router.push({ path: '/product-analysis/result' })
}).catch(err => {
this.$message.error(err.message || '稍后再试')
})
} else {
this.$message('请填写完整')
......@@ -147,9 +153,9 @@ input {
outline: none;
}
.product-analysis-report {
padding: 33px 50px;
padding: 33px 50px 0;
.page-mian {
overflow: hidden;
// overflow: hidden;
background: #fff;
display: flex;
padding: 20px;
......@@ -192,7 +198,10 @@ input {
.pdf-left {
flex: 1;
margin-right: 10px;
height: 500px;
// height: 500px;
position: sticky;
top: 20px;
left: 0;
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论