|
@@ -59,8 +59,11 @@
|
|
|
|
|
|
<el-table-column prop="createdAt" label="创建时间" align="center"></el-table-column>
|
|
<el-table-column prop="createdAt" label="创建时间" align="center"></el-table-column>
|
|
|
|
|
|
- <el-table-column label="操作" width="200" align="center">
|
|
|
|
|
|
+ <el-table-column label="操作" width="400" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
<router-link
|
|
<router-link
|
|
:to="'/datahub/modeling/detail/' + scope.row.id"
|
|
:to="'/datahub/modeling/detail/' + scope.row.id"
|
|
class="link-type"
|
|
class="link-type"
|
|
@@ -68,7 +71,7 @@
|
|
>
|
|
>
|
|
<span>字段管理</span>
|
|
<span>字段管理</span>
|
|
</router-link>
|
|
</router-link>
|
|
-
|
|
|
|
|
|
+ <el-button size="small" text type="success" @click="onOpenRecord(scope.row)" >数据记录</el-button>
|
|
<el-button size="small" text type="warning" @click="onOpenEdit(scope.row)">修改</el-button>
|
|
<el-button size="small" text type="warning" @click="onOpenEdit(scope.row)">修改</el-button>
|
|
<el-button size="small" text type="danger" @click="onRowDel(scope.row)">删除</el-button>
|
|
<el-button size="small" text type="danger" @click="onRowDel(scope.row)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -91,6 +94,7 @@
|
|
import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
|
|
import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
|
|
import { ElMessageBox, ElMessage, FormInstance } from 'element-plus';
|
|
import { ElMessageBox, ElMessage, FormInstance } from 'element-plus';
|
|
import EditDic from './component/edit.vue';
|
|
import EditDic from './component/edit.vue';
|
|
|
|
+import Detail from './component/detail.vue';
|
|
import api from '/@/api/datahub';
|
|
import api from '/@/api/datahub';
|
|
|
|
|
|
// 定义接口来定义对象的类型
|
|
// 定义接口来定义对象的类型
|
|
@@ -118,10 +122,11 @@ interface TableDataState {
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'sourcelist',
|
|
name: 'sourcelist',
|
|
- components: { EditDic },
|
|
|
|
|
|
+ components: { EditDic,Detail },
|
|
setup() {
|
|
setup() {
|
|
const addDicRef = ref();
|
|
const addDicRef = ref();
|
|
const editDicRef = ref();
|
|
const editDicRef = ref();
|
|
|
|
+ const detailRef=ref();
|
|
const queryRef = ref();
|
|
const queryRef = ref();
|
|
const state = reactive<TableDataState>({
|
|
const state = reactive<TableDataState>({
|
|
tableData: {
|
|
tableData: {
|
|
@@ -154,6 +159,10 @@ export default defineComponent({
|
|
const onOpenEdit = (row: TableDataRow) => {
|
|
const onOpenEdit = (row: TableDataRow) => {
|
|
editDicRef.value.openDialog(row);
|
|
editDicRef.value.openDialog(row);
|
|
};
|
|
};
|
|
|
|
+ //打开数据记录
|
|
|
|
+ const onOpenRecord=(row: TableDataRow)=>{
|
|
|
|
+ detailRef.value.openDialog(row);
|
|
|
|
+ };
|
|
const onRowDel = (row: TableDataRow) => {
|
|
const onRowDel = (row: TableDataRow) => {
|
|
let msg = '你确定要删除所选数据?';
|
|
let msg = '你确定要删除所选数据?';
|
|
let ids: number[] = [];
|
|
let ids: number[] = [];
|
|
@@ -198,7 +207,9 @@ export default defineComponent({
|
|
return {
|
|
return {
|
|
addDicRef,
|
|
addDicRef,
|
|
editDicRef,
|
|
editDicRef,
|
|
|
|
+ detailRef,
|
|
queryRef,
|
|
queryRef,
|
|
|
|
+ onOpenRecord,
|
|
onOpenAdd,
|
|
onOpenAdd,
|
|
onOpenEdit,
|
|
onOpenEdit,
|
|
onRowDel,
|
|
onRowDel,
|