This commit is contained in:
张成
2025-10-09 23:26:40 +08:00
parent b81e768035
commit 0b78af46cd
25 changed files with 70 additions and 427 deletions

View File

@@ -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() {