Merge branch 'dev_Ma_pre' into 'develop'

Dev ma pre

See merge request !86
This commit is contained in:
huangshengfa
2023-03-14 15:59:14 +08:00
6 changed files with 143 additions and 87 deletions

View File

@@ -33,7 +33,7 @@ import {USER_PERMISSION} from "@/api/ThirdApi";
const store = useStore(); const store = useStore();
const isLogin = ref(false); const isLogin = ref(false);
console.log("版本2.1.6------------"); console.log("版本1.4.5------------");
// 监听关闭浏览器 // 监听关闭浏览器
let time1 = ref(0); let time1 = ref(0);

View File

@@ -24,7 +24,6 @@ http.interceptors.request.use(
config.headers.token = token; //测试1111 config.headers.token = token; //测试1111
} else{ } else{
message.error('未获取到登录信息,请先登录') message.error('未获取到登录信息,请先登录')
return window.location.href='https://u-pre.boe.com/web/';
} }
return config; return config;
}, },
@@ -48,7 +47,6 @@ http.interceptors.response.use(
} }
if(code==601){ if(code==601){
message.error('token过期请重新登陆'); message.error('token过期请重新登陆');
return window.location.href='https://u-pre.boe.com/web/';
} }
if (code === 1000) { 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) (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)

View File

@@ -25,7 +25,6 @@ http.interceptors.request.use(
config.headers.token = token; //测试1111 config.headers.token = token; //测试1111
} else{ } else{
message.error('未获取到登录信息,请先登录') message.error('未获取到登录信息,请先登录')
return window.location.href='https://u-pre.boe.com/web/';
} }
return config; return config;
}, },
@@ -50,7 +49,6 @@ http.interceptors.response.use(
} }
if(code==601){ if(code==601){
message.error('token过期请重新登陆'); message.error('token过期请重新登陆');
return window.location.href='https://u-pre.boe.com/web/';
} }
if (code === 1000) { 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) (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)

View File

@@ -4,13 +4,26 @@
<!-- 以下为顶部搜索框 --> <!-- 以下为顶部搜索框 -->
<div class="filter"> <div class="filter">
<div class="select"> <div class="select">
<a-select <!-- <a-select
style="width: 100%" style="width: 100%"
placeholder="请选择组织" placeholder="请选择组织"
v-model:value="orgId" v-model:value="orgId"
:options="option" :options="option"
allowClear 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>
<div class="select"> <div class="select">
<a-input <a-input
@@ -56,11 +69,15 @@
<!-- 以下为导出按钮 --> <!-- 以下为导出按钮 -->
<div class="btns"> <div class="btns">
<div class="btn btn3" @click="exportAllBtn" style="margin-right: 20px"> <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 class="btnText">导出全部</div>
</div> </div>
<div class="btn btn3" @click="exportBtn"> <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 class="btnText">导出</div>
</div> </div>
</div> </div>
@@ -117,23 +134,28 @@ export default {
userNo: "", //工号 userNo: "", //工号
option: [], //组织列表 option: [], //组织列表
selectedRowKeys: [], // 选中的列 selectedRowKeys: [], // 选中的列
ids: [],
allowClear:true,
resetOrgId:[]
}); });
// table选中 // table选中
const onSelectChange = (selectedRowKeys) => { const onSelectChange = (selectedRowKeys, record) => {
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
state.ids = record?.map((item) => {
return item.basicBoeUserId;
});
}; };
//请求组织接口 //请求组织接口
const getOrgList = async () => { const getOrgList = async () => {
const res = await api.userGetUserOrg({}); const res = await api.userGetUserOrg({});
if (res) { if (res) {
const list = res.data?.result?.map((item) => { state.option = res.data?.result?.list;
return { state.orgId = res.data?.result?.treeNodeList;
label: item.orgName, state.resetOrgId = res.data?.result?.treeNodeList;
value: item.orgId, res.data?.result?.userType === 1
}; ? (state.allowClear = true)
}); : (state.allowClear = false);
state.option = list; getTableData();
getOrgId();
} }
}; };
//导出 //导出
@@ -144,7 +166,7 @@ export default {
axios({ axios({
method: "get", method: "get",
url: "/report/boeu/studyData/export", url: "/report/boeu/studyData/export",
params: { ids: `${state.selectedRowKeys}` }, params: { ids: `${state.ids}` },
responseType: "blob", responseType: "blob",
headers: { headers: {
token: Cookies.get("token"), token: Cookies.get("token"),
@@ -280,7 +302,7 @@ export default {
axios({ axios({
method: "get", method: "get",
url: "/report/boeu/studyData/export", url: "/report/boeu/studyData/export",
params: { ids: `${record.record.id}` }, params: { ids: `${record.record.basicBoeUserId}` },
responseType: "blob", responseType: "blob",
headers: { headers: {
token: Cookies.get("token"), token: Cookies.get("token"),
@@ -302,7 +324,7 @@ export default {
size: state.pageSize, size: state.pageSize,
userNo: state.userNo, userNo: state.userNo,
name: state.name, name: state.name,
departmentId: state.orgId, departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
bandCode: state.band, bandCode: state.band,
}); });
if (res) { if (res) {
@@ -323,16 +345,10 @@ export default {
state.name = ""; state.name = "";
state.band = ""; state.band = "";
state.userNo = ""; state.userNo = "";
getOrgId(); state.orgId = state.resetOrgId;
};
// 获取登录人员组织
const getOrgId = async () => {
const res = await api.userInfo({});
if (res) {
state.orgId = res.data.result.departId;
getTableData(); getTableData();
}
}; };
// 导出全部按钮 // 导出全部按钮
const exportAllBtn = async () => { const exportAllBtn = async () => {
axios({ axios({
@@ -341,7 +357,7 @@ export default {
data: { data: {
userNo: state.userNo, userNo: state.userNo,
name: state.name, name: state.name,
departmentId: state.orgId, departmentId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
bandCode: state.band, bandCode: state.band,
}, },
responseType: "blob", responseType: "blob",
@@ -449,10 +465,14 @@ export default {
} }
.btn2 { .btn2 {
background: #4ea6ff;
.search { .search {
width: 16px; width: 16px;
height: 18px; 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 { .btn2:hover {
background: rgba(64, 158, 255, 0.1); background: rgba(64, 158, 255, 0.76);
} }
.btn2:active { .btn2:active {
background: rgba(64, 158, 255, 0.2); background: #0982ff;
} }
} }
.tableBox { .tableBox {
@@ -519,22 +539,25 @@ export default {
.btn3 { .btn3 {
margin-right: 0px; margin-right: 0px;
background: #4ea6ff;
.search { .search {
width: 17px; width: 17px;
height: 18px; height: 18px;
background-image: url("../../assets/images/courseManage/add0.png"); background-image: url("../../assets/images/courseManage/add0.png");
} }
.btnText {
color: #ffffff;
}
} }
.btn3:hover { .btn3:hover {
// background: rgba(64, 158, 255, 0.76); // background: rgba(64, 158, 255, 0.76);
background: rgba(64, 158, 255, 0.2); background: rgba(64, 158, 255, 0.76);
} }
// .btn3:active { .btn3:active {
// background: #0982ff; background: #0982ff;
// } }
} }
.tableBox { .tableBox {

View File

@@ -51,11 +51,11 @@
<!-- 以下为导出按钮 --> <!-- 以下为导出按钮 -->
<div class="btns"> <div class="btns">
<div class="btn btn3"> <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 class="btnText">导出列表信息</div>
</div> </div>
<div class="btn btn3" style="margin-left: 20px"> <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 class="btnText">导出详细信息</div>
</div> </div>
</div> </div>
@@ -369,12 +369,15 @@ export default {
.btn3 { .btn3 {
margin-right: 0px; margin-right: 0px;
background: #4ea6ff;
.search { .search {
width: 17px; width: 17px;
height: 18px; height: 18px;
background-image: url("../../assets/images/courseManage/add0.png"); background-image: url("../../assets/images/courseManage/add0.png");
} }
.btnText {
color: #ffffff;
}
} }
.btn3:hover { .btn3:hover {

View File

@@ -4,13 +4,25 @@
<!-- 以下为顶部搜索框 --> <!-- 以下为顶部搜索框 -->
<div class="filter"> <div class="filter">
<div class="select"> <div class="select">
<a-select <!-- <a-select
style="width: 100%" style="width: 100%"
placeholder="请选择组织" placeholder="请选择组织"
v-model:value="orgId" v-model:value="orgId"
:options="option" :options="option"
allowClear 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>
<div class="select"> <div class="select">
<a-input <a-input
@@ -62,13 +74,19 @@
style="margin-right: 15px" style="margin-right: 15px"
> >
<div> <div>
<img src="../../assets/svg/export.png" alt="" /> <img
src="../../assets/images/coursewareManage/export1.png"
alt=""
/>
</div> </div>
<div class="btnText">全部导出</div> <div class="btnText">全部导出</div>
</div> </div>
<div class="btn btn3" @click="exportClick"> <div class="btn btn3" @click="exportClick">
<div> <div>
<img src="../../assets/svg/export.png" alt="" /> <img
src="../../assets/images/coursewareManage/export1.png"
alt=""
/>
</div> </div>
<div class="btnText">导出</div> <div class="btnText">导出</div>
</div> </div>
@@ -281,6 +299,8 @@ export default {
name: "", //名称 name: "", //名称
selectedRowKeys: [], // 选中的列 selectedRowKeys: [], // 选中的列
option: [], option: [],
resetOrgId: [],
allowClear: true,
}); });
// 获取tab数据 // 获取tab数据
const getTabData = async () => { const getTabData = async () => {
@@ -302,21 +322,20 @@ export default {
state.tableLoading = true; state.tableLoading = true;
state.creator = ""; state.creator = "";
state.name = ""; state.name = "";
getOrgId(); state.orgId = state.resetOrgId;
// getTableData(); getTableData();
}; };
//请求组织接口 //请求组织接口
const getOrgList = async () => { const getOrgList = async () => {
const res = await api.userGetUserOrg({}); const res = await api.userGetUserOrg({});
if (res) { if (res) {
const list = res.data?.result?.map((item) => { state.option = res.data?.result?.list;
return { state.orgId = res.data?.result?.treeNodeList;
label: item.orgName, state.resetOrgId = res.data?.result?.treeNodeList;
value: item.orgId, res.data?.result?.userType === 1
}; ? (state.allowClear = true)
}); : (state.allowClear = false);
state.option = list; getTableData();
getOrgId();
} }
}; };
// 导出按钮 // 导出按钮
@@ -407,7 +426,7 @@ export default {
url: "/report/boeu/case/exportAll", url: "/report/boeu/case/exportAll",
data: { data: {
name: state.name, name: state.name,
organizationId: state.orgId, organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
}, },
responseType: "blob", responseType: "blob",
@@ -423,7 +442,7 @@ export default {
url: "/report/boeu/exam/exportAll", url: "/report/boeu/exam/exportAll",
data: { data: {
name: state.name, name: state.name,
organizationId: state.orgId, organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
}, },
responseType: "blob", responseType: "blob",
@@ -439,7 +458,7 @@ export default {
url: "/report/boeu/course/exportAll", url: "/report/boeu/course/exportAll",
data: { data: {
name: state.name, name: state.name,
organizationId: state.orgId, organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
}, },
responseType: "blob", responseType: "blob",
@@ -455,7 +474,7 @@ export default {
url: "/report/boeu/teaching/exportAll", url: "/report/boeu/teaching/exportAll",
data: { data: {
name: state.name, name: state.name,
organizationId: state.orgId, organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
}, },
responseType: "blob", responseType: "blob",
@@ -471,7 +490,7 @@ export default {
url: "/report/boeu/router/exportAll", url: "/report/boeu/router/exportAll",
data: { data: {
name: state.name, name: state.name,
organizationId: state.orgId, organizationId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
}, },
responseType: "blob", responseType: "blob",
@@ -485,9 +504,9 @@ export default {
axios({ axios({
method: "post", method: "post",
url: "/report/boeu/project/exportAll", url: "/report/boeu/project/exportAll",
data:{ data: {
name: state.name, name: state.name,
organizationId: state.orgId, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
}, },
responseType: "blob", responseType: "blob",
@@ -511,7 +530,7 @@ export default {
//考试列表 //考试列表
const res = await api.boeuExamPageList({ const res = await api.boeuExamPageList({
creator: state.creator, creator: state.creator,
orgId: state.orgId, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
testName: state.name, testName: state.name,
page: state.pageNo, page: state.pageNo,
size: state.pageSize, size: state.pageSize,
@@ -531,7 +550,7 @@ export default {
//案例列表 //案例列表
const res = await api.boeuCasePageList({ const res = await api.boeuCasePageList({
author: state.creator, author: state.creator,
orgId: state.orgId, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
title: state.name, title: state.name,
page: state.pageNo, page: state.pageNo,
size: state.pageSize, size: state.pageSize,
@@ -552,7 +571,9 @@ export default {
page: state.pageNo, page: state.pageNo,
size: state.pageSize, size: state.pageSize,
name: state.name, name: state.name,
organizationId: state.orgId, organizationId: state.orgId
? state.orgId[state.orgId.length - 1]
: null,
createName: state.creator, createName: state.creator,
}); });
const list = res.data.rows.map((item) => { const list = res.data.rows.map((item) => {
@@ -569,7 +590,7 @@ export default {
page: state.pageNo, page: state.pageNo,
size: state.pageSize, size: state.pageSize,
teachingName: state.name, teachingName: state.name,
orgId: state.orgId, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
}); });
const list = res.data.rows?.map((item) => { const list = res.data.rows?.map((item) => {
@@ -586,7 +607,7 @@ export default {
page: state.pageNo, page: state.pageNo,
size: state.pageSize, size: state.pageSize,
routerName: state.name, routerName: state.name,
orgId: state.orgId, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
}); });
const list = res.data.rows?.map((item) => { const list = res.data.rows?.map((item) => {
@@ -602,7 +623,7 @@ export default {
const res = await api.boeuProjectPageList({ const res = await api.boeuProjectPageList({
page: state.pageNo, page: state.pageNo,
size: state.pageSize, size: state.pageSize,
orgId: state.orgId, orgId: state.orgId ? state.orgId[state.orgId.length - 1] : null,
createName: state.creator, createName: state.creator,
projectName: state.name, projectName: state.name,
}); });
@@ -1307,14 +1328,7 @@ export default {
} }
getTableData(); getTableData();
}; };
// 获取登录人员组织
const getOrgId = async () => {
const res = await api.userInfo({});
if (res) {
state.orgId = res.data.result.departId;
getTableData();
}
};
//table 分页事件 //table 分页事件
const changePagination = (page) => { const changePagination = (page) => {
state.selectedRowKeys = []; state.selectedRowKeys = [];
@@ -1430,10 +1444,15 @@ export default {
.btn2 { .btn2 {
margin-right: 0px !important; margin-right: 0px !important;
background: #4ea6ff;
.search { .search {
width: 16px; width: 16px;
height: 18px; 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; 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; background: #0982ff;
} }
.btn2:hover { // .btn2:hover {
background: rgba(64, 158, 255, 0.1); // background: rgba(64, 158, 255, 0.1);
} // }
.btn2:active { // .btn2:active {
background: rgba(64, 158, 255, 0.2); // background: rgba(64, 158, 255, 0.2);
} // }
} }
.tabBtn { .tabBtn {
width: 100%; width: 100%;
@@ -1519,16 +1549,20 @@ export default {
.btn3 { .btn3 {
margin-right: 0px; margin-right: 0px;
background: #4ea6ff;
.search { .search {
width: 17px; width: 17px;
height: 18px; height: 18px;
background-image: url("../../assets/images/courseManage/add0.png"); background-image: url("../../assets/images/courseManage/add0.png");
} }
.btnText {
color: #ffffff;
}
} }
.btn3:hover { .btn3:hover {
// background: rgba(64, 158, 255, 0.76); // background: rgba(64, 158, 255, 0.76);
background: rgba(64, 158, 255, 0.2); background: rgba(64, 158, 255, 0.76);
} }
} }
} }