提交 1c5b6265 authored 作者: lihuihui's avatar lihuihui

办事大厅页面及数据交互

上级 1ddff804
......@@ -58,5 +58,32 @@ export default class ScoreAPI extends BaseAPI {
* 参数同上
*/
deleteSubmitReport = (rid, reid) => this.delete(`/v2/education/symposium/report/${reid}`, {})
getDataList = () => this.get('/v2/lobby/affairs')
/**
* 获取事务类型
*/
getAffairsType = () => this.get('/v2/lobby/affairs')
/**
* 获取事务类型
*/
getAffairsData = (obj = {}) => this.get('/v2/lobby/processes', obj)
/**
* 提交活动申请
* affair_id 活动名称
* symposium_name 活动时间
* symposium_contents 活动讲师
* symposium_attachments 活动内容
* symposium_time 活动附件
* symposium_address 活动地点
* symposium_lecturer
* 返回 {'flag' : true, 'errors' : []}
*/
submitLearning = (obj = {}) => this.post('/v2/lobby/processes', obj)
/* 删除事务 */
deleteAffairs = (reid) => this.delete(`/v2/lobby/processes/${reid}`, {})
/* 获取事务详情 */
getAffairsDetails = (rid) => this.get(`/v2/lobby/processes/${rid}`, {})
/* 修改事务 */
updateAffairs = (rid, obj = {}) => this.post(`/v2/lobby/processes/${rid}`, obj)
/* 重修图片提交 */
uploadFile = (obj = {}) => this.post('/v2/lobby/tools/upload', obj, { headers: { 'Content-Type': 'multipart/form-data' } })
}
......@@ -120,7 +120,7 @@ export default class API {
message: '已取消,将不再记录任何数据操作,除非重新登录'
})
})
} else if (data.status !== 200 && data.message && !data.code) {
} else if (data.status !== 200 && data.message && !data.code && !data.success) {
err = new Error(data.message)
throw err
} else {
......
......@@ -23,5 +23,18 @@ export default class ReportAction {
updateSubmitReport (rid, reid, obj) { return reportApi.updateSubmitReport(rid, reid, obj).then(res => res) }
/* 删除学术报告 */
deleteSubmitReport (rid, reid) { return reportApi.deleteSubmitReport(rid, reid).then(res => res) }
getDataList () { return reportApi.getDataList().then(res => res) }
/* 获取事务类型 */
getAffairsType () { return reportApi.getAffairsType().then(res => res) }
/* 获取事务列表内容 */
getAffairsData (obj) { return reportApi.getAffairsData(obj).then(res => res) }
/* 提交事务申请 */
submitLearning (obj) { return reportApi.submitLearning(obj).then(res => res) }
/* 删除事务 */
deleteAffairs (reid) { return reportApi.deleteAffairs(reid).then(res => res) }
/* 获取事务详情 */
getAffairsDetails (rid) { return reportApi.getAffairsDetails(rid).then(res => res) }
/* 修改事务 */
updateAffairs (rid, obj) { return reportApi.updateAffairs(rid, obj).then(res => res) }
/* 重修图片上传 */
uploadFile (obj) { return reportApi.uploadFile(obj).then(res => res) }
}
......@@ -66,7 +66,11 @@ export default {
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}
},
beforeMount () { this.getList() },
beforeMount () {
setTimeout(() => {
this.getList()
}, 500)
},
watch: {
/* 解决 赋值后 会多请求一次接口问题 */
'params.total': {
......@@ -84,6 +88,15 @@ export default {
}
},
deep: true
},
'objFn.paramsFn': {
handler () {
if (this.isWatch) {
this.getList()
} else {
this.isWatch = true
}
}
}
}
}
......
......@@ -41,12 +41,17 @@ export default {
methods: {
selFindSelect (e) {
let _data = e.currentTarget.dataset
console.log(_data)
let index = _data.index
let json = this.tapParam
let i = _data.i
json[i].selectIndex = index
// json[i].isShow = false
this.$emit('tapIndex', index)
let param = {
index: index,
id: _data.val
}
this.$emit('tapParam', param)
}
}
}
......
<template>
<div>
<div class="con-title">重修申请</div>
<div class="con-box">
<el-button type="text" @click='gobackActiveList'>返回列表</el-button>
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8">
<el-form ref="setApplyForm" :label-width="labelWidth" :model="setApply" :rules="applyRules">
<el-form-item label="姓名" prop="personal_name">
<el-input v-model="setApply.personal_name" placeholder="请输入您的姓名" type="text" />
</el-form-item>
<el-form-item label="班级" prop="class_name">
<el-input v-model="setApply.class_name" placeholder="请输入您的班级" type="text" />
</el-form-item>
<el-form-item label="挂科学期" prop="semester_name">
<el-input v-model="setApply.semester_name" placeholder="请输入您的挂科学期" type="text" />
</el-form-item>
<el-form-item label="重修课程" prop="course_name">
<el-input v-model="setApply.course_name" placeholder="请输入您的重修课程名称" type="text" />
</el-form-item>
<el-form-item label="上传缴费凭证" prop="file">
<el-upload
ref="upFile"
class="upload-demo"
list-type="picture-card"
action=""
:multiple="false"
:limit="1"
:on-change="handleChange"
:http-request="uploadFile"
:file-list="filesArr">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">长传图片.jpg,.jpeg,.png</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onApplyFrom">保存并提交</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import cAction from '@actions'
export default {
props: {
rid: { type: String, required: false }
},
components: {},
data () {
return {
labelWidth: '110px',
setApply: {
personal_name: '',
class_name: '',
semester_name: '',
course_name: ''
},
applyRules: {
'personal_name': [
{ required: true, message: '请输入您的姓名', trigger: 'blur' }
],
'class_name': [
{ required: true, message: '请输入您的班级', trigger: 'blur' }
],
'semester_name': [
{ required: true, message: '请输入您的挂科学期', trigger: 'blur' }
],
'course_name': [
{ required: true, message: '请输入您的重修课程名称', trigger: 'blur' }
]
},
successFileUrl: '',
filesArr: [],
file: {
id: 'WU_FILE_0',
name: '',
type: '',
lastModifiedDate: '',
size: '',
file: ''
},
dialogImageUrl: '',
dialogVisible: false
}
},
created () {
this.affair_id = this.$route.query.id
},
mounted () {
if (this.rid !== '-1') {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.reportAction.getReportActive(this.rid).then(data => {
if (data.symposium_name) {
this.setApply.name = data.symposium_name
this.setApply.time = data.symposium_time
this.setApply.author = data.symposium_lecturer
this.setApply.address = data.symposium_address
this.setApply.content = data.symposium_contents
this.successFileUrl = data.symposium_attachments
}
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}
window.addEventListener('resize', () => {
let width = document.documentElement.clientWidth
if (width < 790) {
this.labelWidth = 'auto'
} else {
this.labelWidth = '110px'
}
})
},
methods: {
handleChange (file, filelist) {
this.file.name = file.raw.name
this.file.type = file.raw.type
this.file.lastModifiedDate = file.raw.lastModifiedDate
this.file.size = file.raw.size
this.file.file = file.raw
},
uploadFile () {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.reportAction.uploadFile(this.file).then(data => {
this.successFileUrl = data.url
// this.filesArr.pop()
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
},
handlePictureCardPreview (file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
gobackActiveList () {
this.$router.push({ path: `/app/service-hall/hall` })
},
onApplyFrom () {
this.$refs['setApplyForm'].validate((valid) => {
if (valid) {
if (!this.successFileUrl) {
this.$message.error('请上传缴费凭证')
return
// this.$refs['setApplyForm'].resetFields()
}
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
let reportActive = null
if (this.rid !== '-1') {
/* 修改 */
reportActive = cAction.reportAction.submitLearning(this.rid, {
symposium_name: this.setApply.name,
symposium_time: this.setApply.time,
symposium_lecturer: this.setApply.author,
symposium_address: this.setApply.address,
symposium_contents: this.setApply.content,
symposium_attachments: this.successFileUrl
})
} else {
/* 新建 */
reportActive = cAction.reportAction.submitLearning({
affair_id: this.affair_id,
personal_name: this.setApply.personal_name,
class_name: this.setApply.class_name,
semester_name: this.setApply.semester_name,
course_name: this.setApply.course_name,
payment_instrument: this.successFileUrl
})
}
reportActive.then(data => {
if (data.success) {
this.$message({ type: 'success', message: '提交成功' })
setTimeout(() => {
this.$router.push({ path: `/app/service-hall/hall` })
}, 500)
}
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
} else {
this.$message.error('请检查输入项,确认无误后,重新提交')
return false
}
})
}
}
}
</script>
<style lang="scss" scoped>
/* 申请 */
.el-date-editor.el-input {
width: 100%;
}
.el-upload__tip {
line-height: 1.5;
}
</style>
<template>
<div>
<div class="con-title">学术活动申请</div>
<div class="con-box">
<el-button type="text" @click='gobackActiveList'>返回列表</el-button>
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8">
<el-form ref="setApplyForm" :label-width="labelWidth" :model="setApply" :rules="applyRules">
<el-form-item label="学术活动名称" prop="name">
<el-input v-model="setApply.name" placeholder="请输入活动名称" type="text" />
</el-form-item>
<el-form-item label="学术活动时间" prop="time">
<el-date-picker v-model="setApply.time" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间" type="datetime" />
</el-form-item>
<el-form-item label="主 讲 人" prop="author">
<el-input v-model="setApply.author" placeholder="请输入主讲人" type="text" />
</el-form-item>
<el-form-item label="学术活动地址" prop="address">
<el-input v-model="setApply.address" placeholder="请输入活动地址" type="text" />
</el-form-item>
<el-form-item label="学术活动内容" prop="content">
<el-input v-model="setApply.content" maxlength="50" placeholder="请输入活动内容" type="textarea" :autosize="{ minRows: 5 }" />
</el-form-item>
<!-- <el-form-item label="附 件" prop="file">
<el-upload
ref="upFile"
class="upload-demo"
action=""
:multiple="false"
:limit="1"
:show-file-list="false"
:on-change="handleChange"
:http-request="uploadFile"
:file-list="filesArr">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">(可以上传 word、ppt、png、jpg、zip、rar等资源)<a href="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/build/learn-mba/%E3%80%8AMBA%E5%AD%A6%E7%94%9F%E5%AD%A6%E6%9C%AF%E6%B4%BB%E5%8A%A8%E7%94%B3%E8%AF%B7%E6%8A%A5%E5%91%8A%E3%80%8B%E6%A8%A1%E6%9D%BFXXX%E5%AD%A6%E7%94%9F.docx">模板下载</a></div>
<template v-if="successFileUrl">
{{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}}
</template>
</el-upload>
<template v-if="successFileUrl">
<a :href="successFileUrl">下载已上传附件</a>
</template>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="onApplyFrom">保存并提交</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import cAction from '@actions'
export default {
props: {
rid: { type: String, required: false }
},
components: {},
data () {
return {
labelWidth: '110px',
setApply: {
name: '',
time: '',
author: '',
address: '',
content: '',
affair_id: ''
},
applyRules: {
'name': [
{ required: true, message: '活动名称不能为空', trigger: 'blur' }
],
'time': [
{ required: true, message: '活动时间不能为空', trigger: 'blur' }
],
'author': [
{ required: true, message: '主讲人不能为空', trigger: 'blur' }
],
'address': [
{ required: true, message: '学术活动地址不能为空', trigger: 'blur' }
],
'content': [
{ required: true, message: '活动内容不能为空', trigger: 'blur' }
]
},
successFileUrl: '',
filesArr: [],
file: {
id: 'WU_FILE_0',
name: '',
type: '',
lastModifiedDate: '',
size: '',
file: ''
}
}
},
mounted () {
this.affair_id = this.$route.query.id
console.log('------', this.affair_id)
if (this.rid !== '-1') {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.reportAction.getAffairsDetails(this.rid).then(data => {
console.log(data)
if (data.form.symposium_name) {
this.setApply.name = data.form.symposium_name
this.setApply.time = data.form.symposium_time
this.setApply.author = data.form.symposium_lecturer
this.setApply.address = data.form.symposium_address
this.setApply.content = data.form.symposium_contents
}
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}
window.addEventListener('resize', () => {
let width = document.documentElement.clientWidth
if (width < 790) {
this.labelWidth = 'auto'
} else {
this.labelWidth = '110px'
}
})
},
methods: {
handleChange (file, filelist) {
this.file.name = file.raw.name
this.file.type = file.raw.type
this.file.lastModifiedDate = file.raw.lastModifiedDate
this.file.size = file.raw.size
this.file.file = file.raw
},
uploadFile () {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.chapterAction.uploadFile(this.file).then(data => {
this.successFileUrl = data.url
this.filesArr.pop()
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
},
gobackActiveList () {
this.$router.push({ path: `/app/service-hall/hall` })
},
onApplyFrom () {
this.$refs['setApplyForm'].validate((valid) => {
if (valid) {
// if (!this.successFileUrl) {
// this.$message.error('请上传附件')
// return
// // this.$refs['setApplyForm'].resetFields()
// }
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
let reportActive = null
if (this.rid !== '-1') {
/* 修改 */
reportActive = cAction.reportAction.updateAffairs(this.rid, {
affair_id: this.affair_id,
symposium_name: this.setApply.name,
symposium_time: this.setApply.time,
symposium_lecturer: this.setApply.author,
symposium_address: this.setApply.address,
symposium_contents: this.setApply.content,
symposium_attachments: this.successFileUrl
})
} else {
/* 新建 */
reportActive = cAction.reportAction.submitLearning({
affair_id: this.affair_id,
symposium_name: this.setApply.name,
symposium_time: this.setApply.time,
symposium_lecturer: this.setApply.author,
symposium_address: this.setApply.address,
symposium_contents: this.setApply.content,
symposium_attachments: this.successFileUrl
})
}
reportActive.then(data => {
if (data.success) {
this.$message({ type: 'success', message: '提交成功' })
setTimeout(() => {
this.$router.push({ path: `/app/service-hall/hall` })
}, 500)
}
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
} else {
this.$message.error('请检查输入项,确认无误后,重新提交')
return false
}
})
}
}
}
</script>
<style lang="scss" scoped>
/* 申请 */
.el-date-editor.el-input {
width: 100%;
}
.el-upload__tip {
line-height: 1.5;
}
</style>
<template>
<div class="con-boxs">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item>
<el-input v-model="formInline.user" placeholder="请输入申请的事项"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span>进行中的</span>
</div>
<template>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="date"
label="序号">
</el-table-column>
<el-table-column
prop="name"
label="事项">
</el-table-column>
<el-table-column
prop="address"
label="提交人">
</el-table-column>
<el-table-column
prop="address"
label="提交人班级">
</el-table-column>
<el-table-column
prop="address"
label="提交时间">
</el-table-column>
<el-table-column
prop="address"
label="审批结果">
</el-table-column>
<el-table-column
prop="address"
label="审批时间">
</el-table-column>
</el-table>
</template>
</el-card>
<el-card class="box-card cardmar" shadow="never">
<div slot="header" class="clearfix">
<span>已完成</span>
</div>
<template>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="date"
label="序号">
</el-table-column>
<el-table-column
prop="name"
label="事项">
</el-table-column>
<el-table-column
prop="address"
label="提交人">
</el-table-column>
<el-table-column
prop="address"
label="提交人班级">
</el-table-column>
<el-table-column
prop="address"
label="提交时间">
</el-table-column>
<el-table-column
prop="address"
label="审批结果">
</el-table-column>
<el-table-column
prop="address"
label="审批时间">
</el-table-column>
</el-table>
</template>
</el-card>
</div>
</template>
<script>
export default {
data () {
return {
formInline: {
user: '',
region: ''
},
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}]
}
},
methods: {
onSubmit () {
console.log('submit!')
}
}
}
</script>
<style lang="scss" scoped>
.con-boxs{
margin: 0.3rem;
padding: 0.3rem 0.3rem 0.15rem 0.3rem;
background: #ffffff;
overflow: hidden;
position: relative;
.min-title{
line-height: 30px;
margin-top: 20px;
}
.cardmar{
margin-top: 20px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<div class="con-title">乐分享申请</div>
<div class="con-box">
<el-button type="text" @click='gobackActiveList'>返回列表</el-button>
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8">
<el-form ref="setApplyForm" :label-width="labelWidth" :model="setApply" :rules="applyRules">
<el-form-item label="姓名" prop="personal_name">
<el-input v-model="setApply.personal_name" placeholder="请输入您的姓名" type="text" />
</el-form-item>
<el-form-item label="行业" prop="trade_name">
<el-input v-model="setApply.trade_name" placeholder="请输入您的行业" type="text" />
</el-form-item>
<el-form-item label="年龄" prop="age">
<el-input v-model="setApply.age" placeholder="请输入您的年龄" type="text" />
</el-form-item>
<el-form-item label="班级" prop="class_name">
<el-input v-model="setApply.class_name" placeholder="请输入您的班级" type="text" />
</el-form-item>
<el-form-item label="电话" prop="telephone">
<el-input v-model="setApply.telephone" placeholder="请输入您的电话" type="text" />
</el-form-item>
<el-form-item label="分享主题" prop="sharing_theme">
<el-input v-model="setApply.sharing_theme" placeholder="请输入分享主题" type="text" />
</el-form-item>
<!-- <el-form-item label="附 件" prop="file">
<el-upload
ref="upFile"
class="upload-demo"
action=""
:multiple="false"
:limit="1"
:show-file-list="false"
:on-change="handleChange"
:http-request="uploadFile"
:file-list="filesArr">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">(可以上传 word、ppt、png、jpg、zip、rar等资源)<a href="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/build/learn-mba/%E3%80%8AMBA%E5%AD%A6%E7%94%9F%E5%AD%A6%E6%9C%AF%E6%B4%BB%E5%8A%A8%E7%94%B3%E8%AF%B7%E6%8A%A5%E5%91%8A%E3%80%8B%E6%A8%A1%E6%9D%BFXXX%E5%AD%A6%E7%94%9F.docx">模板下载</a></div>
<template v-if="successFileUrl">
{{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}}
</template>
</el-upload>
<template v-if="successFileUrl">
<a :href="successFileUrl">下载已上传附件</a>
</template>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="onApplyFrom">保存并提交</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import cAction from '@actions'
export default {
props: {
rid: { type: String, required: false }
},
components: {},
data () {
return {
labelWidth: '110px',
setApply: {
personal_name: '',
trade_name: '',
age: '',
class_name: '',
telephone: '',
sharing_theme: '',
affair_id: ''
},
applyRules: {
'personal_name': [
{ required: true, message: '请输入您的姓名', trigger: 'blur' }
],
'trade_name': [
{ required: true, message: '请输入您的行业', trigger: 'blur' }
],
'age': [
{ required: true, message: '请输入您的年龄', trigger: 'blur' }
],
'class_name': [
{ required: true, message: '请输入您的班级', trigger: 'blur' }
],
'telephone': [
{ required: true, message: '请输入您的电话', trigger: 'blur' }
],
'sharing_theme': [
{ required: true, message: '请输入分享主题', trigger: 'blur' }
]
},
successFileUrl: '',
filesArr: [],
file: {
id: 'WU_FILE_0',
name: '',
type: '',
lastModifiedDate: '',
size: '',
file: ''
}
}
},
created () {
this.affair_id = this.$route.query.id
},
mounted () {
if (this.rid !== '-1') {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.reportAction.getReportActive(this.rid).then(data => {
if (data.symposium_name) {
this.setApply.name = data.symposium_name
this.setApply.time = data.symposium_time
this.setApply.author = data.symposium_lecturer
this.setApply.address = data.symposium_address
this.setApply.content = data.symposium_contents
this.successFileUrl = data.symposium_attachments
}
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}
window.addEventListener('resize', () => {
let width = document.documentElement.clientWidth
if (width < 790) {
this.labelWidth = 'auto'
} else {
this.labelWidth = '110px'
}
})
},
methods: {
handleChange (file, filelist) {
this.file.name = file.raw.name
this.file.type = file.raw.type
this.file.lastModifiedDate = file.raw.lastModifiedDate
this.file.size = file.raw.size
this.file.file = file.raw
},
uploadFile () {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.chapterAction.uploadFile(this.file).then(data => {
this.successFileUrl = data.url
this.filesArr.pop()
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
},
gobackActiveList () {
this.$router.push({ path: `/app/service-hall/hall` })
},
onApplyFrom () {
this.$refs['setApplyForm'].validate((valid) => {
if (valid) {
// if (!this.successFileUrl) {
// this.$message.error('请上传附件')
// return
// // this.$refs['setApplyForm'].resetFields()
// }
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
let reportActive = null
if (this.rid !== '-1') {
/* 修改 */
reportActive = cAction.reportAction.submitLearning(this.rid, {
symposium_name: this.setApply.name,
symposium_time: this.setApply.time,
symposium_lecturer: this.setApply.author,
symposium_address: this.setApply.address,
symposium_contents: this.setApply.content,
symposium_attachments: this.successFileUrl
})
} else {
/* 新建 */
reportActive = cAction.reportAction.submitLearning({
affair_id: this.affair_id,
personal_name: this.setApply.personal_name,
trade_name: this.setApply.trade_name,
age: this.setApply.age,
class_name: this.setApply.class_name,
telephone: this.setApply.telephone,
sharing_theme: this.setApply.sharing_theme
})
}
reportActive.then(data => {
if (data.success) {
this.$message({ type: 'success', message: '提交成功' })
setTimeout(() => {
this.$router.push({ path: `/app/service-hall/hall` })
}, 500)
}
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
} else {
this.$message.error('请检查输入项,确认无误后,重新提交')
return false
}
})
}
}
}
</script>
<style lang="scss" scoped>
/* 申请 */
.el-date-editor.el-input {
width: 100%;
}
.el-upload__tip {
line-height: 1.5;
}
</style>
......@@ -63,16 +63,6 @@ export default [
{ path: 'message', component: () => import('../pages/myGrade/message.vue') }
]
},
{
path: 'my-grade',
redirect: 'error/404',
component: container,
children: [
{ path: 'credit', component: () => import('../pages/myGrade/credit.vue') },
{ path: 'rebuild', component: () => import('../pages/myGrade/rebuild.vue') },
{ path: 'message', component: () => import('../pages/myGrade/message.vue') }
]
},
{
path: 'account',
redirect: 'error/404',
......@@ -89,7 +79,11 @@ export default [
redirect: 'error/404',
component: container,
children: [
{ path: 'hall', component: () => import('../pages/serviceHall/hall.vue') }
{ path: 'hall', component: () => import('../pages/serviceHall/hall.vue') },
{ path: 'learning-add/:rid', component: () => import('../pages/serviceHall/learningAdd.vue'), props: true },
{ path: 'share-add/:rid', component: () => import('../pages/serviceHall/shareAdd.vue'), props: true },
{ path: 'again-add/:rid', component: () => import('../pages/serviceHall/againAdd.vue'), props: true },
{ path: 'my-apply', component: () => import('../pages/serviceHall/myApply.vue'), props: true }
]
}
]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论