From 7c124560b27add087b4aa8fc457de1e84f950d9c Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 23 Nov 2021 15:19:33 +0800
Subject: [PATCH] 样式  (1:搜索按钮放入右侧,2:隐藏表格显影按钮,3:页码改为(15,30,50,100))

---
 src/views/system/dict.vue |  220 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 217 insertions(+), 3 deletions(-)

diff --git a/src/views/system/dict.vue b/src/views/system/dict.vue
index 9265d5b..1141204 100644
--- a/src/views/system/dict.vue
+++ b/src/views/system/dict.vue
@@ -1,5 +1,10 @@
 <template>
-  <basic-container class="hasButTwo">
+  <basic-container
+    :class="[
+      'hasButTwo',
+      $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+    ]"
+  >
     <avue-crud
       :option="optionParent"
       :table-loading="loading"
@@ -145,8 +150,217 @@
       },
       dataParent: [],
       dataChild: [],
-      optionParent: optionParent,
-      optionChild: optionChild,
+      optionParent: {
+        height: "auto",
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 10,
+        border: true,
+        index: true,
+        selection: true,
+        viewBtn: true,
+        menuWidth: 250,
+        dialogWidth: 880,
+        dialogClickModal: false,
+        ...this.$store.state.control.clearOtherBut,
+        column: [
+          {
+            label: "字典编号",
+            prop: "code",
+            search: true,
+            slot: true,
+            span: 24,
+            rules: [
+              {
+                required: true,
+                message: "请输入字典编号",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "字典名称",
+            prop: "dictValue",
+            search: true,
+            align: "center",
+            rules: [
+              {
+                required: true,
+                message: "请输入字典名称",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "字典排序",
+            prop: "sort",
+            type: "number",
+            align: "right",
+            width: 100,
+            rules: [
+              {
+                required: true,
+                message: "请输入字典排序",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "封存",
+            prop: "isSealed",
+            type: "switch",
+            align: "center",
+            width: 100,
+            dicData: [
+              {
+                label: "否",
+                value: 0,
+              },
+              {
+                label: "是",
+                value: 1,
+              },
+            ],
+            value: 0,
+            slot: true,
+            rules: [
+              {
+                required: true,
+                message: "请选择封存",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "字典备注",
+            prop: "remark",
+            hide: true,
+          },
+        ],
+      },
+      optionChild: {
+        height: "auto",
+        calcHeight: 95,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 10,
+        tree: true,
+        border: true,
+        index: true,
+        selection: true,
+        viewBtn: true,
+        menuWidth: 300,
+        dialogWidth: 880,
+        dialogClickModal: false,
+        ...this.$store.state.control.clearOtherBut,
+        column: [
+          {
+            label: "字典编号",
+            prop: "code",
+            addDisabled: true,
+            editDisabled: true,
+            search: true,
+            span: 24,
+            rules: [
+              {
+                required: true,
+                message: "请输入字典编号",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "字典名称",
+            prop: "dictValue",
+            search: true,
+            align: "center",
+            rules: [
+              {
+                required: true,
+                message: "请输入字典名称",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "上级字典",
+            prop: "parentId",
+            type: "tree",
+            dicData: [],
+            hide: true,
+            props: {
+              label: "title",
+            },
+            addDisabled: true,
+            editDisabled: true,
+            rules: [
+              {
+                required: false,
+                message: "请选择上级字典",
+                trigger: "click",
+              },
+            ],
+          },
+          {
+            label: "字典键值",
+            prop: "dictKey",
+            width: 80,
+            rules: [
+              {
+                required: true,
+                message: "请输入字典键值",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "字典排序",
+            prop: "sort",
+            type: "number",
+            align: "right",
+            hide: true,
+            rules: [
+              {
+                required: true,
+                message: "请输入字典排序",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "封存",
+            prop: "isSealed",
+            type: "switch",
+            align: "center",
+            width: 80,
+            dicData: [
+              {
+                label: "否",
+                value: 0,
+              },
+              {
+                label: "是",
+                value: 1,
+              },
+            ],
+            value: 0,
+            slot: true,
+            rules: [
+              {
+                required: true,
+                message: "请选择封存",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "字典备注",
+            prop: "remark",
+            hide: true,
+          },
+        ],
+      },
     };
   },
   computed: {

--
Gitblit v1.9.3