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
4070323a
Commit
4070323a
authored
Jul 14, 2023
by
Tippi.Rao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://47.108.78.218:28999/frontend/yqlh-dataEase
into feature/Tippi
parents
7a473e66
b07786d0
显示空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
310 行增加
和
306 行删除
+310
-306
src/components/asyncComponent/index.vue
+8
-1
src/components/canvas/components/editor/EditBar.vue
+4
-4
src/components/canvas/components/editor/LinkageField.vue
+3
-7
src/components/canvas/utils/utils.js
+4
-1
src/lang/zh.js
+1
-1
src/router/index.js
+49
-53
src/utils/index.js
+195
-220
src/views/chart/components/dragItem/QuotaExtItem.vue
+1
-1
src/views/chart/components/filter/QuotaFilterEditor.vue
+7
-0
src/views/chart/components/filter/ResultFilterEditor.vue
+14
-0
src/views/chart/view/ChartEdit.vue
+6
-3
src/views/chart/view/PositionAdjust.vue
+1
-1
src/views/chart/view/TitleRemark.vue
+1
-1
src/views/dataset/common/DatasetChartDetail.vue
+2
-2
src/views/dataset/data/components/LazyTree.vue
+1
-1
src/views/dataset/group/GroupMoveSelector.vue
+1
-1
src/views/login/index.vue
+1
-1
src/views/panel/export/PDFPreExport.vue
+1
-1
src/views/panel/list/PanelList.vue
+5
-2
src/views/system/user/index.vue
+1
-1
src/views/wizard/WizardCard.vue
+1
-1
src/views/wizard/WizardCardEnterprise.vue
+1
-1
src/views/wizard/details/CardDetail.vue
+1
-1
src/views/wizard/details/LatestDevelopments.vue
+1
-1
没有找到文件。
src/components/asyncComponent/index.vue
查看文件 @
4070323a
...
...
@@ -3,6 +3,8 @@
:is=
"mode"
:ref=
"refId"
:obj=
"obj"
:bus=
"bus"
:axios-request=
"request"
v-bind=
"$attrs"
v-on=
"$listeners"
/>
...
...
@@ -11,6 +13,9 @@
<
script
>
import
{
uuid
}
from
'vue-uuid'
import
{
get
}
from
'@/api/system/dynamic'
import
bus
from
'@/utils/bus'
import
request
from
'@/utils/request'
export
default
{
name
:
'AsyncComponent'
,
inheritAttrs
:
true
,
...
...
@@ -29,7 +34,9 @@ export default {
return
{
resData
:
''
,
mode
:
''
,
refId
:
null
refId
:
null
,
bus
:
bus
,
request
:
request
}
},
watch
:
{
...
...
src/components/canvas/components/editor/EditBar.vue
查看文件 @
4070323a
...
...
@@ -82,10 +82,10 @@
/>
</span>
<span
:title=
"$t('route.exportExcel')"
>
<
svg-icon
<
i
v-if=
"exportExcelShow"
style=
"
color: white
"
icon-class=
"file-excel
"
style=
"
line-height: 24px
"
class=
"el-icon-document-delete
"
@
click
.
stop=
"exportExcelDownload()"
/>
</span>
...
...
@@ -469,7 +469,7 @@ export default {
this
.
$emit
(
'showViewDetails'
,
{
openType
:
openType
})
},
exportExcelDownload
()
{
exportExcelDownload
(
this
.
chart
,
null
,
null
,
null
,
null
,
null
)
exportExcelDownload
(
this
.
chart
)
},
auxiliaryMatrixChange
()
{
if
(
this
.
curComponent
.
auxiliaryMatrix
)
{
...
...
src/components/canvas/components/editor/LinkageField.vue
查看文件 @
4070323a
...
...
@@ -171,24 +171,20 @@ export default {
return
this
.
targetLinkageInfo
[
this
.
curLinkageView
.
propValue
.
viewId
]
},
...
mapState
([
'menuTop'
,
'menuLeft'
,
'menuShow'
,
'curComponent'
,
'componentData'
,
'canvasStyleData'
,
'linkageSettingStatus'
,
'targetLinkageInfo'
,
'curLinkageView'
])
},
mounted
()
{
const
_this
=
this
// 初始化映射关系 如果当前是相同的数据集且没有关联关系,则自动补充映射关系
checkSameDataSet
(
this
.
curLinkageView
.
propValue
.
viewId
,
this
.
element
.
propValue
.
viewId
).
then
(
res
=>
{
if
(
res
.
data
===
'YES'
&&
this
.
linkageInfo
.
linkageFields
.
length
===
0
)
{
this
.
sourceLinkageInfo
.
targetViewFields
.
forEach
(
item
=>
{
_this
.
$nextTick
(()
=>
{
this
.
addLinkageField
(
item
.
id
,
item
.
id
)
})
})
}
})
},
...
...
src/components/canvas/utils/utils.js
查看文件 @
4070323a
...
...
@@ -429,7 +429,10 @@ export function getCacheTree(treeName) {
}
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
}
const
fields
=
JSON
.
parse
(
JSON
.
stringify
(
chart
.
data
.
fields
))
...
...
src/lang/zh.js
查看文件 @
4070323a
...
...
@@ -1938,7 +1938,7 @@ export default {
jsonpath_info
:
'请填入JsonPath'
,
req_param
:
'请求参数'
,
headers
:
'请求头'
,
query_param
:
"QUERY
參數
"
,
query_param
:
"QUERY
参数
"
,
query_info
:
"地址栏中跟在?后面的参数,如: updateapi?id=112"
,
key
:
'键'
,
value
:
'值'
,
...
...
src/router/index.js
查看文件 @
4070323a
import
Vue
from
"vue"
;
import
Router
from
"vue-router"
;
import
Vue
from
'vue'
import
Router
from
'vue-router'
Vue
.
use
(
Router
)
;
Vue
.
use
(
Router
)
/* Layout */
import
Layout
from
"@/layout"
;
import
Layout
from
'@/layout'
/**
* Note: sub-menu only appear when route children.length >= 1
...
...
@@ -32,74 +32,71 @@ import Layout from "@/layout";
*/
export
const
constantRoutes
=
[
{
path
:
"/redirect"
,
path
:
'/redirect'
,
component
:
Layout
,
hidden
:
true
,
children
:
[
{
path
:
"/redirect/:path(.*)"
,
component
:
()
=>
import
(
"@/views/redirect/index"
),
}
,
]
,
path
:
'/redirect/:path(.*)'
,
component
:
()
=>
import
(
'@/views/redirect/index'
)
}
]
},
{
path
:
"/login"
,
component
:
()
=>
import
(
"@/views/login/index"
),
hidden
:
true
,
path
:
'/login'
,
component
:
()
=>
import
(
'@/views/login/index'
),
hidden
:
true
},
{
path
:
"/404"
,
component
:
()
=>
import
(
"@/views/404"
),
hidden
:
true
,
path
:
'/404'
,
component
:
()
=>
import
(
'@/views/404'
),
hidden
:
true
},
{
path
:
"/401"
,
component
:
(
resolve
)
=>
require
([
"@/views/401"
],
resolve
),
hidden
:
true
,
path
:
'/401'
,
component
:
(
resolve
)
=>
require
([
'@/views/401'
],
resolve
),
hidden
:
true
},
{
path
:
"/panelEdit"
,
path
:
'/panelEdit'
,
component
:
Layout
,
redirect
:
"/panelEdit/edit"
,
redirect
:
'/panelEdit/edit'
,
hidden
:
true
,
children
:
[
{
path
:
"edit"
,
component
:
()
=>
import
(
"@/views/panel/edit"
),
}
,
]
,
path
:
'edit'
,
component
:
()
=>
import
(
'@/views/panel/edit'
)
}
]
},
{
path
:
"/delink"
,
component
:
()
=>
import
(
"@/views/link"
),
hidden
:
true
,
path
:
'/delink'
,
component
:
()
=>
import
(
'@/views/link'
),
hidden
:
true
},
{
path
:
"/preview/:reportId"
,
component
:
()
=>
import
(
"@/components/canvas/components/editor/PreviewEject"
),
hidden
:
true
,
path
:
'/preview/:reportId'
,
component
:
()
=>
import
(
'@/components/canvas/components/editor/PreviewEject'
),
hidden
:
true
},
{
path
:
"/previewScreenShot/:reportId/:backScreenShot"
,
component
:
()
=>
import
(
"@/components/canvas/components/editor/PreviewEject"
),
hidden
:
true
,
path
:
'/previewScreenShot/:reportId/:backScreenShot'
,
component
:
()
=>
import
(
'@/components/canvas/components/editor/PreviewEject'
),
hidden
:
true
},
{
path
:
"/previewFullScreen"
,
component
:
()
=>
import
(
"@/components/canvas/components/editor/PreviewFullScreen"
),
hidden
:
true
,
path
:
'/previewFullScreen'
,
component
:
()
=>
import
(
'@/components/canvas/components/editor/PreviewFullScreen'
),
hidden
:
true
},
{
path
:
"/de-auto-login"
,
component
:
()
=>
import
(
"@/views/DeAutoLogin"
),
hidden
:
true
,
}
,
path
:
'/de-auto-login'
,
component
:
()
=>
import
(
'@/views/DeAutoLogin'
),
hidden
:
true
}
// {
// path: '/',
...
...
@@ -217,22 +214,21 @@ export const constantRoutes = [
// },
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]
;
]
const
createRouter
=
()
=>
new
Router
({
const
createRouter
=
()
=>
new
Router
({
// mode: 'history', // require service support
mode
:
"hash"
,
mode
:
'hash'
,
scrollBehavior
:
()
=>
({
y
:
0
}),
routes
:
[],
});
routes
:
constantRoutes
})
const
router
=
createRouter
()
;
const
router
=
createRouter
()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export
function
resetRouter
()
{
const
newRouter
=
createRouter
()
;
router
.
matcher
=
newRouter
.
matcher
;
// reset router
const
newRouter
=
createRouter
()
router
.
matcher
=
newRouter
.
matcher
// reset router
}
export
default
router
;
export
default
router
src/utils/index.js
查看文件 @
4070323a
import
Cookies
from
"js-cookie"
;
import
i18n
from
"@/lang"
;
import
{
$error
,
$confirm
}
from
"@/utils/message"
;
import
{
seizeLogin
}
from
"@/api/user"
;
import
router
from
"@/router"
;
import
store
from
"@/store"
;
import
{
Loading
}
from
"element-ui"
;
export
function
timeSection
(
date
,
type
,
labelFormat
=
"yyyy-MM-dd"
)
{
import
Cookies
from
'js-cookie'
import
i18n
from
'@/lang'
import
{
$error
,
$confirm
}
from
'@/utils/message'
import
{
seizeLogin
}
from
'@/api/user'
import
router
from
'@/router'
import
store
from
'@/store'
import
{
Loading
}
from
'element-ui'
export
function
timeSection
(
date
,
type
,
labelFormat
=
'yyyy-MM-dd'
)
{
if
(
!
date
)
{
return
null
;
return
null
}
if
(
!
(
date
instanceof
Date
))
{
date
=
new
Date
(
date
)
;
date
=
new
Date
(
date
)
}
const
timeRanger
=
new
Array
(
2
)
;
const
timeRanger
=
new
Array
(
2
)
const
formatArr
=
labelFormat
?
labelFormat
.
split
(
" "
)
:
[];
const
methods
=
[
"setHours"
,
"setMinutes"
,
"setSeconds"
,
"setMilliseconds"
];
let
methodsLen
=
methods
.
length
;
if
(
type
===
"datetime"
&&
formatArr
.
length
>
1
)
{
const
childArr
=
formatArr
[
1
]
?
formatArr
[
1
].
split
(
":"
)
:
[];
const
childArrLength
=
childArr
?
childArr
.
length
:
0
;
const
formatArr
=
labelFormat
?
labelFormat
.
split
(
' '
)
:
[]
const
methods
=
[
'setHours'
,
'setMinutes'
,
'setSeconds'
,
'setMilliseconds'
]
let
methodsLen
=
methods
.
length
if
(
type
===
'datetime'
&&
formatArr
.
length
>
1
)
{
const
childArr
=
formatArr
[
1
]
?
formatArr
[
1
].
split
(
':'
)
:
[]
const
childArrLength
=
childArr
?
childArr
.
length
:
0
while
(
--
methodsLen
>=
childArrLength
)
{
date
[
methods
[
methodsLen
]](
0
)
;
date
[
methods
[
methodsLen
]](
0
)
}
}
else
{
methods
.
forEach
(
(
m
)
=>
date
[
m
](
0
));
methods
.
forEach
(
m
=>
date
[
m
](
0
))
}
const
end
=
new
Date
(
date
)
;
if
(
type
===
"year"
)
{
date
.
setDate
(
1
)
;
date
.
setMonth
(
0
)
;
end
.
setFullYear
(
date
.
getFullYear
()
+
1
)
;
timeRanger
[
1
]
=
end
.
getTime
()
-
1
;
}
if
(
type
===
"month"
)
{
date
.
setDate
(
1
)
;
const
currentMonth
=
date
.
getMonth
()
;
const
end
=
new
Date
(
date
)
if
(
type
===
'year'
)
{
date
.
setDate
(
1
)
date
.
setMonth
(
0
)
end
.
setFullYear
(
date
.
getFullYear
()
+
1
)
timeRanger
[
1
]
=
end
.
getTime
()
-
1
}
if
(
type
===
'month'
)
{
date
.
setDate
(
1
)
const
currentMonth
=
date
.
getMonth
()
if
(
currentMonth
===
11
)
{
end
.
setFullYear
(
date
.
getFullYear
()
+
1
)
;
end
.
setMonth
(
0
)
;
end
.
setFullYear
(
date
.
getFullYear
()
+
1
)
end
.
setMonth
(
0
)
}
else
{
end
.
setMonth
(
date
.
getMonth
()
+
1
)
;
end
.
setMonth
(
date
.
getMonth
()
+
1
)
}
timeRanger
[
1
]
=
end
.
getTime
()
-
1
;
timeRanger
[
1
]
=
end
.
getTime
()
-
1
}
if
(
type
===
"date"
)
{
end
.
setHours
(
23
)
;
end
.
setMinutes
(
59
)
;
end
.
setSeconds
(
59
)
;
end
.
setMilliseconds
(
999
)
;
timeRanger
[
1
]
=
end
.
getTime
()
;
if
(
type
===
'date'
)
{
end
.
setHours
(
23
)
end
.
setMinutes
(
59
)
end
.
setSeconds
(
59
)
end
.
setMilliseconds
(
999
)
timeRanger
[
1
]
=
end
.
getTime
()
}
if
(
type
===
"datetime"
)
{
methodsLen
=
methods
.
length
;
if
(
type
===
'datetime'
)
{
methodsLen
=
methods
.
length
if
(
formatArr
.
length
>
1
)
{
const
childArr
=
formatArr
[
1
]
?
formatArr
[
1
].
split
(
":"
)
:
[];
const
childArrLength
=
childArr
?
childArr
.
length
:
0
;
const
childArr
=
formatArr
[
1
]
?
formatArr
[
1
].
split
(
':'
)
:
[]
const
childArrLength
=
childArr
?
childArr
.
length
:
0
while
(
--
methodsLen
>=
childArrLength
)
{
end
[
methods
[
methodsLen
]](
methodsLen
===
0
?
23
:
methodsLen
===
3
?
999
:
59
);
end
[
methods
[
methodsLen
]](
methodsLen
===
0
?
23
:
methodsLen
===
3
?
999
:
59
)
}
}
else
{
while
(
--
methodsLen
>=
0
)
{
end
[
methods
[
methodsLen
]](
methodsLen
===
0
?
23
:
methodsLen
===
3
?
999
:
59
);
end
[
methods
[
methodsLen
]](
methodsLen
===
0
?
23
:
methodsLen
===
3
?
999
:
59
)
}
}
timeRanger
[
1
]
=
end
.
getTime
()
;
timeRanger
[
1
]
=
end
.
getTime
()
}
timeRanger
[
0
]
=
date
.
getTime
()
;
timeRanger
[
0
]
=
date
.
getTime
()
return
timeRanger
;
return
timeRanger
}
export
function
dateFormat
(
date
,
fmt
)
{
let
ret
;
let
ret
const
opt
=
{
"y+"
:
date
.
getFullYear
().
toString
(),
// 年
"M+"
:
(
date
.
getMonth
()
+
1
).
toString
(),
// 月
"d+"
:
date
.
getDate
().
toString
(),
// 日
"H+"
:
date
.
getHours
().
toString
(),
// 时
"m+"
:
date
.
getMinutes
().
toString
(),
// 分
"s+"
:
date
.
getSeconds
().
toString
(),
// 秒
'y+'
:
date
.
getFullYear
().
toString
(),
// 年
'M+'
:
(
date
.
getMonth
()
+
1
).
toString
(),
// 月
'd+'
:
date
.
getDate
().
toString
(),
// 日
'H+'
:
date
.
getHours
().
toString
(),
// 时
'm+'
:
date
.
getMinutes
().
toString
(),
// 分
's+'
:
date
.
getSeconds
().
toString
()
// 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
}
;
}
for
(
const
k
in
opt
)
{
ret
=
new
RegExp
(
"("
+
k
+
")"
).
exec
(
fmt
);
ret
=
new
RegExp
(
'('
+
k
+
')'
).
exec
(
fmt
)
if
(
ret
)
{
fmt
=
fmt
.
replace
(
ret
[
1
],
ret
[
1
].
length
===
1
?
opt
[
k
]
:
opt
[
k
].
padStart
(
ret
[
1
].
length
,
"0"
)
);
fmt
=
fmt
.
replace
(
ret
[
1
],
(
ret
[
1
].
length
===
1
)
?
(
opt
[
k
])
:
(
opt
[
k
].
padStart
(
ret
[
1
].
length
,
'0'
)))
}
}
return
fmt
;
return
fmt
}
/**
...
...
@@ -110,20 +103,20 @@ export function dateFormat(date, fmt) {
*/
export
function
parseTime
(
time
,
cFormat
)
{
if
(
arguments
.
length
===
0
)
{
return
null
;
return
null
}
const
format
=
cFormat
||
"{y}-{m}-{d} {h}:{i}:{s}"
;
let
date
;
if
(
typeof
time
===
"object"
)
{
date
=
time
;
const
format
=
cFormat
||
'{y}-{m}-{d} {h}:{i}:{s}'
let
date
if
(
typeof
time
===
'object'
)
{
date
=
time
}
else
{
if
(
typeof
time
===
"string"
&&
/^
[
0-9
]
+$/
.
test
(
time
))
{
time
=
parseInt
(
time
)
;
if
(
(
typeof
time
===
'string'
)
&&
(
/^
[
0-9
]
+$/
.
test
(
time
)
))
{
time
=
parseInt
(
time
)
}
if
(
typeof
time
===
"number"
&&
time
.
toString
().
length
===
10
)
{
time
=
time
*
1000
;
if
(
(
typeof
time
===
'number'
)
&&
(
time
.
toString
().
length
===
10
)
)
{
time
=
time
*
1000
}
date
=
new
Date
(
time
)
;
date
=
new
Date
(
time
)
}
const
formatObj
=
{
y
:
date
.
getFullYear
(),
...
...
@@ -132,17 +125,17 @@ export function parseTime(time, cFormat) {
h
:
date
.
getHours
(),
i
:
date
.
getMinutes
(),
s
:
date
.
getSeconds
(),
a
:
date
.
getDay
()
,
}
;
a
:
date
.
getDay
()
}
const
time_str
=
format
.
replace
(
/{
([
ymdhisa
])
+}/g
,
(
result
,
key
)
=>
{
const
value
=
formatObj
[
key
]
;
const
value
=
formatObj
[
key
]
// Note: getDay() returns 0 on Sunday
if
(
key
===
"a"
)
{
return
[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
][
value
];
if
(
key
===
'a'
)
{
return
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
][
value
]
}
return
value
.
toString
().
padStart
(
2
,
"0"
);
})
;
return
time_str
;
return
value
.
toString
().
padStart
(
2
,
'0'
)
})
return
time_str
}
/**
...
...
@@ -152,7 +145,7 @@ export function parseTime(time, cFormat) {
* @returns {boolean}
*/
export
function
hasClass
(
ele
,
cls
)
{
return
!!
ele
.
className
.
match
(
new
RegExp
(
"(
\\
s|^)"
+
cls
+
"(
\\
s|$)"
));
return
!!
ele
.
className
.
match
(
new
RegExp
(
'(
\\
s|^)'
+
cls
+
'(
\\
s|$)'
))
}
/**
...
...
@@ -161,7 +154,7 @@ export function hasClass(ele, cls) {
* @param {string} cls
*/
export
function
addClass
(
ele
,
cls
)
{
if
(
!
hasClass
(
ele
,
cls
))
ele
.
className
+=
" "
+
cls
;
if
(
!
hasClass
(
ele
,
cls
))
ele
.
className
+=
' '
+
cls
}
/**
...
...
@@ -171,8 +164,8 @@ export function addClass(ele, cls) {
*/
export
function
removeClass
(
ele
,
cls
)
{
if
(
hasClass
(
ele
,
cls
))
{
const
reg
=
new
RegExp
(
"(
\\
s|^)"
+
cls
+
"(
\\
s|$)"
);
ele
.
className
=
ele
.
className
.
replace
(
reg
,
" "
);
const
reg
=
new
RegExp
(
'(
\\
s|^)'
+
cls
+
'(
\\
s|$)'
)
ele
.
className
=
ele
.
className
.
replace
(
reg
,
' '
)
}
}
...
...
@@ -182,40 +175,40 @@ export function removeClass(ele, cls) {
* @returns {string}
*/
export
function
formatTime
(
time
,
option
)
{
if
((
""
+
time
).
length
===
10
)
{
time
=
parseInt
(
time
)
*
1000
;
if
((
''
+
time
).
length
===
10
)
{
time
=
parseInt
(
time
)
*
1000
}
else
{
time
=
+
time
;
time
=
+
time
}
const
d
=
new
Date
(
time
)
;
const
now
=
Date
.
now
()
;
const
d
=
new
Date
(
time
)
const
now
=
Date
.
now
()
const
diff
=
(
now
-
d
)
/
1000
;
const
diff
=
(
now
-
d
)
/
1000
if
(
diff
<
30
)
{
return
"刚刚"
;
return
'刚刚'
}
else
if
(
diff
<
3600
)
{
// less 1 hour
return
Math
.
ceil
(
diff
/
60
)
+
"分钟前"
;
return
Math
.
ceil
(
diff
/
60
)
+
'分钟前'
}
else
if
(
diff
<
3600
*
24
)
{
return
Math
.
ceil
(
diff
/
3600
)
+
"小时前"
;
return
Math
.
ceil
(
diff
/
3600
)
+
'小时前'
}
else
if
(
diff
<
3600
*
24
*
2
)
{
return
"1天前"
;
return
'1天前'
}
if
(
option
)
{
return
parseTime
(
time
,
option
)
;
return
parseTime
(
time
,
option
)
}
else
{
return
(
d
.
getMonth
()
+
1
+
"月"
+
'月'
+
d
.
getDate
()
+
"日"
+
'日'
+
d
.
getHours
()
+
"时"
+
'时'
+
d
.
getMinutes
()
+
"分"
)
;
'分'
)
}
}
...
...
@@ -224,9 +217,9 @@ export function formatTime(time, option) {
* @returns {Object}
*/
export
function
param2Obj
(
url
)
{
const
search
=
url
.
split
(
"?"
)[
1
];
const
search
=
url
.
split
(
'?'
)[
1
]
if
(
!
search
)
{
return
{}
;
return
{}
}
return
JSON
.
parse
(
'{"'
+
...
...
@@ -234,23 +227,23 @@ export function param2Obj(url) {
.
replace
(
/"/g
,
'
\\
"'
)
.
replace
(
/&/g
,
'","'
)
.
replace
(
/=/g
,
'":"'
)
.
replace
(
/
\+
/g
,
" "
)
+
.
replace
(
/
\+
/g
,
' '
)
+
'"}'
)
;
)
}
export
function
formatCondition
(
param
)
{
if
(
!
param
)
{
return
null
;
return
null
}
const
result
=
{
conditions
:
[]
,
}
;
conditions
:
[]
}
// eslint-disable-next-line no-unused-vars
for
(
const
[
key
,
value
]
of
Object
.
entries
(
param
))
{
result
.
conditions
.
push
(
value
)
;
result
.
conditions
.
push
(
value
)
}
return
result
;
return
result
}
/**
* 驼峰转下划线
...
...
@@ -258,170 +251,152 @@ export function formatCondition(param) {
* @returns
*/
export
function
toLine
(
name
)
{
return
name
.
replace
(
/
([
A-Z
])
/g
,
"_$1"
).
toLowerCase
();
return
name
.
replace
(
/
([
A-Z
])
/g
,
'_$1'
).
toLowerCase
()
}
export
function
addOrder
(
order
,
orders
)
{
order
.
field
=
toLine
(
order
.
field
)
;
if
(
order
.
value
.
startsWith
(
"desc"
))
{
order
.
value
=
"desc"
;
order
.
field
=
toLine
(
order
.
field
)
if
(
order
.
value
.
startsWith
(
'desc'
))
{
order
.
value
=
'desc'
}
else
{
order
.
value
=
"asc"
;
order
.
value
=
'asc'
}
orders
=
orders
||
[]
;
orders
=
orders
||
[]
for
(
let
index
=
0
;
index
<
orders
.
length
;
index
++
)
{
const
element
=
orders
[
index
]
;
const
element
=
orders
[
index
]
if
(
order
.
field
===
element
.
field
)
{
orders
[
index
]
=
order
;
return
;
orders
[
index
]
=
order
return
}
}
orders
.
push
(
order
)
;
orders
.
push
(
order
)
}
export
function
formatOrders
(
orders
)
{
return
orders
.
map
(
(
order
)
=>
order
.
field
+
" "
+
order
.
value
);
return
orders
.
map
(
order
=>
order
.
field
+
' '
+
order
.
value
)
}
export
function
formatQuickCondition
(
param
,
quickField
)
{
let
quickObj
=
null
;
let
quickObj
=
null
if
(
!
param
||
!
(
quickObj
=
param
.
quick
)
||
!
quickField
)
{
quickObj
&&
delete
param
.
quick
;
return
param
;
quickObj
&&
delete
param
.
quick
return
param
}
param
[
quickField
]
=
{
field
:
quickField
,
operator
:
"like"
,
value
:
quickObj
.
value
,
}
;
delete
param
.
quick
;
return
param
;
operator
:
'like'
,
value
:
quickObj
.
value
}
delete
param
.
quick
return
param
}
export
function
getQueryVariable
(
variable
)
{
let
query
=
window
.
location
.
search
.
substring
(
1
)
;
let
query
=
window
.
location
.
search
.
substring
(
1
)
if
(
!
query
)
{
query
=
Cookies
.
get
(
variable
)
;
query
=
Cookies
.
get
(
variable
)
}
if
(
query
!==
undefined
)
{
const
vars
=
query
.
split
(
"&"
);
const
vars
=
query
.
split
(
'&'
)
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
const
pair
=
vars
[
i
].
split
(
"="
);
const
pair
=
vars
[
i
].
split
(
'='
)
if
(
pair
[
0
]
===
variable
)
{
return
pair
[
1
]
;
return
pair
[
1
]
}
}
}
return
false
;
return
(
false
)
}
export
function
isMobile
()
{
const
flag
=
navigator
.
userAgent
.
match
(
/
(
phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone
)
/i
);
return
flag
;
const
flag
=
navigator
.
userAgent
.
match
(
/
(
phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone
)
/i
)
return
flag
}
export
const
isSameVueObj
=
(
source
,
target
)
=>
{
if
(
!
source
&&
!
target
)
return
true
;
if
(
!
source
&&
!
target
)
return
true
if
(
!!
source
&&
!!
target
)
{
return
JSON
.
stringify
(
source
)
===
JSON
.
stringify
(
target
)
;
return
JSON
.
stringify
(
source
)
===
JSON
.
stringify
(
target
)
}
return
false
;
}
;
return
false
}
export
const
isSameArr
=
(
source
,
target
)
=>
{
if
(
!
source
&&
!
target
)
return
true
;
if
(
!
source
&&
!
target
)
return
true
if
(
source
?.
length
&&
target
?.
length
&&
source
.
length
===
target
.
length
)
{
const
sortSource
=
source
.
sort
()
;
const
sortTarget
=
target
.
sort
()
;
return
JSON
.
stringify
(
sortSource
)
===
JSON
.
stringify
(
sortTarget
)
;
const
sortSource
=
source
.
sort
()
const
sortTarget
=
target
.
sort
()
return
JSON
.
stringify
(
sortSource
)
===
JSON
.
stringify
(
sortTarget
)
}
return
false
;
}
;
return
false
}
export
const
changeFavicon
=
(
link
)
=>
{
let
$favicon
=
document
.
querySelector
(
'link[rel="icon"]'
)
;
export
const
changeFavicon
=
link
=>
{
let
$favicon
=
document
.
querySelector
(
'link[rel="icon"]'
)
if
(
$favicon
!==
null
)
{
$favicon
.
href
=
link
;
$favicon
.
href
=
link
}
else
{
$favicon
=
document
.
createElement
(
"link"
);
$favicon
.
rel
=
"icon"
;
$favicon
.
href
=
link
;
document
.
head
.
appendChild
(
$favicon
)
;
$favicon
=
document
.
createElement
(
'link'
)
$favicon
.
rel
=
'icon'
$favicon
.
href
=
link
document
.
head
.
appendChild
(
$favicon
)
}
}
;
}
export
const
mergeCustomSortOption
=
(
customSortList
,
sourceList
)
=>
{
if
(
!
customSortList
?.
length
)
return
sourceList
?.
length
?
sourceList
:
[]
;
if
(
!
customSortList
?.
length
)
return
sourceList
?.
length
?
sourceList
:
[]
if
(
!
sourceList
?.
length
)
return
customSortList
?.
length
?
customSortList
:
[]
;
if
(
!
sourceList
?.
length
)
return
customSortList
?.
length
?
customSortList
:
[]
const
result
=
[...
customSortList
,
...
sourceList
]
;
return
[...
new
Set
(
result
)]
;
}
;
const
result
=
[...
customSortList
,
...
sourceList
]
return
[...
new
Set
(
result
)]
}
export
const
inOtherPlatform
=
()
=>
{
const
cookieStr
=
Cookies
.
get
(
"inOtherPlatform"
);
if
(
cookieStr
&&
cookieStr
===
"true"
)
{
return
true
;
const
cookieStr
=
Cookies
.
get
(
'inOtherPlatform'
)
if
(
cookieStr
&&
cookieStr
===
'true'
)
{
return
true
}
return
false
;
}
;
return
false
}
export
const
showMultiLoginMsg
=
()
=>
{
const
multiLoginError1
=
Cookies
.
get
(
"MultiLoginError1"
);
const
multiLoginError1
=
Cookies
.
get
(
'MultiLoginError1'
)
if
(
multiLoginError1
)
{
Cookies
.
remove
(
"MultiLoginError1"
);
const
infos
=
JSON
.
parse
(
multiLoginError1
);
const
content
=
infos
.
map
((
info
)
=>
buildMultiLoginErrorItem
(
info
))
.
join
(
"</br>"
);
let
msgContent
=
"<strong>"
+
i18n
.
t
(
"multi_login_lang.title"
)
+
"</strong>"
;
msgContent
+=
content
+
"<p>"
+
i18n
.
t
(
"multi_login_lang.label"
)
+
"</p>"
;
$error
(
msgContent
,
10000
,
true
);
}
const
multiLoginError2
=
Cookies
.
get
(
"MultiLoginError2"
);
Cookies
.
remove
(
'MultiLoginError1'
)
const
infos
=
JSON
.
parse
(
multiLoginError1
)
const
content
=
infos
.
map
(
info
=>
buildMultiLoginErrorItem
(
info
)).
join
(
'</br>'
)
let
msgContent
=
'<strong>'
+
i18n
.
t
(
'multi_login_lang.title'
)
+
'</strong>'
msgContent
+=
content
+
'<p>'
+
i18n
.
t
(
'multi_login_lang.label'
)
+
'</p>'
$error
(
msgContent
,
10000
,
true
)
}
const
multiLoginError2
=
Cookies
.
get
(
'MultiLoginError2'
)
if
(
multiLoginError2
)
{
const
infos
=
JSON
.
parse
(
multiLoginError2
);
Cookies
.
remove
(
"MultiLoginError2"
);
const
content
=
infos
.
map
((
info
)
=>
buildMultiLoginErrorItem
(
info
))
.
join
(
"</br>"
);
let
msgContent
=
"<strong>"
+
i18n
.
t
(
"multi_login_lang.confirm_title"
)
+
"</strong>"
;
msgContent
+=
content
+
"<p>"
+
i18n
.
t
(
"multi_login_lang.confirm"
)
+
"</p>"
;
const
infos
=
JSON
.
parse
(
multiLoginError2
)
Cookies
.
remove
(
'MultiLoginError2'
)
const
content
=
infos
.
map
(
info
=>
buildMultiLoginErrorItem
(
info
)).
join
(
'</br>'
)
let
msgContent
=
'<strong>'
+
i18n
.
t
(
'multi_login_lang.confirm_title'
)
+
'</strong>'
msgContent
+=
content
+
'<p>'
+
i18n
.
t
(
'multi_login_lang.confirm'
)
+
'</p>'
$confirm
(
msgContent
,
()
=>
seize
(
infos
[
0
]),
{
dangerouslyUseHTMLString
:
true
,
})
;
dangerouslyUseHTMLString
:
true
})
}
}
;
const
seize
=
(
model
)
=>
{
const
loadingInstance
=
Loading
.
service
({})
;
const
token
=
model
.
token
;
}
const
seize
=
model
=>
{
const
loadingInstance
=
Loading
.
service
({})
const
token
=
model
.
token
const
param
=
{
token
,
}
;
seizeLogin
(
param
).
then
(
(
res
)
=>
{
const
resultToken
=
res
.
data
.
token
;
store
.
dispatch
(
"user/refreshToken"
,
resultToken
);
router
.
push
(
"/"
);
loadingInstance
.
close
()
;
})
;
}
;
token
}
seizeLogin
(
param
).
then
(
res
=>
{
const
resultToken
=
res
.
data
.
token
store
.
dispatch
(
'user/refreshToken'
,
resultToken
)
router
.
push
(
'/'
)
loadingInstance
.
close
()
})
}
const
buildMultiLoginErrorItem
=
(
info
)
=>
{
if
(
!
info
)
return
null
;
const
ip
=
i18n
.
t
(
"multi_login_lang.ip"
);
const
time
=
i18n
.
t
(
"multi_login_lang.time"
);
return
(
"<p>"
+
ip
+
": "
+
info
.
ip
+
", "
+
time
+
": "
+
new
Date
(
info
.
loginTime
).
format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"</p>"
);
};
if
(
!
info
)
return
null
const
ip
=
i18n
.
t
(
'multi_login_lang.ip'
)
const
time
=
i18n
.
t
(
'multi_login_lang.time'
)
return
'<p>'
+
ip
+
': '
+
info
.
ip
+
', '
+
time
+
': '
+
new
Date
(
info
.
loginTime
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
+
'</p>'
}
src/views/chart/components/dragItem/QuotaExtItem.vue
查看文件 @
4070323a
...
...
@@ -449,7 +449,7 @@ export default {
valueFormatter
()
{
this
.
item
.
index
=
this
.
index
this
.
item
.
formatterType
=
'quota'
this
.
item
.
formatterType
=
'quota
Ext
'
this
.
$emit
(
'valueFormatter'
,
this
.
item
)
}
}
...
...
src/views/chart/components/filter/QuotaFilterEditor.vue
查看文件 @
4070323a
...
...
@@ -117,6 +117,13 @@ export default {
value
:
'ge'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}],
logic
:
''
}
...
...
src/views/chart/components/filter/ResultFilterEditor.vue
查看文件 @
4070323a
...
...
@@ -194,6 +194,13 @@ export default {
value
:
'ge'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}
],
valueOptions
:
[
...
...
@@ -226,6 +233,13 @@ export default {
value
:
'ge'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}
],
options
:
[],
...
...
src/views/chart/view/ChartEdit.vue
查看文件 @
4070323a
...
...
@@ -473,7 +473,8 @@
<plugin-com
v-if=
"view.isPlugin"
:component-name=
"view.type + '-data'"
:obj=
"{view, param, chart, dimensionData, quotaData}"
:obj=
"{view, param, chart, dimension, dimensionData, quota, quotaData}"
:bus=
"bus"
/>
<div
v-else
>
...
...
@@ -819,6 +820,7 @@
@
editItemFilter=
"showQuotaEditFilter"
@
onNameEdit=
"showRename"
@
editItemCompare=
"showQuotaEditCompare"
@
valueFormatter=
"valueFormatter"
/>
</transition-group>
</draggable>
...
...
@@ -1795,7 +1797,7 @@ export default {
DrillPath
,
PluginCom
,
MapMapping
,
MarkMapDataEditor
,
MarkMapDataEditor
},
props
:
{
param
:
{
...
...
@@ -1815,6 +1817,7 @@ export default {
},
data
()
{
return
{
bus
:
bus
,
positionActiveNames
:
'positionAdjust'
,
loading
:
false
,
table
:
{},
...
...
@@ -2954,7 +2957,7 @@ export default {
// 更换数据集
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'
)
{
this
.
view
.
dataFrom
=
'dataset'
...
...
src/views/chart/view/PositionAdjust.vue
查看文件 @
4070323a
...
...
@@ -81,7 +81,7 @@ export default {
props
:
{},
data
()
{
return
{
maxHeight
:
2
000
,
maxHeight
:
10
000
,
maxTop
:
20000
}
},
...
...
src/views/chart/view/TitleRemark.vue
查看文件 @
4070323a
...
...
@@ -10,7 +10,7 @@
<div
class=
"remark-style"
:style=
"
{backgroundColor:remarkCfg.bgFill}"
v-html="
remarkCfg.content
"
v-html="
$xss(remarkCfg.content)
"
/>
<i
slot=
"reference"
...
...
src/views/dataset/common/DatasetChartDetail.vue
查看文件 @
4070323a
...
...
@@ -21,8 +21,8 @@
<el-col
class=
"info-item"
>
<p
class=
"info-title"
>
{{
$t
(
'chart.chart_type'
)
}}
</p>
<svg-icon
v-if=
"
detail.chart.type"
:icon-class=
"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"
class=
"chart-icon
"
/>
</el-col>
<el-col
class=
"info-item"
>
...
...
src/views/dataset/data/components/LazyTree.vue
查看文件 @
4070323a
...
...
@@ -34,7 +34,7 @@
<span>
<span
style=
"margin-left: 6px"
v-html=
"
data.name
"
v-html=
"
$xss(data.name)
"
/>
</span>
<span
...
...
src/views/dataset/group/GroupMoveSelector.vue
查看文件 @
4070323a
...
...
@@ -34,7 +34,7 @@
text-overflow: ellipsis;
"
:title=
"data.name"
v-html=
"
highlights(data.name
)"
v-html=
"
$xss(highlights(data.name)
)"
/>
</span>
</span>
...
...
src/views/login/index.vue
查看文件 @
4070323a
...
...
@@ -202,7 +202,7 @@
<div
v-if=
"showFoot"
class=
"dynamic-login-foot"
v-html=
"
footContent
"
v-html=
"
$xss(footContent)
"
/>
</div>
</
template
>
...
...
src/views/panel/export/PDFPreExport.vue
查看文件 @
4070323a
...
...
@@ -15,7 +15,7 @@
<div
class=
"export_body_inner_class"
:style=
"templateHtmlStyle"
v-html=
"
templateContentChange
"
v-html=
"
$xss(templateContentChange)
"
/>
</div>
</el-row>
...
...
src/views/panel/list/PanelList.vue
查看文件 @
4070323a
...
...
@@ -670,7 +670,10 @@ export default {
if
(
this
.
editPanel
.
optType
===
'toDefaultPanel'
)
{
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
)
{
this
.
$store
.
state
.
panel
.
panelInfo
.
name
=
panelInfo
.
name
}
...
...
@@ -850,7 +853,7 @@ export default {
delete
(
data
)
{
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'
,
cb
:
()
=>
{
delGroup
(
data
.
id
).
then
((
response
)
=>
{
...
...
src/views/system/user/index.vue
查看文件 @
4070323a
...
...
@@ -202,7 +202,7 @@
<!-- //
{{}}
会将数据解释为普通文本,而非 HTML 代码。 -->
<div
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>
</el-tooltip>
...
...
src/views/wizard/WizardCard.vue
查看文件 @
4070323a
...
...
@@ -9,7 +9,7 @@
{{
details
.
head
}}
</el-row>
<el-row
class=
"card_content"
>
<span
v-html=
"
details.content
"
/>
<span
v-html=
"
$xss(details.content)
"
/>
</el-row>
<el-row
class=
"card_bottom"
>
{{
$t
(
'wizard.click_show'
)
}}
...
...
src/views/wizard/WizardCardEnterprise.vue
查看文件 @
4070323a
...
...
@@ -9,7 +9,7 @@
{{
details
.
head
}}
</el-row>
<el-row
class=
"card_content"
>
<span
v-html=
"
details.content
"
/>
<span
v-html=
"
$xss(details.content)
"
/>
</el-row>
<el-row
class=
"card_bottom"
>
{{
$t
(
'wizard.apply'
)
}}
...
...
src/views/wizard/details/CardDetail.vue
查看文件 @
4070323a
...
...
@@ -18,7 +18,7 @@
<span>
{{
details
.
head
}}
</span>
</el-row>
<el-row
class=
"content"
>
<span
v-html=
"
details.content
"
/>
<span
v-html=
"
$xss(details.content)
"
/>
</el-row>
<el-row
class=
"bottom"
>
<span
class=
"span-box"
>
{{
details
.
bottom
}}
</span>
...
...
src/views/wizard/details/LatestDevelopments.vue
查看文件 @
4070323a
...
...
@@ -18,7 +18,7 @@
<span>
{{
details
.
head
}}
</span>
</el-row>
<el-row
class=
"content"
>
<span
v-html=
"
details.content
"
/>
<span
v-html=
"
$xss(details.content)
"
/>
</el-row>
<el-row
class=
"bottom"
>
<span
class=
"span-box"
>
{{
details
.
bottom
}}
</span>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论