This commit is contained in:
yanran200730
2023-04-23 17:50:44 +08:00
9 changed files with 181 additions and 61 deletions

View File

@@ -36,11 +36,24 @@
<ai-wrapper>
<ai-info-item label="积分值" isLine :value="info.applyIntegral"></ai-info-item>
<ai-info-item label="事件描述" isLine :value="info.content"></ai-info-item>
<ai-info-item label="事件附件" isLine>
<ai-info-item label="图片" isLine v-if="info.images && info.images.length">
<div class="files">
<div class="file-item" v-for="(item, index) in info.files" :key="index">
<video controls :src="item.url" v-if="['.mp4', '.mov'].includes(item.postfix)"></video>
<img :src="item.url" v-else v-viewer="{movable: true}">
<!-- <div class="file-item" v-for="(item, index) in info.images" :key="index" v-viewer="{movable: true}">
<img :src="item.url">
</div> -->
<ai-uploader
:instance="instance"
fileType="img"
acceptType=".jpg,.png,.jpeg"
v-model="info.images"
:limit="9" :disabled="true">
</ai-uploader>
</div>
</ai-info-item>
<ai-info-item label="视频" isLine v-if="info.videos && info.videos.length">
<div class="files">
<div class="file-item" v-for="(item, index) in info.videos" :key="index">
<video controls :src="item.url"></video>
</div>
</div>
</ai-info-item>
@@ -65,6 +78,7 @@
</el-form-item>
</el-form>
</ai-dialog>
<ai-dialog
:visible.sync="isShowEvent"
@onConfirm="onEventConfirm"
@@ -78,12 +92,21 @@
<el-form-item prop="content" label="事件描述" style="width: 100%" :rules="[{required: true, message: '请输入事件描述', trigger: 'blur'}]">
<el-input size="small" type="textarea" :rows="5" :maxlength="300" show-word-limit v-model="eventForm.content" clearable placeholder="请输入事件描述"></el-input>
</el-form-item>
<el-form-item style="width: 100%" label="事件附件" prop="files" :rules="[{required: true, message: '请选择事件附件', trigger: 'change'}]">
<el-form-item style="width: 100%" label="图片">
<ai-uploader
:instance="instance"
fileType="img"
acceptType=".jpg,.png,.jpeg"
v-model="eventForm.images"
:limit="9">
</ai-uploader>
</el-form-item>
<el-form-item style="width: 100%" label="视频">
<ai-uploader
:instance="instance"
fileType="file"
acceptType=".jpg,.png,.jpeg,.mp4"
v-model="eventForm.files"
acceptType=".mp4,.MOV"
v-model="eventForm.videos"
:limit="9">
</ai-uploader>
</el-form-item>
@@ -111,7 +134,9 @@
auditStatus: ''
},
eventForm: {
files: [],
files: null,
images: [],
videos: [],
content: '',
applyIntegral: ''
},
@@ -144,15 +169,19 @@
this.eventForm.content = res.data.content
this.eventForm.applyIntegral = res.data.applyIntegral
}
this.info.images = res.data.files.filter(e => (['jpeg', 'jpg', 'png'].includes(e.postfix.split('.')[1])))
this.info.videos = res.data.files.filter(e => (['mp4', 'MOV'].includes(e.postfix.split('.')[1])))
}
}
})
},
showEvent () {
this.eventForm.files = this.info.files
this.eventForm.files = null
this.eventForm.content = this.info.content
this.eventForm.applyIntegral = this.info.applyIntegral
this.eventForm.images = this.info.images
this.eventForm.videos = this.info.videos
this.isShowEvent = true
},
@@ -162,11 +191,16 @@
},
onEventConfirm () {
if ((this.eventForm.images.length + this.eventForm.videos.length) > 9) {
return this.$message.error('图片和视频不得超过9个')
} else {
this.eventForm.files = [...this.eventForm.images,...this.eventForm.videos]
}
this.$refs.eventForm.validate((valid) => {
if (valid) {
this.instance.post(`/app/appintegraluserapply/updateByGirdMember`, {
...this.eventForm,
id: this.params.id
id: this.params.id,
}).then(res => {
if (res.code == 0) {
this.$message.success('编辑成功!')
@@ -212,8 +246,8 @@
align-items: center;
flex-wrap: wrap;
.file-item {
width: 240px;
height: 240px;
width: 118px;
height: 118px;
margin: 0 20px 20px 0;
img, video {

View File

@@ -1,7 +1,7 @@
<template>
<ai-list v-if="!isShowDetail">
<template slot="title">
<ai-title title="订单管理" :isShowBottomBorder="false" v-model="areaId" :isShowArea="currIndex === '1'" :hideLevel="hideLevel - 1" @change="onAreaChange">
<ai-title title="订单管理" :isShowBottomBorder="false" v-model="areaId" :isShowArea="currIndex != '1'" :hideLevel="hideLevel - 1" @change="onAreaChange">
</ai-title>
</template>
<template slot="tabs">
@@ -49,8 +49,8 @@
tabs () {
const tabList = [
{label: '网格积分订单', name: 'GirdList', comp: GirdList, permission: ''},
{label: '居民积分订单', name: 'ResidentList', comp: ResidentList, permission: ''}
{label: '居民积分订单', name: 'ResidentList', comp: ResidentList, permission: ''},
{label: '网格积分订单', name: 'GirdList', comp: GirdList, permission: ''}
].filter(item => {
return true
})
@@ -77,7 +77,7 @@
methods: {
onAreaChange () {
if (this.currIndex === '1') {
if (this.currIndex != '1') {
this.$nextTick(() => {
this.$refs[this.currIndex][0].getList()
})

View File

@@ -26,7 +26,7 @@
<ai-import
:instance="instance"
:dict="dict"
type="appintegralpublicityinfo" name="积分公"
type="appintegralpublicityinfo" name="积分公"
@success="search.current = 1, getList()">
</ai-import>
</template>

View File

@@ -45,12 +45,18 @@
width="450">
<template v-slot="{ row }">
<div class="goods">
<ai-uploader
<!-- <ai-uploader class="upload"
:disabled="true"
:instance="instance"
:value="[{url: row.picUrl}]"
:limit="1">
</ai-uploader>
<span class="type" :class="`type`+row.type">{{$dict.getLabel('integralSGType', row.type)}}</span>
</ai-uploader> -->
<div class="img-content">
<img :src="row.picUrl" alt="" v-viewer>
<span class="type" :class="`type`+row.type">{{$dict.getLabel('integralSGType', row.type)}}</span>
</div>
<p>{{ row.title }}</p>
</div>
</template>
@@ -71,6 +77,9 @@
</template>
<script>
import Viewer from 'v-viewer'
import Vue from 'vue'
Vue.use(Viewer)
export default {
name: 'GoodsList',
@@ -177,5 +186,29 @@
display: flex;
align-items: center;
}
.img-content {
position: relative;
margin-right: 8px;
img {
width: 120px;
height: 120px;
cursor: pointer;
}
}
.type {
position: absolute;
top: 0;
left: 0;
width: 120px;
text-align: center;
color: #fff;
z-index: 999;
}
.type1 {
background-color: #E64E39;
}
.type0 {
background-color: #FF6900;
}
}
</style>

View File

@@ -269,6 +269,22 @@
:areaLevel="3"
/>
</el-form-item>
</template>
</ai-card>
<ai-card title="联络信息">
<template #content>
<el-form-item label="联系方式:" prop="phone">
<el-input v-model="baseInfo.phone" size="small" placeholder="请输入联系方式" :maxlength="11"
show-word-limit/>
</el-form-item>
<el-form-item label="现住址:" prop="currentAreaId">
<ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel"
v-model="baseInfo.currentAreaId" :valueLevel="4"/>
<el-form-item>
<el-input v-model="baseInfo.currentAddress" placeholder="详细地址" maxlength="30" show-word-limit
clearable/>
</el-form-item>
</el-form-item>
<el-form-item label="所属网格" prop="girdName" required>
<ai-picker
:instance="instance"
@@ -290,22 +306,6 @@
</el-form-item>
</template>
</ai-card>
<ai-card title="联络信息">
<template #content>
<el-form-item label="联系方式:" prop="phone">
<el-input v-model="baseInfo.phone" size="small" placeholder="请输入联系方式" :maxlength="11"
show-word-limit/>
</el-form-item>
<el-form-item label="现住址:" prop="currentAreaId">
<ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel"
v-model="baseInfo.currentAreaId" :valueLevel="4"/>
<el-form-item>
<el-input v-model="baseInfo.currentAddress" placeholder="详细地址" maxlength="30" show-word-limit
clearable/>
</el-form-item>
</el-form-item>
</template>
</ai-card>
<ai-card title="户籍信息">
<template #content>
<el-row type="flex">
@@ -593,14 +593,16 @@ export default {
}
},
created() {
this.disabledLevel = this.user.info.areaMap[this.user.info.areaId].length;
if (!this.params.id) {
// this.baseInfo.householdAreaId = JSON.parse(JSON.stringify(this.user.info.areaId))
this.baseInfo.currentAreaId = JSON.parse(JSON.stringify(this.user.info.areaId))
this.$nextTick(() => this.$refs.ruleForm?.resetFields())
} else {
this.getDetail(this.params.id);
}
this.$dict.load(['sex', 'education', 'politicsStatus', 'job', 'faithType', 'nation', 'maritalStatus', 'militaryStatus', 'householdName', 'householdRelation', ]).then(()=> {
this.disabledLevel = this.user.info.areaMap[this.user.info.areaId].length;
if (!this.params.id) {
// this.baseInfo.householdAreaId = JSON.parse(JSON.stringify(this.user.info.areaId))
this.baseInfo.currentAreaId = JSON.parse(JSON.stringify(this.user.info.areaId))
this.$nextTick(() => this.$refs.ruleForm?.resetFields())
} else {
this.getDetail(this.params.id);
}
})
}
};
</script>

View File

@@ -24,13 +24,13 @@
<ai-info-item label="兵役状况" :value="dict.getLabel('militaryStatus', baseInfo.militaryStatus)"/>
<ai-info-item label="宗教信仰" :value="dict.getLabel('faithType', baseInfo.faithType)"/>
<ai-info-item label="职业" :value="dict.getLabel('job', baseInfo.job)"/>
<ai-info-item label="所属网格" :value="baseInfo.girdName"/>
</ai-wrapper>
</ai-card>
<ai-card title="联络信息" type="flex">
<ai-wrapper slot="content">
<ai-info-item label="联系方式" :value="baseInfo.phone"/>
<ai-info-item label="现住址" isLine :value="[baseInfo.currentAreaName, baseInfo.currentAddress].join('')"/>
<ai-info-item label="所属网格" :value="baseInfo.girdName"/>
</ai-wrapper>
</ai-card>
<ai-card title="户籍信息">

View File

@@ -24,12 +24,12 @@
</template>
<template #right>
<el-input
v-model="search.title"
v-model="search.name"
size="small"
placeholder="姓名/身份证/联系方式"
clearable
v-throttle="() => {search.current = 1, getList()}"
@clear="search.title = '', getList()"
@clear="search.name = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
@@ -69,7 +69,7 @@
current: 1,
size: 10,
total: 0,
title: '',
name: '',
areaId: ''
},
tableData: []
@@ -80,9 +80,12 @@
colConfigs() {
return [
{ label: "姓名", prop: "name", align: "left" },
{ label: "性别", prop: "sex", dict: 'sex', align: "center" },
{ prop: 'idNumber', label: '身份证号', align: 'center', format: v => v.substring(0, 10) + '****' + v.substring(14, 18) },
{ label: "年龄", prop: "age", align: "center"},
// { label: "性别", prop: "sex", dict: 'sex', align: "center" },
{ prop: 'idNumber', label: '身份证号', align: 'center'},
// format: v => v.substring(0, 10) + '****' + v.substring(14, 18)
// { label: "年龄", prop: "age", align: "center"},
{ label: "现住址", prop: "currentAreaName", align: "center" },
{ label: "网格", prop: "girdName", align: "center" },
{ label: "民族", prop: "nation", align: "center", dict: "nation" },
{ label: "文化程度", prop: "education", align: "center", dict: "education" },
{ label: "政治面貌", prop: "politicsStatus", align: "center", dict: "politicsStatus" },

View File

@@ -5,16 +5,22 @@
</ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="姓名" isLine :value="info.userName"></ai-info-item>
<ai-info-item label="个人积分" isLine :value="info.integral || 0"></ai-info-item>
<ai-info-item label="已用积分" isLine :value="info.usedIntegral || 0"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<el-row style="margin-bottom: 16px;">
<div class="card_list">
<div class="card">
<h2>姓名</h2>
<p class="color1">{{ info.userName }}</p>
</div>
<div class="card">
<h2>积分余额</h2>
<p class="color2">{{ info.integral || 0 }}</p>
</div>
<div class="card">
<h2>已用积分</h2>
<p class="color3">{{ info.usedIntegral || 0 }}</p>
</div>
</div>
</el-row>
<ai-card>
<ai-title slot="title" title="余额变动明细"/>
<template #content>
@@ -130,4 +136,46 @@
</script>
<style scoped lang="scss">
.card_list {
display: flex;
.card {
flex: 1;
height: 96px;
background: #FFFFFF;
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.1500);
border-radius: 4px;
margin-right: 20px;
padding: 16px 24px;
box-sizing: border-box;
h2 {
color: #888888;
font-weight: 600;
font-size: 16px;
}
p {
margin-top: 8px;
font-size: 24px;
font-weight: 600;
}
.color1 {
color: #2891FF;
}
.color2 {
color: #22AA99;
}
.color3 {
color: #F8B425;
}
}
.card:last-child {
margin-right: 0;
}
}
</style>

View File

@@ -140,7 +140,7 @@
return {
ids: [{required: true, message: '请选择人员', trigger: 'blur'}],
eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'}],
integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'}],
integralCalcType: [{required: true, message: '请选择类型', trigger: 'blur'}],
integral: [{required: true, message: '请输入积分', trigger: 'blur' },
{pattern: /^([1-9]\d*|0)(\.\d{1,2})?$/, message: '请输入正数且最多只能保留两位小数'}],
}