|
@@ -5,11 +5,14 @@
|
|
|
<el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
|
|
<el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
|
|
|
<el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
|
|
<el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small" icon="el-icon-search" class="filter-item">高级查询
|
|
|
|
|
|
|
+ <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
|
|
|
|
|
+ icon="el-icon-search" class="filter-item">高级查询
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
|
|
|
|
|
|
|
+ <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
|
|
|
|
|
+ icon="el-icon-sort" class="filter-item">排序
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button @click="$router.push({path:'/storeInfo',query:{column:$route.query.column}})" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
|
|
|
|
|
|
|
+ <el-button @click="$router.push({path:'/storeInfo',query:{column:$route.query.column}})" type="primary"
|
|
|
|
|
+ size="small" icon="el-icon-edit" class="filter-item">添加
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
|
|
<el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -33,7 +36,8 @@
|
|
|
<el-table-column v-if="isColumnShow('storeName')" prop="storeName" label="店铺名称" min-width="100">
|
|
<el-table-column v-if="isColumnShow('storeName')" prop="storeName" label="店铺名称" min-width="100">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column v-if="isColumnShow('serviceType')" prop="serviceType" label="服务类型" :formatter="ServiceTypeFormatter" min-width="100">
|
|
|
|
|
|
|
+ <el-table-column v-if="isColumnShow('serviceType')" prop="serviceType" label="服务类型"
|
|
|
|
|
+ :formatter="ServiceTypeFormatter" min-width="100">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<!--
|
|
<!--
|
|
|
<el-table-column v-if="isColumnShow('subclass')" prop="subclass" label="服务小类" :formatter="ServiceTypeDetailFormatter" min-width="100">
|
|
<el-table-column v-if="isColumnShow('subclass')" prop="subclass" label="服务小类" :formatter="ServiceTypeDetailFormatter" min-width="100">
|
|
@@ -44,7 +48,8 @@
|
|
|
|
|
|
|
|
<el-table-column v-if="isColumnShow('icon')" prop="icon" label="头像" min-width="100">
|
|
<el-table-column v-if="isColumnShow('icon')" prop="icon" label="头像" min-width="100">
|
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
|
- <img :src="row.icon" @click="showImg(row.icon)" style="width: 100px;height: 100px;vertical-align: middle;" />
|
|
|
|
|
|
|
+ <img :src="row.icon" @click="showImg(row.icon)"
|
|
|
|
|
+ style="width: 100px;height: 100px;vertical-align: middle;"/>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -64,13 +69,16 @@
|
|
|
<el-table-column v-if="isColumnShow('rank')" prop="rank" label="排序" min-width="100">
|
|
<el-table-column v-if="isColumnShow('rank')" prop="rank" label="排序" min-width="100">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column v-if="isColumnShow('hotFlag')" prop="hotFlag" label="热门" :formatter="YNFormatter" min-width="100">
|
|
|
|
|
|
|
+ <el-table-column v-if="isColumnShow('hotFlag')" prop="hotFlag" label="热门" :formatter="YNFormatter"
|
|
|
|
|
+ min-width="100">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column v-if="isColumnShow('homeFlag')" prop="homeFlag" label="首页" :formatter="YNFormatter" min-width="100">
|
|
|
|
|
|
|
+ <el-table-column v-if="isColumnShow('homeFlag')" prop="homeFlag" label="首页" :formatter="YNFormatter"
|
|
|
|
|
+ min-width="100">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column v-if="isColumnShow('typeFlag')" prop="typeFlag" label="类型" :formatter="TypeFlagFormatter" min-width="100">
|
|
|
|
|
|
|
+ <el-table-column v-if="isColumnShow('typeFlag')" prop="typeFlag" label="类型" :formatter="TypeFlagFormatter"
|
|
|
|
|
+ min-width="100">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column v-if="isColumnShow('province')" prop="province" label="省" min-width="100">
|
|
<el-table-column v-if="isColumnShow('province')" prop="province" label="省" min-width="100">
|
|
@@ -103,8 +111,12 @@
|
|
|
<el-table-column label="操作" align="center" fixed="right" min-width="150">
|
|
<el-table-column label="操作" align="center" fixed="right" min-width="150">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
|
|
<el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
|
|
|
- <el-button @click="updateRow(scope.row,'N')" v-if="scope.row.useFlag=='Y'" type="danger" size="mini" plain>下架</el-button>
|
|
|
|
|
- <el-button @click="updateRow(scope.row,'Y')" v-if="scope.row.useFlag=='N'" type="success" size="mini" plain>上架</el-button>
|
|
|
|
|
|
|
+ <el-button @click="updateRow(scope.row,'N')" v-if="scope.row.useFlag=='Y'" type="danger" size="mini"
|
|
|
|
|
+ plain>下架
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button @click="updateRow(scope.row,'Y')" v-if="scope.row.useFlag=='N'" type="success"
|
|
|
|
|
+ size="mini" plain>上架
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -117,7 +129,9 @@
|
|
|
<el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
|
|
<el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
|
|
|
</el-button-group>
|
|
</el-button-group>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-pagination background @size-change="pageSizeChange" @current-change="currentPageChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalNumber">
|
|
|
|
|
|
|
+ <el-pagination background @size-change="pageSizeChange" @current-change="currentPageChange"
|
|
|
|
|
+ :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize"
|
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="totalNumber">
|
|
|
</el-pagination>
|
|
</el-pagination>
|
|
|
</div>
|
|
</div>
|
|
|
<el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
|
|
<el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
|
|
@@ -138,14 +152,16 @@
|
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
|
<el-select v-model="row.name">
|
|
<el-select v-model="row.name">
|
|
|
|
|
|
|
|
- <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
|
|
|
|
|
|
+ <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
|
|
|
|
|
+ :key="item.value"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
|
|
<el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
|
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
|
<el-select v-model="row.searchMethod">
|
|
<el-select v-model="row.searchMethod">
|
|
|
- <el-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
|
|
|
|
|
|
|
+ <el-option v-for="item in searchMethods" :label="item" :value="item"
|
|
|
|
|
+ :key="item"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -175,7 +191,8 @@
|
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
|
<el-select v-model="row.name">
|
|
<el-select v-model="row.name">
|
|
|
|
|
|
|
|
- <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
|
|
|
|
|
|
+ <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
|
|
|
|
|
+ :key="item.value"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -209,508 +226,508 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import { mapState } from 'vuex'
|
|
|
|
|
-import { format } from 'date-fns'
|
|
|
|
|
-import zh from 'date-fns/locale/zh_cn'
|
|
|
|
|
|
|
+ import {mapState} from 'vuex'
|
|
|
|
|
+ import {format} from 'date-fns'
|
|
|
|
|
+ import zh from 'date-fns/locale/zh_cn'
|
|
|
|
|
|
|
|
-export default {
|
|
|
|
|
- created() {
|
|
|
|
|
|
|
+ export default {
|
|
|
|
|
+ created() {
|
|
|
|
|
|
|
|
- this.$http.get({
|
|
|
|
|
- url: '/serviceType/all'
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.success) {
|
|
|
|
|
- this.serviceTypes = res.data;
|
|
|
|
|
|
|
+ this.$http.get({
|
|
|
|
|
+ url: '/serviceType/all'
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.serviceTypes = res.data;
|
|
|
|
|
|
|
|
- this.serviceTypes.forEach(element => {
|
|
|
|
|
|
|
+ this.serviceTypes.forEach(element => {
|
|
|
|
|
|
|
|
- this.serviceTypeDetails[element.id] = element.serviceTypeDetailList
|
|
|
|
|
|
|
+ this.serviceTypeDetails[element.id] = element.serviceTypeDetailList
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- this.getData();
|
|
|
|
|
- },
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- totalNumber: 0,
|
|
|
|
|
- totalPage: 10,
|
|
|
|
|
- currentPage: 1,
|
|
|
|
|
- pageSize: 20,
|
|
|
|
|
- tableData: [],
|
|
|
|
|
- filter1: '',
|
|
|
|
|
- filter2: '',
|
|
|
|
|
- tableColumns: [
|
|
|
|
|
- {
|
|
|
|
|
- label: '用户ID',
|
|
|
|
|
- value: 'userId',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '用户',
|
|
|
|
|
- value: 'userName',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '店铺名称',
|
|
|
|
|
- value: 'storeName',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '服务类型',
|
|
|
|
|
- value: 'serviceType',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '描述',
|
|
|
|
|
- value: 'description',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '头像',
|
|
|
|
|
- value: 'icon',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '省',
|
|
|
|
|
- value: 'province',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '市',
|
|
|
|
|
- value: 'citye',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '区',
|
|
|
|
|
- value: 'district',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '详细地址',
|
|
|
|
|
- value: 'addressDetail',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '银行卡号',
|
|
|
|
|
- value: 'bankCard',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '开户行',
|
|
|
|
|
- value: 'bankName',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '开户人',
|
|
|
|
|
- value: 'openName',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '信誉等级',
|
|
|
|
|
- value: 'credit',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '可用',
|
|
|
|
|
- value: 'useFlag',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '排序',
|
|
|
|
|
- value: 'rank',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '响应时间',
|
|
|
|
|
- value: 'responseTime',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '返片率',
|
|
|
|
|
- value: 'reworkRate',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '热门',
|
|
|
|
|
- value: 'hotFlag',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '首页',
|
|
|
|
|
- value: 'homeFlag',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '类型',
|
|
|
|
|
- value: 'typeFlag',
|
|
|
|
|
- show: true
|
|
|
|
|
- },
|
|
|
|
|
- // {
|
|
|
|
|
- // label: '服务小类',
|
|
|
|
|
- // value: 'subclass',
|
|
|
|
|
- // show: true
|
|
|
|
|
- // },
|
|
|
|
|
- ],
|
|
|
|
|
- multipleMode: false,
|
|
|
|
|
- showAdvancedQueryDialog: false,
|
|
|
|
|
- advancedQueryFields: [],
|
|
|
|
|
- showTableSortDialog: false,
|
|
|
|
|
- tableSortFields: [],
|
|
|
|
|
- searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
|
|
|
|
|
- advancedQueryColumns: [
|
|
|
|
|
- {
|
|
|
|
|
- label: '用户ID',
|
|
|
|
|
- value: 'user_id'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '用户',
|
|
|
|
|
- value: 'user_name'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '店铺名称',
|
|
|
|
|
- value: 'store_name'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '服务类型',
|
|
|
|
|
- value: 'service_type'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '描述',
|
|
|
|
|
- value: 'description'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '头像',
|
|
|
|
|
- value: 'icon'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '省',
|
|
|
|
|
- value: 'province'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '市',
|
|
|
|
|
- value: 'citye'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '区',
|
|
|
|
|
- value: 'district'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '详细地址',
|
|
|
|
|
- value: 'address_detail'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '银行卡号',
|
|
|
|
|
- value: 'bank_card'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '开户行',
|
|
|
|
|
- value: 'bank_name'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '开户人',
|
|
|
|
|
- value: 'open_name'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '信誉等级',
|
|
|
|
|
- value: 'credit'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '可用',
|
|
|
|
|
- value: 'use_flag'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '排序',
|
|
|
|
|
- value: 'rank'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '响应时间',
|
|
|
|
|
- value: 'response_time'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '返片率',
|
|
|
|
|
- value: 'rework_rate'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '热门',
|
|
|
|
|
- value: 'hot_flag'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '首页',
|
|
|
|
|
- value: 'home_flag'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '类型',
|
|
|
|
|
- value: 'type_flag'
|
|
|
|
|
- },
|
|
|
|
|
- // {
|
|
|
|
|
- // label: '服务小类',
|
|
|
|
|
- // value: 'subclass'
|
|
|
|
|
- // },
|
|
|
|
|
- ],
|
|
|
|
|
- advancedQuerySearchKey: '',
|
|
|
|
|
- orderByStr: '',
|
|
|
|
|
- imgSrc: '',
|
|
|
|
|
- imageDialogVisible: false,
|
|
|
|
|
- serviceTypes: [],
|
|
|
|
|
- serviceTypeDetails: {},
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- computed: {
|
|
|
|
|
- ...mapState(['tableHeight']),
|
|
|
|
|
- selection() {
|
|
|
|
|
- return this.$refs.table.selection.map(i => i.id);
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- pageSizeChange(size) {
|
|
|
|
|
- this.currentPage = 1;
|
|
|
|
|
- this.pageSize = size;
|
|
|
|
|
- this.getData();
|
|
|
|
|
- },
|
|
|
|
|
- currentPageChange(page) {
|
|
|
|
|
- this.currentPage = page;
|
|
|
|
|
this.getData();
|
|
this.getData();
|
|
|
},
|
|
},
|
|
|
- getData() {
|
|
|
|
|
-
|
|
|
|
|
- var data = {
|
|
|
|
|
- currentPage: this.currentPage,
|
|
|
|
|
- pageNumber: this.pageSize,
|
|
|
|
|
- searchKey: this.filter1,
|
|
|
|
|
- advancedQuery: this.advancedQuerySearchKey,
|
|
|
|
|
- orderByStr: this.orderByStr,
|
|
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ totalNumber: 0,
|
|
|
|
|
+ totalPage: 10,
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ pageSize: 20,
|
|
|
|
|
+ tableData: [],
|
|
|
|
|
+ filter1: '',
|
|
|
|
|
+ filter2: '',
|
|
|
|
|
+ tableColumns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '用户ID',
|
|
|
|
|
+ value: 'userId',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '用户',
|
|
|
|
|
+ value: 'userName',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '店铺名称',
|
|
|
|
|
+ value: 'storeName',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '服务类型',
|
|
|
|
|
+ value: 'serviceType',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '描述',
|
|
|
|
|
+ value: 'description',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '头像',
|
|
|
|
|
+ value: 'icon',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '省',
|
|
|
|
|
+ value: 'province',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '市',
|
|
|
|
|
+ value: 'citye',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '区',
|
|
|
|
|
+ value: 'district',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '详细地址',
|
|
|
|
|
+ value: 'addressDetail',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '银行卡号',
|
|
|
|
|
+ value: 'bankCard',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '开户行',
|
|
|
|
|
+ value: 'bankName',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '开户人',
|
|
|
|
|
+ value: 'openName',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '信誉等级',
|
|
|
|
|
+ value: 'credit',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '可用',
|
|
|
|
|
+ value: 'useFlag',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '排序',
|
|
|
|
|
+ value: 'rank',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '响应时间',
|
|
|
|
|
+ value: 'responseTime',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '返片率',
|
|
|
|
|
+ value: 'reworkRate',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '热门',
|
|
|
|
|
+ value: 'hotFlag',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '首页',
|
|
|
|
|
+ value: 'homeFlag',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '类型',
|
|
|
|
|
+ value: 'typeFlag',
|
|
|
|
|
+ show: true
|
|
|
|
|
+ },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: '服务小类',
|
|
|
|
|
+ // value: 'subclass',
|
|
|
|
|
+ // show: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ ],
|
|
|
|
|
+ multipleMode: false,
|
|
|
|
|
+ showAdvancedQueryDialog: false,
|
|
|
|
|
+ advancedQueryFields: [],
|
|
|
|
|
+ showTableSortDialog: false,
|
|
|
|
|
+ tableSortFields: [],
|
|
|
|
|
+ searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
|
|
|
|
|
+ advancedQueryColumns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '用户ID',
|
|
|
|
|
+ value: 'user_id'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '用户',
|
|
|
|
|
+ value: 'user_name'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '店铺名称',
|
|
|
|
|
+ value: 'store_name'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '服务类型',
|
|
|
|
|
+ value: 'service_type'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '描述',
|
|
|
|
|
+ value: 'description'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '头像',
|
|
|
|
|
+ value: 'icon'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '省',
|
|
|
|
|
+ value: 'province'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '市',
|
|
|
|
|
+ value: 'citye'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '区',
|
|
|
|
|
+ value: 'district'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '详细地址',
|
|
|
|
|
+ value: 'address_detail'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '银行卡号',
|
|
|
|
|
+ value: 'bank_card'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '开户行',
|
|
|
|
|
+ value: 'bank_name'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '开户人',
|
|
|
|
|
+ value: 'open_name'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '信誉等级',
|
|
|
|
|
+ value: 'credit'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '可用',
|
|
|
|
|
+ value: 'use_flag'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '排序',
|
|
|
|
|
+ value: 'rank'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '响应时间',
|
|
|
|
|
+ value: 'response_time'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '返片率',
|
|
|
|
|
+ value: 'rework_rate'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '热门',
|
|
|
|
|
+ value: 'hot_flag'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '首页',
|
|
|
|
|
+ value: 'home_flag'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '类型',
|
|
|
|
|
+ value: 'type_flag'
|
|
|
|
|
+ },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: '服务小类',
|
|
|
|
|
+ // value: 'subclass'
|
|
|
|
|
+ // },
|
|
|
|
|
+ ],
|
|
|
|
|
+ advancedQuerySearchKey: '',
|
|
|
|
|
+ orderByStr: '',
|
|
|
|
|
+ imgSrc: '',
|
|
|
|
|
+ imageDialogVisible: false,
|
|
|
|
|
+ serviceTypes: [],
|
|
|
|
|
+ serviceTypeDetails: {},
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if (this.$route.query.column) {
|
|
|
|
|
- var tempColumn = this.$route.query.column;
|
|
|
|
|
- data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.$http.get({
|
|
|
|
|
- url: '/storeInfo/page',
|
|
|
|
|
- data: data
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.success) {
|
|
|
|
|
- this.totalNumber = res.data.page.totalNumber;
|
|
|
|
|
- this.tableData = res.data.pp;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
},
|
|
},
|
|
|
- isColumnShow(column) {
|
|
|
|
|
- var row = this.tableColumns.find(i => i.value === column);
|
|
|
|
|
- return row ? row.show : false;
|
|
|
|
|
- },
|
|
|
|
|
- toggleMultipleMode(multipleMode) {
|
|
|
|
|
- this.multipleMode = multipleMode;
|
|
|
|
|
- if (!multipleMode) {
|
|
|
|
|
- this.$refs.table.clearSelection();
|
|
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapState(['tableHeight']),
|
|
|
|
|
+ selection() {
|
|
|
|
|
+ return this.$refs.table.selection.map(i => i.id);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- editRow(row) {
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/storeInfo',
|
|
|
|
|
- query: {
|
|
|
|
|
- id: row.id,
|
|
|
|
|
- column: this.$route.query.column,
|
|
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ pageSizeChange(size) {
|
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
|
+ this.pageSize = size;
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ },
|
|
|
|
|
+ currentPageChange(page) {
|
|
|
|
|
+ this.currentPage = page;
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ },
|
|
|
|
|
+ getData() {
|
|
|
|
|
+
|
|
|
|
|
+ var data = {
|
|
|
|
|
+ currentPage: this.currentPage,
|
|
|
|
|
+ pageNumber: this.pageSize,
|
|
|
|
|
+ searchKey: this.filter1,
|
|
|
|
|
+ advancedQuery: this.advancedQuerySearchKey,
|
|
|
|
|
+ orderByStr: this.orderByStr,
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- updateRow(row, useFlag) {
|
|
|
|
|
- this.$http.post({
|
|
|
|
|
- url: '/storeInfo/update',
|
|
|
|
|
- data: {
|
|
|
|
|
- id: row.id,
|
|
|
|
|
- useFlag: useFlag
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (this.$route.query.column) {
|
|
|
|
|
+ var tempColumn = this.$route.query.column;
|
|
|
|
|
+ data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
|
|
|
}
|
|
}
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.success) {
|
|
|
|
|
- this.$message.success('操作成功');
|
|
|
|
|
- this.getData()
|
|
|
|
|
|
|
+
|
|
|
|
|
+ this.$http.get({
|
|
|
|
|
+ url: '/storeInfo/page',
|
|
|
|
|
+ data: data
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.totalNumber = res.data.page.totalNumber;
|
|
|
|
|
+ this.tableData = res.data.pp;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ isColumnShow(column) {
|
|
|
|
|
+ var row = this.tableColumns.find(i => i.value === column);
|
|
|
|
|
+ return row ? row.show : false;
|
|
|
|
|
+ },
|
|
|
|
|
+ toggleMultipleMode(multipleMode) {
|
|
|
|
|
+ this.multipleMode = multipleMode;
|
|
|
|
|
+ if (!multipleMode) {
|
|
|
|
|
+ this.$refs.table.clearSelection();
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- operation1() {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: this.selection
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- operation2() {
|
|
|
|
|
- this.$message('操作2');
|
|
|
|
|
- },
|
|
|
|
|
- addField() {
|
|
|
|
|
- this.advancedQueryFields.push({
|
|
|
|
|
- link: 'AND',
|
|
|
|
|
- name: '',
|
|
|
|
|
- searchMethod: '=',
|
|
|
|
|
- value: '',
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- removeField(i) {
|
|
|
|
|
- if (this.advancedQueryFields.length > 0) {
|
|
|
|
|
- this.advancedQueryFields.splice(i, 1);
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- advancedQuery() {
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ editRow(row) {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/storeInfo',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ column: this.$route.query.column,
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ updateRow(row, useFlag) {
|
|
|
|
|
+ this.$http.post({
|
|
|
|
|
+ url: '/storeInfo/update',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ useFlag: useFlag
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.$message.success('操作成功');
|
|
|
|
|
+ this.getData()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ operation1() {
|
|
|
|
|
+ this.$notify({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ message: this.selection
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ operation2() {
|
|
|
|
|
+ this.$message('操作2');
|
|
|
|
|
+ },
|
|
|
|
|
+ addField() {
|
|
|
|
|
+ this.advancedQueryFields.push({
|
|
|
|
|
+ link: 'AND',
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ searchMethod: '=',
|
|
|
|
|
+ value: '',
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ removeField(i) {
|
|
|
|
|
+ if (this.advancedQueryFields.length > 0) {
|
|
|
|
|
+ this.advancedQueryFields.splice(i, 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ advancedQuery() {
|
|
|
|
|
|
|
|
- this.advancedQuerySearchKey = '';
|
|
|
|
|
|
|
+ this.advancedQuerySearchKey = '';
|
|
|
|
|
|
|
|
- if (this.advancedQueryFields.length > 0) {
|
|
|
|
|
|
|
+ if (this.advancedQueryFields.length > 0) {
|
|
|
|
|
|
|
|
- var templist = [];
|
|
|
|
|
|
|
+ var templist = [];
|
|
|
|
|
|
|
|
- this.advancedQueryFields.forEach(item => {
|
|
|
|
|
- if (item.link && item.name && item.searchMethod && item.value) {
|
|
|
|
|
- var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
|
|
|
|
|
- templist.push(tempItem);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.advancedQueryFields.forEach(item => {
|
|
|
|
|
+ if (item.link && item.name && item.searchMethod && item.value) {
|
|
|
|
|
+ var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
|
|
|
|
|
+ templist.push(tempItem);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- if (templist.length > 0) {
|
|
|
|
|
|
|
+ if (templist.length > 0) {
|
|
|
|
|
|
|
|
- this.advancedQuerySearchKey = templist.join('_;');
|
|
|
|
|
|
|
+ this.advancedQuerySearchKey = templist.join('_;');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- this.getData();
|
|
|
|
|
- this.showAdvancedQueryDialog = false;
|
|
|
|
|
- },
|
|
|
|
|
- addSortField() {
|
|
|
|
|
- this.tableSortFields.push({
|
|
|
|
|
- name: '',
|
|
|
|
|
- order: 'asc',
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- removeSortField(i) {
|
|
|
|
|
- if (this.tableSortFields.length > 0) {
|
|
|
|
|
- this.tableSortFields.splice(i, 1);
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- tableSortQuery() {
|
|
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ this.showAdvancedQueryDialog = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ addSortField() {
|
|
|
|
|
+ this.tableSortFields.push({
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ order: 'asc',
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ removeSortField(i) {
|
|
|
|
|
+ if (this.tableSortFields.length > 0) {
|
|
|
|
|
+ this.tableSortFields.splice(i, 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ tableSortQuery() {
|
|
|
|
|
|
|
|
- this.orderByStr = '';
|
|
|
|
|
|
|
+ this.orderByStr = '';
|
|
|
|
|
|
|
|
- if (this.tableSortFields.length > 0) {
|
|
|
|
|
|
|
+ if (this.tableSortFields.length > 0) {
|
|
|
|
|
|
|
|
- var templist = [];
|
|
|
|
|
|
|
+ var templist = [];
|
|
|
|
|
|
|
|
- this.tableSortFields.forEach(item => {
|
|
|
|
|
- if (item.name && item.order) {
|
|
|
|
|
- var tempItem = item.name + '_,' + item.order;
|
|
|
|
|
- templist.push(tempItem);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.tableSortFields.forEach(item => {
|
|
|
|
|
+ if (item.name && item.order) {
|
|
|
|
|
+ var tempItem = item.name + '_,' + item.order;
|
|
|
|
|
+ templist.push(tempItem);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- if (templist.length > 0) {
|
|
|
|
|
|
|
+ if (templist.length > 0) {
|
|
|
|
|
|
|
|
- this.orderByStr = templist.join('_;');
|
|
|
|
|
|
|
+ this.orderByStr = templist.join('_;');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- this.getData();
|
|
|
|
|
- this.showTableSortDialog = false;
|
|
|
|
|
- },
|
|
|
|
|
- exportExcel() {
|
|
|
|
|
- window.location.href = this.$baseUrl + "/storeInfo/exportExcel?searchKey="
|
|
|
|
|
- + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
|
|
|
|
|
- },
|
|
|
|
|
- searchData() {
|
|
|
|
|
- this.currentPage = 1;
|
|
|
|
|
- this.getData();
|
|
|
|
|
- },
|
|
|
|
|
- deleteRow(row) {
|
|
|
|
|
- this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
|
|
|
|
|
- return this.$http.post({
|
|
|
|
|
- url: '/storeInfo/del',
|
|
|
|
|
- data: { id: row.id }
|
|
|
|
|
- })
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- this.$message.success('删除成功');
|
|
|
|
|
this.getData();
|
|
this.getData();
|
|
|
- }).catch(action => {
|
|
|
|
|
- if (action === 'cancel') {
|
|
|
|
|
- this.$message.info('删除取消');
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error('删除失败');
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- DateTimeFormatter(row, column, cellValue) {
|
|
|
|
|
- if (cellValue) {
|
|
|
|
|
- return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- DateFormatter(row, column, cellValue) {
|
|
|
|
|
- if (cellValue) {
|
|
|
|
|
- return format(cellValue, 'YYYY/MM/DD', { locale: zh })
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- ServiceTypeFormatter(row, column, cellValue) {
|
|
|
|
|
- if (cellValue) {
|
|
|
|
|
- var serviceType = '';
|
|
|
|
|
- this.serviceTypes.forEach(item => {
|
|
|
|
|
- if (item.id == Number(cellValue)) {
|
|
|
|
|
- serviceType = item.shortName;
|
|
|
|
|
|
|
+ this.showTableSortDialog = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ exportExcel() {
|
|
|
|
|
+ window.location.href = this.$baseUrl + "/storeInfo/exportExcel?searchKey="
|
|
|
|
|
+ + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
|
|
|
|
|
+ },
|
|
|
|
|
+ searchData() {
|
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ },
|
|
|
|
|
+ deleteRow(row) {
|
|
|
|
|
+ this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
|
|
|
|
|
+ return this.$http.post({
|
|
|
|
|
+ url: '/storeInfo/del',
|
|
|
|
|
+ data: {id: row.id}
|
|
|
|
|
+ })
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.$message.success('删除成功');
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ }).catch(action => {
|
|
|
|
|
+ if (action === 'cancel') {
|
|
|
|
|
+ this.$message.info('删除取消');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error('删除失败');
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ },
|
|
|
|
|
+ DateTimeFormatter(row, column, cellValue) {
|
|
|
|
|
+ if (cellValue) {
|
|
|
|
|
+ return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- return serviceType;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- ServiceTypeDetailFormatter(row, column, cellValue) {
|
|
|
|
|
- if (cellValue && row.serviceType) {
|
|
|
|
|
- var serviceTypeDetail = '';
|
|
|
|
|
- if (this.serviceTypeDetails[row.serviceType]) {
|
|
|
|
|
- this.serviceTypeDetails[row.serviceType].forEach(item => {
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ DateFormatter(row, column, cellValue) {
|
|
|
|
|
+ if (cellValue) {
|
|
|
|
|
+ return format(cellValue, 'YYYY/MM/DD', {locale: zh})
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ ServiceTypeFormatter(row, column, cellValue) {
|
|
|
|
|
+ if (cellValue) {
|
|
|
|
|
+ var serviceType = '';
|
|
|
|
|
+ this.serviceTypes.forEach(item => {
|
|
|
if (item.id == Number(cellValue)) {
|
|
if (item.id == Number(cellValue)) {
|
|
|
- serviceTypeDetail = item.typeName;
|
|
|
|
|
|
|
+ serviceType = item.shortName;
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ return serviceType;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- return serviceTypeDetail;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ServiceTypeDetailFormatter(row, column, cellValue) {
|
|
|
|
|
+ if (cellValue && row.serviceType) {
|
|
|
|
|
+ var serviceTypeDetail = '';
|
|
|
|
|
+ if (this.serviceTypeDetails[row.serviceType]) {
|
|
|
|
|
+ this.serviceTypeDetails[row.serviceType].forEach(item => {
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ if (item.id == Number(cellValue)) {
|
|
|
|
|
+ serviceTypeDetail = item.typeName;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- YNFormatter(row, column, cellValue) {
|
|
|
|
|
- return cellValue ? 'Y' : 'N';
|
|
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
- TypeFlagFormatter(row, column, cellValue) {
|
|
|
|
|
-
|
|
|
|
|
- var valueStr = '';
|
|
|
|
|
- switch (cellValue) {
|
|
|
|
|
- case 0:
|
|
|
|
|
- valueStr = '官方';
|
|
|
|
|
- break;
|
|
|
|
|
- case 1:
|
|
|
|
|
- valueStr = '企业';
|
|
|
|
|
- break
|
|
|
|
|
- case 2:
|
|
|
|
|
- valueStr = '个人';
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return serviceTypeDetail;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- return valueStr;
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ YNFormatter(row, column, cellValue) {
|
|
|
|
|
+ return cellValue ? 'Y' : 'N';
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ TypeFlagFormatter(row, column, cellValue) {
|
|
|
|
|
+
|
|
|
|
|
+ var valueStr = '';
|
|
|
|
|
+ switch (cellValue) {
|
|
|
|
|
+ case 0:
|
|
|
|
|
+ valueStr = '官方';
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ valueStr = '企业';
|
|
|
|
|
+ break
|
|
|
|
|
+ case 2:
|
|
|
|
|
+ valueStr = '个人';
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ return valueStr;
|
|
|
|
|
|
|
|
- showImg(img) {
|
|
|
|
|
- this.imgSrc = img;
|
|
|
|
|
- this.imageDialogVisible = true;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ showImg(img) {
|
|
|
|
|
+ this.imgSrc = img;
|
|
|
|
|
+ this.imageDialogVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
</style>
|
|
</style>
|