diff --git a/.gitignore b/.gitignore index 1d814ad..f68b918 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ pnpm-debug.log* lerna-debug.log* node_modules +D:\WorkSpace\2025\AnHui\Zlpt_Portal\D\nodejs .DS_Store dist dist-ssr diff --git a/components.d.ts b/components.d.ts index 4d8a23e..06def7a 100644 --- a/components.d.ts +++ b/components.d.ts @@ -29,6 +29,7 @@ declare module 'vue' { ElEmpty: typeof import('element-plus/es')['ElEmpty'] 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'] @@ -36,6 +37,7 @@ declare module 'vue' { ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] + ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElProgress: typeof import('element-plus/es')['ElProgress'] diff --git a/public/contract-template-250224.docx b/public/contract-template-250224.docx new file mode 100644 index 0000000..ea1f67c Binary files /dev/null and b/public/contract-template-250224.docx differ diff --git a/src/http/index.ts b/src/http/index.ts index 57d3f77..3a9d4ce 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -44,8 +44,11 @@ service.interceptors.request.use( } if (config.data) { let data = typeof config.data === 'object' ? JSON.stringify(config.data) : config.data - config.data = encryptWithSM4(data + '|' + hashWithSM3AndSalt(data)) - // config.data = data + if (config.headers['encryptRequest'] == 'true') { + config.data = encryptWithSM4(data + '|' + hashWithSM3AndSalt(data)) + } else { + config.data = data + } } return config }, diff --git a/src/views/user/contract-manage/index.vue b/src/views/user/contract-manage/index.vue index fbb92ae..96b58c1 100644 --- a/src/views/user/contract-manage/index.vue +++ b/src/views/user/contract-manage/index.vue @@ -703,7 +703,7 @@ const onEditorReady = (editor) => { onMounted(() => { getContractListData() - uploadUrlTemp.value = window.location.origin + '/iws/mall-view/contract-template.docx' + uploadUrlTemp.value = window.location.origin + '/iws/mall-view/contract-template-250224.docx' // getEquipmentTypeApi().then((res: any) => { // deviceTypeTree.value = res.data }) diff --git a/src/views/user/index.vue b/src/views/user/index.vue index 9f6c147..25b3006 100644 --- a/src/views/user/index.vue +++ b/src/views/user/index.vue @@ -22,25 +22,30 @@ const isType: any = computed(() => { return localStorage.getItem('rolesType') }) -const allList = [ +// 定义菜单项接口 +interface MenuItem { + title: string + name: string + permission: string[] +} + +// 按角色分组定义菜单---出租方 +const lessorMenus: MenuItem[] = [ { title: '装备管理', name: 'goodsManagement', permission: ['1'] }, { title: '出租订单', name: 'orderManagementCz', permission: ['1'] }, { title: '接单管理', name: 'accept-orders', permission: ['1'] }, - // { title: '退租管理', name: 'rent-termination', permission: ['1'] }, - // { title: '结算管理', name: 'settlement-manage', permission: ['1'] }, { title: '质检管理', name: 'quality-manage', permission: ['1'] }, - // { title: '安全证书管理', name: 'security-certificate', permission: ['1'] }, - // { title: '标签管理', name: 'tag-manage', permission: ['1'] }, - // { title: '维修保养管理', name: 'repair-manage', permission: ['1'] }, + { title: '合同管理', name: 'contract-manage', permission: ['1'] }, +] +// 按角色分组定义菜单---承租方 +const lesseeMenus: MenuItem[] = [ { title: '需求管理', name: 'sourcingNeed', permission: ['2'] }, { title: '租赁订单', name: 'orderManagement', permission: ['2'] }, { title: '收货地址管理', name: 'address-manage', permission: ['2'] }, - { title: '合同管理', name: 'contract-manage', permission: ['1'] }, - // { title: '快捷消息设置', name: 'quickMessage', permission: ['1'] }, - // { title: '个人中心', name: 'personalCenter', permission: ['1'] }, - // { title: '个人中心', name: 'personalCenter', permission: ['2'] }, ] +// 合并所有菜单项 +const allList: MenuItem[] = [...lessorMenus, ...lesseeMenus] const rolesType = ref(localStorage.getItem('rolesTypeName') || '出租方') const menuList: any = computed(() => { if (rolesType.value == '承租方') return allList.filter((e) => e.permission.includes('2')) diff --git a/src/views/user/orderManagement/components/order-home.vue b/src/views/user/orderManagement/components/order-home.vue index 2a3a344..fc89243 100644 --- a/src/views/user/orderManagement/components/order-home.vue +++ b/src/views/user/orderManagement/components/order-home.vue @@ -390,17 +390,17 @@ const downloadContract = () => { // } } -const confirmFail = async (index: number) => { +const confirmFail = async (item: any) => { ElMessageBox.confirm('是否确定取消订单?', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', }) .then(() => { - return failApi({ orderId: cardList.value[index].orderId, orderStatus: 99 }) + return failApi({ orderId: item.orderId, orderStatus: 99 }) // return removeDeviceApi([row.maId]) }) - .then((res) => { + .then((res: any) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -926,10 +926,10 @@ const pickUpCodeForm = reactive({ 取消订单 diff --git a/src/views/user/orderManagementCz/components/order-home.vue b/src/views/user/orderManagementCz/components/order-home.vue index 9c49feb..b5b5c30 100644 --- a/src/views/user/orderManagementCz/components/order-home.vue +++ b/src/views/user/orderManagementCz/components/order-home.vue @@ -228,17 +228,18 @@ const confirmPass = async (index: number) => { } // 驳回按钮 -const confirmFail = async (index: number) => { +const confirmFail = async (item: any) => { + // console.log(item.orderId, '-->>>') ElMessageBox.confirm('是否确定取消?', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', }) .then(() => { - return failApi({ orderId: cardList.value[index].orderId, orderStatus: 99 }) + return failApi({ orderId: item.orderId, orderStatus: 99 }) // return removeDeviceApi([row.maId]) }) - .then((res) => { + .then((res: any) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -731,19 +732,6 @@ const downloadContract = () => { } const wordUrl = ref('') - -//取件码弹窗参数 -const dialogVisiblePickUpCode = ref(false); -// 新增变量来存储取件码 -const pickUpCode = ref(''); -const pickUpView = async(item: any) => { - console.log('item',item) - const res: any = await getOrderCodeApi({orderId:item.orderId}) - console.log('res',res) - pickUpCode.value = res.data - dialogVisiblePickUpCode.value = true; -}; -