Merge branch 'dev0731' into 'master'

Dev0731

See merge request !99
This commit is contained in:
joshen
2023-08-08 19:00:05 +08:00
75 changed files with 29132 additions and 369 deletions

2
.env
View File

@@ -2,6 +2,8 @@
VUE_APP_BASE=/manage
# api项目基础url
VUE_APP_BASE_API=/manageApi
# systemApi
VUE_APP_SYS_API=/systemapi
#文件路径
VUE_APP_FILE_PATH=/upload/
# 代理url 本地调试,不可以用在其他地方

22375
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -28,14 +28,13 @@ import BreadCrumb from "@/components/BreadCrumb";
import zhCN from "ant-design-vue/es/locale/zh_CN";
import * as api1 from "@/api/index1";
import * as api2 from "@/api/index";
import {boeRequest} from "@/api/request";
import {USER_PERMISSION} from "@/api/ThirdApi";
import {request} from "@/api/request";
import {USER_PERMISSION, VALIDATE_TOKEN} from "@/api/apis";
const store = useStore();
const isLogin = ref(false);
console.log("版本3.1.1------------");
console.log("版本3.1.2------------");
// 监听关闭浏览器
@@ -43,7 +42,6 @@ let time1 = ref(0);
let time2 = ref(0);
onMounted(() => {
init()
window.addEventListener('beforeunload', e => beforeunloadHandler(e));
window.addEventListener('unload', e => unloadHandler(e));
})
@@ -53,18 +51,7 @@ function beforeunloadHandler() {
time1.value = new Date().getTime();
}
function init() {
getUserInfo();
getUserPermission();
initDict("content_type"); //内容分类
initDict("project_level"); //项目级别
initDict("project_sys"); //培训分类
initDict("project_pic"); //项目封面
initDict("router_pic"); //路径图封面
initDict("course_pic"); //课程封面
initDict("job_type"); //岗位
initDict("band"); //band
}
function unloadHandler() {
time2.value = new Date().getTime() - time1.value;
@@ -74,23 +61,6 @@ function unloadHandler() {
}
}
async function getUserInfo() {
const userInfo = await api2.userInfo();
store.commit("SET_USER", userInfo.data.data);
}
async function initDict(key) {
const list = await getDictList(key);
store.commit("SET_DICT", {key, data: list});
}
function getUserPermission(){
boeRequest(USER_PERMISSION,{permissionType:'PAGE'}).then(res=>{
store.commit("SET_PERMISSION", res.result.flatMap(t=>t?.permissionPageList.map(s=>s.url)));
})
}
const getDictList = (param) => api1.getDictTree({code: param,}).then((res) => res.data.data);
</script>
<style lang="scss">
#app {
@@ -109,6 +79,7 @@ const getDictList = (param) => api1.getDictTree({code: param,}).then((res) => re
text-align: center !important;
}
}
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
background: #f6f9fd;
}

View File

@@ -1,15 +1,19 @@
//学员列表带分页
export const USER_LIST_PAGE = "/userbasic/user/list post";
//学员列表 没有分页数据 只能通过名称检索 速度较快
export const USER_LIST = "/userbasic/user/searchList 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'
//当前用户可以查看的受众接口
export const AUDIENCE_LIST = "/userbasic/audience/userAudiencesFilter post";
export const USER_PERMISSION = "/userbasic/permission/listByUser post";
// export const USER_LIST_PAGE = "/userbasic/user/list post";
// //学员列表 没有分页数据 只能通过名称检索 速度较快
// export const USER_LIST = "/userbasic/user/searchList 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'
// //当前用户可以查看的受众接口
// export const AUDIENCE_LIST = "/userbasic/audience/userAudiences post";
// export const USER_PERMISSION = "/userbasic/permission/listByUser post";
export const CASE_PAGE = "/systemapi/xboe/m/boe/cases/pagelist post formData";
export const EXAM_PAPER_PAGE = "/systemapi/xboe/m/exam/paper/querylist post formData";
export const TEST_PAGE = "/api/b1/system/quiz/quiz-list post formData";
export const ONLINE_PAGE = "/systemapi/xboe/m/course/manage/pagelist post formData";
export const LOGOUT = "/userbasic/logout post";
export const REFRESH_TOKEN_API = "/userbasic/refreshToken";
export const ONLINE_COURSE_DEL = (id, courseId) => `/systemapi/xboe/school/study/course/delete-signup?id=${id}&couserId=${courseId} post`;

View File

@@ -23,3 +23,15 @@ export const WORK_DETAIL = workId => `/work/queryWorkDetailById?workId=${workId}
export const EXAM_DETAIL = examinationId => `/examination/queryExaminationDetailById?examinationId=${examinationId} post`;
//评估
export const ASSESSMENT_DETAIL = (assessmentId)=>`/assessment/queryAssessmentDetailById?assessmentId=${assessmentId} post`;
export const USER_LIST_PAGE = "/admin/thirdApi/user/list";
//学员列表 没有分页数据 只能通过名称检索 速度较快
export const USER_LIST = "/admin/thirdApi/user/list";
export const ORG_LIST = "/admin/thirdApi/org/list";
export const ORG_CHILD_LIST = "/admin/thirdApi/org/info";
export const AUDIENCE_LIST = "/admin/thirdApi/audience/userAudiences";
export const USER_PERMISSION = "/admin/thirdApi/permission/listByUser";
export const VALIDATE_TOKEN = "/admin/thirdApi/validateToken";
export const REFRESH_TOKEN = "/admin/thirdApi/refreshToken";
export const USER_INFO = "/admin/CheckUser/userInfo";

36
src/api/case.js Normal file
View File

@@ -0,0 +1,36 @@
import http from "./configSys";
import httpUserbase from './confign'
// 案例列表
export const RECOMMEND_PAGE = "/systemapi/xboe/m/boe/cases/recommend/page post";
//发起案例列表或案例管理列表
export const isTopList = (data) => http.post('/xboe/m/boe/cases/isTopList', data, {
headers: {
'Content-Type': 'multipart/form-data'
}
})
//下载失败数据
export const downloadErrorData = (params) => http.get('/xboe/m/boe/cases/recommend/download', { params })
//导入失败或成功返回的数据
export const downloadErrorRecords = (params) => http.get('/xboe/m/boe/cases/recommend/import-info', { params })
//案例推荐导入
// export const uploadCaseData = (data, config) => http({
// method: 'POST',
// url: '/xboe/m/boe/cases/recommend/import',
// data,
// ...config,
// headers: { "Content-Type": "multipart/form-data" },
// })
// 案例删除接口deleteResearch
export const deleteResearch = (params) => http.get("xboe/m/boe/cases/recommend/delete", { params });
// 案例信息下载接口
export const caseInfoDownload = (data) => http.post('xboe/m/boe/cases/recommend/info_download', data, { responseType: 'blob' })
// 案例撤回接口
export const rePushOrWithdraw = (data) => http.post('xboe/m/boe/cases/recommend/rePushOrWithdraw', data)
// 案例推荐
export const caseRecommend = (data) => http.post('/xboe/m/boe/cases/recommend/launch', data,{
timeout:20000
})
//案例推荐选人的查询列表
export const userList = (data) => httpUserbase.post('/user/list', data)

70
src/api/configSys.js Normal file
View File

@@ -0,0 +1,70 @@
import {message} from "ant-design-vue";
import axios from "axios";
import router from "@/router";
import Cookies from 'vue-cookies'
// import { getCookie } from '../api/method'
// const Qs = require("qs");
// axios.defaults.headers.post["Content-Type"] =
// "application/x-www-form-urlencoded";
// export const FILE_UPLOAD_URL = process.env.VUE_APP_BASE_API + '/file/upload'
// export const BATCH_IMPORT_SCORE = process.env.VUE_APP_BASE_API + '/admin/offcourse/batchImportScore'
axios.defaults.withCredentials = true;
const http = axios.create({
baseURL: process.env.VUE_APP_SYS_API,
timeout: 1000 * 15,
headers: {"Content-Type": "application/json",},
});
http.interceptors.request.use(
(config) => {
const token = Cookies.get("token")
if (token) {
config.headers.token = token; //测试1111
} else{
message.error('未获取到登录信息,请先登录')
}
return config;
},
(err) => {
console.log("登陆前拦截", err);
return Promise.reject(err);
}
);
http.interceptors.response.use(
(response) => {
// console.log('response', response)
const {
data: {code},
} = response;
if (code === 0 || code === 200) {
return response.data?response.data:response;
}
if(code==500){
return message.error('请求失败');
}
if(code==601){
message.error('token过期请重新登陆');
}
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)
return Promise.reject(response);
}
// show && message.error(msg);
// console.log("api %o", msg);
// return Promise.reject(response);
return response
},
function (error) {
if (error.message == "timeout of 1ms exceeded") {
message.destroy();
message.error("请求超时");
}
console.log("api error %o", error);
return message.error(error.message);
}
);
export default http;

View File

@@ -8,6 +8,7 @@
*/
import http from "./config";
import qs from "qs";
import {getCookieForName} from "@/api/method";
// import { getCookie } from '../api/method'
/**
* 接口传参数方式get
@@ -188,7 +189,7 @@ export const auditStudentBatch = (obj) => http.post('/admin/student/auditStudent
// //面授课批量导入成绩
export const batchImportScore = (obj) =>
http.post('/admin/student/importHomeWork', obj, {
headers: { "Content-Type": "multipart/form-data" },
headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") },
});
//数据导入状态
export const getImportStatus = (uuid) => http.get('/admin/student/getImportStatus', { params: { uuid: uuid } })
@@ -197,7 +198,7 @@ export const getImportStatus = (uuid) => http.get('/admin/student/getImportStatu
// export const exportHomeWork=(obj)=>http.get('admin/student/exportHomeWork',{params:obj})
// 面授课导入学员
export const FaceTeachImportStudent = (obj) => http.post('/admin/student/importStudent', obj, { headers: { "Content-Type": "multipart/form-data" } })
export const FaceTeachImportStudent = (obj) => http.post('/admin/student/importStudent', obj, { headers: { "Content-Type": "multipart/form-data" },token:getCookieForName("token") })
//成绩录入
export const updateStudent = (obj) => http.post('/admin/student/homeWorkScoreEntry', obj)
@@ -227,7 +228,7 @@ export const createExamination = (obj) => http.post('/examination/createExaminat
//催促考试
export const batchSendMessage = (obj) => http.post('/admin/taskmanage/batchSendMessage', obj)
// 外部考试导入成绩
export const ImportExternalExamScore = (obj) => http.post('/admin/external/exam/manage/importExternalExamScore', obj, { headers: { "Content-Type": "multipart/form-data" } })
export const ImportExternalExamScore = (obj) => http.post('/admin/external/exam/manage/importExternalExamScore', obj, { headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") } })
//分组
export const changeGroupByStudentId = (obj) => http.post('/admin/student/changeGroupByStudentId', obj)
//导入小组

128
src/api/indexAudience.js Normal file
View File

@@ -0,0 +1,128 @@
import http from "./confign";
//评估问题创建接口
export const createResearch = (obj) =>
http.post("/assessment/createAssessment", obj);
//删除评估基础信息
export const deleteResearch = (obj) =>
http.post("/assessment/deleteAssessment", obj, {
headers: { "Content-Type": "application/x-www-form-urlencoded" },
});
//选择题删除题干或选项接口-修改时删除
export const deleteChoiceQuestion = (obj) =>
http.post("/assessment/deleteChoiceQuestion", obj);
//问答题或评分题删除题干-修改时删除
export const deleteQuestionScAndQa = (obj) =>
http.post("/assessment/deleteQuestionScAndQa", obj);
//修改评估问题的接口
export const editResearchMessage = (obj) =>
http.post("/assessment/editAssessmentMessage", obj);
//评估信息编辑修改评估名称
export const editAssessmentName = (obj) =>
http.post("/assessment/editAssessmentName", obj);
//评估信息发布状态的接口
export const editReleaseStatus = (obj) =>
http.post("/assessment/editReleaseStatus", obj);
//根据ID查询评估基础信息详情
export const queryResearchDetailById = (obj) =>
http.post("/assessment/queryAssessmentDetailById", obj, {
headers: { "Content-Type": "application/x-www-form-urlencoded" },
});
//获取全部评估信息接口
export const queryResearchDetailList = (obj) =>
http.post("/assessment/queryAssessmentDetailList", obj);
//评估管理-管理-获取评估部分信息
export const queryAssessmentDetailList = (obj) =>
http.post("/assessment/queryAssessmentPartDetail", obj, {
headers: { "Content-Type": "application/x-www-form-urlencoded" },
});
// 请求组织接口
export const userGetUserOrg = (obj) => http.post('/user/getUserOrg', obj)
// 概览页面 tab头数据
export const boeuAllTotal = (obj) => http.get('/boeu/all/total', obj)
// 获取受众列表
export const getAudienceList = (obj) =>
http.post("/audience/list", obj, {
headers: { 'Content-Type':'application/json', },
});
// 停用受众
export const stopAudience = (obj) =>
http.post("/audience/stop", obj, {
headers: { 'Content-Type':'application/json', },
});
// 复制受众
export const copyAudience = (obj) =>
http.post("/audience/copy", obj, {
headers: { 'Content-Type':'application/json', },
});
// 删除受众
export const deleteAudience = (obj) =>
http.post("/audience/delete", obj, {
headers: { 'Content-Type':'application/json', },
});
// 发布、启用受众
export const publishAudience = (obj) =>
http.post("/audience/publish", obj, {
headers: { 'Content-Type':'application/json', },
});
// 添加受众
export const createAudience = (obj) =>
http.post("/audience/create", obj, {
headers: { 'Content-Type':'application/json', },
});
// 受众详情
export const getAudienceDetail = (obj) =>
http.post("/audience/info", obj, {
headers: { 'Content-Type':'application/json', },
});
// 添加受众成员
export const addAudienceMember = (obj) =>
http.post("/audience/addMember", obj, {
headers: { 'Content-Type':'application/json', },
});
// 删除受众成员
export const deleteAudienceMember = (obj) =>
http.post("/audience/deleteMember", obj, {
headers: { 'Content-Type':'application/json', },
});
// 批量删除受众成员
export const deleteBatchAudienceMember = (obj) =>
http.post("/audience/deleteBatchMember", obj, {
headers: { 'Content-Type':'application/json', },
});
// 导入受众成员
export const importAudienceMember = (obj) =>
http.post("/audience/importMember", obj, {
headers: { 'Content-Type':'application/json', },
});
// 受众成员列表
export const getAudienceMemberList = (obj) =>
http.post("/audience/memberList", obj, {
headers: { 'Content-Type':'application/json', },
});
// 受众成员更新
export const updateAudience = (obj) =>
http.post("/audience/update", obj, {
headers: { 'Content-Type':'application/json', },
});
// 受众成员组织列表
export const getAudienceOrgList = (obj) =>
http.post("/org/list", obj, {
headers: { 'Content-Type':'application/json', },
});
// 受众成员组织列表
export const getAudienceOrgInfo = (obj) =>
http.post("/org/info", obj, {
headers: { 'Content-Type':'application/json', },
});
// 受众成员可选列表
export const getAudienceUserList = (obj) =>
http.post("/user/list", obj, {
headers: { 'Content-Type':'application/json', },
});

View File

@@ -1,4 +1,5 @@
import http from "./config";
import {getCookieForName} from "@/api/method";
// import qs from 'qs';
/**
@@ -42,13 +43,13 @@ export const createEvaluation = (obj) =>
//上传组件
export const fileUp = (data) =>
http.post("/file/upload", data, {
headers: { "Content-Type": "multipart/form-data" },
headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") },
});
//上传文件
export const baseVoteupload = (data) =>
http.post("/vote/baseVoteupload", data, {
headers: { "Content-Type": "multipart/form-data" },
headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") },
});
//删除测评信息

View File

@@ -1,5 +1,6 @@
import http from "./config";
import qs from "qs";
import {getCookieForName} from "@/api/method";
/**
* 接口传参数方式get
@@ -44,7 +45,7 @@ import qs from "qs";
export const baseVoteupload = (obj) =>
http.post("/vote/baseVoteupload", obj, {
headers: {
token: "123",
token: getCookieForName("token"),
"Content-Type": "multipart/form-data",
},
});

View File

@@ -1,8 +1,10 @@
import {isRef, reactive, ref, toRefs, unref, watch, watchEffect} from "vue";
import {getCookieForName, throttle} from "@/api/method";
import {getCookieForName, setCookie, throttle} from "@/api/method";
import JSONBigInt from "json-bigint";
import router from "@/router";
import {message} from "ant-design-vue";
import {REFRESH_TOKEN, VALIDATE_TOKEN} from "@/api/apis";
import {REFRESH_TOKEN_API} from "@/api/ThirdApi";
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
@@ -79,69 +81,97 @@ export function useBoeApiPage(_url, params = {}, config = {
};
}
export function useBoeApi(_url, params = {}, config = {
init: true,
result: res => res.result,
}) {
// 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 boeRequest(_url, params).then(r => {
// state.data = config.result(r);
// state.loading = false;
// });
// }
// config.init && fetch();
// return {
// ...toRefs(state),
// fetch,
// };
// }
// export function useBoeUserListPage(_url, params = {}, init = true) {
// const state = reactive({
// data: [],
// loading: false,
// total: 0,
// totalPage: 0,
// page: 1,
// ...params
// });
// watch(() => params.keyword, throttle(fetch, 600));
// watch(() => params.page, fetch);
// function fetch() {
// state.loading = true;
// if (!params.keyword) {
// state.loading = false;
// return;
// }
// return boeRequest(_url, params).then(r => {
// state.data = params.page === 1 ? r.result.userInfoList : [...state.data, ...r.result.userInfoList];
// state.totalPage = r.result.totalPage;
// state.total = r.result.totalElement;
// state.loading = false;
// });
// }
// init && fetch();
// return {
// ...toRefs(state),
// fetch,
// };
// }
export function useNewRowsPageNoInit(_url, params) {
const state = reactive({
data: [],
loading: false,
});
watch(() => params, () => {
fetch();
total: 1,
pageNo: 1,
pages: 1,
loading: false
});
function reset() {
state.data = [];
state.loading = false;
}
function fetch() {
state.loading = true;
return boeRequest(_url, params).then(r => {
state.data = config.result(r);
return request(unref(_url), unref(params)).then(r => {
state.data = r.data.list;
state.total = r.data.total;
state.loading = false;
});
}
config.init && fetch();
return {
...toRefs(state),
fetch,
reset,
};
}
export function useBoeUserListPage(_url, params = {}, init = true) {
const state = reactive({
data: [],
loading: false,
total: 0,
totalPage: 0,
page: 1,
...params
});
watch(() => params.keyword, throttle(fetch, 600));
watch(() => params.page, fetch);
function fetch() {
state.loading = true;
if (!params.keyword) {
state.loading = false;
return;
}
return boeRequest(_url, params).then(r => {
state.data = params.page === 1 ? r.result.userInfoList : [...state.data, ...r.result.userInfoList];
state.totalPage = r.result.totalPage;
state.total = r.result.totalElement;
state.loading = false;
});
}
init && fetch();
return {
...toRefs(state),
fetch,
};
}
export function useRowsPageNoInit(_url, params) {
const state = reactive({
data: [],
@@ -219,6 +249,57 @@ export function useRowsPage(_url, params, init = true) {
};
}
/**
* 分页只返回 total 无分页信息
* @param _url
* @param params
* @param init
* @param listing
*/
export function useTotalPage(_url, params, init = true,listing = false) {
const state = reactive({
data: [],
total: 1,
current: 1,
pages: 1,
pageNo: 1,
pageSize: 10,
loading: false
});
if (isRef(params) && listing) {
watch(params.value, () => {
fetch();
});
}
if (isRef(_url)) {
watchEffect(fetch);
} else {
init && fetch();
}
function reset() {
state.data = [];
state.loading = false;
}
function fetch() {
state.loading = true;
return request(unref(_url), unref(params)).then(r => {
state.data = r.data.list;
state.total = r.data.total;
state.loading = false;
});
}
return {
...toRefs(state),
fetch,
reset,
};
}
export function usePage(_url, params, init = true,listing = false) {
const state = reactive({
@@ -263,6 +344,42 @@ export function usePage(_url, params, init = true,listing = false) {
reset,
};
}
export function useThrottlePage(_url, params = {}, init = true) {
const state = reactive({
data: [],
loading: false,
total: 0,
totalPage: 0,
page: 1,
pageNo: 1,
...params
});
watch(() => params.keyword, throttle(fetch, 600));
watch(() => params.page, fetch);
function fetch() {
state.loading = true;
if (!params.keyword) {
state.loading = false;
return;
}
return request(_url, params).then(r => {
state.data = params.pageNo === 1 ? r.data.list : [...state.data, ...r.data.list];
state.totalPage = r.data.total/10 || 1;
state.total = r.data.total;
state.loading = false;
});
}
init && fetch();
return {
...toRefs(state),
fetch,
};
}
export function useRequest(_url, params, init = true) {
@@ -290,7 +407,32 @@ export function useRequest(_url, params, init = true) {
fetchData,
};
}
export function useArrayRequest(_url, params, init = true) {
const data = ref([]);
const loading = ref(false);
if (isRef(params)) {
watch(params.value, () => {
fetchData();
});
}
function fetchData() {
loading.value = true;
request(_url, unref(params)).then(r => {
data.value = r.data;
loading.value = false;
});
}
init && fetchData();
return {
data,
loading,
fetchData,
};
}
export async function boeRequest(_url, params = {}) {
const s = _url.split(" ");
let url = s[0];
@@ -352,13 +494,20 @@ export async function request(_url, params) {
if (res.code === 0 || res.code === 200) {
return res;
}
if (res.code === 1000) {
if (res.code === 1000 || res.code === 1002) {
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ?
router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) :
(window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath))
localStorage.removeItem('refreshPage')
return Promise.reject(res);
}else if(res.code=== 1001){
return boeRequest(REFRESH_TOKEN_API).then((res)=>{
if(res.code===0 || res.code === 200){
return request(_url, params)
}
})
}
//刷新token
res.show ? message.error(res.msg):message.error('系统接口数据异常,请联系管理员');
return Promise.reject(res);
});

View File

@@ -282,7 +282,18 @@ export default {
},
];
}
if (
n.indexOf("/audiencemanage") !== -1 ||
n.indexOf("/audiencemanage") !== -1
) {
state.list = [
{
name: "受众管理",
href: "",
// href: "#/researchmanage",
},
];
}
if (
n.indexOf("/certificatecenter") !== -1 ||
n.indexOf("/CertificateCenter") !== -1
@@ -402,8 +413,22 @@ export default {
) {
state.list = [
{
name: "案例管理",
},
name: "案例",
}, {
name:'案例管理'
}
];
}
if (
n.indexOf("/caserecommended") !== -1 ||
n.indexOf("/CaseRecommended") !== -1
) {
state.list = [
{
name: "案例",
}, {
name:'案例推荐'
}
];
}
if (

File diff suppressed because it is too large Load Diff

View File

@@ -174,7 +174,7 @@
<router-link to="/researchmanage">评估管理</router-link>
</a-menu-item>
<a-sub-menu key="sub6">
<!-- <a-sub-menu key="sub6">
<template #icon>
<div class="imgBox">
<img
@@ -193,8 +193,16 @@
></span>
<router-link to="/dictmanage">字典管理</router-link>
</a-menu-item>
</a-sub-menu>
</a-sub-menu> -->
<a-menu-item key="sub21" @titleClick="titleClick" v-if="checkMenu('audiencemanage')">
<div class="imgBox">
<img
style="width: 16px; height: 16px"
src="../assets/images/navleft/review.png"
/>
</div>
<router-link to="/audiencemanage">受众管理</router-link>
</a-menu-item>
<a-menu-item key="sub5" v-if="checkMenu('systemManage')">
<div class="imgBox">
<img style="width: 16px; height: 16px" src="../assets/images/navleft/system.png"/>
@@ -281,7 +289,7 @@
<router-link to="/examinationcenter">考试管理</router-link>
</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub12" @titleClick="titleClick" v-if="checkMenu('casemanage')">
<!-- <a-menu-item key="sub12" @titleClick="titleClick" v-if="checkMenu('casemanage')">
<div class="imgBox">
<img
style="width: 20px; height: 20px"
@@ -289,7 +297,40 @@
/>
</div>
<router-link to="/casemanage">案例管理</router-link>
</a-menu-item>
</a-menu-item> -->
<!-- 案例修改 -->
<!-- <a-sub-menu key="sub12" @titleClick="titleClick" v-if="checkMenu('casemanage')"> -->
<a-sub-menu key="sub12" @titleClick="titleClick" >
<template #icon>
<div class="imgBox">
<img
style="width: 16px; height: 16px"
src="../assets/images/navleft/case.png"
/>
</div>
</template>
<template #title>案例</template>
<a-menu-item key="sub12-1">
<span
:class="{
circleActive: selectedKeys[0] === 'sub12-1' ? true : false,
circle: selectedKeys[0] === 'sub12-1' ? false : true,
}"
></span>
<router-link to="/casemanage">案例管理</router-link>
</a-menu-item>
<a-menu-item key="sub12-2">
<span
:class="{
circleActive: selectedKeys[0] === 'sub12-2' ? true : false,
circle: selectedKeys[0] === 'sub12-2' ? false : true,
}"
></span>
<router-link to="/caserecommended">案例推荐</router-link>
</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub13" @titleClick="titleClick" v-if="checkMenu('articlemanage')">
<div class="imgBox">
<img
@@ -317,7 +358,8 @@
</div>
<router-link to="/download">下载中心</router-link>
</a-menu-item>
<a-sub-menu key="sub17">
<!-- 20230804影藏 -->
<!-- <a-sub-menu key="sub17">
<template #icon>
<div class="imgBox">
<img
@@ -430,16 +472,17 @@
</a-menu-item>
</a-sub-menu>
</a-sub-menu>
<a-menu-item key="sub16" v-if="checkMenu('OldSystemManage')">
<a-menu-item key="sub16">
<div class="imgBox">
<img
style="width: 22px; height: 22px"
src="../assets/images/navleft/review.png"
/>
</div>
</a-menu-item>
-->
<a target="_blank" :href="oldManage">旧版管理员界面</a>
<!-- <router-link target="_blank" to="/oldsystemmanage">旧版管理员界面</router-link> -->
</a-menu-item>
<a-menu-item key="sub17" v-if="checkMenu('ReadingClubManage')">
<div class="imgBox">
<img
@@ -576,6 +619,7 @@ export default {
"sub18",
"sub19",
"sub20",
"sub21",
],
openKeys: localStorage.getItem("openKeys")
? JSON.parse(localStorage.getItem("openKeys"))
@@ -722,9 +766,15 @@ export default {
{
href: "/casemanage",
openKeys: "sub12",
selectedKeys: "sub12",
selectedKeys: "sub12-1",
pagename: "案例管理",
},
{
href: "/caserecommended",
openKeys: "sub12",
selectedKeys: "sub12-2",
pagename: "案例推荐",
},
{
href: "/articlemanage",
openKeys: "sub13",
@@ -830,6 +880,12 @@ export default {
selectedKeys: "sub20",
pagename: "字典管理",
},
{
href: "/audiencemanage",
openKeys: "sub21",
selectedKeys: "sub21",
pagename: "受众管理",
},
],
oldManage: window.location.protocol + process.env.VUE_APP_OLD_MANAGE

View File

@@ -49,6 +49,8 @@ import {computed, reactive} from "vue";
import {studentUrl,teacherUrl} from "@/api/method";
import router from "@/router";
import {useStore, createStore} from "vuex";
import {boeRequest, request} from "@/api/request";
import {LOGOUT} from "@/api/ThirdApi";
const store = useStore();
@@ -83,9 +85,11 @@ const changeRole = (value) => {
}
});
};
const logOut = () => {
const logOut = async () => {
await boeRequest(LOGOUT,{from:'pc'})
store.replaceState(createStore({state: {openpages: []}}).state);
localStorage.clear();
sessionStorage.clear();
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: '/login'}) : (window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL)
};
</script>

View File

@@ -0,0 +1,136 @@
<template>
<a-table :customRow="customRow" class="ant-table-striped"
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)" row-key="id" :columns="columns"
:data-source="data" :loading="loading" :pagination="pagination" :row-selection="rowSelection">
<template #operation="{ record }">
<slot :record="record"></slot>
</template>
</a-table>
</template>
<script setup>
import { defineProps, defineExpose, ref, computed, onMounted, defineEmits, nextTick } from "vue";
import { useRowsPageNoInit } from "@/api/request";
import { useResetRef } from "@/utils/useCommon";
const props = defineProps({
type: {
type: String,
default: ""
},
columns: {
type: Array,
default: () => []
},
url: {
type: String,
default: ""
},
pageKey: {
type: String,
default: "pageNo"
},
params: {
type: Object,
default: () => ({})
},
init: {
type: Boolean,
default: true
},
request: {
type: Function,
default: useRowsPageNoInit
}
});
const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]);
const rowSelectKeys = ref([]);
const selectsData = ref([]);
const params = useResetRef({ [props.pageKey]: 1, pageSize: 10 });
const postParam = computed(() => ({ ...params.value, ...props.params }));
const { data, loading, total, fetch: onFetch } = props.request(props.url, postParam);
const rowSelection = computed(() => (props.type ? {
type: props.type,
columnWidth: 20,
selectedRowKeys: rowSelectKeys.value,
onChange: onSelectChange,
preserveSelectedRowKeys: true,
} : null));
const customRow = (record) => ({
onClick: () => {
if (props.type === "checkbox") {
if (rowSelectKeys.value.some(t => t === record.id)) {
rowSelectKeys.value = rowSelectKeys.value.filter(t => t !== record.id);
selectsData.value = selectsData.value.filter(t => t.id !== record.id);
} else {
rowSelectKeys.value.push(record.id);
selectsData.value.push(record);
}
} else {
rowSelectKeys.value = [record.id];
selectsData.value = [record];
}
emit("update:selectedRowKeys", [...rowSelectKeys.value]);
emit("update:selectedRows", [...selectsData.value]);
}
});
onMounted(() => props.init && nextTick(onFetch));
function onSelectChange(e, l) {
rowSelectKeys.value = e;
selectsData.value = l;
emit("update:selectedRowKeys", e);
emit("update:selectedRows", l);
}
const pagination = computed(() => ({
total: total.value,
showSizeChanger: false,
current: params.value[props.pageKey],
pageSize: params.value.pageSize,
onChange: changePagination,
}));
const changePagination = (e) => {
params.value[props.pageKey] = e;
nextTick(onFetch);
};
function reset(v) {
params.reset();
v && emit("update:params", { ...v });
nextTick(onFetch);
}
function resetSelected() {
rowSelectKeys.value = [];
selectsData.value = [];
emit("update:selectedRowKeys", []);
emit("update:selectedRows", []);
}
function clear(v) {
rowSelectKeys.value = [];
selectsData.value = [];
params.reset();
v && emit("update:params", { ...v });
emit("update:selectedRowKeys", []);
emit("update:selectedRows", []);
}
const toLoading = () => loading.value = true;
function remove(i) {
rowSelectKeys.value.splice(i, 1);
selectsData.value.splice(i, 1);
emit("update:selectedRowKeys", rowSelectKeys.value);
emit("update:selectedRows", selectsData.value);
}
const fetch = () => nextTick(onFetch);
defineExpose({ fetch, reset, resetSelected, clear, toLoading, remove });
</script>

View File

@@ -13,7 +13,7 @@
</template>
<script setup>
import {defineProps, defineExpose, ref, computed, onMounted, defineEmits, nextTick} from "vue";
import {useRowsPageNoInit} from "@/api/request";
import {usePage, useRequest, useRowsPageNoInit} from "@/api/request";
import {useResetRef} from "@/utils/useCommon";
const props = defineProps({
@@ -43,7 +43,7 @@ const props = defineProps({
},
request: {
type: Function,
default: useRowsPageNoInit
default: usePage
}
});
const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]);

View File

@@ -5,6 +5,7 @@
:show-upload-list="showUploadList"
:multiple="multiple"
:before-upload="beforeUpload"
:headers="headers"
@change="handleChange"
ref="imageRef"
>
@@ -17,6 +18,7 @@
import {defineProps, defineEmits, defineExpose, ref, watch} from "vue";
import {message} from "ant-design-vue";
import {FILE_UPLOAD_URL} from "@/api/config";
import {getCookieForName} from "@/api/method";
const props = defineProps({
value: {
@@ -41,7 +43,7 @@ const emit = defineEmits({})
const files = ref([])
const imageRef = ref()
const headers = { token: getCookieForName("token") };
watch(props, () => {
props.value.length !== files.value.length && (files.value = props.value)
})

View File

@@ -31,6 +31,7 @@
:data="data"
:multiple="true"
:name="name"
:headers="headers"
:accept="accept"
:action="uploadUrl"
@change="handleChange"
@@ -99,6 +100,7 @@ import {getImportStatus} from "@/api/index1";
import {useTimeout} from "@/utils/useCommon";
import err from "@/assets/images/err.png";
import success from "@/assets/images/success.png";
import {getCookieForName} from "@/api/method";
const props = defineProps({
url: String,
@@ -115,6 +117,7 @@ const props = defineProps({
const emit = defineEmits({});
const visible = ref(false);
const fileList = ref([]);
const headers = { token: getCookieForName("token") };
const uploadUrl = ref(process.env.VUE_APP_BASE_API + props.url);
const { start } = useTimeout(async ({ uuid, file }) => {
const { data: { data: upData } } = await getImportStatus(uuid);

View File

@@ -282,7 +282,7 @@
<!-- 二维码弹窗 -->
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import SignQR from "./SignQR.vue";
import TwoDimensionalCode from "../../components/TwoDimensionalCode";

View File

@@ -35,6 +35,7 @@
v-model:fileList="fileList"
:action="importStudent"
name="uploadFile"
:headers="headers"
:multiple="false"
@change="handleChange"
:data="{
@@ -187,6 +188,7 @@ import { message } from "ant-design-vue";
import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
import { useStore } from "vuex";
import {getCookieForName} from "@/api/method";
export default {
name: "ImpStu",
props: {
@@ -222,7 +224,7 @@ export default {
showBottomBar: false, // 显示底部成功条数和失败条数
fileName: "",
});
const headers = { token: getCookieForName("token") };
const userInfo = computed(() => store.state.userInfo);
const closeDrawer = () => {
@@ -341,6 +343,7 @@ export default {
userInfo,
closeDrawer,
// change,
headers,
handleChange,
BATCH_IMPORT_SCORE,
downloadEeeorData,

View File

@@ -86,6 +86,7 @@
</div>
<div class="item_inp" style="background-color: #fff;">
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
:headers="headers"
:before-upload="beforeUpload">
<img class="i_upload_img" v-if="imageUrl" :src="imageUrl" alt="avatar" />
<div class="i_upload" v-else>
@@ -227,6 +228,7 @@ import AddInvistRoot from "@/components/drawers/AddInvistRoot.vue";
import { Form, message } from "ant-design-vue";
import { fileUp } from "../../api/indexEval";
import {useResetRef} from "@/utils/useCommon";
import {getCookieForName} from "@/api/method";
const removePG = () => {
formData.value.assessmentId = "";
@@ -243,6 +245,7 @@ const props = defineProps({
taskList: [],
});
const visible = ref(false);
const headers = { token: getCookieForName("token") };
const formData = useResetRef({
liveName: "",
liveLink: "",

View File

@@ -62,7 +62,7 @@
</div>
<div class="main_table">
<div class="drawerbox">
<BaseTable ref="tableRef" :url="COURSE_PLAN_PAGE" v-model:params="params" :columns="columns"/>
<BaseTable ref="tableRef" :url="COURSE_PLAN_PAGE" v-model:params="params" :columns="columns" :request="useRowsPageNoInit"/>
</div>
</div>
</div>
@@ -379,7 +379,7 @@ import AssessmentList from "@/components/drawers/AssessmentList.vue";
import {COURSE_PLAN_EDIT, COURSE_PLAN_PAGE, DEL_PLAN, EXAM_DETAIL, WORK_DETAIL} from "@/api/apis";
import dayjs from "dayjs";
import BaseTable from "@/components/common/BaseTable";
import {request} from "@/api/request";
import {request,useRowsPageNoInit} from "@/api/request";
import dialog from "@/utils/dialog";
import {useResetRef} from "@/utils/useCommon";
import { validateName } from "@/api/index1";

View File

@@ -33,6 +33,7 @@
:action="importScore"
name="uploadFile"
:multiple="true"
:headers="headers"
@change="handleChange"
:showUploadList="false"
:data="{
@@ -195,6 +196,7 @@ import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
import {getCookieForName} from "@/api/method";
export default {
name: "EScore",
@@ -255,6 +257,7 @@ export default {
process.env.VUE_APP_FILE_PATH,
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
});
const headers = { token: getCookieForName("token") };
const closeDrawer = () => {
ctx.emit("closeDraw", true);
ctx.emit("update:eScorevisibleExternalExternal", false);
@@ -405,6 +408,7 @@ export default {
BATCH_IMPORT_SCORE,
beforeUpload,
handleUpload,
headers,
removeUpload,
downloadEeeorData,
};

View File

@@ -21,6 +21,7 @@
<div class="right">
<div style="height: 176px; margin-bottom: 20px">
<a-upload-dragger v-model:fileList="fileList" :action="importHomeWork" name="uploadFile" :multiple="true"
:headers="headers"
@change="handleChange" :showUploadList="false" :data="{
type: type,
taskId: Number(id),
@@ -155,6 +156,7 @@ import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
import {getCookieForName} from "@/api/method";
export default {
name: "EScore",
props: {
@@ -201,6 +203,8 @@ export default {
downloadErrUrl: null, //下载失败数据
fileName: "",
});
const headers = { token: getCookieForName("token") };
const closeDrawer = () => {
ctx.emit("update:eScorevisible", false);
state.fileList = [];
@@ -344,6 +348,7 @@ export default {
closeDrawer,
handleChange,
downTemplate,
headers,
BATCH_IMPORT_SCORE,
beforeUpload,
handleUpload,

View File

@@ -30,6 +30,7 @@
:action="importLeader"
name="uploadFile"
:multiple="true"
:headers="headers"
@change="handleChange"
:showUploadList="false"
>
@@ -252,6 +253,7 @@ import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
import {getCookieForName} from "@/api/method";
export default {
name: "ImportStu",
props: {
@@ -279,6 +281,7 @@ export default {
process.env.VUE_APP_FILE_PATH,
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
});
const headers = { token: getCookieForName("token") };
const closeDrawer = () => {
ctx.emit("closeDraw", true);
ctx.emit("update:TaskFaceImpStuvisible", false);
@@ -422,6 +425,7 @@ export default {
afterVisibleChange,
closeDrawer,
handleChange,
headers,
downTemplate,
BATCH_IMPORT_SCORE,
beforeUpload,

View File

@@ -0,0 +1,791 @@
<template>
<a-drawer class="recommend" :visible="visible" width="80%" :title="title" @close="closeDrawer" :maskClosable="false">
<!-- 搜索框及按钮 -->
<div class="filter">
<div class="filterItems">
<div class="select">
<a-input v-model:value="searchDataInfo.keyWord" style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入案例标题" />
</div>
<div class="select">
<a-input v-model:value="searchDataInfo.authorName" style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入作者名字" />
</div>
<div style="display: flex; margin-bottom: 20px">
<div class="btn btn1" @click="handleSearch(1)">
<div class="search"></div>
<div class="btnText">搜索</div>
</div>
<div class="btn btn1" @click="handleRest" style="width: 105px">
<div class="search"></div>
<div class="btnText">重置</div>
</div>
<div class="btn btn1" @click="handleImportInfo" style="width: 105px">
<div class=""></div>
<div class="btnText">导入</div>
</div>
</div>
</div>
<div class="btns" style="display: flex;flex-direction: column;">
<div v-if="selectNum" class="btnText">已选择 <span style="color:#4ea6ff ;"> {{ selectNum }}
</span>
条案例</div>
<div v-if="state.caseTitleList.length" class="btnText">已导入 <span style="color:#4ea6ff ;">
{{ state.caseTitleList.length }}</span> 条案例</div>
</div>
</div>
<!-- 表格 -->
<div style="display: flex; overflow-x: auto; overflow-y: auto;justify-content: space-between;">
<div class="tableBox" style="margin-top: 30px;min-height: 800px;overflow: hidden;">
<a-table style="border: 1px solid #f2f6fe;" :columns="state.columns" :data-source="state.dataSource"
:loading="!loading" :row-selection="rowSelection" :pagination="pagination" />
</div>
<div class="right1" style="min-width: 200px">
<div class="onerow">
<div class="onleft">
<div class="already">已选</div>
</div>
</div>
<div :style="{ 'max-height': state.screenHeight - 240 + 'px' }" style="overflow-y: auto">
<div class="selecteds">
<div v-for="(item, i) in state.selectedRow" :key="i">
<div v-if="i < 11">
<div class="chose">
{{ item.title.length > 6 ? item.title.slice(0, 6) + '...' : item.title }}
<div class="ch" @click="remove(item.id)"></div>
</div>
</div>
<div v-else>
<div v-if="state.member">
<div class="chose">
{{ item.title.length > 6 ? item.title.slice(0, 6) + '...' : item.title }}
<div class="ch" @click="remove(item.id)"></div>
</div>
</div>
</div>
</div>
<div v-if="!state.member && state.selectedRow?.length > 10" class="ifsw">
<div @click="state.member = !state.member" class="“sw”">查看更多></div>
</div>
<div v-if="state.member && state.selectedRow?.length > 10" class="ifsw">
<div @click="state.member = !state.member" class="sw">收起&lt;</div>
</div>
</div>
</div>
</div>
</div>
<!-- 底部按钮和下一步的弹窗 -->
<div class="btnn">
<button class="btn2" @click="closeDrawer">取消</button>
<CommonRecommend :type="state.type" :id="state.selectedRowKeys" @finash="submitCall" :stage="state.stage">
<a-button class="btn2">
下一步
</a-button>
</CommonRecommend>
</div>
</a-drawer>
<!-- 导入的提示框 -->
<a-modal class="modal" v-model:visible="state.AMvisible" :closable="false" :maskClosable="false" ok-text="确定"
cancel-text="取消" @ok="closeModal" @cancel="closeModal">
<div class="importInfo" style="padding: 24px;">
<div class="imptHeader">
<span>导入</span>
<div class="defeat">
<div class="detext" @click="downloadTemplate(1)">
下载导入模版
</div>
</div>
<div class="defeat">
<div class="detext" @click="downloadTemplate(2)">
下载最新案例列表
</div>
</div>
</div>
<div class="upload">
<a-upload :file-list="state.fileList" :action="state.uploadAction" name="file" @change="handleChange"
:showUploadList="false" :multiple="false">
<a-button style="width: 150px;">
上传文件
</a-button>
</a-upload>
<span class="ant-upload-hint">支持文件格式.xls/.xlsx</span>
</div>
<div class="progress" v-if="state.status">
<div class="nameAndProgress" style="display: flex;justify-content: space-between;padding-right: 36px;">
<span>{{ state.fileName }}</span>
<span> {{
{
done: "上传完成",
uploading: "正在上传",
error: "上传失败",
removed: "正在上传",
}[state.status] }}</span>
</div>
<a-progress :percent="state.uploadpercent" status="active" :strokeColor="state.progressColor" />
</div>
<div class="importDetail" style="display: flex;flex-direction: column;" v-if="state.importId">
<span>导入 {{ state.totalNum }} 成功 {{ state.successNum }} 失败 <span style="color: red;">{{ state.failNum
}}</span>
</span>
<div v-if="state.failNum" class="defeat">
<span class="detext" @click="downloadErrorInfo">
下载失败数据
</span>
</div>
</div>
</div>
</a-modal>
<!-- 下一步添加学员 -->
</template>
<script setup>
import { reactive, ref, computed, nextTick } from 'vue';
import { Form, message } from "ant-design-vue";
import { isTopList, downloadErrorRecords } from '@/api/case'
import CommonRecommend from "@/components/CaseManage/CommonRecommend";
import useDownload from '@/hooks/useDownload'
defineProps({
visible: {
type: Boolean,
default: false
},
title: {
type: String,
default: '添加案例'
}
})
const emit = defineEmits(['update:visible'])
const loading = ref(false)
const state = reactive({
allSelectedRow: [],
caseTitleList: [],
totalNum: 0,//上传的总条数
successNum: 0,//成功的条数
failNum: 0,//失败的条数
status: '',//上传的状态
progressColor: '',//进度条颜色
type: 1,//添加学员
stage: '',//
importId: '',//导入id
selectedRowKeys: [],//案例标题的id
selectedRow: [],//选择的每一行数据
dataSource: [],//表格的数据
AMvisible: false,//导入modal框显示隐藏
uploadpercent: -1,//导入进度
fileName: '',//下载的名字
uploadAction: process.env.VUE_APP_SYS_API + '/xboe/m/boe/cases/recommend/import',//下载地址
fileList: [],//上传列表
member: false,//收起和展开
screenHeight: document.body.clientHeight,//高度
columns: [
{
title: "案例标题",
dataIndex: "title",
key: "title",
align: "left",
className: "h",
width: '75%',
ellipsis: true,
},
{
title: "作者名称",
dataIndex: "authorName",
key: "authorName",
width: '20%',
align: "center",
className: "h",
ellipsis: true,
}
]
})
const downloadTemplate = (type) => {
let downInfo = {
1: {
url: '/xboe/m/boe/cases/recommend/download-template',
name: '导入模版'
},
2: {
url: '/xboe/m/boe/cases/exportCaseTitle',
name: '最新案例列表'
}
}
try {
useDownload(downInfo[type].url, {}, downInfo[type].name)
} catch (error) {
console.log(error);
}
}
//删除选中
const remove = (id) => {
state.selectedRowKeys = state.selectedRowKeys.filter(item => item !== id)
state.selectedRow = state.selectedRow.filter(item => item.id !== id)
// 过滤导入删除的条数
state.caseTitleList = state.caseTitleList.filter(item => state.selectedRow.some(sel => sel.id == item.id))
}
// 下一步返回的刷新列表
function submitCall(flag) {
searchDataInfo.pageIndex = 1
flag && getTopList()
closeDrawer()
}
// 计算选择的条数
const selectNum = computed(() => state.selectedRowKeys.length - state.caseTitleList.length)
// 查询数据
const searchDataInfo = reactive({
pageIndex: 1,
pageSize: 10,
keyWord: "",
authorName: '',
});
const total = ref(0)
// 分页
const pagination = computed(() => ({
total: total.value,
showSizeChanger: false,
current: searchDataInfo.pageIndex,
pageSize: searchDataInfo.pageSize,
onChange: changePagination,
}));
const changePagination = (e) => {
console.log(e);
loading.value = false
searchDataInfo.pageIndex = e
nextTick(getTopList);
};
// 计算全选
const rowSelection = computed(() => {
return {
selectedRowKeys: state.selectedRowKeys,
onChange: onSelectChange,
preserveSelectedRowKeys: true,
getCheckboxProps: record => ({
disabled: state.caseTitleList.some((item) => record.id == item.id)
}),
}
});
//计算出来已选中状态
const onSelectChange = (selectedRowKeys, selectedRow) => {
state.selectedRowKeys = selectedRowKeys
// 过滤取消的
// state.caseTitleList = state.caseTitleList.filter((item) => selectedRowKeys.includes(item.id))
// state.selectedRow = selectedRow.filter(Boolean)
const mergedArray = state.caseTitleList.concat(selectedRow.filter(Boolean));
state.selectedRow = Object.values(
mergedArray.reduce((acc, obj) => {
acc[obj.id] = obj;
return acc;
}, {})
);
console.log(state.selectedRow, state.caseTitleList);
};
// 请求列表数据是formdata类型的
const getTopList = () => {
isTopList(searchDataInfo).then((res) => {
loading.value = true;
console.log(res);
res?.data?.result?.list?.forEach(element => {
element.key = element.id
});
state.dataSource = res?.data?.result?.list || []
total.value = res?.data?.result?.count
}).catch((err) => {
message.error(err);
loading.value = false;
})
}
getTopList()
// 搜索
const handleSearch = (num) => {
if (num == 1) searchDataInfo.pageIndex = 1
console.log(searchDataInfo);
getTopList()
}
//错误案例下载
const downloadErrorInfo = () => {
if (!state.importId) {
message.warn('暂无失败数据')
return
}
let url = `${process.env.VUE_APP_SYS_API}/xboe/m/boe/cases/recommend/download?importId=` + state.importId
console.log(url);
window.open(url, '_self');
}
const { resetFields } = Form.useForm(searchDataInfo, {});
//重置
const handleRest = () => {
resetFields()
getTopList()
}
// 取消抽屉
const closeDrawer = async () => {
state.selectedRowKeys = []
state.selectedRow = []
state.caseTitleList = []
resetFields()
emit('update:visible', false)
await nextTick()
getTopList()
}
//导入按钮
const handleImportInfo = () => {
state.AMvisible = true
}
// modal取消按钮
const closeModal = () => {
state.fileList = []
state.status = '',
state.progressColor = '',
state.importId = '',
state.AMvisible = false
}
// 根据数组id去重
const deduplicateArrayById = (arr) => {
// 使用 Set 数据结构保存不重复的 id
const idSet = new Set();
// 使用 map 方法遍历数组,检查并去重对象
const deduplicatedArray = arr.filter(obj => {
const id = obj.id;
if (!idSet.has(id)) {
idSet.add(id);
return true;
}
return false;
});
return deduplicatedArray;
}
//上传文件
const handleChange = (info) => {
state.progressColor = ''
state.uploadpercent = -1
state.fileList = []
state.importId = ''
if (info) {
var FileExt = info.file.name.replace(/.+\./, "");
if (["xls", "xlsx"].indexOf(FileExt.toLowerCase()) === -1) {
state.fileList = [];
state.uploadpercent = -1;
message.destroy();
message.error("请上传正确的文件格式");
return;
}
}
state.fileList = info.fileList
state.fileName = info.file.name;
state.status = info.file.status
state.uploadpercent = parseInt(info.file.percent);
const status = info.file.status;
if (status !== "uploading") {
console.log(info.file, info.fileList);
}
if (status === "done") {
console.log("info", info?.file?.response?.result);
const { caseIdList, importId, caseTitleList } = info?.file?.response?.result
state.importId = importId
message.success(`${info.file.name}上传成功`);
state.progressColor = '#52c41a'
let caseList = caseTitleList.map((item) => {
return {
id: item.caseId,
title: item.caseTitle
}
})
state.caseTitleList = caseList
state.selectedRowKeys = [...new Set([...caseIdList, ...state.selectedRowKeys])]
state.selectedRow = deduplicateArrayById([...state.selectedRow, ...caseList]);
console.log(caseList, state.selectedRow);
//发请求看失败的数据
downloadErrorRecords({ importId }).then((res) => {
const { totalNum, successNum, failNum } = res?.data?.result
state.totalNum = totalNum
state.successNum = successNum
state.failNum = failNum
})
} else if (status === "error") {
state.progressColor = 'red'
state.status = 'error'
if (info.file.response.message) {
return message.error(`${info.file.response.message},上传失败`);
}
message.error(`${info.file.name}上传失败`);
}
};
</script>
<style lang="scss" scoped>
//上传
.modal {
:global(.ant-modal-header) {
border: 0;
}
:global(.ant-modal-footer) {
border: 0;
}
.importInfo {
.imptHeader {
display: flex;
margin-bottom: 40px;
.defeat {
margin-left: 40px;
color: #0982ff;
text-decoration: underline;
cursor: pointer;
}
}
.upload {
display: flex;
align-items: center;
margin-bottom: 40px;
.ant-upload-hint {
margin-left: 20px;
}
}
.importDetail {
margin-top: 40px;
.defeat {
color: #0982ff;
text-decoration: underline;
cursor: pointer;
}
}
}
}
.recommend {
:global(.ant-drawer-header-title) {
flex-direction: row-reverse !important;
}
:global(.ant-drawer-close) {
margin-right: 0;
}
.btnn {
height: 72px;
width: 100%;
position: absolute;
background-color: #fff;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
color: #4ea6ff;
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
}
}
// 头部
.filter {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.filterItems {
display: flex;
flex-wrap: wrap;
.select {
margin-right: 20px;
margin-bottom: 20px;
}
.btn {
padding: 0 26px 0 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
}
}
.btnn {
padding: 0 26px 0 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #fff;
line-height: 36px;
margin-left: 5px;
}
}
.btn1 {
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2 {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset0.png");
}
}
.btn1:active {
background: #0982ff;
}
.btn2:active {
background: rgba(64, 158, 255, 0.2);
}
}
.btns {
display: flex;
.btn {
padding: 0 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
}
}
.btn3 {
margin-right: 0;
.search {
width: 17px;
height: 18px;
background-image: url("../../assets/images/courseManage/add0.png");
}
}
.btn3:active {
background: #0982ff;
}
}
}
//底部
.right1 {
border-left: 1px solid #f2f6fe;
margin-left: 20px;
.onerow {
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 40px;
flex-wrap: wrap;
width: 100%;
.onleft {
display: flex;
text-align: center;
.already {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
margin-left: 32px;
white-space: nowrap;
// margin-bottom: 20px;
}
.count {
color: #4ea6ff;
font-size: 16px;
margin: 0 6px;
}
.peo {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
}
}
.clbox {
margin-right: 50px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
width: 104px;
height: 32px;
border-radius: 4px;
background: #4ea6ff;
.colose {
width: 16px;
height: 16px;
background-image: url(../../assets/images/basicinfo/ch.png);
background-size: 100%;
margin-right: 4px;
}
.allclear {
color: rgba(255, 255, 255, 1);
font-size: 14px;
}
}
}
.selecteds {
display: flex;
flex-wrap: wrap;
margin-left: 32px;
.person {
width: 100%;
margin-top: 20px;
border-top: 1px solid #f2f6fe;
}
.chose {
min-width: 64px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
padding: 0 10px;
.ch {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.ifsw {
display: flex;
align-items: end;
justify-content: center;
color: #4ea6ff;
}
.sw {
display: flex;
align-items: center;
justify-content: center;
text-align: justify;
color: #4ea6ff;
margin-top: 23px;
margin-left: 10px;
}
.dept {
width: 100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
}
}
}
</style>

View File

@@ -31,6 +31,7 @@
:action="importLeader"
name="uploadFile"
:multiple="true"
:headers="headers"
@change="handleChange"
:showUploadList="false"
>
@@ -183,6 +184,7 @@ import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
import {getCookieForName} from "@/api/method";
export default {
name: "TaskImpStu",
props: {
@@ -221,6 +223,8 @@ export default {
process.env.VUE_APP_FILE_PATH,
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
});
const headers = { token: getCookieForName("token") };
const closeDrawer = () => {
ctx.emit("closeDraw", true);
ctx.emit("update:TaskFaceImpStuvisible", false);
@@ -364,6 +368,7 @@ export default {
return {
...toRefs(state),
headers,
afterVisibleChange,
closeDrawer,
handleChange,

View File

@@ -59,6 +59,7 @@
style="width: 200px"
list-type="picture-card"
class="avatar-uploader"
:headers="headers"
:show-upload-list="false"
:before-upload="beforeUpload"
>
@@ -326,6 +327,7 @@ import CreateCertificate from "../../../components/drawers/project/CreateCertifi
import { message } from "ant-design-vue";
import * as api from "@/api/index1";
import { fileUp } from "../../../api/indexEval";
import {getCookieForName} from "@/api/method";
export default {
name: "AddCertificate",
components: {
@@ -380,6 +382,8 @@ export default {
fileType: ["jpg", "jpeg", "png", "gif", "svg", "bmp"],
});
const headers = { token: getCookieForName("token") };
const reset = () => {
state.certificateName = null;
state.certificateRemark = null;
@@ -673,6 +677,7 @@ export default {
};
return {
...toRefs(state),
headers,
afterVisibleChange,
closeDrawer,
selectCondition,

View File

@@ -68,6 +68,7 @@
style="width: 200px"
list-type="picture-card"
class="avatar-uploader"
:headers="headers"
:show-upload-list="false"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
:before-upload="beforeUpload"
@@ -118,6 +119,7 @@ import * as apiTask from "../../../api/indexTaskadd";
import { message } from "ant-design-vue";
import { RouterEditTask } from "@/api/indexTask";
import { addTempTask } from "../../../api/indexTaskadd";
import {getCookieForName} from "@/api/method";
export default {
name: "AddRef",
props: {
@@ -178,6 +180,7 @@ export default {
title: null,
isClick: false,
});
const headers = { token: getCookieForName("token") };
const closeDrawer = () => {
ctx.emit("update:CCertificate", false);
ctx.emit("update:edit", false);
@@ -335,6 +338,7 @@ export default {
};
return {
...toRefs(state),
headers,
afterVisibleChange,
closeDrawer,
handleFinish,

View File

@@ -31,6 +31,7 @@
:data="data"
:multiple="true"
:accept="accept"
:headers="headers"
:action="uploadUrl"
@change="handleChange"
v-model:file-list="fileList"
@@ -95,6 +96,7 @@ import {getImportStatus} from "@/api/index1";
import {useTimeout} from "@/utils/useCommon";
import err from "@/assets/images/err.png";
import success from "@/assets/images/success.png";
import {getCookieForName} from "@/api/method";
const props = defineProps({
url: String,
@@ -109,6 +111,7 @@ const emit = defineEmits({})
const visible = ref(false)
const fileList = ref([])
const uploadUrl = ref(process.env.VUE_APP_BASE_API + props.url);
const headers = { token: getCookieForName("token") };
const {start} = useTimeout(async ({uuid,file}) => {
const {data: {data: upData}} = await getImportStatus(uuid)
file.uploadState = upData;

View File

@@ -25,7 +25,7 @@
>
起止时间{{ datasource.startTime }} {{ datasource.endTime }}
</div>
<!--
<!--
<div v-else class="endtime">
起止时间
</div>-->
@@ -48,7 +48,7 @@
placeholder="请选择"
:options="projectNameList"
@change="selectProjectName"
></a-select>
</div>
</div>
@@ -69,7 +69,7 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px">
<div class="btn btn1" @click="godie" style="margin-right: 20px">
<div class="img1"></div>
<div class="wz">催促学习</div>
@@ -114,7 +114,7 @@
</a-drawer>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";
@@ -288,7 +288,7 @@ export default {
);
},
},
{
title: "任务状态",
dataIndex: "finishStatus",
@@ -374,8 +374,8 @@ export default {
currentStageId: props.datasource.stageId,
type: 1,
pid: props.datasource.projectId,
taskId: props.datasource.projectTaskId,
taskType: props.datasource.type,
taskId: props.datasource.projectTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
});
@@ -387,7 +387,7 @@ export default {
type: 1,
pid: props.datasource.projectId,
taskId: props.datasource.projectTaskId,
taskType: props.datasource.type,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
})
@@ -686,4 +686,4 @@ export default {
}
}
</style>

View File

@@ -56,7 +56,7 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px" v-if="checkPer(permissions,createId)">
<div class="btn btn1" @click="godie" style="margin-right: 20px">
<div class="img1"></div>
<div class="wz">催促考试</div>
@@ -120,7 +120,7 @@
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource1"/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import EScore from "../ExportScore.vue";
@@ -327,12 +327,12 @@ export default {
customRender: (text) => {
return (
<div class="racona">
{text.record.status === 1 || text.record.status === 9 ?
{text.record.status === 1 || text.record.status === 9 ?
<a onClick={()=>{
state.studentKid = text.record.studentKid;
state.datasource1 = text.record;
state.CAvisible = true;
}}>查看答卷 </a> :
}}>查看答卷 </a> :
<span style="color:rgba(0, 0, 0, 0.25);cursor:not-allowed;"> 查看答卷 </span>
}
</div>
@@ -424,7 +424,7 @@ export default {
// 重置
function reseatTableData() {
state.loadingData = true;
state.currentPage = 1;
state.currentPage = 1;
state.name = '';
state.projectName = undefined;
getData();
@@ -441,7 +441,7 @@ export default {
function exportData() {
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.stageId=="0"?"":props.datasource.stageId}&targetId=${props.datasource.projectId}&taskId=${props.datasource.courseId}&type=${2}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?currentStageId=${props.datasource.stageId}&type=${2}&targetId=${props.datasource.projectId}&pid=${props.datasource.projectId}&taskId=${props.datasource.courseId}&taskType=${props.datasource.type}`)
{/* api.ExportExam({
"chapterId": props.datasource.chapterId,
"targetId": props.datasource.routerId,

View File

@@ -57,7 +57,7 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px">
<div class="btn btn1" @click="godie" style="margin-right: 20px">
<div class="img1"></div>
<div class="wz">催促考试</div>
@@ -92,7 +92,7 @@
:scroll="{ x: 900 }"
:pagination="false"
/>
<div class="pa">
<a-pagination
:showSizeChanger="false"
@@ -108,31 +108,31 @@
</div>
</div>
</div>
<!-- <div class="btnn">
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div> -->
</div>
<!-- 导出成绩抽屉 -->
<ExportAchievement
<ExportAchievement
@closeDraw="closeDraw"
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
:type="1"
:targetId="datasource.projectId"
:targetId="datasource.projectId"
:courseId="datasource.courseId"
:taskId="datasource.id"
:chapterId="datasource.stageId" />
</a-drawer>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import ExportAchievement from "../ExportAchievement.vue";
import * as api from '../../../api/indexTaskManage';
import { batchSendMessage } from "@/api/index1";
export default {
name: "ProjectExternalExamManage",
components: {
@@ -162,7 +162,7 @@
default: null,
},
},
setup(props, ctx) {
const state = reactive({
name: "",
@@ -302,7 +302,7 @@
);
},
},
{
title: "完成时间",
dataIndex: "finishedTime",
@@ -332,7 +332,7 @@
],
loadingData: true
});
const closeDrawer = () => {
ctx.emit("update:TMvisibleExternal", false);
state.name = "";
@@ -358,7 +358,7 @@
}
state.selectedRowKeys = selectedRowKeys;
};
//催促学员学习
const godie = () => {
//项目催促请求报文
@@ -386,7 +386,7 @@
const clearLine = () => {
state.selectedRowKeys = [];
};
// 获取数据
function getData() {
state.loadingData = true;
@@ -415,24 +415,24 @@
// 重置
function reseatTableData() {
state.loadingData = true;
state.currentPage = 1;
state.currentPage = 1;
state.name = '';
state.projectName = undefined;
getData();
}
//分页
const changePaginationStu = (page) => {
state.loadingData = true;
state.currentPage = page;
getData();
};
{/* 导出数据 */}
function exportData() {
window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.stageId}&type=${1}&targetId=${props.datasource.projectId}&taskId=${props.datasource.id}&courseId=${props.datasource.courseId}`)
}
const closeDraw = (e) => {
console.log('我关闭了导入成绩弹框吗', e)
getData();
@@ -456,7 +456,7 @@
},
};
</script>
<style lang="scss">
.ProjectExternalExamManage {
.drawerMain {
@@ -465,7 +465,7 @@
overflow-x: auto;
display: flex;
flex-direction: column;
.header {
height: 73px;
border-bottom: 1px solid #e8e8e8;
@@ -473,7 +473,7 @@
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -481,7 +481,7 @@
line-height: 25px;
}
}
.main {
width: 100%;
height: 100%;
@@ -492,27 +492,27 @@
font-weight: 500;
color: #333333;
}
.search {
width: 100%;
display: flex;
flex-wrap: wrap;
margin-top: 20px;
.namecon {
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.name {
margin-top: 8px;
}
}
.btns {
display: flex;
flex-wrap: nowrap;
.btn {
cursor: pointer;
width: 100px;
@@ -521,7 +521,7 @@
display: flex;
justify-content: center;
align-items: center;
.img1 {
width: 15px;
height: 17px;
@@ -529,7 +529,7 @@
background-size: 100% 100%;
margin-right: 7px;
}
.img2 {
width: 16px;
height: 18px;
@@ -538,26 +538,26 @@
margin-right: 7px;
}
}
.btn1 {
background: #4ea6ff;
color: #ffffff;
}
.btn2 {
background: #4ea6ff;
color: #fff;
border: 1px solid #4ea6ff;
}
}
}
.btnss {
display: flex;
flex-wrap: nowrap;
.btn {
cursor: pointer;
width: 130px;
@@ -566,7 +566,7 @@
display: flex;
justify-content: center;
align-items: center;
.img1 {
width: 15px;
height: 17px;
@@ -574,7 +574,7 @@
background-size: 100% 100%;
margin-right: 7px;
}
.img2 {
width: 17px;
height: 16px;
@@ -583,13 +583,13 @@
margin-right: 7px;
}
}
.btn1 {
background: #4ea6ff;
color: #ffffff;
}
.btn2 {
background: #4ea6ff;
margin-right: 20px;
@@ -597,7 +597,7 @@
border: 1px solid #4ea6ff;
}
}
.line {
width: 100%;
height: 40px;
@@ -607,41 +607,41 @@
align-items: center;
margin-top: 20px;
border: 1px solid #c3e6fc;
.inline {
width: 95%;
height: 100%;
display: flex;
justify-content: space-between;
.left {
height: 100%;
display: flex;
align-items: center;
.img {
width: 14px;
height: 15px;
background-image: url(../../../assets/images/leveladd/gan.png);
background-size: 100% 100%;
}
.text {
color: #999ba3;
}
.text2 {
color: #4ea6ff;
margin-left: 5px;
margin-right: 5px;
}
.text3 {
color: #999ba3;
margin-left: 20px;
}
}
.right {
font-size: 14px;
font-weight: 400;
@@ -653,7 +653,7 @@
}
}
}
.tableBox {
.ant-table-selection-column {
padding: 0px !important;
@@ -670,21 +670,21 @@
.ant-table-selection-column {
padding: 0 !important;
}
th.h {
background-color: #eff4fc !important;
}
.head {
padding-left: 0px !important;
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd;
}
.studentopea1 {
font-size: 14px;
font-weight: 400;
@@ -704,7 +704,7 @@
border-right: 1px solid #e9e9e9;
cursor: pointer;
}
.pa {
margin-top: 15px;
width: 100%;
@@ -713,7 +713,7 @@
}
}
}
.btnn {
height: 72px;
width: 100%;
@@ -725,7 +725,7 @@
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -735,7 +735,7 @@
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;
@@ -750,5 +750,5 @@
}
}
</style>

View File

@@ -133,7 +133,7 @@
:downloadUrl="downloadUrl"
/>
</template>
<script setup>
<script setup lang="jsx">
import {computed, defineEmits, ref, watch} from "vue";
import * as api from "@/api/index1";
import BaseTable from "@/components/common/BaseTable";

View File

@@ -158,7 +158,7 @@
/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import CKWork from "../CheckWork.vue";

View File

@@ -89,7 +89,7 @@
<div class="img1"></div>
<div class="wz">催促学习</div>
</div>
<div class="btn btn2" @click="exportTaskStu" v-if="checkPer(permissions,createId)">
<div class="img2"></div>
<div class="wz">导出数据</div>
@@ -132,7 +132,7 @@
:basicdata="datasource.info" />
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -69,7 +69,7 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px">
<div class="btn btn1" @click="godie" style="margin-right: 20px">
<div class="img1"></div>
<div class="wz">催促学习</div>
@@ -119,7 +119,7 @@
/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -85,7 +85,7 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px" v-if="checkPer(permissions,createId)">
<div class="btn btn1" @click="godie" style="margin-right: 20px">
<div class="img1"></div>
<div class="wz">催促学习</div>
@@ -132,7 +132,7 @@
:basicdata="datasource.info" />
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
import ViewAssess from "../ViewAssess";

View File

@@ -112,7 +112,7 @@
</a-drawer>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -62,7 +62,7 @@
<div class="wz">催促考试</div>
</div>
<div class="btn btn2" @click="exportData">
<div class="img2"></div>
<div class="img2"></div>
<div class="wz">导出数据</div>
</div>
<div class="btn btn2" @click="showEScoreModal">
@@ -91,7 +91,7 @@
:scroll="{ x: 900 }"
:pagination="false"
/>
<div class="pa">
<a-pagination
:showSizeChanger="false"
@@ -114,25 +114,25 @@
</div>-->
</div>
<!-- 导出成绩抽屉 -->
<ExportAchievement
<ExportAchievement
@closeDraw="closeDraw"
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
:type="2"
:targetId="datasource.routerId"
:targetId="datasource.routerId"
:courseId="datasource.courseId"
:taskId="datasource.id"
:chapterId="datasource.chapterId" />
</a-drawer>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import ExportAchievement from "../ExportAchievement.vue";
import * as api from '../../../api/indexTaskManage';
import { batchSendMessage } from "@/api/index1";
import {checkPer} from "@/utils/utils";
// import * as api from "../../../api/index";
export default {
name: "RouterExaminationManage",
@@ -175,7 +175,7 @@
default: null,
},
},
setup(props, ctx) {
const state = reactive({
name: "",
@@ -315,7 +315,7 @@
);
},
},
{
title: "完成时间",
dataIndex: "finishedTime",
@@ -345,7 +345,7 @@
],
loadingData: true
});
const closeDrawer = () => {
ctx.emit("update:ExaminationExaminaModelVisible", false);
state.name = "";
@@ -370,7 +370,7 @@
}
state.selectedRowKeys = selectedRowKeys;
};
//催促学员学习
const godie = () => {
message.destroy();
@@ -403,7 +403,7 @@
console.log('我关闭了导入成绩弹框吗', e)
getData();
}
// 获取数据
function getData() {
state.loadingData = true;
@@ -434,19 +434,19 @@
// 重置
function reseatTableData() {
state.loadingData = true;
state.currentPage = 1;
state.currentPage = 1;
state.name = '';
state.projectName = undefined;
getData();
}
//分页
const changePaginationStu = (page) => {
state.loadingData = true;
state.currentPage = page;
getData();
};
{/* 导出数据 */}
function exportData() {
window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.chapterId}&type=${2}&targetId=${props.datasource.routerId}&taskId=${props.datasource.id}&courseId=${props.datasource.courseId}`)
@@ -470,7 +470,7 @@
},
};
</script>
<style lang="scss">
.RouterExaminationExternalManage {
.drawerMain {
@@ -479,7 +479,7 @@
overflow-x: auto;
display: flex;
flex-direction: column;
.header {
height: 73px;
border-bottom: 1px solid #e8e8e8;
@@ -487,7 +487,7 @@
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -495,7 +495,7 @@
line-height: 25px;
}
}
.main {
width: 100%;
height: 100%;
@@ -506,27 +506,27 @@
font-weight: 500;
color: #333333;
}
.search {
width: 100%;
display: flex;
flex-wrap: wrap;
margin-top: 20px;
.namecon {
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.name {
margin-top: 8px;
}
}
.btns {
display: flex;
flex-wrap: nowrap;
.btn {
cursor: pointer;
width: 100px;
@@ -535,7 +535,7 @@
display: flex;
justify-content: center;
align-items: center;
.img1 {
width: 15px;
height: 17px;
@@ -543,7 +543,7 @@
background-size: 100% 100%;
margin-right: 7px;
}
.img2 {
width: 16px;
height: 18px;
@@ -552,26 +552,26 @@
margin-right: 7px;
}
}
.btn1 {
background: #4ea6ff;
color: #ffffff;
}
.btn2 {
background: #4ea6ff;
color: #fff;
border: 1px solid #4ea6ff;
}
}
}
.btnss {
display: flex;
flex-wrap: nowrap;
.btn {
cursor: pointer;
width: 130px;
@@ -580,7 +580,7 @@
display: flex;
justify-content: center;
align-items: center;
.img1 {
width: 15px;
height: 17px;
@@ -588,7 +588,7 @@
background-size: 100% 100%;
margin-right: 7px;
}
.img2 {
width: 17px;
height: 16px;
@@ -597,13 +597,13 @@
margin-right: 7px;
}
}
.btn1 {
background: #4ea6ff;
color: #ffffff;
}
.btn2 {
background: #4ea6ff;
margin-right: 20px;
@@ -611,7 +611,7 @@
border: 1px solid #4ea6ff;
}
}
.line {
width: 100%;
height: 40px;
@@ -621,41 +621,41 @@
align-items: center;
margin-top: 20px;
border: 1px solid #c3e6fc;
.inline {
width: 95%;
height: 100%;
display: flex;
justify-content: space-between;
.left {
height: 100%;
display: flex;
align-items: center;
.img {
width: 14px;
height: 15px;
background-image: url(../../../assets/images/leveladd/gan.png);
background-size: 100% 100%;
}
.text {
color: #999ba3;
}
.text2 {
color: #4ea6ff;
margin-left: 5px;
margin-right: 5px;
}
.text3 {
color: #999ba3;
margin-left: 20px;
}
}
.right {
font-size: 14px;
font-weight: 400;
@@ -667,7 +667,7 @@
}
}
}
.tableBox {
.ant-table-selection-column {
padding: 0px !important;
@@ -684,21 +684,21 @@
.ant-table-selection-column {
padding: 0 !important;
}
th.h {
background-color: #eff4fc !important;
}
.head {
padding-left: 0px !important;
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd;
}
.studentopea1 {
font-size: 14px;
font-weight: 400;
@@ -718,7 +718,7 @@
border-right: 1px solid #e9e9e9;
cursor: pointer;
}
.pa {
margin-top: 15px;
width: 100%;
@@ -727,7 +727,7 @@
}
}
}
.btnn {
height: 72px;
width: 100%;
@@ -739,7 +739,7 @@
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -749,7 +749,7 @@
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;

View File

@@ -82,7 +82,7 @@
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource1" />
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import EScore from "../ExportScore.vue";

View File

@@ -150,7 +150,7 @@
</a-drawer>
</template>
<script setup>
<script setup lang="jsx">
import {computed, defineEmits, ref, watch} from "vue";
import * as api from "@/api/index1";
import BaseTable from "@/components/common/BaseTable";

View File

@@ -101,7 +101,7 @@
<ExportHomeWork v-model:exportHomeWorkV="exportHomeWorkV" :downloadUrl="downloadUrl" />
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import CKWork from "../CheckWork.vue";

View File

@@ -69,7 +69,7 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px" v-if="checkPer(permissions,createId)">
<div class="btn btn1" @click="godie" style="margin-right: 20px">
<div class="img1"></div>
<div class="wz">催促学习</div>
@@ -120,7 +120,7 @@
/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
import SeeStu from "@/components/drawers/SeeStu";

View File

@@ -69,7 +69,7 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px" v-if="checkPer(permissions,createId)">
<div class="btn btn1" @click="godie" style="margin-right: 20px">
<div class="img1"></div>
<div class="wz">催促学习</div>
@@ -119,7 +119,7 @@
/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -24,7 +24,7 @@
:load-data="onLoadData"
:tree-data="options"
:fieldNames="{
children: 'treeChildList',
children: 'directChildList',
label: 'name',
value: 'id',
}"
@@ -36,8 +36,8 @@
</template>
<script setup>
import { defineEmits, defineProps, ref, watch } from "vue";
import { boeRequest, useBoeApi } from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
import {request, useArrayRequest, useRequest} from "@/api/request";
import {ORG_CHILD_LIST, ORG_LIST} from "@/api/apis";
const props = defineProps({
value: String,
@@ -50,13 +50,9 @@ const props = defineProps({
const emit = defineEmits({});
const stuTreeExpandedKeys = ref([]);
const labelValue = ref({ value: props.value, label: props.name });
const { data: options, loading: orgLoading } = useBoeApi(
const { data: options, loading: orgLoading } = useArrayRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
);
watch(props, () => {
@@ -70,9 +66,9 @@ watch(props, () => {
});
function onLoadData(treeNode) {
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.directChildList = r.data;
options.value = [...options.value];
}
);
@@ -87,7 +83,6 @@ function change(
},
}
) {
console.log("label2222", label, namePath, value);
emit("update:name", label);
emit("update:fullName", namePath);
emit("update:value", value);

View File

@@ -37,8 +37,8 @@
</template>
<script setup>
import {defineEmits, defineProps, ref, watch, watchEffect} from "vue";
import { boeRequest, useBoeApi } from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
import {request, useRequest,useArrayRequest} from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/apis";
const props = defineProps({
value: {
@@ -57,13 +57,9 @@ const props = defineProps({
const emit = defineEmits({});
const stuTreeExpandedKeys = ref([]);
const labelValue = ref([]);
const { data: options, loading: orgLoading } = useBoeApi(
const { data: options, loading: orgLoading } = useArrayRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
);
watchEffect(()=>{
@@ -84,9 +80,9 @@ watch(props, () => {
});
function onLoadData(treeNode) {
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.treeChildList = r.data;
options.value = [...options.value];
}
);

View File

@@ -28,8 +28,8 @@
</template>
<script setup>
import {computed, defineEmits, defineProps, onMounted, ref, watch} from "vue";
import {useBoeUserListPage} from "@/api/request";
import {USER_LIST} from "@/api/ThirdApi";
import {useThrottlePage} from "@/api/request";
import {USER_LIST} from "@/api/apis";
const props = defineProps({
value: {
@@ -56,9 +56,9 @@ const emit = defineEmits({})
const isOpen = ref(false)
const memberParam = ref({keyword: '', page: 1, pageSize: 20})
const memberParam = ref({keyword: '', pageNo:1, pageSize: 20})
const {data: userList, loading} = useBoeUserListPage(USER_LIST, memberParam.value, false)
const {data: userList, loading} = useThrottlePage(USER_LIST, memberParam.value, false)
const options = computed(() => userList.value.filter(e => !(props.value + '').includes(e.id)).map(e => ({
label: e.realName + e.userNo,
@@ -83,7 +83,7 @@ onMounted(() => {
const memberScroll = ({target: {scrollHeight, scrollTop, clientHeight}}) => {
scrollHeight === (clientHeight + scrollTop) && memberParam.value.page++
scrollHeight === (clientHeight + scrollTop) && memberParam.value.pageNo++
};
//搜索学员
@@ -92,19 +92,20 @@ const searchMember = (keyword) => {
loading.value = true
isOpen.value = true
userList.value = []
memberParam.value.page = 1
memberParam.value.pageNo = 1
memberParam.value.keyword = keyword
console.log('searchMember', memberParam.value)
};
function blur() {
isOpen.value = false
memberParam.value.keyword = ''
memberParam.value.page = 1
memberParam.value.pageNo = 1
}
function change(e, l) {
memberParam.value.keyword = ''
memberParam.value.page = 1
memberParam.value.pageNo = 1
isOpen.value = false
Array.isArray(l) && (selectOptions.value = l)
Array.isArray(selectOptions.value) && emit('onChange', e, l, selectOptions.value.find(e => e.departId)?.departId, selectOptions.value.find(e => e.departId)?.departName, selectOptions.value.find(e => e.departId)?.orgName)

View File

@@ -75,8 +75,8 @@
margin: 0px 4px 120px 10px;
border: 1px solid #f0f0f0;
">
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="page"
:request="useBoeApiUserInfoPage" v-model:params="nameSearch"
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="pageNo"
v-model:params="nameSearch" :request="useNewRowsPageNoInit"
v-model:selectedRows="stuSelectRows" type="checkbox"></BaseTable>
</div>
</div>
@@ -131,8 +131,8 @@
</a-form-item>
</div>
<div class="tableBox tabb">
<BaseTable ref="auditTableRef" :columns="audiColums" :url="AUDIENCE_LIST" page-key="page"
:request="useBoeApiAuditPage" v-model:params="audienceName"
<BaseTable ref="auditTableRef" :columns="audiColums" :url="AUDIENCE_LIST" page-key="pageNo"
v-model:params="audienceName" :request="useTotalPage"
v-model:selectedRows="auditSelectRows" v-model:selectedRowKeys="auditSelectRowKeys"
type="checkbox"></BaseTable>
</div>
@@ -296,19 +296,13 @@
<script setup>
import {message} from "ant-design-vue";
import {computed, defineEmits, defineProps, ref, watch} from "vue";
import {boeRequest, useBoeApi, useBoeApiPage, useBoeApiUserInfoPage, useBoeApiAuditPage} from "@/api/request";
import {
ORG_CHILD_LIST,
ORG_LIST,
USER_LIST_PAGE,
AUDIENCE_LIST,
} from "@/api/ThirdApi";
import {useNewRowsPageNoInit, request, useRequest, useTotalPage} from "@/api/request";
import {
saveStu,
} from "@/api/index1";
import dialog from "@/utils/dialog";
import BaseTable from "@/components/common/BaseTable";
import {STUDENT_LIST} from "@/api/apis";
import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, STUDENT_LIST, USER_LIST_PAGE} from "@/api/apis";
const emit = defineEmits({});
const props = defineProps({
@@ -392,7 +386,7 @@ const stageId = ref();
const nameSearch = ref({
keyword: "",
departId: null,
departId: '',
});
const stuTreeSelectKeys = ref([]);
const stuTreeExpandedKeys = ref([]);
@@ -401,30 +395,22 @@ const audienceName = ref({
});
const searchOrgName = ref({
keyword: "",
page: 1,
pageNo: 1,
pageSize: 10,
});
const stageIds = computed(() => props.stage);
const { data: orgData, fetch: searchOrg } = useBoeApiPage(
const { data: orgData, fetchData: searchOrg } = useRequest(
ORG_LIST,
searchOrgName.value
searchOrgName.value,
);
const { data: treeData, loading: orgLoading } = useBoeApi(
const { data: treeData, loading: orgLoading } = useRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
);
const { data: treeOrgData, loading: orgOrgLoading } = useBoeApi(
const { data: treeOrgData, loading: orgOrgLoading } = useRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
);
const projectStuColumns = ref([
@@ -521,14 +507,6 @@ const audiColums = ref([
align: "center",
className: "h",
},
{
title: "类型",
dataIndex: "audienceType",
key: "audienceType",
width: 40,
align: "center",
className: "h",
},
]);
const orgSelectKeys = ref([]);
const auditTableRef = ref();
@@ -553,18 +531,18 @@ function searchAudi() {
}
function onLoadData(treeNode) {
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.treeChildList = r.data;
treeData.value = [...treeData.value];
}
);
}
function onLoadOrgData(treeNode) {
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.treeChildList = r.data;
treeOrgData.value = [...treeOrgData.value];
}
);
@@ -605,7 +583,7 @@ function onOrgSelectChange(e, l) {
const resetStu = () => {
nameSearch.value.keyword = "";
stuTableRef.value.reset({ keyword: "", departId: null });
stuTableRef.value.reset({ keyword: "", departId: '' });
};
//清空选择部门信息
const deleteDepSelect = () => {
@@ -675,7 +653,7 @@ watch(visiable, () => {
orgSelectKeys.value = [];
deptList.value = [];
audienceName.value.keyword = "";
nameSearch.value.departId = null;
nameSearch.value.departId = '';
stuTreeExpandedKeys.value = [];
stuTreeSelectKeys.value = [];
activeKey.value = props.isGroup ? 4 : 1;
@@ -689,7 +667,7 @@ watch(visiable, () => {
auditTableRef.value && auditTableRef.value.clear();
auditTableRef.value && auditTableRef.value.reset({ keyword: "" });
stuTableRef.value && stuTableRef.value.clear();
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: null });
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: '' });
projectStuTableRef.value && projectStuTableRef.value.clear();
projectStuTableRef.value && projectStuTableRef.value.reset({ pid: props.infoId, type: props.infoType, studentName: "" });
}

View File

@@ -51,7 +51,7 @@
<a-button
class="cus-btn"
style="background: #4ea6ff; color: #fff; width: 100px"
@click="getStuList"
@click="search"
:loading="stuAsyncLoading"
>
<template #icon>
@@ -603,6 +603,11 @@ function showChangeGroupModal() {
checkgroupParam.value.checkBatch = true;
}
function search(){
tableParam.value.pageNo = 1
getStuList()
}
// 导出数据
function exportTaskStu() {
console.log("props.datasource", props);

View File

@@ -22,6 +22,7 @@
<a-upload
v-show="!item.imgVal"
class="in uploadBtn"
:headers="headers"
:show-upload-list="false"
:before-upload="beforeUpload"
>
@@ -50,6 +51,7 @@
import { reactive, toRefs, ref } from "vue";
import { message } from "ant-design-vue";
import { fileUp } from "../../api/indexEval";
import {getCookieForName} from "@/api/method";
export default {
name: "VoteQuestionItem",
@@ -66,6 +68,7 @@ export default {
const state = reactive({
hasImgName: "",
});
const headers = { token: getCookieForName("token") };
const handleInput = (value) => {
console.log(value.target.value);
@@ -121,6 +124,7 @@ export default {
handleDel,
handleCancel,
beforeUpload,
headers,
};
},
};

View File

@@ -13,7 +13,7 @@
<div class="delete" @click="handleDel">删除</div>
</div>
<div class="name uploadContent">
<a-upload v-show="!formData.optionPictureAddress" class="in uploadBtn" :show-upload-list="false" :before-upload="beforeUpload">
<a-upload v-show="!formData.optionPictureAddress" class="in uploadBtn" :headers="headers" :show-upload-list="false" :before-upload="beforeUpload">
<div class="addimg">+添加图片</div>
</a-upload>
<div v-show="formData.optionPictureAddress" class="picture" style="position: relative">
@@ -35,13 +35,14 @@
import { defineEmits, defineProps, ref } from "vue";
import { message } from "ant-design-vue";
import { fileUp } from "../../api/indexEval";
import {getCookieForName} from "@/api/method";
const props = defineProps({
item: {},
index: Number
})
const emit = defineEmits(['del'])
const headers = { token: getCookieForName("token") };
const formData = ref(props.item)
const beforeUpload = (file) => {

33
src/hooks/useDownload.js Normal file
View File

@@ -0,0 +1,33 @@
import http from "@/api/configSys";
/**
* @param {String} url [请求的url地址]
* @param {Object} params [参数]
* @param {String} fileName [导出文件名称] 默认值 导出文件
* @param {String} fileType [导出文件类型] 默认值 xls
* @param {string} mimeType [导出文件类型]
*/
const useDownload = (url, params = {}, fileName = '导出文件', fileType = 'xls', mimeType = 'application/vnd.ms-excel;charset=UTF-8') => {
return new Promise((resolve, reject) => {
http.post(url, params, { responseType: 'blob' })
.then(res => {
resolve(res.data);
if (!res.data) {
return
}
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res.data], { type: mimeType }); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", `${fileName}.${fileType}`);
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href);
document.body.removeChild(link);
})
.catch(err => {
reject(err.data);
})
});
}
export default useDownload

View File

@@ -16,6 +16,10 @@ import 'element-plus/dist/index.css'
import "@/assets/scss/common.scss"
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import {request} from "@/api/request";
import {USER_INFO, USER_PERMISSION, VALIDATE_TOKEN} from "@/api/apis";
import * as api1 from "@/api/index1";
import {getCookieForName} from "@/api/method";
// import axios from 'axios'
// axios.defaults.withCredentials = true;
// import zhCN from 'ant-design-vue/es/locale/zh_CN';
@@ -25,7 +29,51 @@ app.config.warnHandler = () => null;
// app.use(ElementPlus, {
// locale: zhCn,
// })
router.beforeEach(async (to, from, next) => {
if (!getCookieForName("token")) {
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
return
}
//第一次进入 没有用户信息
if(!store.state.userInfo.userId){
try{
await request(VALIDATE_TOKEN)
await getUserInfo()
await getUserPermission();
init()
}catch (e){
console.log('token失效 跳转到登录页')
}
}
next();
})
app.use(Antd);
app.use(router);
app.use(store);
app.mount('#app');
async function getUserPermission() {
return request(USER_PERMISSION, {permissionType: 'PAGE'}).then(res => {
store.commit("SET_PERMISSION", res.data?.map(s => s.url));
})
}
async function getUserInfo() {
const userInfo = await request(USER_INFO);
store.commit("SET_USER", userInfo.data);
}
async function initDict(key) {
const list = await getDictList(key);
store.commit("SET_DICT", {key, data: list});
}
const getDictList = (param) => api1.getDictTree({code: param,}).then((res) => res.data.data);
async function init() {
initDict("content_type"); //内容分类
initDict("project_level"); //项目级别
initDict("project_sys"); //培训分类
initDict("project_pic"); //项目封面
initDict("router_pic"); //路径图封面
initDict("course_pic"); //课程封面
initDict("job_type"); //岗位
initDict("band"); //band
}

View File

@@ -28,11 +28,20 @@ export function traverseArr(arr, traverseObj, saveOld = false) {
return newArr;
}
// const admin = [5, 6, 8, 9, 11, 12];
const admin = [5, 6, 8, 9, 11, 12];
//检查 管理权和归属权
export function checkPer() {
return true;
export function checkPer(per,createId) {
if (createId && store?.state?.userInfo?.id === createId) {
return true;
}
if (store?.state?.userInfo?.isSystemAdmin) {
return true;
}
if (per) {
return (per + "").split(",").some(t => admin.some(s => s == t));
}
return false;
}
const adminOwner = [6, 9, 12];

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,7 @@
frameborder="0"
name="myframe"
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups allow-downloads"
></iframe>
</div>
</template>

View File

@@ -0,0 +1,779 @@
<!-- 评估管理页面 -->
<template>
<div class="researchmanage">
<!-- 搜索框及按钮 -->
<div class="filter">
<div class="filterItems">
<div class="select">
<a-input v-model:value="searchData.recommendName" style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名" />
</div>
<div class="select">
<div class="select addTimeBox">
<div class="addTime">推荐时间</div>
<a-range-picker v-model:value="recommendTimeList" style="width: 420px" @change="timeChange"
format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" separator="至" :placeholder="[' 开始时间', ' 结束时间']" />
</div>
</div>
<div style="display: flex; margin-bottom: 20px">
<div class="btn btn1" @click="getList(1)">
<div class="search"></div>
<div class="btnText">搜索</div>
</div>
<div class="btn btn2" @click="handleRest" style="width: 105px">
<div class="search"></div>
<div class="btnText">重置</div>
</div>
</div>
</div>
<div class="btns">
<div class="btn btn3" @click="handleNew">
<div class="search"></div>
<div class="btnText">发起推荐</div>
</div>
</div>
</div>
<!-- 搜索框及按钮 -->
<!-- 表格 -->
<div class="tableBox">
<a-table style="border: 1px solid #f2f6fe" :columns="column" :data-source="state.data" :loading="!loading"
:scroll="{ x: 1100 }" :pagination="false">
<template #operation="{ record }">
<a-space style="padding-right: 10px">
<a-button @click="downloadInfo(record)" type="link">信息下载
</a-button>
<a-button @click="() => handleOper(record, 'withdraw', record.pushProgress)" type="link">
{{ state.status[record.pushProgress] }}
</a-button>
<a-button @click="handleOper(record, 'del')" type="link">删除
</a-button>
</a-space>
</template>
</a-table>
</div>
<div class="pa" style="display: flex; justify-content: flex-end; padding: 0 38px">
<a-pagination show-quick-jumper :pageSize="searchData.pageSize" :current="searchData.pageIndex" :total="state.total"
class="pagination" @change="handelChangePage" show-size-changer />
</div>
<InitiateRecommend v-model:visible="newNext" :title="添加案例"></InitiateRecommend>
</div>
</template>
<script setup lang="jsx">
import { ref, onMounted, reactive, watch } from "vue";
import { Form, message } from "ant-design-vue";
import { boeRequest } from "@/api/request";
import useDownload from '@/hooks/useDownload'
import {
RECOMMEND_PAGE,
deleteResearch,
caseInfoDownload,
rePushOrWithdraw,
} from "@/api/case";
import dialog from "@/utils/dialog";
import InitiateRecommend from "@/components/drawers/InitiateRecommend.vue";
import { checkMenu } from "@/utils/utils";
const column = [
{
title: "推荐人",
dataIndex: "recommendBy",
key: "recommendBy",
width: "10%",
align: "center",
ellipsis: true,
className: "h",
customRender: ({ text }) => {
return text ? text : "-";
},
},
{
title: "推荐时间",
dataIndex: "recommendTime",
key: "recommendTime",
width: "10%",
align: "center",
className: "h",
customRender: ({ text }) => {
return text ? text : "-";
},
},
{
title: "案例数",
dataIndex: "caseCount",
key: "caseCount",
width: "10%",
align: "center",
className: "h",
customRender: ({ text }) => {
return text ? text : "-";
},
},
{
title: "用户数",
dataIndex: "userCount",
key: "userCount",
width: "10%",
align: "center",
className: "h",
customRender: ({ text }) => {
return text ? text : "-";
},
},
{
title: "推送进度",
dataIndex: "pushProgress",
key: "pushProgress",
width: "10%",
align: "center",
className: "h",
customRender: ({ text }) => {
switch (text) {
case 1:
return <span>推送中</span>;
case 2:
return <span>推送中</span>;
case 3:
return <span>已完成</span>;
case 4:
return <span style={{ color: "red" }}>推送失败</span>;
case 5:
return <span>推送撤回</span>;
default:
return <span>-</span>;
}
},
},
{
title: "查看率",
dataIndex: "viewRate",
key: "viewRate",
width: "10%",
align: "center",
className: "h",
customRender: ({ text }) => {
return text ? text : "0%";
},
},
];
const authenticationColumn = {
title: "操作",
width: "20%",
className: "h",
dataIndex: "id",
key: "id",
fixed: "right",
align: "center",
slots: { customRender: "operation" },
}
const state = reactive({
data: [],
total: 0,
status: {
1: "撤回",
2: "撤回",
3: "撤回",
4: "重新推送",
5: "重新推送",
},
});
// 查询数据
const searchData = ref({
pageIndex: 1,
pageSize: 10,
recommendName: "",
recommendTimeList: [],
});
const newNext = ref(false);
const recommendTimeList = ref([]);
const loading = ref(false);
watch(newNext, (value) => {
if (!value) {
searchData.value.pageIndex = 1;
getList()
}
})
const getList = (num) => {
if (num === 1) searchData.value.pageIndex = 1;
boeRequest(RECOMMEND_PAGE, searchData.value)
.then((res) => {
loading.value = true;
state.data = res?.result?.list || [];
state.total = res?.result?.totalPages || 0;
})
.catch(() => {
loading.value = false;
});
};
// 获取列表数据
getList();
onMounted(() => {
// 是否需要触发新建弹框
let str = location.href;
let isOpen = str.includes("openCreate=true");
if (isOpen) {
newNext.value = true;
}
column.push(authenticationColumn)
});
const { resetFields } = Form.useForm(searchData, {});
const handle = (record) => ({
withdraw: async () => {
try {
// editReleaseStatus({ assessmentId: record.id, releaseStatus: 1 });
await rePushOrWithdraw({ casesRecommendId: record.id });
getList();
} catch (error) {
message.info("推送失败!");
}
},
del: async () => {
loading.value = true;
await deleteResearch({ id: record.id })
.then(() => {
message.info("删除成功!");
getList();
})
.catch(() => (loading.value = false));
},
});
const handleMsg = {
del: "你确定要删除这条案例吗?",
withdraw1: "你确认要撤回此次推送吗?",
withdraw2: "你确认要撤回此次推送吗?",
withdraw3: "你确认要撤回此次推送吗?",
withdraw4: "您确定要重新推送此案例吗?",
withdraw5: "您确定要重新推送此案例吗?",
};
function handleOper(record, type, status = '') {
dialog({ content: handleMsg[status ? type + status : type], ok: handle(record)[type] });
}
// 信息下载
const downloadInfo = (record) => {
try {
useDownload('/xboe/m/boe/cases/recommend/info_download', { casesRecommendId: record.id }, '案例信息')
} catch (error) {
console.log(error);
}
};
const handelChangePage = (page, pageSize) => {
loading.value = false;
searchData.value.pageSize = pageSize;
searchData.value.pageIndex = page;
getList();
};
function timeChange(time, timeStr) {
searchData.value.recommendTimeList = time ? time : [];
}
const handleRest = () => {
recommendTimeList.value = [];
resetFields();
getList();
};
const handleNew = () => {
newNext.value = true;
};
</script>
<style lang="scss">
.clearfix:before,
.clearfix:after {
content: " ";
display: block;
clear: both;
}
.addTimeBox {
position: relative;
display: flex;
align-items: center;
.addTime {
position: absolute;
z-index: 10;
margin-left: 10px;
color: rgba(0, 0, 0, 0.4);
}
.ant-picker {
padding-left: 85px;
}
.ant-picker-range .ant-picker-active-bar {
margin-left: 85px;
}
}
.out {
//display: flex;
display: block;
position: absolute;
width: 680px;
// height: 525px;
background-color: #fff;
box-shadow: 0 0 10px rgba(118, 136, 166, 0.21);
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
.top {
width: 100%;
height: 68px;
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
display: flex;
align-items: center;
.topimg {
width: 18px;
height: 18px;
margin-left: 27px;
}
.topc {
color: #000000;
font-size: 16px;
margin-left: 8px;
}
}
.mid {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
.d {
// margin-top: 8px;
// color: #ff4e4e;
margin-left: -5px;
}
.name {
width: 78%;
// background-color: lightcoral;
display: flex;
margin-top: 20px;
align-items: center;
height: 40px;
// border: 1px solid black;
.inname {
color: #6f6f6f;
font-size: 14px;
margin-left: 7px;
}
.in {
margin-left: 14px;
width: 81%;
.ant-input {
border-radius: 5px;
// height: 120%;
width: 100%;
height: 30px;
}
.showcount {
position: absolute;
right: 10px;
color: #c7cbd2;
bottom: 5px;
}
}
}
.btn {
width: 33%;
margin-top: 30px;
display: flex;
justify-content: space-between;
margin-bottom: 30px;
.samtn {
width: 100px;
height: 40px;
font-size: 14px;
border: 1px solid #4ea6ff;
border-radius: 8px;
cursor: pointer;
}
.btn1 {
background-color: #fff;
color: #4ea6ff;
}
.btn2 {
margin-left: 10px;
background-color: #4ea6ff;
color: #fff;
}
}
}
}
.researchmanage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
.filter {
margin-left: 38px;
margin-right: 38px;
margin-top: 30px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.filterItems {
display: flex;
flex-wrap: wrap;
.select {
margin-right: 20px;
margin-bottom: 20px;
}
.btn {
padding: 0 26px 0 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
}
}
.btnn {
padding: 0 26px 0 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #fff;
line-height: 36px;
margin-left: 5px;
}
}
.btn1 {
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2 {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset0.png");
}
}
// .btn1:hover {
// background: rgba(64, 158, 255, 0.76);
// .search {
// background-image: url("../../assets/images/courseManage/search0.png");
// }
// .btnText {
// color: #ffffff;
// }
// }
.btn1:active {
background: #0982ff;
}
// .btn2:hover {
// background: rgba(64, 158, 255, 0.1);
// }
.btn2:active {
background: rgba(64, 158, 255, 0.2);
}
}
.btns {
display: flex;
.btn {
padding: 0 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
//border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
}
}
.btn3 {
margin-right: 0;
.search {
width: 17px;
height: 18px;
background-image: url("../../assets/images/courseManage/add0.png");
}
}
// .btn3:hover {
// background: rgba(64, 158, 255, 0.76);
// .search {
// background-image: url("../../assets/images/courseManage/add0.png");
// }
// .btnText {
// color: #ffffff;
// }
// }
.btn3:active {
background: #0982ff;
}
}
}
.tableBox {
margin: 20px 38px 30px;
display: flex;
flex: 1;
flex-direction: column;
th.ant-table-cell {
background-color: #eff4fc !important;
text-align: center;
color: #999ba3;
}
td.ant-table-cell {
text-align: center;
}
}
.pa {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 20px;
.pagination {
margin-bottom: 20px;
}
.ant-pagination-item-link,
.ant-pagination-item,
.ant-select-selector,
.ant-pagination-options-quick-jumper input {
border-radius: 8px;
}
}
.unout {
display: none;
}
.operation {
display: flex;
justify-content: right;
.fb {
display: flex;
margin-right: 20px;
.jc {
color: #4ea6ff;
font-size: 14px;
margin-left: 20px;
white-space: nowrap;
cursor: pointer;
}
}
}
}
.DelModal {
.ant-modal {
.ant-modal-content {
width: 424px !important;
.ant-modal-body {
.delete {
z-index: 9999;
width: 424px;
background: #ffffff;
box-shadow: 0 1px 35px 0 rgba(118, 136, 166, 0.21);
border-radius: 4px;
position: absolute;
left: 50%;
top: 10%;
transform: translate(-50%, -50%);
.del_header {
position: absolute;
width: calc(100%);
height: 40px;
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
}
.del_main {
width: 100%;
position: relative;
.header {
display: flex;
align-items: center;
padding-top: 20px;
padding-left: 26px;
font-size: 16px;
.del-icon {
width: 16px;
height: 16px;
position: relative;
margin-right: 10px;
img {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-size: 100% 100%;
}
}
.icon {
width: 16px;
height: 16px;
margin-right: 10px;
background-image: url(@/assets/images/coursewareManage/QR.png);
background-size: 100% 100%;
}
.close_exit {
position: absolute;
right: 42px;
cursor: pointer;
width: 20px;
height: 20px;
background-image: url(@/assets/images/coursewareManage/close.png);
background-size: 100% 100%;
}
}
.body {
width: 100%;
margin: 34px auto 56px auto;
display: flex;
justify-content: center;
align-items: center;
}
.del_btnbox {
display: flex;
margin: 30px auto;
justify-content: center;
.del_btn {
width: 100px;
height: 40px;
background: rgba(64, 158, 255, 0);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 40px;
}
}
.btn1 {
border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff;
}
.btn2 {
background-color: #4ea6ff;
color: #ffffff;
}
}
}
}
}
}
}
}
</style>

View File

@@ -367,9 +367,7 @@
>管理
</a-button>
<DropDown
v-if="
checkPer(record.permissions,createId) && checkOwner(record.permissions)
"
v-if="checkOwner(record.permissions)"
value="授权"
>
<OwnerTableModelStudent :types="[10, 11, 12]" :id="record.id" :type="12"
@@ -2213,7 +2211,16 @@ export default defineComponent({
return text ? text : "-";
},
},
{
title: "关键字",
dataIndex: "tips",
key: "tips",
align: "left",
customCell :() => {return {style: {maxWidth: '200px',overflow: 'hidden',whiteSpace: 'nowrap',textOverflow:'ellipsis',cursor:'pointer'}}},
customRender: ({ text }) => {
return <a-tooltip placement="topLeft" title = {text} >{text ? text : "-"}</a-tooltip>
},
},
{
title: "内容分类",
width: 130,
@@ -3314,6 +3321,7 @@ export default defineComponent({
};
const handleSearchTable3 = () => {
state.manageStuLoading = true;
state.currentPage222 = 1
getCourseStudentList();
};
@@ -3408,7 +3416,7 @@ export default defineComponent({
console.log("开课res", res);
const { rows, total, pageNo } = res.data.data;
state.tableDataTotal222 = total;
state.tableDataTotal2 = total;
state.tableDataTotal2 = total;
for (let i = 0; i < rows.length; i++) {
rows[i].num = i + 1 + (state.currentPage222 - 1) * 10;
@@ -3703,7 +3711,8 @@ export default defineComponent({
offcourseId: state.offcourseId,
id: state.offcoursePlanId, //开课ID,不传代表新增
address: state.xjkkinputV2,
duration: state.duration,
// duration: state.duration,
duration: durationText.value,
applyFlag: state.checked1 ? 1 : 0,
attach: state.attach,
beginTime: startTime,
@@ -3756,6 +3765,9 @@ export default defineComponent({
//编辑开课
const handelEditStu = async (item) => {
if (item.expenseStatus && item.expenseStatus !== 'A10' && item.expenseStatus !== 'S00') {
return message.warning("该开课已在审批流程中,不可进行编辑!");
}
state.offcourseId = item.offcourseId;
state.itemType = item.type;
state.offcoursePlanId = item.id;
@@ -3777,7 +3789,7 @@ export default defineComponent({
// }
console.log("获取面授课开课详情", item);
state.xjkkinputV2 = item.address;
state.duration = item.duration;
// state.duration = item.duration;
state.checked1 = item.applyFlag === 1 ? true : false;
state.attach = item.attach;
@@ -4258,6 +4270,9 @@ export default defineComponent({
delete_exit1();
};
const handleDeleteKaike = (value) => {
if (value.expenseStatus && value.expenseStatus !== 'A10' && value.expenseStatus !== 'S00') {
return message.warning("该开课已在审批流程中,不可进行删除!");
}
state.offcoursePlanId = value.id;
state.delete_hs = true;
@@ -4559,6 +4574,8 @@ export default defineComponent({
console.log(state.kk_inputV1);
console.log(state.kk_inputV2);
console.log(state.selectTime);
state.pageSize222 = 1
state.currentPage1 = 1
getTableDate();
getTableDate3();
};
@@ -4568,6 +4585,8 @@ export default defineComponent({
state.selectTime = "";
state.currentPage2 = 1;
state.tableDataTotal2 = [];
state.pageSize222 = 1
state.currentPage1 = 1
getTableDate();
getTableDate3();
};

View File

@@ -612,6 +612,7 @@
<div class="item_inp">
<a-upload
multiple
:headers="headers"
:show-upload-list="false"
:before-upload="beforeUpload2"
>
@@ -1051,6 +1052,7 @@
<div class="item_inp">
<a-upload
multiple
:headers="headers"
:show-upload-list="false"
:before-upload="beforeUpload2"
>
@@ -1810,7 +1812,7 @@
@focus="focus"
@change="handleChange"
>
</a-select>
</div>
<div class="bm_input">
@@ -2356,6 +2358,7 @@
<a-upload
name="file"
:show-upload-list="false"
:headers="headers"
:before-upload="beforeUpload3"
>
<div class="upload_box">
@@ -3142,6 +3145,7 @@ import ProjectManager from "@/components/project/ProjectManagerNew";
import SeeModal from "./components/seeModal.vue";
import * as moment from "moment";
import {getCookieForName} from "@/api/method";
//列表表格
const columns1 = [
@@ -3923,7 +3927,7 @@ export default defineComponent({
assessmentName: "",
assessmentVisible: false,
});
const headers = { token: getCookieForName("token") };
const showStuAdd = (record) => {
state.selectCourseId = record.offcoursePlanId;
state.shipType = 2;
@@ -5690,6 +5694,7 @@ export default defineComponent({
};
return {
...toRefs(state),
headers,
getdateToDateFn,
moment,
getdateToTimeFn,

View File

@@ -199,7 +199,7 @@
</div>
<div class="mbl_items" v-if="detail.tips">
<div class="item_nam">
<span style="margin-right: 14px">内容标签</span>
<span style="margin-right: 14px">关键字</span>
</div>
<div class="item_inp">
{{ filterTxt(detail.tips) }}

View File

@@ -328,7 +328,7 @@
<div class="mb_right">
<div class="mbl_items">
<div class="item_nam">
<span style="margin-right: 14px">内容标签</span>
<span style="margin-right: 14px">关键字</span>
</div>
<div class="item_inp">
@@ -339,7 +339,7 @@
<a-input
v-model:value="tags_val_single"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入内容标签按回车键添加内容标签,可添加多个内容标签。"
placeholder="请输入关键字按回车键添加关键字,可添加多个关键字。"
@pressEnter="handleTagChange"
/>
<img

View File

@@ -120,7 +120,7 @@
>编辑</a-button
> -->
<a-button @click="manage(record.id)" type="link">管理</a-button>
<DropDown v-if="checkPer(record.permissions)" value="授权">
<DropDown v-if="checkOwner(record.permissions)" value="授权">
<OwnerTableModelStudent
:types="[7, 8, 9]"
:id="record.id"
@@ -753,7 +753,8 @@ import OrgClass from "@/components/project/OrgClass";
import NameInput from "@/components/project/NameInput";
import { validateName } from "@/api/index1";
import DropDown from "@/components/common/DropDown";
import { checkPer } from "@/utils/utils";
import { checkPer ,checkOwner} from "@/utils/utils";
export default {
name: "learningPath",
@@ -1612,6 +1613,7 @@ export default {
showLearnBgMore,
closeLearnBgMore,
checkPer,
checkOwner,
getLearnPathInfo,
};
},

View File

@@ -685,6 +685,7 @@
v-if="docChecked == true"
v-model:file-list="fileList"
name="file"
:headers="headers"
:action="uploadAction"
@change="handleChange"
>
@@ -1415,6 +1416,7 @@ import ImpoterGroupLeader from "@/components/drawers/project/ImpoterGroupLeader.
import TaskImpStu from "../../components/drawers/TaskFaceIn";
import { checkPer,fixDoublePer } from "@/utils/utils";
import {getCookieForName} from "@/api/method";
export default {
name: "LevelAdd",
@@ -1446,6 +1448,7 @@ export default {
const router = useRouter();
const route = useRoute();
const stuRef = ref();
const headers = { token: getCookieForName("token") };
// const store = useStore();
const state = reactive({
createId: null,
@@ -2911,6 +2914,7 @@ export default {
...toRefs(state),
...toRefs(levelList),
stuRef,
headers,
clearChooseStu,
showDeleteALLModal,
closeDeleteALLModal,

View File

@@ -24,7 +24,7 @@
>
<div :style="{ fontSize: '24px', paddingBottom: '30px' }">用户登录</div>
<div>
<a-input placeholder="用户名" v-model:value="form.account" />
<a-input placeholder="用户名" v-model:value="form.username" />
<a-input
placeholder="密码"
v-model:value="form.password"
@@ -51,7 +51,7 @@ export default {
const state = reactive({
form: {
// account: "00004409",
account: "10181457",
username: "10181457",
password: "1234567890Aa",
},
});

View File

@@ -104,6 +104,7 @@
class="avatar-uploader"
:show-upload-list="false"
action="/api/file/upload"
:headers="headers"
:before-upload="beforeUpload"
@change="handleChange"
:disabled="viewDetail ? true : false"
@@ -401,7 +402,7 @@ import { useRouter, useRoute } from "vue-router";
import dayjs from "dayjs";
import * as api from "../../api/index";
import * as api1 from "../../api/index1";
import { toDate, scrollLoad } from "../../api/method";
import {toDate, scrollLoad, getCookieForName} from "../../api/method";
import { useStore } from "vuex";
export default {
name: "projectAdd",
@@ -413,7 +414,7 @@ export default {
const isEdit = ref(false);
let peojectID = "";
let paraentID = "";
const headers = { token: getCookieForName("token") };
const state = reactive({
classifySelect: null,
classifySelectId: null,
@@ -1040,7 +1041,7 @@ export default {
uplodaFileCount,
createProject,
removeFile,
headers,
isEdit,
backPage,
dateFormatList,

View File

@@ -606,6 +606,7 @@
v-model:file-list="fileList"
name="file"
:action="uploadAction"
:headers="headers"
@change="handleChange2"
>
<span
@@ -759,6 +760,7 @@ import {useRoute, useRouter} from "vue-router";
import {scoreRule, setScoreRule} from "@/api/indexTaskadd";
import ProjectLevel from "@/components/project/ProjectLevel";
import TrainClass from "@/components/project/TrainClass";
import {getCookieForName} from "@/api/method";
export default defineComponent({
name: "LibraryAdd",
@@ -924,6 +926,8 @@ export default defineComponent({
editFlag: false,
uploadAction: process.env.VUE_APP_BASE_API + '/file/uploadunlimit'
});
const headers = { token: getCookieForName("token") };
const value = ref("");
const textnum = "150";
const routered = useRouter();
@@ -1397,6 +1401,7 @@ export default defineComponent({
return {
...toRefs(state),
headers,
value,
projectId,
textnum,

View File

@@ -160,7 +160,7 @@
>撤回发布</a-button
>
<a-button v-if="record.type === 3" @click="baseInfo(record)" type="link">管理</a-button>
<DropDown v-if="checkPer(record.permissions) && checkOwner(record.permissions)" value="授权">
<DropDown v-if="checkOwner(record.permissions)" value="授权">
<OwnerTableModelStudent
:types="[4, 5, 6]"
:id="record.id"

View File

@@ -1337,6 +1337,7 @@
"
v-model:file-list="fileList"
name="file"
:headers="headers"
:action="uploadAction"
@change="handleChange"
>
@@ -2309,7 +2310,7 @@ import { message, Modal } from "ant-design-vue";
import * as apitl from "../../api/index";
import { getTask } from "../../api/indexTaskadd";
import { editProjDoc } from "../../api/indexTaskadd";
import { toDate } from "../../api/method";
import {getCookieForName, toDate} from "../../api/method";
import projSet from "../../components/Modals/projSet";
import { overview } from "../../api/indexProjStu";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
@@ -2362,6 +2363,8 @@ export default {
setup() {
const store = useStore();
const route = useRoute();
const headers = { token: getCookieForName("token") };
const state = reactive({
createId: "",
permissions: "",
@@ -4912,6 +4915,7 @@ export default {
return {
...toRefs(state),
...toRefs(levelList),
headers,
stageChange,
showStudent,
settingTopFlag,

View File

@@ -68,7 +68,7 @@ shan<!-- 评估管理页面 -->
<a-space style="padding-right: 10px">
<a-button
v-if="
record.releaseStatus === '1' && checkPer(record.permissions)
record.releaseStatus === '1'
"
@click="handleOper(record, 'push')"
type="link"
@@ -76,7 +76,7 @@ shan<!-- 评估管理页面 -->
</a-button>
<a-button
v-if="
record.releaseStatus === '1' && checkPer(record.permissions)
record.releaseStatus === '1'
"
@click="editOper(record)"
type="link"
@@ -84,7 +84,7 @@ shan<!-- 评估管理页面 -->
</a-button>
<a-button
v-if="
record.releaseStatus === '1' && checkPer(record.permissions)
record.releaseStatus === '1'
"
@click="handleEditPage(record.id)"
type="link"
@@ -92,7 +92,7 @@ shan<!-- 评估管理页面 -->
</a-button>
<a-button
v-if="
record.releaseStatus === '2' && checkPer(record.permissions)
record.releaseStatus === '2'
"
@click="toManage(record.id, record)"
type="link"
@@ -106,7 +106,7 @@ shan<!-- 评估管理页面 -->
</a-button>
<a-button
v-if="
record.releaseStatus === '2' && checkPer(record.permissions)
record.releaseStatus === '2'
"
@click="() => handleOper(record, 'withdraw')"
type="link"
@@ -114,7 +114,7 @@ shan<!-- 评估管理页面 -->
</a-button>
<a-button
v-if="
record.releaseStatus === '2' && checkPer(record.permissions)
record.releaseStatus === '2'
"
@click="handleOper(record, 'end')"
type="link"
@@ -122,7 +122,7 @@ shan<!-- 评估管理页面 -->
</a-button>
<a-button
v-if="
record.releaseStatus !== '2' && checkPer(record.permissions)
record.releaseStatus !== '2'
"
@click="handleOper(record, 'del')"
type="link"

View File

@@ -27,6 +27,7 @@
<a-upload
v-show="!item[imgKey]"
class="in uploadBtn"
:headers="headers"
:show-upload-list="false"
:before-upload="beforeUpload"
>
@@ -53,9 +54,12 @@
<script setup>
import {message} from "ant-design-vue";
import {fileUp} from "@/api/indexEval";
import {getCookieForName} from "@/api/method";
const props = defineProps({ index: Number, list: Array, item: Object ,nameKey:String,imgKey:String});
const VUE_APP_FILE_PATH = process.env.VUE_APP_FILE_PATH;
const headers = { token: getCookieForName("token") };
const handleCancel = () => props.item[props.imgKey] = "";
const handleDel = () => props.item.id?(props.item.deleted = true):(props.list.splice(props.index, 1))
const beforeUpload = (file) => {

View File

@@ -28,6 +28,7 @@
name="avatar"
action="/api/file/upload"
list-type="picture-card"
:headers="headers"
class="avatar-uploader"
:show-upload-list="false"
:before-upload="beforeUpload"
@@ -139,6 +140,7 @@ import html2canvas from "html2canvas";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
import SubsetManage from "../../components/drawers/SubsetManage.vue";
import AddGroup from "../../components/drawers/AddGroup.vue";
import {getCookieForName} from "@/api/method";
export default {
name: "SystemManage",
components: {
@@ -262,7 +264,7 @@ export default {
Svisible: false,
Avisible: false,
});
const headers = { token: getCookieForName("token") };
const showDrawer = () => {
state.visible = true;
};
@@ -456,7 +458,7 @@ export default {
downloadQr,
changeCodevisible,
changeCodevisible2,
headers,
onSelectChange,
randomgroup,
showAddGroup,

View File

@@ -16,7 +16,7 @@ module.exports = defineConfig({
port: 8070,
proxy: {
"/manageApi": {
target: 'http:' + process.env.VUE_APP_PROXY_URL,
target: 'https:' + process.env.VUE_APP_PROXY_URL,
changeOrigin: true, //表示是否改变原域名
pathRewrite: {
"^/manageApi": "",