| | |
| | | <el-option |
| | | v-for="(item, index) in plotList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :label="item.landName" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | |
| | | |
| | | <script> |
| | | |
| | | import { |
| | | getLandList |
| | | } from '@/api/land/land' |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | plotName: '非凡渔业专业合作社', |
| | | plotList: [{ |
| | | name: '1号', |
| | | id: 1 |
| | | }, { |
| | | name: '2号', |
| | | id: 2 |
| | | }, { |
| | | name: '3号', |
| | | id: 3 |
| | | }, { |
| | | name: '4号', |
| | | id: 4 |
| | | }], |
| | | plotNameObj: {}, |
| | | plotName: "", |
| | | plotList: [], |
| | | currentDetails: {}, |
| | | echartsBosShow: false |
| | | } |
| | | }, |
| | | created () { |
| | | this.getParams() |
| | | this.getLandList() |
| | | }, |
| | | mounted () { |
| | | |
| | | // this.getLandList() |
| | | }, |
| | | methods: { |
| | | prev () { |
| | |
| | | this.initLine('EchartsBox', '单位:℃', ['03-14 16:00', '03-15 16:00', '03-16 16:00', '03-17 16:00', '03-18 16:00', '03-19 16:00'], [20, 24, 23, 25, 30, 18]) |
| | | |
| | | this.echartsBosShow = true |
| | | }, |
| | | getLandList () { |
| | | // var params = { |
| | | // userid: this.$store.state.user |
| | | // } |
| | | // var dept_id = this.$store.state.user.user.dept_id |
| | | getLandList(this.$store.state.user.user.dept_id).then((res) => { |
| | | console.log(res.data.data) |
| | | this.plotList = res.data.data |
| | | this.plotNameObj = this.plotList[0] |
| | | this.plotName = this.plotNameObj.id |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | // 获取在线设备数量 |
| | | getStationAndVideoCount () { |
| | | var that = this |
| | | console.log(21313) |
| | | getStationAndVideoCount().then((res) => { |
| | | if (JSON.stringify(res.data) != "{}" && res.data.data) { |
| | | that.mTotalObj = res.data.data |
| | | } |
| | | console.log('2311111111112131321231113', res) |
| | | that.initRightPie('EquipmentEcharts') |
| | | |
| | | }) |
| | |
| | | <template> |
| | | <div class="auth-page"> |
| | | <div class="title"></div> |
| | | <div class="container"> |
| | | <h1 class="text-xs-center">用户登录</h1> |
| | | <div class="loginbody"> |
| | | <el-form :model="user" ref="formName" status-icon :rules="rules"> |
| | | <!-- 用户账号 --> |
| | | <span class="input">用户名:</span> |
| | | <el-form-item prop="username"> |
| | | <el-input |
| | | v-model="user.username" |
| | | prefix-icon="el-icon-user" |
| | | placeholder="请输入您的用户名" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- 用户密码 --> |
| | | <span class="input">密码:</span> |
| | | <el-form-item prop="password"> |
| | | <el-input |
| | | type="password" |
| | | v-model="user.password" |
| | | prefix-icon="el-icon-lock" |
| | | placeholder="请输入您密码" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- 登录按钮 --> |
| | | <el-form-item> |
| | | <el-button type="primary" @click.enter="onLogin(user)" |
| | | >登 录</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="auth-page"> |
| | | <div class="title"></div> |
| | | <div class="container"> |
| | | <h1 class="text-xs-center">用户登录</h1> |
| | | <div class="loginbody"> |
| | | <el-form :model="user" ref="formName" status-icon :rules="rules"> |
| | | <!-- 用户账号 --> |
| | | <span class="input">用户名:</span> |
| | | <el-form-item prop="username"> |
| | | <el-input |
| | | v-model="user.username" |
| | | prefix-icon="el-icon-user" |
| | | placeholder="请输入您的用户名" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- 用户密码 --> |
| | | <span class="input">密码:</span> |
| | | <el-form-item prop="password"> |
| | | <el-input |
| | | type="password" |
| | | v-model="user.password" |
| | | prefix-icon="el-icon-lock" |
| | | placeholder="请输入您密码" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- 登录按钮 --> |
| | | <el-form-item> |
| | | <el-button type="primary" @click.enter="onLogin(user)">登 录</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import nprogress from "nprogress"; |
| | | import md5 from "js-md5"; |
| | | import axios from "axios"; |
| | | import nprogress from "nprogress" |
| | | import md5 from "js-md5" |
| | | import axios from "axios" |
| | | import { EventBus } from "../../eventBus/event-bus" |
| | | |
| | | export default { |
| | | name: "AppRegister", |
| | | data() { |
| | | return { |
| | | user: { |
| | | username: "", |
| | | password: "", |
| | | }, |
| | | rules: { |
| | | username: [ |
| | | { required: true, message: "用户名不能为空", trigger: "blur" }, |
| | | { |
| | | min: 3, |
| | | max: 10, |
| | | message: "用户账号长度在3~10个字符之间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | password: [ |
| | | { required: true, message: "密码不能为空", trigger: "blur" }, |
| | | { |
| | | min: 3, |
| | | max: 10, |
| | | message: "用户密码长度在3~10个字符之间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | errors: null, |
| | | newAxios: null, |
| | | }; |
| | | }, |
| | | created() { |
| | | var that = this; |
| | | |
| | | this.newAxios = axios.create({ |
| | | baseURL: "http://182.106.212.58:8013/api", |
| | | timeout: 600000, |
| | | headers: { |
| | | Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0", |
| | | "Tenant-Id": "000000", |
| | | }, |
| | | }); |
| | | |
| | | document.onkeydown = (e) => { |
| | | const _key = window.event.keyCode; |
| | | if (_key === 13) { |
| | | that.onLogin(that.user); |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | onLogin({ username, password }) { |
| | | this.$refs.formName.validate((valid) => { |
| | | if (valid) { |
| | | nprogress.start(); |
| | | |
| | | this.newAxios({ |
| | | method: "POST", |
| | | url: "/blade-auth/oauth/token", |
| | | params: { |
| | | username: username, |
| | | password: md5(password), |
| | | tenantId: "000000", |
| | | name: "AppRegister", |
| | | data () { |
| | | return { |
| | | user: { |
| | | username: "", |
| | | password: "", |
| | | }, |
| | | }).then((res) => { |
| | | if (res.data.access_token) { |
| | | this.$store.commit("setUser", res.data); |
| | | this.$router.push({ path: "/" }); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "用户名或密码不正确,请重新输入", |
| | | }); |
| | | } |
| | | nprogress.done(); |
| | | }); |
| | | rules: { |
| | | username: [ |
| | | { required: true, message: "用户名不能为空", trigger: "blur" }, |
| | | { |
| | | min: 3, |
| | | max: 10, |
| | | message: "用户账号长度在3~10个字符之间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | password: [ |
| | | { required: true, message: "密码不能为空", trigger: "blur" }, |
| | | { |
| | | min: 3, |
| | | max: 10, |
| | | message: "用户密码长度在3~10个字符之间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | errors: null, |
| | | newAxios: null, |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | created () { |
| | | var that = this |
| | | |
| | | this.newAxios = axios.create({ |
| | | baseURL: "http://182.106.212.58:8013/api", |
| | | timeout: 600000, |
| | | headers: { |
| | | Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0", |
| | | "Tenant-Id": "000000", |
| | | }, |
| | | }) |
| | | |
| | | document.onkeydown = (e) => { |
| | | const _key = window.event.keyCode |
| | | if (_key === 13) { |
| | | that.onLogin(that.user) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | onLogin ({ username, password }) { |
| | | this.$refs.formName.validate((valid) => { |
| | | if (valid) { |
| | | nprogress.start() |
| | | |
| | | this.newAxios({ |
| | | method: "POST", |
| | | url: "/blade-auth/oauth/token", |
| | | params: { |
| | | username: username, |
| | | password: md5(password), |
| | | tenantId: "000000", |
| | | }, |
| | | }).then((res) => { |
| | | if (res.data.access_token) { |
| | | this.$store.commit("setUser", res.data) |
| | | this.$router.push({ path: "/" }) |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "用户名或密码不正确,请重新输入", |
| | | }) |
| | | } |
| | | nprogress.done() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .auth-page { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background-image: url(../../../public/img/bg/group16@2x.png); |
| | | background-size: 100% 100%; |
| | | margin: 0; |
| | | padding: 0; |
| | | |
| | | .title { |
| | | width: 1389px; |
| | | height: 115px; |
| | | background-image: url(../../../public/img/bg/login_title@2x.png); |
| | | background-size: 100% 100%; |
| | | margin: 99px 264px 0px 266px; |
| | | } |
| | | .container { |
| | | position: absolute; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: 317px auto; |
| | | width: 653px; |
| | | height: 552px; |
| | | background-image: url(../../../public/img/bg/rectangle11@2x.png); |
| | | background-image: url(../../../public/img/bg/group16@2x.png); |
| | | background-size: 100% 100%; |
| | | border-radius: 10px; |
| | | letter-spacing: 100; |
| | | margin: 0; |
| | | padding: 0; |
| | | |
| | | h1 { |
| | | margin: 54px 244px 0px 243px; |
| | | width: 166px; |
| | | text-align: left; |
| | | width: 166px; |
| | | height: 30px; |
| | | font-size: 42px; |
| | | font-family: PangMenZhengDao; |
| | | font-weight: 400; |
| | | color: #ffffff; |
| | | line-height: 30px; |
| | | letter-spacing: 2px; |
| | | .title { |
| | | width: 1389px; |
| | | height: 115px; |
| | | background-image: url(../../../public/img/bg/login_title@2x.png); |
| | | background-size: 100% 100%; |
| | | margin: 99px 264px 0px 266px; |
| | | } |
| | | .container { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: 317px auto; |
| | | width: 653px; |
| | | height: 552px; |
| | | background-image: url(../../../public/img/bg/rectangle11@2x.png); |
| | | background-size: 100% 100%; |
| | | border-radius: 10px; |
| | | letter-spacing: 100; |
| | | |
| | | .loginbody { |
| | | position: absolute; |
| | | top: 120px; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | width: 72%; |
| | | // margin: auto; |
| | | margin-left: 51px; |
| | | |
| | | .el-form-item { |
| | | text-align: center; |
| | | |
| | | /deep/.el-input__inner { |
| | | width: 548px; |
| | | height: 59px; |
| | | background: #0c2d49; |
| | | opacity: 0.5; |
| | | margin-bottom: 15px; |
| | | font-size: 21px; |
| | | } |
| | | /deep/.el-input--prefix .el-input__inner { |
| | | padding-left: 40px; |
| | | } |
| | | /deep/.el-input__inner:focus { |
| | | border: 2px solid #22b4cb; |
| | | opacity: 0.8; |
| | | color: #fff; |
| | | } |
| | | /deep/.el-form-item__error { |
| | | color: #f00; |
| | | line-height: 0; |
| | | font-size: 15px; |
| | | opacity: 0.8; |
| | | letter-spacing: 2px; |
| | | font-weight: 700; |
| | | } |
| | | /deep/.el-input__icon { |
| | | height: 91%; |
| | | width: 34px; |
| | | } |
| | | /deep/.el-icon-user::before, |
| | | /deep/.el-icon-lock::before { |
| | | font-size: 22px; |
| | | } |
| | | /deep/.el-form-item.is-error, |
| | | /deep/.el-input__validateIcon { |
| | | font-size: 22px; |
| | | } |
| | | /deep/.el-input__suffix { |
| | | right: -48px; |
| | | } |
| | | /deep/.el-input input::-webkit-input-placeholder { |
| | | color: #ffffff; |
| | | font-size: 21px; |
| | | opacity: 0.5; |
| | | line-height: 27px; |
| | | } |
| | | /deep/.el-input input::-moz-input-placeholder { |
| | | color: #ffffff; |
| | | font-size: 21px; |
| | | opacity: 0.5; |
| | | } |
| | | /deep/.el-input input::-ms-input-placeholder { |
| | | color: #ffffff; |
| | | font-size: 21px; |
| | | opacity: 0.5; |
| | | line-height: 27px; |
| | | h1 { |
| | | margin: 54px 244px 0px 243px; |
| | | width: 166px; |
| | | text-align: left; |
| | | width: 166px; |
| | | height: 30px; |
| | | font-size: 42px; |
| | | font-family: PangMenZhengDao; |
| | | font-weight: 400; |
| | | color: #ffffff; |
| | | line-height: 30px; |
| | | letter-spacing: 2px; |
| | | } |
| | | |
| | | .el-button { |
| | | width: 548px; |
| | | height: 59px; |
| | | background: linear-gradient( |
| | | 90deg, |
| | | rgba(0, 249, 247, 0.54), |
| | | rgba(0, 182, 249, 0.54) |
| | | ); |
| | | box-shadow: 0px 2px 20px 1px rgba(1, 25, 70, 0.46); |
| | | font-size: 29px; |
| | | margin-top: 25px; |
| | | } |
| | | } |
| | | .loginbody { |
| | | position: absolute; |
| | | top: 120px; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | width: 72%; |
| | | // margin: auto; |
| | | margin-left: 51px; |
| | | |
| | | .input { |
| | | display: inline-block; |
| | | width: 100px; |
| | | height: 23px; |
| | | font-size: 24px; |
| | | font-family: PingFang SC; |
| | | color: #ffffff; |
| | | margin-bottom: 21px; |
| | | } |
| | | .el-form-item { |
| | | text-align: center; |
| | | |
| | | /deep/.el-input__inner { |
| | | width: 548px; |
| | | height: 59px; |
| | | background: #0c2d49; |
| | | opacity: 0.5; |
| | | margin-bottom: 15px; |
| | | font-size: 21px; |
| | | } |
| | | /deep/.el-input--prefix .el-input__inner { |
| | | padding-left: 40px; |
| | | } |
| | | /deep/.el-input__inner:focus { |
| | | border: 2px solid #22b4cb; |
| | | opacity: 0.8; |
| | | color: #fff; |
| | | } |
| | | /deep/.el-form-item__error { |
| | | color: #f00; |
| | | line-height: 0; |
| | | font-size: 15px; |
| | | opacity: 0.8; |
| | | letter-spacing: 2px; |
| | | font-weight: 700; |
| | | } |
| | | /deep/.el-input__icon { |
| | | height: 91%; |
| | | width: 34px; |
| | | } |
| | | /deep/.el-icon-user::before, |
| | | /deep/.el-icon-lock::before { |
| | | font-size: 22px; |
| | | } |
| | | /deep/.el-form-item.is-error, |
| | | /deep/.el-input__validateIcon { |
| | | font-size: 22px; |
| | | } |
| | | /deep/.el-input__suffix { |
| | | right: -48px; |
| | | } |
| | | /deep/.el-input input::-webkit-input-placeholder { |
| | | color: #ffffff; |
| | | font-size: 21px; |
| | | opacity: 0.5; |
| | | line-height: 27px; |
| | | } |
| | | /deep/.el-input input::-moz-input-placeholder { |
| | | color: #ffffff; |
| | | font-size: 21px; |
| | | opacity: 0.5; |
| | | } |
| | | /deep/.el-input input::-ms-input-placeholder { |
| | | color: #ffffff; |
| | | font-size: 21px; |
| | | opacity: 0.5; |
| | | line-height: 27px; |
| | | } |
| | | |
| | | .el-button { |
| | | width: 548px; |
| | | height: 59px; |
| | | background: linear-gradient( |
| | | 90deg, |
| | | rgba(0, 249, 247, 0.54), |
| | | rgba(0, 182, 249, 0.54) |
| | | ); |
| | | box-shadow: 0px 2px 20px 1px rgba(1, 25, 70, 0.46); |
| | | font-size: 29px; |
| | | margin-top: 25px; |
| | | } |
| | | } |
| | | |
| | | .input { |
| | | display: inline-block; |
| | | width: 100px; |
| | | height: 23px; |
| | | font-size: 24px; |
| | | font-family: PingFang SC; |
| | | color: #ffffff; |
| | | margin-bottom: 21px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |