修改指标分类字段展示,新增指标查询带入参数

修改指标查询列表展示界面等问题
解决指标集,指标定义时间范围查询不生效问题
main
zhangxiaodi1 9 months ago
parent e69a1e70a1
commit 168b6d6965

@ -166,8 +166,12 @@ const searchSchema = reactive<FormSchema[]>([
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})

@ -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<TableColumn[]>([
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 <span>{data.row.frequency?frequency_param_LIST.value[data.row.frequency]?.label:''}</span>
}
}
},
{
field: 'beginDate',
label: '生效日期',
slots:{
default:(data:any)=>{
return <span>{data.row.beginDate}{data.row.endDate}</span>
}
}
},
{
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
}
})
}

@ -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>

@ -209,8 +209,12 @@ const searchSchema = reactive<FormSchema[]>([
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)

Loading…
Cancel
Save