From 212f81d79dc966cdf5f73a658a070ca79d69e822 Mon Sep 17 00:00:00 2001 From: wujianwei <wjw@11.com> Date: 星期二, 09 九月 2025 16:40:02 +0800 Subject: [PATCH] 新增接口 --- ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue | 184 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 184 insertions(+), 0 deletions(-) diff --git a/ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue b/ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue new file mode 100644 index 0000000..a92e75c --- /dev/null +++ b/ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue @@ -0,0 +1,184 @@ +<template> + <basicContainer > + <avue-crud + :option="option" + :table-loading="pageF.loading" + :data="tableData" + :page="page" + :permission="permissionList" + :before-open="beforeOpen" + v-model="form" + ref="crudRef" + @row-update="rowUpdate" + @row-save="rowSave" + @refresh-change="refreshChange" + @row-del="rowDel" + @search-change="searchChange" + @search-reset="searchReset" + @selection-change="selectionChange" + @current-change="currentChange" + @size-change="sizeChange" + @on-load="onLoad" + > + <template #menu-left> + <el-button + type="success" + icon="Edit" + :disabled="pageF.single" + v-hasPermi="['cwgl:smartLockerApplication:edit']" + @click="handleUpdate">淇敼 + </el-button> + <el-button + type="danger" + icon="Delete" + :disabled="pageF.multiple" + @click="handleDelete" + v-hasPermi="['cwgl:smartLockerApplication:remove']" + >鍒犻櫎 + </el-button> + <el-button + type="warning" + plain + icon="Download" + @click="handleExport" + v-hasPermi="['cwgl:smartLockerApplication:export']" + >瀵煎嚭 + </el-button> + </template> + </avue-crud> + </basicContainer> +</template> + +<script setup name="smartLockerApplication" lang="ts"> + import {SmartLockerApplicationI,addSmartLockerApplication, delSmartLockerApplication, exportSmartLockerApplication, getSmartLockerApplication, listSmartLockerApplication, updateSmartLockerApplication} from "@/api/cwgl/smartLockerApplication"; + import useCurrentInstance from "@/utils/useCurrentInstance"; + import {computed,reactive, ref, toRefs} from "vue"; + import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; + import {usePagePlus} from "@/hooks/usePagePlus"; + import {hasPermission} from "@/utils/permissionUtils"; + + const { proxy } = useCurrentInstance(); + const crudRef = ref(); + + const permissionList = computed(()=>{ + return { + addBtn: hasPermission(["cwgl:smartLockerApplication:add"]), + delBtn: hasPermission(["cwgl:smartLockerApplication:remove"]), + editBtn: hasPermission(["cwgl:smartLockerApplication:edit"]), + viewBtn: hasPermission(["cwgl:smartLockerApplication:query"]), + } + }) + + const data = reactive({ + form:<SmartLockerApplicationI>{}, + queryParams:<SmartLockerApplicationI&PageQueryInterface>{}, + page: <PagesInterface>{ + pageSize: 10, + total: 0, + currentPage: 1, + }, + selectionList:[], + }) + const {queryParams,form,page,selectionList} = toRefs(data); + const option = ref({ + pageKey: 'SmartLockerApplication', + rowKey: 'id', + column: { + id: { + label: 'ID', + }, + commandType: { + label: '鎸囦护绫诲瀷(0:寮�闂ㄦ寚浠�;1:娴佽浆鎸囦护)', + }, + applicantCode: { + label: '鐢抽浜虹紪鐮�', + rules: [ + { + required: true, + message: "鐢抽浜虹紪鐮佷笉鑳戒负绌�", trigger: "blur" } + ], }, + applicantName: { + label: '鐢抽浜哄鍚�', + rules: [ + { + required: true, + message: "鐢抽浜哄鍚嶄笉鑳戒负绌�", trigger: "blur" } + ], }, + itemType: { + label: '棰嗗彇鐗╁搧绫诲瀷(0:杞﹂挜鍖�;1:鏂囦欢;2:鍗扮珷;3:鍏朵粬)', + }, + itemName: { + label: '鐗╁搧鍚嶇О', + rules: [ + { + required: true, + message: "鐗╁搧鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], }, + lockerNo: { + label: '鏅鸿兘鏌滅紪鍙烽粯璁ゆ帴椹崇珯鏅鸿兘閽ュ寵鏌�', + }, + lockerPort: { + label: '鏅鸿兘鏌滄牸鍙e彿', + rules: [ + { + required: true, + message: "鏅鸿兘鏌滄牸鍙e彿涓嶈兘涓虹┖", trigger: "blur" } + ], }, + status: { + label: '鐘舵��(0:姝e父;1:浣滃簾;2:棰嗗彇)', + }, + cancelTime: { + label: '浣滃簾鏃堕棿', + }, + receiveTime: { + label: '棰嗗彇鏃堕棿', + }, + createTime: { + label: '鍒涘缓鏃堕棿', + rules: [ + { + required: true, + message: "鍒涘缓鏃堕棿涓嶈兘涓虹┖", trigger: "blur" } + ], }, + updateTime: { + label: '鏇存柊鏃堕棿', + }, + remark: { + label: '澶囨敞', + type: 'textarea', minRows: 3, maxRows: 5, + }, + createBy: { + label: '鍒涘缓浜�', + }, + updateBy: { + label: '鏇存柊浜�', + }, + deleted: { + label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)', + }, + } + }) + + const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange, + searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({ + form:form, + option:option, + queryParams:queryParams, + idKey:'id', + page:page.value, + getListApi:listSmartLockerApplication, + getDetailApi:getSmartLockerApplication, + exportApi:exportSmartLockerApplication, + deleteApi:delSmartLockerApplication, + addApi:addSmartLockerApplication, + updateApi:updateSmartLockerApplication, + handleUpdateFunc:()=>{ + crudRef.value.rowEdit(selectionList.value[0]); + }, + handleSelectionChangeFunc:(selection:any)=>{ + selectionList.value = selection; + } + }) + + +</script> -- Gitblit v1.8.0