指标集新增数据配置跳转指标管理

main
zhangxiaodi1 9 months ago
parent 97416b2c2c
commit 6860d20be9

@ -23,6 +23,11 @@ import { Dialog } from '@/components/Dialog'
import { getWidth } from '@/utils'; import { getWidth } from '@/utils';
import { Upload } from '@/components/Upload' import { Upload } from '@/components/Upload'
import { saveRepDataProblemApi } from '@/api/reporting/RepDataProblem/RepDataProblem' import { saveRepDataProblemApi } from '@/api/reporting/RepDataProblem/RepDataProblem'
import {useRoute} from "vue-router"
const route = useRoute();
const pageQuery = ref(route || null);
const indexsetCode = pageQuery.value?.query?.indexsetCode;
const { t } = useI18n() const { t } = useI18n()
@ -61,7 +66,8 @@ const tableColumns = reactive<TableColumn[]>([
{ {
field: 'indexsetCode', field: 'indexsetCode',
label: '指标集编码', label: '指标集编码',
hidden:true hidden:true,
value:indexsetCode
}, },
{ {
field: 'code', field: 'code',
@ -160,6 +166,7 @@ const setSearchParams = (data: any) => {
searchParams.value = data searchParams.value = data
getList() getList()
} }
setSearchParams({indexsetCode:indexsetCode})
const dialogVisible = ref(false) const dialogVisible = ref(false)
const dialogTitle = ref('') const dialogTitle = ref('')

@ -139,12 +139,15 @@ const tableColumns = reactive<TableColumn[]>([
{ {
field: 'action', field: 'action',
label: t('tableDemo.action'), label: t('tableDemo.action'),
width: 160, width: 200,
fixed: 'right', fixed: 'right',
slots: { slots: {
default: (data: any) => { default: (data: any) => {
return ( return (
<> <>
<ElLink type="primary" underline={false} onClick={() => getDataConfig(data.row)}>
数据配置
</ElLink>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}> <ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}>
{t('tableDemo.edit')} {t('tableDemo.edit')}
</ElLink> </ElLink>
@ -252,6 +255,17 @@ const action = async (row: TableData, type: string) => {
} }
} }
/** 指标集数据配置 **/
const getDataConfig = (data)=>{
console.log(data);
router.push({
name:'codeRepItem',
query:{
indexsetCode:data.indexsetCode,
}
})
}
const AddAction = () => { const AddAction = () => {
dialogTitle.value = t('tableDemo.add') dialogTitle.value = t('tableDemo.add')
currentRow.value = undefined currentRow.value = undefined

Loading…
Cancel
Save