1. 统一化代码

2. 增加 DocAlert 关联文档
This commit is contained in:
YunaiV
2023-04-05 20:13:35 +08:00
parent bb88e3d77c
commit 4404554cfc
111 changed files with 640 additions and 567 deletions

View File

@ -48,6 +48,7 @@ export default defineComponent({
? dictData.value?.cssClass
: ''
}
disableTransitions={true}
>
{dictData.value?.label}
</ElTag>

View File

@ -0,0 +1,32 @@
<template>
<el-alert v-if="getEnable()" type="success" show-icon>
<template #title>
<div @click="goToUrl">{{ '' + title + '文档地址' + url }}</div>
</template>
</el-alert>
</template>
<script setup lang="tsx" name="DocAlert">
import { propTypes } from '@/utils/propTypes'
const props = defineProps({
title: propTypes.string,
url: propTypes.string
})
/** 跳转 URL 链接 */
const goToUrl = () => {
window.open(props.url)
}
/** 是否开启 */
const getEnable = () => {
return import.meta.env.VITE_APP_TENANT_ENABLE === 'true'
}
</script>
<style scoped>
.el-alert--success.is-light {
border: 1px solid green;
margin-bottom: 10px;
cursor: pointer;
}
</style>

View File

@ -64,7 +64,7 @@
* */
import { resetSize } from './../utils/util'
import { aesEncrypt } from './../utils/ase'
import { getCodeApi, reqCheckApi } from '@/api/login'
import { getCode, reqCheck } from '@/api/login'
import { onMounted, reactive, ref, nextTick, toRefs, getCurrentInstance } from 'vue'
const props = defineProps({
@ -170,7 +170,7 @@ const canvasClick = (e) => {
: JSON.stringify(checkPosArr),
token: backToken.value
}
reqCheckApi(data).then((res) => {
reqCheck(data).then((res) => {
if (res.repCode == '0000') {
barAreaColor.value = '#4cae4c'
barAreaBorderColor.value = '#5cb85c'
@ -227,7 +227,7 @@ const getPictrue = async () => {
let data = {
captchaType: captchaType.value
}
const res = await getCodeApi(data)
const res = await getCode(data)
if (res.repCode == '0000') {
pointBackImgBase.value = res.repData.originalImageBase64
backToken.value = res.repData.token

View File

@ -78,7 +78,7 @@
* */
import { aesEncrypt } from './../utils/ase'
import { resetSize } from './../utils/util'
import { getCodeApi, reqCheckApi } from '@/api/login'
import { getCode, reqCheck } from '@/api/login'
const props = defineProps({
captchaType: {
@ -286,7 +286,7 @@ const end = () => {
: JSON.stringify({ x: moveLeftDistance, y: 5.0 }),
token: backToken.value
}
reqCheckApi(data).then((res) => {
reqCheck(data).then((res) => {
if (res.repCode == '0000') {
moveBlockBackgroundColor.value = '#5cb85c'
leftBarBorderColor.value = '#5cb85c'
@ -301,7 +301,7 @@ const end = () => {
}, 1500)
}
passFlag.value = true
tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed(2)}s
tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed(2)}s
${t('captcha.success')}`
var captchaVerification = secretKey.value
? aesEncrypt(
@ -363,7 +363,7 @@ const getPictrue = async () => {
let data = {
captchaType: captchaType.value
}
const res = await getCodeApi(data)
const res = await getCode(data)
if (res.repCode == '0000') {
backImgBase.value = res.repData.originalImageBase64
blockBackImgBase.value = res.repData.jigsawImageBase64