Browse Source

完善事件列表字典匹配

愿你天天开心 9 months ago
parent
commit
5647b8baa6
2 changed files with 35 additions and 3 deletions
  1. 17 0
      src/types/components.d.ts
  2. 18 3
      src/views/duty/eventing/index.vue

+ 17 - 0
src/types/components.d.ts

@@ -16,15 +16,21 @@ declare module 'vue' {
     CompanyMap: typeof import('./../components/Map/company-map.vue')['default']
     DictTag: typeof import('./../components/DictTag/index.vue')['default']
     Editor: typeof import('./../components/Editor/index.vue')['default']
+    ElAnchor: typeof import('element-plus/es')['ElAnchor']
+    ElAnchorLink: typeof import('element-plus/es')['ElAnchorLink']
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
     ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
     ElButton: typeof import('element-plus/es')['ElButton']
+    ElCard: typeof import('element-plus/es')['ElCard']
+    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
+    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
+    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDivider: typeof import('element-plus/es')['ElDivider']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
@@ -37,6 +43,7 @@ declare module 'vue' {
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
+    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
     ElLink: typeof import('element-plus/es')['ElLink']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
@@ -44,6 +51,8 @@ declare module 'vue' {
     ElPagination: typeof import('element-plus/es')['ElPagination']
     ElPopover: typeof import('element-plus/es')['ElPopover']
     ElProgress: typeof import('element-plus/es')['ElProgress']
+    ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
@@ -51,13 +60,21 @@ declare module 'vue' {
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
+    ElTabPane: typeof import('element-plus/es')['ElTabPane']
+    ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
+    ElText: typeof import('element-plus/es')['ElText']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
+    ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
+    ElUpload: typeof import('element-plus/es')['ElUpload']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
     Hamburger: typeof import('./../components/Hamburger/index.vue')['default']
     HeaderSearch: typeof import('./../components/HeaderSearch/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
+    IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
+    IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
+    IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']

+ 18 - 3
src/views/duty/eventing/index.vue

@@ -89,10 +89,22 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="事件编号" align="center" prop="eventId" />
       <el-table-column label="事件标题" align="center" prop="eventTitle" />
-      <el-table-column label="事件类型" align="center" prop="eventType" />
-      <el-table-column label="事件等级" align="center" prop="eventLevel" />
+      <el-table-column label="事件类型" align="center" prop="eventType">
+        <template #default="scope">
+          <dict-tag :options="mm_event_type" :value="scope.row.eventType" />
+        </template>
+      </el-table-column>
+      <el-table-column label="事件等级" align="center" prop="eventLevel">
+        <template #default="scope">
+          <dict-tag :options="mm_event_level" :value="scope.row.eventLevel" />
+        </template>
+      </el-table-column>
       <el-table-column label="事件地点" align="center" prop="address" />
-      <el-table-column label="事件状态" align="center" prop="eventStatus" />
+      <el-table-column label="事件状态" align="center" prop="eventStatus">
+        <template #default="scope">
+          <dict-tag :options="mm_event_state" :value="scope.row.eventStatus" />
+        </template>
+      </el-table-column>
       <el-table-column label="事件时间" align="center" prop="eventTime" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template #default="scope">
@@ -186,6 +198,9 @@ import { ref, reactive, toRefs, onMounted } from 'vue';
 import { getDicts } from '@/api/system/dict/data';
 import { addEvent, getEvent } from '@/api/duty/eventing';
 
+let proxy = getCurrentInstance()?.proxy;
+const { mm_event_type,mm_event_level,mm_event_state } = toRefs<any>(proxy?.useDict('mm_event_type','mm_event_level','mm_event_state'));
+
 const router = useRouter();
 const eventList = ref([]);
 const buttonLoading = ref(false);