网格员积分
This commit is contained in:
		| @@ -19,18 +19,18 @@ | |||||||
|           </template> |           </template> | ||||||
|         </ai-search-bar> |         </ai-search-bar> | ||||||
|         <ai-table :tableData="tableData" :total="page.total" :current.sync="current" :size.sync="page.size" |         <ai-table :tableData="tableData" :total="page.total" :current.sync="current" :size.sync="page.size" | ||||||
|                   @getList="getTableData()" :col-configs="colConfigs" :dict="dict"> |                   @getList="getTableData()" :col-configs="colConfigs" :dict="dict" @sort-change="changeTableSort"> | ||||||
|           <el-table-column slot="integral" label="积分余额" align="center" :sortable="'custom'"> |           <el-table-column slot="integral" label="积分余额" align="center" prop="integral" :sortable="'custom'"> | ||||||
|             <template slot-scope="{ row }"> |             <template slot-scope="{ row }"> | ||||||
|               <span>{{ row.integral }}</span> |               <span>{{ row.integral }}</span> | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column slot="totalIntegral" label="累计积分" align="center" :sortable="'custom'"> |           <el-table-column slot="totalIntegral" label="累计积分" align="center" prop="totalIntegral" :sortable="'custom'"> | ||||||
|             <template slot-scope="{ row }"> |             <template slot-scope="{ row }"> | ||||||
|               <span>{{ row.totalIntegral }}</span> |               <span>{{ row.totalIntegral }}</span> | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column slot="usedIntegral" label="已用积分" align="center" :sortable="'custom'"> |           <el-table-column slot="usedIntegral" label="已用积分" align="center" prop="usedIntegral" :sortable="'custom'"> | ||||||
|             <template slot-scope="{ row }"> |             <template slot-scope="{ row }"> | ||||||
|               <span>{{ row.usedIntegral }}</span> |               <span>{{ row.usedIntegral }}</span> | ||||||
|             </template> |             </template> | ||||||
| @@ -153,7 +153,8 @@ export default { | |||||||
|         params: { |         params: { | ||||||
|           ...this.page, |           ...this.page, | ||||||
|           ...this.search, |           ...this.search, | ||||||
|           current: this.current |           current: this.current, | ||||||
|  |            | ||||||
|         } |         } | ||||||
|       }).then(res => { |       }).then(res => { | ||||||
|         if(res?.data) { |         if(res?.data) { | ||||||
| @@ -209,6 +210,24 @@ export default { | |||||||
|       this.getTableData() |       this.getTableData() | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|  |     changeTableSort(col) { | ||||||
|  |       // console.log(col); | ||||||
|  |       if(col.prop === 'integral') { // 剩余积分 | ||||||
|  |         // col.order === 'ascending' && | ||||||
|  |         // col.order === 'descending' && | ||||||
|  |         // col.order === null && | ||||||
|  |       } else if(col.prop === 'totalIntegral') {  // 累计积分 | ||||||
|  |         // col.order === 'ascending' && | ||||||
|  |         // col.order === 'descending' && | ||||||
|  |         // col.order === null && | ||||||
|  |       } else if(col.prop === 'usedIntegral') {  // 已用积分 | ||||||
|  |         // col.order === 'ascending' && | ||||||
|  |         // col.order === 'descending' && | ||||||
|  |         // col.order === null && | ||||||
|  |       } | ||||||
|  |       // this.getTableData() | ||||||
|  |     }, | ||||||
|  |  | ||||||
|     onConfirm() { |     onConfirm() { | ||||||
|       if(this.form.file?.length) { |       if(this.form.file?.length) { | ||||||
|         this.form.enclosure = this.form.file[0].url |         this.form.enclosure = this.form.file[0].url | ||||||
|   | |||||||
| @@ -6,77 +6,26 @@ | |||||||
|       <template slot="content"> |       <template slot="content"> | ||||||
|         <ai-search-bar> |         <ai-search-bar> | ||||||
|           <template #left> |           <template #left> | ||||||
|             <el-button |             <el-button type="primary" icon="iconfont iconAdd" @click="dialog = true" >添加</el-button> | ||||||
|               type="primary" |             <el-cascader size="small" v-model="search.systemRuleId" :options="rulesOps" placeholder="请选择事件/类型" clearable :props="rulesProps" @change="handleTypeSearch" ref="eventTypeSearch"/> | ||||||
|               icon="iconfont iconAdd" |             <ai-select v-model="search.status" @change="(page.current = 1), getList()" placeholder="请选择状态" :selectList="$dict.getDict('integralRuleStatus')"> | ||||||
|               @click="dialog = true" |  | ||||||
|               >添加</el-button |  | ||||||
|             > |  | ||||||
|             <el-cascader |  | ||||||
|               size="small" |  | ||||||
|               v-model="search.systemRuleId" |  | ||||||
|               :options="rulesOps" |  | ||||||
|               placeholder="请选择事件/类型" |  | ||||||
|               clearable |  | ||||||
|               :props="rulesProps" |  | ||||||
|               @change="handleTypeSearch" |  | ||||||
|               ref="eventTypeSearch" |  | ||||||
|             /> |  | ||||||
|             <ai-select |  | ||||||
|               v-model="search.status" |  | ||||||
|               @change="(page.current = 1), getList()" |  | ||||||
|               placeholder="请选择状态" |  | ||||||
|               :selectList="$dict.getDict('integralRuleStatus')" |  | ||||||
|             > |  | ||||||
|             </ai-select> |             </ai-select> | ||||||
|           </template> |           </template> | ||||||
|         </ai-search-bar> |         </ai-search-bar> | ||||||
|         <ai-table |         <ai-table :tableData="tableData" :col-configs="colConfigs" :total="page.total" :dict="dict" :current.sync="page.current" :size.sync="page.size" @getList="getList()"> | ||||||
|           :tableData="tableData" |  | ||||||
|           :col-configs="colConfigs" |  | ||||||
|           :total="page.total" |  | ||||||
|           :dict="dict" |  | ||||||
|           :current.sync="page.current" |  | ||||||
|           :size.sync="page.size" |  | ||||||
|           @getList="getList()" |  | ||||||
|         > |  | ||||||
|           <el-table-column slot="integral" label="分值" align="center"> |           <el-table-column slot="integral" label="分值" align="center"> | ||||||
|             <template slot-scope="{ row }"> |             <template slot-scope="{ row }"> | ||||||
|               <span v-if="row.integralValueType == 1"> |               <span v-if="row.integralValueType == 1"> | ||||||
|                 {{ |                 {{row.integralStart > 0? "+" + row.integralStart : row.integralStart}}~{{row.integralEnd > 0 ? "+" + row.integralEnd : row.integralEnd}} | ||||||
|                   row.integralStart > 0 |  | ||||||
|                     ? "+" + row.integralStart |  | ||||||
|                     : row.integralStart |  | ||||||
|                 }} |  | ||||||
|                 ~ |  | ||||||
|                 {{ |  | ||||||
|                   row.integralEnd > 0 ? "+" + row.integralEnd : row.integralEnd |  | ||||||
|                 }} |  | ||||||
|               </span> |               </span> | ||||||
|               <span v-else |               <span v-else>{{ row.integral > 0 ? "+" : "" }}{{ row.integral }}</span> | ||||||
|                 >{{ row.integral > 0 ? "+" : "" }}{{ row.integral }}</span |  | ||||||
|               > |  | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column |           <el-table-column slot="options" label="操作" align="center" fixed="right" width="200"> | ||||||
|             slot="options" |  | ||||||
|             label="操作" |  | ||||||
|             align="center" |  | ||||||
|             fixed="right" |  | ||||||
|             width="200" |  | ||||||
|           > |  | ||||||
|             <template slot-scope="{ row }"> |             <template slot-scope="{ row }"> | ||||||
|               <div class="table-options"> |               <div class="table-options"> | ||||||
|                 <el-button |                 <el-button type="text" @click="changeStatus(row.id, 0)" v-if="row.status == 1">停用</el-button> | ||||||
|                   type="text" |                 <el-button type="text" @click="changeStatus(row.id, 1)" v-else>启用</el-button> | ||||||
|                   @click="changeStatus(row.id, 0)" |  | ||||||
|                   v-if="row.status == 1" |  | ||||||
|                 > |  | ||||||
|                   停用 |  | ||||||
|                 </el-button> |  | ||||||
|                 <el-button type="text" @click="changeStatus(row.id, 1)" v-else |  | ||||||
|                   >启用</el-button |  | ||||||
|                 > |  | ||||||
|                 <el-button type="text" @click="toEdit(row)">编辑</el-button> |                 <el-button type="text" @click="toEdit(row)">编辑</el-button> | ||||||
|                 <el-button type="text" @click="remove(row.id)">删除</el-button> |                 <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||||
|               </div> |               </div> | ||||||
| @@ -86,40 +35,15 @@ | |||||||
|       </template> |       </template> | ||||||
|     </ai-list> |     </ai-list> | ||||||
|     <!-- <ai-empty v-else>暂无应用权限</ai-empty> --> |     <!-- <ai-empty v-else>暂无应用权限</ai-empty> --> | ||||||
|     <ai-dialog |     <ai-dialog :title="dialogTitle" :visible.sync="dialog" @onConfirm="onConfirm" @closed="closed" width="900px"> | ||||||
|       :title="dialogTitle" |  | ||||||
|       :visible.sync="dialog" |  | ||||||
|       @onConfirm="onConfirm" |  | ||||||
|       @closed="closed" |  | ||||||
|       width="900px" |  | ||||||
|     > |  | ||||||
|       <div class="form_div"> |       <div class="form_div"> | ||||||
|         <el-form |         <el-form ref="DialogForm" :model="form" :rules="formRules" size="small" label-suffix=":" label-width="150px" > | ||||||
|           ref="DialogForm" |  | ||||||
|           :model="form" |  | ||||||
|           :rules="formRules" |  | ||||||
|           size="small" |  | ||||||
|           label-suffix=":" |  | ||||||
|           label-width="150px" |  | ||||||
|         > |  | ||||||
|           <el-form-item label="事件类型" prop="systemRuleId"> |           <el-form-item label="事件类型" prop="systemRuleId"> | ||||||
|             <el-cascader |             <el-cascader v-model="form.systemRuleId" ref="cascaderArr" :props="etOps" clearable placeholder="请选择" @change="handleTypeForm" :options="rulesOps"/> | ||||||
|               v-model="form.systemRuleId" |  | ||||||
|               ref="cascaderArr" |  | ||||||
|               :props="etOps" |  | ||||||
|               clearable |  | ||||||
|               placeholder="请选择" |  | ||||||
|               @change="handleTypeForm" |  | ||||||
|               :options="rulesOps" |  | ||||||
|             /> |  | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|  |  | ||||||
|           <el-form-item label="自定义事件" v-if="form.systemRuleId == '自定义'"> |           <el-form-item label="自定义事件" v-if="form.systemRuleId == '自定义'"> | ||||||
|             <el-input |             <el-input placeholder="请输入,周期范围内,不填写表示不限制" v-model="form.ruleName" clearable/> | ||||||
|               placeholder="请输入,周期范围内,不填写表示不限制" |  | ||||||
|               v-model="form.ruleName" |  | ||||||
|               clearable |  | ||||||
|             /> |  | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|  |  | ||||||
|           <el-form-item label="规则"> |           <el-form-item label="规则"> | ||||||
| @@ -154,18 +78,11 @@ | |||||||
|           </el-form-item> --> |           </el-form-item> --> | ||||||
|  |  | ||||||
|           <el-form-item label="周期范围" prop="scoringCycle"> |           <el-form-item label="周期范围" prop="scoringCycle"> | ||||||
|             <ai-select |             <ai-select v-model="form.scoringCycle" :selectList="$dict.getDict('integralRuleScoringCycle')"/> | ||||||
|               v-model="form.scoringCycle" |  | ||||||
|               :selectList="$dict.getDict('integralRuleScoringCycle')" |  | ||||||
|             /> |  | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|  |  | ||||||
|           <el-form-item label="奖励次数"> |           <el-form-item label="奖励次数"> | ||||||
|             <el-input |             <el-input placeholder="请输入,周期范围内,不填写表示不限制" v-model.number="form.numberLimit" clearable/> | ||||||
|               placeholder="请输入,周期范围内,不填写表示不限制" |  | ||||||
|               v-model.number="form.numberLimit" |  | ||||||
|               clearable |  | ||||||
|             /> |  | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|  |  | ||||||
|           <el-form-item label="积分分值" prop="integral"> |           <el-form-item label="积分分值" prop="integral"> | ||||||
| @@ -179,50 +96,19 @@ | |||||||
|             </el-radio-group> |             </el-radio-group> | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|  |  | ||||||
|           <el-form-item |           <el-form-item label="生效网格" :prop="form.validRangeType == 1 ? 'validRangeData' : ''" :rules="[{ required: true, message: '请选择生效网格', trigger: 'change' }, ]" v-if="form.validRangeType == 1"> | ||||||
|             label="生效网格" |             <el-button type="text" @click="(showGrid = true), beforeSelectTree()" >{{ girdInfoList.length ? "已选择" : "请选择" }}</el-button> | ||||||
|             :prop="form.validRangeType == 1 ? 'validRangeData' : ''" |  | ||||||
|             :rules="[ |  | ||||||
|               { required: true, message: '请选择生效网格', trigger: 'change' }, |  | ||||||
|             ]" |  | ||||||
|             v-if="form.validRangeType == 1" |  | ||||||
|           > |  | ||||||
|             <el-button |  | ||||||
|               type="text" |  | ||||||
|               @click="(showGrid = true), beforeSelectTree()" |  | ||||||
|               >{{ girdInfoList.length ? "已选择" : "请选择" }}</el-button |  | ||||||
|             > |  | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|         </el-form> |         </el-form> | ||||||
|       </div> |       </div> | ||||||
|       <ai-dialog |       <ai-dialog title="选择网格" :visible.sync="showGrid" :customFooter="true" :destroyOnClose="true" border width="720px" append-to-body> | ||||||
|         title="选择网格" |  | ||||||
|         :visible.sync="showGrid" |  | ||||||
|         :customFooter="true" |  | ||||||
|         :destroyOnClose="true" |  | ||||||
|         border |  | ||||||
|         width="720px" |  | ||||||
|         append-to-body |  | ||||||
|       > |  | ||||||
|         <div class="grid"> |         <div class="grid"> | ||||||
|           <el-tree |           <el-tree :data="treeObj.treeList" :props="treeObj.defaultProps" node-key="id" ref="tree" :check-strictly="true" show-checkbox default-expand-all :default-checked-keys="currCheckedKeys" @check="onCheckChange"> | ||||||
|             :data="treeObj.treeList" |  | ||||||
|             :props="treeObj.defaultProps" |  | ||||||
|             node-key="id" |  | ||||||
|             ref="tree" |  | ||||||
|             :check-strictly="true" |  | ||||||
|             show-checkbox |  | ||||||
|             default-expand-all |  | ||||||
|             :default-checked-keys="currCheckedKeys" |  | ||||||
|             @check="onCheckChange" |  | ||||||
|           > |  | ||||||
|           </el-tree> |           </el-tree> | ||||||
|         </div> |         </div> | ||||||
|         <div class="dialog-footer" slot="footer"> |         <div class="dialog-footer" slot="footer"> | ||||||
|           <el-button size="medium" @click="showGrid = false">取消</el-button> |           <el-button size="medium" @click="showGrid = false">取消</el-button> | ||||||
|           <el-button type="primary" size="medium" @click="getCheckedTree()" |           <el-button type="primary" size="medium" @click="getCheckedTree()">确认</el-button> | ||||||
|             >确认</el-button |  | ||||||
|           > |  | ||||||
|         </div> |         </div> | ||||||
|       </ai-dialog> |       </ai-dialog> | ||||||
|     </ai-dialog> |     </ai-dialog> | ||||||
| @@ -243,6 +129,7 @@ export default { | |||||||
|       search: { |       search: { | ||||||
|         status: "", |         status: "", | ||||||
|         systemRuleId: "", |         systemRuleId: "", | ||||||
|  |         ruleName: "" | ||||||
|       }, |       }, | ||||||
|       page: { current: 1, size: 10, total: 0 }, |       page: { current: 1, size: 10, total: 0 }, | ||||||
|       colConfigs: [ |       colConfigs: [ | ||||||
| @@ -336,15 +223,7 @@ export default { | |||||||
|     }; |     }; | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
|     this.$dict |     this.$dict.load("integralRuleStatus","integralRuleRuleType","integralRuleScoringCycle","integralRuleEvent","integralRuleEventType").then(() => { | ||||||
|       .load( |  | ||||||
|         "integralRuleStatus", |  | ||||||
|         "integralRuleRuleType", |  | ||||||
|         "integralRuleScoringCycle", |  | ||||||
|         "integralRuleEvent", |  | ||||||
|         "integralRuleEventType" |  | ||||||
|       ) |  | ||||||
|       .then(() => { |  | ||||||
|         this.getList(); |         this.getList(); | ||||||
|         this.getRulesList(); |         this.getRulesList(); | ||||||
|         this.beforeSelectTree(); |         this.beforeSelectTree(); | ||||||
| @@ -379,7 +258,14 @@ export default { | |||||||
|       }; |       }; | ||||||
|     }, |     }, | ||||||
|     toEdit(row) { |     toEdit(row) { | ||||||
|       this.form = this.$copy(row); |       this.form = {...row} | ||||||
|  |       // let arr = this.form?.validRangeData?.split(","); | ||||||
|  |       // this.girdInfoList = arr.map(e=> { | ||||||
|  |       //   return { | ||||||
|  |       //     id: e, | ||||||
|  |       //     checkType: true | ||||||
|  |       //   } | ||||||
|  |       // }) | ||||||
|       this.girdInfoList = this.form?.validRangeData?.split(","); |       this.girdInfoList = this.form?.validRangeData?.split(","); | ||||||
|       this.$nextTick(() => { |       this.$nextTick(() => { | ||||||
|         this.dialog = true; |         this.dialog = true; | ||||||
| @@ -446,6 +332,7 @@ export default { | |||||||
|     }, |     }, | ||||||
|     handleTypeSearch(v) { |     handleTypeSearch(v) { | ||||||
|       this.search.systemRuleId = v?.[v.length - 1]; |       this.search.systemRuleId = v?.[v.length - 1]; | ||||||
|  |       this.search.ruleName = this.$refs.eventTypeSearch.getCheckedNodes()[0]?.label | ||||||
|       this.page.current = 1; |       this.page.current = 1; | ||||||
|       this.$refs.eventTypeSearch.dropDownVisible = false; |       this.$refs.eventTypeSearch.dropDownVisible = false; | ||||||
|       this.getList(); |       this.getList(); | ||||||
| @@ -523,7 +410,7 @@ export default { | |||||||
|       if (!this.$refs.tree.getCheckedNodes().length) { |       if (!this.$refs.tree.getCheckedNodes().length) { | ||||||
|         return this.$message.error("请选择网格"); |         return this.$message.error("请选择网格"); | ||||||
|       } |       } | ||||||
|       console.log(this.girdInfoList, this.$refs.tree.getCheckedNodes()); |       // console.log(this.girdInfoList, this.$refs.tree.getCheckedNodes()); | ||||||
|       this.girdInfoList = this.$refs.tree.getCheckedNodes().map((item) => { |       this.girdInfoList = this.$refs.tree.getCheckedNodes().map((item) => { | ||||||
|         return { ...item, checkType: true }; |         return { ...item, checkType: true }; | ||||||
|       }); |       }); | ||||||
| @@ -544,14 +431,13 @@ export default { | |||||||
|         .post(`/app/appgirdinfo/listAll3`, null, null) |         .post(`/app/appgirdinfo/listAll3`, null, null) | ||||||
|         .then((res) => { |         .then((res) => { | ||||||
|           if (res.code == 0) { |           if (res.code == 0) { | ||||||
|             // res.data.forEach((item)=>{ |             res.data.forEach((item)=>{ | ||||||
|             // const isChecked=  this.girdInfoList.find((checkedId)=>{ |               const isChecked = this.girdInfoList.find((checkedId)=>{ | ||||||
|             //    return item.id===checkedId |                 return item.id === checkedId | ||||||
|             //   }) |               }) | ||||||
|  |               if(isChecked) item.checkType = true | ||||||
|             //   if(isChecked) item.checkType=true |             }) | ||||||
|             // }) |             console.log(res.data) | ||||||
|             // console.log(res.data) |  | ||||||
|  |  | ||||||
|             this.treeObj.treeList = this.girdToTree(res.data); |             this.treeObj.treeList = this.girdToTree(res.data); | ||||||
|             this.girdInfoList.map((e) => { |             this.girdInfoList.map((e) => { | ||||||
| @@ -560,7 +446,7 @@ export default { | |||||||
|             this.$nextTick(() => { |             this.$nextTick(() => { | ||||||
|               this.currCheckedKeys = this.girdInfoList; |               this.currCheckedKeys = this.girdInfoList; | ||||||
|               this.$nextTick(() => { |               this.$nextTick(() => { | ||||||
|                 this.$refs.tree?.setCheckedKeys(this.currCheckedKeys); |                 this.$refs.tree?.getCheckedKeys(this.currCheckedKeys); | ||||||
|               }); |               }); | ||||||
|             }); |             }); | ||||||
|           } |           } | ||||||
| @@ -568,6 +454,13 @@ export default { | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     onCheckChange(e) { |     onCheckChange(e) { | ||||||
|  |       // this.$nextTick(() => { | ||||||
|  |       //   this.$refs.tree.getCheckedKeys().forEach(v => { | ||||||
|  |       //     this.$refs.tree.setChecked(v, false) | ||||||
|  |       //   }) | ||||||
|  |       //   this.$refs.tree.setChecked(e.id, true) | ||||||
|  |       // }) | ||||||
|  |       // console.log(e); | ||||||
|       this.$refs.tree.setChecked(e.id, true); |       this.$refs.tree.setChecked(e.id, true); | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
| @@ -584,12 +477,6 @@ export default { | |||||||
|         label: "ruleName", |         label: "ruleName", | ||||||
|       }; |       }; | ||||||
|     }, |     }, | ||||||
|     // currCheckedKeys() { |  | ||||||
|     //   if (this.girdInfoList) { |  | ||||||
|     //     return this.girdInfoList |  | ||||||
|     //   } |  | ||||||
|     //   return [] |  | ||||||
|     // }, |  | ||||||
|   }, |   }, | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|              @click="timeChange(index)">{{ item }}</span> |              @click="timeChange(index)">{{ item }}</span> | ||||||
|           </div> |           </div> | ||||||
|             <el-cascader ref="cascader1" v-model="girdId" :options="girdOptions" placeholder="所属网格" size="small"  |             <el-cascader ref="cascader1" v-model="girdId" :options="girdOptions" placeholder="所属网格" size="small"  | ||||||
|               :props="defaultProps" :show-all-levels="false" @change="gridChange"></el-cascader> |               :props="defaultProps" :show-all-levels="false" @change="gridChange" clearable></el-cascader> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|       <div class="card_list"> |       <div class="card_list"> | ||||||
| @@ -97,7 +97,7 @@ | |||||||
|             <ai-info-item label="积分变动">{{ details.integralCalcType==0? '-' : '+' }}{{ details.changeIntegral }}</ai-info-item> |             <ai-info-item label="积分变动">{{ details.integralCalcType==0? '-' : '+' }}{{ details.changeIntegral }}</ai-info-item> | ||||||
|             <ai-info-item label="积分余额" :value="details.nowIntegral"/> |             <ai-info-item label="积分余额" :value="details.nowIntegral"/> | ||||||
|             <ai-info-item label="凭证" isLine v-if="fileDownLoad.length"> |             <ai-info-item label="凭证" isLine v-if="fileDownLoad.length"> | ||||||
|               <ai-file-list :fileList="fileDownLoad" style="width: 200px;"></ai-file-list> |               <ai-file-list :fileList="fileDownLoad" style="width: 200px;" :fileOps="fileOps"></ai-file-list> | ||||||
|             </ai-info-item> |             </ai-info-item> | ||||||
|           </ai-wrapper> |           </ai-wrapper> | ||||||
|         </template> |         </template> | ||||||
| @@ -141,7 +141,6 @@ export default { | |||||||
|         endTime: '', |         endTime: '', | ||||||
|       }, |       }, | ||||||
|       page: { |       page: { | ||||||
|          |  | ||||||
|         size: 10, |         size: 10, | ||||||
|         total: 0, |         total: 0, | ||||||
|       }, |       }, | ||||||
| @@ -167,10 +166,11 @@ export default { | |||||||
|       fileDownLoad: [], |       fileDownLoad: [], | ||||||
|       userSortListX: [], |       userSortListX: [], | ||||||
|       userSortListY: [], |       userSortListY: [], | ||||||
|       girdSortListX: [ |       girdSortListX: [], | ||||||
|  |  | ||||||
|       ], |  | ||||||
|       girdSortListY: [], |       girdSortListY: [], | ||||||
|  |       fileOps: { | ||||||
|  |         name: '' | ||||||
|  |       }, | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   computed: { |   computed: { | ||||||
| @@ -227,50 +227,12 @@ export default { | |||||||
|           this.userSortListX = res.data.userSortList.map(e=> e.userName).reverse() |           this.userSortListX = res.data.userSortList.map(e=> e.userName).reverse() | ||||||
|           this.userSortListY = res.data.userSortList.map(e=> e.changeIntegral).reverse() |           this.userSortListY = res.data.userSortList.map(e=> e.changeIntegral).reverse() | ||||||
|           this.girdSortListX = res.data.girdSortList.map(e=> e.girdName).reverse() |           this.girdSortListX = res.data.girdSortList.map(e=> e.girdName).reverse() | ||||||
|           // this.girdSortListX = ['好家伙规定非官方多喝点黑胡椒发布会','好好发挥或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或'] |  | ||||||
|           this.girdSortListY = res.data.girdSortList.map(e=> e.changeIntegral).reverse() |           this.girdSortListY = res.data.girdSortList.map(e=> e.changeIntegral).reverse() | ||||||
|           this.getColEcherts1(this.userSortListX,this.userSortListY) |           this.getColEcherts1(this.userSortListX,this.userSortListY) | ||||||
|           this.getColEcherts2(this.girdSortListX,this.girdSortListY) |           this.getColEcherts2(this.girdSortListX,this.girdSortListY) | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|     // extension(chart){ |  | ||||||
|     //     //判断是否创建过div框,如果创建过就不再创建了 |  | ||||||
|     //     //该div用来盛放文本显示内容的,方便对其悬浮位置进行处理 |  | ||||||
|     //   var id = document.getElementById("extension"); |  | ||||||
|     //   if(!id) { |  | ||||||
|     //     var div = "<div id = 'extension' sytle=\"display:block\"></div>"; |  | ||||||
|     //       document.documentElement.append(div); |  | ||||||
|     //   } |  | ||||||
|     //   chart.on('mouseover', function(params) { |  | ||||||
|     //       //注意这里,我是以Y轴显示内容过长为例,如果是x轴的话,需要改为xAxis |  | ||||||
|     //       if(params.componentType == "xAxis") { |  | ||||||
|     //           //设置悬浮文本的位置以及样式 |  | ||||||
|     //         document.getElementById('extension').style.className = "chartCss" |  | ||||||
|     //         // ({ |  | ||||||
|     //         //   "position": "absolute", |  | ||||||
|     //         //   "color": "black", |  | ||||||
|     //         //   "background":"white", |  | ||||||
|     //         //   "font-family": "Arial", |  | ||||||
|     //         //   "font-size": "12px", |  | ||||||
|     //         //   "padding": "5px", |  | ||||||
|     //         //   "display": "inline" |  | ||||||
|     //         //   }) |  | ||||||
|     //           // .text(params.value); |  | ||||||
|     //           document.documentElement.mousemove(function(event) { |  | ||||||
|     //             var xx = event.pageX - 10; |  | ||||||
|     //             var yy = event.pageY + 15; |  | ||||||
|     //           document.getElementById('extension').css('top', yy).style('left', xx); |  | ||||||
|     //           }); |  | ||||||
|     //       } |  | ||||||
|     //   }); |  | ||||||
|     //   chart.on('mouseout', function(params) { |  | ||||||
|     //     //注意这里,我是以Y轴显示内容过长为例,如果是x轴的话,需要改为xAxis |  | ||||||
|     //   if(params.componentType == "yAxis") { |  | ||||||
|     //       document.getElementById('extension').style('display', 'none'); |  | ||||||
|     //     } |  | ||||||
|     //   });                 |  | ||||||
|     // }, |  | ||||||
|     // 积分明细 |     // 积分明细 | ||||||
|     getTableData() { |     getTableData() { | ||||||
|       this.instance.post('/app/appintegraluser/girdIntegralDetail',null,{ |       this.instance.post('/app/appintegraluser/girdIntegralDetail',null,{ | ||||||
| @@ -489,6 +451,8 @@ export default { | |||||||
|           this.details = res.data |           this.details = res.data | ||||||
|           if(res.data.enclosure) { |           if(res.data.enclosure) { | ||||||
|             this.fileDownLoad = [{ url:res.data.enclosure }] |             this.fileDownLoad = [{ url:res.data.enclosure }] | ||||||
|  |             let str = res.data.enclosure.split('/') | ||||||
|  |             this.fileOps.name = str?.[str.length - 1] | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
| @@ -632,15 +596,15 @@ export default { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   .chartCss { |   // .chartCss { | ||||||
|     position: absolute; |   //   position: absolute; | ||||||
|     color: black; |   //   color: black; | ||||||
|     background:white; |   //   background:white; | ||||||
|     font-family: Aril; |   //   font-family: Aril; | ||||||
|     font-size: 12px; |   //   font-size: 12px; | ||||||
|     padding: 5px; |   //   padding: 5px; | ||||||
|     display: inline; |   //   display: inline; | ||||||
|   } |   // } | ||||||
|  |  | ||||||
|   ::v-deep .el-dialog__footer { |   ::v-deep .el-dialog__footer { | ||||||
|     text-align: center; |     text-align: center; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user