feat:注释自动跳转

This commit is contained in:
lixg
2022-11-25 17:34:41 +08:00
parent a9b85f3802
commit 35ba74c3f7
9 changed files with 193 additions and 203 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@@ -2,12 +2,12 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-25 15:52:59
* @LastEditTime: 2022-11-25 17:33:03
* @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import axios from "axios";
import { getCookie } from '../api/method'
// import { getCookie } from '../api/method'
// const Qs = require("qs");
// axios.defaults.headers.post["Content-Type"] =
@@ -24,8 +24,8 @@ const http = axios.create({
http.interceptors.request.use(
(config) => {
// const token = localStorage.getItem("token");
const token = getCookie('token')
const token = localStorage.getItem("token");
// const token = getCookie('token')
// console.log('token', token)
if (token) {
config.headers.token = token; //测试1111
@@ -54,7 +54,7 @@ http.interceptors.response.use(
if (code === 0 || code === 200) {
return response;
} else {
window.open("https://u-pre.boe.com/web/", '_self');
// window.open("https://u-pre.boe.com/web/", '_self');
console.log("api %o", msg);
}
return response;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -23,13 +23,13 @@
<div class="user">
<img
style="
width: 30px;
height: 31px;
width: 40px;
height: 40px;
margin-left: 8px;
border-radius: 15px;
margin-right: 10px;
"
src="../assets/images/img.jpg"
src="../assets/images/avatar.png"
/>
<div>{{ username }}</div>
</div>
@@ -49,7 +49,7 @@
style="width: 27px; height: 27px"
src="../assets/images/navtop/signout.png"
/>
<span class="signOut">退</span>
<span class="signOut"></span>
</div>
</div>
</div>
@@ -73,10 +73,12 @@ export default {
{
id: 1,
name: "管理员",
go: "/manage/learningpath",
},
{
id: 2,
name: "学员",
go: "https://u.boe.com/pc/uc/study/courses",
},
],
@@ -86,6 +88,7 @@ export default {
state.roleList.map((item) => {
if (value.name === item.name) {
state.selectRole = item.name;
window.open(item.go, "_self");
}
});
};

View File

@@ -29,11 +29,15 @@
</div>
<div class="btns">
<div class="btn btn1" style="margin-right: 20px">
<div
class="btn btn1"
style="margin-right: 20px"
@click="searchAuth"
>
<div class="img1"></div>
<div class="wz">搜索</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="resetAuth">
<div class="img2"></div>
<div class="wz">重置</div>
</div>
@@ -50,13 +54,13 @@
@expand="expandTable"
:scroll="{ x: 900 }"
:pagination="false"
/>
</div>
<div class="tableBox">
<div class="pa">
<a-pagination
v-if="tableDataTotal > 10"
showSizeChanger="true"
showQuickJumper="true"
hideOnSinglePage="true"
@@ -64,6 +68,7 @@
:current="currentPage"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
</div>
</div>
@@ -127,6 +132,7 @@
<script>
import { toRefs, reactive } from "vue";
import * as api from "../../api/index1";
export default {
name: "PowerList",
props: {
@@ -134,6 +140,10 @@ export default {
type: Boolean,
default: false,
},
selectPathId: {
type: Number,
default: null,
},
},
setup(props, ctx) {
@@ -143,98 +153,31 @@ export default {
closable: false, //modal右上角的关闭按钮
pageSize: 10,
currentPage: 1,
tableDataTotal: 100,
tableDataTotal: -1,
selectedRowKeys: [],
cancelModal: false, //取消授权弹窗
closeCancel: false, //取消授权弹窗关闭图标
tableData: [
{
key: 1,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 2,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 3,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 4,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 5,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 6,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "归属权",
},
{
key: 7,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "查看权",
},
{
key: 8,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 9,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 10,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
tableData: [
// {
// key: 1,
// name: "张三",
// com: "产研部",
// gang: "产品经理",
// number: "20201234",
// state: "管理权",
// },
],
});
const closeDrawer = () => {
ctx.emit("update:PLvisible", false);
};
const afterVisibleChange = (bool) => {
console.log("state", bool, props);
if (bool) {
optionAuthPerm();
}
};
const onSelectChange = (selectedRowKeys) => {
console.log("selectedRowKeys changed: ", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys;
@@ -266,7 +209,7 @@ export default {
);
},
},
{
{
title: "工号",
dataIndex: "number",
// width: "30%",
@@ -325,20 +268,64 @@ export default {
];
return columns;
};
//‘获取权限名单
const optionAuthPerm = () => {
let obj = {
keyWord: state.name ? state.name : "",
type: 1,
tag: 1,
opt: 1,
refId: props.selectPathId,
pageNo: state.currentPage,
pageSize: state.pageSize,
};
console.log("获取权限名单obj", obj);
api
.optionAuthPerm(obj)
.then((res) => {
console.log("获取权限名单成功", res);
if (res.data.code === 200) {
state.tableDataTotal = res.data.data.total;
}
})
.catch((err) => {
console.log("获取权限名单失败", err);
});
};
//分页
const changePagination = (page) => {
state.currentPage = page;
optionAuthPerm();
};
//查询
const searchAuth = () => {
state.currentPage = 1;
optionAuthPerm();
};
//重置
const resetAuth = () => {
state.currentPage = 1;
state.name = null;
optionAuthPerm();
};
return {
...toRefs(state),
closeDrawer,
afterVisibleChange,
onSelectChange,
tableDataFunc,
showCancelModal,
closeCancelModal,
changePagination,
searchAuth,
resetAuth,
};
},
};
</script>
<style lang="scss">
.copyModal {
.ant-modal {
width: 424px !important;

View File

@@ -29,11 +29,15 @@
</div>
<div class="btns">
<div class="btn btn1" style="margin-right: 20px">
<div
class="btn btn1"
style="margin-right: 20px"
@click="searchAuth"
>
<div class="img1"></div>
<div class="wz">搜索</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="resetAuth">
<div class="img2"></div>
<div class="wz">重置</div>
</div>
@@ -55,6 +59,7 @@
<div class="tableBox">
<div class="pa">
<a-pagination
v-if="tableDataTotal > 10"
showSizeChanger="true"
showQuickJumper="true"
hideOnSinglePage="true"
@@ -62,6 +67,7 @@
:current="currentPage"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
</div>
</div>
@@ -126,6 +132,7 @@
<script>
import { toRefs, reactive } from "vue";
import * as api from "../../api/index1";
export default {
name: "ProjPowerList",
props: {
@@ -133,6 +140,10 @@ export default {
type: Boolean,
default: false,
},
selectProjectId: {
type: Number,
default: null,
},
},
setup(props, ctx) {
@@ -142,98 +153,31 @@ export default {
closable: false, //modal右上角的关闭按钮
pageSize: 10,
currentPage: 1,
tableDataTotal: 100,
tableDataTotal: -1,
selectedRowKeys: [],
cancelModal: false, //取消授权弹窗
closeCancel: false, //取消授权弹窗关闭图标
tableData: [
{
key: 1,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 2,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 3,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 4,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 5,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 6,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "归属权",
},
{
key: 7,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "查看权",
},
{
key: 8,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 9,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
{
key: 10,
name: "张三",
com: "产研部",
gang: "产品经理",
number: "20201234",
state: "管理权",
},
// {
// key: 1,
// name: "张三",
// com: "产研部",
// gang: "产品经理",
// number: "20201234",
// state: "管理权",
// },
],
});
const closeDrawer = () => {
ctx.emit("update:ProjPvisible", false);
};
const afterVisibleChange = (bool) => {
console.log("state", bool, props);
if (bool) {
optionAuthPerm();
}
};
const onSelectChange = (selectedRowKeys) => {
console.log("selectedRowKeys changed: ", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys;
@@ -324,6 +268,48 @@ export default {
];
return columns;
};
//‘获取权限名单
const optionAuthPerm = () => {
let obj = {
keyWord: state.name ? state.name : "",
type: 2,
tag: 1,
opt: 1,
refId: props.selectProjectId,
pageNo: state.currentPage,
pageSize: state.pageSize,
};
console.log("获取权限名单obj", obj);
api
.optionAuthPerm(obj)
.then((res) => {
console.log("获取权限名单成功", res);
if (res.data.code === 200) {
state.tableDataTotal = res.data.data.total;
}
})
.catch((err) => {
console.log("获取权限名单失败", err);
});
};
//分页
const changePagination = (page) => {
state.currentPage = page;
optionAuthPerm();
};
//查询
const searchAuth = () => {
state.currentPage = 1;
optionAuthPerm();
};
//重置
const resetAuth = () => {
state.currentPage = 1;
state.name = null;
optionAuthPerm();
};
return {
...toRefs(state),
closeDrawer,
@@ -331,6 +317,10 @@ export default {
tableDataFunc,
showCancelModal,
closeCancelModal,
afterVisibleChange,
changePagination,
searchAuth,
resetAuth,
};
},
};

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-09 09:26:26
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-24 16:16:10
* @LastEditTime: 2022-11-25 17:29:16
* @FilePath: /fe-manage/src/views/courselibrary/CourseManage.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -13,7 +13,9 @@
id="iframe"
style="width: 100%; height: 100%"
:src="iframeUrl + '/course/coursewares'"
frameborder="0"
name="myframe"
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>
</div>

View File

@@ -589,7 +589,7 @@
<!-- 管理权抽屉 -->
<manage-right v-model:Managevisible="Managevisible" />
<!-- 授权名单抽屉 -->
<power-list v-model:PLvisible="PLvisible" />
<power-list v-model:PLvisible="PLvisible" :selectPathId="selectPathId" />
<!-- 创建路径loading -->
@@ -862,6 +862,8 @@ export default {
lpLoading: false,
learnBgMore: false, //是否显示更多学习路径背景
selectPathId: null, //选择的
});
const selectProjectName = (value, index) => {
console.log("value", value, index);
@@ -1039,8 +1041,9 @@ export default {
const showOwner = () => {
state.Ownervisible = true;
};
const showPower = () => {
const showPower = (id) => {
state.PLvisible = true;
state.selectPathId = id;
};
const showQuery = () => {
state.Queryvisible = true;
@@ -1232,7 +1235,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showPower();
showPower(text.record.id);
}}
>
权限名单
@@ -1647,7 +1650,7 @@ export default {
// console.log("执行");
getLearnPath();
// let cookie =
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkzNTU0MjQsImV4cCI6MTY2OTM2MjYyNCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.a565952d942ac41a6258a187be48a9269a75d0bfc50c6f13eb42362fe2f3d76a";
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkzNjI4OTAsImV4cCI6MTY2OTM3MDA5MCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.2e68ae110cf0e8f157d8312301c0ca8104d6ec2a2a294052d5497c06019ed3d8";
// setCookie("token", cookie, 10);
});

View File

@@ -1124,7 +1124,10 @@
:selectProjectId="selectProjectId"
/>
<!-- 授权名单抽屉 -->
<proj-power-list v-model:ProjPvisible="ProjPvisible" />
<proj-power-list
v-model:ProjPvisible="ProjPvisible"
:selectProjectId="selectProjectId"
/>
<!-- 查看权抽屉 -->
<proj-check-ship
v-model:ProjCheckvisible="ProjCheckvisible"
@@ -2253,7 +2256,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showProjPrower();
showProjPrower(value.record.projectId);
}}
>
权限名单
@@ -2273,7 +2276,7 @@ export default {
<div
onClick={() => {
console.log("点击了111");
showProjCheck();
showProjCheck(value.record.projectId);
}}
>
查看权
@@ -2355,7 +2358,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showProjPrower();
showProjPrower(value.record.projectId);
}}
>
权限名单
@@ -2375,7 +2378,7 @@ export default {
<div
onClick={() => {
console.log("点击了111");
showProjCheck();
showProjCheck(value.record.projectId);
}}
>
查看权
@@ -2444,7 +2447,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showProjPrower();
showProjPrower(value.record.projectId);
}}
>
权限名单
@@ -2464,7 +2467,7 @@ export default {
<div
onClick={() => {
console.log("点击了111");
showProjCheck();
showProjCheck(value.record.projectId);
}}
>
查看权
@@ -2565,7 +2568,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showProjPrower();
showProjPrower(value.record.projectId);
}}
>
权限名单
@@ -2585,7 +2588,7 @@ export default {
<div
onClick={() => {
console.log("点击了111");
showProjCheck();
showProjCheck(value.record.projectId);
}}
>
查看权
@@ -2659,7 +2662,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showProjPrower();
showProjPrower(value.record.projectId);
}}
>
权限名单
@@ -2679,7 +2682,7 @@ export default {
<div
onClick={() => {
console.log("点击了111");
showProjCheck();
showProjCheck(value.record.projectId);
}}
>
查看权
@@ -2732,7 +2735,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showProjPrower();
showProjPrower(value.record.projectId);
}}
>
权限名单
@@ -2752,7 +2755,7 @@ export default {
<div
onClick={() => {
console.log("点击了111");
showProjCheck();
showProjCheck(value.record.projectId);
}}
>
查看权
@@ -2906,7 +2909,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showProjPrower();
showProjPrower(value.record.projectId);
}}
>
权限名单
@@ -2926,7 +2929,7 @@ export default {
<div
onClick={() => {
console.log("点击了111");
showProjCheck();
showProjCheck(value.record.projectId);
}}
>
查看权
@@ -3257,10 +3260,12 @@ export default {
state.ProjOwnervisible = true;
state.selectProjectId = id;
};
const showProjPrower = () => {
const showProjPrower = (id) => {
state.selectProjectId = id;
state.ProjPvisible = true;
};
const showProjCheck = () => {
const showProjCheck = (id) => {
state.selectProjectId = id;
state.ProjCheckvisible = true;
};
const showProjManage = () => {