Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hu-shoujijingfen-h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweisong
hu-shoujijingfen-h5
Commits
e90d9907
Commit
e90d9907
authored
Aug 14, 2020
by
chenweisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营销模块改bug
parent
5865daef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
147 additions
and
29 deletions
+147
-29
gridMarketing.vue
src/views/app/gridMarketing.vue
+12
-4
gridMarketing2.vue
src/views/app/gridMarketing2.vue
+135
-25
No files found.
src/views/app/gridMarketing.vue
View file @
e90d9907
...
...
@@ -8,7 +8,7 @@
<div
class=
"fl selects-date"
@
click=
"changeModel(2)"
>
<selectDate
:value=
"showSelectDateValue"
></selectDate>
</div>
<div
class=
"fr selects-stars"
@
click=
"collectFn"
>
<div
v-if=
"public"
class=
"fr selects-stars"
@
click=
"collectFn"
>
<img
v-if=
"!isStar"
class=
"stars"
src=
"../../assets/app/star.png"
/>
<img
v-if=
"isStar"
class=
"stars"
src=
"../../assets/app/starYellow.png"
/>
</div>
...
...
@@ -21,6 +21,7 @@
</div>
<div
v-if=
"showUpperLevel"
@
click=
"changeUpperLevel"
class=
"upper-level"
>
上一级
</div>
<ModelArea
:public=
"public"
:userInfo=
"userInfo"
:initFlag=
"initFlag"
ref=
"areaRef"
...
...
@@ -178,6 +179,7 @@
},
data
()
{
return
{
public
:
true
,
tabActive
:
REAL_TIME
,
showUpperLevel
:
false
,
isShowTable
:
false
,
...
...
@@ -455,7 +457,7 @@
async
fetch
()
{
let
res
=
null
;
try
{
res
=
await
this
.
post
(
this
.
$urls
.
data
483
,
{});
res
=
await
this
.
post
(
this
.
public
?
this
.
$urls
.
data483
:
this
.
$urls
.
dataPublic
483
,
{});
}
catch
(
error
)
{
console
.
log
(
"error :"
,
error
);
Indicator
.
close
();
...
...
@@ -496,14 +498,14 @@
let
url
=
""
;
let
dateStr
=
""
;
if
(
this
.
tabActive
===
MONTH
)
{
url
=
this
.
$urls
.
data
485
;
url
=
this
.
public
?
this
.
$urls
.
data485
:
this
.
$urls
.
dataPublic
485
;
dateStr
=
formatDateTimeReg
(
new
Date
(
this
.
mouthActiveDate
),
"YYYY-MM-DD mm:ss"
);
}
else
{
// url = this.$urls.data481
url
=
this
.
$urls
.
data
484
;
url
=
this
.
public
?
this
.
$urls
.
data484
:
this
.
$urls
.
dataPublic
484
;
// dateStr = formatDateTimeReg(new Date(), "YYYY-MM-DD mm:ss");
dateStr
=
formatDateTimeReg
(
new
Date
(
this
.
now
),
"YYYY-MM-DD mm:ss"
);
}
...
...
@@ -846,7 +848,13 @@
this
.
selectArea
.
level
=
Number
(
this
.
userInfo
.
level
)
+
1
;
this
.
selectArea
.
areaId
=
this
.
userInfo
.
aid
;
this
.
selectArea
.
selectAreaName
=
this
.
userInfo
.
area
;
let
origin
=
this
.
$route
.
query
.
origin
;
if
(
origin
&&
origin
===
"p0"
)
{
this
.
public
=
false
;
}
else
{
this
.
public
=
true
;
this
.
isExistedCollect
();
}
await
this
.
fetch
();
await
this
.
getData
();
}
...
...
src/views/app/gridMarketing2.vue
View file @
e90d9907
...
...
@@ -15,10 +15,15 @@
<div
class=
"clearfix"
></div>
</div>
<div
v-show=
"tabActive === 1 && showTime"
class=
"time"
ref=
"timeRef"
>
{{
showTime
}}
</div>
<div
v-show=
"tabActive === 1 && showTime"
class=
"time"
ref=
"timeRef"
>
{{
showTime
}}
</div>
<div
v-if=
"showUpperLevel"
@
click=
"changeUpperLevel"
class=
"upper-level"
>
上一级
</div>
<ModelArea
:public=
"public"
:userInfo=
"userInfo"
:initFlag=
"initFlag"
ref=
"areaRef"
:defaultId=
"areaId"
:showModel=
"showModel"
...
...
@@ -54,6 +59,15 @@
<span
@
click=
"clickTab(2)"
:class=
"
{active : tabActive === 2 }"
class="month">月通报
</span>
<div
@
click
.
prevent
.
stop=
"boreShow "
class=
"bore"
>
<span
class=
"caliber"
>
口径
</span>
<span
class=
"question"
>
?
</span>
<Popup
@
hide=
"hidePop"
v-if=
"popObjMouth.visable"
:obj=
"popObjMouth"
></Popup>
</div>
</div>
<div
ref=
"kpiRef"
class=
"kpis"
>
<div
class=
"kpi"
:style=
"
{width: kpiWidth}">
...
...
@@ -139,11 +153,12 @@
import
{
formatDateTime
,
formatDateTimeReg
}
from
"libs/common/common"
;
import
{
createIScrollerAuto
,
refreshScrollerAuto
}
from
"libs/iscrollTable"
;
import
{
Toast
,
Indicator
}
from
"mint-ui"
;
import
ModelArea
from
"com/app/gridMarketing/area.vue"
;
import
ModelArea
from
"com/app/gridMarketing/area
2
.vue"
;
import
ModelDate
from
"com/app/gridMarketing/appModelDate.vue"
;
import
SelectArea
from
"com/app/add/selectArea.vue"
;
import
selectDate
from
"com/app/add/selectDate.vue"
;
import
commonMixin
from
"mixins/common/common.js"
;
import
Popup
from
"com/app/common/popup.vue"
;
const
REAL_TIME
=
1
,
MONTH
=
2
;
...
...
@@ -152,7 +167,8 @@
ModelArea
,
ModelDate
,
SelectArea
,
selectDate
selectDate
,
Popup
},
mixins
:
[
commonMixin
],
computed
:
{
...
...
@@ -163,6 +179,7 @@
},
data
()
{
return
{
public
:
true
,
tabActive
:
REAL_TIME
,
showUpperLevel
:
false
,
isShowTable
:
false
,
...
...
@@ -179,17 +196,16 @@
headerListLength
:
0
,
headerList
:
[],
scroll
:
null
,
public
:
true
,
isStar
:
false
,
initFlag
:
false
,
// 选择的地区
selectArea
:
{
// 层级 ,用户身份接口的: 0 是省,1 是市,2 是区或者分公司-
// 478 地区筛选接口的是:省是1 地市是2 区县是3 网格是4 渠道是5
level
:
Number
(
this
.
$route
.
query
.
level
)
+
1
,
// 地区层级
areaId
:
this
.
$route
.
query
.
areaId
,
// 731, //地区id
selectAreaName
:
this
.
$route
.
query
.
area
//选择了的地区的名字
level
:
1
,
// 地区层级
areaId
:
0
,
// 731, //地区id
selectAreaName
:
"全省"
//选择了的地区的名字
},
showSelectDateValue
:
this
.
getYesday
(
2
,
0
),
defaultDate
:
new
Date
(
new
Date
(
new
Date
().
getTime
())),
//前一天,
...
...
@@ -232,16 +248,17 @@
detailAreaId
:
""
,
kpiId
:
""
,
// kpi 详情的 code 值
userInfo
:
{
account
:
this
.
$route
.
query
.
account
,
// "XUSHENG1
",
aid
:
this
.
$route
.
query
.
aid
,
// 18411, //地区id
areaId
:
this
.
$route
.
query
.
areaId
,
// 731, //地区id
area
:
this
.
$route
.
query
.
area
,
// "A_长沙", 地区名
id
:
this
.
$route
.
query
.
id
,
// "OCxusheng1", 用户id
level
:
parseInt
(
this
.
$route
.
query
.
level
)
,
// 等级 ,0 是省,1 是市,2 是区或者分公司
phone
:
this
.
$route
.
query
.
phone
,
// "13873110056",
pid
:
this
.
$route
.
query
.
pid
,
// 0, 上级id
username
:
this
.
$route
.
query
.
username
// "徐胜", 用户名
account
:
"
"
,
aid
:
0
,
// 18411, //地区id
areaId
:
0
,
// 731, //地区id
area
:
"全省"
,
// "A_长沙", 地区名
id
:
0
,
// "OCxusheng1", 用户id
level
:
0
,
// 等级 ,0 是省,1 是市,2 是区或者分公司
phone
:
""
,
// "13873110056",
pid
:
0
,
// 0, 上级id
username
:
""
,
// "徐胜", 用户名
},
showTime
:
""
,
activeKpiCode
:
""
,
activeKpiItem
:
{},
...
...
@@ -250,7 +267,19 @@
kpiListOrigin
:
[],
currentKpiCode
:
""
,
changeUpperLevelIng
:
false
,
changeCacheFlag
:
false
changeCacheFlag
:
false
,
popObjMouth
:
{
//口径的数据
title
:
""
,
ind_unit
:
"元"
,
remark
:
""
,
top
:
"0.5rem"
,
right
:
"-0.2rem"
,
topRight
:
"0.15rem"
,
visable
:
false
,
type
:
1
,
activeIndex
:
''
// 当前激活
},
};
},
filters
:
{
...
...
@@ -264,6 +293,19 @@
}
},
methods
:
{
hidePop
(
type
)
{
this
.
popObjMouth
.
visable
=
false
;
this
.
popObjMouth
.
remark
=
""
;
},
boreShow
()
{
// console.log(this.activeKpiItem)
this
.
popObjMouth
.
remark
=
this
.
activeKpiItem
.
remarks
;
if
(
this
.
popObjMouth
.
remark
)
{
this
.
popObjMouth
.
visable
=
true
;
}
else
{
Toast
(
"该指标下没有口径说明 !"
);
}
},
changeUpperLevel
()
{
this
.
changeUpperLevelIng
=
true
;
let
length
=
this
.
cacheList
.
length
;
...
...
@@ -524,6 +566,8 @@
}
else
{
refreshScrollerAuto
();
}
// 当第一次采集数据完成,开始 选择地区查数据功能
this
.
initFlag
=
true
;
});
}
else
{
Toast
(
res
.
data
.
message
);
...
...
@@ -758,9 +802,48 @@
.
catch
(
error
=>
{
console
.
log
(
error
);
});
}
},
async
isInRiseList
()
{
let
res
=
null
;
try
{
res
=
await
this
.
post
(
this
.
$urls
.
isInRiseList
,
{
phone
:
this
.
$route
.
query
.
phone
});
}
catch
(
error
)
{
console
.
log
(
"error :"
,
error
);
return
;
}
// Indicator.close();
if
(
res
===
null
)
return
;
console
.
log
(
res
)
if
(
!!
res
.
isInRiseList
)
{
this
.
userInfo
.
account
=
this
.
$route
.
query
.
account
;
this
.
userInfo
.
aid
=
0
;
// 18411, //地区id
this
.
userInfo
.
areaId
=
0
;
// 731, //地区id
this
.
userInfo
.
area
=
"全省"
;
this
.
userInfo
.
level
=
0
;
// 等级 ,0 是省,1 是市,2 是区或者分公司
this
.
userInfo
.
pid
=
0
;
// 0, 上级id
this
.
userInfo
.
username
=
this
.
$route
.
query
.
username
;
this
.
userInfo
.
phone
=
this
.
$route
.
query
.
phone
;
this
.
userInfo
.
id
=
this
.
$route
.
query
.
id
;
}
else
{
this
.
userInfo
=
{
account
:
this
.
$route
.
query
.
account
,
// "XUSHENG1",
aid
:
this
.
$route
.
query
.
aid
,
// 18411, //地区id
areaId
:
this
.
$route
.
query
.
areaId
,
// 731, //地区id
area
:
this
.
$route
.
query
.
area
,
// "A_长沙", 地区名
id
:
this
.
$route
.
query
.
id
,
// "OCxusheng1", 用户id
level
:
parseInt
(
this
.
$route
.
query
.
level
),
// 等级 ,0 是省,1 是市,2 是区或者分公司
phone
:
this
.
$route
.
query
.
phone
,
// "13873110056",
pid
:
this
.
$route
.
query
.
pid
,
// 0, 上级id
username
:
this
.
$route
.
query
.
username
}
// "徐胜", 用户名 account: "", // "XUSHENG1",
}
}
}
,
async
created
()
{
await
this
.
isInRiseList
();
this
.
areaId
=
this
.
userInfo
.
aid
;
this
.
selectArea
.
level
=
Number
(
this
.
userInfo
.
level
)
+
1
;
this
.
selectArea
.
areaId
=
this
.
userInfo
.
aid
;
...
...
@@ -774,29 +857,34 @@
}
await
this
.
fetch
();
await
this
.
getData
();
},
}
,
watch
:
{
showUpperLevel
(
val
)
{
},
}
,
cacheList
:
{
immediate
:
true
,
handler
(
list
)
{
console
.
log
(
"change1: "
,
list
)
}
},
}
,
cacheList2
:
{
immediate
:
true
,
handler
(
list
)
{
console
.
log
(
"change2: "
,
list
)
}
}
},
}
,
mounted
()
{
this
.
tabHeight
=
this
.
$refs
.
tabRef
.
offsetHeight
;
// this.getData();
this
.
setTitle
({
title
:
"网格营销跟踪"
});
}
};
}
;
</
script
>
<
style
lang=
"less"
>
.selects-area
{
...
...
@@ -827,7 +915,6 @@
.time
{
height
:
0.4rem
;
//
padding
:
0.1rem
0
;
padding-left
:
2.5rem
;
font-size
:
0.26rem
;
color
:
#fff
;
...
...
@@ -878,6 +965,7 @@
font-size
:
0.28rem
;
text-align
:
center
;
/*padding-left: 1.8rem;*/
position
:
relative
;
.day,
.month
{
...
...
@@ -896,6 +984,27 @@
background-color
:
#2b90fa
;
color
:
#fff
;
}
.bore
{
position
:
absolute
;
top
:
0.3rem
;
right
:
.35rem
;
height
:
0.5rem
;
color
:
#999
;
.question
{
display
:
inline-block
;
width
:
0.2rem
;
height
:
0.2rem
;
overflow
:
hidden
;
line-height
:
0.2rem
;
border-radius
:
50%
;
color
:
#999
;
text-align
:
center
;
border
:
1px
solid
#999
;
}
}
}
.bg
{
...
...
@@ -1090,5 +1199,6 @@
.stars
{
width
:
0.4rem
;
}
}
</
style
>
Write
Preview
Markdown
is supported
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