|
|
@ -10,55 +10,73 @@ |
|
|
|
<div class="login-content"> |
|
|
|
<div class="login-content-title"> |
|
|
|
<p class="main-title">眼科工作平台</p> |
|
|
|
<p class="subtitle-title">登录</p> |
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick"> |
|
|
|
<el-tab-pane label="密码登录" name="first"> |
|
|
|
<el-form |
|
|
|
ref="dataForm" |
|
|
|
:model="dataForm" |
|
|
|
:rules="dataRule" |
|
|
|
status-icon |
|
|
|
> |
|
|
|
<!-- 用户名 --> |
|
|
|
<el-form-item prop="account"> |
|
|
|
<el-input v-model="dataForm.account" placeholder="请输入工号" @keyup.enter.native="submitNext" /> |
|
|
|
</el-form-item> |
|
|
|
<!-- 密码 --> |
|
|
|
<el-form-item prop="password"> |
|
|
|
<el-input ref="passWord" v-model="dataForm.password" type="password" placeholder="请输入密码" @keyup.enter.native="dataFormSubmitHandle()" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="captcha"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="14"> |
|
|
|
<el-input v-model="dataForm.captcha" :placeholder="$t('login.captcha')" /> |
|
|
|
</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" class="w-percent-100" @click="dataFormSubmitHandle()">{{ $t('login.title') }} |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<p class="tips">没有账号? 请联系管理员</p> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="CA登录" name="second"> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
<el-form |
|
|
|
ref="dataForm" |
|
|
|
:model="dataForm" |
|
|
|
:rules="dataRule" |
|
|
|
status-icon |
|
|
|
> |
|
|
|
<!-- 用户名 --> |
|
|
|
<el-form-item prop="account"> |
|
|
|
<el-input v-model="dataForm.account" placeholder="请输入工号" @keyup.enter.native="submitNext" /> |
|
|
|
</el-form-item> |
|
|
|
<!-- 密码 --> |
|
|
|
<el-form-item prop="password"> |
|
|
|
<el-input ref="passWord" v-model="dataForm.password" type="password" placeholder="请输入密码" @keyup.enter.native="dataFormSubmitHandle()" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="captcha"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="14"> |
|
|
|
<el-input v-model="dataForm.captcha" :placeholder="$t('login.captcha')" /> |
|
|
|
</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" class="w-percent-100" @click="dataFormSubmitHandle()">{{ $t('login.title') }} |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<p class="tips">没有账号? 请联系管理员</p> |
|
|
|
</div> |
|
|
|
<div class="login-footer"> |
|
|
|
<p class="copyright">南京慧目信息技术有限公司 版权所有</p> |
|
|
|
</div> |
|
|
|
<el-dialog |
|
|
|
class="caLogin" |
|
|
|
:visible.sync="visible" |
|
|
|
width="40%" |
|
|
|
title="CA登录" |
|
|
|
@close="visible === false"> |
|
|
|
|
|
|
|
<iframe name="ifrmName" frameborder="0" width="100%" height="100%" src="http://192.168.0.135:8080/ca-sign-xiangan/"></iframe> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import Cookies from 'js-cookie' |
|
|
|
import debounce from 'lodash/debounce' |
|
|
|
import { messages } from '@/i18n' |
|
|
|
import { getUUID } from '@/utils' |
|
|
|
import md5 from 'uuid/dist/esm-browser/md5' |
|
|
|
// import caLogin from './caLogin' |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
// caLogin |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
i18nMessages: messages, |
|
|
|
activeName: 'first', |
|
|
|
captchaPath: '', |
|
|
|
visible: false, |
|
|
|
dataForm: { |
|
|
|
account: '', |
|
|
|
password: '', |
|
|
@ -86,6 +104,15 @@ export default { |
|
|
|
this.getCaptcha() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleClick() { |
|
|
|
if (this.activeName === 'second') { |
|
|
|
this.visible = true |
|
|
|
// this.$nextTick(()=>{ |
|
|
|
// console.log(document.all.ifrmName.contentWindow) |
|
|
|
// document.all.ifrmName.contentWindow.location.reload() |
|
|
|
// }) |
|
|
|
} |
|
|
|
}, |
|
|
|
submitNext() { |
|
|
|
this.$refs.passWord.focus() |
|
|
|
}, |
|
|
@ -152,7 +179,7 @@ export default { |
|
|
|
left: 50%; |
|
|
|
top: 50%; |
|
|
|
transform: translate(-50%, -50%); |
|
|
|
width: 340px; |
|
|
|
//width: 100%; |
|
|
|
.login-content-title { |
|
|
|
text-align: center; |
|
|
|
color: #262626; |
|
|
@ -204,5 +231,11 @@ export default { |
|
|
|
color: #fff; |
|
|
|
height: 48px; |
|
|
|
} |
|
|
|
.el-tabs__content { |
|
|
|
height: 300px; |
|
|
|
} |
|
|
|
.el-dialog__body { |
|
|
|
height: 350px; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|