1、岗位校验问题
2、基础设施/文件管理/文件列表 复制不了bug 3、使用useClipboard但无法复制问题,换成浏览器复制 4、配置管理可以修改参数键值pull/74/MERGE^2
parent
0503b7d078
commit
5bc785b0f7
|
|
@ -133,15 +133,24 @@ const openModel = (title: string) => {
|
|||
}
|
||||
/** 复制 **/
|
||||
const copy = async (text: string) => {
|
||||
const { copy, copied, isSupported } = useClipboard({ source: text })
|
||||
if (!isSupported) {
|
||||
message.error(t('common.copyError'))
|
||||
} else {
|
||||
await copy()
|
||||
if (unref(copied)) {
|
||||
message.success(t('common.copySuccess'))
|
||||
}
|
||||
}
|
||||
// const { copy, copied, isSupported } = useClipboard({ source: JSON.stringify(text) })
|
||||
// if (!isSupported.value) {
|
||||
// message.error(t('common.copyError'))
|
||||
// } else {
|
||||
// await copy()
|
||||
// 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'))
|
||||
oInput.remove()
|
||||
}
|
||||
// ========== 初始化 ==========
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -77,15 +77,24 @@ const showTemplate = () => {
|
|||
|
||||
/** 复制 **/
|
||||
const copy = async (text: string) => {
|
||||
const { copy, copied, isSupported } = useClipboard({ source: text })
|
||||
if (!isSupported) {
|
||||
message.error(t('common.copyError'))
|
||||
} else {
|
||||
await copy()
|
||||
if (unref(copied)) {
|
||||
message.success(t('common.copySuccess'))
|
||||
}
|
||||
}
|
||||
// const { copy, copied, isSupported } = useClipboard({ source: JSON.stringify(text) })
|
||||
// if (!isSupported.value) {
|
||||
// message.error(t('common.copyError'))
|
||||
// } else {
|
||||
// await copy()
|
||||
// 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'))
|
||||
oInput.remove()
|
||||
}
|
||||
|
||||
const makeTemplate = () => {
|
||||
|
|
|
|||
|
|
@ -130,11 +130,11 @@ const handleFiles = (datas: CodegenPreviewVO[]) => {
|
|||
/** 复制 **/
|
||||
const copy = async (text: string) => {
|
||||
const { copy, copied, isSupported } = useClipboard({ source: text })
|
||||
if (!isSupported) {
|
||||
if (!isSupported.value) {
|
||||
message.error(t('common.copyError'))
|
||||
} else {
|
||||
await copy()
|
||||
if (unref(copied)) {
|
||||
if (unref(copied.value)) {
|
||||
message.success(t('common.copySuccess'))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,14 +127,6 @@ const handleCreate = async () => {
|
|||
},
|
||||
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)
|
||||
unref(formRef)?.delSchema('key')
|
||||
unref(formRef)?.delSchema('value')
|
||||
|
||||
unref(formRef)?.setValues(res)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -148,10 +148,12 @@ const beforeRemove: UploadProps['beforeRemove'] = () => {
|
|||
// 文件数超出提示
|
||||
const handleExceed = (): void => {
|
||||
message.error('最多只能上传一个文件!')
|
||||
uploadDisabled.value = false
|
||||
}
|
||||
// 上传错误提示
|
||||
const excelUploadError = (): void => {
|
||||
message.error('导入数据失败,请您重新上传!')
|
||||
uploadDisabled.value = false
|
||||
}
|
||||
|
||||
// 详情操作
|
||||
|
|
@ -165,11 +167,11 @@ const handleDetail = (row: FileApi.FileVO) => {
|
|||
// ========== 复制相关 ==========
|
||||
const handleCopy = async (text: string) => {
|
||||
const { copy, copied, isSupported } = useClipboard({ source: text })
|
||||
if (!isSupported) {
|
||||
if (!isSupported.value) {
|
||||
message.error(t('common.copyError'))
|
||||
} else {
|
||||
await copy()
|
||||
if (unref(copied)) {
|
||||
if (unref(copied.value)) {
|
||||
message.success(t('common.copySuccess'))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export const rules = reactive({
|
|||
}
|
||||
],
|
||||
status: [required],
|
||||
postIds: [{ required: true, message: '请选择岗位', trigger: ['blur', 'change'] }],
|
||||
postIds: [required],
|
||||
mobile: [
|
||||
required,
|
||||
{
|
||||
|
|
@ -86,11 +86,6 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
|||
field: 'deptId',
|
||||
isTable: false
|
||||
},
|
||||
{
|
||||
title: '岗位',
|
||||
field: 'postIds',
|
||||
isTable: false
|
||||
},
|
||||
{
|
||||
title: t('common.status'),
|
||||
field: 'status',
|
||||
|
|
@ -103,6 +98,11 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '岗位',
|
||||
field: 'postIds',
|
||||
isTable: false
|
||||
},
|
||||
{
|
||||
title: '最后登录时间',
|
||||
field: 'loginDate',
|
||||
|
|
|
|||
Loading…
Reference in New Issue