mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 17:36:44 +08:00
讲师管理
This commit is contained in:
11
.env
11
.env
@@ -2,24 +2,25 @@
|
||||
VUE_APP_BASE=/manage
|
||||
# api项目基础url
|
||||
VUE_APP_BASE_API=/manageApi
|
||||
VUE_APP_BASE_API1=https://pretest.zcwytd.com/
|
||||
VUE_APP_BASE_API1=https://u-pre.boe.com/
|
||||
# systemApi
|
||||
VUE_APP_SYS_API=/systemapi
|
||||
# activityApi
|
||||
VUE_APP_ACT_API=/activityApi
|
||||
# 教师节上传图片文件夹id
|
||||
VUE_APP_PIC_FOLDERID=1147577187794841600
|
||||
# 讲师管理上传
|
||||
VUE_APP_COURSE_FOLDERID=1298970611096760320
|
||||
# 教师节上传zip文件夹id
|
||||
VUE_APP_TOOL_FOLDERID=1147577145918910464
|
||||
#文件路径
|
||||
VUE_APP_FILE_PATH=/upload/
|
||||
# 代理url 本地调试,不可以用在其他地方
|
||||
VUE_APP_PROXY_URL=//47.97.44.123:30001/
|
||||
# VUE APP PROXY URL=//u-pre.boe.com/manageApi
|
||||
VUE_APP_PROXY_URL=//u-pre.boe.com/manageApi
|
||||
# 登录url
|
||||
VUE_APP_LOGIN_URL=//pretest.zcwytd.com/web?returnUrl=
|
||||
VUE_APP_LOGIN_URL=//u-pre.boe.com/web?returnUrl=
|
||||
# boe域名
|
||||
VUE_APP_BOE_API_URL=//47.97.44.123:30001
|
||||
VUE_APP_BOE_API_URL=//u-pre.boe.com
|
||||
#打包路径
|
||||
VUE_APP_OUTPUT_DIR=./dist
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ VUE_APP_BASE=/manage
|
||||
VUE_APP_BASE_API=/manageApi
|
||||
# 教师节上传图片文件夹id
|
||||
VUE_APP_PIC_FOLDERID=1148997110156759040
|
||||
# 讲师管理上传
|
||||
VUE_APP_COURSE_FOLDERID=1298970611096760320
|
||||
# 教师节上传zip文件夹id
|
||||
VUE_APP_TOOL_FOLDERID=1148996610925531136
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
<a-form-item class="select">
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
<a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch>
|
||||
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch @pressEnter="searchSubmit">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item class="select">
|
||||
<a-select style="width: 276px" placeholder="请选择讲师体系" v-model:value="searchParam.tsystemId" allowClear
|
||||
<a-select style="width: 276px" placeholder="请选择讲师体系" v-model:value="searchParam.tSystemId" allowClear
|
||||
:options="LecturerSystemList" @change="changetlevel">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<!-- <div @click="handlesearchlevel"> -->
|
||||
<a-form-item class="select" >
|
||||
<a-select style="width: 276px" v-model:value="searchParam.tlevelId" placeholder="请选择讲师级别" allowClear
|
||||
<a-select style="width: 276px" v-model:value="searchParam.tLevelId" placeholder="请选择讲师级别" allowClear
|
||||
:options="getLevelList" >
|
||||
<!-- :disabled="getLevelList.length !== 0 ? false : true" 禁用状态 -->
|
||||
</a-select>
|
||||
@@ -53,8 +53,8 @@
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item v-if="moreid == 2" class="select">
|
||||
<a-input style="width: 276px;height: 40px; border-radius:8px; " v-model:value="searchParam.courses"
|
||||
placeholder="擅长课程" allowClear>
|
||||
<a-input style="width: 276px;height: 40px; border-radius:8px; " v-model:value="searchParam.expertiseNames"
|
||||
placeholder="擅长课程" allowClear @pressEnter="searchSubmit">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
@@ -144,7 +144,7 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="讲师名称" name="name">
|
||||
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName" v-model:orgId="formParam.orgId" v-model:id="formParam.id"
|
||||
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgNames" v-model:orgId="formParam.orgId" v-model:id="formParam.id"
|
||||
v-model:system="tSystemNames" v-model:level="formParam.tlevelId"></SearchTeacher>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -152,7 +152,7 @@
|
||||
<a-form-item label="讲师组织" name="orgName">
|
||||
<a-popover>
|
||||
<template #content>
|
||||
{{ formParam.orgName }}.
|
||||
{{ formParam.orgName }}
|
||||
</template>
|
||||
|
||||
<a-input disabled v-model:value="formParam.orgName" class="draitem"
|
||||
@@ -246,8 +246,8 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
<div>
|
||||
<a-modal v-model:visible="updialog" :footer="null" closable="CopyModal" centered="true">
|
||||
<div class="delete">
|
||||
<a-modal v-model:visible="updialog" :footer="null" closable="false" centered="true">
|
||||
<div class="delete" style="width:600px;">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
<div class="header">
|
||||
@@ -257,9 +257,11 @@
|
||||
<a-form style="margin-left:20px; margin-top:10px ;padding-left:50px">
|
||||
<a-form-item style="color: #999999;">注意 :文件仅支持PDF格式 ,文件大小不可超过500KB</a-form-item>
|
||||
<a-form-item label="上传文件">
|
||||
<a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2">
|
||||
<!-- <a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2">
|
||||
<a-button type="primary">上传导入文件</a-button>
|
||||
</a-upload>
|
||||
</a-upload> -->
|
||||
<UploadDragger ref="uploadRef" v-model:value="files" @change="changeUpload" :accept="accept"
|
||||
:uploadUrl="uploadUrl" :params="folderId" />
|
||||
</a-form-item>
|
||||
<a-form-item>{{ formParam.filesList }}</a-form-item>
|
||||
<!-- <a-form-item style="color: #999999;" v-for="(item, index) in formParam.filesList">{{ item }}</a-form-item> -->
|
||||
@@ -353,7 +355,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
import { reactive, toRefs, ref, watch } from "vue";
|
||||
import { reactive, toRefs, ref, watch,computed } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import {
|
||||
RightOutlined,
|
||||
@@ -372,6 +374,7 @@ import { teacherUpload } from "../../api/Teaching";
|
||||
import { getCookieForName } from "@/api/method";
|
||||
// import {getProjSt} from "../../api/indexProjStu";
|
||||
import AddContent from "../../components/project/AddContent.vue"
|
||||
import UploadDragger from "@/components/Grateful/UploadDragger.vue"
|
||||
import boe from '@/assets/boe.jpg'
|
||||
export default {
|
||||
name: "InsideLecturer",
|
||||
@@ -385,11 +388,13 @@ export default {
|
||||
UpOutlined,//图标--收起
|
||||
UploadOutlined,//图标--导出
|
||||
FolderAddOutlined,//图标--新增
|
||||
UploadDragger,
|
||||
},
|
||||
setup() {
|
||||
const formRef = ref();
|
||||
const store = useStore();
|
||||
const router = useRouter();
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const state = reactive({
|
||||
Addtitle: '选择教师专长',
|
||||
log: false,
|
||||
@@ -427,7 +432,7 @@ export default {
|
||||
certStatus: 0,//认证状态
|
||||
defaultteachingTime: null,
|
||||
teacherType:1,
|
||||
photo: boe,
|
||||
photo: '',
|
||||
orgLists: [],
|
||||
},
|
||||
searchParam: {
|
||||
@@ -436,10 +441,10 @@ export default {
|
||||
// pageSize1: "10",
|
||||
name: null,
|
||||
tsystemName: null,
|
||||
tlevelId: null,
|
||||
tLevelId: null,
|
||||
waitStatus: null,
|
||||
certStatus: null,
|
||||
courses: null,
|
||||
expertiseNames: null,
|
||||
pageNo: "1",
|
||||
pageSize: "10"
|
||||
},
|
||||
@@ -460,12 +465,13 @@ export default {
|
||||
watch(() => state.formParam.courses, (val) => {
|
||||
console.log(val, 'courses')
|
||||
})
|
||||
watch(() => state.formParam.orgName, (val) => {
|
||||
watch(() => state.formParam.orgNames, (val) => {
|
||||
console.log(val, 'orgName')
|
||||
// if( val !==null ){
|
||||
// state.formParam.neworgName=val.split('/')
|
||||
// state.formParam.neworgName= state.formParam.neworgName[state.formParam.neworgName.length-1]
|
||||
// }
|
||||
if(val){
|
||||
const parts = val.split('/');
|
||||
const reversedParts = parts.reverse();
|
||||
state.formParam.orgName = reversedParts.join('/');
|
||||
}
|
||||
})
|
||||
const headers = { token: getCookieForName("token") };
|
||||
//图片上传
|
||||
@@ -503,6 +509,21 @@ export default {
|
||||
return false;
|
||||
};
|
||||
//附件上传
|
||||
const uploadRef = ref()
|
||||
const uploadUrl = ref("/systemapi/api/m/xfile/base/file/upload");
|
||||
const accept = ".pdf"
|
||||
const folderId = ref({ folderId: process.env.VUE_APP_COURSE_FOLDERID })
|
||||
const changeUpload = (newValue) => {
|
||||
if (newValue[0].status == 'done' && newValue[0]?.response?.status == 200) {
|
||||
// const { id, folderId, path } = files.value[0].response.result
|
||||
// console.log(newValue[0].response.result.path, 9999999999999);
|
||||
// params.value.picPath = path
|
||||
// params.value.folderId = folderId
|
||||
// params.value.pid = id
|
||||
console.log(newValue,'newValue')
|
||||
}
|
||||
}
|
||||
|
||||
const beforeUpload2 = (file) => {
|
||||
const fileType = [
|
||||
"pdf",
|
||||
@@ -642,7 +663,7 @@ export default {
|
||||
state.moreid = 1
|
||||
state.searchParam.waitStatus = null
|
||||
state.searchParam.certStatus = null
|
||||
state.searchParam.courses = null
|
||||
state.searchParam.expertiseNames = null
|
||||
}
|
||||
}
|
||||
const columns = ref([
|
||||
@@ -727,11 +748,11 @@ export default {
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.certStatus == 0 || value.record.certStatus == 1
|
||||
{value.record?.certStatus == 0 || value.record?.certStatus == 1
|
||||
? {
|
||||
"0": "未认证",
|
||||
"1": "已认证",
|
||||
}[value.record.certStatus + ""] || ""
|
||||
}[value.record?.certStatus + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
)
|
||||
@@ -759,18 +780,18 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '录入方式 ',
|
||||
dataIndex: 'entryType',
|
||||
key: 'entryType',
|
||||
dataIndex: 'createFrom',
|
||||
key: 'createFrom',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.entryType == 0 || value.record.entryType == 1
|
||||
{value.record?.createFrom == 0 || value.record?.createFrom == 1
|
||||
? {
|
||||
"0": "系统生成",
|
||||
"0": "自动录入",
|
||||
"1": "手动录入",
|
||||
}[value.record.entryType + ""] || ""
|
||||
}[value.record?.createFrom + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
)
|
||||
@@ -818,7 +839,7 @@ export default {
|
||||
};
|
||||
// List接口数据
|
||||
const getTableDate = () => {
|
||||
// state.tableLoading = true
|
||||
state.tableLoading = true
|
||||
let objA = { ...state.searchParam };
|
||||
getTeacherList(objA)
|
||||
.then((res) => {
|
||||
@@ -834,6 +855,9 @@ export default {
|
||||
// tableData.value = objA
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
state.tableLoading = false
|
||||
}).catch(err => {
|
||||
state.tableLoading = false
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
};
|
||||
getTableDate()
|
||||
@@ -849,7 +873,7 @@ export default {
|
||||
cancel()
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '新增讲师'
|
||||
state.formParam.photo =boe
|
||||
state.formParam.photo =userInfo.value?.avatar
|
||||
state.formParam.status = '1'
|
||||
state.vf = true
|
||||
}
|
||||
@@ -888,6 +912,7 @@ export default {
|
||||
state.formParam.name = nameNo[0]
|
||||
state.formParam.userNo = nameNo[1]
|
||||
}
|
||||
state.formParam.orgName = state.formParam.orgNames
|
||||
state.formParam.expertise = state.formParam?.orgLists?.map(item => item.id).join(',')
|
||||
state.formParam.expertiseNames = state.formParam?.orgLists?.map(item => item.name).join(',')
|
||||
state.formParam = {...state.formParam,...state.tSystemNames}
|
||||
@@ -1104,7 +1129,7 @@ export default {
|
||||
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
||||
state.formParam.workExp0erience = state.formParam.workExperience === null ? '' : state.formParam.workExperience
|
||||
state.formParam.courses = state.formParam.courses === null ? '' : state.formParam.courses
|
||||
state.formParam.photo = state.formParam.photo === null ? boe : state.formParam.photo
|
||||
state.formParam.photo = state.formParam.photo === null ? userInfo.value?.avatar : state.formParam.photo
|
||||
state.tSystemNames.systemName = res.data.data.tsystemName
|
||||
state.tSystemNames.systemId = res.data.data.tsystemId
|
||||
state.tSystemNames.systemCode = res.data.data.systemCode
|
||||
@@ -1113,6 +1138,7 @@ export default {
|
||||
state.formParam.tlevelName = res.data.data.tlevelName
|
||||
state.formParam.tlevelId = res.data.data.tlevelId
|
||||
state.formParam.name = res.data.data.name+'/'+res.data.data.userNo
|
||||
state.formParam.orgNames = state.formParam.orgName
|
||||
state.formParam.orgLists = res.data.data.expertiseNames?.split(',').map(item=>({ name: item }))
|
||||
}
|
||||
|
||||
@@ -1145,7 +1171,7 @@ export default {
|
||||
//导出功能
|
||||
const handleExport = () => {
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API}/admin/export/exportInTeacher?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&name=${state.searchParam.name ? state.searchParam.name : ""}&tsystemId=${state.searchParam.tsystemId ? state.searchParam.tsystemId : ""}&tlevelId=${state.searchParam.tlevelId ? state.searchParam.tlevelId : "" }&waitStatus=${state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${state.searchParam.certStatus ? state.searchParam.certStatus : ""}&courses=${state.searchParam.courses ? state.searchParam.courses : ""}`
|
||||
`${process.env.VUE_APP_BASE_API}/admin/export/exportInTeacher?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&name=${state.searchParam.name ? state.searchParam.name : ""}&tsystemId=${state.searchParam.tsystemId ? state.searchParam.tsystemId : ""}&tLevelId=${state.searchParam.tLevelId ? state.searchParam.tLevelId : "" }&waitStatus=${state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${state.searchParam.certStatus ? state.searchParam.certStatus : ""}&courses=${state.searchParam.courses ? state.searchParam.courses : ""}`
|
||||
);
|
||||
// this.download('lesson_records/export', {
|
||||
// ...state.searchParam
|
||||
@@ -1206,6 +1232,11 @@ export default {
|
||||
isupload,
|
||||
AddContentList,
|
||||
beforeUpload2,
|
||||
changeUpload,
|
||||
folderId,
|
||||
uploadRef,
|
||||
uploadUrl,
|
||||
accept,
|
||||
handleupdialog,
|
||||
cancelupdialog,
|
||||
createupdialog,
|
||||
|
||||
Reference in New Issue
Block a user