This commit is contained in:
yanran200730
2022-08-08 11:24:29 +08:00
5 changed files with 87 additions and 12 deletions

View File

@@ -38,7 +38,7 @@ export default {
data() {
return {
activeName: "girdScoreManage",
currIndex: "2",
currIndex: "0",
areaId: '',
oldActiveName: '',
}

View File

@@ -4,7 +4,7 @@
<template #content>
<ai-search-bar>
<template #left>
<el-button type="primary" size="small" icon="iconfont iconAdd">批量调整积分</el-button>
<el-button type="primary" size="small" icon="iconfont iconAdd" @click="dialog = true">批量调整积分</el-button>
<el-select size="small" style="width: 200px;margin-left: 16px;" v-model="search.girdId" placeholder="所属网格" clearable
@change="getListInit()">
<el-option
@@ -30,19 +30,56 @@
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="options" label="操作" align="center">
<template slot-scope="{ row }">
<el-button type="text" @click="handleDelete(row.id)">调整积分</el-button>
<el-button type="text" @click="dialog = true">调整积分</el-button>
<el-button type="text" @click="toAdd(row.id)">详情</el-button>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
<ai-dialog
title="添加积分调整"
:visible.sync="dialog"
:destroyOnClose="true"
width="720px"
@onConfirm="onConfirm"
@closed="form={}">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="选择人员" prop="residentId">
<ai-person-select :instance="instance" :customClicker="true"
:url="'/app/appresident/list?areaId=' + user.info.areaId"
:isMultiple="false" dialogTitle="选择" @selectPerson="selectPerson">
<template name="option" v-slot:option="{ item }">
<span class="iconfont iconProlife">{{ item.name }}</span>
<ai-id mode="show" :show-eyes="false" :value="item.idNumber"/>
</template>
</ai-person-select>
</el-form-item>
<el-form-item label="调整说明" prop="eventDesc">
<el-input v-model.trim="form.eventDesc" placeholder="请输入..." type="textarea" :rows="4" show-word-limit
maxlength="100"></el-input>
</el-form-item>
<el-form-item label="上传凭证">
<el-row>
<el-radio v-model="radio" label="1">图片</el-radio>
<el-radio v-model="radio" label="2">附件</el-radio>
</el-row>
<ai-uploader :instance="instance" isWechat v-model="form.files" :limit="1" url="/app/wxcp/upload/uploadFile?type=image"></ai-uploader>
</el-form-item>
<el-form-item label="类型" prop="integralCalcType">
<!-- <ai-select v-model="form.integralCalcType" :selectList="dict.getDict('integralCalcType')"/> -->
</el-form-item>
<el-form-item label="积分" prop="changeIntegral">
<el-input v-model.trim.num="form.changeIntegral" placeholder="请输入正数" size="small"></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</section>
</template>
<script>
import { mapState } from "vuex";
export default {
name: "girdScoreManage",
label: "积分管理",
@@ -61,9 +98,20 @@ export default {
tableData: [],
page: {current: 1, size: 10, total: 0},
girdList: [],
form: {
},
personList: [],
dialog: false,
radio: ''
}
},
created() {
// this.$dict.load('integralCalcType')
},
computed: {
...mapState(['user']),
colConfigs() {
return [
{ prop: "", label: '姓名', align: "left", },
@@ -72,7 +120,15 @@ export default {
{ prop: "", label: '累计积分', align: "center", },
{ slot: "options" },
]
}
},
rules() {
return {
residentId: [{required: true, message: '请选择人员', trigger: 'blur'},],
eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'},],
integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'},],
changeIntegral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}],
}
},
},
methods: {
getTableData() {},
@@ -80,6 +136,16 @@ export default {
this.search.current = 1
this.getList()
},
selectPerson(val) {
if (val) {
this.form.residentId = val.id
this.personList = [{...val}]
} else {
this.form.residentId = ""
this.personList = []
}
},
onConfirm() {},
},
}

View File

@@ -23,7 +23,7 @@
<div class="title">
<h4>事件汇总</h4>
<div class="timecSelect">
时间<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
时间<el-date-picker size="small" v-model="time" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
</div>
<div class="bar_Box">
@@ -81,7 +81,7 @@ export default {
},
page: {current: 1, size: 10, total: 0},
girdList: [],
time: '',
}
},
props: {
@@ -103,7 +103,7 @@ export default {
methods: {
getColEcherts() {
let chartDom = document.getElementById('chartDom');
chartDom.style.width = window.innerWidth - 328 + "px";
chartDom.style.width = window.innerWidth - 335 + "px";
this.myChart = echarts.init(chartDom);
this.myChart.setOption({
dataZoom: [

View File

@@ -69,7 +69,7 @@
<el-date-picker
v-model="time"
type="datetimerange"
range-separator="-"
range-separator=""
size="small"
start-placeholder="开始日期"
end-placeholder="结束日期">
@@ -162,7 +162,7 @@ export default {
methods: {
getColEcherts1() {
let chartDom1 = document.getElementById('chart1');
chartDom1.style.width = (window.innerWidth - 344) / 2 + "px";
chartDom1.style.width = (window.innerWidth - 435) / 2 + "px";
this.myChart1 = echarts.init(chartDom1);
this.myChart1.setOption({
@@ -223,7 +223,7 @@ export default {
},
getColEcherts2() {
let chartDom2 = document.getElementById('chart2');
chartDom2.style.width = (window.innerWidth - 344) / 2 + "px";
chartDom2.style.width = (window.innerWidth - 435) / 2 + "px";
this.myChart2 = echarts.init(chartDom2);
this.myChart2.setOption({
title: {

View File

@@ -56,6 +56,11 @@
</el-table-column>
</ai-table>
</template>
<template v-else-if="form.type=='wxwork'">
<el-form-item label="接口是否单服务">
<el-checkbox v-model="form.isSingleService"/>
</el-form-item>
</template>
</template>
</ai-card>
</el-form>
@@ -153,9 +158,11 @@ export default {
submit() {
this.$refs.AddForm.validate(v => {
if (v) {
const {tabBar, appId, form: {type}} = this
const {tabBar, form: {type, appId, isSingleService}} = this
if (type == 'mp') {
this.form.extra = {tabBar, appId}
} else if (v == 'wxwork') {
this.form.extra = {isSingleService}
}
this.instance.post("/node/custom/addOrUpdate", this.form).then(res => {
if (res?.code == 0) {
@@ -170,6 +177,8 @@ export default {
if (v == 'mp') {
this.form.appId = data.appId
this.tabBar = data?.tabBar || this.tabBar
} else if (v == 'wxwork') {
this.form.isSingleService = data.isSingleService
}
},
handleTabbarChange(row, {name, label}) {