Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
		| @@ -11,13 +11,13 @@ | ||||
|             <template #content> | ||||
|               <div class="ai-form"> | ||||
|                 <el-form-item label="任务名称" prop="name" style="width: 100%;" :rules="[{ required: true, message: '请输入任务名称', trigger: 'blur' }]"> | ||||
|                   <el-input size="small" placeholder="请输入任务名称" v-model="form.name"></el-input> | ||||
|                   <el-input size="small" placeholder="请输入任务名称" v-model="form.taskTitle" :maxlength="15" show-word-limit></el-input> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="发送范围" style="width: 100%;" prop="gender"> | ||||
|                   <el-radio-group v-model="form.gender"> | ||||
|                     <el-radio label="1">全部居民群</el-radio> | ||||
|                     <el-radio label="2">按部门选择</el-radio> | ||||
|                     <el-radio label="3">按网格选择</el-radio> | ||||
|                 <el-form-item label="发送范围" style="width: 100%;" prop="sendScope"> | ||||
|                   <el-radio-group v-model="form.sendScope"> | ||||
|                     <el-radio label="0">全部居民群</el-radio> | ||||
|                     <el-radio label="1">按部门选择</el-radio> | ||||
|                     <el-radio label="2">按网格选择</el-radio> | ||||
|                   </el-radio-group> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="选择群主" prop="departmentName" style="width: 100%;" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]"> | ||||
| @@ -29,25 +29,25 @@ | ||||
|                   <div class="tips"> | ||||
|                     <p>消息预计送达居民群数:</p> | ||||
|                     <span>215</span> | ||||
|                     <i class="iconfont iconModal_Warning"></i> | ||||
|                     <el-tooltip | ||||
|                       placement="top" | ||||
|                       content="任务开始后,3天内15分钟更新1次,3天后访问页面时触发更新,1时间最多刷新1次"> | ||||
|                       <i class="iconfont iconModal_Warning"></i> | ||||
|                     </el-tooltip> | ||||
|                   </div> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="消息提醒" prop="name" style="width: 100%;" :rules="[{ required: true, message: '请输入任务名称', trigger: 'blur' }]"> | ||||
|                   <el-switch | ||||
|                     v-model="form.status" | ||||
|                     active-text="开启后,创建的群发任务需要审批人进行审批"> | ||||
|                   </el-switch> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="审批人员" prop="departmentName" style="width: 100%;" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]"> | ||||
|                   <el-input size="small" :autosize="{ minRows: 2, maxRows: 10}" placeholder="请选择..." disabled v-model="form.departmentName"> | ||||
|                     <ai-user-get slot="append" isStrictly :instance="instance" isChooseUnit> | ||||
|                       <el-button type="info">选择</el-button> | ||||
|                     </ai-user-get> | ||||
|                   </el-input> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="发送内容" prop="departmentName" style="width: 100%;" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]"> | ||||
|                   <el-input size="small" type="textarea" :rows="6" placeholder="请输入文本内容..." v-model="form.departmentName"></el-input> | ||||
|                 <el-form-item label="发送内容" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]"> | ||||
|                   <el-input size="small" type="textarea" :rows="6" placeholder="请输入文本内容..." v-model="form.content"></el-input> | ||||
|                   <div class="add"> | ||||
|                     <div class="fileList" v-if="fileList.length"> | ||||
|                       <div class="add-item" v-for="(item, index) in fileList" :key="index"> | ||||
|                         <div class="left"> | ||||
|                           <img :src="mapIcon(item.msgType)" /> | ||||
|                           <span>{{ item.name }}</span> | ||||
|                         </div> | ||||
|                         <i @click="removeFile(index)">删除</i> | ||||
|                       </div> | ||||
|                     </div> | ||||
|                     <el-popover | ||||
|                       placement="top" | ||||
|                       width="340" | ||||
| @@ -58,19 +58,52 @@ | ||||
|                         <span style="color: #2266FF; font-size: 12px;">添加附件类型</span> | ||||
|                       </div> | ||||
|                       <div class="AppAnnounceDetail-content-wrapper"> | ||||
|                         <div class="content-item"> | ||||
|                           <img src="https://cdn.cunwuyun.cn/dvcp/announce/big-img.png" /> | ||||
|                           <p>图片</p> | ||||
|                         </div> | ||||
|                         <div class="content-item"> | ||||
|                           <img src="https://cdn.cunwuyun.cn/dvcp/announce/big-video.png" /> | ||||
|                           <p>视频</p> | ||||
|                         </div> | ||||
|                         <div class="content-item"> | ||||
|                         <el-upload | ||||
|                           ref="upload" | ||||
|                           multiple | ||||
|                           :file-list="fileList" | ||||
|                           :show-file-list="false" | ||||
|                           :before-upload="v => handleChange(v, 10, '.jpg,.png,.jpeg')" | ||||
|                           :limit="9" | ||||
|                           action="/app/wxcp/upload/uploadFile" | ||||
|                           accept=".jpg,.png,.jpeg" | ||||
|                           :http-request="v => submitUpload(v, '1')"> | ||||
|                           <div class="content-item" trigger> | ||||
|                             <img src="https://cdn.cunwuyun.cn/dvcp/announce/big-img.png" /> | ||||
|                             <p>图片</p> | ||||
|                           </div> | ||||
|                         </el-upload> | ||||
|                         <el-upload | ||||
|                           ref="upload" | ||||
|                           multiple | ||||
|                           :file-list="fileList" | ||||
|                           :show-file-list="false" | ||||
|                           :before-upload="v => handleChange(v, 10, '.mp4')" | ||||
|                           :limit="9" | ||||
|                           action="/app/wxcp/upload/uploadFile" | ||||
|                           accept=".mp4" | ||||
|                           :http-request="v => submitUpload(v, '2')"> | ||||
|                           <div class="content-item" trigger> | ||||
|                             <img src="https://cdn.cunwuyun.cn/dvcp/announce/big-video.png" /> | ||||
|                             <p>视频</p> | ||||
|                           </div> | ||||
|                         </el-upload> | ||||
|                         <el-upload | ||||
|                           ref="upload" | ||||
|                           multiple | ||||
|                           :file-list="fileList" | ||||
|                           :show-file-list="false" | ||||
|                           :before-upload="v => handleChange(v, 10, '.zip、.rar、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.pdf、.txt')" | ||||
|                           :limit="9" | ||||
|                           action="/app/wxcp/upload/uploadFile" | ||||
|                           accept=".zip、.rar、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.pdf、.txt" | ||||
|                           :http-request="v => submitUpload(v, '3')"> | ||||
|                           <div class="content-item" trigger> | ||||
|                           <img src="https://cdn.cunwuyun.cn/dvcp/announce/folder.png" /> | ||||
|                           <p>文件</p> | ||||
|                         </div> | ||||
|                         <div class="content-item"> | ||||
|                             <p>文件</p> | ||||
|                           </div> | ||||
|                         </el-upload> | ||||
|                         <div class="content-item" @click="isShowAddLink = true"> | ||||
|                           <img src="https://cdn.cunwuyun.cn/dvcp/announce/site.png" /> | ||||
|                           <p>网页</p> | ||||
|                         </div> | ||||
| @@ -85,16 +118,73 @@ | ||||
|                     <em>从本地上传,图片最大支持10MB,支持JPG,PNG格式;视频最大支持10MB,支持MP4格式;文件最大支持20MB</em> | ||||
|                   </div> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="宣发审批" prop="enableExamine" style="width: 100%;" :rules="[{ required: true, message: '请输入任务名称', trigger: 'blur' }]"> | ||||
|                   <el-switch | ||||
|                     v-model="form.enableExamine" | ||||
|                     active-value="1" | ||||
|                     inactive-value="0" | ||||
|                     active-text="开启后,创建的群发任务需要审批人进行审批"> | ||||
|                   </el-switch> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item v-if="form.enableExamine === '1'" label="审批人员" prop="departmentName" style="width: 100%;" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]"> | ||||
|                   <el-input size="small" :autosize="{ minRows: 2, maxRows: 10}" placeholder="请选择..." disabled v-model="form.departmentName"> | ||||
|                     <ai-user-get slot="append" isStrictly :instance="instance" isChooseUnit> | ||||
|                       <el-button type="info">选择</el-button> | ||||
|                     </ai-user-get> | ||||
|                   </el-input> | ||||
|                 </el-form-item> | ||||
|               </div> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|         </el-form> | ||||
|         <div class="right"></div> | ||||
|         <div class="right"> | ||||
|           <img class="phone" src="https://cdn.cunwuyun.cn/dvcp/announce/phone.png" /> | ||||
|           <img class="phone-wrapper" src="https://cdn.cunwuyun.cn/dvcp/announce/phone-wrapper.png" /> | ||||
|           <div class="right-content"> | ||||
|  | ||||
|           </div> | ||||
|         </div> | ||||
|         <ai-dialog | ||||
|           :visible.sync="isShowAddLink" | ||||
|           width="920px" | ||||
|           title="链接消息" | ||||
|           @close="onClose" | ||||
|           @onConfirm="onLinkConfirm"> | ||||
|           <el-form ref="linkForm" :model="linkForm" label-width="110px" label-position="right"> | ||||
|             <div class="ai-form"> | ||||
|               <el-form-item label="标题" style="width: 100%;" prop="linkTitle" :rules="[{ required: true, message: '请输入标题', trigger: 'blur' }]"> | ||||
|                 <el-input | ||||
|                   size="small" | ||||
|                   placeholder="请输入标题" | ||||
|                   v-model="linkForm.linkTitle"> | ||||
|                 </el-input> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="链接" style="width: 100%;" prop="linkUrl" :rules="[{ required: true, message: '请输入链接', trigger: 'blur' }]"> | ||||
|                 <el-input | ||||
|                   size="small" | ||||
|                   placeholder="请输入链接" | ||||
|                   v-model="linkForm.linkUrl"> | ||||
|                 </el-input> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="描述" style="width: 100%;" prop="linkDesc" :rules="[{ required: true, message: '请输入描述', trigger: 'blur' }]"> | ||||
|                 <el-input | ||||
|                   size="small" | ||||
|                   placeholder="请输入描述" | ||||
|                   v-model="linkForm.linkDesc"> | ||||
|                 </el-input> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="封面图" prop="linkPicUrl" style="width: 100%;" :rules="[{ required: true, message: '请上传封面图', trigger: 'change' }]"> | ||||
|                 <ai-uploader :instance="instance" v-model="form.linkPicUrl" :limit="1"></ai-uploader> | ||||
|               </el-form-item> | ||||
|             </div> | ||||
|           </el-form> | ||||
|         </ai-dialog> | ||||
|       </div> | ||||
|     </template> | ||||
|     <template #footer> | ||||
|       <el-button @click="cancel">取消</el-button> | ||||
|       <el-button type="primary" @click="confirm">提交</el-button> | ||||
|       <el-button type="primary" @click="confirm" style="width: 120px;">通知成员发送</el-button> | ||||
|       <el-button type="primary" @click="confirm">定时发送</el-button> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
| @@ -110,31 +200,28 @@ | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       const validatorPhone = function (rule, value, callback) { | ||||
|         if (value === '') { | ||||
|           callback(new Error('请输入手机号')) | ||||
|         } else if (!/^1\d{10}$/.test(value)) { | ||||
|           callback(new Error('手机号格式错误')) | ||||
|         } else { | ||||
|           callback() | ||||
|         } | ||||
|       } | ||||
|       return { | ||||
|         info: {}, | ||||
|         department: [], | ||||
|         validatorPhone: validatorPhone, | ||||
|         fileList: [], | ||||
|         isShowAddLink: false, | ||||
|         linkForm: { | ||||
|           linkPicUrl: [], | ||||
|           linkDesc: '', | ||||
|           linkTitle: '', | ||||
|           linkUrl: '' | ||||
|         }, | ||||
|         form: { | ||||
|           position: '', | ||||
|           content: '', | ||||
|           choiceTime: '', | ||||
|           contents: [], | ||||
|           enableExamine: '0', | ||||
|           examines: [], | ||||
|           wxGroups: [], | ||||
|           sendScope: '0', | ||||
|           sendType: 0, | ||||
|           name: '', | ||||
|           email: '', | ||||
|           telephone: '', | ||||
|           gender: '', | ||||
|           mobile: '', | ||||
|           departmentName: '', | ||||
|           departmentIds: [], | ||||
|           tagIds: [], | ||||
|           id: '', | ||||
|           status: false | ||||
|           taskTitle: '' | ||||
|         }, | ||||
|         id: '', | ||||
|         tagsList: [] | ||||
| @@ -173,6 +260,91 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onLinkConfirm () { | ||||
|         this.$refs.linkForm.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.fileList.push({ | ||||
|               ...this.linkForm, | ||||
|               linkPicUrl: this.linkPicUrl[0].url, | ||||
|               msgType: '4' | ||||
|             }) | ||||
|  | ||||
|             this.isShowAddLink = false | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|         this.linkForm.linkPicUrl = [] | ||||
|         this.linkForm.linkDesc = '' | ||||
|         this.linkForm.linkTitle = '' | ||||
|         this.linkForm.linkUrl = '' | ||||
|       }, | ||||
|  | ||||
|       removeFile (index) { | ||||
|         this.fileList.splice(index, 1) | ||||
|       }, | ||||
|  | ||||
|       mapIcon (type) { | ||||
|         return { | ||||
|           1: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png', | ||||
|           2: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png', | ||||
|           3: 'https://cdn.cunwuyun.cn/dvcp/announce/folder.png', | ||||
|           4: 'https://cdn.cunwuyun.cn/dvcp/announce/site.png', | ||||
|           5: 'https://cdn.cunwuyun.cn/dvcp/announce/miniapp.png' | ||||
|         }[type] | ||||
|       }, | ||||
|  | ||||
|       onBeforeUpload(event) { | ||||
|         return this.onOverSize(event) | ||||
|       }, | ||||
|  | ||||
|       getExtension(name) { | ||||
|         return name.substring(name.lastIndexOf('.')) | ||||
|       }, | ||||
|  | ||||
|       handleChange (e, size, accept) { | ||||
|         const isLt10M = e.size / 1024 / 1024 < size | ||||
|         const suffixName = this.getExtension(e.name) | ||||
|         const suffixNameList = accept.split(',') | ||||
|  | ||||
|         if (suffixNameList.indexOf(`${suffixName.toLowerCase()}`) === -1) { | ||||
|           this.$message.error(`不支持该格式`) | ||||
|           return false | ||||
|         } | ||||
|  | ||||
|         if (!isLt10M) { | ||||
|           this.$message.error(`大小不超过${10}MB!`) | ||||
|           return false | ||||
|         } | ||||
|  | ||||
|         return true | ||||
|       }, | ||||
|  | ||||
|       submitUpload (file, type) { | ||||
|         const fileType = { | ||||
|           '1': 'image', | ||||
|           '2': 'video', | ||||
|           '3': 'file' | ||||
|         }[type] | ||||
|         let formData = new FormData() | ||||
|         formData.append('file', file.file) | ||||
|         formData.append('type', fileType) | ||||
|         this.instance.post(`/app/wxcp/upload/uploadFile`, formData, { | ||||
|           withCredentials: false | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.fileList.push({ | ||||
|               ...res.data.file, | ||||
|               media: res.data.media, | ||||
|               msgType: type | ||||
|             }) | ||||
|  | ||||
|             this.$message.success('上传成功') | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onChange (e) { | ||||
|         if (e.length) { | ||||
|           this.form.departmentIds = e.map(v => v.id) | ||||
| @@ -191,10 +363,6 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|         this.form.explain = '' | ||||
|       }, | ||||
|  | ||||
|       confirm () { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
| @@ -304,6 +472,35 @@ | ||||
|           font-size: 14px; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .fileList { | ||||
|         margin-bottom: 12px; | ||||
|  | ||||
|         .add-item { | ||||
|           justify-content: space-between; | ||||
|           margin-bottom: 8px; | ||||
|  | ||||
|           .left { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|           } | ||||
|  | ||||
|           i { | ||||
|             font-size: 14px; | ||||
|             cursor: pointer; | ||||
|             font-style: normal; | ||||
|             color: red; | ||||
|  | ||||
|             &:hover { | ||||
|               opacity: 0.6; | ||||
|             } | ||||
|           } | ||||
|  | ||||
|           &:last-child { | ||||
|             margin-bottom: 0; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .AppAnnounceDetail-container { | ||||
| @@ -321,10 +518,26 @@ | ||||
|       .right { | ||||
|         position: sticky; | ||||
|         top: 0; | ||||
|         width: 400px; | ||||
|         height: 688px; | ||||
|         background: url(https://cdn.cunwuyun.cn/dvcp/announce/phone.png); | ||||
|         background-size: 400px 100%; | ||||
|         width: 338px; | ||||
|         height: 675px; | ||||
|  | ||||
|         .phone { | ||||
|           position: absolute; | ||||
|           left: 14px; | ||||
|           top: 14px; | ||||
|           z-index: 1; | ||||
|           width: 310px; | ||||
|           height: 647px; | ||||
|         } | ||||
|  | ||||
|         .phone-wrapper { | ||||
|           position: absolute; | ||||
|           left: 0; | ||||
|           top: 0; | ||||
|           z-index: 2; | ||||
|           width: 338px; | ||||
|           height: 675px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
| @@ -340,7 +553,7 @@ | ||||
|       } | ||||
|  | ||||
|       i { | ||||
|         color: #c0c9db; | ||||
|         color: #8899bb; | ||||
|       } | ||||
|  | ||||
|       em { | ||||
|   | ||||
| @@ -12,32 +12,34 @@ | ||||
|         <template #left> | ||||
|           <el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">创建宣发</el-button> | ||||
|           <ai-select | ||||
|             v-model="search.confirmStatus" | ||||
|             v-model="search.status" | ||||
|             @change="search.current = 1, getList" | ||||
|             placeholder="任务状态" | ||||
|             :selectList="dict.getDict('confirmStatus')"> | ||||
|             :selectList="dict.getDict('mstStatus')"> | ||||
|           </ai-select> | ||||
|           <el-date-picker | ||||
|             v-model="search.startDate" | ||||
|             v-model="search.startTime" | ||||
|             type="date" | ||||
|             size="small" | ||||
|             value-format="yyyy-MM-DD" | ||||
|             placeholder="选择群发开始日期"> | ||||
|           </el-date-picker> | ||||
|           <el-date-picker | ||||
|             v-model="search.endDate" | ||||
|             v-model="search.endTime" | ||||
|             type="date" | ||||
|             size="small" | ||||
|             value-format="yyyy-MM-DD" | ||||
|             placeholder="选择群发结束日期"> | ||||
|           </el-date-picker> | ||||
|         </template> | ||||
|         <template slot="right"> | ||||
|           <el-input | ||||
|             v-model="search.name" | ||||
|             v-model="search.taskTitle" | ||||
|             size="small" | ||||
|             v-throttle="() => { search.current = 1, getList() }" | ||||
|             placeholder="请输入任务名称" | ||||
|             clearable | ||||
|             @clear="search.current = 1, search.name = '', getList()" | ||||
|             @clear="search.current = 1, search.taskTitle = '', getList()" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|         </template> | ||||
| @@ -86,20 +88,21 @@ export default { | ||||
|       search: { | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         name: '', | ||||
|         startDate: '', | ||||
|         endDate: '' | ||||
|         status: '', | ||||
|         taskTitle: '', | ||||
|         startTime: '', | ||||
|         endTime: '' | ||||
|       }, | ||||
|       tableData: [], | ||||
|       loading: false, | ||||
|       total: 0, | ||||
|       colConfigs: [ | ||||
|         { prop: 'position', label: '任务名称' }, | ||||
|         { prop: 'mobile', label: '群发类型' }, | ||||
|         { prop: 'position', label: '创建人' }, | ||||
|         { prop: 'mobile', label: '群发时间' }, | ||||
|         { prop: 'position', label: '状态' }, | ||||
|         { prop: 'mobile', label: '任务完成率' } | ||||
|         { prop: 'taskTitle', label: '任务名称' }, | ||||
|         { prop: 'sendType', label: '群发类型', formart: v => v === '0' ? '立即发送' : '定时发送', align: 'center' }, | ||||
|         { prop: 'createUserId', label: '创建人', openType: 'userName', align: 'center' }, | ||||
|         { prop: 'createTime', label: '群发时间', align: 'center' }, | ||||
|         { prop: 'status', label: '状态', formart: v => this.dict.getLabel('mstStatus', v), align: 'center' }, | ||||
|         { prop: 'completionRate', label: '任务完成率', align: 'center' } | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
| @@ -108,29 +111,18 @@ export default { | ||||
|     ...mapState(['user']) | ||||
|   }, | ||||
|  | ||||
|   created() { | ||||
|     this.getList() | ||||
|   created () { | ||||
|     this.dict.load('mstStatus', 'mstSendType').then(() => { | ||||
|       this.getList() | ||||
|     }) | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     removeDepart(id, parentid) { | ||||
|       this.$confirm('确定删除该数据?').then(() => { | ||||
|         this.instance.post(`/app/wxcp/wxdepartment/delete?id=${id}`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.defaultChecked = [parentid] | ||||
|             this.$message.success('删除成功!') | ||||
|             this.getTree() | ||||
|           } | ||||
|         }) | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     getList() { | ||||
|       this.loading = true | ||||
|       this.instance.post(`/app/wxcp/wxuser/list`, null, { | ||||
|       this.instance.post(`/app/appmasssendingtask/list`, null, { | ||||
|         params: { | ||||
|           ...this.search, | ||||
|           departmentId: this.tabIndex === 0 ? this.search.departmentId : '' | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res.code == 0) { | ||||
| @@ -151,7 +143,7 @@ export default { | ||||
|  | ||||
|     remove(id) { | ||||
|       this.$confirm('确定删除该数据?').then(() => { | ||||
|         this.instance.post(`/app/wxcp/wxuser/delete?id=${id}`).then(res => { | ||||
|         this.instance.post(`/app/appmasssendingtask/delete?ids=${id}`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.$message.success('删除成功!') | ||||
|             this.getList() | ||||
|   | ||||
| @@ -100,6 +100,13 @@ | ||||
|         </div> | ||||
|         <div id="departBarChart"></div> | ||||
|       </div> | ||||
|  | ||||
|       <ai-dialog :visible.sync="dialogDate" title="选择时间" width="500px" customFooter :show-close="false"> | ||||
|         <el-date-picker v-model="timeList" size="small" type="daterange" value-format="yyyy-MM-dd" | ||||
|           range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> | ||||
|         </el-date-picker> | ||||
|         <el-button slot="footer" @click="selectDete" type="primary">确认</el-button> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
| @@ -132,7 +139,8 @@ | ||||
|         dateTypeList: ['近7天', '近30天', '近1年', '自定义'], | ||||
|         departData: {}, | ||||
|         departBarChart: null, | ||||
|  | ||||
|         dialogDate: false, | ||||
|         timeList: '', | ||||
|  | ||||
|         type: '', | ||||
|       } | ||||
| @@ -188,6 +196,22 @@ | ||||
|       this.dict.load("mstSendType") | ||||
|     }, | ||||
|     methods: { | ||||
|       selectDete() { | ||||
|         console.log(this.timeList) | ||||
|         if(!this.timeList || !this.timeList.length) { | ||||
|           return this.$message.error('请选择自定义时间'); | ||||
|         } | ||||
|  | ||||
|         if(this.effectType == 3) { //宣发效果 | ||||
|           this.getEffect() | ||||
|         } | ||||
|  | ||||
|         if(this.departType == 3) { //宣发明细 | ||||
|           this.getDepart() | ||||
|         } | ||||
|  | ||||
|         this.dialogDate = false | ||||
|       }, | ||||
|       searchMonthChange() { | ||||
|         this.calendarDate = this.searchMonth + '-1' | ||||
|       }, | ||||
| @@ -204,10 +228,16 @@ | ||||
|       }, | ||||
|       changeEffectType(type) { | ||||
|         this.effectType = type | ||||
|         this.getEffect() | ||||
|         if(type == 3) { | ||||
|           this.dialogDate = true | ||||
|           this.timeList = [] | ||||
|         }else { | ||||
|           this.getEffect() | ||||
|         } | ||||
|       }, | ||||
|       getEffect() { | ||||
|         this.instance.post(`/app/appmasssendingtask/statisticsEffect?type=${this.effectType}`).then(res => { | ||||
|         var startTime = this.timeList[0] || '' , endTime = this.timeList[1] || '' | ||||
|         this.instance.post(`/app/appmasssendingtask/statisticsEffect?type=${this.effectType}&startTime=${startTime}&endTime=${endTime}`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.effectData = res.data | ||||
|             var xData = [], createData = [], executeData = [], receiveData = [] | ||||
| @@ -259,10 +289,16 @@ | ||||
|       }, | ||||
|       changeDepartType(type) { | ||||
|         this.departType = type | ||||
|         this.getDepart() | ||||
|         if(type == 3) { | ||||
|           this.dialogDate = true | ||||
|           this.timeList = [] | ||||
|         }else { | ||||
|           this.getDepart() | ||||
|         } | ||||
|       }, | ||||
|       getDepart() { // ${this.departType} | ||||
|         this.instance.post(`/app/appmasssendingtask/statisticsDepart?type=1`).then(res => { | ||||
|       getDepart() { | ||||
|         var startTime = this.timeList[0] || '' , endTime = this.timeList[1] || '' | ||||
|         this.instance.post(`/app/appmasssendingtask/statisticsDepart?type=${this.departType}&startTime=${startTime}&endTime=${endTime}`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             // this.dateList = res.data | ||||
|             // this.getTaskList(this.chooseDay) | ||||
| @@ -291,16 +327,16 @@ | ||||
|             bottom: 90, | ||||
|             containLabel: true | ||||
|           }, | ||||
|           toolbox: { | ||||
|             feature: { | ||||
|               dataZoom: { | ||||
|                 yAxisIndex: false | ||||
|               }, | ||||
|               saveAsImage: { | ||||
|                 pixelRatio: 2 | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|           // toolbox: { | ||||
|           //   feature: { | ||||
|           //     dataZoom: { | ||||
|           //       yAxisIndex: false | ||||
|           //     }, | ||||
|           //     saveAsImage: { | ||||
|           //       pixelRatio: 2 | ||||
|           //     } | ||||
|           //   } | ||||
|           // }, | ||||
|           tooltip: { | ||||
|             trigger: 'axis', | ||||
|             axisPointer: { | ||||
| @@ -501,6 +537,7 @@ | ||||
|           border: 1px solid #D0D4DC; | ||||
|           margin-right: 8px; | ||||
|           box-sizing: border-box; | ||||
|           cursor: pointer; | ||||
|         } | ||||
|         .active{ | ||||
|           border: 1px solid #26f; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user