|
|
@@ -1,24 +1,20 @@
|
|
|
<template>
|
|
|
<div class="ma-content-block">
|
|
|
- <sa-table
|
|
|
- ref="crudRef"
|
|
|
- :options="options"
|
|
|
- :columns="columns"
|
|
|
- :searchForm="searchForm"
|
|
|
- >
|
|
|
+ <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
|
|
|
<template #tableSearch>
|
|
|
<a-col :sm="6" :xs="24">
|
|
|
<a-form-item label="操作" field="action">
|
|
|
- <a-select
|
|
|
- v-model="searchForm.action"
|
|
|
- allow-clear
|
|
|
- placeholder="请选择操作"
|
|
|
- >
|
|
|
+ <a-select v-model="searchForm.action" allow-clear placeholder="请选择操作">
|
|
|
<a-option value="1">封禁</a-option>
|
|
|
<a-option value="2">解封</a-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :sm="6" :xs="24">
|
|
|
+ <a-form-item label="封禁值搜索" field="value">
|
|
|
+ <a-input v-model="searchForm.value" placeholder="请输入封禁值" allow-clear />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
</template>
|
|
|
|
|
|
<!-- Table 自定义渲染 -->
|
|
|
@@ -29,15 +25,15 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, reactive, onMounted } from "vue";
|
|
|
-import api from "../../api/customer/account";
|
|
|
-import AddBan from "./addBan.vue";
|
|
|
+import { ref, reactive, onMounted } from 'vue'
|
|
|
+import api from '../../api/customer/account'
|
|
|
+import AddBan from './addBan.vue'
|
|
|
|
|
|
-const addRef = ref();
|
|
|
-const crudRef = ref();
|
|
|
+const addRef = ref()
|
|
|
+const crudRef = ref()
|
|
|
|
|
|
// 搜索表单
|
|
|
-const searchForm = ref({});
|
|
|
+const searchForm = ref({})
|
|
|
|
|
|
// SaTable 基础配置
|
|
|
const options = reactive({
|
|
|
@@ -45,59 +41,59 @@ const options = reactive({
|
|
|
operationColumn: false,
|
|
|
add: {
|
|
|
show: true,
|
|
|
- auth: ["/v1/customer/Account/banList/add"],
|
|
|
- text: "添加封禁|解除封禁",
|
|
|
- icon: "",
|
|
|
+ auth: ['/v1/customer/Account/banList/add'],
|
|
|
+ text: '添加封禁|解除封禁',
|
|
|
+ icon: '',
|
|
|
func: async () => {
|
|
|
- addRef.value?.open();
|
|
|
+ addRef.value?.open()
|
|
|
},
|
|
|
},
|
|
|
-});
|
|
|
+})
|
|
|
|
|
|
const columns = ref([
|
|
|
{
|
|
|
- title: "操作",
|
|
|
- dataIndex: "action",
|
|
|
- key: "action",
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ key: 'action',
|
|
|
},
|
|
|
{
|
|
|
- title: "类型",
|
|
|
- key: "type",
|
|
|
- dataIndex: "type",
|
|
|
+ title: '类型',
|
|
|
+ key: 'type',
|
|
|
+ dataIndex: 'type',
|
|
|
},
|
|
|
{
|
|
|
- title: "值",
|
|
|
- key: "value",
|
|
|
- dataIndex: "value",
|
|
|
+ title: '值',
|
|
|
+ key: 'value',
|
|
|
+ dataIndex: 'value',
|
|
|
},
|
|
|
{
|
|
|
- title: "理由",
|
|
|
- key: "reason",
|
|
|
- dataIndex: "reason",
|
|
|
+ title: '理由',
|
|
|
+ key: 'reason',
|
|
|
+ dataIndex: 'reason',
|
|
|
},
|
|
|
{
|
|
|
- title: "操作人",
|
|
|
- key: "auth_name",
|
|
|
- dataIndex: "auth_name",
|
|
|
+ title: '操作人',
|
|
|
+ key: 'auth_name',
|
|
|
+ dataIndex: 'auth_name',
|
|
|
},
|
|
|
{
|
|
|
- title: "操作时间",
|
|
|
- key: "created_time",
|
|
|
- dataIndex: "created_time",
|
|
|
+ title: '操作时间',
|
|
|
+ key: 'created_time',
|
|
|
+ dataIndex: 'created_time',
|
|
|
},
|
|
|
-]);
|
|
|
+])
|
|
|
|
|
|
// 页面数据初始化
|
|
|
-const initPage = async () => {};
|
|
|
+const initPage = async () => {}
|
|
|
|
|
|
// SaTable 数据请求
|
|
|
const refresh = async () => {
|
|
|
- crudRef.value?.refresh();
|
|
|
-};
|
|
|
+ crudRef.value?.refresh()
|
|
|
+}
|
|
|
|
|
|
// 页面加载完成执行
|
|
|
onMounted(async () => {
|
|
|
- initPage();
|
|
|
- refresh();
|
|
|
-});
|
|
|
+ initPage()
|
|
|
+ refresh()
|
|
|
+})
|
|
|
</script>
|