|
@@ -11,19 +11,34 @@
|
|
:current-page="currentPage"
|
|
:current-page="currentPage"
|
|
:page-size="pageSize"
|
|
:page-size="pageSize"
|
|
:total-records="totalRecords"
|
|
:total-records="totalRecords"
|
|
|
|
+ @sort-change="sortChange"
|
|
@currentChange="pageHandle"
|
|
@currentChange="pageHandle"
|
|
/>
|
|
/>
|
|
|
|
+ <popup-edit
|
|
|
|
+ :isShow="isDtlShow"
|
|
|
|
+ :curObj="curObj"
|
|
|
|
+ @close="closePopup"
|
|
|
|
+ />
|
|
|
|
+ <point-dtl
|
|
|
|
+ :isShow="isPDShow"
|
|
|
|
+ :curObj="curObj"
|
|
|
|
+ @close="closePDPopup"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import { arrToObj } from '@/utils'
|
|
import { arrToObj } from '@/utils'
|
|
import SearchForm from './components/searchForm/Index'
|
|
import SearchForm from './components/searchForm/Index'
|
|
|
|
+import PopupEdit from './components/popup/AppIntegralEdit'
|
|
|
|
+import PointDtl from './components/popup/AppIntegralDtl'
|
|
import baseTable from '_m/baseTable.js'
|
|
import baseTable from '_m/baseTable.js'
|
|
import xData from './mixin'
|
|
import xData from './mixin'
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
components: {
|
|
components: {
|
|
SearchForm,
|
|
SearchForm,
|
|
|
|
+ PopupEdit,
|
|
|
|
+ PointDtl,
|
|
},
|
|
},
|
|
provide() {
|
|
provide() {
|
|
return {
|
|
return {
|
|
@@ -37,6 +52,7 @@ export default {
|
|
searchForm: null,
|
|
searchForm: null,
|
|
isDtlShow: false,
|
|
isDtlShow: false,
|
|
curObj: {},
|
|
curObj: {},
|
|
|
|
+ isPDShow: false,
|
|
...xData
|
|
...xData
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -60,13 +76,16 @@ export default {
|
|
rows: [
|
|
rows: [
|
|
{ label: '头像', prop: 'avatar', type: 'img' },
|
|
{ label: '头像', prop: 'avatar', type: 'img' },
|
|
{ label: '昵称', prop: 'nickname' },
|
|
{ label: '昵称', prop: 'nickname' },
|
|
|
|
+ { label: '成长值', prop: 'integral', sortable: 'custom' },
|
|
{ label: '手机号', prop: 'phones' },
|
|
{ label: '手机号', prop: 'phones' },
|
|
{ label: '注册时间', prop: 'create_at' },
|
|
{ label: '注册时间', prop: 'create_at' },
|
|
{ label: '禁言状态', prop: 'is_gag', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'success', '1': 'danger'} },
|
|
{ label: '禁言状态', prop: 'is_gag', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'success', '1': 'danger'} },
|
|
{ label: '备注', prop: 'tag', type: 'input', width: 100},
|
|
{ label: '备注', prop: 'tag', type: 'input', width: 100},
|
|
- { label: '操作', width: 220, type: 'handle2', operations:
|
|
|
|
|
|
+ { label: '操作', width: 260, type: 'handle2', operations:
|
|
[
|
|
[
|
|
{ label: '保存标签', func: this.saveHandle, btnType: 'primary' },
|
|
{ label: '保存标签', func: this.saveHandle, btnType: 'primary' },
|
|
|
|
+ { label: '成长值编辑', func: this.openPopup, btnType: 'success' },
|
|
|
|
+ { label: '成长值明细', func: this.openPDPopup, btnType: 'success' },
|
|
{ labelFor: 'is_gag', func: this.disHandle,
|
|
{ labelFor: 'is_gag', func: this.disHandle,
|
|
labelConfig: {
|
|
labelConfig: {
|
|
texts: {
|
|
texts: {
|
|
@@ -86,6 +105,34 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ openPDPopup(row) {
|
|
|
|
+ if (row && row.id) {
|
|
|
|
+ this.curObj = row
|
|
|
|
+ } else {
|
|
|
|
+ this.curObj = {}
|
|
|
|
+ }
|
|
|
|
+ this.isPDShow = true
|
|
|
|
+ },
|
|
|
|
+ closePDPopup(obj) {
|
|
|
|
+ this.isPDShow = false
|
|
|
|
+ if (obj) {
|
|
|
|
+ this.fetchData()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ openPopup(row) {
|
|
|
|
+ if (row && row.id) {
|
|
|
|
+ this.curObj = row
|
|
|
|
+ } else {
|
|
|
|
+ this.curObj = {}
|
|
|
|
+ }
|
|
|
|
+ this.isDtlShow = true
|
|
|
|
+ },
|
|
|
|
+ closePopup(obj) {
|
|
|
|
+ this.isDtlShow = false
|
|
|
|
+ if (obj) {
|
|
|
|
+ this.fetchData()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
disHandle (row) {
|
|
disHandle (row) {
|
|
const is_gag = Number(row.is_gag) === 1 ? 2 : 1
|
|
const is_gag = Number(row.is_gag) === 1 ? 2 : 1
|
|
const msgText = Number(row.is_gag) === 1 ? '解禁' : '禁言'
|
|
const msgText = Number(row.is_gag) === 1 ? '解禁' : '禁言'
|