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

2
src/views/firstPages/policy.vue

@ -22,7 +22,7 @@
<span>{{ row.id }}</span> <span>{{ row.id }}</span>
</template> </template>
</el-table-column> </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}"> <template slot-scope="{row}">
<span>{{ row.title }}</span> <span>{{ row.title }}</span>
</template> </template>

9
src/views/firstPages/rotation.vue

@ -28,7 +28,7 @@
<img :src="row.url" style="height:200px;width:300px"> <img :src="row.url" style="height:200px;width:300px">
</template> </template>
</el-table-column> </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}"> <template slot-scope="{row}">
<span>{{ row.jumpUrl }}</span> <span>{{ row.jumpUrl }}</span>
</template> </template>
@ -92,8 +92,8 @@
</form> </form>
</el-form-item> </el-form-item>
<el-form-item label="跳转路径" prop="titleUrl" style="width: 180%"> <el-form-item label="跳转路径" prop="jumpUrl" style="width: 180%">
<el-input v-model="temp.jumpType" /> <el-input v-model="temp.jumpUrl" />
</el-form-item> </el-form-item>
<el-form-item label="图片参数" prop="param" style="width: 180%"> <el-form-item label="图片参数" prop="param" style="width: 180%">
@ -123,7 +123,7 @@
</div> </div>
</el-dialog> </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 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%"> <el-form-item label="图片" prop="url" style="width: 180%">
@ -251,6 +251,7 @@ export default {
that.temp = Object.assign({}, row) // copy obj that.temp = Object.assign({}, row) // copy obj
that.temp.timestamp = new Date(that.temp.timestamp) that.temp.timestamp = new Date(that.temp.timestamp)
that.dialogStatus = 'update' that.dialogStatus = 'update'
console.log(that.temp)
for (const key in that.typeList) { for (const key in that.typeList) {
if (that.typeList[key] === that.temp.jumpType) { if (that.typeList[key] === that.temp.jumpType) {
that.policyType1 = key that.policyType1 = key

2
src/views/firstPages/train.vue

@ -35,7 +35,7 @@
<span>{{ row.incubator }}</span> <span>{{ row.incubator }}</span>
</template> </template>
</el-table-column> </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}"> <template slot-scope="{row}">
<span>{{ row.trainContent }}</span> <span>{{ row.trainContent }}</span>
</template> </template>

Loading…
Cancel
Save