From 7cfb09fe3c1c0cd358d3332208991f51dcb965df Mon Sep 17 00:00:00 2001
From: shizhong <124974919@qq.com>
Date: Tue, 13 Jun 2023 10:56:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=91=BD=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 3 ++
src/views/bpm/group/UserGroupForm.vue | 14 +++---
src/views/bpm/model/ModelForm.vue | 14 +++---
src/views/bpm/model/ModelImportForm.vue | 8 ++--
.../detail/TaskUpdateAssigneeForm.vue | 10 ++---
.../bpm/taskAssignRule/TaskAssignRuleForm.vue | 10 ++---
.../infra/apiAccessLog/ApiAccessLogDetail.vue | 6 +--
.../infra/apiErrorLog/ApiErrorLogDetail.vue | 6 +--
src/views/infra/codegen/ImportTable.vue | 8 ++--
src/views/infra/codegen/PreviewCode.vue | 6 +--
src/views/infra/config/form.vue | 14 +++---
src/views/infra/dataSourceConfig/form.vue | 14 +++---
src/views/infra/file/form.vue | 14 +++---
src/views/infra/fileConfig/form.vue | 14 +++---
src/views/infra/job/JobDetail.vue | 6 +--
src/views/infra/job/JobForm.vue | 14 +++---
src/views/infra/job/logger/JobLogDetail.vue | 6 +--
src/views/infra/job/utils.ts | 44 +++++++++++++++++++
.../mall/product/category/CategoryForm.vue | 14 +++---
.../mall/product/property/PropertyForm.vue | 14 +++---
src/views/mall/product/property/index.vue | 2 +-
.../mall/product/property/value/ValueForm.vue | 14 +++---
.../mall/product/property/value/index.vue | 2 +-
src/views/mp/account/AccountForm.vue | 14 +++---
src/views/mp/tag/TagForm.vue | 14 +++---
src/views/system/notify/template/index.vue | 14 +++---
26 files changed, 173 insertions(+), 126 deletions(-)
create mode 100644 src/views/infra/job/utils.ts
diff --git a/.gitignore b/.gitignore
index ac15926b..647ed112 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,6 @@ pnpm-debug
.idea
.history
+
+yarn.lock
+*.iml
diff --git a/src/views/bpm/group/UserGroupForm.vue b/src/views/bpm/group/UserGroupForm.vue
index 9496ad84..e8011d8c 100644
--- a/src/views/bpm/group/UserGroupForm.vue
+++ b/src/views/bpm/group/UserGroupForm.vue
@@ -1,5 +1,5 @@
-
@@ -50,8 +50,8 @@ import * as UserApi from '@/api/system/user'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -72,8 +72,8 @@ const userList = ref([]) // 用户列表
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -108,7 +108,7 @@ const submitForm = async () => {
await UserGroupApi.updateUserGroup(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/bpm/model/ModelForm.vue b/src/views/bpm/model/ModelForm.vue
index 28b64cba..865b864c 100644
--- a/src/views/bpm/model/ModelForm.vue
+++ b/src/views/bpm/model/ModelForm.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -129,8 +129,8 @@ import * as FormApi from '@/api/bpm/form'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -154,8 +154,8 @@ const formList = ref([]) // 流程表单的下拉框的数据
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -203,7 +203,7 @@ const submitForm = async () => {
await ModelApi.updateModelApi(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/bpm/model/ModelImportForm.vue b/src/views/bpm/model/ModelImportForm.vue
index fe542622..76493c95 100644
--- a/src/views/bpm/model/ModelImportForm.vue
+++ b/src/views/bpm/model/ModelImportForm.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -53,7 +53,7 @@
import { getAccessToken, getTenantId } from '@/utils/auth'
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
+const dialogVisible = ref(false) // 弹窗的是否展示
const formLoading = ref(false) // 表单的加载中
const formData = ref({
key: '',
@@ -72,7 +72,7 @@ const fileList = ref([]) // 文件列表
/** 打开弹窗 */
const open = async () => {
- modelVisible.value = true
+ dialogVisible.value = true
resetForm()
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
diff --git a/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue b/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue
index 7f9cfd48..0f16deeb 100644
--- a/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue
+++ b/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -28,7 +28,7 @@
import * as TaskApi from '@/api/bpm/task'
import * as UserApi from '@/api/system/user'
-const modelVisible = ref(false) // 弹窗的是否展示
+const dialogVisible = ref(false) // 弹窗的是否展示
const formLoading = ref(false) // 表单的加载中
const formData = ref({
id: '',
@@ -43,7 +43,7 @@ const userList = ref([]) // 用户列表
/** 打开弹窗 */
const open = async (id: string) => {
- modelVisible.value = true
+ dialogVisible.value = true
resetForm()
formData.value.id = id
// 获得用户列表
@@ -62,7 +62,7 @@ const submitForm = async () => {
formLoading.value = true
try {
await TaskApi.updateTaskAssignee(formData.value)
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue b/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue
index a452cab9..2ddebab1 100644
--- a/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue
+++ b/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue
@@ -1,5 +1,5 @@
-
+
@@ -93,7 +93,7 @@
确 定
- 取 消
+ 取 消
@@ -109,7 +109,7 @@ import * as UserGroupApi from '@/api/bpm/userGroup'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
+const dialogVisible = ref(false) // 弹窗的是否展示
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formData = ref({
type: Number(undefined),
@@ -171,7 +171,7 @@ const open = async (modelId: string, row: TaskAssignRuleApi.TaskAssignVO) => {
formData.value.scripts.push(...row.options)
}
// 打开弹窗
- modelVisible.value = true
+ dialogVisible.value = true
// 获得角色列表
roleOptions.value = await RoleApi.getSimpleRoleList()
@@ -232,7 +232,7 @@ const submitForm = async () => {
await TaskAssignRuleApi.updateTaskAssignRule(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue
index d046a521..4746b0c7 100644
--- a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue
+++ b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue
@@ -1,5 +1,5 @@
-
+
{{ detailData.id }}
@@ -45,13 +45,13 @@ import { DICT_TYPE } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
import * as ApiAccessLog from '@/api/infra/apiAccessLog'
-const modelVisible = ref(false) // 弹窗的是否展示
+const dialogVisible = ref(false) // 弹窗的是否展示
const detailLoading = ref(false) // 表单地加载中
const detailData = ref() // 详情数据
/** 打开弹窗 */
const open = async (data: ApiAccessLog.ApiAccessLogVO) => {
- modelVisible.value = true
+ dialogVisible.value = true
// 设置数据
detailLoading.value = true
try {
diff --git a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue
index 5076fe00..4b279924 100644
--- a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue
+++ b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue
@@ -1,5 +1,5 @@
-
+
{{ detailData.id }}
@@ -60,13 +60,13 @@ import { DICT_TYPE } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
import * as ApiErrorLog from '@/api/infra/apiErrorLog'
-const modelVisible = ref(false) // 弹窗的是否展示
+const dialogVisible = ref(false) // 弹窗的是否展示
const detailLoading = ref(false) // 表单的加载中
const detailData = ref() // 详情数据
/** 打开弹窗 */
const open = async (data: ApiErrorLog.ApiErrorLogVO) => {
- modelVisible.value = true
+ dialogVisible.value = true
// 设置数据
detailLoading.value = true
try {
diff --git a/src/views/infra/codegen/ImportTable.vue b/src/views/infra/codegen/ImportTable.vue
index b89b2923..0146b6c3 100644
--- a/src/views/infra/codegen/ImportTable.vue
+++ b/src/views/infra/codegen/ImportTable.vue
@@ -1,5 +1,5 @@
-
+
@@ -69,7 +69,7 @@ import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
import { ElTable } from 'element-plus'
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
+const dialogVisible = ref(false) // 弹窗的是否展示
const dbTableLoading = ref(true) // 数据源的加载中
const dbTableList = ref([]) // 表的列表
const queryParams = reactive({
@@ -103,7 +103,7 @@ const open = async () => {
// 加载数据源的列表
dataSourceConfigList.value = await DataSourceConfigApi.getDataSourceConfigList()
queryParams.dataSourceConfigId = dataSourceConfigList.value[0].id as number
- modelVisible.value = true
+ dialogVisible.value = true
// 加载表的列表
await getList()
}
@@ -111,7 +111,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 关闭弹窗 */
const close = () => {
- modelVisible.value = false
+ dialogVisible.value = false
tableList.value = []
}
diff --git a/src/views/infra/codegen/PreviewCode.vue b/src/views/infra/codegen/PreviewCode.vue
index df521f5a..6a81499d 100644
--- a/src/views/infra/codegen/PreviewCode.vue
+++ b/src/views/infra/codegen/PreviewCode.vue
@@ -1,7 +1,7 @@
{
- modelVisible.value = true
+ dialogVisible.value = true
try {
loading.value = true
// 生成代码
diff --git a/src/views/infra/config/form.vue b/src/views/infra/config/form.vue
index 8d96b629..18ecfa3d 100644
--- a/src/views/infra/config/form.vue
+++ b/src/views/infra/config/form.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -47,8 +47,8 @@ import * as ConfigApi from '@/api/infra/config'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -71,8 +71,8 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const openModal = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -105,7 +105,7 @@ const submitForm = async () => {
await ConfigApi.updateConfig(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/infra/dataSourceConfig/form.vue b/src/views/infra/dataSourceConfig/form.vue
index cd79e24b..33f67c56 100644
--- a/src/views/infra/dataSourceConfig/form.vue
+++ b/src/views/infra/dataSourceConfig/form.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -32,8 +32,8 @@ import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -53,8 +53,8 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const openModal = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -87,7 +87,7 @@ const submitForm = async () => {
await DataSourceConfigApi.updateDataSourceConfig(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/infra/file/form.vue b/src/views/infra/file/form.vue
index b0a76e0e..56dbf25f 100644
--- a/src/views/infra/file/form.vue
+++ b/src/views/infra/file/form.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -36,8 +36,8 @@ import { getAccessToken } from '@/utils/auth'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const url = import.meta.env.VITE_UPLOAD_URL
const headers = { Authorization: 'Bearer ' + getAccessToken() }
@@ -46,8 +46,8 @@ const uploadRef = ref()
/** 打开弹窗 */
const openModal = async () => {
- modelVisible.value = true
- modelTitle.value = t('action.fileUpload')
+ dialogVisible.value = true
+ dialogTitle.value = t('action.fileUpload')
}
defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗
@@ -71,7 +71,7 @@ const submitFileForm = () => {
/** 文件上传成功处理 */
const handleFileSuccess = () => {
// 清理
- modelVisible.value = false
+ dialogVisible.value = false
formLoading.value = false
unref(uploadRef)?.clearFiles()
// 提示成功,并刷新
diff --git a/src/views/infra/fileConfig/form.vue b/src/views/infra/fileConfig/form.vue
index f08ba4c4..740d29ed 100644
--- a/src/views/infra/fileConfig/form.vue
+++ b/src/views/infra/fileConfig/form.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -105,8 +105,8 @@ import * as FileConfigApi from '@/api/infra/fileConfig'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -137,8 +137,8 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const openModal = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -171,7 +171,7 @@ const submitForm = async () => {
await FileConfigApi.updateFileConfig(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/infra/job/JobDetail.vue b/src/views/infra/job/JobDetail.vue
index 081c50de..18e4235b 100644
--- a/src/views/infra/job/JobDetail.vue
+++ b/src/views/infra/job/JobDetail.vue
@@ -1,5 +1,5 @@
-
+
{{ detailData.id }}
@@ -47,14 +47,14 @@ import { DICT_TYPE } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
import * as JobApi from '@/api/infra/job'
-const modelVisible = ref(false) // 弹窗的是否展示
+const dialogVisible = ref(false) // 弹窗的是否展示
const detailLoading = ref(false) // 表单的加载中
const detailData = ref({}) // 详情数据
const nextTimes = ref([]) // 下一轮执行时间的数组
/** 打开弹窗 */
const open = async (id: number) => {
- modelVisible.value = true
+ dialogVisible.value = true
// 查看,设置数据
if (id) {
detailLoading.value = true
diff --git a/src/views/infra/job/JobForm.vue b/src/views/infra/job/JobForm.vue
index 5148d181..9c03bd1c 100644
--- a/src/views/infra/job/JobForm.vue
+++ b/src/views/infra/job/JobForm.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -50,8 +50,8 @@ import * as JobApi from '@/api/infra/job'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -72,8 +72,8 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -106,7 +106,7 @@ const submitForm = async () => {
await JobApi.updateJob(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/infra/job/logger/JobLogDetail.vue b/src/views/infra/job/logger/JobLogDetail.vue
index 7c4bab2b..3b8795d9 100644
--- a/src/views/infra/job/logger/JobLogDetail.vue
+++ b/src/views/infra/job/logger/JobLogDetail.vue
@@ -1,5 +1,5 @@
-
+
{{ detailData.id }}
@@ -36,13 +36,13 @@ import { DICT_TYPE } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
import * as JobLogApi from '@/api/infra/jobLog'
-const modelVisible = ref(false) // 弹窗的是否展示
+const dialogVisible = ref(false) // 弹窗的是否展示
const detailLoading = ref(false) // 表单的加载中
const detailData = ref({}) // 详情数据
/** 打开弹窗 */
const open = async (id: number) => {
- modelVisible.value = true
+ dialogVisible.value = true
// 查看,设置数据
if (id) {
detailLoading.value = true
diff --git a/src/views/infra/job/utils.ts b/src/views/infra/job/utils.ts
new file mode 100644
index 00000000..a3774f22
--- /dev/null
+++ b/src/views/infra/job/utils.ts
@@ -0,0 +1,44 @@
+export const parseTime = (time) => {
+ if (!time) {
+ return null
+ }
+ const format = '{y}-{m}-{d} {h}:{i}:{s}'
+ let date
+ if (typeof time === 'object') {
+ date = time
+ } else {
+ if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
+ time = parseInt(time)
+ } else if (typeof time === 'string') {
+ time = time
+ .replace(new RegExp(/-/gm), '/')
+ .replace('T', ' ')
+ .replace(new RegExp(/\.[\d]{3}/gm), '')
+ }
+ if (typeof time === 'number' && time.toString().length === 10) {
+ time = time * 1000
+ }
+ date = new Date(time)
+ }
+ const formatObj = {
+ y: date.getFullYear(),
+ m: date.getMonth() + 1,
+ d: date.getDate(),
+ h: date.getHours(),
+ i: date.getMinutes(),
+ s: date.getSeconds(),
+ a: date.getDay()
+ }
+ const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
+ let value = formatObj[key]
+ // Note: getDay() returns 0 on Sunday
+ if (key === 'a') {
+ return ['日', '一', '二', '三', '四', '五', '六'][value]
+ }
+ if (result.length > 0 && value < 10) {
+ value = '0' + value
+ }
+ return value || 0
+ })
+ return time_str
+}
diff --git a/src/views/mall/product/category/CategoryForm.vue b/src/views/mall/product/category/CategoryForm.vue
index b3e68001..db395a66 100644
--- a/src/views/mall/product/category/CategoryForm.vue
+++ b/src/views/mall/product/category/CategoryForm.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -58,8 +58,8 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -81,8 +81,8 @@ const categoryTree = ref([]) // 分类树
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -117,7 +117,7 @@ const submitForm = async () => {
await ProductCategoryApi.updateCategory(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/mall/product/property/PropertyForm.vue b/src/views/mall/product/property/PropertyForm.vue
index 393d00ef..c9a21d64 100644
--- a/src/views/mall/product/property/PropertyForm.vue
+++ b/src/views/mall/product/property/PropertyForm.vue
@@ -1,5 +1,5 @@
-
+
@@ -27,8 +27,8 @@ import * as PropertyApi from '@/api/mall/product/property'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -42,8 +42,8 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -76,7 +76,7 @@ const submitForm = async () => {
await PropertyApi.updateProperty(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/mall/product/property/index.vue b/src/views/mall/product/property/index.vue
index ea992923..6c2e6e97 100644
--- a/src/views/mall/product/property/index.vue
+++ b/src/views/mall/product/property/index.vue
@@ -110,7 +110,7 @@ const queryParams = reactive({
})
const queryFormRef = ref() // 搜索的表单
-/** 查询参数列表 */
+/** 查询列表 */
const getList = async () => {
loading.value = true
try {
diff --git a/src/views/mall/product/property/value/ValueForm.vue b/src/views/mall/product/property/value/ValueForm.vue
index e113825a..3f6a5225 100644
--- a/src/views/mall/product/property/value/ValueForm.vue
+++ b/src/views/mall/product/property/value/ValueForm.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -28,8 +28,8 @@ import * as PropertyApi from '@/api/mall/product/property'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -46,8 +46,8 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const open = async (type: string, propertyId: number, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
formData.value.propertyId = propertyId
@@ -81,7 +81,7 @@ const submitForm = async () => {
await PropertyApi.updatePropertyValue(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/mall/product/property/value/index.vue b/src/views/mall/product/property/value/index.vue
index 85383e63..6f5ae5c8 100644
--- a/src/views/mall/product/property/value/index.vue
+++ b/src/views/mall/product/property/value/index.vue
@@ -108,7 +108,7 @@ const queryParams = reactive({
const queryFormRef = ref() // 搜索的表单
const propertyOptions = ref([]) // 属性项的列表
-/** 查询参数列表 */
+/** 查询列表 */
const getList = async () => {
loading.value = true
try {
diff --git a/src/views/mp/account/AccountForm.vue b/src/views/mp/account/AccountForm.vue
index 406db8fe..a80bb48f 100644
--- a/src/views/mp/account/AccountForm.vue
+++ b/src/views/mp/account/AccountForm.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -73,8 +73,8 @@ import * as AccountApi from '@/api/mp/account'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -98,8 +98,8 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 修改时,设置数据
@@ -132,7 +132,7 @@ const submitForm = async () => {
await AccountApi.updateAccount(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/mp/tag/TagForm.vue b/src/views/mp/tag/TagForm.vue
index db251cdf..e190af89 100644
--- a/src/views/mp/tag/TagForm.vue
+++ b/src/views/mp/tag/TagForm.vue
@@ -1,5 +1,5 @@
-
+
确 定
- 取 消
+ 取 消
@@ -22,8 +22,8 @@ import * as MpTagApi from '@/api/mp/tag'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
-const modelVisible = ref(false) // 弹窗的是否展示
-const modelTitle = ref('') // 弹窗的标题
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
@@ -37,8 +37,8 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const open = async (type: string, accountId: number, id?: number) => {
- modelVisible.value = true
- modelTitle.value = t('action.' + type)
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
formData.value.accountId = accountId
@@ -72,7 +72,7 @@ const submitForm = async () => {
await MpTagApi.updateTag(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
diff --git a/src/views/system/notify/template/index.vue b/src/views/system/notify/template/index.vue
index 4ec16a0a..8dd459ae 100644
--- a/src/views/system/notify/template/index.vue
+++ b/src/views/system/notify/template/index.vue
@@ -46,7 +46,7 @@
-
+
-
+
@@ -132,8 +132,8 @@ const [registerTable, { reload, deleteData }] = useXTable({
})
// 弹窗相关的变量
-const modelVisible = ref(false) // 是否显示弹出层
-const modelTitle = ref('edit') // 弹出层标题
+const dialogVisible = ref(false) // 是否显示弹出层
+const dialogTitle = ref('edit') // 弹出层标题
const modelLoading = ref(false) // 弹出层loading
const actionType = ref('') // 操作按钮的类型
const actionLoading = ref(false) // 按钮 Loading
@@ -143,9 +143,9 @@ const detailData = ref() // 详情 Ref
// 设置标题
const setDialogTile = (type: string) => {
modelLoading.value = true
- modelTitle.value = t('action.' + type)
+ dialogTitle.value = t('action.' + type)
actionType.value = type
- modelVisible.value = true
+ dialogVisible.value = true
}
// 新增操作
@@ -188,7 +188,7 @@ const submitForm = async () => {
await NotifyTemplateApi.updateNotifyTemplateApi(data)
message.success(t('common.updateSuccess'))
}
- modelVisible.value = false
+ dialogVisible.value = false
} finally {
actionLoading.value = false
// 刷新列表