forked from github/dataease
Merge branch 'main' of github.com:dataease/dataease into main
This commit is contained in:
commit
d510fce22a
@ -74,7 +74,7 @@ import { deepCopy } from '@/components/canvas/utils/utils'
|
||||
import { panelSave } from '@/api/panel/panel'
|
||||
import bus from '@/utils/bus'
|
||||
import {
|
||||
DEFAULT_COMMON_CANVAS_STYLE
|
||||
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||
} from '@/views/panel/panel'
|
||||
|
||||
export default {
|
||||
@ -248,7 +248,7 @@ export default {
|
||||
},
|
||||
clearCanvas() {
|
||||
this.$store.commit('setComponentData', [])
|
||||
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE)
|
||||
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING)
|
||||
this.$store.commit('recordSnapshot')
|
||||
},
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="top-nav" :style="{'background-color': '#f1f3f8'}">
|
||||
<div class="log">
|
||||
<div v-loading="!axiosFinished" class="log">
|
||||
<!-- <img v-if="!logoUrl" src="@/assets/DataEase-color.png" width="140" alt="" style="padding-top: 10px;">-->
|
||||
<svg-icon v-if="!logoUrl" icon-class="DataEase" custom-class="top-nav-logo-icon" />
|
||||
<img v-else :src="logoUrl" width="140" alt="" style="padding-top: 10px;">
|
||||
<svg-icon v-if="!logoUrl && axiosFinished" icon-class="DataEase" custom-class="top-nav-logo-icon" />
|
||||
<img v-else :src="logoUrl && axiosFinished" width="140" alt="" style="padding-top: 10px;">
|
||||
</div>
|
||||
<el-menu
|
||||
:active-text-color="variables.topMenuActiveText"
|
||||
@ -92,7 +92,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
uiInfo: null,
|
||||
logoUrl: null
|
||||
logoUrl: null,
|
||||
axiosFinished: false
|
||||
}
|
||||
},
|
||||
|
||||
@ -137,6 +138,7 @@ export default {
|
||||
if (this.uiInfo['ui.logo'] && this.uiInfo['ui.logo'].paramValue) {
|
||||
this.logoUrl = '/system/ui/image/' + this.uiInfo['ui.logo'].paramValue
|
||||
}
|
||||
this.axiosFinished = true
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
@ -21,7 +21,7 @@ import snapshot from '@/components/canvas/store/snapshot'
|
||||
import lock from '@/components/canvas/store/lock'
|
||||
import { valueValid, formatCondition } from '@/utils/conditionUtil'
|
||||
import {
|
||||
DEFAULT_COMMON_CANVAS_STYLE
|
||||
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||
} from '@/views/panel/panel'
|
||||
|
||||
Vue.use(Vuex)
|
||||
@ -38,7 +38,7 @@ const data = {
|
||||
...lock.state,
|
||||
|
||||
editMode: 'edit', // 编辑器模式 edit preview
|
||||
canvasStyleData: DEFAULT_COMMON_CANVAS_STYLE, // 页面全局数据 //扩展公共样式 公共的仪表板样式,用来实时响应样式的变化
|
||||
canvasStyleData: DEFAULT_COMMON_CANVAS_STYLE_STRING, // 页面全局数据 //扩展公共样式 公共的仪表板样式,用来实时响应样式的变化
|
||||
componentData: [], // 画布组件数据
|
||||
curComponent: null,
|
||||
curCanvasScale: null,
|
||||
@ -46,7 +46,7 @@ const data = {
|
||||
// 点击画布时是否点中组件,主要用于取消选中组件用。
|
||||
// 如果没点中组件,并且在画布空白处弹起鼠标,则取消当前组件的选中状态
|
||||
isClickComponent: false,
|
||||
canvasCommonStyleData: DEFAULT_COMMON_CANVAS_STYLE
|
||||
canvasCommonStyleData: DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||
},
|
||||
mutations: {
|
||||
...animation.mutations,
|
||||
|
@ -275,3 +275,7 @@ div:focus {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.m-colorPicker .box {
|
||||
bottom:20px;
|
||||
}
|
||||
|
||||
|
@ -21,21 +21,21 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('text')) || sourceType==='panelTable'" :label="$t('chart.dimension_color')" class="form-item">
|
||||
<colorPicker v-model="colorForm.dimensionColor" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeColorCase" />
|
||||
<colorPicker v-model="colorForm.dimensionColor" style="margin-top: 6px;cursor: pointer;z-index: 1003;border: solid 1px black" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('text')) || sourceType==='panelTable'" :label="$t('chart.quota_color')" class="form-item">
|
||||
<colorPicker v-model="colorForm.quotaColor" style="margin-top: 6px;cursor: pointer;z-index: 1003;border: solid 1px black" @change="changeColorCase" />
|
||||
<colorPicker v-model="colorForm.quotaColor" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="sourceType==='view' || sourceType==='panelTable'">
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.table_header_bg')" class="form-item">
|
||||
<colorPicker v-model="colorForm.tableHeaderBgColor" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeColorCase" />
|
||||
<colorPicker v-model="colorForm.tableHeaderBgColor" style="margin-top: 6px;cursor: pointer;z-index: 1002;border: solid 1px black" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.table_item_bg')" class="form-item">
|
||||
<colorPicker v-model="colorForm.tableItemBgColor" style="margin-top: 6px;cursor: pointer;z-index: 1003;border: solid 1px black" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.table_item_font_color')" class="form-item">
|
||||
<colorPicker v-model="colorForm.tableFontColor" style="margin-top: 6px;cursor: pointer;z-index: 1002;border: solid 1px black" @change="changeColorCase" />
|
||||
<colorPicker v-model="colorForm.tableFontColor" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
<!-- 暂时不支持该功能-->
|
||||
<!-- <el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.stripe')" class="form-item">-->
|
||||
|
@ -40,9 +40,9 @@
|
||||
</div>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div v-if="!loginImageUrl" class="login-image" />
|
||||
<div v-else class="login-image-de" :style="{background:'url(' + loginImageUrl + ') no-repeat', 'backgroundSize':'cover'}" />
|
||||
<el-col v-loading="!axiosFinished" :span="12">
|
||||
<div v-if="!loginImageUrl && axiosFinished" class="login-image" />
|
||||
<div v-if="loginImageUrl && axiosFinished" class="login-image-de" :style="{background:'url(' + loginImageUrl + ') no-repeat', 'backgroundSize':'contain'}" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -95,7 +95,8 @@ export default {
|
||||
redirect: undefined,
|
||||
uiInfo: null,
|
||||
loginImageUrl: null,
|
||||
loginLogoUrl: null
|
||||
loginLogoUrl: null,
|
||||
axiosFinished: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -115,6 +116,14 @@ export default {
|
||||
this.$store.dispatch('user/getUI').then(() => {
|
||||
// const uiLists = this.$store.state.user.uiInfo
|
||||
// this.uiInfo = format(uiLists)
|
||||
this.axiosFinished = true
|
||||
this.showLoginImage()
|
||||
}).catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
showLoginImage() {
|
||||
this.uiInfo = getSysUI()
|
||||
if (this.uiInfo['ui.loginImage'] && this.uiInfo['ui.loginImage'].paramValue) {
|
||||
this.loginImageUrl = '/system/ui/image/' + this.uiInfo['ui.loginImage'].paramValue
|
||||
@ -122,11 +131,7 @@ export default {
|
||||
if (this.uiInfo['ui.loginLogo'] && this.uiInfo['ui.loginLogo'].paramValue) {
|
||||
this.loginLogoUrl = '/system/ui/image/' + this.uiInfo['ui.loginLogo'].paramValue
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
|
@ -178,7 +178,7 @@ import bus from '@/utils/bus'
|
||||
import EditPanel from './EditPanel'
|
||||
import { addGroup, delGroup, groupTree, defaultTree, findOne } from '@/api/panel/panel'
|
||||
import {
|
||||
DEFAULT_COMMON_CANVAS_STYLE, DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||
} from '@/views/panel/panel'
|
||||
|
||||
export default {
|
||||
@ -286,7 +286,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.$store.commit('setComponentData', [])
|
||||
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE)
|
||||
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING)
|
||||
this.defaultTree()
|
||||
this.tree(this.groupForm)
|
||||
},
|
||||
@ -546,7 +546,7 @@ export default {
|
||||
// 清空当前缓存,快照
|
||||
this.$store.commit('refreshSnapshot')
|
||||
this.$store.commit('setComponentData', [])
|
||||
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE)
|
||||
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING)
|
||||
// 清空临时画布数据
|
||||
this.$store.dispatch('panel/setComponentDataTemp', null)
|
||||
this.$store.dispatch('panel/setCanvasStyleDataTemp', null)
|
||||
|
@ -20,11 +20,6 @@ export const CANVAS_STYLE = {
|
||||
panel: DEFAULT_PANEL_STYLE
|
||||
}
|
||||
|
||||
export const DEFAULT_COMMON_CANVAS_STYLE = {
|
||||
...CANVAS_STYLE,
|
||||
chart: BASE_CHART
|
||||
}
|
||||
|
||||
export const DEFAULT_COMMON_CANVAS_STYLE_STRING = {
|
||||
...CANVAS_STYLE,
|
||||
chart: BASE_CHART_STRING
|
||||
|
@ -47,7 +47,7 @@
|
||||
</span>
|
||||
<span class="child">
|
||||
<span v-if="data.type ==='folder'" @click.stop>
|
||||
<!-- <span class="el-dropdown-link">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button
|
||||
v-permission="['datasource:add']"
|
||||
icon="el-icon-plus"
|
||||
@ -55,7 +55,7 @@
|
||||
size="small"
|
||||
@click="addFolderWithType(data)"
|
||||
/>
|
||||
</span> -->
|
||||
</span>
|
||||
|
||||
</span>
|
||||
<span v-if="data.type !=='folder'" style="margin-left: 12px;" @click.stop>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<el-input v-model="form.desc" autocomplete="off" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('datasource.type')" prop="type">
|
||||
<el-select v-model="form.type" :placeholder="$t('datasource.please_choose_type')" class="select-width" :disabled="formType=='modify'" @change="changeType()">
|
||||
<el-select v-model="form.type" :placeholder="$t('datasource.please_choose_type')" class="select-width" :disabled="formType=='modify' || (formType==='add' && params && !!params.type)" @change="changeType()">
|
||||
<el-option
|
||||
v-for="item in allTypes"
|
||||
:key="item.name"
|
||||
@ -108,6 +108,9 @@ export default {
|
||||
this.edit(row)
|
||||
} else {
|
||||
this.create()
|
||||
if (this.params && this.params.type) {
|
||||
this.setType()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -119,6 +122,12 @@ export default {
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
setType() {
|
||||
this.form.type = this.params.type
|
||||
this.form.configuration = {}
|
||||
this.changeType()
|
||||
console.log(this.form)
|
||||
},
|
||||
changeEdit() {
|
||||
this.canEdit = true
|
||||
this.formType = 'modify'
|
||||
|
@ -46,7 +46,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" sortable="custom" :label="$t('commons.status')">
|
||||
<template v-slot:default="scope">
|
||||
<el-switch v-model="scope.row.enabled" :active-value="1" :inactive-value="0" :disabled="!checkPermission(['user:edit'])" inactive-color="#DCDFE6" @change="changeSwitch(scope.row)" />
|
||||
<el-switch v-model="scope.row.enabled" :active-value="1" :inactive-value="0" :disabled="!checkPermission(['user:edit']) || scope.row.isAdmin" inactive-color="#DCDFE6" @change="changeSwitch(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" sortable="custom" :label="$t('commons.create_time')">
|
||||
|
Loading…
Reference in New Issue
Block a user