Преглед на файлове

fix: 【公共】字典相关逻辑修改

hanxiaohui преди 4 месеца
родител
ревизия
9edf0f31eb
променени са 2 файла, в които са добавени 17 реда и са изтрити 0 реда
  1. 10 0
      src/views/support/dict/components/dict-value-modal.vue
  2. 7 0
      src/views/support/dict/components/dict-value-operate-modal.vue

+ 10 - 0
src/views/support/dict/components/dict-value-modal.vue

@@ -56,6 +56,11 @@
           <template v-if="column.dataIndex === 'action'">
             <a-button @click="addOrUpdateValue(record)" type="link">编辑</a-button>
           </template>
+
+          <template v-if="column.key === 'dictStyle'">
+            <a-tag :color="record.dictStyle">{{ record.dictStyle }}</a-tag>
+          </template>
+
         </template>
       </a-table>
 
@@ -109,6 +114,11 @@ const columns = reactive([
     title: '名称',
     dataIndex: 'valueName',
   },
+  {
+    title: '主题',
+    dataIndex: 'dictStyle',
+    key: "dictStyle"
+  },
   {
     title: '排序',
     width: 80,

+ 7 - 0
src/views/support/dict/components/dict-value-operate-modal.vue

@@ -14,6 +14,11 @@
       <a-form-item label="名称" name="valueName">
         <a-input v-model:value="form.valueName" placeholder="请输入名称" />
       </a-form-item>
+
+      <a-form-item label="主题" name="dictStyle">
+        <a-select v-model:value="form.dictStyle" placeholder="请选择主题"  :options="useBsDict.getDictList('SYS_DICT_TAG_COLOR')" />
+      </a-form-item>
+
       <a-form-item label="排序" name="sort">
         <a-input-number v-model:value="form.sort" :min="0" :max="1000" />
       </a-form-item>
@@ -29,6 +34,7 @@ import { message } from 'ant-design-vue';
 import { SmartLoading } from '/@/components/framework/smart-loading';
 import { dictApi } from '/@/api/support/dict-api';
 import { smartSentry } from '/@/lib/smart-sentry';
+import useBsDict from "/@/utils/dict.js"
 
 // emit
 const emit = defineEmits(['reloadList']);
@@ -43,6 +49,7 @@ const formDefault = {
   valueCode: '',
   valueName: '',
   remark: '',
+  dictStyle: "default"
 };
 let form = reactive({ ...formDefault });
 const rules = {