From df3b381d6fc340489b825906f1f39fe0e0687442 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 12 Apr 2023 13:29:24 +0800 Subject: [PATCH 01/17] =?UTF-8?q?refactor:=20mp=E6=A8=A1=E5=9D=97ts?= =?UTF-8?q?=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mp/autoReply/index.vue | 277 ++++++---- src/views/mp/components/WxMpSelect.vue | 22 +- .../mp/components/wx-editor/WxEditor.vue | 115 +---- src/views/mp/draft/index.vue | 475 +++++++++--------- src/views/mp/freePublish/index.vue | 33 +- src/views/mp/material/index.vue | 92 ++-- src/views/mp/menu/index.vue | 76 +-- src/views/mp/tag/TagForm.vue | 19 +- src/views/mp/tag/index.vue | 45 +- src/views/mp/user/index.vue | 86 +++- src/views/pay/order/orderForm.vue | 152 ++++++ src/views/pay/refund/refundForm.vue | 154 ++++++ 12 files changed, 943 insertions(+), 603 deletions(-) create mode 100644 src/views/pay/order/orderForm.vue create mode 100644 src/views/pay/refund/refundForm.vue diff --git a/src/views/mp/autoReply/index.vue b/src/views/mp/autoReply/index.vue index 9208d1e7..94fe34b3 100644 --- a/src/views/mp/autoReply/index.vue +++ b/src/views/mp/autoReply/index.vue @@ -3,13 +3,16 @@ - - + + + + + - + @@ -18,26 +21,26 @@ plain @click="handleAdd" v-hasPermi="['mp:auto-reply:create']" - v-if="type !== '1' || list.length <= 0" + v-if="msgType !== MsgType.Follow || list.length <= 0" > 新增 - + - + - + @@ -47,10 +50,20 @@ label="请求消息类型" align="center" prop="requestMessageType" - v-if="type === '2'" + v-if="msgType === MsgType.Message" /> - - + + @@ -64,7 +77,7 @@ - diff --git a/src/views/mp/components/wx-editor/WxEditor.vue b/src/views/mp/components/wx-editor/WxEditor.vue index 50c65c6e..cf384113 100644 --- a/src/views/mp/components/wx-editor/WxEditor.vue +++ b/src/views/mp/components/wx-editor/WxEditor.vue @@ -1,11 +1,11 @@ diff --git a/src/views/mp/freePublish/index.vue b/src/views/mp/freePublish/index.vue index 0d370f4a..7a15b31f 100644 --- a/src/views/mp/freePublish/index.vue +++ b/src/views/mp/freePublish/index.vue @@ -3,8 +3,17 @@ - - + + + + + @@ -39,26 +48,32 @@ - diff --git a/src/views/pay/order/orderForm.vue b/src/views/pay/order/orderForm.vue new file mode 100644 index 00000000..f9625085 --- /dev/null +++ b/src/views/pay/order/orderForm.vue @@ -0,0 +1,152 @@ + + + diff --git a/src/views/pay/refund/refundForm.vue b/src/views/pay/refund/refundForm.vue new file mode 100644 index 00000000..cc9d8726 --- /dev/null +++ b/src/views/pay/refund/refundForm.vue @@ -0,0 +1,154 @@ + + + + From fbbf4131f67706d77042744813a865b0c16e29e7 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 12 Apr 2023 14:05:21 +0800 Subject: [PATCH 02/17] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4WxLocation?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=A4=9A=E4=BD=99Location=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mp/components/wx-location/main.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/mp/components/wx-location/main.vue b/src/views/mp/components/wx-location/main.vue index 47eab571..17598136 100644 --- a/src/views/mp/components/wx-location/main.vue +++ b/src/views/mp/components/wx-location/main.vue @@ -31,7 +31,6 @@ /> - {{ label }} @@ -39,6 +38,7 @@ + + diff --git a/src/views/mp/draft/index.vue b/src/views/mp/draft/index.vue index 844d01b2..d9a44076 100644 --- a/src/views/mp/draft/index.vue +++ b/src/views/mp/draft/index.vue @@ -252,7 +252,6 @@ import * as MpFreePublishApi from '@/api/mp/freePublish' import type { UploadFiles, UploadProps, UploadRawFile } from 'element-plus' // 可以用改本地数据模拟,避免API调用超限 // import drafts from './mock' - const message = useMessage() // 消息 const loading = ref(true) // 列表的加载中 @@ -362,7 +361,7 @@ const submitForm = async () => { } finally { dialogNewsVisible.value = false addMaterialLoading.value = false - getList() + await getList() } } diff --git a/src/views/mp/material/index.vue b/src/views/mp/material/index.vue index 4d4017d4..81d8fb08 100644 --- a/src/views/mp/material/index.vue +++ b/src/views/mp/material/index.vue @@ -277,14 +277,11 @@ const uploadRules: FormRules = { } // 素材类型 -type MatertialType = 'image' | 'voice' | 'video' -const type = ref('image') -// 遮罩层 -const loading = ref(false) -// 总条数 -// 数据列表 -const list = ref([]) -const total = ref(0) +type MaterialType = 'image' | 'voice' | 'video' +const type = ref('image') +const loading = ref(false) // 遮罩层 +const list = ref([]) // 总条数 +const total = ref(0) // 数据列表 // 查询参数 interface QueryParams { pageNo: number @@ -302,7 +299,7 @@ const queryParams: QueryParams = reactive({ const fileList = ref([]) interface UploadData { - type: MatertialType + type: MaterialType title: string introduction: string } @@ -346,7 +343,7 @@ const handleQuery = () => { const onTabChange = (tabName: TabPaneName) => { // 设置 type - uploadData.type = tabName as MatertialType + uploadData.type = tabName as MaterialType // 提前情况数据,避免tab切换后显示垃圾数据 list.value = [] diff --git a/src/views/mp/tag/index.vue b/src/views/mp/tag/index.vue index 6dc0d11a..125c8702 100644 --- a/src/views/mp/tag/index.vue +++ b/src/views/mp/tag/index.vue @@ -71,11 +71,10 @@ diff --git a/src/views/pay/order/orderForm.vue b/src/views/pay/order/orderForm.vue deleted file mode 100644 index f9625085..00000000 --- a/src/views/pay/order/orderForm.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - diff --git a/src/views/pay/refund/refundForm.vue b/src/views/pay/refund/refundForm.vue deleted file mode 100644 index cc9d8726..00000000 --- a/src/views/pay/refund/refundForm.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - From 813e7d2776dc2f9bde7baa06ecac83cab8d2ff53 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 14 Apr 2023 14:49:19 +0800 Subject: [PATCH 07/17] =?UTF-8?q?refactor:=20=E4=BD=BF=E7=94=A8Editor?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=9B=BF=E6=8D=A2WxEditor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/src/Editor.vue | 3 +- .../mp/components/wx-editor/WxEditor.vue | 104 ---- .../mp/components/wx-editor/quill-options.js | 45 -- src/views/mp/draft/editor-config.ts | 72 +++ src/views/mp/draft/index.vue | 458 +++++++++--------- 5 files changed, 307 insertions(+), 375 deletions(-) delete mode 100644 src/views/mp/components/wx-editor/WxEditor.vue delete mode 100644 src/views/mp/components/wx-editor/quill-options.js create mode 100644 src/views/mp/draft/editor-config.ts diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index 4d8e7dde..2d723922 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -20,7 +20,7 @@ const props = defineProps({ editorId: propTypes.string.def('wangeEditor-1'), height: propTypes.oneOfType([Number, String]).def('500px'), editorConfig: { - type: Object as PropType, + type: Object as PropType>, default: () => undefined }, readonly: propTypes.bool.def(false), @@ -147,6 +147,7 @@ const editorConfig = computed((): IEditorConfig => { props.editorConfig || {} ) }) + const editorStyle = computed(() => { return { height: isNumber(props.height) ? `${props.height}px` : props.height diff --git a/src/views/mp/components/wx-editor/WxEditor.vue b/src/views/mp/components/wx-editor/WxEditor.vue deleted file mode 100644 index d2220e10..00000000 --- a/src/views/mp/components/wx-editor/WxEditor.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - diff --git a/src/views/mp/components/wx-editor/quill-options.js b/src/views/mp/components/wx-editor/quill-options.js deleted file mode 100644 index 5ec211ae..00000000 --- a/src/views/mp/components/wx-editor/quill-options.js +++ /dev/null @@ -1,45 +0,0 @@ -const toolbarOptions = [ - ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 - ['blockquote', 'code-block'], // 引用 代码块 - [{ header: 1 }, { header: 2 }], // 1、2 级标题 - [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表 - [{ script: 'sub' }, { script: 'super' }], // 上标/下标 - [{ indent: '-1' }, { indent: '+1' }], // 缩进 - // [{'direction': 'rtl'}], // 文本方向 - [{ size: ['small', false, 'large', 'huge'] }], // 字体大小 - [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 - [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 - [{ font: [] }], // 字体种类 - [{ align: [] }], // 对齐方式 - ['clean'], // 清除文本格式 - ['link', 'image', 'video'] // 链接、图片、视频 -] - -export default { - theme: 'snow', - placeholder: '请输入文章内容', - modules: { - toolbar: { - container: toolbarOptions, - // container: "#toolbar", - handlers: { - image: function (value) { - if (value) { - // 触发input框选择图片文件 - document.querySelector('.avatar-uploader input').click() - } else { - this.quill.format('image', false) - } - }, - link: function (value) { - if (value) { - const href = prompt('注意!只支持公众号图文链接') - this.quill.format('link', href) - } else { - this.quill.format('link', false) - } - } - } - } - } -} diff --git a/src/views/mp/draft/editor-config.ts b/src/views/mp/draft/editor-config.ts new file mode 100644 index 00000000..26c723c9 --- /dev/null +++ b/src/views/mp/draft/editor-config.ts @@ -0,0 +1,72 @@ +import { IEditorConfig } from '@wangeditor/editor' +import { getAccessToken, getTenantId } from '@/utils/auth' + +const message = useMessage() + +type InsertFnType = (url: string, alt: string, href: string) => void + +export const createEditorConfig = ( + server: string, + accountId: number | undefined +): Partial => { + return { + MENU_CONF: { + ['uploadImage']: { + server, + // 单个文件的最大体积限制,默认为 2M + maxFileSize: 5 * 1024 * 1024, + // 最多可上传几个文件,默认为 100 + maxNumberOfFiles: 10, + // 选择文件时的类型限制,默认为 ['image/*'] 。如不想限制,则设置为 [] + allowedFileTypes: ['image/*'], + + // 自定义上传参数,例如传递验证的 token 等。参数会被添加到 formData 中,一起上传到服务端。 + meta: { accountId: accountId }, + // 将 meta 拼接到 url 参数中,默认 false + metaWithUrl: true, + + // 自定义增加 http header + headers: { + Accept: '*', + Authorization: 'Bearer ' + getAccessToken(), + 'tenant-id': getTenantId() + }, + + // 跨域是否传递 cookie ,默认为 false + withCredentials: true, + + // 超时时间,默认为 10 秒 + timeout: 5 * 1000, // 5 秒 + + // form-data fieldName,后端接口参数名称,默认值wangeditor-uploaded-image + fieldName: 'file', + + // 上传之前触发 + onBeforeUpload(file: File) { + console.log(file) + return file + }, + // 上传进度的回调函数 + onProgress(progress: number) { + // progress 是 0-100 的数字 + console.log('progress', progress) + }, + onSuccess(file: File, res: any) { + console.log('onSuccess', file, res) + }, + onFailed(file: File, res: any) { + message.alertError(res.message) + console.log('onFailed', file, res) + }, + onError(file: File, err: any, res: any) { + message.alertError(err.message) + console.error('onError', file, err, res) + }, + // 自定义插入图片 + customInsert(res: any, insertFn: InsertFnType) { + insertFn(res.data, 'image', res.data) + } + } + } + } +} diff --git a/src/views/mp/draft/index.vue b/src/views/mp/draft/index.vue index d9a44076..0cc70507 100644 --- a/src/views/mp/draft/index.vue +++ b/src/views/mp/draft/index.vue @@ -71,168 +71,182 @@ -
-
-
-
-
- -
{{ news.title }}
-
-
- 下移 - 删除 - -
-
-
-
-
{{ news.title }}
-
- + + +
+
+
+
+ +
{{ news.title }}
+
+
+ 下移 + 删除 +
-
- 下移 - - 上移 - 删除 - +
+
+
{{ news.title }}
+
+ +
+
+
+ 下移 + + 上移 + 删除 + +
-
- - - - - -
-
-
-
-
-
-
- - - - - -
封面和摘要:
-
-
- - -
- + - - 素材库选择 - - -
- - - + + +
- -
- - - - -
+ + +
+ + + + + + + + + +

封面:

+
+ + +
+ + + 素材库选择 + + +
+ + + +
+
+ +

摘要:

+ +
+
+ + + + +
+
+ @@ -535,6 +554,13 @@ const handleDelete = async (item: any) => { padding-top: 5px; } +.el-row { + margin-bottom: 20px; +} +.el-row:last-child { + margin-bottom: 0; +} + .item-name { font-size: 12px; overflow: hidden; @@ -548,35 +574,33 @@ const handleDelete = async (item: any) => { } /*新增图文*/ -.left { - display: inline-block; - width: 35%; - vertical-align: top; - margin-top: 200px; -} +// .left { +// display: inline-block; +// vertical-align: top; +// margin-top: 200px; +// } -.right { - display: inline-block; - width: 60%; - margin-top: -40px; -} +// .right { +// display: inline-block; +// width: 100%; +// } -.avatar-uploader { - width: 20%; - display: inline-block; -} +// .avatar-uploader { +// width: 20%; +// display: inline-block; +// } -.avatar-uploader .el-upload { - border-radius: 6px; - cursor: pointer; - position: relative; - overflow: hidden; - text-align: unset !important; -} +// .avatar-uploader .el-upload { +// border-radius: 6px; +// cursor: pointer; +// position: relative; +// overflow: hidden; +// text-align: unset !important; +// } -.avatar-uploader .el-upload:hover { - border-color: #165dff; -} +// .avatar-uploader .el-upload:hover { +// border-color: #165dff; +// } .avatar-uploader-icon { border: 1px solid #d9d9d9; @@ -599,7 +623,7 @@ const handleDelete = async (item: any) => { } .digest { - width: 60%; + width: 100%; display: inline-block; vertical-align: top; } @@ -620,28 +644,16 @@ const handleDelete = async (item: any) => { border: 1px solid #eaeaea; } -p { - line-height: 30px; -} - @media (min-width: 992px) and (max-width: 1300px) { .waterfall { column-count: 3; } - - p { - color: red; - } } @media (min-width: 768px) and (max-width: 991px) { .waterfall { column-count: 2; } - - p { - color: orange; - } } @media (max-width: 767px) { @@ -707,10 +719,6 @@ p { background-color: #acadae; } -.input-tt { - padding: 5px; -} - .activeAddNews { border: 5px solid #2bb673; } @@ -747,7 +755,7 @@ p { .thumb-div { display: inline-block; - width: 30%; + width: 100%; text-align: center; } From 92da7e341b3f80ed78dbec903aebd13a965ac4d3 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 14 Apr 2023 15:08:58 +0800 Subject: [PATCH 08/17] =?UTF-8?q?fix:=20=E4=BD=BF=E7=94=A8ElDialog:destroy?= =?UTF-8?q?-on-close=E5=B1=9E=E6=80=A7=E8=A7=A3=E5=86=B3=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mp/autoReply/index.vue | 21 ++++----------------- src/views/mp/message/index.vue | 6 +++--- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/views/mp/autoReply/index.vue b/src/views/mp/autoReply/index.vue index 4c8eb388..77bcf6f7 100644 --- a/src/views/mp/autoReply/index.vue +++ b/src/views/mp/autoReply/index.vue @@ -140,7 +140,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -262,6 +261,7 @@ const handleQuery = () => { /** 重置按钮操作 */ const resetQuery = async () => { + // 暂存accountId,并在reset后恢复 const accountId = queryParams.accountId queryFormRef.value?.resetFields() queryParams.accountId = accountId From dc32b9242d0819081126a48698c966341f066bb6 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 14 Apr 2023 15:15:01 +0800 Subject: [PATCH 09/17] =?UTF-8?q?refactor:=20=E5=88=A0=E9=99=A4WxAccountSe?= =?UTF-8?q?lect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mp/components/WxMpSelect.vue | 36 ---------------- .../mp/components/wx-account-select/main.vue | 42 ++++++++----------- src/views/mp/message/index.vue | 4 +- 3 files changed, 19 insertions(+), 63 deletions(-) delete mode 100644 src/views/mp/components/WxMpSelect.vue diff --git a/src/views/mp/components/WxMpSelect.vue b/src/views/mp/components/WxMpSelect.vue deleted file mode 100644 index 615745de..00000000 --- a/src/views/mp/components/WxMpSelect.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/src/views/mp/components/wx-account-select/main.vue b/src/views/mp/components/wx-account-select/main.vue index 4eb99615..61963cb8 100644 --- a/src/views/mp/components/wx-account-select/main.vue +++ b/src/views/mp/components/wx-account-select/main.vue @@ -1,29 +1,21 @@ - diff --git a/src/views/mp/message/index.vue b/src/views/mp/message/index.vue index 60191db8..4ab19fda 100644 --- a/src/views/mp/message/index.vue +++ b/src/views/mp/message/index.vue @@ -9,7 +9,7 @@ label-width="68px" > - + @@ -203,7 +203,7 @@ import WxMsg from '@/views/mp/components/wx-msg/main.vue' import WxLocation from '@/views/mp/components/wx-location/main.vue' import WxMusic from '@/views/mp/components/wx-music/main.vue' import WxNews from '@/views/mp/components/wx-news/main.vue' -import WxMpSelect from '@/views/mp/components/WxMpSelect.vue' +import WxAccountSelect from '@/views/mp/components/wx-account-select/main.vue' import * as MpMessageApi from '@/api/mp/message' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' From 1aae769562d42b459362f43a156eb6891863c726 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 14 Apr 2023 15:15:35 +0800 Subject: [PATCH 10/17] =?UTF-8?q?feat:=20=E5=9C=A8vscode=E4=B8=AD=E6=8A=98?= =?UTF-8?q?=E5=8F=A0=E6=96=87=E4=BB=B6=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 38cc3052..3036ebf1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -40,5 +40,15 @@ "i18n-ally.displayLanguage": "zh-CN", "i18n-ally.enabledFrameworks": ["vue", "react"], "god.tsconfig": "./tsconfig.json", - "vue-i18n.i18nPaths": "src/locales" + "vue-i18n.i18nPaths": "src/locales", + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.expand": false, + "explorer.fileNesting.patterns": { + "*.ts": "$(capture).test.ts, $(capture).test.tsx", + "*.tsx": "$(capture).test.ts, $(capture).test.tsx", + "*.env": "$(capture).env.*", + "CHANGELOG.md": "CHANGELOG*", + "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc,vite.config.*,windi.*,tailwind.*,tsconfig.*,postcss*", + ".eslintrc.js": ".eslintignore,.eslintrc-*,.prettierignore,.stylelintignore,.commitlintrc.js,.prettierrc.js,.stylelint*,stylelint*,prettier.*,.editorconfig" + } } From bb49c6bbda5c13e78fef8f5b9feae1132fd0520b Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 14 Apr 2023 15:16:50 +0800 Subject: [PATCH 11/17] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=94=9F=E6=88=90=E7=9A=84auto-*.d.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/.gitignore | 1 + src/types/auto-components.d.ts | 128 --------------------------------- src/types/auto-imports.d.ts | 76 -------------------- 3 files changed, 1 insertion(+), 204 deletions(-) create mode 100644 src/types/.gitignore delete mode 100644 src/types/auto-components.d.ts delete mode 100644 src/types/auto-imports.d.ts diff --git a/src/types/.gitignore b/src/types/.gitignore new file mode 100644 index 00000000..a00fe5dd --- /dev/null +++ b/src/types/.gitignore @@ -0,0 +1 @@ +auto-*.d.ts diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts deleted file mode 100644 index a3afbb94..00000000 --- a/src/types/auto-components.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ -// @ts-nocheck -// Generated by unplugin-vue-components -// Read more: https://github.com/vuejs/core/pull/3399 -import '@vue/runtime-core' - -export {} - -declare module '@vue/runtime-core' { - export interface GlobalComponents { - Backtop: typeof import('./../components/Backtop/src/Backtop.vue')['default'] - ConfigGlobal: typeof import('./../components/ConfigGlobal/src/ConfigGlobal.vue')['default'] - ContentDetailWrap: typeof import('./../components/ContentDetailWrap/src/ContentDetailWrap.vue')['default'] - ContentWrap: typeof import('./../components/ContentWrap/src/ContentWrap.vue')['default'] - CopperModal: typeof import('./../components/Cropper/src/CopperModal.vue')['default'] - CountTo: typeof import('./../components/CountTo/src/CountTo.vue')['default'] - Crontab: typeof import('./../components/Crontab/src/Crontab.vue')['default'] - Cropper: typeof import('./../components/Cropper/src/Cropper.vue')['default'] - CropperAvatar: typeof import('./../components/Cropper/src/CropperAvatar.vue')['default'] - Descriptions: typeof import('./../components/Descriptions/src/Descriptions.vue')['default'] - Dialog: typeof import('./../components/Dialog/src/Dialog.vue')['default'] - DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default'] - DocAlert: typeof import('./../components/DocAlert/index.vue')['default'] - Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] - Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] - ElAlert: typeof import('element-plus/es')['ElAlert'] - ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer'] - ElAvatar: typeof import('element-plus/es')['ElAvatar'] - ElBadge: typeof import('element-plus/es')['ElBadge'] - ElButton: typeof import('element-plus/es')['ElButton'] - ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] - ElCard: typeof import('element-plus/es')['ElCard'] - ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] - ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] - ElCol: typeof import('element-plus/es')['ElCol'] - ElCollapse: typeof import('element-plus/es')['ElCollapse'] - ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] - ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition'] - ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] - ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] - ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] - ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] - ElDialog: typeof import('element-plus/es')['ElDialog'] - ElDivider: typeof import('element-plus/es')['ElDivider'] - ElDrawer: typeof import('element-plus/es')['ElDrawer'] - ElDropdown: typeof import('element-plus/es')['ElDropdown'] - ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] - ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] - ElementBaseInfo: typeof import('./../components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue')['default'] - ElementForm: typeof import('./../components/bpmnProcessDesigner/package/penal/form/ElementForm.vue')['default'] - ElementListeners: typeof import('./../components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue')['default'] - ElementMultiInstance: typeof import('./../components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue')['default'] - ElementOtherConfig: typeof import('./../components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue')['default'] - ElementProperties: typeof import('./../components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue')['default'] - ElementTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/ElementTask.vue')['default'] - ElForm: typeof import('element-plus/es')['ElForm'] - ElFormItem: typeof import('element-plus/es')['ElFormItem'] - ElIcon: typeof import('element-plus/es')['ElIcon'] - ElImage: typeof import('element-plus/es')['ElImage'] - ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] - ElInput: typeof import('element-plus/es')['ElInput'] - ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] - ElLink: typeof import('element-plus/es')['ElLink'] - ElOption: typeof import('element-plus/es')['ElOption'] - ElPagination: typeof import('element-plus/es')['ElPagination'] - ElPopover: typeof import('element-plus/es')['ElPopover'] - ElRadio: typeof import('element-plus/es')['ElRadio'] - ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] - ElRow: typeof import('element-plus/es')['ElRow'] - ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] - ElSelect: typeof import('element-plus/es')['ElSelect'] - ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] - ElSpace: typeof import('element-plus/es')['ElSpace'] - ElSwitch: typeof import('element-plus/es')['ElSwitch'] - ElTable: typeof import('element-plus/es')['ElTable'] - ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTableV2: typeof import('element-plus/es')['ElTableV2'] - ElTabPane: typeof import('element-plus/es')['ElTabPane'] - ElTabs: typeof import('element-plus/es')['ElTabs'] - ElTag: typeof import('element-plus/es')['ElTag'] - ElTimeline: typeof import('element-plus/es')['ElTimeline'] - ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] - ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElTree: typeof import('element-plus/es')['ElTree'] - ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] - ElUpload: typeof import('element-plus/es')['ElUpload'] - Error: typeof import('./../components/Error/src/Error.vue')['default'] - FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default'] - Form: typeof import('./../components/Form/src/Form.vue')['default'] - Highlight: typeof import('./../components/Highlight/src/Highlight.vue')['default'] - Icon: typeof import('./../components/Icon/src/Icon.vue')['default'] - IconSelect: typeof import('./../components/Icon/src/IconSelect.vue')['default'] - IFrame: typeof import('./../components/IFrame/src/IFrame.vue')['default'] - ImageViewer: typeof import('./../components/ImageViewer/src/ImageViewer.vue')['default'] - Infotip: typeof import('./../components/Infotip/src/Infotip.vue')['default'] - InputPassword: typeof import('./../components/InputPassword/src/InputPassword.vue')['default'] - Pagination: typeof import('./../components/Pagination/index.vue')['default'] - ProcessDesigner: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue')['default'] - ProcessPalette: typeof import('./../components/bpmnProcessDesigner/package/palette/ProcessPalette.vue')['default'] - ProcessViewer: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessViewer.vue')['default'] - PropertiesPanel: typeof import('./../components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue')['default'] - Qrcode: typeof import('./../components/Qrcode/src/Qrcode.vue')['default'] - ReceiveTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue')['default'] - RouterLink: typeof import('vue-router')['RouterLink'] - RouterView: typeof import('vue-router')['RouterView'] - ScriptTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue')['default'] - Search: typeof import('./../components/Search/src/Search.vue')['default'] - SignalAndMessage: typeof import('./../components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue')['default'] - Sticky: typeof import('./../components/Sticky/src/Sticky.vue')['default'] - Table: typeof import('./../components/Table/src/Table.vue')['default'] - Tooltip: typeof import('./../components/Tooltip/src/Tooltip.vue')['default'] - UploadFile: typeof import('./../components/UploadFile/src/UploadFile.vue')['default'] - UploadImg: typeof import('./../components/UploadFile/src/UploadImg.vue')['default'] - UploadImgs: typeof import('./../components/UploadFile/src/UploadImgs.vue')['default'] - UserTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue')['default'] - UserTaskListeners: typeof import('./../components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue')['default'] - Verify: typeof import('./../components/Verifition/src/Verify.vue')['default'] - VerifyPoints: typeof import('./../components/Verifition/src/Verify/VerifyPoints.vue')['default'] - VerifySlide: typeof import('./../components/Verifition/src/Verify/VerifySlide.vue')['default'] - XButton: typeof import('./../components/XButton/src/XButton.vue')['default'] - XTextButton: typeof import('./../components/XButton/src/XTextButton.vue')['default'] - } - export interface ComponentCustomProperties { - vLoading: typeof import('element-plus/es')['ElLoadingDirective'] - } -} diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts deleted file mode 100644 index 75cf16d9..00000000 --- a/src/types/auto-imports.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ -// @ts-nocheck -// Generated by unplugin-auto-import -export {} -declare global { - const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE'] - const EffectScope: typeof import('vue')['EffectScope'] - const computed: typeof import('vue')['computed'] - const createApp: typeof import('vue')['createApp'] - const customRef: typeof import('vue')['customRef'] - const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] - const defineComponent: typeof import('vue')['defineComponent'] - const effectScope: typeof import('vue')['effectScope'] - const getCurrentInstance: typeof import('vue')['getCurrentInstance'] - const getCurrentScope: typeof import('vue')['getCurrentScope'] - const h: typeof import('vue')['h'] - const inject: typeof import('vue')['inject'] - const isProxy: typeof import('vue')['isProxy'] - const isReactive: typeof import('vue')['isReactive'] - const isReadonly: typeof import('vue')['isReadonly'] - const isRef: typeof import('vue')['isRef'] - const markRaw: typeof import('vue')['markRaw'] - const nextTick: typeof import('vue')['nextTick'] - const onActivated: typeof import('vue')['onActivated'] - const onBeforeMount: typeof import('vue')['onBeforeMount'] - const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] - const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] - const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] - const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] - const onDeactivated: typeof import('vue')['onDeactivated'] - const onErrorCaptured: typeof import('vue')['onErrorCaptured'] - const onMounted: typeof import('vue')['onMounted'] - const onRenderTracked: typeof import('vue')['onRenderTracked'] - const onRenderTriggered: typeof import('vue')['onRenderTriggered'] - const onScopeDispose: typeof import('vue')['onScopeDispose'] - const onServerPrefetch: typeof import('vue')['onServerPrefetch'] - const onUnmounted: typeof import('vue')['onUnmounted'] - const onUpdated: typeof import('vue')['onUpdated'] - const provide: typeof import('vue')['provide'] - const reactive: typeof import('vue')['reactive'] - const readonly: typeof import('vue')['readonly'] - const ref: typeof import('vue')['ref'] - const required: typeof import('@/utils/formRules')['required'] - const resolveComponent: typeof import('vue')['resolveComponent'] - const shallowReactive: typeof import('vue')['shallowReactive'] - const shallowReadonly: typeof import('vue')['shallowReadonly'] - const shallowRef: typeof import('vue')['shallowRef'] - const toRaw: typeof import('vue')['toRaw'] - const toRef: typeof import('vue')['toRef'] - const toRefs: typeof import('vue')['toRefs'] - const triggerRef: typeof import('vue')['triggerRef'] - const unref: typeof import('vue')['unref'] - const useAttrs: typeof import('vue')['useAttrs'] - const useCrudSchemas: typeof import('@/hooks/web/useCrudSchemas')['useCrudSchemas'] - const useCssModule: typeof import('vue')['useCssModule'] - const useCssVars: typeof import('vue')['useCssVars'] - const useI18n: typeof import('@/hooks/web/useI18n')['useI18n'] - const useLink: typeof import('vue-router')['useLink'] - const useMessage: typeof import('@/hooks/web/useMessage')['useMessage'] - const useRoute: typeof import('vue-router')['useRoute'] - const useRouter: typeof import('vue-router')['useRouter'] - const useSlots: typeof import('vue')['useSlots'] - const useTable: typeof import('@/hooks/web/useTable')['useTable'] - const useVxeCrudSchemas: typeof import('@/hooks/web/useVxeCrudSchemas')['useVxeCrudSchemas'] - const useXTable: typeof import('@/hooks/web/useXTable')['useXTable'] - const watch: typeof import('vue')['watch'] - const watchEffect: typeof import('vue')['watchEffect'] - const watchPostEffect: typeof import('vue')['watchPostEffect'] - const watchSyncEffect: typeof import('vue')['watchSyncEffect'] -} -// for type re-export -declare global { - // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue' -} From 4f3e7ecaac25db502ed06fc9f0021cb708b63a38 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 14 Apr 2023 15:22:23 +0800 Subject: [PATCH 12/17] fix: WxMpSelect => WxAccountSelect --- src/views/mp/autoReply/index.vue | 4 ++-- src/views/mp/draft/index.vue | 4 ++-- src/views/mp/freePublish/index.vue | 4 ++-- src/views/mp/material/index.vue | 4 ++-- src/views/mp/menu/index.vue | 4 ++-- src/views/mp/tag/index.vue | 4 ++-- src/views/mp/user/index.vue | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/views/mp/autoReply/index.vue b/src/views/mp/autoReply/index.vue index 77bcf6f7..0fd6001d 100644 --- a/src/views/mp/autoReply/index.vue +++ b/src/views/mp/autoReply/index.vue @@ -5,7 +5,7 @@ - + @@ -183,7 +183,7 @@ import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue' import WxMusic from '@/views/mp/components/wx-music/main.vue' import WxNews from '@/views/mp/components/wx-news/main.vue' import WxReplySelect from '@/views/mp/components/wx-reply/main.vue' -import WxMpSelect from '@/views/mp/components/WxMpSelect.vue' +import WxAccountSelect from '@/views/mp/components/wx-account-select/main.vue' import * as MpAutoReplyApi from '@/api/mp/autoReply' import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' diff --git a/src/views/mp/draft/index.vue b/src/views/mp/draft/index.vue index 0cc70507..bd9e5b74 100644 --- a/src/views/mp/draft/index.vue +++ b/src/views/mp/draft/index.vue @@ -11,7 +11,7 @@ label-width="68px" > - + @@ -259,7 +259,7 @@ import { Editor } from '@/components/Editor' import WxNews from '@/views/mp/components/wx-news/main.vue' import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue' -import WxMpSelect from '@/views/mp/components/WxMpSelect.vue' +import WxAccountSelect from '@/views/mp/components/wx-account-select/main.vue' import { getAccessToken } from '@/utils/auth' import * as MpDraftApi from '@/api/mp/draft' import * as MpFreePublishApi from '@/api/mp/freePublish' diff --git a/src/views/mp/freePublish/index.vue b/src/views/mp/freePublish/index.vue index 7a15b31f..0a473f1d 100644 --- a/src/views/mp/freePublish/index.vue +++ b/src/views/mp/freePublish/index.vue @@ -11,7 +11,7 @@ label-width="68px" > - + @@ -51,7 +51,7 @@ + + diff --git a/src/views/mp/message/index.vue b/src/views/mp/message/index.vue index 4ab19fda..ca7e0d7e 100644 --- a/src/views/mp/message/index.vue +++ b/src/views/mp/message/index.vue @@ -58,124 +58,7 @@ - - - - - - - - - - - - - - - + - - - - - + + + + + From 5f1aa869120be878c3aca03648b799b02e95b18c Mon Sep 17 00:00:00 2001 From: dhb52 Date: Fri, 14 Apr 2023 19:43:50 +0800 Subject: [PATCH 15/17] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4quill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 1d020d6d..1401347d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "@form-create/element-ui": "^3.1.17", "@iconify/iconify": "^3.1.0", "@videojs-player/vue": "^1.0.0", - "@vueup/vue-quill": "^1.1.1", "@vueuse/core": "^9.13.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", From 48c7b58b03853eb2f8e597377b460a7b4fdf6024 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 15 Apr 2023 08:42:52 +0800 Subject: [PATCH 16/17] =?UTF-8?q?1.=20=E9=87=8D=E5=91=BD=E5=90=8D=20DataGr?= =?UTF-8?q?id=20=E4=B8=BA=20MessageTable=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=AF=E8=AF=BB=E6=80=A7=202.=20=E8=B0=83=E6=95=B4=E7=B4=A0?= =?UTF-8?q?=E6=9D=90=E7=AE=A1=E7=90=86=EF=BC=8C=E8=AF=BB=E5=8F=96=20API=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mp/components/wx-account-select/main.vue | 9 +++++---- src/views/mp/draft/editor-config.ts | 7 +++++-- src/views/mp/draft/index.vue | 5 ++--- src/views/mp/message/{DataGrid.vue => MessageTable.vue} | 2 -- src/views/mp/message/index.vue | 6 +++--- 5 files changed, 15 insertions(+), 14 deletions(-) rename src/views/mp/message/{DataGrid.vue => MessageTable.vue} (99%) diff --git a/src/views/mp/components/wx-account-select/main.vue b/src/views/mp/components/wx-account-select/main.vue index 61963cb8..110fc8a5 100644 --- a/src/views/mp/components/wx-account-select/main.vue +++ b/src/views/mp/components/wx-account-select/main.vue @@ -17,10 +17,6 @@ const emit = defineEmits<{ (e: 'change', id?: number, name?: string): void }>() -onMounted(() => { - handleQuery() -}) - const handleQuery = async () => { accountList.value = await MpAccountApi.getSimpleAccountList() // 默认选中第一个 @@ -33,4 +29,9 @@ const handleQuery = async () => { const onChanged = () => { emit('change', account.id, account.name) } + +/** 初始化 */ +onMounted(() => { + handleQuery() +}) diff --git a/src/views/mp/draft/editor-config.ts b/src/views/mp/draft/editor-config.ts index 26c723c9..ee3b95ec 100644 --- a/src/views/mp/draft/editor-config.ts +++ b/src/views/mp/draft/editor-config.ts @@ -21,7 +21,10 @@ export const createEditorConfig = ( allowedFileTypes: ['image/*'], // 自定义上传参数,例如传递验证的 token 等。参数会被添加到 formData 中,一起上传到服务端。 - meta: { accountId: accountId }, + meta: { + accountId: accountId, + type: 'image' + }, // 将 meta 拼接到 url 参数中,默认 false metaWithUrl: true, @@ -64,7 +67,7 @@ export const createEditorConfig = ( }, // 自定义插入图片 customInsert(res: any, insertFn: InsertFnType) { - insertFn(res.data, 'image', res.data) + insertFn(res.data.url, 'image', res.data.url) } } } diff --git a/src/views/mp/draft/index.vue b/src/views/mp/draft/index.vue index bd9e5b74..cf0bb10d 100644 --- a/src/views/mp/draft/index.vue +++ b/src/views/mp/draft/index.vue @@ -265,8 +265,7 @@ import * as MpDraftApi from '@/api/mp/draft' import * as MpFreePublishApi from '@/api/mp/freePublish' import type { UploadFiles, UploadProps, UploadRawFile } from 'element-plus' import { createEditorConfig } from './editor-config' -// 可以用改本地数据模拟,避免API调用超限 -import drafts from './mock' +// import drafts from './mock' // 可以用改本地数据模拟,避免API调用超限 import { IEditorConfig } from '@wangeditor/editor' const message = useMessage() // 消息 @@ -342,7 +341,7 @@ const editorConfig = ref>({}) const getList = async () => { loading.value = true try { - // const drafts = await MpDraftApi.getDraftPage(queryParams) + const drafts = await MpDraftApi.getDraftPage(queryParams) drafts.list.forEach((item) => { const newsItem = item.content.newsItem // 将 thumbUrl 转成 picUrl,保证 wx-news 组件可以预览封面 diff --git a/src/views/mp/message/DataGrid.vue b/src/views/mp/message/MessageTable.vue similarity index 99% rename from src/views/mp/message/DataGrid.vue rename to src/views/mp/message/MessageTable.vue index eaa85e5b..23eb9aae 100644 --- a/src/views/mp/message/DataGrid.vue +++ b/src/views/mp/message/MessageTable.vue @@ -143,5 +143,3 @@ const props = defineProps({ const emit = defineEmits<{ (e: 'send', v: number) }>() - - diff --git a/src/views/mp/message/index.vue b/src/views/mp/message/index.vue index ca7e0d7e..c115813c 100644 --- a/src/views/mp/message/index.vue +++ b/src/views/mp/message/index.vue @@ -58,7 +58,7 @@ - + { /** 重置按钮操作 */ const resetQuery = async () => { - // 暂存accountId,并在reset后恢复 + // 暂存 accountId,并在 reset 后恢复 const accountId = queryParams.accountId queryFormRef.value?.resetFields() queryParams.accountId = accountId From f1f49fdf29904cecdc2c579a30846dfa368c59fc Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 15 Apr 2023 08:50:50 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8B=E6=8E=92?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mp/freePublish/index.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/views/mp/freePublish/index.vue b/src/views/mp/freePublish/index.vue index 0a473f1d..04edb705 100644 --- a/src/views/mp/freePublish/index.vue +++ b/src/views/mp/freePublish/index.vue @@ -52,7 +52,6 @@ import * as FreePublishApi from '@/api/mp/freePublish' import WxNews from '@/views/mp/components/wx-news/main.vue' import WxAccountSelect from '@/views/mp/components/wx-account-select/main.vue' - const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -102,7 +101,6 @@ const handleDelete = async (item: any) => { } catch {} } -