模型规则新增跳转映射和配置

main
zhangxiaodi1 9 months ago
parent 4d7d12b5da
commit 651da4a334

@ -93,7 +93,7 @@ const tableColumns = reactive<TableColumn[]>([
default: (data: any) => { default: (data: any) => {
return ( return (
<> <>
<ElLink type="primary" underline={false} onClick={() => getModelParam(data.row)}> <ElLink type="primary" underline={false} onClick={() => getModelRule(data.row)}>
增加规则 增加规则
</ElLink> </ElLink>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}> <ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}>
@ -180,7 +180,7 @@ const action = async (row: TableData, type: string) => {
} }
/** 数据模型新增规则 **/ /** 数据模型新增规则 **/
const getModelParam = (data)=>{ const getModelRule = (data)=>{
console.log(data); console.log(data);
router.push({ router.push({
name:'repStore', name:'repStore',

@ -21,11 +21,12 @@ import Write from './components/Write.vue'
import { Dialog } from '@/components/Dialog' import { Dialog } from '@/components/Dialog'
import { getWidth } from '@/utils'; import { getWidth } from '@/utils';
import { Upload } from '@/components/Upload' import { Upload } from '@/components/Upload'
import {useRoute} from "vue-router" import {useRoute,useRouter} from "vue-router"
const route = useRoute(); const route = useRoute();
const pageQuery = ref(route || null); const pageQuery = ref(route || null);
const modelCode = pageQuery.value?.query?.modelCode; const modelCode = pageQuery.value?.query?.modelCode;
import { OPERATION_TYPE_LIST,RULE_TYPE_LIST } from './constants'; import { OPERATION_TYPE_LIST,RULE_TYPE_LIST } from './constants';
const router = useRouter();
const { t } = useI18n() const { t } = useI18n()
@ -100,12 +101,18 @@ const tableColumns = reactive<TableColumn[]>([
{ {
field: 'action', field: 'action',
label: t('tableDemo.action'), label: t('tableDemo.action'),
width: 160, width: 240,
fixed: 'right', fixed: 'right',
slots: { slots: {
default: (data: any) => { default: (data: any) => {
return ( return (
<> <>
<ElLink type="primary" underline={false} onClick={() => getModelParam(data.row)}>
映射
</ElLink>
<ElLink type="primary" underline={false} onClick={() => getModelMapping(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>
@ -185,6 +192,30 @@ const action = async (row: TableData, type: string) => {
} }
} }
/** 数据模型规则 **/
const getModelParam = (data)=>{
console.log(data);
router.push({
name:'repStoreParameter',
query:{
modelCode:data.modelCode,
}
})
}
/** 数据模型映射 **/
const getModelMapping = (data)=>{
console.log(data);
router.push({
name:'repStoreMapping',
query:{
modelCode:data.modelCode,
}
})
}
const AddAction = () => { const AddAction = () => {
dialogTitle.value = t('tableDemo.add') dialogTitle.value = t('tableDemo.add')
currentRow.value = undefined currentRow.value = undefined

@ -23,6 +23,10 @@ import { getWidth } from '@/utils';
import Detail from './components/Detail.vue' import Detail from './components/Detail.vue'
import { Upload } from '@/components/Upload' import { Upload } from '@/components/Upload'
import { WHETHER_UUID_LIST,WHETHER_UNITEDKEY_LIST } from './constants' import { WHETHER_UUID_LIST,WHETHER_UNITEDKEY_LIST } from './constants'
import {useRoute} from "vue-router"
const route = useRoute();
const pageQuery = ref(route || null);
const modelCode = pageQuery.value?.query?.modelCode;
const { t } = useI18n() const { t } = useI18n()
@ -154,7 +158,8 @@ const searchSchema = reactive<FormSchema[]>([
field: 'modelCode', field: 'modelCode',
label: '数据模型编码', label: '数据模型编码',
componentProps: {}, componentProps: {},
component: 'Input' component: 'Input',
value:modelCode
}, },
{ {
field: 'ruleId', field: 'ruleId',
@ -182,6 +187,8 @@ const setSearchParams = (data: any) => {
getList() getList()
} }
setSearchParams({modelCode:modelCode})
const dialogVisible = ref(false) const dialogVisible = ref(false)
const dialogTitle = ref('') const dialogTitle = ref('')

@ -23,7 +23,11 @@ import { getWidth } from '@/utils';
import Detail from './components/Detail.vue' import Detail from './components/Detail.vue'
import { Upload } from '@/components/Upload' import { Upload } from '@/components/Upload'
const { t } = useI18n() const { t } = useI18n()
const ids = ref<string[]>([])
import {useRoute} from "vue-router"
const route = useRoute();
const pageQuery = ref(route || null); const pageQuery = ref(route || null);
const modelCode = pageQuery.value?.query?.modelCode;
const { tableRegister, tableState, tableMethods } = useTable({ const { tableRegister, tableState, tableMethods } = useTable({
@ -122,7 +126,8 @@ const searchSchema = reactive<FormSchema[]>([
field: 'modelCode', field: 'modelCode',
label: '模型编码', label: '模型编码',
componentProps: {}, componentProps: {},
component: 'Input' component: 'Input',
value:modelCode
}, },
{ {
field: 'name', field: 'name',
@ -137,7 +142,7 @@ const setSearchParams = (data: any) => {
searchParams.value = data searchParams.value = data
getList() getList()
} }
setSearchParams({modelCode:modelCode})
const dialogVisible = ref(false) const dialogVisible = ref(false)
const dialogTitle = ref('') const dialogTitle = ref('')

Loading…
Cancel
Save