提交 e0b228b4 authored 作者: lihuihui's avatar lihuihui

办事大厅bug修改

上级 8b556656
...@@ -20,7 +20,7 @@ export default class AffairsAPI extends BaseAPI { ...@@ -20,7 +20,7 @@ export default class AffairsAPI extends BaseAPI {
* symposium_lecturer * symposium_lecturer
* 返回 {'flag' : true, 'errors' : []} * 返回 {'flag' : true, 'errors' : []}
*/ */
submitLearning = (obj = {}) => this.post('/v2/lobby/processes', obj, { headers: { 'Content-Type': 'application/json' } }) submitLearning = (obj = {}) => this.post('/v2/lobby/processes', obj, { headers: { 'Content-Type': 'multipart/form-data' } })
/* 删除事务 */ /* 删除事务 */
deleteAffairs = (reid) => this.delete(`/v2/lobby/processes/${reid}`, {}) deleteAffairs = (reid) => this.delete(`/v2/lobby/processes/${reid}`, {})
/* 获取事务详情 */ /* 获取事务详情 */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-button type="text" @click='gobackActiveList'>返回列表</el-button> <el-button type="text" @click='gobackActiveList'>返回列表</el-button>
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8"> <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 :disabled="this.isFormProhibit" ref="setApplyForm" :label-width="labelWidth" :model="setApply" :rules="applyRules">
<el-form-item label="姓名" prop="personal_name"> <el-form-item label="姓名" prop="personal_name">
<el-input v-model="setApply.personal_name" placeholder="请输入您的姓名" type="text" /> <el-input v-model="setApply.personal_name" placeholder="请输入您的姓名" type="text" />
</el-form-item> </el-form-item>
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
</el-form-item> </el-form-item>
<el-form-item label="上传缴费凭证" prop="file"> <el-form-item label="上传缴费凭证" prop="file">
<el-upload <el-upload
v-if="!isFormProhibit"
ref="upFile" ref="upFile"
class="upload-demo" class="upload-demo"
list-type="picture-card" list-type="picture-card"
...@@ -32,12 +33,13 @@ ...@@ -32,12 +33,13 @@
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">长传图片.jpg,.jpeg,.png</div> <div slot="tip" class="el-upload__tip">长传图片.jpg,.jpeg,.png</div>
</el-upload> </el-upload>
<img v-if="isFormProhibit" style="width:100px;height:100px" :src="dialogImageUrl" alt="">
<el-dialog :visible.sync="dialogVisible"> <el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt=""> <img width="100%" :src="dialogImageUrl" alt="">
</el-dialog> </el-dialog>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onApplyFrom">保存并提交</el-button> <el-button type="primary" @click="onApplyFrom" v-if="!isFormProhibit">保存并提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -55,6 +57,7 @@ export default { ...@@ -55,6 +57,7 @@ export default {
components: {}, components: {},
data () { data () {
return { return {
isFormProhibit: false,
labelWidth: '110px', labelWidth: '110px',
setApply: { setApply: {
personal_name: '', personal_name: '',
...@@ -94,16 +97,16 @@ export default { ...@@ -94,16 +97,16 @@ export default {
this.affair_id = this.$route.query.id this.affair_id = this.$route.query.id
}, },
mounted () { mounted () {
this.isFormProhibit = this.$route.query.is_view || false
if (this.rid !== '-1') { if (this.rid !== '-1') {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Affairs.getReportActive(this.rid).then(data => { cAction.Affairs.getAffairsDetails(this.rid).then(data => {
if (data.symposium_name) { if (data.form.id) {
this.setApply.name = data.symposium_name this.setApply.personal_name = data.form.personal_name
this.setApply.time = data.symposium_time this.setApply.class_name = data.form.class_name
this.setApply.author = data.symposium_lecturer this.setApply.semester_name = data.form.semester_name
this.setApply.address = data.symposium_address this.setApply.course_name = data.form.course_name
this.setApply.content = data.symposium_contents this.dialogImageUrl = data.form.payment_instrument
this.successFileUrl = data.symposium_attachments
} }
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
} }
...@@ -173,7 +176,7 @@ export default { ...@@ -173,7 +176,7 @@ export default {
if (data.success) { if (data.success) {
this.$message({ type: 'success', message: '提交成功' }) this.$message({ type: 'success', message: '提交成功' })
setTimeout(() => { setTimeout(() => {
this.$router.push({ path: '/app/affairs-hall/hall' }) this.$router.push({ path: '/app/affairs-hall/hall', query: { index: 2 } })
}, 500) }, 500)
} }
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
</div> </div>
<Tap :tapParam="tapParam" @tapParam="tapIndexs"></Tap> <Tap :tapParam="tapParam" @tapParam="tapIndexs"></Tap>
<div class="con-box"> <div class="con-box">
<el-button type="primary" v-show="tapIndex==0" @click="golearningAdd(0)">申请新的活动</el-button> <el-button type="primary" v-show="tapIndex==0" @click="golearningAdd('/app/affairs-hall/learning-add/-1')">申请新的活动</el-button>
<el-button type="primary" v-show="tapIndex==1" @click="golearningAdd(1)">申请新乐分享</el-button> <el-button type="primary" v-show="tapIndex==1" @click="golearningAdd('/app/affairs-hall/share-add/-1')">申请新乐分享</el-button>
<el-button type="primary" v-show="tapIndex==2" @click="golearningAdd(2)">申请重修</el-button> <el-button type="primary" v-show="tapIndex==2" @click="golearningAdd('/app/affairs-hall/again-add/-1')">申请重修</el-button>
<div style="width: 100%; height: 0.2rem;"></div> <div style="width: 100%; height: 0.2rem;"></div>
<table-list :data="tableData" :columns="columns"></table-list> <table-list :data="tableData" :columns="columns"></table-list>
</div> </div>
...@@ -44,13 +44,13 @@ export default { ...@@ -44,13 +44,13 @@ export default {
return { return {
dialogVisible: false, dialogVisible: false,
loading: false, loading: false,
tapIndex: 0, tapIndex: this.$route.query.index || 0,
// tap切换 // tap切换
tapParam: [ tapParam: [
{ {
name: '分类', name: '分类',
isShow: false, isShow: false,
selectIndex: 0, selectIndex: this.$route.query.index || 0,
key: 'cc', key: 'cc',
arrItem: [] arrItem: []
} }
...@@ -138,9 +138,29 @@ export default { ...@@ -138,9 +138,29 @@ export default {
{ prop: 'form.class_name', label: '班级' }, { prop: 'form.class_name', label: '班级' },
{ prop: 'form.personal_name', label: '申请人' }, { prop: 'form.personal_name', label: '申请人' },
{ prop: 'form.telephone', label: '电话' }, { prop: 'form.telephone', label: '电话' },
{ prop: 'approve_status', label: '审核状态' }, {
{ prop: 'approve_time', label: '审核时间' }, prop: 'status',
{ prop: 'remark1', label: '备注' } label: '审核状态',
computed(value) {
return status[value]
}
},
{ prop: 'approve_time1', label: '审核时间' },
{ prop: 'remark1', label: '备注' },
{
label: '操作',
buttons: [
{
label: '查看',
onClick: row => {
this.$router.push({
path: `/app/affairs-hall/share-add/${row.id}`,
query: { id: row.affair_id, is_view: true }
})
}
}
]
}
] ]
}, },
// 重修 // 重修
...@@ -149,9 +169,29 @@ export default { ...@@ -149,9 +169,29 @@ export default {
{ prop: 'form.semester_name', label: '学期' }, { prop: 'form.semester_name', label: '学期' },
{ prop: 'form.class_name', label: '班级' }, { prop: 'form.class_name', label: '班级' },
{ prop: 'form.course_name', label: '课程' }, { prop: 'form.course_name', label: '课程' },
{ prop: 'approve_status', label: '审核状态' }, {
{ prop: 'approve_time', label: '审核时间' }, prop: 'status',
{ prop: 'remark1', label: '备注' } label: '审核状态',
computed(value) {
return status[value]
}
},
{ prop: 'approve_time1', label: '审核时间' },
{ prop: 'remark1', label: '备注' },
{
label: '操作',
buttons: [
{
label: '查看',
onClick: row => {
this.$router.push({
path: `/app/affairs-hall/again-add/${row.id}`,
query: { id: row.affair_id, is_view: true }
})
}
}
]
}
] ]
} }
}, },
...@@ -217,7 +257,8 @@ export default { ...@@ -217,7 +257,8 @@ export default {
return { val: item.id, name: item.affair_name } return { val: item.id, name: item.affair_name }
}) })
const [first] = data const [first] = data
this.affairId = first.id const datas = data[this.$route.query.index] || first
this.affairId = datas.id
this.affairList = data this.affairList = data
this.getData() this.getData()
}) })
...@@ -225,32 +266,11 @@ export default { ...@@ -225,32 +266,11 @@ export default {
this.$message.error(e.message) this.$message.error(e.message)
}) })
}, },
golearningAdd(n) { golearningAdd(url) {
if (n === 0) { const affairId = { id: this.tapParam[0].arrItem[this.tapIndex].val }
this.$router.push({ this.$router.push({
path: '/app/affairs-hall/learning-add/-1', path: url,
query: { id: this.tapParam[0].arrItem[this.tapIndex].val } query: affairId
})
} else if (n === 1) {
this.$router.push({
path: '/app/affairs-hall/share-add/-1',
query: { id: this.tapParam[0].arrItem[this.tapIndex].val }
})
} else {
this.$router.push({
path: '/app/affairs-hall/again-add/-1',
query: { id: this.tapParam[0].arrItem[this.tapIndex].val }
})
}
},
goMyApply() {
this.$router.push({
path: '/app/affairs-hall/my-apply',
query: {
id1: this.tapParam[0].arrItem[0].val,
id2: this.tapParam[0].arrItem[1].val,
id3: this.tapParam[0].arrItem[2].val
}
}) })
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-button type="text" @click='gobackActiveList'>返回列表</el-button> <el-button type="text" @click='gobackActiveList'>返回列表</el-button>
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8"> <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 :disabled="this.isFormProhibit" ref="setApplyForm" :label-width="labelWidth" :model="setApply" :rules="applyRules">
<!-- <el-form-item label="姓名" prop="personal_name"> <!-- <el-form-item label="姓名" prop="personal_name">
<el-input v-model="setApply.personal_name" placeholder="请输入您的姓名" type="text" /> <el-input v-model="setApply.personal_name" placeholder="请输入您的姓名" type="text" />
</el-form-item> </el-form-item>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</template> </template>
</el-form-item> --> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" @click="onApplyFrom">保存并提交</el-button> <el-button type="primary" @click="onApplyFrom" v-if='!this.isFormProhibit'>保存并提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
components: {}, components: {},
data () { data () {
return { return {
isFormProhibit: false,
labelWidth: '110px', labelWidth: '110px',
setApply: { setApply: {
personal_name: '', personal_name: '',
...@@ -116,12 +117,11 @@ export default { ...@@ -116,12 +117,11 @@ export default {
}, },
mounted () { mounted () {
this.affair_id = this.$route.query.id this.affair_id = this.$route.query.id
console.log('------', this.affair_id) this.isFormProhibit = this.$route.query.is_view || false
if (this.rid !== '-1') { if (this.rid !== '-1') {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Affairs.getAffairsDetails(this.rid).then(data => { cAction.Affairs.getAffairsDetails(this.rid).then(data => {
console.log(data) if (data.form.id) {
if (data.form.symposium_name) {
this.setApply.personal_name = data.form.personal_name this.setApply.personal_name = data.form.personal_name
this.setApply.class_name = data.form.class_name this.setApply.class_name = data.form.class_name
this.setApply.name = data.form.symposium_name this.setApply.name = data.form.symposium_name
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-button type="text" @click='gobackActiveList'>返回列表</el-button> <el-button type="text" @click='gobackActiveList'>返回列表</el-button>
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8"> <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 :disabled="this.isFormProhibit" ref="setApplyForm" :label-width="labelWidth" :model="setApply" :rules="applyRules">
<el-form-item label="姓名" prop="personal_name"> <el-form-item label="姓名" prop="personal_name">
<el-input v-model="setApply.personal_name" placeholder="请输入您的姓名" type="text" /> <el-input v-model="setApply.personal_name" placeholder="请输入您的姓名" type="text" />
</el-form-item> </el-form-item>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</template> </template>
</el-form-item> --> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" @click="onApplyFrom">保存并提交</el-button> <el-button type="primary" @click="onApplyFrom" v-if="!this.isFormProhibit">保存并提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -65,6 +65,7 @@ export default { ...@@ -65,6 +65,7 @@ export default {
components: {}, components: {},
data () { data () {
return { return {
isFormProhibit: false,
labelWidth: '110px', labelWidth: '110px',
setApply: { setApply: {
personal_name: '', personal_name: '',
...@@ -111,16 +112,17 @@ export default { ...@@ -111,16 +112,17 @@ export default {
this.affair_id = this.$route.query.id this.affair_id = this.$route.query.id
}, },
mounted () { mounted () {
this.isFormProhibit = this.$route.query.is_view || false
if (this.rid !== '-1') { if (this.rid !== '-1') {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Affairs.getReportActive(this.rid).then(data => { cAction.Affairs.getAffairsDetails(this.rid).then(data => {
if (data.symposium_name) { if (data.form.id) {
this.setApply.name = data.symposium_name this.setApply.personal_name = data.form.personal_name
this.setApply.time = data.symposium_time this.setApply.trade_name = data.form.trade_name
this.setApply.author = data.symposium_lecturer this.setApply.age = data.form.age
this.setApply.address = data.symposium_address this.setApply.class_name = data.form.class_name
this.setApply.content = data.symposium_contents this.setApply.telephone = data.form.telephone
this.successFileUrl = data.symposium_attachments this.setApply.sharing_theme = data.form.sharing_theme
} }
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论