|
@@ -44,15 +44,21 @@
|
|
|
<router-link to="/resetPassword">《用户协议》</router-link>
|
|
<router-link to="/resetPassword">《用户协议》</router-link>
|
|
|
</div>
|
|
</div>
|
|
|
</a-form-item>-->
|
|
</a-form-item>-->
|
|
|
- <a-form-item class="mt20">
|
|
|
|
|
|
|
+ <a-form-item class="mt20" name="isRead">
|
|
|
<a-button
|
|
<a-button
|
|
|
@click="loginAction"
|
|
@click="loginAction"
|
|
|
:loading="loading"
|
|
:loading="loading"
|
|
|
:disabled="goHomeloading"
|
|
:disabled="goHomeloading"
|
|
|
- >登录</a-button>
|
|
|
|
|
- <div class="register">
|
|
|
|
|
- <a-checkbox v-model:checked="form.isRead">已阅读并同意</a-checkbox>
|
|
|
|
|
- <router-link to="/resetPassword">《用户协议》</router-link>
|
|
|
|
|
|
|
+ >登录</a-button>‚
|
|
|
|
|
+ <div class="agreement agreement-header">
|
|
|
|
|
+ <a-checkbox v-model:checked="isReadAgreement">已阅读并同意</a-checkbox>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="agreement">
|
|
|
|
|
+ <a
|
|
|
|
|
+ v-for="item in agreementList"
|
|
|
|
|
+ @click="showModal(item)"
|
|
|
|
|
+ :key="item.agreementid"
|
|
|
|
|
+ >《{{ item.agreementname }}》</a>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="register" v-if="isOpenUrl">
|
|
<div class="register" v-if="isOpenUrl">
|
|
|
还没有账号,
|
|
还没有账号,
|
|
@@ -63,13 +69,27 @@
|
|
|
</div>
|
|
</div>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
|
|
+ <a-modal
|
|
|
|
|
+ class="commonModal"
|
|
|
|
|
+ v-if="selectedAgreement?.agreementname"
|
|
|
|
|
+ :title="selectedAgreement?.agreementname"
|
|
|
|
|
+ v-model:visible="visible"
|
|
|
|
|
+ centered
|
|
|
|
|
+ @cancel="closeModel"
|
|
|
|
|
+ :footer="null"
|
|
|
|
|
+ width="890px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <p class="agreement-content">{{ selectedAgreement.agreementcontent }}</p>
|
|
|
|
|
+ </a-modal>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { setLoadComplete } from '@/common/methods';
|
|
|
|
|
|
|
+import { initData, setLoadComplete } from '@/common/methods';
|
|
|
import { globalDataRefresh } from '@/services/bus/index';
|
|
import { globalDataRefresh } from '@/services/bus/index';
|
|
|
import { login } from '@/services/bus/login';
|
|
import { login } from '@/services/bus/login';
|
|
|
|
|
+import { queryUserNodeCfgAndStatus } from '@/services/go/QhjSys';
|
|
|
|
|
+import { QueryUserNodeCfgAndStatusRsp } from '@/services/go/QhjSys/interface';
|
|
|
import { isOpenUrl, serviceURL } from '@/services/request/serviceURL';
|
|
import { isOpenUrl, serviceURL } from '@/services/request/serviceURL';
|
|
|
import eventBus from '@/utils/eventBus/index';
|
|
import eventBus from '@/utils/eventBus/index';
|
|
|
import { localStorageUtil } from '@/utils/storage/index';
|
|
import { localStorageUtil } from '@/utils/storage/index';
|
|
@@ -98,21 +118,46 @@ function setRememberAccount(): void {
|
|
|
Object.assign(initForm, { account, isRemember: true });
|
|
Object.assign(initForm, { account, isRemember: true });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+function setLogo() {
|
|
|
|
|
+ const img = document.querySelector('#logo_img') || document.createElement('img');
|
|
|
|
|
+ const obj = {
|
|
|
|
|
+ id: 'logo_img',
|
|
|
|
|
+ src: './logo.png',
|
|
|
|
|
+ style: 'margin-bottom: 180px',
|
|
|
|
|
+ };
|
|
|
|
|
+ Object.assign(img, obj);
|
|
|
|
|
+ document.querySelector('#img')?.appendChild(img);
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+// 协议
|
|
|
|
|
+function useAgreement() {
|
|
|
|
|
+ // 协议
|
|
|
|
|
+ const agreementList = ref<QueryUserNodeCfgAndStatusRsp[]>([])
|
|
|
|
|
+ const selectedAgreement = ref<QueryUserNodeCfgAndStatusRsp | null>(null)
|
|
|
|
|
+ const visible = ref<boolean>(false);
|
|
|
|
|
+ const showModal = (item: QueryUserNodeCfgAndStatusRsp) => {
|
|
|
|
|
+ selectedAgreement.value = item
|
|
|
|
|
+ visible.value = true;
|
|
|
|
|
+ };
|
|
|
|
|
+ const closeModel = () => {
|
|
|
|
|
+ visible.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+ initData(() => {
|
|
|
|
|
+ queryUserNodeCfgAndStatus({ nodetype: '2', agreementtype: 2 }).then(res => {
|
|
|
|
|
+ if (Array.isArray(res)) {
|
|
|
|
|
+ console.log('dddddddddssda', res)
|
|
|
|
|
+ agreementList.value = res
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ return { agreementList, showModal, selectedAgreement, visible, closeModel }
|
|
|
|
|
+}
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'login',
|
|
name: 'login',
|
|
|
components: {},
|
|
components: {},
|
|
|
setup() {
|
|
setup() {
|
|
|
- function setLogo() {
|
|
|
|
|
- const img = document.querySelector('#logo_img') || document.createElement('img');
|
|
|
|
|
- const obj = {
|
|
|
|
|
- id: 'logo_img',
|
|
|
|
|
- src: './logo.png',
|
|
|
|
|
- style: 'margin-bottom: 180px',
|
|
|
|
|
- };
|
|
|
|
|
- Object.assign(img, obj);
|
|
|
|
|
- document.querySelector('#img')?.appendChild(img);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const isReaad = localStorageUtil.getItem('readAgreement') ? true : false
|
|
|
|
|
+ const isReadAgreement = ref<boolean>(isReaad)
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
setLogo();
|
|
setLogo();
|
|
|
});
|
|
});
|
|
@@ -131,6 +176,11 @@ export default defineComponent({
|
|
|
const { getQtInfo } = qtAction();
|
|
const { getQtInfo } = qtAction();
|
|
|
function loginAction() {
|
|
function loginAction() {
|
|
|
formDom.value.validate().then(() => {
|
|
formDom.value.validate().then(() => {
|
|
|
|
|
+ if (!isReadAgreement.value) {
|
|
|
|
|
+ message.error('请阅读并同意协议')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ localStorageUtil.setItem('readAgreement', true)
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
const { account, password } = toRaw(form);
|
|
const { account, password } = toRaw(form);
|
|
|
setLoadComplete(false);
|
|
setLoadComplete(false);
|
|
@@ -172,12 +222,19 @@ export default defineComponent({
|
|
|
function register() {
|
|
function register() {
|
|
|
window.open(serviceURL.openApiUrl, '_blank');
|
|
window.open(serviceURL.openApiUrl, '_blank');
|
|
|
}
|
|
}
|
|
|
- return { form, loginAction, rules, formDom, loading, goHomeloading, goHome, register, isOpenUrl };
|
|
|
|
|
|
|
+ return { form, loginAction, isReadAgreement, rules, formDom, loading, goHomeloading, goHome, register, isOpenUrl, ...useAgreement() };
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
|
|
+.agreement-header {
|
|
|
|
|
+ margin-top: -30px;
|
|
|
|
|
+}
|
|
|
|
|
+.agreement {
|
|
|
|
|
+ height: 30px;
|
|
|
|
|
+ line-height: 30px;
|
|
|
|
|
+}
|
|
|
.register {
|
|
.register {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
}
|
|
}
|
|
@@ -200,6 +257,10 @@ export default defineComponent({
|
|
|
.flex();
|
|
.flex();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.agreement-content {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: @m-grey25;
|
|
|
|
|
+}
|
|
|
.login-background {
|
|
.login-background {
|
|
|
width: 275px;
|
|
width: 275px;
|
|
|
background: url("../../assets/images/logoBackground.png") no-repeat scroll 0
|
|
background: url("../../assets/images/logoBackground.png") no-repeat scroll 0
|