Commit 9e5cf430 by 王敏

合并分支 'feature/Tippi' 到 'develop'

Feature/tippi

查看合并请求 !24
parents b878bc44 4afcfe65
......@@ -27,7 +27,9 @@ export default {
name: 'App',
components: { PluginCom, PasswordUpdateForm },
computed: {
...mapState('user', ['passwordModified'])
...mapState('user', [
'passwordModified'
])
},
data() {
return {
......@@ -43,9 +45,7 @@ export default {
}
},
mounted() {
const passwordModified = JSON.parse(
localStorage.getItem('passwordModified')
)
const passwordModified = JSON.parse(localStorage.getItem('passwordModified'))
if (typeof passwordModified === 'boolean') {
this.$store.commit('user/SET_PASSWORD_MODIFIED', passwordModified)
}
......
......@@ -54,15 +54,13 @@ export default {
// window.SyncComponentCache[this.url] = Axios.get(this.url)
res = await window.SyncComponentCache[this.url]
} else {
this.mode = await window.SyncComponentCache[this.url]
return
res = await window.SyncComponentCache[this.url]
}
if (res) {
const Fn = Function
const dynamicCode = res.data || res
const component = new Fn(`return ${dynamicCode}`)()
this.mode = component.default || component
window.SyncComponentCache[this.url] = this.mode
}
}
}
......
......@@ -360,7 +360,7 @@ export default {
computed: {
// 首次加载且非编辑状态新复制的视图,使用外部filter
initLoad() {
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad && this.canvasId === 'canvas-main'
},
scaleCoefficient() {
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
......
......@@ -6,7 +6,16 @@
class="item-axis"
@close="removeItem"
>
{{ item.name }}
<el-tooltip
v-if="toolTip"
class="item"
effect="dark"
:content="toolTip || item.name"
placement="top"
>
<span>{{ item.name }}</span>
</el-tooltip>
<span v-else>{{ item.name }}</span>
</el-tag>
</span>
</template>
......@@ -22,6 +31,11 @@ export default {
index: {
type: Number,
required: true
},
toolTip: {
type: String,
required: false,
default: ''
}
},
......
......@@ -410,7 +410,7 @@ export default {
},
_filterFun(value, data, node) {
if (!value) return true
return data[this.propsLabel].indexOf(value) !== -1
return data[this.propsLabel?.toLocaleUpperCase()].indexOf(value.toLocaleUpperCase()) !== -1
},
_treeNodeClickFun(data, node, vm) {
const { multiple } = this.selectParams
......
......@@ -121,7 +121,7 @@ export default {
},
keyWord(val, old) {
if (val === old) return
const results = val ? this.list.filter(item => item.text.includes(val)) : null
const results = val ? this.vagueFilter(val, this.list) : null
this.resetList(results)
this.reCacularHeight()
this.$nextTick(() => {
......@@ -136,6 +136,11 @@ export default {
})
},
methods: {
vagueFilter(val, nodes) {
if (!val || !val.trim()) return nodes
const results = nodes.filter(item => item.text?.toLocaleUpperCase().includes(val.toLocaleUpperCase()))
return results
},
resetSelectAll() {
this.selectAll = false
},
......@@ -148,7 +153,7 @@ export default {
selectAllChange(val) {
let vals = val ? [...this.list.map(ele => ele.id)] : []
if (this.keyWord.trim() && val) {
vals = this.list.filter(item => item.text.includes(this.keyWord.trim())).map(ele => ele.id)
vals = this.vagueFilter(this.keyWord.trim(), this.list).map(ele => ele.id)
}
this.visualChange(vals)
this.selectValue = vals
......@@ -233,14 +238,14 @@ export default {
isAllSelect() {
let vals = this.list.length
if (this.keyWord.trim()) {
vals = this.list.filter(item => item.text.includes(this.keyWord.trim())).map(ele => ele.id).filter(ele => this.selectValue.includes(ele)).length
vals = this.vagueFilter(this.keyWord.trim(), this.list).map(ele => ele.id).filter(ele => this.selectValue.includes(ele)).length
}
return vals
},
halfSelect() {
let vals = this.list.length
if (this.keyWord.trim()) {
vals = this.list.filter(item => item.text.includes(this.keyWord.trim())).map(ele => ele.id).length
vals = this.vagueFilter(this.keyWord.trim(), this.list).map(ele => ele.id).length
}
return vals
},
......
......@@ -31,7 +31,7 @@
v-model="value"
@change="handleCheckedChange"
>
<template v-for="item in data.filter(node => !keyWord || (node.id && node.id.includes(keyWord)))">
<template v-for="item in data.filter(node => !keyWord || (node.id && node.id.toLocaleUpperCase().includes(keyWord.toLocaleUpperCase())))">
<el-checkbox
:key="item.id"
:label="item.id"
......@@ -51,7 +51,7 @@
@change="changeRadioBox"
>
<el-radio
v-for="(item, index) in data.filter(node => !keyWord || (node.id && node.id.includes(keyWord)))"
v-for="(item, index) in data.filter(node => !keyWord || (node.id && node.id.toLocaleUpperCase().includes(keyWord.toLocaleUpperCase())))"
:key="index"
:label="item.id"
@click.native.prevent="testChange(item)"
......
......@@ -381,7 +381,7 @@ export default {
_filterFun(value, data, node) {
if (!value) return true
return data.id.toString().indexOf(value.toString()) !== -1
return data.id.toString().toLocaleUpperCase().indexOf(value.toString().toLocaleUpperCase()) !== -1
},
// 树点击
_nodeClickFun(data, node, vm) {
......
......@@ -626,7 +626,8 @@ export default {
status: 'Authorization status',
valid: 'Valid',
invalid: 'Invalid',
expired: 'Expired'
expired: 'Expired',
expired_msg: 'license has expired since {0}. It is recommended to update the license, which does not affect the use of enterprise version functions'
},
member: {
create: 'Add members',
......
......@@ -626,7 +626,8 @@ export default {
status: '授權狀態',
valid: '有效',
invalid: '無效',
expired: '已過期'
expired: '已過期',
expired_msg: 'License已過期,過期時間:{0},為了不影響企業版功能的使用,建議您更新License'
},
member: {
create: '添加成員',
......
......@@ -625,7 +625,8 @@ export default {
status: '授权状态',
valid: '有效',
invalid: '无效',
expired: '已过期'
expired: '已过期',
expired_msg: 'License已过期,过期时间:{0},为了不影响企业版功能的使用,建议您更新License'
},
member: {
create: '添加成员',
......@@ -1178,7 +1179,7 @@ export default {
chart_pie_rose: '南丁格尔玫瑰图',
chart_pie_donut_rose: '南丁格尔玫瑰环形图',
chart_funnel: '漏斗图',
chart_sankey:'桑基图',
chart_sankey: '桑基图',
chart_radar: '雷达图',
chart_gauge: '仪表盘',
chart_map: '地图',
......
<template>
<div
v-if="!licValidate && licStatus !== 'no_record'"
class="lic"
v-if="!licValidate && licStatus !== 'no_record' && !tipClosed"
class="lic_tips"
>
<strong>{{ $t(licMsg) }}</strong>
<el-alert
class="lic_alert"
:title="$t(licMsg)"
type="warning"
show-icon
center
@close="closeTip"
/>
</div>
</template>
......@@ -20,9 +29,7 @@ export default {
}
},
computed: {
/* theme() {
return this.$store.state.settings.theme
}, */
licValidate() {
return this.$store.state.lic.validate
},
......@@ -30,40 +37,40 @@ export default {
return this.$store.state.lic.licStatus || ''
},
licMsg() {
if (this.$store.state.lic?.licMsg?.includes('expired')) {
const message = this.$store.state.lic.licMsg
const exp = message.substring(message.indexOf('since ') + 6, message.indexOf(','))
return this.$t('license.expired_msg').replace('{0}', exp)
}
return this.$store.state.lic.licMsg ? ('license.' + this.$store.state.lic.licMsg) : null
},
tipClosed() {
return localStorage.getItem('lic_closed')
}
},
mounted() {
// this.validate()
},
methods: {
// validate() {
// validateLic().then(res => {
// this.lic = true
// this.$store.dispatch('lic/setValidate', true)
// }).catch((e) => {
// this.msg = e.response.data.message
// this.lic = false
// this.$store.dispatch('lic/setValidate', false)
// })
// }
closeTip() {
localStorage.setItem('lic_closed', true)
}
}
}
</script>
<style lang="scss" scoped>
.lic {
height: 24px;
background-color: #c92100;
color: #fff;
text-align: center;
/* padding: 6px 11px; */
position: fixed;
z-index: 1002;
top: 0;
width: 100%;
}
.lic_tips {
position: absolute;
z-index: 2000;
position:absolute;
top: 0;left:0;right:0;
margin: auto;
}
.lic_alert ::v-deep .el-icon-close{
top: 16px !important;
right: 10px !important;
}
</style>
......@@ -281,7 +281,7 @@ export default {
unloadHandler(e) {
this.gap_time = new Date().getTime() - this.beforeUnload_time
if (this.gap_time <= 5) {
this.logout().then(res => {})
// this.logout().then(res => {})
}
},
......
......@@ -76,8 +76,8 @@ Vue.use(Vuetify)
* please remove it before going online ! ! !
*/
if (process.env.NODE_ENV === 'production') {
// const { mockXHR } = require('../mock')
// mockXHR()
// const { mockXHR } = require('../mock')
// mockXHR()
}
// set ElementUI lang to EN
......@@ -124,7 +124,7 @@ Vue.prototype.hasDataPermission = function(pTarget, pSource) {
Vue.prototype.checkPermission = function(pers) {
const permissions = store.getters.permissions
const hasPermission = pers.every((needP) => {
const hasPermission = pers.every(needP => {
const result = permissions.includes(needP)
return result
})
......@@ -137,21 +137,18 @@ Vue.prototype.$cancelRequest = function(cancelkey) {
if (cancelkey) {
if (cancelkey.indexOf('/**') > -1) {
Vue.prototype.$currentHttpRequestList.forEach((item, key) => {
key.indexOf(cancelkey.split('/**')[0]) > -1 &&
item('Operation canceled by the user.')
key.indexOf(cancelkey.split('/**')[0]) > -1 && item('Operation canceled by the user.')
})
} else {
Vue.prototype.$currentHttpRequestList.get(cancelkey) &&
Vue.prototype.$currentHttpRequestList.get(cancelkey)(
'Operation canceled by the user.'
)
Vue.prototype.$currentHttpRequestList.get(cancelkey) && Vue.prototype.$currentHttpRequestList.get(cancelkey)('Operation canceled by the user.')
}
}
}
new Vue({
router,
store,
i18n,
render: (h) => h(App)
render: h => h(App)
}).$mount('#app')
......@@ -481,9 +481,11 @@ export default {
trackClick(trackAction) {
const param = this.pointParam
if (!param || !param.data || !param.data.dimensionList) {
// 地图提示没有关联字段 其他没有维度信息的 直接返回
if (this.chart.type === 'map') {
this.$warning(this.$t('panel.no_drill_field'))
const zoom = this.myChart.getOption().geo[0].zoom
if (zoom <= 1) {
this.$warning(this.$t('panel.no_drill_field'))
}
}
return
}
......
......@@ -14,6 +14,22 @@
<script>
import tinymce from 'tinymce/tinymce' // tinymce默认hidden,不引入不显示
import Editor from '@tinymce/tinymce-vue'
import 'tinymce/themes/silver/theme' // 编辑器主题
import 'tinymce/icons/default' // 引入编辑器图标icon,不引入则不显示对应图标
// 引入编辑器插件(基本免费插件都在这儿了)
import 'tinymce/plugins/advlist' // 高级列表
import 'tinymce/plugins/autolink' // 自动链接
import 'tinymce/plugins/link' // 超链接
import 'tinymce/plugins/image' // 插入编辑图片
import 'tinymce/plugins/lists' // 列表插件
import 'tinymce/plugins/charmap' // 特殊字符
import 'tinymce/plugins/media' // 插入编辑媒体
import 'tinymce/plugins/wordcount' // 字数统计
import 'tinymce/plugins/table' // 表格
import 'tinymce/plugins/contextmenu' // contextmenu
import 'tinymce/plugins/directionality'
import 'tinymce/plugins/nonbreaking'
import 'tinymce/plugins/pagebreak'
import { imgUrlTrans } from '@/components/canvas/utils/utils'
import { mapState } from 'vuex'
// 编辑器引入
......
......@@ -216,6 +216,7 @@ import { changeFavicon, showMultiLoginMsg } from '@/utils/index'
import { initTheme } from '@/utils/ThemeUtil'
import PluginCom from '@/views/system/plugin/PluginCom'
import Cookies from 'js-cookie'
import xss from 'xss'
export default {
name: 'Login',
components: { PluginCom },
......@@ -449,7 +450,27 @@ export default {
this.showFoot = this.uiInfo['ui.showFoot'].paramValue === true || this.uiInfo['ui.showFoot'].paramValue === 'true'
if (this.showFoot) {
const content = this.uiInfo['ui.footContent'] && this.uiInfo['ui.footContent'].paramValue
this.footContent = content
const myXss = new xss.FilterXSS({
css: {
whiteList: {
'background-color': true,
'text-align': true,
'color': true,
'margin-top': true,
'margin-bottom': true,
'line-height': true,
'box-sizing': true,
'padding-top': true,
'padding-bottom': true
}
},
whiteList: {
...xss.whiteList,
p: ['style'],
span: ['style']
}
})
this.footContent = myXss.process(content)
}
}
},
......
......@@ -266,6 +266,7 @@
<div v-if="currentElement.options && currentElement.options.attrs">
<filter-head
:element="currentElement"
@dataset-name="dataSetName"
/>
<filter-control
......@@ -463,6 +464,23 @@ export default {
bus.$off('valid-values-change', this.validateFilterValue)
},
methods: {
dataSetName(tableId, callback) {
let result = null
if (tableId) {
const stack = [...this.defaultData]
while (stack.length) {
const tableNode = stack.pop()
if (tableNode.id === tableId) {
result = tableNode.name
break
}
if (tableNode.children?.length) {
tableNode.children.forEach(kid => stack.push(kid))
}
}
}
callback && callback(result)
},
async checkSuperior(list, anotherTableIds) {
let fieldValid = false
const fieldId = this.myAttrs?.fieldId
......
......@@ -25,6 +25,7 @@
:key="item.id"
:item="item"
:index="index"
:tool-tip="getTableName(item.tableId)"
@closeItem="closeItem"
/>
......@@ -70,7 +71,12 @@ export default {
},
methods: {
getTableName(tableId) {
let tableName = null
this.$emit('dataset-name', tableId, t => { tableName = t })
console.log(tableName)
return tableName
},
onMove(e, originalEvent) {
return true
},
......
......@@ -258,6 +258,7 @@
<Preview
v-if="showMainFlag"
ref="paneViewPreviewRef"
:class="fullscreen && 'fullscreen-visual-selects'"
:component-data="mainCanvasComponentData"
:canvas-style-data="canvasStyleData"
:active-tab="activeTab"
......@@ -932,5 +933,12 @@ export default {
color: inherit;
margin-right: 5px;
}
.fullscreen-visual-selects {
.VisualSelects {
top: inherit !important;
left: inherit !important;
}
}
</style>
......@@ -50,14 +50,11 @@ module.exports = {
'@': resolve('src')
}
},
output:
process.env.NODE_ENV === 'development'
? {}
: {
filename: `js/[name].[contenthash:8].${pkg.version}.js`,
publicPath: '/',
chunkFilename: `js/[name].[contenthash:8].${pkg.version}.js`
},
output: process.env.NODE_ENV === 'development' ? {} : {
filename: `js/[name].[contenthash:8].${pkg.version}.js`,
publicPath: '/',
chunkFilename: `js/[name].[contenthash:8].${pkg.version}.js`
},
plugins: [
new CopyWebpackPlugin([
{
......@@ -80,14 +77,15 @@ module.exports = {
})
]
},
chainWebpack: (config) => {
chainWebpack: config => {
config.module.rules.delete('svg') // 删除默认配置中处理svg,
// const svgRule = config.module.rule('svg')
// svgRule.uses.clear()
config.module
.rule('svg-sprite-loader')
.test(/\.svg$/)
.include.add(resolve('src/icons')) // 处理svg目录
.include
.add(resolve('src/icons')) // 处理svg目录
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论