Merge branch 'zcwy-zsx0223'

This commit is contained in:
zhangsir
2024-04-17 14:30:57 +08:00
10 changed files with 547 additions and 105 deletions

2
.env
View File

@@ -4,6 +4,8 @@ VUE_APP_BASE=/manage
VUE_APP_BASE_API=/manageApi VUE_APP_BASE_API=/manageApi
# systemApi # systemApi
VUE_APP_SYS_API=/systemapi VUE_APP_SYS_API=/systemapi
# activityApi
VUE_APP_ACT_API=/activityApi
# 教师节上传图片文件夹id # 教师节上传图片文件夹id
VUE_APP_PIC_FOLDERID=1147577187794841600 VUE_APP_PIC_FOLDERID=1147577187794841600
# 教师节上传zip文件夹id # 教师节上传zip文件夹id

View File

@@ -3,35 +3,37 @@ import http from "./configPublic";
const ACTIVITYAPI = '/activityApi' const ACTIVITYAPI = '/activityApi'
import {getCookieForName} from "@/api/method"; import {getCookieForName} from "@/api/method";
//查询测评 //查询测评
export const list = (obj) => http.post(`${ACTIVITYAPI}/evaluation/list`,obj) export const list = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/list`,obj)
//导入 //导入
export const importList = (obj) => http.post(`${ACTIVITYAPI}/evaluation/import`,obj, { export const importList = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/import`,obj, {
headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") }, headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") },
}) })
//保存 //保存
export const save = (obj) => http.post(`${ACTIVITYAPI}/evaluation/save`,obj) export const save = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/save`,obj)
//保存测评详情 //保存测评详情
export const saveEvaluationDetail = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detail/saveEvaluationDetail`,obj) export const saveEvaluationDetail = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/detail/saveEvaluationDetail`,obj)
//测评封面上传 //测评封面上传
export const uploadImage = (obj) => http.post(`${ACTIVITYAPI}/evaluation/upload-image`,obj,{ export const uploadImage = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/upload-image`,obj,{
headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") }, headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") },
}) })
//权限管理 //权限管理
export const adminList = (obj) => http.post(`${ACTIVITYAPI}/permission/adminList`,obj) export const adminList = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/adminList`,obj)
//权限启用 //权限启用
export const updateStatus = (obj) => http.post(`${ACTIVITYAPI}/permission/updateStatus`,obj) export const updateStatus = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/updateStatus`,obj)
//测评删除 //测评删除
export const deleteList = (obj) => http.post(`${ACTIVITYAPI}/evaluation/delete`,obj) export const deleteList = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/delete`,obj)
//测评详情展示 //测评详情展示
export const getPage = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detail/getPage`,obj) export const getPage = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/detail/getPage`,obj)
//测评详情删除 //测评详情删除
export const deleteById = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detail/deleteById`,obj) export const deleteById = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/detail/deleteById`,obj)
//测评清空 //测评清空
export const clear = (obj) => http.post(`${ACTIVITYAPI}/evaluation/clear`,obj) export const clear = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/clear`,obj)
//保存启用的人员信息 //保存启用的人员信息
export const savePermission = (obj) => http.post(`${ACTIVITYAPI}/permission/savePermission`,obj) export const savePermission = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/savePermission`,obj)
//权限列表 //权限列表
export const saveLists = (obj) => http.post(`${ACTIVITYAPI}/permission/list`,obj) export const saveLists = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/list`,obj)
//删除配置管理 //删除配置管理
export const deleteId = (obj) => http.post(`${ACTIVITYAPI}/permission/delete`,obj) export const deleteId = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/delete`,obj)
//普通管理员权限
export const getByUserId = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/getByUserId`,obj)

View File

@@ -512,7 +512,7 @@ const qrcodeVisibleSign = () => {
courseName: props.courseName, courseName: props.courseName,
createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '), createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '),
name: signName + '课程签到', name: signName + '课程签到',
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${taskId}&taskType=${2}&type=${3}`, url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${taskId}&taskType=${2}&type=${3}&openCourseId=${taskId}`,
}); });
} }
// qrCode({ // qrCode({

View File

@@ -67,8 +67,6 @@ export default createStore({
}, },
SET_PERMISSION(state, permissions) { SET_PERMISSION(state, permissions) {
state.menus = permissions; state.menus = permissions;
state.menus = [...permissions,'/evaluationupload'];
console.log(state.menus,"state.menus");
} }
}, },

36
src/utils/zipdownload.js Normal file
View File

@@ -0,0 +1,36 @@
import axios from 'axios'
import {getCookieForName} from "@/api/method";
const mimeMap = {
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
zip: 'application/zip'
}
const baseUrl = process.env.VUE_APP_ACT_API
export function downLoadZip(str, filename) {
var url = baseUrl + str
axios({
method: 'get',
url: url,
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
}).then(res => {
resolveBlob(res, mimeMap.zip,filename)
})
}
/**
* 解析blob响应内容并下载
* @param {*} res blob响应内容
* @param {String} mimeType MIME类型
*/
export function resolveBlob(res, mimeType,filename) {
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}`);
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href);
document.body.removeChild(link);
}

View File

@@ -5118,7 +5118,9 @@ function onFocusEnd(){
: process.env.VUE_APP_BASE_API + : process.env.VUE_APP_BASE_API +
`/admin/student/studentSign?taskId=${ `/admin/student/studentSign?taskId=${
record.id record.id
}&taskType=${2}&type=${3}`, }&taskType=${2}&type=${3}&openCourseId=${
record.id
}`,
}; };
console.log("codeInfo", state.codeInfo, record); console.log("codeInfo", state.codeInfo, record);
state.codeIndex = 0; state.codeIndex = 0;

View File

@@ -69,6 +69,7 @@ import { useRoute } from "vue-router";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { useStore } from "vuex"; import { useStore } from "vuex";
import {boeRequest} from "@/api/request"; import {boeRequest} from "@/api/request";
import {downLoadZip} from "@/utils/zipdownload";
export default { export default {
name: "evadown", name: "evadown",
components: {}, components: {},
@@ -165,7 +166,8 @@ import {boeRequest} from "@/api/request";
message.info('请先上传报告') message.info('请先上传报告')
return return
} }
window.open(`/activityApi/evaluation/download?id=${route.query.id}`); // window.open(`/activityApi/evaluation/download?id=${route.query.id}`);
downLoadZip(`/evaluation/download?id=${route.query.id}`,route.query.name)
} }
const listData = async () => { const listData = async () => {
state.tableLoading = true state.tableLoading = true

View File

@@ -49,6 +49,69 @@
:pagination="false" :pagination="false"
> >
<template #operation="{ record, column }"> <template #operation="{ record, column }">
<a-space style="margin-left: 70px">
<template v-for="(permissionCode, index) in (record.permission.split(',').slice(0,2))">
<a-button
v-if="trueFalse(record.permission, permissionCode)"
type="link"
:key="`button${index}`"
@click="() => handleButtonClick(record, permissionCode)"
>
<a-tooltip>
<template #title>
<span v-if="permissionCode == 1">查看</span>
<span v-else-if="permissionCode == 2">上传</span>
<span v-else-if="permissionCode == 5">下载</span>
<span v-else-if="permissionCode == 4">编辑</span>
<span v-else-if="permissionCode == 6">删除</span>
<span v-else-if="permissionCode == 3">清空</span>
</template>
<span v-if="permissionCode == 1" class="check"></span>
<span v-else-if="permissionCode == 2" class="upload"></span>
<span v-else-if="permissionCode == 5" class="download"></span>
<span v-else-if="permissionCode == 4" class="release"></span>
<span v-else-if="permissionCode == 6" class="delete"></span>
<span v-else-if="permissionCode == 3" class="empty"></span>
</a-tooltip>
</a-button>
</template>
<a-button
type="link"
:key="'permissionSetting'"
@click="authorityItem(record)"
>
<a-tooltip title="权限设置">
<span class="authority"></span>
</a-tooltip>
</a-button>
<a-dropdown
v-if="record.permission.split(',').length > 2"
:getPopupContainer="(triggerNode) => triggerNode.parentNode"
:trigger="['click']"
>
<a class="ant-dropdown-link" @click.prevent>
更多 <DownOutlined />
</a>
<template #overlay>
<a-menu>
<template v-for="(permissionCode, index) in (record.permission.split(',').slice(2))">
<a-menu-item
v-if="trueFalse(record.permission, permissionCode)"
:key="`${index}`"
@click="() => handleButtonClick(record, permissionCode)"
>
<a-button type="link" class="btn_item">
<span :class="getIconClass(permissionCode)"></span>
{{ getButtonTitle(permissionCode) }}
</a-button>
</a-menu-item>
</template>
</a-menu>
</template>
</a-dropdown>
</a-space>
</template>
<!-- <template #operation="{ record, column }">
<a-space> <a-space>
<a-button v-if="trueFalse(record.permission,1)" type="link" @click="bgcheck(record)"> <a-button v-if="trueFalse(record.permission,1)" type="link" @click="bgcheck(record)">
<a-tooltip> <a-tooltip>
@@ -103,7 +166,7 @@
</template> </template>
</a-dropdown> </a-dropdown>
</a-space> </a-space>
</template> </template> -->
</a-table> </a-table>
<div class="tableBox"> <div class="tableBox">
<div class="pa"> <div class="pa">
@@ -161,7 +224,7 @@
<div class="bg_body_input" style="display: flex;"> <div class="bg_body_input" style="display: flex;">
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false" <a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
:headers="headers" :headers="headers"
:before-upload="beforeUpload"> :before-upload="beforeUpload" @change="handleChangeImg">
<img class="i_upload_img" v-if="formData.cover" :src="formData.cover" alt="avatar" /> <img class="i_upload_img" v-if="formData.cover" :src="formData.cover" alt="avatar" />
<div class="i_upload" v-else> <div class="i_upload" v-else>
<div class="addimg"> <div class="addimg">
@@ -177,15 +240,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="bg_body_bt" v-if="btShowEdit"> <div class="bg_body_bt" v-if="btShow">
<div class="bg_body_bttext">上传说明</div> <div class="bg_body_bttext">备注</div>
<div class="bg_body_input"> <div class="bg_body_input">
<span style="color: #999ba3"> <a-textarea placeholder="请输入备注(限200个字以内)" style="width: 334px;height: 88px;" v-model:value="formData.remarks" showCount :maxlength="200" />
1仅支持1个zip压缩包和pdf报告上传<br/>
2单个附件命名规则测评名称+姓名+工号名称中间用英文输入法-连接例如大五职业性格测评-李玉冰-00004409.pdf
</span>
</div> </div>
</div> </div>
<div class="bg_body_bt" v-if="btShowEdit"> <div class="bg_body_bt" v-if="btShowEdit">
<div class="bg_body_bttext"> <div class="bg_body_bttext">
<div class="bg_body_btimg"> <div class="bg_body_btimg">
@@ -204,7 +265,7 @@
:show-upload-list="false" :show-upload-list="false"
:before-upload="beforeUpload3" :before-upload="beforeUpload3"
@change="handleChange" @change="handleChange"
action="/activityApi/evaluation/import" :action="activeUrl"
:data="uploadParameters" :data="uploadParameters"
ref="uploadRef" ref="uploadRef"
> >
@@ -215,14 +276,49 @@
</div> </div>
</div> </div>
<div class="bg_body_bt" v-if="btShowEdit" style="justify-content: flex-start;"> <div class="bg_body_bt" v-if="btShowEdit" style="justify-content: flex-start;">
<div class="mbl_items12"> <a-table
:columns="columnsUpload"
:dataSource="uploadList"
rowKey="name"
size="small"
:pagination="false"
:scroll="{ x: '100%' }"
v-if="uploadList.length > 0"
style="margin-left: 16px;"
>
<template #status="{ record }">
<div v-if="record.status"
:style="{color: {uploading: '#1890ff', done: '#52c41a', error: '#f5222d'}[record.status] || '' }"
>
{{ {uploading: '正在上传', done: '上传完成', error: '报告错误'}[record.status] || '' }}
</div>
</template>
<template #percent="{ record }">
<div class="file_updata">
<div class="updatabox" style="margin-right: 5px">
<div
:class="`${{uploading: 'updatacolor3', done: 'updatacolor3' ,error: 'updatacolor3'}[record.status] || 'updatacolor'}`"
:style="{width:`${record.status==='uploading'?parseInt(record.percent):100}%`}">
</div>
</div>
{{Math.floor(record.percent)}}%
</div>
</template>
<template #uploadAction="{record}">
<a-button type="link" @click="failedDownload(record)">记录下载</a-button>
<span style="margin-left: 10px"></span>
<a-button type="link" @click="delUploadList(record)">删除</a-button>
</template>
</a-table>
<!-- <div class="mbl_items12">
<div <div
class="i12_box1" class="i12_box1"
v-for="(item, index) in uploadList" v-for="(item, index) in uploadList"
style="align-items: flex-end" style="align-items: flex-end"
:key="index" :key="index"
> >
<!-- <div class="file_img"></div> --> <div class="file_img"></div>
<div class="file_detail"> <div class="file_detail">
<div class="file_name"> <div class="file_name">
<span style="color: #6f6f6f;width:200px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"> <span style="color: #6f6f6f;width:200px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">
@@ -235,9 +331,12 @@
:class="`${{uploading: 'updatacolor3', done: 'updatacolor' ,error: 'updatacolor2'}[item.status] || 'updatacolor'}`" :class="`${{uploading: 'updatacolor3', done: 'updatacolor' ,error: 'updatacolor2'}[item.status] || 'updatacolor'}`"
:style="{width:`${item.status==='uploading'?parseInt(item.percent):100}%`}"></div> :style="{width:`${item.status==='uploading'?parseInt(item.percent):100}%`}"></div>
<div v-if="item.status" <div v-if="item.status"
style="right:-62px;" style="right:-95px;"
:class="`${{uploading: 'updataxq1', done: 'updataxq' ,error: 'updataxq2'}[item.status] || 'updataxq'}`"> :class="`${{uploading: 'updataxq1', done: 'updataxq' ,error: 'updataxq2'}[item.status] || 'updataxq'}`">
{{ {uploading: '正在上传', done: '上传完成', error: '上传失败'}[item.status] || '' }} {{ {uploading: '正在上传', done: '上传完成', error: '报告错误'}[item.status] || '' }}
<span v-if="totalNumber?.failedEntries>0||totalNumber?.successfulEntries>0" @click="failedDownload" style="color: #4ea6ff;cursor: pointer;margin-left: 5px;">
下载
</span>
</div> </div>
</div> </div>
<div class="upjd" v-if="item.percent"> <div class="upjd" v-if="item.percent">
@@ -245,16 +344,22 @@
</div> </div>
</div> </div>
</div> </div>
<div class="file_operation" @click="delUploadList(index)" style="color: #4ea6ff;cursor: pointer"> <div class="file_operation btn_item" @click="delUploadList(index)" style="color: #4ea6ff;cursor: pointer">
删除 <span style="width: 23px;height: 21px;" class="delete"></span>
<span v-if="totalNumber?.failedEntries>0||totalNumber?.successfulEntries>0" @click="failedDownload" style="color: #4ea6ff;cursor: pointer;margin-left: 5px;">
</span>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="bg_body_bt" v-if="btShow"> <div class="bg_body_bt" v-if="btShowEdit">
<div class="bg_body_bttext">备注</div> <div class="bg_body_bttext">上传说明</div>
<div class="bg_body_input"> <div class="bg_body_input">
<a-textarea placeholder="请输入备注(限200个字以内)" style="width: 334px;height: 88px;" v-model:value="formData.remarks" showCount :maxlength="200" /> <span style="color: #999ba3">
1仅支持1个zip压缩包和pdf报告上传<br/>
2单个附件命名规则测评名称+姓名+工号名称中间用英文输入法-连接例如大五职业性格测评-李玉冰-00004409.pdf
</span>
</div> </div>
</div> </div>
<div class="bg_footer"> <div class="bg_footer">
@@ -264,6 +369,8 @@
<a-button <a-button
class="btn btn6" class="btn btn6"
:loading="uploadDownLoad" :loading="uploadDownLoad"
:disabled="totalNumber?.failedEntries>0"
:style="{background: totalNumber?.failedEntries>0?'#d9d9d9':'#4ea6ff'}"
@click="formData.id&&btShow?showUpload():reportUpload()" @click="formData.id&&btShow?showUpload():reportUpload()"
> >
确定 确定
@@ -421,9 +528,9 @@
</div> </div>
<div class="bg_body"> <div class="bg_body">
<div>上传结果</div> <div>上传结果</div>
<div style="margin: 25px 0 0 24px;">上传的测评报告总文件数{{totalNumber.totalEntries}}成功{{totalNumber.successfulEntries}}失败{{totalNumber.failedEntries}}<br/>上传结果<span @click="failedDownload" style="color: #4ea6ff;cursor: pointer;">请下载</span>查看</div> <div style="margin: 25px 0 0 24px;">上传的测评报告总文件数{{totalNumber.totalEntries}}成功{{totalNumber.successfulEntries}}失败{{totalNumber.failedEntries}}<br/>请点击"记录下载"查看!</div>
<div class="bg_footer" style="margin-left: 90px;"> <div class="bg_footer" style="margin-left: 90px;">
<div class="btn btn6" @click="of_results"> <!-- <div class="btn btn6" @click="of_results">
<div class="btnText">取消</div> <div class="btnText">取消</div>
</div> </div>
<a-button <a-button
@@ -431,7 +538,7 @@
@click="resultsUp" @click="resultsUp"
> >
确定 确定
</a-button> </a-button> -->
</div> </div>
</div> </div>
</div> </div>
@@ -511,15 +618,17 @@
</div> </div>
</div> </div>
</div> </div>
<div class="content" style="padding: 10px 35px;"> <div class="content back_color" style="padding: 10px 35px;">
<a-table <a-table
:columns="columnsAdd" :columns="columnsAdd"
:data-source="tableDataAdd" :data-source="tableDataAdd"
:loading="tableLoadingAdd" :loading="tableLoadingAdd"
:scroll="{ x: 1000,y: 500 }" :scroll="{ x: 800,y: 500 }"
:pagination="paginationAdd" :pagination="paginationAdd"
:customRow="customRow"
:row-class-name="getRowClassName"
> >
<template #addAuthority="{ record, column }"> <!-- <template #addAuthority="{ record, column }">
<a-space> <a-space>
<a-button type="link" @click="powerSetting(record)"> <a-button type="link" @click="powerSetting(record)">
<span>权限配置</span> <span>权限配置</span>
@@ -531,7 +640,7 @@
<span class="download">删除</span> <span class="download">删除</span>
</a-button> </a-button>
</a-space> </a-space>
</template> </template> -->
</a-table> </a-table>
</div> </div>
<div class="bg_body"> <div class="bg_body">
@@ -605,7 +714,7 @@
</div> </div>
</div> </div>
</a-modal> </a-modal>
<a-modal <!-- <a-modal
v-model:visible="bg_power2" v-model:visible="bg_power2"
:footer="null" :footer="null"
closable="false" closable="false"
@@ -658,7 +767,7 @@
</div> </div>
</div> </div>
</div> </div>
</a-modal> </a-modal> -->
</div> </div>
<!-- <div class="aeLoading" style="z-index:999999" :style="{ display: uploadDownLoad ? 'flex' : 'none' }"> <!-- <div class="aeLoading" style="z-index:999999" :style="{ display: uploadDownLoad ? 'flex' : 'none' }">
<a-spin :spinning="uploadDownLoad" tip="" /> <a-spin :spinning="uploadDownLoad" tip="" />
@@ -681,6 +790,7 @@ import {
adminList, adminList,
saveEvaluationDetail, saveEvaluationDetail,
updateStatus, updateStatus,
getByUserId,
deleteList, deleteList,
clear, clear,
savePermission, savePermission,
@@ -692,6 +802,7 @@ import { useStore } from "vuex";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import {timeoutUpload} from "@/api/configPublic"; import {timeoutUpload} from "@/api/configPublic";
// import md5 from 'js-md5'; // import md5 from 'js-md5';
import {downLoadZip} from "@/utils/zipdownload";
export default { export default {
name: 'evaluationUpload', name: 'evaluationUpload',
components:{ components:{
@@ -703,7 +814,10 @@ import {timeoutUpload} from "@/api/configPublic";
const userInfo = computed(() => store.state.userInfo); const userInfo = computed(() => store.state.userInfo);
const router = useRouter(); const router = useRouter();
const state = reactive({ const state = reactive({
activeUrl: process.env.VUE_APP_ACT_API + '/evaluation/import',
uploadTypes: true, uploadTypes: true,
selectedRows: null,
uploadStatusType: true,
saveNotUpload: true, saveNotUpload: true,
stateUpload: true, stateUpload: true,
uploadParameters: {}, uploadParameters: {},
@@ -716,7 +830,7 @@ import {timeoutUpload} from "@/api/configPublic";
uploadDownLoad: false, uploadDownLoad: false,
uploadDownId: null, uploadDownId: null,
loadData: false, loadData: false,
saveList: [], saveList: {},
powerStatus:{}, powerStatus:{},
saveListPid: '', saveListPid: '',
idValue: null, idValue: null,
@@ -733,7 +847,7 @@ import {timeoutUpload} from "@/api/configPublic";
totalAdd: 0, totalAdd: 0,
params: { params: {
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 10,
}, },
paramsAdd: { paramsAdd: {
pageNo: 1, pageNo: 1,
@@ -781,9 +895,9 @@ import {timeoutUpload} from "@/api/configPublic";
listData() listData()
}) })
const uploadAdmin = (admin)=>{ const uploadAdmin = (admin)=>{
const aaa = userInfo.value.roleList.map((item)=>item.roleCode) const roleCode = userInfo.value.roleList.map((item)=>item.roleCode)
if (admin){ if (admin){
return aaa.some(t => t == admin) return roleCode.some(t => t == admin)
} }
} }
const trueFalse = (per,i) => { const trueFalse = (per,i) => {
@@ -804,6 +918,7 @@ import {timeoutUpload} from "@/api/configPublic";
serchList() serchList()
} }
const listData = async () => { const listData = async () => {
state.tableLoading = true
await list({ await list({
evaluationName: state.serchName, evaluationName: state.serchName,
pageNo: state.searchParam.pageNo, pageNo: state.searchParam.pageNo,
@@ -819,7 +934,7 @@ import {timeoutUpload} from "@/api/configPublic";
width: "20%", width: "20%",
dataIndex: "id", dataIndex: "id",
key: "id", key: "id",
align: "right", align: "left",
slots: { customRender: "operation" }, slots: { customRender: "operation" },
}; };
if (!addedOperationColumn && state.isRegularAdministrator == '0') { if (!addedOperationColumn && state.isRegularAdministrator == '0') {
@@ -852,6 +967,22 @@ import {timeoutUpload} from "@/api/configPublic";
saveListItem() saveListItem()
}) })
// 添加权限 // 添加权限
const customRow = (record) => ({
onClick: () => {
// 添加或移除记录,以确保其在选中数组中的状态
// const index = state.selectedRows.findIndex((item) => JSON.stringify(item) === JSON.stringify(record));
// if (index === -1) {
// state.selectedRows.push(record);
// } else {
// state.selectedRows.splice(index, 1);
// }
state.selectedRows = record
state.saveList = { ...record };
}
})
const getRowClassName = (record, index) => {
return state.selectedRows==record ? 'highlight-row' : '';
}
const paginationAdd = computed(() => ({ const paginationAdd = computed(() => ({
total: state.totalAdd, total: state.totalAdd,
showSizeChanger: true, showSizeChanger: true,
@@ -1026,16 +1157,16 @@ import {timeoutUpload} from "@/api/configPublic";
className: "h", className: "h",
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 50, width: 80,
}, },
{ {
title: "工号", title: "工号",
dataIndex: "departId", dataIndex: "userNo",
key: "departId", key: "userNo",
className: "h", className: "h",
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 100, width: 80,
}, },
{ {
title: "组织部门", title: "组织部门",
@@ -1047,24 +1178,109 @@ import {timeoutUpload} from "@/api/configPublic";
width: 100, width: 100,
}, },
{ {
title: "添加时间", title: "归属组织",
dataIndex: "createTime", dataIndex: "orgName",
key: "createTime", key: "orgName",
className: "h", className: "h",
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 100, width: 200,
},
// {
// title: "操作",
// width: "20%",
// fixed: 'right',
// dataIndex: "id",
// key: "id",
// align: "center",
// slots: { customRender: "addAuthority" },
// },
])
const columnsUpload = ref([
{
title: '文件名称',
dataIndex: 'name',
width: '150px',
align: 'center',
ellipsis: true,
}, },
{ {
title: "操作", title: '上传状态',
width: "20%", dataIndex: 'status',
fixed: 'right', width: '60px',
dataIndex: "id", align: 'center',
key: "id", slots: { customRender: 'status' },
align: "center",
slots: { customRender: "addAuthority" },
}, },
]) {
title: '上传进度',
dataIndex: 'percent',
width: '100px',
slots: { customRender: 'percent' },
},
{
title: '操作',
dataIndex: 'action',
width: '100px',
align: 'center',
slots: { customRender: 'uploadAction' },
},
]);
const handleButtonClick = (record, permissionCode) => {
switch (permissionCode) {
case '1':
bgcheck(record);
break;
case '2':
bgupload1(record);
break;
case '5':
downloadAll(record);
break;
case '4':
openEdit(record);
break;
case '6':
deleteItem(record);
break;
case '3':
emptyItem(record);
break;
}
}
function getButtonTitle(permissionCode) {
switch (permissionCode) {
case '1':
return '查看';
case '2':
return '上传';
case '3':
return '清空';
case '4':
return '编辑';
case '5':
return '下载';
case '6':
return '删除';
}
}
function getIconClass(permissionCode) {
switch (permissionCode) {
case '1':
return 'check';
case '2':
return 'upload';
case '3':
return 'empty';
case '4':
return 'release';
case '5':
return 'download';
case '6':
return 'delete';
}
}
const textDisabled = async (record) => { const textDisabled = async (record) => {
await updateStatus({status:1,id:record.id}).then((res)=>{ await updateStatus({status:1,id:record.id}).then((res)=>{
if(res.code === 200){ if(res.code === 200){
@@ -1139,9 +1355,12 @@ import {timeoutUpload} from "@/api/configPublic";
message.info('请先上传报告') message.info('请先上传报告')
return return
} }
window.open(`/activityApi/evaluation/download?id=${record.id}`); // window.open(`${process.env.VUE_APP_ACT_API}/evaluation/download?id=${record.id}`);
downLoadZip(`/evaluation/download?id=${record.id}`,record.evaluationName)
} }
const of_exit = () => { const of_exit = () => {
// state.tableLoading = false
state.totalNumber = {}
state.uploadTypes = false state.uploadTypes = false
state.uploadDownLoad = false state.uploadDownLoad = false
state.bg_check = false; state.bg_check = false;
@@ -1157,12 +1376,10 @@ import {timeoutUpload} from "@/api/configPublic";
} }
// 上传结果 // 上传结果
const of_results = () => { const of_results = () => {
state.totalNumber = {}
state.bg_results = false state.bg_results = false
} }
const resultsUp = () => { const resultsUp = () => {
state.totalNumber = {} of_results()
state.bg_results = false
} }
const failedDownload = () => { const failedDownload = () => {
if(state.totalNumber.successId==''){ if(state.totalNumber.successId==''){
@@ -1172,10 +1389,11 @@ import {timeoutUpload} from "@/api/configPublic";
const failedId = state.totalNumber.failedId==null?'':state.totalNumber.failedId const failedId = state.totalNumber.failedId==null?'':state.totalNumber.failedId
const middle = state.totalNumber.successId==null?'':',' const middle = state.totalNumber.successId==null?'':','
const ids = successId+middle+failedId const ids = successId+middle+failedId
window.open(`/activityApi/evaluation/download-failed?ids=${ids}`) window.open(`${process.env.VUE_APP_ACT_API}/evaluation/download-failed?ids=${ids}`)
} }
const reportUpload = async () => { const reportUpload = async () => {
state.uploadStatusType = true
if(!state.formData.evaluationName){ if(!state.formData.evaluationName){
message.error('请输入测评标题名称') message.error('请输入测评标题名称')
return return
@@ -1184,14 +1402,18 @@ import {timeoutUpload} from "@/api/configPublic";
message.error('上传报告含有错误报告,请检查后重新上传') message.error('上传报告含有错误报告,请检查后重新上传')
return return
} }
state.tableLoading = true if(state.uploadList.length==0&&state.btShowEdit){
message.error('请您上传附件')
return
}
// state.tableLoading = true
state.uploadDownLoad = true state.uploadDownLoad = true
if( !state.loadData&&state.loadNewDown){ if( !state.loadData&&state.loadNewDown){
// 保存上传文件 // 保存上传文件
if(state.sussessIds == null){ if(state.sussessIds == null){
state.sussessIds = [] state.sussessIds = []
} }
await boeRequest('/activityApi/evaluation/detail/saveEvaluationDetail post',{ await boeRequest(`${process.env.VUE_APP_ACT_API}/evaluation/detail/saveEvaluationDetail post`,{
id:state.uploadId, id:state.uploadId,
successIds:state.sussessIds.length!=0?state.sussessIds.split(','):null successIds:state.sussessIds.length!=0?state.sussessIds.split(','):null
}).then((res)=>{ }).then((res)=>{
@@ -1205,7 +1427,7 @@ import {timeoutUpload} from "@/api/configPublic";
if(state.sussessIds == null){ if(state.sussessIds == null){
state.sussessIds = [] state.sussessIds = []
} }
await boeRequest('/activityApi/evaluation/save post',{ await boeRequest(`${process.env.VUE_APP_ACT_API}/evaluation/save post`,{
id: state.uploadDownId, id: state.uploadDownId,
createId:userInfo.value.userId, createId:userInfo.value.userId,
createName:userInfo.value.realName, createName:userInfo.value.realName,
@@ -1216,14 +1438,21 @@ import {timeoutUpload} from "@/api/configPublic";
imagePath:state.formData.cover, imagePath:state.formData.cover,
successIds:state.saveNotUpload?state.sussessIds.length!=0?state.sussessIds.split(','):null:null successIds:state.saveNotUpload?state.sussessIds.length!=0?state.sussessIds.split(','):null:null
}).then((res)=>{ }).then((res)=>{
if(res.status == 500){
message.error('测评标题和报告名称不一致')
state.uploadDownLoad = false
state.uploadStatusType = false
}
if(res.code == 200){ if(res.code == 200){
state.uploadDownLoad = false state.uploadDownLoad = false
state.bg_check = false state.bg_check = false
} }
}) })
} }
of_exit() if(state.uploadStatusType){
listData() of_exit()
listData()
}
} }
const showUpload = () => { const showUpload = () => {
reportUpload() reportUpload()
@@ -1232,6 +1461,7 @@ import {timeoutUpload} from "@/api/configPublic";
//上传图片 //上传图片
const headers = { token: getCookieForName("token") }; const headers = { token: getCookieForName("token") };
const beforeUpload = (file) => { const beforeUpload = (file) => {
console.log(file,'file')
const isJpgOrPng = const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/jpeg" ||
file.type === "image/png" file.type === "image/png"
@@ -1249,20 +1479,19 @@ import {timeoutUpload} from "@/api/configPublic";
formData.append("file", file); formData.append("file", file);
uploadImage(formData).then((res) => { uploadImage(formData).then((res) => {
if (res.status === 200) { if (res.status === 200) {
state.formData.cover = res.data.split('Path:')[1]; state.formData.cover = res.data.split('elearning')[1];
} }
}); });
return false; return false;
}; };
const handleChangeImg = (info) =>{
console.log(info,'info')
}
const beforeUpload3 = async (file) => { const beforeUpload3 = async (file) => {
state.uploadTypes = true if(!state.formData.evaluationName){
if(file.type === "application/pdf"){ message.error('请先填写测评名称')
const pattern = /^([0-9\u4e00-\u9fa5\a-z\A-Z]+-){2}[0-9\u4e00-\u9fa5\a-z\A-Z]+\.\w*$/; state.uploadTypes = false
if (!pattern.test(file.name)) { return false
message.error('上传文件名称格式不对')
state.stateUpload = false
return false
}
} }
const isJpgOrPng = const isJpgOrPng =
file.type === "application/x-zip-compressed" || file.type === "application/x-zip-compressed" ||
@@ -1273,6 +1502,20 @@ import {timeoutUpload} from "@/api/configPublic";
state.stateUpload = false state.stateUpload = false
return false; return false;
} }
state.uploadTypes = true
if(file.type === "application/pdf"){
const pattern = /^([0-9\u4e00-\u9fa5\a-z\A-Z]+-){2}[0-9\u4e00-\u9fa5\a-z\A-Z]+\.\w*$/;
if (!pattern.test(file.name)) {
message.error('上传文件名称格式不对')
state.stateUpload = false
return false
}
if(state.formData.evaluationName!=file.name.split('-')[0]){
message.error('上传文件名称与测评名称不匹配')
state.stateUpload = false
return false
}
}
let isLt1M = file.size < 1024000000; let isLt1M = file.size < 1024000000;
if (!isLt1M) { if (!isLt1M) {
message.error("文件大小超过1GB!"); message.error("文件大小超过1GB!");
@@ -1284,7 +1527,8 @@ import {timeoutUpload} from "@/api/configPublic";
// file: file, // file: file,
uploadName: userInfo.value.realName, uploadName: userInfo.value.realName,
createId: userInfo.value.userId, createId: userInfo.value.userId,
createName: userInfo.value.realName createName: userInfo.value.realName,
newEvaluationName: state.formData.evaluationName
} }
if(state.uploadId){ if(state.uploadId){
formData.pid= state.uploadId formData.pid= state.uploadId
@@ -1337,6 +1581,9 @@ import {timeoutUpload} from "@/api/configPublic";
state.failedId = file.response.data.failedId state.failedId = file.response.data.failedId
state.bg_results = true state.bg_results = true
state.uploadDownLoad = false state.uploadDownLoad = false
if(state.totalNumber.failedEntries!=0){
fileList.slice(-1)[0].status = 'error'
}
} }
if(state.stateUpload){ if(state.stateUpload){
state.uploadList = fileList.slice(-1) state.uploadList = fileList.slice(-1)
@@ -1345,6 +1592,7 @@ import {timeoutUpload} from "@/api/configPublic";
}; };
const uploadRef = ref() const uploadRef = ref()
const delUploadList = (i) => { const delUploadList = (i) => {
state.totalNumber = {}
state.uploadTypes = false state.uploadTypes = false
state.uploadDownLoad = false state.uploadDownLoad = false
state.sussessIds = null state.sussessIds = null
@@ -1391,7 +1639,7 @@ import {timeoutUpload} from "@/api/configPublic";
//权限列表 //权限列表
const saveListItem = async () => { const saveListItem = async () => {
state.tableLoadingAut = true state.tableLoadingAut = true
await boeRequest('/activityApi/permission/list post',{ await boeRequest(`${process.env.VUE_APP_ACT_API}/permission/list post`,{
pid:state.saveListPid, pid:state.saveListPid,
nameOrWorkNum:state.searchParam.createNames, nameOrWorkNum:state.searchParam.createNames,
status:state.searchParam.status2, status:state.searchParam.status2,
@@ -1433,12 +1681,13 @@ import {timeoutUpload} from "@/api/configPublic";
state.bg_addsetting = false state.bg_addsetting = false
state.searchParam.createName = '' state.searchParam.createName = ''
state.tableDataAdd = [] state.tableDataAdd = []
state.saveList = [] state.saveList = {}
state.selectedRows = []
} }
//搜索权限 //搜索权限
const searchSave = async () => { const searchSave = async () => {
state.tableLoadingAdd = true state.tableLoadingAdd = true
await boeRequest('/activityApi/permission/adminList post',{ await boeRequest(`${process.env.VUE_APP_ACT_API}/permission/adminList post`,{
keyword:state.searchParam.createName, keyword:state.searchParam.createName,
pageNo: state.paramsAdd.pageNo, pageNo: state.paramsAdd.pageNo,
pageSize: state.paramsAdd.pageSize, pageSize: state.paramsAdd.pageSize,
@@ -1462,7 +1711,7 @@ import {timeoutUpload} from "@/api/configPublic";
} }
//添加权限确定 //添加权限确定
const addSettingUp = async () => { const addSettingUp = async () => {
await savePermission({userList:state.saveList,pid:state.saveListPid}) await savePermission({userList:[state.saveList],pid:state.saveListPid})
saveListItem() saveListItem()
of_addsetting() of_addsetting()
listData() listData()
@@ -1478,6 +1727,14 @@ import {timeoutUpload} from "@/api/configPublic";
state.permissionId = '' state.permissionId = ''
state.checkclick = [] state.checkclick = []
} }
// const getByUserIds = async () => {
// const roleCode = userInfo.value
// const roleId = roleCode.roleList.find(item=>item.roleCode=='quiz-admin') || null
// const isQuizAdmin = roleId ? 1 : 0
// await getByUserId({loginId:roleCode.userId,roleId,isQuizAdmin}).then(res=>{
// })
// }
const powerTrue = async () => { const powerTrue = async () => {
state.powerStatus.permission = state.checkclick.join(",") state.powerStatus.permission = state.checkclick.join(",")
if(state.permissionId){ if(state.permissionId){
@@ -1494,6 +1751,7 @@ import {timeoutUpload} from "@/api/configPublic";
message.success('启用成功') message.success('启用成功')
listData() listData()
saveListItem() saveListItem()
getByUserIds()
} }
}) })
} }
@@ -1531,6 +1789,7 @@ import {timeoutUpload} from "@/api/configPublic";
powerSetting, powerSetting,
of_power, of_power,
powerTrue, powerTrue,
getByUserIds,
textDeleteAdd, textDeleteAdd,
searchStatusVal2, searchStatusVal2,
serchList, serchList,
@@ -1539,6 +1798,10 @@ import {timeoutUpload} from "@/api/configPublic";
uploadAdmin, uploadAdmin,
columns, columns,
columnsAdd, columnsAdd,
columnsUpload,
handleButtonClick,
getIconClass,
getButtonTitle,
columns2, columns2,
bgupload, bgupload,
of_exit, of_exit,
@@ -1556,6 +1819,7 @@ import {timeoutUpload} from "@/api/configPublic";
downloadAll, downloadAll,
headers, headers,
beforeUpload, beforeUpload,
handleChangeImg,
beforeUpload3, beforeUpload3,
handleChange, handleChange,
delUploadList, delUploadList,
@@ -1575,6 +1839,8 @@ import {timeoutUpload} from "@/api/configPublic";
changePaginationsAdd, changePaginationsAdd,
pagination, pagination,
paginationAdd, paginationAdd,
customRow,
getRowClassName,
textDisabled, textDisabled,
textDelete, textDelete,
updateAuthority, updateAuthority,
@@ -1585,9 +1851,83 @@ import {timeoutUpload} from "@/api/configPublic";
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .ant-dropdown-content{
width: 84px;
}
.back_color{
::v-deep .ant-table-wrapper .ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td{
background: initial;
}
}
.file_updata {
display: flex;
align-items: center;
.updatabox {
position: relative;
width: 230px;
height: 5px;
background-color: rgba(192, 192, 192, 0.25);
border-radius: 3px;
.updatacolor {
position: absolute;
left: 0;
width: 100%;
height: 5px;
background-color: #57c887;
border-radius: 3px;
}
.updatacolor2 {
position: absolute;
left: 0;
width: 80%;
height: 5px;
background-color: #ff7474;
border-radius: 3px;
}
.updatacolor3 {
position: absolute;
left: 0;
width: 60%;
height: 5px;
background-color: #4ea6ff;
border-radius: 3px;
}
.updataxq1{
margin-top: 7px;
}
.updataxq {
position: absolute;
right: 2px;
top: -37px;
color: #57c887;
}
.updataxq2 {
position: absolute;
right: 2px;
top: -35px;
color: #ff7474;
}
.updataxq3 {
position: absolute;
right: 2px;
top: -30px;
color: #4ea6ff;
}
}
}
::v-deep .ant-dropdown{ ::v-deep .ant-dropdown{
left: 120px !important; left: 120px !important;
} }
::v-deep .highlight-row{
background: #e7e7e7 !important;
}
.evaluationUpload{ .evaluationUpload{
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -1686,6 +2026,41 @@ import {timeoutUpload} from "@/api/configPublic";
background: url("../../assets/images/evaluation/download.png") no-repeat; background: url("../../assets/images/evaluation/download.png") no-repeat;
background-size: 100%; background-size: 100%;
} }
.release{
width: 19px;
height: 20px;
background: url("../../assets/images/evaluation/release.png") no-repeat;
background-size: 100%;
// margin-right: 2px;
}
.authority{
width: 19px;
height: 20px;
background: url("../../assets/images/evaluation/authority.png") no-repeat;
background-size: 100%;
// margin-right: 2px;
}
.edit{
width: 19px;
height: 20px;
background: url("../../assets/images/evaluation/edit.png") no-repeat;
background-size: 100%;
// margin-right: 2px;
}
.delete{
width: 19px;
height: 20px;
background: url("../../assets/images/evaluation/delete.png") no-repeat;
background-size: 100%;
// margin-right: 2px;
}
.empty{
width: 19px;
height: 20px;
background: url("../../assets/images/evaluation/empty.png") no-repeat;
background-size: 100%;
// margin-right: 2px;
}
.tableBox { .tableBox {
padding-bottom: 20px; padding-bottom: 20px;
margin: 20px 38px 30px; margin: 20px 38px 30px;
@@ -1777,7 +2152,7 @@ import {timeoutUpload} from "@/api/configPublic";
} }
} }
.mbl_items12 { .mbl_items12 {
width: 334px; width: 333px;
margin-left: 128px; margin-left: 128px;
.item_text{ .item_text{
width: 300px; width: 300px;
@@ -1853,7 +2228,7 @@ import {timeoutUpload} from "@/api/configPublic";
.updataxq { .updataxq {
position: absolute; position: absolute;
right: 2px; right: 2px;
top: -30px; top: -37px;
color: #57c887; color: #57c887;
} }
@@ -1976,6 +2351,10 @@ import {timeoutUpload} from "@/api/configPublic";
background-color: #4ea6ff; background-color: #4ea6ff;
color: #ffffff; color: #ffffff;
} }
.btndesign {
background-color: #eff4fc;
color: #ffffff;
}
} }
} }
.headers{ .headers{
@@ -2058,40 +2437,61 @@ import {timeoutUpload} from "@/api/configPublic";
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 13px; font-size: 13px;
.check{
width: 15px;
height: 16px;
background: url("../../assets/images/evaluation/check.png") no-repeat;
background-size: 100%;
margin-right: 6px;
}
.download{
width: 15px;
height: 16px;
background: url("../../assets/images/evaluation/download.png") no-repeat;
background-size: 100%;
margin-right: 6px;
}
.upload{
width: 15px;
height: 16px;
background: url("../../assets/images/evaluation/upload.png") no-repeat;
background-size: 100%;
margin-right: 6px;
}
.release{ .release{
width: 15px; width: 15px;
height: 16px; height: 16px;
background: url("../../assets/images/evaluation/release.png") no-repeat; background: url("../../assets/images/evaluation/release.png") no-repeat;
background-size: 100%; background-size: 100%;
margin-right: 2px; margin-right: 6px;
} }
.authority{ .authority{
width: 15px; width: 15px;
height: 16px; height: 16px;
background: url("../../assets/images/evaluation/authority.png") no-repeat; background: url("../../assets/images/evaluation/authority.png") no-repeat;
background-size: 100%; background-size: 100%;
margin-right: 2px; margin-right: 6px;
} }
.edit{ .edit{
width: 15px; width: 15px;
height: 16px; height: 16px;
background: url("../../assets/images/evaluation/edit.png") no-repeat; background: url("../../assets/images/evaluation/edit.png") no-repeat;
background-size: 100%; background-size: 100%;
margin-right: 2px; margin-right: 6px;
} }
.delete{ .delete{
width: 15px; width: 15px;
height: 16px; height: 16px;
background: url("../../assets/images/evaluation/delete.png") no-repeat; background: url("../../assets/images/evaluation/delete.png") no-repeat;
background-size: 100%; background-size: 100%;
margin-right: 2px; margin-right: 6px;
} }
.empty{ .empty{
width: 15px; width: 15px;
height: 16px; height: 16px;
background: url("../../assets/images/evaluation/empty.png") no-repeat; background: url("../../assets/images/evaluation/empty.png") no-repeat;
background-size: 100%; background-size: 100%;
margin-right: 2px; margin-right: 6px;
} }
} }

View File

@@ -542,7 +542,7 @@
<div <div
class="operation" class="operation"
style="cursor: pointer" style="cursor: pointer"
@click="openCourse(item,key)" @click="openCourse(item,key,index)"
v-if="item.type == 2" v-if="item.type == 2"
> >
开课 开课
@@ -1568,9 +1568,9 @@ export default {
window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/export?type=${2}&pid=${item.id}&courseId=${item.courseId}`) window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/export?type=${2}&pid=${item.id}&courseId=${item.courseId}`)
}; };
const coursePlanRef = ref(); const coursePlanRef = ref();
const openCourse = async (item,index) => { const openCourse = async (item,key,index) => {
await GetRouterDraftDetail(state.routerId).then((item)=>{ await GetRouterDraftDetail(state.routerId).then((item)=>{
coursePlanRef.value.openDrawer(item.data.data.chapterList[0].draftTaskList[index]); coursePlanRef.value.openDrawer(item.data.data.chapterList[index].draftTaskList[key]);
}) })
} }
const qrCodeItems = ref([]); const qrCodeItems = ref([]);

View File

@@ -676,7 +676,7 @@
<div <div
class="operation" class="operation"
style="cursor: pointer" style="cursor: pointer"
@click="openCourse(item,key)" @click="openCourse(item,key,index)"
v-if="item.type == 2" v-if="item.type == 2"
> >
开课 开课
@@ -2450,9 +2450,9 @@ export default {
window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/export?type=${1}&pid=${item.id}&courseId=${item.courseId}`) window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/export?type=${1}&pid=${item.id}&courseId=${item.courseId}`)
}; };
const coursePlanRef = ref(); const coursePlanRef = ref();
const openCourse = async (item,index) => { const openCourse = async (item,key,index) => {
await apitl.getDraftTask({projectId: item.projectId}).then((item)=>{ await apitl.getDraftTask({projectId: item.projectId}).then((item)=>{
coursePlanRef.value.openDrawer(item.data.data.stageList[0].taskDraftDtoList[index]); coursePlanRef.value.openDrawer(item.data.data.stageList[index].taskDraftDtoList[key]);
}) })
} }
const qrCodeItems = ref([]); const qrCodeItems = ref([]);