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 = 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'))
|
// 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(() => {
|
onMounted(() => {
|
||||||
|
|
|
||||||
|
|
@ -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'))
|
// 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 = () => {
|
const makeTemplate = () => {
|
||||||
|
|
|
||||||
|
|
@ -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'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue