|
|
@@ -1,6 +1,37 @@
|
|
|
<template>
|
|
|
<div class="app-list-content">
|
|
|
- <x-crud class="liu-crud-wrap" @load="onLoad"> </x-crud>
|
|
|
+ <x-crud class="liu-crud-wrap" @load="onLoad">
|
|
|
+ <!-- 头像 -->
|
|
|
+ <template #table-column-avator="{scope}">
|
|
|
+ <cl-avatar
|
|
|
+ shape="square"
|
|
|
+ :size="40"
|
|
|
+ :src="scope.row.avator | default_avatar"
|
|
|
+ :style="{ margin: 'auto' }"
|
|
|
+ ></cl-avatar>
|
|
|
+ </template>
|
|
|
+ <!-- 管理员 -->
|
|
|
+ <template #table-column-super="{scope}">
|
|
|
+ <span>{{scope.row.status == 1 ? '是' : scope.row.status == 2 ? '不是' : '-'}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 创始人 -->
|
|
|
+ <template #table-column-founder="{scope}">
|
|
|
+ <span>{{scope.row.founder == 1 ? '是' : scope.row.status == 2 ? '不是' : '-'}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template #slot-column-option="{scope}">
|
|
|
+ <template>
|
|
|
+ <el-popover placement="top" width="160" :ref="'popover-' + scope.row.id">
|
|
|
+ <p>确定要删除吗?</p>
|
|
|
+ <div style="text-align: right; margin: 0">
|
|
|
+ <el-button size="mini" type="text" @click="selfGetCancel(scope.row.id)">取消</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="noSendShipFn(scope.row)">确定</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button type="text" size="small" slot="reference">删除</el-button>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </x-crud>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -9,7 +40,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
// x-crud
|
|
|
- app: null
|
|
|
+ show: false
|
|
|
};
|
|
|
},
|
|
|
mounted() {},
|
|
|
@@ -93,7 +124,7 @@ export default {
|
|
|
label: '操作'
|
|
|
},
|
|
|
// 布局,请移步 `layout`
|
|
|
- layout: []
|
|
|
+ layout: ['slot-column-option']
|
|
|
}
|
|
|
})
|
|
|
.set('layout', [
|
|
|
@@ -104,7 +135,20 @@ export default {
|
|
|
])
|
|
|
.done();
|
|
|
app.refresh();
|
|
|
- }
|
|
|
+ },
|
|
|
+ //取消删除
|
|
|
+ selfGetCancel(id) {
|
|
|
+ this.$refs[`popover-` + id].doClose();
|
|
|
+ },
|
|
|
+ // 确定删除
|
|
|
+ noSendShipFn(item) {
|
|
|
+ console.log('item.id', item.id)
|
|
|
+ let param = { id: item.id }
|
|
|
+ this.$service.auth.shopAdminDelete(param).then(res => {
|
|
|
+ this.$message.success('操作成功!');
|
|
|
+ this.$refs[`popover-` + item.id].doClose();
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|