fix: 流程下拉框选择bug修改

dev_1.0.0
JINGYJ 11 months ago
parent 0bf60b46c6
commit 17bf0db4f5

@ -64,3 +64,13 @@ export const createProcess = (data?: object) => {
data
});
};
/**
*
* @returns
*/
export const updateProcess = (data?: object) => {
return http.request<Result>("post", "/know-sub/flow/update", {
data
});
};

@ -39,7 +39,7 @@ const processForm = reactive({
link: [
{
nodeName: "",
roleId: null,
roleId: "",
userIdList: []
}
],
@ -155,7 +155,7 @@ const handleDrawerClosed = () => {
const addLink = () => {
processForm.link.push({
nodeName: "",
roleId: null,
roleId: "",
userIdList: []
});
};
@ -194,11 +194,12 @@ const getUserLists = async () => {
};
const handleSelect = async (value: any) => {
console.log(value);
value.userIdList.length = 0;
// const selectItem = JSON.parse(value);
const res: any = await getUserList({
userName: "",
deptId: "",
roleId: value,
roleId: value.roleId,
pageNum: "1",
pageSize: "10"
});
@ -307,7 +308,7 @@ onMounted(() => {
popper-class="custom-header"
placeholder="请选择"
class="w-[100%]"
@change="handleSelect"
@change="handleSelect(item)"
>
<el-option
v-for="item in roleNameList"
@ -337,6 +338,7 @@ onMounted(() => {
placeholder="请选择"
:max-collapse-tags="2"
class="w-[100%]"
:disabled="item.roleId === ''"
>
<el-option
v-for="item in userNameList"

@ -5,7 +5,7 @@ import {
getOptionalBaseList,
getRoleManageList,
getUserList,
createProcess,
updateProcess,
getFlowDetail
} from "@/api/business";
import { message } from "@/utils/message";
@ -47,7 +47,7 @@ const processForm = reactive({
link: [
{
nodeName: "",
roleId: null,
roleId: "",
userIdList: []
}
],
@ -140,7 +140,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
})
};
// console.log(createForm);
createProcess(createForm).then(res => {
updateProcess(createForm).then(res => {
if (res.code === 200) {
message("新建成功", { type: "success" });
props.closeDrawer();
@ -161,7 +161,7 @@ const handleDrawerClosed = () => {
const addLink = () => {
processForm.link.push({
nodeName: "",
roleId: null,
roleId: "",
userIdList: []
});
};
@ -201,10 +201,11 @@ const getUserLists = async () => {
const handleSelect = async (value: any) => {
// console.log(value);
// const selectItem = JSON.parse(value);
value.userIdList.length = 0;
const res: any = await getUserList({
userName: "",
deptId: "",
roleId: value,
roleId: value.roleId,
pageNum: "1",
pageSize: "10"
});
@ -331,7 +332,7 @@ onMounted(() => {
popper-class="custom-header"
placeholder="请选择"
class="w-[100%]"
@change="handleSelect"
@change="handleSelect(item)"
>
<el-option
v-for="item in roleNameList"
@ -361,6 +362,7 @@ onMounted(() => {
placeholder="请选择"
:max-collapse-tags="2"
class="w-[100%]"
:disabled="item.roleId === ''"
>
<el-option
v-for="item in userNameList"

@ -207,6 +207,15 @@ const getFlowDetails = (value: any) => {
});
accountForm.remark = value.remark;
};
const drawerName = (type: any) => {
if (type === "edit") {
return "编辑账号";
} else if (type === "view") {
return "查看账号";
} else {
return "新建账号";
}
};
onMounted(() => {
getDeptManageLists();
getRoleManageLists();
@ -223,7 +232,7 @@ onMounted(() => {
@closed="handleDrawerClosed"
>
<div class="drawer_header">
<span>新建账号</span>
<span>{{ drawerName(props.accountFromType) }}</span>
</div>
<div class="drawer_box">
<el-form

Loading…
Cancel
Save