diff --git a/package.json b/package.json index facdae3..c4796df 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "@arco-design/web-vue": "^2.53.0", "@element-plus/icons-vue": "^2.1.0", + "@tinymce/tinymce-vue": "^4.0.1", "ant-design-vue": "4.x", "axios": "^1.5.1", "echarts": "^5.4.3", @@ -20,6 +21,7 @@ "element-plus": "^2.4.0", "less": "^4.2.0", "pinia": "^2.1.6", + "tinymce": "^5.6.2", "uuid": "^9.0.1", "uuidv1": "^1.6.14", "vue": "^3.3.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 07e12bc..7ded090 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ dependencies: '@element-plus/icons-vue': specifier: ^2.1.0 version: registry.npmmirror.com/@element-plus/icons-vue@2.1.0(vue@3.3.4) + '@tinymce/tinymce-vue': + specifier: ^4.0.1 + version: registry.npmmirror.com/@tinymce/tinymce-vue@4.0.7(vue@3.3.4) ant-design-vue: specifier: 4.x version: registry.npmmirror.com/ant-design-vue@4.0.7(vue@3.3.4) @@ -32,6 +35,9 @@ dependencies: pinia: specifier: ^2.1.6 version: registry.npmmirror.com/pinia@2.1.7(vue@3.3.4) + tinymce: + specifier: ^5.6.2 + version: registry.npmmirror.com/tinymce@5.10.9 uuid: specifier: ^9.0.1 version: registry.npmmirror.com/uuid@9.0.1 @@ -651,6 +657,18 @@ packages: version: 2.11.7 dev: false + registry.npmmirror.com/@tinymce/tinymce-vue@4.0.7(vue@3.3.4): + resolution: {integrity: sha512-1esB8wGWrjPCY+rK8vy3QB1cxwXo7HLJWuNrcyPl6LOVR+QJjub0OiV/C+TUEsLN6OpCtRv+QnIqMC5vXz783Q==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@tinymce/tinymce-vue/-/tinymce-vue-4.0.7.tgz} + id: registry.npmmirror.com/@tinymce/tinymce-vue/4.0.7 + name: '@tinymce/tinymce-vue' + version: 4.0.7 + peerDependencies: + vue: ^3.0.0 + dependencies: + tinymce: registry.npmmirror.com/tinymce@5.10.9 + vue: registry.npmmirror.com/vue@3.3.4 + dev: false + registry.npmmirror.com/@types/estree@1.0.2: resolution: {integrity: sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/estree/-/estree-1.0.2.tgz} name: '@types/estree' @@ -3135,6 +3153,12 @@ packages: engines: {node: '>=12.22'} dev: false + registry.npmmirror.com/tinymce@5.10.9: + resolution: {integrity: sha512-5bkrors87X9LhYX2xq8GgPHrIgJYHl87YNs+kBcjQ5I3CiUgzo/vFcGvT3MZQ9QHsEeYMhYO6a5CLGGffR8hMg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tinymce/-/tinymce-5.10.9.tgz} + name: tinymce + version: 5.10.9 + dev: false + registry.npmmirror.com/titleize@3.0.0: resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/titleize/-/titleize-3.0.0.tgz} name: titleize diff --git a/src/api/carouselChart.js b/src/api/carouselChart.js new file mode 100644 index 0000000..14cfe9b --- /dev/null +++ b/src/api/carouselChart.js @@ -0,0 +1,7 @@ +import request from '@/utils/request' + +export const useGetCarouselChart = () => + request.get('vx_interview/getCarouselChart') + +export const useUpdateCarouselChart = ({ submitImages }) => + request.post('vx_interview/updateCarouselChart', { submitImages }) diff --git a/src/api/company.js b/src/api/company.js new file mode 100644 index 0000000..e285edd --- /dev/null +++ b/src/api/company.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export const useGetApplicationCount = (days, encoding) => + request.get('company/getApplicationCount', { + params: { + days: days, + encoding: encoding + } + }) diff --git a/src/api/user.js b/src/api/user.js index 27d3b75..639d17a 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -86,3 +86,19 @@ export const useUploadUserInfo = ({ export const useAdminEditPassword = ({ userId, updateUserId, password }) => request.post('admin/adminEditPassword', { userId, updateUserId, password }) + +//获取反馈列表 +export const useGetFeedBackList = (status) => + request.get('vxUser/getAllFeedBack', { + params: { + status: status + } + }) +//修改反馈的状态 +export const useChangeFeedBackStatus = (id, userId) => + request.get('vxUser/changeFeedBackStatus', { + params: { + id: id, + userId: userId + } + }) diff --git a/src/components/EditorContainer.vue b/src/components/EditorContainer.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/router/index.js b/src/router/index.js index f3779be..08a6dc5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -35,6 +35,23 @@ const router = createRouter({ path: '/manager', component: () => import('@/views/manager/ManagerPage.vue') }, + { + path: '/adminManager', + component: () => import('@/views/manager/AdminMangePage.vue') + }, + { + path: '/companyManager', + component: () => import('@/views/manager/CompanyManagePage.vue') + }, + { + path: '/carouselChart', + component: () => import('@/views/carouselChart/CarouselChartPage.vue') + }, + { + path: '/feedbackmanage', + component: () => + import('@/views/feedbackmanage/FeedbackManagePage.vue') + }, { path: '/interview/imageManagement', component: () => import('@/views/interview/ImageManagement.vue') diff --git a/src/utils/request.js b/src/utils/request.js index ad15e06..b0613ce 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -2,7 +2,7 @@ import { useUserStore } from '@/stores' import axios from 'axios' import router from '@/router' -const baseURL = 'http://localhost:5380' +const baseURL = 'http://localhost:8080' const instance = axios.create({ baseURL, diff --git a/src/views/carouselChart/CarouselChartPage.vue b/src/views/carouselChart/CarouselChartPage.vue new file mode 100644 index 0000000..aed8c21 --- /dev/null +++ b/src/views/carouselChart/CarouselChartPage.vue @@ -0,0 +1,141 @@ + + + + + + + + + + + 只能上传jpg/png文件,最多上传5张且单张图片不超过5M + + + + + + + + + 保存修改 + + + diff --git a/src/views/feedbackmanage/FeedbackManagePage.vue b/src/views/feedbackmanage/FeedbackManagePage.vue new file mode 100644 index 0000000..bae5619 --- /dev/null +++ b/src/views/feedbackmanage/FeedbackManagePage.vue @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + 查看图片 + + + + + + + {{ row.status === 1 ? '待处理' : '已处理' }} + + + + + + + + + + + + + diff --git a/src/views/feedbackmanage/components/ViewImagesDialog.vue b/src/views/feedbackmanage/components/ViewImagesDialog.vue new file mode 100644 index 0000000..a25d47a --- /dev/null +++ b/src/views/feedbackmanage/components/ViewImagesDialog.vue @@ -0,0 +1,53 @@ + + + + + + + + + + + 关闭 + + + + + diff --git a/src/views/home/HomeindexPage.vue b/src/views/home/HomeindexPage.vue index 0dfc424..0d89286 100644 --- a/src/views/home/HomeindexPage.vue +++ b/src/views/home/HomeindexPage.vue @@ -5,7 +5,7 @@ import { BarChart } from 'echarts/charts' import { CanvasRenderer } from 'echarts/renderers' import VChart, { THEME_KEY } from 'vue-echarts' -import { ref, provide } from 'vue' +import { ref, provide, onBeforeMount } from 'vue' import { useCompanyStore, useUserStore } from '@/stores' import { Search, @@ -14,6 +14,7 @@ import { ChatDotSquare, Tickets } from '@element-plus/icons-vue' +import { useRouter } from 'vue-router' import { useGetJobList, getApplicationList, @@ -24,13 +25,22 @@ import { getInterviewRecordList, agreeUsersPassInterview } from '@/api/interview' +import { useGetApplicationCount } from '@/api/company' import { ElMessage } from 'element-plus' import DisagreeDialog from './components/DisagreeDialog.vue' import InviteDialog from './components/InviteDialog.vue' import ViewResume from './components/ViewResume.vue' +import ViewInterviewRecord from './components/ViewInterviewRecord.vue' use([TooltipComponent, GridComponent, BarChart, CanvasRenderer]) - +onBeforeMount(() => { + const router = useRouter() + const userStore = useUserStore() + if (userStore.userInfo.role === '1') { + router.replace('/adminManager') + } +}) + const companyStore = useCompanyStore() const jobList = ref([]) const activeJob = ref() @@ -62,63 +72,26 @@ getJobList() provide(THEME_KEY, 'white') // prettier-ignore const date = ref(Number) +const data7 = ref([]) -const setDate = (day) => { +const dataValues7 = ref([]) + +const setDate = async (day) => { date.value = day + + const resSeven = await useGetApplicationCount(day, companyStore.encoding) + resSeven.data.data.map((item) => { + data7.value.push(item.createTime) + }) + console.log(data7.value) + resSeven.data.data.map((item) => { + dataValues7.value.push(item.count) + }) + console.log(dataValues7.value) } setDate(7) -const date30 = [ - '2023-10-01', - '2023-10-02', - '2023-10-03', - '2023-10-04', - '2023-10-05', - '2023-10-06', - '2023-10-07', - '2023-10-08', - '2023-10-09', - '2023-10-10', - '2023-10-11', - '2023-10-12', - '2023-10-13', - '2023-10-14', - '2023-10-15', - '2023-10-16', - '2023-10-17', - '2023-10-18', - '2023-10-19', - '2023-10-20', - '2023-10-21', - '2023-10-22', - '2023-10-23', - '2023-10-24', - '2023-10-25', - '2023-10-26', - '2023-10-27', - '2023-10-28', - '2023-10-29', - '2023-10-30' -] - -const data7 = [ - '2023-10-24', - '2023-10-25', - '2023-10-26', - '2023-10-27', - '2023-10-28', - '2023-10-29', - '2023-10-30' -] - -const dataValues7 = [10, 52, 200, 334, 390, 330, 220] -const dataValue30 = [ - 10, 52, 200, 334, 390, 330, 220, 10, 52, 200, 334, 390, 330, 220, 10, 52, 200, - 334, 390, 330, 220, 10, 52, 200, 334, 390, 330, 220, 10, 52, 200, 334, 390, - 330, 220, 10, 52, 200, 334, 390, 330, 220, 10, 52, 200, 334, 390, 330, 220, - 400, 500 -] -const option1 = ref({ +const option = ref({ tooltip: { trigger: 'axis', axisPointer: { @@ -134,7 +107,7 @@ const option1 = ref({ xAxis: [ { type: 'category', - data: data7, + data: data7.value, axisTick: { alignWithLabel: true } @@ -150,43 +123,7 @@ const option1 = ref({ name: '投递人数', type: 'bar', barWidth: '50%', - data: dataValues7 - } - ] -}) -const option2 = ref({ - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow' - } - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true - }, - xAxis: [ - { - type: 'category', - data: date30, - axisTick: { - alignWithLabel: true - } - } - ], - yAxis: [ - { - type: 'value' - } - ], - series: [ - { - name: '投递人数', - type: 'bar', - barWidth: '50%', - data: dataValue30 + data: dataValues7.value } ] }) @@ -291,7 +228,7 @@ const handleSelectionChange = (val) => { } console.log(selectAgreeUsers.value) } -const userStore = useUserStore() + const PassInterview = async () => { if (filterRecored.value === '2') { ElMessage.error('所勾选的列表已经通过面试啦,请不要重复操作') @@ -376,37 +313,18 @@ const handleDisagreeApplication = (row) => { console.log(row) } +const viewInterviewRecord = ref() const handleViewRecordDetail = (row) => { - console.log(row) + viewInterviewRecord.value.open(row) } - - - {{ date === 7 ? '近7天' : '近30天' - }} - - - - 近7天 - 近30天 - - - - - {{ date === 7 ? '近7天' : '近30天' }}投递简历人数 - + {{ '近7天' }}投递简历人数 - @@ -683,6 +601,7 @@ const handleViewRecordDetail = (row) => { > + diff --git a/src/views/home/components/ViewInterviewRecord.vue b/src/views/home/components/ViewInterviewRecord.vue new file mode 100644 index 0000000..360877a --- /dev/null +++ b/src/views/home/components/ViewInterviewRecord.vue @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + diff --git a/src/views/layout/LayoutContainer.vue b/src/views/layout/LayoutContainer.vue index 735c775..8a0bdb1 100644 --- a/src/views/layout/LayoutContainer.vue +++ b/src/views/layout/LayoutContainer.vue @@ -24,6 +24,7 @@ import { useAdminLogout } from '../../api/user' import { useRouter } from 'vue-router' import ChangeAvatarDialog from './components/ChangeAvatarDialog.vue' import RestPasswordDialog from './components/ResetPasswordDialog.vue' + import { ref } from 'vue' import UserInfoDialog from './components/UserInfoDialog.vue' @@ -66,16 +67,58 @@ const RestPassword = () => { text-color="#fff" router > - + 首页 - + + + 人员管理 + + 管理员管理 - - + + + 公司管理 + + + + 轮播图管理 + + + + 反馈管理 + + 个性化面试 @@ -95,7 +138,12 @@ const RestPassword = () => { - + 题库设置 @@ -113,7 +161,12 @@ const RestPassword = () => { 题目广场 - + 招聘 diff --git a/src/views/layout/components/UserInfoDialog.vue b/src/views/layout/components/UserInfoDialog.vue index 33696d0..c80c994 100644 --- a/src/views/layout/components/UserInfoDialog.vue +++ b/src/views/layout/components/UserInfoDialog.vue @@ -22,11 +22,11 @@ const open = () => { submitForm.value = userStore.userInfo userRole.value = userStore.userInfo.role === '1' - ? '超级管理员' + ? '系统管理员' : userStore.userInfo.role === '2' - ? 'HR' + ? '公司管理员' : userStore.userInfo.role === '3' - ? '员工' + ? 'HR' : '面试者' submitForm.value.userId = submitForm.value.id @@ -38,7 +38,8 @@ const rules = ref({ role: [{ required: true, message: '请输入权限', trigger: 'blur' }], username: [{ required: true, message: '请输入姓名', trigger: 'blur' }], age: [{ required: true, message: '请输入年龄', trigger: 'blur' }], - email: [{ required: true, message: '请输入电子邮箱', trigger: 'blur' }] + email: [{ required: true, message: '请输入电子邮箱', trigger: 'blur' }], + sex: [{ required: true, message: '请输入选择性别', trigger: 'blur' }] }) //上传图片的方法 @@ -146,7 +147,7 @@ defineExpose({ v-model="submitForm.email" > - + 男 女 diff --git a/src/views/manager/AdminMangePage.vue b/src/views/manager/AdminMangePage.vue new file mode 100644 index 0000000..3bedecf --- /dev/null +++ b/src/views/manager/AdminMangePage.vue @@ -0,0 +1,105 @@ + + + + + + + + + + + 重置 + + + + + + 添加管理员 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/manager/CompanyManagePage.vue b/src/views/manager/CompanyManagePage.vue new file mode 100644 index 0000000..7bb26dd --- /dev/null +++ b/src/views/manager/CompanyManagePage.vue @@ -0,0 +1,38 @@ + + + + + + + + + + + 重置 + + + + + + 公司注册 + + + + + + + + diff --git a/src/views/manager/ManagerPage.vue b/src/views/manager/ManagerPage.vue index b6cf1a1..8a6dbd4 100644 --- a/src/views/manager/ManagerPage.vue +++ b/src/views/manager/ManagerPage.vue @@ -45,7 +45,7 @@ const handleEdit = (row) => { - + +import { ref } from 'vue' +import { useAddAdmin } from '@/api/user' +import { useUserStore, useCompanyStore } from '@/stores' + +const userStore = useUserStore() +const companyStore = useCompanyStore() + +const addEnditDialog = ref(false) + +const form = ref() +const FormModel = ref({ + username: '', + phone: '', + role: '1' +}) + +const open = () => { + addEnditDialog.value = true +} +const rules = { + username: [{ required: true, message: '请输入姓名!', trigger: 'blur' }], + phone: [ + { required: true, message: '请输入手机号码!', trigger: 'blur' }, + { + pattern: /(^((\+86)|(86))?(1[3-9])\d{9}$)|(^(0\d{2,3})-?(\d{7,8})$)/, + message: '输入的手机号码格式不正确,请重新输入', + trigger: 'blur' + } + ] +} + +const emit = defineEmits(['getAdminList']) +const submitForm = async () => { + await form.value.validate() + + await useAddAdmin( + companyStore.encoding, + userStore.userInfo.id, + FormModel.value.username, + FormModel.value.phone, + FormModel.value.role + ) + ElMessage.success('添加成功!') + FormModel.value = { + username: '', + phone: '', + role: '1' + } + + addEnditDialog.value = false + + emit('getAdminList') +} +defineExpose({ + open +}) + + + + + + + + + + + + + 注:初始化密码就是账号的后六位 + + + 取消 + 确认 + + + + + + diff --git a/src/views/question/container/components/AddShareQuestionDialog.vue b/src/views/question/container/components/AddShareQuestionDialog.vue index 46ee4f6..28c47ae 100644 --- a/src/views/question/container/components/AddShareQuestionDialog.vue +++ b/src/views/question/container/components/AddShareQuestionDialog.vue @@ -124,7 +124,7 @@ defineExpose({ - + diff --git a/src/views/question/container/components/AddSharedQuestionTypeToMineDialog.vue b/src/views/question/container/components/AddSharedQuestionTypeToMineDialog.vue index d35e39e..ebb0ced 100644 --- a/src/views/question/container/components/AddSharedQuestionTypeToMineDialog.vue +++ b/src/views/question/container/components/AddSharedQuestionTypeToMineDialog.vue @@ -19,7 +19,9 @@ const open = (SharedBankIds) => { submitForm.value.userId = userStore.userInfo.id } const addEndit = async () => { + console.log(submitForm.value) const res = await useAddQuestionTypeFromShare(submitForm.value) + ElMessage.success(res.data.data) submitForm.value = { SharedBankIds: [], diff --git a/src/views/question/container/components/MySharedQuestionEditDialog.vue b/src/views/question/container/components/MySharedQuestionEditDialog.vue index da4374e..90a0f99 100644 --- a/src/views/question/container/components/MySharedQuestionEditDialog.vue +++ b/src/views/question/container/components/MySharedQuestionEditDialog.vue @@ -31,7 +31,7 @@ const rules = { title: [{ required: true, message: '请输入标题', trigger: 'blur' }], typeName: [{ required: true, message: '请选择题库类型', trigger: 'blur' }], details: [{ required: true, message: '请输入题目详情', trigger: 'blur' }], - promote: [{ required: true, message: '请输入题目的promote', trigger: 'blur' }] + answer: [{ required: true, message: '请输入题目的预设答案', trigger: 'blur' }] } const form = ref() const update = async () => { @@ -91,9 +91,9 @@ defineExpose({ placeholder="请输入题目详情" /> - + { submitForm.value.userId = userStore.userInfo.id - // submitForm.value.address = submitForm.value.address.slice(1, -1).split(', ') - - // submitForm.value.treatment = submitForm.value.treatment - // .slice(1, -1) - // .split(', ') - - // submitForm.value.images = submitForm.value.images.slice(1, -1).split(', ') if (res.data.data.images === '') { submitForm.value.images = [] @@ -140,10 +133,7 @@ const UploadImage = async (file) => { } //移除图片功能 const handleRemove = async (file) => { - console.log('删除') - console.log(file.name) await useDeletePic(file.name) - handleEndit() } //预览图片功能 @@ -204,7 +194,6 @@ const handleEndit = async () => { } }) ) - console.log(submitForm.value.companyLogo) submitForm.value.subLogo = JSON.stringify( submitForm.value.companyLogo.map((item) => { return { @@ -214,7 +203,6 @@ const handleEndit = async () => { }) ) submitForm.value.treatment = JSON.stringify(submitForm.value.treatment) - console.log(submitForm.value) const res = await useUploadCompanyDetail(submitForm.value) ElMessage.success(res.data.data) diff --git a/vite.config.js b/vite.config.js index 988bfef..f26ea0b 100644 --- a/vite.config.js +++ b/vite.config.js @@ -26,7 +26,7 @@ export default defineConfig({ //代理设置 server: { - port: 5173, + port: 5174, host: '0.0.0.0', base: './', cors: true, // 默认启用并允许任何源