This commit is contained in:
许gitee 2025-01-23 17:56:39 +08:00
parent 90f7127318
commit 5a07571cfe
18 changed files with 228 additions and 134 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -75,6 +75,11 @@ const routes = [
name: '审核美甲师',
component: () => import('../views/employee/verify/index.vue'),
},
{
path: '/qiangdan',
name: '抢单',
component: () => import('../views/businessBag/qiangdan/qiangdan.vue'),
},
{
path: '/modifyPassword',
name: '修改密码',

View File

@ -1,11 +1,10 @@
// 引入axios
import axios from 'axios';
import {request} from "axios";
let baseUrl='http://localhost:8081/api/';
//let baseUrl='http://154.8.193.216:1107/api/';
// let baseUrl='http://localhost:8081/api/';
let baseUrl='http://154.8.193.216:1107/api/';
// 创建axios实例
const httpService = axios.create({
// url前缀-'http:xxx.xxx'

View File

@ -17,3 +17,16 @@ export function DetailformattedDate(timestamp){
const formattedDate = `${year}-${month}-${day} ${hour}:${minute}:${second}`;
return formattedDate
}
export function verifyPerson(){
let userInfoJson = window.sessionStorage.getItem("USER_LOGIN_STATE");
// console.log(userInfoJson)
if(JSON.parse(userInfoJson).userRole==1)
{
return true;
}else{
return false;
}
//console.log(ax.value)
}

View File

@ -22,15 +22,15 @@
<el-form-item label="店铺详细地址" prop="address">
{{form.address}}
</el-form-item>
<el-form-item label="门店简介" prop="businessProfile">
{{form.businessProfile}}
</el-form-item>
<el-form-item label="商家相册" prop="businessImages">
{{form.businessImages}}
</el-form-item>
<el-form-item label="分类ID" prop="categoryId">
{{form.categoryId}}
</el-form-item>
<!-- <el-form-item label="门店简介" prop="businessProfile">-->
<!-- {{form.businessProfile}}-->
<!-- </el-form-item>-->
<!-- <el-form-item label="商家相册" prop="businessImages">-->
<!-- {{form.businessImages}}-->
<!-- </el-form-item>-->
<!-- <el-form-item label="分类ID" prop="categoryId">-->
<!-- {{form.categoryId}}-->
<!-- </el-form-item>-->
<el-form-item label="店主名" prop="shopkeeper">
{{form.shopkeeper}}
</el-form-item>

View File

@ -29,27 +29,27 @@
</template>
</el-table-column>
<el-table-column prop="businessPhone" label="电话号码" width="120" />
<el-table-column prop="state" label="状态" width="80">
<template v-slot="scope">
<div v-if="scope.row.state===0" style="color: red">
禁用
</div>
<div style="color: lawngreen" v-else>
启用
</div>
<!-- <el-table-column prop="state" label="状态" width="80">-->
<!-- <template v-slot="scope">-->
<!-- <div v-if="scope.row.state===0" style="color: red">-->
<!-- 禁用-->
<!-- </div>-->
<!-- <div style="color: lawngreen" v-else>-->
<!-- 启用-->
<!-- </div>-->
</template>
</el-table-column>
<el-table-column prop="storeStatus" label="店铺状态" width="80">
<template v-slot="scope">
<div v-if="scope.row.storeStatus===0" style="color: red">
休业
</div>
<div style="color: lawngreen" v-else>
营业
</div>
</template>
</el-table-column>
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="storeStatus" label="店铺状态" width="80">-->
<!-- <template v-slot="scope">-->
<!-- <div v-if="scope.row.storeStatus===0" style="color: red">-->
<!-- 休业-->
<!-- </div>-->
<!-- <div style="color: lawngreen" v-else>-->
<!-- 营业-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="createTime" label="注册日期" width="200"/>
<el-table-column prop="updateTime" label="最后登录日期" width="200"/>

View File

@ -0,0 +1,13 @@
<template>
暂无接口
</template>
<script>
export default {
name: "qiangdan"
}
</script>
<style scoped>
</style>

View File

@ -73,9 +73,7 @@ import axios from "@/util/axios";
import {useRouter} from "vue-router"
// const isCollapse=ref(true);
// const RCollapse=ref([]);//
// const LCollapse=ref([]);//
const router=useRouter();

View File

@ -32,7 +32,7 @@
<el-button type="button" :icon="Search" @click="initEmployeeList">搜索</el-button>
<el-button type="primary" :icon="DocumentAdd" @click="handleAddDialogValue()" >添加用户</el-button>
</el-row>
<el-table :data="tableData" stripe style="width: 100%;" showOverflowTooltip>
<el-table :data="tempData" stripe style="width: 100%;" showOverflowTooltip>
<el-table-column prop="id" label="#ID" width="80" />
<el-table-column prop="manicuristName" label="用户昵称" width="200" />
<el-table-column prop="manicuristAvatar" label="头像" width="200">
@ -40,6 +40,15 @@
<img :src="scope.row.manicuristAvatar" width="50" height="50"/>
</template>
</el-table-column>
<el-table-column label="性别" prop="gender">
<template #default="scope">
<div v-if="scope.row.gender==0"></div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号" width="120px"/>
<el-table-column prop="email" label="邮箱" width="180px"/>
<el-table-column prop="rating" label="评分" width="200px">
<template v-slot="scope" style="height: 100px">
<div class="demo-rate-block">
@ -74,11 +83,8 @@
</el-table>
<el-pagination
v-model:currentPage="queryForm.current"
v-model:page-size="queryForm.pageSize"
:page-sizes="[10, 20, 30, 40,50]"
layout="total, sizes, prev, pager, next, jumper"
layout="total, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</el-card>
@ -210,10 +216,12 @@ const handleDelete=(ids)=>{
watch(query,()=>{
// console.log(query.value)
initEmployeeList();
},10000)
// watch(query,()=>{
// // console.log(query.value)
// initEmployeeList();
// },10000)
const tempData=ref([])
const tempstore=()=>{
const temp=[]
@ -232,6 +240,9 @@ const tempstore=()=>{
}
})
tableData.value=temp
tempData.value.slice(0,0)
tempData.value=tableData.value.slice(0,10)
//console.log(res.data.data)
}
@ -259,9 +270,8 @@ const handleSizeChange = (pageSize) => {
queryForm.value.pageSize=pageSize;
initEmployeeList();
}
const handleCurrentChange = (current) => {
queryForm.value.current=current;
initEmployeeList();
const handleCurrentChange = (pageNum) => {
tempData.value=tableData.value.slice(pageNum*10-10,pageNum*10)
}

View File

@ -2,16 +2,16 @@
<el-card>
<el-row :gutter="20" class="header">
<el-col :span="7">
<el-input placeholder="请输入用户昵称..." clearable v-model="formPage.businessName"></el-input>
<el-input placeholder="请输入美甲师ID..." clearable v-model="query"></el-input>
</el-col>
<el-button type="button" :icon="Search" @click="initEmployeeList">搜索</el-button>
</el-row>
<!-- <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;margin-left: 20px">-->
<!-- <el-radio-button :value="true" @click="handleCollapse(true)">审核</el-radio-button>-->
<!-- <el-radio-button :value="false" @click="handleCollapse(false)">未审核</el-radio-button>-->
<!-- </el-radio-group>-->
</el-row>
<el-table :data="tableData" stripe style="width: 100%;" showOverflowTooltip>
<el-table :data="tempData" stripe style="width: 100%;" showOverflowTooltip>
<el-table-column prop="id" label="#ID" width="80" />
<el-table-column prop="manicuristName" label="用户昵称" width="200" />
<el-table-column prop="manicuristAvatar" label="头像" width="200">
@ -19,15 +19,24 @@
<img :src="scope.row.manicuristAvatar" width="50" height="50"/>
</template>
</el-table-column>
<el-table-column prop="rating" label="评分" width="200px">
<template v-slot="scope" style="height: 100px">
<div class="demo-rate-block">
<el-rate v-model="scope.row.rating" :colors="colors"/>
{{scope.row.rating}}
</div>
<el-table-column label="性别" prop="gender">
<template #default="scope">
<div v-if="scope.row.gender==0"></div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column prop="salary" label="余额" />
<el-table-column prop="phone" label="手机号" width="120px"/>
<el-table-column prop="email" label="邮箱" width="180px"/>
<!-- <el-table-column prop="rating" label="评分" width="200px">-->
<!-- <template v-slot="scope" style="height: 100px">-->
<!-- <div class="demo-rate-block">-->
<!-- <el-rate v-model="scope.row.rating" :colors="colors"/>-->
<!-- {{scope.row.rating}}-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="salary" label="余额" />-->
<el-table-column prop="createTime" label="注册日期" width="200"/>
<el-table-column prop="updateTime" label="最后登录日期" width="200"/>
<el-table-column prop="action" fixed="right" label="操作" min-width="120" >
@ -39,13 +48,13 @@
</el-table>
<el-pagination
v-model:currentPage="formPage.current"
v-model:page-size="formPage.pageSize"
:page-sizes="[10, 20, 30, 40,50]"
layout="total, sizes, prev, pager, next, jumper"
layout="total, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<!-- :page-sizes="[10, 20, 30, 40,50]"-->
<!-- v-model:page-size="formPage.pageSize"-->
<!-- @size-change="handleSizeChange"-->
</el-card>
@ -61,10 +70,8 @@ import axios from "@/util/axios";
import { ElNotification } from 'element-plus'
import Dialog from '@/views/employee/dialog/index.vue'
import axiosUtil from "@/util/axios";
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router"
import {request} from "axios";
const RCollapse=ref([]);
@ -82,7 +89,7 @@ const handleDialogValue=(ids)=>{
edialogVisible.value=true
}
const tempData=ref([])
@ -100,7 +107,7 @@ const tableData =ref([])
const handleCollapse=async (temp)=>{
console.log(temp)
// console.log(temp)
const res=await axios.post("manicurist/queryAll");
RCollapse.value.splice(0,RCollapse.value.length);
LCollapse.value.splice(0,LCollapse.value.length);
@ -116,8 +123,8 @@ const handleCollapse=async (temp)=>{
//console.log(item.state);
});
console.log("RCollapse"+RCollapse.value);
console.log("LCollapse"+LCollapse.value);
// console.log("RCollapse"+RCollapse.value);
// console.log("LCollapse"+LCollapse.value);
if (temp){
tableData.value=RCollapse.value
total.value=Number(RCollapse.value.length);
@ -125,23 +132,28 @@ const handleCollapse=async (temp)=>{
tableData.value=LCollapse.value
total.value=Number(LCollapse.value.length);
}
tempData.value.slice(0,0)
tempData.value=tableData.value.slice(0,10)
}
const initEmployeeList=async()=>{
if (!query.value){
const res=await axios.post("manicurist/queryAll");
// console.log(res.data)
tableData.value=res.data.data;
total.value=res.data.data.length;
// const res=await axios.post("manicurist/queryAll");
// // console.log(res.data)
// tableData.value=res.data.data;
// total.value=res.data.data.length;
handleCollapse();
}else{
const res = await axios.get("manicurist/queryById", {manicuristId: query.value});
// console.log(res.data)
const temp = []
temp.push(res.data.data)
tableData.value = temp;
tempData.value = temp;
total.value = 1;
}
}
@ -149,14 +161,16 @@ const initEmployeeList=async()=>{
handleCollapse();
const handleSizeChange = (pageSize) => {
formPage.value.current=1;
formPage.value.pageSize=pageSize;
initBusinessList();
}
// const handleSizeChange = (pageSize) => {
// // console.log("pageSize"+pageSize)
// // formPage.value.current=1;
// // formPage.value.pageSize=pageSize;
// tempData.value=tableData.value.slice(pageSize-10,pageSize)
// }
const handleCurrentChange = (pageNum) => {
formPage.value.current=pageNum;
initBusinessList();
// console.log("current"+pageNum)
// formPage.value.current=pageNum;
tempData.value=tableData.value.slice(pageNum*10-10,pageNum*10)
}
</script>
<style lang="scss" scoped>

View File

@ -28,7 +28,7 @@
</div>
</el-col>
<el-col :span="6">
<el-col :span="6" v-if="verifyPerson()==true">
<div class="statistic-card">
<el-statistic :value="num1">
<template #title>
@ -115,30 +115,25 @@
</el-form>
</div>
</div>
<div style="flex: 1" >
<div id="main" style="height: 300px;width: 400px;border: 1px solid #ebebeb;border-radius: 2px;"></div>
<div style="flex: 1">
<div id="main" style="height: 300px;width: 400px;border: 1px solid #ebebeb;border-radius: 2px;"></div>
</div>
<div style="flex: 1" >
<div id="main1" style="height: 300px;width: 400px;border: 1px solid #ebebeb;border-radius: 2px;"></div>
</div>
</div>
<div style="flex: 1" >
<div id="main1" style="height: 300px;width: 400px;border: 1px solid #ebebeb;border-radius: 2px;"></div>
</div>
</div>
<!-- <el-pagination-->
<!-- v-model:currentPage="formPage.current"-->
<!-- v-model:page-size="formPage.pageSize"-->
<!-- :page-sizes="[10, 20, 30, 40,50]"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- :total="total"-->
<!-- @size-change="handleSizeChange"-->
<!-- @current-change="handleCurrentChange"-->
<!-- />-->
</template>
<script setup>
import axios from "@/util/axios";
import * as echarts from "echarts";
import {onMounted, ref} from 'vue'
import {formattedDate} from "@/util/time";
import {onMounted, ref, watch} from 'vue'
import {formattedDate, verifyPerson} from "@/util/time";
const num0=ref()
const num1=ref()
@ -148,10 +143,6 @@ const num3=ref()
const compete=ref([])
const Xcompete=ref([])
const Ycompete=ref([])
// ====================
// ====================
const total=ref(0)
@ -161,8 +152,17 @@ const formPage=ref({
pageSize:1
})
const initBusinessList=async()=>{
//console.log(formPage.value)
const initBusinessList= ()=>{
if(verifyPerson()==true){
initHome();
}
}
const initHome=async ()=>{
const res1=await axios.post("user/list/page");
num0.value=res1.data.data.total
@ -178,20 +178,16 @@ const initBusinessList=async()=>{
tableData.value=res.data.data.records;
total.value=res.data.data.records.length;
// 线
// 线
compete.value=res3.data.data.records
compete.value.map(item=>{item.createTime=formattedDate(item.createTime)})
compete.value.forEach(item=>{Xcompete.value.push(item.createTime);Ycompete.value.push(item.totalPrice)})
// console.log(Xcompete.value)
// console.log(Ycompete.value)
// console.log(num0+" "+num1+" "+num2+" "+num3)
setTimeout(() => {hei();shi();}, 500)
}
initBusinessList();
const handleSizeChange = (pageSize) => {
formPage.value.current=1;
formPage.value.pageSize=pageSize;
@ -212,6 +208,7 @@ const handleCurrentChange = (pageNum) => {
// })
const hei=()=>{
var chartDom = document.getElementById('main1');
@ -279,7 +276,6 @@ const hei=()=>{
]
};
option && myChart.setOption(option);
}
const shi=()=>{
var chartDom = document.getElementById('main');

View File

@ -155,7 +155,7 @@
<el-icon><tickets /></el-icon>
<span>到店服务</span>
</el-menu-item>
<el-menu-item >
<el-menu-item index="qiangdan">
<el-icon><tickets /></el-icon>
<span>抢单</span>
</el-menu-item>
@ -183,7 +183,7 @@
<el-icon><management /></el-icon>
<span>美甲师列表</span>
</el-menu-item>
<el-menu-item >
<el-menu-item index="employeeVerify">
<el-icon><tickets /></el-icon>
<span>签约美甲师</span>
</el-menu-item>
@ -241,18 +241,11 @@ import { useStore } from 'vuex'
import axios from "@/util/axios";
import {ElMessage} from "element-plus";
import {ref} from "vue";
import {verifyPerson} from "@/util/time";
const store=useStore();
const ax=ref(true)
const initax=()=>{
let userInfoJson = window.sessionStorage.getItem("USER_LOGIN_STATE");
console.log(userInfoJson)
if(JSON.parse(userInfoJson).userRole==1)
{
ax.value=true
}else{
ax.value=false
}
console.log(ax.value)
ax.value=verifyPerson();
}
initax();
const logout=async ()=>{

View File

@ -30,7 +30,6 @@
<script setup>
import {ref} from 'vue'
import {Lock, User} from '@element-plus/icons-vue'
import axios, {request} from "axios";
import axiosUtil from '@/util/axios'
import {ElMessage} from "element-plus";
import router from "@/router";
@ -63,6 +62,7 @@ const handleLogin = () => {
if (valid) {
try {
let result = await axiosUtil.post("user/login", form.value);
let res = await axiosUtil.get("business/current");
let data = result.data;
// console.log(result)
// const value = response.data;
@ -75,6 +75,7 @@ const handleLogin = () => {
ElMessage.success("登录成功");
window.sessionStorage.setItem("token",JSON.stringify(form.value));
window.sessionStorage.setItem("USER_LOGIN_STATE", JSON.stringify(data.data));
window.sessionStorage.setItem("BUSINESS_STATE", JSON.stringify(res.data.data));
router.push('/home');
} else {
ElMessage.error(data.description);

View File

@ -1,13 +1,33 @@
<template>
<el-card>
<el-row :gutter="20" class="header">
<el-col :span="7">
<el-col :span="5">
<el-input placeholder="请输入订单号..." clearable v-model="queryForm.orderNumber"></el-input>
</el-col>
<el-col :span="5">
<el-input placeholder="请输入用户ID..." clearable v-model="queryForm.userId"></el-input>
</el-col>
<el-col :span="4">
<el-select
v-model="queryForm.paymentStatus"
size="default"
placeholder="支付状态"
style="width: 100%"
>
<el-option
v-for="(item,index) in payStatus"
:key="item.indexOf()"
:label="item"
:value="index"
/>
</el-select>
</el-col>
<el-button type="button" :icon="Search" @click="initOrderList">搜索</el-button>
</el-row>
<el-table :data="tableData" stripe style="width: 100%" showOverflowTooltip>
<el-table-column prop="id" label="#ID" width="40" fixed/>
<el-table-column prop="id" label="#ID" width="60" fixed/>
<el-table-column prop="orderNumber" label="订单号" width="220" fixed/>
<el-table-column prop="userName" label="用户昵称" width="200"/>
<el-table-column prop="totalPrice" label="订单总价" width="100"/>
@ -84,6 +104,8 @@ const handleDelete=(id)=>{
const handleOrderStatus=(id,status)=>{
ElMessageBox.confirm(
'您确认要更新这个订单状态吗?',
@ -129,6 +151,8 @@ const id=ref(-1);
const queryForm=ref({
orderNumber:'',
paymentStatus: null,
userId: null,
current:1,
pageSize:10
})
@ -137,6 +161,7 @@ const tableData =ref([])
const payStatus=['未支付','已支付','退款中','已退款']
const initOrderList=async()=>{
// console.log(queryForm.value)
const res=await axios.post("orders/list/page",queryForm.value);
//console.log(res.data.data)
// const temp=[];

View File

@ -7,6 +7,7 @@
<el-button type="button" :icon="Search" @click="initOrderList">搜索</el-button>
</el-row>
<el-table :data="tableData" stripe style="width: 100%" showOverflowTooltip>
<el-table-column prop="id" label="#ID" width="60" fixed/>
<el-table-column prop="orderNumber" label="订单号" width="220" fixed/>
<el-table-column prop="userName" label="用户昵称" width="200"/>
<el-table-column prop="totalPrice" label="订单总价" width="100"/>

View File

@ -84,7 +84,7 @@
@initEmployeeList="initEmployeeList"></UpdateDialog>
</template>
<script setup>
import {Search,DocumentAdd,Delete,Edit} from '@element-plus/icons-vue'
import {Search,DocumentAdd,Edit} from '@element-plus/icons-vue'
import {ref, watch} from 'vue'
import axios from "@/util/axios";
import Dialog from '@/views/permission/dialog/index.vue'
@ -113,7 +113,6 @@ const edialogVisible=ref(false)
const edialogUpdateVisible=ref(false)
import { Action } from 'element-plus'
const open = () => {
ElMessageBox.alert('此接口暂无', 'Title', {

View File

@ -8,11 +8,13 @@
<el-col :span="4" v-if="params.product==undefined">
<el-input placeholder="请输入商家ID..." clearable v-model="queryForm.businessId"></el-input>
</el-col>
<el-col :span="4" >
<el-input placeholder="请输入分类ID..." clearable v-model="queryForm.commoditiesGroupId"></el-input>
</el-col>
<el-button type="primary" :icon="Search" @click="initProductList" >搜索</el-button>
<el-button v-if="params.product!==undefined" >商家名称{{JSON.parse(params.product).businessName}}</el-button>
<!-- <el-button type="primary" :icon="DocumentAdd"-->
<!-- @click="handleDialogValue()">添加商品</el-button>-->
</el-row>
@ -56,6 +58,7 @@ import {ref, watch} from 'vue'
import axios,{getServerUrl} from "@/util/axios";
import { ElMessageBox,ElMessage } from 'element-plus'
import {useRoute} from "vue-router";
import {verifyPerson} from "@/util/time";
// import Dialog from './components/dialog'
let params=useRoute().query
@ -84,12 +87,21 @@ const queryForm=ref({
// }
// dialogVisible.value=true
// }
const businessId=ref()
let jk=ref();
const initProductList=async()=>{
//console.log(JSON.parse(params.product).id)
jk.value=verifyPerson();
console.log(jk.value)
if(params.product!=undefined){
queryForm.value.businessId=JSON.parse(params.product).id
}else if (jk.value==false){
let Info = window.sessionStorage.getItem("BUSINESS_STATE");
queryForm.value.businessId=JSON.parse(Info).id
console.log(queryForm.value)
}
const res=await axios.post("commodities/list/page/commodities",queryForm.value);
// console.log(res.data.data)
tableData.value=res.data.data.records;
@ -97,10 +109,6 @@ const initProductList=async()=>{
}
initProductList();
watch(query,()=>{
// console.log(id.value)
initProductList();
},10000)
const handleSizeChange = (pageSize) => {
queryForm.value.current=1;

View File

@ -4,6 +4,22 @@
<el-col :span="7">
<el-input placeholder="请输入用户昵称..." clearable v-model="queryForm.username"></el-input>
</el-col>
<el-col :span="4">
<el-select
v-model="queryForm.userRole"
size="default"
placeholder="用户角色"
style="width: 100%"
>
<el-option
v-for="(item,index) in options"
:key="item.indexOf()"
:label="item"
:value="index"
/>
</el-select>
</el-col>
<el-button type="button" :icon="Search" @click="initUserList" >搜索</el-button>
<el-button type="primary" :icon="DocumentAdd" @click="handleAddDialogValue()" >添加用户</el-button>
</el-row>
@ -96,15 +112,17 @@ import Dialog from '@/views/user/dialog/index.vue'
import AddDialog from '@/views/user/addDialog/index.vue'
import UpdateDialog from '@/views/user/updateDialog/index.vue'
import { ElMessage,ElMessageBox } from "element-plus";
import {parseTime} from "element-plus/es/components/time-select/src/utils";
const queryForm=ref({
userRole:'',
username: '',
current:1,
pageSize:10
})
const options = [ '普通用户', '管理员', '商家', '美甲师']
const id=ref('')
const dialogTitle=ref('');
const UdialogaddVisible=ref(false)
@ -220,6 +238,7 @@ const initUserList=async()=>{
// tableData.value=temp;
// total.value=1;
// }
// console.log(queryForm.value)
const res = await axios.post("user/list/page", queryForm.value);
if (res.data.data) {