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 e8ef9d72
authored
Aug 09, 2021
by
srq18211
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开发环境配置
1 parent
0a042789
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
209 additions
and
0 deletions
bi.html
bi.html
0 → 100644
View file @
e8ef9d7
<!--
* @Description:
* @Date: 2021-07-02 13:58:43
-->
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
Bi报告
</title>
<style>
*
{
margin
:
0
;
padding
:
0
;
}
</style>
</head>
<body>
<div
id=
"app"
>
<xrk-bi
use-scale=
"1"
print=
"1"
mobile=
"1"
:project-type=
"projectType"
:get-base-info=
"config.getBaseInfo"
:get-fixed-info=
"config.getFixedInfo"
:get-topic-info=
"config.getTopicInfo"
:get-group-info=
"config.getGroupInfo"
></xrk-bi>
</div>
</body>
<script
src=
"https://cdn.bootcdn.net/ajax/libs/vue/2.5.0/vue.min.js"
></script>
<script
src=
"https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"
></script>
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/es6-sham.min.js"
></script>
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/es7-shim.js"
></script>
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/json3.js"
></script>
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/polyfill.min.js"
></script>
<script
src=
"https://cdn.yxvzb.com/WEB/SaaS/bi/0.1.0/static/js/es5-sham.min.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/axios.js"
></script>
<script
src=
"http://192.168.199.206:8080/dist/bundler.js"
></script>
<script>
/**
* @desc 输入一个字段名 返回 query 字段名对应的字段值 或者 false
* @param variable
* @return {string|boolean}
*/
var
getQueryVariable
=
function
getQueryVariable
(
variable
)
{
var
query
=
window
.
location
.
search
.
substring
(
1
);
var
vars
=
query
.
split
(
'&'
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
'='
);
if
(
pair
[
0
]
==
variable
)
{
return
pair
[
1
];
}
}
return
false
;
};
var
baseUrl
=
getQueryVariable
(
'url'
)
+
'/rest/cso/saas'
;
var
service
=
axios
.
create
({
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded;charset=UTF-8'
}
});
service
.
interceptors
.
request
.
use
(
function
(
config
)
{
config
.
data
=
Qs
.
stringify
(
config
.
data
);
return
config
;
});
// 创建场景BI相关接口
var
makeSceneBi
=
{
baseInfo
:
function
baseInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/data/base/info'
),
data
);
},
fixedInfo
:
function
fixedInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/data/fixed/info'
),
data
);
},
topicInfo
:
function
topicInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/data/topic/info'
),
data
);
},
groupInfo
:
function
groupInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/data/group/info'
),
data
);
}
};
var
hgtgBi
=
{
baseInfo
:
function
baseInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/hgtgData/getHgtgBaseInfo'
),
data
);
},
fixedInfo
:
function
fixedInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/hgtgData/getStyleConfigureFixed'
),
data
);
},
topicInfo
:
function
topicInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/hgtgData/getStyleConfigureHgtg'
),
data
);
},
groupInfo
:
function
groupInfo
(
data
)
{
return
service
.
post
(
''
.
concat
(
baseUrl
,
'/bi/hgtgData/ListsingleContent'
),
data
);
}
};
</script>
<script>
'use strict'
;
function
_defineProperty
(
obj
,
key
,
value
)
{
if
(
key
in
obj
)
{
Object
.
defineProperty
(
obj
,
key
,
{
value
:
value
,
enumerable
:
true
,
configurable
:
true
,
writable
:
true
});
}
else
{
obj
[
key
]
=
value
;
}
return
obj
;
}
new
Vue
({
el
:
'#app'
,
components
:
_defineProperty
({},
Xrk
.
Bi
.
name
,
Xrk
.
Bi
),
data
:
function
data
()
{
return
{
s
:
Xrk
.
Bi
.
name
,
projectType
:
0
};
},
computed
:
{
config
:
function
config
()
{
var
_this
=
this
;
var
makeSceneAndSurvey
=
{
getBaseInfo
:
function
getBaseInfo
(
data
)
{
return
_this
.
addAuthToAjax
(
makeSceneBi
.
baseInfo
,
data
)();
},
getFixedInfo
:
function
getFixedInfo
(
data
)
{
return
_this
.
addAuthToAjax
(
makeSceneBi
.
fixedInfo
,
data
)();
},
getTopicInfo
:
function
getTopicInfo
(
data
)
{
return
_this
.
addAuthToAjax
(
makeSceneBi
.
topicInfo
,
data
)();
},
getGroupInfo
:
function
getGroupInfo
(
data
)
{
return
_this
.
addAuthToAjax
(
makeSceneBi
.
groupInfo
,
data
)();
}
};
return
{
20
:
makeSceneAndSurvey
,
5
:
makeSceneAndSurvey
,
7
:
makeSceneAndSurvey
,
6
:
{
getBaseInfo
:
function
getBaseInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
baseInfo
,
data
)();
},
getFixedInfo
:
function
getFixedInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
fixedInfo
,
data
)();
},
getTopicInfo
:
function
getTopicInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
topicInfo
,
data
)();
},
getGroupInfo
:
function
getGroupInfo
(
data
)
{
return
that
.
addAuthToAjax
(
hgtgBi
.
groupInfo
,
data
)();
}
}
}[
this
.
projectType
];
}
},
methods
:
{
getTemplateList
:
function
getTemplateList
(
data
)
{
console
.
log
(
'makeSceneBi.templateList'
)
console
.
log
(
makeSceneBi
.
templateList
)
return
this
.
addAuthToAjax
(
makeSceneBi
.
templateList
,
data
)();
},
/**
* @desc 添加入参 id ,biInfoId
* @param ajax service.post(''.concat(baseUrl, '/bi/data/base/info'), data);
* @param data 请求参数
* @return {*}
*/
addAuthToAjax
:
function
addAuthToAjax
(
ajax
,
data
)
{
var
id
=
getQueryVariable
(
'id'
);
var
_data
=
JSON
.
parse
(
JSON
.
stringify
(
data
||
{}));
_data
[
'id'
]
=
id
;
_data
[
'biInfoId'
]
=
id
;
_data
[
'auth'
]
=
'94A08DA1FECBB6E8B46990538C7B50B2'
;
return
ajax
.
bind
(
null
,
_data
);
}
},
created
:
function
created
()
{
this
.
projectType
=
getQueryVariable
(
'projectType'
);
this
.
id
=
getQueryVariable
(
'id'
);
}
});
</script>
</html>
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