This commit is contained in:
timorls 2022-03-04 17:21:23 +08:00
parent b9b05b0330
commit ff170f9d04
1 changed files with 51 additions and 8 deletions

View File

@ -128,22 +128,32 @@
></el-input>
</div>
</el-card>
<el-button
type="primary"
class="submit"
@click="save"
>
暂存数据
</el-button>
</el-main>
<el-footer>
<el-popover placement="top" width="200" v-model="visible">
<p>是否提交数据并开始评价</p>
<p>是否提交数据并开始评价(数据须填写完整才可提交)</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="visible = false"
>取消</el-button
>
<el-button type="primary" size="mini" @click="submit">确定</el-button>
</div>
<el-button
slot="reference"
type="primary"
@click="save"
size="mini"
@click="submit"
:disabled="!submitStatus"
>确定</el-button
>
</div>
<el-button slot="reference" type="primary" @click="save">
</el-button>
</el-popover>
@ -159,6 +169,7 @@ export default {
data() {
return {
index: 0,
submitShow: false,
visible: false,
radioVisible: [false, false, false, false, false, false, false, false],
submitStatus: true,
@ -308,6 +319,28 @@ export default {
this.init();
},
mounted() {
this.$nextTick(() => {
const that = this;
let start = 0;
let stop = 0;
let timer = null;
window.onscroll = function () {
clearTimeout(timer);
timer = setTimeout(isScrollEnd);
start = document.documentElement.scrollTop || document.body.scrollTop;
that.changeSubmitShow();
};
function isScrollEnd() {
stop = document.documentElement.scrollTop || document.body.scrollTop;
if (stop === start) {
that.submitShow = false
}
}
});
},
methods: {
init() {
get("/esg/start_esg_rating")
@ -336,6 +369,10 @@ export default {
});
},
changeSubmitShow() {
this.submitShow = true;
},
radioChange(index, answer) {
if (answer[0] === "A") {
this.radioVisible = [
@ -546,4 +583,10 @@ p::before {
::v-deep .el-input__inner {
font-family: "SRL" !important;
}
.submit {
position: fixed;
bottom: 40px;
right: 20px;
}
</style>