积分管理
This commit is contained in:
35
project/sanjianxi/apps/AppPartyScore/AppPartyScore.vue
Normal file
35
project/sanjianxi/apps/AppPartyScore/AppPartyScore.vue
Normal 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>
|
||||
154
project/sanjianxi/apps/AppPartyScore/psDetail.vue
Normal file
154
project/sanjianxi/apps/AppPartyScore/psDetail.vue
Normal file
@@ -0,0 +1,154 @@
|
||||
<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 #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;
|
||||
|
||||
b {
|
||||
font-size: 24px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
& + .staCard {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.ai-card__body {
|
||||
position: relative;
|
||||
|
||||
.el-button {
|
||||
position: absolute;
|
||||
right: 32px;
|
||||
top: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
380
project/sanjianxi/apps/AppPartyScore/psList.vue
Normal file
380
project/sanjianxi/apps/AppPartyScore/psList.vue
Normal file
@@ -0,0 +1,380 @@
|
||||
<template>
|
||||
<section class="psList">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="党员积分" isShowBottomBorder/>
|
||||
<template #left>
|
||||
<div class="patyCode-left">
|
||||
<div class="patyCode-left__title">
|
||||
<h2>组织目录</h2>
|
||||
</div>
|
||||
<div class="organization-left__list">
|
||||
<div class="organization-left__list--title">
|
||||
<el-input
|
||||
class="organization-left__list--search"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="请输入组织名称"
|
||||
v-model="organizationName"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
:data="organizationTree"
|
||||
highlight-current
|
||||
:current-node-key="search.organizationName"
|
||||
:default-expanded-keys="defaultExpanded"
|
||||
:default-checked-keys="defaultChecked"
|
||||
@current-change="onTreeChange">
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
<ai-import :instance="instance" name="党员积分" title="导入党员积分"
|
||||
suffixName="xlsx"
|
||||
url="/app/apppartyintegralinfo/downloadTemplate"
|
||||
importUrl="/app/apppartyintegralinfo/import"
|
||||
@onSuccess="page.current=1,getTableData()"/>
|
||||
</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"},
|
||||
{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: {},
|
||||
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
|
||||
}
|
||||
})
|
||||
},
|
||||
getTree() {
|
||||
this.instance.post(`/admin/area/queryAllArea?id=${this.user.info.areaId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
let parent = res.data.map(v => {
|
||||
v.label = v.name
|
||||
v.children = []
|
||||
|
||||
return v
|
||||
}).filter(e => !e.parentid)[0]
|
||||
this.defaultExpanded = [parent.id]
|
||||
this.defaultChecked = [parent.id]
|
||||
this.search.areaId = parent.id
|
||||
this.addChild(parent, res.data)
|
||||
this.organizationTree = [parent]
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.setCurrentKey(parent.id)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
addChild(parent, list) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].parentId === parent.id) {
|
||||
parent.children.push(list[i])
|
||||
}
|
||||
}
|
||||
|
||||
if (list.length > 0) {
|
||||
parent['children'].map(v => this.addChild(v, list))
|
||||
}
|
||||
},
|
||||
|
||||
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()
|
||||
// this.getTree()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.psList {
|
||||
height: 100%;
|
||||
|
||||
.organization-left__list {
|
||||
height: calc(100% - 40px);
|
||||
padding: 8px 8px;
|
||||
overflow: auto;
|
||||
|
||||
.organization-left__tags--item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 40px;
|
||||
padding: 0 8px 0 16px;
|
||||
color: #222222;
|
||||
|
||||
&.organization-left__tags--item-active, &:hover {
|
||||
background: #E8EFFF;
|
||||
color: #2266FF;
|
||||
|
||||
i, span {
|
||||
color: #2266FF;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
color: #8e9ebf;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.organization-left__list--title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.organization-left__list--search {
|
||||
flex: 1;
|
||||
|
||||
::v-deep input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.el-button {
|
||||
width: 84px;
|
||||
flex-shrink: 1;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
color: #222222;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
::v-deep .el-tree {
|
||||
background: transparent;
|
||||
|
||||
.el-tree-node__expand-icon.is-leaf {
|
||||
color: transparent !important;
|
||||
}
|
||||
|
||||
.el-tree-node__content > .el-tree-node__expand-icon {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.el-tree-node__content {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.el-tree__empty-text {
|
||||
color: #222;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-tree-node__children .el-tree-node__content {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.el-tree-node__content:hover {
|
||||
background: #E8EFFF;
|
||||
color: #222222;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.is-current > .el-tree-node__content {
|
||||
&:hover {
|
||||
background: #2266FF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
background: #2266FF;
|
||||
|
||||
span {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .ai-list__content--left {
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.patyCode-left {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
background: #FAFAFB;
|
||||
|
||||
.patyCode-left__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
padding: 0 16px;
|
||||
background: #fff;
|
||||
|
||||
h2 {
|
||||
color: #222;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.patyCode-left__list {
|
||||
height: calc(100% - 40px);
|
||||
padding: 8px 0;
|
||||
overflow: auto;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 24px;
|
||||
color: #222222;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-right: 2px solid transparent;
|
||||
background: transparent;
|
||||
|
||||
&:hover {
|
||||
color: #2266FF;
|
||||
background: #E8EFFF;
|
||||
}
|
||||
|
||||
&.left-active {
|
||||
color: #2266FF;
|
||||
border-color: #2266FF;
|
||||
background: #E8EFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .ai-list__content--right {
|
||||
.ai-list__content--right-wrapper {
|
||||
min-height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user