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