完成后台所有功能

This commit is contained in:
monanxiao
2024-10-17 16:52:22 +08:00
parent 6b54fb10a2
commit 78426364f3
12 changed files with 128 additions and 145 deletions
+37 -24
View File
@@ -1,21 +1,23 @@
<template>
<div class="tags">
<el-tag
ref="tagRef"
v-for="tag in tags"
:key="tag.title"
class="mR10 tabs"
:closable="tag.close"
:effect="tag.checked ? 'dark' : 'plain'"
@click="tagChange(tag)"
@close="delectTag(tag, index)"
>
<el-tag
ref="tagRef"
v-for="tag in tags"
:key="tag.title"
class="mR10 tabs"
:closable="tag.close"
:effect="tag.checked ? 'dark' : 'plain'"
@click="tagChange(tag)"
@close="delectTag(tag, index)"
>
<template class="spanmenu">
<el-icon class="tabs-icon">
<component :is="tag.icon"></component>
</el-icon>
{{ tag.title }}
</el-tag>
</div>
</template>
</el-tag>
</template>
<script setup>
@@ -23,12 +25,14 @@ import { useRoute, useRouter } from 'vue-router'
import { computed, nextTick, onMounted, ref, watch } from 'vue'
import store from '../../store/index.js'
import { useStore } from 'vuex'
const tabsMenuValue = ref('')
const nameScroll = ref(false)
const tagRef = ref()
const route = useRoute()
const router = useRouter()
const globalStore = useStore() // 该方法用于返回store 实例
// 监听路由的变化(防止浏览器后退/前进不变化 tabsMenuValue
watch(
() => route.path,
@@ -46,34 +50,43 @@ watch(
immediate: true,
}
)
const tags = store.getters.tabsMenuList
const tagChange = (item) => {
item.checked = true
router.push(item.url)
}
const delectTag = (item, index) => {
globalStore.dispatch('tabs/delectTag', item)
}
onMounted(() => {
nextTick(() => {})
})
</script>
<style lang="scss" scoped>
.tags {
width: 95%;
overflow: hidden;
height: 100%;
.mR10 {
margin-right: 10px;
}
.tabs {
display: flex;
flex-flow: row;
overflow: scroll;
white-space: nowrap;
&::-webkit-scrollbar {
display: none;
align-items: center;
height: 30px;
padding: 0 10px; /* 调整内边距 */
border-radius: 4px; /* 圆角 */
cursor: pointer;
.tabs-icon {
margin-right: 5px; /* 图标和文字之间的间距 */
}
.tabs {
height: 30px;
.spanmenu{
display: flex;
align-items: center;
}
}
</style>
-2
View File
@@ -15,13 +15,11 @@
}
.main-tabs {
width: 100%;
margin-bottom: 10px;
background-color: #fff;
border: 0;
box-shadow: none;
overflow: hidden;
height: 30px;
}
.el-main {
+3 -3
View File
@@ -2,7 +2,7 @@
export const menuListItem = [
{
title: "仪表盘",
title: "首页",
url: "/home",
icon: "HomeFilled",
},
@@ -12,7 +12,7 @@ export const menuListItem = [
icon: "Setting",
children: [
{
title: "首页",
title: "小程序首页",
url: "/homesite",
icon: "Menu",
},
@@ -66,7 +66,7 @@ export const menuListItem = [
icon: "Postcard",
children: [
{
title: "勘工程师",
title: "勘工程师",
url: "/reconnaissance",
icon: "Menu",
},
+4 -4
View File
@@ -14,7 +14,7 @@ const routerList = [
redirect: "home",
meta: {
requiresAuth: true, //有一些页面是否登录才能进去
name: "仪表盘",
name: "首页",
},
children: [
{
@@ -23,7 +23,7 @@ const routerList = [
component: () => import("../views/home/index.vue"),
meta: {
requiresAuth: true, //有一些页面是否登录才能进去
name: "看板",
name: "首页",
},
},
],
@@ -42,7 +42,7 @@ const routerList = [
name: "homesite",
component: () => import("../views/system/homeSite.vue"),
meta: {
name: "首页",
name: "小程序首页",
requiresAuth: true, //有一些页面是否登录才能进去
},
},
@@ -168,7 +168,7 @@ const routerList = [
component: () => import("../views/engineer/reconnaissance.vue"),
meta: {
requiresAuth: true,
name: "勘工程师审核",
name: "勘工程师审核",
},
},
{
+5 -11
View File
@@ -52,12 +52,7 @@
<el-avatar :size="50" :src="scope.row.avatar" />
</template>
</el-table-column>
<el-table-column
label="微信昵称"
prop="nickname"
align="center"
show-overflow-tooltip
/>
<el-table-column
label="名字"
prop="name"
@@ -98,16 +93,15 @@
<el-table-column
label="操作"
width="auto"
align="center"
show-overflow-tooltip
fixed="right"
min-width="120"
>
<template v-slot:default="scope">
<template v-slot:default="scope" >
<el-button type="success" v-if="scope.row.status === 0" @click="handleApprove(scope.row)">通过</el-button>
<el-button type="danger" v-if="scope.row.status === 0" @click="handleReject(scope.row)">驳回</el-button>
<!-- <el-button type="danger" @click="openModel(scope.$index)">驳回</el-button>-->
</template>
</el-table-column>
</el-table>
<el-pagination
size="small"
+6 -12
View File
@@ -52,12 +52,7 @@
<el-avatar :size="50" :src="scope.row.avatar" />
</template>
</el-table-column>
<el-table-column
label="微信昵称"
prop="nickname"
align="center"
show-overflow-tooltip
/>
<el-table-column
label="名字"
prop="name"
@@ -97,17 +92,16 @@
/>
<el-table-column
label="操作"
width="auto"
align="center"
show-overflow-tooltip
label="操作"
fixed="right"
min-width="120"
>
<template v-slot:default="scope">
<template v-slot:default="scope" >
<el-button type="success" v-if="scope.row.status === 0" @click="handleApprove(scope.row)">通过</el-button>
<el-button type="danger" v-if="scope.row.status === 0" @click="handleReject(scope.row)">驳回</el-button>
<!-- <el-button type="danger" @click="openModel(scope.$index)">驳回</el-button>-->
</template>
</el-table-column>
</el-table>
<el-pagination
size="small"
+9 -10
View File
@@ -110,15 +110,14 @@
<view v-for="itemImg in scope.row.carouselImage">
<el-card shadow="never" class="header-card">
<el-col>
<el-image
:src="itemImg.url"
:preview-src-list="[itemImg.url]"
style="width:100%; height: 60px;"
/>
</el-col>
</el-card>
<el-image
:src="itemImg.url"
:preview-src-list="[itemImg.url]"
style="width:150px; height: 80px;margin-right: 5px;"
:style="{
boxShadow: `var(light)`,
}"
/>
</view>
@@ -126,7 +125,7 @@
<template v-slot:default="scope" v-if="item.props === 'details'">
<el-image
style="width: 300px; height: 50px"
style="width: 300px; height: 200px"
:src="scope.row.details"
:preview-src-list="[scope.row.details]"
/>
+3 -3
View File
@@ -3,7 +3,7 @@ export const options = [
{
label: '服务名称',
props: 'goodsName',
width: 'auto',
width: '200',
align: 'left'
},
{
@@ -18,9 +18,9 @@ export const options = [
align: 'left'
},
{
label: '标题图片',
label: '轮播图',
props: 'carouselImage',
width: '200',
width: '500',
align: 'left'
},
{
+39 -18
View File
@@ -74,6 +74,7 @@
prop="status"
width="120"
align="center"
sortable
>
<template #default="scope">
<el-tag type="info" v-if="scope.row.status === 0">待服务</el-tag>
@@ -86,10 +87,9 @@
<el-table-column
label="服务项目"
prop="goodsName"
width="120"
width="150"
align="center"
show-overflow-tooltip
sortable
/>
<el-table-column
@@ -101,7 +101,19 @@
/>
<el-table-column
label="维修费用"
label="项目费用"
width="120"
align="center"
show-overflow-tooltip
sortable
>
<template #default="scope">
{{ formatPrice(scope.row.goodsPrice) }}
</template>
</el-table-column>
<el-table-column
label="报价费用"
width="120"
align="center"
show-overflow-tooltip
@@ -138,7 +150,7 @@
<el-table-column
label="付款时间"
prop="date"
prop="completionTime"
width="auto"
align="center"
show-overflow-tooltip
@@ -172,7 +184,7 @@
class="margin-top"
title="订单信息"
:column="3"
:size="size"
size="small"
border
style="margin-bottom: 20px"
>
@@ -186,16 +198,19 @@
{{detailData.id}}
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
预约时间
订单状态
</div>
</template>
{{detailData.appointmentTime}}
<el-tag type="info" v-if="detailData.status === 0">待服务</el-tag>
<el-tag type="warning" v-if="detailData.status === 1">服务中</el-tag>
<el-tag type="danger" v-if="detailData.status === 2">待付款 </el-tag>
<el-tag type="success" v-if="detailData.status === 3">已完成</el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
@@ -217,13 +232,19 @@
<el-descriptions-item>
<template #label>
<div class="cell-item">
订单状态
预约时间
</div>
</template>
<el-tag type="info" v-if="detailData.status === 0">待服务</el-tag>
<el-tag type="warning" v-if="detailData.status === 1">服务中</el-tag>
<el-tag type="danger" v-if="detailData.status === 2">待付款 </el-tag>
<el-tag type="success" v-if="detailData.status === 3">已完成</el-tag>
{{detailData.appointmentTime}}
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
付款时间
</div>
</template>
{{detailData.completionTime}}
</el-descriptions-item>
</el-descriptions>
@@ -231,7 +252,7 @@
class="margin-top"
title="客户信息"
:column="3"
:size="size"
size="small"
border
style="margin-bottom: 20px"
>
@@ -244,9 +265,9 @@
<el-descriptions
class="margin-top"
title="勘工程师信息"
title="勘工程师信息"
:column="3"
:size="size"
size="small"
border
style="margin-bottom: 20px"
>
@@ -261,14 +282,14 @@
class="margin-top"
title="维修工程师信息"
:column="3"
:size="size"
size="small"
border
style="margin-bottom: 20px"
>
<el-descriptions-item label="名字">{{ detailData.repairerName }}</el-descriptions-item>
<el-descriptions-item label="联系方式">{{ detailData.repairerMobile }}</el-descriptions-item>
<el-descriptions-item label="预约时间">{{ detailData.repairerName }}</el-descriptions-item>
<el-descriptions-item label="预约时间">{{ detailData.maintenanceTime }}</el-descriptions-item>
</el-descriptions>
<div style="display: flex;justify-content: flex-end;margin-top: 50px">
+1 -1
View File
@@ -114,7 +114,7 @@
<el-table-column label="详情图" width="300px" align="center">
<template #default="scope">
<el-image style="width: 200px; height: 50px" :src="scope.row.detailImg" lazy />
<el-image style="width: 300px; height: 200px" :src="scope.row.detailImg" lazy />
</template>
</el-table-column>
+1 -1
View File
@@ -70,7 +70,7 @@
<el-table-column label="首页图" align="center">
<template #default="scope">
<el-image style="width: 600px; height: 50px" :src="scope.row.img" lazy/>
<el-image style="width: 300px; height: 200px" :src="scope.row.img" lazy/>
</template>
</el-table-column>
+20 -56
View File
@@ -1,69 +1,33 @@
<template>
<el-card>
<el-card class="mt10">
<el-row :gutter="10">
<el-col :span="4">
<div class="block">
<el-date-picker
v-model="registerDate"
type="daterange"
range-separator=""
start-placeholder="注册开始日期"
end-placeholder="注册截至日期"
:size="size"
/>
</div>
</el-col>
<el-col :span="4">
<el-form :inline="true" :model="queryData" class="mt20">
<el-form-item label="注册时间">
<el-date-picker
v-model="registerDate"
type="daterange"
range-separator=""
start-placeholder="注册开始日期"
end-placeholder="注册截至日期"
/>
</el-form-item>
<el-form-item label="微信昵称">
<el-input
v-model="searchName"
style="max-width: 300px"
placeholder="模糊查询微信昵称"
class="input-with-select"
onchange="searchEvnt"
>
/>
</el-form-item>
<template #append>
<el-button type="success" @click="searchEvnt">查询</el-button>
</template>
</el-input>
</el-col>
<el-form-item>
<el-button type="primary" @click="handleCurrentChange">查询</el-button>
</el-form-item>
<el-col :span="4">
<el-input
v-model="searchName"
style="max-width: 300px"
placeholder="模糊查询名字"
class="input-with-select"
onchange="searchEvnt"
>
</el-form>
<template #append>
<el-button type="success" @click="searchEvnt">查询</el-button>
</template>
</el-input>
</el-col>
<el-col :span="4">
<el-input
v-model="searchName"
style="max-width: 300px"
placeholder="模糊查询手机号"
class="input-with-select"
onchange="searchEvnt"
>
<template #append>
<el-button type="success" @click="searchEvnt">查询</el-button>
</template>
</el-input>
</el-col>
</el-row>
</el-card>
<el-card class="mt10">
<el-table
ref="table"
:data="tableData"
@@ -114,7 +78,7 @@
</el-table>
<el-pagination
small
size="small"
background
layout="prev, pager, next"
:total="tableData.length"