mirror of
				https://github.com/pure-admin/pure-admin-thin.git
				synced 2025-11-04 17:44:48 +08:00 
			
		
		
		
	fix: 规范字典的命名
This commit is contained in:
		
							parent
							
								
									4ebdfd21c4
								
							
						
					
					
						commit
						7ff4936570
					
				@ -48,7 +48,9 @@ defineExpose({ getFormRuleRef });
 | 
				
			|||||||
        class="!w-[180px]"
 | 
					        class="!w-[180px]"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        <el-option
 | 
					        <el-option
 | 
				
			||||||
          v-for="dict in useUserStoreHook().dictionaryList['sys_notice_type']"
 | 
					          v-for="dict in useUserStoreHook().dictionaryList[
 | 
				
			||||||
 | 
					            'sysNotice.noticeType'
 | 
				
			||||||
 | 
					          ]"
 | 
				
			||||||
          :key="dict.value"
 | 
					          :key="dict.value"
 | 
				
			||||||
          :label="dict.label"
 | 
					          :label="dict.label"
 | 
				
			||||||
          :value="dict.value"
 | 
					          :value="dict.value"
 | 
				
			||||||
@ -63,7 +65,7 @@ defineExpose({ getFormRuleRef });
 | 
				
			|||||||
        class="!w-[180px]"
 | 
					        class="!w-[180px]"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        <el-option
 | 
					        <el-option
 | 
				
			||||||
          v-for="dict in useUserStoreHook().dictionaryList['sys_notice_status']"
 | 
					          v-for="dict in useUserStoreHook().dictionaryList['sysNotice.status']"
 | 
				
			||||||
          :key="dict.value"
 | 
					          :key="dict.value"
 | 
				
			||||||
          :label="dict.label"
 | 
					          :label="dict.label"
 | 
				
			||||||
          :value="dict.value"
 | 
					          :value="dict.value"
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,8 @@ defineOptions({
 | 
				
			|||||||
  name: "SystemNotice"
 | 
					  name: "SystemNotice"
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const sys_notice_type = useUserStoreHook().dictionaryList["sys_notice_type"];
 | 
					const noticeTypeList =
 | 
				
			||||||
 | 
					  useUserStoreHook().dictionaryList["sysNotice.noticeType"];
 | 
				
			||||||
const tableRef = ref();
 | 
					const tableRef = ref();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const searchFormRef = ref();
 | 
					const searchFormRef = ref();
 | 
				
			||||||
@ -66,7 +67,7 @@ const {
 | 
				
			|||||||
          class="!w-[180px]"
 | 
					          class="!w-[180px]"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          <el-option
 | 
					          <el-option
 | 
				
			||||||
            v-for="dict in sys_notice_type"
 | 
					            v-for="dict in noticeTypeList"
 | 
				
			||||||
            :key="dict.value"
 | 
					            :key="dict.value"
 | 
				
			||||||
            :label="dict.label"
 | 
					            :label="dict.label"
 | 
				
			||||||
            :value="dict.value"
 | 
					            :value="dict.value"
 | 
				
			||||||
@ -92,7 +93,7 @@ const {
 | 
				
			|||||||
        </el-button>
 | 
					        </el-button>
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
          :icon="useRenderIcon(Refresh)"
 | 
					          :icon="useRenderIcon(Refresh)"
 | 
				
			||||||
          @click="resetForm(searchFormRef)"
 | 
					          @click="resetForm(searchFormRef, tableRef)"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          重置
 | 
					          重置
 | 
				
			||||||
        </el-button>
 | 
					        </el-button>
 | 
				
			||||||
@ -130,6 +131,7 @@ const {
 | 
				
			|||||||
          adaptive
 | 
					          adaptive
 | 
				
			||||||
          :data="dataList"
 | 
					          :data="dataList"
 | 
				
			||||||
          :columns="dynamicColumns"
 | 
					          :columns="dynamicColumns"
 | 
				
			||||||
 | 
					          :default-sort="{ prop: 'createTime', order: 'descending' }"
 | 
				
			||||||
          :pagination="pagination"
 | 
					          :pagination="pagination"
 | 
				
			||||||
          :paginationSmall="size === 'small' ? true : false"
 | 
					          :paginationSmall="size === 'small' ? true : false"
 | 
				
			||||||
          :header-cell-style="{
 | 
					          :header-cell-style="{
 | 
				
			||||||
 | 
				
			|||||||
@ -15,9 +15,8 @@ import {
 | 
				
			|||||||
import { reactive, ref, onMounted, h, toRaw } from "vue";
 | 
					import { reactive, ref, onMounted, h, toRaw } from "vue";
 | 
				
			||||||
import { useUserStoreHook } from "@/store/modules/user";
 | 
					import { useUserStoreHook } from "@/store/modules/user";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const sysNoticeTypeMap = useUserStoreHook().dictionaryMap["sys_notice_type"];
 | 
					const noticeTypeMap = useUserStoreHook().dictionaryMap["sysNotice.noticeType"];
 | 
				
			||||||
const sysNoticeStatusMap =
 | 
					const noticeStatusMap = useUserStoreHook().dictionaryMap["sysNotice.status"];
 | 
				
			||||||
  useUserStoreHook().dictionaryMap["sys_notice_status"];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function useNoticeHook() {
 | 
					export function useNoticeHook() {
 | 
				
			||||||
  const pagination = reactive<PaginationProps>({
 | 
					  const pagination = reactive<PaginationProps>({
 | 
				
			||||||
@ -63,10 +62,10 @@ export function useNoticeHook() {
 | 
				
			|||||||
      cellRenderer: ({ row, props }) => (
 | 
					      cellRenderer: ({ row, props }) => (
 | 
				
			||||||
        <el-tag
 | 
					        <el-tag
 | 
				
			||||||
          size={props.size}
 | 
					          size={props.size}
 | 
				
			||||||
          type={sysNoticeTypeMap[row.noticeType].cssTag}
 | 
					          type={noticeTypeMap[row.noticeType].cssTag}
 | 
				
			||||||
          effect="plain"
 | 
					          effect="plain"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          {sysNoticeTypeMap[row.noticeType].label}
 | 
					          {noticeTypeMap[row.noticeType].label}
 | 
				
			||||||
        </el-tag>
 | 
					        </el-tag>
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -77,10 +76,10 @@ export function useNoticeHook() {
 | 
				
			|||||||
      cellRenderer: ({ row, props }) => (
 | 
					      cellRenderer: ({ row, props }) => (
 | 
				
			||||||
        <el-tag
 | 
					        <el-tag
 | 
				
			||||||
          size={props.size}
 | 
					          size={props.size}
 | 
				
			||||||
          type={sysNoticeStatusMap[row.status].cssTag}
 | 
					          type={noticeStatusMap[row.status].cssTag}
 | 
				
			||||||
          effect="plain"
 | 
					          effect="plain"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          {sysNoticeStatusMap[row.status].label}
 | 
					          {noticeStatusMap[row.status].label}
 | 
				
			||||||
        </el-tag>
 | 
					        </el-tag>
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -213,9 +212,13 @@ export function useNoticeHook() {
 | 
				
			|||||||
    }, 500);
 | 
					    }, 500);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const resetForm = formEl => {
 | 
					  const resetForm = (formEl, tableRef) => {
 | 
				
			||||||
    if (!formEl) return;
 | 
					    if (!formEl) return;
 | 
				
			||||||
    formEl.resetFields();
 | 
					    formEl.resetFields();
 | 
				
			||||||
 | 
					    searchFormParams.orderColumn = "";
 | 
				
			||||||
 | 
					    searchFormParams.orderDirection = "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    tableRef.getTableRef().clearSort();
 | 
				
			||||||
    onSearch();
 | 
					    onSearch();
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user