Merge remote-tracking branch 'origin/build' into build
This commit is contained in:
@@ -129,6 +129,7 @@
|
||||
show-checkbox
|
||||
:default-expanded-keys="currCheckedKeys"
|
||||
:default-checked-keys="currCheckedKeys"
|
||||
@check-change="handleCheckChange"
|
||||
@check="onCheckChange">
|
||||
</el-tree>
|
||||
</div>
|
||||
@@ -171,6 +172,7 @@ export default {
|
||||
currCheckedKeys: [],
|
||||
dialog: false,
|
||||
treeList: [],
|
||||
treeArray:[],
|
||||
treeObj: {
|
||||
checkedKeys: [],
|
||||
},
|
||||
@@ -209,6 +211,7 @@ export default {
|
||||
this.treeObj.checkedKeys = [];
|
||||
this.instance.post(`/app/appgirdinfo/listAll3`, null, null).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.treeArray = res.data
|
||||
this.form.girdInfoList.map((e) => {
|
||||
this.treeObj.checkedKeys.push(e.id);
|
||||
});
|
||||
@@ -238,7 +241,12 @@ export default {
|
||||
}
|
||||
})
|
||||
if (code === 0) {
|
||||
this.form = {...data}
|
||||
this.form = {...data,girdInfoList:[]}
|
||||
this.form.fileUrl = [{
|
||||
url: data.fileUrl
|
||||
}]
|
||||
const target = this.treeArray?.find(v=>v.girdCode === data.girdCode)
|
||||
this.currCheckedKeys = [target.id]
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
@@ -247,23 +255,26 @@ export default {
|
||||
|
||||
getCheckedTree() {
|
||||
const nodes = this.$refs.treeRef.getCheckedNodes()
|
||||
console.log(nodes)
|
||||
if (!nodes.length) {
|
||||
return this.$message.error('请选择网格')
|
||||
}
|
||||
|
||||
if (nodes.length > 1) {
|
||||
return this.$message.error('不支持多选')
|
||||
}
|
||||
|
||||
this.currCheckedKeys = [nodes[0]?.id]
|
||||
this.form.girdCode = nodes[0]?.girdCode
|
||||
this.form.girdName = nodes[0]?.girdName
|
||||
this.dialog = false;
|
||||
},
|
||||
|
||||
onCheckChange(e) {
|
||||
handleCheckChange(data, checked){
|
||||
if (checked) {
|
||||
this.$refs.treeRef.setCheckedKeys([data.id])
|
||||
}
|
||||
},
|
||||
|
||||
onCheckChange(e) {
|
||||
if(e.children && e.children.length>0){
|
||||
this.$refs.treeRef.setCheckedKeys([]);
|
||||
}
|
||||
},
|
||||
|
||||
idChange(val) {
|
||||
@@ -282,14 +293,14 @@ export default {
|
||||
|
||||
async addOrUpdate() {
|
||||
try {
|
||||
const {code, data} = await this.instance.post(`/app/appshoparchives/addOrUpdate`,{
|
||||
const {code} = await this.instance.post(`/app/appshoparchives/addOrUpdate`,{
|
||||
...this.form,
|
||||
fileId:this.form.fileUrl[0]?.id,
|
||||
fileUrl:this.form.fileUrl[0]?.path,
|
||||
})
|
||||
if (code === 0) {
|
||||
this.$message.success('保存成功');
|
||||
this.form = {...data}
|
||||
this.cancel()
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
||||
@@ -7,35 +7,35 @@
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="经营者姓名" isLine :value="form.name"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="form.idNumber"></ai-info-item>
|
||||
<ai-info-item label="性别" :value="form.sex"></ai-info-item>
|
||||
<ai-info-item label="联系电话" :value="form.phone"></ai-info-item>
|
||||
<ai-info-item label="出生日期" :value="form.birthday"></ai-info-item>
|
||||
<ai-info-item label="年龄" :value="form.age"></ai-info-item>
|
||||
<ai-info-item label="经营者姓名:" isLine :value="form.name"></ai-info-item>
|
||||
<ai-info-item label="身份证号:" :value="form.idNumber"></ai-info-item>
|
||||
<ai-info-item label="性别:" :value="$dict.getLabel('sex', form.sex)"></ai-info-item>
|
||||
<ai-info-item label="联系电话:" :value="form.phone"></ai-info-item>
|
||||
<ai-info-item label="出生日期:" :value="form.birthday"></ai-info-item>
|
||||
<ai-info-item label="年龄:" :value="form.age"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="门店信息">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="门店名称" isLine :value="form.shopName"></ai-info-item>
|
||||
<ai-info-item label="门店照片" isLine>
|
||||
<ai-wrapper label-width="100px">
|
||||
<ai-info-item label="门店名称:" isLine :value="form.shopName"></ai-info-item>
|
||||
<ai-info-item label="门店照片:" isLine>
|
||||
<div class="files">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
fileType="img"
|
||||
acceptType=".jpg,.png,.jpeg,.JPG,.PNG,.JPEG"
|
||||
v-model="form.fileUrl"
|
||||
:limit="9" :disabled="true">
|
||||
:limit="1" :disabled="true">
|
||||
</ai-uploader>
|
||||
</div>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="经营类型" isLine :value="form.operatorTypes"></ai-info-item>
|
||||
<ai-info-item label="所属片区" isLine :value="form.girdName"></ai-info-item>
|
||||
<ai-info-item label="社会信用代码" isLine :value="form.creditCode"></ai-info-item>
|
||||
<ai-info-item label="门店住址" isLine :value="form.address"></ai-info-item>
|
||||
<ai-info-item label="门店描述" isLine :value="form.description"></ai-info-item>
|
||||
<ai-info-item label="经营类型:" isLine :value="$dict.getLabel('operatorType',form.operatorType)"></ai-info-item>
|
||||
<ai-info-item label="所属片区:" isLine :value="form.girdName"></ai-info-item>
|
||||
<ai-info-item label="社会信用代码:" isLine :value="form.creditCode"></ai-info-item>
|
||||
<ai-info-item label="门店住址:" isLine :value="form.address"></ai-info-item>
|
||||
<ai-info-item label="门店描述:" isLine :value="form.description"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
@@ -68,12 +68,15 @@ export default {
|
||||
girdName: '',
|
||||
address: '',
|
||||
description: '',
|
||||
fileUrl:[]
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getDetail()
|
||||
this.$dict.load('sex','operatorType').then(()=>{
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -81,11 +84,14 @@ export default {
|
||||
try {
|
||||
const {code, data} = await this.instance.post('/app/appshoparchives/queryDetailById', null, {
|
||||
params: {
|
||||
id: this.parmas.id
|
||||
id: this.params.id
|
||||
}
|
||||
})
|
||||
if (code === 0) {
|
||||
this.form = {...data}
|
||||
this.form.fileUrl = [{
|
||||
url: data.fileUrl
|
||||
}]
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
<div>
|
||||
<ai-list class="app-archives-list">
|
||||
<template slot="title">
|
||||
<ai-title title="门店档案" isShowBottomBorder v-model="search.girdCode" isShowArea :hideLevel="hideLevel - 1"
|
||||
@change="search.current = 1, getList()"></ai-title>
|
||||
<ai-title title="门店档案" isShowBottomBorder></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
<el-input placeholder="请输入门店名称" v-model="search.shopName" size="small" clearable></el-input>
|
||||
<ai-select
|
||||
v-model="search.isOrNotMan"
|
||||
@change="(search.current = 1), getList()"
|
||||
@@ -45,16 +43,21 @@
|
||||
placeholder="经营类型"
|
||||
:selectList="$dict.getDict('operatorType')">
|
||||
</ai-select>
|
||||
<el-input disabled v-model="search.girdName" size="small" placeholder="请选择片区">
|
||||
<template slot="append">
|
||||
<el-button size="small" @click="district=true">选择片区</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.createUserName"
|
||||
v-model="search.shopName"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入身份证、姓名、联系电话"
|
||||
placeholder="请输入门店名称、姓名、联系电话"
|
||||
clearable
|
||||
@clear="search.current = 1, search.createUserName = '', getList()"
|
||||
@clear="search.current = 1, search.shopName = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
@@ -65,11 +68,12 @@
|
||||
<el-button icon="iconfont iconDelete" :disabled="!ids.length" @click="handleDelBatch">删除</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<ai-import :instance="instance" :dict="dict" type="appintegraluser" name="门店档案"
|
||||
<ai-import :instance="instance" url=""
|
||||
importUrl="" name="门店档案" title="门店档案"
|
||||
@success="getList()">
|
||||
<el-button icon="iconfont iconImport">导入</el-button>
|
||||
</ai-import>
|
||||
<ai-download :instance="instance" url="/app/appintegraluser/girdIntegralExport" :params="search"
|
||||
<ai-download :instance="instance" url="" :params="search"
|
||||
fileName="门店档案"
|
||||
:disabled="tableData.length == 0">
|
||||
</ai-download>
|
||||
@@ -89,13 +93,18 @@
|
||||
slot="pic"
|
||||
align="left">
|
||||
<template v-slot="{ row }">
|
||||
<img :src="row.picUrl" alt="" v-viewer>
|
||||
<img class="preview-img" v-if="row.fileUrl" :src="row.fileUrl" alt="" v-viewer>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="经营类型" slot="operatorType" align="center">
|
||||
<template v-slot="{row}">
|
||||
<span>{{$dict.getLabel('operatorType',row.operatorType)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="门店评分" slot="mark" align="center">
|
||||
<template v-slot="{row}">
|
||||
<el-rate :value="4" show-score text-color="#ff9900" disabled></el-rate>
|
||||
<el-rate :value="row.storeScore" show-score text-color="#ff9900" disabled></el-rate>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -118,12 +127,30 @@
|
||||
width="720px">
|
||||
<img :src="qrSrc" class="qr-img" alt="">
|
||||
</ai-dialog>
|
||||
|
||||
<ai-dialog title="选择片区" :visible.sync="district" :customFooter="true" border width="720px">
|
||||
<div class="grid">
|
||||
<el-tree
|
||||
:data="treeList"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
ref="treeRef"
|
||||
:check-strictly="true"
|
||||
show-checkbox
|
||||
:default-expanded-keys="currCheckedKeys"
|
||||
:default-checked-keys="currCheckedKeys"
|
||||
@check="onCheckChange">
|
||||
</el-tree>
|
||||
</div>
|
||||
<div class="dialog-footer" slot="footer">
|
||||
<el-button size="medium" @click="district=false">取消</el-button>
|
||||
<el-button type="primary" size="medium" @click="getCheckedTree">确认</el-button>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {MessageBox} from 'element-ui'
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'List',
|
||||
@@ -138,6 +165,9 @@ export default {
|
||||
girdCode: '',
|
||||
current: 1,
|
||||
size: 10,
|
||||
girdCode:'',
|
||||
girdName:'',
|
||||
girdInfoList:[]
|
||||
},
|
||||
ids: [],
|
||||
userList: [],
|
||||
@@ -151,37 +181,83 @@ export default {
|
||||
{prop: 'phone', label: '联系电话', align: 'center'},
|
||||
{prop: 'createTime', label: '录入时间', align: 'center'},
|
||||
{prop: 'address', label: '门店地址', align: 'center'},
|
||||
{prop: 'operatorTypes', label: '经营类型', align: 'center'},
|
||||
{slot: 'operatorType'},
|
||||
{slot: 'mark', align: 'center'}
|
||||
],
|
||||
tableData: [],
|
||||
dateList: [],
|
||||
dialog: false,
|
||||
qrSrc: ''
|
||||
district: false,
|
||||
qrSrc: '',
|
||||
currCheckedKeys: [],
|
||||
treeList: [],
|
||||
treeObj: {
|
||||
checkedKeys: [],
|
||||
},
|
||||
defaultExpandedKeys: [],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "girdName",
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
hideLevel() {
|
||||
return this.user.info.areaList.length || 0
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.$dict.load('yesOrNo', 'storeLevel', 'operatorType').then(() => {
|
||||
this.getList()
|
||||
this.beforeSelectTree()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
onCheckChange(){
|
||||
|
||||
},
|
||||
|
||||
beforeSelectTree() {
|
||||
this.treeObj.checkedKeys = [];
|
||||
this.instance.post(`/app/appgirdinfo/listAll3`, null, null).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.search.girdInfoList.map((e) => {
|
||||
this.treeObj.checkedKeys.push(e.id);
|
||||
});
|
||||
|
||||
this.treeList = res.data.filter(e => !e.parentGirdId)
|
||||
const parentGirdId = this.treeList[0].id
|
||||
|
||||
this.treeList.map(p => this.addChild(p, res.data.map(v => {
|
||||
if (v.id === parentGirdId) {
|
||||
this.defaultExpandedKeys.push(v.id)
|
||||
}
|
||||
|
||||
return {
|
||||
...v
|
||||
}
|
||||
}), {
|
||||
parent: 'parentGirdId'
|
||||
}))
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleSelectionChange(e) {
|
||||
this.ids = e.map(v=>v.id)
|
||||
},
|
||||
|
||||
getCheckedTree() {
|
||||
const nodes = this.$refs.treeRef.getCheckedNodes()
|
||||
|
||||
if (nodes.length > 1) {
|
||||
return this.$message.error('不支持多选')
|
||||
}
|
||||
|
||||
this.currCheckedKeys = [nodes[0]?.id]
|
||||
this.search.girdCode = nodes[0]?.girdCode
|
||||
this.search.girdName = nodes[0]?.girdName
|
||||
this.district = false;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
handleAdd() {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
@@ -190,19 +266,21 @@ export default {
|
||||
},
|
||||
|
||||
async handleDelBatch() {
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/appshoparchives/delete', null, {
|
||||
params: {
|
||||
ids: this.ids.join(',')
|
||||
this.$confirm('确定删除该数据?').then(async ()=>{
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/appshoparchives/delete', null, {
|
||||
params: {
|
||||
ids: this.ids.join(',')
|
||||
}
|
||||
})
|
||||
if (code === 0) {
|
||||
this.$message.success('删除成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
if (code === 0) {
|
||||
this.$message.success('删除成功')
|
||||
this.getList()
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onGridChange(e) {
|
||||
@@ -257,7 +335,7 @@ export default {
|
||||
this.$confirm('确定删除该数据?').then(async () => {
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/appshoparchives/delete', null, {
|
||||
params: {id}
|
||||
params: {ids:id}
|
||||
})
|
||||
if (code === 0) {
|
||||
this.$message.success("删除成功")
|
||||
@@ -304,5 +382,11 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.preview-img{
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -9,21 +9,21 @@
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="门店名称" :value="info.shopName"></ai-info-item>
|
||||
<ai-info-item label="门店地址" :value="info.address"></ai-info-item>
|
||||
<ai-info-item label="经营者姓名" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="联系电话" :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="评价人" :value="info.girdName"></ai-info-item>
|
||||
<ai-info-item label="评价人电话" :value="info.auditTime"></ai-info-item>
|
||||
<ai-info-item label="评价时间" :value="info.auditTime"></ai-info-item>
|
||||
<ai-info-item label="评价人类型" :value="info.auditTime"></ai-info-item>
|
||||
<ai-info-item label="评价类型" isLine :value="info.auditTime"></ai-info-item>
|
||||
<ai-info-item label="评语" isLine :value="info.auditTime"></ai-info-item>
|
||||
<ai-info-item label="现场图片" isLine :value="info.auditTime">
|
||||
<ai-info-item label="经营者姓名" :value="info.shopPerson"></ai-info-item>
|
||||
<ai-info-item label="联系电话" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="评价人" :value="info.evaluator"></ai-info-item>
|
||||
<ai-info-item label="评价人电话" :value="info.evaluatorPhone"></ai-info-item>
|
||||
<ai-info-item label="评价时间" :value="info.evaluationTime"></ai-info-item>
|
||||
<ai-info-item label="评价人类型" :value="$dict.getLabel('evaluatorType',info.evaluatorType)"></ai-info-item>
|
||||
<ai-info-item label="评价类型" isLine :value="info.assessType"></ai-info-item>
|
||||
<ai-info-item label="评语" isLine :value="info.remark"></ai-info-item>
|
||||
<ai-info-item label="现场图片" isLine>
|
||||
<div class="files">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
fileType="img"
|
||||
v-model="info.fileList"
|
||||
acceptType=".jpg,.png,.jpeg,.JPG,.PNG,.JPEG"
|
||||
v-model="info.images"
|
||||
:limit="9" :disabled="true">
|
||||
</ai-uploader>
|
||||
</div>
|
||||
@@ -61,7 +61,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
info: {
|
||||
fileList:[]
|
||||
},
|
||||
tableData1:[],
|
||||
colConfigs1:[
|
||||
{ prop: 'integralUserName', label: '清单类型', align: 'center' },
|
||||
@@ -78,8 +80,10 @@ export default {
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getDetail()
|
||||
this.getScoredetail()
|
||||
this.$dict.load('evaluatorType').then(()=>{
|
||||
this.getDetail()
|
||||
this.getScoredetail()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -87,11 +91,11 @@ export default {
|
||||
try {
|
||||
const {code,data} = await this.instance.post('/app/appscoredetails/queryDetailById',null,{
|
||||
params:{
|
||||
id:this.params.id
|
||||
id:this.params.shopId
|
||||
}
|
||||
})
|
||||
if(code===0){
|
||||
console.log('data',data)
|
||||
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
@@ -107,6 +111,11 @@ export default {
|
||||
})
|
||||
if(code===0){
|
||||
this.info = data
|
||||
this.info.fileList = data.pictureUrl?.split(',')?.map(item=>{
|
||||
return {
|
||||
url:item
|
||||
}
|
||||
})
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
<el-input placeholder="请输入门店名称" size="small" clearable></el-input>
|
||||
<ai-select
|
||||
v-model="search.shopName"
|
||||
v-model="search.evaluatorType"
|
||||
@change="(search.current = 1), getList()"
|
||||
placeholder="评价人员类型"
|
||||
:selectList="[]">
|
||||
:selectList="$dict.getDict('evaluatorType')">
|
||||
</ai-select>
|
||||
<ai-search label="评价时间">
|
||||
<el-date-picker
|
||||
@@ -46,13 +45,13 @@
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.createUserName"
|
||||
v-model="search.shopName"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入身份证、姓名、联系电话"
|
||||
placeholder="请输入门店名称、姓名、联系电话"
|
||||
clearable
|
||||
@clear="search.current = 1, search.createUserName = '', getList()"
|
||||
@clear="search.current = 1, search.shopName = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
@@ -114,8 +113,11 @@ export default {
|
||||
{ prop: 'shopName', label: '门店名称', align: 'center' },
|
||||
{ prop: 'evaluator', label: '评价人', align: 'center' },
|
||||
{ prop: 'evaluationTime', label: '评价时间', align: 'center' },
|
||||
{ prop: 'evaluatorPhone', label: '联系电话', align: 'center' },
|
||||
{ prop: 'evaluatorType', label: '评价人类型', align: 'center'},
|
||||
{ prop: 'phone', label: '联系电话', align: 'center' },
|
||||
{ prop: 'evaluatorType', label: '评价人类型', align: 'center',render: (h, {row}) => {
|
||||
return h('span', {
|
||||
}, this.dict.getLabel('evaluatorType', row.evaluatorType))
|
||||
}},
|
||||
{ prop: 'assessType', label: '评价类型', align: 'center' },
|
||||
{ prop: 'address', label: '门店地址', align: 'center' },
|
||||
{ prop: 'score', label: '分数', align: 'center' },
|
||||
@@ -124,17 +126,9 @@ export default {
|
||||
dateList: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
hideLevel () {
|
||||
return this.user.info.areaList?.length || 0
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.$dict.load().then(() => {
|
||||
this.$dict.load('evaluatorType').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
@@ -164,11 +158,12 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
toDetail ({id}) {
|
||||
toDetail ({id,shopId}) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
id: id || '',
|
||||
shopId:shopId || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -209,7 +209,6 @@ export default {
|
||||
.app-ark-static {
|
||||
height: 100%;
|
||||
background: #F3F6F9;
|
||||
overflow: auto;
|
||||
|
||||
.card_list {
|
||||
display: flex;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd">评选任务</el-button>
|
||||
<ai-search label="开始时间">
|
||||
<el-date-picker
|
||||
v-model="search.createTimeStart"
|
||||
v-model="search.startTime"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
@@ -17,7 +17,7 @@
|
||||
</ai-search>
|
||||
<ai-search label="结束时间">
|
||||
<el-date-picker
|
||||
v-model="search.createTimeStart"
|
||||
v-model="search.endTime"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
@@ -28,13 +28,13 @@
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.createUserName"
|
||||
v-model="search.taskName"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入任务名称"
|
||||
clearable
|
||||
@clear="search.current = 1, search.createUserName = '', getList()"
|
||||
@clear="search.current = 1, search.taskName = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
@@ -48,33 +48,25 @@
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
|
||||
<el-table-column
|
||||
label="状态"
|
||||
slot="state">
|
||||
<template v-slot="{ row }">
|
||||
<span class="start">启用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column slot="options" width="180px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text">详情</el-button>
|
||||
<el-button type="text">删除</el-button>
|
||||
<el-button type="text" @click="handleDetail(row)">详情</el-button>
|
||||
<el-button type="text" @click="handleDelete(row)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog title="评分规则" :visible.sync="dialog" width="800px">
|
||||
<el-form ref="formRef" :model="form" label-width="120px">
|
||||
<el-form-item label="事件类型:">
|
||||
<el-input v-model="form.type" clearable placeholder="请输入任务名称" size="small"></el-input>
|
||||
<ai-dialog title="评分规则" :visible.sync="dialog" width="800px" @closed="onClosed" @confirm="onConfirm">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="任务名称:" prop="taskName">
|
||||
<el-input v-model="form.taskName" clearable placeholder="请输入任务名称" size="small"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务开始时间:">
|
||||
<el-form-item label="任务开始时间:" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="form.createTimeStart"
|
||||
v-model="form.startTime"
|
||||
type="date"
|
||||
size="small"
|
||||
clearable
|
||||
@@ -83,9 +75,9 @@
|
||||
placeholder="选择开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务结束时间:">
|
||||
<el-form-item label="任务结束时间:" prop="endTime">
|
||||
<el-date-picker
|
||||
v-model="form.createTimeStart"
|
||||
v-model="form.endTime"
|
||||
type="date"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@@ -94,9 +86,9 @@
|
||||
placeholder="选择开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布人:">佩奇</el-form-item>
|
||||
<el-form-item label="任务描述:">
|
||||
<el-input v-model="form.desc" clearable placeholder="请输入任务描述" type="textarea" :rows="3" show-word-limit :maxlength="200"></el-input>
|
||||
<el-form-item label="发布人:">{{user.info && user.info.name}}</el-form-item>
|
||||
<el-form-item label="任务描述:" prop="taskDescription">
|
||||
<el-input v-model="form.taskDescription" clearable placeholder="请输入任务描述" type="textarea" :rows="3" show-word-limit :maxlength="200"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
@@ -104,28 +96,110 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
export default {
|
||||
name: "AppraiseTask",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search:{},
|
||||
search:{
|
||||
taskName:'',
|
||||
startTime:'',
|
||||
endTime:'',
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{type: "selection"},
|
||||
{ prop: 'integralUserName', label: '任务名称', align: 'center' },
|
||||
{ prop: 'areaName', label: '发布人', align: 'center' },
|
||||
{ prop: 'girdName', label: '发布时间', align: 'center' },
|
||||
{ prop: 'createTime', label: '任务发布时间', align: 'center' },
|
||||
{ prop: 'createTime', label: '任务结束时间', align: 'center' },
|
||||
{ prop: 'taskName', label: '任务名称', align: 'center' },
|
||||
{ prop: 'userName', label: '发布人', align: 'center' },
|
||||
{ prop: 'releaswTime', label: '发布时间', align: 'center' },
|
||||
{ prop: 'startTime', label: '任务开始时间', align: 'center' },
|
||||
{ prop: 'endTime', label: '任务结束时间', align: 'center' },
|
||||
],
|
||||
tableData: [],
|
||||
dialog:false,
|
||||
form:{}
|
||||
form:{},
|
||||
rules:{
|
||||
taskName:[ { required: true, message: '请输入任务名称', trigger: 'blur' }],
|
||||
startTime:[ { required: true, message: '请选择开始时间', trigger: 'change' }],
|
||||
endTime:[ { required: true, message: '请选择结束时间', trigger: 'change' }],
|
||||
taskDescription:[ { required: true, message: '请输入任务描述', trigger: 'blur' }],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
|
||||
computed:{
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
onConfirm(){
|
||||
this.$refs['formRef'].validate(async valid=>{
|
||||
if(valid){
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/apptaskmanage/addOrUpdate',null,{
|
||||
params:{
|
||||
...form
|
||||
}
|
||||
})
|
||||
if(code===0){
|
||||
this.$message.success('保存成功')
|
||||
this.getList()
|
||||
}
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
onClosed(){
|
||||
this.form = {}
|
||||
this.$refs['formRef'].resetFields()
|
||||
},
|
||||
|
||||
handleDetail(row){
|
||||
this.form = {...row}
|
||||
this.dialog = true
|
||||
},
|
||||
|
||||
handleDelete({id}){
|
||||
this.$confirm("是否确定要删除此数据?").then(async ()=>{
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/apptaskmanage/delete',null,{
|
||||
params:{ids:id}
|
||||
})
|
||||
if(code===0){
|
||||
this.$message.success('删除成功')
|
||||
this.getList()
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async getList(){
|
||||
try {
|
||||
const {code,data} = await this.instance.post('/app/apptaskmanage/list')
|
||||
if(code===0){
|
||||
this.tableData = data.records
|
||||
this.total = data.total
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.dialog = true
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd">添加</el-button>
|
||||
<ai-select
|
||||
v-model="search.applyItemId"
|
||||
v-model="search.type"
|
||||
@change="(search.current = 1), getList()"
|
||||
placeholder="请选择事件类型"
|
||||
:selectList="dictList">
|
||||
:selectList="$dict.getDict('shopScoreType')">
|
||||
</ai-select>
|
||||
<ai-select
|
||||
v-model="search.applyItemId"
|
||||
@@ -25,16 +25,10 @@
|
||||
:selectList="dictList">
|
||||
</ai-select>
|
||||
<ai-select
|
||||
v-model="search.applyItemId"
|
||||
v-model="search.status"
|
||||
@change="(search.current = 1), getList()"
|
||||
placeholder="请选择状态"
|
||||
:selectList="dictList">
|
||||
</ai-select>
|
||||
<ai-select
|
||||
v-model="search.applyItemId"
|
||||
@change="(search.current = 1), getList()"
|
||||
placeholder="有效地区"
|
||||
:selectList="dictList">
|
||||
:selectList="$dict.getDict('shopScoreEvent')">
|
||||
</ai-select>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
@@ -48,44 +42,52 @@
|
||||
@getList="getList">
|
||||
|
||||
<el-table-column
|
||||
label="状态"
|
||||
slot="state">
|
||||
label="分值"
|
||||
slot="score">
|
||||
<template v-slot="{ row }">
|
||||
<span class="start">启用</span>
|
||||
<span>{{row.score === 0 ? 0 : row.score > 0 ? `+${row.score}` : row.score}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
slot="status">
|
||||
<template v-slot="{ row }">
|
||||
<span class="start" v-if="row.status==='1'">启用</span>
|
||||
<span class="stop" v-else>停用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column slot="options" width="180px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text">停用</el-button>
|
||||
<el-button type="text">编辑</el-button>
|
||||
<el-button type="text">删除</el-button>
|
||||
<el-button type="text" @click="changeState(row)">{{row.status === '1' ? '停用' : '启用'}}</el-button>
|
||||
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog title="评分规则" :visible.sync="dialog" width="800px">
|
||||
<el-form ref="formRef" :model="form" label-width="120px">
|
||||
<el-form-item label="事件类型:">
|
||||
<ai-dialog title="评分规则" :visible.sync="dialog" width="800px" @closed="onClosed" @onConfirm="onConfirm">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="事件类型:" prop="type">
|
||||
<ai-select
|
||||
v-model="form.applyItemId"
|
||||
v-model="form.type"
|
||||
placeholder="请选择事件类型"
|
||||
:selectList="dictList">
|
||||
:selectList="$dict.getDict('shopScoreType')">
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="自定义事件:">
|
||||
<ai-select
|
||||
v-model="form.applyItemId"
|
||||
v-model="form.status"
|
||||
placeholder="请选择自定义事件"
|
||||
:selectList="dictList">
|
||||
:selectList="$dict.getDict('shopScoreEvent')">
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规则:">常规</el-form-item>
|
||||
<el-form-item label="分值:">
|
||||
<el-input v-model="form.num" size="small" placeholder="请输入分值"></el-input>
|
||||
<el-form-item label="分值:" prop="score">
|
||||
<el-input-number v-model="form.score" size="small" placeholder="请输入分值"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
@@ -96,52 +98,163 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "RuleManage",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search:{},
|
||||
search:{
|
||||
type:'',
|
||||
status:'',
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
dictList:[],
|
||||
cardList: [
|
||||
{
|
||||
label: '规则总数量',
|
||||
value: 122
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '正向事件规则项',
|
||||
value: 122
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '正向事件总分数',
|
||||
value: 122
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '负向事件规则项',
|
||||
value: 122
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '负向事件总分数',
|
||||
value: 122
|
||||
value: 0
|
||||
},
|
||||
],
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{type: "selection"},
|
||||
{ prop: 'integralUserName', label: '类型', align: 'center' },
|
||||
{ prop: 'type', label: '类型', align: 'center' },
|
||||
{ prop: 'areaName', label: '事件', align: 'center' },
|
||||
{ prop: 'girdName', label: '规则', align: 'center' },
|
||||
{ prop: 'createTime', label: '分值', align: 'center' },
|
||||
{ slot: 'state', label: '状态', align: 'center' },
|
||||
{ prop: 'rule', label: '规则', align: 'center' },
|
||||
{ slot: 'score' },
|
||||
{ slot: 'status'},
|
||||
],
|
||||
tableData: [],
|
||||
dialog:false,
|
||||
form:{}
|
||||
form:{
|
||||
id:null,
|
||||
type:'',
|
||||
score:''
|
||||
},
|
||||
rules:{
|
||||
type:[{ required: true, message: '请选择事件类型', trigger: 'change' },],
|
||||
score:[{ required: true, message: '请输入分值', trigger: 'blur' },],
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created(){
|
||||
this.$dict.load('shopScoreType','shopScoreEvent').then(()=>{
|
||||
this.getStatic()
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
onConfirm(){
|
||||
this.$refs['formRef'].validate(async valid=>{
|
||||
if(valid){
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/appscorerules/addOrUpdate')
|
||||
if(code===0){
|
||||
this.$message.success('保存成功')
|
||||
this.getList()
|
||||
this.getStatic()
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onClosed(){
|
||||
this.form = {
|
||||
type:'',
|
||||
score:''
|
||||
}
|
||||
this.$refs['formRef'].resetFields()
|
||||
},
|
||||
async changeState({id,status}){
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/appscorerules/isOrNotEnableById',null,{
|
||||
params:{id}
|
||||
})
|
||||
if(code===0){
|
||||
this.$message.success(status === '1' ? '停用成功' :'启用成功')
|
||||
this.getStatic()
|
||||
this.getList()
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
|
||||
handleEdit(row){
|
||||
this.form = {...row}
|
||||
this.dialog = true
|
||||
},
|
||||
|
||||
handleDelete({id}){
|
||||
this.$confirm("是否要删除此数据?").then(
|
||||
async ()=>{
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/appscorerules/delete',null,{
|
||||
params:{ids:id}
|
||||
})
|
||||
if(code===0){
|
||||
this.$message.success('删除成功')
|
||||
this.getStatic()
|
||||
this.getList()
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
handleAdd(){
|
||||
this.dialog = true
|
||||
},
|
||||
getList() {
|
||||
|
||||
async getStatic() {
|
||||
try {
|
||||
const {code,data} = await this.instance.post('/app/appscorerules/queryAppScoreRulesCount')
|
||||
if(code===0){
|
||||
const array = ['rulesCount','positiveCount','positiveScore','negativeCount','negativeScore']
|
||||
array.forEach((item,index)=>{
|
||||
this.cardList[index].value = data[item]
|
||||
})
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
|
||||
async getList(){
|
||||
try {
|
||||
const {code,data} = await this.instance.post('/app/appscorerules/list')
|
||||
if(code===0){
|
||||
this.tableData = data.records
|
||||
this.total = data.total
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -185,18 +298,18 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.start{
|
||||
font-size: 14px;
|
||||
color: #2EA222;
|
||||
}
|
||||
|
||||
.stop{
|
||||
font-size: 14px;
|
||||
color: #FF4466;
|
||||
}
|
||||
|
||||
.card:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.start){
|
||||
font-size: 14px;
|
||||
color: #2EA222;
|
||||
}
|
||||
|
||||
:deep(.stop){
|
||||
font-size: 14px;
|
||||
color: #FF4466;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user