|
@@ -1,12 +1,85 @@
|
|
|
<template>
|
|
|
- <div class="message-reminder">消息提醒</div>
|
|
|
+ <div class="message-reminder flex flex-col h-full">
|
|
|
+ <SearchForm :fields="fields" :params="params">
|
|
|
+ <template #service="{ item, params }">
|
|
|
+ <select-service-unit
|
|
|
+ v-model="params[item.prop]"
|
|
|
+ clearable
|
|
|
+ ></select-service-unit>
|
|
|
+ </template>
|
|
|
+ </SearchForm>
|
|
|
+ <div class="page-wrap flex-1">
|
|
|
+ <t-tabs v-model="status" class="m-t-20px">
|
|
|
+ <t-tab-panel value="0" label="全部">111</t-tab-panel>
|
|
|
+ </t-tabs>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="MessageReminder">
|
|
|
+import { reactive, computed, ref } from 'vue';
|
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
|
import { getMyMessages } from '@/api/my-workbenches';
|
|
|
-const { loading, pagination, tableData, fetchData, search } =
|
|
|
- useFetchTable(getMyMessages);
|
|
|
+import { MESSAGE_TYPE } from '@/config/constants';
|
|
|
+import { dictToOptionList } from '@/utils/tool';
|
|
|
+const params = reactive({
|
|
|
+ types: [],
|
|
|
+ serviceId: '',
|
|
|
+ custom: '',
|
|
|
+});
|
|
|
+const transParams = computed(() => {
|
|
|
+ let types = params.types.join(',');
|
|
|
+ return { ...params, types };
|
|
|
+});
|
|
|
+const {
|
|
|
+ loading: loading1,
|
|
|
+ pagination: pagination1,
|
|
|
+ tableData: tableData1,
|
|
|
+ search: search1,
|
|
|
+} = useFetchTable(getMyMessages, {
|
|
|
+ params: transParams,
|
|
|
+});
|
|
|
+const fields = ref([
|
|
|
+ {
|
|
|
+ prop: 'types',
|
|
|
+ label: '消息类型',
|
|
|
+ type: 'multipleSelect',
|
|
|
+ labelWidth: 100,
|
|
|
+ colSpan: 8,
|
|
|
+ options: dictToOptionList(MESSAGE_TYPE),
|
|
|
+ attrs: {
|
|
|
+ clearable: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'serviceId',
|
|
|
+ label: '服务单元',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: 100,
|
|
|
+ colSpan: 5,
|
|
|
+ cell: 'service',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'custom',
|
|
|
+ label: '客户名称',
|
|
|
+ labelWidth: 100,
|
|
|
+ colSpan: 5,
|
|
|
+ cell: 'service',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'buttons',
|
|
|
+ colSpan: 3,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ type: 'button',
|
|
|
+ text: '查询',
|
|
|
+ onClick: () => {
|
|
|
+ search();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+]);
|
|
|
</script>
|
|
|
|
|
|
<style></style>
|