Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
0511976a
Commit
0511976a
authored
Oct 19, 2021
by
季圣华
Browse files
首页增加新手引导的功能
parent
d5b35756
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
jshERP-web/package-lock.json
0 → 100644
View file @
0511976a
This diff is collapsed.
Click to expand it.
jshERP-web/package.json
View file @
0511976a
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
"md5"
:
"^2.2.1"
,
"md5"
:
"^2.2.1"
,
"nprogress"
:
"^0.2.0"
,
"nprogress"
:
"^0.2.0"
,
"xlsx"
:
"^0.14.3"
,
"xlsx"
:
"^0.14.3"
,
"intro.js"
:
"^4.2.2"
,
"viser-vue"
:
"^2.4.4"
,
"viser-vue"
:
"^2.4.4"
,
"vue"
:
"^2.6.10"
,
"vue"
:
"^2.6.10"
,
"vue-area-linkage"
:
"^5.1.0"
,
"vue-area-linkage"
:
"^5.1.0"
,
...
...
jshERP-web/src/main.js
View file @
0511976a
...
@@ -16,6 +16,7 @@ import Print from 'vue-print-nb-jeecg'
...
@@ -16,6 +16,7 @@ import Print from 'vue-print-nb-jeecg'
/*import '@babel/polyfill'*/
/*import '@babel/polyfill'*/
import
preview
from
'
vue-photo-preview
'
import
preview
from
'
vue-photo-preview
'
import
'
vue-photo-preview/dist/skin.css
'
import
'
vue-photo-preview/dist/skin.css
'
import
'
intro.js/introjs.css
'
import
{
import
{
ACCESS_TOKEN
,
ACCESS_TOKEN
,
...
@@ -47,8 +48,8 @@ Vue.use(hasPermission)
...
@@ -47,8 +48,8 @@ Vue.use(hasPermission)
Vue
.
use
(
Print
)
Vue
.
use
(
Print
)
Vue
.
use
(
preview
)
Vue
.
use
(
preview
)
Vue
.
use
(
vueBus
);
Vue
.
use
(
vueBus
);
Vue
.
use
(
JeecgComponents
)
;
Vue
.
use
(
JeecgComponents
)
Vue
.
use
(
VueAreaLinkage
)
;
Vue
.
use
(
VueAreaLinkage
)
new
Vue
({
new
Vue
({
router
,
router
,
...
...
jshERP-web/src/utils/util.js
View file @
0511976a
import
*
as
api
from
'
@/api/api
'
import
*
as
api
from
'
@/api/api
'
import
{
isURL
}
from
'
@/utils/validate
'
import
{
isURL
}
from
'
@/utils/validate
'
import
XLSX
from
'
xlsx
'
import
XLSX
from
'
xlsx
'
import
Vue
from
'
vue
'
import
introJs
from
'
intro.js
'
export
function
timeFix
()
{
export
function
timeFix
()
{
const
time
=
new
Date
()
const
time
=
new
Date
()
...
@@ -653,4 +655,30 @@ export function sheet2blob (aoa, sheetName) {
...
@@ -653,4 +655,30 @@ export function sheet2blob (aoa, sheetName) {
return
buf
return
buf
}
}
return
blob
return
blob
}
/**
* 新手引导步骤
* @param module 这个变量可以用来存取版本号, 系统更新时候改变相应值
* @param cur_version 这个变量可以用来存取版本号, 系统更新时候改变相应值
*/
export
function
handleIntroJs
(
module
,
cur_version
)
{
//每个页面设置不同的缓存变量名称,不可以重复,有新版本时,更新cur_version
//有新版本更新时才出现一次引导页, 第二次进入进不再出现, 这里有缓存来判断
if
(
Vue
.
ls
.
get
(
'
intro_cache_
'
+
module
)
===
cur_version
)
{
return
;
}
introJs
().
setOptions
({
prevLabel
:
'
← 上一步
'
,
nextLabel
:
'
下一步 →
'
,
skipLabel
:
'
跳过
'
,
doneLabel
:
'
知道了
'
,
exitOnOverlayClick
:
false
//点击空白区域是否关闭提示组件
}).
oncomplete
(
function
(){
//点击跳过按钮后执行的事件(这里保存对应的版本号到缓存,并且设置有效期为100天)
Vue
.
ls
.
set
(
'
intro_cache_
'
+
module
,
cur_version
,
100
*
24
*
60
*
60
*
1000
);
}).
onexit
(
function
(){
//点击结束按钮后, 执行的事件
Vue
.
ls
.
set
(
'
intro_cache_
'
+
module
,
cur_version
,
100
*
24
*
60
*
60
*
1000
);
}).
start
()
}
}
\ No newline at end of file
jshERP-web/src/views/dashboard/IndexChart.vue
View file @
0511976a
...
@@ -2,32 +2,32 @@
...
@@ -2,32 +2,32 @@
<div
class=
"page-header-index-wide"
>
<div
class=
"page-header-index-wide"
>
<a-row
:gutter=
"24"
>
<a-row
:gutter=
"24"
>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<chart-card
:loading=
"loading"
title=
"今日累计销售"
>
<chart-card
:loading=
"loading"
title=
"今日累计销售"
data-step=
"1"
data-intro=
"统计今日零售和销售单据的总金额"
>
<a-tooltip
title=
"统计今日零售和销售单据
数据
"
slot=
"action"
>
<a-tooltip
title=
"统计今日零售和销售单据
的总金额
"
slot=
"action"
>
<a-icon
type=
"info-circle-o"
/>
<a-icon
type=
"info-circle-o"
/>
</a-tooltip>
</a-tooltip>
<head-info
:content=
"statistics.todaySale"
></head-info>
<head-info
:content=
"statistics.todaySale"
></head-info>
</chart-card>
</chart-card>
</a-col>
</a-col>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<chart-card
:loading=
"loading"
title=
"本月累计销售"
>
<chart-card
:loading=
"loading"
title=
"本月累计销售"
data-step=
"2"
data-intro=
"统计本月零售和销售单据的总金额"
>
<a-tooltip
title=
"统计本月零售和销售单据
数据
"
slot=
"action"
>
<a-tooltip
title=
"统计本月零售和销售单据
的总金额
"
slot=
"action"
>
<a-icon
type=
"info-circle-o"
/>
<a-icon
type=
"info-circle-o"
/>
</a-tooltip>
</a-tooltip>
<head-info
:content=
"statistics.thisMonthSale"
></head-info>
<head-info
:content=
"statistics.thisMonthSale"
></head-info>
</chart-card>
</chart-card>
</a-col>
</a-col>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<chart-card
:loading=
"loading"
title=
"今日累计采购"
>
<chart-card
:loading=
"loading"
title=
"今日累计采购"
data-step=
"3"
data-intro=
"统计今日采购单据的总金额"
>
<a-tooltip
title=
"统计今日采购单据
数据
"
slot=
"action"
>
<a-tooltip
title=
"统计今日采购单据
的总金额
"
slot=
"action"
>
<a-icon
type=
"info-circle-o"
/>
<a-icon
type=
"info-circle-o"
/>
</a-tooltip>
</a-tooltip>
<head-info
:content=
"statistics.todayBuy"
></head-info>
<head-info
:content=
"statistics.todayBuy"
></head-info>
</chart-card>
</chart-card>
</a-col>
</a-col>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<chart-card
:loading=
"loading"
title=
"本月累计采购"
>
<chart-card
:loading=
"loading"
title=
"本月累计采购"
data-step=
"4"
data-intro=
"统计本月采购单据的总金额"
>
<a-tooltip
placement=
"left"
title=
"统计本月采购单据
数据
"
slot=
"action"
>
<a-tooltip
placement=
"left"
title=
"统计本月采购单据
的总金额
"
slot=
"action"
>
<a-icon
type=
"info-circle-o"
/>
<a-icon
type=
"info-circle-o"
/>
</a-tooltip>
</a-tooltip>
<head-info
:content=
"statistics.thisMonthBuy"
></head-info>
<head-info
:content=
"statistics.thisMonthBuy"
></head-info>
...
@@ -36,19 +36,20 @@
...
@@ -36,19 +36,20 @@
</a-row>
</a-row>
<a-row
:gutter=
"24"
>
<a-row
:gutter=
"24"
>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"12"
:style=
"
{ marginBottom: '24px' }">
<a-col
:sm=
"24"
:md=
"12"
:xl=
"12"
:style=
"
{ marginBottom: '24px' }">
<a-card
:loading=
"loading"
:bordered=
"false"
:body-style=
"
{paddingRight: '5'}">
<a-card
:loading=
"loading"
:bordered=
"false"
:body-style=
"
{paddingRight: '5'}"
data-step="5" data-intro="统计往前6个月每月销售的总金额"
>
<bar
title=
"销售统计"
:height=
"410"
:yaxisText=
"yaxisText"
:dataSource=
"salePriceData"
/>
<bar
title=
"销售统计"
:height=
"410"
:yaxisText=
"yaxisText"
:dataSource=
"salePriceData"
/>
</a-card>
</a-card>
</a-col>
</a-col>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"12"
:style=
"
{ marginBottom: '24px' }">
<a-col
:sm=
"24"
:md=
"12"
:xl=
"12"
:style=
"
{ marginBottom: '24px' }">
<a-card
:loading=
"loading"
:bordered=
"false"
:body-style=
"
{paddingRight: '5'}">
<a-card
:loading=
"loading"
:bordered=
"false"
:body-style=
"
{paddingRight: '5'}"
data-step="6" data-intro="统计往前6个月每月采购的总金额"
>
<bar
title=
"采购统计"
:height=
"410"
:yaxisText=
"yaxisText"
:dataSource=
"buyPriceData"
/>
<bar
title=
"采购统计"
:height=
"410"
:yaxisText=
"yaxisText"
:dataSource=
"buyPriceData"
/>
</a-card>
</a-card>
</a-col>
</a-col>
</a-row>
</a-row>
<a-row
:gutter=
"24"
>
<a-row
:gutter=
"24"
>
<a-col
:sm=
"24"
:md=
"24"
:xl=
"24"
:style=
"
{ marginBottom: '5px' }">
<a-col
:sm=
"24"
:md=
"24"
:xl=
"24"
:style=
"
{ marginBottom: '5px' }">
<a-card
:bordered=
"false"
:body-style=
"
{padding: '5'}">
<a-card
:bordered=
"false"
:body-style=
"
{padding: '5'}" data-step="7" data-intro="展示服务到期时间(快到期时会出现续费链接,请注意及时续费)、
用户数量(是指最多可以录入的用户数量)、版权信息">
<div
class=
"hidden-xs"
style=
"float:right;"
>
©
2015-2030
{{
systemTitle
}}
V3.0
</div>
<div
class=
"hidden-xs"
style=
"float:right;"
>
©
2015-2030
{{
systemTitle
}}
V3.0
</div>
<a-tag
v-if=
"tenant.type==0"
color=
"blue"
>
试用到期:
{{
tenant
.
expireTime
}}
</a-tag>
<a-tag
v-if=
"tenant.type==0"
color=
"blue"
>
试用到期:
{{
tenant
.
expireTime
}}
</a-tag>
<a-tag
v-if=
"tenant.type==0"
color=
"blue"
>
试用用户:
{{
tenant
.
userCurrentNum
}}
/
{{
tenant
.
userNumLimit
}}
</a-tag>
<a-tag
v-if=
"tenant.type==0"
color=
"blue"
>
试用用户:
{{
tenant
.
userCurrentNum
}}
/
{{
tenant
.
userNumLimit
}}
</a-tag>
...
@@ -72,6 +73,7 @@
...
@@ -72,6 +73,7 @@
import
HeadInfo
from
'
@/components/tools/HeadInfo.vue
'
import
HeadInfo
from
'
@/components/tools/HeadInfo.vue
'
import
Trend
from
'
@/components/Trend
'
import
Trend
from
'
@/components/Trend
'
import
{
getBuyAndSaleStatistics
,
buyOrSalePrice
,
getPlatformConfigByKey
}
from
'
@/api/api
'
import
{
getBuyAndSaleStatistics
,
buyOrSalePrice
,
getPlatformConfigByKey
}
from
'
@/api/api
'
import
{
handleIntroJs
}
from
"
@/utils/util
"
import
{
getAction
}
from
'
../../api/manage
'
import
{
getAction
}
from
'
../../api/manage
'
export
default
{
export
default
{
...
@@ -117,6 +119,9 @@
...
@@ -117,6 +119,9 @@
this
.
initInfo
()
this
.
initInfo
()
this
.
initWithTenant
()
this
.
initWithTenant
()
},
},
mounted
()
{
handleIntroJs
(
'
indexChart
'
,
1
)
},
methods
:
{
methods
:
{
initInfo
()
{
initInfo
()
{
getBuyAndSaleStatistics
(
null
).
then
((
res
)
=>
{
getBuyAndSaleStatistics
(
null
).
then
((
res
)
=>
{
...
...
jshERP-web/yarn.lock
View file @
0511976a
...
@@ -6253,6 +6253,11 @@ intersperse@^1.0.0:
...
@@ -6253,6 +6253,11 @@ intersperse@^1.0.0:
resolved "https://registry.npmjs.org/intersperse/-/intersperse-1.0.0.tgz#f2561fb1cfef9f5277cc3347a22886b4351a5181"
resolved "https://registry.npmjs.org/intersperse/-/intersperse-1.0.0.tgz#f2561fb1cfef9f5277cc3347a22886b4351a5181"
integrity sha1-8lYfsc/vn1J3zDNHoiiGtDUaUYE=
integrity sha1-8lYfsc/vn1J3zDNHoiiGtDUaUYE=
intro.js@^4.2.2:
version "4.2.2"
resolved "https://registry.nlark.com/intro.js/download/intro.js-4.2.2.tgz#9077549cc6ef697e78d18d1c05003b7471281e1a"
integrity sha1-kHdUnMbvaX540Y0cBQA7dHEoHho=
invariant@^2.2.2:
invariant@^2.2.2:
version "2.2.4"
version "2.2.4"
resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment