解密加密

This commit is contained in:
Leo_Ding 2025-08-28 15:00:44 +08:00
parent 643e5454bf
commit d4fe575b37
3 changed files with 36 additions and 5 deletions

View File

@ -122,6 +122,7 @@
<gx-upload v-model="formData.fileList" accept-types=".jpg,.png,.webp" :fileNumber="1" /> <gx-upload v-model="formData.fileList" accept-types=".jpg,.png,.webp" :fileNumber="1" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-button type="primary" @click="handleCopy">复制</a-button> -->
</a-row> </a-row>
</a-card> </a-card>
</a-form> </a-form>
@ -140,7 +141,7 @@ import { useI18n } from 'vue-i18n'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import GxUpload from '@/components/GxUpload/index.vue' import GxUpload from '@/components/GxUpload/index.vue'
import { typerEnum, areaEnum } from "@/enums/useEnum" import { typerEnum, areaEnum } from "@/enums/useEnum"
import { spliceUrl,decryptString,encryptString } from "@/utils/util" import { spliceUrl, decryptString, encryptString } from "@/utils/util"
const emit = defineEmits(['ok']) const emit = defineEmits(['ok'])
const { t } = useI18n() // t const { t } = useI18n() // t
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal() const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
@ -213,6 +214,7 @@ async function handleEdit(record = {}) {
formData.value = { ...data } formData.value = { ...data }
formData.value.expireAt = data?.expireAt ? dayjs(data?.expireAt) : '' formData.value.expireAt = data?.expireAt ? dayjs(data?.expireAt) : ''
editorContent.value = decryptString(data.details) editorContent.value = decryptString(data.details)
// editorContent.value = data.details
if (data.cover && data.cover.length > 0) { if (data.cover && data.cover.length > 0) {
formData.value.fileList = [data.cover].map(item => config('http.apiBasic') + item) formData.value.fileList = [data.cover].map(item => config('http.apiBasic') + item)
} }
@ -225,6 +227,34 @@ async function handleEdit(record = {}) {
const uploadSuccess = (data) => { const uploadSuccess = (data) => {
fileList.value.push(data) fileList.value.push(data)
} }
// function handleCopy() {
// formRef.value.validateFields().then(async (values) => {
// try {
// showLoading()
// const params = {
// ...values,
// cover: spliceUrl(formData.value.fileList[0]),
// details: editorContent.value
// }
// let result = null
// console.log(params)
// result = await apis.equiteMgt.createProject(params).catch((error) => {
// throw new Error(error)
// })
// hideLoading()
// if (config('http.code.success') === result?.success) {
// hideModal()
// emit('ok')
// }
// } catch (error) {
// message.error({ content: error.message })
// hideLoading()
// }
// })
// .catch((e) => {
// hideLoading()
// })
// }
/** /**
* 确定 * 确定
*/ */

View File

@ -52,7 +52,7 @@
</template> </template>
<template v-if="column.dataIndex === 'details'"> <template v-if="column.dataIndex === 'details'">
<span style="cursor: pointer;color:#1677ff;" <span style="cursor: pointer;color:#1677ff;"
@click="content = record.details || ''; type = 2; open = true" type="link">点击查看</span> @click="content = decryptString(record.details) || ''; type = 2; open = true" type="link">点击查看</span>
</template> </template>
<template v-if="'status' === column.dataIndex"> <template v-if="'status' === column.dataIndex">
@ -116,7 +116,7 @@ import { typerEnum, areaEnum } from "@/enums/useEnum"
import EditDialog from './components/EditDialog.vue' import EditDialog from './components/EditDialog.vue'
import { PlusOutlined, EditOutlined, DeleteOutlined, QrcodeOutlined } from '@ant-design/icons-vue' import { PlusOutlined, EditOutlined, DeleteOutlined, QrcodeOutlined } from '@ant-design/icons-vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { decryptString } from "@/utils/util"
defineOptions({ defineOptions({
name: 'equiteType', name: 'equiteType',
}) })

View File

@ -55,7 +55,7 @@
</template> </template>
<template v-if="column.dataIndex === 'content'"> <template v-if="column.dataIndex === 'content'">
<span style="cursor: pointer;color:#1677ff;" <span style="cursor: pointer;color:#1677ff;"
@click="content = record.content || ''; modalType = 2; qropen = true" type="link">点击查看</span> @click="content = decryptString(record.content) || ''; modalType = 2; qropen = true" type="link">点击查看</span>
</template> </template>
<template v-if="'status' === column.dataIndex"> <template v-if="'status' === column.dataIndex">
<a-tag v-if="record.status === 'enabled'" :color="'green'">启用</a-tag> <a-tag v-if="record.status === 'enabled'" :color="'green'">启用</a-tag>
@ -104,6 +104,7 @@ import { PlusOutlined, EditOutlined, DeleteOutlined, QrcodeOutlined } from '@ant
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import qrlogo from '@/assets/qrlogo.png' import qrlogo from '@/assets/qrlogo.png'
import { customersEnum, areaEnum } from "@/enums/useEnum" import { customersEnum, areaEnum } from "@/enums/useEnum"
import { decryptString } from "@/utils/util"
const content = ref('') const content = ref('')
const modalType=ref(1) const modalType=ref(1)
const qrValue = ref('') const qrValue = ref('')