Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
jml0128
/
xrk-bi
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 93fc69e0
authored
Aug 10, 2021
by
srq18211
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:A 新增 线上推广基础信息接口
1 parent
898d8f39
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
56 deletions
src/packages/bi/src/components/mobile/base-info.vue
src/packages/bi/src/main.vue
src/packages/bi/src/project/6-zone-mobile.vue
test/index.html
webpack.config.js
src/packages/bi/src/components/mobile/base-info.vue
View file @
93fc69e
...
...
@@ -8,7 +8,7 @@
<div
class=
"bi-mobile-base-info_content"
>
<div
class=
"bi-mobile-base-info_content_item"
v-for=
"(item, index) in info"
v-for=
"(item, index) in info
Cn
"
:key=
"index"
>
<div
class=
"bi-mobile-base-info_content_item_label"
>
...
...
@@ -24,20 +24,83 @@
<
script
>
import
BiMobileTitle
from
'./title.vue'
;
// label 字典
const
fieldsDic
=
{
projectName
:
{
cn
:
'项目名称'
,
order
:
1
},
fullName
:
{
cn
:
'项目参与人'
,
order
:
2
},
industryEnterpriseName
:
{
cn
:
'发起方'
,
order
:
3
},
enterpriseName
:
{
cn
:
'服务商'
,
order
:
4
},
submitDt
:
{
cn
:
'提交日期'
,
order
:
5
},
informationNum
:
{
cn
:
'咨询数'
,
order
:
6
},
finishSum
:
{
cn
:
'本期采购量'
,
order
:
7
},
startDt
:
{
cn
:
'任务开始时间'
,
order
:
8
},
createDt
:
{
cn
:
'报表生成时间'
,
order
:
9
}
};
export
default
{
name
:
'bi-mobile-base-info'
,
props
:
{
info
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
inject
:
[
'Bi'
],
components
:
{
BiMobileTitle
},
data
()
{
return
{
info
:
[]
};
},
computed
:
{
orderInfo
()
{
let
res
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
info
));
res
.
sort
((
a
,
b
)
=>
{
return
fieldsDic
[
a
.
label
].
order
-
fieldsDic
[
b
.
label
].
order
;
});
return
res
;
},
infoCn
()
{
return
this
.
orderInfo
.
map
(
i
=>
{
return
{
label
:
fieldsDic
[
i
.
label
].
cn
,
value
:
i
.
value
};
});
}
},
mounted
()
{
this
.
Bi
.
getBaseInfo
()
.
then
(
res
=>
{
console
.
log
(
res
);
const
[
info
]
=
res
.
data
.
data
;
for
(
let
key
in
info
)
{
let
value
=
info
[
key
];
this
.
info
.
push
({
label
:
key
,
value
:
value
});
}
})
.
catch
(
err
=>
{
console
.
log
(
err
);
...
...
@@ -57,17 +120,22 @@ export default {
&_item
{
font-size
:
0.35rem
;
color
:
#9d9d9d
;
&
>
div
{
display
:
inline-block
;
display
:
flex
;
justify-content
:
space-between
;
&_label
{
min-width
:
8em
;
}
&
_value
{
float
:
right
;
//
float
:
right
;
color
:
#2d2d2d
;
}
&
+
.bi-mobile-base-info_content_item
{
margin-top
:
0.5rem
;
}
}
//&
_item
:not
(
last-chiled
)
{
//
border-bottom
:
1px
solid
#000
;
//
}
}
}
</
style
>
src/packages/bi/src/main.vue
View file @
93fc69e
...
...
@@ -101,6 +101,8 @@ export default {
}
},
created
()
{
console
.
log
(
this
.
projectType
)
console
.
log
(
this
.
getBaseInfo
)
this
.
setFontSize
();
}
};
...
...
src/packages/bi/src/project/6-zone-mobile.vue
View file @
93fc69e
...
...
@@ -91,40 +91,6 @@ export default {
value
:
'2000'
}
],
baseInfo
:
[
{
label
:
'项目参与人:'
,
value
:
'张三'
},
{
label
:
'发起方:'
,
value
:
'葵花医疗集团'
},
{
label
:
'服务商:'
,
value
:
'杭州大江工作室'
},
{
label
:
'提交日期:'
,
value
:
'2021-05-30'
},
{
label
:
'可供采购量:'
,
value
:
'100'
},
{
label
:
'本期采购量:'
,
value
:
'20'
},
{
label
:
'数据收集:'
,
value
:
'20'
},
{
label
:
'报表成时间:'
,
value
:
'2021-05-21 22:21:12'
}
],
textData
:
[
[
{
...
...
test/index.html
View file @
93fc69e
...
...
@@ -35,13 +35,15 @@
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/vue.js"
></script>
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/qs.js"
></script>
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/axios.js"
></script>
<script
src=
"http://1
92.168.199.206
:8080/dist/bundler.js"
></script>
<script
src=
"http://1
27.0.0.1
:8080/dist/bundler.js"
></script>
<script>
//加参数
if
(
!
window
.
location
.
search
.
length
){
// const query = '?fenpeiIds=9335188&userId=2771&type=person&projectType=20&id=42&url=http://saas-cso-pc-1.jimijiayuan.cn'
const
query
=
'?fenpeiIds=9335188&userId=2771&type=person&projectType=6&id=42&url=http://yapi.jimijiayuan.cn/mock/657'
if
(
window
.
location
.
search
!==
query
){
//对应参数说明:http://bug.yxvzb.com/zentao/task-view-353.html
window
.
location
.
search
=
'?fenpeiIds=9335188&userId=2771&type=person&projectType=20&id=42&url=http://saas-cso-pc-1.jimijiayuan.cn'
window
.
location
.
search
=
query
}
/**
...
...
@@ -66,7 +68,7 @@
return
false
;
};
var
baseUrl
=
getQueryVariable
(
'url'
)
+
'/rest/cso/saas'
;
var
baseUrl
=
getQueryVariable
(
'url'
)
+
'/rest/cso/saas
/
'
;
var
service
=
axios
.
create
({
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded;charset=UTF-8'
...
...
@@ -80,7 +82,7 @@
// 创建场景BI相关接口
var
makeSceneBi
=
{
baseInfo
:
function
baseInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/person/base/info'
),
data
);
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/
bi/
person/base/info'
),
data
);
},
fixedInfo
:
function
fixedInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/data/fixed/info'
),
data
);
...
...
@@ -96,7 +98,7 @@
var
hgtgBi
=
{
baseInfo
:
function
baseInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'
/bi/hgtgData/getHgtgBaseI
nfo'
),
''
.
concat
(
baseUrl
,
'
bi/person/base/i
nfo'
),
data
);
},
...
...
@@ -169,16 +171,16 @@
7
:
makeSceneAndSurvey
,
6
:
{
getBaseInfo
:
function
getBaseInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
baseInfo
,
data
)();
return
_this
.
addAuthToAjax
(
hgtgBi
.
baseInfo
,
data
)();
},
getFixedInfo
:
function
getFixedInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
fixedInfo
,
data
)();
return
_this
.
addAuthToAjax
(
hgtgBi
.
fixedInfo
,
data
)();
},
getTopicInfo
:
function
getTopicInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
topicInfo
,
data
)();
return
_this
.
addAuthToAjax
(
hgtgBi
.
topicInfo
,
data
)();
},
getGroupInfo
:
function
getGroupInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
groupInfo
,
data
)();
return
_this
.
addAuthToAjax
(
hgtgBi
.
groupInfo
,
data
)();
}
}
}[
this
.
projectType
];
...
...
webpack.config.js
View file @
93fc69e
...
...
@@ -61,13 +61,16 @@ module.exports = {
extensions
:
[
'*'
,
'.js'
,
'.vue'
,
'.json'
]
},
devServer
:
{
host
:
'
0.0.0.0
'
,
host
:
'
127.0.0.1
'
,
historyApiFallback
:
true
,
noInfo
:
true
,
overlay
:
true
,
proxy
:
{
'/relaCustomer'
:
{
target
:
'http://172.28.61.8:8888/'
},
'/api'
:{
target
:
'http://saas-cso-pc-1.jimijiayuan.cn'
}
}
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment