Переглянути джерело

Merge branch 'main' into whr_card

wanghairong 5 місяців тому
батько
коміт
42a3e408ca
1 змінених файлів з 11 додано та 3 видалено
  1. 11 3
      src/views/system/dict/index.vue

+ 11 - 3
src/views/system/dict/index.vue

@@ -11,7 +11,8 @@
             </div>
         </div>
 
-        <a-table :data="dataSource" :columns="columns" :scroll="{ x: 'auto' }">
+        <a-table :data="dataSource" :columns="columns" :scroll="{ x: 'auto' }" :pagination="pageData"
+            @page-change="evChangePage">
             <template #operation="{ record }">
                 <a class="a-link" href="javascript:;" style="margin: 0 1rem;" @click="dictShowModel(2, record)">修改</a>
                 <a-popconfirm :content="`是否确认删除字典编号为 ${record.id} 的数据项?`" @ok="deleteChange(record.id)" type="warning">
@@ -64,9 +65,10 @@ const formData = ref({
 
 });
 const columns = ref([
-    { title: '字典编号', dataIndex: 'id', align: 'center', width: 120 },
+    { title: '数据键值', dataIndex: 'value', align: 'center', width: 120 },
+    { title: '数据标签', dataIndex: 'label', align: 'center', width: 120 },
     { title: '字典名称', dataIndex: 'type_label', align: 'center', width: 120 },
-    { title: '字典类型', dataIndex: 'type_key', align: 'center', width: 120 },
+    { title: '字典类型', dataIndex: 'type_key', align: 'center', width: 150 },
     {
         title: '备注',
         dataIndex: 'remark',
@@ -192,6 +194,12 @@ const resetForm = () => {
         remark: '',
     });
 }
+
+const evChangePage = (page) => {
+    pageData.value.current = page
+    intData()
+}
+
 // 重置
 const resetSelectData = () => {
     formData.value.type_key = "";