forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
23aea04795
@ -66,7 +66,7 @@ update area_mapping_global set
|
||||
county_code = concat('156', county_code);
|
||||
COMMIT;
|
||||
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (202, 0, 0, 1, '模板市场', 'template-market', 'panel/templateMarket/index', 7, 'dashboard', '/templateMarket', 0, 0, 0, null, NULL, NULL, NULL, 1620444227389);
|
||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (202, 0, 0, 1, '模板市场', 'template-market', 'panel/templateMarket/index', 5, 'dashboard', '/templateMarket', 0, 0, 0, null, NULL, NULL, NULL, 1620444227389);
|
||||
|
||||
INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('basic.templateAccessKey', 'dataease', 'text', NULL);
|
||||
INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('basic.templateMarketUlr', 'https://dataease.io/templates', 'text', 4);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 6.6 KiB |
@ -15,6 +15,6 @@ export function getCategories() {
|
||||
url: '/template/market/categories',
|
||||
method: 'get',
|
||||
hideMsg: true,
|
||||
loading: false
|
||||
loading: true
|
||||
})
|
||||
}
|
||||
|
@ -128,6 +128,8 @@ import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
|
||||
import PluginCom from '@/views/system/plugin/PluginCom'
|
||||
import LabelNormalText from '@/views/chart/components/normal/LabelNormalText'
|
||||
import { viewPropsSave } from '@/api/chart/chart'
|
||||
import { checkAddHttp } from '@/utils/urlUtils'
|
||||
|
||||
export default {
|
||||
name: 'UserView',
|
||||
components: { LabelNormalText, PluginCom, ChartComponentS2, EditBarView, ChartComponent, TableNormal, LabelNormal, DrillPath, ChartComponentG2 },
|
||||
@ -678,7 +680,8 @@ export default {
|
||||
}
|
||||
} else {
|
||||
const colList = [...param.dimensionList, ...param.quotaList]
|
||||
const url = this.setIdValueTrans('id', 'value', jumpInfo.content, colList)
|
||||
let url = this.setIdValueTrans('id', 'value', jumpInfo.content, colList)
|
||||
url = checkAddHttp(url)
|
||||
window.open(url, jumpInfo.jumpType)
|
||||
}
|
||||
} else {
|
||||
|
5
frontend/src/icons/svg/no_result.svg
Normal file
5
frontend/src/icons/svg/no_result.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="125" height="125" viewBox="0 0 125 125" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="125" height="125" rx="62.5" fill="#EBEBEB"/>
|
||||
<path d="M82.625 48.1813H71.125V36.6252H42.375V88.3752H56.75V94.1252H39.5C38.7375 94.1252 38.0062 93.8223 37.4671 93.2831C36.9279 92.744 36.625 92.0127 36.625 91.2502V33.7502C36.625 32.9877 36.9279 32.2564 37.4671 31.7173C38.0062 31.1781 38.7375 30.8752 39.5 30.8752H75.4375L88.375 44.4294V56.7502H82.625V48.1813Z" fill="#BBBFC4"/>
|
||||
<path d="M75.4375 91.25C78.4004 91.25 81.154 90.3536 83.4417 88.8172L88.8204 94.1958C89.3817 94.7572 90.2919 94.7572 90.8533 94.1958L93.2928 91.7563C93.8542 91.1949 93.8542 90.2847 93.2928 89.7233L87.7941 84.2247C89.0761 82.0741 89.8125 79.5605 89.8125 76.875C89.8125 68.9359 83.3766 62.5 75.4375 62.5C67.4984 62.5 61.0625 68.9359 61.0625 76.875C61.0625 84.8141 67.4984 91.25 75.4375 91.25ZM84.0625 76.875C84.0625 81.6384 80.201 85.5 75.4375 85.5C70.674 85.5 66.8125 81.6384 66.8125 76.875C66.8125 72.1115 70.674 68.25 75.4375 68.25C80.201 68.25 84.0625 72.1115 84.0625 76.875Z" fill="#BBBFC4"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
@ -131,6 +131,7 @@ export default {
|
||||
default_login: 'Normal'
|
||||
},
|
||||
commons: {
|
||||
no_result: 'No Result',
|
||||
manage_member: 'Managing members',
|
||||
user_confirm_remove_cancel: 'Are you sure you want to remove the user from the role?',
|
||||
confirm_remove_cancel: 'Are you sure to delete the role?',
|
||||
|
@ -131,6 +131,7 @@ export default {
|
||||
default_login: '普通登錄'
|
||||
},
|
||||
commons: {
|
||||
no_result: '没有找到相关内容',
|
||||
manage_member: '管理成員',
|
||||
user_confirm_remove_cancel: '確定將該用戶從角色中移除嗎?',
|
||||
confirm_remove_cancel: '確定刪除該角色嗎?',
|
||||
|
@ -131,6 +131,7 @@ export default {
|
||||
default_login: '普通登录'
|
||||
},
|
||||
commons: {
|
||||
no_result: '没有找到相关内容',
|
||||
manage_member: '管理成员',
|
||||
confirm_remove_cancel: '确定删除该角色吗?',
|
||||
user_confirm_remove_cancel: '确定将该用户从角色中移除吗?',
|
||||
|
@ -236,7 +236,6 @@ import { queryPanelJumpInfo, queryWithViewId, updateJumpSet } from '@/api/panel/
|
||||
import { groupTree } from '@/api/panel/panel'
|
||||
import { detailList } from '@/api/panel/panelView'
|
||||
import { mapState } from 'vuex'
|
||||
import { checkAddHttp } from '@/utils/urlUtils'
|
||||
|
||||
import draggable from 'vuedraggable'
|
||||
import { codemirror } from 'vue-codemirror'
|
||||
@ -397,7 +396,6 @@ export default {
|
||||
},
|
||||
save() {
|
||||
this.codemirrorShow = false
|
||||
this.linkJumpInfo.content = checkAddHttp(this.linkJumpInfo.content)
|
||||
this.linkJumpInfoArray.forEach(jumpInfo => {
|
||||
jumpInfo.content = this.setNameIdTrans('sourceFieldName', 'sourceFieldId', jumpInfo.content)
|
||||
})
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-row v-show="asideActive" style="padding: 12px 12px 0 12px ">
|
||||
<el-row>
|
||||
<span class="icon iconfont icon-close icon20 insert" @click="closePreview()" />
|
||||
<span class="main-title">{{$t('panel.template_preview')}}</span>
|
||||
<span class="main-title">{{ $t('panel.template_preview') }}</span>
|
||||
<span style="float: right" class="icon iconfont icon-icon_up-left_outlined insert icon20" @click="asideActiveChange(false)" />
|
||||
</el-row>
|
||||
<el-row class="margin-top16 search-area">
|
||||
@ -41,12 +41,19 @@
|
||||
:active="active(templateItem)"
|
||||
@previewTemplate="previewTemplate"
|
||||
/>
|
||||
<el-row v-show="!hasResult" class="custom-position">
|
||||
<div style="text-align: center">
|
||||
<svg-icon icon-class="no_result" style="font-size: 75px;margin-bottom: 16px" />
|
||||
<br>
|
||||
<span>{{ $t('commons.no_result') }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col class="main-area" :class="asideActive ? 'main-area-active': ''">
|
||||
<el-row>
|
||||
<span v-if="curTemplate" class="template-title">{{ curTemplate.title }}</span>
|
||||
<el-button style="float: right" type="primary" size="small" @click="templateApply(curTemplate)">{{$t('panel.apply_this_template')}}</el-button>
|
||||
<el-button style="float: right" type="primary" size="small" @click="templateApply(curTemplate)">{{ $t('panel.apply_this_template') }}</el-button>
|
||||
</el-row>
|
||||
<el-row class="img-main">
|
||||
<img height="100%" :src="templatePreviewUrl" alt="">
|
||||
@ -73,6 +80,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
hasResult: true,
|
||||
extFilterActive: false,
|
||||
asideActive: true,
|
||||
previewVisible: false,
|
||||
@ -165,8 +173,12 @@ export default {
|
||||
|
||||
},
|
||||
initTemplateShow() {
|
||||
this.hasResult = false
|
||||
this.currentMarketTemplateShowList.forEach(template => {
|
||||
template.showFlag = this.templateShow(template)
|
||||
if (template.showFlag) {
|
||||
this.hasResult = true
|
||||
}
|
||||
})
|
||||
},
|
||||
templateShow(templateItem) {
|
||||
@ -273,14 +285,15 @@ export default {
|
||||
}
|
||||
|
||||
.custom-position {
|
||||
height: 80vh;
|
||||
height: 70vh;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
flex-flow: row nowrap;
|
||||
color: #9ea6b2;
|
||||
color: #646A73;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.aside-active {
|
||||
@ -288,7 +301,7 @@ export default {
|
||||
height: calc(100vh - 56px);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
border-right: 1px solid rgba(31,31,31,0.15);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.aside-inActive{
|
||||
@ -366,8 +379,9 @@ export default {
|
||||
}
|
||||
.img-main{
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 2px 0 rgba(31,31,31,0.15), 0 1px 2px 0 rgba(31,31,31,0.15);
|
||||
border: solid 2px #fff;
|
||||
background: #0F1114;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
height: calc(100% - 50px)!important;
|
||||
}
|
||||
.open-button{
|
||||
@ -378,6 +392,11 @@ export default {
|
||||
top: 16px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
//.open-button:hover{
|
||||
// transition: 0.5s;
|
||||
// width: 50px;
|
||||
//}
|
||||
.open-button:hover{
|
||||
color: #3a8ee6;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ export default {
|
||||
.testcase-template {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin: 24px 0 0 24px;
|
||||
margin: 24px 0 0 0;
|
||||
box-shadow: 0 0 2px 0 rgba(31,31,31,0.15), 0 1px 2px 0 rgba(31,31,31,0.15);
|
||||
border: solid 2px #fff;
|
||||
box-sizing: border-box;
|
||||
|
@ -78,7 +78,7 @@ export default {
|
||||
}
|
||||
|
||||
.template-item-main-active{
|
||||
border: 2px solid #3370FF ;
|
||||
border: 2px solid #3370FF!important; ;
|
||||
|
||||
}
|
||||
.template-item-img{
|
||||
@ -106,7 +106,7 @@ export default {
|
||||
}
|
||||
|
||||
.template-item-main:hover {
|
||||
border: solid 2px gray;
|
||||
border: solid 1px #3370FF;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -17,20 +17,30 @@
|
||||
<el-tab-pane v-for="tabItem in marketTabs" :key="tabItem" :label="tabItem" :name="tabItem" />
|
||||
</el-tabs>
|
||||
</el-row>
|
||||
<el-row v-if="networkStatus" class="template-main">
|
||||
<el-row v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
||||
<el-row v-show="networkStatus && hasResult" id="template-main" v-loading="$store.getters.loadingMap[$store.getters.currentPath]" class="template-main">
|
||||
<el-col
|
||||
v-for="(templateItem) in currentMarketTemplateShowList"
|
||||
v-show="templateItem.showFlag"
|
||||
:key="templateItem.id"
|
||||
style="text-align: center"
|
||||
:style="{width: templateSpan}"
|
||||
>
|
||||
<template-market-item
|
||||
v-for="(templateItem) in currentMarketTemplateShowList"
|
||||
v-show="templateItem.showFlag"
|
||||
:key="templateItem.id"
|
||||
:template="templateItem"
|
||||
:base-url="baseUrl"
|
||||
@templateApply="templateApply"
|
||||
@templatePreview="templatePreview"
|
||||
/>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-else class="custom-position">
|
||||
<el-row v-show="networkStatus && !hasResult" class="custom-position template-main">
|
||||
<div style="text-align: center">
|
||||
<svg-icon icon-class="no_result" style="font-size: 75px;margin-bottom: 16px" />
|
||||
<br>
|
||||
<span>{{ $t('commons.no_result') }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row v-show="!networkStatus" class="custom-position template-main">
|
||||
{{ $t('panel.market_network_tips') }}
|
||||
</el-row>
|
||||
</el-row>
|
||||
@ -72,15 +82,18 @@
|
||||
import { searchMarket, getCategories } from '@/api/templateMarket'
|
||||
import TemplateMarketItem from '@/views/panel/templateMarket/component/TemplateMarketItem'
|
||||
import { groupTree, panelSave } from '@/api/panel/panel'
|
||||
import bus from '@/utils/bus'
|
||||
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
|
||||
import MarketPreview from '@/views/panel/templateMarket/component/MarketPreview'
|
||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||
|
||||
export default {
|
||||
name: 'TemplateMarket',
|
||||
components: { MarketPreview, TemplateMarketItem },
|
||||
data() {
|
||||
return {
|
||||
hasResult: true,
|
||||
templateMiniWidth: 350,
|
||||
templateSpan: '25%',
|
||||
previewModel: false,
|
||||
previewVisible: false,
|
||||
templatePreviewId: '',
|
||||
@ -119,6 +132,16 @@ export default {
|
||||
mounted() {
|
||||
this.initMarketTemplate()
|
||||
this.getGroupTree()
|
||||
const _this = this
|
||||
const erd = elementResizeDetectorMaker()
|
||||
const templateMainDom = document.getElementById('template-main')
|
||||
// 监听div变动事件
|
||||
erd.listenTo(templateMainDom, element => {
|
||||
_this.$nextTick(() => {
|
||||
_this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%'
|
||||
console.log('templateSpan=' + _this.templateSpan)
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
initMarketTemplate() {
|
||||
@ -181,9 +204,16 @@ export default {
|
||||
|
||||
},
|
||||
initTemplateShow() {
|
||||
let tempHasResult = false
|
||||
this.currentMarketTemplateShowList.forEach(template => {
|
||||
template.showFlag = this.templateShow(template)
|
||||
if (template.showFlag) {
|
||||
tempHasResult = true
|
||||
}
|
||||
})
|
||||
if (this.currentMarketTemplateShowList.length > 0) {
|
||||
this.hasResult = tempHasResult
|
||||
}
|
||||
},
|
||||
templateShow(templateItem) {
|
||||
let categoryMarch = false
|
||||
@ -211,11 +241,13 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.template-main{
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 2px 0 rgba(31,31,31,0.15), 0 1px 2px 0 rgba(31,31,31,0.15);
|
||||
border: solid 2px #fff;
|
||||
padding-bottom: 24px;
|
||||
min-height: calc(100vh - 190px);
|
||||
height: calc(100vh - 190px)!important;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background: #fff ;
|
||||
}
|
||||
.market-main{
|
||||
padding:24px
|
||||
@ -265,11 +297,13 @@ export default {
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
flex-flow: row nowrap;
|
||||
color: #9ea6b2;
|
||||
color: #646A73;
|
||||
font-weight: 400;
|
||||
}
|
||||
.outer-body{
|
||||
width: 100%;
|
||||
height: calc(100vh - 56px);
|
||||
background: #f5f6f7;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user