feature(内外部会议流程): 会议议题顺序

This commit is contained in:
zyn
2024-01-23 16:06:39 +08:00
parent dfd3cad046
commit ec7a3bc4ea
4 changed files with 63 additions and 20 deletions
@@ -164,7 +164,7 @@
<div style="display: flex;align-items: center">
<i
class="el-icon-bottom move-icon"
style="margin-left: 20px;transform: rotate(180deg)"
style="transform: rotate(180deg)"
:style="{visibility: (index === 0) ? 'collapse' : 'visible'}"
@click="moveOrder(index, 'top')"
/>
@@ -27,6 +27,7 @@ export default {
margin-left: 10px;
font-size: 16px;
font-weight: bold;
flex: 1;
}
}
</style>
@@ -30,23 +30,40 @@
<div v-for="(item, index) in form.meetingTopicList">
<ProcessTitle>
<template slot="title">
会议议题
<el-button
type="primary"
size="mini"
icon="el-icon-plus"
:disabled="disabled"
:style="{visibility: (index === form.meetingTopicList.length - 1) ? 'visible' : 'collapse'}"
@click="addMeetingTopic"
/>
<el-button
type="primary"
size="mini"
icon="el-icon-minus"
:disabled="disabled"
:style="{visibility: (form.meetingTopicList.length < 2 && index === 0) ? 'collapse' : 'visible'}"
@click="removeMeetingTopic(index)"
/>
<div style="display: flex;align-items: center;justify-content: space-between">
<div>
会议议题{{ index + 1 }}
<el-button
type="primary"
size="mini"
icon="el-icon-plus"
:disabled="disabled"
:style="{visibility: (index === form.meetingTopicList.length - 1) ? 'visible' : 'collapse'}"
@click="addMeetingTopic"
/>
<el-button
type="primary"
size="mini"
icon="el-icon-minus"
:disabled="disabled"
:style="{visibility: (form.meetingTopicList.length < 2 && index === 0) ? 'collapse' : 'visible'}"
@click="removeMeetingTopic(index)"
/>
</div>
<div style="display: flex;align-items: center">
<i
class="el-icon-bottom move-icon"
style="transform: rotate(180deg)"
:style="{visibility: (index === 0) ? 'collapse' : 'visible'}"
@click="moveOrder(index, 'top')"
/>
<i
class="el-icon-bottom move-icon"
:style="{visibility: (index === form.meetingTopicList.length - 1) ? 'collapse' : 'visible'}"
@click="moveOrder(index, 'bottom')"
/>
</div>
</div>
</template>
</ProcessTitle>
<Topics :item="item" :index="index" :rules="rules" :disabled="disabled" />
@@ -338,6 +355,10 @@ export default {
async submit () {
this.footerLoading = true
this.form.meetingTopicList.forEach((item, index) => {
item.sort = index
})
const json = Object.assign(this.form, this.roleForm);
let completeTaskQuery = {}
if (this.$route.query.taskIds) {
@@ -403,7 +424,21 @@ export default {
if (res.ok) {
this.dict = res.data
}
}
},
moveOrder (index, type) {
if (type === 'top') {
const obj1 = this.form.meetingTopicList[index]
const obj2 = this.form.meetingTopicList[index - 1]
this.$set(this.form.meetingTopicList, index - 1, obj1)
this.$set(this.form.meetingTopicList, index, obj2)
}
if (type === 'bottom') {
const obj1 = this.form.meetingTopicList[index]
const obj2 = this.form.meetingTopicList[index + 1]
this.$set(this.form.meetingTopicList, index + 1, obj1)
this.$set(this.form.meetingTopicList, index, obj2)
}
},
}
}
</script>
@@ -444,4 +479,11 @@ export default {
min-height: 100%;
}
}
.move-icon {
font-size: 32px;
cursor: pointer
}
.move-icon:hover {
color: #409EFF;
}
</style>
@@ -29,7 +29,7 @@
<div v-for="(item, index) in form.meetingTopicList">
<ProcessTitle>
<template slot="title">
会议议题
会议议题{{ index + 1 }}
<el-button
type="primary"
size="mini"