fix(richedit): 修改submit函数调用时添加isShowTips参数
在doNewReturnFn、doNewCheckFn和doApprovalFn函数调用submit时添加isShowTips参数为false,避免重复显示成功提示
This commit is contained in:
parent
727582c07c
commit
e2651d7c9e
|
|
@ -385,7 +385,7 @@ watch(
|
||||||
// 退改
|
// 退改
|
||||||
async function doNewReturnFn(item) {
|
async function doNewReturnFn(item) {
|
||||||
// 先保存
|
// 先保存
|
||||||
await submit(1, false)
|
await submit(1, false, false)
|
||||||
|
|
||||||
|
|
||||||
let { code, data } = await doNewReturn({
|
let { code, data } = await doNewReturn({
|
||||||
|
|
@ -399,7 +399,7 @@ async function doNewReturnFn(item) {
|
||||||
// 复审
|
// 复审
|
||||||
async function doNewCheckFn(item) {
|
async function doNewCheckFn(item) {
|
||||||
// 先保存
|
// 先保存
|
||||||
await submit(1, false)
|
await submit(1, false, false)
|
||||||
|
|
||||||
|
|
||||||
let { code, data } = await doNewCheck({
|
let { code, data } = await doNewCheck({
|
||||||
|
|
@ -416,7 +416,7 @@ const pictureTemp = ref([]);
|
||||||
* 提交创建
|
* 提交创建
|
||||||
* @param type 0:发布 1:保存
|
* @param type 0:发布 1:保存
|
||||||
*/
|
*/
|
||||||
async function submit(type, doNotBack) {
|
async function submit(type, doNotBack, isShowTips = true) {
|
||||||
form.value.picture = pictureTemp.value[0]?.url;
|
form.value.picture = pictureTemp.value[0]?.url;
|
||||||
|
|
||||||
if (!form.value.title) {
|
if (!form.value.title) {
|
||||||
|
|
@ -514,10 +514,14 @@ async function submit(type, doNotBack) {
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
} else if (type == 1) {
|
} else if (type == 1) {
|
||||||
|
console.log("🚀 ~ submit ~ isShowTips:", isShowTips)
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
let { code, data } = await doNewsSave(par);
|
let { code, data } = await doNewsSave(par);
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
ElMessage.success('操作成功');
|
if (isShowTips) {
|
||||||
|
ElMessage.success('操作成功');
|
||||||
|
}
|
||||||
if (doNotBack) {
|
if (doNotBack) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -696,7 +700,7 @@ async function doApprovalFn() {
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
// 先保存
|
// 先保存
|
||||||
await submit(1, false)
|
await submit(1, false, false)
|
||||||
|
|
||||||
let { code } = props.data.status == 3 || props.data.status == 4 ? await doNewRevoke({
|
let { code } = props.data.status == 3 || props.data.status == 4 ? await doNewRevoke({
|
||||||
id: props.data.id,
|
id: props.data.id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue