|
|
@@ -97,6 +97,14 @@
|
|
|
>
|
|
|
编辑
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="goView(scope.row.id)"
|
|
|
+ v-hasPermi="['iscs:map:update']"
|
|
|
+ >
|
|
|
+ 预览
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
link
|
|
|
type="danger"
|
|
|
@@ -125,7 +133,9 @@
|
|
|
import * as cockpitApi from '@/api/system/cockpitComponent/index'
|
|
|
import ComponentForm from './componentForm.vue'
|
|
|
import {DICT_TYPE} from "@/utils/dict";
|
|
|
+import { useRouter } from "vue-router"
|
|
|
|
|
|
+const router = useRouter()
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
const { t } = useI18n() // 国际化
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
@@ -158,7 +168,6 @@ const data=await cockpitApi.getUiComponentPage(queryParams)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 搜索按钮
|
|
|
const handleQuery=()=>{
|
|
|
queryParams.pageNo=1;
|
|
|
@@ -177,6 +186,16 @@ const handleSelectionChange=(selection:any[])=>{
|
|
|
multiple.value=!selection.length
|
|
|
}
|
|
|
|
|
|
+// 预览
|
|
|
+const goView=async(id:number)=>{
|
|
|
+ console.log(id)
|
|
|
+ const pathData = await cockpitApi.selectUiComponentById(id)
|
|
|
+ console.log(pathData,'路径')
|
|
|
+ if (pathData && pathData.componentFilePath) {
|
|
|
+ const fullPath = `/uiCom${pathData.componentFilePath}`
|
|
|
+ router.push(fullPath)
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
// 新增/修改
|
|
|
const openForm = (type: string, id?: number) => {
|