内外部会议
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<el-form-item
|
||||
:label="config.attrName"
|
||||
:prop="config.attrField"
|
||||
:rules="rules"
|
||||
:label-width="labelWidth"
|
||||
class="add-form-item"
|
||||
:class="{'form-item-disabled': disabled}"
|
||||
@@ -197,6 +198,9 @@ export default {
|
||||
showModifyName: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rules: {
|
||||
type: Array
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<el-form-item
|
||||
:label="config.attrName"
|
||||
:prop="config.attrField"
|
||||
:rules="rules"
|
||||
label-width="150px"
|
||||
class="add-form-item"
|
||||
:class="{'form-item-disabled': disabled}"
|
||||
@@ -40,6 +41,9 @@ export default {
|
||||
span: {
|
||||
type: Number,
|
||||
default: 24
|
||||
},
|
||||
rules: {
|
||||
type: Array
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -55,8 +59,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleChange (event) {
|
||||
const value = event.target.value
|
||||
this.$emit('input', value)
|
||||
// const value = event.target.value
|
||||
this.$emit('input', event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
size="800px"
|
||||
:visible="visible"
|
||||
:wrapperClosable="false"
|
||||
@close="onClose">
|
||||
:before-close="beforeClose">
|
||||
<div class="drawer-content">
|
||||
<el-form
|
||||
:model="form"
|
||||
@@ -97,12 +97,12 @@
|
||||
class="common-button-primary"
|
||||
icon="el-icon-check"
|
||||
type="primary"
|
||||
@click="onSearch">搜索
|
||||
@click="onSearch('search')">搜索
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-close"
|
||||
@click="onClose">取消
|
||||
@click="onCancel('cancel')">取消
|
||||
</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
@@ -148,17 +148,30 @@ export default {
|
||||
default: () => ({})
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
type: 'cancel'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
beforeClose (done) {
|
||||
this.$emit('update:visible', false)
|
||||
done()
|
||||
switch (this.type) {
|
||||
case "search":
|
||||
this.onSearch()
|
||||
break
|
||||
case 'cancel':
|
||||
this.onCancel()
|
||||
break
|
||||
}
|
||||
},
|
||||
onSearch () {
|
||||
onSearch (type) {
|
||||
this.type = type
|
||||
this.$emit('search')
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
onClose () {
|
||||
this.$emit('clearSearch', {})
|
||||
onCancel(type) {
|
||||
this.type = type
|
||||
this.$emit('resetAdvancedSearchForm')
|
||||
this.$emit('update:visible', false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,30 +117,31 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="议题名称" prop="agendaName" label-width="150px" class="add-form-item">
|
||||
<el-form-item label="议题名称" :prop="'meetingTopicList.' + index + '.agendaName'" :rules="rules.agendaName" label-width="150px" class="add-form-item">
|
||||
<el-input v-model="item.agendaName"
|
||||
placeholder="请输入议题名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<custom-file
|
||||
<customFile
|
||||
:config="{
|
||||
attrName: '议题材料',
|
||||
attrField: 'agendaMaterials'
|
||||
attrField: `meetingTopicList.${index}.agendaMaterials`
|
||||
}"
|
||||
:rules="rules.agendaMaterials"
|
||||
v-model="item.agendaMaterials"
|
||||
></custom-file>
|
||||
></customFile>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="汇报人" prop="reporter" label-width="150px" class="add-form-item">
|
||||
<el-form-item label="汇报人" :prop="'meetingTopicList.' + index + '.reporter'" :rules="rules.reporter" label-width="150px" class="add-form-item">
|
||||
<el-input v-model="item.reporter"
|
||||
placeholder="请输入汇报人"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="汇报人单位" prop="reportingUnit" label-width="150px" class="add-form-item">
|
||||
<el-form-item label="汇报人单位" :prop="'meetingTopicList.' + index + '.reportingUnit'" :rules="rules.reportingUnit" label-width="150px" class="add-form-item">
|
||||
<el-input v-model="item.reportingUnit"
|
||||
placeholder="请输入汇报人单位"
|
||||
clearable></el-input>
|
||||
@@ -149,9 +150,10 @@
|
||||
<el-col :span="24">
|
||||
<CustomTextarea
|
||||
:config="{
|
||||
attrName: '议题主要内容',
|
||||
attrField: 'agendaContent'
|
||||
}"
|
||||
attrName: '议题主要内容',
|
||||
attrField: `meetingTopicList.${index}.agendaContent`
|
||||
}"
|
||||
:rules="rules.agendaContent"
|
||||
v-model="item.agendaContent"
|
||||
></CustomTextarea>
|
||||
</el-col>
|
||||
@@ -241,28 +243,44 @@ export default {
|
||||
{type: 'string', max: 500, message: '议题主要内容不能超过500个字符', trigger: 'change'}
|
||||
],
|
||||
}
|
||||
return {
|
||||
rules,
|
||||
isSubmit: false,
|
||||
reloadForm: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
form () {
|
||||
if (JSON.stringify(this.editForm) !== '{}') {
|
||||
return { ...this.editForm }
|
||||
} else {
|
||||
const meetingTopicItem = {
|
||||
const form = {
|
||||
meetingName: '',
|
||||
meetingOrganizer: '',
|
||||
meetingTime: '',
|
||||
meetingAddress: '',
|
||||
participants: '',
|
||||
meetingMinutes: '',
|
||||
meetingContent: '',
|
||||
firstMeetingType: '',
|
||||
secondMeetingType: '',
|
||||
meetingTopicList: [
|
||||
{
|
||||
agendaName: '',
|
||||
agendaMaterials: '',
|
||||
reporter: '',
|
||||
reportingUnit: '',
|
||||
agendaContent: ''
|
||||
}
|
||||
const form = {
|
||||
meetingTopicList: [ meetingTopicItem ]
|
||||
}
|
||||
return { ...form }
|
||||
]
|
||||
}
|
||||
return {
|
||||
rules,
|
||||
form,
|
||||
isSubmit: false,
|
||||
reloadForm: true,
|
||||
api: {
|
||||
add: 'lawss/insideOutsideMeeting/addMeetingInfo',
|
||||
delete :'lawss/insideOutsideMeeting/deleteMeetingInfo',
|
||||
update: 'lawss/insideOutsideMeeting/updateMeetingInfo'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
editForm (val) {
|
||||
if (this.title === '编辑') {
|
||||
this.form = { ...this.editForm }
|
||||
} else {
|
||||
this.resetForm()
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -286,12 +304,55 @@ export default {
|
||||
})
|
||||
this.form.meetingTopicList = [ ...res ]
|
||||
},
|
||||
resetForm () {
|
||||
this.form = {
|
||||
meetingName: '',
|
||||
meetingOrganizer: '',
|
||||
meetingTime: '',
|
||||
meetingAddress: '',
|
||||
participants: '',
|
||||
meetingMinutes: '',
|
||||
meetingContent: '',
|
||||
firstMeetingType: '',
|
||||
secondMeetingType: '',
|
||||
meetingTopicList: [
|
||||
{
|
||||
agendaName: '',
|
||||
agendaMaterials: '',
|
||||
reporter: '',
|
||||
reportingUnit: '',
|
||||
agendaContent: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onClose () {
|
||||
this.$emit('update:showDrawer', false)
|
||||
this.$refs['formRef'].resetFields()
|
||||
this.resetForm()
|
||||
},
|
||||
onSubmit () {
|
||||
console.log(this.form)
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.title === '新增') {
|
||||
this.$http._postData(this.api.add, this.form).then(res => {
|
||||
if (res.ok) {
|
||||
this.$message.success('新增成功')
|
||||
this.onClose()
|
||||
this.$emit('load')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$http._putData(this.api.update, this.form).then(res => {
|
||||
if (res.ok) {
|
||||
this.$message.success('修改成功')
|
||||
this.onClose()
|
||||
this.$emit('load')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<!--搜索区-->
|
||||
<div class="search-area">
|
||||
<el-form :modal="searchForm" :inline="true" class="label-input-form">
|
||||
<el-formItem label="会议名称" prop="name" class="search-item">
|
||||
<el-input v-model="searchForm.name" clearable placeholder="根据会议名称查找" :maxlength="100" @keyup.enter.native="onSearch"/>
|
||||
<el-formItem label="会议名称" prop="meetingName" class="search-item">
|
||||
<el-input v-model="searchForm.meetingName" clearable placeholder="根据会议名称查找" :maxlength="100" @keyup.enter.native="onSearch"/>
|
||||
</el-formItem>
|
||||
<el-formItem label="会议主办单位" prop="unit" class="search-item">
|
||||
<el-input v-model="searchForm.unit" clearable placeholder="根据会议主办单位查找" :maxlength="100" @keyup.enter.native="onSearch"/>
|
||||
<el-formItem label="会议主办单位" prop="meetingOrganizer" class="search-item">
|
||||
<el-input v-model="searchForm.meetingOrganizer" clearable placeholder="根据会议主办单位查找" :maxlength="100" @keyup.enter.native="onSearch"/>
|
||||
</el-formItem>
|
||||
<el-formItem label="会议时间" prop="time" class="search-item">
|
||||
<el-input v-model="searchForm.time" clearable placeholder="根据会议时间查找" :maxlength="100" @keyup.enter.native="onSearch"/>
|
||||
<el-formItem label="会议时间" prop="meetingTime" class="search-item">
|
||||
<el-input v-model="searchForm.meetingTime" clearable placeholder="根据会议时间查找" :maxlength="100" @keyup.enter.native="onSearch"/>
|
||||
</el-formItem>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
@@ -129,9 +129,9 @@
|
||||
<loading :loading="loading">数据获取中...</loading>
|
||||
</div>
|
||||
<!-- 高级搜索 -->
|
||||
<AdvancedSearch :visible.sync="advancedSearchVisible" :form="searchForm" :dict="dict" @search="onSearch"></AdvancedSearch>
|
||||
<AdvancedSearch :visible.sync="advancedSearchVisible" :form="advancedSearchForm" :dict="dict" @search="onSearch" @resetAdvancedSearchForm="resetAdvancedSearchForm"></AdvancedSearch>
|
||||
<!-- 新增编辑 -->
|
||||
<editDrawer :dict="dict" :showDrawer.sync="showDrawer" :title="titleDrawer" :editForm="editForm"></editDrawer>
|
||||
<editDrawer ref="editDrawerRef" :dict="dict" :showDrawer.sync="showDrawer" :title="titleDrawer" :editForm="editForm" @load="getData"></editDrawer>
|
||||
<!-- 导入 -->
|
||||
<ImportZip :visible.sync="importModalShowFlag" :action="importExcelUrl"></ImportZip>
|
||||
<!-- 导出 -->
|
||||
@@ -155,6 +155,7 @@ export default {
|
||||
data(){
|
||||
return {
|
||||
searchForm: {},
|
||||
advancedSearchForm: {},
|
||||
data: [],
|
||||
total: 0,
|
||||
selectedList: [],
|
||||
@@ -167,7 +168,10 @@ export default {
|
||||
importExcelUrl: '',
|
||||
// 高级搜索
|
||||
advancedSearchVisible: false,
|
||||
editForm: void 0
|
||||
editForm: void 0,
|
||||
api: {
|
||||
delete :'lawss/insideOutsideMeeting/deleteMeetingInfo'
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -177,21 +181,31 @@ export default {
|
||||
methods: {
|
||||
async getData () {
|
||||
this.searchForm.pageSize = this.searchForm.pageSize || this.$store.getters.userInfo.configContent
|
||||
this.searchForm.page = this.searchForm.page || 0
|
||||
let params = { ...this.searchForm }
|
||||
const res = await this.$http._getData('lawss/insideOutsideMeeting/page', params)
|
||||
if (res.ok) {
|
||||
this.data = res.data
|
||||
this.searchForm.page = this.searchForm.page || 1
|
||||
let params = { ...this.searchForm, ...this.advancedSearchForm }
|
||||
const res = await this.$http._getData('lawss/insideOutsideMeeting/page', params, {_this:this,loading: 'loading'})
|
||||
if (res.ok && res.data) {
|
||||
if (res.data.list && res.data.list.length > 0) {
|
||||
this.data = res.data.list
|
||||
}
|
||||
this.total = res.data.count
|
||||
}
|
||||
},
|
||||
onSearch(){
|
||||
console.log(this.searchForm)
|
||||
this.getData()
|
||||
},
|
||||
onClear () {
|
||||
this.$set(this, 'searchForm', {})
|
||||
this.$set(this, 'advancedSearchForm', {})
|
||||
this.getData()
|
||||
},
|
||||
resetAdvancedSearchForm () {
|
||||
this.$set(this, 'advancedSearchForm', {})
|
||||
this.getData()
|
||||
},
|
||||
// 高级搜索
|
||||
advancedSearch () {
|
||||
this.$set(this, 'advancedSearchForm', {})
|
||||
this.advancedSearchVisible = true
|
||||
},
|
||||
// 选择项勾选改变
|
||||
@@ -254,7 +268,6 @@ export default {
|
||||
this.showDrawer = false
|
||||
switch (type) {
|
||||
case 'add':
|
||||
this.$set(this, 'editForm', {})
|
||||
this.titleDrawer = '新增'
|
||||
break
|
||||
case 'edit':
|
||||
@@ -262,10 +275,25 @@ export default {
|
||||
this.$set(this, 'editForm', row)
|
||||
break
|
||||
}
|
||||
this.showDrawer = true
|
||||
this.$nextTick(()=>{
|
||||
this.showDrawer = true
|
||||
})
|
||||
},
|
||||
onDelete (id) {
|
||||
alert('删除' + id)
|
||||
this.$confirm('确认删除这些数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http._deleteData(this.api.delete, { meetingId: id }).then(res => {
|
||||
if (res.ok) {
|
||||
this.$message.success('删除成功')
|
||||
this.getData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getDicTypeListCode () {
|
||||
// 查询各下拉框数据
|
||||
|
||||
Reference in New Issue
Block a user