Browse Source

Merge branch 'dev-220411' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-220411

shibei_master
jiangyy 3 years ago
parent
commit
075c98d317
  1. 18
      src/assets/scss/modules/visual/people.scss
  2. 45
      src/assets/scss/pages/loginWork.scss
  3. 10
      src/assets/scss/people-info.scss
  4. 4
      src/views/components/editResi.vue
  5. 4
      src/views/components/resiForm.vue
  6. 32
      src/views/modules/base/resi.vue
  7. 2
      src/views/modules/shequ/cpts/people-more.vue
  8. 2
      src/views/modules/visual/basicinfo/cpts/people-more.vue
  9. 155
      src/views/pages/login copy.vue
  10. 301
      src/views/pages/login.vue

18
src/assets/scss/modules/visual/people.scss

@ -1,6 +1,6 @@
@import '../../c/config'; @import "../../c/config";
@import '../../c/function'; @import "../../c/function";
@import './c/common'; @import "./c/common";
.g-cpt { .g-cpt {
display: flex; display: flex;
@ -227,13 +227,13 @@
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
line-height: 24px; line-height: 24px;
margin: 20px 0; margin: 15px 0;
&::before { &::before {
position: absolute; position: absolute;
left: 0; left: 0;
top: 9px; top: 9px;
content: ''; content: "";
display: block; display: block;
width: 7px; width: 7px;
height: 7px; height: 7px;
@ -264,7 +264,7 @@
.tab { .tab {
margin: 0 5px; margin: 0 5px;
min-width: 76px; min-width: 80px;
padding: 0 10px; padding: 0 10px;
height: 36px; height: 36px;
background: rgba(255, 255, 255, 0); background: rgba(255, 255, 255, 0);
@ -272,7 +272,7 @@
box-shadow: 0 0 10px 0 inset #1257c9; box-shadow: 0 0 10px 0 inset #1257c9;
border-radius: 2px; border-radius: 2px;
text-align: center; text-align: center;
font-size: 18px; font-size: 17px;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
@ -548,7 +548,7 @@
&:hover { &:hover {
&::before { &::before {
content: ''; content: "";
position: absolute; position: absolute;
display: block; display: block;
left: 0; left: 0;
@ -560,7 +560,7 @@
} }
&::after { &::after {
content: ''; content: "";
position: absolute; position: absolute;
display: block; display: block;
left: 15px; left: 15px;

45
src/assets/scss/pages/loginWork.scss

@ -166,29 +166,30 @@
} }
} }
.div_row { .m-pop {
height: 50px; height: auto;
text-align: center;
line-height: 50px; .div_row {
height: 50px;
/* width: 100px; */ text-align: center;
/* background-color: rgb(241, 241, 241); */ line-height: 50px;
&:hover { &:hover {
color: rgb(2, 119, 173); color: rgb(2, 119, 173);
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
.i_icon { .i_icon {
width: 15px; width: 15px;
height: 15px; height: 15px;
margin-right: 10px; margin-right: 10px;
float: left; float: left;
} }
.span_name { .span_name {
font-size: 18px; font-size: 18px;
cursor: pointer; cursor: pointer;
/* color: rgb(37, 156, 235); */ /* color: rgb(37, 156, 235); */
}
} }
} }

10
src/assets/scss/people-info.scss

@ -64,7 +64,7 @@
font-weight: 400; font-weight: 400;
color: #333; color: #333;
line-height: 24px; line-height: 24px;
margin: 20px 0; margin: 15px 0;
&::before { &::before {
position: absolute; position: absolute;
@ -94,14 +94,18 @@
padding-left: 20px; padding-left: 20px;
.tab-btn { .tab-btn {
margin: 0 5px;
width: 30px; width: 30px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
padding: 10px 0;
border-radius: 3px;
background-color: rgba(#000, 0.3);
} }
.tab { .tab {
margin: 0 5px; margin: 0 5px;
min-width: 76px; min-width: 80px;
padding: 0 10px; padding: 0 10px;
height: 36px; height: 36px;
background: #fff; background: #fff;
@ -109,7 +113,7 @@
box-shadow: 0 0 10px 0 inset #ddd; box-shadow: 0 0 10px 0 inset #ddd;
border-radius: 2px; border-radius: 2px;
text-align: center; text-align: center;
font-size: 18px; font-size: 17px;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #333; color: #333;

4
src/views/components/editResi.vue

@ -803,7 +803,7 @@ export default {
} }
} }
.resi-cell-value .resi-cell-input { .resi-cell-value .resi-cell-input {
max-width: 180px; max-width: 190px;
} }
</style> </style>
@ -841,7 +841,7 @@ export default {
} }
} }
.resi-cell-select { .resi-cell-select {
width: 180px; width: 190px;
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
&-middle { &-middle {

4
src/views/components/resiForm.vue

@ -759,7 +759,7 @@ export default {
} }
} }
.resi-cell-value .resi-cell-input { .resi-cell-value .resi-cell-input {
max-width: 180px; max-width: 190px;
} }
.resi-cell-value { .resi-cell-value {
:deep .el-col { :deep .el-col {
@ -787,7 +787,7 @@ export default {
} }
} }
.resi-cell-select { .resi-cell-select {
width: 180px; width: 190px;
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
&-middle { &-middle {

32
src/views/modules/base/resi.vue

@ -259,6 +259,10 @@
@closed="diaClose"> @closed="diaClose">
<resi-change-record ref="ref_changerecord"></resi-change-record> <resi-change-record ref="ref_changerecord"></resi-change-record>
</el-dialog> </el-dialog>
<people-more v-if="showedPeopleMoreInfo && lookInfo.userId"
:userId="lookInfo.userId"
:gridName="lookInfo.gridName"
@close="handleCancleLook" />
</div> </div>
</template> </template>
@ -272,6 +276,7 @@ import axios from 'axios'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import resiTransfer from '../../components/resiTransfer.vue' import resiTransfer from '../../components/resiTransfer.vue'
import resiChangeRecord from '../../components/resiChangeRecord.vue' import resiChangeRecord from '../../components/resiChangeRecord.vue'
import peopleMore from "@/views/modules/shequ/cpts/people-more";
export default { export default {
components: { components: {
@ -279,7 +284,8 @@ export default {
resiForm, resiForm,
editResi, editResi,
resiTransfer, resiTransfer,
resiChangeRecord resiChangeRecord,
peopleMore
}, },
data () { data () {
return { return {
@ -297,6 +303,8 @@ export default {
isIndeterminate: false, isIndeterminate: false,
dialogEditVisible: false, dialogEditVisible: false,
dialogVisible: false, dialogVisible: false,
//
showedPeopleMoreInfo: false,
uploadUlr: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel', uploadUlr: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel',
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
@ -324,6 +332,10 @@ export default {
tranferShow: false, tranferShow: false,
changeRecordShow: false, changeRecordShow: false,
lookInfo: {
userId: '',
gridName: ''
}
} }
}, },
props: { props: {
@ -497,7 +509,7 @@ export default {
item.options.forEach((n) => { item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label if (n.value === row[item.columnName]) _val = n.label
}) })
if (row[item.columnName] == '0') _val = '--' if (row[item.columnName] == '0') return _val = ''
} }
return _val || row[item.columnName] return _val || row[item.columnName]
@ -696,10 +708,18 @@ export default {
console.log(tab, event) console.log(tab, event)
}, },
async handleLook (row) { async handleLook (row) {
this.disabled = true this.lookInfo.userId = row.icResiUserId
this.editAgencyId = row.ORG_ID this.lookInfo.gridName = row.GRID_ID
await this.getFormList('edit') this.showedPeopleMoreInfo = true;
this.getrowInfo(row.icResiUserId) // this.disabled = true
// this.editAgencyId = row.ORG_ID
// await this.getFormList('edit')
// this.getrowInfo(row.icResiUserId)
},
handleCancleLook() {
this.lookInfo.userId = ''
this.lookInfo.gridName = ''
this.showedPeopleMoreInfo = false;
}, },
async handleEdit (row) { async handleEdit (row) {
this.disabled = false this.disabled = false

2
src/views/modules/shequ/cpts/people-more.vue

@ -23,7 +23,7 @@
<span>{{ xiaoquName }}</span> <span>{{ xiaoquName }}</span>
</div> </div>
<div class="item" v-if="index == 0"> <div class="item" v-if="index == 0">
<span class="item-field">所属楼</span> <span class="item-field">所属楼</span>
<span>{{ louName }}-{{ danyuanName }}</span> <span>{{ louName }}-{{ danyuanName }}</span>
</div> </div>
<div class="item" v-if="index == 0"> <div class="item" v-if="index == 0">

2
src/views/modules/visual/basicinfo/cpts/people-more.vue

@ -27,7 +27,7 @@
</div> </div>
<div class="item" <div class="item"
v-if="index == 0"> v-if="index == 0">
<span class="item-field">所属楼</span> <span class="item-field">所属楼</span>
<span>{{ louName }}-{{ danyuanName }}</span> <span>{{ louName }}-{{ danyuanName }}</span>
</div> </div>
<div class="item" <div class="item"

155
src/views/pages/login copy.vue

@ -1,155 +0,0 @@
<template>
<div class="aui-wrapper aui-page__login">
<div class="aui-content__wrapper">
<main class="aui-content">
<div class="login-header">
<h2 class="login-brand">{{ $t('brand.lg') }}</h2>
</div>
<div class="login-body">
<h3 class="login-title">{{ $t('login.title') }}</h3>
<el-form :model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
status-icon>
<!-- <el-form-item>
<el-select v-model="$i18n.locale"
class="w-percent-100">
<el-option v-for="(val, key) in i18nMessages"
:key="key"
:label="val._lang"
:value="key"></el-option>
</el-select>
</el-form-item> -->
<el-form-item prop="phone">
<el-input v-model="dataForm.phone"
placeholder="手机号">
<span slot="prefix"
class="el-input__icon">
<svg class="icon-svg"
aria-hidden="true">
<use xlink:href="#icon-user"></use>
</svg>
</span>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="dataForm.password"
type="password"
:placeholder="$t('login.password')">
<span slot="prefix"
class="el-input__icon">
<svg class="icon-svg"
aria-hidden="true">
<use xlink:href="#icon-lock"></use>
</svg>
</span>
</el-input>
</el-form-item>
<el-form-item prop="captcha">
<el-row :gutter="20">
<el-col :span="14">
<el-input v-model="dataForm.captcha"
:placeholder="$t('login.captcha')">
<span slot="prefix"
class="el-input__icon">
<svg class="icon-svg"
aria-hidden="true">
<use xlink:href="#icon-safetycertificate"></use>
</svg>
</span>
</el-input>
</el-col>
<el-col :span="10"
class="login-captcha">
<img :src="captchaPath"
@click="getCaptcha()">
</el-col>
</el-row>
</el-form-item>
<el-form-item>
<el-button type="primary"
@click="dataFormSubmitHandle()"
class="w-percent-100">{{ $t('login.title') }}</el-button>
</el-form-item>
</el-form>
</div>
<div class="login-footer">
<p>
<a href="https://demo.cloud.renren.io/renren-cloud"
target="_blank">{{ $t('login.demo') }}</a>
</p>
<!-- 2020 © renren.io -->
<p><a href="https://www.renren.io/"
target="_blank">{{ $t('login.copyright') }}</a></p>
</div>
</main>
</div>
</div>
</template>
<script>
import Cookies from 'js-cookie'
import debounce from 'lodash/debounce'
import { messages } from '@/i18n'
import { getUUID } from '@/utils'
export default {
data () {
return {
i18nMessages: messages,
captchaPath: '',
dataForm: {
app: 'oper',
client: 'web',
username: '',
phone: '',
password: '',
uuid: '',
captcha: ''
}
}
},
computed: {
dataRule () {
return {
phone: [
{ required: true, message: '手机号不能为空', trigger: 'blur' }
],
password: [
{ required: true, message: '密码不能为空', trigger: 'blur' }
],
captcha: [
{ required: true, message: '验证码不能为空', trigger: 'blur' }
]
}
}
},
created () {
this.getCaptcha()
},
methods: {
//
getCaptcha () {
this.dataForm.uuid = getUUID()
this.captchaPath = `${window.SITE_CONFIG['apiURL']}/auth/login/captcha?uuid=${this.dataForm.uuid}`
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
}
this.$http.post('/auth/login/operweb/loginbypassword', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.getCaptcha()
return this.$message.error(res.msg)
}
localStorage.setItem('userType', 'oper')
localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'home' }).catch(() => { })
}).catch(() => { })
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

301
src/views/pages/login.vue

@ -1,55 +1,58 @@
<template> <template>
<div class="g-app"> <div class="g-app">
<div class="g-bd" <div class="g-bd" v-if="isShowLogin || true">
v-if="isShowLogin || true">
<div class="m-fm"> <div class="m-fm">
<div class="wrap"> <div class="wrap">
<h2 class="title">{{ $t('brand.work') }}</h2> <h2 class="title">{{ $t("brand.work") }}</h2>
<div class="fm"> <div class="fm">
<el-form :model="dataForm" <el-form
:rules="dataRule" :model="dataForm"
ref="dataForm" :rules="dataRule"
@keyup.enter.native="dataFormSubmitHandle()" ref="dataForm"
status-icon> @keyup.enter.native="dataFormSubmitHandle()"
status-icon
>
<div class="fm-item"> <div class="fm-item">
<div class="ico"> <div class="ico">
<img src="@/assets/img/login/zhanghao.png" <img src="@/assets/img/login/zhanghao.png" alt="" />
alt="" />
</div> </div>
<div class="input"> <div class="input">
<input type="text" <input
v-model="dataForm.phone" type="text"
placeholder="账号" /> v-model="dataForm.phone"
placeholder="账号"
/>
</div> </div>
</div> </div>
<div class="fm-item"> <div class="fm-item">
<div class="ico"> <div class="ico">
<img src="@/assets/img/login/mima.png" <img src="@/assets/img/login/mima.png" alt="" />
alt="" />
</div> </div>
<div class="input"> <div class="input">
<input type="password" <input
v-model="dataForm.password" type="password"
:placeholder="$t('login.password')" /> v-model="dataForm.password"
:placeholder="$t('login.password')"
/>
</div> </div>
</div> </div>
<div class="fm-captcha"> <div class="fm-captcha">
<div class="fm-item"> <div class="fm-item">
<div class="input"> <div class="input">
<input type="text" <input
v-model="dataForm.captcha" type="text"
placeholder="验证码" /> v-model="dataForm.captcha"
placeholder="验证码"
/>
</div> </div>
</div> </div>
<div class="captcha"> <div class="captcha">
<img :src="captchaPath" <img :src="captchaPath" @click="getCaptcha()" />
@click="getCaptcha()" />
</div> </div>
</div> </div>
<div class="fm-btn" <div class="fm-btn" @click="dataFormSubmitHandle()">
@click="dataFormSubmitHandle()"> {{ $t("login.title") }}
{{ $t('login.title') }}
</div> </div>
<div class="hint">请使用小程序端的账号密码登录</div> <div class="hint">请使用小程序端的账号密码登录</div>
</el-form> </el-form>
@ -60,128 +63,128 @@
<div class="m-footer"> <div class="m-footer">
<div class="login-footer"> <div class="login-footer">
<p> <p>
<a href="" <a href="" target="_blank">{{ $t("login.copyright") }}</a>
target="_blank">{{ $t('login.copyright') }}</a>
</p> </p>
</div> </div>
</div> </div>
</div> </div>
<c-dialog :showFooter="false" <c-dialog
:title="'选择客户'" :showFooter="false"
:isNest="false" :title="'选择客户'"
:visible="diaVisible" :isNest="false"
:dialogHeight="0.8" :visible="diaVisible"
:width="30" :dialogHeight="0.8"
:top="'120px'" :width="30"
@cancel="diaCancel"> :top="'120px'"
<div v-for="(item, index) in tableData" @cancel="diaCancel"
:key="index" >
class="div_row"> <div class="m-pop">
<span @click="selectCustomer(item)" <div v-for="(item, index) in tableData" :key="index" class="div_row">
class="span_name">{{ <span @click="selectCustomer(item)" class="span_name">{{
item.customerName item.customerName
}}</span> }}</span>
</div>
</div> </div>
</c-dialog> </c-dialog>
</div> </div>
</template> </template>
<script> <script>
import Cookies from 'js-cookie' import Cookies from "js-cookie";
import CDialog from '@c/CDialog' import CDialog from "@c/CDialog";
import debounce from 'lodash/debounce' import debounce from "lodash/debounce";
import { messages } from '@/i18n' import { messages } from "@/i18n";
import { getUUID } from '@/utils' import { getUUID } from "@/utils";
import { Loading } from 'element-ui' // Loading import { Loading } from "element-ui"; // Loading
import JSEncrypt from 'jsencrypt' // import JSEncrypt from "jsencrypt"; //
let loading // let loading; //
export default { export default {
data () { data() {
return { return {
pubKey: null, // pubKey: null, //
isShowLogin: true, isShowLogin: true,
i18nMessages: messages, i18nMessages: messages,
captchaPath: '', captchaPath: "",
dataForm: { dataForm: {
customerId: '', customerId: "",
app: 'gov', app: "gov",
client: 'web', client: "web",
username: '', username: "",
phone: '', phone: "",
password: '', password: "",
uuid: '', uuid: "",
captcha: '' captcha: "",
}, },
// //
diaVisible: false, diaVisible: false,
tableLoading: false, tableLoading: false,
tableData: [] tableData: [],
} };
}, },
components: { components: {
CDialog CDialog,
}, },
computed: { computed: {
dataRule () { dataRule() {
return { return {
phone: [{ required: true, message: '手机号不能为空', trigger: 'blur' }], phone: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
password: [ password: [
{ required: true, message: '密码不能为空', trigger: 'blur' } { required: true, message: "密码不能为空", trigger: "blur" },
], ],
captcha: [ captcha: [
{ required: true, message: '验证码不能为空', trigger: 'blur' } { required: true, message: "验证码不能为空", trigger: "blur" },
] ],
} };
} },
}, },
created () { created() {
// //
if (this.$route.query.platformToken) { if (this.$route.query.platformToken) {
this.isShowLogin = false this.isShowLogin = false;
this.getAutoLogin(this.$route.query.platformToken) this.getAutoLogin(this.$route.query.platformToken);
} else { } else {
this.getCaptcha() this.getCaptcha();
// //
this.getPubKey() this.getPubKey();
} }
}, },
mounted () { mounted() {
localStorage.removeItem('showHeader') localStorage.removeItem("showHeader");
}, },
methods: { methods: {
// //
getPubKey () { getPubKey() {
this.$http this.$http
.post('/auth/govweb/getKey') .post("/auth/govweb/getKey")
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.pubKey = res.data // ; this.pubKey = res.data; // ;
}) })
.catch(() => { }) .catch(() => {});
}, },
// //
getCaptcha () { getCaptcha() {
this.dataForm.uuid = getUUID() this.dataForm.uuid = getUUID();
this.captchaPath = `${window.SITE_CONFIG['apiURL']}/auth/login/captcha?uuid=${this.dataForm.uuid}` this.captchaPath = `${window.SITE_CONFIG["apiURL"]}/auth/login/captcha?uuid=${this.dataForm.uuid}`;
}, },
// //
dataFormSubmitHandle () { dataFormSubmitHandle() {
this.$refs['dataForm'].validate((valid, messageObj) => { this.$refs["dataForm"].validate((valid, messageObj) => {
if (!valid) { if (!valid) {
app.util.validateRule(messageObj) app.util.validateRule(messageObj);
} }
this.startLoading() this.startLoading();
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/customerstaff/customerlist' // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/customerstaff/customerlist'
const url = '/epmetuser/customerstaff/customerlist' const url = "/epmetuser/customerstaff/customerlist";
const params = { const params = {
phone: this.dataForm.phone phone: this.dataForm.phone,
} };
// this.$http // this.$http
// .post(url, params).then(({ data })=> { // .post(url, params).then(({ data })=> {
// console.log('res--comll', data) // console.log('res--comll', data)
@ -208,105 +211,107 @@ export default {
(data, rspMsg) => { (data, rspMsg) => {
if (data.length === 0) { if (data.length === 0) {
// //
this.$message.error('账号不存在') this.$message.error("账号不存在");
this.endLoading() this.endLoading();
} else if (data.length === 1) { } else if (data.length === 10) {
this.selectCustomer(data[0]) this.selectCustomer(data[0]);
} else { } else {
this.endLoading() this.endLoading();
this.diaVisible = true this.diaVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.tableData = data this.tableData = data;
}) });
} }
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.endLoading() this.endLoading();
this.$message.error(rspMsg) this.$message.error(rspMsg);
} }
) );
}) });
}, },
// //
getAutoLogin (platformToken) { getAutoLogin(platformToken) {
this.dataForm.thirdToken = platformToken this.dataForm.thirdToken = platformToken;
this.dataForm.platform = 'pyld' this.dataForm.platform = "pyld";
this.$http this.$http
.post(`/auth/sso/oper/third/login`, this.dataForm) .post(`/auth/sso/oper/third/login`, this.dataForm)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
if (res.code == 8302) { if (res.code == 8302) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
localStorage.setItem('customerId', res.data.customerId) localStorage.setItem("customerId", res.data.customerId);
localStorage.setItem('userType', 'work') localStorage.setItem("userType", "work");
localStorage.setItem('showHeader', '0') localStorage.setItem("showHeader", "0");
localStorage.setItem('token', res.data.token) localStorage.setItem("token", res.data.token);
this.$router.replace({ name: 'home' }) this.$router.replace({ name: "home" });
}) })
.catch(() => { }) .catch(() => {});
// epmet-ext9.elinkservice.cn/platform-admin // epmet-ext9.elinkservice.cn/platform-admin
}, },
// //
selectCustomer (row) { selectCustomer(row) {
localStorage.setItem('customerId', row.customerId) localStorage.setItem("customerId", row.customerId);
localStorage.setItem('customerName', row.customerName) localStorage.setItem("customerName", row.customerName);
this.startLoading() this.startLoading();
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/auth/govweb/login' // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/auth/govweb/login'
const url = '/auth/govweb/login' const url = "/auth/govweb/login";
this.dataForm.customerId = row.customerId this.dataForm.customerId = row.customerId;
let param = {} let param = {};
Object.assign(param, this.dataForm) Object.assign(param, this.dataForm);
param.password = this.encryptedData(this.pubKey, this.dataForm.password) param.password = this.encryptedData(this.pubKey, this.dataForm.password);
this.$http this.$http
.post(url, param) .post(url, param)
.then(({ data: res }) => { .then(({ data: res }) => {
this.endLoading();
if (res.code !== 0) { if (res.code !== 0) {
this.getCaptcha() this.getCaptcha();
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.diaVisible = false this.diaVisible = false;
localStorage.setItem('userType', 'work') localStorage.setItem("userType", "work");
localStorage.setItem('token', res.data.token) localStorage.setItem("token", res.data.token);
this.$router.replace({ name: 'indexWork' }).catch(() => { }) this.$router.replace({ name: "index" });
}) })
.catch(() => { }) .catch(() => {
this.endLoading() this.endLoading();
});
}, },
// //
diaCancel () { diaCancel() {
this.diaVisible = false this.diaVisible = false;
}, },
// //
startLoading () { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: '正在加载……', // text: "正在加载……", //
background: 'rgba(0,0,0,.7)' // background: "rgba(0,0,0,.7)", //
}) });
}, },
// //
endLoading () { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close() loading.close();
} }
}, },
// //
encryptedData (key, data) { encryptedData(key, data) {
// JSEncrypt // JSEncrypt
let encryptor = new JSEncrypt() let encryptor = new JSEncrypt();
// //
encryptor.setPublicKey(key) encryptor.setPublicKey(key);
// //
return encryptor.encrypt(data) return encryptor.encrypt(data);
} },
} },
} };
</script> </script>
<style lang="scss" src="@/assets/scss/pages/loginWork.scss" scoped></style> <style lang="scss" src="@/assets/scss/pages/loginWork.scss" scoped></style>

Loading…
Cancel
Save