|
|
|
@ -21,11 +21,12 @@ import Write from './components/Write.vue'
|
|
|
|
|
import { Dialog } from '@/components/Dialog'
|
|
|
|
|
import { getWidth } from '@/utils';
|
|
|
|
|
import { Upload } from '@/components/Upload'
|
|
|
|
|
import {useRoute} from "vue-router"
|
|
|
|
|
import {useRoute,useRouter} from "vue-router"
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const pageQuery = ref(route || null);
|
|
|
|
|
const modelCode = pageQuery.value?.query?.modelCode;
|
|
|
|
|
import { OPERATION_TYPE_LIST,RULE_TYPE_LIST } from './constants';
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
|
|
|
|
@ -100,12 +101,18 @@ const tableColumns = reactive<TableColumn[]>([
|
|
|
|
|
{
|
|
|
|
|
field: 'action',
|
|
|
|
|
label: t('tableDemo.action'),
|
|
|
|
|
width: 160,
|
|
|
|
|
width: 240,
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
slots: {
|
|
|
|
|
default: (data: any) => {
|
|
|
|
|
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')}>
|
|
|
|
|
{t('tableDemo.edit')}
|
|
|
|
|
</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 = () => {
|
|
|
|
|
dialogTitle.value = t('tableDemo.add')
|
|
|
|
|
currentRow.value = undefined
|
|
|
|
|