From 0976efbce259333058a097fe3a4077c94a14d5fe Mon Sep 17 00:00:00 2001 From: songyang <972986197@qq.com> Date: Sat, 2 Dec 2023 18:05:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=BB=A5=E5=8F=8A=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=E9=A1=B5=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + components.d.ts | 4 + src/App.vue | 4 +- src/compontents/FormComponent/index.vue | 29 ++ src/compontents/PagingComponent/index.vue | 14 + src/compontents/TableComponent/index.vue | 50 ++++ src/views/user/goodsManagement/index.vue | 309 +++++++++++++++++----- src/views/user/goodsUpdown/index.vue | 156 +++++++---- src/views/user/index.vue | 1 - 9 files changed, 456 insertions(+), 113 deletions(-) create mode 100644 src/compontents/FormComponent/index.vue create mode 100644 src/compontents/PagingComponent/index.vue create mode 100644 src/compontents/TableComponent/index.vue diff --git a/.gitignore b/.gitignore index a4c2b5d..6d43424 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ components.d.ts *.sln *.sw? components.d.ts +.prettierrc.js +components.d.ts diff --git a/components.d.ts b/components.d.ts index c309347..04e166d 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,12 +10,16 @@ declare module 'vue' { ElButton: typeof import('element-plus/es')['ElButton'] ElCarousel: typeof import('element-plus/es')['ElCarousel'] ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] + ElDialog: typeof import('element-plus/es')['ElDialog'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] 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'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElRadio: typeof import('element-plus/es')['ElRadio'] + ElSelect: typeof import('element-plus/es')['ElSelect'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTag: typeof import('element-plus/es')['ElTag'] diff --git a/src/App.vue b/src/App.vue index 411e69c..941007f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -57,7 +57,7 @@ onMounted(() => {
  • - + 个人中心
  • @@ -120,7 +120,7 @@ onMounted(() => { } .shop-header { - height: 157px; + // height: 157px; width: 100%; position: sticky; top: 0; diff --git a/src/compontents/FormComponent/index.vue b/src/compontents/FormComponent/index.vue new file mode 100644 index 0000000..491e9c8 --- /dev/null +++ b/src/compontents/FormComponent/index.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/compontents/PagingComponent/index.vue b/src/compontents/PagingComponent/index.vue new file mode 100644 index 0000000..8fdf0af --- /dev/null +++ b/src/compontents/PagingComponent/index.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/src/compontents/TableComponent/index.vue b/src/compontents/TableComponent/index.vue new file mode 100644 index 0000000..8106895 --- /dev/null +++ b/src/compontents/TableComponent/index.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/src/views/user/goodsManagement/index.vue b/src/views/user/goodsManagement/index.vue index 6749ed1..1044e7f 100644 --- a/src/views/user/goodsManagement/index.vue +++ b/src/views/user/goodsManagement/index.vue @@ -1,76 +1,259 @@ \ No newline at end of file + .el-form { + margin: 15px 0; + } + diff --git a/src/views/user/goodsUpdown/index.vue b/src/views/user/goodsUpdown/index.vue index 608b6df..f39dd87 100644 --- a/src/views/user/goodsUpdown/index.vue +++ b/src/views/user/goodsUpdown/index.vue @@ -2,72 +2,134 @@ import { ref } from 'vue' const queryParams = ref({}) +import TableComponent from '@/compontents/TableComponent/index.vue' +import FormComponent from '@/compontents/FormComponent/index.vue' +import PagingComponent from '../../../compontents/PagingComponent/index.vue' + +// 选择复选框时获取需要删除的数据源 +const getRowId = (val: any) => { + console.log(val, '需要删除的数据源**'); +} + +// 上架按钮 +const handleGrounding = () => { + console.log('上架设备'); + +} + +// 下架按钮 +const handleOffshelf = () => { + console.log('下架设备'); + + +} +// 编辑按钮 +const editRowInfo = (row: any) => { + console.log(row, '编辑当前数据'); + +} +// 删除按钮 +const deleteRowInfo = (row: any) => { + console.log(row, '删除当前数据'); + +} + +const tableProps = ref([ + { v_label: '编码', v_props: 'v_code', v_slot: '', width: '' }, + { v_label: '租赁范围', v_props: 'v_lease_scope', v_slot: '', width: '' }, + { v_label: '装备类型', v_props: 'v_equipment_type', v_slot: '', width: '' }, + { v_label: '装备名称', v_props: 'v_equipment_name', v_slot: '', width: '' }, + { v_label: '租金', v_props: 'v_rent', v_slot: '', width: '' }, + { v_label: '状态', v_props: 'v_type', v_slot: 'v_type', width: '' }, + { v_label: '操作', v_props: 'v_operate', v_slot: 'operate', width: '140px' }, +]) + const tableData = [ { - date: '2016-05-02', - name: '123xxx', - address: '合肥市蜀山区', + v_code: '123456', + v_lease_scope: '2023/12/12', + v_equipment_type: '挖掘机', + v_equipment_name: '2023新版挖掘机', + v_rent: '123/月', + v_type: 1, + v_operate: '' }, { - date: '2016-05-02', - name: '123xxx', - address: '合肥市蜀山区', + v_code: '123456', + v_lease_scope: '2023/12/12', + v_equipment_type: '挖掘机', + v_equipment_name: '2023新版挖掘机', + v_rent: '123/月', + v_type: 2, + v_operate: '' }, { - date: '2016-05-04', - name: '123xxx', - address: '合肥市蜀山区', + v_code: '123456', + v_lease_scope: '2023/12/12', + v_equipment_type: '挖掘机', + v_equipment_name: '2023新版挖掘机', + v_rent: '123/月', + v_type: 3, + v_operate: '' }, { - date: '2016-05-01', - name: '123xxx', - address: '合肥市蜀山区', + v_code: '123456', + v_lease_scope: '2023/12/12', + v_equipment_type: '挖掘机', + v_equipment_name: '2023新版挖掘机', + v_rent: '123/月', + v_type: 3, + v_operate: '' }, + { + v_code: '123456', + v_lease_scope: '2023/12/12', + v_equipment_type: '挖掘机', + v_equipment_name: '2023新版挖掘机', + v_rent: '123/月', + v_type: 3, + v_operate: '' + }, + ] + +// 表单 lable 数据 +const formItemList = ref([ + { v_label: '编码', v_typ: 'ipt' }, + { v_label: '状态', v_typ: 'ipt' }, + { v_label: '租赁范围', v_typ: 'sel' }, + { v_label: '装备类型', v_typ: 'sel' }, + { v_label: '装备名称', v_typ: 'ipt' }, +])