From 8b12ab06d915db41fb6582cfab5b26617028da83 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Thu, 9 Feb 2023 17:32:14 +0800
Subject: [PATCH] 2023-2-9
---
.env.development | 2 +-
src/api/manage/province.js | 36 +
src/api/manage/specialize.js | 36 +
src/api/unifiedRecruitment/progress.js | 44 +
src/components/LxHeader/XyContent.vue | 63 +
src/components/XyDialog/index.vue | 2 +-
src/components/XyTable/index.vue | 1015 ++++++++++++-----
src/const/index.js | 32 +
src/main.js | 8 +-
src/mixin/authMixin.js | 13 +
src/store/modules/permission.js | 107 +-
src/views/manage/component/addProvince.vue | 140 +++
src/views/manage/component/addSpecialize.vue | 124 ++
src/views/manage/province.vue | 101 ++
src/views/manage/specialize.vue | 101 ++
.../component/addProgress.vue | 175 +++
.../unifiedRecruitment/component/init.vue | 89 ++
src/views/unifiedRecruitment/progress.vue | 153 +++
18 files changed, 1869 insertions(+), 372 deletions(-)
create mode 100644 src/api/manage/province.js
create mode 100644 src/api/manage/specialize.js
create mode 100644 src/api/unifiedRecruitment/progress.js
create mode 100644 src/components/LxHeader/XyContent.vue
create mode 100644 src/const/index.js
create mode 100644 src/mixin/authMixin.js
create mode 100644 src/views/manage/component/addProvince.vue
create mode 100644 src/views/manage/component/addSpecialize.vue
create mode 100644 src/views/manage/province.vue
create mode 100644 src/views/manage/specialize.vue
create mode 100644 src/views/unifiedRecruitment/component/addProgress.vue
create mode 100644 src/views/unifiedRecruitment/component/init.vue
create mode 100644 src/views/unifiedRecruitment/progress.vue
diff --git a/.env.development b/.env.development
index 10b019d..ca38b40 100644
--- a/.env.development
+++ b/.env.development
@@ -2,5 +2,5 @@
ENV = 'development'
# base api
-VUE_APP_BASE_API =http://weiyuan-test.ali251.langye.net
+VUE_APP_BASE_API = http://weiyuan-test.ali251.langye.net
VUE_APP_UPLOAD_API = http://weiyuan-test.ali251.langye.net/api/admin/upload-file
diff --git a/src/api/manage/province.js b/src/api/manage/province.js
new file mode 100644
index 0000000..0807cc1
--- /dev/null
+++ b/src/api/manage/province.js
@@ -0,0 +1,36 @@
+import request from "@/utils/request";
+
+export function index(isLoading = true,params){
+ return request({
+ url:"/api/admin/province/index",
+ method:"get",
+ isLoading,
+ params
+ })
+}
+
+export function show(isLoading = true,params){
+ return request({
+ url:"/api/admin/province/show",
+ method:"get",
+ isLoading,
+ params
+ })
+}
+
+export function save(data){
+ return request({
+ url:"/api/admin/province/save",
+ method:"post",
+ data
+ })
+}
+
+export function destroy(params){
+ return request({
+ url:"/api/admin/province/destroy",
+ method:"get",
+ params
+ })
+}
+
diff --git a/src/api/manage/specialize.js b/src/api/manage/specialize.js
new file mode 100644
index 0000000..94873d7
--- /dev/null
+++ b/src/api/manage/specialize.js
@@ -0,0 +1,36 @@
+import request from "@/utils/request";
+
+export function index(isLoading = true,params){
+ return request({
+ url:"/api/admin/specialize/index",
+ method:"get",
+ isLoading,
+ params
+ })
+}
+
+export function show(isLoading = true,params){
+ return request({
+ url:"/api/admin/specialize/show",
+ method:"get",
+ isLoading,
+ params
+ })
+}
+
+export function save(data){
+ return request({
+ url:"/api/admin/specialize/save",
+ method:"post",
+ data
+ })
+}
+
+export function destroy(params){
+ return request({
+ url:"/api/admin/specialize/destroy",
+ method:"get",
+ params
+ })
+}
+
diff --git a/src/api/unifiedRecruitment/progress.js b/src/api/unifiedRecruitment/progress.js
new file mode 100644
index 0000000..220a011
--- /dev/null
+++ b/src/api/unifiedRecruitment/progress.js
@@ -0,0 +1,44 @@
+import request from "@/utils/request";
+
+export function index(isLoading = true,params){
+ return request({
+ url:"/api/admin/progress/index",
+ method:"get",
+ isLoading,
+ params
+ })
+}
+
+export function show(isLoading = true,params){
+ return request({
+ url:"/api/admin/progress/show",
+ method:"get",
+ isLoading,
+ params
+ })
+}
+
+export function save(data){
+ return request({
+ url:"/api/admin/progress/save",
+ method:"post",
+ data
+ })
+}
+
+export function destroy(params){
+ return request({
+ url:"/api/admin/progress/destroy",
+ method:"get",
+ params
+ })
+}
+
+export function init(isLoading = true,data){
+ return request({
+ url:"/api/admin/progress/init",
+ method:"post",
+ isLoading,
+ data
+ })
+}
diff --git a/src/components/LxHeader/XyContent.vue b/src/components/LxHeader/XyContent.vue
new file mode 100644
index 0000000..6e71828
--- /dev/null
+++ b/src/components/LxHeader/XyContent.vue
@@ -0,0 +1,63 @@
+
+
+
diff --git a/src/components/XyDialog/index.vue b/src/components/XyDialog/index.vue
index b8ce259..c4591b4 100644
--- a/src/components/XyDialog/index.vue
+++ b/src/components/XyDialog/index.vue
@@ -91,7 +91,7 @@ export default {
}
this.$refs['elForm'].validate().then(res=>{
if(res)this.$emit('submit')
- }).catch(err=>{
+ }).catch(err => {
this.$Message.warning({
content:'请填写完整信息',
duration:1
diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue
index a970359..7ead59f 100644
--- a/src/components/XyTable/index.vue
+++ b/src/components/XyTable/index.vue
@@ -1,117 +1,402 @@
+
+
diff --git a/src/const/index.js b/src/const/index.js
new file mode 100644
index 0000000..11a65e6
--- /dev/null
+++ b/src/const/index.js
@@ -0,0 +1,32 @@
+const progressStatus = [
+ {
+ id: 1,
+ value: "待投档",
+ },
+ {
+ id: 2,
+ value: "录取中",
+ },
+ {
+ id: 3,
+ value: "录取结束",
+ },
+ {
+ id: 4,
+ value: "已邮寄通知书",
+ },
+];
+
+function getProgressStatus(type = "array") {
+ if (type === "array") {
+ return progressStatus;
+ }
+ if (type === "map") {
+ let map = new Map();
+ progressStatus.forEach((item) => {
+ map.set(item.id, item.value);
+ });
+ return map;
+ }
+}
+export { getProgressStatus };
diff --git a/src/main.js b/src/main.js
index c35181c..b7e0581 100644
--- a/src/main.js
+++ b/src/main.js
@@ -44,9 +44,9 @@ Vue.use(VueParticles)
Vue.config.productionTip = false
-import avue from '@smallwei/avue'
-import '@smallwei/avue/lib/index.css';
-Vue.use(avue)
+// import avue from '@smallwei/avue'
+// import '@smallwei/avue/lib/index.css';
+// Vue.use(avue)
Vue.directive('loadMore', {
bind(el, binding) {
const selectWrap = el.querySelector('.el-scrollbar__wrap')
@@ -64,6 +64,8 @@ import LxHeader from "@/components/LxHeader"
Vue.component('lx-header',LxHeader)
import XyTable from '@/components/XyTable'
Vue.component('xy-table',XyTable)
+import XyContent from '@/components/LxHeader/XyContent'
+Vue.component('header-content',XyContent)
import XyDialog from '@/components/XyDialog'
Vue.component('xy-dialog',XyDialog)
import XySelectors from '@/components/XySelectors'
diff --git a/src/mixin/authMixin.js b/src/mixin/authMixin.js
new file mode 100644
index 0000000..75b6dda
--- /dev/null
+++ b/src/mixin/authMixin.js
@@ -0,0 +1,13 @@
+export const authMixin = {
+ data(){
+ return {
+ auths_auth_mixin:[],
+ }
+ },
+ created() {
+ if(this.$route.meta.auths.length > 0 && this.$route.meta.auths[0]){
+ this.auths_auth_mixin = this.$route.meta.auths
+ }
+ console.log(this.auths_auth_mixin)
+ }
+}
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index 06fd367..5ea5d9c 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -61,6 +61,9 @@ const state = {
* @param routes
*/
const pathHandler = (path,id) => {
+ if(path.includes('$')){
+ return path.replace(/\$+/g,"")
+ }
if(path.includes('#') || path == ''){
return id + '_key'
}
@@ -74,72 +77,48 @@ const componentHandler = (path) => {
if(path.includes('#') && path !== '#'){
return ()=>import('@/layout/noLayout')
}
+ if(path.includes('$')){
+ return loadView(path.replace(/\$+/g,""))
+ }
return loadView(path)
}
-
-/**
- * 后台查询的菜单数据拼装成路由格式的数据
- * @param routes
- */
-export function generaMenu(routes, data) {
- data.forEach(item => {
- if (item.url === "/") {
- routes.push({
- path: '/',
- component: Layout,
- redirect: '/dashboard',
- children: [{
- path: 'dashboard',
- name: '系统首页',
- component: () => import('@/views/dashboard/index'),
- meta: {
- title: '系统首页',
- icon: 'dashboard'
- }
- }]
- })
- } else if (item.url === "##") {
- routes.push({
- path: item.path,
- component: Layout,
- children: [{
- path: item.path,
- name: item.name,
- component: item.url === '#' ? Layout : loadView(item.path),
- meta: {
- title: item.name,
- id: item.id,
- roles: ['admin'],
- icon: item.icon
- }
- }]
- })
- } else {
- var path = item.url;
- if (item.path != "null" && item.path != null && item.path != "") {
- path = item.path
- }
- const menu = {
- path: (path === '#' ? item.id + '_key' : path),
- redirect: (item.children.length > 0 ? "noRedirect" : ""),
- component: item.url === '#' ? Layout : loadView(item.url),
- // hidden: true,
- children: [],
- name: 'menu_' + item.id,
- meta: {
- title: item.name,
- id: item.id,
- roles: ['admin'],
-
- icon: item.icon
- }
- }
- if (item.children) {
- generaMenu(menu.children, item.children)
- }
- routes.push(menu)
- }
- })
+
+export function generaMenu(routes, data) {
+ data.forEach(item => {
+ if (item.url === "/") {
+
+ } else {
+ const menu = {
+ path: pathHandler(item.url,item.id),
+ //(item.path === '#'||item.path == '' ? item.id + '_key' : item.path),
+ component: componentHandler(item.url),
+ //(item.path === '#'||item.path == '' ? Layout : loadView(item.path)),
+ // hidden: true,
+ children: [],
+ name: 'menu_' + item.id,
+ meta: {
+ title: item.name,
+ id: item.id,
+ roles: ['admin'],
+ auths:item.has_auth_node_tags,
+
+ icon: item.icon
+ }
+ }
+ if(item.url.includes("$")){
+ menu.hidden = true
+ }
+ if (item.children) {
+ generaMenu(menu.children, item.children)
+ }
+ routes.push(menu)
+ }
+ })
+ routes.push({
+ path: '*',
+ redirect: '/404',
+ hidden: true
+ })
}
const mutations = {
diff --git a/src/views/manage/component/addProvince.vue b/src/views/manage/component/addProvince.vue
new file mode 100644
index 0000000..8baeca1
--- /dev/null
+++ b/src/views/manage/component/addProvince.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+ *
+ 拼音或英文 :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/manage/component/addSpecialize.vue b/src/views/manage/component/addSpecialize.vue
new file mode 100644
index 0000000..15e3207
--- /dev/null
+++ b/src/views/manage/component/addSpecialize.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
diff --git a/src/views/manage/province.vue b/src/views/manage/province.vue
new file mode 100644
index 0000000..370b71f
--- /dev/null
+++ b/src/views/manage/province.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
{
+ $refs['addProvince'].id = row.id;
+ $refs['addProvince'].type = 'editor';
+ $refs['addProvince'].isShow = true
+ }"
+ @delete="row => {
+ destroy({
+ id:row.id
+ }).then(res => {
+ $successMessage('destroy','省份')
+ $refs['xyTable'].getTableData()
+ })
+ }"
+ >
+
+
+
+
+
+
+
+
diff --git a/src/views/manage/specialize.vue b/src/views/manage/specialize.vue
new file mode 100644
index 0000000..92ae1e0
--- /dev/null
+++ b/src/views/manage/specialize.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
{
+ $refs['addSpecialize'].id = row.id;
+ $refs['addSpecialize'].type = 'editor';
+ $refs['addSpecialize'].isShow = true
+ }"
+ @delete="row => {
+ destroy({
+ id:row.id
+ }).then(res => {
+ $successMessage('destroy','专业')
+ $refs['xyTable'].getTableData()
+ })
+ }"
+ >
+
+
+
+
+
+
+
+
diff --git a/src/views/unifiedRecruitment/component/addProgress.vue b/src/views/unifiedRecruitment/component/addProgress.vue
new file mode 100644
index 0000000..eca70db
--- /dev/null
+++ b/src/views/unifiedRecruitment/component/addProgress.vue
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+ *
+ 省份 :
+
+
+
+
+
+
+
+
+
+
+
+ *
+ 进度 :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/unifiedRecruitment/component/init.vue b/src/views/unifiedRecruitment/component/init.vue
new file mode 100644
index 0000000..e124284
--- /dev/null
+++ b/src/views/unifiedRecruitment/component/init.vue
@@ -0,0 +1,89 @@
+
+
+
$emit('update:isShow',e)">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/unifiedRecruitment/progress.vue b/src/views/unifiedRecruitment/progress.vue
new file mode 100644
index 0000000..cd92ce2
--- /dev/null
+++ b/src/views/unifiedRecruitment/progress.vue
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ $refs['addProgress'].id = row.id;
+ $refs['addProgress'].type = 'editor';
+ $refs['addProgress'].isShow = true;
+ }
+ "
+ >
+
+
+
+
+
+
+
+
+
+