内外部会议、政策课题 修改

This commit is contained in:
zyn
2023-10-18 16:17:34 +08:00
parent b227b6eec4
commit 21606aa5d3
5 changed files with 81 additions and 82 deletions
@@ -276,7 +276,7 @@ export default {
}
},
watch: {
editForm (val) {
showDrawer (val) {
if (this.title === '编辑') {
this.form = { ...this.editForm }
} else {
@@ -98,9 +98,9 @@
<el-col :span="24">
<div class="divider-line">
课题组会议
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addMeeting"
<el-button type="primary" size="mini" icon="el-icon-plus" @click="add('meetingList')"
:style="{visibility: (index === form.meetingList.length - 1) ? 'visible' : 'collapse'}"></el-button>
<el-button type="primary" size="mini" icon="el-icon-minus" @click="removeMeeting(index)"
<el-button type="primary" size="mini" icon="el-icon-minus" @click="remove('meetingList', index)"
:style="{visibility: (form.meetingList.length < 2 && index === 0) ? 'collapse' : 'visible'}"></el-button>
</div>
</el-col>
@@ -187,9 +187,9 @@
<el-col :span="24">
<div class="divider-line">
课题组联系方式
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addTopicContactInformation"
<el-button type="primary" size="mini" icon="el-icon-plus" @click="add('topicContactInformationList')"
:style="{visibility: (index === form.topicContactInformationList.length - 1) ? 'visible' : 'collapse'}"></el-button>
<el-button type="primary" size="mini" icon="el-icon-minus" @click="removeTopicContactInformation(index)"
<el-button type="primary" size="mini" icon="el-icon-minus" @click="remove('topicContactInformationList', index)"
:style="{visibility: (form.topicContactInformationList.length < 2 && index === 0) ? 'collapse' : 'visible'}"></el-button>
</div>
</el-col>
@@ -283,9 +283,9 @@
<el-col :span="24">
<div class="divider-line">
课题组联系方式
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addInsideContactInformation"
<el-button type="primary" size="mini" icon="el-icon-plus" @click="add('insideContactInformationList')"
:style="{visibility: (index === form.insideContactInformationList.length - 1) ? 'visible' : 'collapse'}"></el-button>
<el-button type="primary" size="mini" icon="el-icon-minus" @click="removeInsideContactInformation(index)"
<el-button type="primary" size="mini" icon="el-icon-minus" @click="remove('insideContactInformationList', index)"
:style="{visibility: (form.insideContactInformationList.length < 2 && index === 0) ? 'collapse' : 'visible'}"></el-button>
</div>
</el-col>
@@ -362,60 +362,59 @@ export default {
type: Object
}
},
data (){
const rules = {
data (){const rules = {
topicName: [
{required: true, type: 'string', message: '会议名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{required: true, type: 'string', message: '课题名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题名称不能超过500个字符', trigger: 'change'}
],
organizer: [
{required: true, type: 'string', message: '会议名称不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{required: true, type: 'string', message: '课题承办单位不能为空', trigger: 'change'},
{type: 'string', max: 500, message: '课题承办单位不能超过500个字符', trigger: 'change'}
],
guidanceUnit: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '课题指导单位不能超过500个字符', trigger: 'change'}
],
participatingUnit: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '课题参与单位不能超过500个字符', trigger: 'change'}
],
startTime: [
{required: true, message: '会议时间不能为空', trigger: 'change'}
{required: true, message: '启动时间不能为空', trigger: 'change'}
],
topicStatus: [
{required: true, type: 'string', message: '会议名称不能为空', trigger: 'change'},
{required: true, type: 'string', message: '课题状态不能为空', trigger: 'change'},
],
topicCost: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '课题费用(万元)不能超过500个字符', trigger: 'change'}
],
meetingName: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
],
meetingTime: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '会议时间不能超过500个字符', trigger: 'change'}
],
meetingAddress: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '会议地点不能超过500个字符', trigger: 'change'}
],
participants: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '参会人员(内部)不能超过500个字符', trigger: 'change'}
],
meetingContent: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '会议主要内容不能超过500个字符', trigger: 'change'}
],
name: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '姓名不能超过500个字符', trigger: 'change'}
],
department: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '单位不能超过500个字符', trigger: 'change'}
],
phone: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '电话不能超过500个字符', trigger: 'change'}
],
email: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '邮箱不能超过500个字符', trigger: 'change'}
],
identity: [
{type: 'string', max: 500, message: '会议名称不能超过500个字符', trigger: 'change'}
{type: 'string', max: 500, message: '身份不能超过500个字符', trigger: 'change'}
],
}
const form = {
@@ -495,7 +494,7 @@ export default {
}
},
watch: {
editForm (val) {
showDrawer (val) {
if (this.title === '编辑') {
this.form = { ...this.editForm }
} else {
@@ -549,62 +548,39 @@ export default {
}
})
},
addMeeting () {
const meetingListItem = {
meetingName: '',
meetingTime: '',
meetingAddress: '',
participants: '',
meetingContent: '',
add (type) {
let item = {}
switch (type) {
case 'meetingList':
item = {
meetingName: '',
meetingTime: '',
meetingAddress: '',
participants: '',
meetingContent: ''
}
break
case 'topicContactInformationList':
case 'insideContactInformationList':
item = {
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
break
}
this.form.meetingList = [...this.form.meetingList, meetingListItem]
this.form[type] = [...this.form[type], item]
},
removeMeeting (index) {
remove (type, index) {
let res = []
this.form.meetingList.forEach((item, i) => {
this.form[type].forEach((item, i) => {
if (i !== index) {
res.push(item)
}
})
this.form.meetingList = [ ...res ]
},
addTopicContactInformation () {
const topicContactInformationListItem = {
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
this.form.topicContactInformationList = [...this.form.topicContactInformationList, topicContactInformationListItem]
},
removeTopicContactInformation (index) {
let res = []
this.form.topicContactInformationList.forEach((item, i) => {
if (i !== index) {
res.push(item)
}
})
this.form.topicContactInformationList = [ ...res ]
},
addInsideContactInformation () {
const insideContactInformationListItem = {
name: '',
department: '',
phone: '',
email: '',
identity: ''
}
this.form.insideContactInformationListItem = [...this.form.insideContactInformationListItem, insideContactInformationListItem]
},
removeInsideContactInformation (index) {
let res = []
this.form.insideContactInformationListItem.forEach((item, i) => {
if (i !== index) {
res.push(item)
}
})
this.form.insideContactInformationListItem = [ ...res ]
this.form[type] = [ ...res ]
},
resetForm () {
this.form = this.initForm
@@ -39,7 +39,7 @@ export default {
type: Object
},
disabled: {
type: Object,
type: Boolean,
default: false
}
},
@@ -6,7 +6,8 @@
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</div>
<div v-if="title === '起草'" class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</div>
<div v-else class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content">
<el-form v-if="reloadForm"
@@ -42,6 +43,9 @@
<div class="block" style="padding-top: 20px;" v-show="active === '2'">
<PersonInfo ref="roleForm" :roleForm="roleForm" :roleRules="roleRules" :disabled="disabled"></PersonInfo>
</div>
<div class="block" style="padding-top: 20px;" v-show="active === '3'">
<ApprovalHistory :data="processData" :loading="processLoading"></ApprovalHistory>
</div>
</el-form>
</div>
<ProcessFooter
@@ -66,6 +70,7 @@ import Classification from "./components/Classification";
import Topics from "./components/Topics";
import PersonInfo from "./components/PersonInfo";
import ReceiptDescription from "@/components/hzwlComponents/ReceiptDescription";
import ApprovalHistory from "@/components/hzwlComponents/ApprovalHistory";
import { getDicTypeListCode, saveTaskFirst, queryTaskFirst, inboundLiaisonDetail, taskDel } from 'api/process'
@@ -79,7 +84,8 @@ export default {
Classification,
Topics,
PersonInfo,
ReceiptDescription
ReceiptDescription,
ApprovalHistory
},
data () {
const form = {
@@ -176,12 +182,16 @@ export default {
rules,
roleForm,
roleRules,
dict: {}
dict: {},
// 审批历史
processData: [],
processLoading: false,
}
},
created() {
this.getDicTypeListCode()
this.getData()
this.processTable()
},
methods: {
handleTabs(tab) {
@@ -248,6 +258,19 @@ export default {
})
}
},
// 审批历史
processTable () {
if (this.$route.query.prcNum) {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum
}, {
loading: 'processLoading',
_this: this
}, res => {
this.$set(this, 'processData', res)
}, e => {})
}
},
//保存
handleSave() {
this.footerLoading = true
@@ -39,7 +39,7 @@ export default {
type: Object
},
disabled: {
type: Object,
type: Boolean,
default: false
}
},