This commit is contained in:
Jane 2024-01-03 16:10:52 +08:00
parent 0c4218ad93
commit 2b10f1d563
3 changed files with 67 additions and 6 deletions

View File

@ -0,0 +1,40 @@
<template>
<div class="app-container">
<el-card class="box-card" shadow="always">
<el-form ref="queryForm" :model="queryParams" :inline="true">
<el-form-item label="项目" prop="projectId">
<el-select v-model="queryParams.projectId" clearable size="small" placeholder="项目" class="filter-item">
<el-option v-for="item in projectsOptions" :key="item.id" :label="item.projectName" :value="item.id" />
</el-select>
</el-form-item>
</el-form>
<iframe src="http://127.0.0.1:8000/model/modelChildren?hideInMenu=true&projectId=1" width="100%" height="850px" frameborder="0" />
</el-card>
</div>
</template>
<script>
export default {
name: 'OfflineDataDetail',
data() {
return {
projectsOptions: [
{ id: '1111', projectName: '演示项目' }
],
//
queryParams: {
pageNum: 1,
pageSize: 20,
projectId: '1111',
fileName: ''
}
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-card class="box-card" shadow="always"> <el-card v-loading="boxCardLoading" class="box-card" shadow="always">
<el-form ref="queryForm" :model="queryParams" :inline="true"> <el-form ref="queryForm" :model="queryParams" :inline="true">
<el-form-item label="项目" prop="projectId"> <el-form-item label="项目" prop="projectId">
<el-select v-model="queryParams.projectId" clearable size="small" placeholder="项目" class="filter-item" @change="handleQuery"> <el-select v-model="queryParams.projectId" clearable size="small" placeholder="项目" class="filter-item" @change="handleQuery">
@ -102,17 +102,19 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.isSwitch != 'jrcg'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-sort" icon="el-icon-sort"
@click="handleEdit(scope.row)" @click="handleSwitch(scope.row)"
>执行接入</el-button> >执行接入</el-button>
<el-button <el-button
v-if="scope.row.isSwitch == 'jrcg'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleEdit(scope.row)" @click="handleDetail(scope.row)"
>接入详情</el-button> >查看接入数据</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -159,6 +161,7 @@
}, },
// //
loading: true, loading: true,
boxCardLoading: false,
// //
tableColumns: [ tableColumns: [
{ prop: 'fileName', label: '离线文件名称', show: true }, { prop: 'fileName', label: '离线文件名称', show: true },
@ -231,6 +234,21 @@
initCols() { initCols() {
this.checkedTableColumns = this.tableColumns.map(col => col.prop) this.checkedTableColumns = this.tableColumns.map(col => col.prop)
}, },
handleSwitch(row) {
this.boxCardLoading = true
setTimeout(() => {
row.isSwitch = 'jrcg'
this.boxCardLoading = false
this.$message.success('接入成功')
}, 2000)
},
/** 详情按钮操作 */
handleDetail(row) {
this.showOptions.data.id = row.id
this.showOptions.showList = false
this.showOptions.showDetail = true
this.$emit('showCard', this.showOptions)
},
handleCheckedColsChange(val) { handleCheckedColsChange(val) {
this.tableColumns.forEach(col => { this.tableColumns.forEach(col => {
if (!this.checkedTableColumns.includes(col.prop)) { if (!this.checkedTableColumns.includes(col.prop)) {

View File

@ -2,21 +2,24 @@
<div class="app-container"> <div class="app-container">
<transition name="el-zoom-in-center"> <transition name="el-zoom-in-center">
<offline-data-list v-if="options.showList" @showCard="showCard" /> <offline-data-list v-if="options.showList" @showCard="showCard" />
<offline-data-detail v-if="options.showDetail" @showCard="showCard" />
</transition> </transition>
</div> </div>
</template> </template>
<script> <script>
import OfflineDataList from './OfflineDataList' import OfflineDataList from './OfflineDataList'
import OfflineDataDetail from './OfflineDataDetail'
export default { export default {
name: 'OfflineData', name: 'OfflineData',
components: { OfflineDataList }, components: { OfflineDataList, OfflineDataDetail },
data() { data() {
return { return {
options: { options: {
data: {}, data: {},
showList: true showList: true,
showDetail: true
} }
} }
}, },