diff --git a/src/views/dataset/CodeRepItem/CodeRepItem.vue b/src/views/dataset/CodeRepItem/CodeRepItem.vue index 9d5b4dd..46f9fe3 100644 --- a/src/views/dataset/CodeRepItem/CodeRepItem.vue +++ b/src/views/dataset/CodeRepItem/CodeRepItem.vue @@ -166,8 +166,12 @@ const searchSchema = reactive([ const searchParams = ref({}) const setSearchParams = (data: any) => { - searchParams.value = data - getList() +if(data.indexDate){ + data.beginDate = data.indexDate[0]; + data.endDate = data.indexDate[1]; + } + searchParams.value = data; + getList(); } setSearchParams({indexsetCode:indexsetCode}) diff --git a/src/views/dataset/IndexClassMs/IndexClassMs.vue b/src/views/dataset/IndexClassMs/IndexClassMs.vue index c282ed8..d8fc960 100644 --- a/src/views/dataset/IndexClassMs/IndexClassMs.vue +++ b/src/views/dataset/IndexClassMs/IndexClassMs.vue @@ -27,7 +27,29 @@ import { ContentWrap } from '@/components/ContentWrap' import Write from './components/Write.vue' import Detail from './components/Detail.vue' import { Dialog } from '@/components/Dialog' -import router from '@/router' +import {useRouter} from "vue-router" +const router = useRouter(); +import { getDateByPrevMonth } from '@/utils/dateUtil'; +import { useAppStoreWithOut } from '@/store/modules/app' +import { useStorage } from '@/hooks/web/useStorage' +import { getIndexType } from '@/api/dataset/RepIndexSet' +import { transfDictList } from '@/utils'; + + +const date = getDateByPrevMonth(); + +const appStore = useAppStoreWithOut() +const { getStorage } = useStorage() +const userInfo = getStorage(appStore.getUserInfo) + +let frequency_param_LIST = ref([]); + +//获取字典项 +const getDictInfoList = async ()=>{ + const res = await getIndexType({ paramName: 'frequency_param', systemCode: 'ordb' }); + frequency_param_LIST.value = transfDictList(res.body.result); +} +getDictInfoList(); defineOptions({ name: 'IndexSearchServiceMs', @@ -64,33 +86,51 @@ const tableColumns = reactive([ type: 'selection' }, { - field: 'dicid', - label: '分类编号' + field: 'indexsetCode', + label: '指标集编码' }, { - field: 'dicname', - label: '分类名称' + field: 'indexsetName', + label: '指标集名称' }, { - field: 'dicvalue', - label: '分类值' + field: 'code', + label: '指标代码' }, { - field: 'parentname', - label: '上级分类' + field: 'itemName', + label: '指标名称' }, { - field: 'description', - label: '分类描述' + field: 'businessDefinition', + label: '业务定义' }, { - field: 'status', - label: '分类状态' + field: 'indexType', + label: '指标类型' + }, + { + field: 'frequency', + label: '频度', + slots:{ + default:(data)=>{ + return {data.row.frequency?frequency_param_LIST.value[data.row.frequency]?.label:''} + } + } + }, + { + field: 'beginDate', + label: '生效日期', + slots:{ + default:(data:any)=>{ + return {data.row.beginDate}到{data.row.endDate} + } + } }, { field: 'action', label: t('tableDemo.action'), - width: 160, + width:160, slots: { default: (data: any) => { return ( @@ -152,7 +192,10 @@ const lookRule = (data)=>{ router.push({ name:'IndexSearchServiceMs', query:{ - dicid:data.dicid, + indexsetCode:data.indexsetCode, + frequency:data.frequency, + reportDate: date, + organId: userInfo.session_organCode } }) } diff --git a/src/views/dataset/IndexSearchServiceMs/IndexSearchServiceMs.vue b/src/views/dataset/IndexSearchServiceMs/IndexSearchServiceMs.vue index e99099c..15bde56 100644 --- a/src/views/dataset/IndexSearchServiceMs/IndexSearchServiceMs.vue +++ b/src/views/dataset/IndexSearchServiceMs/IndexSearchServiceMs.vue @@ -21,17 +21,21 @@ import { getOrganTree } from '@/api/common' import { getIndexType } from '@/api/dataset/RepIndexSet'; import { transfDictList } from '@/utils'; + import {useRoute} from "vue-router" const route = useRoute(); const pageQuery = ref(route || null); -const dicid = pageQuery.value?.query?.dicid; + const indexsetCode = pageQuery.value?.query?.indexsetCode; + const reportDate = pageQuery.value?.query?.reportDate; + const organId = pageQuery.value?.query?.organId; + const frequency = pageQuery.value?.query?.frequency; let frequency_param_LIST = ref([]); //获取字典项 const getDictInfoList = async ()=>{ - const res = await getIndexType({ paramName: 'frequency_param', systemCode: 'ordb' }); - frequency_param_LIST.value = transfDictList(res.body.result); + const res = await getIndexType({ paramName: 'frequency_param', systemCode: 'ordb' }); + frequency_param_LIST.value = transfDictList(res.body.result); } getDictInfoList(); @@ -51,6 +55,7 @@ const { tableRegister, tableState, tableMethods } = useTable({ const res = await getRepIndexSearchListApi({ pageIndex: unref(currentPage), pageSize: unref(pageSize), + indexsetCode:indexsetCode, ...unref(searchParams) }) return { @@ -72,46 +77,52 @@ const tableColumns = reactive([ field: 'selection', type: 'selection', fixed: true + }, + { + field: 'organName', + label: '机构名称' + }, + { + field: 'paramDate', + label: '数据日期' + }, + { + field: 'indexSetCode', + label: '指标集编码', + hidden: true }, { - field: 'indexsetCode', - label: '指标集编码' + field: 'indexSetName', + label: '指标集名称', + hidden: true }, { - field: 'indexsetName', - label: '指标集名称' + field: 'indexItemCode', + label: '指标代码' }, { - field: 'beginDate', - label: '开始日期' + field: 'itemName', + label: '指标名称' }, { - field: 'endDate', - label: '结束日期' + field: 'indexTargetCode', + label: '指标属性' }, { - field: 'organCode', - label: '机构编码' + field: 'targetName', + label: '指标属性名称' }, { field: 'frequency', label: '频度', slots:{ - default:(data)=>{ - return {data.row.frequency?frequency_param_LIST.value[data.row.frequency]?.label:''} - } - } - }, - { - field: 'createTime', - label: '机构名称' + default:(data)=>{ + return {data.row.frequency?frequency_param_LIST.value[data.row.frequency]?.label:''} + } + } }, { - field: 'tName', - label: '数据日期' - }, - { - field: 'tCategory', + field: 'indexValue', label: '本期值', slots:{ default:(data:any)=>{ @@ -119,13 +130,13 @@ const tableColumns = reactive([ {{ default:()=>{ return
- {data.row.tCategory} + {data.row.indexValue}
}, dropdown:()=>{ return -
handleDrillingOrAnalysis(data.row,'DataDillingByOrgan','按机构钻取')}>按机构钻取
+
按机构钻取
趋势分析
@@ -138,7 +149,7 @@ const tableColumns = reactive([ } }, { - field: 'tCategory', + field: 'prevPeriodValue', label: '上期值', slots:{ default:(data:any)=>{ @@ -146,7 +157,7 @@ const tableColumns = reactive([ {{ default:()=>{ return
- {data.row.tCategory} + {data.row.prevPeriodValue}
}, dropdown:()=>{ @@ -168,7 +179,7 @@ const tableColumns = reactive([ const searchSchema = reactive([ { - field: 'orgCode', + field: 'organId', label: '机构', colProps: { span: 100 }, componentProps: { @@ -198,7 +209,7 @@ const searchSchema = reactive([ }, }, { - field: 'Datadate', + field: 'reportDate', label: '日期', componentProps: { type: 'date', @@ -210,7 +221,7 @@ const searchSchema = reactive([ }, }, { - field: 'tCategory', + field: 'itemAndTarget', label: '指标代码', componentProps: {}, component: 'Input', @@ -225,7 +236,7 @@ const setSearchParams = (data: any) => { searchParams.value = data getList() } -setSearchParams({indexsetType:dicid}); +setSearchParams({indexsetCode:indexsetCode,reportDate:reportDate,organId:organId,frequency:frequency}); const dialogVisible = ref(false) const dialogTitle = ref('') @@ -315,24 +326,14 @@ const onSelectionChange = (selection: TableData[]) => { const onContextMenu = (row: any, column: any, cell: HTMLTableCellElement, event: Event) => { } -//数据钻取的时候使用到的界面信息 -let drillingandanalysis = reactive({ - dialogVisiable:false,//数据钻取和分析的弹框打开 - showTitle:"",//打开弹窗的标题名称 - currentRow:{},//传输的当前行的信息 - DrillingType:"",//当前是按机构钻取还是趋势分析 'DataDillingByOrgan'|'TrendAnalysis' -}) -const handleDrillingOrAnalysis = (row: any, type: string,title: string) => { - drillingandanalysis.dialogVisiable = true; - drillingandanalysis.currentRow = row; - drillingandanalysis.DrillingType = type; - drillingandanalysis.showTitle = title; -} + + - - - - \ No newline at end of file diff --git a/src/views/dataset/RepIndexSet/RepIndexSet.vue b/src/views/dataset/RepIndexSet/RepIndexSet.vue index 0862425..a9b2656 100644 --- a/src/views/dataset/RepIndexSet/RepIndexSet.vue +++ b/src/views/dataset/RepIndexSet/RepIndexSet.vue @@ -209,8 +209,12 @@ const searchSchema = reactive([ const searchParams = ref({}) const setSearchParams = (data: any) => { - searchParams.value = data - getList() +if(data.indexDate){ + data.beginDate = data.indexDate[0]; + data.endDate = data.indexDate[1]; + } + searchParams.value = data; + getList(); } const dialogVisible = ref(false)