修改地图

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;
}
let reg = /^[0-9a-zA-Z]+$/;
if (!reg.test(this.form.serialNumber)) {
this.$modal.alertError(this.$t('device.device-edit.148398-66'));
return;
}
//if (!reg.test(this.form.serialNumber)) {
// this.$modal.alertError(this.$t('device.device-edit.148398-66'));
// return;
// }
if (this.form.productId == null || this.form.productId == 0) {
this.$modal.alertError(this.$t('device.device-edit.148398-67'));
return;

View File

@@ -33,16 +33,14 @@
<el-form-item prop="username">
<div class="username">
<i class="el-icon-user icon"></i>
<input class="form__input" v-model="loginForm.username" auto-complete="off" type="text"
:placeholder="$t('login.989807-4')"/>
<input class="form__input" v-model="loginForm.username" auto-complete="off" type="text" :placeholder="$t('login.989807-4')" />
</div>
</el-form-item>
<el-form-item prop="password" :class="{ 'is-null': isacount }">
<div class="password">
<svg-icon icon-class="password" class="icon left" />
<input class="form__input" v-model="loginForm.password" auto-complete="off" :type="pwdtype"
:placeholder="$t('login.989807-5')" @keyup.enter="handleLogin"/>
<input class="form__input" v-model="loginForm.password" auto-complete="off" :type="pwdtype" :placeholder="$t('login.989807-5')" @keyup.enter="handleLogin" />
<span class="el-icon-view icon right" @click="changetype()"></span>
</div>
</el-form-item>
@@ -50,8 +48,7 @@
<el-form-item v-if="captchaOnOff" prop="code" :class="{ 'is-null': ispwd }">
<div style="width: 350px" class="check">
<svg-icon icon-class="auth-code" class="icon" />
<input v-model="loginForm.code" auto-complete="off" class="form__input__code" type="text"
:placeholder="$t('login.989807-6')"/>
<input v-model="loginForm.code" auto-complete="off" class="form__input__code" type="text" :placeholder="$t('login.989807-6')" />
<div class="login-code">
<img :src="codeUrl" @click="getCode" style="float: right" />
</div>
@@ -67,8 +64,7 @@
</el-form-item>
<!-- <button class="form__button button submit">登录</button> -->
<el-button class="form__button button submit" v-if="!bindAccount" :loading="loading" type="primary"
@click.native.prevent="handleLogin">
<el-button class="form__button button submit" v-if="!bindAccount" :loading="loading" type="primary" @click.native.prevent="handleLogin">
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
<span v-else>{{ $t('login.989807-13') }}</span>
</el-button>
@@ -87,8 +83,7 @@
<el-form-item prop="phonenumber">
<div class="telphone" style="width: 350px">
<svg-icon icon-class="phone" class="icon" />
<input v-model="smsLoginForm.phonenumber" class="form__input__code" type="text" auto-complete="off"
:placeholder="$t('login.989807-8')" @input="validatePhoneNumber"/>
<input v-model="smsLoginForm.phonenumber" class="form__input__code" type="text" auto-complete="off" :placeholder="$t('login.989807-8')" @input="validatePhoneNumber" />
<div class="sendcode">
<el-button
slot="append"
@@ -107,23 +102,19 @@
<el-form-item prop="smsCode">
<div class="smscode" :class="{ 'is-null': isphone }">
<svg-icon icon-class="password" class="icon" />
<input class="form__input" type="password" v-model="smsLoginForm.smsCode" auto-complete="off"
:placeholder="$t('login.989807-9')"/>
<input class="form__input" type="password" v-model="smsLoginForm.smsCode" auto-complete="off" :placeholder="$t('login.989807-9')" />
</div>
</el-form-item>
<div class="other_login">
<div class="wechat-login">
<el-button v-if="loginForm.bindId == null" type="text" :wxloading="loading"
@click.native.prevent="weChatLogin">
<el-button v-if="loginForm.bindId == null" type="text" :wxloading="loading" @click.native.prevent="weChatLogin">
<svg-icon icon-class="wechat" style="color: #07c160" />
{{ $t('login.989807-34') }}
</el-button>
</div>
<div class="other-opt">
<router-link v-if="!bindAccount" style="font-size: 14px"
:to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-35') }}
</router-link>
<router-link v-if="!bindAccount" style="font-size: 14px" :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 }">
{{ $t('login.989807-36') }}
</router-link>
@@ -131,8 +122,7 @@
</div>
</div>
<el-button class="form__button button submit" type="primary" :smsLoading="loading"
@click.native.prevent="handleSmsLogin">
<el-button class="form__button button submit" type="primary" :smsLoading="loading" @click.native.prevent="handleSmsLogin">
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
<span v-else>{{ $t('login.989807-13') }}</span>
</el-button>
@@ -156,22 +146,12 @@
<script>
import 'element-ui/lib/theme-chalk/display.css';
import logo from '@/assets/logo/logo.gif';
import {
getCodeImg,
checkBindId,
getErrorMsg,
socialLogin,
bindLogin,
getSmsLoginCaptcha,
smsLogin,
logincas
} from '@/api/login';
import { getCodeImg, checkBindId, getErrorMsg, socialLogin, bindLogin, getSmsLoginCaptcha, smsLogin, logincas } from '@/api/login';
import Cookies from 'js-cookie';
import { encrypt, decrypt } from '@/utils/jsencrypt';
import { setToken, getToken, setAccessUser } from '@/utils/auth';
import langSelect from '@/layout/components/langSelect';
export default {
name: 'Login',
components: { langSelect },
@@ -224,9 +204,7 @@ export default {
message: this.$t('login.989807-20'),
},
],
password: [
{required: true, message: this.$t('login.989807-21'), trigger: 'blur'},
],
password: [{ required: true, message: this.$t('login.989807-21'), trigger: 'blur' }],
code: [
{
required: true,
@@ -309,22 +287,23 @@ export default {
// 没有ticket且没有token跳转统一身份认证
const isTs = true;
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 : '');
}
} else if (ticket && !token) {
// 有ticket但没有token请求登录
this.logincasapi();
} else {
}
},
handleLoginFocus() {
if (this.loginForm.loginName === "") {
if (this.loginForm.loginName === '') {
if (this.$refs.loginName) {
this.$refs.loginName.focus();
}
} else if (this.loginForm.password === "") {
} else if (this.loginForm.password === '') {
if (this.$refs.password) {
this.$refs.password.focus();
}
@@ -339,8 +318,8 @@ export default {
const obj = {
loginName: ticket,
password: "demo",
verifyCode: "",
password: 'demo',
verifyCode: '',
};
try {
@@ -351,7 +330,7 @@ export default {
// 清除ticket参数避免循环跳转
this.$router.push({
path: '/login',
query: {redirect: this.redirect}
query: { redirect: this.redirect },
});
return;
}
@@ -360,7 +339,7 @@ export default {
setAccessUser(data);
// 跳转到目标页面清除ticket参数
const targetPath = this.redirect || "/";
const targetPath = this.redirect || '/';
this.$router.push({
path: targetPath,
query: this.otherQuery,
@@ -373,7 +352,7 @@ export default {
// 清除ticket参数避免循环跳转
this.$router.push({
path: '/login',
query: {redirect: this.redirect}
query: { redirect: this.redirect },
});
}
},
@@ -430,8 +409,7 @@ export default {
.push({
path: this.redirect || '/',
})
.catch(() => {
});
.catch(() => {});
if (this.captchaOnOff) {
this.getCode();
this.loading = false;
@@ -462,8 +440,7 @@ export default {
const errorId = this.$route.query.errorId;
if (errorId !== undefined && errorId !== null) {
getErrorMsg(errorId)
.then((res) => {
})
.then((res) => {})
.catch((err) => {
this.$router.push({ query: {} });
console.log(err);
@@ -554,8 +531,7 @@ export default {
.push({
path: '/',
})
.catch(() => {
});
.catch(() => {});
});
}
});
@@ -588,8 +564,7 @@ export default {
.push({
path: '/',
})
.catch(() => {
});
.catch(() => {});
})
.catch(() => {
this.loading = false;
@@ -644,8 +619,7 @@ export default {
.push({
path: this.redirect || '/',
})
.catch(() => {
});
.catch(() => {});
})
.catch(() => {
this.loading = false;