From a661a5e1ea98dd91f6959fdc9a83864963ed485d Mon Sep 17 00:00:00 2001
From: "1378012178@qq.com" <1378012178@qq.com>
Date: Mon, 7 Apr 2025 15:41:50 +0800
Subject: [PATCH] =?UTF-8?q?app=E7=89=88=E6=9C=AC=E6=8E=A7=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../appVersionConfig/AppVersionConfig.api.ts | 72 +++++
.../appVersionConfig/AppVersionConfig.data.ts | 52 ++++
.../appVersionConfig/AppVersionConfigList.vue | 272 ++++++++++++++++++
.../components/AppVersionConfigForm.vue | 182 ++++++++++++
.../components/AppVersionConfigModal.vue | 77 +++++
5 files changed, 655 insertions(+)
create mode 100644 src/views/admin/appVersionConfig/AppVersionConfig.api.ts
create mode 100644 src/views/admin/appVersionConfig/AppVersionConfig.data.ts
create mode 100644 src/views/admin/appVersionConfig/AppVersionConfigList.vue
create mode 100644 src/views/admin/appVersionConfig/components/AppVersionConfigForm.vue
create mode 100644 src/views/admin/appVersionConfig/components/AppVersionConfigModal.vue
diff --git a/src/views/admin/appVersionConfig/AppVersionConfig.api.ts b/src/views/admin/appVersionConfig/AppVersionConfig.api.ts
new file mode 100644
index 0000000..381bbac
--- /dev/null
+++ b/src/views/admin/appVersionConfig/AppVersionConfig.api.ts
@@ -0,0 +1,72 @@
+import { defHttp } from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+ list = '/appVersionConfig/appVersionConfig/list',
+ save='/appVersionConfig/appVersionConfig/add',
+ edit='/appVersionConfig/appVersionConfig/edit',
+ deleteOne = '/appVersionConfig/appVersionConfig/delete',
+ deleteBatch = '/appVersionConfig/appVersionConfig/deleteBatch',
+ importExcel = '/appVersionConfig/appVersionConfig/importExcel',
+ exportXls = '/appVersionConfig/appVersionConfig/exportXls',
+}
+
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+
+/**
+ * 列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+/**
+ * 删除单个
+ * @param params
+ * @param handleSuccess
+ */
+export const deleteOne = (params,handleSuccess) => {
+ return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+}
+
+/**
+ * 批量删除
+ * @param params
+ * @param handleSuccess
+ */
+export const batchDelete = (params, handleSuccess) => {
+ createConfirm({
+ iconType: 'warning',
+ title: '确认删除',
+ content: '是否删除选中数据',
+ okText: '确认',
+ cancelText: '取消',
+ onOk: () => {
+ return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+ }
+ });
+}
+
+/**
+ * 保存或者更新
+ * @param params
+ * @param isUpdate
+ */
+export const saveOrUpdate = (params, isUpdate) => {
+ let url = isUpdate ? Api.edit : Api.save;
+ return defHttp.post({ url: url, params }, { isTransformResponse: false });
+}
diff --git a/src/views/admin/appVersionConfig/AppVersionConfig.data.ts b/src/views/admin/appVersionConfig/AppVersionConfig.data.ts
new file mode 100644
index 0000000..c2b155d
--- /dev/null
+++ b/src/views/admin/appVersionConfig/AppVersionConfig.data.ts
@@ -0,0 +1,52 @@
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { rules } from '/@/utils/helper/validator';
+import { render } from '/@/utils/common/renderUtils';
+import { getWeekMonthQuarterYear } from '/@/utils';
+//列表数据
+export const columns: BasicColumn[] = [
+ {
+ title: '版本号',
+ align: 'center',
+ dataIndex: 'versionCode',
+ },
+ {
+ title: '更新说明',
+ align: 'center',
+ dataIndex: 'updateTrips',
+ },
+ {
+ title: '是否强制更新',
+ align: 'center',
+ dataIndex: 'isForceUpdate',
+ format(text, record, index) {
+ if (text == '0') return '否';
+ else if (text == '1') return '是';
+ else return '';
+ },
+ },
+ {
+ title: '状态',
+ align: 'center',
+ dataIndex: 'status',
+ format(text, record, index) {
+ if (text == '0') return '不可用';
+ else if (text == '1') return '可用';
+ else return '';
+ },
+ },
+ {
+ title: 'app下载',
+ align: 'center',
+ dataIndex: 'versionUrl',
+ },
+];
+
+// 高级查询数据
+export const superQuerySchema = {
+ versionCode: { title: '版本号', order: 0, view: 'text', type: 'string' },
+ versionUrl: { title: '下载地址', order: 1, view: 'file', type: 'string' },
+ updateTrips: { title: '更新说明', order: 2, view: 'text', type: 'string' },
+ isForceUpdate: { title: '是否强制更新', order: 3, view: 'number', type: 'number', dictCode: '' },
+ status: { title: '状态', order: 4, view: 'number', type: 'number', dictCode: '' },
+};
diff --git a/src/views/admin/appVersionConfig/AppVersionConfigList.vue b/src/views/admin/appVersionConfig/AppVersionConfigList.vue
new file mode 100644
index 0000000..a5ef2d7
--- /dev/null
+++ b/src/views/admin/appVersionConfig/AppVersionConfigList.vue
@@ -0,0 +1,272 @@
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+ 删除
+
+
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无文件
+ 下载
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/admin/appVersionConfig/components/AppVersionConfigForm.vue b/src/views/admin/appVersionConfig/components/AppVersionConfigForm.vue
new file mode 100644
index 0000000..0870c68
--- /dev/null
+++ b/src/views/admin/appVersionConfig/components/AppVersionConfigForm.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 否
+ 是
+
+
+
+
+
+
+ 可用
+ 不可用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/admin/appVersionConfig/components/AppVersionConfigModal.vue b/src/views/admin/appVersionConfig/components/AppVersionConfigModal.vue
new file mode 100644
index 0000000..104f2c4
--- /dev/null
+++ b/src/views/admin/appVersionConfig/components/AppVersionConfigModal.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+