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

fix: 系统参数新增问题处理

laiqi 1 рік тому
батько
коміт
6f70ef6b9c

+ 32 - 32
apps/web-ele/src/views/system-manage/data-dictionary/form.vue

@@ -51,16 +51,16 @@ const [BaseForm, baseFormApi] = useVbenForm({
         placeholder: '请输入组名称',
       },
     },
-    // {
-    //   component: 'InputNumber',
-    //   fieldName: 'baseid',
-    //   label: '上级',
-    //   defaultValue: 0,
-    //   componentProps: {
-    //     placeholder: '请输入上级ID',
-    //     min: 0,
-    //   },
-    // },
+    {
+      component: 'InputNumber',
+      fieldName: 'baseid',
+      label: '上级',
+      defaultValue: 0,
+      componentProps: {
+        placeholder: '请输入上级ID',
+        min: 0,
+      },
+    },
     {
       component: 'Switch',
       fieldName: 'available',
@@ -73,28 +73,28 @@ const [BaseForm, baseFormApi] = useVbenForm({
         inactiveText: '不可用',
       },
     },
-    // {
-    //   component: 'Switch',
-    //   fieldName: 'ispublic',
-    //   label: '前端可用',
-    //   defaultValue: 0,
-    //   componentProps: {
-    //     activeValue: 1,
-    //     inactiveValue: 0,
-    //     activeText: '是',
-    //     inactiveText: '否',
-    //   },
-    // },
-    // {
-    //   component: 'InputNumber',
-    //   fieldName: 'ranknum',
-    //   label: '排序值',
-    //   defaultValue: 0,
-    //   componentProps: {
-    //     placeholder: '请输入排序值',
-    //     min: 0,
-    //   },
-    // },
+    {
+      component: 'Switch',
+      fieldName: 'ispublic',
+      label: '前端可用',
+      defaultValue: 0,
+      componentProps: {
+        activeValue: 1,
+        inactiveValue: 0,
+        activeText: '是',
+        inactiveText: '否',
+      },
+    },
+    {
+      component: 'InputNumber',
+      fieldName: 'ranknum',
+      label: '排序值',
+      defaultValue: 0,
+      componentProps: {
+        placeholder: '请输入排序值',
+        min: 0,
+      },
+    },
     {
       component: 'Input',
       fieldName: 'substance',

+ 19 - 18
apps/web-ele/src/views/system-manage/data-dictionary/index.vue

@@ -91,6 +91,7 @@ const gridOptions: VxeGridProps<any> = {
   },
 
   columns: [
+    { title: 'ID', field: 'id', sortable: true },
     { title: '配置名称', field: 'title', sortable: true },
     { title: '组名称', field: 'groupname', sortable: true },
     { title: '配置值', field: 'substance', sortable: true },
@@ -115,24 +116,24 @@ const gridOptions: VxeGridProps<any> = {
       },
     },
     { title: '描述', field: 'describes', sortable: true },
-    // {
-    //   title: '前端可用',
-    //   field: 'ispublic',
-    //   slots: {
-    //     default: ({ row }) => {
-    //       const status = row.ispublic;
-    //       return h(
-    //         ElTag,
-    //         {
-    //           type: status === 1 ? 'success' : 'info',
-    //           effect: 'light',
-    //           size: 'small',
-    //         },
-    //         () => (status === 1 ? '是' : '否'),
-    //       );
-    //     },
-    //   },
-    // },
+    {
+      title: '前端可用',
+      field: 'ispublic',
+      slots: {
+        default: ({ row }) => {
+          const status = row.ispublic;
+          return h(
+            ElTag,
+            {
+              type: status === 1 ? 'success' : 'info',
+              effect: 'light',
+              size: 'small',
+            },
+            () => (status === 1 ? '是' : '否'),
+          );
+        },
+      },
+    },
     // { title: '排序值', field: 'ranknum' },
     {
       title: '操作',