Commit d4e648d8 by srq18211

开发环境配置

1 parent e8ef9d72
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot", "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules", "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"dev:srq": "cross-env NODE_ENV=srq webpack-dev-server --hot",
"lint": "eslint src/ --ext .js,.vue ", "lint": "eslint src/ --ext .js,.vue ",
"fix": "eslint --fix ./src --ext .js,.vue " "fix": "eslint --fix ./src --ext .js,.vue "
}, },
...@@ -45,11 +46,13 @@ ...@@ -45,11 +46,13 @@
"eslint-plugin-prettier": "^3.1.3", "eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"file-loader": "^1.1.4", "file-loader": "^1.1.4",
"html-webpack-plugin": "^5.3.2",
"lint-staged": "^9.5.0", "lint-staged": "^9.5.0",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"node-sass": "^4.0.0", "node-sass": "^4.0.0",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"sass-loader": "^7.3.1", "sass-loader": "^7.3.1",
"serve": "^12.0.0",
"style-loader": "^2.0.0", "style-loader": "^2.0.0",
"url-loader": "^1.0.1", "url-loader": "^1.0.1",
"vue-loader": "^13.0.5", "vue-loader": "^13.0.5",
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
--> -->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
...@@ -15,34 +16,34 @@ ...@@ -15,34 +16,34 @@
padding: 0; padding: 0;
} }
</style> </style>
</head> </head>
<body>
<body>
<div id="app"> <div id="app">
<xrk-bi <xrk-bi use-scale="1" print="1" mobile="1" :project-type="projectType" :get-base-info="config.getBaseInfo"
use-scale="1" :get-fixed-info="config.getFixedInfo" :get-topic-info="config.getTopicInfo" :get-group-info="config.getGroupInfo">
print="1" </xrk-bi>
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> </div>
</body> </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/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.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>
//加参数
if (!window.location.search.length){
window.location.search = '?print=1&projectType=20&id=42&url=http://saas-cso-pc-1.jimijiayuan.cn'
}
<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 * @desc 输入一个字段名 返回 query 字段名对应的字段值 或者 false
* @param variable * @param variable
...@@ -76,51 +77,51 @@ ...@@ -76,51 +77,51 @@
// 创建场景BI相关接口 // 创建场景BI相关接口
var makeSceneBi = { var makeSceneBi = {
baseInfo: function baseInfo(data) { baseInfo: function baseInfo(data) {
return service.post(''.concat(baseUrl, '/bi/data/base/info'), data); return service.post(''.concat(baseUrl,'/bi/data/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);
}, },
topicInfo: function topicInfo(data) { topicInfo: function topicInfo(data) {
return service.post(''.concat(baseUrl, '/bi/data/topic/info'), data); return service.post(''.concat(baseUrl,'/bi/data/topic/info'),data);
}, },
groupInfo: function groupInfo(data) { groupInfo: function groupInfo(data) {
return service.post(''.concat(baseUrl, '/bi/data/group/info'), data); return service.post(''.concat(baseUrl,'/bi/data/group/info'),data);
} }
}; };
var hgtgBi = { var hgtgBi = {
baseInfo: function baseInfo(data) { baseInfo: function baseInfo(data) {
return service.post( return service.post(
''.concat(baseUrl, '/bi/hgtgData/getHgtgBaseInfo'), ''.concat(baseUrl,'/bi/hgtgData/getHgtgBaseInfo'),
data data
); );
}, },
fixedInfo: function fixedInfo(data) { fixedInfo: function fixedInfo(data) {
return service.post( return service.post(
''.concat(baseUrl, '/bi/hgtgData/getStyleConfigureFixed'), ''.concat(baseUrl,'/bi/hgtgData/getStyleConfigureFixed'),
data data
); );
}, },
topicInfo: function topicInfo(data) { topicInfo: function topicInfo(data) {
return service.post( return service.post(
''.concat(baseUrl, '/bi/hgtgData/getStyleConfigureHgtg'), ''.concat(baseUrl,'/bi/hgtgData/getStyleConfigureHgtg'),
data data
); );
}, },
groupInfo: function groupInfo(data) { groupInfo: function groupInfo(data) {
return service.post( return service.post(
''.concat(baseUrl, '/bi/hgtgData/ListsingleContent'), ''.concat(baseUrl,'/bi/hgtgData/ListsingleContent'),
data data
); );
} }
}; };
</script> </script>
<script> <script>
'use strict'; 'use strict';
function _defineProperty(obj, key, value) { function _defineProperty(obj,key,value) {
if (key in obj) { if (key in obj) {
Object.defineProperty(obj, key, { Object.defineProperty(obj,key,{
value: value, value: value,
enumerable: true, enumerable: true,
configurable: true, configurable: true,
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
new Vue({ new Vue({
el: '#app', el: '#app',
components: _defineProperty({}, Xrk.Bi.name, Xrk.Bi), components: _defineProperty({},Xrk.Bi.name,Xrk.Bi),
data: function data() { data: function data() {
return { return {
s: Xrk.Bi.name, s: Xrk.Bi.name,
...@@ -146,16 +147,16 @@ ...@@ -146,16 +147,16 @@
var _this = this; var _this = this;
var makeSceneAndSurvey = { var makeSceneAndSurvey = {
getBaseInfo: function getBaseInfo(data) { getBaseInfo: function getBaseInfo(data) {
return _this.addAuthToAjax(makeSceneBi.baseInfo, data)(); return _this.addAuthToAjax(makeSceneBi.baseInfo,data)();
}, },
getFixedInfo: function getFixedInfo(data) { getFixedInfo: function getFixedInfo(data) {
return _this.addAuthToAjax(makeSceneBi.fixedInfo, data)(); return _this.addAuthToAjax(makeSceneBi.fixedInfo,data)();
}, },
getTopicInfo: function getTopicInfo(data) { getTopicInfo: function getTopicInfo(data) {
return _this.addAuthToAjax(makeSceneBi.topicInfo, data)(); return _this.addAuthToAjax(makeSceneBi.topicInfo,data)();
}, },
getGroupInfo: function getGroupInfo(data) { getGroupInfo: function getGroupInfo(data) {
return _this.addAuthToAjax(makeSceneBi.groupInfo, data)(); return _this.addAuthToAjax(makeSceneBi.groupInfo,data)();
} }
}; };
return { return {
...@@ -164,16 +165,16 @@ ...@@ -164,16 +165,16 @@
7: makeSceneAndSurvey, 7: makeSceneAndSurvey,
6: { 6: {
getBaseInfo: function getBaseInfo(data) { getBaseInfo: function getBaseInfo(data) {
return that.addAuthToAjax(hgtgBi.baseInfo, data)(); return that.addAuthToAjax(hgtgBi.baseInfo,data)();
}, },
getFixedInfo: function getFixedInfo(data) { getFixedInfo: function getFixedInfo(data) {
return that.addAuthToAjax(hgtgBi.fixedInfo, data)(); return that.addAuthToAjax(hgtgBi.fixedInfo,data)();
}, },
getTopicInfo: function getTopicInfo(data) { getTopicInfo: function getTopicInfo(data) {
return that.addAuthToAjax(hgtgBi.topicInfo, data)(); return that.addAuthToAjax(hgtgBi.topicInfo,data)();
}, },
getGroupInfo: function getGroupInfo(data) { getGroupInfo: function getGroupInfo(data) {
return that.addAuthToAjax(hgtgBi.groupInfo, data)(); return that.addAuthToAjax(hgtgBi.groupInfo,data)();
} }
} }
}[this.projectType]; }[this.projectType];
...@@ -183,7 +184,7 @@ ...@@ -183,7 +184,7 @@
getTemplateList: function getTemplateList(data) { getTemplateList: function getTemplateList(data) {
console.log('makeSceneBi.templateList') console.log('makeSceneBi.templateList')
console.log(makeSceneBi.templateList) console.log(makeSceneBi.templateList)
return this.addAuthToAjax(makeSceneBi.templateList, data)(); return this.addAuthToAjax(makeSceneBi.templateList,data)();
}, },
/** /**
* @desc 添加入参 id ,biInfoId * @desc 添加入参 id ,biInfoId
...@@ -191,13 +192,13 @@ ...@@ -191,13 +192,13 @@
* @param data 请求参数 * @param data 请求参数
* @return {*} * @return {*}
*/ */
addAuthToAjax: function addAuthToAjax(ajax, data) { addAuthToAjax: function addAuthToAjax(ajax,data) {
var id = getQueryVariable('id'); var id = getQueryVariable('id');
var _data = JSON.parse(JSON.stringify(data || {})); var _data = JSON.parse(JSON.stringify(data || {}));
_data['id'] = id; _data['id'] = id;
_data['biInfoId'] = id; _data['biInfoId'] = id;
_data['auth'] = '94A08DA1FECBB6E8B46990538C7B50B2'; _data['auth'] = '94A08DA1FECBB6E8B46990538C7B50B2';
return ajax.bind(null, _data); return ajax.bind(null,_data);
} }
}, },
created: function created() { created: function created() {
...@@ -205,5 +206,6 @@ ...@@ -205,5 +206,6 @@
this.id = getQueryVariable('id'); this.id = getQueryVariable('id');
} }
}); });
</script> </script>
</html> </html>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!