三涧溪党员积分
This commit is contained in:
35
project/sanjianxi/apps/AppPartyMemberScore/AppPartyScore.vue
Normal file
35
project/sanjianxi/apps/AppPartyMemberScore/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>
|
||||
143
project/sanjianxi/apps/AppPartyMemberScore/psDetail.vue
Normal file
143
project/sanjianxi/apps/AppPartyMemberScore/psDetail.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<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>
|
||||
</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>
|
||||
153
project/sanjianxi/apps/AppPartyMemberScore/psList.vue
Normal file
153
project/sanjianxi/apps/AppPartyMemberScore/psList.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<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 size="small" v-model="searchDotime" type="daterange" range-separator="至" @change="timeChange"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
|
||||
</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="showDetail(row.id)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</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"},
|
||||
{slot: "options"}
|
||||
]
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchDotime: [],
|
||||
search: {
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
organizationName: '',
|
||||
organizationTree: [],
|
||||
defaultExpanded: [],
|
||||
defaultChecked: [],
|
||||
areaTree: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
createTime: '',
|
||||
partyOrgId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.push({})
|
||||
},
|
||||
getTableData() {
|
||||
this.instance.post("/app/apppartyintegralinfo/listByOrg", null, {
|
||||
params: {...this.page, ...this.search, partyOrgId: this.partyOrgId } // partyOrgId:
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
timeChange() {
|
||||
if (this.searchDotime) {
|
||||
this.search.startTime = this.searchDotime[0]
|
||||
this.search.endTime = this.searchDotime[1]
|
||||
} else {
|
||||
this.search.startTime = null
|
||||
this.search.endTime = null
|
||||
}
|
||||
this.search.current = 1
|
||||
this.getTableData()
|
||||
},
|
||||
|
||||
onSearch(v) {
|
||||
this.orgTree.filter(v)
|
||||
},
|
||||
|
||||
onTreeChange(e) {
|
||||
console.log(e);
|
||||
this.partyOrgId = e.id
|
||||
this.$nextTick(() => {
|
||||
this.getTableData()
|
||||
})
|
||||
},
|
||||
|
||||
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}})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.psList {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user