add: 增加新功能
This commit is contained in:
@@ -2,12 +2,8 @@
|
||||
<div class="app-container">
|
||||
<!-- 列表 -->
|
||||
<!-- 搜索 -->
|
||||
<page-search
|
||||
ref="searchRef"
|
||||
:search-config="searchConfig"
|
||||
@query-click="searchQueryClick"
|
||||
@reset-click="handleResetClick"
|
||||
/>
|
||||
<page-search ref="searchRef" :search-config="searchConfig" @query-click="searchQueryClick"
|
||||
@reset-click="handleResetClick" />
|
||||
<div class="head-container">
|
||||
<div class="card">
|
||||
<!-- <div class="title">统计数据</div> -->
|
||||
@@ -32,17 +28,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
<page-content
|
||||
ref="contentRef"
|
||||
:content-config="contentConfig"
|
||||
@add-click="handleAddClick"
|
||||
@edit-click="handleEditClick"
|
||||
@export-click="handleExportClick"
|
||||
@search-click="handleSearchClick"
|
||||
@toolbar-click="handleToolbarClick"
|
||||
@operat-click="handleOperatClick"
|
||||
@filter-change="handleFilterChange"
|
||||
>
|
||||
<page-content ref="contentRef" :content-config="contentConfig" @add-click="handleAddClick"
|
||||
@edit-click="handleEditClick" @export-click="handleExportClick" @search-click="handleSearchClick"
|
||||
@toolbar-click="handleToolbarClick" @operat-click="handleOperatClick" @filter-change="handleFilterChange">
|
||||
<template #status="scope">
|
||||
<el-tag :type="scope.row[scope.prop] == 1 ? 'success' : 'info'">
|
||||
{{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
|
||||
@@ -55,21 +43,18 @@
|
||||
{{ scope.row[scope.prop] ? "是" : "否" }}
|
||||
</template>
|
||||
<template #gender="scope">
|
||||
<el-tag
|
||||
:type="
|
||||
scope.row[scope.prop] == null
|
||||
? 'info'
|
||||
: scope.row[scope.prop] == 1
|
||||
? 'success'
|
||||
: 'warning'
|
||||
"
|
||||
>
|
||||
<el-tag :type="scope.row[scope.prop] == null
|
||||
? 'info'
|
||||
: scope.row[scope.prop] == 1
|
||||
? 'success'
|
||||
: 'warning'
|
||||
">
|
||||
{{
|
||||
scope.row[scope.prop] === null
|
||||
? "未知"
|
||||
: scope.row[scope.prop] == 1
|
||||
? "男"
|
||||
: "女"
|
||||
? "男"
|
||||
: "女"
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
@@ -86,11 +71,7 @@
|
||||
</template>
|
||||
<template #mobile="scope">
|
||||
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
||||
<copy-button
|
||||
v-if="scope.row[scope.prop]"
|
||||
:text="scope.row[scope.prop]"
|
||||
style="margin-left: 2px"
|
||||
/>
|
||||
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
||||
</template>
|
||||
|
||||
<template #coupon="scope">
|
||||
@@ -104,25 +85,13 @@
|
||||
</page-content>
|
||||
|
||||
<!-- 新增 -->
|
||||
<page-modal
|
||||
ref="addModalRef"
|
||||
:modal-config="addModalConfig"
|
||||
@submit-click="handleSubmitClick"
|
||||
></page-modal>
|
||||
<page-modal ref="addModalRef" :modal-config="addModalConfig" @submit-click="handleSubmitClick"></page-modal>
|
||||
|
||||
<!-- 编辑 -->
|
||||
<page-modal
|
||||
ref="editModalRef"
|
||||
:modal-config="editModalConfig"
|
||||
@submit-click="handleSubmitClick"
|
||||
></page-modal>
|
||||
<page-modal ref="editModalRef" :modal-config="editModalConfig" @submit-click="handleSubmitClick"></page-modal>
|
||||
<!-- 用户余额修改 -->
|
||||
<page-modal
|
||||
ref="editMoneyModalRef"
|
||||
:modal-config="editMoneyModalConfig"
|
||||
@formDataChange="formDataChange"
|
||||
@submit-click="handleSubmitClick"
|
||||
></page-modal>
|
||||
<page-modal ref="editMoneyModalRef" :modal-config="editMoneyModalConfig" @formDataChange="formDataChange"
|
||||
@submit-click="handleSubmitClick"></page-modal>
|
||||
|
||||
<!-- 用户优惠券详情 -->
|
||||
<UserCouponDialog ref="userCouponDialogRef"></UserCouponDialog>
|
||||
@@ -142,6 +111,7 @@ import editMoneyModalConfig, { addOptions, reduceOptions } from "./config/edit-m
|
||||
import searchConfig from "./config/search";
|
||||
import { returnOptionsLabel } from "./config/config";
|
||||
import shopUserApi from "@/api/account/shopUser";
|
||||
import { useRoute } from 'vue-router'
|
||||
const editMoneyModalRef = ref(null);
|
||||
const userCouponDialogRef = ref(null);
|
||||
const GiveCouponRef = ref(null);
|
||||
@@ -165,6 +135,9 @@ const {
|
||||
} = usePage();
|
||||
|
||||
function searchQueryClick(e) {
|
||||
console.log(e);
|
||||
|
||||
|
||||
handleQueryClick(e);
|
||||
// 获取统计数据
|
||||
getSummary();
|
||||
@@ -224,7 +197,7 @@ function handleToolbarClick(name) {
|
||||
}
|
||||
|
||||
// 赠送券
|
||||
function toGiveCoupon() {}
|
||||
function toGiveCoupon() { }
|
||||
// 其他操作列
|
||||
async function handleOperatClick(data) {
|
||||
const row = data.row;
|
||||
@@ -250,7 +223,14 @@ async function handleOperatClick(data) {
|
||||
}
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(() => {
|
||||
if (route.query.phone) {
|
||||
searchQueryClick({
|
||||
key: route.query.phone
|
||||
})
|
||||
}
|
||||
getSummary(searchRef.value.getQueryParams());
|
||||
});
|
||||
</script>
|
||||
@@ -258,6 +238,7 @@ onMounted(() => {
|
||||
.align-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: #f5f5f5;
|
||||
padding: 0 14px;
|
||||
|
||||
Reference in New Issue
Block a user