This commit is contained in:
liuye
2022-06-28 09:14:39 +08:00
parent fd755fa58a
commit 6896dfd197
36 changed files with 6404 additions and 179 deletions

View File

@@ -0,0 +1,35 @@
<template>
<section class="AppPartyScore">
<component :is="currentPage" v-bind="$props"/>
</section>
</template>
<script>
import PsList from "./psList";
import PsDetail from "./psDetail";
export default {
name: "AppPartyScore",
components: {PsDetail, PsList},
label: "党员积分(三涧溪)",
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
currentPage() {
return this.$route.query.id ? PsDetail : PsList
}
},
created() {
this.dict.load("partyIntegralType")
}
}
</script>
<style lang="scss" scoped>
.AppPartyScore {
height: 100%;
}
</style>

View File

@@ -0,0 +1,162 @@
<template>
<section class="psDetail">
<ai-detail>
<ai-title slot="title" title="积分详情" isShowBottomBorder isShowBack @onBackClick="back"/>
<template #content>
<el-row type="flex">
<ai-card hideTitle class="staCard fill">
<template #content>
<div class="color-999" v-text="`姓名`"/>
<b v-text="detail.name"/>
</template>
</ai-card>
<ai-card hideTitle class="staCard fill">
<template slot="content">
<div class="color-999" v-text="`党员积分`"/>
<b class="color-26f" v-text="detail.integral||0"/>
</template>
</ai-card>
<!-- <ai-card hideTitle class="staCard fill">
<template #content>
<div class="color-999" v-text="`学习强国`"/>
<el-button type="text" @click="handleEditLearningIntergral(detail.id)">编辑</el-button>
<b class="color-26f" v-text="detail.learningIntegral||0"/>
</template>
</ai-card>
<ai-card hideTitle class="staCard fill">
<template slot="content">
<div class="color-999" v-text="`个人积分`"/>
<b class="color-26f" v-text="detail.integral||0"/>
</template>
</ai-card>
<ai-card hideTitle class="staCard fill">
<template #content>
<div class="color-999" v-text="`家庭积分`"/>
<b class="color-26f" v-text="detail.familySurplusIntegral||0"/>
</template>
</ai-card> -->
</el-row>
<ai-card title="余额变动明细">
<template #content>
<ai-table :tableData="detail.integralInfoList" :isShowPagination="false" :col-configs="colConfigs"
:dict="dict"/>
</template>
</ai-card>
</template>
</ai-detail>
<ai-dialog :visible.sync="dialog" title="学习强国设置" width="500px" @close="form={}" @onConfirm="submit">
<el-form :model="form" size="small" ref="DialogForm" :rules="rules" label-width="110px">
<el-form-item label="学习强国积分" prop="learningIntegral">
<el-input v-model.number="form.learningIntegral" placeholder="请输入正整数" clearable/>
</el-form-item>
</el-form>
</ai-dialog>
</section>
</template>
<script>
export default {
name: "psDetail",
props: {
instance: Function,
dict: Object,
},
data() {
return {
detail: {},
colConfigs: [
{label: "时间", prop: "createTime"},
{label: "类型", prop: "integralType", align: 'center', dict: "partyIntegralType"},
{label: "变动积分", prop: "integral", align: 'center'},
{label: "剩余积分", prop: "residualIntegral", align: 'center'},
{label: "调整说明", prop: "remark"},
],
dialog: false,
form: {},
rules: {
learningIntegral: [
{required: true, message: "请输入学习强国积分"},
{pattern: /^\d+$/g, message: "请输入正整数"}
]
}
}
},
methods: {
getDetail() {
let {id} = this.$route.query
this.instance.post("/app/appparty/getPartyIntegralDetail", null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data
}
})
},
back() {
this.$router.push({})
},
submit() {
this.$refs.DialogForm.validate(v => {
if (v) {
this.instance.post("/app/appparty/editLearningIntegral", null,{
params:this.form
}).then(res => {
if (res?.code == 0) {
this.$message.success("提交成功!")
this.dialog = false
this.getDetail()
}
})
}
})
},
handleEditLearningIntergral(partyMemberId) {
this.dialog = true
this.form = {partyMemberId}
}
},
created() {
this.getDetail()
}
}
</script>
<style lang="scss" scoped>
.psDetail {
height: 100%;
.color-999 {
color: #999;
}
.color-26f {
color: #26f;
}
::v-deep .staCard {
font-size: 14px;
width: 25%;
b {
font-size: 24px;
line-height: 40px;
}
& + .staCard {
margin-left: 16px;
width: 25%;
}
.ai-card__body {
position: relative;
.el-button {
position: absolute;
right: 32px;
top: 6px;
}
}
}
}
</style>

View File

@@ -0,0 +1,175 @@
<template>
<section class="psList">
<ai-list>
<ai-title slot="title" title="党员积分" isShowBottomBorder/>
<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="user.info.id"
@select="onTreeChange"/>
</ai-tree-menu>
</template>
<template #content>
<ai-search-bar>
<template #left>
<div>统计周期</div>
<el-date-picker type="daterange" placeholder="日期" size="small" clearable v-model="createTime"
@change="handleSearchTime" start-placeholder="开始时间" end-placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00','23:59:59']"/>
</template>
<template #right>
<el-input size="small" placeholder="党员姓名" v-model="search.partyName" clearable
@change="page.current=1,getTableData()" suffix-icon="iconfont iconSearch"/>
<ai-download :instance="instance" url="/app/apppartyintegralinfo/downloadTemplate" :params="search" fileName="党员积分" :disabled="tableData.length == 0">
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
</ai-download>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{row}">
<el-button type="text" @click="getFamilyByPartyId(row.idNumber)">家庭成员</el-button>
<el-button type="text" @click="showDetail(row.id)">详情</el-button>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
<ai-dialog :visible.sync="dialog" title="家庭成员" :customFooter="true" width="780px" @close="familyList=[]">
<ai-table :tableData="familyList" :isShowPagination="false" :col-configs="familyCols" :dict="dict"/>
<div class="dialog-footer" slot="footer">
<el-button @click="dialog=false"> </el-button>
</div>
</ai-dialog>
</section>
</template>
<script>
import { mapState } from "vuex";
export default {
name: "psList",
props: {
instance: Function,
dict: Object,
},
computed: {
...mapState(['user']),
colConfigs() {
return [
{label: "排行榜", prop: "name", align: "center"},
{label: "党员姓名", prop: "name", align: "center"},
{label: "党员类型", prop: "name", align: "center"},
{label: "获得积分", prop: "name", align: "center"},
// {label: "个人积分", prop: "integral", align: "center"},
// {label: "家庭积分", prop: "familySurplusIntegral", align: "center"},
// {label: "学习强国", prop: "learningIntegral", align: "center"},
{slot: "options"}
]
},
familyCols() {
return [
{
label: '与户主关系', prop: 'householdRelation', align: 'center', width: 165,
render: (h, {row}) => h('p', this.dict.getLabel('householdRelation', row.householdRelation || "户主"))
},
{label: '类型', prop: 'residentType', align: 'center', dict: "residentType"},
{label: '姓名', prop: 'name', align: 'center'},
{label: '身份证号', render: (h, {row}) => h('p', this.idCardNoUtil.hideId(row.idNumber)), width: 165},
{label: '联系电话', prop: 'phone', align: 'center', width: 120}
]
}
},
data() {
return {
search: {
createTime: '',
},
page: {current: 1, size: 10, total: 0},
tableData: [],
dialog: false,
familyList: [],
organizationName: '',
organizationTree: [],
defaultExpanded: [],
defaultChecked: [],
areaTree: [],
defaultProps: {
children: 'children',
label: 'name'
},
createTime: '',
}
},
methods: {
back() {
this.$router.push({})
},
getTableData() {
this.instance.post("/app/appparty/listByPartyIntegral", null, {
params: {...this.page, ...this.search}
}).then(res => {
if (res?.data) {
this.tableData = res.data?.records
this.page.total = res.data.total
}
})
},
onSearch(v) {
this.orgTree.filter(v)
},
onTreeChange(e) {
this.search.areaId = e.id
this.areaName = e.name
this.search.current = 1
this.$nextTick(() => {
this.getList()
})
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleSearchTime(v) {
// this.page.current = 1
// this.search.startTime = v?.[0]
// this.search.endTime = v?.[1]
// this.getTableData()
},
showDetail(id) {
this.$router.push({query: {id}})
},
getFamilyByPartyId(idNumber) {
this.instance.post("/app/appresident/queryHomeMember", null, {
params: {idNumber}
}).then(res => {
if (res?.data) {
this.familyList = res.data?.family || []
this.dialog = true
}
})
}
},
created() {
this.getTableData()
}
}
</script>
<style lang="scss" scoped>
.psList {
height: 100%;
}
</style>