Commit 2c02a409 by 曾经

表单滚动到 报错的位置

任务发起成功提示框icon替换

冻结弹窗按钮操作loading
parent 1efb6fa5
......@@ -463,7 +463,7 @@ export default {
cancelButtonText: "取消",
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "warning"
type: "success"
}
)
.then(() => {
......
......@@ -291,7 +291,7 @@ export default {
isBatchFreeze: 0,
isAbnormalFreeze: true,
visible: true,
submit:(options)=>{
submit:(options,callBack)=>{
doFetchGet(url.updateFrozen,{
pageType: 2,
status: 1,
......@@ -301,13 +301,12 @@ export default {
}).then((res)=>{
if (res.data.errorCode === 0){
checkSuccess();
this.freezeDialogOptions = {
visible: false
};
this.init();
}
}).finally(() => {
this.freezeDialogOptions = {
visible: false
};
});
}).finally(()=>callBack && callBack());
}
})
},
......@@ -403,7 +402,7 @@ export default {
cancelButtonText: "取消",
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "warning"
type: "success"
}
)
.then(() => {
......@@ -415,7 +414,7 @@ export default {
});
},
// 批量冻结
batchFreeze(options) {
batchFreeze(options,callBack) {
let { selectPage, multipleList, searchData } = this;
let {startDate,endDate,phoneNameCard} = searchData;
let data = {
......@@ -433,10 +432,11 @@ export default {
.then(res => {
if (res.data.errorCode === 0) {
this.freezeStatusChangeSuccess(res.data.result);
this.freezeDialogHidden();
}
})
.finally(() => {
this.freezeDialogHidden();
callBack && callBack();
});
},
// 搜索结果导出
......
......@@ -527,6 +527,19 @@ export default {
save() {
this.$refs.submitForm.validate(valid => {
this.haveClickSave = true;
this.$nextTick(_ => {
let errorDocumentList = document.getElementsByClassName('el-form-item__error');
if(errorDocumentList && errorDocumentList.length){
errorDocumentList[0].scrollIntoView({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block: 'center',
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: 'smooth'
});
}
});
if (valid) {
if(!this.haveData){
this.$message({
......
<template>
<div>
<el-dialog :title="title || (isBatchFreeze ? '批量冻结会员' : '冻结会员')"
:visible.sync="visible" width="600px" @close="onClose">
:visible.sync="visible" width="600px" @close="onClose"
:close-on-click-modal="false" :close-on-press-escape="false">
<div v-if="isBatchFreeze" class="freeze-tips">
<span>当前已选择</span>
<span class="count"> {{ count }} </span>
......@@ -23,7 +24,7 @@
<el-row type="flex" justify="end">
<el-button @click="onClose">取消</el-button>
<el-button type="primary" @click="sure('submitForm')">确定</el-button>
<el-button type="primary" @click="sure('submitForm')" :loading="load">确定</el-button>
</el-row>
</el-dialog>
</div>
......@@ -45,6 +46,7 @@ export default {
},
data() {
return {
load: false,
rules:{
remark:{ required: true, message: '请输入原因备注' }
},
......@@ -61,10 +63,12 @@ export default {
sure(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.submit && this.submit(this.submitData);
this.load = true;
this.submit && this.submit(this.submitData,()=>{
this.load = false;
});
this.$emit('submit', this.submitData);
} else {
console.log('error submit!!');
return false;
}
});
......@@ -72,7 +76,9 @@ export default {
}
},
watch: {
visible(){
this.load = false;
}
}
};
</script>
......
......@@ -283,7 +283,7 @@ export default {
cancelButtonText: "取消",
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "warning"
type: "success"
}
)
.then(() => {
......
......@@ -139,10 +139,11 @@ export default {
`请去【系统】-【操作任务】-【任务中心】查看处理结果和执行进度`,
`任务发起成功`,
{
type: "success",
confirmButtonText: "去任务中心",
cancelButtonText: "取消",
showClose: false,
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "success"
}
).then(()=>{
this.loadData();
......
......@@ -131,8 +131,7 @@ export default {
isBatchFreeze: 0,
visible: true,
title: '移出并冻结会员',
submit:async (options)=>{
this.load = true;
submit:async (options,callBack)=>{
doFetchGet(url.removeFrozenWhiteMember,{
removeType: 2,
status: 1,
......@@ -147,7 +146,7 @@ export default {
};
this.loadData();
}
}).finally(()=>this.load = false)
}).finally(()=>callBack && callBack())
}
}
},
......@@ -163,6 +162,7 @@ export default {
`任务发起成功`,
{
type: "success",
customClass: "import-link-confirm-content",
confirmButtonText: "去任务中心",
cancelButtonText: "取消",
showClose: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment