|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="list-view">
|
|
|
+ <div class="list-view">
|
|
|
<div class="filters-container">
|
|
|
<el-input placeholder="输入关键字" v-model="search" clearable
|
|
|
class="filter-item"></el-input>
|
|
|
@@ -23,51 +23,76 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="id" label="ID" width="100">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="userId" label="用户ID"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="jobNumber" label="工号"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="area" label="区域"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="signIn" label="签到"
|
|
|
->
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-tag :type="row.signIn?'':'info'">{{row.signIn}}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="experience" label="经验值"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="level" label="等级"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="monetary" label="货币"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="singular" label="成单数"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="distance" label="距离"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="goodReview" label="好评数"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="badReview" label="差评数"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="operate" label="操作"
|
|
|
->
|
|
|
- </el-table-column>
|
|
|
-<!-- <el-table-column prop="blacklist" label="黑名单"
|
|
|
->
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-tag :type="row.blacklist?'':'info'">{{row.blacklist}}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>-->
|
|
|
+ <el-table-column prop="user.nickname" label="昵称"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="头像" min-width="100">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-image style="width: 30px; height: 30px"
|
|
|
+ :src="row.user.avatar" fit="cover"
|
|
|
+ :preview-src-list="[row.user.avatar]"></el-image>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="user.phone" label="手机"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jobNumber" label="工号"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="area" label="区域"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column prop="signIn" label="签到"
|
|
|
+ >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-tag :type="row.signIn?'':'info'">{{row.signIn}}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>-->
|
|
|
+ <!-- <el-table-column prop="area" label="工作地点"
|
|
|
+ >
|
|
|
+ </el-table-column>-->
|
|
|
+ <el-table-column prop="motorcycleImg" label="摩托车图片"
|
|
|
+ >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-image style="width: 30px; height: 30px"
|
|
|
+ :src="row.motorcycleImg" fit="cover"
|
|
|
+ :preview-src-list="[row.motorcycleImg]"></el-image>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="licensePlateImg" label="车牌照片"
|
|
|
+ >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-image style="width: 30px; height: 30px"
|
|
|
+ :src="row.licensePlateImg" fit="cover"
|
|
|
+ :preview-src-list="[row.licensePlateImg]"></el-image>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="driverLicenseImg" label="驾照照片"
|
|
|
+ >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-image style="width: 30px; height: 30px"
|
|
|
+ :src="row.driverLicenseImg" fit="cover"
|
|
|
+ :preview-src-list="[row.driverLicenseImg]"></el-image>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="status" label="状态"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column prop="goodReview" label="好评数"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="badReview" label="差评数"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="operate" label="操作"
|
|
|
+ >
|
|
|
+ </el-table-column>-->
|
|
|
+ <!-- <el-table-column prop="blacklist" label="黑名单"
|
|
|
+ >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-tag :type="row.blacklist?'':'info'">{{row.blacklist}}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>-->
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
@@ -76,6 +101,25 @@
|
|
|
<template slot-scope="{row}">
|
|
|
<el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
|
|
|
<el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="row.status === 'PENDING'"
|
|
|
+ :loading="row.loading"
|
|
|
+ @click="audit(row, true)"
|
|
|
+ type="warning"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ >通过
|
|
|
+ </el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="row.status === 'PENDING'"
|
|
|
+ @click="deny(row)"
|
|
|
+ type="danger"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ >拒绝
|
|
|
+ </el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -99,7 +143,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import { mapState } from "vuex";
|
|
|
+ import {mapState} from "vuex";
|
|
|
import pageableTable from "@/mixins/pageableTable";
|
|
|
|
|
|
export default {
|
|
|
@@ -124,7 +168,7 @@
|
|
|
methods: {
|
|
|
beforeGetData() {
|
|
|
if (this.search) {
|
|
|
- return { search: this.search };
|
|
|
+ return {search: this.search};
|
|
|
}
|
|
|
},
|
|
|
toggleMultipleMode(multipleMode) {
|
|
|
@@ -137,7 +181,7 @@
|
|
|
this.$router.push({
|
|
|
path: "/riderEdit",
|
|
|
query: {
|
|
|
- ...this.$route.query
|
|
|
+ ...this.$route.query
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -145,16 +189,16 @@
|
|
|
this.$router.push({
|
|
|
path: "/riderEdit",
|
|
|
query: {
|
|
|
- id: row.id
|
|
|
+ id: row.id
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
download() {
|
|
|
this.downloading = true;
|
|
|
this.$axios
|
|
|
- .get("/rider/excel", {
|
|
|
+ .get("/rider/excel", {
|
|
|
responseType: "blob",
|
|
|
- params: { size: 10000 }
|
|
|
+ params: {size: 10000}
|
|
|
})
|
|
|
.then(res => {
|
|
|
console.log(res);
|
|
|
@@ -199,6 +243,53 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ audit(row, pass) {
|
|
|
+ this.$set(row, 'loading', true);
|
|
|
+ this.$http
|
|
|
+ .get('/rider/audit', {
|
|
|
+ id: row.id,
|
|
|
+ pass: pass
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.$set(row, 'loading', false);
|
|
|
+ this.$message.success('OK');
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$set(row, 'loading', false);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ deny(row) {
|
|
|
+ this.$prompt('请输入理由', '提示', {
|
|
|
+ inputType: 'textarea'
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ // console.log(res);
|
|
|
+ if (res.value) {
|
|
|
+ this.$alert('确定拒绝通过?', '提示', {
|
|
|
+ showCancelButton: true
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return this.$http.get('/rider/audit', {
|
|
|
+ id: row.id,
|
|
|
+ pass: false,
|
|
|
+ reason: res.value
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.$message.success('成功');
|
|
|
+ this.$router.go(0);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error(res.error || '失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|