bug
This commit is contained in:
		| @@ -113,6 +113,13 @@ | ||||
|                     <el-radio-button size="small" label="1">已执行</el-radio-button> | ||||
|                     <el-radio-button size="small" label="2">无法执行</el-radio-button> | ||||
|                   </el-radio-group> | ||||
|                   <div class="userSelcet" placeholder="请选择创建人"> | ||||
|                     <span v-if="search1.deptartId"><ai-open-data type="departmentName" :openid="search1.deptartId"></ai-open-data></span> | ||||
|                     <span v-else>请选择</span> | ||||
|                     <ai-user-get :instance="instance" @change="e => onUserChange(e, 'search1')" isChooseUnit :isMultiple="false" v-model="user1"> | ||||
|                       <div class="select-btn">选择</div> | ||||
|                     </ai-user-get> | ||||
|                   </div> | ||||
|                 </div> | ||||
|                 <el-button type="primary" @click="sendMsg(0)">提醒成员发送</el-button> | ||||
|               </div> | ||||
| @@ -125,7 +132,7 @@ | ||||
|                 :current.sync="search1.current" | ||||
|                 :size.sync="search1.size" | ||||
|                 @getList="getMemberInfo"> | ||||
|                 <el-table-column slot="user" label="成员" align="center"> | ||||
|                 <el-table-column slot="user" label="成员" align="left"> | ||||
|                   <template slot-scope="{ row }"> | ||||
|                     <div class="userinfo"> | ||||
|                       <span> | ||||
| @@ -175,6 +182,13 @@ | ||||
|                     <el-radio-button size="small" label="1">已执行</el-radio-button> | ||||
|                     <el-radio-button size="small" label="2">无法执行</el-radio-button> | ||||
|                   </el-radio-group> | ||||
|                   <div class="userSelcet" placeholder="请选择创建人"> | ||||
|                     <span v-if="search2.deptartId"><ai-open-data type="departmentName" :openid="search2.deptartId"></ai-open-data></span> | ||||
|                     <span v-else>请选择</span> | ||||
|                     <ai-user-get :instance="instance"  @change="e => onUserChange(e, 'search2')" isChooseUnit :isMultiple="false" v-model="user2"> | ||||
|                       <div class="select-btn">选择</div> | ||||
|                     </ai-user-get> | ||||
|                   </div> | ||||
|                 </div> | ||||
|                 <el-button type="primary" @click="sendMsg(1)">提醒成员发送</el-button> | ||||
|               </div> | ||||
| @@ -222,6 +236,8 @@ | ||||
|       return { | ||||
|         total1: 0, | ||||
|         total2: 0, | ||||
|         user1: [], | ||||
|         user2: [], | ||||
|         radio1: '未执行', | ||||
|         search1: { | ||||
|           current: 1, | ||||
| @@ -279,7 +295,22 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       sendMsg (type) { | ||||
|       onUserChange (e, search) { | ||||
|         if (e.length) { | ||||
|           this[search].deptartId = e[0].id | ||||
|         } else { | ||||
|           this[search].deptartId = '' | ||||
|         } | ||||
|  | ||||
|         this[search].current = 1 | ||||
|         if (search === 'search1') { | ||||
|           this.getMemberInfo() | ||||
|         } else { | ||||
|           this.getGroupInfo() | ||||
|         } | ||||
|       }, | ||||
|  | ||||
|       sendMsg () { | ||||
|         this.instance.post(`/app/appmasssendingtask/remindSend?id=${this.params.id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.$message.success('提醒成功') | ||||
| @@ -364,6 +395,38 @@ | ||||
|       flex-wrap: wrap; | ||||
|     } | ||||
|  | ||||
|     .userSelcet { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       height: 32px; | ||||
|       line-height: 32px; | ||||
|       margin-left: 12px; | ||||
|       border-radius: 4px; | ||||
|       border: 1px solid #d0d4dc; | ||||
|       overflow: hidden; | ||||
|  | ||||
|       .select-btn { | ||||
|         width: 40px; | ||||
|         cursor: pointer; | ||||
|         text-align: center; | ||||
|         border-left: 1px solid #d0d4dc; | ||||
|         color: #666; | ||||
|         font-size: 12px; | ||||
|  | ||||
|         &:hover { | ||||
|           color: #2266FF; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       span { | ||||
|         width: 200px; | ||||
|         padding: 0 15px; | ||||
|         font-size: 12px; | ||||
|         background: #F5F5F5; | ||||
|         color: #999; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .userinfo { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
| @@ -553,6 +616,11 @@ | ||||
|         align-items: center; | ||||
|         justify-content: space-between; | ||||
|         margin-bottom: 16px; | ||||
|  | ||||
|         .left { | ||||
|           display: flex; | ||||
|           align-items: center; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -33,6 +33,13 @@ | ||||
|             @change="search.current = 1, getList()" | ||||
|             placeholder="选择群发结束日期"> | ||||
|           </el-date-picker> | ||||
|           <div class="userSelcet" placeholder="请选择创建人"> | ||||
|             <span v-if="search.createUserId"><ai-open-data type="userName" :openid="search.createUserId"></ai-open-data></span> | ||||
|             <span v-else>请选择</span> | ||||
|             <ai-user-get isStrictly :instance="instance" @change="onUserChange" :isMultiple="false" v-model="user"> | ||||
|               <div class="select-btn">选择</div> | ||||
|             </ai-user-get> | ||||
|           </div> | ||||
|         </template> | ||||
|         <template slot="right"> | ||||
|           <el-input | ||||
| @@ -82,104 +89,111 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex' | ||||
|   export default { | ||||
|     name: 'List', | ||||
|  | ||||
| export default { | ||||
|   name: 'List', | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object | ||||
|   }, | ||||
|     data() { | ||||
|       return { | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           status: '', | ||||
|           createUserId: '', | ||||
|           taskTitle: '', | ||||
|           startTime: '', | ||||
|           endTime: '' | ||||
|         }, | ||||
|         user: [], | ||||
|         tableData: [], | ||||
|         loading: false, | ||||
|         total: 0, | ||||
|         colConfigs: [ | ||||
|           { prop: 'taskTitle', label: '任务名称' }, | ||||
|           { prop: 'sendType', label: '群发类型', formart: v => v === '0' ? '立即发送' : '定时发送', align: 'center' }, | ||||
|           { slot: 'user', 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' } | ||||
|         ] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       search: { | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         status: '', | ||||
|         taskTitle: '', | ||||
|         startTime: '', | ||||
|         endTime: '' | ||||
|       }, | ||||
|       tableData: [], | ||||
|       loading: false, | ||||
|       total: 0, | ||||
|       colConfigs: [ | ||||
|         { prop: 'taskTitle', label: '任务名称' }, | ||||
|         { prop: 'sendType', label: '群发类型', formart: v => v === '0' ? '立即发送' : '定时发送', align: 'center' }, | ||||
|         { slot: 'user', 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' } | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|  | ||||
|   computed: { | ||||
|     ...mapState(['user']) | ||||
|   }, | ||||
|  | ||||
|   created () { | ||||
|     this.dict.load('mstStatus', 'mstSendType').then(() => { | ||||
|       this.getList() | ||||
|     }) | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.loading = true | ||||
|       this.instance.post(`/app/appmasssendingtask/list`, null, { | ||||
|         params: { | ||||
|           ...this.search, | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.tableData = res.data.records | ||||
|           this.total = res.data.total | ||||
|  | ||||
|           this.$nextTick(() => { | ||||
|             this.loading = false | ||||
|             this.$store.dispatch('initOpenData') | ||||
|           }) | ||||
|         } else { | ||||
|           this.loading = false | ||||
|         } | ||||
|       }).catch(() => { | ||||
|         this.loading = false | ||||
|     created () { | ||||
|       this.dict.load('mstStatus', 'mstSendType').then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     remove(id) { | ||||
|       this.$confirm('确定删除该数据?').then(() => { | ||||
|         this.instance.post(`/app/appmasssendingtask/delete?ids=${id}`).then(res => { | ||||
|     methods: { | ||||
|       onUserChange (e) { | ||||
|         if (e.length) { | ||||
|           this.search.createUserId = e[0].wxOpenUserId | ||||
|         } else { | ||||
|           this.search.createUserId = '' | ||||
|         } | ||||
|  | ||||
|         this.search.current = 1 | ||||
|         this.getList() | ||||
|       }, | ||||
|  | ||||
|       getList() { | ||||
|         this.loading = true | ||||
|         this.instance.post(`/app/appmasssendingtask/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.$message.success('删除成功!') | ||||
|             this.getList() | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|  | ||||
|             this.$nextTick(() => { | ||||
|               this.loading = false | ||||
|               this.$store.dispatch('initOpenData') | ||||
|             }) | ||||
|           } else { | ||||
|             this.loading = false | ||||
|           } | ||||
|         }).catch(() => { | ||||
|           this.loading = false | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       remove(id) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appmasssendingtask/delete?ids=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toAdd(id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Add', | ||||
|           params: { | ||||
|             id | ||||
|           } | ||||
|         }) | ||||
|       }) | ||||
|     }, | ||||
|       }, | ||||
|  | ||||
|     toAdd(id) { | ||||
|       this.$emit('change', { | ||||
|         type: 'Add', | ||||
|         params: { | ||||
|           id | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     toDetail (id) { | ||||
|       this.$emit('change', { | ||||
|         type: 'Detail', | ||||
|         params: { | ||||
|           id | ||||
|         } | ||||
|       }) | ||||
|       toDetail (id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Detail', | ||||
|           params: { | ||||
|             id | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| @@ -196,5 +210,36 @@ export default { | ||||
|         margin-bottom: 4px; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .userSelcet { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       height: 32px; | ||||
|       line-height: 32px; | ||||
|       border-radius: 4px; | ||||
|       border: 1px solid #d0d4dc; | ||||
|       overflow: hidden; | ||||
|  | ||||
|       .select-btn { | ||||
|         width: 40px; | ||||
|         cursor: pointer; | ||||
|         text-align: center; | ||||
|         border-left: 1px solid #d0d4dc; | ||||
|         color: #666; | ||||
|         font-size: 12px; | ||||
|  | ||||
|         &:hover { | ||||
|           color: #2266FF; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       span { | ||||
|         width: 200px; | ||||
|         padding: 0 15px; | ||||
|         font-size: 12px; | ||||
|         background: #F5F5F5; | ||||
|         color: #999; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </style> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user