From 9057e04efad1b7d61c77a72e5c37a504d0aee935 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 26 九月 2025 09:24:03 +0800
Subject: [PATCH] H5静态化
---
admin/src/views/system/dict.vue | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/system/dict.vue b/admin/src/views/system/dict.vue
new file mode 100644
index 0000000..4e054ee
--- /dev/null
+++ b/admin/src/views/system/dict.vue
@@ -0,0 +1,100 @@
+<template>
+ <TableLayout :permissions="['system:dict:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="瀛楀吀缂栫爜" prop="code">
+ <el-input v-model="searchForm.code" v-trim placeholder="璇疯緭鍏ュ瓧鍏哥紪鐮�" @keypress.enter.native="search"/>
+ </el-form-item>
+ <el-form-item label="瀛楀吀鍚嶇О" prop="name">
+ <el-input v-model="searchForm.name" v-trim placeholder="璇疯緭鍏ュ瓧鍏稿悕绉�" @keypress.enter.native="search"/>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <ul class="toolbar" v-permissions="['system:dict:create', 'system:dict:delete']">
+ <li><el-button type="primary" @click="$refs.operaDictWindow.open('鏂板缓瀛楀吀')" icon="el-icon-plus" v-permissions="['system:dict:create']">鏂板缓</el-button></li>
+ <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['system:dict:delete']">鍒犻櫎</el-button></li>
+ </ul>
+ <el-table
+ :height="tableHeightNew"
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ :default-sort = "{prop: 'createTime', order: 'descending'}"
+ stripe
+ @selection-change="handleSelectionChange"
+ @sort-change="handleSortChange"
+ >
+ <el-table-column type="selection" fixed="left" width="55"></el-table-column>
+ <el-table-column prop="code" label="瀛楀吀缂栫爜" fixed="left" min-width="100px"></el-table-column>
+ <el-table-column prop="name" label="瀛楀吀鍚嶇О" fixed="left" min-width="100px"></el-table-column>
+ <el-table-column prop="remark" label="澶囨敞" min-width="100px"></el-table-column>
+ <el-table-column prop="createUser" label="鍒涘缓浜�" min-width="100px">
+ <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template>
+ </el-table-column>
+ <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" min-width="140px" sortable="custom" sort-by="dict.CREATE_TIME"></el-table-column>
+ <el-table-column prop="updateUser" label="鏇存柊浜�" min-width="100px">
+ <template slot-scope="{row}">{{row.updateUserInfo == null ? '' : row.updateUserInfo.username}}</template>
+ </el-table-column>
+ <el-table-column prop="updateTime" label="鏇存柊鏃堕棿" min-width="140px"></el-table-column>
+ <el-table-column
+ v-if="containPermissions(['system:dict:update', 'system:dict:delete'])"
+ label="鎿嶄綔"
+ min-width="210"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.operaDictWindow.open('缂栬緫瀛楀吀', row)" icon="el-icon-edit" v-permissions="['system:dict:update']">缂栬緫</el-button>
+ <el-button type="text" @click="$refs.dictDataManagerWindow.open(row.id, row.name)" icon="el-icon-edit" v-permissions="['system:dict:update']">鏁版嵁绠$悊</el-button>
+ <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['system:dict:delete']">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ ></pagination>
+ </template>
+ <!-- 鏂板缓/淇敼 -->
+ <OperaDictWindow ref="operaDictWindow" @success="handlePageChange(tableData.pagination.pageIndex)"/>
+ <!-- 鏁版嵁绠$悊 -->
+ <DictDataManagerWindow ref="dictDataManagerWindow"/>
+ </TableLayout>
+</template>
+
+<script>
+import Pagination from '@/components/common/Pagination'
+import TableLayout from '@/layouts/TableLayout'
+import BaseTable from '@/components/base/BaseTable'
+import OperaDictWindow from '@/components/system/dict/OperaDictWindow'
+import DictDataManagerWindow from '@/components/system/dict/DictDataManagerWindow'
+export default {
+ name: 'SystemDict',
+ extends: BaseTable,
+ components: { DictDataManagerWindow, OperaDictWindow, TableLayout, Pagination },
+ data () {
+ return {
+ // 鎼滅储
+ searchForm: {
+ code: '',
+ name: ''
+ }
+ }
+ },
+ created () {
+ this.config({
+ module: '瀛楀吀',
+ api: '/system/dict',
+ sorts: [{
+ property: 'dict.CREATE_TIME',
+ direction: 'DESC'
+ }]
+ })
+ this.search()
+ }
+}
+</script>
--
Gitblit v1.9.3