This commit is contained in:
parent
6a428f94a6
commit
d7c236debe
|
@ -45,4 +45,9 @@ export function apiUserDelete(params: any) {
|
|||
// 用户表详情
|
||||
export function apiUserDetail(params: any) {
|
||||
return request.get({ url: '/user/user/detail', params })
|
||||
}
|
||||
|
||||
// 用户采购款明细、余额明细、礼品券明细、返还金明细 type 1,2,3,4(用户采购款明细、余额明细、礼品券明细、返还金明细)
|
||||
export function apiUserFoundList(params: any) {
|
||||
return request.get({ url: '/user/user/fundList', params })
|
||||
}
|
|
@ -309,12 +309,13 @@ const getData = () => {
|
|||
// 清空echarts 数据
|
||||
visitorOption.xAxis.data = []
|
||||
visitorOption.series = []
|
||||
|
||||
visitorOption.legend.data = res.series.map((item: any) => item.name);
|
||||
console.log(res);
|
||||
|
||||
visitorOption.legend.data = Object.values(res.series).map((item: any) => item.name);
|
||||
|
||||
// 写入从后台拿来的数据
|
||||
visitorOption.xAxis.data = res.xAxis;
|
||||
visitorOption.series = res.series.map((item: any) => {
|
||||
visitorOption.xAxis.data = res.x;
|
||||
visitorOption.series = Object.values(res.series).map((item: any) => {
|
||||
return {
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<v-charts style="height: 300px" :option="circleOption" :autoresize="true" />
|
||||
</el-card>
|
||||
</div>
|
||||
<el-card shadow="never" class="mt-4 !border-none">
|
||||
<!-- <el-card shadow="never" class="mt-4 !border-none">
|
||||
<span class="text-2xl">门店业绩</span>
|
||||
<el-table :data="storeList" class="mt-4">
|
||||
<el-table-column prop="avatar" label="logo" min-width="55">
|
||||
|
@ -70,7 +70,7 @@
|
|||
<el-table-column prop="store_product_count" label="门店商品销量" />
|
||||
<el-table-column prop="store_user_count" label="门店新增用户数" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-card> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -301,11 +301,11 @@ const getData = () => {
|
|||
circleOption.series[0].data = res.bing_data;
|
||||
orderList.value = res.order_list;
|
||||
})
|
||||
apiSystemStoreStatisticsStore({
|
||||
date: date
|
||||
}).then(res => {
|
||||
storeList.value = res;
|
||||
})
|
||||
// apiSystemStoreStatisticsStore({
|
||||
// date: date
|
||||
// }).then(res => {
|
||||
// storeList.value = res;
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,13 +27,17 @@
|
|||
<el-input v-model="formDataInfo.password" clearable placeholder="请输入登录密码" :readonly="false" />
|
||||
<div class="text-sm text-orange-400">不修改请留空</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="应缴保证金" prop="bank_code">
|
||||
<el-input v-model="formDataInfo.bank_code" clearable placeholder="请输入银行卡号" />
|
||||
<el-form-item label="保证金" prop="security_deposit">
|
||||
<el-input v-model="formDataInfo.security_deposit" clearable placeholder="请输入应缴纳保证金" />
|
||||
</el-form-item>
|
||||
<el-form-item label="已缴纳" prop="paid_deposit" v-if="mode!='add'">
|
||||
<el-input v-model="formDataInfo.paid_deposit" clearable placeholder="已缴纳保证金"
|
||||
:readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡号" prop="bank_code">
|
||||
<el-input v-model="formDataInfo.bank_code" clearable placeholder="请输入银行卡号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行名称" prop="bank_code">
|
||||
<el-form-item label="银行名称" prop="bank">
|
||||
<el-input v-model="formDataInfo.bank" clearable placeholder="请输入银行名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户地址" prop="bank_address">
|
||||
|
@ -117,6 +121,8 @@ const formData = reactive({
|
|||
staff_name: "",
|
||||
is_store: 1,
|
||||
is_send: 0,
|
||||
security_deposit: "",
|
||||
paid_deposit: "",
|
||||
bank: "",
|
||||
bank_code: "",
|
||||
bank_address: "",
|
||||
|
@ -138,6 +144,8 @@ const formDataInfo = reactive({
|
|||
coord: '',
|
||||
startEndTime: [],
|
||||
selectedValues: [],
|
||||
security_deposit: "",
|
||||
paid_deposit: "",
|
||||
bank: "",
|
||||
bank_code: "",
|
||||
bank_address: "",
|
||||
|
@ -172,6 +180,11 @@ const formRules = reactive<any>({
|
|||
message: '请输入详细地址',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
security_deposit: [{
|
||||
required: true,
|
||||
message: '请输入保证金',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
image: [{
|
||||
required: true,
|
||||
message: '请输入门店logo',
|
||||
|
@ -244,6 +257,7 @@ const handleSubmit = async () => {
|
|||
data.city_code = formDataInfo.selectedValues[1]
|
||||
data.area_code = formDataInfo.selectedValues[2]
|
||||
data.street_code = formDataInfo.selectedValues[3]
|
||||
delete data.paid_deposit;
|
||||
mode.value == 'edit'
|
||||
? await apiSystemStoreEdit(data)
|
||||
: await apiSystemStoreAdd(data)
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<el-table-column label="手机号码" prop="phone" show-overflow-tooltip />
|
||||
<el-table-column label="保证金" prop="phone" >
|
||||
<template #default="{ row }">
|
||||
<div>应缴纳: 1000.00</div>
|
||||
<div>已缴纳: <span class="text-danger">1000.00</span></div>
|
||||
<div>应缴纳: {{row.security_deposit||'-'}}</div>
|
||||
<div>已缴纳: <span class="text-danger">{{ row.paid_deposit || '-' }}</span></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="营业时间" show-overflow-tooltip>
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label="" prop="label_id" show-overflow-tooltip />
|
||||
<el-table-column label="标签名称" prop="label_name" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="userLabelLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiUserFoundList } from '@/api/user'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
|
||||
const props = defineProps({
|
||||
user_id: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
id: props.user_id,
|
||||
type: 2
|
||||
})
|
||||
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiUserFoundList,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
const getList = (e:any)=>{
|
||||
queryParams.id = e.id;
|
||||
getLists();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getLists,
|
||||
getList
|
||||
})
|
||||
</script>
|
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label="" prop="label_id" show-overflow-tooltip />
|
||||
<el-table-column label="标签名称" prop="label_name" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="userLabelLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiUserFoundList } from '@/api/user'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
|
||||
const props = defineProps({
|
||||
user_id: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
id: props.user_id,
|
||||
type: 3
|
||||
})
|
||||
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiUserFoundList,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
const getList = (e:any)=>{
|
||||
queryParams.id = e.id;
|
||||
getLists();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getLists,
|
||||
getList
|
||||
})
|
||||
</script>
|
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label="" prop="label_id" show-overflow-tooltip />
|
||||
<el-table-column label="标签名称" prop="label_name" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="userLabelLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiUserFoundList } from '@/api/user'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
|
||||
const props = defineProps({
|
||||
user_id: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
id: props.user_id,
|
||||
type: 1
|
||||
})
|
||||
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiUserFoundList,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
const getList = (e:any)=>{
|
||||
queryParams.id = e.id;
|
||||
getLists();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getLists,
|
||||
getList
|
||||
})
|
||||
</script>
|
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label="ID" prop="id" min-width="55" />
|
||||
<el-table-column label="标签名称" prop="label_name" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="userLabelLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiUserFoundList } from '@/api/user'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
|
||||
const props = defineProps({
|
||||
user_id: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
id: props.user_id,
|
||||
type: 4
|
||||
})
|
||||
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiUserFoundList,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
const getList = (e:any)=>{
|
||||
queryParams.id = e.id;
|
||||
getLists();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getLists,
|
||||
getList
|
||||
})
|
||||
</script>
|
|
@ -1,26 +1,76 @@
|
|||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
title="详情"
|
||||
:async="true"
|
||||
width="550px"
|
||||
:cancelButtonText="false"
|
||||
:confirmButtonText="false"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px">
|
||||
|
||||
</el-form>
|
||||
</popup>
|
||||
<el-drawer title="用户详情" :size="1200" v-model="isOpen">
|
||||
<div class="flex mb-4">
|
||||
<el-avatar :src="formData.avatar" size="large"></el-avatar>
|
||||
<div class="ml-4 flex flex-col justify-around">
|
||||
<div>昵称: {{ formData.nickname }}</div>
|
||||
<div>电话: {{ formData.mobile }}</div>
|
||||
</div>
|
||||
<div class="ml-8 flex flex-col justify-around">
|
||||
<div>账号: {{ formData.account }}</div>
|
||||
<div>ID: {{ formData.id }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="基础信息" name="first">
|
||||
<el-descriptions class="margin-top" :column="2" border>
|
||||
<el-descriptions-item label="真实姓名">
|
||||
{{ formData.label_name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户性别">
|
||||
<dict-value :options="dictData.sex" :value="formData.sex" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="注册渠道">
|
||||
{{formData.channel}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户类型">
|
||||
{{ formData.vip_name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户标签">{{ formData.label_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="礼品券">{{ formData.integral }}</el-descriptions-item>
|
||||
<el-descriptions-item label="返还金">{{ formData.return_money }}</el-descriptions-item>
|
||||
<el-descriptions-item label="采购款">{{ formData.purchase_funds }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户地址" :span="2">{{ formData.user_address }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间" :span="2">{{ formData.create_time }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购款明细" name="second">
|
||||
<purchase ref="purchaseRef" :user_id="formData.id" :key="key+'a'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="余额明细" name="three">
|
||||
<balance ref="balanceRef" :user_id="formData.id" :key="key+'b'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="礼品券明细" name="four">
|
||||
<merchandise ref="merchandiseRef" :user_id="formData.id" :key="key+'c'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="返还金明细" name="five">
|
||||
<returnMoney ref="returnMoneyRef" :user_id="formData.id" :key="key+'d'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="userDETAILS">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiUserAdd, apiUserEdit, apiUserDetail } from '@/api/user'
|
||||
<script lang="ts" setup name="storeProductDETAILS">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { ElMessage, type FormInstance } from 'element-plus'
|
||||
import { apiUserDetail } from '@/api/user'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
import feedback from '@/utils/feedback'
|
||||
import purchase from './components/purchase.vue'
|
||||
import balance from './components/balance.vue'
|
||||
import merchandise from './components/merchandise.vue'
|
||||
import returnMoney from './components/returnMoney.vue'
|
||||
|
||||
const purchaseRef = ref(null)
|
||||
const balanceRef = ref(null)
|
||||
const merchandiseRef = ref(null)
|
||||
const returnMoneyRef = ref(null)
|
||||
const key = ref(0);
|
||||
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
|
@ -28,33 +78,56 @@ defineProps({
|
|||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
const isOpen = ref(false);
|
||||
const activeName = ref('first');
|
||||
const handleClick = (tab: any) => {
|
||||
if (tab.paneName == "second") purchaseRef.value?.getList({id:formData.id});
|
||||
if (tab.paneName == "three") balanceRef.value?.getList({id:formData.id});
|
||||
if (tab.paneName == "four") merchandiseRef.value?.getList({id:formData.id});
|
||||
if (tab.paneName == "five") returnMoneyRef.value?.getList({id:formData.id});
|
||||
};
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
|
||||
"id": "",
|
||||
"nickname": "",
|
||||
"real_name": "",
|
||||
"sex": 0,
|
||||
"avatar": "",
|
||||
"account": "",
|
||||
"mobile": "",
|
||||
"channel": "",
|
||||
"create_time": "",
|
||||
"purchase_funds": "",
|
||||
"label_id": 0,
|
||||
"integral": "",
|
||||
"vip_name": "",
|
||||
"discount": 0,
|
||||
"limit": 0,
|
||||
"label_name": "",
|
||||
"sex_text": "",
|
||||
"user_address": "",
|
||||
"return_money": 0
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
queryParams.product_id = data.id;
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
handleClick({
|
||||
paneName: activeName.value
|
||||
})
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
queryParams.product_id = row.id
|
||||
const data = await apiUserDetail({
|
||||
id: row.id
|
||||
})
|
||||
|
@ -63,7 +136,7 @@ const getDetail = async (row: Record<string, any>) => {
|
|||
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
popupRef.value?.open()
|
||||
isOpen.value = true;
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
|
@ -71,6 +144,11 @@ const handleClose = () => {
|
|||
emit('close')
|
||||
}
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
product_id: "",
|
||||
})
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="用户名" prop="username">
|
||||
<el-form-item label="用户标签" prop="username">
|
||||
<el-select class="flex-1" v-model="formData.label_id">
|
||||
<el-option
|
||||
v-for="item in labelList"
|
||||
|
@ -79,7 +79,7 @@ const setFormData = async (data: Record<any, any>) => {
|
|||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
if(!formData.label_id) formData.label_id = ''
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -31,32 +31,41 @@
|
|||
删除
|
||||
</el-button> -->
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="ID" prop="id" show-overflow-tooltip />
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange" >
|
||||
<!-- <el-table-column type="selection" width="55" /> -->
|
||||
<el-table-column label="ID" prop="id" min-width="55" />
|
||||
<el-table-column label="头像" prop="avatar" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-image :src="row.avatar" />
|
||||
<el-avatar :src="row.avatar" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="真实姓名" prop="real_name" show-overflow-tooltip />
|
||||
<el-table-column label="用户昵称" prop="nickname" show-overflow-tooltip />
|
||||
<el-table-column label="用户账号" prop="account" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="用户密码" prop="password" show-overflow-tooltip /> -->
|
||||
<el-table-column label="用户电话" prop="mobile" show-overflow-tooltip />
|
||||
<el-table-column label="真实姓名" prop="real_name" />
|
||||
<el-table-column label="用户昵称" prop="nickname" min-width="100" />
|
||||
<el-table-column label="用户账号" prop="account" min-width="100" />
|
||||
<!-- <el-table-column label="用户密码" prop="password" /> -->
|
||||
<el-table-column label="用户电话" prop="mobile" min-width="100" />
|
||||
<el-table-column label="用户性别" prop="sex">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.sex" :value="row.sex" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册渠道" prop="channel" show-overflow-tooltip />
|
||||
<el-table-column label="用户余额" prop="user_money" show-overflow-tooltip />
|
||||
<el-table-column label="累计充值" prop="total_recharge_amount" show-overflow-tooltip />
|
||||
<el-table-column label="注册渠道" prop="channel" />
|
||||
<el-table-column label="用户类型" prop="vip_name" />
|
||||
<el-table-column label="用户标签" prop="label_name" />
|
||||
<el-table-column label="礼品券" prop="integral" />
|
||||
<el-table-column label="返还金" prop="return_money" />
|
||||
<el-table-column label="采购款" prop="purchase_funds" />
|
||||
<el-table-column label="用户余额" prop="user_money" />
|
||||
<el-table-column label="累计充值" prop="total_recharge_amount" />
|
||||
<el-table-column label="地址" prop="user_address" />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['user.user/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['user.user/detail']" type="primary" link @click="handleDetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
<!-- <el-button v-perms="['user.user/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button> -->
|
||||
|
@ -68,6 +77,7 @@
|
|||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<Details ref="detailsRef" :dict-data="dictData"></Details>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
@ -79,6 +89,9 @@ import { apiUserLists, apiUserDelete } from '@/api/user'
|
|||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import Details from "./details.vue";
|
||||
|
||||
const detailsRef = ref(null);
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
|
@ -124,6 +137,13 @@ const handleEdit = async (data: any) => {
|
|||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 详情
|
||||
const handleDetail = async (data: any) => {
|
||||
detailsRef.value?.open();
|
||||
detailsRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
|
|
Loading…
Reference in New Issue