Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yqlh-dataEase
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
frontend
yqlh-dataEase
Commits
9e5cf430
Commit
9e5cf430
authored
Jul 27, 2023
by
王敏
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'feature/Tippi' 到 'develop'
Feature/tippi 查看合并请求
!24
parents
b878bc44
4afcfe65
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
290 行增加
和
226 行删除
+290
-226
src/App.vue
+4
-4
src/components/asyncComponent/index.vue
+1
-3
src/components/canvas/customComponent/UserView.vue
+1
-1
src/components/dragItem/index.vue
+15
-1
src/components/elTreeSelect/index.vue
+1
-1
src/components/elVisualSelect/index.vue
+9
-4
src/components/widget/deWidget/DeSelectGrid.vue
+2
-2
src/components/widget/deWidget/DeSelectTree.vue
+1
-1
src/lang/en.js
+2
-1
src/lang/tw.js
+2
-1
src/lang/zh.js
+3
-2
src/layout/components/Licbar.vue
+36
-29
src/layout/components/Topbar.vue
+1
-1
src/main.js
+7
-10
src/permission.js
+122
-151
src/views/chart/components/ChartComponent.vue
+4
-2
src/views/chart/components/componentStyle/dialog/RemarkEditor.vue
+16
-0
src/views/login/index.vue
+22
-1
src/views/panel/filter/FilterDialog.vue
+18
-0
src/views/panel/filter/filterMain/FilterHead.vue
+7
-1
src/views/panel/list/PanelViewShow.vue
+8
-0
vue.config.js
+8
-10
没有找到文件。
src/App.vue
查看文件 @
9e5cf430
...
@@ -27,7 +27,9 @@ export default {
...
@@ -27,7 +27,9 @@ export default {
name
:
'App'
,
name
:
'App'
,
components
:
{
PluginCom
,
PasswordUpdateForm
},
components
:
{
PluginCom
,
PasswordUpdateForm
},
computed
:
{
computed
:
{
...
mapState
(
'user'
,
[
'passwordModified'
])
...
mapState
(
'user'
,
[
'passwordModified'
])
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -43,9 +45,7 @@ export default {
...
@@ -43,9 +45,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
const
passwordModified
=
JSON
.
parse
(
const
passwordModified
=
JSON
.
parse
(
localStorage
.
getItem
(
'passwordModified'
))
localStorage
.
getItem
(
'passwordModified'
)
)
if
(
typeof
passwordModified
===
'boolean'
)
{
if
(
typeof
passwordModified
===
'boolean'
)
{
this
.
$store
.
commit
(
'user/SET_PASSWORD_MODIFIED'
,
passwordModified
)
this
.
$store
.
commit
(
'user/SET_PASSWORD_MODIFIED'
,
passwordModified
)
}
}
...
...
src/components/asyncComponent/index.vue
查看文件 @
9e5cf430
...
@@ -54,15 +54,13 @@ export default {
...
@@ -54,15 +54,13 @@ export default {
// window.SyncComponentCache[this.url] = Axios.get(this.url)
// window.SyncComponentCache[this.url] = Axios.get(this.url)
res
=
await
window
.
SyncComponentCache
[
this
.
url
]
res
=
await
window
.
SyncComponentCache
[
this
.
url
]
}
else
{
}
else
{
this
.
mode
=
await
window
.
SyncComponentCache
[
this
.
url
]
res
=
await
window
.
SyncComponentCache
[
this
.
url
]
return
}
}
if
(
res
)
{
if
(
res
)
{
const
Fn
=
Function
const
Fn
=
Function
const
dynamicCode
=
res
.
data
||
res
const
dynamicCode
=
res
.
data
||
res
const
component
=
new
Fn
(
`return
${
dynamicCode
}
`
)()
const
component
=
new
Fn
(
`return
${
dynamicCode
}
`
)()
this
.
mode
=
component
.
default
||
component
this
.
mode
=
component
.
default
||
component
window
.
SyncComponentCache
[
this
.
url
]
=
this
.
mode
}
}
}
}
}
}
...
...
src/components/canvas/customComponent/UserView.vue
查看文件 @
9e5cf430
...
@@ -360,7 +360,7 @@ export default {
...
@@ -360,7 +360,7 @@ export default {
computed
:
{
computed
:
{
// 首次加载且非编辑状态新复制的视图,使用外部filter
// 首次加载且非编辑状态新复制的视图,使用外部filter
initLoad
()
{
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
()
{
scaleCoefficient
()
{
if
(
this
.
terminal
===
'pc'
&&
!
this
.
mobileLayoutStatus
)
{
if
(
this
.
terminal
===
'pc'
&&
!
this
.
mobileLayoutStatus
)
{
...
...
src/components/dragItem/index.vue
查看文件 @
9e5cf430
...
@@ -6,7 +6,16 @@
...
@@ -6,7 +6,16 @@
class=
"item-axis"
class=
"item-axis"
@
close=
"removeItem"
@
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>
</el-tag>
</span>
</span>
</
template
>
</
template
>
...
@@ -22,6 +31,11 @@ export default {
...
@@ -22,6 +31,11 @@ export default {
index
:
{
index
:
{
type
:
Number
,
type
:
Number
,
required
:
true
required
:
true
},
toolTip
:
{
type
:
String
,
required
:
false
,
default
:
''
}
}
},
},
...
...
src/components/elTreeSelect/index.vue
查看文件 @
9e5cf430
...
@@ -410,7 +410,7 @@ export default {
...
@@ -410,7 +410,7 @@ export default {
},
},
_filterFun
(
value
,
data
,
node
)
{
_filterFun
(
value
,
data
,
node
)
{
if
(
!
value
)
return
true
if
(
!
value
)
return
true
return
data
[
this
.
propsLabel
].
indexOf
(
value
)
!==
-
1
return
data
[
this
.
propsLabel
?.
toLocaleUpperCase
()].
indexOf
(
value
.
toLocaleUpperCase
()
)
!==
-
1
},
},
_treeNodeClickFun
(
data
,
node
,
vm
)
{
_treeNodeClickFun
(
data
,
node
,
vm
)
{
const
{
multiple
}
=
this
.
selectParams
const
{
multiple
}
=
this
.
selectParams
...
...
src/components/elVisualSelect/index.vue
查看文件 @
9e5cf430
...
@@ -121,7 +121,7 @@ export default {
...
@@ -121,7 +121,7 @@ export default {
},
},
keyWord
(
val
,
old
)
{
keyWord
(
val
,
old
)
{
if
(
val
===
old
)
return
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
.
resetList
(
results
)
this
.
reCacularHeight
()
this
.
reCacularHeight
()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -136,6 +136,11 @@ export default {
...
@@ -136,6 +136,11 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
vagueFilter
(
val
,
nodes
)
{
if
(
!
val
||
!
val
.
trim
())
return
nodes
const
results
=
nodes
.
filter
(
item
=>
item
.
text
?.
toLocaleUpperCase
().
includes
(
val
.
toLocaleUpperCase
()))
return
results
},
resetSelectAll
()
{
resetSelectAll
()
{
this
.
selectAll
=
false
this
.
selectAll
=
false
},
},
...
@@ -148,7 +153,7 @@ export default {
...
@@ -148,7 +153,7 @@ export default {
selectAllChange
(
val
)
{
selectAllChange
(
val
)
{
let
vals
=
val
?
[...
this
.
list
.
map
(
ele
=>
ele
.
id
)]
:
[]
let
vals
=
val
?
[...
this
.
list
.
map
(
ele
=>
ele
.
id
)]
:
[]
if
(
this
.
keyWord
.
trim
()
&&
val
)
{
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
.
visualChange
(
vals
)
this
.
selectValue
=
vals
this
.
selectValue
=
vals
...
@@ -233,14 +238,14 @@ export default {
...
@@ -233,14 +238,14 @@ export default {
isAllSelect
()
{
isAllSelect
()
{
let
vals
=
this
.
list
.
length
let
vals
=
this
.
list
.
length
if
(
this
.
keyWord
.
trim
())
{
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
return
vals
},
},
halfSelect
()
{
halfSelect
()
{
let
vals
=
this
.
list
.
length
let
vals
=
this
.
list
.
length
if
(
this
.
keyWord
.
trim
())
{
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
return
vals
},
},
...
...
src/components/widget/deWidget/DeSelectGrid.vue
查看文件 @
9e5cf430
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
v-model=
"value"
v-model=
"value"
@
change=
"handleCheckedChange"
@
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
<el-checkbox
:key=
"item.id"
:key=
"item.id"
:label=
"item.id"
:label=
"item.id"
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
@
change=
"changeRadioBox"
@
change=
"changeRadioBox"
>
>
<el-radio
<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"
:key=
"index"
:label=
"item.id"
:label=
"item.id"
@
click
.
native
.
prevent=
"testChange(item)"
@
click
.
native
.
prevent=
"testChange(item)"
...
...
src/components/widget/deWidget/DeSelectTree.vue
查看文件 @
9e5cf430
...
@@ -381,7 +381,7 @@ export default {
...
@@ -381,7 +381,7 @@ export default {
_filterFun
(
value
,
data
,
node
)
{
_filterFun
(
value
,
data
,
node
)
{
if
(
!
value
)
return
true
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
)
{
_nodeClickFun
(
data
,
node
,
vm
)
{
...
...
src/lang/en.js
查看文件 @
9e5cf430
...
@@ -626,7 +626,8 @@ export default {
...
@@ -626,7 +626,8 @@ export default {
status
:
'Authorization status'
,
status
:
'Authorization status'
,
valid
:
'Valid'
,
valid
:
'Valid'
,
invalid
:
'Invalid'
,
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
:
{
member
:
{
create
:
'Add members'
,
create
:
'Add members'
,
...
...
src/lang/tw.js
查看文件 @
9e5cf430
...
@@ -626,7 +626,8 @@ export default {
...
@@ -626,7 +626,8 @@ export default {
status
:
'授權狀態'
,
status
:
'授權狀態'
,
valid
:
'有效'
,
valid
:
'有效'
,
invalid
:
'無效'
,
invalid
:
'無效'
,
expired
:
'已過期'
expired
:
'已過期'
,
expired_msg
:
'License已過期,過期時間:{0},為了不影響企業版功能的使用,建議您更新License'
},
},
member
:
{
member
:
{
create
:
'添加成員'
,
create
:
'添加成員'
,
...
...
src/lang/zh.js
查看文件 @
9e5cf430
...
@@ -625,7 +625,8 @@ export default {
...
@@ -625,7 +625,8 @@ export default {
status
:
'授权状态'
,
status
:
'授权状态'
,
valid
:
'有效'
,
valid
:
'有效'
,
invalid
:
'无效'
,
invalid
:
'无效'
,
expired
:
'已过期'
expired
:
'已过期'
,
expired_msg
:
'License已过期,过期时间:{0},为了不影响企业版功能的使用,建议您更新License'
},
},
member
:
{
member
:
{
create
:
'添加成员'
,
create
:
'添加成员'
,
...
@@ -1178,7 +1179,7 @@ export default {
...
@@ -1178,7 +1179,7 @@ export default {
chart_pie_rose
:
'南丁格尔玫瑰图'
,
chart_pie_rose
:
'南丁格尔玫瑰图'
,
chart_pie_donut_rose
:
'南丁格尔玫瑰环形图'
,
chart_pie_donut_rose
:
'南丁格尔玫瑰环形图'
,
chart_funnel
:
'漏斗图'
,
chart_funnel
:
'漏斗图'
,
chart_sankey
:
'桑基图'
,
chart_sankey
:
'桑基图'
,
chart_radar
:
'雷达图'
,
chart_radar
:
'雷达图'
,
chart_gauge
:
'仪表盘'
,
chart_gauge
:
'仪表盘'
,
chart_map
:
'地图'
,
chart_map
:
'地图'
,
...
...
src/layout/components/Licbar.vue
查看文件 @
9e5cf430
<
template
>
<
template
>
<div
<div
v-if=
"!licValidate && licStatus !== 'no_record'"
v-if=
"!licValidate && licStatus !== 'no_record'
&& !tipClosed
"
class=
"lic"
class=
"lic
_tips
"
>
>
<strong>
{{
$t
(
licMsg
)
}}
</strong>
<el-alert
class=
"lic_alert"
:title=
"$t(licMsg)"
type=
"warning"
show-icon
center
@
close=
"closeTip"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -20,9 +29,7 @@ export default {
...
@@ -20,9 +29,7 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
/* theme() {
return this.$store.state.settings.theme
}, */
licValidate
()
{
licValidate
()
{
return
this
.
$store
.
state
.
lic
.
validate
return
this
.
$store
.
state
.
lic
.
validate
},
},
...
@@ -30,40 +37,40 @@ export default {
...
@@ -30,40 +37,40 @@ export default {
return
this
.
$store
.
state
.
lic
.
licStatus
||
''
return
this
.
$store
.
state
.
lic
.
licStatus
||
''
},
},
licMsg
()
{
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
return
this
.
$store
.
state
.
lic
.
licMsg
?
(
'license.'
+
this
.
$store
.
state
.
lic
.
licMsg
)
:
null
},
tipClosed
()
{
return
localStorage
.
getItem
(
'lic_closed'
)
}
}
},
},
mounted
()
{
mounted
()
{
// this.validate()
},
},
methods
:
{
methods
:
{
// validate() {
closeTip
()
{
// validateLic().then(res => {
localStorage
.
setItem
(
'lic_closed'
,
true
)
// 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)
// })
// }
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.lic_tips
{
.lic
{
position
:
absolute
;
height
:
24px
;
z-index
:
2000
;
background-color
:
#c92100
;
position
:
absolute
;
color
:
#fff
;
top
:
0
;
left
:
0
;
right
:
0
;
text-align
:
center
;
margin
:
auto
;
/* padding: 6px 11px; */
}
position
:
fixed
;
.lic_alert
::v-deep
.el-icon-close
{
z-index
:
1002
;
top
:
16px
!important
;
top
:
0
;
right
:
10px
!important
;
width
:
100%
;
}
}
</
style
>
</
style
>
src/layout/components/Topbar.vue
查看文件 @
9e5cf430
...
@@ -281,7 +281,7 @@ export default {
...
@@ -281,7 +281,7 @@ export default {
unloadHandler
(
e
)
{
unloadHandler
(
e
)
{
this
.
gap_time
=
new
Date
().
getTime
()
-
this
.
beforeUnload_time
this
.
gap_time
=
new
Date
().
getTime
()
-
this
.
beforeUnload_time
if
(
this
.
gap_time
<=
5
)
{
if
(
this
.
gap_time
<=
5
)
{
this
.
logout
().
then
(
res
=>
{})
//
this.logout().then(res => {})
}
}
},
},
...
...
src/main.js
查看文件 @
9e5cf430
...
@@ -76,8 +76,8 @@ Vue.use(Vuetify)
...
@@ -76,8 +76,8 @@ Vue.use(Vuetify)
* please remove it before going online ! ! !
* please remove it before going online ! ! !
*/
*/
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
// const { mockXHR } = require('../mock')
// const { mockXHR } = require('../mock')
// mockXHR()
// mockXHR()
}
}
// set ElementUI lang to EN
// set ElementUI lang to EN
...
@@ -124,7 +124,7 @@ Vue.prototype.hasDataPermission = function(pTarget, pSource) {
...
@@ -124,7 +124,7 @@ Vue.prototype.hasDataPermission = function(pTarget, pSource) {
Vue
.
prototype
.
checkPermission
=
function
(
pers
)
{
Vue
.
prototype
.
checkPermission
=
function
(
pers
)
{
const
permissions
=
store
.
getters
.
permissions
const
permissions
=
store
.
getters
.
permissions
const
hasPermission
=
pers
.
every
(
(
needP
)
=>
{
const
hasPermission
=
pers
.
every
(
needP
=>
{
const
result
=
permissions
.
includes
(
needP
)
const
result
=
permissions
.
includes
(
needP
)
return
result
return
result
})
})
...
@@ -137,21 +137,18 @@ Vue.prototype.$cancelRequest = function(cancelkey) {
...
@@ -137,21 +137,18 @@ Vue.prototype.$cancelRequest = function(cancelkey) {
if
(
cancelkey
)
{
if
(
cancelkey
)
{
if
(
cancelkey
.
indexOf
(
'/**'
)
>
-
1
)
{
if
(
cancelkey
.
indexOf
(
'/**'
)
>
-
1
)
{
Vue
.
prototype
.
$currentHttpRequestList
.
forEach
((
item
,
key
)
=>
{
Vue
.
prototype
.
$currentHttpRequestList
.
forEach
((
item
,
key
)
=>
{
key
.
indexOf
(
cancelkey
.
split
(
'/**'
)[
0
])
>
-
1
&&
key
.
indexOf
(
cancelkey
.
split
(
'/**'
)[
0
])
>
-
1
&&
item
(
'Operation canceled by the user.'
)
item
(
'Operation canceled by the user.'
)
})
})
}
else
{
}
else
{
Vue
.
prototype
.
$currentHttpRequestList
.
get
(
cancelkey
)
&&
Vue
.
prototype
.
$currentHttpRequestList
.
get
(
cancelkey
)
&&
Vue
.
prototype
.
$currentHttpRequestList
.
get
(
cancelkey
)(
'Operation canceled by the user.'
)
Vue
.
prototype
.
$currentHttpRequestList
.
get
(
cancelkey
)(
'Operation canceled by the user.'
)
}
}
}
}
}
}
new
Vue
({
new
Vue
({
router
,
router
,
store
,
store
,
i18n
,
i18n
,
render
:
(
h
)
=>
h
(
App
)
render
:
h
=>
h
(
App
)
}).
$mount
(
'#app'
)
}).
$mount
(
'#app'
)
src/permission.js
查看文件 @
9e5cf430
...
@@ -3,49 +3,51 @@ import store from './store'
...
@@ -3,49 +3,51 @@ import store from './store'
// import { Message } from 'element-ui'
// import { Message } from 'element-ui'
import
NProgress
from
'nprogress'
// progress bar
import
NProgress
from
'nprogress'
// progress bar
import
'nprogress/nprogress.css'
// progress bar style
import
'nprogress/nprogress.css'
// progress bar style
import
{
getToken
}
from
'@/utils/auth'
// get token from cookie
import
{
getToken
}
from
'@/utils/auth'
// get token from cookie
import
getPageTitle
from
'@/utils/get-page-title'
import
getPageTitle
from
'@/utils/get-page-title'
import
{
buildMenus
}
from
'@/api/system/menu'
import
{
import
{
filterAsyncRouter
}
from
'@/store/modules/permission'
buildMenus
import
{
isMobile
,
changeFavicon
}
from
'@/utils/index'
}
from
'@/api/system/menu'
import
{
filterAsyncRouter
}
from
'@/store/modules/permission'
import
{
isMobile
,
changeFavicon
}
from
'@/utils/index'
import
Layout
from
'@/layout/index'
import
Layout
from
'@/layout/index'
import
{
getSysUI
}
from
'@/utils/auth'
import
{
getSysUI
}
from
'@/utils/auth'
import
{
getSocket
}
from
'@/websocket'
import
{
getSocket
}
from
'@/websocket'
NProgress
.
configure
({
NProgress
.
configure
({
showSpinner
:
false
showSpinner
:
false
})
// NProgress Configuration
})
// NProgress Configuration
const
whiteList
=
[
const
whiteList
=
[
'/login'
,
'/401'
,
'/404'
,
'/delink'
,
'/nolic'
,
'/de-auto-login'
]
// no redirect whitelist
'/login'
,
'/401'
,
'/404'
,
'/delink'
,
'/nolic'
,
'/de-auto-login'
]
// no redirect whitelist
const
routeBefore
=
(
callBack
)
=>
{
const
routeBefore
=
(
callBack
)
=>
{
let
uiInfo
=
getSysUI
()
let
uiInfo
=
getSysUI
()
if
(
!
uiInfo
||
Object
.
keys
(
uiInfo
).
length
===
0
)
{
if
(
!
uiInfo
||
Object
.
keys
(
uiInfo
).
length
===
0
)
{
store
store
.
dispatch
(
'user/getUI'
).
then
(()
=>
{
.
dispatch
(
'user/getUI'
)
document
.
title
=
getPageTitle
()
.
then
(()
=>
{
uiInfo
=
getSysUI
()
document
.
title
=
getPageTitle
()
if
(
uiInfo
[
'ui.favicon'
]
&&
uiInfo
[
'ui.favicon'
].
paramValue
)
{
uiInfo
=
getSysUI
()
const
faviconUrl
=
'/system/ui/image/'
+
uiInfo
[
'ui.favicon'
].
paramValue
if
(
uiInfo
[
'ui.favicon'
]
&&
uiInfo
[
'ui.favicon'
].
paramValue
)
{
changeFavicon
(
faviconUrl
)
const
faviconUrl
=
}
'/system/ui/image/'
+
uiInfo
[
'ui.favicon'
].
paramValue
callBack
()
changeFavicon
(
faviconUrl
)
}).
catch
(
err
=>
{
}
document
.
title
=
getPageTitle
()
callBack
()
console
.
error
(
err
)
})
callBack
()
.
catch
((
err
)
=>
{
})
document
.
title
=
getPageTitle
()
console
.
error
(
err
)
callBack
()
})
}
else
{
}
else
{
document
.
title
=
getPageTitle
()
document
.
title
=
getPageTitle
()
if
(
!!
uiInfo
&&
uiInfo
[
'ui.favicon'
]
&&
uiInfo
[
'ui.favicon'
].
paramValue
)
{
if
(
!!
uiInfo
&&
uiInfo
[
'ui.favicon'
]
&&
uiInfo
[
'ui.favicon'
].
paramValue
)
{
...
@@ -55,120 +57,97 @@ const routeBefore = (callBack) => {
...
@@ -55,120 +57,97 @@ const routeBefore = (callBack) => {
callBack
()
callBack
()
}
}
}
}
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
routeBefore
(()
=>
{
routeBefore
(()
=>
{
// start progress bar
// start progress bar
NProgress
.
start
()
NProgress
.
start
()
const
mobileIgnores
=
[
'/delink'
,
'/de-auto-login'
]
const
mobileIgnores
=
[
'/delink'
,
'/de-auto-login'
]
const
mobilePreview
=
'/preview/'
const
mobilePreview
=
'/preview/'
const
hasToken
=
getToken
()
const
hasToken
=
getToken
()
if
(
if
(
isMobile
()
&&
!
to
.
path
.
includes
(
mobilePreview
)
&&
mobileIgnores
.
indexOf
(
to
.
path
)
===
-
1
)
{
isMobile
()
&&
let
urlSuffix
=
'/app.html'
!
to
.
path
.
includes
(
mobilePreview
)
&&
if
(
hasToken
)
{
mobileIgnores
.
indexOf
(
to
.
path
)
===
-
1
urlSuffix
+=
(
'?detoken='
+
hasToken
)
)
{
let
urlSuffix
=
'/app.html'
if
(
hasToken
)
{
urlSuffix
+=
'?detoken='
+
hasToken
}
localStorage
.
removeItem
(
'user-info'
)
localStorage
.
removeItem
(
'userId'
)
localStorage
.
removeItem
(
'Authorization'
)
window
.
location
.
href
=
window
.
origin
+
urlSuffix
NProgress
.
done
()
}
}
localStorage
.
removeItem
(
'user-info'
)
localStorage
.
removeItem
(
'userId'
)
localStorage
.
removeItem
(
'Authorization'
)
window
.
location
.
href
=
window
.
origin
+
urlSuffix
NProgress
.
done
()
}
// set page title
// set page title
document
.
title
=
getPageTitle
(
to
.
meta
.
title
)
document
.
title
=
getPageTitle
(
to
.
meta
.
title
)
// determine whether the user has logged in
// determine whether the user has logged in
if
(
hasToken
)
{
if
(
to
.
path
===
'/login'
)
{
if
(
hasToken
)
{
// if is logged in, redirect to the home page
if
(
to
.
path
===
'/login'
)
{
next
({
// if is logged in, redirect to the home page
path
:
'/'
next
({
})
path
:
'/'
NProgress
.
done
()
})
NProgress
.
done
()
}
else
{
const
hasGetUserInfo
=
store
.
getters
.
name
if
(
hasGetUserInfo
||
to
.
path
.
indexOf
(
'/previewScreenShot/'
)
>
-
1
||
to
.
path
.
indexOf
(
'/preview/'
)
>
-
1
||
to
.
path
.
indexOf
(
'/delink'
)
>
-
1
||
to
.
path
.
indexOf
(
'/nolic'
)
>
-
1
)
{
next
()
store
.
dispatch
(
'permission/setCurrentPath'
,
to
.
path
)
let
route
=
store
.
getters
.
permission_routes
.
find
(
item
=>
item
.
path
===
'/'
+
to
.
path
.
split
(
'/'
)[
1
]
)
// 如果找不到这个路由,说明是首页
if
(
!
route
)
{
route
=
store
.
getters
.
permission_routes
.
find
(
item
=>
item
.
path
===
'/'
)
}
store
.
commit
(
'permission/SET_CURRENT_ROUTES'
,
route
)
if
([
'system'
].
includes
(
route
.
name
))
{
store
.
dispatch
(
'app/toggleSideBarHide'
,
false
)
}
}
else
{
}
else
{
const
hasGetUserInfo
=
store
.
getters
.
name
if
(
store
.
getters
.
roles
.
length
===
0
)
{
// 判断当前用户是否已拉取完user_info信息
if
(
// get user info
hasGetUserInfo
||
store
.
dispatch
(
'user/getInfo'
).
then
(()
=>
{
to
.
path
.
indexOf
(
'/previewScreenShot/'
)
>
-
1
||
const
deWebsocket
=
getSocket
()
to
.
path
.
indexOf
(
'/preview/'
)
>
-
1
||
deWebsocket
&&
deWebsocket
.
reconnect
&&
deWebsocket
.
reconnect
()
to
.
path
.
indexOf
(
'/delink'
)
>
-
1
||
store
.
dispatch
(
'lic/getLicInfo'
).
then
(()
=>
{
to
.
path
.
indexOf
(
'/nolic'
)
>
-
1
loadMenus
(
next
,
to
)
)
{
}).
catch
(()
=>
{
next
(
)
loadMenus
(
next
,
to
)
store
.
dispatch
(
'permission/setCurrentPath'
,
to
.
path
)
}
)
let
route
=
store
.
getters
.
permission_routes
.
find
(
}).
catch
(()
=>
{
(
item
)
=>
item
.
path
===
'/'
+
to
.
path
.
split
(
'/'
)[
1
]
store
.
dispatch
(
'user/logout'
).
then
(()
=>
{
)
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
// 如果找不到这个路由,说明是首页
})
if
(
!
route
)
{
})
route
=
store
.
getters
.
permission_routes
.
find
(
}
else
if
(
store
.
getters
.
loadMenus
)
{
(
item
)
=>
item
.
path
===
'/'
// 修改成false,防止死循环
)
store
.
dispatch
(
'user/updateLoadMenus'
)
}
store
.
dispatch
(
'lic/getLicInfo'
).
then
(()
=>
{
store
.
commit
(
'permission/SET_CURRENT_ROUTES'
,
route
)
loadMenus
(
next
,
to
)
if
([
'system'
].
includes
(
route
.
name
))
{
}).
catch
(()
=>
{
store
.
dispatch
(
'app/toggleSideBarHide'
,
false
)
loadMenus
(
next
,
to
)
}
}
)
}
else
{
}
else
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
next
()
// 判断当前用户是否已拉取完user_info信息
// get user info
store
.
dispatch
(
'user/getInfo'
)
.
then
(()
=>
{
const
deWebsocket
=
getSocket
()
deWebsocket
&&
deWebsocket
.
reconnect
&&
deWebsocket
.
reconnect
()
store
.
dispatch
(
'lic/getLicInfo'
)
.
then
(()
=>
{
loadMenus
(
next
,
to
)
})
.
catch
(()
=>
{
loadMenus
(
next
,
to
)
})
})
.
catch
(()
=>
{
store
.
dispatch
(
'user/logout'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
})
}
else
if
(
store
.
getters
.
loadMenus
)
{
// 修改成false,防止死循环
store
.
dispatch
(
'user/updateLoadMenus'
)
store
.
dispatch
(
'lic/getLicInfo'
)
.
then
(()
=>
{
loadMenus
(
next
,
to
)
})
.
catch
(()
=>
{
loadMenus
(
next
,
to
)
})
}
else
{
next
()
}
}
}
}
}
}
else
{
}
/* has no token*/
}
else
{
/* has no token*/
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
// in the free login whitelist, go directly
// in the free login whitelist, go directly
next
()
next
()
}
else
{
}
else
{
// other pages that do not have permission to access are redirected to the login page.
// other pages that do not have permission to access are redirected to the login page.
next
(
`/login?redirect=
${
to
.
fullPath
}
`
)
next
(
`/login?redirect=
${
to
.
fullPath
}
`
)
NProgress
.
done
()
NProgress
.
done
()
}
}
}
}
)
}
)
})
)
export
const
loadMenus
=
(
next
,
to
)
=>
{
export
const
loadMenus
=
(
next
,
to
)
=>
{
buildMenus
().
then
(
(
res
)
=>
{
buildMenus
().
then
(
res
=>
{
const
data
=
res
.
data
const
data
=
res
.
data
const
filterData
=
filterRouter
(
data
)
const
filterData
=
filterRouter
(
data
)
const
asyncRouter
=
filterAsyncRouter
(
filterData
)
const
asyncRouter
=
filterAsyncRouter
(
filterData
)
...
@@ -194,8 +173,7 @@ export const loadMenus = (next, to) => {
...
@@ -194,8 +173,7 @@ export const loadMenus = (next, to) => {
redirect
:
'/404'
,
redirect
:
'/404'
,
hidden
:
true
hidden
:
true
})
})
store
.
dispatch
(
'permission/GenerateRoutes'
,
asyncRouter
).
then
(()
=>
{
store
.
dispatch
(
'permission/GenerateRoutes'
,
asyncRouter
).
then
(()
=>
{
// 存储路由
// 存储路由
router
.
addRoutes
(
asyncRouter
)
router
.
addRoutes
(
asyncRouter
)
if
(
pathValid
(
to
.
path
,
asyncRouter
))
{
if
(
pathValid
(
to
.
path
,
asyncRouter
))
{
next
({
next
({
...
@@ -234,9 +212,9 @@ const pathValid = (path, routers) => {
...
@@ -234,9 +212,9 @@ const pathValid = (path, routers) => {
const
hasCurrentRouter
=
(
locations
,
routers
,
index
)
=>
{
const
hasCurrentRouter
=
(
locations
,
routers
,
index
)
=>
{
const
location
=
locations
[
index
]
const
location
=
locations
[
index
]
let
kids
=
[]
let
kids
=
[]
const
isvalid
=
routers
.
some
(
(
router
)
=>
{
const
isvalid
=
routers
.
some
(
router
=>
{
kids
=
router
.
children
kids
=
router
.
children
return
router
.
path
===
location
||
'/'
+
location
===
router
.
path
return
(
router
.
path
===
location
||
(
'/'
+
location
)
===
router
.
path
)
})
})
if
(
isvalid
&&
index
<
locations
.
length
-
1
)
{
if
(
isvalid
&&
index
<
locations
.
length
-
1
)
{
return
hasCurrentRouter
(
locations
,
kids
,
index
+
1
)
return
hasCurrentRouter
(
locations
,
kids
,
index
+
1
)
...
@@ -244,16 +222,14 @@ const hasCurrentRouter = (locations, routers, index) => {
...
@@ -244,16 +222,14 @@ const hasCurrentRouter = (locations, routers, index) => {
return
isvalid
return
isvalid
}
}
// 根据权限过滤菜单
// 根据权限过滤菜单
const
filterRouter
=
(
routers
)
=>
{
const
filterRouter
=
routers
=>
{
const
user_permissions
=
store
.
getters
.
permissions
const
user_permissions
=
store
.
getters
.
permissions
// if (!user_permissions || user_permissions.length === 0) {
// if (!user_permissions || user_permissions.length === 0) {
// return routers
// return routers
// }
// }
const
tempResults
=
routers
.
filter
((
router
)
=>
const
tempResults
=
routers
.
filter
(
router
=>
hasPermission
(
router
,
user_permissions
))
hasPermission
(
router
,
user_permissions
)
)
// 如果是一级菜单(目录) 没有字菜单 那就移除
// 如果是一级菜单(目录) 没有字菜单 那就移除
return
tempResults
.
filter
(
(
item
)
=>
{
return
tempResults
.
filter
(
item
=>
{
if
(
item
.
type
===
0
&&
(
!
item
.
children
||
item
.
children
.
length
===
0
))
{
if
(
item
.
type
===
0
&&
(
!
item
.
children
||
item
.
children
.
length
===
0
))
{
return
false
return
false
}
}
...
@@ -264,16 +240,13 @@ const hasPermission = (router, user_permissions) => {
...
@@ -264,16 +240,13 @@ const hasPermission = (router, user_permissions) => {
// 判断是否有符合权限 eg. user:read,user:delete
// 判断是否有符合权限 eg. user:read,user:delete
if
(
router
.
permission
&&
router
.
permission
.
indexOf
(
','
)
>
-
1
)
{
if
(
router
.
permission
&&
router
.
permission
.
indexOf
(
','
)
>
-
1
)
{
const
permissions
=
router
.
permission
.
split
(
','
)
const
permissions
=
router
.
permission
.
split
(
','
)
const
permissionsFilter
=
permissions
.
filter
(
(
permission
)
=>
{
const
permissionsFilter
=
permissions
.
filter
(
permission
=>
{
return
user_permissions
.
includes
(
permission
)
return
user_permissions
.
includes
(
permission
)
})
})
if
(
!
permissionsFilter
||
permissionsFilter
.
length
===
0
)
{
if
(
!
permissionsFilter
||
permissionsFilter
.
length
===
0
)
{
return
false
return
false
}
}
}
else
if
(
}
else
if
(
router
.
permission
&&
!
user_permissions
.
includes
(
router
.
permission
))
{
router
.
permission
&&
!
user_permissions
.
includes
(
router
.
permission
)
)
{
// 菜单要求权限 但是当前用户权限没有包含菜单权限
// 菜单要求权限 但是当前用户权限没有包含菜单权限
return
false
return
false
}
}
...
@@ -283,9 +256,7 @@ const hasPermission = (router, user_permissions) => {
...
@@ -283,9 +256,7 @@ const hasPermission = (router, user_permissions) => {
}
}
// 如果有字菜单 则 判断是否满足 ‘任意一个子菜单有权限’
// 如果有字菜单 则 判断是否满足 ‘任意一个子菜单有权限’
if
(
router
.
children
&&
router
.
children
.
length
)
{
if
(
router
.
children
&&
router
.
children
.
length
)
{
const
permissionChildren
=
router
.
children
.
filter
((
item
)
=>
const
permissionChildren
=
router
.
children
.
filter
(
item
=>
hasPermission
(
item
,
user_permissions
))
hasPermission
(
item
,
user_permissions
)
)
router
.
children
=
permissionChildren
router
.
children
=
permissionChildren
return
router
.
children
.
length
>
0
return
router
.
children
.
length
>
0
}
}
...
...
src/views/chart/components/ChartComponent.vue
查看文件 @
9e5cf430
...
@@ -481,9 +481,11 @@ export default {
...
@@ -481,9 +481,11 @@ export default {
trackClick
(
trackAction
)
{
trackClick
(
trackAction
)
{
const
param
=
this
.
pointParam
const
param
=
this
.
pointParam
if
(
!
param
||
!
param
.
data
||
!
param
.
data
.
dimensionList
)
{
if
(
!
param
||
!
param
.
data
||
!
param
.
data
.
dimensionList
)
{
// 地图提示没有关联字段 其他没有维度信息的 直接返回
if
(
this
.
chart
.
type
===
'map'
)
{
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
return
}
}
...
...
src/views/chart/components/componentStyle/dialog/RemarkEditor.vue
查看文件 @
9e5cf430
...
@@ -14,6 +14,22 @@
...
@@ -14,6 +14,22 @@
<
script
>
<
script
>
import
tinymce
from
'tinymce/tinymce'
// tinymce默认hidden,不引入不显示
import
tinymce
from
'tinymce/tinymce'
// tinymce默认hidden,不引入不显示
import
Editor
from
'@tinymce/tinymce-vue'
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
{
imgUrlTrans
}
from
'@/components/canvas/utils/utils'
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
// 编辑器引入
// 编辑器引入
...
...
src/views/login/index.vue
查看文件 @
9e5cf430
...
@@ -216,6 +216,7 @@ import { changeFavicon, showMultiLoginMsg } from '@/utils/index'
...
@@ -216,6 +216,7 @@ import { changeFavicon, showMultiLoginMsg } from '@/utils/index'
import
{
initTheme
}
from
'@/utils/ThemeUtil'
import
{
initTheme
}
from
'@/utils/ThemeUtil'
import
PluginCom
from
'@/views/system/plugin/PluginCom'
import
PluginCom
from
'@/views/system/plugin/PluginCom'
import
Cookies
from
'js-cookie'
import
Cookies
from
'js-cookie'
import
xss
from
'xss'
export
default
{
export
default
{
name
:
'Login'
,
name
:
'Login'
,
components
:
{
PluginCom
},
components
:
{
PluginCom
},
...
@@ -449,7 +450,27 @@ export default {
...
@@ -449,7 +450,27 @@ export default {
this
.
showFoot
=
this
.
uiInfo
[
'ui.showFoot'
].
paramValue
===
true
||
this
.
uiInfo
[
'ui.showFoot'
].
paramValue
===
'true'
this
.
showFoot
=
this
.
uiInfo
[
'ui.showFoot'
].
paramValue
===
true
||
this
.
uiInfo
[
'ui.showFoot'
].
paramValue
===
'true'
if
(
this
.
showFoot
)
{
if
(
this
.
showFoot
)
{
const
content
=
this
.
uiInfo
[
'ui.footContent'
]
&&
this
.
uiInfo
[
'ui.footContent'
].
paramValue
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
)
}
}
}
}
},
},
...
...
src/views/panel/filter/FilterDialog.vue
查看文件 @
9e5cf430
...
@@ -266,6 +266,7 @@
...
@@ -266,6 +266,7 @@
<div
v-if=
"currentElement.options && currentElement.options.attrs"
>
<div
v-if=
"currentElement.options && currentElement.options.attrs"
>
<filter-head
<filter-head
:element=
"currentElement"
:element=
"currentElement"
@
dataset-name=
"dataSetName"
/>
/>
<filter-control
<filter-control
...
@@ -463,6 +464,23 @@ export default {
...
@@ -463,6 +464,23 @@ export default {
bus
.
$off
(
'valid-values-change'
,
this
.
validateFilterValue
)
bus
.
$off
(
'valid-values-change'
,
this
.
validateFilterValue
)
},
},
methods
:
{
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
)
{
async
checkSuperior
(
list
,
anotherTableIds
)
{
let
fieldValid
=
false
let
fieldValid
=
false
const
fieldId
=
this
.
myAttrs
?.
fieldId
const
fieldId
=
this
.
myAttrs
?.
fieldId
...
...
src/views/panel/filter/filterMain/FilterHead.vue
查看文件 @
9e5cf430
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
:key=
"item.id"
:key=
"item.id"
:item=
"item"
:item=
"item"
:index=
"index"
:index=
"index"
:tool-tip=
"getTableName(item.tableId)"
@
closeItem=
"closeItem"
@
closeItem=
"closeItem"
/>
/>
...
@@ -70,7 +71,12 @@ export default {
...
@@ -70,7 +71,12 @@ export default {
},
},
methods
:
{
methods
:
{
getTableName
(
tableId
)
{
let
tableName
=
null
this
.
$emit
(
'dataset-name'
,
tableId
,
t
=>
{
tableName
=
t
})
console
.
log
(
tableName
)
return
tableName
},
onMove
(
e
,
originalEvent
)
{
onMove
(
e
,
originalEvent
)
{
return
true
return
true
},
},
...
...
src/views/panel/list/PanelViewShow.vue
查看文件 @
9e5cf430
...
@@ -258,6 +258,7 @@
...
@@ -258,6 +258,7 @@
<Preview
<Preview
v-if=
"showMainFlag"
v-if=
"showMainFlag"
ref=
"paneViewPreviewRef"
ref=
"paneViewPreviewRef"
:class=
"fullscreen && 'fullscreen-visual-selects'"
:component-data=
"mainCanvasComponentData"
:component-data=
"mainCanvasComponentData"
:canvas-style-data=
"canvasStyleData"
:canvas-style-data=
"canvasStyleData"
:active-tab=
"activeTab"
:active-tab=
"activeTab"
...
@@ -932,5 +933,12 @@ export default {
...
@@ -932,5 +933,12 @@ export default {
color
:
inherit
;
color
:
inherit
;
margin-right
:
5px
;
margin-right
:
5px
;
}
}
.fullscreen-visual-selects
{
.VisualSelects
{
top
:
inherit
!important
;
left
:
inherit
!important
;
}
}
</
style
>
</
style
>
vue.config.js
查看文件 @
9e5cf430
...
@@ -50,14 +50,11 @@ module.exports = {
...
@@ -50,14 +50,11 @@ module.exports = {
'@'
:
resolve
(
'src'
)
'@'
:
resolve
(
'src'
)
}
}
},
},
output
:
output
:
process
.
env
.
NODE_ENV
===
'development'
?
{}
:
{
process
.
env
.
NODE_ENV
===
'development'
filename
:
`js/[name].[contenthash:8].
${
pkg
.
version
}
.js`
,
?
{}
publicPath
:
'/'
,
:
{
chunkFilename
:
`js/[name].[contenthash:8].
${
pkg
.
version
}
.js`
filename
:
`js/[name].[contenthash:8].
${
pkg
.
version
}
.js`
,
},
publicPath
:
'/'
,
chunkFilename
:
`js/[name].[contenthash:8].
${
pkg
.
version
}
.js`
},
plugins
:
[
plugins
:
[
new
CopyWebpackPlugin
([
new
CopyWebpackPlugin
([
{
{
...
@@ -80,14 +77,15 @@ module.exports = {
...
@@ -80,14 +77,15 @@ module.exports = {
})
})
]
]
},
},
chainWebpack
:
(
config
)
=>
{
chainWebpack
:
config
=>
{
config
.
module
.
rules
.
delete
(
'svg'
)
// 删除默认配置中处理svg,
config
.
module
.
rules
.
delete
(
'svg'
)
// 删除默认配置中处理svg,
// const svgRule = config.module.rule('svg')
// const svgRule = config.module.rule('svg')
// svgRule.uses.clear()
// svgRule.uses.clear()
config
.
module
config
.
module
.
rule
(
'svg-sprite-loader'
)
.
rule
(
'svg-sprite-loader'
)
.
test
(
/
\.
svg$/
)
.
test
(
/
\.
svg$/
)
.
include
.
add
(
resolve
(
'src/icons'
))
// 处理svg目录
.
include
.
add
(
resolve
(
'src/icons'
))
// 处理svg目录
.
end
()
.
end
()
.
use
(
'svg-sprite-loader'
)
.
use
(
'svg-sprite-loader'
)
.
loader
(
'svg-sprite-loader'
)
.
loader
(
'svg-sprite-loader'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论