修改一些服务器的问题
This commit is contained in:
parent
8159296f3c
commit
1107b4516d
|
@ -6,6 +6,8 @@ const myAxios = axios.create({
|
|||
withCredentials:true,
|
||||
baseURL: 'http://localhost:9092/api'
|
||||
// baseURL: 'http://123.249.108.160:8888/api' //测试服务器
|
||||
// baseURL: 'http://154.8.193.216:9092/api', //隋雨霏服务器
|
||||
// baseURL: 'http://154.8.193.216:9093/api' //隋雨霏服务器测试环境
|
||||
});
|
||||
// 添加请求拦截器
|
||||
axios.interceptors.request.use(function (config) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div style="height: 100vh">
|
||||
|
||||
<el-container style="min-height: 100%">
|
||||
<el-container >
|
||||
|
||||
<!-- 侧边栏-->
|
||||
<Aside/>
|
||||
|
@ -19,7 +17,6 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
<template>
|
||||
<el-aside :width="sideWidth + 'px'" style="position: sticky; bottom: 0; left: 0; height: auto; background-color: rgb(170, 113, 81); box-shadow: rgba(0, 21, 155, 0.35) 2px 0 6px">
|
||||
<el-aside :width="sideWidth + 'px'" style="max-height: 200vh; min-height: 100vh; position: sticky; bottom: 0; left: 0; height: auto; background-color: rgb(170, 113, 81); box-shadow: rgba(0, 21, 155, 0.35) 2px 0 6px" >
|
||||
<el-aside :style="AsideObj">
|
||||
<div style="height: 80px; color: white; font-weight: bold;
|
||||
display: flex; align-items: center; justify-content: center">
|
||||
<img src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FypVcAOGV-Snipaste_2024-10-11_15-03-12.png" alt="" style="height: 30px">
|
||||
<span style="margin-left: 5px" v-show="isShow">泠泷水月阁管理系统</span>
|
||||
</div>
|
||||
<el-menu
|
||||
style=" overflow-y: auto; overflow-x: hidden"
|
||||
background-color="rgb(170, 113, 81)"
|
||||
:collapse="isCollapse"
|
||||
:collapse-transition="false"
|
||||
|
@ -15,7 +9,13 @@
|
|||
router
|
||||
active-text-color="#ffd04b"
|
||||
:default-openeds="['0']"
|
||||
unique-opened
|
||||
>
|
||||
<div style="height: 80px; color: white; font-weight: bold;
|
||||
display: flex; align-items: center; justify-content: center">
|
||||
<img src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FypVcAOGV-Snipaste_2024-10-11_15-03-12.png" alt="" style="height: 30px">
|
||||
<span style="margin-left: 5px" v-show="isShow">泠泷水月阁管理系统</span>
|
||||
</div>
|
||||
<!-- 遍历 menuRoutes,动态渲染菜单项 -->
|
||||
<template v-for="(item, index) in menuRoutes">
|
||||
<!-- 如果有子路由,使用 el-sub-menu -->
|
||||
|
@ -31,11 +31,11 @@
|
|||
<span>{{ item.meta.title }}</span>
|
||||
</template>
|
||||
<!-- 二级菜单 -->
|
||||
<el-menu-item
|
||||
v-for="(item2, index2) in item.children"
|
||||
:key="index2"
|
||||
:index="item2.path"
|
||||
:class="$route.path === item2.path ? 'is-active' : 'no-active'">
|
||||
<template v-for="(item2, index2) in item.children" :key="index2">
|
||||
<el-menu-item
|
||||
v-if="!item2.meta?.hidden"
|
||||
:index="item2.path"
|
||||
:class="$route.path === item2.path ? 'is-active' : 'no-active'">
|
||||
<template #title>
|
||||
<el-icon>
|
||||
<component
|
||||
|
@ -45,8 +45,9 @@
|
|||
{{ item2.meta.title }}
|
||||
</template>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</el-sub-menu>
|
||||
|
||||
|
||||
<!-- 如果没有子路由,使用 el-menu-item 代码备用,谨防路由被修改-->
|
||||
<!-- <el-menu-item
|
||||
v-else
|
||||
|
@ -180,4 +181,7 @@ console.log('menuRoutes--->',menuRoutes.value);
|
|||
.no-active {
|
||||
color: #ffffff;
|
||||
}
|
||||
.el-menu--horizontal {
|
||||
--el-menu-horizontal-height: 2000px;
|
||||
}
|
||||
</style>
|
|
@ -77,9 +77,6 @@
|
|||
<el-button class="ml-5" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<el-popconfirm confirm-button-text='确定' cancel-button-text='取消' icon="el-icon-info" icon-color="red"
|
||||
title="您确定删除吗?">
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="detail-container">
|
||||
<el-card shadow="hover">
|
||||
<div class="operate-container">
|
||||
<i class="el-icon-warning color-danger" style="margin-left: 20px"></i>
|
||||
<i class="el-icon-warning color-danger" style="margin: 10px 10px 0 20px"><el-icon><WarnTriangleFilled /></el-icon></i>
|
||||
<span class="color-danger">当前订单状态:{{ orderObj.orderStatus }}</span>
|
||||
<div class="operate-button-container" v-show="orderObj.orderStatus === '待支付'">
|
||||
<el-popconfirm confirm-button-text='确定' cancel-button-text='取消' icon="InfoFilled" icon-color="red"
|
||||
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<svg-icon icon-class="marker" style="color: #606266"></svg-icon>
|
||||
<el-icon><List /></el-icon>
|
||||
<span class="font-small">基本信息</span>
|
||||
</div>
|
||||
<div class="table-layout">
|
||||
|
@ -50,7 +50,7 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<svg-icon icon-class="marker" style="color: #606266"></svg-icon>
|
||||
<el-icon><List /></el-icon>
|
||||
<span class="font-small">收货人信息</span>
|
||||
</div>
|
||||
<div class="table-layout">
|
||||
|
@ -64,7 +64,7 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<svg-icon icon-class="marker" style="color: #606266"></svg-icon>
|
||||
<el-icon><List /></el-icon>
|
||||
<span class="font-small">商品信息</span>
|
||||
</div>
|
||||
<div class="table-layout">
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<style scoped>
|
||||
.wrapper{
|
||||
height: 100vh;
|
||||
background-image:url("../img/Login/登录底图.png");
|
||||
background-image:url(https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FzGMkHxQk-login.png);
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -1,243 +1,28 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <el-form ref="resetFormData" :model="form" label-width="auto" style="width: 750px" size="large">
|
||||
<el-form-item label="服装类别" prop="type">
|
||||
<el-select v-model="typeList.value" placeholder="请选择" @change="(event: any) => loadType(event)">
|
||||
<el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.type" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服装名称" prop="name">
|
||||
<el-select v-model="nameList.value" placeholder="请选择" @change="(event: any) => loadName(event)">
|
||||
<el-option v-for="item in nameList" :key="item.value" :label="item.label" :value="item.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form> -->
|
||||
|
||||
<el-calendar :disabled-date="disabledDate" class="disabledDate">
|
||||
<template #date-cell="{ data }">
|
||||
<p
|
||||
:class="[
|
||||
selectedDates.includes(data.day)? 'is-selected' : '',
|
||||
isFutureDate(data.day)? '' : 'disabled'
|
||||
]"
|
||||
@click="handleDateClick(data.day)"
|
||||
class="calendar-date-cell"
|
||||
>
|
||||
{{ data.day.split('-').slice(1).join('-') }}
|
||||
<span v-if="selectedDates.includes(data.day)">✔️</span>
|
||||
</p>
|
||||
</template>
|
||||
</el-calendar>
|
||||
<!--抽屉-->
|
||||
<el-drawer
|
||||
v-for="(drawerInfo, date) in dateDrawerData"
|
||||
:key="date"
|
||||
v-model="drawerInfo.visible"
|
||||
title="{{ date.split('-').slice(1).join('-') }}的时间段设置"
|
||||
:with-header="false"
|
||||
>
|
||||
<div style="margin-bottom: 10px">
|
||||
<el-button @click="addTimePickers(date)">添加时间段</el-button>
|
||||
<el-button @click="printSelectedTimePeriods(date)">保存</el-button>
|
||||
</div>
|
||||
<div v-for="(timeData, index) in drawerInfo.timeDataList" :key="index">
|
||||
<el-time-picker v-model="timeData.value1" placeholder="设置时间段" format="HH:mm" />
|
||||
<el-button @click="deleteTimePicker(index, date)">删除时间段</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">上架</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-scrollbar height="100px">
|
||||
<H2 v-for="item in 1" :key="item" class="scrollbar-demo-item">
|
||||
Scrollbar 滚动条内容{{ item }}:<br /><br />
|
||||
逆境清醒:<br />
|
||||
阳光总在风雨后,<br />
|
||||
历练中完成自我升华!<br />
|
||||
共勉!<br />
|
||||
</H2>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ElButton, ElTimePicker, ElDrawer } from 'element-plus'
|
||||
import myAxios from "@/api/myAxios"
|
||||
|
||||
const dateDrawerData : any = ref<{
|
||||
visible: boolean
|
||||
timeDataList: { value1: string; value2: [Date, Date] }[] //数组类型
|
||||
}>({
|
||||
visible: false, // 设定一个初始值
|
||||
timeDataList: [] // 设定一个初始值
|
||||
})
|
||||
|
||||
const addTimePickers = (date: number) => {
|
||||
if (!dateDrawerData.value[date]) {
|
||||
dateDrawerData.value[date] = {
|
||||
visible: false,
|
||||
timeDataList: []
|
||||
}
|
||||
}
|
||||
dateDrawerData.value[date].timeDataList.push({
|
||||
value1: '',
|
||||
value2: [new Date(), new Date()]
|
||||
})
|
||||
}
|
||||
|
||||
const deleteTimePicker = (index: number, date: any) => {
|
||||
if (dateDrawerData.value[date]) {
|
||||
dateDrawerData.value[date].timeDataList.splice(index, 1)
|
||||
}
|
||||
}
|
||||
|
||||
const printSelectedTimePeriods = (date: any) => {
|
||||
if (dateDrawerData.value[date]) {
|
||||
const selectedTimePeriods = dateDrawerData.value[date].timeDataList.map((timeData : any) => {
|
||||
return {
|
||||
time1: timeData.value1
|
||||
}
|
||||
})
|
||||
console.log(selectedTimePeriods);
|
||||
}
|
||||
}
|
||||
|
||||
const selectedDates = ref<string[]>([]) //选中的日期
|
||||
const disabledDate = (date: any) => { //判断日期是否是今天
|
||||
const today = new Date()
|
||||
const dateString = date.toISOString().split('T')[0]
|
||||
const todayString = today.toISOString().split('T')[0]
|
||||
return dateString < todayString
|
||||
}
|
||||
|
||||
const isFutureDate = (date: any) => {
|
||||
const today = new Date().toISOString().split('T')[0]
|
||||
return date >= today
|
||||
}
|
||||
|
||||
const handleDateClick = (date: any) => {
|
||||
const dateStr = date
|
||||
if (isFutureDate(dateStr)) {
|
||||
if (selectedDates.value.includes(dateStr)) {
|
||||
selectedDates.value = selectedDates.value.filter(d => d!== dateStr)
|
||||
} else {
|
||||
selectedDates.value.push(dateStr)
|
||||
if (!dateDrawerData.value[dateStr]) {
|
||||
dateDrawerData.value[dateStr] = {
|
||||
visible: true,
|
||||
timeDataList: []
|
||||
}
|
||||
} else {
|
||||
dateDrawerData.value[dateStr].visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getType();
|
||||
})
|
||||
|
||||
const form = ref({
|
||||
type: '',
|
||||
name: ''
|
||||
})
|
||||
|
||||
|
||||
const typeList = ref<{ type: string; label: string }[]>([])
|
||||
|
||||
const getType = async () => {
|
||||
const res = await myAxios.post('/clothesGrade/list', {})
|
||||
typeList.value = res.data.data.map((item: any) => ({
|
||||
type: item.clothesType,
|
||||
label: item.clothesType
|
||||
}))
|
||||
}
|
||||
|
||||
const nameList = ref<{ name: string; label: string }[]>([])
|
||||
|
||||
const loadType = (value: any) => {
|
||||
form.value.type = value
|
||||
getName()
|
||||
|
||||
}
|
||||
const loadName = (value: any) => {
|
||||
|
||||
form.value.name = value;
|
||||
}
|
||||
|
||||
const getName = async () => {
|
||||
const selectedType = form.value.type;
|
||||
const res = await myAxios.post('/clothesInfo/list/page', {
|
||||
clothesType: selectedType
|
||||
})
|
||||
console.log(selectedType, '1111111111111');
|
||||
nameList.value = res.data.data.records.map((item: any) => ({
|
||||
name: item.name,
|
||||
label: item.name
|
||||
}))
|
||||
}
|
||||
|
||||
//提交
|
||||
const onSubmit = () => {
|
||||
|
||||
}
|
||||
|
||||
//重置
|
||||
const resetForm = () => {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.demo-date-picker {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.demo-date-picker .block {
|
||||
padding: 30px 0;
|
||||
text-align: center;
|
||||
border-right: solid 1px var(--el-border-color);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.demo-date-picker .block:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.demo-date-picker .demonstration {
|
||||
display: block;
|
||||
color: var(--el-text-color-secondary);
|
||||
font-size: 14px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.example-basic .el-date-editor {
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.calendar-date-cell {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.is-selected {
|
||||
color: black;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.disabledDate{
|
||||
width: 550px;
|
||||
height: 280px;
|
||||
font-size: 12px;
|
||||
--el-calendar-cell-width: 30px;
|
||||
}
|
||||
.disabled {
|
||||
color: #dcdfe6;
|
||||
pointer-events: none;
|
||||
}
|
||||
.custom-calendar /deep/ .el-calendar-table .el-calendar-day{
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
.scrollbar-demo-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 400px;
|
||||
margin: 10px;
|
||||
padding:30px;
|
||||
width:300px;
|
||||
text-align: left;
|
||||
border-radius: 4px;
|
||||
background: var(--el-color-primary-light-9);
|
||||
color: var(--el-color-primary);
|
||||
border:5px solid #0094ff;
|
||||
}
|
||||
</style>
|
|
@ -5,6 +5,7 @@ import vue from '@vitejs/plugin-vue'
|
|||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
plugins: [
|
||||
vue(),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue
Block a user