Merge branch 'dev-sy'

This commit is contained in:
BianLzhaoMin 2024-11-27 18:23:07 +08:00
commit 8e2bdd4354
8 changed files with 68 additions and 48 deletions

25
components.d.ts vendored
View File

@ -8,16 +8,12 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default'] Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default']
<<<<<<< HEAD ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
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']
=======
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']
>>>>>>> 3e9ad09a2819e350266aaac04c776f0f461c9e79
ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] 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']
@ -25,34 +21,23 @@ declare module 'vue' {
ElDialog: typeof import('element-plus/es')['ElDialog'] ElDialog: typeof import('element-plus/es')['ElDialog']
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']
<<<<<<< HEAD
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']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
=======
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']
>>>>>>> 3e9ad09a2819e350266aaac04c776f0f461c9e79
ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
<<<<<<< HEAD
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElProgress: typeof import('element-plus/es')['ElProgress'] ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
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']
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']
>>>>>>> 3e9ad09a2819e350266aaac04c776f0f461c9e79
ElUpload: typeof import('element-plus/es')['ElUpload'] ElUpload: typeof import('element-plus/es')['ElUpload']
EquipCard: typeof import('./src/components/equipCard.vue')['default'] EquipCard: typeof import('./src/components/equipCard.vue')['default']
EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default'] EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default']

View File

@ -10,7 +10,9 @@ userStore.editMenuList(1)
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const isRolesSelect = ref<boolean>(false) const isRolesSelect = ref<boolean>(false)
const rolesName = ref<string>('出租方') const rolesName = ref<any>('1')
rolesName.value = localStorage.getItem('rolesType') || 1
// 退 // 退
const isShowLogout = computed(() => { const isShowLogout = computed(() => {
@ -95,10 +97,12 @@ const onSelectRoles = (type: number) => {
rolesName.value = '出租方' rolesName.value = '出租方'
userStore.editMenuList(1) userStore.editMenuList(1)
userStore.editUserMenuList(1) userStore.editUserMenuList(1)
localStorage.setItem('rolesType', '1')
} else { } else {
rolesName.value = '承租方' rolesName.value = '承租方'
userStore.editMenuList(2) userStore.editMenuList(2)
userStore.editUserMenuList(2) userStore.editUserMenuList(2)
localStorage.setItem('rolesType', '2')
} }
isRolesSelect.value = false isRolesSelect.value = false
} }
@ -137,7 +141,7 @@ const onCarts = () => {
<div class="header-item roles-check" @click="onRolesCheck" v-if="isShowLogout"> <div class="header-item roles-check" @click="onRolesCheck" v-if="isShowLogout">
<!-- <img src="../assets/img/home/star.png" alt="" /> --> <!-- <img src="../assets/img/home/star.png" alt="" /> -->
<a style="display: flex; justify-content: center; padding-right: 10px"> <a style="display: flex; justify-content: center; padding-right: 10px">
{{ rolesName }} {{ rolesName == 1 ? '出租方' : '承租方' }}
<el-icon style="margin-left: 10px"><ArrowDownBold /></el-icon> <el-icon style="margin-left: 10px"><ArrowDownBold /></el-icon>
</a> </a>

View File

@ -43,7 +43,7 @@ service.interceptors.response.use(
ElMessage.error(data.msg) ElMessage.error(data.msg)
router.push('/login') router.push('/login')
} else if (data.code == '500') { } else if (data.code == '500') {
ElMessage.error('请求失败') ElMessage.error(data.msg)
} }
else { else {
return data return data

View File

@ -12,7 +12,9 @@ userStore.editMenuList(1)
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const isRolesSelect = ref<boolean>(false) const isRolesSelect = ref<boolean>(false)
const rolesName = ref<string>('出租方') const rolesName = ref<any>('1')
rolesName.value = localStorage.getItem('rolesType') || 1
// 退 // 退
const isShowLogout = computed(() => { const isShowLogout = computed(() => {
@ -107,10 +109,12 @@ const onSelectRoles = (type: number) => {
rolesName.value = '出租方' rolesName.value = '出租方'
userStore.editMenuList(1) userStore.editMenuList(1)
userStore.editUserMenuList(1) userStore.editUserMenuList(1)
localStorage.setItem('rolesType', '1')
} else { } else {
rolesName.value = '承租方' rolesName.value = '承租方'
userStore.editMenuList(2) userStore.editMenuList(2)
userStore.editUserMenuList(2) userStore.editUserMenuList(2)
localStorage.setItem('rolesType', '2')
} }
isRolesSelect.value = false isRolesSelect.value = false
} }
@ -149,7 +153,7 @@ const onCarts = () => {
<div class="header-item roles-check" @click="onRolesCheck" v-if="isShowLogout"> <div class="header-item roles-check" @click="onRolesCheck" v-if="isShowLogout">
<!-- <img src="../assets/img/home/star.png" alt="" /> --> <!-- <img src="../assets/img/home/star.png" alt="" /> -->
<a style="display: flex; justify-content: center; padding-right: 10px"> <a style="display: flex; justify-content: center; padding-right: 10px">
{{ rolesName }} {{ rolesName == 1 ? '出租方' : '承租方' }}
<el-icon style="margin-left: 10px"><ArrowDownBold /></el-icon> <el-icon style="margin-left: 10px"><ArrowDownBold /></el-icon>
</a> </a>

View File

@ -32,6 +32,19 @@ export const useStore = defineStore('myUser', {
{ title: '寻源竞价', name: 'sourcingBidding' }, { title: '寻源竞价', name: 'sourcingBidding' },
{ title: '专区管理', name: 'zoneManag' }, { title: '专区管理', name: 'zoneManag' },
], ],
isType: 1,
leaseUserList: [
{ title: '订单管理', name: 'orderManagementCz' },
{ title: '商品管理', name: 'goodsManagement' },
{ title: '商品上下架', name: 'goodsUpdown' },
{ title: '机手管理', name: 'operatorManagement' },
{ title: '寻源竞价', name: 'sourcingBidding' },
{ title: '专区管理', name: 'zoneManag' },
],
lesseeUserList: [
{ title: '寻源需求', name: 'sourcingNeed' },
{ title: '订单管理', name: 'orderManagement' },
]
} }
}, },
getters: { getters: {
@ -121,9 +134,11 @@ export const useStore = defineStore('myUser', {
] ]
if (type == 1) { if (type == 1) {
this.leaseAndLesseeList = baseList this.leaseAndLesseeList = baseList
this.isType = 1
} else { } else {
this.leaseAndLesseeList = baseList this.leaseAndLesseeList = baseList
this.leaseAndLesseeList.splice(3, 1) this.leaseAndLesseeList.splice(3, 1)
this.isType = 2
} }
}, },
editUserMenuList(type: number) { editUserMenuList(type: number) {
@ -153,9 +168,9 @@ export const useStore = defineStore('myUser', {
{ {
// 自定义存储的 key默认是 store.$id // 自定义存储的 key默认是 store.$id
key: 'myUser', key: 'myUser',
storage: sessionStorage, //缓存模式 可选 localStorage sessionStorage storage: localStorage, //缓存模式 可选 localStorage sessionStorage
// state 中的字段名,按组打包储存 // state 中的字段名,按组打包储存
paths: ['currentMenuType', 'currentMenuItem', 'menuList', 'leaseAndLesseeList'] //需要缓存的字段 与 state中相关联 paths: ['currentMenuType', 'currentMenuItem', 'menuList', 'leaseAndLesseeList', 'isType'] //需要缓存的字段 与 state中相关联
} }
] ]
} }

View File

@ -55,6 +55,8 @@ const handlerLogin = async () => {
// "https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/2023/12/09/815629f192564db98ac55a643b46f853gouwu.png", // "https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/2023/12/09/815629f192564db98ac55a643b46f853gouwu.png",
// }); // });
// } // }
localStorage.setItem('rolesType', '1')
// //
if (route.query && route.query.redirect) { if (route.query && route.query.redirect) {
router.push(decodeURIComponent(route.query.redirect)) router.push(decodeURIComponent(route.query.redirect))

View File

@ -661,7 +661,6 @@ const rules = reactive({
// dialoglease.value = true // dialoglease.value = true
// } // }
const openLease = () => { const openLease = () => {
console.log(pageData.value) console.log(pageData.value)
onAddCart() onAddCart()
@ -1237,7 +1236,7 @@ const onAddCart = async () => {
cursor: pointer; cursor: pointer;
width: calc(100% / 3); width: calc(100% / 3);
font-size: 14px; font-size: 14px;
font-family: PingFangSC, PingFang SC; // font-family: PingFangSC, PingFang SC;
// font-weight: 600; // font-weight: 600;
display: flex; display: flex;
margin-bottom: 35px; margin-bottom: 35px;
@ -1251,12 +1250,12 @@ const onAddCart = async () => {
color: #333333; color: #333333;
flex: 1; flex: 1;
word-break: break-all; word-break: break-all;
font-family: 'fangsong'; // font-family: 'fangsong';
} }
.fnValue { .fnValue {
color: #0087cd; color: #0087cd;
font-family: 'fangsong'; // font-family: 'fangsong';
} }
} }
} }

View File

@ -104,17 +104,26 @@
<el-table-column align="center" prop="endTime" label="需求截止日期" /> <el-table-column align="center" prop="endTime" label="需求截止日期" />
<el-table-column align="center" prop="startTime" label="发布时间" /> <el-table-column align="center" prop="startTime" label="发布时间" />
<el-table-column align="center" prop="leaseStatusName" label="需求状态" /> <el-table-column align="center" prop="leaseStatusName" label="需求状态" />
<el-table-column align="center" label="操作" width="160"> <el-table-column align="center" label="操作" :width="220">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button
text text
size="small" size="small"
type="primary" type="primary"
v-if="row.leaseStatus === 2" v-if="row.leaseStatus === 2"
@click="onRepublish(row.id)" @click="onRepublish(row.id, false)"
> >
重新发布 重新发布
</el-button> </el-button>
<el-button
text
size="small"
type="primary"
v-if="row.leaseStatus === 2"
@click="onRepublish(row.id, true)"
>
编辑
</el-button>
<el-popconfirm <el-popconfirm
width="220" width="220"
:icon="InfoFilled" :icon="InfoFilled"
@ -151,11 +160,11 @@
size="small" size="small"
:total="total" :total="total"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="searchParams.pageSize" v-model:page-size="searchParams.pageSize"
:current-page="searchParams.pageNum" v-model:current-page="searchParams.pageNum"
layout="total, prev, pager, next,sizes" layout="total, prev, pager, next,sizes"
@size-change="onCurrentChange" @size-change="getLeaseListData"
@current-change="onCurrentChange" @current-change="getLeaseListData"
/> />
<!-- 新增修改对话框 --> <!-- 新增修改对话框 -->
@ -319,7 +328,8 @@
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="onCancel">取消</el-button> <el-button @click="onCancel">取消</el-button>
<el-button type="primary" @click="onSubmit()"> 提交 </el-button> <el-button type="primary" @click="onSubmit(false)" v-if="isSave"> 保存 </el-button>
<el-button type="primary" @click="onSubmit(true)"> 提交 </el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
@ -345,6 +355,7 @@ const addOrEditFormRef = ref<any>(null)
const searchFormRef = ref<any>(null) const searchFormRef = ref<any>(null)
const leaseList = ref<any>([]) const leaseList = ref<any>([])
const isRepublish = ref(true) const isRepublish = ref(true)
const isSave = ref(false)
const total = ref(0) const total = ref(0)
const endTime = ref([]) const endTime = ref([])
const releaseTime = ref([]) const releaseTime = ref([])
@ -411,10 +422,6 @@ const getClassAndCompanyData = async () => {
companyOptions.value = companyResult.data companyOptions.value = companyResult.data
} }
const onCurrentChange = (val: any) => {
console.log(val)
}
// //
const getLeaseListData = async () => { const getLeaseListData = async () => {
if (endTime.value.length > 0) { if (endTime.value.length > 0) {
@ -438,6 +445,8 @@ const onReset = () => {
searchParams.finishEndTime = '' searchParams.finishEndTime = ''
searchParams.publishStartTime = '' searchParams.publishStartTime = ''
searchParams.publishEndTime = '' searchParams.publishEndTime = ''
searchParams.pageNum = 1
searchParams.pageSize = 10
searchFormRef.value.resetFields() searchFormRef.value.resetFields()
getLeaseListData() getLeaseListData()
} }
@ -453,8 +462,9 @@ const onDelete = async (id: any) => {
} }
} }
// //
const onRepublish = async (id: any) => { const onRepublish = async (id: any, type: any) => {
isRepublish.value = false isRepublish.value = false
isSave.value = type
const res: any = await getLeaseDetailsByIdApi({ id }) const res: any = await getLeaseDetailsByIdApi({ id })
const { const {
leaseName, leaseName,
@ -486,14 +496,15 @@ const onRepublish = async (id: any) => {
addOrEditForm.typeIds = addOrEditForm.typeIds.map((e: any) => { addOrEditForm.typeIds = addOrEditForm.typeIds.map((e: any) => {
return (e *= 1) return (e *= 1)
}) })
addOrEditDialogVisible.value = true addOrEditDialogVisible.value = true
} }
// //
const onSubmit = () => { const onSubmit = (type: boolean) => {
addOrEditFormRef.value.validate(async (valid: any) => { addOrEditFormRef.value.validate(async (valid: any) => {
if (valid) { if (valid) {
addOrEditForm.isSubmit = isRepublish.value addOrEditForm.isSubmit = type
addOrEditForm.typeId = addOrEditForm.typeIds[addOrEditForm.typeIds.length - 1] addOrEditForm.typeId = addOrEditForm.typeIds[addOrEditForm.typeIds.length - 1]
const SUBMIT_API = isRepublish.value ? addLeaseInfoApi : editLeaseInfoApi const SUBMIT_API = isRepublish.value ? addLeaseInfoApi : editLeaseInfoApi
const res: any = await SUBMIT_API(addOrEditForm) const res: any = await SUBMIT_API(addOrEditForm)
@ -530,7 +541,7 @@ onMounted(() => {
justify-content: flex-end; justify-content: flex-end;
padding: 5px 0; padding: 5px 0;
} }
:deep.el-pagination.is-background .el-pager li.is-active { // :deep.el-pagination.is-background .el-pager li.is-active {
background-color: #3cb4a6; // background-color: #3cb4a6;
} // }
</style> </style>