Compare commits
6 Commits
feature/nu
...
build
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f41df22a9 | ||
|
|
f9123942ca | ||
|
|
b67e30ce25 | ||
|
|
c43a8992fd | ||
|
|
705a252618 | ||
|
|
0b41291bf1 |
64
project/biaopin/AppFormReview/AppGridReview.vue
Normal file
64
project/biaopin/AppFormReview/AppGridReview.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div class="AppGridReview">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :is="component" :permissions="permissions " @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List'
|
||||
import Detail from './components/Detail'
|
||||
|
||||
export default {
|
||||
name: 'AppGridReview',
|
||||
label: '网格动态',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {},
|
||||
include: []
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
List,
|
||||
Detail
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange (data) {
|
||||
if (data.type === 'Detail') {
|
||||
this.component = 'Detail'
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === 'List') {
|
||||
this.component = 'List'
|
||||
this.params = data.params
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
this.$refs.component.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.AppGridReview {
|
||||
height: 100%;
|
||||
background: #F3F6F9;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
154
project/biaopin/AppFormReview/components/Detail.vue
Normal file
154
project/biaopin/AppFormReview/components/Detail.vue
Normal file
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<ai-detail class="AppDynamicDetail">
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
<template #rightBtn>
|
||||
<div class="title-btns">
|
||||
<el-button type="primary" icon="iconfont iconRegister" @click="isShowExamine = true" v-if="info.status == 0">审核</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper label-width="120px">
|
||||
<ai-info-item label="内容" isLine :value="info.content"></ai-info-item>
|
||||
<ai-info-item label="所属网格" isLine :value="info.girdName"></ai-info-item>
|
||||
<ai-info-item label="类型" >{{dict.getLabel("wyGirdNewsType", info.type)}}</ai-info-item>
|
||||
<ai-info-item label="地址" >{{info.address}}</ai-info-item>
|
||||
<ai-info-item label="网格员姓名" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="状态" >{{dict.getLabel("auditStatus", info.status)}}</ai-info-item>
|
||||
<ai-info-item label="发布时间" :value="info.createTime"></ai-info-item>
|
||||
<ai-info-item label="图片" isLine>
|
||||
<div class="files">
|
||||
<div class="file-item" v-for="(item, index) in info.files" :key="index">
|
||||
<img :src="item.url" v-viewer="{movable: true}">
|
||||
</div>
|
||||
</div>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="审核信息" v-if="info.status != 0">
|
||||
<template #content>
|
||||
<ai-wrapper label-width="120px">
|
||||
<ai-info-item label="审批意见" isLine :value="info.examineOpinion"></ai-info-item>
|
||||
<ai-info-item label="审批人" :value="info.examineUserName"></ai-info-item>
|
||||
<ai-info-item label="审批时间" :value="info.examineTime"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowExamine"
|
||||
width="800px"
|
||||
title="审核"
|
||||
@closed="isShowExamine=false"
|
||||
@onConfirm="handleEvent">
|
||||
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
|
||||
<el-form-item label="是否通过" prop="status" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过' }]">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="opinion" style="width: 100%;" >
|
||||
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审批意见" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="图片" prop="files" style="width: 100%;">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
isShowTip
|
||||
v-model="form.files"
|
||||
:limit="9">
|
||||
</ai-uploader>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object,
|
||||
moduleId: String
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
id: '',
|
||||
isShowExamine: false,
|
||||
form: {status: '', opinion: ''}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.dict.load('wyGirdNewsType', 'auditStatus').then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getDetail () {
|
||||
this.instance.post(`/app/appgirdnews/queryDetailById?id=${this.params.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this
|
||||
this.info = {
|
||||
...res.data
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleEvent() {
|
||||
this.$refs.form.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post(`/app/appgirdnews/examine?id=${this.params.id}&pass=${this.form.status}&opinion=${this.form.opinion}`).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.isShowExamine = false
|
||||
this.getDetail()
|
||||
this.$message.success('审核成功!')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppDynamicDetail {
|
||||
.files {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
.file-item {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
margin: 0 20px 20px 0;
|
||||
|
||||
img, video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
194
project/biaopin/AppFormReview/components/List.vue
Normal file
194
project/biaopin/AppFormReview/components/List.vue
Normal file
@@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<ai-list class="notice">
|
||||
<ai-title slot="title" title="网格动态" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.type"
|
||||
@change="(search.current = 1), getList()"
|
||||
placeholder="请选择类型"
|
||||
:selectList="dict.getDict('wyGirdNewsType')">
|
||||
</ai-select>
|
||||
<ai-picker
|
||||
:instance="instance"
|
||||
:multiple="false"
|
||||
dialogTitle="选择网格"
|
||||
:ops="{ label: 'girdName' }"
|
||||
pageTitle="网格"
|
||||
action="/app/appgirdinfo/girdList"
|
||||
@pick="onGridChange">
|
||||
<div class="userSelcet">
|
||||
<span style="color: #606266;" v-if="search.girdId">{{ search.girdName }}</span>
|
||||
<span v-else>请选择网格</span>
|
||||
<i class="el-icon-arrow-up" v-if="!search.girdId"></i>
|
||||
<i class="el-icon-circle-close" v-if="search.girdId" @click.stop="search.girdId = '', search.girdName = '', search.current = 1, getList()"></i>
|
||||
</div>
|
||||
</ai-picker>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.content"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="内容"
|
||||
clearable
|
||||
@clear="search.current = 1, search.content = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
content: '',
|
||||
areaId: '',
|
||||
girdId: '',
|
||||
girdName: ''
|
||||
},
|
||||
total: 0,
|
||||
colConfigs: [
|
||||
{ prop: 'content', label: '内容', align: 'left', width: '200px' },
|
||||
{ prop: 'girdName', label: '所属网格', align: 'center' },
|
||||
{ prop: 'type', align: 'center', label: '类型', dict:"wyGirdNewsType"},
|
||||
{ prop: 'address', label: '地址', align: 'center' },
|
||||
{ prop: 'name', label: '网格员姓名', align: 'center' },
|
||||
{ prop: 'status', align: 'center', label: '状态', dict:"auditStatus"},
|
||||
{ prop: 'createTime', label: '发布时间', align: 'center' }
|
||||
],
|
||||
tableData: [],
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
hideLevel () {
|
||||
return this.user.info.areaList.length || 0
|
||||
},
|
||||
|
||||
params () {
|
||||
return {
|
||||
...this.search
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.dict.load('wyGirdNewsType', 'auditStatus').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appgirdnews/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onGridChange (e) {
|
||||
if (e.length) {
|
||||
this.search.girdId = e[0].id
|
||||
this.search.girdName = e[0].girdName
|
||||
this.search.current = 1
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
|
||||
toDetail(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.userSelcet {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 215px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #d0d4dc;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
|
||||
&:hover {
|
||||
border-color: $placeholderColor;
|
||||
}
|
||||
|
||||
i {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 100%;
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #d0d4dc;
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
|
||||
.el-icon-circle-close:hover {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
span {
|
||||
flex: 1;
|
||||
padding: 0 15px;
|
||||
font-size: 12px;
|
||||
color: $placeholderColor;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -11,6 +11,12 @@
|
||||
<el-form-item style="width: 100%" label="店铺名称" prop="title" :rules="[{required: true, message: '请输入店铺名称', trigger: 'blur'}]">
|
||||
<el-input type="input" size="small" v-model="form.title" clearable placeholder="请输入店铺名称" :maxlength="50" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 50%" label="店家" prop="shopkeeper">
|
||||
<el-input type="input" size="small" v-model="form.shopkeeper" clearable placeholder="请输入店家名字" :maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 50%" label="联系电话" prop="phone" :rules="[{required: true, message: '请输入联系电话', trigger: 'blur'}]">
|
||||
<el-input type="number" size="small" v-model="form.phone" clearable placeholder="请输入联系电话" :maxlength="11" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%" label="店铺类型" prop="type" :rules="[{required: true, message: '请选择店铺类型', trigger: 'change'}]">
|
||||
<ai-select
|
||||
v-model="form.type"
|
||||
@@ -227,6 +233,8 @@
|
||||
isShow: false,
|
||||
form: {
|
||||
title: '',
|
||||
shopkeeper: '',
|
||||
phone: '',
|
||||
type: '',
|
||||
serviceType: '0',
|
||||
visibleNames: '',
|
||||
|
||||
Reference in New Issue
Block a user