mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-14 10:55:06 +08:00
1. 统一化代码
2. 增加 DocAlert 关联文档
This commit is contained in:
@ -48,6 +48,7 @@ export default defineComponent({
|
||||
? dictData.value?.cssClass
|
||||
: ''
|
||||
}
|
||||
disableTransitions={true}
|
||||
>
|
||||
{dictData.value?.label}
|
||||
</ElTag>
|
||||
|
32
src/components/DocAlert/index.vue
Normal file
32
src/components/DocAlert/index.vue
Normal 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>
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user