Skip to content

Commit d16ff6f

Browse files
committed
REVIEW 公众号素材管理
1 parent ee35fd6 commit d16ff6f

File tree

5 files changed

+53
-64
lines changed

5 files changed

+53
-64
lines changed

src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</el-table>
2424

2525
<el-dialog
26-
v-model="modelVisible"
26+
v-model="dialogVisible"
2727
:title="modelConfig.title"
2828
:close-on-click-modal="false"
2929
width="400px"
@@ -39,7 +39,7 @@
3939
</el-form-item>
4040
</el-form>
4141
<template #footer>
42-
<el-button @click="modelVisible = false">取 消</el-button>
42+
<el-button @click="dialogVisible = false">取 消</el-button>
4343
<el-button type="primary" @click="addNewObject">保 存</el-button>
4444
</template>
4545
</el-dialog>
@@ -49,7 +49,7 @@
4949
const message = useMessage()
5050
const signalList = ref<any[]>([])
5151
const messageList = ref<any[]>([])
52-
const modelVisible = ref(false)
52+
const dialogVisible = ref(false)
5353
const modelType = ref('')
5454
const modelObjectForm = ref<any>({})
5555
const rootElements = ref()
@@ -85,7 +85,7 @@ const initDataList = () => {
8585
const openModel = (type) => {
8686
modelType.value = type
8787
modelObjectForm.value = {}
88-
modelVisible.value = true
88+
dialogVisible.value = true
8989
}
9090
const addNewObject = () => {
9191
if (modelType.value === 'message') {
@@ -101,7 +101,7 @@ const addNewObject = () => {
101101
const signalRef = bpmnInstances().moddle.create('bpmn:Signal', modelObjectForm.value)
102102
rootElements.value.push(signalRef)
103103
}
104-
modelVisible.value = false
104+
dialogVisible.value = false
105105
initDataList()
106106
}
107107

src/types/auto-components.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ declare module '@vue/runtime-core' {
2424
DocAlert: typeof import('./../components/DocAlert/index.vue')['default']
2525
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
2626
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
27+
ElAlert: typeof import('element-plus/es')['ElAlert']
2728
ElBadge: typeof import('element-plus/es')['ElBadge']
2829
ElButton: typeof import('element-plus/es')['ElButton']
2930
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
@@ -74,6 +75,7 @@ declare module '@vue/runtime-core' {
7475
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
7576
ElTabPane: typeof import('element-plus/es')['ElTabPane']
7677
ElTabs: typeof import('element-plus/es')['ElTabs']
78+
ElTag: typeof import('element-plus/es')['ElTag']
7779
ElTooltip: typeof import('element-plus/es')['ElTooltip']
7880
ElTree: typeof import('element-plus/es')['ElTree']
7981
ElUpload: typeof import('element-plus/es')['ElUpload']

src/views/mp/draft/index.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,8 @@
247247
</el-row>
248248
</div>
249249
<template #footer>
250-
<div class="dialog-footer">
251-
<el-button @click="dialogNewsVisible = false">取 消</el-button>
252-
<el-button type="primary" @click="submitForm">提 交</el-button>
253-
</div>
250+
<el-button @click="dialogNewsVisible = false">取 消</el-button>
251+
<el-button type="primary" @click="submitForm">提 交</el-button>
254252
</template>
255253
</el-dialog>
256254
</Teleport>

src/views/mp/material/index.vue

Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
<template>
2-
<div class="app-container">
3-
<doc-alert title="公众号素材" url="https://doc.iocoder.cn/mp/material/" />
4-
5-
<!-- 搜索工作栏 -->
2+
<doc-alert title="公众号素材" url="https://doc.iocoder.cn/mp/material/" />
3+
<!-- 搜索工作栏 -->
4+
<ContentWrap>
65
<el-form
6+
class="-mb-15px"
77
:model="queryParams"
88
ref="queryFormRef"
9-
size="small"
109
:inline="true"
11-
v-show="showSearch"
1210
label-width="68px"
1311
>
1412
<el-form-item label="公众号" prop="accountId">
15-
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
13+
<el-select v-model="queryParams.accountId" placeholder="请选择公众号" class="!w-240px">
1614
<el-option
17-
v-for="item in accounts"
18-
:key="parseInt(item.id)"
15+
v-for="item in accountList"
16+
:key="item.id"
1917
:label="item.name"
20-
:value="parseInt(item.id)"
18+
:value="item.id"
2119
/>
2220
</el-select>
2321
</el-form-item>
2422
<el-form-item>
25-
<el-button type="primary" @click="handleQuery"><Icon icon="ep:search" />搜索</el-button>
23+
<el-button @click="handleQuery"><Icon icon="ep:search" />搜索</el-button>
2624
<el-button @click="resetQuery"><Icon icon="ep:refresh" />重置</el-button>
2725
</el-form-item>
2826
</el-form>
27+
</ContentWrap>
2928

29+
<ContentWrap>
3030
<el-tabs v-model="type" @tab-change="handleTabChange">
3131
<!-- tab 1:图片 -->
3232
<el-tab-pane name="image">
@@ -44,11 +44,11 @@
4444
:before-upload="beforeImageUpload"
4545
:on-success="handleUploadSuccess"
4646
>
47-
<el-button size="small" type="primary">点击上传</el-button>
47+
<el-button type="primary" plain>点击上传</el-button>
4848
<template #tip>
49-
<span class="el-upload__tip" style="margin-left: 5px"
50-
>支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M</span
51-
>
49+
<span class="el-upload__tip" style="margin-left: 5px">
50+
支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M
51+
</span>
5252
</template>
5353
</el-upload>
5454
</div>
@@ -64,14 +64,14 @@
6464
circle
6565
@click="handleDelete(item)"
6666
v-hasPermi="['mp:material:delete']"
67-
><Icon icon="ep:delete"
68-
/></el-button>
67+
>
68+
<Icon icon="ep:delete" />
69+
</el-button>
6970
</el-row>
7071
</div>
7172
</div>
7273
<!-- 分页组件 -->
73-
<pagination
74-
v-show="total > 0"
74+
<Pagination
7575
:total="total"
7676
v-model:page="queryParams.pageNo"
7777
v-model:limit="queryParams.pageSize"
@@ -95,11 +95,11 @@
9595
:on-success="handleUploadSuccess"
9696
:before-upload="beforeVoiceUpload"
9797
>
98-
<el-button size="small" type="primary">点击上传</el-button>
98+
<el-button type="primary" plain>点击上传</el-button>
9999
<template #tip>
100-
<span class="el-upload__tip" style="margin-left: 5px"
101-
>格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s</span
102-
>
100+
<span class="el-upload__tip" style="margin-left: 5px">
101+
格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s
102+
</span>
103103
</template>
104104
</el-upload>
105105
</div>
@@ -118,24 +118,23 @@
118118
</el-table-column>
119119
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
120120
<template #default="scope">
121-
<el-button type="primary" link size="small" plain @click="handleDownload(scope.row)"
122-
><Icon icon="ep:download" />下载</el-button
123-
>
121+
<el-button type="primary" link plain @click="handleDownload(scope.row)">
122+
<Icon icon="ep:download" />下载
123+
</el-button>
124124
<el-button
125125
type="primary"
126126
link
127-
size="small"
128127
plain
129128
@click="handleDelete(scope.row)"
130129
v-hasPermi="['mp:material:delete']"
131-
><Icon icon="ep:delete" />删除</el-button
132130
>
131+
<Icon icon="ep:delete" />删除
132+
</el-button>
133133
</template>
134134
</el-table-column>
135135
</el-table>
136136
<!-- 分页组件 -->
137-
<pagination
138-
v-show="total > 0"
137+
<Pagination
139138
:total="total"
140139
v-model:page="queryParams.pageNo"
141140
v-model:limit="queryParams.pageSize"
@@ -149,7 +148,7 @@
149148
<span><Icon icon="ep:video-play" /> 视频</span>
150149
</template>
151150
<div class="add_but" v-hasPermi="['mp:material:upload-permanent']">
152-
<el-button size="small" type="primary" @click="handleAddVideo">新建视频</el-button>
151+
<el-button type="primary" plain @click="handleAddVideo">新建视频</el-button>
153152
</div>
154153
<!-- 新建视频的弹窗 -->
155154
<el-dialog
@@ -220,14 +219,9 @@
220219
<span>{{ formatDate(scope.row.createTime) }}</span>
221220
</template>
222221
</el-table-column>
223-
<el-table-column
224-
label="操作"
225-
align="center"
226-
fixed="right"
227-
class-name="small-padding fixed-width"
228-
>
222+
<el-table-column label="操作" align="center" fixed="right">
229223
<template #default="scope">
230-
<el-button type="primary" link size="small" plain @click="handleDownload(scope.row)"
224+
<el-button type="primary" link plain @click="handleDownload(scope.row)"
231225
><Icon icon="ep:download" />下载</el-button
232226
>
233227
<el-button
@@ -237,26 +231,24 @@
237231
plain
238232
@click="handleDelete(scope.row)"
239233
v-hasPermi="['mp:material:delete']"
240-
><Icon icon="ep:delete" />删除</el-button
241234
>
235+
<Icon icon="ep:delete" />删除
236+
</el-button>
242237
</template>
243238
</el-table-column>
244239
</el-table>
245240
<!-- 分页组件 -->
246-
<pagination
247-
v-show="total > 0"
241+
<Pagination
248242
:total="total"
249243
v-model:page="queryParams.pageNo"
250244
v-model:limit="queryParams.pageSize"
251245
@pagination="getList"
252246
/>
253247
</el-tab-pane>
254248
</el-tabs>
255-
</div>
249+
</ContentWrap>
256250
</template>
257-
258-
<script setup>
259-
import { ref } from 'vue'
251+
<script setup name="MpMaterial">
260252
import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'
261253
import WxVideoPlayer from '@/views/mp/components/wx-video-play/main.vue'
262254
import { getSimpleAccountList } from '@/api/mp/account'
@@ -275,8 +267,6 @@ const uploadVideoRef = ref()
275267
const type = ref('image')
276268
// 遮罩层
277269
const loading = ref(false)
278-
// 显示搜索条件
279-
const showSearch = ref(true)
280270
// 总条数
281271
const total = ref(0)
282272
// 数据列表
@@ -308,14 +298,14 @@ const uploadRules = reactive({
308298
})
309299
310300
// 公众号账号列表
311-
const accounts = ref([])
301+
const accountList = ref([])
312302
313303
onMounted(() => {
314304
getSimpleAccountList().then((data) => {
315-
accounts.value = data
305+
accountList.value = data
316306
// 默认选中第一个
317-
if (accounts.value.length > 0) {
318-
setAccountId(accounts.value[0].id)
307+
if (accountList.value.length > 0) {
308+
setAccountId(accountList.value[0].id)
319309
}
320310
// 加载数据
321311
getList()
@@ -365,8 +355,8 @@ const handleQuery = () => {
365355
const resetQuery = () => {
366356
queryFormRef.value?.resetFields()
367357
// 默认选中第一个
368-
if (accounts.value.length > 0) {
369-
setAccountId(accounts.value[0].id)
358+
if (accountList.value.length > 0) {
359+
setAccountId(accountList.value[0].id)
370360
}
371361
handleQuery()
372362
}

src/views/mp/menu/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
<ContentWrap>
55
<el-form
66
class="-mb-15px"
7-
:model="queryParams"
87
ref="queryFormRef"
98
:inline="true"
109
label-width="68px"
1110
>
1211
<el-form-item label="公众号" prop="accountId">
13-
<el-select v-model="accountId" placeholder="请选择公众号">
12+
<el-select v-model="accountId" placeholder="请选择公众号" class="!w-240px">
1413
<el-option
1514
v-for="item in accountList"
1615
:key="item.id"

0 commit comments

Comments
 (0)