Merge remote-tracking branch 'origin/master'

main
liu.shiyi 2 years ago
commit 3dd519c1fe

@ -3,8 +3,8 @@
🔥DataRoom是一款基于SpringBoot、MyBatisPlus、ElementUI、G2Plot、Echarts等技术栈的大屏设计器具备大屏目录管理、大屏设计、大屏预览能力支持MySQL、Oracle、PostgreSQL、JSON、HTTP、Groovy等数据集接入使用简单完全免费代码开源。
<p align="center">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/gcpaas/DataRoom?style=social">
<img alt="GitHub forks" src="https://img.shields.io/github/forks/gcpaas/DataRoom?style=social">
<img alt="stars" src="https://gitee.com/gcpaas/DataRoom/badge/star.svg?theme=dark">
<img alt="forks" src="https://gitee.com/gcpaas/DataRoom/badge/fork.svg?theme=dark">
<img alt="GitHub license" src="https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg">
<img alt="npm" src="https://img.shields.io/npm/v/@gcpaas/data-room-ui">
<img alt="Maven Central" src="https://img.shields.io/maven-central/v/com.gccloud/gc-starter-bigscreen-core">

@ -3,8 +3,8 @@
🔥DataRoom是一款基于SpringBoot、MyBatisPlus、ElementUI、G2Plot、Echarts等技术栈的大屏设计器具备大屏目录管理、大屏设计、大屏预览能力支持MySQL、Oracle、PostgreSQL、JSON、HTTP、Groovy等数据集接入使用简单完全免费代码开源。
<p align="center">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/gcpaas/DataRoom?style=social">
<img alt="GitHub forks" src="https://img.shields.io/github/forks/gcpaas/DataRoom?style=social">
<img alt="stars" src="https://gitee.com/gcpaas/DataRoom/badge/star.svg?theme=dark">
<img alt="forks" src="https://gitee.com/gcpaas/DataRoom/badge/fork.svg?theme=dark">
<img alt="GitHub license" src="https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg">
<img alt="npm" src="https://img.shields.io/npm/v/@gcpaas/data-room-ui">
<img alt="Maven Central" src="https://img.shields.io/maven-central/v/com.gccloud/gc-starter-bigscreen-core">

@ -1,6 +1,6 @@
{
"name": "@gcpaas/data-room-ui",
"version": "1.0.1-2023080304-Alpha",
"version": "1.0.1-2023080403-Alpha",
"description": "自定义大屏",
"author": "gcpaas",
"license": "MIT",

@ -426,7 +426,8 @@ export default {
code: form.code
}
})
window.open(bigScreenHref, '_self')
//
window.open(bigScreenHref, '_blank')
}
}
}

@ -344,6 +344,7 @@ export default {
window.open(href, '_blank')
},
design (screen) {
console.log(222)
const path = this.catalogInfo === 'component' ? (window.BS_CONFIG?.routers?.designUrl || '/big-screen/design') : (window.BS_CONFIG?.routers?.bizComponentDesignUrl || 'big-screen-biz-component-design')
const { href } = this.$router.resolve({
path,
@ -351,7 +352,8 @@ export default {
code: screen.code
}
})
window.open(href, '_self')
//
window.open(href, '_blank')
},
add () {
const page = {

@ -203,7 +203,7 @@
type="primary"
@click="buildParamsAndRun"
>
运行并解析
解析并运行
</el-button>
</div>
</div>
@ -298,10 +298,9 @@
:data="dataPreviewList"
max-height="400"
class="bs-el-table bs-scrollbar"
:border="true"
>
<el-table-column
v-for="(value, key) in dataPreviewList[0]"
v-for="(value, key) in dataPreviewList[0] ? dataPreviewList[0] : noDataTableDisplayFields"
:key="key"
:label="key"
align="center"
@ -853,6 +852,14 @@ export default {
script: this.dataForm.script,
paramsList: this.dataForm.paramsList
}
},
noDataTableDisplayFields () {
//
const tableColumnObject = {}
this.structurePreviewList.forEach(item => {
tableColumnObject[item.fieldName] = ''
})
return tableColumnObject
}
},
watch: {
@ -1094,7 +1101,7 @@ export default {
})
},
/**
* 运行并解析数据集
* 解析并运行数据集
*/
buildParamsAndRun () {
this.isTest = true
@ -1377,10 +1384,8 @@ export default {
}
.bs-pagination {
padding: 0 !important;
right: 16px !important;
bottom: 16px !important;
position: absolute !important;
padding: 16px !important;
position: unset !important;
::v-deep .el-input__inner {
width: 110px !important;
border: none;

@ -455,7 +455,7 @@
type="primary"
@click="scriptExecute()"
>
运行并解析
解析并运行
</el-button>
</div>
</div>
@ -592,7 +592,6 @@
align="center"
:data="dataPreviewList"
max-height="400"
:border="true"
class="bs-el-table"
>
<el-table-column

@ -165,7 +165,7 @@
type="primary"
@click="scriptExecute()"
>
运行并解析
解析并运行
</el-button>
</div>
</div>
@ -297,7 +297,6 @@
align="center"
:data="dataPreviewList"
max-height="400"
:border="true"
class="bs-el-table"
>
<el-table-column

@ -166,7 +166,7 @@
type="primary"
@click="analysisJSON"
>
运行并解析
解析并运行
</el-button>
</div>
</el-col>
@ -223,7 +223,6 @@
align="center"
:data="dataPreviewList"
max-height="400"
:border="true"
class="bs-el-table"
>
<el-table-column

@ -297,8 +297,9 @@
<span>{{ field.fieldName }}</span>&nbsp;<span
v-show="field.fieldDesc"
style="color: #909399;"
>({{
field.fieldDesc }})</span>
>
({{ field.fieldDesc }})
</span>
<el-button
class="edit_field"
type="text"
@ -332,7 +333,7 @@
class="bs-el-table bs-scrollbar"
>
<el-table-column
v-for="(value, key) in dataPreviewList[0]"
v-for="(value, key) in dataPreviewList[0] ? dataPreviewList[0] : noDataTableDisplayFields"
:key="key"
:label="key"
align="center"
@ -568,6 +569,16 @@ export default {
isInit: false
}
},
computed: {
noDataTableDisplayFields () {
//
const tableColumnObject = {}
this.structurePreviewList.forEach(item => {
tableColumnObject[item.fieldName] = ''
})
return tableColumnObject
}
},
watch: {
'dataForm.fieldInfo': {
handler (value) {
@ -588,6 +599,7 @@ export default {
deep: true,
immediate: true
}
},
mounted () {
this.init()
@ -671,9 +683,10 @@ export default {
this.tableLoading = true
datasetExecuteTest(executeParams).then((data) => {
if (this.dataForm.fieldList == null) {
this.dataForm.fieldList = _.cloneDeep(res.structure)
this.dataForm.fieldList = _.cloneDeep(data.structure)
}
this.dataPreviewList = data.data.list
console.log(this.dataPreviewList)
this.totalCount = data.data.totalCount
this.tableLoading = false
}).catch(() => {
@ -810,6 +823,7 @@ export default {
*/
queryAllField () {
getTableFieldList(this.dataForm.sourceId, this.dataForm.tableName).then((data) => {
console.log('data', data)
const fieldDescMap = {}
this.fieldList = data.map(field => {
fieldDescMap[field.columnName] = field.columnComment
@ -1042,10 +1056,8 @@ export default {
}
.bs-pagination {
padding: 0px !important;
right: 16px !important;
bottom: 16px !important;
position: absolute !important;
padding: 16px !important;
position: unset !important;
::v-deep .el-input__inner {
width: 110px !important;
border: none;

@ -160,7 +160,7 @@
type="primary"
@click="toExecute"
>
运行并解析
解析并运行
</el-button>
</div>
</div>
@ -257,11 +257,10 @@
align="center"
:data="dataPreviewList"
max-height="400"
:border="true"
class="bs-el-table bs-scrollbar"
>
<el-table-column
v-for="(value, key) in dataPreviewList[0]"
v-for="(value, key) in dataPreviewList[0] ? dataPreviewList[0] : noDataTableDisplayFields"
:key="key"
:label="key"
align="center"
@ -613,6 +612,16 @@ export default {
fieldDesc: null //
}
},
computed: {
noDataTableDisplayFields () {
//
const tableColumnObject = {}
this.structurePreviewList.forEach(item => {
tableColumnObject[item.fieldName] = ''
})
return tableColumnObject
}
},
watch: {
'dataForm.script' () {
this.passTest = false
@ -880,11 +889,6 @@ export default {
}
}
// .tree-box {
// padding: 0;
// max-height: 270px;
// }
::v-deep .el-input__inner {
width: 100% !important;
}

@ -190,7 +190,7 @@
type="primary"
@click="buildParamsAndRun"
>
运行并解析
解析并运行
</el-button>
</div>
</div>
@ -285,11 +285,10 @@
align="center"
:data="dataPreviewList"
max-height="400"
:border="true"
class="bs-el-table bs-scrollbar"
>
<el-table-column
v-for="(value, key) in dataPreviewList[0]"
v-for="(value, key) in dataPreviewList[0] ? dataPreviewList[0] : noDataTableDisplayFields"
:key="key"
:label="key"
align="center"
@ -674,6 +673,14 @@ export default {
script: this.dataForm.script,
paramsList: this.dataForm.paramsList
}
},
noDataTableDisplayFields () {
//
const tableColumnObject = {}
this.structurePreviewList.forEach(item => {
tableColumnObject[item.fieldName] = ''
})
return tableColumnObject
}
},
watch: {

@ -280,7 +280,7 @@ export default {
window.open(screen.url, '_blank')
},
downLoad (screen) {
this.$dataRoomAxios.download(`/bigScreen/file/download/${screen.id}`)
this.$dataRoomAxios.download(`/bigScreen/file/download/${screen.id}`, true)
},
del (screen) {
this.$confirm('确定删除该资源?', '提示', {

@ -210,8 +210,16 @@ export function download (url, headers = {}, params = {}, body = {}) {
}).catch(e => {
const status = e?.response?.status
if (status === 404) {
Message({
message: '文件不存在或已被删除',
type: 'error'
})
return
}
Message({
message: '服务异常',
type: 'error'
})
console.error('服务异常')
})
})

Loading…
Cancel
Save