代码提交
This commit is contained in:
parent
adfd80734c
commit
bc1fb48da3
|
@ -20,7 +20,7 @@ module.exports = {
|
||||||
// },
|
// },
|
||||||
'/api': {
|
'/api': {
|
||||||
// target: 'http://10.6.0.26:81',
|
// target: 'http://10.6.0.26:81',
|
||||||
target: 'http://175.27.191.156:11000/',
|
target: 'http://175.27.191.156:11000/api/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/api': ''
|
'^/api': ''
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"src/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"dist"
|
||||||
|
]
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -18,6 +18,7 @@
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"jspdf": "^2.5.1",
|
"jspdf": "^2.5.1",
|
||||||
"mqtt": "^3.0.0",
|
"mqtt": "^3.0.0",
|
||||||
|
"node-sass": "^8.0.0",
|
||||||
"postcss-plugin-px2rem": "^0.8.1",
|
"postcss-plugin-px2rem": "^0.8.1",
|
||||||
"screenfull": "5.2.0",
|
"screenfull": "5.2.0",
|
||||||
"v-scale-screen": "^1.0.0",
|
"v-scale-screen": "^1.0.0",
|
||||||
|
@ -53,7 +54,6 @@
|
||||||
"less-loader": "^4.1.0",
|
"less-loader": "^4.1.0",
|
||||||
"lockr": "^0.8.5",
|
"lockr": "^0.8.5",
|
||||||
"node-notifier": "^5.1.2",
|
"node-notifier": "^5.1.2",
|
||||||
"node-sass": "^4.7.2",
|
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
||||||
"ora": "^1.2.0",
|
"ora": "^1.2.0",
|
||||||
|
|
|
@ -7,10 +7,15 @@ if (process.env.NODE_ENV === 'development') {
|
||||||
axios.defaults.baseURL = '/'
|
axios.defaults.baseURL = '/'
|
||||||
}
|
}
|
||||||
//获取token
|
//获取token
|
||||||
export const getToken = (params) => {
|
export const getToken = (data) => {
|
||||||
return axios.get('api/blade-auth/oauth/token', {
|
// axios.defaults.headers.common['Authorization'] = `Basic c2FiZXI6c2FiZXJfc2VjcmV0`;
|
||||||
params
|
// axios.defaults.headers.common['Tenant-Id'] = `748495`
|
||||||
})
|
return axios.post('api/blade-auth/oauth/token'+'?grant_type='+data.grant_type+'&scope='+data.scope
|
||||||
|
+'&tenantId='+data.tenantId+'&username='+data.username+'&password='+data.password+'&type='+data.type,
|
||||||
|
data,
|
||||||
|
{headers: {'Authorization':'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
|
||||||
|
'Tenant-Id': '748495','Content-Type': 'application/json;charset=UTF-8'}}
|
||||||
|
)
|
||||||
};
|
};
|
||||||
export function filterCompanyAPI (params) {
|
export function filterCompanyAPI (params) {
|
||||||
return request({
|
return request({
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
|
@ -606,6 +606,7 @@ export default {
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
right: 0;
|
right: 0;
|
||||||
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
|
|
|
@ -336,7 +336,9 @@ export default {
|
||||||
this.vdaH = h - 0 + "px";
|
this.vdaH = h - 0 + "px";
|
||||||
this.createMqtt()
|
this.createMqtt()
|
||||||
this.getWeather()
|
this.getWeather()
|
||||||
|
window.setInterval(()=>{
|
||||||
this.getTime()
|
this.getTime()
|
||||||
|
},1000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
createMqtt() {
|
createMqtt() {
|
||||||
|
@ -393,6 +395,7 @@ export default {
|
||||||
url: 'https://restapi.amap.com/v3/weather/weatherInfo?key=e979d73682c0c69059e4cb6740c9dacd&city=320100',
|
url: 'https://restapi.amap.com/v3/weather/weatherInfo?key=e979d73682c0c69059e4cb6740c9dacd&city=320100',
|
||||||
methods: ''
|
methods: ''
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log(res.data,'=======================');
|
||||||
this.weatherItem = res.data.lives[0];
|
this.weatherItem = res.data.lives[0];
|
||||||
});
|
});
|
||||||
} ,
|
} ,
|
||||||
|
@ -498,6 +501,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
switchDiv() {
|
switchDiv() {
|
||||||
|
let that = this
|
||||||
if (this.type) {
|
if (this.type) {
|
||||||
this.type = false;
|
this.type = false;
|
||||||
this.$refs.switchBtn.style.display = "none";
|
this.$refs.switchBtn.style.display = "none";
|
||||||
|
@ -505,7 +509,7 @@ export default {
|
||||||
this.type = true;
|
this.type = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 俩秒之后让模块消失
|
// 俩秒之后让模块消失
|
||||||
this.$refs.switchBtn.style.display = "block";
|
that.$refs.switchBtn.style.display = "block";
|
||||||
}, 800)
|
}, 800)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1256,6 +1260,7 @@ position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
right: 0px;
|
right: 0px;
|
||||||
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
|
|
|
@ -20,12 +20,17 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="welcome">欢迎登录</div>
|
<div class="welcome">欢迎登录</div>
|
||||||
<el-form :model="param" :rules="rules" ref="login" label-width="100px" label-position="top" class="ms-content">
|
<el-form :model="param" :rules="rules" ref="login" label-width="100px" label-position="top" class="ms-content">
|
||||||
<el-form-item prop="username" label="用户名">
|
<el-form-item prop="tenantId" label="" style="margin-bottom:35px">
|
||||||
<el-input v-model="param.username" placeholder="输入您的账号">
|
<el-input v-model="param.tenantId" placeholder="请输入您的租户id">
|
||||||
<el-button slot="prepend" icon="el-icon-user"></el-button>
|
<el-button slot="prepend" icon="el-icon-user"></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password" label="密码" style="margin-top: 15px">
|
<el-form-item prop="username" label="" style="margin-bottom:35px">
|
||||||
|
<el-input v-model="param.username" placeholder="请输入您的账号">
|
||||||
|
<el-button slot="prepend" icon="el-icon-user"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password" label="" style="margin-top: 15px;margin-bottom:35px">
|
||||||
<el-input type="password" placeholder="请输入密码" v-model="param.password" @keyup.enter.native="submitForm()">
|
<el-input type="password" placeholder="请输入密码" v-model="param.password" @keyup.enter.native="submitForm()">
|
||||||
<el-button slot="prepend" icon="el-icon-lock"></el-button>
|
<el-button slot="prepend" icon="el-icon-lock"></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
@ -48,7 +53,7 @@ import BarChart from "@/components/common/BarChart";
|
||||||
import mdScreenPie from "@/components/common/mdScreenPie";
|
import mdScreenPie from "@/components/common/mdScreenPie";
|
||||||
import Swiper from "@/components/common/carousel";
|
import Swiper from "@/components/common/carousel";
|
||||||
import Resize from '../utils/Resize.vue'
|
import Resize from '../utils/Resize.vue'
|
||||||
import {getToken} from "../api/api";
|
import {getToken} from "@/api/api";
|
||||||
export default {
|
export default {
|
||||||
name: "report",
|
name: "report",
|
||||||
components: {
|
components: {
|
||||||
|
@ -63,11 +68,13 @@ export default {
|
||||||
showType: true,
|
showType: true,
|
||||||
topicSends:[],
|
topicSends:[],
|
||||||
param: {
|
param: {
|
||||||
username: '',
|
username: 'dlgc_pic',
|
||||||
password: ''
|
password: 'e19d5cd5af0378da05f63f891c7467af',
|
||||||
|
tenantId:'748495'
|
||||||
},
|
},
|
||||||
checked: false,
|
checked: false,
|
||||||
rules: {
|
rules: {
|
||||||
|
tenantId: [{ required: true, message: '账号Id不能为空', trigger: 'blur' }],
|
||||||
username: [{ required: true, message: '账号不能为空', trigger: 'blur' }],
|
username: [{ required: true, message: '账号不能为空', trigger: 'blur' }],
|
||||||
password: [{ required: true, message: '密码不能为空', trigger: 'blur' }]
|
password: [{ required: true, message: '密码不能为空', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
|
@ -78,38 +85,46 @@ export default {
|
||||||
this.vdaH = h - 0 + "px";
|
this.vdaH = h - 0 + "px";
|
||||||
this.createMqtt()
|
this.createMqtt()
|
||||||
this.getWeather()
|
this.getWeather()
|
||||||
this.getTokenData()
|
// this.getTokenData()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getTokenData(){
|
getTokenData(){
|
||||||
// getToken({grant_type:'password',scope:'all',tenantId:'748495',username:'dlgc_pic',password:'e19d5cd5af0378da05f63f891c7467af',type:"account"}).then(res => {
|
// getToken({grant_type:'password',scope:'all',tenantId:'748495',username:'dlgc_pic',password:'e19d5cd5af0378da05f63f891c7467af',type:"account"}).then(res => {
|
||||||
// console.log("res",res.data)
|
// console.log("res",res.data)
|
||||||
// })
|
// })
|
||||||
var data = {
|
let data = {
|
||||||
grant_type:'password',
|
grant_type:'password',
|
||||||
scope:'all',
|
scope:'all',
|
||||||
tenantId:'748495',
|
tenantId:'748495',
|
||||||
username:'dlgc_pic',
|
username:'dlgc_pic',
|
||||||
password:'e19d5cd5af0378da05f63f891c7467af',
|
password:'e19d5cd5af0378da05f63f891c7467af',
|
||||||
type:"account"}
|
type:"account"}
|
||||||
axios({
|
|
||||||
method: "get",
|
getToken(data).then((res)=>{
|
||||||
url: `${baseUrl}file/local/files`,
|
})
|
||||||
data: data,
|
// this.$axios({
|
||||||
headers: {
|
// method: "post",
|
||||||
Authorization: "Bearer " + token,
|
// // url: `${baseUrl}file/local/files`,
|
||||||
},
|
// url: `http://175.27.191.156:11000/api/blade-auth/oauth/token`,
|
||||||
})
|
// data: data,
|
||||||
.then(function(res) {
|
// dataType: 'jsonp',
|
||||||
console.log(e.file.name);
|
// headers: {
|
||||||
z.modelshowdata.fileList = [
|
// // Authorization: "Basic " + token,
|
||||||
{ fileName: e.file.name, filePath: v.data.fileName },
|
// Authorization: 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
|
||||||
];
|
// TenantId: '748495'
|
||||||
z.$message.success("上传成功");
|
// },
|
||||||
})
|
// })
|
||||||
.catch(function(err) {
|
// .then(function(res) {
|
||||||
z.$message.error("请求失败");
|
// console.log(res.data,'================');
|
||||||
});
|
// // z.modelshowdata.fileList = [
|
||||||
|
// // { fileName: e.file.name, filePath: v.data.fileName },
|
||||||
|
// // ];
|
||||||
|
// // z.$message.success("上传成功");
|
||||||
|
// })
|
||||||
|
// .catch(function(err) {
|
||||||
|
// // z.$message.error("请求失败");
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -132,9 +147,32 @@ export default {
|
||||||
// }).then(res => {
|
// }).then(res => {
|
||||||
// console.log('c', res);
|
// console.log('c', res);
|
||||||
// if(res.data.code==200){
|
// if(res.data.code==200){
|
||||||
this.$message.success('登录成功');
|
let data = {
|
||||||
localStorage.setItem('ms_username', this.param.username);
|
grant_type:'password',
|
||||||
this.$router.push('/index');
|
scope:'all',
|
||||||
|
tenantId:this.param.tenantId,
|
||||||
|
username:this.param.username,
|
||||||
|
password:this.param.password,
|
||||||
|
type:"account"
|
||||||
|
}
|
||||||
|
getToken(data).then((res)=>{
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.$message.success('登录成功');
|
||||||
|
// localStorage.setItem('ms_username', this.param.username);
|
||||||
|
this.$router.push('/index');
|
||||||
|
sessionStorage.setItem(
|
||||||
|
"token",
|
||||||
|
JSON.stringify(res.data.access_token)
|
||||||
|
);
|
||||||
|
sessionStorage.setItem(
|
||||||
|
"ms_username",
|
||||||
|
JSON.stringify(res.data.user_name)
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
this.$message.error('请输入正确的登录信息!!!');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// }else{
|
// }else{
|
||||||
// this.$message({
|
// this.$message({
|
||||||
// message: res.data.msg,
|
// message: res.data.msg,
|
||||||
|
@ -143,7 +181,7 @@ export default {
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请输入账号和密码');
|
this.$message.error('请输入账号和密码!!!');
|
||||||
console.log('error submit!!');
|
console.log('error submit!!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -241,7 +279,7 @@ getWeather () {
|
||||||
|
|
||||||
.bgPicture {
|
.bgPicture {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: url("~@/assets/pic/BG.jpg") no-repeat;
|
background: url('../assets/loginImg/loginBg.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -548,7 +586,8 @@ getWeather () {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
border: 1px solid rgb(231, 231, 231);
|
background: rgb(9,41,43);
|
||||||
|
border: none;
|
||||||
.el-input-group__prepend {
|
.el-input-group__prepend {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -558,6 +597,13 @@ getWeather () {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/deep/ .el-checkbox{
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
/deep/ .el-checkbox__inner{
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid rgb(0,139,146)
|
||||||
|
}
|
||||||
.login-wrap {
|
.login-wrap {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -566,11 +612,11 @@ getWeather () {
|
||||||
background: url('~@/assets/img/newlogin-bg.png');
|
background: url('~@/assets/img/newlogin-bg.png');
|
||||||
}
|
}
|
||||||
.ms-login {
|
.ms-login {
|
||||||
width: 24%;
|
width: 31%;
|
||||||
height: 59%;
|
height: 51%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 58.44%;
|
left: 35.44%;
|
||||||
top: 23.2%;
|
top: 22.2%;
|
||||||
.ms-title {
|
.ms-title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
|
@ -582,32 +628,42 @@ getWeather () {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 75px);
|
height: calc(100% - 75px);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
background: #ffffff;
|
background: url('../assets/loginImg/kuang.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.welcome {
|
.welcome {
|
||||||
margin-top: 28px;
|
margin-top: 28px;
|
||||||
font-size: 16px;
|
font-size: 20px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
// color: black;
|
color: #fff;
|
||||||
|
font-weight: 700
|
||||||
}
|
}
|
||||||
.ms-content {
|
.ms-content {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin-top: 25px;
|
margin-top: 33px;
|
||||||
}
|
}
|
||||||
.login-btn {
|
.login-btn {
|
||||||
width: 80%;
|
width: 75.5%;
|
||||||
|
height: 63px;
|
||||||
margin-top: 45px;
|
margin-top: 45px;
|
||||||
/deep/ .el-button {
|
/deep/ .el-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 20px;
|
height: 100%;
|
||||||
|
// border-radius: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
background: url("../assets/loginImg/loginBtn.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
border: none;
|
||||||
|
align-items: center;
|
||||||
span {
|
span {
|
||||||
letter-spacing: 15px;
|
letter-spacing: 15px;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -884,6 +884,9 @@ export default {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.securityCheck {
|
.securityCheck {
|
||||||
|
|
|
@ -542,6 +542,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
switchDiv() {
|
switchDiv() {
|
||||||
|
let that = this
|
||||||
if (this.type) {
|
if (this.type) {
|
||||||
this.type = false;
|
this.type = false;
|
||||||
this.$refs.switchBtn.style.display = "none";
|
this.$refs.switchBtn.style.display = "none";
|
||||||
|
@ -549,14 +550,15 @@ export default {
|
||||||
this.type = true;
|
this.type = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 俩秒之后让模块消失
|
// 俩秒之后让模块消失
|
||||||
this.$refs.switchBtn.style.display = "block";
|
that.$refs.switchBtn.style.display = "block";
|
||||||
}, 800)
|
}, 800)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.switchDiv(); window.onresize = () => {
|
// this.switchDiv();
|
||||||
|
window.onresize = () => {
|
||||||
return (() => {
|
return (() => {
|
||||||
let h = document.documentElement.clientHeight || document.body.clientHeight;
|
let h = document.documentElement.clientHeight || document.body.clientHeight;
|
||||||
this.vdaH = h - 0 + "px";
|
this.vdaH = h - 0 + "px";
|
||||||
|
@ -888,6 +890,9 @@ export default {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.securityCheck {
|
.securityCheck {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
body { padding: 0; margin: 0 }
|
body { padding: 0; margin: 0 }
|
||||||
#unity-container { position: absolute }
|
#unity-container { position: absolute;width: 1920px;height: 1080px; }
|
||||||
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
|
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
|
||||||
#unity-container.unity-mobile { width: 100%; height: 100% }
|
#unity-container.unity-mobile { width: 100%; height: 100% }
|
||||||
#unity-canvas { background: #231F20 }
|
#unity-canvas { background: #231F20 }
|
||||||
|
|
Loading…
Reference in New Issue