积分规则
This commit is contained in:
		| @@ -22,17 +22,43 @@ | ||||
|               <span>{{ row.integral > 0 ? "+" : "" }}{{ row.integral }}</span> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="options" label="操作" align="center" fixed="right" width="100"> | ||||
|           <el-table-column slot="options" label="操作" align="center" fixed="right" width="160"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <div class="table-options"> | ||||
|                 <el-button type="text" @click="changeStatus(row.id, row.status)" v-if="row.status == 1">停用</el-button> | ||||
|                 <el-button type="text" @click="changeStatus(row.id, row.status)" v-else>启用</el-button> | ||||
|                 <el-button type="text" @click="set(row)" v-if="row.type == 11 || row.type == 12 || row.type == 13 ">配置</el-button> | ||||
|               </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <ai-dialog title="配置成员" :visible.sync="dialog" :destroyOnClose="true" customFooter width="720px"> | ||||
|       <ai-wrapper label-width="120px" v-if="!isSetEdit"> | ||||
|         <ai-info-item label="成员" isLine> | ||||
|           <span v-for="(item, index) in chooseUserList" :key="index"> | ||||
|             <span>{{item.name}}</span> | ||||
|             <span v-if="index < chooseUserList.length-1">,</span> | ||||
|           </span> | ||||
|         </ai-info-item> | ||||
|       </ai-wrapper> | ||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px" v-else> | ||||
|         <el-form-item label="选择人员" prop="ids"> | ||||
|           <ai-person-select :instance="instance" :customClicker="true" :chooseUserList="chooseUserList" | ||||
|               url="/app/wxcp/wxuser/list" headerTitle="人员列表" | ||||
|               :isMultiple="true" dialogTitle="选择" @selectPerson="selectPerson" class="aipersonselect"> | ||||
|             <template name="option" v-slot:option="{ item }"> | ||||
|               <span class="iconfont iconProlife">{{ item.name }}</span> | ||||
|             </template> | ||||
|           </ai-person-select> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|       <template #footer> | ||||
|         <el-button type="primary" @click="isSetEdit=true"  v-if="!isSetEdit">编辑</el-button> | ||||
|         <el-button type="primary" @click="setConfirm" v-else>保存</el-button> | ||||
|       </template> | ||||
|     </ai-dialog> | ||||
|     <!-- <ai-empty v-else>暂无应用权限</ai-empty> --> | ||||
|   </section> | ||||
| </template> | ||||
| @@ -78,6 +104,11 @@ export default { | ||||
|         {slot: "options", label: "操作", align: "center", width: 100}, | ||||
|       ], | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       setInfo: {}, | ||||
|       isSetEdit: false, | ||||
|       chooseUserList: [], | ||||
|       personList: [] | ||||
|     }; | ||||
|   }, | ||||
|   created() { | ||||
| @@ -87,14 +118,12 @@ export default { | ||||
|   }, | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.instance | ||||
|       .post(`/app/appscorerule/list`, null, { | ||||
|       this.instance.post(`/app/appscorerule/list`, null, { | ||||
|         params: { | ||||
|           ...this.search, | ||||
|           ...this.page, | ||||
|         }, | ||||
|       }) | ||||
|       .then((res) => { | ||||
|       }).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data.records; | ||||
|           this.page.total = res.data.total; | ||||
| @@ -112,6 +141,42 @@ export default { | ||||
|         }); | ||||
|       }); | ||||
|     }, | ||||
|     set(row) { | ||||
|       this.chooseUserList = [] | ||||
|       this.instance.post(`/app/appscorerule/queryDetailById?id=${row.id}`).then((res) => { | ||||
|         if (res?.data) { | ||||
|           if(res.data.massSendingConfigs && res.data.massSendingConfigs.length) { | ||||
|             this.chooseUserList = res.data.massSendingConfigs | ||||
|           } | ||||
|         } | ||||
|       }); | ||||
|       this.dialog = true | ||||
|       this.setInfo = {...row} | ||||
|     }, | ||||
|     selectPerson(val) { | ||||
|       console.log(val) | ||||
|       if (val) { | ||||
|         this.personList = val | ||||
|       } else { | ||||
|         this.personList = this.chooseUserList | ||||
|       } | ||||
|     }, | ||||
|     setConfirm() { | ||||
|       if(!this.personList.length) { | ||||
|         return this.$message.error("请选择成员!") | ||||
|       } | ||||
|       var params = { | ||||
|         id: this.setInfo.id, | ||||
|         massSendingConfigs: this.personList, | ||||
|       } | ||||
|       this.instance.post(`/app/appscorerule/editMassSendingConfig`, params).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.dialog = false | ||||
|           this.$message.success(`配置成功!`); | ||||
|           this.getList(); | ||||
|         } | ||||
|       }); | ||||
|     } | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|   | ||||
| @@ -111,9 +111,9 @@ export default { | ||||
|   methods: { | ||||
|     // 详情 | ||||
|     getDetail() { | ||||
|       this.instance.post(`/app/appscoredetail/queryDetailById`, null, { | ||||
|       this.instance.post(`/app/appscoredetail/userInfo`, null, { | ||||
|         params: { | ||||
|           id: this.params.id | ||||
|           sysUserId: this.params.id | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
| @@ -128,10 +128,9 @@ export default { | ||||
|     getEventSummary() { | ||||
|       this.instance.post(`/app/appscoredetail/detailTypeStatistics`, null, { | ||||
|         params: { | ||||
|           id: this.params.id, | ||||
|           startTime: this.startTime, | ||||
|           endTime: this.endTime, | ||||
|           sysUserId: this.data.sysUserId | ||||
|           sysUserId: this.data.id | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
| @@ -148,8 +147,7 @@ export default { | ||||
|         params: { | ||||
|           ...this.search,  //积分类型 | ||||
|           total: this.total, | ||||
|           id: this.params.id, | ||||
|           sysUserId: this.data.sysUserId | ||||
|           sysUserId: this.data.id | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|   | ||||
| @@ -125,9 +125,9 @@ export default { | ||||
|       return [ | ||||
|         { prop: "name", label: '姓名', align: "left"}, | ||||
|         { prop: "departName", label: '所属部门' }, | ||||
|         { prop: "nowScore", label: '积分余额', align: "center" }, | ||||
|         { prop: "score", label: '积分余额', align: "center" }, | ||||
|         // { prop: "totalIntegral", label: '累计积分', align: "center", sortable: "custom" }, | ||||
|         { prop: "usedIntegral", label: '已用积分', align: "center"  }, | ||||
|         { prop: "usedScore", label: '已用积分', align: "center"  }, | ||||
|         { slot: "options" }, | ||||
|       ] | ||||
|     }, | ||||
| @@ -143,7 +143,7 @@ export default { | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post(`/app/appscoredetail/list`,null,{ | ||||
|       this.instance.post(`/app/appscoredetail/userList`,null,{ | ||||
|         params: { | ||||
|           ...this.search, | ||||
|           current: this.current, | ||||
| @@ -172,7 +172,7 @@ export default { | ||||
|         this.dialog = true | ||||
|       } else if(type ==1) { | ||||
|         this.chooseUserList = [{ | ||||
|           sysUserId: row.sysUserId, | ||||
|           sysUserId: row.id, | ||||
|           name: row.name | ||||
|         }] | ||||
|         this.form.ids = this.chooseUserList.map(e => e.sysUserId) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user