From 472e8aa037313a81c9103f8354026715f44fe2c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Sep 2020 17:10:08 +0800 Subject: [PATCH] 9/22 --- src/api/carousel.js | 73 +++++ src/api/image.js | 10 + src/api/train.js | 89 ++++++ src/api/typemanage.js | 72 ----- src/components/Breadcrumb/index.vue | 2 +- src/router/index.js | 27 +- src/views/enterprise/demand.vue | 20 ++ src/views/enterprise/enterprise.vue | 20 ++ src/views/enterprise/index.vue | 6 + src/views/firstPages/index.vue | 20 ++ src/views/firstPages/notice.vue | 415 ++++++++++++++++++++++++++++ src/views/firstPages/policy.vue | 9 +- src/views/firstPages/rotation.vue | 341 ++++++++++++++++++++++- src/views/firstPages/train.vue | 415 +++++++++++++++++++++++++++- src/views/firstPages/typemanage.vue | 240 +--------------- src/views/form/index.vue | 85 ------ 16 files changed, 1410 insertions(+), 434 deletions(-) create mode 100644 src/api/carousel.js create mode 100644 src/api/image.js create mode 100644 src/api/train.js delete mode 100644 src/api/typemanage.js create mode 100644 src/views/enterprise/demand.vue create mode 100644 src/views/enterprise/enterprise.vue create mode 100644 src/views/enterprise/index.vue create mode 100644 src/views/firstPages/index.vue create mode 100644 src/views/firstPages/notice.vue delete mode 100644 src/views/form/index.vue diff --git a/src/api/carousel.js b/src/api/carousel.js new file mode 100644 index 0000000..b72c64c --- /dev/null +++ b/src/api/carousel.js @@ -0,0 +1,73 @@ +import request from '@/utils/request' +const carousel = '/enterprise/carousel' + +export function queryCarousel(data) { + return request({ + url: `/gateway${carousel}/queryCarousel`, + method: 'post', + data: { + param: { + jumpType: data.jumpType, + pageNum: data.pageNum, + pageSize: data.pageSize + } + } + }) +} + +export function updateCarousel(data) { + return request({ + url: `/gateway${carousel}/updateCarousel`, + method: 'post', + data: { + param: { + id: data.id, + jumpType: data.jumpType, + jumpUrl: data.jumpUrl, + param: data.param, + recStatus: data.recStatus, + url: data.url + } + } + }) +} + +export function activeAndStop(data) { + return request({ + url: `/gateway${carousel}/activeAndStop`, + method: 'post', + data: { + param: { + id: data.id, + recStatus: data.recStatus + } + } + }) +} + +export function deleteCarousel(data) { + return request({ + url: `/gateway${carousel}/deleteCarousel`, + method: 'post', + data: { + param: { + id: data + } + } + }) +} + +export function addCarousel(data) { + return request({ + url: `/gateway${carousel}/addCarousel`, + method: 'post', + data: { + param: { + jumpType: data.jumpType, + jumpUrl: data.jumpUrl, + param: data.param, + url: data.url + } + } + }) +} diff --git a/src/api/image.js b/src/api/image.js new file mode 100644 index 0000000..dc6a222 --- /dev/null +++ b/src/api/image.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' +const image = '/enterprise/file' + +export function uploadImage(data) { + return request({ + url: `/gateway${image}/upload`, + method: 'post', + data + }) +} diff --git a/src/api/train.js b/src/api/train.js new file mode 100644 index 0000000..67cb110 --- /dev/null +++ b/src/api/train.js @@ -0,0 +1,89 @@ +import request from '@/utils/request' +const trainApply = '/enterprise/trainApply' +const trainInform = '/enterprise/trainInform' + +export function trainInformQuery(data) { + return request({ + url: `/gateway${trainInform}/trainInformQuery`, + method: 'post', + data: { + param: { + endTime: data.endTime, + incubatorName: data.incubatorName, + pageNum: data.pageNum, + pageSize: data.pageSize, + startTime: data.startTime + } + } + }) +} + +export function incubatorQuery() { + return request({ + url: `/gateway${trainInform}/incubatorQuery`, + method: 'post' + }) +} + +export function trainInformUpdate(data) { + return request({ + url: `/gateway${trainInform}/trainInformUpdate`, + method: 'post', + data: { + param: { + id: data.id, + publishIncubatorId: data.incubator, + trainContent: data.trainContent, + trainPlace: data.trainPlace, + trainTeacher: data.trainTeacher, + trainTime: data.trainTime, + trainTitle: data.trainTitle, + type: data.type + } + } + }) +} + +export function queryById(data) { + return request({ + url: `/gateway${trainApply}/queryById`, + method: 'post', + data: { + param: { + trainInformId: data.id, + pageNum: data.pageNum, + pageSize: data.pageSize + } + } + }) +} + +export function trainInformDelete(data) { + return request({ + url: `/gateway${trainInform}/trainInformDelete`, + method: 'post', + data: { + param: { + id: data + } + } + }) +} + +export function trainInformAdd(data) { + return request({ + url: `/gateway${trainInform}/trainInformAdd`, + method: 'post', + data: { + param: { + publishIncubatorId: data.publishIncubatorId, + trainContent: data.trainContent, + trainPlace: data.trainPlace, + trainTeacher: data.trainTeacher, + trainTime: data.trainTime, + trainTitle: data.trainTitle, + type: data.type + } + } + }) +} diff --git a/src/api/typemanage.js b/src/api/typemanage.js deleted file mode 100644 index 048e6ef..0000000 --- a/src/api/typemanage.js +++ /dev/null @@ -1,72 +0,0 @@ -import request from '@/utils/request' -const typemanage = '/enterprise/category' - -export function TypeManage(data) { - return request({ - url: `/gateway${typemanage}/queryCategory`, - method: 'post', - data: { - param: { - name: data.name, - pageNum: data.pageNum, - pageSize: data.pageSize, - type: data.type - } - } - }) -} - -export function addCategory(data) { - console.log(data) - return request({ - url: `/gateway${typemanage}/addCategory`, - method: 'post', - data: { - param: { - name: data.name, - type: data.type - } - } - }) - } - -export function CategoryDetail(data) { - return request({ - url: `/gateway${typemanage}/queryCategory`, - method: 'post', - data: { - param: { - name: data.name, - pageNum: data.pageNum, - pageSize: data.pageSize, - type: data.type - } - } - }) - } - -export function CategoryDelete(id) { - return request({ - url: `/gateway${typemanage}/deleteCategory`, - method: 'post', - data: { - param: { - id: id - } - } - }) - } - - export function CategoryUpdate(data) { - return request({ - url: `/gateway${typemanage}/updateCategory`, - method: 'post', - data: { - param: { - id: data.id, - name: data.name, - type: data.type - } - } - }) - } \ No newline at end of file diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index e224ff7..d57b59c 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -37,7 +37,7 @@ export default { const first = matched[0] if (!this.isDashboard(first)) { - matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched) + matched = [{ path: '/dashboard', meta: { title: '云服务平台管理系统' }}].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) diff --git a/src/router/index.js b/src/router/index.js index db8c020..0b83713 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -60,7 +60,7 @@ export const constantRoutes = [ component: Layout, redirect: '/example/table', name: 'Example', - meta: { title: '首页管理', icon: 'el-icon-s-help' }, + meta: { title: '首页管理', icon: 'nested' }, children: [{ path: 'policy', name: 'Policy', @@ -79,6 +79,12 @@ export const constantRoutes = [ component: () => import('@/views/firstPages/train'), meta: { title: '培训管理', icon: '' } }, + { + path: 'Notice', + name: 'Notice', + component: () => import('@/views/firstPages/notice'), + meta: { title: '发榜管理', icon: '' } + }, { path: 'typemanage', name: 'Typemanage', @@ -88,14 +94,23 @@ export const constantRoutes = [ }, { - path: '/form', + path: '/enterprise', component: Layout, + redirect: '/example/table', + name: 'Example', + meta: { title: '企业管理', icon: 'nested' }, children: [ { - path: 'index', - name: 'Form', - component: () => import('@/views/form/index'), - meta: { title: 'Form', icon: 'form' } + path: 'enterprise', + name: 'enterprise', + component: () => import('@/views/enterprise/enterprise'), + meta: { title: '企业信息管理', icon: '' } + }, + { + path: 'Rotation', + name: 'Rotation', + component: () => import('@/views/enterprise/demand'), + meta: { title: '企业需求管理', icon: '' } } ] }, diff --git a/src/views/enterprise/demand.vue b/src/views/enterprise/demand.vue new file mode 100644 index 0000000..fb10623 --- /dev/null +++ b/src/views/enterprise/demand.vue @@ -0,0 +1,20 @@ + + + + + + diff --git a/src/views/enterprise/enterprise.vue b/src/views/enterprise/enterprise.vue new file mode 100644 index 0000000..8a2f873 --- /dev/null +++ b/src/views/enterprise/enterprise.vue @@ -0,0 +1,20 @@ + + + + + + diff --git a/src/views/enterprise/index.vue b/src/views/enterprise/index.vue new file mode 100644 index 0000000..88218e5 --- /dev/null +++ b/src/views/enterprise/index.vue @@ -0,0 +1,6 @@ + + diff --git a/src/views/firstPages/index.vue b/src/views/firstPages/index.vue new file mode 100644 index 0000000..1683f68 --- /dev/null +++ b/src/views/firstPages/index.vue @@ -0,0 +1,20 @@ + + + + + + diff --git a/src/views/firstPages/notice.vue b/src/views/firstPages/notice.vue new file mode 100644 index 0000000..3ba4983 --- /dev/null +++ b/src/views/firstPages/notice.vue @@ -0,0 +1,415 @@ + + + diff --git a/src/views/firstPages/policy.vue b/src/views/firstPages/policy.vue index 3a50299..ac21875 100644 --- a/src/views/firstPages/policy.vue +++ b/src/views/firstPages/policy.vue @@ -339,16 +339,15 @@ export default { that.addPolicy.content = Content.innerHTML var str = Time.replace(/-/g, '/') that.addPolicy.publishTime = str - for (const key in that.addPolicy) { if (that.addPolicy[key] === '') { alert(key + '不能为空') - } else { - api.PolicyAdd(that.addPolicy).then((res) => { - that.dialogFormVisible1 = false - }) + return } } + api.PolicyAdd(that.addPolicy).then((res) => { + that.dialogFormVisible1 = false + }) } } } diff --git a/src/views/firstPages/rotation.vue b/src/views/firstPages/rotation.vue index 788030e..768a202 100644 --- a/src/views/firstPages/rotation.vue +++ b/src/views/firstPages/rotation.vue @@ -1,30 +1,341 @@ + }, + created() { + this.getList() + }, + methods: { + async Search() { + const that = this + that.listLoading = true + if (that.typeList[`${that.policyType}`] === undefined) { + that.data.jumpType = '' + await api.queryCarousel(that.data).then((res) => { + that.polictList = res.list + that.total = res.total - 0 + that.listLoading = false + }) + } else { + that.data.jumpType = that.typeList[`${that.policyType}`] + await api.queryCarousel(that.data).then((res) => { + that.polictList = res.list + that.total = res.total - 0 + that.listLoading = false + }) + } + }, + async getList() { + const that = this + that.listLoading = true + await api.queryCarousel(that.data).then((res) => { + that.polictList = res.list + that.total = res.total - 0 - + diff --git a/src/views/firstPages/train.vue b/src/views/firstPages/train.vue index ff9d455..80bbfd2 100644 --- a/src/views/firstPages/train.vue +++ b/src/views/firstPages/train.vue @@ -1,30 +1,415 @@ + }, + async created() { + const that = this + this.getList() + await api.incubatorQuery().then((res) => { + that.incubator = res + }) + }, + methods: { + async Search() { + const that = this + that.listLoading = true + var Time1 = document.getElementById('Time1').value + var Time2 = document.getElementById('Time2').value + var str = Time1.replace(/-/g, '/') + var str1 = Time2.replace(/-/g, '/') + that.data.startTime = str + that.data.endTime = str1 - + diff --git a/src/views/firstPages/typemanage.vue b/src/views/firstPages/typemanage.vue index cc45849..ebde280 100644 --- a/src/views/firstPages/typemanage.vue +++ b/src/views/firstPages/typemanage.vue @@ -1,248 +1,18 @@ diff --git a/src/views/form/index.vue b/src/views/form/index.vue deleted file mode 100644 index f4d66d3..0000000 --- a/src/views/form/index.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - - - -