1、岗位校验问题

2、基础设施/文件管理/文件列表 复制不了bug
3、使用useClipboard但无法复制问题,换成浏览器复制
4、配置管理可以修改参数键值
pull/74/MERGE^2
gexinzhineng/gxzn27 2023-03-29 16:53:15 +08:00
parent 0503b7d078
commit 5bc785b0f7
6 changed files with 48 additions and 38 deletions

View File

@ -133,15 +133,24 @@ const openModel = (title: string) => {
} }
/** 复制 **/ /** 复制 **/
const copy = async (text: string) => { const copy = async (text: string) => {
const { copy, copied, isSupported } = useClipboard({ source: text }) // const { copy, copied, isSupported } = useClipboard({ source: JSON.stringify(text) })
if (!isSupported) { // if (!isSupported.value) {
message.error(t('common.copyError')) // message.error(t('common.copyError'))
} else { // } else {
await copy() // await copy()
if (unref(copied)) { // if (unref(copied.value)) {
// message.success(t('common.copySuccess'))
// }
// }
let url = JSON.stringify(text)
let oInput = document.createElement('textarea')
oInput.value = url
document.body.appendChild(oInput)
oInput.select() // ;
// console.log(oInput.value)
document.execCommand('Copy') //
message.success(t('common.copySuccess')) message.success(t('common.copySuccess'))
} oInput.remove()
}
} }
// ========== ========== // ========== ==========
onMounted(() => { onMounted(() => {

View File

@ -77,15 +77,24 @@ const showTemplate = () => {
/** 复制 **/ /** 复制 **/
const copy = async (text: string) => { const copy = async (text: string) => {
const { copy, copied, isSupported } = useClipboard({ source: text }) // const { copy, copied, isSupported } = useClipboard({ source: JSON.stringify(text) })
if (!isSupported) { // if (!isSupported.value) {
message.error(t('common.copyError')) // message.error(t('common.copyError'))
} else { // } else {
await copy() // await copy()
if (unref(copied)) { // if (unref(copied.value)) {
// message.success(t('common.copySuccess'))
// }
// }
let url = JSON.stringify(text)
let oInput = document.createElement('textarea')
oInput.value = url
document.body.appendChild(oInput)
oInput.select() // ;
// console.log(oInput.value)
document.execCommand('Copy') //
message.success(t('common.copySuccess')) message.success(t('common.copySuccess'))
} oInput.remove()
}
} }
const makeTemplate = () => { const makeTemplate = () => {

View File

@ -130,11 +130,11 @@ const handleFiles = (datas: CodegenPreviewVO[]) => {
/** 复制 **/ /** 复制 **/
const copy = async (text: string) => { const copy = async (text: string) => {
const { copy, copied, isSupported } = useClipboard({ source: text }) const { copy, copied, isSupported } = useClipboard({ source: text })
if (!isSupported) { if (!isSupported.value) {
message.error(t('common.copyError')) message.error(t('common.copyError'))
} else { } else {
await copy() await copy()
if (unref(copied)) { if (unref(copied.value)) {
message.success(t('common.copySuccess')) message.success(t('common.copySuccess'))
} }
} }

View File

@ -127,14 +127,6 @@ const handleCreate = async () => {
}, },
2 2
) )
unref(formRef)?.addSchema(
{
field: 'value',
label: '参数键值',
component: 'Input'
},
3
)
} }
} }
@ -144,8 +136,6 @@ const handleUpdate = async (rowId: number) => {
// //
const res = await ConfigApi.getConfigApi(rowId) const res = await ConfigApi.getConfigApi(rowId)
unref(formRef)?.delSchema('key') unref(formRef)?.delSchema('key')
unref(formRef)?.delSchema('value')
unref(formRef)?.setValues(res) unref(formRef)?.setValues(res)
} }

View File

@ -148,10 +148,12 @@ const beforeRemove: UploadProps['beforeRemove'] = () => {
// //
const handleExceed = (): void => { const handleExceed = (): void => {
message.error('最多只能上传一个文件!') message.error('最多只能上传一个文件!')
uploadDisabled.value = false
} }
// //
const excelUploadError = (): void => { const excelUploadError = (): void => {
message.error('导入数据失败,请您重新上传!') message.error('导入数据失败,请您重新上传!')
uploadDisabled.value = false
} }
// //
@ -165,11 +167,11 @@ const handleDetail = (row: FileApi.FileVO) => {
// ========== ========== // ========== ==========
const handleCopy = async (text: string) => { const handleCopy = async (text: string) => {
const { copy, copied, isSupported } = useClipboard({ source: text }) const { copy, copied, isSupported } = useClipboard({ source: text })
if (!isSupported) { if (!isSupported.value) {
message.error(t('common.copyError')) message.error(t('common.copyError'))
} else { } else {
await copy() await copy()
if (unref(copied)) { if (unref(copied.value)) {
message.success(t('common.copySuccess')) message.success(t('common.copySuccess'))
} }
} }

View File

@ -28,7 +28,7 @@ export const rules = reactive({
} }
], ],
status: [required], status: [required],
postIds: [{ required: true, message: '请选择岗位', trigger: ['blur', 'change'] }], postIds: [required],
mobile: [ mobile: [
required, required,
{ {
@ -86,11 +86,6 @@ const crudSchemas = reactive<VxeCrudSchema>({
field: 'deptId', field: 'deptId',
isTable: false isTable: false
}, },
{
title: '岗位',
field: 'postIds',
isTable: false
},
{ {
title: t('common.status'), title: t('common.status'),
field: 'status', field: 'status',
@ -103,6 +98,11 @@ const crudSchemas = reactive<VxeCrudSchema>({
} }
} }
}, },
{
title: '岗位',
field: 'postIds',
isTable: false
},
{ {
title: '最后登录时间', title: '最后登录时间',
field: 'loginDate', field: 'loginDate',