先提交一波整理的代码
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
系统将在下次换届时间开始前,对“换届提醒人”进行提醒。提醒方式包括平台消息推送、短信提醒。
|
||||
</div>
|
||||
<div class="add-form">
|
||||
<el-form ref="form" :model="form" :rules="formRules" size="small" label-width="150px">
|
||||
<el-form ref="form" :model="form" :rules="formRules" size="small" label-width="150px">
|
||||
<el-form-item label="单位名称">
|
||||
<div>{{ user.info.organizationName }}</div>
|
||||
</el-form-item>
|
||||
@@ -71,11 +71,11 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="换届提醒人" prop="userList">
|
||||
<ai-person-select :instance="instance" :customClicker="true" :chooseUserList="chooseUserList"
|
||||
:url="`/app/appparty/list?partyOrgId=${form.organizationId}`" headerTitle="党员列表"
|
||||
:isMultiple="true" dialogTitle="选择抄送人" @selectPerson="selectUser" class="aipersonselect">
|
||||
:url="`/app/appparty/list?partyOrgId=${form.organizationId}`" headerTitle="党员列表"
|
||||
:isMultiple="true" dialogTitle="选择抄送人" @selectPerson="selectUser" class="aipersonselect">
|
||||
<template name="option" v-slot:option="{ item }">
|
||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||
</template>
|
||||
@@ -91,18 +91,18 @@
|
||||
<el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
|
||||
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "organizationSetting",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object,
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
formRules: {
|
||||
type: [{required: true, message: "请选择选举方式", trigger: "blur"}],
|
||||
organizationName: [{required: true, message: "请选择党组织", trigger: "blur"}],
|
||||
userList: [{required: true,validator: validUser, trigger: "blur"}],
|
||||
userList: [{required: true, validator: validUser, trigger: "blur"}],
|
||||
},
|
||||
chooseUserList: [],
|
||||
createTime: '',
|
||||
@@ -138,24 +138,21 @@ export default {
|
||||
this.getOrganization()
|
||||
},
|
||||
methods: {
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
cancel() {
|
||||
this.$router.back()
|
||||
},
|
||||
// 查询组织关系
|
||||
getOrganization() {
|
||||
this.instance.post(`/app/partyOrganization/queryPartyOrganizationServiceList`).then(res=>{
|
||||
if(res?.data) {
|
||||
let data = res.data.filter(item=>item.id == this.user.info.organizationId)
|
||||
this.instance.post(`/app/partyOrganization/queryPartyOrganizationServiceList`).then(res => {
|
||||
if (res?.data) {
|
||||
let data = res.data.filter(item => item.id == this.user.info.organizationId)
|
||||
this.createTime = data[0].createTime
|
||||
}
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
this.instance.post(`/app/apporganizationchangeconfig/queryDetailByOrganizationId?organizationId=${this.user.info.organizationId}`).then((res) => {
|
||||
if(res?.data) {
|
||||
if (res?.data) {
|
||||
// this.chooseCandidateList = res.data.candidateUsers
|
||||
// this.chooseVoteList = res.data.voteUsers
|
||||
console.log(res);
|
||||
@@ -169,27 +166,27 @@ export default {
|
||||
this.form.voteUsers = e
|
||||
},
|
||||
handlePartyOrgSelect(v) {
|
||||
if(v) {
|
||||
if (v) {
|
||||
this.form.organizationId = v[0]?.id
|
||||
this.form.organizationName = v[0]?.name
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
// 换届设置
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apporganizationchangeconfig/update`,{
|
||||
...this.form
|
||||
}).then(res => {
|
||||
if(res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
this.cancel(true)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apporganizationchangeconfig/update`, {
|
||||
...this.form
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
this.cancel(true)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
@@ -216,4 +213,4 @@ export default {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user