修改导出,组织

This commit is contained in:
BOE\10867418
2023-03-14 12:20:20 +08:00
parent b1fd588249
commit a65bf49d8e
2 changed files with 20 additions and 17 deletions

View File

@@ -15,7 +15,7 @@
:options="option"
placeholder="请选择组织"
v-model:value="orgId"
allowClear
:allowClear="allowClear"
style="width: 100%"
:fieldNames="{
label: 'name',
@@ -135,6 +135,8 @@ export default {
option: [], //组织列表
selectedRowKeys: [], // 选中的列
ids: [],
allowClear:true,
resetOrgId:[]
});
// table选中
const onSelectChange = (selectedRowKeys, record) => {
@@ -144,17 +146,17 @@ export default {
});
};
//请求组织接口
//请求组织接口
const getOrgList = async () => {
const res = await api.userGetUserOrg({});
if (res) {
// const list = res.data?.result?.map((item) => {
// return {
// label: item.orgName,
// value: item.orgId,
// };
// });
state.option = res.data?.result;
getOrgId();
state.option = res.data?.result?.list;
state.orgId = res.data?.result?.treeNodeList;
state.resetOrgId = res.data?.result?.treeNodeList;
res.data?.result?.userType === 1
? (state.allowClear = true)
: (state.allowClear = false);
getTableData();
}
};
//导出
@@ -344,6 +346,7 @@ export default {
state.name = "";
state.band = "";
state.userNo = "";
state.orgId = state.resetOrgId;
getOrgId();
};
// 获取登录人员组织
@@ -362,7 +365,7 @@ export default {
data: {
userNo: state.userNo,
name: state.name,
departmentId: state.orgId,
departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
bandCode: state.band,
},
responseType: "blob",

View File

@@ -15,7 +15,7 @@
:options="option"
placeholder="请选择组织"
v-model:value="orgId"
allowClear
:allowClear="allowClear"
style="width: 100%"
:fieldNames="{
label: 'name',
@@ -426,7 +426,7 @@ export default {
url: "/report-pre/boeu/case/exportAll",
data: {
name: state.name,
organizationId: state.orgId,
organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator,
},
responseType: "blob",
@@ -442,7 +442,7 @@ export default {
url: "/report-pre/boeu/exam/exportAll",
data: {
name: state.name,
organizationId: state.orgId,
organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator,
},
responseType: "blob",
@@ -458,7 +458,7 @@ export default {
url: "/report-pre/boeu/course/exportAll",
data: {
name: state.name,
organizationId: state.orgId,
organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator,
},
responseType: "blob",
@@ -474,7 +474,7 @@ export default {
url: "/report-pre/boeu/teaching/exportAll",
data: {
name: state.name,
organizationId: state.orgId,
organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator,
},
responseType: "blob",
@@ -490,7 +490,7 @@ export default {
url: "/report-pre/boeu/router/exportAll",
data: {
name: state.name,
organizationId: state.orgId,
organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator,
},
responseType: "blob",
@@ -506,7 +506,7 @@ export default {
url: "/report-pre/boeu/project/exportAll",
data: {
name: state.name,
organizationId: state.orgId,
organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator,
},
responseType: "blob",