mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
Merge branch 'dev_Ma_pre' into 'develop'
Dev ma pre See merge request !86
This commit is contained in:
@@ -33,7 +33,7 @@ import {USER_PERMISSION} from "@/api/ThirdApi";
|
||||
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
console.log("版本2.1.6------------");
|
||||
console.log("版本1.4.5------------");
|
||||
|
||||
// 监听关闭浏览器
|
||||
let time1 = ref(0);
|
||||
|
||||
@@ -24,7 +24,6 @@ http.interceptors.request.use(
|
||||
config.headers.token = token; //测试1111
|
||||
} else{
|
||||
message.error('未获取到登录信息,请先登录')
|
||||
return window.location.href='https://u-pre.boe.com/web/';
|
||||
}
|
||||
return config;
|
||||
},
|
||||
@@ -48,7 +47,6 @@ http.interceptors.response.use(
|
||||
}
|
||||
if(code==601){
|
||||
message.error('token过期请重新登陆');
|
||||
return window.location.href='https://u-pre.boe.com/web/';
|
||||
}
|
||||
if (code === 1000) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
|
||||
|
||||
@@ -25,7 +25,6 @@ http.interceptors.request.use(
|
||||
config.headers.token = token; //测试1111
|
||||
} else{
|
||||
message.error('未获取到登录信息,请先登录')
|
||||
return window.location.href='https://u-pre.boe.com/web/';
|
||||
}
|
||||
return config;
|
||||
},
|
||||
@@ -50,7 +49,6 @@ http.interceptors.response.use(
|
||||
}
|
||||
if(code==601){
|
||||
message.error('token过期请重新登陆');
|
||||
return window.location.href='https://u-pre.boe.com/web/';
|
||||
}
|
||||
if (code === 1000) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
|
||||
|
||||
@@ -4,13 +4,26 @@
|
||||
<!-- 以下为顶部搜索框 -->
|
||||
<div class="filter">
|
||||
<div class="select">
|
||||
<a-select
|
||||
<!-- <a-select
|
||||
style="width: 100%"
|
||||
placeholder="请选择组织"
|
||||
v-model:value="orgId"
|
||||
:options="option"
|
||||
allowClear
|
||||
></a-select>
|
||||
></a-select> -->
|
||||
<a-cascader
|
||||
:options="option"
|
||||
placeholder="请选择组织"
|
||||
v-model:value="orgId"
|
||||
:allowClear="allowClear"
|
||||
style="width: 100%"
|
||||
:fieldNames="{
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
children: 'treeChildList',
|
||||
}"
|
||||
>
|
||||
</a-cascader>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-input
|
||||
@@ -56,11 +69,15 @@
|
||||
<!-- 以下为导出按钮 -->
|
||||
<div class="btns">
|
||||
<div class="btn btn3" @click="exportAllBtn" style="margin-right: 20px">
|
||||
<div><img src="../../assets/svg/export.png" alt="" /></div>
|
||||
<div>
|
||||
<img src="../../assets/images/coursewareManage/export1.png" alt="" />
|
||||
</div>
|
||||
<div class="btnText">导出全部</div>
|
||||
</div>
|
||||
<div class="btn btn3" @click="exportBtn">
|
||||
<div><img src="../../assets/svg/export.png" alt="" /></div>
|
||||
<div>
|
||||
<img src="../../assets/images/coursewareManage/export1.png" alt="" />
|
||||
</div>
|
||||
<div class="btnText">导出</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,23 +134,28 @@ export default {
|
||||
userNo: "", //工号
|
||||
option: [], //组织列表
|
||||
selectedRowKeys: [], // 选中的列
|
||||
ids: [],
|
||||
allowClear:true,
|
||||
resetOrgId:[]
|
||||
});
|
||||
// table选中
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
const onSelectChange = (selectedRowKeys, record) => {
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
state.ids = record?.map((item) => {
|
||||
return item.basicBoeUserId;
|
||||
});
|
||||
};
|
||||
//请求组织接口
|
||||
//请求组织接口
|
||||
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 = list;
|
||||
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();
|
||||
}
|
||||
};
|
||||
//导出
|
||||
@@ -144,7 +166,7 @@ export default {
|
||||
axios({
|
||||
method: "get",
|
||||
url: "/report/boeu/studyData/export",
|
||||
params: { ids: `${state.selectedRowKeys}` },
|
||||
params: { ids: `${state.ids}` },
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
token: Cookies.get("token"),
|
||||
@@ -280,7 +302,7 @@ export default {
|
||||
axios({
|
||||
method: "get",
|
||||
url: "/report/boeu/studyData/export",
|
||||
params: { ids: `${record.record.id}` },
|
||||
params: { ids: `${record.record.basicBoeUserId}` },
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
token: Cookies.get("token"),
|
||||
@@ -302,7 +324,7 @@ export default {
|
||||
size: state.pageSize,
|
||||
userNo: state.userNo,
|
||||
name: state.name,
|
||||
departmentId: state.orgId,
|
||||
departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||
bandCode: state.band,
|
||||
});
|
||||
if (res) {
|
||||
@@ -323,16 +345,10 @@ export default {
|
||||
state.name = "";
|
||||
state.band = "";
|
||||
state.userNo = "";
|
||||
getOrgId();
|
||||
};
|
||||
// 获取登录人员组织
|
||||
const getOrgId = async () => {
|
||||
const res = await api.userInfo({});
|
||||
if (res) {
|
||||
state.orgId = res.data.result.departId;
|
||||
getTableData();
|
||||
}
|
||||
state.orgId = state.resetOrgId;
|
||||
getTableData();
|
||||
};
|
||||
|
||||
// 导出全部按钮
|
||||
const exportAllBtn = async () => {
|
||||
axios({
|
||||
@@ -341,7 +357,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",
|
||||
@@ -449,10 +465,14 @@ export default {
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #4ea6ff;
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
background-image: url("../../assets/images/courseManage/reset0.png");
|
||||
}
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -473,11 +493,11 @@ export default {
|
||||
}
|
||||
|
||||
.btn2:hover {
|
||||
background: rgba(64, 158, 255, 0.1);
|
||||
background: rgba(64, 158, 255, 0.76);
|
||||
}
|
||||
|
||||
.btn2:active {
|
||||
background: rgba(64, 158, 255, 0.2);
|
||||
background: #0982ff;
|
||||
}
|
||||
}
|
||||
.tableBox {
|
||||
@@ -519,22 +539,25 @@ export default {
|
||||
|
||||
.btn3 {
|
||||
margin-right: 0px;
|
||||
|
||||
background: #4ea6ff;
|
||||
.search {
|
||||
width: 17px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/add0.png");
|
||||
}
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.btn3:hover {
|
||||
// background: rgba(64, 158, 255, 0.76);
|
||||
background: rgba(64, 158, 255, 0.2);
|
||||
background: rgba(64, 158, 255, 0.76);
|
||||
}
|
||||
|
||||
// .btn3:active {
|
||||
// background: #0982ff;
|
||||
// }
|
||||
.btn3:active {
|
||||
background: #0982ff;
|
||||
}
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
<!-- 以下为导出按钮 -->
|
||||
<div class="btns">
|
||||
<div class="btn btn3">
|
||||
<div><img src="../../assets/svg/export.png" alt="" /></div>
|
||||
<div><img src="../../assets/images/coursewareManage/export1.png" alt="" /></div>
|
||||
<div class="btnText">导出列表信息</div>
|
||||
</div>
|
||||
<div class="btn btn3" style="margin-left: 20px">
|
||||
<div><img src="../../assets/svg/export.png" alt="" /></div>
|
||||
<div><img src="../../assets/images/coursewareManage/export1.png" alt="" /></div>
|
||||
<div class="btnText">导出详细信息</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -369,12 +369,15 @@ export default {
|
||||
|
||||
.btn3 {
|
||||
margin-right: 0px;
|
||||
|
||||
background: #4ea6ff;
|
||||
.search {
|
||||
width: 17px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/add0.png");
|
||||
}
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.btn3:hover {
|
||||
|
||||
@@ -4,13 +4,25 @@
|
||||
<!-- 以下为顶部搜索框 -->
|
||||
<div class="filter">
|
||||
<div class="select">
|
||||
<a-select
|
||||
<!-- <a-select
|
||||
style="width: 100%"
|
||||
placeholder="请选择组织"
|
||||
v-model:value="orgId"
|
||||
:options="option"
|
||||
allowClear
|
||||
></a-select>
|
||||
></a-select> -->
|
||||
<a-cascader
|
||||
:options="option"
|
||||
placeholder="请选择组织"
|
||||
v-model:value="orgId"
|
||||
:allowClear="allowClear"
|
||||
style="width: 100%"
|
||||
:fieldNames="{
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
children: 'treeChildList',
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-input
|
||||
@@ -62,13 +74,19 @@
|
||||
style="margin-right: 15px"
|
||||
>
|
||||
<div>
|
||||
<img src="../../assets/svg/export.png" alt="" />
|
||||
<img
|
||||
src="../../assets/images/coursewareManage/export1.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div class="btnText">全部导出</div>
|
||||
</div>
|
||||
<div class="btn btn3" @click="exportClick">
|
||||
<div>
|
||||
<img src="../../assets/svg/export.png" alt="" />
|
||||
<img
|
||||
src="../../assets/images/coursewareManage/export1.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div class="btnText">导出</div>
|
||||
</div>
|
||||
@@ -281,6 +299,8 @@ export default {
|
||||
name: "", //名称
|
||||
selectedRowKeys: [], // 选中的列
|
||||
option: [],
|
||||
resetOrgId: [],
|
||||
allowClear: true,
|
||||
});
|
||||
// 获取tab数据
|
||||
const getTabData = async () => {
|
||||
@@ -302,21 +322,20 @@ export default {
|
||||
state.tableLoading = true;
|
||||
state.creator = "";
|
||||
state.name = "";
|
||||
getOrgId();
|
||||
// getTableData();
|
||||
state.orgId = state.resetOrgId;
|
||||
getTableData();
|
||||
};
|
||||
//请求组织接口
|
||||
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 = list;
|
||||
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();
|
||||
}
|
||||
};
|
||||
// 导出按钮
|
||||
@@ -407,7 +426,7 @@ export default {
|
||||
url: "/report/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",
|
||||
@@ -423,7 +442,7 @@ export default {
|
||||
url: "/report/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",
|
||||
@@ -439,7 +458,7 @@ export default {
|
||||
url: "/report/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",
|
||||
@@ -455,7 +474,7 @@ export default {
|
||||
url: "/report/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",
|
||||
@@ -471,7 +490,7 @@ export default {
|
||||
url: "/report/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",
|
||||
@@ -485,9 +504,9 @@ export default {
|
||||
axios({
|
||||
method: "post",
|
||||
url: "/report/boeu/project/exportAll",
|
||||
data:{
|
||||
data: {
|
||||
name: state.name,
|
||||
organizationId: state.orgId,
|
||||
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||
createName: state.creator,
|
||||
},
|
||||
responseType: "blob",
|
||||
@@ -511,7 +530,7 @@ export default {
|
||||
//考试列表
|
||||
const res = await api.boeuExamPageList({
|
||||
creator: state.creator,
|
||||
orgId: state.orgId,
|
||||
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||
testName: state.name,
|
||||
page: state.pageNo,
|
||||
size: state.pageSize,
|
||||
@@ -531,7 +550,7 @@ export default {
|
||||
//案例列表
|
||||
const res = await api.boeuCasePageList({
|
||||
author: state.creator,
|
||||
orgId: state.orgId,
|
||||
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||
title: state.name,
|
||||
page: state.pageNo,
|
||||
size: state.pageSize,
|
||||
@@ -552,7 +571,9 @@ export default {
|
||||
page: state.pageNo,
|
||||
size: state.pageSize,
|
||||
name: state.name,
|
||||
organizationId: state.orgId,
|
||||
organizationId: state.orgId
|
||||
? state.orgId[state.orgId.length - 1]
|
||||
: null,
|
||||
createName: state.creator,
|
||||
});
|
||||
const list = res.data.rows.map((item) => {
|
||||
@@ -569,7 +590,7 @@ export default {
|
||||
page: state.pageNo,
|
||||
size: state.pageSize,
|
||||
teachingName: state.name,
|
||||
orgId: state.orgId,
|
||||
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||
createName: state.creator,
|
||||
});
|
||||
const list = res.data.rows?.map((item) => {
|
||||
@@ -586,7 +607,7 @@ export default {
|
||||
page: state.pageNo,
|
||||
size: state.pageSize,
|
||||
routerName: state.name,
|
||||
orgId: state.orgId,
|
||||
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||
createName: state.creator,
|
||||
});
|
||||
const list = res.data.rows?.map((item) => {
|
||||
@@ -602,7 +623,7 @@ export default {
|
||||
const res = await api.boeuProjectPageList({
|
||||
page: state.pageNo,
|
||||
size: state.pageSize,
|
||||
orgId: state.orgId,
|
||||
orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
|
||||
createName: state.creator,
|
||||
projectName: state.name,
|
||||
});
|
||||
@@ -1307,14 +1328,7 @@ export default {
|
||||
}
|
||||
getTableData();
|
||||
};
|
||||
// 获取登录人员组织
|
||||
const getOrgId = async () => {
|
||||
const res = await api.userInfo({});
|
||||
if (res) {
|
||||
state.orgId = res.data.result.departId;
|
||||
getTableData();
|
||||
}
|
||||
};
|
||||
|
||||
//table 分页事件
|
||||
const changePagination = (page) => {
|
||||
state.selectedRowKeys = [];
|
||||
@@ -1430,10 +1444,15 @@ export default {
|
||||
|
||||
.btn2 {
|
||||
margin-right: 0px !important;
|
||||
background: #4ea6ff;
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
|
||||
background-image: url("../../assets/images/courseManage/reset0.png");
|
||||
}
|
||||
.btnText {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1448,18 +1467,29 @@ export default {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.btn2:hover {
|
||||
background: rgba(64, 158, 255, 0.76);
|
||||
|
||||
.btn1:active {
|
||||
.search {
|
||||
background-image: url("../../assets/images/courseManage/reset0.png");
|
||||
}
|
||||
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.btn1:active,
|
||||
.btn2:active {
|
||||
background: #0982ff;
|
||||
}
|
||||
|
||||
.btn2:hover {
|
||||
background: rgba(64, 158, 255, 0.1);
|
||||
}
|
||||
// .btn2:hover {
|
||||
// background: rgba(64, 158, 255, 0.1);
|
||||
// }
|
||||
|
||||
.btn2:active {
|
||||
background: rgba(64, 158, 255, 0.2);
|
||||
}
|
||||
// .btn2:active {
|
||||
// background: rgba(64, 158, 255, 0.2);
|
||||
// }
|
||||
}
|
||||
.tabBtn {
|
||||
width: 100%;
|
||||
@@ -1519,16 +1549,20 @@ export default {
|
||||
|
||||
.btn3 {
|
||||
margin-right: 0px;
|
||||
background: #4ea6ff;
|
||||
.search {
|
||||
width: 17px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/add0.png");
|
||||
}
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.btn3:hover {
|
||||
// background: rgba(64, 158, 255, 0.76);
|
||||
background: rgba(64, 158, 255, 0.2);
|
||||
background: rgba(64, 158, 255, 0.76);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user