diff --git a/src/views/bpm/form/formEditor.vue b/src/views/bpm/form/formEditor.vue
index 989ea56ed71d5494214d9d5adc75a736c0a790de..418a75e852b188b547b7d8562d75eef099227167 100644
--- a/src/views/bpm/form/formEditor.vue
+++ b/src/views/bpm/form/formEditor.vue
@@ -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(() => {
diff --git a/src/views/infra/build/index.vue b/src/views/infra/build/index.vue
index 6f577e952b00a21da77e32b7879a8b6fd2ed2877..b3af638b4b504d13143e0a51433395591e8428e8 100644
--- a/src/views/infra/build/index.vue
+++ b/src/views/infra/build/index.vue
@@ -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 = () => {
diff --git a/src/views/infra/codegen/components/Preview.vue b/src/views/infra/codegen/components/Preview.vue
index 2d9482ff0468f0649fc94718db168e1c811dc989..6a6246a8eb8849ce7e64d24c1194c45ac17b1cc3 100644
--- a/src/views/infra/codegen/components/Preview.vue
+++ b/src/views/infra/codegen/components/Preview.vue
@@ -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'))
}
}
diff --git a/src/views/infra/config/config.data.ts b/src/views/infra/config/config.data.ts
index 41acfa1536998a80e2dd7ea63d1bbfc6c01bdc68..635745a5613cddcb7579bbae4e46fae33c0d4ee2 100644
--- a/src/views/infra/config/config.data.ts
+++ b/src/views/infra/config/config.data.ts
@@ -6,7 +6,8 @@ export const rules = reactive({
category: [required],
name: [required],
key: [required],
- value: [required]
+ value: [required],
+ visible: [{ required: true, message: '请选择是否可见', trigger: 'change' }]
})
// CrudSchema
diff --git a/src/views/infra/config/index.vue b/src/views/infra/config/index.vue
index b2bc8a8b43df37c5e1becf3611ba0c5d42bf192f..ddf9eebae4d028843e56b4f62115434455b492f3 100644
--- a/src/views/infra/config/index.vue
+++ b/src/views/infra/config/index.vue
@@ -93,8 +93,8 @@ const message = useMessage() // 消息弹窗
// 列表相关的变量
const [registerTable, { reload, deleteData, exportList }] = useXTable({
allSchemas: allSchemas,
- getListApi: ConfigApi.getConfigPageApi,
- deleteApi: ConfigApi.deleteConfigApi,
+ getListApi: ConfigApi.getConfigPage,
+ deleteApi: ConfigApi.deleteConfig,
exportListApi: ConfigApi.exportConfigApi
})
@@ -127,14 +127,6 @@ const handleCreate = async () => {
},
2
)
- unref(formRef)?.addSchema(
- {
- field: 'value',
- label: '参数键值',
- component: 'Input'
- },
- 3
- )
}
}
@@ -142,17 +134,15 @@ const handleCreate = async () => {
const handleUpdate = async (rowId: number) => {
setDialogTile('update')
// 设置数据
- const res = await ConfigApi.getConfigApi(rowId)
+ const res = await ConfigApi.getConfig(rowId)
unref(formRef)?.delSchema('key')
- unref(formRef)?.delSchema('value')
-
unref(formRef)?.setValues(res)
}
// 详情操作
const handleDetail = async (rowId: number) => {
setDialogTile('detail')
- const res = await ConfigApi.getConfigApi(rowId)
+ const res = await ConfigApi.getConfig(rowId)
detailData.value = res
}
@@ -167,10 +157,10 @@ const submitForm = async () => {
try {
const data = unref(formRef)?.formModel as ConfigApi.ConfigVO
if (actionType.value === 'create') {
- await ConfigApi.createConfigApi(data)
+ await ConfigApi.createConfig(data)
message.success(t('common.createSuccess'))
} else {
- await ConfigApi.updateConfigApi(data)
+ await ConfigApi.updateConfig(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
diff --git a/src/views/infra/fileList/index.vue b/src/views/infra/fileList/index.vue
index b9bfb81506175d656975220894f66bc27a3971bd..2309d05ce80effe4f58f7c3397d83b6e41285e97 100644
--- a/src/views/infra/fileList/index.vue
+++ b/src/views/infra/fileList/index.vue
@@ -59,6 +59,7 @@
:on-exceed="handleExceed"
:on-success="handleFileSuccess"
:on-error="excelUploadError"
+ :on-change="handleFileChange"
:before-remove="beforeRemove"
:auto-upload="false"
accept=".jpg, .png, .gif"
@@ -83,7 +84,7 @@
diff --git a/src/views/infra/job/JobLog.vue b/src/views/infra/job/JobLog.vue
index 1bf9d745360169cbe7ee7d4df5742fc41cbbf561..1771bbd74442baab21a973e78e774695944b0612 100644
--- a/src/views/infra/job/JobLog.vue
+++ b/src/views/infra/job/JobLog.vue
@@ -49,7 +49,6 @@
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index 8add0eabaa8c739c3bbe35602ec685aa34e1daba..aceadbbaa12651eba590395a4a0dfa76f1cb1d9f 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -1,159 +1,148 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
+
+
+
+
+
- 新增
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/system/notice/notice.data.ts b/src/views/system/notice/notice.data.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7a72a7239551a2adba727e768f366d81122dec95
--- /dev/null
+++ b/src/views/system/notice/notice.data.ts
@@ -0,0 +1,59 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+
+// 表单校验
+export const rules = reactive({
+ title: [required],
+ type: [required]
+})
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'seq',
+ action: true,
+ columns: [
+ {
+ title: '公告标题',
+ field: 'title',
+ isSearch: true
+ },
+ {
+ title: '公告类型',
+ field: 'type',
+ dictType: DICT_TYPE.SYSTEM_NOTICE_TYPE,
+ dictClass: 'number'
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '公告内容',
+ field: 'content',
+ table: {
+ type: 'html'
+ },
+ form: {
+ component: 'Editor',
+ colProps: {
+ span: 24
+ },
+ componentProps: {
+ valueHtml: ''
+ }
+ },
+ isTable: false
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts
index 7f7384eb9bf6b976302e00675c05582e2fa9dce6..2ea4d268013dd1089c42ad65781e8d900fc38a97 100644
--- a/src/views/system/user/user.data.ts
+++ b/src/views/system/user/user.data.ts
@@ -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({
field: 'deptId',
isTable: false
},
- {
- title: '岗位',
- field: 'postIds',
- isTable: false
- },
{
title: t('common.status'),
field: 'status',
@@ -103,6 +98,11 @@ const crudSchemas = reactive({
}
}
},
+ {
+ title: '岗位',
+ field: 'postIds',
+ isTable: false
+ },
{
title: '最后登录时间',
field: 'loginDate',