修改地图

This commit is contained in:
chy
2026-04-22 10:12:08 +08:00
parent cc6c894dc6
commit 0d032f82f5
2 changed files with 1207 additions and 1232 deletions

View File

@@ -921,10 +921,11 @@ export default {
return; return;
} }
let reg = /^[0-9a-zA-Z]+$/; let reg = /^[0-9a-zA-Z]+$/;
if (!reg.test(this.form.serialNumber)) { //if (!reg.test(this.form.serialNumber)) {
this.$modal.alertError(this.$t('device.device-edit.148398-66')); // this.$modal.alertError(this.$t('device.device-edit.148398-66'));
return; // return;
} // }
if (this.form.productId == null || this.form.productId == 0) { if (this.form.productId == null || this.form.productId == 0) {
this.$modal.alertError(this.$t('device.device-edit.148398-67')); this.$modal.alertError(this.$t('device.device-edit.148398-67'));
return; return;

View File

@@ -10,7 +10,7 @@
<el-form-item v-if="loginForm.bindId != null"> <el-form-item v-if="loginForm.bindId != null">
<div class="alert-box-wrap"> <div class="alert-box-wrap">
<div v-if="loginForm.bindId != null" class="alert-message-wrap"> <div v-if="loginForm.bindId != null" class="alert-message-wrap">
<i class="el-icon-warning"/> <i class="el-icon-warning" />
{{ $t('login.989807-10') }} {{ $t('login.989807-10') }}
</div> </div>
<el-row> <el-row>
@@ -33,27 +33,24 @@
<el-form-item prop="username"> <el-form-item prop="username">
<div class="username"> <div class="username">
<i class="el-icon-user icon"></i> <i class="el-icon-user icon"></i>
<input class="form__input" v-model="loginForm.username" auto-complete="off" type="text" <input class="form__input" v-model="loginForm.username" auto-complete="off" type="text" :placeholder="$t('login.989807-4')" />
:placeholder="$t('login.989807-4')"/>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="password" :class="{ 'is-null': isacount }"> <el-form-item prop="password" :class="{ 'is-null': isacount }">
<div class="password"> <div class="password">
<svg-icon icon-class="password" class="icon left"/> <svg-icon icon-class="password" class="icon left" />
<input class="form__input" v-model="loginForm.password" auto-complete="off" :type="pwdtype" <input class="form__input" v-model="loginForm.password" auto-complete="off" :type="pwdtype" :placeholder="$t('login.989807-5')" @keyup.enter="handleLogin" />
:placeholder="$t('login.989807-5')" @keyup.enter="handleLogin"/>
<span class="el-icon-view icon right" @click="changetype()"></span> <span class="el-icon-view icon right" @click="changetype()"></span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-if="captchaOnOff" prop="code" :class="{ 'is-null': ispwd }"> <el-form-item v-if="captchaOnOff" prop="code" :class="{ 'is-null': ispwd }">
<div style="width: 350px" class="check"> <div style="width: 350px" class="check">
<svg-icon icon-class="auth-code" class="icon"/> <svg-icon icon-class="auth-code" class="icon" />
<input v-model="loginForm.code" auto-complete="off" class="form__input__code" type="text" <input v-model="loginForm.code" auto-complete="off" class="form__input__code" type="text" :placeholder="$t('login.989807-6')" />
:placeholder="$t('login.989807-6')"/>
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" style="float: right"/> <img :src="codeUrl" @click="getCode" style="float: right" />
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
@@ -67,8 +64,7 @@
</el-form-item> </el-form-item>
<!-- <button class="form__button button submit">登录</button> --> <!-- <button class="form__button button submit">登录</button> -->
<el-button class="form__button button submit" v-if="!bindAccount" :loading="loading" type="primary" <el-button class="form__button button submit" v-if="!bindAccount" :loading="loading" type="primary" @click.native.prevent="handleLogin">
@click.native.prevent="handleLogin">
<span v-if="!loading">{{ $t('login.989807-3') }}</span> <span v-if="!loading">{{ $t('login.989807-3') }}</span>
<span v-else>{{ $t('login.989807-13') }}</span> <span v-else>{{ $t('login.989807-13') }}</span>
</el-button> </el-button>
@@ -86,9 +82,8 @@
<!-- <span class="form__span">没有账号立即注册</span> --> <!-- <span class="form__span">没有账号立即注册</span> -->
<el-form-item prop="phonenumber"> <el-form-item prop="phonenumber">
<div class="telphone" style="width: 350px"> <div class="telphone" style="width: 350px">
<svg-icon icon-class="phone" class="icon"/> <svg-icon icon-class="phone" class="icon" />
<input v-model="smsLoginForm.phonenumber" class="form__input__code" type="text" auto-complete="off" <input v-model="smsLoginForm.phonenumber" class="form__input__code" type="text" auto-complete="off" :placeholder="$t('login.989807-8')" @input="validatePhoneNumber" />
:placeholder="$t('login.989807-8')" @input="validatePhoneNumber"/>
<div class="sendcode"> <div class="sendcode">
<el-button <el-button
slot="append" slot="append"
@@ -106,24 +101,20 @@
<el-form-item prop="smsCode"> <el-form-item prop="smsCode">
<div class="smscode" :class="{ 'is-null': isphone }"> <div class="smscode" :class="{ 'is-null': isphone }">
<svg-icon icon-class="password" class="icon"/> <svg-icon icon-class="password" class="icon" />
<input class="form__input" type="password" v-model="smsLoginForm.smsCode" auto-complete="off" <input class="form__input" type="password" v-model="smsLoginForm.smsCode" auto-complete="off" :placeholder="$t('login.989807-9')" />
:placeholder="$t('login.989807-9')"/>
</div> </div>
</el-form-item> </el-form-item>
<div class="other_login"> <div class="other_login">
<div class="wechat-login"> <div class="wechat-login">
<el-button v-if="loginForm.bindId == null" type="text" :wxloading="loading" <el-button v-if="loginForm.bindId == null" type="text" :wxloading="loading" @click.native.prevent="weChatLogin">
@click.native.prevent="weChatLogin"> <svg-icon icon-class="wechat" style="color: #07c160" />
<svg-icon icon-class="wechat" style="color: #07c160"/>
{{ $t('login.989807-34') }} {{ $t('login.989807-34') }}
</el-button> </el-button>
</div> </div>
<div class="other-opt"> <div class="other-opt">
<router-link v-if="!bindAccount" style="font-size: 14px" <router-link v-if="!bindAccount" style="font-size: 14px" :to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-35') }}</router-link>
:to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-35') }}
</router-link>
<router-link v-else style="font-size: 14px" :to="{ path: '/register', query: this.$route.query }"> <router-link v-else style="font-size: 14px" :to="{ path: '/register', query: this.$route.query }">
{{ $t('login.989807-36') }} {{ $t('login.989807-36') }}
</router-link> </router-link>
@@ -131,8 +122,7 @@
</div> </div>
</div> </div>
<el-button class="form__button button submit" type="primary" :smsLoading="loading" <el-button class="form__button button submit" type="primary" :smsLoading="loading" @click.native.prevent="handleSmsLogin">
@click.native.prevent="handleSmsLogin">
<span v-if="!loading">{{ $t('login.989807-3') }}</span> <span v-if="!loading">{{ $t('login.989807-3') }}</span>
<span v-else>{{ $t('login.989807-13') }}</span> <span v-else>{{ $t('login.989807-13') }}</span>
</el-button> </el-button>
@@ -146,7 +136,7 @@
<h2 class="switch__title title" style="margin-left: 10px">{{ $t('login.989807-37') }}</h2> <h2 class="switch__title title" style="margin-left: 10px">{{ $t('login.989807-37') }}</h2>
</div> </div>
<p class="switch__description description">{{ $t('login.989807-38') }}</p> <p class="switch__description description">{{ $t('login.989807-38') }}</p>
<img src="../assets/images/login3.jpeg" alt="logo" style="width: 220px; height: 220px"/> <img src="../assets/images/login3.jpeg" alt="logo" style="width: 220px; height: 220px" />
</div> </div>
</div> </div>
</div> </div>
@@ -156,25 +146,15 @@
<script> <script>
import 'element-ui/lib/theme-chalk/display.css'; import 'element-ui/lib/theme-chalk/display.css';
import logo from '@/assets/logo/logo.gif'; import logo from '@/assets/logo/logo.gif';
import { import { getCodeImg, checkBindId, getErrorMsg, socialLogin, bindLogin, getSmsLoginCaptcha, smsLogin, logincas } from '@/api/login';
getCodeImg,
checkBindId,
getErrorMsg,
socialLogin,
bindLogin,
getSmsLoginCaptcha,
smsLogin,
logincas
} from '@/api/login';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import {encrypt, decrypt} from '@/utils/jsencrypt'; import { encrypt, decrypt } from '@/utils/jsencrypt';
import {setToken, getToken, setAccessUser} from '@/utils/auth'; import { setToken, getToken, setAccessUser } from '@/utils/auth';
import langSelect from '@/layout/components/langSelect'; import langSelect from '@/layout/components/langSelect';
export default { export default {
name: 'Login', name: 'Login',
components: {langSelect}, components: { langSelect },
data() { data() {
return { return {
windowWidth: window.innerWidth, windowWidth: window.innerWidth,
@@ -224,9 +204,7 @@ export default {
message: this.$t('login.989807-20'), message: this.$t('login.989807-20'),
}, },
], ],
password: [ password: [{ required: true, message: this.$t('login.989807-21'), trigger: 'blur' }],
{required: true, message: this.$t('login.989807-21'), trigger: 'blur'},
],
code: [ code: [
{ {
required: true, required: true,
@@ -237,7 +215,7 @@ export default {
}, },
smsRules: { smsRules: {
phonenumber: [ phonenumber: [
{required: true, message: this.$t('login.989807-23'), trigger: 'blur'}, { required: true, message: this.$t('login.989807-23'), trigger: 'blur' },
{ {
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: this.$t('login.989807-24'), message: this.$t('login.989807-24'),
@@ -309,22 +287,23 @@ export default {
// 没有ticket且没有token跳转统一身份认证 // 没有ticket且没有token跳转统一身份认证
const isTs = true; const isTs = true;
if (isTs) { if (isTs) {
window.location.href = 'http://192.168.1.241/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2F192.168.1.241%3A9000%2Flogin'+(this.redirect?'&ssUrl='+this.redirect:''); window.location.href =
'http://192.168.1.241/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2F192.168.1.241%3A9000%2Flogin' +
(this.redirect ? '&ssUrl=' + this.redirect : '');
// window.location.href = 'http://localhost:81/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2Flocalhost%3A80%2Flogin' + (this.redirect ? '&ssUrl=' + this.redirect : ''); // window.location.href = 'http://localhost:81/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2Flocalhost%3A80%2Flogin' + (this.redirect ? '&ssUrl=' + this.redirect : '');
} }
} else if (ticket && !token) { } else if (ticket && !token) {
// 有ticket但没有token请求登录 // 有ticket但没有token请求登录
this.logincasapi(); this.logincasapi();
} else { } else {
} }
}, },
handleLoginFocus() { handleLoginFocus() {
if (this.loginForm.loginName === "") { if (this.loginForm.loginName === '') {
if (this.$refs.loginName) { if (this.$refs.loginName) {
this.$refs.loginName.focus(); this.$refs.loginName.focus();
} }
} else if (this.loginForm.password === "") { } else if (this.loginForm.password === '') {
if (this.$refs.password) { if (this.$refs.password) {
this.$refs.password.focus(); this.$refs.password.focus();
} }
@@ -339,19 +318,19 @@ export default {
const obj = { const obj = {
loginName: ticket, loginName: ticket,
password: "demo", password: 'demo',
verifyCode: "", verifyCode: '',
}; };
try { try {
const {code, data, token} = await logincas(obj); const { code, data, token } = await logincas(obj);
if (code !== 200) { if (code !== 200) {
this.$message.error('CAS登录失败: ' + (data?.msg || '未知错误')); this.$message.error('CAS登录失败: ' + (data?.msg || '未知错误'));
// 清除ticket参数避免循环跳转 // 清除ticket参数避免循环跳转
this.$router.push({ this.$router.push({
path: '/login', path: '/login',
query: {redirect: this.redirect} query: { redirect: this.redirect },
}); });
return; return;
} }
@@ -360,7 +339,7 @@ export default {
setAccessUser(data); setAccessUser(data);
// 跳转到目标页面清除ticket参数 // 跳转到目标页面清除ticket参数
const targetPath = this.redirect || "/"; const targetPath = this.redirect || '/';
this.$router.push({ this.$router.push({
path: targetPath, path: targetPath,
query: this.otherQuery, query: this.otherQuery,
@@ -373,7 +352,7 @@ export default {
// 清除ticket参数避免循环跳转 // 清除ticket参数避免循环跳转
this.$router.push({ this.$router.push({
path: '/login', path: '/login',
query: {redirect: this.redirect} query: { redirect: this.redirect },
}); });
} }
}, },
@@ -430,8 +409,7 @@ export default {
.push({ .push({
path: this.redirect || '/', path: this.redirect || '/',
}) })
.catch(() => { .catch(() => {});
});
if (this.captchaOnOff) { if (this.captchaOnOff) {
this.getCode(); this.getCode();
this.loading = false; this.loading = false;
@@ -462,10 +440,9 @@ export default {
const errorId = this.$route.query.errorId; const errorId = this.$route.query.errorId;
if (errorId !== undefined && errorId !== null) { if (errorId !== undefined && errorId !== null) {
getErrorMsg(errorId) getErrorMsg(errorId)
.then((res) => { .then((res) => {})
})
.catch((err) => { .catch((err) => {
this.$router.push({query: {}}); this.$router.push({ query: {} });
console.log(err); console.log(err);
}); });
} }
@@ -554,8 +531,7 @@ export default {
.push({ .push({
path: '/', path: '/',
}) })
.catch(() => { .catch(() => {});
});
}); });
} }
}); });
@@ -588,8 +564,7 @@ export default {
.push({ .push({
path: '/', path: '/',
}) })
.catch(() => { .catch(() => {});
});
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
@@ -644,8 +619,7 @@ export default {
.push({ .push({
path: this.redirect || '/', path: this.redirect || '/',
}) })
.catch(() => { .catch(() => {});
});
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;