组织换届
This commit is contained in:
@@ -49,8 +49,8 @@
|
|||||||
:isMultiple="true" dialogTitle="选择" @selectPerson="selectPerson" class="aipersonselect">
|
:isMultiple="true" dialogTitle="选择" @selectPerson="selectPerson" class="aipersonselect">
|
||||||
<template name="option" v-slot:option="{ item }">
|
<template name="option" v-slot:option="{ item }">
|
||||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||||
<!-- <ai-id mode="show" :show-eyes="false" :value="item.idNumber"/> -->
|
|
||||||
<span>{{ item.phone }}</span>
|
<span>{{ item.phone }}</span>
|
||||||
|
<!-- <span>{{ item}}</span> -->
|
||||||
</template>
|
</template>
|
||||||
</ai-person-select>
|
</ai-person-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<section class="AppOrganizationChange">
|
||||||
|
<keep-alive :include="['List']">
|
||||||
|
<component ref="component" :is="component" :instance="instance" :selected.sync="selected" :params="params" :dict="dict" @change="onChange"/>
|
||||||
|
</keep-alive>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import addChange from "./components/addChange.vue";
|
||||||
|
import List from "./components/List.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "AppOrganizationChange",
|
||||||
|
label: "组织换届",
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
},
|
||||||
|
components: {List, addChange},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
component: "List",
|
||||||
|
params: {},
|
||||||
|
include: [],
|
||||||
|
selected: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onChange(data) {
|
||||||
|
if (data.type === "List") {
|
||||||
|
this.component = "List";
|
||||||
|
this.params = data.params;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.type === "addChange") {
|
||||||
|
this.component = "addChange";
|
||||||
|
this.params = data.params;
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (data.isRefresh) {
|
||||||
|
this.$refs.component.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
let {organizationId: id, organizationName: name} = this.user.info
|
||||||
|
this.selected = {id, name}
|
||||||
|
// this.dict.load("portalUserStatus", "enterpriseStatus", "userEnterpriseStatus","enterpriseType")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.AppOrganizationChange {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
205
project/pingchang/apps/AppOrganizationChange/components/List.vue
Normal file
205
project/pingchang/apps/AppOrganizationChange/components/List.vue
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
<template>
|
||||||
|
<ai-list class="List">
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="组织换届" isShowBottomBorder/>
|
||||||
|
</template>
|
||||||
|
<template #left>
|
||||||
|
<ai-tree-menu title="组织目录" searchPlaceholder="请输入组织名称" @search="onSearch">
|
||||||
|
<ai-party-tree
|
||||||
|
:filter-node-method="filterNode"
|
||||||
|
ref="tree"
|
||||||
|
:instance="instance"
|
||||||
|
:root="user.info.organizationId"
|
||||||
|
:current-node-key="selected.id"
|
||||||
|
@select="onTreeChange"/>
|
||||||
|
</ai-tree-menu>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<el-tabs v-model="currIndex">
|
||||||
|
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||||
|
<component :ref="String(i)" v-if="currIndex == i" :is="tab.comp" lazy :instance="instance"
|
||||||
|
:dict="dict" :permissions="permissions" v-on="$listeners"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {mapState} from 'vuex'
|
||||||
|
import moment from './moment.vue'
|
||||||
|
import history from './history.vue'
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'List',
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
permissions: Function,
|
||||||
|
dict: Object,
|
||||||
|
selected: Object
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
con: '',
|
||||||
|
age: [],
|
||||||
|
sex: '',
|
||||||
|
nation: '',
|
||||||
|
partyStatus: '',
|
||||||
|
flowStatus: '',
|
||||||
|
education: '',
|
||||||
|
partyPosition: '',
|
||||||
|
birthStart: '',
|
||||||
|
birthEnd: '',
|
||||||
|
turnPositiveStart: '',
|
||||||
|
turnPositiveEnd: '',
|
||||||
|
joinPartyStart: '',
|
||||||
|
joinPartyEnd: ''
|
||||||
|
},
|
||||||
|
orgName: '',
|
||||||
|
loading: false,
|
||||||
|
total: 0,
|
||||||
|
colConfigs: [
|
||||||
|
{type: 'selection', label: ''},
|
||||||
|
{prop: 'name', label: '姓名', align: 'center'},
|
||||||
|
{prop: 'sex', label: '性别', align: 'center', dict: 'sex'},
|
||||||
|
{prop: 'age', label: '年龄', align: 'center'},
|
||||||
|
// {
|
||||||
|
// prop: 'auditStatus', label: '审核状态', align: 'center',
|
||||||
|
// render: (h, {row}) => h('span', {class: `audit-${row.auditStatus}`}, this.dict.getLabel('auditStatus', row.auditStatus))
|
||||||
|
// },
|
||||||
|
{prop: 'partyStatus', label: '党籍状态', align: 'center', dict: 'partyStatus'},
|
||||||
|
{prop: 'joinPartyTime', label: '入党日期', align: 'center'},
|
||||||
|
{prop: 'partyPosition', label: '党内职务', align: 'center', dict: 'partyPosition'},
|
||||||
|
{prop: 'flowStatus', label: '流动状态', align: 'center', dict: 'flowStatus'},
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
ids: '',
|
||||||
|
tabs: [
|
||||||
|
{label: '当前届次', name: 'moment', comp: moment, permission: ''},
|
||||||
|
{label: '历史届次', name: 'history', comp: history, permission: 'app_appgirdmemberapply_detail'}
|
||||||
|
],
|
||||||
|
currIndex: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
moment,
|
||||||
|
history
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
orgTree() {
|
||||||
|
return this.$refs.tree?.$refs?.partyTree
|
||||||
|
},
|
||||||
|
exportQuery() {
|
||||||
|
let {id: partyOrgId} = this.selected
|
||||||
|
return {
|
||||||
|
ids: this.ids ? this.ids.split(',') : [],
|
||||||
|
...this.search, partyOrgId
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isShowAddBtn() {
|
||||||
|
return this.selected.isLeaf == 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.dict.load('disciplinary', 'partyType', 'sex', 'nation', 'education', 'partyStatus', 'partyPosition', 'flowStatus', 'auditStatus')
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showNeighbourSetting(id) {
|
||||||
|
this.$router.push({query: {id}, hash: "#ns"})
|
||||||
|
},
|
||||||
|
onTreeChange(e) {
|
||||||
|
this.$emit("update:selected", e)
|
||||||
|
this.getList(e.id)
|
||||||
|
},
|
||||||
|
|
||||||
|
onSearch(v) {
|
||||||
|
this.orgTree.filter(v)
|
||||||
|
},
|
||||||
|
|
||||||
|
getList(partyOrgId) {
|
||||||
|
if (!this.user.info.organizationId) return
|
||||||
|
|
||||||
|
this.loading = true
|
||||||
|
partyOrgId = partyOrgId || this.selected.id
|
||||||
|
this.instance.post(`/app/appparty/list`, null, {
|
||||||
|
params: {partyOrgId, ...this.search, age: this.search.age?.join(',')}
|
||||||
|
}).then(res => {
|
||||||
|
this.loading = false
|
||||||
|
if (res?.data) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
removeAll() {
|
||||||
|
if (!this.ids) {
|
||||||
|
return this.$message.error('请选择党员')
|
||||||
|
}
|
||||||
|
this.remove(this.ids)
|
||||||
|
},
|
||||||
|
handleSelectionChange(e) {
|
||||||
|
this.ids = e.map(v => v.id).join(',')
|
||||||
|
},
|
||||||
|
filterNode(value, data) {
|
||||||
|
if (!value) return true
|
||||||
|
return data.name.indexOf(value) !== -1
|
||||||
|
},
|
||||||
|
remove(id) {
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
this.instance.post(`/app/appparty/delete?ids=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toDetail(id) {
|
||||||
|
this.$router.push({query: {id}})
|
||||||
|
},
|
||||||
|
toAdd(id) {
|
||||||
|
this.$router.push({query: {id}, hash: "#add"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.List {
|
||||||
|
.party-table__btns {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .audit-0 {
|
||||||
|
color: #FF8822 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .audit-1 {
|
||||||
|
color: #2EA222 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ai-list__content--right {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
margin-left: 1px;
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
|
.ai-list__content--right-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .is-current>.el-tree-node__content{
|
||||||
|
width: 100%!important;
|
||||||
|
padding-right: 16px!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user