diff --git a/.env b/.env
index 3c5303b5b10ab5cf949ec09c1a0804287e30b189..986694a25a54f90fdb4fae87ea6f083035ce7f1e 100644
--- a/.env
+++ b/.env
@@ -1,5 +1,5 @@
# 标题
-VITE_APP_TITLE=芋道管理系统
+VITE_APP_TITLE=国通管理系统
# 项目本地运行端口号
VITE_PORT=80
diff --git a/README.md b/README.md
index aa498ce2034527e927c7ab3eed85575d9a3f08ac..b30e85967673032d248ee6861e7fb07ec51fdeb7 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
## 🐯 平台简介
-**芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
+**国通**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
* 采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) 实现
* 改换 saas,自动引入等功能
diff --git a/index.html b/index.html
index 8cfcbefa693e099f54d2a6a39c2f97ef9c49d920..40f85844386047e5b1c2b86c8f93eccf54ff673c 100644
--- a/index.html
+++ b/index.html
@@ -7,11 +7,11 @@
%VITE_APP_TITLE%
diff --git a/src/api/demo/brand/index.ts b/src/api/demo/brand/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..98fefbc162a7bd6d106a628f99dadeb55707bc81
--- /dev/null
+++ b/src/api/demo/brand/index.ts
@@ -0,0 +1,42 @@
+import request from '@/config/axios'
+
+export interface BrandVO {
+ id: number
+ name: string
+ brandSn: string
+ productType: string
+ startState: number
+ brandState: number
+ updator: string
+ remark: string
+}
+
+// 查询品牌列表
+export const getBrandPage = async (params) => {
+ return await request.get({ url: `/demo/brand/page`, params })
+}
+
+// 查询品牌详情
+export const getBrand = async (id: number) => {
+ return await request.get({ url: `/demo/brand/get?id=` + id })
+}
+
+// 新增品牌
+export const createBrand = async (data: BrandVO) => {
+ return await request.post({ url: `/demo/brand/create`, data })
+}
+
+// 修改品牌
+export const updateBrand = async (data: BrandVO) => {
+ return await request.put({ url: `/demo/brand/update`, data })
+}
+
+// 删除品牌
+export const deleteBrand = async (id: number) => {
+ return await request.delete({ url: `/demo/brand/delete?id=` + id })
+}
+
+// 导出品牌 Excel
+export const exportBrand = async (params) => {
+ return await request.download({ url: `/demo/brand/export-excel`, params })
+}
diff --git a/src/api/infra/codegen/index.ts b/src/api/infra/codegen/index.ts
index 64701efe42930aec95d1989dd2006927755c0f6f..a9bde9d3a6751ef7109ea46f70c527c1fcce1ee6 100644
--- a/src/api/infra/codegen/index.ts
+++ b/src/api/infra/codegen/index.ts
@@ -40,6 +40,12 @@ export type CodegenColumnVO = {
listOperationCondition: string
listOperationResult: number
htmlType: string
+ colLen: number
+ validateType: string
+ validateParams: string
+ crypt: string
+ sensitived: string
+ sensitivedType: string
}
export type DatabaseTableVO = {
@@ -119,5 +125,5 @@ export const createCodegenList = (data) => {
// 删除代码生成表定义
export const deleteCodegenTable = (id: number) => {
- return request.delete({ url: '/infra/codegen/delete?tableId=' + id })
+ return request.delete({ url: '/infra/codegen/delete?tableIds=' + id })
}
diff --git a/src/api/mall/product/favorite.ts b/src/api/mall/product/favorite.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3de5bd809d0bc2efc2265bf8900e6c7f2178cc80
--- /dev/null
+++ b/src/api/mall/product/favorite.ts
@@ -0,0 +1,28 @@
+import request from '@/config/axios'
+
+export interface Favorite {
+ id?: number
+ userId?: string // 用户编号
+ spuId?: number | null // 商品 SPU 编号
+}
+
+// 获得 ProductFavorite 列表
+export const getFavoritePage = (params: PageParam) => {
+ params.keyword = params.name
+ return request.get({ url: '/product/favorite/page', params })
+}
+
+// 收藏商品 Favorite
+export const addFavorite = (data: Favorite) => {
+ return request.post({ url: '/product/favorite/create', data })
+}
+
+// 取消商品收藏 Favorite
+export const delFavorite = (data: Favorite) => {
+ return request.delete({ url: '/product/favorite/delete', data })
+}
+
+// 是否收藏过商品 Favorite
+export const exitsFavorite = (data: Favorite) => {
+ return request.post({ url: '/product/favorite/exits', data })
+}
diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue
index 3fe21944b60f6ab439e676b1a41e0b9b6f359cb5..dc1459cbb11aa3c9183ffdced59eb86c364380b7 100644
--- a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue
+++ b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue
@@ -664,7 +664,7 @@ const previewProcessJson = () => {
previewModelVisible.value = true
})
}
-/* ------------------------------------------------ 芋道源码 methods ------------------------------------------------------ */
+/* ------------------------------------------------ 国通源码 methods ------------------------------------------------------ */
const processSave = async () => {
console.log(bpmnModeler, 'bpmnModelerbpmnModelerbpmnModelerbpmnModeler')
const { err, xml } = await bpmnModeler.saveXML()
diff --git a/src/hooks/web/useMessage.ts b/src/hooks/web/useMessage.ts
index ac2b552e035fdbe435b50d7c65e38e16683edeff..9bfb7a3a02bbd399b4d399fcad067cb95dd7a901 100644
--- a/src/hooks/web/useMessage.ts
+++ b/src/hooks/web/useMessage.ts
@@ -90,6 +90,18 @@ export const useMessage = () => {
cancelButtonText: t('common.cancel'),
type: 'warning'
})
+ },
+ // 取消收藏窗体
+ delStarConfirm(content?: string, tip?: string) {
+ return ElMessageBox.confirm(
+ content ? content : t('common.confirmDelStar'),
+ tip ? tip : t('common.confirmTitle'),
+ {
+ confirmButtonText: t('common.ok'),
+ cancelButtonText: t('common.cancel'),
+ type: 'warning'
+ }
+ )
}
}
}
diff --git a/src/locales/en.ts b/src/locales/en.ts
index 4f4d4895df374506c5cca09829a23fb123d494a9..d82e616ed69e435f105506c0dffaedbc43fa9b96 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -54,7 +54,13 @@ export default {
updateTime: 'Update Time',
copy: 'Copy',
copySuccess: 'Copy Success',
- copyError: 'Copy Error'
+ copyError: 'Copy Error',
+ confirmDelStar: 'Delete the Star?',
+ starSuccess: 'Star Success',
+ starFail: 'Star Error',
+ delStarSuccess: 'Del Star Success',
+ delStarFail: 'Del Star Error',
+ existStar: 'exist Star'
},
error: {
noPermission: `Sorry, you don't have permission to access this page.`,
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 4f95852fc99fdfa4d9e1577c9e5064f93a9f6ee4..49a3f895de13b7374367da0bbd06682c567489b1 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -54,7 +54,13 @@ export default {
updateTime: '更新时间',
copy: '复制',
copySuccess: '复制成功',
- copyError: '复制失败'
+ copyError: '复制失败',
+ confirmDelStar: '是否取消收藏?',
+ starSuccess: '收藏成功',
+ starFail: '收藏失败',
+ delStarSuccess: '取消收藏成功',
+ delStarFail: '取消收藏失败',
+ existStar: '收藏已存在'
},
error: {
noPermission: `抱歉,您无权访问此页面。`,
diff --git a/src/utils/constants.ts b/src/utils/constants.ts
index 41891a4a41b9080f54259c02e73678ae6f60b263..d57d4c793d56fd40a0072740c124898e5cd9b90b 100644
--- a/src/utils/constants.ts
+++ b/src/utils/constants.ts
@@ -1,5 +1,5 @@
/**
- * Created by 芋道源码
+ * Created by 国通源码
*
* 枚举类
*/
diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue
index 9bee25237a4dfe58909b2da96fc24ec23537df2c..9b20a6936e22d8016dbe55d435ee991d756a3b2f 100644
--- a/src/views/Login/components/LoginForm.vue
+++ b/src/views/Login/components/LoginForm.vue
@@ -125,21 +125,21 @@
- 萌新必读
-
-
-
- 📚开发指南
- 🔥视频教程
-
- ⚡面试手册
-
-
- 🤝外包咨询
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -184,7 +184,7 @@ const loginData = reactive({
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
loginForm: {
- tenantName: '芋道源码',
+ tenantName: '国通源码',
username: 'admin',
password: 'admin123',
captchaVerification: '',
diff --git a/src/views/Login/components/MobileForm.vue b/src/views/Login/components/MobileForm.vue
index 7f5d9942ed78bb7f8d6edbef201e2f4e072c1656..bbac5ed7ea8b14b9416e7b9c9392e352ee711e94 100644
--- a/src/views/Login/components/MobileForm.vue
+++ b/src/views/Login/components/MobileForm.vue
@@ -133,7 +133,7 @@ const loginData = reactive({
},
loginForm: {
uuid: '',
- tenantName: '芋道源码',
+ tenantName: '国通源码',
mobileNumber: '',
code: ''
}
diff --git a/src/views/demo/brand/BrandForm.vue b/src/views/demo/brand/BrandForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..d463f2b4c6fb3940a0a4b5b73f10ec2362dcc782
--- /dev/null
+++ b/src/views/demo/brand/BrandForm.vue
@@ -0,0 +1,136 @@
+
+
+
+
diff --git a/src/views/demo/brand/index.vue b/src/views/demo/brand/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..d586e9b312a050c2df29979cefc1bffbae5d282a
--- /dev/null
+++ b/src/views/demo/brand/index.vue
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/infra/codegen/EditTable.vue b/src/views/infra/codegen/EditTable.vue
index 9c4e765788c33ce6f00f73dd14ab3f1f501b34d0..39b27bf279f0eec71d9bfff6d08c6b9f63422f34 100644
--- a/src/views/infra/codegen/EditTable.vue
+++ b/src/views/infra/codegen/EditTable.vue
@@ -11,7 +11,7 @@
-
+
保存
返回
@@ -51,6 +51,13 @@ const getDetail = async () => {
formLoading.value = true
try {
formData.value = await CodegenApi.getCodegenTable(id)
+ let columns = formData.value.columns
+ // 级联回显处理:字符串转数组
+ columns.forEach((e) => {
+ if (e.validateType && e.validateType.indexOf(',') != -1) {
+ e.validateType = JSON.parse('[' + e.validateType + ']')
+ }
+ })
} finally {
formLoading.value = false
}
@@ -63,6 +70,12 @@ const submitForm = async () => {
await unref(basicInfoRef)?.validate()
await unref(generateInfoRef)?.validate()
try {
+ // 级联字段转字符串
+ formData.value.columns.forEach((e) => {
+ if (e.validateType && e.validateType instanceof Array) {
+ e.validateType = e.validateType.join(',')
+ }
+ })
// 提交请求
await CodegenApi.updateCodegenTable(formData.value)
message.success(t('common.updateSuccess'))
diff --git a/src/views/infra/codegen/components/ColumInfoForm.vue b/src/views/infra/codegen/components/ColumInfoForm.vue
index 737c2e2bab26e9079fb4b502a9642779cbfc055b..fb15c13bf1401669a3386d2c40e633a69e407403 100644
--- a/src/views/infra/codegen/components/ColumInfoForm.vue
+++ b/src/views/infra/codegen/components/ColumInfoForm.vue
@@ -1,12 +1,27 @@
-
+
+
-
+
@@ -14,10 +29,10 @@
-
+
@@ -30,22 +45,22 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -73,12 +88,12 @@
-
+
-
+
@@ -93,9 +108,15 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -135,6 +230,166 @@ const getDictOptions = async () => {
dictOptions.value = await DictDataApi.getSimpleDictTypeList()
}
+const validateTypeOptions = [
+ {
+ label: '身份证',
+ value: 1,
+ id: 100
+ },
+ {
+ label: '邮件',
+ value: 2,
+ id: 102
+ },
+ {
+ label: '手机',
+ value: 3,
+ id: 103
+ },
+ {
+ label: '电话',
+ value: 4,
+ id: 104
+ },
+ {
+ label: '等值',
+ value: 5,
+ id: 105,
+ children: [
+ {
+ label: '大于等于',
+ value: 1,
+ id: 106
+ },
+ {
+ label: '小于等于',
+ value: 2,
+ id: 107
+ },
+ {
+ label: '大于',
+ value: 3,
+ id: 108
+ },
+ {
+ label: '小于',
+ value: 4,
+ id: 109
+ },
+ {
+ label: '大于等于小于',
+ value: 5,
+ id: 110
+ },
+ {
+ label: '大于小于等于',
+ value: 6,
+ id: 111
+ },
+ {
+ label: '大于小于',
+ value: 7,
+ id: 112
+ },
+ {
+ label: '大于等于小于等于',
+ value: 8,
+ id: 113
+ }
+ ]
+ },
+ {
+ label: '数值',
+ value: 6,
+ id: 115,
+ children: [
+ {
+ label: '位数(整数位,小数位)',
+ value: 1,
+ id: 116
+ },
+ {
+ label: '正数',
+ value: 2,
+ id: 117
+ },
+ {
+ label: '非负数',
+ value: 3,
+ id: 118
+ },
+ {
+ label: '负数',
+ value: 4,
+ id: 119
+ },
+ {
+ label: '非正数',
+ value: 5,
+ id: 120
+ }
+ ]
+ },
+ {
+ label: '日期',
+ value: 7,
+ id: 121,
+ children: [
+ {
+ label: '过去的日期',
+ value: 1,
+ id: 122
+ },
+ {
+ label: '过去或现在的日期',
+ value: 2,
+ id: 123
+ },
+ {
+ label: '未来的日期',
+ value: 3,
+ id: 124
+ },
+ {
+ label: '现在或未来的日期',
+ value: 4,
+ id: 125
+ }
+ ]
+ },
+ {
+ label: '正则',
+ value: 8,
+ id: 114
+ },
+ {
+ label: 'URL',
+ value: 9,
+ id: 126
+ },
+ {
+ label: '函数',
+ value: 10,
+ id: 127
+ }
+]
+const validateTypeProps = {
+ multiple: false
+}
+
+/** 关闭按钮 */
+const isDisabled = (columnName) => {
+ return (
+ columnName == 'id' ||
+ columnName == 'deleted' ||
+ columnName == 'create_time' ||
+ columnName == 'creator' ||
+ columnName == 'update_time' ||
+ columnName == 'updater' ||
+ columnName == 'tenant_id'
+ )
+}
+
watch(
() => props.columns,
(columns) => {
diff --git a/src/views/infra/codegen/index.vue b/src/views/infra/codegen/index.vue
index e06281c74ba7e853666c19b67b7a4fdf98e97f73..57a1dc8dc4aeadbe2060bda7a50386f6ee6e3a39 100644
--- a/src/views/infra/codegen/index.vue
+++ b/src/views/infra/codegen/index.vue
@@ -49,17 +49,52 @@
重置
-
-
+
+
+ 生成
+
+
+
导入
+
+
+ 修改
+
+
+
+ 删除
+
-
+
+
{{
@@ -163,6 +198,11 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const { push } = useRouter() // 路由跳转
+let ids = ref([]) // 选中数组
+let tableNames = ref([]) // 选中表数组
+let single = ref(true) // 非单个禁用
+let multiple = ref(true) // 非多个禁用
+
const loading = ref(true) // 列表的加载中
const total = ref(0) // 列表的总页数
const list = ref([]) // 列表的数据
@@ -208,7 +248,8 @@ const openImportTable = () => {
/** 编辑操作 */
const handleUpdate = (id: number) => {
- push('/codegen/edit?id=' + id)
+ const tableId = id || ids[0]
+ push('/codegen/edit?id=' + tableId)
}
/** 预览操作 */
@@ -220,10 +261,12 @@ const handlePreview = (row: CodegenApi.CodegenTableVO) => {
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
+ const tableId = id || ids
+ console.log(tableId)
// 删除的二次确认
await message.delConfirm()
// 发起删除
- await CodegenApi.deleteCodegenTable(id)
+ await CodegenApi.deleteCodegenTable(tableId)
message.success(t('common.delSuccess'))
// 刷新列表
await getList()
@@ -247,6 +290,16 @@ const handleGenTable = async (row: CodegenApi.CodegenTableVO) => {
download.zip(res, 'codegen-' + row.className + '.zip')
}
+// 多选框选中数据
+const handleSelectionChange = (selection) => {
+ ids = selection.map((item) => {
+ return item.id
+ })
+ tableNames = selection.map((item) => item.tableName)
+ single.value = selection.length != 1
+ multiple.value = !selection.length
+}
+
/** 初始化 **/
onMounted(async () => {
await getList()
diff --git a/src/views/member/user/detail/UserFavoriteList.vue b/src/views/member/user/detail/UserFavoriteList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..78e851eff9211fa1c23786970e5b050f0977ff37
--- /dev/null
+++ b/src/views/member/user/detail/UserFavoriteList.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ floatToFixed2(row.price) }}元
+
+
+
+
+
+
+
+
+
+
+
+ 收藏
+
+
+ 取消收藏
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue
index 1bac010e967ce68930bb3653dd8178628aefe9b3..b28b801ed558f0df6a11de48c89ee1f9411d3b08 100644
--- a/src/views/member/user/detail/index.vue
+++ b/src/views/member/user/detail/index.vue
@@ -48,7 +48,9 @@
售后管理(WIP)
- 收藏记录(WIP)
+
+
+
@@ -78,7 +80,7 @@ import UserPointList from './UserPointList.vue'
import UserSignList from './UserSignList.vue'
import { CardTitle } from '@/components/Card/index'
import { ElMessage } from 'element-plus'
-
+import UserFavoriteList from './UserFavoriteList.vue'
defineOptions({ name: 'MemberDetail' })
const loading = ref(true) // 加载中
diff --git a/src/views/mp/components/wx-material-select/main.vue b/src/views/mp/components/wx-material-select/main.vue
index aad25ea85a17d71a1f6503a4ce7ce69d26a7ca8e..a014796312226578f78750c00ede108627203a8c 100644
--- a/src/views/mp/components/wx-material-select/main.vue
+++ b/src/views/mp/components/wx-material-select/main.vue
@@ -1,7 +1,7 @@
diff --git a/src/views/mp/components/wx-msg/main.vue b/src/views/mp/components/wx-msg/main.vue
index 8b7cc3a2b0b7e9a3b6987330847dc9285b9123de..4aead6662d931177e0c278b937a7da82493d48c8 100644
--- a/src/views/mp/components/wx-msg/main.vue
+++ b/src/views/mp/components/wx-msg/main.vue
@@ -1,7 +1,7 @@
diff --git a/src/views/mp/components/wx-news/main.vue b/src/views/mp/components/wx-news/main.vue
index 154291b3d1174e669513e37fedaf34fead0f66ad..6b111afbf796d10ceb60688aec94062097021cb2 100644
--- a/src/views/mp/components/wx-news/main.vue
+++ b/src/views/mp/components/wx-news/main.vue
@@ -2,7 +2,7 @@
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
【微信消息 - 图文】
- 芋道源码:
+ 国通源码:
① 代码优化,补充注释,提升阅读性
-->
diff --git a/src/views/mp/components/wx-reply/main.vue b/src/views/mp/components/wx-reply/main.vue
index 2c9d5f21f43d7ad42d83ad44be96442ad8e9bee6..ff12633cba5dc1d579d05c0f3c0e3a5de19e845f 100644
--- a/src/views/mp/components/wx-reply/main.vue
+++ b/src/views/mp/components/wx-reply/main.vue
@@ -1,7 +1,7 @@