|
23 | 23 | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
24 | 24 | @pagination="getMaterialPage"/>
|
25 | 25 | </div>
|
26 |
| - <div v-else-if="objData.type == 'voice'"> |
27 |
| - <!-- TODO 芋艿:需要翻译 --> |
28 |
| -<!-- <avue-crud ref="crud"--> |
29 |
| -<!-- :page="page"--> |
30 |
| -<!-- :data="tableData"--> |
31 |
| -<!-- :table-loading="tableLoading"--> |
32 |
| -<!-- :option="tableOptionVoice"--> |
33 |
| -<!-- @on-load="getPage"--> |
34 |
| -<!-- @size-change="sizeChange"--> |
35 |
| -<!-- @refresh-change="refreshChange">--> |
36 |
| -<!-- <template slot-scope="scope"--> |
37 |
| -<!-- slot="menu">--> |
38 |
| -<!-- <el-button type="text"--> |
39 |
| -<!-- icon="el-icon-circle-plus"--> |
40 |
| -<!-- size="small"--> |
41 |
| -<!-- plain--> |
42 |
| -<!-- @click="selectMaterial(scope.row)">选择</el-button>--> |
43 |
| -<!-- </template>--> |
44 |
| -<!-- </avue-crud>--> |
| 26 | + <!-- 类型:语音 --> |
| 27 | + <div v-else-if="objData.type === 'voice'"> |
| 28 | + <!-- 列表 --> |
| 29 | + <el-table v-loading="loading" :data="list"> |
| 30 | + <el-table-column label="编号" align="center" prop="mediaId" /> |
| 31 | + <el-table-column label="名字" align="center" prop="name" /> |
| 32 | + <el-table-column label="语音" align="center"> |
| 33 | + <template v-slot="scope"> |
| 34 | + <wx-voice-player :url="scope.row.url" /> |
| 35 | + </template> |
| 36 | + </el-table-column> |
| 37 | + <el-table-column label="上传时间" align="center" prop="createTime" width="180"> |
| 38 | + <template v-slot="scope"> |
| 39 | + <span>{{ parseTime(scope.row.createTime) }}</span> |
| 40 | + </template> |
| 41 | + </el-table-column> |
| 42 | + <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> |
| 43 | + <template v-slot="scope"> |
| 44 | + <el-button size="mini" type="text" icon="el-icon-circle-plus" |
| 45 | + @click="selectMaterial(scope.row)">选择</el-button> |
| 46 | + </template> |
| 47 | + </el-table-column> |
| 48 | + </el-table> |
| 49 | + <!-- 分页组件 --> |
| 50 | + <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" |
| 51 | + @pagination="getMaterialPage"/> |
45 | 52 | </div>
|
46 |
| - <div v-else-if="objData.type == 'video'"> |
47 |
| - <!-- TODO 芋艿:需要翻译 --> |
48 |
| - <!-- <avue-crud ref="crud"--> |
49 |
| -<!-- :page="page"--> |
50 |
| -<!-- :data="tableData"--> |
51 |
| -<!-- :table-loading="tableLoading"--> |
52 |
| -<!-- :option="tableOptionVideo"--> |
53 |
| -<!-- @on-load="getPage"--> |
54 |
| -<!-- @size-change="sizeChange"--> |
55 |
| -<!-- @refresh-change="refreshChange">--> |
56 |
| -<!-- <template slot-scope="scope"--> |
57 |
| -<!-- slot="menu">--> |
58 |
| -<!-- <el-button type="text"--> |
59 |
| -<!-- icon="el-icon-circle-plus"--> |
60 |
| -<!-- size="small"--> |
61 |
| -<!-- plain--> |
62 |
| -<!-- @click="selectMaterial(scope.row)">选择</el-button>--> |
63 |
| -<!-- </template>--> |
64 |
| -<!-- </avue-crud>--> |
| 53 | + <div v-else-if="objData.type === 'video'"> |
| 54 | + <!-- 列表 --> |
| 55 | + <el-table v-loading="loading" :data="list"> |
| 56 | + <el-table-column label="编号" align="center" prop="mediaId" /> |
| 57 | + <el-table-column label="标题" align="center" prop="title" /> |
| 58 | + <el-table-column label="介绍" align="center" prop="introduction" /> |
| 59 | + <el-table-column label="视频" align="center"> |
| 60 | + <template v-slot="scope"> |
| 61 | + <wx-video-player :url="scope.row.url" /> |
| 62 | + </template> |
| 63 | + </el-table-column> |
| 64 | + <el-table-column label="上传时间" align="center" prop="createTime" width="180"> |
| 65 | + <template v-slot="scope"> |
| 66 | + <span>{{ parseTime(scope.row.createTime) }}</span> |
| 67 | + </template> |
| 68 | + </el-table-column> |
| 69 | + <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> |
| 70 | + <template v-slot="scope"> |
| 71 | + <el-button size="mini" type="text" icon="el-icon-circle-plus" |
| 72 | + @click="selectMaterial(scope.row)">选择</el-button> |
| 73 | + </template> |
| 74 | + </el-table-column> |
| 75 | + </el-table> |
| 76 | + <!-- 分页组件 --> |
| 77 | + <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" |
| 78 | + @pagination="getMaterialPage"/> |
65 | 79 | </div>
|
66 | 80 | <div v-else-if="objData.type == 'news'">
|
67 | 81 | <div class="waterfall" v-loading="loading">
|
|
95 | 109 | // import { tableOptionVoice } from '@/const/crud/wxmp/wxmaterial_voice'
|
96 | 110 | // import { tableOptionVideo } from '@/const/crud/wxmp/wxmaterial_video'
|
97 | 111 | import WxNews from '@/views/mp/components/wx-news/main.vue';
|
| 112 | + import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'; |
| 113 | + import WxVideoPlayer from '@/views/mp/components/wx-video-play/main.vue'; |
98 | 114 | import { getMaterialPage } from "@/api/mp/material";
|
99 | 115 | // import {getPage as getPageNews} from '@/api/wxmp/wxfreepublish'
|
100 | 116 | // import {getPage as getPageNewsDraft} from '@/api/wxmp/wxdraft'
|
101 | 117 |
|
102 | 118 | export default {
|
103 | 119 | name: "wxMaterialSelect",
|
104 | 120 | components: {
|
105 |
| - WxNews |
| 121 | + WxNews, |
| 122 | + WxVoicePlayer, |
| 123 | + WxVideoPlayer |
106 | 124 | },
|
107 | 125 | props: {
|
108 | 126 | objData: {
|
|
0 commit comments