对比新文件 |
| | |
| | | <template> |
| | | <div> |
| | | <el-bus-crud v-bind="tableConfig"/> |
| | | <el-dialog title="成长值变动记录" :visible.sync="dialogVisible" width="80%"> |
| | | <el-bus-crud |
| | | v-if="userId" |
| | | :key="dialogId" |
| | | :extra-query="{ userId }" |
| | | v-bind="recordTableConfig" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {v4 as uuidv4} from "uuid"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | userId: null, |
| | | dialogId: null, |
| | | tableConfig: { |
| | | url: 'flower/api/userGrowthRecord/list', |
| | | hasNew: false, |
| | | hasEdit: false, |
| | | hasDelete: false, |
| | | hasView: false, |
| | | columns: [ |
| | | {label: '序号', type: 'index'}, |
| | | {label: '用户名称', prop: 'nickName'}, |
| | | {label: '联系方式', prop: 'tel'}, |
| | | {label: '当前成长值', prop: 'sumGrowthValue'}, |
| | | {label: '当前会员等级', prop: 'levelName'}, |
| | | ], |
| | | searchForm: [ |
| | | { |
| | | type: 'row', |
| | | items: [ |
| | | {label: '用户名称:', id: 'nickName', type: 'input'}, |
| | | {label: '联系方式:', id: 'tel', type: 'input'} |
| | | ], |
| | | }, |
| | | ], |
| | | extraButtons: [ |
| | | { |
| | | text: '成长值变动记录', |
| | | atClick: (row) => { |
| | | this.dialogId = uuidv4() |
| | | this.userId = row.userId |
| | | this.dialogVisible = true |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | recordTableConfig: { |
| | | url: 'flower/api/getmemberGrowthRecord/list', |
| | | saveQuery: false, |
| | | hasNew: false, |
| | | hasOperation: false, |
| | | columns: [ |
| | | { label: '序号', type: 'index' }, |
| | | { label: '成长值类型', prop: 'typeStr' }, |
| | | { label: '成长值来源', prop: 'sourceStr' }, |
| | | { label: '成长值', prop: 'growth' }, |
| | | { label: '记录日期', prop: 'recordDate' }, |
| | | { label: '备注', prop: 'remarks' }, |
| | | ], |
| | | searchFormAttrs: { |
| | | labelWidth: 'auto', |
| | | }, |
| | | }, |
| | | } |
| | | }, |
| | | head() { |
| | | return { |
| | | title: '会员成长值记录', |
| | | } |
| | | }, |
| | | } |
| | | </script> |