协同宣发
This commit is contained in:
		| @@ -75,7 +75,7 @@ | ||||
|                     </div> | ||||
|                     <el-popover | ||||
|                       placement="top" | ||||
|                       width="280" | ||||
|                       width="200" | ||||
|                       offset="0" | ||||
|                       trigger="hover"> | ||||
|                       <div class="add-item" slot="reference" style="width: max-content;"> | ||||
| @@ -115,22 +115,6 @@ | ||||
|                             <p>视频</p> | ||||
|                           </div> | ||||
|                         </el-upload> | ||||
|                         <el-upload | ||||
|                           ref="upload" | ||||
|                           multiple | ||||
|                           :file-list="fileList" | ||||
|                           :show-file-list="false" | ||||
|                           :before-upload="v => handleChange(v, 20, '.zip,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.txt')" | ||||
|                           :limit="9" | ||||
|                           :on-exceed="onExceed" | ||||
|                           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> | ||||
|                         </el-upload> | ||||
|                         <div class="content-item" @click="isShowAddLink = true"> | ||||
|                           <img src="https://cdn.cunwuyun.cn/dvcp/announce/site.png"/> | ||||
|                           <p>网页</p> | ||||
| @@ -150,18 +134,18 @@ | ||||
|                     active-text="开启后,创建的群发任务需要审批人进行审批"> | ||||
|                   </el-switch> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item v-if="form.enableExamine === '1'" label="审批人员" prop="examineList" style="width: 100%;" :rules="[{ required: true, message: '请选择审批人员', trigger: 'change' }]"> | ||||
|                   <ai-wechat-selecter :instance="instance" v-model="form.examineList" @change="onUserChange"> | ||||
|                 <el-form-item v-if="form.enableExamine === '1'" label="审批人员" prop="examines" style="width: 100%;" :rules="[{ required: true, message: '请选择审批人员', trigger: 'change' }]"> | ||||
|                   <ai-wechat-selecter :instance="instance" v-model="form.examines" @change="onUserChange"> | ||||
|                     <div class="AppAnnounceDetail-select"> | ||||
|                       <el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.examinesName"></el-input> | ||||
|                       <div class="select-left" v-if="form.examineList.length"> | ||||
|                         <span v-for="(item, index) in form.examineList" :key="index">{{ item.name }}</span> | ||||
|                       <div class="select-left" v-if="form.examines.length"> | ||||
|                         <span v-for="(item, index) in form.examines" :key="index">{{ item.name }}</span> | ||||
|                       </div> | ||||
|                       <i v-if="!form.examineList.length">请选择</i> | ||||
|                         <div class="select-right">{{ form.examineList.length ? '重新选择' : '选择' }}</div> | ||||
|                       <i v-if="!form.examines.length">请选择</i> | ||||
|                         <div class="select-right">{{ form.examines.length ? '重新选择' : '选择' }}</div> | ||||
|                     </div> | ||||
|                   </ai-wechat-selecter> | ||||
|                 </el-form-item> | ||||
|                 </el-form-item>`` | ||||
|               </div> | ||||
|             </template> | ||||
|           </ai-card> | ||||
| @@ -309,7 +293,7 @@ export default { | ||||
|         choiceTime: '', | ||||
|         contents: [], | ||||
|         enableExamine: '0', | ||||
|         examineList: [], | ||||
|         examines: [], | ||||
|         executorList: [], | ||||
|         wxGroupsName: '', | ||||
|         sendScope: '0', | ||||
| @@ -381,7 +365,7 @@ export default { | ||||
|     }, | ||||
|  | ||||
|     getInfo(id) { | ||||
|       this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => { | ||||
|       this.instance.post(`/app/whchatmomentstask/customerTasKDetail?id=${id}`).then(res => { | ||||
|         if (res.code === 0) { | ||||
|           this.form = { | ||||
|             ...this.form, | ||||
| @@ -396,8 +380,8 @@ export default { | ||||
|  | ||||
|           this.dateForm.choiceTime = '' | ||||
|  | ||||
|           if (res.data.examineList && res.data.examineList.length) { | ||||
|             this.form.examineList = res.data.examineList.map(v => { | ||||
|           if (res.data.examines && res.data.examines.length) { | ||||
|             this.form.examines = res.data.examines.map(v => { | ||||
|               return { | ||||
|                 ...v, | ||||
|                 wxOpenUserId: v.examineUserId, | ||||
| @@ -480,6 +464,11 @@ export default { | ||||
|     onLinkConfirm() { | ||||
|       this.$refs.linkForm.validate((valid) => { | ||||
|         if (valid) { | ||||
|           if (this.fileList.length) { | ||||
|             this.$message.error('最多支持9张图片,或1个视频,或1个链接') | ||||
|             return false | ||||
|           } | ||||
|  | ||||
|           this.fileList.push({ | ||||
|             ...this.linkForm, | ||||
|             linkPicUrl: this.linkForm.linkPicUrl.length ? this.linkForm.linkPicUrl[0].url : '', | ||||
| @@ -524,6 +513,16 @@ export default { | ||||
|     }, | ||||
|  | ||||
|     handleChange(e, size, accept) { | ||||
|       if (accept === '.mp4' && this.fileList.length) { | ||||
|         this.$message.error('最多支持9张图片,或1个视频,或1个链接') | ||||
|         return false | ||||
|       } | ||||
|  | ||||
|       if (accept !== '.mp4' && (this.fileList.map(v => v.msgType).indexOf('2') !== -1 || this.fileList.map(v => v.msgType).indexOf('4') !== -1) ) { | ||||
|         this.$message.error('最多支持9张图片,或1个视频,或1个链接') | ||||
|         return false | ||||
|       } | ||||
|  | ||||
|       const isLt10M = e.size / 1024 / 1024 < size | ||||
|       const suffixName = this.getExtension(e.name) | ||||
|       const suffixNameList = accept.split(',') | ||||
| @@ -611,33 +610,17 @@ export default { | ||||
|             this.isLoading2 = true | ||||
|           } | ||||
|  | ||||
|           console.log({ | ||||
|             ...this.form, | ||||
|             id: this.params.id, | ||||
|             executorList: this.form.executorList, | ||||
|             contents, | ||||
|             sendType, | ||||
|             filterTags: this.form.filterTags.map(v => v.id).join(','), | ||||
|             choiceTime: this.dateForm.choiceTime, | ||||
|             filterCriteria: this.form.filterCriteria.join(','), | ||||
|             examineList: this.form.examineList.length ? this.form.examineList.map(v => { | ||||
|               return { | ||||
|                 ...v, | ||||
|                 examineUserId: v.id, | ||||
|                 examineUserName: v.name | ||||
|               } | ||||
|             }) : [] | ||||
|           }) | ||||
|           this.instance.post(`/app/whchatmomentstask/addOrUpdate`, { | ||||
|             ...this.form, | ||||
|             id: this.params.id, | ||||
|             executorList: this.form.executorList, | ||||
|             contents, | ||||
|             sendType, | ||||
|             taskType: 0, | ||||
|             filterTags: this.form.filterTags.map(v => v.id).join(','), | ||||
|             choiceTime: this.dateForm.choiceTime, | ||||
|             filterCriteria: this.form.filterCriteria.join(','), | ||||
|             examineList: this.form.examineList.length ? this.form.examineList.map(v => { | ||||
|             examines: this.form.examines.length ? this.form.examines.map(v => { | ||||
|               return { | ||||
|                 ...v, | ||||
|                 examineUserId: v.id, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user