|
|
|
@ -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<TableColumn[]>([
|
|
|
|
|
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 <span>{data.row.frequency?frequency_param_LIST.value[data.row.frequency]?.label:''}</span>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'createTime',
|
|
|
|
|
label: '机构名称'
|
|
|
|
|
default:(data)=>{
|
|
|
|
|
return <span>{data.row.frequency?frequency_param_LIST.value[data.row.frequency]?.label:''}</span>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tName',
|
|
|
|
|
label: '数据日期'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tCategory',
|
|
|
|
|
field: 'indexValue',
|
|
|
|
|
label: '本期值',
|
|
|
|
|
slots:{
|
|
|
|
|
default:(data:any)=>{
|
|
|
|
@ -119,13 +130,13 @@ const tableColumns = reactive<TableColumn[]>([
|
|
|
|
|
{{
|
|
|
|
|
default:()=>{
|
|
|
|
|
return <div>
|
|
|
|
|
<span class="cursor-pointer">{data.row.tCategory}</span>
|
|
|
|
|
<span class="canOperate">{data.row.indexValue}</span>
|
|
|
|
|
</div>
|
|
|
|
|
},
|
|
|
|
|
dropdown:()=>{
|
|
|
|
|
return <ElDropdownMenu>
|
|
|
|
|
<ElDropdownItem>
|
|
|
|
|
<div onClick={()=>handleDrillingOrAnalysis(data.row,'DataDillingByOrgan','按机构钻取')}>按机构钻取</div>
|
|
|
|
|
<div>按机构钻取</div>
|
|
|
|
|
</ElDropdownItem>
|
|
|
|
|
<ElDropdownItem>
|
|
|
|
|
<div>趋势分析</div>
|
|
|
|
@ -138,7 +149,7 @@ const tableColumns = reactive<TableColumn[]>([
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tCategory',
|
|
|
|
|
field: 'prevPeriodValue',
|
|
|
|
|
label: '上期值',
|
|
|
|
|
slots:{
|
|
|
|
|
default:(data:any)=>{
|
|
|
|
@ -146,7 +157,7 @@ const tableColumns = reactive<TableColumn[]>([
|
|
|
|
|
{{
|
|
|
|
|
default:()=>{
|
|
|
|
|
return <div>
|
|
|
|
|
<span class="cursor-pointer">{data.row.tCategory}</span>
|
|
|
|
|
<span>{data.row.prevPeriodValue}</span>
|
|
|
|
|
</div>
|
|
|
|
|
},
|
|
|
|
|
dropdown:()=>{
|
|
|
|
@ -168,7 +179,7 @@ const tableColumns = reactive<TableColumn[]>([
|
|
|
|
|
|
|
|
|
|
const searchSchema = reactive<FormSchema[]>([
|
|
|
|
|
{
|
|
|
|
|
field: 'orgCode',
|
|
|
|
|
field: 'organId',
|
|
|
|
|
label: '机构',
|
|
|
|
|
colProps: { span: 100 },
|
|
|
|
|
componentProps: {
|
|
|
|
@ -198,7 +209,7 @@ const searchSchema = reactive<FormSchema[]>([
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'Datadate',
|
|
|
|
|
field: 'reportDate',
|
|
|
|
|
label: '日期',
|
|
|
|
|
componentProps: {
|
|
|
|
|
type: 'date',
|
|
|
|
@ -210,7 +221,7 @@ const searchSchema = reactive<FormSchema[]>([
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
<Search :schema="searchSchema" @reset="setSearchParams" @search="setSearchParams" />
|
|
|
|
|
|
|
|
|
|
<Table
|
|
|
|
|
:columns="tableColumns"
|
|
|
|
|
v-model:pageSize="pageSize"
|
|
|
|
@ -366,8 +367,4 @@ const handleDrillingOrAnalysis = (row: any, type: string,title: string) => {
|
|
|
|
|
<ElButton @click="dialogVisible = false">{{ t('dialogDemo.close') }}</ElButton>
|
|
|
|
|
</template>
|
|
|
|
|
</Dialog>
|
|
|
|
|
|
|
|
|
|
<Dialog v-model="drillingandanalysis.dialogVisiable" :title="drillingandanalysis.showTitle">
|
|
|
|
|
<DrillingOrAnalysis :current-row="drillingandanalysis.currentRow" :DrillingType="drillingandanalysis.DrillingType" />
|
|
|
|
|
</Dialog>
|
|
|
|
|
</template>
|