Commit 9ec2f8b60f60929fed4c6ec4c3e2000e1f399eb7

Authored by YunaiV
1 parent 2ac2af64

mp:梳理 message 的前端和后端代码

yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/MpMessageController.http 0 → 100644
  1 +### 请求 /mp/message/page 接口 => 成功
  2 +GET {{baseUrl}}/mp/message/page?accountId=1&pageNo=1&pageSize=10
  3 +Content-Type: application/json
  4 +Authorization: Bearer {{token}}
  5 +tenant-id: {{adminTenentId}}
yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/MpMessageController.java
1 package cn.iocoder.yudao.module.mp.controller.admin.message; 1 package cn.iocoder.yudao.module.mp.controller.admin.message;
2 2
  3 +import cn.iocoder.yudao.framework.common.pojo.CommonResult;
  4 +import cn.iocoder.yudao.framework.common.pojo.PageResult;
  5 +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.MpMessagePageReqVO;
  6 +import cn.iocoder.yudao.module.mp.controller.admin.message.vo.MpMessageRespVO;
  7 +import cn.iocoder.yudao.module.mp.convert.message.MpMessageConvert;
3 import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageDO; 8 import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageDO;
4 -import org.springframework.web.bind.annotation.*;  
5 -  
6 -import javax.annotation.Resource;  
7 -  
8 -import org.springframework.validation.annotation.Validated; 9 +import cn.iocoder.yudao.module.mp.service.message.MpMessageService;
  10 +import io.swagger.annotations.Api;
  11 +import io.swagger.annotations.ApiOperation;
9 import org.springframework.security.access.prepost.PreAuthorize; 12 import org.springframework.security.access.prepost.PreAuthorize;
10 -import io.swagger.annotations.*;  
11 -  
12 -import javax.validation.*; 13 +import org.springframework.validation.annotation.Validated;
  14 +import org.springframework.web.bind.annotation.GetMapping;
  15 +import org.springframework.web.bind.annotation.RequestMapping;
  16 +import org.springframework.web.bind.annotation.RestController;
13 17
14 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
15 -import cn.iocoder.yudao.framework.common.pojo.CommonResult; 18 +import javax.annotation.Resource;
  19 +import javax.validation.Valid;
16 20
17 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 21 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
18 22
19 -import cn.iocoder.yudao.module.mp.controller.admin.message.vo.*;  
20 -import cn.iocoder.yudao.module.mp.convert.message.MpMessageConvert;  
21 -import cn.iocoder.yudao.module.mp.service.message.MpMessageService;  
22 -  
23 @Api(tags = "管理后台 - 粉丝消息表") 23 @Api(tags = "管理后台 - 粉丝消息表")
24 @RestController 24 @RestController
25 @RequestMapping("/mp/message") 25 @RequestMapping("/mp/message")
@@ -31,7 +31,7 @@ public class MpMessageController { @@ -31,7 +31,7 @@ public class MpMessageController {
31 31
32 @GetMapping("/page") 32 @GetMapping("/page")
33 @ApiOperation("获得粉丝消息表分页") 33 @ApiOperation("获得粉丝消息表分页")
34 - @PreAuthorize("@ss.hasPermission('wechatMp:wx-fans-msg:query')") 34 + @PreAuthorize("@ss.hasPermission('mp:message:query')")
35 public CommonResult<PageResult<MpMessageRespVO>> getWxFansMsgPage(@Valid MpMessagePageReqVO pageVO) { 35 public CommonResult<PageResult<MpMessageRespVO>> getWxFansMsgPage(@Valid MpMessagePageReqVO pageVO) {
36 PageResult<MpMessageDO> pageResult = mpMessageService.getWxFansMsgPage(pageVO); 36 PageResult<MpMessageDO> pageResult = mpMessageService.getWxFansMsgPage(pageVO);
37 return success(MpMessageConvert.INSTANCE.convertPage(pageResult)); 37 return success(MpMessageConvert.INSTANCE.convertPage(pageResult));
yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/vo/MpMessageBaseVO.java
1 package cn.iocoder.yudao.module.mp.controller.admin.message.vo; 1 package cn.iocoder.yudao.module.mp.controller.admin.message.vo;
2 2
3 -import lombok.*;  
4 -import io.swagger.annotations.*; 3 +import cn.iocoder.yudao.module.mp.dal.dataobject.account.MpAccountDO;
  4 +import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageDO;
  5 +import cn.iocoder.yudao.module.mp.dal.dataobject.user.MpUserDO;
  6 +import cn.iocoder.yudao.module.mp.enums.message.MpMessageSendFromEnum;
  7 +import com.baomidou.mybatisplus.annotation.TableField;
  8 +import lombok.Data;
  9 +import me.chanjar.weixin.common.api.WxConsts;
  10 +
  11 +import java.util.List;
5 12
6 /** 13 /**
7 * 粉丝消息表 Base VO,提供给添加、修改、详细的子 VO 使用 14 * 粉丝消息表 Base VO,提供给添加、修改、详细的子 VO 使用
@@ -10,37 +17,161 @@ import io.swagger.annotations.*; @@ -10,37 +17,161 @@ import io.swagger.annotations.*;
10 @Data 17 @Data
11 public class MpMessageBaseVO { 18 public class MpMessageBaseVO {
12 19
13 - @ApiModelProperty(value = "用户标识") 20 + /**
  21 + * 微信公众号消息 id
  22 + */
  23 + private Long msgId;
  24 + /**
  25 + * 微信公众号 ID
  26 + *
  27 + * 关联 {@link MpAccountDO#getId()}
  28 + */
  29 + private Long accountId;
  30 + /**
  31 + * 微信公众号 appid
  32 + *
  33 + * 冗余 {@link MpAccountDO#getAppId()}
  34 + */
  35 + private String appId;
  36 + /**
  37 + * 微信用户编号
  38 + *
  39 + * 关联 {@link MpUserDO#getId()}
  40 + */
  41 + private Long userId;
  42 + /**
  43 + * 用户标识
  44 + *
  45 + * 冗余 {@link MpUserDO#getOpenid()}
  46 + */
14 private String openid; 47 private String openid;
15 48
16 - @ApiModelProperty(value = "昵称")  
17 - private byte[] nickname; 49 + /**
  50 + * 消息类型
  51 + *
  52 + * 枚举 {@link WxConsts.XmlMsgType}
  53 + */
  54 + private String type;
  55 + /**
  56 + * 消息来源
  57 + *
  58 + * 枚举 {@link MpMessageSendFromEnum}
  59 + */
  60 + private Integer sendFrom;
18 61
19 - @ApiModelProperty(value = "头像地址")  
20 - private String headimgUrl; 62 + // ========= 普通消息内容 https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
21 63
22 - @ApiModelProperty(value = "微信账号ID")  
23 - private String wxAccountId; 64 + /**
  65 + * 消息内容
  66 + *
  67 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 TEXT
  68 + */
  69 + private String content;
24 70
25 - @ApiModelProperty(value = "消息类型")  
26 - private String msgType; 71 + /**
  72 + * 通过素材管理中的接口上传多媒体文件,得到的 id
  73 + *
  74 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 IMAGE、VOICE、VIDEO
  75 + */
  76 + private String mediaId;
  77 + /**
  78 + * 媒体文件的 URL
  79 + */
  80 + private String mediaUrl;
  81 + /**
  82 + * 语音识别后文本
  83 + *
  84 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 VOICE
  85 + */
  86 + private String recognition;
  87 + /**
  88 + * 语音格式,如 amr,speex 等
  89 + *
  90 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 VOICE
  91 + */
  92 + private String format;
  93 + /**
  94 + * 标题
  95 + *
  96 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 VIDEO、MUSIC、LINK
  97 + */
  98 + private String title;
  99 + /**
  100 + * 描述
  101 + *
  102 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 VIDEO、MUSIC
  103 + */
  104 + private String description;
27 105
28 - @ApiModelProperty(value = "内容")  
29 - private String content; 106 + /**
  107 + * 缩略图的媒体 id,通过素材管理中的接口上传多媒体文件,得到的 id
  108 + *
  109 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 VIDEO
  110 + */
  111 + private String thumbMediaId;
  112 + /**
  113 + * 缩略图的媒体 URL
  114 + *
  115 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 VIDEO
  116 + */
  117 + private String thumbMediaUrl;
30 118
31 - @ApiModelProperty(value = "最近一条回复内容")  
32 - private String resContent; 119 + /**
  120 + * 点击图文消息跳转链接
  121 + *
  122 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 LINK
  123 + */
  124 + private String url;
33 125
34 - @ApiModelProperty(value = "是否已回复")  
35 - private String isRes; 126 + /**
  127 + * 地理位置维度
  128 + *
  129 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 LOCATION
  130 + */
  131 + private Double locationX;
  132 + /**
  133 + * 地理位置经度
  134 + *
  135 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 LOCATION
  136 + */
  137 + private Double locationY;
  138 + /**
  139 + * 地图缩放大小
  140 + *
  141 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 LOCATION
  142 + */
  143 + private Double scale;
  144 + /**
  145 + * 详细地址
  146 + *
  147 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 LOCATION
  148 + *
  149 + * 例如说杨浦区黄兴路 221-4 号临
  150 + */
  151 + private String label;
36 152
37 - @ApiModelProperty(value = "微信素材ID")  
38 - private String mediaId; 153 + /**
  154 + * 图文消息数组
  155 + *
  156 + * 消息类型为 {@link WxConsts.XmlMsgType} 的 NEWS
  157 + */
  158 + @TableField(typeHandler = MpMessageDO.ArticleTypeHandler.class)
  159 + private List<MpMessageDO.Article> articles;
39 160
40 - @ApiModelProperty(value = "微信图片URL")  
41 - private String picUrl; 161 + // ========= 事件推送 https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html
42 162
43 - @ApiModelProperty(value = "本地图片路径")  
44 - private String picPath; 163 + /**
  164 + * 事件类型
  165 + *
  166 + * 枚举 {@link WxConsts.EventType}
  167 + */
  168 + private String event;
  169 + /**
  170 + * 事件 Key
  171 + *
  172 + * 1. {@link WxConsts.EventType} 的 SCAN:qrscene_ 为前缀,后面为二维码的参数值
  173 + * 2. {@link WxConsts.EventType} 的 CLICK:与自定义菜单接口中 KEY 值对应
  174 + */
  175 + private String eventKey;
45 176
46 } 177 }
yudao-ui-admin/src/api/mp/message.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 创建粉丝消息表
  4 +export function createMessage(data) {
  5 + return request({
  6 + url: '/mp/message/create',
  7 + method: 'post',
  8 + data: data
  9 + })
  10 +}
  11 +
  12 +// 获得粉丝消息表
  13 +export function getMessage(id) {
  14 + return request({
  15 + url: '/mp/message/get?id=' + id,
  16 + method: 'get'
  17 + })
  18 +}
  19 +
  20 +// 获得粉丝消息表 分页
  21 +export function getMessagePage(query) {
  22 + return request({
  23 + url: '/mp/message/page',
  24 + method: 'get',
  25 + params: query
  26 + })
  27 +}
yudao-ui-admin/src/api/wechatMp/wxFansMsg.js deleted
1 -import request from '@/utils/request'  
2 -  
3 -// 创建粉丝消息表  
4 -export function createWxFansMsg(data) {  
5 - return request({  
6 - url: '/wechatMp/wx-fans-msg/create',  
7 - method: 'post',  
8 - data: data  
9 - })  
10 -}  
11 -  
12 -// 更新粉丝消息表  
13 -export function updateWxFansMsg(data) {  
14 - return request({  
15 - url: '/wechatMp/wx-fans-msg/update',  
16 - method: 'put',  
17 - data: data  
18 - })  
19 -}  
20 -  
21 -// 删除粉丝消息表  
22 -export function deleteWxFansMsg(id) {  
23 - return request({  
24 - url: '/wechatMp/wx-fans-msg/delete?id=' + id,  
25 - method: 'delete'  
26 - })  
27 -}  
28 -  
29 -// 获得粉丝消息表  
30 -export function getWxFansMsg(id) {  
31 - return request({  
32 - url: '/wechatMp/wx-fans-msg/get?id=' + id,  
33 - method: 'get'  
34 - })  
35 -}  
36 -  
37 -// 获得粉丝消息表 分页  
38 -export function getWxFansMsgPage(query) {  
39 - return request({  
40 - url: '/wechatMp/wx-fans-msg/page',  
41 - method: 'get',  
42 - params: query  
43 - })  
44 -}  
45 -  
46 -// 导出粉丝消息表 Excel  
47 -export function exportWxFansMsgExcel(query) {  
48 - return request({  
49 - url: '/wechatMp/wx-fans-msg/export-excel',  
50 - method: 'get',  
51 - params: query,  
52 - responseType: 'blob'  
53 - })  
54 -}  
yudao-ui-admin/src/views/mp/components/LICENSE 0 → 100644
  1 +MIT License
  2 +
  3 +Copyright (c) 2021 JooLun
  4 +
  5 +Permission is hereby granted, free of charge, to any person obtaining a copy
  6 +of this software and associated documentation files (the "Software"), to deal
  7 +in the Software without restriction, including without limitation the rights
  8 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9 +copies of the Software, and to permit persons to whom the Software is
  10 +furnished to do so, subject to the following conditions:
  11 +
  12 +The above copyright notice and this permission notice shall be included in all
  13 +copies or substantial portions of the Software.
  14 +
  15 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  21 +SOFTWARE.
yudao-ui-admin/src/views/wechatMp/wxFansMsg/index.vue renamed to yudao-ui-admin/src/views/mp/message/index.vue
@@ -3,35 +3,19 @@ @@ -3,35 +3,19 @@
3 3
4 <!-- 搜索工作栏 --> 4 <!-- 搜索工作栏 -->
5 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> 5 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
6 - <el-form-item label="用户标识" prop="openid">  
7 - <el-input v-model="queryParams.openid" placeholder="请输入用户标识" clearable @keyup.enter.native="handleQuery"/>  
8 - </el-form-item>  
9 - <el-form-item label="昵称" prop="nickname">  
10 - <el-input v-model="queryParams.nickname" placeholder="请输入昵称" clearable @keyup.enter.native="handleQuery"/>  
11 - </el-form-item>  
12 - <el-form-item label="头像地址" prop="headimgUrl">  
13 - <el-input v-model="queryParams.headimgUrl" placeholder="请输入头像地址" clearable @keyup.enter.native="handleQuery"/>  
14 - </el-form-item>  
15 - <el-form-item label="微信账号ID" prop="wxAccountId">  
16 - <el-input v-model="queryParams.wxAccountId" placeholder="请输入微信账号ID" clearable  
17 - @keyup.enter.native="handleQuery"/> 6 + <el-form-item label="公众号" prop="accountId">
  7 + <el-select v-model="queryParams.accountId" placeholder="请选择公众号">
  8 + <el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
  9 + </el-select>
18 </el-form-item> 10 </el-form-item>
  11 + <!-- 等待处理 -->
19 <el-form-item label="消息类型" prop="msgType"> 12 <el-form-item label="消息类型" prop="msgType">
20 <el-select v-model="queryParams.msgType" placeholder="请选择消息类型" clearable size="small"> 13 <el-select v-model="queryParams.msgType" placeholder="请选择消息类型" clearable size="small">
21 <el-option label="请选择字典生成" value=""/> 14 <el-option label="请选择字典生成" value=""/>
22 </el-select> 15 </el-select>
23 </el-form-item> 16 </el-form-item>
24 - <el-form-item label="是否已回复" prop="isRes">  
25 - <el-input v-model="queryParams.isRes" placeholder="请输入是否已回复" clearable @keyup.enter.native="handleQuery"/>  
26 - </el-form-item>  
27 - <el-form-item label="微信素材ID" prop="mediaId">  
28 - <el-input v-model="queryParams.mediaId" placeholder="请输入微信素材ID" clearable @keyup.enter.native="handleQuery"/>  
29 - </el-form-item>  
30 - <el-form-item label="微信图片URL" prop="picUrl">  
31 - <el-input v-model="queryParams.picUrl" placeholder="请输入微信图片URL" clearable @keyup.enter.native="handleQuery"/>  
32 - </el-form-item>  
33 - <el-form-item label="本地图片路径" prop="picPath">  
34 - <el-input v-model="queryParams.picPath" placeholder="请输入本地图片路径" clearable @keyup.enter.native="handleQuery"/> 17 + <el-form-item label="用户标识" prop="openid">
  18 + <el-input v-model="queryParams.openid" placeholder="请输入用户标识" clearable @keyup.enter.native="handleQuery"/>
35 </el-form-item> 19 </el-form-item>
36 <el-form-item label="创建时间"> 20 <el-form-item label="创建时间">
37 <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" 21 <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
@@ -47,13 +31,7 @@ @@ -47,13 +31,7 @@
47 <el-row :gutter="10" class="mb8"> 31 <el-row :gutter="10" class="mb8">
48 <el-col :span="1.5"> 32 <el-col :span="1.5">
49 <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" 33 <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
50 - v-hasPermi="['wechatMp:wx-fans-msg:create']">新增  
51 - </el-button>  
52 - </el-col>  
53 - <el-col :span="1.5">  
54 - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"  
55 - :loading="exportLoading"  
56 - v-hasPermi="['wechatMp:wx-fans-msg:export']">导出 34 + v-hasPermi="['mp:message:create']">新增
57 </el-button> 35 </el-button>
58 </el-col> 36 </el-col>
59 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> 37 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -61,31 +39,19 @@ @@ -61,31 +39,19 @@
61 39
62 <!-- 列表 --> 40 <!-- 列表 -->
63 <el-table v-loading="loading" :data="list"> 41 <el-table v-loading="loading" :data="list">
64 - <el-table-column label="主键" align="center" prop="id"/>  
65 - <el-table-column label="用户标识" align="center" prop="openid"/>  
66 - <el-table-column label="昵称" align="center" prop="nickname"/>  
67 - <el-table-column label="头像地址" align="center" prop="headimgUrl"/>  
68 - <el-table-column label="微信账号ID" align="center" prop="wxAccountId"/>  
69 - <el-table-column label="消息类型" align="center" prop="msgType"/>  
70 - <el-table-column label="内容" align="center" prop="content"/>  
71 - <el-table-column label="最近一条回复内容" align="center" prop="resContent"/>  
72 - <el-table-column label="是否已回复" align="center" prop="isRes"/>  
73 - <el-table-column label="微信素材ID" align="center" prop="mediaId"/>  
74 - <el-table-column label="微信图片URL" align="center" prop="picUrl"/>  
75 - <el-table-column label="本地图片路径" align="center" prop="picPath"/>  
76 - <el-table-column label="创建时间" align="center" prop="createTime" width="180"> 42 + <el-table-column label="发送时间" align="center" prop="createTime" width="180">
77 <template slot-scope="scope"> 43 <template slot-scope="scope">
78 <span>{{ parseTime(scope.row.createTime) }}</span> 44 <span>{{ parseTime(scope.row.createTime) }}</span>
79 </template> 45 </template>
80 </el-table-column> 46 </el-table-column>
  47 + <el-table-column label="消息类型" align="center" prop="type"/>
  48 + <el-table-column label="用户标识" align="center" prop="openid"/>
  49 + <el-table-column label="内容" align="center" prop="content"/>
81 <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> 50 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
82 <template slot-scope="scope"> 51 <template slot-scope="scope">
83 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"  
84 - v-hasPermi="['wechatMp:wx-fans-msg:update']">修改  
85 - </el-button>  
86 - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"  
87 - v-hasPermi="['wechatMp:wx-fans-msg:delete']">删除  
88 - </el-button> 52 +<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"-->
  53 +<!-- v-hasPermi="['mp:message:update']">修改-->
  54 +<!-- </el-button>-->
89 </template> 55 </template>
90 </el-table-column> 56 </el-table-column>
91 </el-table> 57 </el-table>
@@ -141,178 +107,127 @@ @@ -141,178 +107,127 @@
141 </template> 107 </template>
142 108
143 <script> 109 <script>
144 - import {  
145 - createWxFansMsg,  
146 - updateWxFansMsg,  
147 - deleteWxFansMsg,  
148 - getWxFansMsg,  
149 - getWxFansMsgPage,  
150 - exportWxFansMsgExcel  
151 - } from "@/api/wechatMp/wxFansMsg";  
152 - import Editor from '@/components/Editor'; 110 +import {
  111 + createWxFansMsg,
  112 + getMessagePage,
  113 +} from "@/api/mp/message";
  114 +import Editor from '@/components/Editor/index.vue';
153 115
154 - export default {  
155 - name: "WxFansMsg",  
156 - components: {  
157 - Editor, 116 +export default {
  117 + name: "WxFansMsg",
  118 + components: {
  119 + Editor,
  120 + },
  121 + data() {
  122 + return {
  123 + // 遮罩层
  124 + loading: true,
  125 + // 导出遮罩层
  126 + exportLoading: false,
  127 + // 显示搜索条件
  128 + showSearch: true,
  129 + // 总条数
  130 + total: 0,
  131 + // 粉丝消息表 列表
  132 + list: [],
  133 + // 弹出层标题
  134 + title: "",
  135 + // 是否显示弹出层
  136 + open: false,
  137 + dateRangeCreateTime: [],
  138 + // 查询参数
  139 + queryParams: {
  140 + pageNo: 1,
  141 + pageSize: 10,
  142 + openid: null,
  143 + nickname: null,
  144 + headimgUrl: null,
  145 + wxAccountId: null,
  146 + msgType: null,
  147 + content: null,
  148 + resContent: null,
  149 + isRes: null,
  150 + mediaId: null,
  151 + picUrl: null,
  152 + picPath: null,
  153 + },
  154 + // 表单参数
  155 + form: {},
  156 + // 表单校验
  157 + rules: {}
  158 + };
  159 + },
  160 + created() {
  161 + this.getList();
  162 + },
  163 + methods: {
  164 + /** 查询列表 */
  165 + getList() {
  166 + this.loading = true;
  167 + // 处理查询参数
  168 + let params = {...this.queryParams};
  169 + this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
  170 + // 执行查询
  171 + getMessagePage(params).then(response => {
  172 + this.list = response.data.list;
  173 + this.total = response.data.total;
  174 + this.loading = false;
  175 + });
  176 + },
  177 + /** 取消按钮 */
  178 + cancel() {
  179 + this.open = false;
  180 + this.reset();
158 }, 181 },
159 - data() {  
160 - return {  
161 - // 遮罩层  
162 - loading: true,  
163 - // 导出遮罩层  
164 - exportLoading: false,  
165 - // 显示搜索条件  
166 - showSearch: true,  
167 - // 总条数  
168 - total: 0,  
169 - // 粉丝消息表 列表  
170 - list: [],  
171 - // 弹出层标题  
172 - title: "",  
173 - // 是否显示弹出层  
174 - open: false,  
175 - dateRangeCreateTime: [],  
176 - // 查询参数  
177 - queryParams: {  
178 - pageNo: 1,  
179 - pageSize: 10,  
180 - openid: null,  
181 - nickname: null,  
182 - headimgUrl: null,  
183 - wxAccountId: null,  
184 - msgType: null,  
185 - content: null,  
186 - resContent: null,  
187 - isRes: null,  
188 - mediaId: null,  
189 - picUrl: null,  
190 - picPath: null,  
191 - },  
192 - // 表单参数  
193 - form: {},  
194 - // 表单校验  
195 - rules: {} 182 + /** 表单重置 */
  183 + reset() {
  184 + this.form = {
  185 + id: undefined,
  186 + openid: undefined,
  187 + nickname: undefined,
  188 + headimgUrl: undefined,
  189 + wxAccountId: undefined,
  190 + msgType: undefined,
  191 + content: undefined,
  192 + resContent: undefined,
  193 + isRes: undefined,
  194 + mediaId: undefined,
  195 + picUrl: undefined,
  196 + picPath: undefined,
196 }; 197 };
  198 + this.resetForm("form");
197 }, 199 },
198 - created() { 200 + /** 搜索按钮操作 */
  201 + handleQuery() {
  202 + this.queryParams.pageNo = 1;
199 this.getList(); 203 this.getList();
200 }, 204 },
201 - methods: {  
202 - /** 查询列表 */  
203 - getList() {  
204 - this.loading = true;  
205 - // 处理查询参数  
206 - let params = {...this.queryParams};  
207 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
208 - // 执行查询  
209 - getWxFansMsgPage(params).then(response => {  
210 - this.list = response.data.list;  
211 - this.total = response.data.total;  
212 - this.loading = false;  
213 - });  
214 - },  
215 - /** 取消按钮 */  
216 - cancel() {  
217 - this.open = false;  
218 - this.reset();  
219 - },  
220 - /** 表单重置 */  
221 - reset() {  
222 - this.form = {  
223 - id: undefined,  
224 - openid: undefined,  
225 - nickname: undefined,  
226 - headimgUrl: undefined,  
227 - wxAccountId: undefined,  
228 - msgType: undefined,  
229 - content: undefined,  
230 - resContent: undefined,  
231 - isRes: undefined,  
232 - mediaId: undefined,  
233 - picUrl: undefined,  
234 - picPath: undefined,  
235 - };  
236 - this.resetForm("form");  
237 - },  
238 - /** 搜索按钮操作 */  
239 - handleQuery() {  
240 - this.queryParams.pageNo = 1;  
241 - this.getList();  
242 - },  
243 - /** 重置按钮操作 */  
244 - resetQuery() {  
245 - this.dateRangeCreateTime = [];  
246 - this.resetForm("queryForm");  
247 - this.handleQuery();  
248 - },  
249 - /** 新增按钮操作 */  
250 - handleAdd() {  
251 - this.reset();  
252 - this.open = true;  
253 - this.title = "添加粉丝消息表 ";  
254 - },  
255 - /** 修改按钮操作 */  
256 - handleUpdate(row) {  
257 - this.reset();  
258 - const id = row.id;  
259 - getWxFansMsg(id).then(response => {  
260 - this.form = response.data;  
261 - this.open = true;  
262 - this.title = "修改粉丝消息表 ";  
263 - });  
264 - },  
265 - /** 提交按钮 */  
266 - submitForm() {  
267 - this.$refs["form"].validate(valid => {  
268 - if (!valid) {  
269 - return;  
270 - }  
271 - // 修改的提交  
272 - if (this.form.id != null) {  
273 - updateWxFansMsg(this.form).then(response => {  
274 - this.$modal.msgSuccess("修改成功");  
275 - this.open = false;  
276 - this.getList();  
277 - });  
278 - return;  
279 - }  
280 - // 添加的提交  
281 - createWxFansMsg(this.form).then(response => {  
282 - this.$modal.msgSuccess("新增成功");  
283 - this.open = false;  
284 - this.getList();  
285 - });  
286 - });  
287 - },  
288 - /** 删除按钮操作 */  
289 - handleDelete(row) {  
290 - const id = row.id;  
291 - this.$modal.confirm('是否确认删除粉丝消息表 编号为"' + id + '"的数据项?').then(function () {  
292 - return deleteWxFansMsg(id);  
293 - }).then(() => { 205 + /** 重置按钮操作 */
  206 + resetQuery() {
  207 + this.dateRangeCreateTime = [];
  208 + this.resetForm("queryForm");
  209 + this.handleQuery();
  210 + },
  211 + /** 新增按钮操作 */
  212 + handleAdd() {
  213 + this.reset();
  214 + this.open = true;
  215 + this.title = "添加粉丝消息表 ";
  216 + },
  217 + /** 提交按钮 */
  218 + submitForm() {
  219 + this.$refs["form"].validate(valid => {
  220 + if (!valid) {
  221 + return;
  222 + }
  223 + // 添加的提交
  224 + createWxFansMsg(this.form).then(response => {
  225 + this.$modal.msgSuccess("新增成功");
  226 + this.open = false;
294 this.getList(); 227 this.getList();
295 - this.$modal.msgSuccess("删除成功");  
296 - }).catch(() => {  
297 - });  
298 - },  
299 - /** 导出按钮操作 */  
300 - handleExport() {  
301 - // 处理查询参数  
302 - let params = {...this.queryParams};  
303 - params.pageNo = undefined;  
304 - params.pageSize = undefined;  
305 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
306 - // 执行导出  
307 - this.$modal.confirm('是否确认导出所有粉丝消息表 数据项?').then(() => {  
308 - this.exportLoading = true;  
309 - return exportWxFansMsgExcel(params);  
310 - }).then(response => {  
311 - this.$download.excel(response, '粉丝消息表 .xls');  
312 - this.exportLoading = false;  
313 - }).catch(() => {  
314 }); 228 });
315 - }  
316 - }  
317 - }; 229 + });
  230 + },
  231 + }
  232 +};
318 </script> 233 </script>
yudao-ui-admin/src/views/wechatMp/wxFansMsgRes/index.vue deleted
1 -<template>  
2 - <div class="app-container">  
3 -  
4 - <!-- 搜索工作栏 -->  
5 - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">  
6 - <el-form-item label="粉丝消息ID" prop="fansMsgId">  
7 - <el-input v-model="queryParams.fansMsgId" placeholder="请输入粉丝消息ID" clearable @keyup.enter.native="handleQuery"/>  
8 - </el-form-item>  
9 - <el-form-item label="创建时间">  
10 - <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"  
11 - type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>  
12 - </el-form-item>  
13 - <el-form-item>  
14 - <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>  
15 - <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>  
16 - </el-form-item>  
17 - </el-form>  
18 -  
19 - <!-- 操作工具栏 -->  
20 - <el-row :gutter="10" class="mb8">  
21 - <el-col :span="1.5">  
22 - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"  
23 - v-hasPermi="['wechatMp:wx-fans-msg-res:create']">新增  
24 - </el-button>  
25 - </el-col>  
26 - <el-col :span="1.5">  
27 - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"  
28 - :loading="exportLoading"  
29 - v-hasPermi="['wechatMp:wx-fans-msg-res:export']">导出  
30 - </el-button>  
31 - </el-col>  
32 - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>  
33 - </el-row>  
34 -  
35 - <!-- 列表 -->  
36 - <el-table v-loading="loading" :data="list">  
37 - <el-table-column label="主键" align="center" prop="id"/>  
38 - <el-table-column label="粉丝消息ID" align="center" prop="fansMsgId"/>  
39 - <el-table-column label="回复内容" align="center" prop="resContent"/>  
40 - <el-table-column label="创建时间" align="center" prop="createTime" width="180">  
41 - <template slot-scope="scope">  
42 - <span>{{ parseTime(scope.row.createTime) }}</span>  
43 - </template>  
44 - </el-table-column>  
45 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
46 - <template slot-scope="scope">  
47 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"  
48 - v-hasPermi="['wechatMp:wx-fans-msg-res:update']">修改  
49 - </el-button>  
50 - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"  
51 - v-hasPermi="['wechatMp:wx-fans-msg-res:delete']">删除  
52 - </el-button>  
53 - </template>  
54 - </el-table-column>  
55 - </el-table>  
56 - <!-- 分页组件 -->  
57 - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"  
58 - @pagination="getList"/>  
59 -  
60 - <!-- 对话框(添加 / 修改) -->  
61 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>  
62 - <el-form ref="form" :model="form" :rules="rules" label-width="80px">  
63 - <el-form-item label="粉丝消息ID" prop="fansMsgId">  
64 - <el-input v-model="form.fansMsgId" placeholder="请输入粉丝消息ID"/>  
65 - </el-form-item>  
66 - <el-form-item label="回复内容">  
67 - <editor v-model="form.resContent" :min-height="192"/>  
68 - </el-form-item>  
69 - </el-form>  
70 - <div slot="footer" class="dialog-footer">  
71 - <el-button type="primary" @click="submitForm">确 定</el-button>  
72 - <el-button @click="cancel">取 消</el-button>  
73 - </div>  
74 - </el-dialog>  
75 - </div>  
76 -</template>  
77 -  
78 -<script>  
79 - import {  
80 - createWxFansMsgRes,  
81 - updateWxFansMsgRes,  
82 - deleteWxFansMsgRes,  
83 - getWxFansMsgRes,  
84 - getWxFansMsgResPage,  
85 - exportWxFansMsgResExcel  
86 - } from "@/api/wechatMp/wxFansMsgRes";  
87 - import Editor from '@/components/Editor';  
88 -  
89 - export default {  
90 - name: "WxFansMsgRes",  
91 - components: {  
92 - Editor,  
93 - },  
94 - data() {  
95 - return {  
96 - // 遮罩层  
97 - loading: true,  
98 - // 导出遮罩层  
99 - exportLoading: false,  
100 - // 显示搜索条件  
101 - showSearch: true,  
102 - // 总条数  
103 - total: 0,  
104 - // 回复粉丝消息历史表 列表  
105 - list: [],  
106 - // 弹出层标题  
107 - title: "",  
108 - // 是否显示弹出层  
109 - open: false,  
110 - dateRangeCreateTime: [],  
111 - // 查询参数  
112 - queryParams: {  
113 - pageNo: 1,  
114 - pageSize: 10,  
115 - fansMsgId: null,  
116 - resContent: null,  
117 - },  
118 - // 表单参数  
119 - form: {},  
120 - // 表单校验  
121 - rules: {}  
122 - };  
123 - },  
124 - created() {  
125 - this.getList();  
126 - },  
127 - methods: {  
128 - /** 查询列表 */  
129 - getList() {  
130 - this.loading = true;  
131 - // 处理查询参数  
132 - let params = {...this.queryParams};  
133 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
134 - // 执行查询  
135 - getWxFansMsgResPage(params).then(response => {  
136 - this.list = response.data.list;  
137 - this.total = response.data.total;  
138 - this.loading = false;  
139 - });  
140 - },  
141 - /** 取消按钮 */  
142 - cancel() {  
143 - this.open = false;  
144 - this.reset();  
145 - },  
146 - /** 表单重置 */  
147 - reset() {  
148 - this.form = {  
149 - id: undefined,  
150 - fansMsgId: undefined,  
151 - resContent: undefined,  
152 - };  
153 - this.resetForm("form");  
154 - },  
155 - /** 搜索按钮操作 */  
156 - handleQuery() {  
157 - this.queryParams.pageNo = 1;  
158 - this.getList();  
159 - },  
160 - /** 重置按钮操作 */  
161 - resetQuery() {  
162 - this.dateRangeCreateTime = [];  
163 - this.resetForm("queryForm");  
164 - this.handleQuery();  
165 - },  
166 - /** 新增按钮操作 */  
167 - handleAdd() {  
168 - this.reset();  
169 - this.open = true;  
170 - this.title = "添加回复粉丝消息历史表 ";  
171 - },  
172 - /** 修改按钮操作 */  
173 - handleUpdate(row) {  
174 - this.reset();  
175 - const id = row.id;  
176 - getWxFansMsgRes(id).then(response => {  
177 - this.form = response.data;  
178 - this.open = true;  
179 - this.title = "修改回复粉丝消息历史表 ";  
180 - });  
181 - },  
182 - /** 提交按钮 */  
183 - submitForm() {  
184 - this.$refs["form"].validate(valid => {  
185 - if (!valid) {  
186 - return;  
187 - }  
188 - // 修改的提交  
189 - if (this.form.id != null) {  
190 - updateWxFansMsgRes(this.form).then(response => {  
191 - this.$modal.msgSuccess("修改成功");  
192 - this.open = false;  
193 - this.getList();  
194 - });  
195 - return;  
196 - }  
197 - // 添加的提交  
198 - createWxFansMsgRes(this.form).then(response => {  
199 - this.$modal.msgSuccess("新增成功");  
200 - this.open = false;  
201 - this.getList();  
202 - });  
203 - });  
204 - },  
205 - /** 删除按钮操作 */  
206 - handleDelete(row) {  
207 - const id = row.id;  
208 - this.$modal.confirm('是否确认删除回复粉丝消息历史表 编号为"' + id + '"的数据项?').then(function () {  
209 - return deleteWxFansMsgRes(id);  
210 - }).then(() => {  
211 - this.getList();  
212 - this.$modal.msgSuccess("删除成功");  
213 - }).catch(() => {  
214 - });  
215 - },  
216 - /** 导出按钮操作 */  
217 - handleExport() {  
218 - // 处理查询参数  
219 - let params = {...this.queryParams};  
220 - params.pageNo = undefined;  
221 - params.pageSize = undefined;  
222 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
223 - // 执行导出  
224 - this.$modal.confirm('是否确认导出所有回复粉丝消息历史表 数据项?').then(() => {  
225 - this.exportLoading = true;  
226 - return exportWxFansMsgResExcel(params);  
227 - }).then(response => {  
228 - this.$download.excel(response, '回复粉丝消息历史表 .xls');  
229 - this.exportLoading = false;  
230 - }).catch(() => {  
231 - });  
232 - }  
233 - }  
234 - };  
235 -</script>  
yudao-ui-admin/src/views/wechatMp/wxNewsArticleItem/index.vue deleted
1 -<template>  
2 - <div class="app-container">  
3 -  
4 - <!-- 搜索工作栏 -->  
5 - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">  
6 - <el-form-item label="标题" prop="title">  
7 - <el-input v-model="queryParams.title" placeholder="请输入标题" clearable @keyup.enter.native="handleQuery"/>  
8 - </el-form-item>  
9 - <el-form-item label="摘要" prop="digest">  
10 - <el-input v-model="queryParams.digest" placeholder="请输入摘要" clearable @keyup.enter.native="handleQuery"/>  
11 - </el-form-item>  
12 - <el-form-item label="作者" prop="author">  
13 - <el-input v-model="queryParams.author" placeholder="请输入作者" clearable @keyup.enter.native="handleQuery"/>  
14 - </el-form-item>  
15 - <el-form-item label="是否展示封面图片(0/1)" prop="showCoverPic">  
16 - <el-input v-model="queryParams.showCoverPic" placeholder="请输入是否展示封面图片(0/1)" clearable  
17 - @keyup.enter.native="handleQuery"/>  
18 - </el-form-item>  
19 - <el-form-item label="上传微信,封面图片标识" prop="thumbMediaId">  
20 - <el-input v-model="queryParams.thumbMediaId" placeholder="请输入上传微信,封面图片标识" clearable  
21 - @keyup.enter.native="handleQuery"/>  
22 - </el-form-item>  
23 - <el-form-item label="内容链接" prop="contentSourceUrl">  
24 - <el-input v-model="queryParams.contentSourceUrl" placeholder="请输入内容链接" clearable  
25 - @keyup.enter.native="handleQuery"/>  
26 - </el-form-item>  
27 - <el-form-item label="文章排序" prop="orderNo">  
28 - <el-input v-model="queryParams.orderNo" placeholder="请输入文章排序" clearable @keyup.enter.native="handleQuery"/>  
29 - </el-form-item>  
30 - <el-form-item label="图片路径" prop="picPath">  
31 - <el-input v-model="queryParams.picPath" placeholder="请输入图片路径" clearable @keyup.enter.native="handleQuery"/>  
32 - </el-form-item>  
33 - <el-form-item label="是否可以留言" prop="needOpenComment">  
34 - <el-input v-model="queryParams.needOpenComment" placeholder="请输入是否可以留言" clearable  
35 - @keyup.enter.native="handleQuery"/>  
36 - </el-form-item>  
37 - <el-form-item label="是否仅粉丝可以留言" prop="onlyFansCanComment">  
38 - <el-input v-model="queryParams.onlyFansCanComment" placeholder="请输入是否仅粉丝可以留言" clearable  
39 - @keyup.enter.native="handleQuery"/>  
40 - </el-form-item>  
41 - <el-form-item label="图文ID" prop="newsId">  
42 - <el-input v-model="queryParams.newsId" placeholder="请输入图文ID" clearable @keyup.enter.native="handleQuery"/>  
43 - </el-form-item>  
44 - <el-form-item label="微信账号ID" prop="wxAccountId">  
45 - <el-input v-model="queryParams.wxAccountId" placeholder="请输入微信账号ID" clearable  
46 - @keyup.enter.native="handleQuery"/>  
47 - </el-form-item>  
48 - <el-form-item label="创建时间">  
49 - <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"  
50 - type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>  
51 - </el-form-item>  
52 - <el-form-item>  
53 - <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>  
54 - <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>  
55 - </el-form-item>  
56 - </el-form>  
57 -  
58 - <!-- 操作工具栏 -->  
59 - <el-row :gutter="10" class="mb8">  
60 - <el-col :span="1.5">  
61 - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"  
62 - v-hasPermi="['wechatMp:wx-news-article-item:create']">新增  
63 - </el-button>  
64 - </el-col>  
65 - <el-col :span="1.5">  
66 - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"  
67 - :loading="exportLoading"  
68 - v-hasPermi="['wechatMp:wx-news-article-item:export']">导出  
69 - </el-button>  
70 - </el-col>  
71 - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>  
72 - </el-row>  
73 -  
74 - <!-- 列表 -->  
75 - <el-table v-loading="loading" :data="list">  
76 - <el-table-column label="主键" align="center" prop="id"/>  
77 - <el-table-column label="标题" align="center" prop="title"/>  
78 - <el-table-column label="摘要" align="center" prop="digest"/>  
79 - <el-table-column label="作者" align="center" prop="author"/>  
80 - <el-table-column label="是否展示封面图片(0/1)" align="center" prop="showCoverPic"/>  
81 - <el-table-column label="上传微信,封面图片标识" align="center" prop="thumbMediaId"/>  
82 - <el-table-column label="内容" align="center" prop="content"/>  
83 - <el-table-column label="内容链接" align="center" prop="contentSourceUrl"/>  
84 - <el-table-column label="文章排序" align="center" prop="orderNo"/>  
85 - <el-table-column label="图片路径" align="center" prop="picPath"/>  
86 - <el-table-column label="是否可以留言" align="center" prop="needOpenComment"/>  
87 - <el-table-column label="是否仅粉丝可以留言" align="center" prop="onlyFansCanComment"/>  
88 - <el-table-column label="图文ID" align="center" prop="newsId"/>  
89 - <el-table-column label="微信账号ID" align="center" prop="wxAccountId"/>  
90 - <el-table-column label="创建时间" align="center" prop="createTime" width="180">  
91 - <template slot-scope="scope">  
92 - <span>{{ parseTime(scope.row.createTime) }}</span>  
93 - </template>  
94 - </el-table-column>  
95 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
96 - <template slot-scope="scope">  
97 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"  
98 - v-hasPermi="['wechatMp:wx-news-article-item:update']">修改  
99 - </el-button>  
100 - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"  
101 - v-hasPermi="['wechatMp:wx-news-article-item:delete']">删除  
102 - </el-button>  
103 - </template>  
104 - </el-table-column>  
105 - </el-table>  
106 - <!-- 分页组件 -->  
107 - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"  
108 - @pagination="getList"/>  
109 -  
110 - <!-- 对话框(添加 / 修改) -->  
111 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>  
112 - <el-form ref="form" :model="form" :rules="rules" label-width="80px">  
113 - <el-form-item label="标题" prop="title">  
114 - <el-input v-model="form.title" placeholder="请输入标题"/>  
115 - </el-form-item>  
116 - <el-form-item label="摘要" prop="digest">  
117 - <el-input v-model="form.digest" placeholder="请输入摘要"/>  
118 - </el-form-item>  
119 - <el-form-item label="作者" prop="author">  
120 - <el-input v-model="form.author" placeholder="请输入作者"/>  
121 - </el-form-item>  
122 - <el-form-item label="是否展示封面图片(0/1)" prop="showCoverPic">  
123 - <el-input v-model="form.showCoverPic" placeholder="请输入是否展示封面图片(0/1)"/>  
124 - </el-form-item>  
125 - <el-form-item label="上传微信,封面图片标识" prop="thumbMediaId">  
126 - <el-input v-model="form.thumbMediaId" placeholder="请输入上传微信,封面图片标识"/>  
127 - </el-form-item>  
128 - <el-form-item label="内容">  
129 - <editor v-model="form.content" :min-height="192"/>  
130 - </el-form-item>  
131 - <el-form-item label="内容链接" prop="contentSourceUrl">  
132 - <el-input v-model="form.contentSourceUrl" placeholder="请输入内容链接"/>  
133 - </el-form-item>  
134 - <el-form-item label="文章排序" prop="orderNo">  
135 - <el-input v-model="form.orderNo" placeholder="请输入文章排序"/>  
136 - </el-form-item>  
137 - <el-form-item label="图片路径" prop="picPath">  
138 - <el-input v-model="form.picPath" placeholder="请输入图片路径"/>  
139 - </el-form-item>  
140 - <el-form-item label="是否可以留言" prop="needOpenComment">  
141 - <el-input v-model="form.needOpenComment" placeholder="请输入是否可以留言"/>  
142 - </el-form-item>  
143 - <el-form-item label="是否仅粉丝可以留言" prop="onlyFansCanComment">  
144 - <el-input v-model="form.onlyFansCanComment" placeholder="请输入是否仅粉丝可以留言"/>  
145 - </el-form-item>  
146 - <el-form-item label="图文ID" prop="newsId">  
147 - <el-input v-model="form.newsId" placeholder="请输入图文ID"/>  
148 - </el-form-item>  
149 - <el-form-item label="微信账号ID" prop="wxAccountId">  
150 - <el-input v-model="form.wxAccountId" placeholder="请输入微信账号ID"/>  
151 - </el-form-item>  
152 - </el-form>  
153 - <div slot="footer" class="dialog-footer">  
154 - <el-button type="primary" @click="submitForm">确 定</el-button>  
155 - <el-button @click="cancel">取 消</el-button>  
156 - </div>  
157 - </el-dialog>  
158 - </div>  
159 -</template>  
160 -  
161 -<script>  
162 - import {  
163 - createWxNewsArticleItem,  
164 - updateWxNewsArticleItem,  
165 - deleteWxNewsArticleItem,  
166 - getWxNewsArticleItem,  
167 - getWxNewsArticleItemPage,  
168 - exportWxNewsArticleItemExcel  
169 - } from "@/api/wechatMp/wxNewsArticleItem";  
170 - import Editor from '@/components/Editor';  
171 -  
172 - export default {  
173 - name: "WxNewsArticleItem",  
174 - components: {  
175 - Editor,  
176 - },  
177 - data() {  
178 - return {  
179 - // 遮罩层  
180 - loading: true,  
181 - // 导出遮罩层  
182 - exportLoading: false,  
183 - // 显示搜索条件  
184 - showSearch: true,  
185 - // 总条数  
186 - total: 0,  
187 - // 图文消息文章列表表 列表  
188 - list: [],  
189 - // 弹出层标题  
190 - title: "",  
191 - // 是否显示弹出层  
192 - open: false,  
193 - dateRangeCreateTime: [],  
194 - // 查询参数  
195 - queryParams: {  
196 - pageNo: 1,  
197 - pageSize: 10,  
198 - title: null,  
199 - digest: null,  
200 - author: null,  
201 - showCoverPic: null,  
202 - thumbMediaId: null,  
203 - content: null,  
204 - contentSourceUrl: null,  
205 - orderNo: null,  
206 - picPath: null,  
207 - needOpenComment: null,  
208 - onlyFansCanComment: null,  
209 - newsId: null,  
210 - wxAccountId: null,  
211 - },  
212 - // 表单参数  
213 - form: {},  
214 - // 表单校验  
215 - rules: {}  
216 - };  
217 - },  
218 - created() {  
219 - this.getList();  
220 - },  
221 - methods: {  
222 - /** 查询列表 */  
223 - getList() {  
224 - this.loading = true;  
225 - // 处理查询参数  
226 - let params = {...this.queryParams};  
227 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
228 - // 执行查询  
229 - getWxNewsArticleItemPage(params).then(response => {  
230 - this.list = response.data.list;  
231 - this.total = response.data.total;  
232 - this.loading = false;  
233 - });  
234 - },  
235 - /** 取消按钮 */  
236 - cancel() {  
237 - this.open = false;  
238 - this.reset();  
239 - },  
240 - /** 表单重置 */  
241 - reset() {  
242 - this.form = {  
243 - id: undefined,  
244 - title: undefined,  
245 - digest: undefined,  
246 - author: undefined,  
247 - showCoverPic: undefined,  
248 - thumbMediaId: undefined,  
249 - content: undefined,  
250 - contentSourceUrl: undefined,  
251 - orderNo: undefined,  
252 - picPath: undefined,  
253 - needOpenComment: undefined,  
254 - onlyFansCanComment: undefined,  
255 - newsId: undefined,  
256 - wxAccountId: undefined,  
257 - };  
258 - this.resetForm("form");  
259 - },  
260 - /** 搜索按钮操作 */  
261 - handleQuery() {  
262 - this.queryParams.pageNo = 1;  
263 - this.getList();  
264 - },  
265 - /** 重置按钮操作 */  
266 - resetQuery() {  
267 - this.dateRangeCreateTime = [];  
268 - this.resetForm("queryForm");  
269 - this.handleQuery();  
270 - },  
271 - /** 新增按钮操作 */  
272 - handleAdd() {  
273 - this.reset();  
274 - this.open = true;  
275 - this.title = "添加图文消息文章列表表 ";  
276 - },  
277 - /** 修改按钮操作 */  
278 - handleUpdate(row) {  
279 - this.reset();  
280 - const id = row.id;  
281 - getWxNewsArticleItem(id).then(response => {  
282 - this.form = response.data;  
283 - this.open = true;  
284 - this.title = "修改图文消息文章列表表 ";  
285 - });  
286 - },  
287 - /** 提交按钮 */  
288 - submitForm() {  
289 - this.$refs["form"].validate(valid => {  
290 - if (!valid) {  
291 - return;  
292 - }  
293 - // 修改的提交  
294 - if (this.form.id != null) {  
295 - updateWxNewsArticleItem(this.form).then(response => {  
296 - this.$modal.msgSuccess("修改成功");  
297 - this.open = false;  
298 - this.getList();  
299 - });  
300 - return;  
301 - }  
302 - // 添加的提交  
303 - createWxNewsArticleItem(this.form).then(response => {  
304 - this.$modal.msgSuccess("新增成功");  
305 - this.open = false;  
306 - this.getList();  
307 - });  
308 - });  
309 - },  
310 - /** 删除按钮操作 */  
311 - handleDelete(row) {  
312 - const id = row.id;  
313 - this.$modal.confirm('是否确认删除图文消息文章列表表 编号为"' + id + '"的数据项?').then(function () {  
314 - return deleteWxNewsArticleItem(id);  
315 - }).then(() => {  
316 - this.getList();  
317 - this.$modal.msgSuccess("删除成功");  
318 - }).catch(() => {  
319 - });  
320 - },  
321 - /** 导出按钮操作 */  
322 - handleExport() {  
323 - // 处理查询参数  
324 - let params = {...this.queryParams};  
325 - params.pageNo = undefined;  
326 - params.pageSize = undefined;  
327 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
328 - // 执行导出  
329 - this.$modal.confirm('是否确认导出所有图文消息文章列表表 数据项?').then(() => {  
330 - this.exportLoading = true;  
331 - return exportWxNewsArticleItemExcel(params);  
332 - }).then(response => {  
333 - this.$download.excel(response, '图文消息文章列表表 .xls');  
334 - this.exportLoading = false;  
335 - }).catch(() => {  
336 - });  
337 - }  
338 - }  
339 - };  
340 -</script>  
yudao-ui-admin/src/views/wechatMp/wxNewsTemplate/index.vue deleted
1 -<template>  
2 - <div class="app-container">  
3 -  
4 - <!-- 搜索工作栏 -->  
5 - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">  
6 - <el-form-item label="模板名称" prop="tplName">  
7 - <el-input v-model="queryParams.tplName" placeholder="请输入模板名称" clearable @keyup.enter.native="handleQuery"/>  
8 - </el-form-item>  
9 - <el-form-item label="是否已上传微信" prop="isUpload">  
10 - <el-input v-model="queryParams.isUpload" placeholder="请输入是否已上传微信" clearable @keyup.enter.native="handleQuery"/>  
11 - </el-form-item>  
12 - <el-form-item label="素材ID" prop="mediaId">  
13 - <el-input v-model="queryParams.mediaId" placeholder="请输入素材ID" clearable @keyup.enter.native="handleQuery"/>  
14 - </el-form-item>  
15 - <el-form-item label="微信账号ID" prop="wxAccountId">  
16 - <el-input v-model="queryParams.wxAccountId" placeholder="请输入微信账号ID" clearable  
17 - @keyup.enter.native="handleQuery"/>  
18 - </el-form-item>  
19 - <el-form-item label="创建时间">  
20 - <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"  
21 - type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>  
22 - </el-form-item>  
23 - <el-form-item>  
24 - <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>  
25 - <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>  
26 - </el-form-item>  
27 - </el-form>  
28 -  
29 - <!-- 操作工具栏 -->  
30 - <el-row :gutter="10" class="mb8">  
31 - <el-col :span="1.5">  
32 - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"  
33 - v-hasPermi="['wechatMp:wx-news-template:create']">新增  
34 - </el-button>  
35 - </el-col>  
36 - <el-col :span="1.5">  
37 - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"  
38 - :loading="exportLoading"  
39 - v-hasPermi="['wechatMp:wx-news-template:export']">导出  
40 - </el-button>  
41 - </el-col>  
42 - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>  
43 - </el-row>  
44 -  
45 - <!-- 列表 -->  
46 - <el-table v-loading="loading" :data="list">  
47 - <el-table-column label="主键 主键ID" align="center" prop="id"/>  
48 - <el-table-column label="模板名称" align="center" prop="tplName"/>  
49 - <el-table-column label="是否已上传微信" align="center" prop="isUpload"/>  
50 - <el-table-column label="素材ID" align="center" prop="mediaId"/>  
51 - <el-table-column label="微信账号ID" align="center" prop="wxAccountId"/>  
52 - <el-table-column label="创建时间" align="center" prop="createTime" width="180">  
53 - <template slot-scope="scope">  
54 - <span>{{ parseTime(scope.row.createTime) }}</span>  
55 - </template>  
56 - </el-table-column>  
57 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
58 - <template slot-scope="scope">  
59 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"  
60 - v-hasPermi="['wechatMp:wx-news-template:update']">修改  
61 - </el-button>  
62 - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"  
63 - v-hasPermi="['wechatMp:wx-news-template:delete']">删除  
64 - </el-button>  
65 - </template>  
66 - </el-table-column>  
67 - </el-table>  
68 - <!-- 分页组件 -->  
69 - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"  
70 - @pagination="getList"/>  
71 -  
72 - <!-- 对话框(添加 / 修改) -->  
73 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>  
74 - <el-form ref="form" :model="form" :rules="rules" label-width="80px">  
75 - <el-form-item label="模板名称" prop="tplName">  
76 - <el-input v-model="form.tplName" placeholder="请输入模板名称"/>  
77 - </el-form-item>  
78 - <el-form-item label="是否已上传微信" prop="isUpload">  
79 - <el-input v-model="form.isUpload" placeholder="请输入是否已上传微信"/>  
80 - </el-form-item>  
81 - <el-form-item label="素材ID" prop="mediaId">  
82 - <el-input v-model="form.mediaId" placeholder="请输入素材ID"/>  
83 - </el-form-item>  
84 - <el-form-item label="微信账号ID" prop="wxAccountId">  
85 - <el-input v-model="form.wxAccountId" placeholder="请输入微信账号ID"/>  
86 - </el-form-item>  
87 - </el-form>  
88 - <div slot="footer" class="dialog-footer">  
89 - <el-button type="primary" @click="submitForm">确 定</el-button>  
90 - <el-button @click="cancel">取 消</el-button>  
91 - </div>  
92 - </el-dialog>  
93 - </div>  
94 -</template>  
95 -  
96 -<script>  
97 - import {  
98 - createWxNewsTemplate,  
99 - updateWxNewsTemplate,  
100 - deleteWxNewsTemplate,  
101 - getWxNewsTemplate,  
102 - getWxNewsTemplatePage,  
103 - exportWxNewsTemplateExcel  
104 - } from "@/api/wechatMp/wxNewsTemplate";  
105 -  
106 - export default {  
107 - name: "WxNewsTemplate",  
108 - components: {},  
109 - data() {  
110 - return {  
111 - // 遮罩层  
112 - loading: true,  
113 - // 导出遮罩层  
114 - exportLoading: false,  
115 - // 显示搜索条件  
116 - showSearch: true,  
117 - // 总条数  
118 - total: 0,  
119 - // 图文消息模板列表  
120 - list: [],  
121 - // 弹出层标题  
122 - title: "",  
123 - // 是否显示弹出层  
124 - open: false,  
125 - dateRangeCreateTime: [],  
126 - // 查询参数  
127 - queryParams: {  
128 - pageNo: 1,  
129 - pageSize: 10,  
130 - tplName: null,  
131 - isUpload: null,  
132 - mediaId: null,  
133 - wxAccountId: null,  
134 - },  
135 - // 表单参数  
136 - form: {},  
137 - // 表单校验  
138 - rules: {}  
139 - };  
140 - },  
141 - created() {  
142 - this.getList();  
143 - },  
144 - methods: {  
145 - /** 查询列表 */  
146 - getList() {  
147 - this.loading = true;  
148 - // 处理查询参数  
149 - let params = {...this.queryParams};  
150 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
151 - // 执行查询  
152 - getWxNewsTemplatePage(params).then(response => {  
153 - this.list = response.data.list;  
154 - this.total = response.data.total;  
155 - this.loading = false;  
156 - });  
157 - },  
158 - /** 取消按钮 */  
159 - cancel() {  
160 - this.open = false;  
161 - this.reset();  
162 - },  
163 - /** 表单重置 */  
164 - reset() {  
165 - this.form = {  
166 - id: undefined,  
167 - tplName: undefined,  
168 - isUpload: undefined,  
169 - mediaId: undefined,  
170 - wxAccountId: undefined,  
171 - };  
172 - this.resetForm("form");  
173 - },  
174 - /** 搜索按钮操作 */  
175 - handleQuery() {  
176 - this.queryParams.pageNo = 1;  
177 - this.getList();  
178 - },  
179 - /** 重置按钮操作 */  
180 - resetQuery() {  
181 - this.dateRangeCreateTime = [];  
182 - this.resetForm("queryForm");  
183 - this.handleQuery();  
184 - },  
185 - /** 新增按钮操作 */  
186 - handleAdd() {  
187 - this.reset();  
188 - this.open = true;  
189 - this.title = "添加图文消息模板";  
190 - },  
191 - /** 修改按钮操作 */  
192 - handleUpdate(row) {  
193 - this.reset();  
194 - const id = row.id;  
195 - getWxNewsTemplate(id).then(response => {  
196 - this.form = response.data;  
197 - this.open = true;  
198 - this.title = "修改图文消息模板";  
199 - });  
200 - },  
201 - /** 提交按钮 */  
202 - submitForm() {  
203 - this.$refs["form"].validate(valid => {  
204 - if (!valid) {  
205 - return;  
206 - }  
207 - // 修改的提交  
208 - if (this.form.id != null) {  
209 - updateWxNewsTemplate(this.form).then(response => {  
210 - this.$modal.msgSuccess("修改成功");  
211 - this.open = false;  
212 - this.getList();  
213 - });  
214 - return;  
215 - }  
216 - // 添加的提交  
217 - createWxNewsTemplate(this.form).then(response => {  
218 - this.$modal.msgSuccess("新增成功");  
219 - this.open = false;  
220 - this.getList();  
221 - });  
222 - });  
223 - },  
224 - /** 删除按钮操作 */  
225 - handleDelete(row) {  
226 - const id = row.id;  
227 - this.$modal.confirm('是否确认删除图文消息模板编号为"' + id + '"的数据项?').then(function () {  
228 - return deleteWxNewsTemplate(id);  
229 - }).then(() => {  
230 - this.getList();  
231 - this.$modal.msgSuccess("删除成功");  
232 - }).catch(() => {  
233 - });  
234 - },  
235 - /** 导出按钮操作 */  
236 - handleExport() {  
237 - // 处理查询参数  
238 - let params = {...this.queryParams};  
239 - params.pageNo = undefined;  
240 - params.pageSize = undefined;  
241 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
242 - // 执行导出  
243 - this.$modal.confirm('是否确认导出所有图文消息模板数据项?').then(() => {  
244 - this.exportLoading = true;  
245 - return exportWxNewsTemplateExcel(params);  
246 - }).then(response => {  
247 - this.$download.excel(response, '图文消息模板.xls');  
248 - this.exportLoading = false;  
249 - }).catch(() => {  
250 - });  
251 - }  
252 - }  
253 - };  
254 -</script>  
yudao-ui-admin/src/views/wechatMp/wxReceiveText/index.vue deleted
1 -<template>  
2 - <div class="app-container">  
3 -  
4 - <!-- 搜索工作栏 -->  
5 - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">  
6 - <el-form-item label="关键字" prop="receiveText">  
7 - <el-input v-model="queryParams.receiveText" placeholder="请输入关键字" clearable @keyup.enter.native="handleQuery"/>  
8 - </el-form-item>  
9 - <el-form-item label="消息类型 1文本消息;2图文消息;" prop="msgType">  
10 - <el-select v-model="queryParams.msgType" placeholder="请选择消息类型 1文本消息;2图文消息;" clearable size="small">  
11 - <el-option label="请选择字典生成" value=""/>  
12 - </el-select>  
13 - </el-form-item>  
14 - <el-form-item label="模板ID" prop="tplId">  
15 - <el-input v-model="queryParams.tplId" placeholder="请输入模板ID" clearable @keyup.enter.native="handleQuery"/>  
16 - </el-form-item>  
17 - <el-form-item label="微信账号ID" prop="wxAccountId">  
18 - <el-input v-model="queryParams.wxAccountId" placeholder="请输入微信账号ID" clearable  
19 - @keyup.enter.native="handleQuery"/>  
20 - </el-form-item>  
21 - <el-form-item label="创建时间">  
22 - <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"  
23 - type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>  
24 - </el-form-item>  
25 - <el-form-item>  
26 - <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>  
27 - <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>  
28 - </el-form-item>  
29 - </el-form>  
30 -  
31 - <!-- 操作工具栏 -->  
32 - <el-row :gutter="10" class="mb8">  
33 - <el-col :span="1.5">  
34 - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"  
35 - v-hasPermi="['wechatMp:wx-receive-text:create']">新增  
36 - </el-button>  
37 - </el-col>  
38 - <el-col :span="1.5">  
39 - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"  
40 - :loading="exportLoading"  
41 - v-hasPermi="['wechatMp:wx-receive-text:export']">导出  
42 - </el-button>  
43 - </el-col>  
44 - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>  
45 - </el-row>  
46 -  
47 - <!-- 列表 -->  
48 - <el-table v-loading="loading" :data="list">  
49 - <el-table-column label="主键" align="center" prop="id"/>  
50 - <el-table-column label="关键字" align="center" prop="receiveText"/>  
51 - <el-table-column label="消息类型 1文本消息;2图文消息;" align="center" prop="msgType"/>  
52 - <el-table-column label="模板ID" align="center" prop="tplId"/>  
53 - <el-table-column label="微信账号ID" align="center" prop="wxAccountId"/>  
54 - <el-table-column label="创建时间" align="center" prop="createTime" width="180">  
55 - <template slot-scope="scope">  
56 - <span>{{ parseTime(scope.row.createTime) }}</span>  
57 - </template>  
58 - </el-table-column>  
59 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
60 - <template slot-scope="scope">  
61 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"  
62 - v-hasPermi="['wechatMp:wx-receive-text:update']">修改  
63 - </el-button>  
64 - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"  
65 - v-hasPermi="['wechatMp:wx-receive-text:delete']">删除  
66 - </el-button>  
67 - </template>  
68 - </el-table-column>  
69 - </el-table>  
70 - <!-- 分页组件 -->  
71 - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"  
72 - @pagination="getList"/>  
73 -  
74 - <!-- 对话框(添加 / 修改) -->  
75 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>  
76 - <el-form ref="form" :model="form" :rules="rules" label-width="80px">  
77 - <el-form-item label="关键字" prop="receiveText">  
78 - <el-input v-model="form.receiveText" placeholder="请输入关键字"/>  
79 - </el-form-item>  
80 - <el-form-item label="消息类型 1文本消息;2图文消息;" prop="msgType">  
81 - <el-select v-model="form.msgType" placeholder="请选择消息类型 1文本消息;2图文消息;">  
82 - <el-option label="请选择字典生成" value=""/>  
83 - </el-select>  
84 - </el-form-item>  
85 - <el-form-item label="模板ID" prop="tplId">  
86 - <el-input v-model="form.tplId" placeholder="请输入模板ID"/>  
87 - </el-form-item>  
88 - <el-form-item label="微信账号ID" prop="wxAccountId">  
89 - <el-input v-model="form.wxAccountId" placeholder="请输入微信账号ID"/>  
90 - </el-form-item>  
91 - </el-form>  
92 - <div slot="footer" class="dialog-footer">  
93 - <el-button type="primary" @click="submitForm">确 定</el-button>  
94 - <el-button @click="cancel">取 消</el-button>  
95 - </div>  
96 - </el-dialog>  
97 - </div>  
98 -</template>  
99 -  
100 -<script>  
101 - import {  
102 - createWxReceiveText,  
103 - updateWxReceiveText,  
104 - deleteWxReceiveText,  
105 - getWxReceiveText,  
106 - getWxReceiveTextPage,  
107 - exportWxReceiveTextExcel  
108 - } from "@/api/wechatMp/wxReceiveText";  
109 -  
110 - export default {  
111 - name: "WxReceiveText",  
112 - components: {},  
113 - data() {  
114 - return {  
115 - // 遮罩层  
116 - loading: true,  
117 - // 导出遮罩层  
118 - exportLoading: false,  
119 - // 显示搜索条件  
120 - showSearch: true,  
121 - // 总条数  
122 - total: 0,  
123 - // 回复关键字列表  
124 - list: [],  
125 - // 弹出层标题  
126 - title: "",  
127 - // 是否显示弹出层  
128 - open: false,  
129 - dateRangeCreateTime: [],  
130 - // 查询参数  
131 - queryParams: {  
132 - pageNo: 1,  
133 - pageSize: 10,  
134 - receiveText: null,  
135 - msgType: null,  
136 - tplId: null,  
137 - wxAccountId: null,  
138 - },  
139 - // 表单参数  
140 - form: {},  
141 - // 表单校验  
142 - rules: {}  
143 - };  
144 - },  
145 - created() {  
146 - this.getList();  
147 - },  
148 - methods: {  
149 - /** 查询列表 */  
150 - getList() {  
151 - this.loading = true;  
152 - // 处理查询参数  
153 - let params = {...this.queryParams};  
154 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
155 - // 执行查询  
156 - getWxReceiveTextPage(params).then(response => {  
157 - this.list = response.data.list;  
158 - this.total = response.data.total;  
159 - this.loading = false;  
160 - });  
161 - },  
162 - /** 取消按钮 */  
163 - cancel() {  
164 - this.open = false;  
165 - this.reset();  
166 - },  
167 - /** 表单重置 */  
168 - reset() {  
169 - this.form = {  
170 - id: undefined,  
171 - receiveText: undefined,  
172 - msgType: undefined,  
173 - tplId: undefined,  
174 - wxAccountId: undefined,  
175 - };  
176 - this.resetForm("form");  
177 - },  
178 - /** 搜索按钮操作 */  
179 - handleQuery() {  
180 - this.queryParams.pageNo = 1;  
181 - this.getList();  
182 - },  
183 - /** 重置按钮操作 */  
184 - resetQuery() {  
185 - this.dateRangeCreateTime = [];  
186 - this.resetForm("queryForm");  
187 - this.handleQuery();  
188 - },  
189 - /** 新增按钮操作 */  
190 - handleAdd() {  
191 - this.reset();  
192 - this.open = true;  
193 - this.title = "添加回复关键字";  
194 - },  
195 - /** 修改按钮操作 */  
196 - handleUpdate(row) {  
197 - this.reset();  
198 - const id = row.id;  
199 - getWxReceiveText(id).then(response => {  
200 - this.form = response.data;  
201 - this.open = true;  
202 - this.title = "修改回复关键字";  
203 - });  
204 - },  
205 - /** 提交按钮 */  
206 - submitForm() {  
207 - this.$refs["form"].validate(valid => {  
208 - if (!valid) {  
209 - return;  
210 - }  
211 - // 修改的提交  
212 - if (this.form.id != null) {  
213 - updateWxReceiveText(this.form).then(response => {  
214 - this.$modal.msgSuccess("修改成功");  
215 - this.open = false;  
216 - this.getList();  
217 - });  
218 - return;  
219 - }  
220 - // 添加的提交  
221 - createWxReceiveText(this.form).then(response => {  
222 - this.$modal.msgSuccess("新增成功");  
223 - this.open = false;  
224 - this.getList();  
225 - });  
226 - });  
227 - },  
228 - /** 删除按钮操作 */  
229 - handleDelete(row) {  
230 - const id = row.id;  
231 - this.$modal.confirm('是否确认删除回复关键字编号为"' + id + '"的数据项?').then(function () {  
232 - return deleteWxReceiveText(id);  
233 - }).then(() => {  
234 - this.getList();  
235 - this.$modal.msgSuccess("删除成功");  
236 - }).catch(() => {  
237 - });  
238 - },  
239 - /** 导出按钮操作 */  
240 - handleExport() {  
241 - // 处理查询参数  
242 - let params = {...this.queryParams};  
243 - params.pageNo = undefined;  
244 - params.pageSize = undefined;  
245 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
246 - // 执行导出  
247 - this.$modal.confirm('是否确认导出所有回复关键字数据项?').then(() => {  
248 - this.exportLoading = true;  
249 - return exportWxReceiveTextExcel(params);  
250 - }).then(response => {  
251 - this.$download.excel(response, '回复关键字.xls');  
252 - this.exportLoading = false;  
253 - }).catch(() => {  
254 - });  
255 - }  
256 - }  
257 - };  
258 -</script>  
yudao-ui-admin/src/views/wechatMp/wxSubscribeText/index.vue deleted
1 -<template>  
2 - <div class="app-container">  
3 -  
4 - <!-- 搜索工作栏 -->  
5 - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">  
6 - <el-form-item label="消息类型 1文本消息;2图文消息;" prop="msgType">  
7 - <el-select v-model="queryParams.msgType" placeholder="请选择消息类型 1文本消息;2图文消息;" clearable size="small">  
8 - <el-option label="请选择字典生成" value=""/>  
9 - </el-select>  
10 - </el-form-item>  
11 - <el-form-item label="模板ID" prop="tplId">  
12 - <el-input v-model="queryParams.tplId" placeholder="请输入模板ID" clearable @keyup.enter.native="handleQuery"/>  
13 - </el-form-item>  
14 - <el-form-item label="微信账号ID" prop="wxAccountId">  
15 - <el-input v-model="queryParams.wxAccountId" placeholder="请输入微信账号ID" clearable  
16 - @keyup.enter.native="handleQuery"/>  
17 - </el-form-item>  
18 - <el-form-item label="创建时间">  
19 - <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"  
20 - type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>  
21 - </el-form-item>  
22 - <el-form-item>  
23 - <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>  
24 - <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>  
25 - </el-form-item>  
26 - </el-form>  
27 -  
28 - <!-- 操作工具栏 -->  
29 - <el-row :gutter="10" class="mb8">  
30 - <el-col :span="1.5">  
31 - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"  
32 - v-hasPermi="['wechatMp:wx-subscribe-text:create']">新增  
33 - </el-button>  
34 - </el-col>  
35 - <el-col :span="1.5">  
36 - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"  
37 - :loading="exportLoading"  
38 - v-hasPermi="['wechatMp:wx-subscribe-text:export']">导出  
39 - </el-button>  
40 - </el-col>  
41 - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>  
42 - </el-row>  
43 -  
44 - <!-- 列表 -->  
45 - <el-table v-loading="loading" :data="list">  
46 - <el-table-column label="主键" align="center" prop="id"/>  
47 - <el-table-column label="消息类型 1文本消息;2图文消息;" align="center" prop="msgType"/>  
48 - <el-table-column label="模板ID" align="center" prop="tplId"/>  
49 - <el-table-column label="微信账号ID" align="center" prop="wxAccountId"/>  
50 - <el-table-column label="创建时间" align="center" prop="createTime" width="180">  
51 - <template slot-scope="scope">  
52 - <span>{{ parseTime(scope.row.createTime) }}</span>  
53 - </template>  
54 - </el-table-column>  
55 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
56 - <template slot-scope="scope">  
57 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"  
58 - v-hasPermi="['wechatMp:wx-subscribe-text:update']">修改  
59 - </el-button>  
60 - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"  
61 - v-hasPermi="['wechatMp:wx-subscribe-text:delete']">删除  
62 - </el-button>  
63 - </template>  
64 - </el-table-column>  
65 - </el-table>  
66 - <!-- 分页组件 -->  
67 - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"  
68 - @pagination="getList"/>  
69 -  
70 - <!-- 对话框(添加 / 修改) -->  
71 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>  
72 - <el-form ref="form" :model="form" :rules="rules" label-width="80px">  
73 - <el-form-item label="消息类型 1文本消息;2图文消息;" prop="msgType">  
74 - <el-select v-model="form.msgType" placeholder="请选择消息类型 1文本消息;2图文消息;">  
75 - <el-option label="请选择字典生成" value=""/>  
76 - </el-select>  
77 - </el-form-item>  
78 - <el-form-item label="模板ID" prop="tplId">  
79 - <el-input v-model="form.tplId" placeholder="请输入模板ID"/>  
80 - </el-form-item>  
81 - <el-form-item label="微信账号ID" prop="wxAccountId">  
82 - <el-input v-model="form.wxAccountId" placeholder="请输入微信账号ID"/>  
83 - </el-form-item>  
84 - </el-form>  
85 - <div slot="footer" class="dialog-footer">  
86 - <el-button type="primary" @click="submitForm">确 定</el-button>  
87 - <el-button @click="cancel">取 消</el-button>  
88 - </div>  
89 - </el-dialog>  
90 - </div>  
91 -</template>  
92 -  
93 -<script>  
94 - import {  
95 - createWxSubscribeText,  
96 - updateWxSubscribeText,  
97 - deleteWxSubscribeText,  
98 - getWxSubscribeText,  
99 - getWxSubscribeTextPage,  
100 - exportWxSubscribeTextExcel  
101 - } from "@/api/wechatMp/wxSubscribeText";  
102 -  
103 - export default {  
104 - name: "WxSubscribeText",  
105 - components: {},  
106 - data() {  
107 - return {  
108 - // 遮罩层  
109 - loading: true,  
110 - // 导出遮罩层  
111 - exportLoading: false,  
112 - // 显示搜索条件  
113 - showSearch: true,  
114 - // 总条数  
115 - total: 0,  
116 - // 关注欢迎语列表  
117 - list: [],  
118 - // 弹出层标题  
119 - title: "",  
120 - // 是否显示弹出层  
121 - open: false,  
122 - dateRangeCreateTime: [],  
123 - // 查询参数  
124 - queryParams: {  
125 - pageNo: 1,  
126 - pageSize: 10,  
127 - msgType: null,  
128 - tplId: null,  
129 - wxAccountId: null,  
130 - },  
131 - // 表单参数  
132 - form: {},  
133 - // 表单校验  
134 - rules: {}  
135 - };  
136 - },  
137 - created() {  
138 - this.getList();  
139 - },  
140 - methods: {  
141 - /** 查询列表 */  
142 - getList() {  
143 - this.loading = true;  
144 - // 处理查询参数  
145 - let params = {...this.queryParams};  
146 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
147 - // 执行查询  
148 - getWxSubscribeTextPage(params).then(response => {  
149 - this.list = response.data.list;  
150 - this.total = response.data.total;  
151 - this.loading = false;  
152 - });  
153 - },  
154 - /** 取消按钮 */  
155 - cancel() {  
156 - this.open = false;  
157 - this.reset();  
158 - },  
159 - /** 表单重置 */  
160 - reset() {  
161 - this.form = {  
162 - id: undefined,  
163 - msgType: undefined,  
164 - tplId: undefined,  
165 - wxAccountId: undefined,  
166 - };  
167 - this.resetForm("form");  
168 - },  
169 - /** 搜索按钮操作 */  
170 - handleQuery() {  
171 - this.queryParams.pageNo = 1;  
172 - this.getList();  
173 - },  
174 - /** 重置按钮操作 */  
175 - resetQuery() {  
176 - this.dateRangeCreateTime = [];  
177 - this.resetForm("queryForm");  
178 - this.handleQuery();  
179 - },  
180 - /** 新增按钮操作 */  
181 - handleAdd() {  
182 - this.reset();  
183 - this.open = true;  
184 - this.title = "添加关注欢迎语";  
185 - },  
186 - /** 修改按钮操作 */  
187 - handleUpdate(row) {  
188 - this.reset();  
189 - const id = row.id;  
190 - getWxSubscribeText(id).then(response => {  
191 - this.form = response.data;  
192 - this.open = true;  
193 - this.title = "修改关注欢迎语";  
194 - });  
195 - },  
196 - /** 提交按钮 */  
197 - submitForm() {  
198 - this.$refs["form"].validate(valid => {  
199 - if (!valid) {  
200 - return;  
201 - }  
202 - // 修改的提交  
203 - if (this.form.id != null) {  
204 - updateWxSubscribeText(this.form).then(response => {  
205 - this.$modal.msgSuccess("修改成功");  
206 - this.open = false;  
207 - this.getList();  
208 - });  
209 - return;  
210 - }  
211 - // 添加的提交  
212 - createWxSubscribeText(this.form).then(response => {  
213 - this.$modal.msgSuccess("新增成功");  
214 - this.open = false;  
215 - this.getList();  
216 - });  
217 - });  
218 - },  
219 - /** 删除按钮操作 */  
220 - handleDelete(row) {  
221 - const id = row.id;  
222 - this.$modal.confirm('是否确认删除关注欢迎语编号为"' + id + '"的数据项?').then(function () {  
223 - return deleteWxSubscribeText(id);  
224 - }).then(() => {  
225 - this.getList();  
226 - this.$modal.msgSuccess("删除成功");  
227 - }).catch(() => {  
228 - });  
229 - },  
230 - /** 导出按钮操作 */  
231 - handleExport() {  
232 - // 处理查询参数  
233 - let params = {...this.queryParams};  
234 - params.pageNo = undefined;  
235 - params.pageSize = undefined;  
236 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
237 - // 执行导出  
238 - this.$modal.confirm('是否确认导出所有关注欢迎语数据项?').then(() => {  
239 - this.exportLoading = true;  
240 - return exportWxSubscribeTextExcel(params);  
241 - }).then(response => {  
242 - this.$download.excel(response, '关注欢迎语.xls');  
243 - this.exportLoading = false;  
244 - }).catch(() => {  
245 - });  
246 - }  
247 - }  
248 - };  
249 -</script>  
yudao-ui-admin/src/views/wechatMp/wxTextTemplate/index.vue deleted
1 -<template>  
2 - <div class="app-container">  
3 -  
4 - <!-- 搜索工作栏 -->  
5 - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">  
6 - <el-form-item label="模板名字" prop="tplName">  
7 - <el-input v-model="queryParams.tplName" placeholder="请输入模板名字" clearable @keyup.enter.native="handleQuery"/>  
8 - </el-form-item>  
9 - <el-form-item label="创建时间">  
10 - <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"  
11 - type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>  
12 - </el-form-item>  
13 - <el-form-item>  
14 - <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>  
15 - <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>  
16 - </el-form-item>  
17 - </el-form>  
18 -  
19 - <!-- 操作工具栏 -->  
20 - <el-row :gutter="10" class="mb8">  
21 - <el-col :span="1.5">  
22 - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"  
23 - v-hasPermi="['wechatMp:wx-text-template:create']">新增  
24 - </el-button>  
25 - </el-col>  
26 - <el-col :span="1.5">  
27 - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"  
28 - :loading="exportLoading"  
29 - v-hasPermi="['wechatMp:wx-text-template:export']">导出  
30 - </el-button>  
31 - </el-col>  
32 - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>  
33 - </el-row>  
34 -  
35 - <!-- 列表 -->  
36 - <el-table v-loading="loading" :data="list">  
37 - <el-table-column label="主键" align="center" prop="id"/>  
38 - <el-table-column label="模板名字" align="center" prop="tplName"/>  
39 - <el-table-column label="模板内容" align="center" prop="content"/>  
40 - <el-table-column label="创建时间" align="center" prop="createTime" width="180">  
41 - <template slot-scope="scope">  
42 - <span>{{ parseTime(scope.row.createTime) }}</span>  
43 - </template>  
44 - </el-table-column>  
45 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
46 - <template slot-scope="scope">  
47 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"  
48 - v-hasPermi="['wechatMp:wx-text-template:update']">修改  
49 - </el-button>  
50 - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"  
51 - v-hasPermi="['wechatMp:wx-text-template:delete']">删除  
52 - </el-button>  
53 - </template>  
54 - </el-table-column>  
55 - </el-table>  
56 - <!-- 分页组件 -->  
57 - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"  
58 - @pagination="getList"/>  
59 -  
60 - <!-- 对话框(添加 / 修改) -->  
61 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>  
62 - <el-form ref="form" :model="form" :rules="rules" label-width="80px">  
63 - <el-form-item label="模板名字" prop="tplName">  
64 - <el-input v-model="form.tplName" placeholder="请输入模板名字"/>  
65 - </el-form-item>  
66 - <el-form-item label="模板内容">  
67 - <editor v-model="form.content" :min-height="192"/>  
68 - </el-form-item>  
69 - </el-form>  
70 - <div slot="footer" class="dialog-footer">  
71 - <el-button type="primary" @click="submitForm">确 定</el-button>  
72 - <el-button @click="cancel">取 消</el-button>  
73 - </div>  
74 - </el-dialog>  
75 - </div>  
76 -</template>  
77 -  
78 -<script>  
79 - import {  
80 - createWxTextTemplate,  
81 - updateWxTextTemplate,  
82 - deleteWxTextTemplate,  
83 - getWxTextTemplate,  
84 - getWxTextTemplatePage,  
85 - exportWxTextTemplateExcel  
86 - } from "@/api/wechatMp/wxTextTemplate";  
87 - import Editor from '@/components/Editor';  
88 -  
89 - export default {  
90 - name: "WxTextTemplate",  
91 - components: {  
92 - Editor,  
93 - },  
94 - data() {  
95 - return {  
96 - // 遮罩层  
97 - loading: true,  
98 - // 导出遮罩层  
99 - exportLoading: false,  
100 - // 显示搜索条件  
101 - showSearch: true,  
102 - // 总条数  
103 - total: 0,  
104 - // 文本模板列表  
105 - list: [],  
106 - // 弹出层标题  
107 - title: "",  
108 - // 是否显示弹出层  
109 - open: false,  
110 - dateRangeCreateTime: [],  
111 - // 查询参数  
112 - queryParams: {  
113 - pageNo: 1,  
114 - pageSize: 10,  
115 - tplName: null,  
116 - content: null,  
117 - },  
118 - // 表单参数  
119 - form: {},  
120 - // 表单校验  
121 - rules: {}  
122 - };  
123 - },  
124 - created() {  
125 - this.getList();  
126 - },  
127 - methods: {  
128 - /** 查询列表 */  
129 - getList() {  
130 - this.loading = true;  
131 - // 处理查询参数  
132 - let params = {...this.queryParams};  
133 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
134 - // 执行查询  
135 - getWxTextTemplatePage(params).then(response => {  
136 - this.list = response.data.list;  
137 - this.total = response.data.total;  
138 - this.loading = false;  
139 - });  
140 - },  
141 - /** 取消按钮 */  
142 - cancel() {  
143 - this.open = false;  
144 - this.reset();  
145 - },  
146 - /** 表单重置 */  
147 - reset() {  
148 - this.form = {  
149 - id: undefined,  
150 - tplName: undefined,  
151 - content: undefined,  
152 - };  
153 - this.resetForm("form");  
154 - },  
155 - /** 搜索按钮操作 */  
156 - handleQuery() {  
157 - this.queryParams.pageNo = 1;  
158 - this.getList();  
159 - },  
160 - /** 重置按钮操作 */  
161 - resetQuery() {  
162 - this.dateRangeCreateTime = [];  
163 - this.resetForm("queryForm");  
164 - this.handleQuery();  
165 - },  
166 - /** 新增按钮操作 */  
167 - handleAdd() {  
168 - this.reset();  
169 - this.open = true;  
170 - this.title = "添加文本模板";  
171 - },  
172 - /** 修改按钮操作 */  
173 - handleUpdate(row) {  
174 - this.reset();  
175 - const id = row.id;  
176 - getWxTextTemplate(id).then(response => {  
177 - this.form = response.data;  
178 - this.open = true;  
179 - this.title = "修改文本模板";  
180 - });  
181 - },  
182 - /** 提交按钮 */  
183 - submitForm() {  
184 - this.$refs["form"].validate(valid => {  
185 - if (!valid) {  
186 - return;  
187 - }  
188 - // 修改的提交  
189 - if (this.form.id != null) {  
190 - updateWxTextTemplate(this.form).then(response => {  
191 - this.$modal.msgSuccess("修改成功");  
192 - this.open = false;  
193 - this.getList();  
194 - });  
195 - return;  
196 - }  
197 - // 添加的提交  
198 - createWxTextTemplate(this.form).then(response => {  
199 - this.$modal.msgSuccess("新增成功");  
200 - this.open = false;  
201 - this.getList();  
202 - });  
203 - });  
204 - },  
205 - /** 删除按钮操作 */  
206 - handleDelete(row) {  
207 - const id = row.id;  
208 - this.$modal.confirm('是否确认删除文本模板编号为"' + id + '"的数据项?').then(function () {  
209 - return deleteWxTextTemplate(id);  
210 - }).then(() => {  
211 - this.getList();  
212 - this.$modal.msgSuccess("删除成功");  
213 - }).catch(() => {  
214 - });  
215 - },  
216 - /** 导出按钮操作 */  
217 - handleExport() {  
218 - // 处理查询参数  
219 - let params = {...this.queryParams};  
220 - params.pageNo = undefined;  
221 - params.pageSize = undefined;  
222 - this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');  
223 - // 执行导出  
224 - this.$modal.confirm('是否确认导出所有文本模板数据项?').then(() => {  
225 - this.exportLoading = true;  
226 - return exportWxTextTemplateExcel(params);  
227 - }).then(response => {  
228 - this.$download.excel(response, '文本模板.xls');  
229 - this.exportLoading = false;  
230 - }).catch(() => {  
231 - });  
232 - }  
233 - }  
234 - };  
235 -</script>