|
@@ -217,43 +217,7 @@
|
|
</b-modal>
|
|
</b-modal>
|
|
|
|
|
|
<!-- loginModal -->
|
|
<!-- loginModal -->
|
|
- <b-modal id="loginModal" title="登 陆">
|
|
|
|
- <template v-slot:modal-title>
|
|
|
|
- <div class="align-center"><i class="fa fa-id-card" aria-hidden="true"></i> Login</div>
|
|
|
|
- </template>
|
|
|
|
- <b-form @submit.prevent="submit_loginModal()">
|
|
|
|
- <b-form-group label="账号:" label-for="input-2" label-cols-sm="2">
|
|
|
|
- <b-form-input
|
|
|
|
- id="input-user"
|
|
|
|
- v-model="login.account"
|
|
|
|
- required
|
|
|
|
- placeholder="Enter account"
|
|
|
|
- >
|
|
|
|
- </b-form-input>
|
|
|
|
- </b-form-group>
|
|
|
|
-
|
|
|
|
- <b-form-group label="密码:" label-for="input-password" label-cols-sm="2" >
|
|
|
|
- <b-form-input
|
|
|
|
- id="input-password"
|
|
|
|
- v-model="login.password"
|
|
|
|
- type="password"
|
|
|
|
- required
|
|
|
|
- placeholder="Enter password"
|
|
|
|
- ></b-form-input>
|
|
|
|
- <b-form-invalid-feedback :state="login.isRight">
|
|
|
|
- <b-icon icon="x-octagon-fill"></b-icon> {{login.errorMessage}}
|
|
|
|
- </b-form-invalid-feedback>
|
|
|
|
- </b-form-group>
|
|
|
|
- <div class="text-center">
|
|
|
|
- <b-button type="reset" variant="danger" >重置</b-button>
|
|
|
|
- <b-button type="submit" variant="primary">提交</b-button>
|
|
|
|
- </div>
|
|
|
|
- </b-form>
|
|
|
|
- <template v-slot:modal-footer>
|
|
|
|
- <b-button type="reset" variant="secondary" @click="$bvModal.hide('loginModal')">关闭</b-button>
|
|
|
|
- </template>
|
|
|
|
- </b-modal>
|
|
|
|
-
|
|
|
|
|
|
+ <login-card />
|
|
<!-- Alert -->
|
|
<!-- Alert -->
|
|
<div id="alert"
|
|
<div id="alert"
|
|
v-show="alert.dismissCountDown > 0"
|
|
v-show="alert.dismissCountDown > 0"
|
|
@@ -267,8 +231,10 @@
|
|
// eventBus公共实例
|
|
// eventBus公共实例
|
|
import bus from '../../static/js/eventBus'
|
|
import bus from '../../static/js/eventBus'
|
|
import cookie from '../../static/js/cookieJS'
|
|
import cookie from '../../static/js/cookieJS'
|
|
|
|
+import LoginCard from '../layouts/widgets/LoginCard'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
+ components: { LoginCard },
|
|
name: 'PC',
|
|
name: 'PC',
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -682,51 +648,51 @@ export default {
|
|
return isSuccess
|
|
return isSuccess
|
|
},
|
|
},
|
|
|
|
|
|
- /**
|
|
|
|
- * @description: loginModel提交(submit)事件
|
|
|
|
- * @returns {void}
|
|
|
|
- */
|
|
|
|
- submit_loginModal: function (e) {
|
|
|
|
- var that = this
|
|
|
|
- this.postLoginForm()
|
|
|
|
- .then(res => {
|
|
|
|
- if (res) {
|
|
|
|
- // 登陆成功,设置登陆状态
|
|
|
|
- that.$store.commit('userLogin', {
|
|
|
|
- name: res.name,
|
|
|
|
- uid: res.uid
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- // 设置token到cookie
|
|
|
|
- cookie.setCookie(res.token, 0.5, 'token')
|
|
|
|
-
|
|
|
|
- // 隐藏modal
|
|
|
|
- that.$bvModal.hide('loginModal')
|
|
|
|
- } else {
|
|
|
|
- that.login.isRight = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * @description:向后端提交登陆表单
|
|
|
|
- * @returns {void}
|
|
|
|
- */
|
|
|
|
- postLoginForm: async function () {
|
|
|
|
- var response
|
|
|
|
-
|
|
|
|
- await this.$axios
|
|
|
|
- .post('admin/login', {
|
|
|
|
- form: {
|
|
|
|
- account: this.login.account,
|
|
|
|
- password: this.login.password
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- .then(res => {
|
|
|
|
- response = res.data
|
|
|
|
- })
|
|
|
|
- return response
|
|
|
|
- },
|
|
|
|
|
|
+ // /**
|
|
|
|
+ // * @description: loginModel提交(submit)事件
|
|
|
|
+ // * @returns {void}
|
|
|
|
+ // */
|
|
|
|
+ // submit_loginModal: function (e) {
|
|
|
|
+ // var that = this
|
|
|
|
+ // this.postLoginForm()
|
|
|
|
+ // .then(res => {
|
|
|
|
+ // if (res) {
|
|
|
|
+ // // 登陆成功,设置登陆状态
|
|
|
|
+ // that.$store.commit('userLogin', {
|
|
|
|
+ // name: res.name,
|
|
|
|
+ // uid: res.uid
|
|
|
|
+ // })
|
|
|
|
+
|
|
|
|
+ // // 设置token到cookie
|
|
|
|
+ // cookie.setCookie(res.token, 0.5, 'token')
|
|
|
|
+
|
|
|
|
+ // // 隐藏modal
|
|
|
|
+ // that.$bvModal.hide('loginModal')
|
|
|
|
+ // } else {
|
|
|
|
+ // that.login.isRight = false
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
|
|
+
|
|
|
|
+ // /**
|
|
|
|
+ // * @description:向后端提交登陆表单
|
|
|
|
+ // * @returns {void}
|
|
|
|
+ // */
|
|
|
|
+ // postLoginForm: async function () {
|
|
|
|
+ // var response
|
|
|
|
+
|
|
|
|
+ // await this.$axios
|
|
|
|
+ // .post('admin/login', {
|
|
|
|
+ // form: {
|
|
|
|
+ // account: this.login.account,
|
|
|
|
+ // password: this.login.password
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // .then(res => {
|
|
|
|
+ // response = res.data
|
|
|
|
+ // })
|
|
|
|
+ // return response
|
|
|
|
+ // },
|
|
|
|
|
|
/**
|
|
/**
|
|
* @description:刷新列表,地图
|
|
* @description:刷新列表,地图
|
|
@@ -929,8 +895,8 @@ export default {
|
|
}
|
|
}
|
|
#btn{
|
|
#btn{
|
|
position:absolute;
|
|
position:absolute;
|
|
- right:10px;
|
|
|
|
- top:10px;
|
|
|
|
|
|
+ right:5px;
|
|
|
|
+ bottom: 10px;
|
|
z-index: 10;
|
|
z-index: 10;
|
|
float:right;
|
|
float:right;
|
|
}
|
|
}
|