提交 aa5340bc authored 作者: junjie's avatar junjie

Merge remote-tracking branch 'origin/dev' into dev

...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
:class="{'gap_class':canvasStyleData.panel.gap==='yes'}" :class="{'gap_class':canvasStyleData.panel.gap==='yes'}"
class="component" class="component"
@click="handleClick" @click="handleClick"
@mousedown="elementMouseDown"
> >
<edit-bar v-if="config === curComponent" />
<de-out-widget <de-out-widget
v-if="config.type==='custom'" v-if="config.type==='custom'"
:id="'component' + config.id" :id="'component' + config.id"
...@@ -33,8 +35,10 @@ import runAnimation from '@/components/canvas/utils/runAnimation' ...@@ -33,8 +35,10 @@ import runAnimation from '@/components/canvas/utils/runAnimation'
import { mixins } from '@/components/canvas/utils/events' import { mixins } from '@/components/canvas/utils/events'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import DeOutWidget from '@/components/dataease/DeOutWidget' import DeOutWidget from '@/components/dataease/DeOutWidget'
import EditBar from '@/components/canvas/components/Editor/EditBar'
export default { export default {
components: { DeOutWidget }, components: { DeOutWidget, EditBar },
mixins: [mixins], mixins: [mixins],
props: { props: {
config: { config: {
...@@ -60,7 +64,8 @@ export default { ...@@ -60,7 +64,8 @@ export default {
}, },
computed: { computed: {
...mapState([ ...mapState([
'canvasStyleData' 'canvasStyleData',
'curComponent'
]) ])
}, },
mounted() { mounted() {
...@@ -94,6 +99,17 @@ export default { ...@@ -94,6 +99,17 @@ export default {
Object.keys(events).forEach(event => { Object.keys(events).forEach(event => {
this[event](events[event]) this[event](events[event])
}) })
},
elementMouseDown(e) {
debugger
// private 设置当前组件数据及状态
this.$store.commit('setClickComponentStatus', true)
if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-number-range') {
e.preventDefault()
}
// 阻止冒泡事件
e.stopPropagation()
this.$store.commit('setCurComponent', { component: this.config, index: this.index })
} }
} }
} }
......
<template>
<div class="bar-main">
<i v-if="curComponent.type==='view'" class="icon iconfont icon-fangda" @click.stop="showViewDetails" />
<i v-if="activeModel==='edit'" class="icon iconfont icon-shezhi" @click.stop="showViewDetails" />
</div>
</template>
<script>
import { mapState } from 'vuex'
import eventBus from '@/components/canvas/utils/eventBus'
export default {
props: {
active: {
type: Boolean,
required: false,
default: false
},
// 当前模式 preview 预览 edit 编辑,
activeModel: {
type: String,
required: false,
default: 'preview'
}
},
data() {
return {
componentType: null,
editFilter: [
'view',
'custom'
]
}
},
computed: mapState([
'menuTop',
'menuLeft',
'menuShow',
'curComponent',
'componentData',
'canvasStyleData'
]),
methods: {
showViewDetails() {
eventBus.$emit('showViewDetails')
}
}
}
</script>
<style lang="scss" scoped>
.bar-main{
position: absolute;
right: 0px;
float:right;
z-index: 2;
border-radius:2px;
padding-left: 5px;
padding-right: 2px;
cursor:pointer!important;
background-color: #0a7be0;
}
.bar-main i{
color: white;
float: right;
margin-right: 3px;
}
</style>
<template> <template>
<div id="canvasInfoTemp" :style="customStyle" class="bg"> <div id="canvasInfoTemp" :style="customStyle" class="bg" @mouseup="deselectCurComponent" @mousedown="handleMouseDown">
<el-row v-if="componentDataShow.length===0" style="height: 100%;" class="custom-position"> <el-row v-if="componentDataShow.length===0" style="height: 100%;" class="custom-position">
{{ $t('panel.panelNull') }} {{ $t('panel.panelNull') }}
</el-row> </el-row>
...@@ -121,6 +121,8 @@ export default { ...@@ -121,6 +121,8 @@ export default {
return this.componentDataShow return this.componentDataShow
}, },
...mapState([ ...mapState([
'isClickComponent',
'curComponent',
'componentData', 'componentData',
'canvasStyleData' 'canvasStyleData'
]) ])
...@@ -204,6 +206,17 @@ export default { ...@@ -204,6 +206,17 @@ export default {
}, },
exportExcel() { exportExcel() {
this.$refs['userViewDialog'].exportExcel() this.$refs['userViewDialog'].exportExcel()
},
deselectCurComponent(e) {
debugger
if (!this.isClickComponent) {
this.$store.commit('setCurComponent', { component: null, index: null })
}
},
handleMouseDown() {
// console.log('handleMouseDown123')
this.$store.commit('setClickComponentStatus', false)
} }
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
'rect-shape' 'rect-shape'
]" ]"
> >
<i v-if="requestStatus==='success'" style="right:25px;position: absolute;z-index: 2" class="icon iconfont icon-fangda" @click.stop="openChartDetailsDialog" /> <!-- <i v-if="requestStatus==='success'" style="right:25px;position: absolute;z-index: 2" class="icon iconfont icon-fangda" @click.stop="openChartDetailsDialog" />-->
<div v-if="requestStatus==='error'" class="chart-error-class"> <div v-if="requestStatus==='error'" class="chart-error-class">
<div style="font-size: 12px; color: #9ea6b2;height: 100%;display: flex;align-items: center;justify-content: center;"> <div style="font-size: 12px; color: #9ea6b2;height: 100%;display: flex;align-items: center;justify-content: center;">
{{ message }},{{ $t('chart.chart_show_error') }} {{ message }},{{ $t('chart.chart_show_error') }}
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
this.getData(this.element.propValue.viewId) this.getData(this.element.propValue.viewId)
}, },
mounted() { mounted() {
eventBus.$on('showViewDetails', this.openChartDetailsDialog)
}, },
methods: { methods: {
mergeStyle() { mergeStyle() {
......
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
tokenError: 'Token error, please login again', tokenError: 'Token error, please login again',
username_error: 'Please enter the correct ID', username_error: 'Please enter the correct ID',
password_error: 'The password can not be less than 8 digits', password_error: 'The password can not be less than 8 digits',
re_login: 'Login again' login_again: 'Login again'
}, },
commons: { commons: {
no_target_permission: 'No permission', no_target_permission: 'No permission',
...@@ -752,7 +752,6 @@ export default { ...@@ -752,7 +752,6 @@ export default {
chart_funnel: 'Funnel', chart_funnel: 'Funnel',
chart_radar: 'Radar', chart_radar: 'Radar',
chart_gauge: 'Gauge', chart_gauge: 'Gauge',
chart_map: 'Map',
dateStyle: 'Date Style', dateStyle: 'Date Style',
datePattern: 'Date Format', datePattern: 'Date Format',
y: 'Year', y: 'Year',
...@@ -821,11 +820,6 @@ export default { ...@@ -821,11 +820,6 @@ export default {
drag_block_funnel_split: 'Funnel Split', drag_block_funnel_split: 'Funnel Split',
drag_block_radar_length: 'Branch Length', drag_block_radar_length: 'Branch Length',
drag_block_radar_label: 'Branch Label', drag_block_radar_label: 'Branch Label',
stack_item: 'Stack Item',
map_range: 'Map range',
select_map_range: 'Please select map range',
area: 'Area',
placeholder_field: 'Drag Field To Here',
axis_label_rotate: 'Label Rotate' axis_label_rotate: 'Label Rotate'
}, },
dataset: { dataset: {
...@@ -980,19 +974,7 @@ export default { ...@@ -980,19 +974,7 @@ export default {
right_join: 'RIGHT JOIN', right_join: 'RIGHT JOIN',
inner_join: 'INNER JOIN', inner_join: 'INNER JOIN',
full_join: 'FULL JOIN', full_join: 'FULL JOIN',
can_not_union_diff_datasource: 'Union dataset must have same data source', can_not_union_diff_datasource: 'Union dataset must have same data source'
operator: 'Operator',
d_q_trans: 'Dimension/Quota Transform',
add_calc_field: 'Create calc field',
input_name: 'Please input name',
field_exp: 'Field Expression',
data_type: 'Data Type',
click_ref_field: 'Click Quote Field',
click_ref_function: 'Click Quote Function',
field_manage: 'Field Manage',
edit_calc_field: 'Edit calc field',
calc_field: 'Calc Field',
show_sql: 'Show SQL'
}, },
datasource: { datasource: {
datasource: 'Data Source', datasource: 'Data Source',
...@@ -1306,54 +1288,5 @@ export default { ...@@ -1306,54 +1288,5 @@ export default {
i18n_msg_type_dataset_sync_faild: 'Dataset synchronization failed', i18n_msg_type_dataset_sync_faild: 'Dataset synchronization failed',
i18n_msg_type_all: 'All type', i18n_msg_type_all: 'All type',
channel_inner_msg: 'On site news' channel_inner_msg: 'On site news'
},
denumberrange: {
label: 'Number range',
split_placeholder: 'To',
please_key_min: 'Please key min value',
please_key_max: 'Please key max value',
out_of_min: 'The min value cannot be less than the min integer -2³²',
out_of_max: 'The max value cannot be more than the max integer 2³²-1',
must_int: 'Please key interger',
min_out_max: 'The min value must be less than the max value',
max_out_min: 'The max value must be more than the min value'
},
denumberselect: {
label: 'Number selector',
placeholder: 'Please select'
},
deinputsearch: {
label: 'Text search',
placeholder: 'Please key keyword'
},
detextselect: {
label: 'Text selector',
placeholder: 'Please select'
},
detextgridselect: {
label: 'Text list',
placeholder: 'Please select'
},
denumbergridselect: {
label: 'Number list',
placeholder: 'Please select'
},
dedaterange: {
label: 'Date range',
to_placeholder: 'End date',
from_placeholder: 'Start date',
split_placeholder: 'To'
},
dedate: {
label: 'Date',
placeholder: 'Please select date'
},
deyearmonth: {
label: 'Month',
placeholder: 'Please select month'
},
deyear: {
label: 'Year',
placeholder: 'Please select year'
} }
} }
...@@ -109,25 +109,25 @@ export default { ...@@ -109,25 +109,25 @@ export default {
navbar: { navbar: {
dashboard: '首頁', dashboard: '首頁',
github: '項目地址', github: '項目地址',
logOut: '退出登', logOut: '退出登',
profile: '個人中心', profile: '個人中心',
theme: '換膚', theme: '換膚',
size: '佈局大小' size: '佈局大小'
}, },
login: { login: {
title: '系統登', title: '系統登',
welcome: '歡迎使用', welcome: '歡迎使用',
logIn: '登', logIn: '登',
username: '帳號', username: '帳號',
password: '密碼', password: '密碼',
any: '任意字符', any: '任意字符',
thirdparty: '第三方登', thirdparty: '第三方登',
thirdpartyTips: '本地不能模擬,請結合自己業務進行模擬!!!', thirdpartyTips: '本地不能模擬,請結合自己業務進行模擬!!!',
expires: '登陸信息過期,請重新登陸', expires: '登錄信息過期,請重新登錄',
tokenError: '信息錯誤,請重新登', tokenError: '信息錯誤,請重新登',
username_error: '請輸入正確的 ID', username_error: '請輸入正確的 ID',
password_error: '密碼不小於 8 位', password_error: '密碼不小於 8 位',
re_login: '重新登陸' login_again: '重新登錄'
}, },
commons: { commons: {
no_target_permission: '沒有權限', no_target_permission: '沒有權限',
...@@ -184,7 +184,7 @@ export default { ...@@ -184,7 +184,7 @@ export default {
prompt: '提示', prompt: '提示',
operating: '操作', operating: '操作',
input_limit: '長度在 {0} 到 {1} 個字符', input_limit: '長度在 {0} 到 {1} 個字符',
login: '登', login: '登',
welcome: '一站式開源數據分析平臺', welcome: '一站式開源數據分析平臺',
username: '姓名', username: '姓名',
password: '密碼', password: '密碼',
...@@ -256,7 +256,7 @@ export default { ...@@ -256,7 +256,7 @@ export default {
remove: '移除', remove: '移除',
remove_cancel: '移除取消', remove_cancel: '移除取消',
remove_success: '移除成功', remove_success: '移除成功',
tips: '認證信息已過期,請重新登', tips: '認證信息已過期,請重新登',
not_performed_yet: '尚未執行', not_performed_yet: '尚未執行',
incorrect_input: '輸入內容不正確', incorrect_input: '輸入內容不正確',
delete_confirm: '請輸入以下內容,確認刪除:', delete_confirm: '請輸入以下內容,確認刪除:',
...@@ -752,7 +752,6 @@ export default { ...@@ -752,7 +752,6 @@ export default {
chart_funnel: '漏鬥圖', chart_funnel: '漏鬥圖',
chart_radar: '雷達圖', chart_radar: '雷達圖',
chart_gauge: '儀表盤', chart_gauge: '儀表盤',
chart_map: '地圖',
dateStyle: '日期顯示', dateStyle: '日期顯示',
datePattern: '日期格式', datePattern: '日期格式',
y: '年', y: '年',
...@@ -821,11 +820,6 @@ export default { ...@@ -821,11 +820,6 @@ export default {
drag_block_funnel_split: '漏鬥分層', drag_block_funnel_split: '漏鬥分層',
drag_block_radar_length: '分支長度', drag_block_radar_length: '分支長度',
drag_block_radar_label: '分支標簽', drag_block_radar_label: '分支標簽',
map_range: '地圖範圍',
select_map_range: '請選擇地圖範圍',
area: '地區',
stack_item: '堆疊項',
placeholder_field: '拖動字段至此處',
axis_label_rotate: '標簽角度' axis_label_rotate: '標簽角度'
}, },
dataset: { dataset: {
...@@ -980,19 +974,7 @@ export default { ...@@ -980,19 +974,7 @@ export default {
right_join: '右連接', right_join: '右連接',
inner_join: '內連接', inner_join: '內連接',
full_join: '全連接', full_join: '全連接',
can_not_union_diff_datasource: '被關聯數據集必須與當前數據集的數據源一致', can_not_union_diff_datasource: '被關聯數據集必須與當前數據集的數據源一致'
operator: '操作',
d_q_trans: '維度/指標轉換',
add_calc_field: '新建计算字段',
input_name: '請輸入名稱',
field_exp: '字段表達式',
data_type: '數據類型',
click_ref_field: '點擊引用字段',
click_ref_function: '點擊引用函數',
field_manage: '字段管理',
edit_calc_field: '編輯計算字段',
calc_field: '計算字段',
show_sql: '顯示SQL'
}, },
datasource: { datasource: {
datasource: '數據源', datasource: '數據源',
...@@ -1145,7 +1127,7 @@ export default { ...@@ -1145,7 +1127,7 @@ export default {
lineHeight: '行高', lineHeight: '行高',
letterSpacing: '字間距', letterSpacing: '字間距',
textAlign: '左右對齊', textAlign: '左右對齊',
opacity: '透明度', opacity: '透明度',
verticalAlign: '上下對齊', verticalAlign: '上下對齊',
text_align_left: '左對齊', text_align_left: '左對齊',
text_align_center: '左右居中', text_align_center: '左右居中',
...@@ -1184,9 +1166,9 @@ export default { ...@@ -1184,9 +1166,9 @@ export default {
}, },
display: { display: {
logo: '頭部系統 Logo', logo: '頭部系統 Logo',
loginLogo: '登頁面頭部 Logo', loginLogo: '登頁面頭部 Logo',
loginImage: '登頁面右側圖片', loginImage: '登頁面右側圖片',
loginTitle: '登頁面標題', loginTitle: '登頁面標題',
title: '系統名稱', title: '系統名稱',
advice_size: '建議圖片大小' advice_size: '建議圖片大小'
}, },
...@@ -1306,54 +1288,5 @@ export default { ...@@ -1306,54 +1288,5 @@ export default {
i18n_msg_type_dataset_sync_faild: '數據集同步失敗', i18n_msg_type_dataset_sync_faild: '數據集同步失敗',
i18n_msg_type_all: '全部類型', i18n_msg_type_all: '全部類型',
channel_inner_msg: '站內消息' channel_inner_msg: '站內消息'
},
denumberrange: {
label: '數值區間',
split_placeholder: '至',
please_key_min: '請輸入最小值',
please_key_max: '請輸入最大值',
out_of_min: '最小值不能小于最小整數-2³²',
out_of_max: '最大值不能大于最大整數2³²-1',
must_int: '請輸入整數',
min_out_max: '最小值必須小于最大值',
max_out_min: '最大值必須大于最小值'
},
denumberselect: {
label: '數字下拉',
placeholder: '請選擇'
},
deinputsearch: {
label: '文本搜索',
placeholder: '請輸入關鍵字'
},
detextselect: {
label: '文本下拉',
placeholder: '請選擇'
},
detextgridselect: {
label: '文本列表',
placeholder: '請選擇'
},
denumbergridselect: {
label: '數字列表',
placeholder: '請選擇'
},
dedaterange: {
label: '日期範圍',
to_placeholder: '結束日期',
from_placeholder: '開始日期',
split_placeholder: '至'
},
dedate: {
label: '日期',
placeholder: '請選擇日期'
},
deyearmonth: {
label: '年月',
placeholder: '請選擇年月'
},
deyear: {
label: '年份',
placeholder: '請選擇年份'
} }
} }
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
tokenError: '登陆信息错误,请重新登录', tokenError: '登陆信息错误,请重新登录',
username_error: '请输入正确的 ID', username_error: '请输入正确的 ID',
password_error: '密码不小于 8 位', password_error: '密码不小于 8 位',
re_login: '重新登录' login_again: '重新登录'
}, },
commons: { commons: {
no_target_permission: '没有权限', no_target_permission: '没有权限',
...@@ -752,7 +752,6 @@ export default { ...@@ -752,7 +752,6 @@ export default {
chart_funnel: '漏斗图', chart_funnel: '漏斗图',
chart_radar: '雷达图', chart_radar: '雷达图',
chart_gauge: '仪表盘', chart_gauge: '仪表盘',
chart_map: '地图',
dateStyle: '日期显示', dateStyle: '日期显示',
datePattern: '日期格式', datePattern: '日期格式',
y: '年', y: '年',
...@@ -821,11 +820,6 @@ export default { ...@@ -821,11 +820,6 @@ export default {
drag_block_funnel_split: '漏斗分层', drag_block_funnel_split: '漏斗分层',
drag_block_radar_length: '分支长度', drag_block_radar_length: '分支长度',
drag_block_radar_label: '分支标签', drag_block_radar_label: '分支标签',
map_range: '地图范围',
select_map_range: '请选择地图范围',
area: '地区',
stack_item: '堆叠项',
placeholder_field: '拖动字段至此处',
axis_label_rotate: '标签角度' axis_label_rotate: '标签角度'
}, },
dataset: { dataset: {
...@@ -980,19 +974,7 @@ export default { ...@@ -980,19 +974,7 @@ export default {
right_join: '右连接', right_join: '右连接',
inner_join: '内连接', inner_join: '内连接',
full_join: '全连接', full_join: '全连接',
can_not_union_diff_datasource: '被关联数据集必须与当前数据集的数据源一致', can_not_union_diff_datasource: '被关联数据集必须与当前数据集的数据源一致'
operator: '操作',
d_q_trans: '维度/指标转换',
add_calc_field: '新建计算字段',
input_name: '请输入名称',
field_exp: '字段表达式',
data_type: '数据类型',
click_ref_field: '点击引用字段',
click_ref_function: '点击引用函数',
field_manage: '字段管理',
edit_calc_field: '编辑计算字段',
calc_field: '计算字段',
show_sql: '显示SQL'
}, },
datasource: { datasource: {
datasource: '数据源', datasource: '数据源',
...@@ -1146,7 +1128,7 @@ export default { ...@@ -1146,7 +1128,7 @@ export default {
lineHeight: '行高', lineHeight: '行高',
letterSpacing: '字间距', letterSpacing: '字间距',
textAlign: '左右对齐', textAlign: '左右对齐',
opacity: '透明度', opacity: '透明度',
verticalAlign: '上下对齐', verticalAlign: '上下对齐',
text_align_left: '左对齐', text_align_left: '左对齐',
text_align_center: '左右居中', text_align_center: '左右居中',
...@@ -1308,54 +1290,5 @@ export default { ...@@ -1308,54 +1290,5 @@ export default {
i18n_msg_type_dataset_sync_faild: '数据集同步失败', i18n_msg_type_dataset_sync_faild: '数据集同步失败',
i18n_msg_type_all: '全部类型', i18n_msg_type_all: '全部类型',
channel_inner_msg: '站内消息' channel_inner_msg: '站内消息'
},
denumberrange: {
label: '数值区间',
split_placeholder: '至',
please_key_min: '请输入最小值',
please_key_max: '请输入最大值',
out_of_min: '最小值不能小于最小整数-2³²',
out_of_max: '最大值不能大于最大整数2³²-1',
must_int: '请输入整数',
min_out_max: '最小值必须小于最大值',
max_out_min: '最大值必须大于最小值'
},
denumberselect: {
label: '数字下拉',
placeholder: '请选择'
},
deinputsearch: {
label: '文本搜索',
placeholder: '请输入关键字'
},
detextselect: {
label: '文本下拉',
placeholder: '请选择'
},
detextgridselect: {
label: '文本列表',
placeholder: '请选择'
},
denumbergridselect: {
label: '数字列表',
placeholder: '请选择'
},
dedaterange: {
label: '日期范围',
to_placeholder: '结束日期',
from_placeholder: '开始日期',
split_placeholder: '至'
},
dedate: {
label: '日期',
placeholder: '请选择日期'
},
deyearmonth: {
label: '年月',
placeholder: '请选择年月'
},
deyear: {
label: '年份',
placeholder: '请选择年份'
} }
} }
...@@ -16,7 +16,7 @@ const LinkTokenKey = Config.LinkTokenKey ...@@ -16,7 +16,7 @@ const LinkTokenKey = Config.LinkTokenKey
const service = axios.create({ const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests // withCredentials: true, // send cookies when cross-domain requests
timeout: 10000 // request timeout timeout: 20000 // request timeout
}) })
// request interceptor // request interceptor
...@@ -52,10 +52,6 @@ service.interceptors.request.use( ...@@ -52,10 +52,6 @@ service.interceptors.request.use(
} }
) )
const defaultOptions = {
confirmButtonText: i18n.t('login.re_login')
}
const checkAuth = response => { const checkAuth = response => {
// 请根据实际需求修改 // 请根据实际需求修改
...@@ -66,7 +62,10 @@ const checkAuth = response => { ...@@ -66,7 +62,10 @@ const checkAuth = response => {
store.dispatch('user/logout').then(() => { store.dispatch('user/logout').then(() => {
location.reload() location.reload()
}) })
}, defaultOptions) }, {
confirmButtonText: i18n.t('login.login_again'),
showClose: false
})
} }
if (response.headers['authentication-status'] === 'invalid') { if (response.headers['authentication-status'] === 'invalid') {
...@@ -75,6 +74,9 @@ const checkAuth = response => { ...@@ -75,6 +74,9 @@ const checkAuth = response => {
store.dispatch('user/logout').then(() => { store.dispatch('user/logout').then(() => {
location.reload() location.reload()
}) })
}, {
confirmButtonText: i18n.t('login.login_again'),
showClose: false
}) })
} }
// token到期后自动续命 刷新token // token到期后自动续命 刷新token
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论