From 56148970959b7016cfe1c54ffa39dbd9bb9921ff Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期五, 11 七月 2025 21:10:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/system/DictList.vue |  358 +++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 210 insertions(+), 148 deletions(-)

diff --git a/src/views/system/DictList.vue b/src/views/system/DictList.vue
index 9c59dc7..bed26a4 100644
--- a/src/views/system/DictList.vue
+++ b/src/views/system/DictList.vue
@@ -3,30 +3,79 @@
 
     <!-- 宸︿晶闈㈡澘 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
+      <a-form
+        layout="inline"
+        @keyup.enter.native="searchQuery"
+      >
         <a-row :gutter="12">
-          <a-col :md="7" :sm="8">
-            <a-form-item label="瀛楀吀鍚嶇О" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
-              <a-input placeholder="璇疯緭鍏ュ瓧鍏稿悕绉�" v-model="queryParam.dictName"></a-input>
+          <a-col
+            :md="7"
+            :sm="8"
+          >
+            <a-form-item
+              label="瀛楀吀鍚嶇О"
+              :labelCol="{span: 6}"
+              :wrapperCol="{span: 14, offset: 1}"
+            >
+              <j-input
+                placeholder="璇疯緭鍏ュ瓧鍏稿悕绉�"
+                v-model="queryParam.dictName"
+              ></j-input>
             </a-form-item>
           </a-col>
-          <a-col :md="7" :sm="8">
-            <a-form-item label="瀛楀吀缂栧彿" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
-              <a-input placeholder="璇疯緭鍏ュ瓧鍏哥紪鍙�" v-model="queryParam.dictCode"></a-input>
+          <a-col
+            :md="7"
+            :sm="8"
+          >
+            <a-form-item
+              label="瀛楀吀缂栧彿"
+              :labelCol="{span: 6}"
+              :wrapperCol="{span: 14, offset: 1}"
+            >
+              <j-input
+                placeholder="璇疯緭鍏ュ瓧鍏哥紪鍙�"
+                v-model="queryParam.dictCode"
+              ></j-input>
             </a-form-item>
           </a-col>
-          <a-col :md="7" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+          <a-col
+            :md="7"
+            :sm="8"
+          >
+            <span
+              style="float: left;overflow: hidden;"
+              class="table-page-search-submitButtons"
+            >
+              <a-button
+                type="primary"
+                @click="searchQuery"
+                icon="search"
+              >鏌ヨ</a-button>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >閲嶇疆</a-button>
             </span>
           </a-col>
         </a-row>
       </a-form>
 
-      <div class="table-operator" style="border-top: 5px">
-        <a-button @click="handleAdd" type="primary" icon="plus">娣诲姞</a-button>
-
+      <div
+        class="table-operator"
+        style="border-top: 5px"
+      >
+        <a-button
+          @click="handleAdd"
+          type="primary"
+          icon="plus"
+        >娣诲姞</a-button>
+        <a-button
+          type="primary"
+          icon="sync"
+          @click="refleshCache()"
+        >鍒锋柊缂撳瓨</a-button>
       </div>
 
       <a-table
@@ -37,166 +86,179 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        @change="handleTableChange">
-        <span slot="action" slot-scope="text, record">
+        @change="handleTableChange"
+      >
+        <span
+          slot="action"
+          slot-scope="text, record"
+        >
           <a @click="handleEdit(record)">
-            <a-icon type="edit"/>
+            <a-icon type="edit" />
             缂栬緫
           </a>
-          <a-divider type="vertical"/>
-          <a @click="editDictItem(record)"><a-icon type="setting"/> 瀛楀吀閰嶇疆</a>
-          <a-divider type="vertical"/>
-          <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() =>handleDelete(record.id)">
+          <a-divider type="vertical" />
+          <a @click="editDictItem(record)"><a-icon type="setting" /> 瀛楀吀閰嶇疆</a>
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="纭畾鍒犻櫎鍚�?"
+            @confirm="() =>handleDelete(record.id)"
+          >
             <a>鍒犻櫎</a>
           </a-popconfirm>
         </span>
       </a-table>
 
     </div>
-    <dict-modal ref="modalForm" @ok="modalFormOk"></dict-modal>  <!-- 瀛楀吀绫诲瀷 -->
+    <dict-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></dict-modal> <!-- 瀛楀吀绫诲瀷 -->
     <dict-item-list ref="dictItemList"></dict-item-list>
-    <dict-delete-list ref="dictDeleteList" @refresh="() =>loadData()"></dict-delete-list>
+    <dict-delete-list
+      ref="dictDeleteList"
+      @refresh="() =>loadData()"
+    ></dict-delete-list>
   </a-card>
 </template>
 
 <script>
-  import { filterObj } from '@/utils/util';
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import DictModal from './modules/DictModal'
-  import DictItemList from './DictItemList'
-  import DictDeleteList from './DictDeleteList'
-  import { getAction } from '@/api/manage'
-  import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
-  import Vue from 'vue'
+import { filterObj } from '@/utils/util';
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import DictModal from './modules/DictModal'
+import DictItemList from './DictItemList'
+import DictDeleteList from './DictDeleteList'
+import { getAction } from '@/api/manage'
+import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
+import Vue from 'vue'
 
-  export default {
-    name: "DictList",
-    mixins:[JeecgListMixin],
-    components: {DictModal, DictItemList,DictDeleteList},
-    data() {
-      return {
-        description: '杩欐槸鏁版嵁瀛楀吀椤甸潰',
-        visible: false,
-        // 鏌ヨ鏉′欢
-        queryParam: {
-          dictCode: "",
-          dictName: "",
-        },
-        // 琛ㄥご
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key: 'rowIndex',
-            width: 120,
-            align: "center",
-            customRender: function (t, r, index) {
-              return parseInt(index) + 1;
-            }
-          },
-          {
-            title: '瀛楀吀鍚嶇О',
-            align: "left",
-            dataIndex: 'dictName',
-          },
-          {
-            title: '瀛楀吀缂栧彿',
-            align: "left",
-            dataIndex: 'dictCode',
-          },
-          {
-            title: '鎻忚堪',
-            align: "left",
-            dataIndex: 'description',
-          },
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            align: "center",
-            scopedSlots: {customRender: 'action'},
+export default {
+  name: "DictList",
+  mixins: [JeecgListMixin],
+  components: { DictModal, DictItemList, DictDeleteList },
+  data() {
+    return {
+      description: '杩欐槸鏁版嵁瀛楀吀椤甸潰',
+      visible: false,
+      // 鏌ヨ鏉′欢
+      queryParam: {
+        dictCode: "",
+        dictName: "",
+      },
+      // 琛ㄥご
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 120,
+          align: "center",
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1;
           }
-        ],
-        dict: "",
-        labelCol: {
-          xs: {span: 8},
-          sm: {span: 5},
         },
-        wrapperCol: {
-          xs: {span: 16},
-          sm: {span: 19},
+        {
+          title: '瀛楀吀鍚嶇О',
+          align: "left",
+          dataIndex: 'dictName',
         },
-        url: {
-          list: "/sys/dict/list",
-          delete: "/sys/dict/delete",
-          exportXlsUrl: "sys/dict/exportXls",
-          importExcelUrl: "sys/dict/importExcel",
-          refleshCache: "sys/dict/refleshCache",
-          queryAllDictItems: "sys/dict/queryAllDictItems",
+        {
+          title: '瀛楀吀缂栧彿',
+          align: "left",
+          dataIndex: 'dictCode',
         },
-      }
-    },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      }
-    },
-    methods: {
-      getQueryParams() {
-        var param = Object.assign({}, this.queryParam, this.isorter);
-        param.field = this.getQueryField();
-        param.pageNo = this.ipagination.current;
-        param.pageSize = this.ipagination.pageSize;
-        if (this.superQueryParams) {
-          param['superQueryParams'] = encodeURI(this.superQueryParams)
-          param['superQueryMatchType'] = this.superQueryMatchType
+        {
+          title: '鎻忚堪',
+          align: "left",
+          dataIndex: 'description',
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: "center",
+          scopedSlots: { customRender: 'action' },
         }
-        return filterObj(param);
+      ],
+      dict: "",
+      labelCol: {
+        xs: { span: 8 },
+        sm: { span: 5 },
       },
-      //鍙栨秷閫夋嫨
-      cancelDict() {
-        this.dict = "";
-        this.visible = false;
-        this.loadData();
+      wrapperCol: {
+        xs: { span: 16 },
+        sm: { span: 19 },
       },
-      //缂栬緫瀛楀吀鏁版嵁
-      editDictItem(record) {
-        this.$refs.dictItemList.edit(record);
+      url: {
+        list: "/sys/dict/list",
+        delete: "/sys/dict/delete",
+        exportXlsUrl: "sys/dict/exportXls",
+        importExcelUrl: "sys/dict/importExcel",
+        refleshCache: "sys/dict/refleshCache",
+        queryAllDictItems: "sys/dict/queryAllDictItems",
       },
-      // 閲嶇疆瀛楀吀绫诲瀷鎼滅储妗嗙殑鍐呭
-      searchReset() {
-        var that = this;
-        that.queryParam.dictName = "";
-        that.queryParam.dictCode = "";
-        that.loadData(this.ipagination.current);
-      },
-      openDeleteList(){
-        this.$refs.dictDeleteList.show()
-      },
-      refleshCache(){
-        getAction(this.url.refleshCache).then((res) => {
-          if (res.success) {
-            //閲嶆柊鍔犺浇缂撳瓨
-            getAction(this.url.queryAllDictItems).then((res) => {
-              if (res.success) {
-                Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
-                Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
-              }
-            })
-            this.$message.success("鍒锋柊缂撳瓨瀹屾垚锛�");
-          }
-        }).catch(e=>{
-          this.$message.warn("鍒锋柊缂撳瓨澶辫触锛�");
-          console.log("鍒锋柊澶辫触",e)
-        })
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+  methods: {
+    getQueryParams() {
+      var param = Object.assign({}, this.queryParam, this.isorter);
+      param.field = this.getQueryField();
+      param.pageNo = this.ipagination.current;
+      param.pageSize = this.ipagination.pageSize;
+      if (this.superQueryParams) {
+        param['superQueryParams'] = encodeURI(this.superQueryParams)
+        param['superQueryMatchType'] = this.superQueryMatchType
       }
+      return filterObj(param);
     },
-    watch: {
-      openKeys(val) {
-        console.log('openKeys', val)
-      },
+    //鍙栨秷閫夋嫨
+    cancelDict() {
+      this.dict = "";
+      this.visible = false;
+      this.loadData();
     },
-  }
+    //缂栬緫瀛楀吀鏁版嵁
+    editDictItem(record) {
+      this.$refs.dictItemList.edit(record);
+    },
+    // 閲嶇疆瀛楀吀绫诲瀷鎼滅储妗嗙殑鍐呭
+    searchReset() {
+      var that = this;
+      that.queryParam.dictName = "";
+      that.queryParam.dictCode = "";
+      that.loadData(this.ipagination.current);
+    },
+    openDeleteList() {
+      this.$refs.dictDeleteList.show()
+    },
+    refleshCache() {
+      getAction(this.url.refleshCache).then((res) => {
+        if (res.success) {
+          //閲嶆柊鍔犺浇缂撳瓨
+          getAction(this.url.queryAllDictItems).then((res) => {
+            if (res.success) {
+              Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
+              Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
+            }
+          })
+          this.$message.success("鍒锋柊缂撳瓨瀹屾垚锛�");
+        }
+      }).catch(e => {
+        this.$message.warn("鍒锋柊缂撳瓨澶辫触锛�");
+        console.log("鍒锋柊澶辫触", e)
+      })
+    }
+  },
+  watch: {
+    openKeys(val) {
+      console.log('openKeys', val)
+    },
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less'
+@import '~@assets/less/common.less';
 </style>
\ No newline at end of file

--
Gitblit v1.9.3