冲突合并
This commit is contained in:
commit
3c60789c2c
|
|
@ -3,46 +3,25 @@
|
|||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
export { }
|
||||
export {}
|
||||
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default']
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElStep: typeof import('element-plus/es')['ElStep']
|
||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||
EquipCard: typeof import('./src/components/equipCard.vue')['default']
|
||||
EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default']
|
||||
EquipCardNew: typeof import('./src/components/equipCardNew/index.vue')['default']
|
||||
EquipDetailTable: typeof import('./src/components/equipDetailTable.vue')['default']
|
||||
FooterInfo: typeof import('./src/components/FooterInfo/index.vue')['default']
|
||||
FormComponent: typeof import('./src/components/FormComponent/index.vue')['default']
|
||||
Header: typeof import('./src/components/header/index.vue')['default']
|
||||
Navmenu: typeof import('./src/components/Navmenu/index.vue')['default']
|
||||
PagingComponent: typeof import('./src/components/PagingComponent/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
TableComponent: typeof import('./src/components/TableComponent/index.vue')['default']
|
||||
UploadComponent: typeof import('./src/components/uploadComponent/index.vue')['default']
|
||||
UploadImg: typeof import('./src/components/uploadImg.vue')['default']
|
||||
}
|
||||
export interface GlobalComponents {
|
||||
Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default']
|
||||
EquipCard: typeof import('./src/components/equipCard.vue')['default']
|
||||
EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default']
|
||||
EquipCardNew: typeof import('./src/components/equipCardNew/index.vue')['default']
|
||||
EquipDetailTable: typeof import('./src/components/equipDetailTable.vue')['default']
|
||||
FooterInfo: typeof import('./src/components/FooterInfo/index.vue')['default']
|
||||
FormComponent: typeof import('./src/components/FormComponent/index.vue')['default']
|
||||
Header: typeof import('./src/components/header/index.vue')['default']
|
||||
Navmenu: typeof import('./src/components/Navmenu/index.vue')['default']
|
||||
PagingComponent: typeof import('./src/components/PagingComponent/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
TableComponent: typeof import('./src/components/TableComponent/index.vue')['default']
|
||||
UploadComponent: typeof import('./src/components/uploadComponent/index.vue')['default']
|
||||
UploadComponentNew: typeof import('./src/components/uploadComponentNew/index.vue')['default']
|
||||
UploadImg: typeof import('./src/components/uploadImg.vue')['default']
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ VITE_API_URL = '/proxyApi'
|
|||
# 开发环境接口地址
|
||||
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
|
||||
|
||||
VITE_proxyTarget = 'http://192.168.2.246:18080' # 马帅
|
||||
VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
|
||||
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
|
||||
# VITE_proxyTarget = 'http://192.168.2.129:18080' # 马帅
|
||||
|
||||
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||
|
|
|
|||
|
|
@ -94,9 +94,11 @@ const onSelectRoles = (type: number) => {
|
|||
if (type === 1) {
|
||||
rolesName.value = '出租方'
|
||||
userStore.editMenuList(1)
|
||||
userStore.editUserMenuList(1)
|
||||
} else {
|
||||
rolesName.value = '承租方'
|
||||
userStore.editMenuList(2)
|
||||
userStore.editUserMenuList(2)
|
||||
}
|
||||
isRolesSelect.value = false
|
||||
}
|
||||
|
|
@ -155,7 +157,7 @@ const onCarts = () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<a @click="$router.push({ name: 'myuser' })">个人中心</a>
|
||||
<a @click="$router.push({ name: 'my-user' })">个人中心</a>
|
||||
</div>
|
||||
<div class="header-item last-item">
|
||||
<img src="../../assets/img/home/phone.png" alt="" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,246 @@
|
|||
<template>
|
||||
<div class="upload_ss_c">
|
||||
<!--action="/api/abk/web/v1/resource/file" -->
|
||||
<el-upload
|
||||
:action="props.actionUrl"
|
||||
:auto-upload="props.autoUpload"
|
||||
:headers="headerInfo"
|
||||
style="width: 100%"
|
||||
:on-success="(response:any, file:any) => successUpload(response, file)"
|
||||
:on-error="errorUpload"
|
||||
:accept="props.acceptTypeList.join(',')"
|
||||
:before-upload="beforeUpload"
|
||||
:multiple="props.multiple"
|
||||
:limit="props.maxLimit"
|
||||
:on-exceed="handleExceed"
|
||||
:file-list="props.fileList"
|
||||
:disabled="props.disabledFlag"
|
||||
:on-change="changeFileFn"
|
||||
:on-remove="(file:any, fileList:any) => removeFile(file, fileList)"
|
||||
:on-preview="(file:any) => preview(file)"
|
||||
:on-progress="(event:any, file:any, fileList:any) => onProgressFn(event, file, fileList)"
|
||||
:list-type="props.listType"
|
||||
>
|
||||
<!-- 上传的按钮 或者 icon 通过具名插槽的方式 -->
|
||||
<div>
|
||||
<slot name="default"></slot>
|
||||
</div>
|
||||
<slot name="textContent"></slot>
|
||||
</el-upload>
|
||||
<el-progress v-if="showProcessFlag && processFlag" :percentage="loadProcess"></el-progress>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
// import { Base64 } from 'js-base64'
|
||||
// const tmpUploadUrl = import.meta.env.VITE_API_URL + '/zlpt-file/file/cos/upload'
|
||||
import { mainStore } from 'store/main'
|
||||
const store = mainStore()
|
||||
const headerInfo = reactive({
|
||||
Authorization: store.token,
|
||||
})
|
||||
|
||||
// console.log('tmpUploadUrl', tmpUploadUrl)
|
||||
// const actionUrl = ref(tmpUploadUrl)
|
||||
const props = defineProps({
|
||||
actionUrl: {
|
||||
//上传的地址
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
width: {
|
||||
//上传的地址
|
||||
type: String,
|
||||
default: '72px',
|
||||
},
|
||||
height: {
|
||||
//上传的地址
|
||||
type: String,
|
||||
default: '72px',
|
||||
},
|
||||
autoUpload: {
|
||||
//是否开启自动上传
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
acceptTypeList: {
|
||||
//接受的文件类型
|
||||
type: Array,
|
||||
default: () => {
|
||||
return ['.jpg', '.jpeg', '.png']
|
||||
},
|
||||
},
|
||||
multiple: {
|
||||
//是否开启多图上传
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
maxLimit: {
|
||||
// 最大上传个数限制
|
||||
type: Number || String,
|
||||
default: 1,
|
||||
},
|
||||
maxSize: {
|
||||
// 文件上传的最大体积 M
|
||||
type: Number || String,
|
||||
default: 10,
|
||||
},
|
||||
disabledFlag: {
|
||||
//是否禁用
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
fileList: {
|
||||
//文件列表
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
listType: {
|
||||
type: String, //'text' | 'picture' | 'picture-card'
|
||||
default: 'picture',
|
||||
},
|
||||
extraData: {}, //上传时的额外参数 如 name等
|
||||
|
||||
/*
|
||||
{
|
||||
name:'12321'
|
||||
}
|
||||
*/
|
||||
dragFlag: {
|
||||
type: Boolean,
|
||||
default: true, //是否启用拖拽上传 此处默认启用 element 官方默认是 不启用的
|
||||
},
|
||||
downLoadTypeList: {
|
||||
//需要下载的文件类型
|
||||
type: Array,
|
||||
default: () => {
|
||||
return ['doc', 'docx', 'xlsx', 'xls', 'txt']
|
||||
},
|
||||
},
|
||||
preveiwTypeList: {
|
||||
//需要预览的文件类型
|
||||
type: Array,
|
||||
default: () => {
|
||||
return ['pdf', 'jpg', 'jpeg', 'png']
|
||||
},
|
||||
},
|
||||
officePreviewFlag: {
|
||||
//是否启用office在线预览
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
showProcessFlag: {
|
||||
//是否显示进度条
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
scuccesCallback: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
successResultCallBack: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
})
|
||||
// office预览
|
||||
// https://view.officeapps.live.com/op/view.aspx?src=
|
||||
// https://view.officeapps.live.com/op/view.aspx?src=文档地址
|
||||
//
|
||||
|
||||
const officeOnlineAddress = 'https://view.officeapps.live.com/op/view.aspx?src='
|
||||
const officeType = ['doc', 'docx', 'xlsx', 'xls']
|
||||
let processFlag = ref(false) //是否显示进度条
|
||||
let loadProcess = ref(0) //进度条的刻度值
|
||||
|
||||
// 上传图片 成功
|
||||
const successUpload = (response: any, file: any) => {
|
||||
console.log('successUpload', response, file)
|
||||
if (response.code === 200) {
|
||||
props.fileList.push({
|
||||
url: response.data,
|
||||
name: file.name,
|
||||
})
|
||||
props.successResultCallBack(response)
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: response.data,
|
||||
})
|
||||
}
|
||||
}
|
||||
const errorUpload = (res: any) => {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '上传失败请重试!',
|
||||
})
|
||||
}
|
||||
const beforeUpload = (file: any) => {
|
||||
console.log('file', file)
|
||||
const { name = '', size } = file
|
||||
if (size > props.maxSize * 1024 * 1000) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: `文件大小不能超过${props.maxSize}M`,
|
||||
})
|
||||
return false
|
||||
}
|
||||
let names = name.split('.')
|
||||
let currentName = names[names.length - 1]
|
||||
console.log('acceptTypeListacceptTypeList', props.acceptTypeList, currentName)
|
||||
console.log('name.split().pop()')
|
||||
if (!props.acceptTypeList.includes('.' + currentName)) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: `文件格式仅支持${props.acceptTypeList.join(',')}`,
|
||||
})
|
||||
return false
|
||||
}
|
||||
}
|
||||
const handleExceed = (files: any, fileList: any) => {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: `最多只能上传${props.maxLimit}个文件`,
|
||||
})
|
||||
}
|
||||
// 移除文件
|
||||
const removeFile = (file: any, data: any) => {
|
||||
console.log(file, data)
|
||||
// props.fileList = data
|
||||
}
|
||||
// 预览
|
||||
const preview = (data: any) => {
|
||||
console.log(data, '****预览文件')
|
||||
return
|
||||
}
|
||||
|
||||
const onProgressFn = (event: any, file: any, fileList: any) => {
|
||||
processFlag.value = true
|
||||
loadProcess.value = event.percent.toFixed(2)
|
||||
if (loadProcess.value >= 100) {
|
||||
loadProcess.value = 100
|
||||
nextTick(() => {
|
||||
processFlag.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
const changeFileFn = (ev: any) => {
|
||||
props.scuccesCallback(ev)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload) {
|
||||
width: v-bind('props.width') !important;
|
||||
height: v-bind('props.height') !important;
|
||||
}
|
||||
:deep(.el-upload-list__item) {
|
||||
width: v-bind('props.width') !important;
|
||||
height: v-bind('props.height') !important;
|
||||
}
|
||||
</style>
|
||||
<style></style>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import { get, post } from '../../index'
|
||||
|
||||
// 需求管理新增
|
||||
export const addLeaseInfoApi = (data: any) => {
|
||||
return post('/material-mall/ma-lease/add', data)
|
||||
}
|
||||
// 需求列表查询
|
||||
export const getLeaseListApi = () => {
|
||||
return get('/material-mall/ma-lease/list', {})
|
||||
}
|
||||
// 删除
|
||||
export const deleteLeaseInfoApi = () => {
|
||||
return get('/material-mall/ma-lease/list', {})
|
||||
}
|
||||
|
|
@ -106,9 +106,11 @@ const onSelectRoles = (type: number) => {
|
|||
if (type === 1) {
|
||||
rolesName.value = '出租方'
|
||||
userStore.editMenuList(1)
|
||||
userStore.editUserMenuList(1)
|
||||
} else {
|
||||
rolesName.value = '承租方'
|
||||
userStore.editMenuList(2)
|
||||
userStore.editUserMenuList(2)
|
||||
}
|
||||
isRolesSelect.value = false
|
||||
}
|
||||
|
|
@ -167,7 +169,7 @@ const onCarts = () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<a @click="$router.push({ name: 'myuser' })">个人中心</a>
|
||||
<a @click="$router.push({ name: 'my-user' })">个人中心</a>
|
||||
</div>
|
||||
<div class="header-item last-item">
|
||||
<img src="../assets/img/home/phone.png" alt="" />
|
||||
|
|
|
|||
|
|
@ -187,231 +187,219 @@ const routes: Array<RouteRecordRaw> = [
|
|||
},
|
||||
component: () => import('views/enterpriseZone/index.vue')
|
||||
},
|
||||
// 个人中心
|
||||
],
|
||||
},
|
||||
|
||||
// 个人中心
|
||||
{
|
||||
path: '/my-user', // 主路由地址
|
||||
name: 'my-user',
|
||||
component: () => import('views/user/index.vue'), // 组件加载
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
keepAlive: false,
|
||||
AuthFlag: false
|
||||
},
|
||||
redirect: '/my-user/baseInfo',
|
||||
children: [
|
||||
|
||||
/* 基础信息 */
|
||||
{
|
||||
path: '/myuser', // 主路由地址
|
||||
name: 'myuser',
|
||||
component: () => import('views/user/index.vue'), // 组件加载
|
||||
path: 'baseInfo',
|
||||
name: 'baseInfo',
|
||||
component: () => import('views/user/baseInfo/index.vue'),
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
keepAlive: false,
|
||||
AuthFlag: false
|
||||
title: '基础信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
redirect: '/myuser/baseInfo',
|
||||
children: [
|
||||
},
|
||||
|
||||
/* 基础信息 */
|
||||
{
|
||||
path: 'baseInfo',
|
||||
name: 'baseInfo',
|
||||
component: () => import('views/user/baseInfo/index.vue'),
|
||||
meta: {
|
||||
title: '基础信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
|
||||
/* 订单管理(求租方) */
|
||||
{
|
||||
path: 'orderManagement',
|
||||
name: 'orderManagement',
|
||||
component: () => import('@/views/user/orderManagement/index.vue'),
|
||||
meta: {
|
||||
title: '订单管理(求租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 订单管理(订单详情) */
|
||||
{
|
||||
path: 'orderManagementInfo',
|
||||
name: 'orderManagementInfo',
|
||||
component: () => import('@/views/user/orderManagement/detail.vue'),
|
||||
meta: {
|
||||
title: '订单详情',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: false
|
||||
},
|
||||
},
|
||||
/* 订单管理(退租) */
|
||||
{
|
||||
path: 'rentinTermination',
|
||||
name: 'rentinTermination',
|
||||
component: () => import('views/user/orderManagement/orderCom/rentinTermination.vue'),
|
||||
meta: {
|
||||
title: '订单管理(退租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 订单管理(续租) */
|
||||
{
|
||||
path: 'renewalOfLease',
|
||||
name: 'renewalOfLease',
|
||||
component: () => import('views/user/orderManagement/orderCom/renewalOfLease.vue'),
|
||||
meta: {
|
||||
title: '订单管理(续租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'subAccount',
|
||||
name: 'subAccount',
|
||||
component: () => import('views/user/subAccount/index.vue'),
|
||||
meta: {
|
||||
title: '子账号管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'business',
|
||||
name: 'business',
|
||||
component: () => import('views/user/business/index.vue'),
|
||||
meta: {
|
||||
title: '业务开通',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 寻源需求 */
|
||||
{
|
||||
path: 'sourcingNeed',
|
||||
name: 'sourcingNeed',
|
||||
component: () => import('views/user/sourcingNeed/index.vue'),
|
||||
meta: {
|
||||
title: '寻源需求',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'orderManagementCz',
|
||||
name: 'orderManagementCz',
|
||||
component: () => import('views/user/orderManagementCz/index.vue'),
|
||||
meta: {
|
||||
title: '订单管理(承租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 订单管理(结算) */
|
||||
{
|
||||
path: 'settlement',
|
||||
name: 'settlement',
|
||||
component: () => import('views/user/orderManagementCz/settlement/index.vue'),
|
||||
meta: {
|
||||
title: '订单管理(结算)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'goodsManagement',
|
||||
name: 'goodsManagement',
|
||||
component: () => import('views/user/goodsManagement/index.vue'),
|
||||
meta: {
|
||||
title: '基础信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'goodsUpdown',
|
||||
name: 'goodsUpdown',
|
||||
component: () => import('views/user/goodsUpdown/index.vue'),
|
||||
meta: {
|
||||
title: '基础信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'operatorManagement',
|
||||
name: 'operatorManagement',
|
||||
component: () => import('views/user/operatorManagement/index.vue'),
|
||||
meta: {
|
||||
title: '基础信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'orderDetails',
|
||||
name: 'orderDetails',
|
||||
component: () => import('@/views/user/orderManagement/orderCom/orderDetails.vue'),
|
||||
meta: {
|
||||
title: '订单详情',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'orderConfirm',
|
||||
name: 'orderConfirm',
|
||||
component: () => import('views/user/orderManagement/orderCom/orderConfirm.vue'),
|
||||
meta: {
|
||||
title: '订单确认',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'sourcingBidding',
|
||||
name: 'sourcingBidding',
|
||||
component: () => import('views/user/sourcingBidding/index.vue'),
|
||||
meta: {
|
||||
title: '寻源竞价',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 专区管理 */
|
||||
{
|
||||
path: 'zoneManag',
|
||||
name: 'zoneManag',
|
||||
component: () => import('views/user/zoneManag/index.vue'),
|
||||
meta: {
|
||||
title: '专区管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 申请加入专区页面 */
|
||||
{
|
||||
path: 'joinZone',
|
||||
name: 'joinZone',
|
||||
component: () => import('views/user/zoneManag/zoneCom/joinZone.vue'),
|
||||
meta: {
|
||||
title: '请加入专区',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
]
|
||||
/* 订单管理(求租方) */
|
||||
{
|
||||
path: 'orderManagement',
|
||||
name: 'orderManagement',
|
||||
component: () => import('@/views/user/orderManagement/index.vue'),
|
||||
meta: {
|
||||
title: '订单管理(求租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 订单管理(退租) */
|
||||
{
|
||||
path: 'rentinTermination',
|
||||
name: 'rentinTermination',
|
||||
component: () => import('views/user/orderManagement/orderCom/rentinTermination.vue'),
|
||||
meta: {
|
||||
title: '订单管理(退租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 订单管理(续租) */
|
||||
{
|
||||
path: 'renewalOfLease',
|
||||
name: 'renewalOfLease',
|
||||
component: () => import('views/user/orderManagement/orderCom/renewalOfLease.vue'),
|
||||
meta: {
|
||||
title: '订单管理(续租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'subAccount',
|
||||
name: 'subAccount',
|
||||
component: () => import('views/user/subAccount/index.vue'),
|
||||
meta: {
|
||||
title: '子账号管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'business',
|
||||
name: 'business',
|
||||
component: () => import('views/user/business/index.vue'),
|
||||
meta: {
|
||||
title: '业务开通',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 寻源需求 */
|
||||
{
|
||||
path: 'sourcingNeed',
|
||||
name: 'sourcingNeed',
|
||||
component: () => import('views/user/sourcingNeed/index.vue'),
|
||||
meta: {
|
||||
title: '需求管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'orderManagementCz',
|
||||
name: 'orderManagementCz',
|
||||
component: () => import('views/user/orderManagementCz/index.vue'),
|
||||
meta: {
|
||||
title: '订单管理(承租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 订单管理(结算) */
|
||||
{
|
||||
path: 'settlement',
|
||||
name: 'settlement',
|
||||
component: () => import('views/user/orderManagementCz/settlement/index.vue'),
|
||||
meta: {
|
||||
title: '订单管理(结算)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'goodsManagement',
|
||||
name: 'goodsManagement',
|
||||
component: () => import('views/user/goodsManagement/index.vue'),
|
||||
meta: {
|
||||
title: '基础信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'goodsUpdown',
|
||||
name: 'goodsUpdown',
|
||||
component: () => import('views/user/goodsUpdown/index.vue'),
|
||||
meta: {
|
||||
title: '基础信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'operatorManagement',
|
||||
name: 'operatorManagement',
|
||||
component: () => import('views/user/operatorManagement/index.vue'),
|
||||
meta: {
|
||||
title: '基础信息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'orderDetails',
|
||||
name: 'orderDetails',
|
||||
component: () => import('@/views/user/orderManagement/orderCom/orderDetails.vue'),
|
||||
meta: {
|
||||
title: '订单详情',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'orderConfirm',
|
||||
name: 'orderConfirm',
|
||||
component: () => import('views/user/orderManagement/orderCom/orderConfirm.vue'),
|
||||
meta: {
|
||||
title: '订单确认',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'sourcingBidding',
|
||||
name: 'sourcingBidding',
|
||||
component: () => import('views/user/sourcingBidding/index.vue'),
|
||||
meta: {
|
||||
title: '寻源竞价',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 专区管理 */
|
||||
{
|
||||
path: 'zoneManag',
|
||||
name: 'zoneManag',
|
||||
component: () => import('views/user/zoneManag/index.vue'),
|
||||
meta: {
|
||||
title: '专区管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
/* 申请加入专区页面 */
|
||||
{
|
||||
path: 'joinZone',
|
||||
name: 'joinZone',
|
||||
component: () => import('views/user/zoneManag/zoneCom/joinZone.vue'),
|
||||
meta: {
|
||||
title: '请加入专区',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
},
|
||||
// 预约车页面
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,15 @@ export const useStore = defineStore('myUser', {
|
|||
deviceTypeList: [], // 设备类型大类
|
||||
deviceTypeSonList: [], // 设备类型子类
|
||||
deviceTypeSunList: [], // 设备类型小类
|
||||
leaseAndLesseeList: []
|
||||
leaseAndLesseeList: [],
|
||||
leaseAndLesseeUserList: [
|
||||
{ title: '订单管理', name: 'orderManagementCz' },
|
||||
{ title: '商品管理', name: 'goodsManagement' },
|
||||
{ title: '商品上下架', name: 'goodsUpdown' },
|
||||
{ title: '机手管理', name: 'operatorManagement' },
|
||||
{ title: '寻源竞价', name: 'sourcingBidding' },
|
||||
{ title: '专区管理', name: 'zoneManag' },
|
||||
],
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
|
|
@ -117,6 +125,26 @@ export const useStore = defineStore('myUser', {
|
|||
this.leaseAndLesseeList = baseList
|
||||
this.leaseAndLesseeList.splice(3, 1)
|
||||
}
|
||||
},
|
||||
editUserMenuList(type: number) {
|
||||
const leaseList: any = [
|
||||
{ title: '订单管理', name: 'orderManagementCz' },
|
||||
{ title: '商品管理', name: 'goodsManagement' },
|
||||
{ title: '商品上下架', name: 'goodsUpdown' },
|
||||
{ title: '机手管理', name: 'operatorManagement' },
|
||||
{ title: '寻源竞价', name: 'sourcingBidding' },
|
||||
{ title: '专区管理', name: 'zoneManag' },
|
||||
]
|
||||
const lesseeList: any = [
|
||||
{ title: '寻源需求', name: 'sourcingNeed' },
|
||||
{ title: '订单管理', name: 'orderManagement' },
|
||||
]
|
||||
this.leaseAndLesseeUserList = []
|
||||
if (type == 1) {
|
||||
this.leaseAndLesseeUserList = leaseList
|
||||
} else {
|
||||
this.leaseAndLesseeUserList = lesseeList
|
||||
}
|
||||
}
|
||||
},
|
||||
persist: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import Header from 'components/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from '../../store/user'
|
||||
import { mainStore } from '../../store/main'
|
||||
|
|
@ -14,33 +15,33 @@ const userInfo: any = computed(() => {
|
|||
})
|
||||
|
||||
// 求租按钮
|
||||
const seekingRentClick = () => {
|
||||
store.editcurrentMenuItem('baseInfo')
|
||||
store.editCurrentMenuType(true)
|
||||
store.editcurrentMenuList([
|
||||
{ title: '基础信息', name: 'baseInfo' },
|
||||
{ title: '订单管理', name: 'orderManagement' },
|
||||
{ title: '子账号管理', name: 'subAccount' },
|
||||
{ title: '业务开通', name: 'business' },
|
||||
{ title: '寻源需求', name: 'sourcingNeed' },
|
||||
])
|
||||
router.push({ name: 'baseInfo' })
|
||||
}
|
||||
// const seekingRentClick = () => {
|
||||
// store.editcurrentMenuItem('baseInfo')
|
||||
// store.editCurrentMenuType(true)
|
||||
// store.editcurrentMenuList([
|
||||
// { title: '基础信息', name: 'baseInfo' },
|
||||
// { title: '订单管理', name: 'orderManagement' },
|
||||
// { title: '子账号管理', name: 'subAccount' },
|
||||
// { title: '业务开通', name: 'business' },
|
||||
// { title: '寻源需求', name: 'sourcingNeed' },
|
||||
// ])
|
||||
// router.push({ name: 'baseInfo' })
|
||||
// }
|
||||
|
||||
// 承租按钮
|
||||
const lesseeClick = () => {
|
||||
store.editcurrentMenuItem('orderManagementCz')
|
||||
store.editCurrentMenuType(false)
|
||||
store.editcurrentMenuList([
|
||||
{ title: '订单管理', name: 'orderManagementCz' },
|
||||
{ title: '商品管理', name: 'goodsManagement' },
|
||||
{ title: '商品上下架', name: 'goodsUpdown' },
|
||||
{ title: '机手管理', name: 'operatorManagement' },
|
||||
{ title: '寻源竞价', name: 'sourcingBidding' },
|
||||
{ title: '专区管理', name: 'zoneManag' },
|
||||
])
|
||||
router.push({ name: 'orderManagementCz' })
|
||||
}
|
||||
// // 承租按钮
|
||||
// const lesseeClick = () => {
|
||||
// store.editcurrentMenuItem('orderManagementCz')
|
||||
// store.editCurrentMenuType(false)
|
||||
// store.editcurrentMenuList([
|
||||
// { title: '订单管理', name: 'orderManagementCz' },
|
||||
// { title: '商品管理', name: 'goodsManagement' },
|
||||
// { title: '商品上下架', name: 'goodsUpdown' },
|
||||
// { title: '机手管理', name: 'operatorManagement' },
|
||||
// { title: '寻源竞价', name: 'sourcingBidding' },
|
||||
// { title: '专区管理', name: 'zoneManag' },
|
||||
// ])
|
||||
// router.push({ name: 'orderManagementCz' })
|
||||
// }
|
||||
|
||||
const handleSelect = (name: any, path: any) => {
|
||||
store.editcurrentMenuItem(name)
|
||||
|
|
@ -53,36 +54,38 @@ const activeseekingRent = computed(() => {
|
|||
return store.currentMenuType
|
||||
})
|
||||
|
||||
const menuList = computed(() => {
|
||||
return store.menuList
|
||||
const menuList: any = computed(() => {
|
||||
return store.leaseAndLesseeUserList
|
||||
})
|
||||
|
||||
watch(route, (newVlaue) => {
|
||||
if (newVlaue.path.indexOf('myuser') === -1) {
|
||||
store.editcurrentMenuItem('baseInfo')
|
||||
store.editCurrentMenuType(true)
|
||||
store.editcurrentMenuList([
|
||||
{ title: '基础信息', name: 'baseInfo' },
|
||||
{ title: '订单管理', name: 'orderManagement' },
|
||||
{ title: '子账号管理', name: 'subAccount' },
|
||||
{ title: '业务开通', name: 'business' },
|
||||
])
|
||||
}
|
||||
})
|
||||
// watch(route, (newVlaue) => {
|
||||
// if (newVlaue.path.indexOf('myuser') === -1) {
|
||||
// store.editcurrentMenuItem('baseInfo')
|
||||
// store.editCurrentMenuType(true)
|
||||
// store.editcurrentMenuList([
|
||||
// // { title: '基础信息', name: 'baseInfo' },
|
||||
// { title: '订单管理', name: 'orderManagement' },
|
||||
// // { title: '子账号管理', name: 'subAccount' },
|
||||
// // { title: '业务开通', name: 'business' },
|
||||
// ])
|
||||
// }
|
||||
// })
|
||||
|
||||
onMounted(() => {
|
||||
let divElement: any = document.getElementById('user-container')
|
||||
let rect = divElement.getBoundingClientRect()
|
||||
let top = rect.top + 20 + 'px'
|
||||
spaceTop.value = top
|
||||
})
|
||||
// onMounted(() => {
|
||||
// let divElement: any = document.getElementById('user-container')
|
||||
// let rect = divElement.getBoundingClientRect()
|
||||
// let top = rect.top + 20 + 'px'
|
||||
// spaceTop.value = top
|
||||
// })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 个人中心页面 -->
|
||||
<Header />
|
||||
<div class="app-container" id="user-container">
|
||||
<div class="left-menu">
|
||||
<div class="pic-box">
|
||||
<div class="logo-title" @click="$router.push({ name: 'home' })">机械化装备平台</div>
|
||||
<!-- <div class="pic-box">
|
||||
<img v-if="userInfo.logoUrl" :src="userInfo.logoUrl" alt="" />
|
||||
|
||||
<img
|
||||
|
|
@ -100,13 +103,13 @@ onMounted(() => {
|
|||
<span @click="lesseeClick">
|
||||
<a :class="!activeseekingRent ? 'active' : ''">出租</a>
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<el-menu
|
||||
:default-active="activeMenuItem"
|
||||
class="el-menu-vertical-demo"
|
||||
router
|
||||
class="el-menu-vertical-demo"
|
||||
@select="handleSelect"
|
||||
:default-active="activeMenuItem"
|
||||
>
|
||||
<el-menu-item v-for="(item, index) in menuList" :key="index" :index="item.name">
|
||||
{{ item.title }}
|
||||
|
|
@ -121,17 +124,24 @@ onMounted(() => {
|
|||
|
||||
<style lang="scss">
|
||||
.app-container {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: calc(100vh - v-bind('spaceTop'));
|
||||
height: calc((100vh - 37px));
|
||||
width: 100%;
|
||||
|
||||
.left-menu {
|
||||
width: 260px;
|
||||
// height: 100%;
|
||||
background-color: #f7f9fa;
|
||||
border-radius: 5px;
|
||||
margin-right: 15px;
|
||||
// border-radius: 5px;
|
||||
// margin-right: 15px;
|
||||
|
||||
.logo-title {
|
||||
background-color: #1ea193;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
padding: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pic-box {
|
||||
width: 260px;
|
||||
|
|
@ -166,9 +176,8 @@ onMounted(() => {
|
|||
}
|
||||
|
||||
.right-content {
|
||||
width: calc(100% - 260px);
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.active {
|
||||
|
|
|
|||
|
|
@ -20,12 +20,18 @@
|
|||
<el-form-item>
|
||||
<el-button>查询</el-button>
|
||||
<el-button>重置</el-button>
|
||||
<el-button style="background-color: #17907f; color: #fff">需求新建</el-button>
|
||||
<el-button
|
||||
@click="addOrEditDialogVisible = true"
|
||||
style="background-color: #17907f; color: #fff"
|
||||
>
|
||||
需求新建
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
:data="leaseList"
|
||||
show-overflow-tooltip
|
||||
:header-cell-style="{
|
||||
background: '#17907f',
|
||||
|
|
@ -33,13 +39,312 @@
|
|||
}"
|
||||
>
|
||||
<el-table-column align="center" label="序号" type="index" width="80" />
|
||||
<el-table-column align="center" label="寻源单编码" />
|
||||
<el-table-column align="center" label="外部单号" />
|
||||
<el-table-column align="center" label="寻源单标题" />
|
||||
<el-table-column align="center" label="寻源模板" />
|
||||
<el-table-column align="center" label="寻源类别" />
|
||||
<el-table-column align="center" label="寻源业务类型"></el-table-column>
|
||||
<el-table-column align="center" prop="leaseCode" label="需求编号" />
|
||||
<el-table-column align="center" prop="leaseName" label="需求名称" />
|
||||
<el-table-column align="center" prop="operateAddress" label="需求所在地" />
|
||||
<el-table-column align="center" prop="person" label="发布人" />
|
||||
<el-table-column align="center" prop="endTime" label="需求截止日期" />
|
||||
<el-table-column align="center" prop="createTime" label="发布时间" />
|
||||
<el-table-column align="center" prop="leaseStatusName" label="需求状态" />
|
||||
<el-table-column align="center" label="操作" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" text type="primary"> 重新发布 </el-button>
|
||||
<el-popconfirm
|
||||
width="220"
|
||||
:icon="InfoFilled"
|
||||
icon-color="#626AEF"
|
||||
title="确定删除该项需求吗?"
|
||||
@confirm="onDelete(row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button size="small" text type="danger" @click="onDelete(row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
<template #actions="{ confirm }">
|
||||
<el-button size="small">取消</el-button>
|
||||
<el-button type="danger" size="small" @click="confirm()"> 确定 </el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 新增修改对话框 -->
|
||||
<el-dialog
|
||||
title="新增"
|
||||
width="60%"
|
||||
align-center
|
||||
destroy-on-close
|
||||
v-model="addOrEditDialogVisible"
|
||||
>
|
||||
<el-form
|
||||
label-width="auto"
|
||||
label-position="right"
|
||||
ref="addOrEditFormRef"
|
||||
:model="addOrEditForm"
|
||||
:rules="addOrEditFormRules"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求名称" prop="leaseName">
|
||||
<el-input v-model="addOrEditForm.leaseName" placeholder="请输入需求名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="装备类目" prop="typeIds">
|
||||
<el-cascader
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:options="classOptions"
|
||||
:show-all-levels="false"
|
||||
placeholder="请选择装备类目"
|
||||
v-model="addOrEditForm.typeIds"
|
||||
:props="{ value: 'id', label: 'name' }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="租赁公司" prop="companyId">
|
||||
<el-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择租赁公司"
|
||||
v-model="addOrEditForm.companyId"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in companyOptions"
|
||||
:key="item.companyId"
|
||||
:label="item.companyName"
|
||||
:value="item.companyId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="person">
|
||||
<el-input
|
||||
clearable
|
||||
placeholder="请输入联系人"
|
||||
v-model="addOrEditForm.person"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="personPhone">
|
||||
<el-input
|
||||
clearable
|
||||
placeholder="请输入联系电话"
|
||||
v-model="addOrEditForm.personPhone"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预估租期(天)" prop="leaseDay">
|
||||
<el-input-number
|
||||
:min="1"
|
||||
clearable
|
||||
:max="9999"
|
||||
style="width: 100%"
|
||||
v-model="addOrEditForm.leaseDay"
|
||||
placeholder="请输入预估租期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预估数量" prop="leaseNum">
|
||||
<el-input-number
|
||||
clearable
|
||||
:min="1"
|
||||
:max="9999"
|
||||
style="width: 100%"
|
||||
v-model="addOrEditForm.leaseNum"
|
||||
placeholder="请输入预估数量"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="需求截止日期" prop="endTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-model="addOrEditForm.endTime"
|
||||
placeholder="请选择需求截止日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||
支持格式:.jpg、.png 单个文件大小不能超过2M,最多可上传4张
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="参考图片/样式">
|
||||
<UploadComponentNew
|
||||
:maxSize="2"
|
||||
:maxLimit="4"
|
||||
width="120px"
|
||||
height="120px"
|
||||
:autoUpload="true"
|
||||
:multiple="true"
|
||||
listType="picture-card"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
:actionUrl="uploadUrl"
|
||||
:successResultCallBack="successResultCallBackFnDevicePic"
|
||||
>
|
||||
<template v-slot:default>
|
||||
<el-icon size="48" color="#aaa"><Plus /></el-icon>
|
||||
</template>
|
||||
</UploadComponentNew>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求描述" prop="description">
|
||||
<el-input
|
||||
clearable
|
||||
type="textarea"
|
||||
placeholder="请输入需求描述"
|
||||
v-model="addOrEditForm.description"
|
||||
:autosize="{ minRows: 6, maxRows: 10 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="onCancel">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit(false)"> 保存 </el-button>
|
||||
<el-button type="primary" @click="onSubmit(true)"> 提交 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
import UploadComponentNew from 'components/uploadComponentNew/index.vue'
|
||||
import { getCompanyListApi, getGoodsClassListApi } from 'http/api/home'
|
||||
import { addLeaseInfoApi, getLeaseListApi, deleteLeaseInfoApi } from 'http/api/sourcing/index'
|
||||
import { InfoFilled } from '@element-plus/icons-vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
|
||||
const addOrEditDialogVisible = ref(false)
|
||||
const companyOptions = ref<any>([])
|
||||
const classOptions = ref<any>([])
|
||||
const addOrEditFormRef = ref<any>(null)
|
||||
const leaseList = ref<any>([])
|
||||
const addOrEditForm = reactive<any>({
|
||||
leaseName: '',
|
||||
typeId: '',
|
||||
typeIds: [],
|
||||
companyId: '',
|
||||
person: '',
|
||||
personPhone: '',
|
||||
leaseDay: 1,
|
||||
leaseNum: 1,
|
||||
endTime: '',
|
||||
description: '',
|
||||
isSubmit: '',
|
||||
fileInfoList: [],
|
||||
})
|
||||
|
||||
const addOrEditFormRules = reactive({
|
||||
leaseName: [{ required: true, message: '请输入需求名称', trigger: 'blur' }],
|
||||
typeIds: [{ required: true, message: '请选择装备类目', trigger: 'change' }],
|
||||
companyId: [{ required: true, message: '请选择租赁公司', trigger: 'change' }],
|
||||
person: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
|
||||
personPhone: [
|
||||
{ required: true, message: '请输入联系电话', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^1[3456789]\d{9}$/,
|
||||
message: '请输入正确的联系电话',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
leaseDay: [{ required: true, message: '请输入预估租期', trigger: 'blur' }],
|
||||
leaseNum: [{ required: true, message: '请输入预估数量', trigger: 'blur' }],
|
||||
endTime: [{ required: true, message: '请选择需求截止日期', trigger: 'change' }],
|
||||
fileInfoList: [{ required: true, message: '请上传参考图片', trigger: 'blur' }],
|
||||
})
|
||||
|
||||
const successResultCallBackFnDevicePic = () => {
|
||||
console.log(99999)
|
||||
}
|
||||
|
||||
const getClassAndCompanyData = async () => {
|
||||
const classResult: any = await getGoodsClassListApi()
|
||||
const companyResult: any = await getCompanyListApi()
|
||||
|
||||
console.log('装备分类', classResult)
|
||||
console.log('公司信息', companyResult)
|
||||
|
||||
classOptions.value = classResult.data
|
||||
companyOptions.value = companyResult.data
|
||||
}
|
||||
|
||||
// 获取列表
|
||||
const getLeaseListData = async () => {
|
||||
const { data: res }: any = await getLeaseListApi()
|
||||
console.log(res, '列表返回结果')
|
||||
leaseList.value = res.rows
|
||||
}
|
||||
// 删除
|
||||
const onDelete = (row: any) => {
|
||||
deleteLeaseInfoApi()
|
||||
}
|
||||
|
||||
// 提交
|
||||
const onSubmit = async (type: boolean) => {
|
||||
addOrEditFormRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
console.log('校验通过')
|
||||
}
|
||||
})
|
||||
addOrEditForm.typeId = addOrEditForm.typeIds[addOrEditForm.typeIds.length - 1]
|
||||
addOrEditForm.isSubmit = type
|
||||
const res: any = await addLeaseInfoApi(addOrEditForm)
|
||||
console.log(res, '表单提交结果')
|
||||
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: `${type ? '提交' : '保存'}成功`,
|
||||
})
|
||||
addOrEditFormRef.value.resetFields()
|
||||
addOrEditDialogVisible.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
const onCancel = () => {
|
||||
addOrEditFormRef.value.resetFields()
|
||||
addOrEditDialogVisible.value = false
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getClassAndCompanyData()
|
||||
getLeaseListData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep.upload-tip .el-form-item__label {
|
||||
color: transparent;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue