会议上传文件接口的修改

This commit is contained in:
fengachen
2021-10-09 20:04:06 +08:00
parent 38c60ac1ff
commit b2a78e8abc
5 changed files with 43 additions and 13 deletions
+2 -4
View File
@@ -1,4 +1,4 @@
import {getAction, postAction} from '@api/manage' import {getAction} from '@api/manage'
// 通过用户id获取用户信息 // 通过用户id获取用户信息
const getUserInfo = (params) => getAction('/sys/user/queryById',params) const getUserInfo = (params) => getAction('/sys/user/queryById',params)
@@ -8,8 +8,7 @@ const getMeetInfoById = (params) => getAction('/meeting/payMeeting/queryById',pa
const getAllWorkProjects = () => getAction('/project/payWorkingGroup/listAll') const getAllWorkProjects = () => getAction('/project/payWorkingGroup/listAll')
// 通过id获取参会人详细信息 // 通过id获取参会人详细信息
const getSingUpUserInfo = (params) => getAction('/meeting/payMeetingSituation/queryById',params) const getSingUpUserInfo = (params) => getAction('/meeting/payMeetingSituation/queryById',params)
// 会议管理上传会议资料
const uploadMeetingFiles = (params) => postAction('/meeting/payMeeting/uploadFile',params)
// 生成会议二维码 // 生成会议二维码
const createQcCode = (params) => getAction('/meeting/payMeeting/createBase64',params) const createQcCode = (params) => getAction('/meeting/payMeeting/createBase64',params)
// 收入合同的新增会员项目的查询 // 收入合同的新增会员项目的查询
@@ -20,7 +19,6 @@ export {
getMeetInfoById, getMeetInfoById,
getAllWorkProjects, getAllWorkProjects,
getSingUpUserInfo, getSingUpUserInfo,
uploadMeetingFiles,
createQcCode, createQcCode,
queryContractMemberProject queryContractMemberProject
} }
@@ -30,7 +30,7 @@
<script> <script>
import JUpload from '@comp/jero/JUpload' import JUpload from '@comp/jero/JUpload'
import {uploadMeetingFiles} from '@api/incomeMeetingApi' import {httpAction} from '@api/manage'
export default { export default {
name: 'UploadMeetFileModal', name: 'UploadMeetFileModal',
@@ -59,6 +59,7 @@ export default {
meetingFileIds:'', meetingFileIds:'',
validatorRules: { validatorRules: {
}, },
url:{}
} }
}, },
methods: { methods: {
@@ -68,6 +69,8 @@ export default {
edit(record) { edit(record) {
this.form.resetFields() this.form.resetFields()
this.model = Object.assign({},record) this.model = Object.assign({},record)
// 根据会议类型返回不同的url
this.url = Object.assign({},this.createUrlByMeetingType(record.meetingType +''))
this.meetingId = record.id this.meetingId = record.id
this.visible = true this.visible = true
// 拿到已经上传的会议文件进行回显 // 拿到已经上传的会议文件进行回显
@@ -82,6 +85,35 @@ export default {
this.$emit('close') this.$emit('close')
this.visible = false this.visible = false
}, },
createUrlByMeetingType(meetingType) {
switch (String(meetingType)) {
// 工作组会议
case '1':
return {
uploadFile: '/meeting/workGroupMeeting/uploadFile',
}
// 标协会议
case '2':
return {
uploadFile: '/meeting/standardsMeeting/uploadFile',
}
// 国际研讨会
case '3':
return {
uploadFile: '/meeting/internalMeeting/uploadFile',
}
// 其他会议
case '4':
return {
uploadFile: '/meeting/otherMeeting/uploadFile',
}
// 分标委会议
case '5':
return {
uploadFile: '/meeting/committeeMeeting/uploadFile',
}
}
},
handleOk() { handleOk() {
const that = this const that = this
// 触发表单验证 // 触发表单验证
@@ -91,7 +123,7 @@ export default {
fileIds:values.fileIds, fileIds:values.fileIds,
id:that.meetingId id:that.meetingId
} }
uploadMeetingFiles(params).then(res => { httpAction(this.url.uploadFile,params,'post').then(res => {
if(res.success){ if(res.success){
that.$message.success(res.message) that.$message.success(res.message)
that.$emit('ok') that.$emit('ok')
@@ -74,7 +74,7 @@
<!-- 操作按钮区域--> <!-- 操作按钮区域-->
<div class="table-operator"> <div class="table-operator">
<a-button type="primary" icon="plus" @click="handleAdd" v-has:[authorCode.add]="'committeeMeeting:add'">新增</a-button> <a-button type="primary" icon="plus" @click="handleAdd" v-has:[authorCode.add]="'committeeMeeting:add'">新增</a-button>
<a-button type="primary" icon="export" @click="handleExportXls('工作组会议维护')" v-has:[authorCode.search]="'committeeMeeting:export'">导出</a-button> <a-button type="primary" icon="export" @click="handleExportXls('会议维护')" v-has:[authorCode.search]="'committeeMeeting:export'">导出</a-button>
<a-button type="danger" icon="delete" @click="batchDel" v-has:[authorCode.batchDel]="'committeeMeeting:batchDel'">批量删除</a-button> <a-button type="danger" icon="delete" @click="batchDel" v-has:[authorCode.batchDel]="'committeeMeeting:batchDel'">批量删除</a-button>
<!--只有工作会议与分标委会议才有--> <!--只有工作会议与分标委会议才有-->
<a-button type="primary" @click="publishRemind" v-if="meetingType === '5' " v-has="'committeeMeeting:publish'">发布</a-button> <a-button type="primary" @click="publishRemind" v-if="meetingType === '5' " v-has="'committeeMeeting:publish'">发布</a-button>
@@ -79,7 +79,7 @@
<!-- 操作按钮区域--> <!-- 操作按钮区域-->
<div class="table-operator"> <div class="table-operator">
<a-button type="primary" icon="plus" @click="handleAdd" v-has="'workGroupMeeting:add'" v-if="canOperate">新增</a-button> <a-button type="primary" icon="plus" @click="handleAdd" v-has="'workGroupMeeting:add'" v-if="canOperate">新增</a-button>
<a-button type="primary" icon="export" @click="handleExportXls('工作组会议维护')" <a-button type="primary" icon="export" @click="handleExportXls('工作组会议')"
v-has="'workGroupMeeting:export'">导出 v-has="'workGroupMeeting:export'">导出
</a-button> </a-button>
<a-button type="danger" icon="delete" @click="batchDel" v-has="'workGroupMeeting:batchDel'" v-if="canOperate">批量删除</a-button> <a-button type="danger" icon="delete" @click="batchDel" v-has="'workGroupMeeting:batchDel'" v-if="canOperate">批量删除</a-button>
+5 -5
View File
@@ -64,7 +64,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'otherMeeting:add'">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus" v-has="'otherMeeting:add'">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('会议管理')" v-has="'otherMeeting:export'">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('其他会议')" v-has="'otherMeeting:export'">导出</a-button>
<a-button type="danger" icon="delete" @click="batchDel" v-has="'otherMeeting:batchDel'">批量删除</a-button> <a-button type="danger" icon="delete" @click="batchDel" v-has="'otherMeeting:batchDel'">批量删除</a-button>
</div> </div>
@@ -204,10 +204,10 @@ name: 'OtherMeeting',
}, },
url: { url: {
list: '/meeting/otherMeeting/page', list: '/meeting/otherMeeting/page',
delete: '/meeting/otherMeeting/page/delete', delete: '/meeting/otherMeeting/delete',
deleteBatch: '/meeting/otherMeeting/page/deleteBatch', deleteBatch: '/meeting/otherMeeting/deleteBatch',
exportXlsUrl: '/meeting/otherMeeting/page/exportXls', exportXlsUrl: '/meeting/otherMeeting/exportXls',
importExcelUrl: '/meeting/otherMeeting/page/importExcel', importExcelUrl: '/meeting/otherMeeting/importExcel',
}, },
disableMixinCreated:true disableMixinCreated:true
} }