This commit is contained in:
chengdandan 2023-03-22 08:52:06 +08:00
commit 1991dd1245
14 changed files with 16261 additions and 675 deletions

17
jsconfig.json Normal file
View File

@ -0,0 +1,17 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
]
}
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"dist"
]
}

16693
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,7 @@
"js-cookie": "^3.0.1",
"jspdf": "^2.5.1",
"mqtt": "^3.0.0",
"node-sass": "^8.0.0",
"postcss-plugin-px2rem": "^0.8.1",
"screenfull": "5.2.0",
"v-scale-screen": "^1.0.0",
@ -53,7 +54,6 @@
"less-loader": "^4.1.0",
"lockr": "^0.8.5",
"node-notifier": "^5.1.2",
"node-sass": "^4.7.2",
"nprogress": "0.2.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",

View File

@ -8,16 +8,14 @@ if (process.env.NODE_ENV === 'development') {
}
//获取token
export const getToken = (data) => {
// axios.defaults.headers.common['Authorization'] = `Basic c2FiZXI6c2FiZXJfc2VjcmV0`;
// 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, {
dataType: "JSON",
headers:{
'Content-Type': 'application/json',
'Accept':'application/json',
'Authorization':'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
'Tenant-Id': '748495'
}
})
+'&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) {
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

View File

@ -606,6 +606,7 @@ export default {
top: 50%;
transform: translateY(-50%);
right: 0;
z-index: 999;
}
.box {

View File

@ -21,6 +21,9 @@
<span>&nbsp;&nbsp;天气&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span>{{weatherItem.weather}} &nbsp;{{weatherItem.temperature}}</span>
</div>
<div class="closeIndex" @click="closeindex">
<img src="../assets/pic/closeIndex.png" alt="">
</div>
</div>
</div>
@ -336,7 +339,9 @@ export default {
this.vdaH = h - 0 + "px";
this.createMqtt()
this.getWeather()
window.setInterval(()=>{
this.getTime()
},1000)
},
methods: {
createMqtt() {
@ -365,6 +370,9 @@ export default {
break;
}
},
closeindex(){
this.$router.push('/')
},
//
getTime(){
let myDate = new Date()
@ -393,6 +401,7 @@ export default {
url: 'https://restapi.amap.com/v3/weather/weatherInfo?key=e979d73682c0c69059e4cb6740c9dacd&city=320100',
methods: ''
}).then(res => {
console.log(res.data,'=======================');
this.weatherItem = res.data.lives[0];
});
} ,
@ -498,6 +507,7 @@ export default {
}
},
switchDiv() {
let that = this
if (this.type) {
this.type = false;
this.$refs.switchBtn.style.display = "none";
@ -505,7 +515,7 @@ export default {
this.type = true;
setTimeout(() => {
//
this.$refs.switchBtn.style.display = "block";
that.$refs.switchBtn.style.display = "block";
}, 800)
}
}
@ -1092,11 +1102,17 @@ position: absolute;
right: 80px;
width: 17.5px;
height: 18px;
background: url("~@/assets/pic/sun.png") no-repeat;
// background: url("~@/assets/pic/sun.png") no-repeat;
background-size: 100% 100%;
}
}
.closeIndex{
width: 40px;
height: 40px;
position: absolute;
top: 5px;
right: 22px;
}
}
.header .title {
@ -1256,6 +1272,7 @@ position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0px;
z-index: 999;
}
.box {

View File

@ -20,12 +20,17 @@
<div class="content">
<div class="welcome">欢迎登录</div>
<el-form :model="param" :rules="rules" ref="login" label-width="100px" label-position="top" class="ms-content">
<el-form-item prop="username" label="用户名">
<el-input v-model="param.username" placeholder="输入您的账号">
<el-form-item prop="tenantId" label="" style="margin-bottom:35px">
<el-input v-model="param.tenantId" placeholder="请输入您的租户id">
<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">
<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-button slot="prepend" icon="el-icon-lock"></el-button>
</el-input>
@ -48,8 +53,7 @@ import BarChart from "@/components/common/BarChart";
import mdScreenPie from "@/components/common/mdScreenPie";
import Swiper from "@/components/common/carousel";
import Resize from '../utils/Resize.vue'
import {getToken} from "../api/api";
// import
import {getToken} from "@/api/api";
export default {
name: "report",
components: {
@ -64,11 +68,13 @@ export default {
showType: true,
topicSends:[],
param: {
username: '',
password: ''
username: 'dlgc_pic',
password: 'e19d5cd5af0378da05f63f891c7467af',
tenantId:'748495'
},
checked: false,
rules: {
tenantId: [{ required: true, message: '账号Id不能为空', trigger: 'blur' }],
username: [{ required: true, message: '账号不能为空', trigger: 'blur' }],
password: [{ required: true, message: '密码不能为空', trigger: 'blur' }]
}
@ -79,63 +85,47 @@ export default {
this.vdaH = h - 0 + "px";
this.createMqtt()
this.getWeather()
this.getTokenData()
// this.getTokenData()
},
methods: {
getTokenData(){
var data = {
// getToken({grant_type:'password',scope:'all',tenantId:'748495',username:'dlgc_pic',password:'e19d5cd5af0378da05f63f891c7467af',type:"account"}).then(res => {
// console.log("res",res.data)
// })
let data = {
grant_type:'password',
scope:'all',
tenantId:'748495',
username:'dlgc_pic',
password:'e19d5cd5af0378da05f63f891c7467af',
type:"account"}
getToken(data).then(res => {
console.log("res",res.data)
})
// this.$axios.post({
// // method: "post",
// url: `http://175.27.191.156:11000/blade-auth/oauth/token`,
getToken(data).then((res)=>{
})
// this.$axios({
// method: "post",
// // url: `${baseUrl}file/local/files`,
// url: `http://175.27.191.156:11000/api/blade-auth/oauth/token`,
// data: data,
// dataType: 'jsonp',
// headers: {
// Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0 ",
// tenantId:'748495'
// // Authorization: "Basic " + token,
// Authorization: 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
// TenantId: '748495'
// },
// })
// .then(function(res) {
// console.log("res11111",res);
// console.log(res.data,'================');
// // z.modelshowdata.fileList = [
// // { fileName: e.file.name, filePath: v.data.fileName },
// // ];
// // z.$message.success("");
// })
// .catch(function(err) {
// console.log("err",err);
// // z.$message.error("");
// });
// var resUrl = `http://175.27.191.156:11000/blade-auth/oauth/token`
// this.$axios.post({
// type: "post", //
// url: resUrl,
// data: JSON.stringify({
// "grant_type":'password',
// "scope":'all',
// "tenantId":'748495',
// "username":'dlgc_pic',
// "password":'e19d5cd5af0378da05f63f891c7467af',
// "type":"account"
// }),
// dataType: "JSON",
// headers: {
// 'Content-Type': 'application/json',
// 'Accept':'application/json',
// 'Authorization': "Basic c2FiZXI6c2FiZXJfc2VjcmV0 ",
// 'tenantId':'748495'
// },
// success: function(data, textStatus, request) {
// console.log("data",data)
// // const tokennew =JSON.parse(JSON.stringify(request.getResponseHeader('Access-Token')))
// // setStorage("token",tokennew);
// },
// });
},
getType() {
@ -157,9 +147,32 @@ export default {
// }).then(res => {
// console.log('c', res);
// if(res.data.code==200){
this.$message.success('登录成功');
localStorage.setItem('ms_username', this.param.username);
this.$router.push('/index');
let data = {
grant_type:'password',
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{
// this.$message({
// message: res.data.msg,
@ -168,7 +181,7 @@ export default {
// }
// });
} else {
this.$message.error('请输入账号和密码');
this.$message.error('请输入账号和密码');
console.log('error submit!!');
return false;
}
@ -266,7 +279,7 @@ getWeather () {
.bgPicture {
width: 100%;
background: url("~@/assets/pic/BG.jpg") no-repeat;
background: url('../assets/loginImg/loginBg.png') no-repeat;
background-size: 100% 100%;
}
@ -573,7 +586,8 @@ getWeather () {
width: 100%;
height: 100%;
border-radius: 20px;
border: 1px solid rgb(231, 231, 231);
background: rgb(9,41,43);
border: none;
.el-input-group__prepend {
background: transparent;
border: none;
@ -583,6 +597,13 @@ getWeather () {
border: none;
}
}
/deep/ .el-checkbox{
color: #fff;
}
/deep/ .el-checkbox__inner{
background: transparent;
border: 1px solid rgb(0,139,146)
}
.login-wrap {
position: absolute;
width: 100%;
@ -591,11 +612,11 @@ getWeather () {
background: url('~@/assets/img/newlogin-bg.png');
}
.ms-login {
width: 24%;
height: 59%;
width: 31%;
height: 51%;
position: absolute;
left: 58.44%;
top: 23.2%;
left: 35.44%;
top: 22.2%;
.ms-title {
width: 100%;
height: 42px;
@ -607,32 +628,42 @@ getWeather () {
width: 100%;
height: calc(100% - 75px);
border-radius: 20px;
background: #ffffff;
background: url('../assets/loginImg/kuang.png') no-repeat;
background-size: 100% 100%;
overflow: hidden;
display: flex;
flex-flow: column nowrap;
align-items: center;
.welcome {
margin-top: 28px;
font-size: 16px;
font-size: 20px;
letter-spacing: 1px;
// color: black;
color: #fff;
font-weight: 700
}
.ms-content {
width: 80%;
margin-top: 25px;
margin-top: 33px;
}
.login-btn {
width: 80%;
width: 75.5%;
height: 63px;
margin-top: 45px;
/deep/ .el-button {
width: 100%;
border-radius: 20px;
height: 100%;
// border-radius: 20px;
display: flex;
justify-content: center;
background: url("../assets/loginImg/loginBtn.png") no-repeat;
background-size: 100% 100%;
border: none;
align-items: center;
span {
letter-spacing: 15px;
margin-left: 15px;
font-size: 18px;
font-weight: 600;
}
}
}

View File

@ -9,10 +9,13 @@
</div>
<div class="titRight">
<span>{{dateNew}}&nbsp;{{getWeek}}&nbsp;{{time}}</span>
<span></span>
<!-- <span></span> -->
<span>&nbsp;&nbsp;天气&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span>{{weatherItem.weather}} &nbsp;{{weatherItem.temperature}}</span>
</div>
<div class="closeIndex" @click="closeindex">
<img src="../assets/pic/closeIndex.png" alt="">
</div>
</div>
</div>
<div @click="disBox" ref="screenBox" :class="!boxNone ? 'screenBox dh1' : 'screenBox dh2'"
@ -476,6 +479,9 @@ export default {
break;
}
},
closeindex(){
this.$router.push('/')
},
//
getTime(){
let myDate = new Date()
@ -884,6 +890,9 @@ export default {
position: absolute;
left: 50%;
transform: translateX(-50%);
::-webkit-scrollbar {
display: none;
}
}
.securityCheck {
@ -1129,7 +1138,10 @@ export default {
background-size: 100% 100%;
}
}
.closeIndex{
width: 100px;
height: 80px;
}
}
.title {

View File

@ -542,6 +542,7 @@ export default {
}
},
switchDiv() {
let that = this
if (this.type) {
this.type = false;
this.$refs.switchBtn.style.display = "none";
@ -549,14 +550,15 @@ export default {
this.type = true;
setTimeout(() => {
//
this.$refs.switchBtn.style.display = "block";
that.$refs.switchBtn.style.display = "block";
}, 800)
}
}
},
mounted() {
this.switchDiv(); window.onresize = () => {
// this.switchDiv();
window.onresize = () => {
return (() => {
let h = document.documentElement.clientHeight || document.body.clientHeight;
this.vdaH = h - 0 + "px";
@ -888,6 +890,9 @@ export default {
position: absolute;
left: 50%;
transform: translateX(-50%);
::-webkit-scrollbar {
display: none;
}
}
.securityCheck {

View File

@ -1,5 +1,5 @@
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-mobile { width: 100%; height: 100% }
#unity-canvas { background: #231F20 }