Commit 4070323a by Tippi.Rao

Merge branch 'develop' of http://47.108.78.218:28999/frontend/yqlh-dataEase into feature/Tippi

parents 7a473e66 b07786d0
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
:is="mode" :is="mode"
:ref="refId" :ref="refId"
:obj="obj" :obj="obj"
:bus="bus"
:axios-request="request"
v-bind="$attrs" v-bind="$attrs"
v-on="$listeners" v-on="$listeners"
/> />
...@@ -11,6 +13,9 @@ ...@@ -11,6 +13,9 @@
<script> <script>
import { uuid } from 'vue-uuid' import { uuid } from 'vue-uuid'
import { get } from '@/api/system/dynamic' import { get } from '@/api/system/dynamic'
import bus from '@/utils/bus'
import request from '@/utils/request'
export default { export default {
name: 'AsyncComponent', name: 'AsyncComponent',
inheritAttrs: true, inheritAttrs: true,
...@@ -29,7 +34,9 @@ export default { ...@@ -29,7 +34,9 @@ export default {
return { return {
resData: '', resData: '',
mode: '', mode: '',
refId: null refId: null,
bus: bus,
request: request
} }
}, },
watch: { watch: {
......
...@@ -82,10 +82,10 @@ ...@@ -82,10 +82,10 @@
/> />
</span> </span>
<span :title="$t('route.exportExcel')"> <span :title="$t('route.exportExcel')">
<svg-icon <i
v-if="exportExcelShow" v-if="exportExcelShow"
style="color: white" style="line-height: 24px"
icon-class="file-excel" class="el-icon-document-delete"
@click.stop="exportExcelDownload()" @click.stop="exportExcelDownload()"
/> />
</span> </span>
...@@ -469,7 +469,7 @@ export default { ...@@ -469,7 +469,7 @@ export default {
this.$emit('showViewDetails', { openType: openType }) this.$emit('showViewDetails', { openType: openType })
}, },
exportExcelDownload() { exportExcelDownload() {
exportExcelDownload(this.chart, null, null, null, null, null) exportExcelDownload(this.chart)
}, },
auxiliaryMatrixChange() { auxiliaryMatrixChange() {
if (this.curComponent.auxiliaryMatrix) { if (this.curComponent.auxiliaryMatrix) {
......
...@@ -171,24 +171,20 @@ export default { ...@@ -171,24 +171,20 @@ export default {
return this.targetLinkageInfo[this.curLinkageView.propValue.viewId] return this.targetLinkageInfo[this.curLinkageView.propValue.viewId]
}, },
...mapState([ ...mapState([
'menuTop',
'menuLeft',
'menuShow',
'curComponent',
'componentData',
'canvasStyleData',
'linkageSettingStatus',
'targetLinkageInfo', 'targetLinkageInfo',
'curLinkageView' 'curLinkageView'
]) ])
}, },
mounted() { mounted() {
const _this = this
// 初始化映射关系 如果当前是相同的数据集且没有关联关系,则自动补充映射关系 // 初始化映射关系 如果当前是相同的数据集且没有关联关系,则自动补充映射关系
checkSameDataSet(this.curLinkageView.propValue.viewId, this.element.propValue.viewId).then(res => { checkSameDataSet(this.curLinkageView.propValue.viewId, this.element.propValue.viewId).then(res => {
if (res.data === 'YES' && this.linkageInfo.linkageFields.length === 0) { if (res.data === 'YES' && this.linkageInfo.linkageFields.length === 0) {
this.sourceLinkageInfo.targetViewFields.forEach(item => { this.sourceLinkageInfo.targetViewFields.forEach(item => {
_this.$nextTick(() => {
this.addLinkageField(item.id, item.id) this.addLinkageField(item.id, item.id)
}) })
})
} }
}) })
}, },
......
...@@ -429,7 +429,10 @@ export function getCacheTree(treeName) { ...@@ -429,7 +429,10 @@ export function getCacheTree(treeName) {
} }
export function exportExcelDownload(chart, snapshot, width, height, loadingWrapper, callBack) { export function exportExcelDownload(chart, snapshot, width, height, loadingWrapper, callBack) {
if (!chart.data?.data?.length) { if (chart.render === 'antv' && !chart.data?.data?.length) {
return
}
if (chart.type === 'echarts' && !(chart.data?.series?.length && chart.data?.series[0].data?.length)) {
return return
} }
const fields = JSON.parse(JSON.stringify(chart.data.fields)) const fields = JSON.parse(JSON.stringify(chart.data.fields))
......
...@@ -1938,7 +1938,7 @@ export default { ...@@ -1938,7 +1938,7 @@ export default {
jsonpath_info: '请填入JsonPath', jsonpath_info: '请填入JsonPath',
req_param: '请求参数', req_param: '请求参数',
headers: '请求头', headers: '请求头',
query_param: "QUERY參數", query_param: "QUERY参数",
query_info: "地址栏中跟在?后面的参数,如: updateapi?id=112", query_info: "地址栏中跟在?后面的参数,如: updateapi?id=112",
key: '键', key: '键',
value: '值', value: '值',
......
import Vue from "vue"; import Vue from 'vue'
import Router from "vue-router"; import Router from 'vue-router'
Vue.use(Router); Vue.use(Router)
/* Layout */ /* Layout */
import Layout from "@/layout"; import Layout from '@/layout'
/** /**
* Note: sub-menu only appear when route children.length >= 1 * Note: sub-menu only appear when route children.length >= 1
...@@ -32,74 +32,71 @@ import Layout from "@/layout"; ...@@ -32,74 +32,71 @@ import Layout from "@/layout";
*/ */
export const constantRoutes = [ export const constantRoutes = [
{ {
path: "/redirect", path: '/redirect',
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: "/redirect/:path(.*)", path: '/redirect/:path(.*)',
component: () => import("@/views/redirect/index"), component: () => import('@/views/redirect/index')
}, }
], ]
}, },
{ {
path: "/login", path: '/login',
component: () => import("@/views/login/index"), component: () => import('@/views/login/index'),
hidden: true, hidden: true
}, },
{ {
path: "/404", path: '/404',
component: () => import("@/views/404"), component: () => import('@/views/404'),
hidden: true, hidden: true
}, },
{ {
path: "/401", path: '/401',
component: (resolve) => require(["@/views/401"], resolve), component: (resolve) => require(['@/views/401'], resolve),
hidden: true, hidden: true
}, },
{ {
path: "/panelEdit", path: '/panelEdit',
component: Layout, component: Layout,
redirect: "/panelEdit/edit", redirect: '/panelEdit/edit',
hidden: true, hidden: true,
children: [ children: [
{ {
path: "edit", path: 'edit',
component: () => import("@/views/panel/edit"), component: () => import('@/views/panel/edit')
}, }
], ]
}, },
{ {
path: "/delink", path: '/delink',
component: () => import("@/views/link"), component: () => import('@/views/link'),
hidden: true, hidden: true
}, },
{ {
path: "/preview/:reportId", path: '/preview/:reportId',
component: () => component: () => import('@/components/canvas/components/editor/PreviewEject'),
import("@/components/canvas/components/editor/PreviewEject"), hidden: true
hidden: true,
}, },
{ {
path: "/previewScreenShot/:reportId/:backScreenShot", path: '/previewScreenShot/:reportId/:backScreenShot',
component: () => component: () => import('@/components/canvas/components/editor/PreviewEject'),
import("@/components/canvas/components/editor/PreviewEject"), hidden: true
hidden: true,
}, },
{ {
path: "/previewFullScreen", path: '/previewFullScreen',
component: () => component: () => import('@/components/canvas/components/editor/PreviewFullScreen'),
import("@/components/canvas/components/editor/PreviewFullScreen"), hidden: true
hidden: true,
}, },
{ {
path: "/de-auto-login", path: '/de-auto-login',
component: () => import("@/views/DeAutoLogin"), component: () => import('@/views/DeAutoLogin'),
hidden: true, hidden: true
}, }
// { // {
// path: '/', // path: '/',
...@@ -217,22 +214,21 @@ export const constantRoutes = [ ...@@ -217,22 +214,21 @@ export const constantRoutes = [
// }, // },
// 404 page must be placed at the end !!! // 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true } // { path: '*', redirect: '/404', hidden: true }
]; ]
const createRouter = () => const createRouter = () => new Router({
new Router({
// mode: 'history', // require service support // mode: 'history', // require service support
mode: "hash", mode: 'hash',
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: [], routes: constantRoutes
}); })
const router = createRouter(); const router = createRouter()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() { export function resetRouter() {
const newRouter = createRouter(); const newRouter = createRouter()
router.matcher = newRouter.matcher; // reset router router.matcher = newRouter.matcher // reset router
} }
export default router; export default router
...@@ -449,7 +449,7 @@ export default { ...@@ -449,7 +449,7 @@ export default {
valueFormatter() { valueFormatter() {
this.item.index = this.index this.item.index = this.index
this.item.formatterType = 'quota' this.item.formatterType = 'quotaExt'
this.$emit('valueFormatter', this.item) this.$emit('valueFormatter', this.item)
} }
} }
......
...@@ -117,6 +117,13 @@ export default { ...@@ -117,6 +117,13 @@ export default {
value: 'ge', value: 'ge',
label: this.$t('chart.filter_ge') label: this.$t('chart.filter_ge')
}] }]
},
{
label: '',
options: [{
value: 'not_null',
label: this.$t('chart.filter_not_null')
}]
}], }],
logic: '' logic: ''
} }
......
...@@ -194,6 +194,13 @@ export default { ...@@ -194,6 +194,13 @@ export default {
value: 'ge', value: 'ge',
label: this.$t('chart.filter_ge') label: this.$t('chart.filter_ge')
}] }]
},
{
label: '',
options: [{
value: 'not_null',
label: this.$t('chart.filter_not_null')
}]
} }
], ],
valueOptions: [ valueOptions: [
...@@ -226,6 +233,13 @@ export default { ...@@ -226,6 +233,13 @@ export default {
value: 'ge', value: 'ge',
label: this.$t('chart.filter_ge') label: this.$t('chart.filter_ge')
}] }]
},
{
label: '',
options: [{
value: 'not_null',
label: this.$t('chart.filter_not_null')
}]
} }
], ],
options: [], options: [],
......
...@@ -473,7 +473,8 @@ ...@@ -473,7 +473,8 @@
<plugin-com <plugin-com
v-if="view.isPlugin" v-if="view.isPlugin"
:component-name="view.type + '-data'" :component-name="view.type + '-data'"
:obj="{view, param, chart, dimensionData, quotaData}" :obj="{view, param, chart, dimension, dimensionData, quota, quotaData}"
:bus="bus"
/> />
<div v-else> <div v-else>
...@@ -819,6 +820,7 @@ ...@@ -819,6 +820,7 @@
@editItemFilter="showQuotaEditFilter" @editItemFilter="showQuotaEditFilter"
@onNameEdit="showRename" @onNameEdit="showRename"
@editItemCompare="showQuotaEditCompare" @editItemCompare="showQuotaEditCompare"
@valueFormatter="valueFormatter"
/> />
</transition-group> </transition-group>
</draggable> </draggable>
...@@ -1795,7 +1797,7 @@ export default { ...@@ -1795,7 +1797,7 @@ export default {
DrillPath, DrillPath,
PluginCom, PluginCom,
MapMapping, MapMapping,
MarkMapDataEditor, MarkMapDataEditor
}, },
props: { props: {
param: { param: {
...@@ -1815,6 +1817,7 @@ export default { ...@@ -1815,6 +1817,7 @@ export default {
}, },
data() { data() {
return { return {
bus: bus,
positionActiveNames: 'positionAdjust', positionActiveNames: 'positionAdjust',
loading: false, loading: false,
table: {}, table: {},
...@@ -2954,7 +2957,7 @@ export default { ...@@ -2954,7 +2957,7 @@ export default {
// 更换数据集 // 更换数据集
changeChart() { changeChart() {
const optType = this.view.tableId === this.changeTable.id && this.view.dataFrom!=='template' ? 'same' : 'change' const optType = this.view.tableId === this.changeTable.id && this.view.dataFrom !== 'template' ? 'same' : 'change'
// 更换数据集后清空视图字段,并重新请求数据;否则没有操作 // 更换数据集后清空视图字段,并重新请求数据;否则没有操作
if (optType === 'change') { if (optType === 'change') {
this.view.dataFrom = 'dataset' this.view.dataFrom = 'dataset'
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
props: {}, props: {},
data() { data() {
return { return {
maxHeight: 2000, maxHeight: 10000,
maxTop: 20000 maxTop: 20000
} }
}, },
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div <div
class="remark-style" class="remark-style"
:style="{backgroundColor:remarkCfg.bgFill}" :style="{backgroundColor:remarkCfg.bgFill}"
v-html="remarkCfg.content" v-html="$xss(remarkCfg.content)"
/> />
<i <i
slot="reference" slot="reference"
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<el-col class="info-item"> <el-col class="info-item">
<p class="info-title">{{ $t('chart.chart_type') }}</p> <p class="info-title">{{ $t('chart.chart_type') }}</p>
<svg-icon <svg-icon
v-if="detail.chart.type" :icon-class="detail.chart.isPlugin && detail.chart.type && detail.chart.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + detail.chart.type + '/svg') : detail.chart.type"
:icon-class="detail.chart.type" class="chart-icon"
/> />
</el-col> </el-col>
<el-col class="info-item"> <el-col class="info-item">
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<span> <span>
<span <span
style="margin-left: 6px" style="margin-left: 6px"
v-html="data.name" v-html="$xss(data.name)"
/> />
</span> </span>
<span <span
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
text-overflow: ellipsis; text-overflow: ellipsis;
" "
:title="data.name" :title="data.name"
v-html="highlights(data.name)" v-html="$xss(highlights(data.name))"
/> />
</span> </span>
</span> </span>
......
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
<div <div
v-if="showFoot" v-if="showFoot"
class="dynamic-login-foot" class="dynamic-login-foot"
v-html="footContent" v-html="$xss(footContent)"
/> />
</div> </div>
</template> </template>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div <div
class="export_body_inner_class" class="export_body_inner_class"
:style="templateHtmlStyle" :style="templateHtmlStyle"
v-html="templateContentChange" v-html="$xss(templateContentChange)"
/> />
</div> </div>
</el-row> </el-row>
......
...@@ -670,7 +670,10 @@ export default { ...@@ -670,7 +670,10 @@ export default {
if (this.editPanel.optType === 'toDefaultPanel') { if (this.editPanel.optType === 'toDefaultPanel') {
this.defaultTree(false) this.defaultTree(false)
} }
updateCacheTree(this.editPanel.optType, 'panel-main-tree', panelInfo, this.tData)
updateCacheTree(this.editPanel.optType,
panelInfo.panelType === 'system' ? 'panel-default-tree' : 'panel-main-tree', panelInfo,
panelInfo.panelType === 'system' ? this.defaultData : this.tData)
if (this.editPanel.optType === 'rename' && panelInfo.id === this.$store.state.panel.panelInfo.id) { if (this.editPanel.optType === 'rename' && panelInfo.id === this.$store.state.panel.panelInfo.id) {
this.$store.state.panel.panelInfo.name = panelInfo.name this.$store.state.panel.panelInfo.name = panelInfo.name
} }
...@@ -850,7 +853,7 @@ export default { ...@@ -850,7 +853,7 @@ export default {
delete(data) { delete(data) {
const params = { const params = {
title: data.nodeType === 'folder'?'commons.delete_this_folder':'commons.delete_this_dashboard', title: data.nodeType === 'folder' ? 'commons.delete_this_folder' : 'commons.delete_this_dashboard',
type: 'danger', type: 'danger',
cb: () => { cb: () => {
delGroup(data.id).then((response) => { delGroup(data.id).then((response) => {
......
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
<!-- // {{}}会将数据解释为普通文本,而非 HTML 代码。 --> <!-- // {{}}会将数据解释为普通文本,而非 HTML 代码。 -->
<div <div
slot="content" slot="content"
v-html="filterRoles(scope.row.roles)" v-html="$xss(filterRoles(scope.row.roles))"
/> />
<div class="de-one-line">{{ filterRoles(scope.row.roles) }}</div> <div class="de-one-line">{{ filterRoles(scope.row.roles) }}</div>
</el-tooltip> </el-tooltip>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{{ details.head }} {{ details.head }}
</el-row> </el-row>
<el-row class="card_content"> <el-row class="card_content">
<span v-html="details.content" /> <span v-html="$xss(details.content)" />
</el-row> </el-row>
<el-row class="card_bottom"> <el-row class="card_bottom">
{{ $t('wizard.click_show') }} {{ $t('wizard.click_show') }}
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{{ details.head }} {{ details.head }}
</el-row> </el-row>
<el-row class="card_content"> <el-row class="card_content">
<span v-html="details.content" /> <span v-html="$xss(details.content)" />
</el-row> </el-row>
<el-row class="card_bottom"> <el-row class="card_bottom">
{{ $t('wizard.apply') }} {{ $t('wizard.apply') }}
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<span>{{ details.head }}</span> <span>{{ details.head }}</span>
</el-row> </el-row>
<el-row class="content"> <el-row class="content">
<span v-html="details.content" /> <span v-html="$xss(details.content)" />
</el-row> </el-row>
<el-row class="bottom"> <el-row class="bottom">
<span class="span-box">{{ details.bottom }}</span> <span class="span-box">{{ details.bottom }}</span>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<span>{{ details.head }}</span> <span>{{ details.head }}</span>
</el-row> </el-row>
<el-row class="content"> <el-row class="content">
<span v-html="details.content" /> <span v-html="$xss(details.content)" />
</el-row> </el-row>
<el-row class="bottom"> <el-row class="bottom">
<span class="span-box">{{ details.bottom }}</span> <span class="span-box">{{ details.bottom }}</span>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论