Files
dvcp_v2_webapp/project/pingchang/apps/AppOrganizationChange/components/moment.vue

83 lines
2.3 KiB
Vue
Raw Normal View History

2022-10-13 17:57:48 +08:00
<template>
2022-10-21 11:53:29 +08:00
<section class="moment">
2022-10-21 18:10:58 +08:00
<template v-if="detail.id">
2022-10-27 18:07:02 +08:00
<ai-title :title="detail.organizationName||'基本信息'" class="mar-b8"/>
2022-10-21 18:10:58 +08:00
<ai-wrapper>
<ai-info-item label="本届换届时间" :value="detail.changeTime"/>
<ai-info-item label="换届类型" :value="dict.getLabel('organizationChangeType',detail.type)"/>
<ai-info-item label="下届换届时间" :value="detail.nextChangeTime"/>
<ai-info-item label="当前届次" :value="detail.sessionTime"/>
</ai-wrapper>
2022-10-27 18:07:02 +08:00
<detail-panel :candidate-list="detail.candidateList" :serve-list="detail.serveList" disabled/>
2022-10-21 18:10:58 +08:00
</template>
2022-10-27 18:07:02 +08:00
<ai-empty v-else>
2022-10-24 11:58:47 +08:00
<div>暂无换届信息</div>
<el-row type="flex" justify="center" class="mar-t8">
2022-10-27 18:07:02 +08:00
<ai-highlight content="请点击【@v】完善基础内容后,再进行后续操作" value="开始设置"/>
2022-10-24 11:58:47 +08:00
</el-row>
2022-10-27 18:07:02 +08:00
<el-button class="mar-t32" type="primary" @click="$router.push({hash:'#add',query:{oid,new:1}})">开始设置</el-button>
2022-10-21 18:10:58 +08:00
</ai-empty>
2022-10-21 11:53:29 +08:00
</section>
2022-10-13 17:57:48 +08:00
</template>
<script>
2022-10-27 18:07:02 +08:00
import DetailPanel from "./detailPanel";
2022-10-13 17:57:48 +08:00
export default {
2022-10-14 11:36:06 +08:00
name: "moment",
2022-10-27 18:07:02 +08:00
components: {DetailPanel},
2022-10-24 11:58:47 +08:00
inject: ['permissions', 'instance', 'dict'],
2022-10-14 11:36:06 +08:00
data() {
return {
2022-10-21 18:10:58 +08:00
detail: {},
2022-10-14 11:36:06 +08:00
tableData: [],
totalJob: 0,
current: 1,
size: 10,
}
},
computed: {
colConfigs() {
return [
{prop: 'content', label: '职位'},
{prop: 'content', label: '姓名'},
{slot: 'options'},
]
2022-10-14 17:32:19 +08:00
},
2022-10-24 11:58:47 +08:00
oid: v => v.$attrs.selected.id
2022-10-14 11:36:06 +08:00
},
2022-10-27 18:07:02 +08:00
watch: {
oid: {
immediate: true,
handler() {
this.getDetail()
}
}
2022-10-18 15:56:46 +08:00
},
2022-10-14 11:36:06 +08:00
methods: {
2022-10-27 18:07:02 +08:00
getDetail() {
2022-10-24 11:58:47 +08:00
const {oid: organizationId} = this
2022-10-28 11:51:24 +08:00
this.detail = {}
2022-10-24 11:58:47 +08:00
organizationId && this.instance.post(`/app/apporganizationgeneralelection/queryDetailByOrganizationId`, null, {
2022-10-28 17:48:37 +08:00
pureBack:true,
2022-10-24 11:58:47 +08:00
params: {organizationId}
}).then(res => {
2022-10-21 11:53:29 +08:00
if (res?.data) {
2022-10-21 18:10:58 +08:00
this.detail = res.data
2022-10-18 15:56:46 +08:00
}
2022-10-28 11:51:24 +08:00
}).finally(() => this.$emit("update:hasConfig", !!this.detail.id))
2022-10-18 15:56:46 +08:00
},
2022-10-27 18:07:02 +08:00
},
created() {
this.dict.load("organizationChangeType")
2022-10-14 11:36:06 +08:00
}
2022-10-13 17:57:48 +08:00
}
</script>
2022-10-14 11:36:06 +08:00
<style lang="scss" scope>
.moment {
2022-10-14 14:47:48 +08:00
padding-top: 0 !important;
2022-10-14 15:27:43 +08:00
background-color: #FFF !important;
2022-10-14 11:36:06 +08:00
}
2022-10-21 11:53:29 +08:00
</style>