Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop

This commit is contained in:
wyx
2022-12-10 15:33:33 +08:00
15 changed files with 866 additions and 196 deletions

View File

@@ -1,17 +1,29 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-09 09:26:26
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-10 15:22:22
* @FilePath: /fe-manage/public/index.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="">
<head>
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>京东方大学堂</title> <title>京东方大学堂</title>
</head> </head>
<body>
<body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html> </html>

8
src/api/ThirdApi.js Normal file
View File

@@ -0,0 +1,8 @@
export const BASE = 'https://pre.boe.com'
export const BASE_DEV = 'https://u-pre.boe.com'
export const USER_LIST = '/userbasic/user/list post'
export const ORG_LIST = '/userbasic/org/list post'
export const ORG_CHILD_LIST = '/userbasic/org/info post'
export const AUDIENCE_LIST = '/userbasic/audience/list post'

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52 * @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-09 18:11:04 * @LastEditTime: 2022-12-10 10:37:11
* @FilePath: /fe-manage/src/api/config.js * @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@@ -56,7 +56,7 @@ http.interceptors.response.use(
return response; return response;
} else { } else {
if (code === 1000) { if (code === 1000) {
window.open("https://u-pre.boe.com/web/", '_self'); // window.open("https://u-pre.boe.com/web/", '_self');
// window.open("http://111.231.196.214:12013/manage/login", '_self'); // window.open("http://111.231.196.214:12013/manage/login", '_self');
} }
console.log("api %o", msg); console.log("api %o", msg);

View File

@@ -44,7 +44,7 @@ import qs from "qs";
//上传文件 //上传文件
export const uploadFile = (obj) => export const uploadFile = (obj) =>
http.post("/test/testRequest", qs.stringify({ obj })); http.post("/test/testRequest", qs.stringify({obj}));
// 接口-请求 // 接口-请求
@@ -56,7 +56,7 @@ export const getLearnPath = (obj) => http.post("/admin/router/list", obj);
export const handleLearnPath = (obj) => http.post("/admin/router/handle", obj); export const handleLearnPath = (obj) => http.post("/admin/router/handle", obj);
//获取路径图统计数据 //获取路径图统计数据
export const getLearnCount = (routerId) => export const getLearnCount = (routerId) =>
http.get("/admin/router/getCount", { params: { routerId: routerId } }); http.get("/admin/router/getCount", {params: {routerId: routerId}});
//新建或编辑关卡 //新建或编辑关卡
export const editChapter = (obj) => http.post("/admin/router/editChapter", obj); export const editChapter = (obj) => http.post("/admin/router/editChapter", obj);
@@ -92,7 +92,6 @@ export const billboard = (obj) => http.post("/admin/project/billboard", obj);
//项目基础信息----------------------------------- //项目基础信息-----------------------------------
//课程---------------------------------------------- //课程----------------------------------------------
// //提交审核 // //提交审核
@@ -121,7 +120,7 @@ export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm
//获取学员列表 //获取学员列表
export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', obj) export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', obj)
//获取用户登录 //获取用户登录
export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true }) export const getUser = () => http.post('/admin/CheckUser/login', {withCredentials: true})
//公共信息--------------------------------------------------- //公共信息---------------------------------------------------
//添加项目学员 //添加项目学员
@@ -131,6 +130,7 @@ export const addStudentCourse = (obj) => http.post("/admin/offcourse/addStudent"
// 获取组织结构树 // 获取组织结构树
export const orgtree = () => http.get("/org/tree"); export const orgtree = () => http.get("/org/tree");
export const saveStu = obj => http.post("/admin/student/addStudent", obj);
//获取积分列表 //获取积分列表
export const noticeList = (projectId) => export const noticeList = (projectId) =>

View File

@@ -1,4 +1,5 @@
import * as api from './index1' import * as api from './index1'
function formatNumber(n) { function formatNumber(n) {
n = n.toString(); n = n.toString();
return n[1] ? n : "0" + n; return n[1] ? n : "0" + n;
@@ -192,31 +193,33 @@ const setCookie = (name, value, perpetual) => {
//先写一个方法 //先写一个方法
function getCookie(name) { function getCookie(name) {
return document.cookie?.split(";").find(e => e.includes(name)).replace(`${name}=`,'') || ''
//1.获取cookie字符串 //1.获取cookie字符串
var cookies = document.cookie; // const cookies = document.cookie;
//通过;来分割字符串 // console.log('cookies',cookies)
var cookie = cookies.split("; "); // //通过;来分割字符串
// console.log('cookie', cookie) // const cookie = cookies.split(";");
//遍历,使键值对匹配上 // // console.log('cookie', cookie)
for (var i = 0; i < cookie.length; i++) { // //遍历,使键值对匹配上
var arr = cookie[i].split("token="); // for (var i = 0; i < cookie.length; i++) {
// console.log('arr', arr) // var arr = cookie[i].split("token=");
console.log('name', name) // // console.log('arr', arr)
// if (arr[0] == name) { // console.log('name', name)
// console.log('arr[1]', arr[1]) // // if (arr[0] == name) {
// return arr[1]; // // console.log('arr[1]', arr[1])
// // return arr[1];
// // }
// // console.log('arr[1]', arr[1])
// return arr[1]
// } // }
// console.log('arr[1]', arr[1]) // return "";
return arr[1]
}
return "";
} }
//滚动加载信息 //滚动加载信息
const scrollLoad = (e) => { const scrollLoad = (e) => {
// console.log("滚动", e, b); // console.log("滚动", e, b);
const { target } = e; const {target} = e;
const scrllHeight = target.scrollHeight - target.scrollTop; const scrllHeight = target.scrollHeight - target.scrollTop;
const clientHeight = target.clientHeight; const clientHeight = target.clientHeight;
// console.log("scrllHeight", scrllHeight, clientHeight); // console.log("scrllHeight", scrllHeight, clientHeight);
@@ -226,6 +229,7 @@ const scrollLoad = (e) => {
return 2 return 2
} }
}; };
//添加归属权 //添加归属权
function changeOwnership(classify, selectProjectId, selectPeopleArr) { function changeOwnership(classify, selectProjectId, selectPeopleArr) {
let obj = { let obj = {

169
src/api/request.js Normal file
View File

@@ -0,0 +1,169 @@
import {reactive, ref, toRefs, watch} from "vue";
import axios from 'axios';
import {getCookie} from "@/api/method";
export function useBoeApiPage(_url, params = {}, config = {
init: true,
result: res => res.result,
totalPage: res => res.result.totalPage,
total: res => res.result.totalElement
}) {
const state = reactive({
data: [],
loading: false,
page: 1,
pageSize: 10,
totalPage: 0,
total: 0
})
function fetch() {
console.log('params', params)
state.loading = true
return request(_url, params).then(r => {
state.data = config.result(r)
state.totalPage = config.totalPage(r)
state.total = config.total(r)
state.loading = false
state.page = params.page
})
}
config.init && fetch()
return {
...toRefs(state),
fetch,
};
}
export function useBoeApi(_url, params = {}, config = {
init: true,
result: res => res.result,
}) {
const state = reactive({
data: [],
loading: false,
})
watch(() => params, () => {
fetch()
})
function fetch() {
state.loading = true
return request(_url, params).then(r => {
state.data = config.result(r)
state.loading = false
})
}
config.init && fetch()
return {
...toRefs(state),
fetch,
};
}
export function usePage(_url, params = {}, init = true) {
const state = reactive({
data: [],
loading: false
})
watch(params, () => {
fetch()
})
function fetch() {
state.loading = true
return request(_url, params).then(r => {
console.log('fetch')
console.log(r)
state.data = r.result
state.loading = false
})
}
init && fetch()
return {
...toRefs(state),
fetch,
};
}
export function useRequest(_url, params = {}, init = true) {
const data = ref({})
const loading = ref(false)
watch(params, () => {
fetchData()
})
function fetchData() {
loading.value = true
request(_url, params).then(r => {
data.value = r
loading.value = false
})
}
init && fetchData()
return {
data,
loading,
fetchData,
};
}
export async function request(_url, params) {
const s = _url.split(' ')
let url = s[0]
const method = s[1] || 'get'
if (method === 'get') {
let paramsArray = [];
//拼接参数
if (params) {
Object.keys(params).forEach(key => paramsArray.push(key + '=' + params[key]))
if (url.search(/\?/) === -1) {
url += '?' + paramsArray.join('&')
} else {
url += '&' + paramsArray.join('&')
}
}
}
const body = method !== 'get' ? params || {} : {}
console.log('token', getCookie('token'))
return axios({
url,
method,
headers: {
token: getCookie('token'),
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
},
baseURL: '',
...method !== 'get' ? {data: JSON.stringify(body)} : {}
}).then(resp => resp.data).then(response => {
console.log(response)
// if (response.status !== 200 && response.code !== 0) {
// if (response.code === 3 || response.code === 4 || response.code === 100) {
// router.push({path: '/login'})
// return
// } else {
// response.showMsg && notification.open({
// message: response.showMsg,
// duration: 2,
// });
// return
// }
// }
return response
}).catch(e => {
console.log(2222)
console.log(e)
// router.push({path: '/login'})
})
}

View File

@@ -29,13 +29,16 @@
</div> </div>
<span style="margin-right: 3px">课程名称</span> <span style="margin-right: 3px">课程名称</span>
</div> </div>
<div class="btnbox"> <div class="btnbox" style="position: relative">
<a-input <a-input
v-model:value="courseName" v-model:value="courseName"
style="width: 384px; height: 32px" style="width: 423px; height: 32px"
placeholder="请输入名称" placeholder="请输入名称最多输入20个字"
:maxlength="20" :maxlength="20"
/> />
<div class="inp_num" style="position: absolute; right: 115px">
<span style="color: #c7cbd2"> {{ courseName.length }}/20 </span>
</div>
</div> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
@@ -95,7 +98,7 @@
</div> </div>
<span style="margin-right: 3px">授课教师</span> <span style="margin-right: 3px">授课教师</span>
</div> </div>
<div class="btnbox"> <div class="btnbox" style="width: 423px">
<!-- <a-auto-complete placeholder="选择老师" :value="memberValue.label" style="width: 364px"--> <!-- <a-auto-complete placeholder="选择老师" :value="memberValue.label" style="width: 364px"-->
<!-- :options="options" @change="handleChange2" @search="handleSearch"></a-auto-complete>--> <!-- :options="options" @change="handleChange2" @search="handleSearch"></a-auto-complete>-->
<ProjectManager <ProjectManager
@@ -358,7 +361,9 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-tag closable color="processing" @close="logT"> <a-tag closable color="processing" @close="logT">
<span style="font-size: 14px; line-height: 33px">{{testName}}</span> <span style="font-size: 14px; line-height: 33px">{{
testName
}}</span>
</a-tag> </a-tag>
</div> </div>
</div> </div>
@@ -405,8 +410,8 @@ import ProjectManager from "@/components/project/ProjectManagerNew";
import { detail } from "../../api/indexCourse"; import { detail } from "../../api/indexCourse";
import { queryAppraiseDetailById } from "../../api/indexInvist"; import { queryAppraiseDetailById } from "../../api/indexInvist";
import {queryWorkDetailById} from "@/api/indexWork"; import { queryWorkDetailById } from "@/api/indexWork";
import {queryExaminationDetailById} from "@/api/indexExam"; import { queryExaminationDetailById } from "@/api/indexExam";
export default { export default {
name: "AddFaceteach", name: "AddFaceteach",
components: { components: {
@@ -609,19 +614,22 @@ export default {
state.EditWorkId = result.homeWorkId; state.EditWorkId = result.homeWorkId;
state.assessmentId = result.evaluateId; state.assessmentId = result.evaluateId;
state.needEval = result.evaluateId; state.needEval = result.evaluateId;
detail({offcourseId:result.offcourseId}).then((res)=>{ detail({ offcourseId: result.offcourseId }).then((res) => {
state.chooseCourseName =res.data.data.name; state.chooseCourseName = res.data.data.name;
}); });
queryAppraiseDetailById({assessmentId:result.evaluateId}).then((res)=>{ queryAppraiseDetailById({ assessmentId: result.evaluateId }).then(
state.assessmentName =res.data.data.assessmentName; (res) => {
}); state.assessmentName = res.data.data.assessmentName;
queryWorkDetailById({workId:result.homeWorkId}).then((res)=>{ }
);
queryWorkDetailById({ workId: result.homeWorkId }).then((res) => {
state.workName = res.data.data.workName; state.workName = res.data.data.workName;
}); });
queryExaminationDetailById({ examinationId: result.testId }).then((res)=>{ queryExaminationDetailById({ examinationId: result.testId }).then(
(res) => {
state.testName = res.data.data.examinationName; state.testName = res.data.data.examinationName;
}); }
);
console.log("state=======", state); console.log("state=======", state);
}); });
}; };

View File

@@ -31,7 +31,8 @@
/> />
</div> </div>
</div> </div>
<div class="mii_ipt"> <!-- 2022-12-10注释 后面放开 李晓鸽 -->
<!-- <div class="mii_ipt">
<div class="ipt_name">课程分类</div> <div class="ipt_name">课程分类</div>
<div class="select"> <div class="select">
<a-select <a-select
@@ -44,7 +45,7 @@
showSearch showSearch
/> />
</div> </div>
</div> </div> -->
</div> </div>
<div class="mi_btns"> <div class="mi_btns">
<div class="btn btn1" @click="searchList()"> <div class="btn btn1" @click="searchList()">
@@ -98,7 +99,7 @@
<div class="pa"> <div class="pa">
<a-pagination <a-pagination
v-if="tableDataTotal > 10" v-if="tableDataTotal > 10"
showSizeChanger="true" :showSizeChanger="false"
showQuickJumper="true" showQuickJumper="true"
hideOnSinglePage="true" hideOnSinglePage="true"
:pageSize="pageSize" :pageSize="pageSize"
@@ -129,7 +130,7 @@
<div class="pa"> <div class="pa">
<a-pagination <a-pagination
v-if="tableDataTotal > 10" v-if="tableDataTotal > 10"
showSizeChanger="true" :showSizeChanger="false"
showQuickJumper="true" showQuickJumper="true"
hideOnSinglePage="true" hideOnSinglePage="true"
:pageSize="pageSize" :pageSize="pageSize"
@@ -159,7 +160,7 @@ import {
RouterEditTask, RouterEditTask,
IsExistence, IsExistence,
IsExistenceProject, IsExistenceProject,
IsExistenceProjectTemplate IsExistenceProjectTemplate,
} from "@/api/indexTask"; } from "@/api/indexTask";
import { addTempTask } from "../../api/indexTaskadd"; import { addTempTask } from "../../api/indexTaskadd";
export default { export default {
@@ -572,8 +573,9 @@ export default {
projectTaskId: props.projectTaskId || 0, projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0, stageId: props.chooseStageId || 0,
type: 1, type: 1,
}).then(res=>{ })
console.log(res) .then((res) => {
console.log(res);
console.log("模板项目中是否包含此在线课了", res); console.log("模板项目中是否包含此在线课了", res);
if (res.data.data.length) { if (res.data.data.length) {
let strdata = res.data.data; let strdata = res.data.data;
@@ -599,21 +601,26 @@ export default {
type: 1, type: 1,
}) })
.then((res) => { .then((res) => {
console.log('新增或者编辑在线课',res) console.log("新增或者编辑在线课", res);
message.destroy(); message.destroy();
message.success(`${props.edit ? "编辑" : "新增"}模板库任务成功`); message.success(
`${props.edit ? "编辑" : "新增"}模板库任务成功`
);
ctx.emit("changeData", false); ctx.emit("changeData", false);
closeDrawer(); closeDrawer();
}) })
.catch(() => { .catch(() => {
message.destroy(); message.destroy();
message.error(`${props.edit ? "编辑" : "新增"}模板库任务失败`); message.error(
`${props.edit ? "编辑" : "新增"}模板库任务失败`
);
});
}); });
})
} }
}).catch(err=>{
console.log(err)
}) })
.catch((err) => {
console.log(err);
});
} }
//if(state.addOnlineList.Target==undefined){ //if(state.addOnlineList.Target==undefined){
// closeDrawer(); // closeDrawer();

View File

@@ -69,7 +69,7 @@ export default {
onMounted(() => { onMounted(() => {
console.log("onMounted"); console.log("onMounted");
init() init();
}); });
function getMember() { function getMember() {

View File

@@ -8,7 +8,6 @@
v-model:value="managerArray" v-model:value="managerArray"
:placeholder="placeholder" :placeholder="placeholder"
:filterOption="false" :filterOption="false"
style="width: 440px;"
:options="isOpen?options:selectOptions" :options="isOpen?options:selectOptions"
allowClear allowClear
showSearch showSearch
@@ -20,6 +19,7 @@
@change="change" @change="change"
@blur="blur" @blur="blur"
:show-arrow="false" :show-arrow="false"
style="width: 100%"
> >
<template v-if="loading" #notFoundContent> <template v-if="loading" #notFoundContent>
<a-spin size="small"/> <a-spin size="small"/>

View File

@@ -0,0 +1,481 @@
<template>
<a-drawer
:visible="visiable"
class="drawerStyle ProjCheckship"
placement="right"
width="45%"
>
<div class="drawerMain" id="ProjCheckship">
<div class="header">
<div class="headerTitle">
{{ {1: '查看权', 2: '管理权', 3: '添加学员'}[type] || '' }}
</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div>
<div style="width:100%;display: grid;grid-template-columns: 750px auto;">
<div class="tabs">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane :key="1" tab="快速选人">
<div :style="{ height: screenHeight - 235 + 'px' }">
<div class="tab1">
<a-form-item label="姓名">
<a-input
v-model:value="nameSearch.keyword"
style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名"
/>
<a-button type="primary" @click="onSearchStu" style="margin-left: 20px;border-radius: 4px">
<template #icon>
<SearchOutlined/>
</template>
搜索
</a-button>
<a-button @click="resetStu" style="margin-left: 20px;border-radius: 4px">重置</a-button>
</a-form-item>
</div>
<div class="chooseLeft" style="display: grid;grid-template-columns: 250px auto">
<div :style="{ height: screenHeight - 235 + 'px' ,overflowY:'auto'}">
<a-tree
allow-clear
tree-default-expand-all
:tree-data="treeData"
:fieldNames="{
children: 'treeChildList',
key: 'id',
title: 'name',
value: 'name',
}"
@select="stuStuOrgSelect"
>
</a-tree>
</div>
<div class="tableBox tabb">
<a-table
:columns="stuColumns"
:data-source="stuData"
:pagination="stuPagination"
:loading="stuLoading"
row-key="id"
:row-selection="stuRowSelection"
/>
</div>
</div>
</div>
</a-tab-pane>
<a-tab-pane :key="2" tab="添加组织">
<div
:style="{ height: screenHeight - 235 + 'px' }"
>
<div class="tab2">
<a-form-item label="组织:">
<a-input
v-model:value="searchOrgName.keyword"
style="width: 230px; height: 40px; border-radius: 8px"
placeholder="请输入组织"
/>
<a-button type="primary" @click="searchOrg" style="margin-left: 20px;border-radius: 4px">
<template #icon>
<SearchOutlined/>
</template>
搜索
</a-button>
<a-button @click="resetOrg" style="margin-left: 20px;border-radius: 4px">重置</a-button>
</a-form-item>
</div>
<div class="boeTree">
<a-tree
:tree-data="searchOrgName.keyword ? orgData : treeData"
@select="onOrgSelectChange"
:fieldNames="{
children: 'treeChildList',
key: 'id',
title: 'name',
value: 'name',
}"
row-key="id"
:row-selection="orgRowSelection"
multiple
>
</a-tree>
<!-- <div>-->
<!-- <a-table-->
<!-- :columns="stuColumns"-->
<!-- :data-source="stuData"-->
<!-- :pagination="stuPagination"-->
<!-- :loading="orgLoading"-->
<!-- row-key="id"-->
<!-- :row-selection="stuRowSelection"-->
<!-- />-->
<!-- </div>-->
</div>
</div>
</a-tab-pane>
<a-tab-pane :key="3" tab="受众关联">
<div
:style="{ height: screenHeight - 235 + 'px' }"
>
<div>
<a-form-item label="受众名称:">
<a-input
v-model:value="audienceName.keyword"
style="width: 260px; height: 40px; border-radius: 8px"
placeholder="请输入受众名称"
/>
<a-button type="primary" @click="searchAudi" style="margin-left: 20px;border-radius: 4px">
<template #icon>
<SearchOutlined/>
</template>
搜索
</a-button>
<a-button @click="resetAudienceInfo" style="margin-left: 20px;border-radius: 4px">重置</a-button>
</a-form-item>
</div>
<div class="tableBox tabb">
<a-table
style="border: 1px solid #f2f6fe"
row-key="id"
:columns="audiColums"
:data-source="audiData"
:loading="audiLoading"
:pagination="auditPagination"
:row-selection="auditRowSelection"
/>
</div>
</div>
</a-tab-pane>
</a-tabs>
</div>
<div style="padding:100px 0 0 20px;display: grid;grid-template-rows: auto auto auto;">
<div>
<div style="margin-top: 20px">快速选人</div>
<a-tag :closable="true" color="#409eff" @close="stuDel(i)" v-for="(item,i) in selectsData.studentList"
:key="i" style="margin-top:20px">
{{ item.realName }}
</a-tag>
</div>
<div>
<div style="margin-top: 20px">组织添加</div>
<a-tag :closable="true" color="#409eff" @close="orgDel(i)" v-for="(item,i) in selectsData.deptList" :key="i"
style="margin-top:20px">
{{ item.name }}
</a-tag>
</div>
<div>
<div style="margin-top: 20px">受众添加</div>
<a-tag :closable="true" color="#409eff" @close="AuditDel(i)" v-for="(item,i) in selectsData.groupList"
:key="i" style="margin-top:20px">
{{ item.audienceName }}
</a-tag>
</div>
</div>
</div>
<div class="btnn">
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="submitAuth">确定</button>
</div>
</div>
</a-drawer>
</template>
<script setup>
import {computed, defineEmits, defineProps, onMounted, ref, watch} from "vue";
import {useStore} from "vuex";
import {request, useBoeApi, useBoeApiPage} from "@/api/request";
import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, USER_LIST} from "@/api/ThirdApi";
import {saveStu} from "@/api/index1";
const store = useStore();
const emit = defineEmits()
const props = defineProps({
type: Number,
visiable: {
type: Boolean,
default: false
},
})
const activeKey = ref(1)
const visiableState = ref(false)
const selectsData = ref({
studentList: [],
deptList: [],
groupList: []
})
const nameSearch = ref({
keyword: '',
departId: null,
page: 1,
pageSize: 10
})
const audienceName = ref({
keyword: '',
page: 1,
pageSize: 10
})
const searchOrgName = ref({
keyword: '',
page: 1,
pageSize: 10
})
const {
data: stuData,
fetch: searchStu,
page: stuPageNo,
pageSize: stuPageSize,
loading: stuLoading,
total: stuTotal
} = useBoeApiPage(USER_LIST, nameSearch.value, {
init: true,
result: res => res.result.userInfoList,
totalPage: res => res.result.totalPage,
total: res => res.result.totalElement
})
const {
data: orgData,
fetch: searchOrg,
loading: orgLoading
} = useBoeApi(ORG_LIST, searchOrgName.value)
const {
data: audiData,
fetch: searchAudi,
page: audiPageNo,
pageSize: audiPageSize,
loading: audiLoading,
total: audiTotal
} = useBoeApiPage(AUDIENCE_LIST, audienceName.value, {
init: true,
result: res => res.result.audienceList,
totalPage: res => res.result.totalPage,
total: res => res.result.totalElement
})
const stuColumns = ref([
{
title: "姓名",
dataIndex: "realName",
key: "realName",
width: 80,
align: "center",
className: "h",
ellipsis: true,
},
{
title: "工号",
dataIndex: "userNo",
key: "userNo",
width: 80,
align: "center",
className: "h",
ellipsis: true,
},
{
title: "归属组织",
dataIndex: "orgName",
key: "orgName",
width: 80,
align: "center",
className: "h",
ellipsis: true,
},
{
title: "部门",
dataIndex: "departName",
key: "departName",
width: 80,
align: "center",
className: "h",
ellipsis: true,
},
])
const audiColums = ref([{
title: "id",
dataIndex: "id",
key: "id",
width: 35,
align: "center",
className: "h",
},
{
title: "受众名称",
dataIndex: "audienceName",
key: "audienceName",
width: 30,
align: "left",
className: "h",
ellipsis: true,
},
{
title: "人数",
dataIndex: "totalMember",
key: "totalMember",
width: 30,
align: "center",
className: "h",
},
{
title: "类型",
dataIndex: "audienceType",
key: "audienceType",
width: 40,
align: "center",
className: "h",
},
])
const stuSelectKeys = ref([])
const orgSelectKeys = ref([])
const auditSelectKeys = ref([])
const screenHeight = ref(document.body.clientHeight)
const stuRowSelection = computed(() => ({
columnWidth: 20,
selectedRowKeys: stuSelectKeys.value,
onChange: onStuSelectChange,
preserveSelectedRowKeys: true,
}))
const orgRowSelection = computed(() => ({
columnWidth: 20,
selectedRowKeys: orgSelectKeys.value,
onChange: onOrgSelectChange,
preserveSelectedRowKeys: true,
}))
const stuPagination = computed(() => ({
total: stuTotal.value,
showSizeChanger: false,
current: stuPageNo.value,
pageSize: stuPageSize.value,
onChange: changePagination
}))
const auditPagination = computed(() => ({
total: audiTotal.value,
showSizeChanger: false,
current: audiPageNo.value,
pageSize: audiPageSize.value,
onChange: auditChangePagination
}))
const auditRowSelection = computed(() => ({
columnWidth: 20,
selectedRowKeys: auditSelectKeys.value,
onChange: onAuditSelectChange,
preserveSelectedRowKeys: true,
}))
onMounted(() => {
});
const closeDrawer = () => {
};
//获取组织树
const treeData = computed(() => {
return store.state.orgtreeList ? store.state.orgtreeList : [];
});
function onSearchStu() {
nameSearch.value.page = 1
searchStu()
}
function stuStuOrgSelect(e) {
nameSearch.value.departId = e.join('')
searchStu()
}
function stuDel(i) {
stuSelectKeys.value = stuSelectKeys.value.filter(e => e !== selectsData.value.studentList[i].id)
selectsData.value.studentList.splice(i, 1)
}
function AuditDel(i) {
auditSelectKeys.value = auditSelectKeys.value.filter(e => e !== selectsData.value.groupList[i].id)
selectsData.value.groupList.splice(i, 1)
}
function orgSelect(key, obj) {
console.log(obj)
request(ORG_CHILD_LIST, {orgId: null}).then(res => {
console.log(res.result)
})
}
function onStuSelectChange(e, l) {
stuSelectKeys.value = e
selectsData.value.studentList = l
}
function onOrgSelectChange(e, l) {
orgRowSelection.value = e
selectsData.value.deptList = l.selectedNodes
}
function onAuditSelectChange(e, l) {
auditSelectKeys.value = e
selectsData.value.groupList = l
}
const stuDepartmentSelect = (e) => {
nameSearch.value.orgId = e.join('')
searchStu()
};
//分页获取学员
const changePagination = (page) => {
nameSearch.value.page = page;
searchStu()
};
const auditChangePagination = (page) => {
console.log(1111111111)
console.log(page)
audienceName.value.page = page;
searchAudi()
};
//重置
const resetStu = () => {
deleteDepSelect();
nameSearch.value = {keyword: '', page: 1, pageSize: 10}
};
//清空选择部门信息
const deleteDepSelect = () => {
stuSelectKeys.value = []
};
//重置组织
const resetOrg = () => {
searchOrgName.value = {keyword: '', page: 1, pageSize: 10}
};
//重置受众
const resetAudienceInfo = () => {
audienceName.value = {keyword: '', page: 1, pageSize: 10}
};
//全部清除
const deleteAll = () => {
selectsData.value = {
studentList: [],
deptList: [],
groupList: []
}
};
//确定添加授权
const submitAuth = () => {
emit('update:visiable', false)
saveStu(selectsData.value)
};
</script>
<style>
.ant-btn-primary {
background-color: #409eff !important;
}
</style>

View File

@@ -626,7 +626,17 @@
<span style="color: #6f6f6f">{{ item.name }}</span> <span style="color: #6f6f6f">{{ item.name }}</span>
</div> --> </div> -->
<div class="file_name"> <div class="file_name">
<span style="color: #6f6f6f;width:140px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ item.slice(item.lastIndexOf('/')+1) }}</span> <span
style="
color: #6f6f6f;
width: 140px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
>{{ item.slice(item.lastIndexOf("/") + 1) }}</span
>
</div> </div>
<!-- 条件渲染 s --> <!-- 条件渲染 s -->
<!-- <div class="file_size"> <!-- <div class="file_size">
@@ -1281,7 +1291,7 @@
</div> </div>
<div class="pa"> <div class="pa">
<a-pagination <a-pagination
showSizeChanger="true" :showSizeChanger="false"
showQuickJumper="true" showQuickJumper="true"
hideOnSinglePage="true" hideOnSinglePage="true"
:pageSize="pageSize1" :pageSize="pageSize1"
@@ -1976,7 +1986,17 @@
<div class="file_img"></div> <div class="file_img"></div>
<div class="file_detail"> <div class="file_detail">
<div class="file_name"> <div class="file_name">
<span style="color: #6f6f6f;width:140px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ item.slice(item.lastIndexOf('/')+1) }}</span> <span
style="
color: #6f6f6f;
width: 140px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
>{{ item.slice(item.lastIndexOf("/") + 1) }}</span
>
</div> </div>
<!-- 条件渲染 s --> <!-- 条件渲染 s -->
<!-- <div class="file_size"> <!-- <div class="file_size">
@@ -3296,7 +3316,6 @@ export default defineComponent({
], ],
//在线面授管理学习记录 //在线面授管理学习记录
tableData3: [ tableData3: [
{ {
key: 1, key: 1,
projectName: "刘莉", projectName: "刘莉",
@@ -3432,7 +3451,7 @@ export default defineComponent({
value4: "", value4: "",
//选择线上还是面授 //选择线上还是面授
xzinputV1: "", xzinputV1: "",
valueE1:2, valueE1: 2,
valueE2: "", valueE2: "",
//确定面授 //确定面授
ft_eidt: false, ft_eidt: false,
@@ -4279,7 +4298,11 @@ export default defineComponent({
message.destroy(); message.destroy();
return message.warning("请输入必填项"); return message.warning("请输入必填项");
} }
console.log("state.bs_hs && state.valueE1 == 2",state.bs_hs , state.valueE1 == 2); console.log(
"state.bs_hs && state.valueE1 == 2",
state.bs_hs,
state.valueE1 == 2
);
if (state.valueE1 === 2) { if (state.valueE1 === 2) {
state.of_hs = false; state.of_hs = false;
@@ -5162,7 +5185,7 @@ export default defineComponent({
// size: file.size, // size: file.size,
// }); // });
// console.log(state.filesList); // console.log(state.filesList);
console.log(res.data.data) console.log(res.data.data);
state.filesList = [res.data.data]; state.filesList = [res.data.data];
// state.hasImgName = res.data.data; // state.hasImgName = res.data.data;
} }

View File

@@ -1884,6 +1884,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.d { .d {
// margin-top: 8px; // margin-top: 8px;
// color: #ff4e4e; // color: #ff4e4e;

View File

@@ -48,18 +48,6 @@
/> />
</div> </div>
</div> </div>
<div class="name">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">分类</div>
</div>
<div class="in select">
<ProjectClass v-model:value="projectInfo.category"></ProjectClass>
</div>
</div>
<div class="name flex-top"> <div class="name flex-top">
<div class="namebox" style="margin-top: 10px"> <div class="namebox" style="margin-top: 10px">
<img <img
@@ -68,36 +56,28 @@
/> />
<div class="inname">封面图</div> <div class="inname">封面图</div>
</div> </div>
<div class="in select" style="flex: 1"> <div class="in select" style="flex: 1;display: flex">
<a-select <div
:getPopupContainer=" :class="`box ${projectInfo.picUrl === src ? 'active' : ''}`"
(triggerNode) => { style="
return triggerNode.parentNode || document.body; width: 100px;
} height: 100px;
border-radius: 5px;
cursor: pointer;
position: relative;
overflow: hidden;
" "
v-model:value="picUrlName" v-for="(src, index) in projectPic"
dropdownClassName="dropdown-style" :key="index"
style="width: 440px" @click="() => (projectInfo.picUrl = src)"
placeholder="请选择" >
:options="projectPic"
@change="handleChangeSelect"
allowClear
></a-select>
<img <img
style=" style="
width: 100px; width: 100px;
height: 100px; height: 100px;
margin-top: 20px; margin-bottom: 4px;
border-radius: 8px; margin-right: 4px;
" " :src="src.value" alt="avatar"/>
v-if="projectInfo.picUrl"
:src="projectInfo.picUrl"
alt="avatar"
/>
<div class="i_bottom">
<span style="color: #999ba3">
高宽比为16:9 (:800*450) png或jpg图片
</span>
</div> </div>
</div> </div>
</div> </div>
@@ -156,54 +136,6 @@
></OrgClass> ></OrgClass>
</div> </div>
</div> </div>
<div class="name name2">
<div class="namebox">
<div class="inname" style="margin-top: 13px">项目说明</div>
</div>
<div class="in">
<a-textarea
v-model:value="projectInfo.remark"
style="height: 80px"
placeholder="请输入说明"
show-count
:maxlength="200"
:disabled="viewDetail ? true : false"
/>
</div>
</div>
<div class="name name2">
<div class="namebox">
<div class="inname">同步学习记录</div>
</div>
<div class="in">
<a-checkbox
v-model:checked="courseSyncFlag"
:disabled="viewDetail ? true : false"
><span
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
"
>同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span
></a-checkbox
>
<!-- <a-switch
v-model:checked="projectInfo.courseSyncFlag"
:checkedValue="1"
:unCheckedValue="0"
:disabled="viewDetail ? true : false"
><span
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
"
>同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span
></a-switch
> -->
</div>
</div>
<div class="name"> <div class="name">
<div class="namebox"> <div class="namebox">
<img <img
@@ -230,10 +162,6 @@
</div> </div>
<div class="name"> <div class="name">
<div class="namebox"> <div class="namebox">
<!-- <img-->
<!-- class="nameimg"-->
<!-- src="../../assets/images/basicinfo/asterisk.png"-->
<!-- />-->
<img <img
class="nameimg" class="nameimg"
src="../../assets/images/basicinfo/asterisk.png" src="../../assets/images/basicinfo/asterisk.png"
@@ -241,12 +169,6 @@
<div class="inname">是否BOEU实施</div> <div class="inname">是否BOEU实施</div>
</div> </div>
<div class="in"> <div class="in">
<!-- <a-switch
v-model:checked="projectInfo.boeFlag"
:checkedValue="1"
:unCheckedValue="0"
:disabled="viewDetail ? true : false"
></a-switch> -->
<a-radio-group <a-radio-group
v-model:value="projectInfo.boeFlag" v-model:value="projectInfo.boeFlag"
:disabled="viewDetail ? true : false" :disabled="viewDetail ? true : false"
@@ -256,6 +178,40 @@
</a-radio-group> </a-radio-group>
</div> </div>
</div> </div>
<div class="name name2">
<div class="namebox">
<div class="inname">同步学习记录</div>
</div>
<div class="in">
<a-checkbox
v-model:checked="courseSyncFlag"
:disabled="viewDetail ? true : false"
><span
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
"
>同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span
></a-checkbox
>
</div>
</div>
<div class="name name2">
<div class="namebox">
<div class="inname" style="margin-top: 13px">项目说明</div>
</div>
<div class="in">
<a-textarea
v-model:value="projectInfo.remark"
style="height: 80px"
placeholder="请输入说明"
show-count
:maxlength="200"
:disabled="viewDetail ? true : false"
/>
</div>
</div>
</div> </div>
<div class="template"> <div class="template">
<div class="name"> <div class="name">
@@ -569,7 +525,7 @@ export default {
} }
.active { .active {
border: 1px solid rgba(78, 166, 255, 1); border: 2px solid rgba(78, 166, 255, 1);
} }
.content { .content {

View File

@@ -1304,7 +1304,7 @@ export default {
title: "项目名称", title: "项目名称",
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
width: 280, width: 480,
// align: "center", // align: "center",
ellipsis: true, ellipsis: true,
// scopedSlots: { customRender: "action" }, //引入的插槽 // scopedSlots: { customRender: "action" }, //引入的插槽
@@ -1316,8 +1316,9 @@ export default {
{ {
title: "项目经理", title: "项目经理",
dataIndex: "manager", dataIndex: "manager",
ellipsis: true,
key: "manager", key: "manager",
width: 100, width: 300,
align: "center", align: "center",
}, },
{ {
@@ -1394,7 +1395,7 @@ export default {
dataIndex: "operation", dataIndex: "operation",
key: "operation", key: "operation",
width: 300, width: 300,
align: "center", align: "right",
fixed: "right", fixed: "right",
customRender: (value) => { customRender: (value) => {
// console.log("value", value.record.type, value.record.status); // console.log("value", value.record.type, value.record.status);