flat: 被驳回也可以修改

This commit is contained in:
Apcallover
2024-04-19 17:21:50 +08:00
parent e69077b93e
commit 62237a8245

View File

@@ -1,33 +1,33 @@
<template>
<basic-container>
<avue-crud
ref="crud"
:table-loading="loading"
@date-change="dateChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad"
:option="option"
:data="inviteCodeList"
:page.sync="page"
@row-del="rowDel"
@search-change="searchChange"
@refresh-change="refreshChange"
@search-reset="searchReset"
@selection-change="selectionChange"
ref="crud"
:table-loading="loading"
@date-change="dateChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad"
:option="option"
:data="inviteCodeList"
:page.sync="page"
@row-del="rowDel"
@search-change="searchChange"
@refresh-change="refreshChange"
@search-reset="searchReset"
@selection-change="selectionChange"
>
<template slot="menuLeft">
<el-button
size="small"
@click.stop="distributionCodeDialog = true; isEdit = false; inviteCodeForm = {}"
type="primary"
v-show="vaildData(permission.manage_station_inviteCode_edituser, false)"
size="small"
@click.stop="distributionCodeDialog = true; isEdit = false; inviteCodeForm = {}"
type="primary"
v-show="vaildData(permission.manage_station_inviteCode_edituser, false)"
>新增用户
</el-button>
<el-button
size="small"
@click.stop="handleCheck"
type="primary"
size="small"
@click.stop="handleCheck"
type="primary"
>审核
</el-button>
</template>
@@ -37,21 +37,21 @@
</template>
<template slot="isEnabled" slot-scope="{ row }">
<el-switch
:value="row.isEnabled"
:active-value="1"
:inactive-value="0"
active-color="#13ce66"
inactive-color="#ff4949"
@change="changeEnabled(row)">
:value="row.isEnabled"
:active-value="1"
:inactive-value="0"
active-color="#13ce66"
inactive-color="#ff4949"
@change="changeEnabled(row)">
</el-switch>
</template>
</avue-crud>
<el-drawer
title="新增用户"
:visible.sync="distributionCodeDialog"
append-to-body
width="40%"
title="新增用户"
:visible.sync="distributionCodeDialog"
append-to-body
width="40%"
>
<div class="drawer_content">
<el-form :model="inviteCodeForm" :rules="inviteCodeRules" filterable ref="inviteCode" label-width="100px"
@@ -60,10 +60,10 @@
<el-select v-model="inviteCodeForm.inviteCompanyId" :disabled="isEdit" filterable placeholder="请选择企业"
style="width: 260px">
<el-option
v-for="item in enterpriseList"
:key="item.id"
:label="item.comname"
:value="item.id">
v-for="item in enterpriseList"
:key="item.id"
:label="item.comname"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
@@ -206,11 +206,11 @@ const page = {
total: 0,
}
const message = lodash.throttle(
function (options) {
Message(options);
},
3000,
{trailing: false}
function (options) {
Message(options);
},
3000,
{trailing: false}
);
export default {
name: "manage_station_inviteCode",
@@ -245,12 +245,10 @@ export default {
});
return;
}
let idList = this.selectionList.filter((item) => item.reviewStatus === 0).map((v) => v.id)
if (idList.length == 0) {
this.$message.error("只能提交【审核中】的任务");
} else {
let h = this.$createElement;
this.$prompt(
let idList = this.selectionList.map((v) => v.id)
let h = this.$createElement;
this.$prompt(
h("p", {style: "color: #F56C6C"}, "一旦驳回无法进行后续操作"),
"请核对企业信息后再进行审核通过",
{
@@ -277,8 +275,7 @@ export default {
}
}
}
)
}
)
},
handelFetchAuditing(idList, reviewState, msg, message) {
return new Promise((resolve, reject) => {
@@ -315,30 +312,30 @@ export default {
rowDel(row) {
const h = this.$createElement;
this.$confirm(
h("div", null, [
h("p", {style: "font-size: 16px"}, "您确定要删除此消息吗? "),
h("p", {style: "color: red"}, "一旦删除则无法找回"),
]),
{
type: "warning",
showClose: false,
showCancelButton: true,
confirmButtonText: "确定",
cancelButtonText: "取消",
}
h("div", null, [
h("p", {style: "font-size: 16px"}, "您确定要删除此消息吗? "),
h("p", {style: "color: red"}, "一旦删除则无法找回"),
]),
{
type: "warning",
showClose: false,
showCancelButton: true,
confirmButtonText: "确定",
cancelButtonText: "取消",
}
)
.then(() => {
return getInvitationStatusUpdate({id: row.id, isDeleted: 1});
})
.then(() => {
this.$message({
type: "success",
message: "操作成功!",
.then(() => {
return getInvitationStatusUpdate({id: row.id, isDeleted: 1});
})
.then(() => {
this.$message({
type: "success",
message: "操作成功!",
});
this.refreshChange();
})
.catch(() => {
});
this.refreshChange();
})
.catch(() => {
});
},
selectionChange(list) {
this.selectionList = list;