Browse Source

9/26

master
aBin 5 years ago
parent
commit
283cddf2aa
  1. 79
      src/api/notice.js
  2. 207
      src/views/firstPages/notice.vue
  3. 2
      src/views/firstPages/policy.vue
  4. 9
      src/views/firstPages/rotation.vue
  5. 2
      src/views/firstPages/train.vue

79
src/api/notice.js

@ -0,0 +1,79 @@
import request from '@/utils/request'
const demandPublish = '/enterprise/demandPublish'
const demandCandidate = '/enterprise/demandCandidate'
export function QueryDemandPublish(data) {
return request({
url: `/gateway${demandPublish}/QueryDemandPublish`,
method: 'post',
data: {
param: {
id: data.id,
pageNum: data.pageNum,
pageSize: data.pageSize,
type: data.type
}
}
})
}
export function demandPublishUpdate(data) {
return request({
url: `/gateway${demandPublish}/demandPublishUpdate`,
method: 'post',
data: {
param: {
id: data.id,
content: data.content,
type: data.type
}
}
})
}
export function demandPublishDelete(data) {
return request({
url: `/gateway${demandPublish}/demandPublishDelete`,
method: 'post',
data: {
id: data
}
})
}
export function demandCandidateAll(data) {
return request({
url: `/gateway${demandCandidate}/demandCandidateAll`,
method: 'post',
data: {
param: {
publishId: data
}
}
})
}
export function demandCandidateQuery(data) {
return request({
url: `/gateway${demandCandidate}/demandCandidateQuery`,
method: 'post',
data: {
param: {
id: data
}
}
})
}
export function demandPublishAdd(data) {
return request({
url: `/gateway${demandPublish}/demandPublishAdd`,
method: 'post',
data: {
param: {
content: data.content,
demandId: 0,
type: data.type
}
}
})
}

207
src/views/firstPages/notice.vue

@ -2,12 +2,8 @@
<div class="app-container">
<!-- 头部搜索添加 -->
<div class="filter-container">
<el-date-picker id="Time1" v-model="data.startTime" class="filter-item" type="date" placeholder="请选择开始时间" />
~
<el-date-picker id="Time2" v-model="data.endTime" class="filter-item" type="date" placeholder="请选择结束时间" />
<el-select v-model="policyType1" placeholder="孵化器" clearable style="width: 190px;margin-left: 10px;" class="filter-item">
<el-option v-for="(item,index) in incubator" :key="index" :value="item.incubator" />
<el-select v-model="policyType" placeholder="需求类型" clearable style="width: 290px;margin-left: 10px;" class="filter-item">
<el-option v-for="(item,index) in incubator" :key="index" :value="item" />
</el-select>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-search" @click="Search">
搜索
@ -18,47 +14,26 @@
</el-button>
</div>
<!-- 培训通知列表 -->
<!-- 发榜信息列表 -->
<el-table v-loading="listLoading" :data="polictList" border fit highlight-current-row style="width: 100%;">
<el-table-column label="ID" prop="id" align="center" width="80">
<template slot-scope="{row}">
<span>{{ row.id }}</span>
</template>
</el-table-column>
<el-table-column label="培训标题" prop="trainTitle" align="center" width="180">
<template slot-scope="{row}">
<span>{{ row.trainTitle }}</span>
</template>
</el-table-column>
<el-table-column label="孵化器" prop="incubator" align="center" width="180">
<template slot-scope="{row}">
<span>{{ row.incubator }}</span>
</template>
</el-table-column>
<el-table-column label="培训内容" prop="trainContent" align="center" width="300">
<template slot-scope="{row}">
<span>{{ row.trainContent }}</span>
</template>
</el-table-column>
<el-table-column label="培训地点" prop="trainPlace" align="center" width="120">
<template slot-scope="{row}">
<span>{{ row.trainPlace }}</span>
</template>
</el-table-column>
<el-table-column label="培训讲师" prop="trainTeacher" align="center" width="120">
<el-table-column label="创建时间" prop="createdAt" align="center" width="180">
<template slot-scope="{row}">
<span>{{ row.trainTeacher }}</span>
<span>{{ row.createdAt }}</span>
</template>
</el-table-column>
<el-table-column label="培训时间" prop="trainTime" align="center" width="160">
<el-table-column label="发榜内容" prop="content" align="center">
<template slot-scope="{row}">
<span>{{ row.trainTime }}</span>
<span>{{ row.content }}</span>
</template>
</el-table-column>
<el-table-column label="培训类型" prop="type" align="center" width="160">
<el-table-column label="发榜类型" prop="type" align="center" width="160">
<template slot-scope="{row}">
<el-tag v-if="row.type === 0" type="published">线上</el-tag>
<el-tag v-if="row.type === 1" style="background:#ccc;">线下</el-tag>
<el-tag type="published">{{ incubator[row.type] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width">
@ -67,7 +42,7 @@
修改
</el-button>
<el-button size="mini" type="success" @click="enroll(row.id)">
报名列表
揭榜列表
</el-button>
<el-button size="mini" type="danger" @click="handleDelete(row.id)">
删除
@ -77,39 +52,17 @@
</el-table>
<!-- 显示当前页数且显示所有页数可以跳转 -->
<pagination v-show="total>0" :total="total" :page.sync="data.pageNum" :limit.sync="data.pageSize" @pagination="getList" />
<!-- 修改培训通知界面 -->
<!-- 修改发榜信息 -->
<el-dialog title="修改" :visible.sync="dialogFormVisible">
<el-form ref="dataForm" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;">
<el-form-item label="培训标题" prop="trainTitle" style="width: 180%">
<el-input v-model="temp.trainTitle" />
</el-form-item>
<!-- <el-form-item label="发榜内容" prop="content" align="center">
<el-input v-model="temp.content" />
</el-form-item> -->
<el-form-item label="孵化器" prop="incubator" style="width: 180%">
<el-select v-model="temp.incubator" placeholder="孵化器" clearable style="width: 190px" class="filter-item">
<el-option v-for="(item,index) in incubator" :key="index" :value="item.incubator" />
</el-select>
</el-form-item>
<el-form-item label="培训内容" prop="trainContent" style="width: 180%">
<el-input v-model="temp.trainContent" />
</el-form-item>
<el-form-item label="培训地点" prop="trainPlace" style="width: 180%">
<el-input v-model="temp.trainPlace" />
</el-form-item>
<el-form-item label="培训讲师" prop="trainTeacher" style="width: 180%">
<el-input v-model="temp.trainTeacher" />
</el-form-item>
<el-form-item label="培训时间" prop="trainTime" style="width: 180%">
<el-date-picker id="Time3" v-model="temp.trainTime" class="filter-item" type="date" placeholder="请选择结束时间" />
</el-form-item>
<el-form-item label="培训类型" prop="statusType" style="width: 180%">
<el-select v-model="statusType" placeholder="类型" clearable style="width: 190px" class="filter-item">
<el-option v-for="(item,index) in typeList" :key="index" :value="index" />
<el-form-item label="需求类型" prop="statusType" style="width: 180%">
<el-select v-model="policyType1" placeholder="类型" clearable style="width: 190px" class="filter-item">
<el-option v-for="(item,index) in incubator" :key="index" :value="item" />
</el-select>
</el-form-item>
@ -124,7 +77,7 @@
</div>
</el-dialog>
<!-- 报名列表界面 -->
<el-dialog title="报名列表" :visible.sync="dialogFormVisible2">
<el-dialog title="揭榜列表" :visible.sync="dialogFormVisible2">
<el-table v-loading="listLoading" :data="enrollList" border fit highlight-current-row style="width: 100%;">
<el-table-column label="企业名称" prop="enterpriseName" align="center">
<template slot-scope="{row}">
@ -141,9 +94,9 @@
<span>{{ row.contactPhone }}</span>
</template>
</el-table-column>
<el-table-column label="报名人数" prop="applyNum" align="center">
<el-table-column label="揭榜理由" prop="remark" align="center">
<template slot-scope="{row}">
<span>{{ row.applyNum }}</span>
<span>{{ row.remark }}</span>
</template>
</el-table-column>
</el-table>
@ -158,34 +111,17 @@
<el-dialog title="修改" :visible.sync="dialogFormVisible1">
<el-form ref="dataForm" :model="addCarousel" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;">
<el-form-item label="孵化器" prop="publishIncubatorName" style="width: 180%">
<el-select v-model="addCarousel.publishIncubatorName" placeholder="培训类型" clearable style="width: 190px" class="filter-item">
<el-option v-for="item in incubator" :key="item.id" :value="item.incubator" />
</el-select>
</el-form-item>
<el-form-item label="培训内容" prop="trainContent" style="width: 180%">
<el-input v-model="addCarousel.trainContent" />
<el-form-item label="需求内容" prop="content" style="width: 180%">
<textarea v-model="addCarousel.content" style="max-width: 100%;width: 100%;height: 260px" />
</el-form-item>
<el-form-item label="培训地点" prop="trainPlace" style="width: 180%">
<el-input v-model="addCarousel.trainPlace" />
<el-form-item label="需求id" prop="trainPlace" style="width: 180%">
0创时代孵化器
</el-form-item>
<el-form-item label="培训讲师" prop="trainTeacher" style="width: 180%">
<el-input v-model="addCarousel.trainTeacher" />
</el-form-item>
<el-form-item label="培训时间" prop="trainTime" style="width: 180%">
<el-date-picker id="Time4" v-model="addCarousel.trainTime1" class="filter-item" type="date" placeholder="请选择结束时间" />
</el-form-item>
<el-form-item label="培训标题" prop="trainTitle" style="width: 180%">
<el-input v-model="addCarousel.trainTitle" />
</el-form-item>
<el-form-item label="培训类型" prop="type" style="width: 180%">
<el-form-item label="需求类型" prop="type" style="width: 180%">
<el-select v-model="policyType2" placeholder="培训类型" clearable style="width: 190px" class="filter-item">
<el-option v-for="(item,index) in typeList" :key="index" :value="index" />
<el-option v-for="(item,index) in incubator" :key="index" :value="item" />
</el-select>
</el-form-item>
@ -204,7 +140,7 @@
<script>
import { mapGetters } from 'vuex'
import * as api from '@/api/train'
import * as api from '@/api/notice'
import Pagination from '@/components/Pagination'
export default {
@ -213,20 +149,18 @@ export default {
data() {
return {
list: null,
show111: false,
total: 0,
total1: 0,
listLoading: true,
data: {
endTime: '',
incubatorName: '',
id: '',
pageNum: 1,
pageSize: 10,
startTime: ''
pageSize: 20,
type: ''
},
polictList: [],
typeList: { '线上': 0, '线下': 1 },
incubator: [],
incubator: ['技术转移转化', '工业设计咨询', '科技金融建设', '政策项目咨询', '知识产权咨询', '创新体系建设', '创新创业咨询', '信息技术服务', '协同创新服务'],
policyType: undefined,
policyType1: undefined,
policyType2: undefined,
@ -241,21 +175,12 @@ export default {
dialogFormVisible2: false,
temp: {},
addCarousel: {
publishIncubatorName: '',
publishIncubatorId: '',
trainContent: '',
trainPlace: '',
trainTeacher: '',
trainTime: '',
trainTime1: '',
trainTitle: '',
content: '',
type: ''
},
enrollList: [],
data1: {
id: 0,
pageNum: 1,
pageSize: 10
id: 0
},
showid: 0
}
@ -266,33 +191,27 @@ export default {
])
},
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
if (that.policyType1 !== undefined) {
that.data.incubatorName = that.policyType1
await api.trainInformQuery(that.data).then((res) => {
if (that.policyType !== undefined && that.policyType !== '') {
for (var i = 0; i < that.incubator.length; i++) {
if (that.policyType === that.incubator[i]) {
that.data.type = i
}
}
await api.QueryDemandPublish(that.data).then((res) => {
that.polictList = res.list
that.total = res.total - 0
that.listLoading = false
})
return
} else {
await api.trainInformQuery(that.data).then((res) => {
that.data.type = ''
await api.QueryDemandPublish(that.data).then((res) => {
that.polictList = res.list
that.total = res.total - 0
that.listLoading = false
@ -303,7 +222,7 @@ export default {
async getList() {
const that = this
that.listLoading = true
await api.trainInformQuery(that.data).then((res) => {
await api.QueryDemandPublish(that.data).then((res) => {
that.polictList = res.list
that.total = res.total - 0
@ -317,11 +236,7 @@ export default {
that.temp = Object.assign({}, row) // copy obj
that.temp.timestamp = new Date(that.temp.timestamp)
that.dialogStatus = 'update'
if (that.temp.type === 0) {
that.statusType = '线上'
} else {
that.statusType = '线下'
}
that.policyType1 = that.incubator[that.temp.type]
that.dialogFormVisible = true
that.$nextTick(() => {
that.$refs['dataForm'].clearValidate()
@ -329,20 +244,12 @@ export default {
},
async Commit() {
const that = this
var Time3 = document.getElementById('Time3').value
// var str2 = Time3.replace(/-/g, '/')
that.temp.trainTime = Time3
for (var i = 0; i < that.incubator.length; i++) {
if (that.temp.incubator === that.incubator[i].incubator) {
that.temp.incubator = that.incubator[i].id
}
}
for (var key in that.typeList) {
if (that.statusType === key) {
that.temp.type = that.typeList[key]
if (that.policyType1 === that.incubator[i]) {
that.temp.type = i
}
}
await api.trainInformUpdate(that.temp).then((res) => {
await api.demandPublishUpdate(that.temp).then((res) => {
this.getList()
that.dialogFormVisible = false
})
@ -351,9 +258,8 @@ export default {
const that = this
that.listLoading = true
that.dialogFormVisible2 = true
that.data1.id = id
that.showid = id
await api.queryById(that.data1).then((res) => {
await api.demandCandidateAll(id).then((res) => {
console.log(res)
that.total1 = res.total - 0
that.enrollList = res.list
@ -364,7 +270,7 @@ export default {
const that = this
that.listLoading = true
that.data1.id = that.showid
await api.queryById(that.data1).then((res) => {
await api.demandCandidateAll(that.data1.id).then((res) => {
that.total1 = res.total - 0
that.enrollList = res.list
@ -374,7 +280,7 @@ export default {
})
},
async handleDelete(id) {
await api.trainInformDelete(id).then((res) => {
await api.demandPublishDelete(id).then((res) => {
this.getList()
})
},
@ -387,25 +293,18 @@ export default {
},
async CommitAdd() {
const that = this
that.addCarousel.trainTime = document.getElementById('Time4').value
for (const key in that.typeList) {
if (key === that.policyType2) {
that.addCarousel.type = that.typeList[key]
}
}
for (var i = 0; i < that.incubator.length; i++) {
if (that.addCarousel.publishIncubatorName === that.incubator[i].incubator) {
that.addCarousel.publishIncubatorId = that.incubator[i].id
if (that.policyType2 === that.incubator[i]) {
that.addCarousel.type = i
}
}
console.log(that.addCarousel)
for (const kkk in that.addCarousel) {
if (that.addCarousel[kkk] === '') {
alert(kkk + '不能为空')
return
}
}
await api.trainInformAdd(that.addCarousel).then((res) => {
await api.demandPublishAdd(that.addCarousel).then((res) => {
that.dialogFormVisible1 = false
that.getList()
})

2
src/views/firstPages/policy.vue

@ -22,7 +22,7 @@
<span>{{ row.id }}</span>
</template>
</el-table-column>
<el-table-column label="标题" prop="title" align="center" width="480">
<el-table-column label="标题" prop="title" align="center">
<template slot-scope="{row}">
<span>{{ row.title }}</span>
</template>

9
src/views/firstPages/rotation.vue

@ -28,7 +28,7 @@
<img :src="row.url" style="height:200px;width:300px">
</template>
</el-table-column>
<el-table-column label="跳转路径" prop="jumpUrl" align="center" width="180">
<el-table-column label="跳转路径" prop="jumpUrl" align="center">
<template slot-scope="{row}">
<span>{{ row.jumpUrl }}</span>
</template>
@ -92,8 +92,8 @@
</form>
</el-form-item>
<el-form-item label="跳转路径" prop="titleUrl" style="width: 180%">
<el-input v-model="temp.jumpType" />
<el-form-item label="跳转路径" prop="jumpUrl" style="width: 180%">
<el-input v-model="temp.jumpUrl" />
</el-form-item>
<el-form-item label="图片参数" prop="param" style="width: 180%">
@ -123,7 +123,7 @@
</div>
</el-dialog>
<!-- 添加轮播图界面 -->
<el-dialog title="修改" :visible.sync="dialogFormVisible1">
<el-dialog title="添加" :visible.sync="dialogFormVisible1">
<el-form ref="dataForm" :model="addCarousel" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;">
<el-form-item label="图片" prop="url" style="width: 180%">
@ -251,6 +251,7 @@ export default {
that.temp = Object.assign({}, row) // copy obj
that.temp.timestamp = new Date(that.temp.timestamp)
that.dialogStatus = 'update'
console.log(that.temp)
for (const key in that.typeList) {
if (that.typeList[key] === that.temp.jumpType) {
that.policyType1 = key

2
src/views/firstPages/train.vue

@ -35,7 +35,7 @@
<span>{{ row.incubator }}</span>
</template>
</el-table-column>
<el-table-column label="培训内容" prop="trainContent" align="center" width="300">
<el-table-column label="培训内容" prop="trainContent" align="center">
<template slot-scope="{row}">
<span>{{ row.trainContent }}</span>
</template>

Loading…
Cancel
Save