| | |
| | | <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') |
| | | |
| | | }) |
| | |
| | | </el-form-item> |
| | | <!-- 登录按钮 --> |
| | | <el-form-item> |
| | | <el-button type="primary" @click.enter="onLogin(user)" |
| | | >登 录</el-button |
| | | > |
| | | <el-button type="primary" @click.enter="onLogin(user)">登 录</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </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", |
| | |
| | | }, |
| | | errors: null, |
| | | newAxios: null, |
| | | }; |
| | | } |
| | | }, |
| | | created() { |
| | | var that = this; |
| | | var that = this |
| | | |
| | | this.newAxios = axios.create({ |
| | | baseURL: "http://182.106.212.58:8013/api", |
| | |
| | | Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0", |
| | | "Tenant-Id": "000000", |
| | | }, |
| | | }); |
| | | }) |
| | | |
| | | document.onkeydown = (e) => { |
| | | const _key = window.event.keyCode; |
| | | const _key = window.event.keyCode |
| | | if (_key === 13) { |
| | | that.onLogin(that.user); |
| | | that.onLogin(that.user) |
| | | } |
| | | }; |
| | | } |
| | | }, |
| | | methods: { |
| | | onLogin({ username, password }) { |
| | | this.$refs.formName.validate((valid) => { |
| | | if (valid) { |
| | | nprogress.start(); |
| | | nprogress.start() |
| | | |
| | | this.newAxios({ |
| | | method: "POST", |
| | |
| | | }, |
| | | }).then((res) => { |
| | | if (res.data.access_token) { |
| | | this.$store.commit("setUser", res.data); |
| | | this.$router.push({ path: "/" }); |
| | | this.$store.commit("setUser", res.data) |
| | | this.$router.push({ path: "/" }) |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "用户名或密码不正确,请重新输入", |
| | | }); |
| | | }) |
| | | } |
| | | nprogress.done(); |
| | | }); |
| | | nprogress.done() |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | }, |
| | | }; |