1
This commit is contained in:
@@ -26,8 +26,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
|
||||
import user_followsServer from '@/api/users/user_follows_server.js'
|
||||
export default {
|
||||
data() {
|
||||
@@ -43,7 +41,6 @@ export default {
|
||||
{ key: 'following_id', value: '被关注者ID' },
|
||||
{ key: 'nickname', value: '用户昵称' }
|
||||
],
|
||||
seachTypePlaceholder: '请选择搜索类型',
|
||||
gridOption: {
|
||||
param: {
|
||||
seachOption: {
|
||||
@@ -88,14 +85,31 @@ export default {
|
||||
},
|
||||
},
|
||||
]
|
||||
return window.framework.uiTool.getBtn(h, btns)
|
||||
return uiTool.getBtn(h, btns)
|
||||
},
|
||||
}
|
||||
],
|
||||
editColumns: [
|
||||
{ title: '关注者ID', key: 'follower_id', type: 'number', required: true },
|
||||
{ title: '被关注者ID', key: 'following_id', type: 'number', required: true },
|
||||
{ title: '关注时间', key: 'follow_time', type: 'datetime' }
|
||||
{
|
||||
title: '关注者ID',
|
||||
key: 'follower_id',
|
||||
data_type: 'number',
|
||||
com: 'InputNumber',
|
||||
is_show_edit: 1
|
||||
},
|
||||
{
|
||||
title: '被关注者ID',
|
||||
key: 'following_id',
|
||||
data_type: 'number',
|
||||
com: 'InputNumber',
|
||||
is_show_edit: 1
|
||||
},
|
||||
{
|
||||
title: '关注时间',
|
||||
key: 'follow_time',
|
||||
com: 'DatePicker',
|
||||
is_show_edit: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -111,13 +125,25 @@ export default {
|
||||
});
|
||||
},
|
||||
showAddWarp() {
|
||||
this.$refs.editModal.showModal();
|
||||
this.$refs.editModal.addShow({
|
||||
'follower_id': null,
|
||||
'following_id': null,
|
||||
'follow_time': null
|
||||
}, async (newRow) => {
|
||||
let res = await user_followsServer.add(newRow)
|
||||
rootVue.$Message.success('新增成功!')
|
||||
this.query(1)
|
||||
})
|
||||
},
|
||||
showEditWarp(row) {
|
||||
this.$refs.editModal.showModal(row);
|
||||
this.$refs.editModal.editShow(row, async (newRow) => {
|
||||
let res = await user_followsServer.edit(newRow)
|
||||
rootVue.$Message.success('修改成功!')
|
||||
this.query(1)
|
||||
})
|
||||
},
|
||||
delConfirm(row) {
|
||||
window.framework.uiTool.delConfirm(async () => {
|
||||
uiTool.delConfirm(async () => {
|
||||
await user_followsServer.del(row)
|
||||
rootVue.$Message.success('删除成功!')
|
||||
this.query(1)
|
||||
@@ -125,7 +151,7 @@ export default {
|
||||
},
|
||||
exportCsv() {
|
||||
user_followsServer.exportCsv(this.gridOption.param).then(res => {
|
||||
window.framework.funTool.downloadFile(res, '用户关注关系.csv');
|
||||
window.framework. funTool.downloadFile(res, '用户关注关系.csv');
|
||||
});
|
||||
},
|
||||
resetQuery() {
|
||||
|
||||
Reference in New Issue
Block a user