Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-08-11 10:30:51 +08:00
10 changed files with 124 additions and 52 deletions

View File

@@ -18,7 +18,7 @@ export default {
props: { props: {
instance: Function, instance: Function,
dict: Object, dict: Object,
permissions: Function permissions: Function,
}, },
computed: { computed: {

View File

@@ -35,7 +35,7 @@ export default {
props: { props: {
instance: Function, instance: Function,
dict: Object, dict: Object,
permissions: Function permissions: Function,
}, },
data() { data() {

View File

@@ -17,7 +17,7 @@
</div> </div>
</div> </div>
</el-row> </el-row>
<el-row class="echertsBox" style="margin-bottom: 16px"> <!-- <el-row class="echertsBox" style="margin-bottom: 16px">
<div class="title"> <div class="title">
<h4>事件汇总</h4> <h4>事件汇总</h4>
<div class="timecSelect"> <div class="timecSelect">
@@ -28,27 +28,16 @@
<div id="chartDom" style="height: 230px; width: 100%;"></div> <div id="chartDom" style="height: 230px; width: 100%;"></div>
<ai-empty v-if="false" style="height: 230px;"></ai-empty> <ai-empty v-if="false" style="height: 230px;"></ai-empty>
</div> </div>
</el-row> </el-row> -->
<ai-card> <ai-card>
<ai-title slot="title" title="余额变动明细"/> <ai-title slot="title" title="余额变动明细"/>
<template #content> <template #content>
<ai-search-bar> <ai-search-bar>
<template #left> <template #left>
<el-select size="small" style="width: 200px;" v-model="search.girdId" placeholder="类型" clearable <ai-select v-model="search.type" placeholder="请选择类型" @change="page.current=1,getIntegralChange()"
@change="getListInit()"> :selectList="dict.getDict('integralDetailType')"/>
<el-option
v-for="(item,i) in girdList"
:key="i"
:label="item.girdName"
:value="item.id"
>
</el-option>
</el-select>
</template> </template>
<template #right> <template #right>
<!-- <el-input size="small" placeholder="请输入居民名称或真实姓名" v-model="search.name" clearable
@clear="page.current = 1, search.name = '', getTableData()" suffix-icon="iconfont iconSearch"
v-throttle="() => {(page.current = 1), getTableData();}" style="margin-right: 16px;"/> -->
<ai-download :instance="instance" url="" :params="search" fileName="网格员积分" <ai-download :instance="instance" url="" :params="search" fileName="网格员积分"
:disabled="tableData.length == 0"> :disabled="tableData.length == 0">
<el-button size="small">导出</el-button> <el-button size="small">导出</el-button>
@@ -67,22 +56,26 @@
import * as echarts from 'echarts'; import * as echarts from 'echarts';
export default { export default {
name: "gridScoreDetail", name: "gridScoreDetail",
label: "网格员积分详情",
data() { data() {
return { return {
myChart: null, myChart: null,
tableData: [], tableData: [],
search: { search: {
current: 1,
name: '', name: '',
girdId: '', girdId: '',
type: '',
},
page: {
current: 1,
size: 10,
total: 0
}, },
page: {current: 1, size: 10, total: 0},
girdList: [], girdList: [],
timeList: [], timeList: [],
data: {}, data: {},
startTime: '', startTime: '',
endTime: '', endTime: '',
} }
}, },
props: { props: {
@@ -101,39 +94,47 @@ export default {
colConfigs() { colConfigs() {
return [ return [
{ prop: "doTime", label: '时间', align: "left", width: "200px" }, { prop: "doTime", label: '时间', align: "left", width: "200px" },
{ prop: "integralType", label: '类型', align: "center", width: "180px" }, { prop: "integralType", label: '类型', align: "center", width: "180px", dict:"integralDetailType"},
{ prop: "changeIntegral", label: '变动积分', align: "center",width: "200px" }, { prop: "changeIntegral", label: '变动积分', align: "center",width: "200px",render: (h, { row }) => {
return h('span', {}, `${row.integralCalcType == 1 ? '+' : '-'}${row.changeIntegral}`)
}},
{ prop: "nowIntegral", label: '剩余积分', align: "center",width: "200px" }, { prop: "nowIntegral", label: '剩余积分', align: "center",width: "200px" },
{ prop: "eventDesc", label: '事件', align: "center", }, { prop: "eventDesc", label: '事件', align: "center", },
] ]
} }
}, },
created() { created() {
this.$dict.load('integralDetailType')
this.getDetail() this.getDetail()
this.getIntegralChange() this.getIntegralChange()
}, },
methods: { methods: {
// 详情 // 详情
getDetail() { getDetail() {
this.instance.post(`/app/appintegraluser/girdDetail?id`).then(res=>{ this.instance.post(`/app/appintegraluser/girdDetail`,null,{
params: {
id: this.$route.query.id
}
}).then(res=>{
if(res?.data) { if(res?.data) {
this.data = res.data this.data = res.data
} }
}) })
}, },
// 事件汇总暂定 // 事件汇总 暂定
// 余额变动明细 // 余额变动明细
getIntegralChange() { getIntegralChange() {
this.instance.post(`/app/appintegraluser/getChangeDetail`, null, { this.instance.post(`/app/appintegraluser/getChangeDetail`, null, {
param: { params: {
...this.page, ...this.page,
type: this.type //积分类型 type: this.search.type, //积分类型
id: this.$route.query.id,
} }
}).then(res => { }).then(res => {
if(res?.data) { if(res?.data) {
this.tableData = res.data.detailList this.tableData = res.data.records
} }
}) })
}, },
@@ -218,7 +219,7 @@ export default {
}, },
mounted() { mounted() {
this.getColEcherts() // this.getColEcherts()
}, },
destroyed () { destroyed () {

View File

@@ -20,6 +20,21 @@
</ai-search-bar> </ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict"> @getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="integral" label="积分余额" align="center" :sortable="'custom'">
<template slot-scope="{ row }">
<span>{{ row.integral }}</span>
</template>
</el-table-column>
<el-table-column slot="totalIntegral" label="累计积分" align="center" :sortable="'custom'">
<template slot-scope="{ row }">
<span>{{ row.totalIntegral }}</span>
</template>
</el-table-column>
<el-table-column slot="usedIntegral" label="已用积分" align="center" :sortable="'custom'">
<template slot-scope="{ row }">
<span>{{ row.usedIntegral }}</span>
</template>
</el-table-column>
<el-table-column slot="options" label="操作" align="center"> <el-table-column slot="options" label="操作" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="dialog = true">调整积分</el-button> <el-button type="text" @click="dialog = true">调整积分</el-button>
@@ -52,7 +67,7 @@
maxlength="100"></el-input> maxlength="100"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传凭证"> <el-form-item label="上传凭证">
<ai-uploader :instance="instance" fileType="file" v-model="form.enclosure" :limit="1"></ai-uploader> <ai-uploader :instance="instance" fileType="file" v-model="form.file" :limit="1"></ai-uploader>
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="integralCalcType"> <el-form-item label="类型" prop="integralCalcType">
<ai-select v-model="form.integralCalcType" :selectList="dict.getDict('integralCalcType')"/> <ai-select v-model="form.integralCalcType" :selectList="dict.getDict('integralCalcType')"/>
@@ -74,7 +89,7 @@ export default {
props: { props: {
instance: Function, instance: Function,
dict: Object, dict: Object,
permissions: Function permissions: Function,
}, },
data() { data() {
return { return {
@@ -89,9 +104,10 @@ export default {
form: { form: {
ids: [], ids: [],
eventDesc: "", eventDesc: "",
enclosure: [], // 附件 enclosure: "", // 附件
integralCalcType: "", integralCalcType: "",
integral: 0, integral: 0,
file: [],
}, },
personList: [], personList: [],
dialog: false, dialog: false,
@@ -109,18 +125,15 @@ export default {
this.getTableData() this.getTableData()
this.getGridList() this.getGridList()
}, },
watch: {
gridChange() {}
},
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
colConfigs() { colConfigs() {
return [ return [
{ prop: "userName", label: '姓名', align: "left", }, { prop: "userName", label: '姓名', align: "left", },
{ prop: "girdName", label: '所属网格', align: "center", }, { prop: "girdName", label: '所属网格', align: "center", },
{ prop: "integral", label: '积分余额', align: "center", }, { slot: "integral", label: '积分余额', align: "center", },
{ prop: "totalIntegral", label: '累计积分', align: "center", }, { slot: "totalIntegral", label: '累计积分', align: "center", },
{ prop: "usedIntegral", label: '已用积分', align: "center", }, { slot: "usedIntegral", label: '已用积分', align: "center", },
{ slot: "options" }, { slot: "options" },
] ]
}, },
@@ -142,6 +155,7 @@ export default {
} }
}).then(res => { }).then(res => {
if(res?.data) { if(res?.data) {
console.log(res.data.records);
this.tableData = res.data.records this.tableData = res.data.records
this.page.total = res.data.total this.page.total = res.data.total
} }
@@ -195,17 +209,22 @@ export default {
}, },
onConfirm() { onConfirm() {
if(this.form.file?.length) {
this.form.enclosure = this.form.file[0].url
}
this.instance.post(`/app/appintegraluser/changeIntegral`,{ this.instance.post(`/app/appintegraluser/changeIntegral`,{
ids: this.form.ids, ids: this.form.ids,
eventDesc: this.form.eventDesc, eventDesc: this.form.eventDesc,
enclosure: this.form.enclosure?.[0].url, // 附件 enclosure: this.form.enclosure, // 附件
integralCalcType: this.form.integralCalcType, integralCalcType: this.form.integralCalcType,
integral: this.form.integral, integral: this.form.integral,
}).then(res => { }).then(res => {
if(res.code == 0) { if(res.code == 0) {
this.$message.success('调整积分成功') this.$message.success('调整积分成功')
this.getTableData() setTimeout(() =>{
this.dialog = false this.getTableData()
this.dialog = false
})
} }
}) })
}, },
@@ -214,7 +233,7 @@ export default {
this.$emit('change', { this.$emit('change', {
type: 'gridScoreDetail', type: 'gridScoreDetail',
params: { params: {
id: id || '' id: id
} }
}) })
} }

View File

@@ -120,6 +120,9 @@ export default {
{prop: "type", label: "类型", dict: "integralRuleEventType"}, {prop: "type", label: "类型", dict: "integralRuleEventType"},
{prop: "ruleType", label: "规则", dict: "integralRuleRuleType"}, {prop: "ruleType", label: "规则", dict: "integralRuleRuleType"},
{prop: "scoringCycle", label: "周期范围", dict: "integralRuleScoringCycle"}, {prop: "scoringCycle", label: "周期范围", dict: "integralRuleScoringCycle"},
// {prop: "", label: "积分分值", dict: "integralRuleScoringCycle"},
{slot: "integral",label: "积分分值", align: "center"},
{prop: "", label: "有效范围", dict: "integralRuleScoringCycle"},
{prop: "status", label: "状态", align: "center", width: 96, dict: "integralRuleStatus"}, {prop: "status", label: "状态", align: "center", width: 96, dict: "integralRuleStatus"},
{slot: "options", label: "操作", align: "center"}, {slot: "options", label: "操作", align: "center"},
], ],

View File

@@ -57,6 +57,11 @@
</ai-search-bar> </ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict"> @getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="changeIntegral" label="积分" align="center">
<template slot-scope="{ row }">
<span>{{ row.integralCalcType == 1 ? '+' : '-' }}{{ row.changeIntegral }}</span>
</template>
</el-table-column>
<el-table-column slot="options" label="操作" align="center"> <el-table-column slot="options" label="操作" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="open(row.id)">详情</el-button> <el-button type="text" @click="open(row.id)">详情</el-button>
@@ -144,8 +149,15 @@ export default {
{ prop: "integralUserName", label: '姓名', align: "left", width: "200px" }, { prop: "integralUserName", label: '姓名', align: "left", width: "200px" },
{ prop: "girdName", label: '所属网格', align: "center", width: "180px" }, { prop: "girdName", label: '所属网格', align: "center", width: "180px" },
{ prop: "eventDesc", label: '事件', align: "center",width: "200px" }, { prop: "eventDesc", label: '事件', align: "center",width: "200px" },
{ prop: "integralType", label: '类型', align: "center",width: "200px" }, { prop: "integralType", label: '类型', align: "center",width: "200px", dict:"integralDetailType" },
{ prop: "changeIntegral", label: '积分变动', align: "center", }, // render: (h, {row}) => {
// return h('span', {
// style: {
// // color: row.status === '0' ? 'red' : '#333'
// }
// }, (row.integralCalcType == '0' ? `- ${row.integralCalcType}` : `+ ${row.integralCalcType}`))
// } },
{ slot: "changeIntegral", label: '积分变动', align: "center", },
{ prop: "nowIntegral", label: '剩余积分', align: "center", }, { prop: "nowIntegral", label: '剩余积分', align: "center", },
{ prop: "createTime", label: '时间', align: "center", }, { prop: "createTime", label: '时间', align: "center", },
{ slot: "options" } { slot: "options" }
@@ -313,7 +325,7 @@ export default {
color: "#5087ec", color: "#5087ec",
label: { label: {
show: true, //开启显示 show: true, //开启显示
position: 'right', //在方显示 position: 'right', //在方显示
textStyle: { textStyle: {
fontSize: 13, fontSize: 13,
color: '#666' color: '#666'
@@ -385,7 +397,11 @@ export default {
}, },
getDetail(id) { getDetail(id) {
this.instance.post(`/app/appintegraldetail/queryDetailById?id=${id}`).then(res=> {
if(res?.data) {
console.log(res.data);
}
})
}, },
selectDete() { selectDete() {

View File

@@ -61,6 +61,26 @@
isShowGrid1: false, isShowGrid1: false,
currIndex1: 0 currIndex1: 0
} }
},
mounted () {
this.$nextTick(() => {
this.$nextTick(() => {
document.addEventListener('keydown', this.onKeyDown)
})
})
},
destroyed () {
document.removeEventListener('keydown', this.onKeyDown)
},
methods: {
onKeyDown (e) {
if (e.keyCode == 27) {
this.isShowGrid1 = false
}
}
} }
} }
</script> </script>

View File

@@ -24,7 +24,9 @@
<ai-picker <ai-picker
:instance="instance" :instance="instance"
multiple multiple
:dialogTitle="form.sendScope === '2' ? '选择网格' : '选择部门'"
:ops="{label: form.sendScope === '2' ? 'girdName' : 'name'}" :ops="{label: form.sendScope === '2' ? 'girdName' : 'name'}"
:pageTitle="form.sendScope === '2' ? '网格' : '部门'"
:action="form.sendScope === '1' ? '/app/wxcp/wxdepartment/departList' : '/app/appgirdinfo/girdList'" :action="form.sendScope === '1' ? '/app/wxcp/wxdepartment/departList' : '/app/appgirdinfo/girdList'"
v-model="form.filterCriteria" v-model="form.filterCriteria"
@pick="onPick" @pick="onPick"
@@ -33,7 +35,10 @@
<el-input size="small" class="AppAnnounceDetail-select__input" placeholder="请选择..." disabled v-model="form.wxGroupsName"></el-input> <el-input size="small" class="AppAnnounceDetail-select__input" placeholder="请选择..." disabled v-model="form.wxGroupsName"></el-input>
<div class="select-left" v-if="form.wxGroups.length"> <div class="select-left" v-if="form.wxGroups.length">
<span v-for="(item, index) in form.wxGroups" :key="index" v-if="index < 9"> <span v-for="(item, index) in form.wxGroups" :key="index" v-if="index < 9">
<ai-open-data type="userName" :openid="item.groupOwnerId"></ai-open-data> <ai-open-data
type="userName"
:openid="item.groupOwnerId">
</ai-open-data>
</span> </span>
<em v-if="form.wxGroups.length > 9">{{ form.wxGroups.length }}</em> <em v-if="form.wxGroups.length > 9">{{ form.wxGroups.length }}</em>
</div> </div>

View File

@@ -115,14 +115,18 @@
<el-radio-button size="small" label="1">已执行</el-radio-button> <el-radio-button size="small" label="1">已执行</el-radio-button>
<el-radio-button size="small" label="2">无法执行</el-radio-button> <el-radio-button size="small" label="2">无法执行</el-radio-button>
</el-radio-group> </el-radio-group>
<ai-user-get :instance="instance" @change="e => onUserChange(e, 'search1')" isChooseUnit isStrictly :isMultiple="false" v-model="user1"> <ai-picker
dialogTitle="选择部门"
action="/app/wxcp/wxdepartment/departList"
:instance="instance"
@pick="e => onUserChange(e, 'search1')" :multiple="false" v-model="user1">
<div class="userSelcet"> <div class="userSelcet">
<span style="color: #606266;" v-if="search1.deptartId"><ai-open-data type="departmentName" :openid="search1.deptartId"></ai-open-data></span> <span style="color: #606266;" v-if="search1.deptartId"><ai-open-data type="departmentName" :openid="search1.deptartId"></ai-open-data></span>
<span v-else>部门</span> <span v-else>部门</span>
<i class="el-icon-arrow-up" v-if="!search1.deptartId"></i> <i class="el-icon-arrow-up" v-if="!search1.deptartId"></i>
<i class="el-icon-circle-close" v-if="search1.deptartId" @click.stop="user1 = [], search1.deptartId = '', search1.current = 1, getMemberInfo()"></i> <i class="el-icon-circle-close" v-if="search1.deptartId" @click.stop="user1 = [], search1.deptartId = '', search1.current = 1, getMemberInfo()"></i>
</div> </div>
</ai-user-get> </ai-picker>
</div> </div>
<el-button :type="isDisabled ? '' : 'primary'" :disabled="isDisabled" @click="sendMsg(0)" v-if="info.status === '4'">{{ isDisabled ? min + '分钟后可再次提醒' : '提醒成员发送' }}</el-button> <el-button :type="isDisabled ? '' : 'primary'" :disabled="isDisabled" @click="sendMsg(0)" v-if="info.status === '4'">{{ isDisabled ? min + '分钟后可再次提醒' : '提醒成员发送' }}</el-button>
</div> </div>
@@ -185,14 +189,18 @@
<el-radio-button size="small" label="1">已送达</el-radio-button> <el-radio-button size="small" label="1">已送达</el-radio-button>
<el-radio-button size="small" label="2">无法送达</el-radio-button> <el-radio-button size="small" label="2">无法送达</el-radio-button>
</el-radio-group> </el-radio-group>
<ai-user-get :instance="instance" isStrictly @change="e => onUserChange(e, 'search2')" isChooseUnit :isMultiple="false" v-model="user2"> <ai-picker
dialogTitle="选择部门"
action="/app/wxcp/wxdepartment/departList"
:instance="instance"
@pick="e => onUserChange(e, 'search2')" :multiple="false" v-model="user2">
<div class="userSelcet"> <div class="userSelcet">
<span style="color: #606266;" v-if="search2.deptartId"><ai-open-data type="departmentName" :openid="search2.deptartId"></ai-open-data></span> <span style="color: #606266;" v-if="search2.deptartId"><ai-open-data type="departmentName" :openid="search2.deptartId"></ai-open-data></span>
<span v-else>部门</span> <span v-else>部门</span>
<i class="el-icon-arrow-up" v-if="!search2.deptartId"></i> <i class="el-icon-arrow-up" v-if="!search2.deptartId"></i>
<i class="el-icon-circle-close" v-if="search2.deptartId" @click.stop="user2 = [], search2.deptartId = '', search2.current = 1, getGroupInfo()"></i> <i class="el-icon-circle-close" v-if="search2.deptartId" @click.stop="user1 = [], search2.deptartId = '', search2.current = 1, getGroupInfo()"></i>
</div> </div>
</ai-user-get> </ai-picker>
</div> </div>
<el-button :type="isDisabled ? '' : 'primary'" :disabled="isDisabled" @click="sendMsg(1)" v-if="info.status === '4'">{{ isDisabled ? min + '分钟后可再次提醒' : '提醒成员发送' }}</el-button> <el-button :type="isDisabled ? '' : 'primary'" :disabled="isDisabled" @click="sendMsg(1)" v-if="info.status === '4'">{{ isDisabled ? min + '分钟后可再次提醒' : '提醒成员发送' }}</el-button>
</div> </div>

View File

@@ -63,7 +63,7 @@
<ai-title title="宣发效果"></ai-title> <ai-title title="宣发效果"></ai-title>
<div class="right-search"> <div class="right-search">
<div class="time-select" :class="effectType == index ? 'active' : ''" v-for="(item, index) in dateTypeList" :key="index" @click="changeEffectType(index)">{{item}}</div> <div class="time-select" :class="effectType == index ? 'active' : ''" v-for="(item, index) in dateTypeList" :key="index" @click="changeEffectType(index)">{{item}}</div>
<ai-picker :instance="instance" v-model="deptList" @change="getEffect"> <ai-picker :instance="instance" v-model="deptList" @change="getEffect" dialogTitle="选择部门">
<div class="time-select"> <div class="time-select">
<span class="dept-name" style="color:#999;" v-if="deptList && !deptList.length">宣发部门</span> <span class="dept-name" style="color:#999;" v-if="deptList && !deptList.length">宣发部门</span>
<ai-open-data class="dept-name" type="departmentName" :openid="deptList[0]" v-else/> <ai-open-data class="dept-name" type="departmentName" :openid="deptList[0]" v-else/>