This commit is contained in:
宋文超
2022-11-25 18:27:29 +08:00
27 changed files with 419 additions and 492 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@@ -89,6 +89,7 @@ export default defineComponent({
});
};
orgTree();
return {
routes,
name: currentRouteName,

View File

@@ -2,11 +2,12 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-23 09:59:26
* @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'
// const Qs = require("qs");
// axios.defaults.headers.post["Content-Type"] =
@@ -24,15 +25,16 @@ const http = axios.create({
http.interceptors.request.use(
(config) => {
const token = localStorage.getItem("token");
// const token = getCookie('token')
// console.log('token', token)
if (token) {
// config.headers.token = token;
config.headers.token = token; //测试1111
} else {
console.log("当前请求页面无token,请执行操作!!!");
// 此处测试默认配置token
config.headers.token = "123456";
// config.headers.token = "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkyMTE4MzMsImV4cCI6MTY2OTIxOTAzMywiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.40067eca3be5d50857448005a673cbe1a48f560ff8e9c7aea4e7ff12f59c7962";
// config.headers.token = "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkzMDA4MDksImV4cCI6MTY2OTMwODAwOSwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.bb3e0e031513761003d5c3bfeaf16e364bdf8fe7bc4cf691a05a74dc454afbfb";
}
return config;
},
@@ -44,12 +46,15 @@ http.interceptors.request.use(
http.interceptors.response.use(
(response) => {
// console.log('response', response)
const {
data: { code, msg },
} = response;
// console.log('code', code)
if (code === 0 || code === 200) {
return response;
} else {
// window.open("https://u-pre.boe.com/web/", '_self');
console.log("api %o", msg);
}
return response;

View File

@@ -2,13 +2,13 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-04 22:45:31
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-24 15:11:25
* @LastEditTime: 2022-11-25 14:56:59
* @FilePath: /fe-manage/src/api/index1.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import http from "./config";
import qs from "qs";
// import { getCookie } from '../api/method'
/**
* 接口传参数方式get
* axios.get('/user', {
@@ -104,7 +104,8 @@ export const getMemberInfo = (obj) => http.post('/admin/orgStruct/getMemberInfo'
export const getAudienceInfo = (obj) => http.post('/admin/orgStruct/getAudienceInfo', obj)
//获取授权(修改版)
export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm', obj)
//获取用户登录
export const getUser = () => http.post('/admin/CheckUser/login')
// 获取组织结构树

View File

@@ -162,11 +162,47 @@ function autoComma(number) {
return 0;
}
}
//把token存到cookie
//name 字段名 value 字段值 perpetual 有效期
const setCookie = (name, value, perpetual) => {
console.log('存储token到cookie')
let exdate = new Date()
exdate.setDate(perpetual * 24 * 60 * 60 * 1000) //exdate.setDate(exdate.getDate() + 365)
document.cookie = name + '=' + value + ';expires=' + exdate.toGMTString()
//永久有效
//document.cookie = name + '=' + value + ';expires=' + 'Fri, 31 Dec 9999 23:59:59 GMT'
}
//获取cookie数据
//先写一个方法
function getCookie(name) {
//1.获取cookie字符串
var cookies = document.cookie;
//通过;来分割字符串
var cookie = cookies.split("; ");
// console.log('cookie', cookie)
//遍历,使键值对匹配上
for (var i = 0; i < cookie.length; i++) {
var arr = cookie[i].split("token=");
// console.log('arr', arr)
console.log('name', name)
// if (arr[0] == name) {
// console.log('arr[1]', arr[1])
// return arr[1];
// }
// console.log('arr[1]', arr[1])
return arr[1]
}
return "";
}
//最后通
//新建延迟
const commonData = {
timeout: 50
timeout: 50,
}
// const organizationalTree = [
// {
// title: "京东方",
@@ -376,6 +412,8 @@ export {
getWeek,
autoComma,
formatNumber,
setCookie,
getCookie,
commonData,
organizationalTree,
iframeUrl,

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -23,15 +23,15 @@
<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>李玉冰</div>
<div>{{ username }}</div>
</div>
<div
class="signOutMain"
@@ -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>
@@ -59,6 +59,7 @@
<script>
import { reactive, toRefs } from "vue";
import DownLoad from "../components/drawers/DownLoad";
import * as api from "../api/index1";
export default {
name: "NavTop",
components: {
@@ -67,14 +68,17 @@ export default {
setup() {
const state = reactive({
selectRole: "管理员",
username: "",
roleList: [
{
id: 1,
name: "管理员",
go: "/manage/learningpath",
},
{
id: 2,
name: "学员",
go: "https://u.boe.com/pc/uc/study/courses",
},
],
@@ -84,6 +88,7 @@ export default {
state.roleList.map((item) => {
if (value.name === item.name) {
state.selectRole = item.name;
window.open(item.go, "_self");
}
});
};
@@ -91,6 +96,21 @@ export default {
state.visible = true;
console.log("点击下载", state.visible);
};
const getUser = () => {
api
.getUser()
.then((res) => {
console.log("获取登录信息成功", res);
if (res.data.code === 200) {
state.username = res.data.data.realName;
}
})
.catch((err) => {
console.log("获取登录信息失败", err);
});
};
getUser();
return {
...toRefs(state),
changeRole,

View File

@@ -32,7 +32,7 @@
</div>
</div>
<div class="mi_btns">
<div class="btn btn1">
<div class="btn btn1" @click="getAllCaseText">
<div class="search"></div>
<div class="btnText">搜索</div>
</div>
@@ -85,7 +85,7 @@ import * as api from "../../api/indexCase.js";
import * as apiTask from "../../api/indexTaskadd";
import { message } from "ant-design-vue";
import { RouterEditTask } from "@/api/indexTask";
import { addTempTask } from "../../api/indexTaskadd";
// import { addTempTask } from "../../api/indexTaskadd";
// import dayjs from "dayjs";
export default {
@@ -153,6 +153,8 @@ export default {
ctx.emit("update:edit", false);
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
state.inputV1 = "";
state.selectedRowKeys = [];
};
const afterVisibleChange = (bol) => {
if (bol == true) {
@@ -193,11 +195,6 @@ export default {
}
state.selectedRowKeys = selectedRowKeys;
state.apiTaskList = selectedRows;
console.log(
"-------------%o-%o",
state.apiTaskList,
state.apiTaskList.length
);
};
const handelChangePage = (page, pageSize) => {
state.currentPage = page;
@@ -214,19 +211,19 @@ export default {
authorName: value.authorName,
companyId: value.companyId,
coverUrl: value.coverUrl,
caseid: value.id,
id: value.id,
casesId: value.casesId,
title: value.title,
};
array.push(obj);
});
state.tableData = array;
console.log("get下来的数据", state.tableData);
};
//获取全部案例信息接口
const getAllCaseText = () => {
api
.queryCasesDetailList({
keyWord: "",
keyWord: state.inputV1,
orderAsc: true,
orderField: "",
pageIndex: 0,
@@ -245,8 +242,8 @@ export default {
for (let i = 0; i < state.apiTaskList.length; i++) {
RouterEditTask({
chapterId: props.isactive,
courseId: state.apiTaskList[i].caseid,
name: state.apiTaskList[i].caseName,
courseId: state.apiTaskList[i].casesId,
name: state.apiTaskList[i].title,
routerId: props.routerId,
routerTaskId: props.routerTaskId || 0,
type: 3,
@@ -262,25 +259,16 @@ export default {
});
}
} else if (props.isLevel == 2) {
console.log(
"state api task list: %o-length: %o",
state.apiTaskList,
state.apiTaskList.length
);
for (let i = 0; i < state.apiTaskList.length; i++) {
console.log(
state.apiTaskList[i],
"state.apiTaskList[i].caseIdstate.apiTaskList[i].caseId"
);
apiTask
.addTask({
courseId: state.apiTaskList[i].caseid,
courseId: state.apiTaskList[i].casesId,
duration: 0,
flag: true,
name: state.apiTaskList[i].caseName,
name: state.apiTaskList[i].title,
projectId: props.projectId,
projectTaskId: props.projectTaskId,
stageId: props.chooseStageId,
stageId: Number(props.chooseStageId),
type: 3,
})
.then(() => {
@@ -295,23 +283,19 @@ export default {
});
}
} else if (props.isLevel == 3) {
console.log(
"state api task list: %o-length: %o",
state.apiTaskList,
state.apiTaskList.length
);
for (let i = 0; i < state.apiTaskList.length; i++) {
console.log(
state.apiTaskList[i],
"state.apiTaskList[i].caseIdstate.apiTaskList[i].caseId"
);
addTempTask({
apiTask
.addTask({
courseId: state.apiTaskList[i].caseid,
duration: 0,
flag: true,
name: state.apiTaskList[i].caseName,
projectId: props.projectId,
projectTaskId: props.projectTaskId,
projectTemplateId: props.projectTemplateId,
stageId: props.chooseStageId,
type: 3,
})

View File

@@ -56,6 +56,7 @@
class="tag-style"
v-if="evaluationTypeName != ''"
:closable="true"
@close="delTag"
>{{ evaluationTypeName }}</a-tag
>
</span>
@@ -91,7 +92,7 @@
</div>
<div class="main_btns">
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="createEvalText">确定</button>
<button class="btn2" @click="creoredit">确定</button>
</div>
</div>
<EvList
@@ -150,11 +151,6 @@ export default {
type: Number,
default: null,
},
projectTaskId: {
// 要编辑的projectId
type: Number,
default: null,
},
routerId: {
type: Number,
default: null,
@@ -184,6 +180,10 @@ export default {
ctx.emit("update:addevalVisible", false);
ctx.emit("update:edit", false);
state.inputV1 = "";
state.time = undefined;
state.description = "";
(state.evaluationTypeId = 0),
(state.evaluationTypeName = ""),
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};
@@ -195,6 +195,12 @@ export default {
const showEvalDrawer = () => {
state.EvalListVisible = true;
};
//删除标签要清除子组件传过来的参数
const delTag = () => {
state.evaluationTypeId = 0;
state.evaluationTypeName = "";
};
//向关卡或阶段渲染
const updateTask = (value) => {
if (props.isLevel == 1) {
RouterEditTask({
@@ -269,9 +275,49 @@ export default {
dayjs(res.data.data.evaluationEndTime, "YYYY-MM-DD"),
];
})
.catch(() => {
.catch((err) => {
message.destroy();
message.error("获取测量平信息失败");
console.log(err, "erererrerererererer");
});
};
const creoredit = () => {
if (props.edit) {
editInvistText();
} else {
createEvalText();
}
};
const editInvistText = () => {
if (!state.inputV1) {
message.destroy();
return message.info("请输入测评名称");
}
if (!state.evaluationTypeId) {
message.destroy();
return message.info("请选择测评");
}
let objei = {
evaluationName: state.inputV1,
evaluationEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
evaluationId: props.edit ? Number(props.EditEvalId) : 0,
evaluationStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
evaluationTypeId: state.evaluationTypeId,
evaluationTypeName: state.evaluationTypeName,
evaluationFlag: "",
evaluationPictureAddress: "",
evaluationTag: "",
updateTime: "",
};
api
.updateEvaluation(objei)
.then((res) => {
updateTask(res.data.data);
closeDrawer();
ctx.emit("changeData", false);
})
.catch((err) => {
console.log(err, "errrrrrrrrrrrrrrrrrrrrr");
});
};
//创建测评信息
@@ -287,7 +333,7 @@ export default {
let obj = {
evaluationName: state.inputV1,
evaluationEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
evaluationId: props.edit ? props.evaluationId : 0,
evaluationId: props.evaluationId,
evaluationStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
evaluationTypeId: state.evaluationTypeId,
evaluationTypeName: state.evaluationTypeName,
@@ -314,9 +360,12 @@ export default {
afterVisibleChange,
checkFinish,
closeDrawer,
delTag,
//增改
creoredit,
createEvalText,
queryInvistById,
editInvistText,
showEvalDrawer,
updateTask,
};

View File

@@ -213,8 +213,6 @@
</template>
<script>
import { reactive, toRefs } from "vue";
import * as apiTask from "../../api/indexTaskadd";
import { RouterEditTask } from "@/api/indexTask";
import { message } from "ant-design-vue";
import * as apiProj from "../../api/index.js";
@@ -285,100 +283,13 @@ export default {
sameModal: false,
sameCopy: false,
sameProj: null,
tableData: [
{
key: 1,
parentId: 1,
name: "123",
manager: "afssfa",
children: [
{
key: 5,
parentId: 1,
name: "123",
manager: "afssfa",
},
],
},
{
key: 2,
parentId: 2,
name: "123",
manager: "afssfa",
children: [
{
key: 7,
parentId: 1,
name: "123",
manager: "afssfa",
children: [
{
key: 9,
parentId: 1,
name: "123",
manager: "afssfa",
},
],
},
],
},
{
key: 3,
parentId: 3,
name: "123",
manager: "afssfa",
},
],
selectedRowKeys: [],
selectedRows: [],
currentPage: 1,
tableDataTotal: 0,
pageSize: 10,
//项目抽屉、列表参数
drawertableData: [
{
key: 1,
parentId: 1,
name: "123",
manager: "afssfa",
children: [
{
key: 5,
parentId: 1,
name: "123",
manager: "afssfa",
},
],
},
{
key: 2,
parentId: 2,
name: "123",
manager: "afssfa",
children: [
{
key: 7,
parentId: 1,
name: "123",
manager: "afssfa",
children: [
{
key: 9,
parentId: 1,
name: "123",
manager: "afssfa",
},
],
},
],
},
{
key: 3,
parentId: 3,
name: "123",
manager: "afssfa",
},
],
drawertableData: [],
});
const tableDataFunc = () => {
@@ -524,6 +435,7 @@ export default {
state.selectedRows.forEach((item) => {
let origin = JSON.parse(props.chooseProjectList);
console.log("ccxx", origin);
if (origin.length == 0) {
//可以直接添加到任务列表里
updateTask(item);
@@ -563,18 +475,6 @@ export default {
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
apiTask.addTask({
courseId: res.data.data.discussId,
duration: res.data.data.discussExplain,
name: res.data.data.discussName,
projectId: props.projectId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId,
type: 13,
});
} else if (props.isLevel == 3) {
console.log("");
}
};
const onSelectChange = (selectedRowKeys, selectRow) => {
@@ -616,7 +516,6 @@ export default {
showSameModal,
closeSameModal,
sureSameModal,
// rowSelection,
};
},
};

View File

@@ -29,7 +29,6 @@
/>
</div>
</div>
</div>
<div class="mi_btns">
<div class="btn btn1">
@@ -42,7 +41,6 @@
</div>
</div>
</div>
<div class="main_table">
<a-table
style="border: 1px solid #f2f6fe"

View File

@@ -399,16 +399,17 @@ export default {
array.push(obj)
})
state.tabledata = array
ListOpera();
}
//获取任务管理列表
const getManageList = () => {
let obj = {
name: "",
// name: "",
pageNo: state.pageNo,
pageSize: state.pageSize,
projectId: 27,
// projectId: 27,
projectTaskId: props.projectTaskId,
status: -1,
status: 0,
};
api
.taskStudentList(obj)
@@ -425,12 +426,12 @@ export default {
//搜索任务列表
const searchTaskList = () => {
let objser = {
name: "",
// name: "",
pageNo: state.pageNo,
pageSize: state.pageSize,
projectId: 27,
// projectId: 27,
projectTaskId: props.projectTaskId,
status: -1,
status: 0,
};
if (state.name !== "" || state.projectName !== "") {
api

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: "管理权",
},
// {
// 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;
@@ -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

@@ -559,8 +559,6 @@ export default {
//获取选中部门的人员信息
const getPeoples = () => {
let obj = {
keyWord: "",
id: 0,
org: state.selectedKeys[0],
pageNo: state.currentPage,
pageSize: state.pageSize,
@@ -569,7 +567,7 @@ export default {
state.tableDataTotal = 0;
return;
}
// console.log("obj", obj);
console.log("obj", obj);
api
.getMemberInfo(obj)
.then((res) => {

View File

@@ -254,6 +254,7 @@ export default {
.queryExaminationPaper(obj)
.then((res) => {
getTableDate(res.data.data);
message.success("获取选择考试列表成功");
})
.catch(() => {
message.destroy();

View File

@@ -126,6 +126,8 @@
<button class="btn2">确定</button>
</div>
</div>
<!-- 查看答卷抽屉 -->
<CQue v-model:CQvisible="CQvisible"/>
</a-drawer>
</template>
@@ -133,8 +135,12 @@
import { toRefs, reactive } from "vue";
import { message } from 'ant-design-vue';
import * as api from "../../api/index";
import CQue from './CheckQue.vue'
export default {
name: "TestManage",
components: {
CQue,
},
props: {
TMvisible: {
type: Boolean,
@@ -158,6 +164,7 @@ export default {
const state = reactive({
name: null,
open: false,
CQvisible:false, //查看答卷抽屉
pageNo: 1,
pageSize: 10,
currentPage: 1,
@@ -182,15 +189,15 @@ export default {
],
tabledata: [
{
workNum:1,
key:1,
status:"已完成",
operation:"",
},
{
workNum:1,
key:2,
status:"未完成",
operation:"",
}
},
],
selectedRowKeys:[],
});
@@ -325,20 +332,16 @@ export default {
title: "操作",
dataIndex: "operation",
key: "operation",
width: 60,
width: 90,
align: "center",
className: "h",
},
]
return columns;
}
};
//考试管理列表操作
const ListOpera = () => {
let arr = state.tabledata;
if(props.itemsType == 5){
arr.map((value) => {
if(value.status == '已完成'){
value.operation = (
@@ -354,7 +357,7 @@ export default {
class="operation"
style="cursor:pointer;margin-right:10px;"
onClick={() => {
console.log('123')
state.CQvisible = true
}}
>
查看
@@ -382,7 +385,6 @@ export default {
);
}
})
}
};
ListOpera();
const onSelect = (record) => {
@@ -398,7 +400,6 @@ export default {
if ( bol == true ) {
getManageList();
}
};
const selectProjectName = (value, index) => {
console.log("value", value, index);
@@ -438,12 +439,12 @@ export default {
//获取任务管理列表
const getManageList = () => {
let obj = {
name: "",
// name: "",
pageNo: state.pageNo,
pageSize: state.pageSize,
projectId: 27,
// projectId: 27,
projectTaskId: props.projectTaskId,
status: -1,
status: 0,
};
api
.taskStudentList(obj)
@@ -461,12 +462,12 @@ export default {
//搜索任务列表
const searchTaskList = () => {
let objser = {
name: "",
// name: "",
pageNo: state.pageNo,
pageSize: state.pageSize,
projectId: 27,
// projectId: 27,
projectTaskId: props.projectTaskId,
status: -1,
status: 0,
};
if (state.name !== "" || state.projectName !== "") {
api

View File

@@ -364,36 +364,37 @@ export default {
//获取任务管理列表
const getManageList = () => {
let obj = {
name: "",
// name: "",
pageNo: state.pageNo,
pageSize: state.pageSize,
projectId: 27,
// projectId: 27,
projectTaskId: props.projectTaskId,
status: -1,
status: 0,
};
api
.taskStudentList(obj)
.then((res) => {
state.pageNo = res.data.data.pageNo;
state.pageSize = res.data.data.pageSize;
state.pageSize = res.data.data.pageSize;
for (let i = 0; i < res.data.data.rows.length; i++) {
state.tabledata.push(res.data.data.rows[i].userInfoBo);
}
ListOpera();
})
.catch(() => {
.catch((err) => {
console.log(err,'sss');
});
};
//搜索任务列表
const searchTaskList = () => {
let objser = {
name: "",
// name: "",
pageNo: state.pageNo,
pageSize: state.pageSize,
projectId: 27,
// projectId: 27,
projectTaskId: props.projectTaskId,
status: -1,
status: 0,
};
if (state.name !== "" || state.projectName !== "") {
api

View File

@@ -323,12 +323,12 @@ export default {
//获取任务管理列表
const getManageList = () => {
let obj = {
name: "",
// name: "",
pageNo: state.pageNo,
pageSize: state.pageSize,
projectId: 27,
// projectId: 27,
projectTaskId: props.projectTaskId,
status: -1,
status: 0,
};
api
.taskStudentList(obj)
@@ -347,12 +347,12 @@ export default {
//搜索任务列表
const searchTaskList = () => {
let objser = {
name: "",
// name: "",
pageNo: state.pageNo,
pageSize: state.pageSize,
projectId: 27,
// projectId: 27,
projectTaskId: props.projectTaskId,
status: -1,
status: 0,
};
if (state.name !== "" || state.projectName !== "") {
api

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:35:53
* @FilePath: /fe-manage/src/views/courselibrary/CourseManage.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -13,8 +13,10 @@
id="iframe"
style="width: 100%; height: 100%"
:src="iframeUrl + '/course/coursewares'"
frameborder="0"
name="myframe"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
security="restricted"
sandbox=""
></iframe>
</div>
</template>

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 -->
@@ -646,7 +646,11 @@ import QueryRight from "../../components/drawers/QueryRight";
import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1";
import { message } from "ant-design-vue";
import { toDate, commonData } from "../../api/method";
import {
toDate,
commonData,
// setCookie
} from "../../api/method";
import { storage } from "../../api/storage";
export default {
name: "learningPath",
@@ -858,6 +862,8 @@ export default {
lpLoading: false,
learnBgMore: false, //是否显示更多学习路径背景
selectPathId: null, //选择的
});
const selectProjectName = (value, index) => {
console.log("value", value, index);
@@ -1035,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;
@@ -1228,7 +1235,7 @@ export default {
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showPower();
showPower(text.record.id);
}}
>
权限名单
@@ -1642,6 +1649,9 @@ export default {
onMounted(() => {
// console.log("执行");
getLearnPath();
// let cookie =
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkzNjI4OTAsImV4cCI6MTY2OTM3MDA5MCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.2e68ae110cf0e8f157d8312301c0ca8104d6ec2a2a294052d5497c06019ed3d8";
// setCookie("token", cookie, 10);
});
return {

View File

@@ -263,6 +263,9 @@
<add-case
v-model:addcaseVisible="addcasevisible"
@changeData="updateTableData"
:isLevel="isLevel"
v-model:isactive="isactive"
v-model:routerId="routerId"
v-model:edit="edit"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
@@ -420,10 +423,13 @@
:isLevel="isLevel"
@changeData="updateTableData"
v-model:isactive="isactive"
v-model:routerTaskId="routerTaskId"
v-model:edit="edit"
v-model:routerId="routerId"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
v-model:projectTaskId="projectTaskId"
v-model:EditEvalId="EditEvalId"
v-model:routerTaskId="routerTaskId"
/>
</div>
<!-- 添加测评侧弹窗 -->
@@ -1039,7 +1045,7 @@ import { deleteStudyTask } from "../../api/indexStudy";
import draggable from "vuedraggable";
import { editTask } from "../../api/indexTaskadd";
import { RouterEditTask } from "@/api/indexTask";
// import { RouterEditTask } from "@/api/indexTask";
import { toDate } from "../../api/method";
import UnlockMode from "../../components/drawers/UnlockMode.vue";
@@ -1165,55 +1171,9 @@ export default {
},
],
//项目抽屉、列表参数
drawertableData: [
{
key: 1,
parentId: 1,
name: "123",
manager: "afssfa",
children: [
{
key: 5,
parentId: 1,
name: "123",
manager: "afssfa",
},
],
},
{
key: 2,
parentId: 2,
name: "123",
manager: "afssfa",
children: [
{
key: 7,
parentId: 1,
name: "123",
manager: "afssfa",
children: [
{
key: 9,
parentId: 1,
name: "123",
manager: "afssfa",
},
],
},
],
},
{
key: 3,
parentId: 3,
name: "123",
manager: "afssfa",
},
],
selectedProjRowKeys: [],
currentPage: 1,
tableDataTotal: 0,
pageSize: 10,
visible: false,
//项目
editproj: false,
addprojvisible: false,
@@ -1465,10 +1425,6 @@ export default {
state.EditProjectId = id;
state.routerTaskId = eleId;
};
//关闭项目抽屉
const leaveProjDrawer = () => {
state.addprojvisible = false;
};
//tableData数据赋值方法
const dataAssignment = (id) => {
console.log(state.level);
@@ -1927,30 +1883,6 @@ export default {
state.removeStageId = option.chapterId;
};
//添加关卡项目
const updateTask = () => {
RouterEditTask({
duration: 0,
flag: true,
chapterId: state.isactive,
courseId: Number(state.projId),
name: state.projName,
routerId: state.routerId,
routerTaskId: state.routerTaskId,
type: 13,
})
.then(() => {
message.success(`${state.editproj ? "编辑" : "新增"}关卡任务成功`);
// ctx.emit("changeData", false);
leaveProjDrawer();
state.addLoading = false;
})
.catch(() => {
message.destroy();
message.error("添加关卡任务失败");
});
};
//显示切换模式抽屉
const showModeVisible = () => {
state.unlockModeVisible = true;
@@ -1984,7 +1916,6 @@ export default {
showDrawerAddLive,
showDrawerAddRef,
showDrawerAddProj,
leaveProjDrawer,
closeDeleteModel,
clearEditData,
showDrawerAddDiscuss,
@@ -2001,7 +1932,6 @@ export default {
closeChangeModal,
handleChangeStage,
updateTask,
showDeleteChapter,
closeDeleteChapter,

View File

@@ -272,13 +272,14 @@
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="公告" force-render>
<div class="notice">
<div class="split"></div>
<div class="ntc_tit"><span>公告</span></div>
<hr color="#E8E8E8" />
<a-tabs v-model:activeKey="activeKeyNotice">
<a-tab-pane key="11" tab="公告">
<div class="notice">
<div class="ntc_body">
<div class="ntc_switch">
<a-switch v-model:checked="checked" @click="changeopclo" />
<a-switch size="small" v-model:checked="checked" @click="changeopclo" />
<div
class="opclo"
:style="{ display: hideshow ? 'block' : 'none' }"
@@ -316,6 +317,10 @@
</div>
</div>
</a-tab-pane>
</a-tabs>
</a-tab-pane>
<a-tab-pane key="3" tab="项目积分">
<div class="split"></div>
<div class="projectscore">
@@ -326,7 +331,7 @@
<div class="pjc_body">
<div class="groupright">
<div class="spandiv"><span class="spantext">规则</span></div>
<div v-if="edit" class="btns">
<div v-if="edit" class="btns" style="display:none">
<div class="btn1" @click="edit = !edit">
<img src="../../assets/images/projectadd/edit1.png" />
<span class="btn1text">编辑</span>
@@ -1607,7 +1612,7 @@ export default defineComponent({
}
.ntc_body {
margin-left: 34px;
margin-left: 65px;
margin-right: 34px;
.ntc_switch {
display: flex;

View File

@@ -195,7 +195,7 @@
tree-default-expand-all
:tree-data="classifyList2"
:fieldNames="{
children: 'children',
children: 'treeChildList',
label: 'name',
value: 'id',
}"
@@ -769,6 +769,7 @@ export default {
{ value: 2, label: "将小米" },
{ value: 3, label: "刘孟君" },
]);
//获取
//选择处理项目经理
let manager = "";

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 = () => {

View File

@@ -1988,11 +1988,9 @@ export default {
//打开测评的弹窗
const showEditEvalDrawer = (id, eleId) => {
console.log("222222222222222222222", id);
state.addevalvisible = true;
state.projectTaskId = eleId;
state.EditRefId = id;
console.log(state.EditRefId);
state.EditEvalId = id;
};
//编辑的按钮
const decideType = (type, id, eleId) => {
@@ -2020,6 +2018,8 @@ export default {
showDrawerOnline(id, eleId);
} else if (type == "面授") {
showDrawerFaceteach(id, eleId);
} else if (type == "案例") {
showDrawerAddCase(id, eleId);
}
};
const showdeAll = () => {