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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
57 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 @@
...
@@ -8,7 +8,7 @@
<div
class=
"bi-mobile-base-info_content"
>
<div
class=
"bi-mobile-base-info_content"
>
<div
<div
class=
"bi-mobile-base-info_content_item"
class=
"bi-mobile-base-info_content_item"
v-for=
"(item, index) in info"
v-for=
"(item, index) in info
Cn
"
:key=
"index"
:key=
"index"
>
>
<div
class=
"bi-mobile-base-info_content_item_label"
>
<div
class=
"bi-mobile-base-info_content_item_label"
>
...
@@ -24,20 +24,83 @@
...
@@ -24,20 +24,83 @@
<
script
>
<
script
>
import
BiMobileTitle
from
'./title.vue'
;
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
{
export
default
{
name
:
'bi-mobile-base-info'
,
name
:
'bi-mobile-base-info'
,
props
:
{
info
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
inject
:
[
'Bi'
],
inject
:
[
'Bi'
],
components
:
{
BiMobileTitle
},
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
()
{
mounted
()
{
this
.
Bi
.
getBaseInfo
()
this
.
Bi
.
getBaseInfo
()
.
then
(
res
=>
{
.
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
=>
{
.
catch
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
@@ -57,17 +120,22 @@ export default {
...
@@ -57,17 +120,22 @@ export default {
&_item
{
&_item
{
font-size
:
0.35rem
;
font-size
:
0.35rem
;
color
:
#9d9d9d
;
color
:
#9d9d9d
;
&
>
div
{
display
:
flex
;
display
:
inline-block
;
justify-content
:
space-between
;
&_label
{
min-width
:
8em
;
}
}
&
_value
{
&
_value
{
float
:
right
;
//
float
:
right
;
color
:
#2d2d2d
;
color
:
#2d2d2d
;
}
}
&
+
.bi-mobile-base-info_content_item
{
&
+
.bi-mobile-base-info_content_item
{
margin-top
:
0.5rem
;
margin-top
:
0.5rem
;
}
}
}
}
//&
_item
:not
(
last-chiled
)
{
//
border-bottom
:
1px
solid
#000
;
//
}
}
}
}
}
</
style
>
</
style
>
src/packages/bi/src/main.vue
View file @
93fc69e
<!--
<!--
* @Description:
* @Description:
* @Author: jml
* @Author: jml
* @Date: 2021-02-26 15:38:10
* @Date: 2021-02-26 15:38:10
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
...
@@ -101,6 +101,8 @@ export default {
...
@@ -101,6 +101,8 @@ export default {
}
}
},
},
created
()
{
created
()
{
console
.
log
(
this
.
projectType
)
console
.
log
(
this
.
getBaseInfo
)
this
.
setFontSize
();
this
.
setFontSize
();
}
}
};
};
...
...
src/packages/bi/src/project/6-zone-mobile.vue
View file @
93fc69e
...
@@ -91,40 +91,6 @@ export default {
...
@@ -91,40 +91,6 @@ export default {
value
:
'2000'
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
:
[
textData
:
[
[
[
{
{
...
...
test/index.html
View file @
93fc69e
...
@@ -35,13 +35,15 @@
...
@@ -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/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/qs.js"
></script>
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/axios.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>
<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
//对应参数说明: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 @@
...
@@ -66,7 +68,7 @@
return
false
;
return
false
;
};
};
var
baseUrl
=
getQueryVariable
(
'url'
)
+
'/rest/cso/saas'
;
var
baseUrl
=
getQueryVariable
(
'url'
)
+
'/rest/cso/saas
/
'
;
var
service
=
axios
.
create
({
var
service
=
axios
.
create
({
headers
:
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded;charset=UTF-8'
'Content-Type'
:
'application/x-www-form-urlencoded;charset=UTF-8'
...
@@ -80,7 +82,7 @@
...
@@ -80,7 +82,7 @@
// 创建场景BI相关接口
// 创建场景BI相关接口
var
makeSceneBi
=
{
var
makeSceneBi
=
{
baseInfo
:
function
baseInfo
(
data
)
{
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
)
{
fixedInfo
:
function
fixedInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/data/fixed/info'
),
data
);
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/data/fixed/info'
),
data
);
...
@@ -96,7 +98,7 @@
...
@@ -96,7 +98,7 @@
var
hgtgBi
=
{
var
hgtgBi
=
{
baseInfo
:
function
baseInfo
(
data
)
{
baseInfo
:
function
baseInfo
(
data
)
{
return
service
.
post
(
return
service
.
post
(
''
.
concat
(
baseUrl
,
'
/bi/hgtgData/getHgtgBaseI
nfo'
),
''
.
concat
(
baseUrl
,
'
bi/person/base/i
nfo'
),
data
data
);
);
},
},
...
@@ -169,16 +171,16 @@
...
@@ -169,16 +171,16 @@
7
:
makeSceneAndSurvey
,
7
:
makeSceneAndSurvey
,
6
:
{
6
:
{
getBaseInfo
:
function
getBaseInfo
(
data
)
{
getBaseInfo
:
function
getBaseInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
baseInfo
,
data
)();
return
_this
.
addAuthToAjax
(
hgtgBi
.
baseInfo
,
data
)();
},
},
getFixedInfo
:
function
getFixedInfo
(
data
)
{
getFixedInfo
:
function
getFixedInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
fixedInfo
,
data
)();
return
_this
.
addAuthToAjax
(
hgtgBi
.
fixedInfo
,
data
)();
},
},
getTopicInfo
:
function
getTopicInfo
(
data
)
{
getTopicInfo
:
function
getTopicInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
topicInfo
,
data
)();
return
_this
.
addAuthToAjax
(
hgtgBi
.
topicInfo
,
data
)();
},
},
getGroupInfo
:
function
getGroupInfo
(
data
)
{
getGroupInfo
:
function
getGroupInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
groupInfo
,
data
)();
return
_this
.
addAuthToAjax
(
hgtgBi
.
groupInfo
,
data
)();
}
}
}
}
}[
this
.
projectType
];
}[
this
.
projectType
];
...
...
webpack.config.js
View file @
93fc69e
...
@@ -61,13 +61,16 @@ module.exports = {
...
@@ -61,13 +61,16 @@ module.exports = {
extensions
:
[
'*'
,
'.js'
,
'.vue'
,
'.json'
]
extensions
:
[
'*'
,
'.js'
,
'.vue'
,
'.json'
]
},
},
devServer
:
{
devServer
:
{
host
:
'
0.0.0.0
'
,
host
:
'
127.0.0.1
'
,
historyApiFallback
:
true
,
historyApiFallback
:
true
,
noInfo
:
true
,
noInfo
:
true
,
overlay
:
true
,
overlay
:
true
,
proxy
:
{
proxy
:
{
'/relaCustomer'
:
{
'/relaCustomer'
:
{
target
:
'http://172.28.61.8:8888/'
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