1223
This commit is contained in:
parent
dbf31c9cb1
commit
cc39ee8869
|
|
@ -11,22 +11,33 @@ declare module 'vue' {
|
||||||
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
||||||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
||||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||||
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
|
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElImage: typeof import('element-plus/es')['ElImage']
|
ElImage: typeof import('element-plus/es')['ElImage']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
|
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
|
||||||
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
|
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
|
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||||
|
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||||
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
EquipCard: typeof import('./src/components/equipCard.vue')['default']
|
EquipCard: typeof import('./src/components/equipCard.vue')['default']
|
||||||
EquipDetailTable: typeof import('./src/components/equipDetailTable.vue')['default']
|
EquipDetailTable: typeof import('./src/components/equipDetailTable.vue')['default']
|
||||||
FooterInfo: typeof import('./src/components/FooterInfo/index.vue')['default']
|
FooterInfo: typeof import('./src/components/FooterInfo/index.vue')['default']
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ VITE_BUILD_MODE = 'dev'
|
||||||
VITE_API_URL = '/proxyApi'
|
VITE_API_URL = '/proxyApi'
|
||||||
|
|
||||||
# 开发环境接口地址
|
# 开发环境接口地址
|
||||||
VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
|
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
|
||||||
|
|
||||||
# VITE_proxyTarget = 'http://10.40.92.186:8080' # 赵福海 (登录)
|
VITE_proxyTarget = 'http://10.40.92.186:8080' # 赵福海 (登录)
|
||||||
|
|
||||||
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||||
# VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证)
|
# VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证)
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.8 MiB |
|
|
@ -35,8 +35,8 @@
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
// import { Base64 } from 'js-base64'
|
// import { Base64 } from 'js-base64'
|
||||||
const tmpUploadUrl = import.meta.env.VITE_API_URL + '/zlpt-file/file/cos/upload'
|
const tmpUploadUrl = import.meta.env.VITE_API_URL + '/zlpt-file/file/cos/upload'
|
||||||
import { useStore } from 'store/main'
|
import { mainStore } from 'store/main'
|
||||||
const store = useStore()
|
const store = mainStore()
|
||||||
const headerInfo = reactive({
|
const headerInfo = reactive({
|
||||||
Authorization: store.token
|
Authorization: store.token
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,8 @@ export const getOrderCountTotalApi = () => {
|
||||||
export const getEquipCountTotalApi = () => {
|
export const getEquipCountTotalApi = () => {
|
||||||
return get('/zlpt-equip/dev/sumType', {})
|
return get('/zlpt-equip/dev/sumType', {})
|
||||||
}
|
}
|
||||||
|
// 获取企业信息
|
||||||
|
export const getEnterpriseInfoApi = () => {
|
||||||
|
return get('/zlpt-company/company_info/getCompanyInfoByUserId', {})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import NProgress from 'nprogress'
|
import NProgress from 'nprogress'
|
||||||
import { useStore } from 'store/main'
|
import { mainStore } from 'store/main'
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import router from "@/router"
|
import router from "@/router"
|
||||||
const store = useStore()
|
const store = mainStore()
|
||||||
// const CancelToken = axios.CancelToken
|
// const CancelToken = axios.CancelToken
|
||||||
// const source = CancelToken.source()
|
// const source = CancelToken.source()
|
||||||
const baseUrl = import.meta.env.VITE_API_URL
|
const baseUrl = import.meta.env.VITE_API_URL
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import $bus from '@/utils/bus'
|
import $bus from '@/utils/bus'
|
||||||
import { useStore } from 'store/main'
|
import { mainStore } from 'store/main'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
const store = useStore()
|
const store = mainStore()
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import {createRouter, createWebHashHistory, RouteRecordRaw, useRouter} from 'vue-router'
|
import { createRouter, createWebHashHistory, RouteRecordRaw, useRouter } from 'vue-router'
|
||||||
import test from './module/test'
|
import test from './module/test'
|
||||||
import myInfo from './module/myInfo'
|
import myInfo from './module/myInfo'
|
||||||
|
|
||||||
import { useStore } from 'store/main'
|
import { mainStore } from 'store/main'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -117,8 +117,8 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
path: '/collect',
|
path: '/collect',
|
||||||
name: 'collect',
|
name: 'collect',
|
||||||
meta: {
|
meta: {
|
||||||
title: '我的收藏',
|
title: '我的收藏',
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
component: () => import('views/collect/index.vue')
|
component: () => import('views/collect/index.vue')
|
||||||
},
|
},
|
||||||
|
|
@ -144,7 +144,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '基础信息',
|
title: '基础信息',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '订单管理(求租)',
|
title: '订单管理(求租)',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
/* 订单管理(退租) */
|
/* 订单管理(退租) */
|
||||||
|
|
@ -169,7 +169,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '订单管理(退租)',
|
title: '订单管理(退租)',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
/* 订单管理(续租) */
|
/* 订单管理(续租) */
|
||||||
|
|
@ -181,7 +181,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '订单管理(续租)',
|
title: '订单管理(续租)',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -192,7 +192,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '子账号管理',
|
title: '子账号管理',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -203,7 +203,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '业务开通',
|
title: '业务开通',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -214,7 +214,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '订单管理(承租)',
|
title: '订单管理(承租)',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
/* 订单管理(结算) */
|
/* 订单管理(结算) */
|
||||||
|
|
@ -226,7 +226,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '订单管理(结算)',
|
title: '订单管理(结算)',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -237,7 +237,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '基础信息',
|
title: '基础信息',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -248,7 +248,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '基础信息',
|
title: '基础信息',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -259,7 +259,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '基础信息',
|
title: '基础信息',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -270,7 +270,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '订单详情',
|
title: '订单详情',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -281,7 +281,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
title: '订单确认',
|
title: '订单确认',
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
AuthFlag: false,
|
AuthFlag: false,
|
||||||
isLogin:true
|
isLogin: true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -302,14 +302,14 @@ const router = createRouter({
|
||||||
|
|
||||||
// 使页面跳转后滚动条恢复至顶部
|
// 使页面跳转后滚动条恢复至顶部
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
const store = useStore()
|
const store = mainStore()
|
||||||
if(to.meta.isLogin){
|
if (to.meta.isLogin) {
|
||||||
if(store.token){
|
if (store.token) {
|
||||||
next()
|
next()
|
||||||
}else {
|
} else {
|
||||||
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
|
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export const useStore = defineStore('main', {
|
export const mainStore = defineStore('main', {
|
||||||
state: () => {
|
state: () => {
|
||||||
return {
|
return {
|
||||||
loadingFlag: false, //loading控制,
|
loadingFlag: false, //loading控制,
|
||||||
|
|
@ -6,7 +6,12 @@ export const useStore = defineStore('main', {
|
||||||
// eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjQ1MzIwY2M3LTE0MDYtNDAwNy1iMTdhLTM3OTQ3ZmUxMjc2ZiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.XqWKkIRKVADdhGzNiOPNktmLJsv7bJCRZLDaSMJQALjhSyUBDTRGPE2KBWmb4qx3zV4fbsNGBHUODem1A7MEZA
|
// eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjQ1MzIwY2M3LTE0MDYtNDAwNy1iMTdhLTM3OTQ3ZmUxMjc2ZiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.XqWKkIRKVADdhGzNiOPNktmLJsv7bJCRZLDaSMJQALjhSyUBDTRGPE2KBWmb4qx3zV4fbsNGBHUODem1A7MEZA
|
||||||
|
|
||||||
// 搜索历史
|
// 搜索历史
|
||||||
searchHistoryList: []
|
searchHistoryList: [],
|
||||||
|
|
||||||
|
/* 用户企业信息 */
|
||||||
|
userInfo: {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getters: {},
|
getters: {},
|
||||||
|
|
@ -29,8 +34,15 @@ export const useStore = defineStore('main', {
|
||||||
// 添加
|
// 添加
|
||||||
addHistoryRecord(val: any) {
|
addHistoryRecord(val: any) {
|
||||||
this.searchHistoryList.unshift(val)
|
this.searchHistoryList.unshift(val)
|
||||||
|
},
|
||||||
|
|
||||||
|
/* 添加用户信息 */
|
||||||
|
setUserInfo(val: any) {
|
||||||
|
this.userInfo = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
persist: {
|
persist: {
|
||||||
enabled: true, // 开启数据缓存
|
enabled: true, // 开启数据缓存
|
||||||
|
|
@ -38,9 +50,9 @@ export const useStore = defineStore('main', {
|
||||||
{
|
{
|
||||||
// 自定义存储的 key,默认是 store.$id
|
// 自定义存储的 key,默认是 store.$id
|
||||||
key: 'main',
|
key: 'main',
|
||||||
storage: sessionStorage, //缓存模式 可选 localStorage sessionStorage
|
storage: localStorage, //缓存模式 可选 localStorage sessionStorage
|
||||||
// state 中的字段名,按组打包储存
|
// state 中的字段名,按组打包储存
|
||||||
paths: ['token', 'searchHistoryList'] //需要缓存的字段 与 state中相关联
|
paths: ['token', 'searchHistoryList', 'userInfo'] //需要缓存的字段 与 state中相关联
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import { ElMessage } from "element-plus"
|
import { ElMessage } from "element-plus"
|
||||||
import { useStore } from 'store/main'
|
import { mainStore } from 'store/main'
|
||||||
import router from "@/router"
|
import router from "@/router"
|
||||||
|
|
||||||
export default function (app: any) {
|
export default function (app: any) {
|
||||||
app.directive("authBtn", {
|
app.directive("authBtn", {
|
||||||
mounted(el: any, binding: any, vnode: any) {
|
mounted(el: any, binding: any, vnode: any) {
|
||||||
console.log("binding", binding.value)
|
console.log("binding", binding.value)
|
||||||
const store = useStore()
|
const store = mainStore()
|
||||||
if (!store.token) {
|
if (!store.token) {
|
||||||
el.addEventListener("click", () => {
|
el.addEventListener("click", () => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
|
@ -18,7 +18,7 @@ export default function (app: any) {
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
el.addEventListener("click", binding.value())
|
el.addEventListener("click", binding.value())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -664,7 +664,7 @@
|
||||||
return store.companyLtdList
|
return store.companyLtdList
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['closeAuthenticationDialog'])
|
const emit = defineEmits(['closeAuthenticationDialog', 'getUserInfo'])
|
||||||
|
|
||||||
// 提交认证按钮
|
// 提交认证按钮
|
||||||
const handlerSubmitBtn = async () => {
|
const handlerSubmitBtn = async () => {
|
||||||
|
|
@ -685,6 +685,7 @@
|
||||||
})
|
})
|
||||||
// 关闭弹框
|
// 关闭弹框
|
||||||
emit('closeAuthenticationDialog', false)
|
emit('closeAuthenticationDialog', false)
|
||||||
|
emit('getUserInfo')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { loginApi } from 'http/api/login/index'
|
import { loginApi } from 'http/api/login/index'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import {useRoute, useRouter} from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { useStore } from 'store/main'
|
import { mainStore } from 'store/main'
|
||||||
const userStore = useStore()
|
const userStore = mainStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
|
|
@ -22,11 +22,22 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
userStore.setToken(res.data.access_token)
|
userStore.setToken(res.data.access_token)
|
||||||
|
if (res.data.user) {
|
||||||
|
userStore.setUserInfo(res.data.user)
|
||||||
|
} else {
|
||||||
|
userStore.setUserInfo({
|
||||||
|
phonenumber: '',
|
||||||
|
companyName: '',
|
||||||
|
logoUrl:
|
||||||
|
'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/2023/12/09/815629f192564db98ac55a643b46f853gouwu.png'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 跳转登录页面
|
// 跳转登录页面
|
||||||
|
|
||||||
if(route.query && route.query.redirect){
|
if (route.query && route.query.redirect) {
|
||||||
router.push(decodeURIComponent(route.query.redirect))
|
router.push(decodeURIComponent(route.query.redirect))
|
||||||
}else {
|
} else {
|
||||||
router.push('/home')
|
router.push('/home')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -75,6 +86,9 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
background: url('../assets/img/home/2023_12_01_beijing2/login_bg.png') no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
height: 360px;
|
height: 360px;
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
import EquipCard from 'components/equipCard.vue'
|
import EquipCard from 'components/equipCard.vue'
|
||||||
import NavMenu from 'components/Navmenu/index.vue'
|
import NavMenu from 'components/Navmenu/index.vue'
|
||||||
import { getGoodsClassListApi } from 'http/api/home'
|
import { getGoodsClassListApi } from 'http/api/home'
|
||||||
import { useStore } from 'store/main'
|
import { mainStore } from 'store/main'
|
||||||
import { getHotList } from 'http/api/equip'
|
import { getHotList } from 'http/api/equip'
|
||||||
import {reactive, ref} from "vue";
|
import { reactive, ref } from 'vue'
|
||||||
import baseData from "@/assets/baseInformation.json"
|
import baseData from '@/assets/baseInformation.json'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
|
|
@ -28,41 +28,40 @@
|
||||||
getGoodsClassList()
|
getGoodsClassList()
|
||||||
|
|
||||||
const handlerGoodsDetails = (...arg) => {
|
const handlerGoodsDetails = (...arg) => {
|
||||||
const arr = arg.map((key,index) => {
|
const arr = arg.map((key, index) => {
|
||||||
return {
|
return {
|
||||||
level: index + 1 + '',
|
level: index + 1 + '',
|
||||||
typeId:key.id,
|
typeId: key.id,
|
||||||
typeName:key.name
|
typeName: key.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
router.push({
|
router.push({
|
||||||
name:'equipList',
|
name: 'equipList',
|
||||||
state:{ typeTag:arr }
|
state: { typeTag: arr }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const goInformation = (id) => {
|
const goInformation = (id) => {
|
||||||
router.push({
|
router.push({
|
||||||
path:`/consultationDetails/${id}`
|
path: `/consultationDetails/${id}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const detailsList = ref([])
|
const detailsList = ref([])
|
||||||
|
|
||||||
const handelInformation = () => {
|
const handelInformation = () => {
|
||||||
detailsList.value = baseData.map(item => {
|
detailsList.value = baseData.map((item) => {
|
||||||
return {
|
return {
|
||||||
v_title:item.title,
|
v_title: item.title,
|
||||||
v_content_info:'',
|
v_content_info: '',
|
||||||
v_time:`[${item.create_time}]`,
|
v_time: `[${item.create_time}]`,
|
||||||
id:item.id
|
id: item.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
handelInformation()
|
handelInformation()
|
||||||
|
|
||||||
|
|
||||||
const hotDeviceList: any = ref([])
|
const hotDeviceList: any = ref([])
|
||||||
|
|
||||||
/* 获取热搜装备 */
|
/* 获取热搜装备 */
|
||||||
|
|
@ -79,7 +78,6 @@
|
||||||
const onClick = (val: any) => {
|
const onClick = (val: any) => {
|
||||||
router.push(`/equipDetail/${val.id}`)
|
router.push(`/equipDetail/${val.id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -100,7 +98,7 @@
|
||||||
<a
|
<a
|
||||||
v-for="son in child.children"
|
v-for="son in child.children"
|
||||||
:key="son.id"
|
:key="son.id"
|
||||||
@click="handlerGoodsDetails(item,child,son)">
|
@click="handlerGoodsDetails(item, child, son)">
|
||||||
{{ son.name }}
|
{{ son.name }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -114,12 +112,9 @@
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<div class="swpier-img">
|
<div class="swpier-img">
|
||||||
<el-carousel :interval="5000" arrow="always" height="437px">
|
<el-carousel :interval="5000" arrow="always" height="437px">
|
||||||
<el-carousel-item v-for="(item,index) in loopList" :key="index">
|
<el-carousel-item v-for="(item, index) in loopList" :key="index">
|
||||||
<!-- <h3 text="2xl" justify="center">{{ item }}</h3> -->
|
<!-- <h3 text="2xl" justify="center">{{ item }}</h3> -->
|
||||||
<el-image
|
<el-image style="width: 100%" :src="item" fit="cover" />
|
||||||
style="width: 100%"
|
|
||||||
:src="item"
|
|
||||||
fit="cover" />
|
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -193,11 +188,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.el-carousel__container){
|
:deep(.el-carousel__container) {
|
||||||
.el-carousel__item{
|
.el-carousel__item {
|
||||||
.el-image{
|
.el-image {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
img{
|
img {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -333,7 +328,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
li {
|
li {
|
||||||
width: calc((100% - 30px) / 3);
|
width: calc((100% - 30px) / 3);
|
||||||
&:nth-child(2n){
|
&:nth-child(2n) {
|
||||||
margin: 0 15px;
|
margin: 0 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,17 @@
|
||||||
import {
|
import {
|
||||||
applyAttestationApi,
|
applyAttestationApi,
|
||||||
getOrderCountTotalApi,
|
getOrderCountTotalApi,
|
||||||
getEquipCountTotalApi
|
getEquipCountTotalApi,
|
||||||
|
getEnterpriseInfoApi
|
||||||
} from 'http/api/usercenter/baseinfo'
|
} from 'http/api/usercenter/baseinfo'
|
||||||
|
|
||||||
|
import { mainStore } from 'store/main'
|
||||||
|
const store = mainStore()
|
||||||
|
|
||||||
|
const userInfo: any = computed(() => {
|
||||||
|
return store.userInfo
|
||||||
|
})
|
||||||
|
|
||||||
const applyParams: any = reactive({})
|
const applyParams: any = reactive({})
|
||||||
|
|
||||||
// 申请企业认证
|
// 申请企业认证
|
||||||
|
|
@ -27,7 +35,9 @@
|
||||||
getOrderCountTotal()
|
getOrderCountTotal()
|
||||||
getEquipCountTotal()
|
getEquipCountTotal()
|
||||||
// 旧手机号码
|
// 旧手机号码
|
||||||
const oldPhoneNumber = ref('15336652321')
|
const oldPhoneNumber = computed(() => {
|
||||||
|
return store.userInfo.phonenumber
|
||||||
|
})
|
||||||
// 修改新手机号码的数据源
|
// 修改新手机号码的数据源
|
||||||
const editForm = reactive({
|
const editForm = reactive({
|
||||||
v_phone: ''
|
v_phone: ''
|
||||||
|
|
@ -149,13 +159,32 @@
|
||||||
const getImg = (imgUrl: string) => {
|
const getImg = (imgUrl: string) => {
|
||||||
return new URL(imgUrl, import.meta.url).href
|
return new URL(imgUrl, import.meta.url).href
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 获取企业信息 */
|
||||||
|
const getEnterpriseInfo = async () => {
|
||||||
|
const res: any = await getEnterpriseInfoApi()
|
||||||
|
if (res.code === 200) {
|
||||||
|
store.setUserInfo({
|
||||||
|
phonenumber: res.data.authPhone,
|
||||||
|
companyName: res.data.companyName,
|
||||||
|
logoUrl: res.data.logoUrl,
|
||||||
|
companyId: res.data.companyId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getEnterpriseInfo()
|
||||||
|
|
||||||
|
const getUserInfo = () => {
|
||||||
|
getEnterpriseInfo()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<div class="base-info">
|
<div class="base-info">
|
||||||
<div class="title-info">
|
<div class="title-info">
|
||||||
<div class="number-box">{{ oldPhoneNumber }}</div>
|
<div class="number-box">{{ userInfo.phonenumber || '' }}</div>
|
||||||
|
|
||||||
<div class="user-name">
|
<div class="user-name">
|
||||||
<span class="free-user active-user">免费用户</span>
|
<span class="free-user active-user">免费用户</span>
|
||||||
|
|
@ -180,8 +209,12 @@
|
||||||
<div class="title-info">
|
<div class="title-info">
|
||||||
<div class="my-enterprise">
|
<div class="my-enterprise">
|
||||||
<span>我的企业:</span>
|
<span>我的企业:</span>
|
||||||
<span @click="handlerApplyFor" style="cursor: pointer">申请企业认证</span>
|
<span v-if="!userInfo.companyName" @click="handlerApplyFor" style="cursor: pointer">
|
||||||
<span class="enterprise-name">安徽博诺斯信息科技有限公司 (申请被驳回)</span>
|
申请企业认证
|
||||||
|
</span>
|
||||||
|
<span v-else class="enterprise-name">{{ userInfo.companyName || '' }}</span>
|
||||||
|
|
||||||
|
<!-- <span>状态</span> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2>订单交易</h2>
|
<h2>订单交易</h2>
|
||||||
|
|
@ -239,7 +272,9 @@
|
||||||
|
|
||||||
<!-- 申请企业认证弹框 -->
|
<!-- 申请企业认证弹框 -->
|
||||||
<el-dialog v-model="certificationVisible" title="申请企业认证" width="80%" align-center>
|
<el-dialog v-model="certificationVisible" title="申请企业认证" width="80%" align-center>
|
||||||
<EnterpriseCertification @closeAuthenticationDialog="closeAuthenticationDialog" />
|
<EnterpriseCertification
|
||||||
|
@closeAuthenticationDialog="closeAuthenticationDialog"
|
||||||
|
@getUserInfo="getUserInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -284,6 +319,7 @@
|
||||||
|
|
||||||
.enterprise-name {
|
.enterprise-name {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
import { useStore } from 'store/user'
|
import { useStore } from 'store/user'
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
|
||||||
|
import { mainStore } from 'store/main'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
equipmentDeploymentApi,
|
equipmentDeploymentApi,
|
||||||
getEquipmentListApi,
|
getEquipmentListApi,
|
||||||
|
|
@ -100,6 +102,8 @@
|
||||||
* 商品入驻弹框参数
|
* 商品入驻弹框参数
|
||||||
*/
|
*/
|
||||||
const equipmentDeploymentParams: any = ref({
|
const equipmentDeploymentParams: any = ref({
|
||||||
|
/* 企业Id */
|
||||||
|
ownCo: mainStore().userInfo.companyId,
|
||||||
/* 租赁范围 */
|
/* 租赁范围 */
|
||||||
leaseScope: '',
|
leaseScope: '',
|
||||||
/* 设备所在地 */
|
/* 设备所在地 */
|
||||||
|
|
@ -237,6 +241,8 @@
|
||||||
const equipmentDeployment = () => {
|
const equipmentDeployment = () => {
|
||||||
isEditDisabled.value = true
|
isEditDisabled.value = true
|
||||||
equipmentDeploymentParams.value = {
|
equipmentDeploymentParams.value = {
|
||||||
|
/* 企业Id */
|
||||||
|
ownCo: mainStore().userInfo.companyId,
|
||||||
/* 租赁范围 */
|
/* 租赁范围 */
|
||||||
leaseScope: '',
|
leaseScope: '',
|
||||||
/* 设备所在地 */
|
/* 设备所在地 */
|
||||||
|
|
@ -410,8 +416,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="typeName" label="装备类型" />
|
<el-table-column align="center" prop="typeName" label="装备类型" />
|
||||||
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
||||||
<el-table-column align="center" prop="monthLeasePrice" label="租金" />
|
<el-table-column align="center" label="租金">
|
||||||
<el-table-column align="center" label="状态">
|
<template #default="{ row }">
|
||||||
|
<el-tag size="small">{{ row.monthLeasePrice + '/月' }}</el-tag>
|
||||||
|
<el-tag size="small">{{ row.dayLeasePrice + '/天' }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="状态" width="80px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.maStatus == 15" size="small" type="info">待上架</el-tag>
|
<el-tag v-if="row.maStatus == 15" size="small" type="info">待上架</el-tag>
|
||||||
<el-tag v-if="row.maStatus == 16" size="small" type="warning">待租</el-tag>
|
<el-tag v-if="row.maStatus == 16" size="small" type="warning">待租</el-tag>
|
||||||
|
|
|
||||||
|
|
@ -188,8 +188,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="typeName" label="装备类型" />
|
<el-table-column align="center" prop="typeName" label="装备类型" />
|
||||||
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
||||||
<el-table-column align="center" prop="monthLeasePrice" label="租金" />
|
<el-table-column align="center" label="租金">
|
||||||
<el-table-column align="center" label="状态">
|
<template #default="{ row }">
|
||||||
|
<el-tag size="small">{{ row.monthLeasePrice + '/月' }}</el-tag>
|
||||||
|
<el-tag size="small">{{ row.dayLeasePrice + '/天' }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="状态" width="80px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.maStatus == 15" size="small" type="info">待上架</el-tag>
|
<el-tag v-if="row.maStatus == 15" size="small" type="info">待上架</el-tag>
|
||||||
<el-tag v-if="row.maStatus == 16" size="small" type="warning">待租</el-tag>
|
<el-tag v-if="row.maStatus == 16" size="small" type="warning">待租</el-tag>
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,16 @@
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useStore } from '../../store/user'
|
import { useStore } from '../../store/user'
|
||||||
|
import { mainStore } from '../../store/main'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
|
const userInfo: any = computed(() => {
|
||||||
|
return mainStore().userInfo
|
||||||
|
})
|
||||||
|
|
||||||
// 求租按钮
|
// 求租按钮
|
||||||
const seekingRentClick = () => {
|
const seekingRentClick = () => {
|
||||||
store.editcurrentMenuItem('baseInfo')
|
store.editcurrentMenuItem('baseInfo')
|
||||||
|
|
@ -15,7 +20,7 @@
|
||||||
{ title: '基础信息', name: 'baseInfo' },
|
{ title: '基础信息', name: 'baseInfo' },
|
||||||
{ title: '订单管理', name: 'orderManagement' },
|
{ title: '订单管理', name: 'orderManagement' },
|
||||||
{ title: '子账号管理', name: 'subAccount' },
|
{ title: '子账号管理', name: 'subAccount' },
|
||||||
{ title: '业务开通', name: 'business' },
|
{ title: '业务开通', name: 'business' }
|
||||||
])
|
])
|
||||||
router.push({ name: 'baseInfo' })
|
router.push({ name: 'baseInfo' })
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +61,7 @@
|
||||||
{ title: '基础信息', name: 'baseInfo' },
|
{ title: '基础信息', name: 'baseInfo' },
|
||||||
{ title: '订单管理', name: 'orderManagement' },
|
{ title: '订单管理', name: 'orderManagement' },
|
||||||
{ title: '子账号管理', name: 'subAccount' },
|
{ title: '子账号管理', name: 'subAccount' },
|
||||||
{ title: '业务开通', name: 'business' },
|
{ title: '业务开通', name: 'business' }
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -68,8 +73,13 @@
|
||||||
<div class="left-menu">
|
<div class="left-menu">
|
||||||
<!-- 头像 -->
|
<!-- 头像 -->
|
||||||
<div class="pic-box">
|
<div class="pic-box">
|
||||||
<img src="../../assets/img/bns-logo.png" alt="" />
|
<img v-if="userInfo.logoUrl" :src="userInfo.logoUrl" alt="" />
|
||||||
<span>15336652321</span>
|
|
||||||
|
<img
|
||||||
|
v-else
|
||||||
|
src="https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/2023/12/09/815629f192564db98ac55a643b46f853gouwu.png"
|
||||||
|
alt="" />
|
||||||
|
<span>{{ userInfo.phonenumber || '' }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
<el-tag v-if="row.orderStatus == 36">进行中</el-tag>
|
<el-tag v-if="row.orderStatus == 36">进行中</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="left" prop="name" label="操作" width="160px">
|
<el-table-column align="center" prop="name" label="操作" width="160px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" type="primary" @click="clickPreviewDetails(scope.row)">
|
<el-button size="small" type="primary" @click="clickPreviewDetails(scope.row)">
|
||||||
查看
|
查看
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,14 @@
|
||||||
<el-table-column align="center" prop="orderPhone" label="联系方式" />
|
<el-table-column align="center" prop="orderPhone" label="联系方式" />
|
||||||
<el-table-column align="center" prop="typeName" label="装备类型" />
|
<el-table-column align="center" prop="typeName" label="装备类型" />
|
||||||
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
||||||
<el-table-column align="center" prop="orderStatus" label="订单状态" />
|
<el-table-column align="center" label="订单状态">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.orderStatus == 31">待确认</el-tag>
|
||||||
|
<el-tag v-if="row.orderStatus == 32">合同待上传</el-tag>
|
||||||
|
<el-tag v-if="row.orderStatus == 35">待收货</el-tag>
|
||||||
|
<el-tag v-if="row.orderStatus == 36">进行中</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="name" label="操作" width="260px">
|
<el-table-column align="center" prop="name" label="操作" width="260px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue