添加字体,添加修改账号密码

This commit is contained in:
Leo_Ding 2025-07-21 18:37:04 +08:00
parent 7beb9fd909
commit 8c23f026c9
25 changed files with 304 additions and 75 deletions

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4966438 */
src: url('iconfont.woff2?t=1752057370159') format('woff2'),
url('iconfont.woff?t=1752057370159') format('woff'),
url('iconfont.ttf?t=1752057370159') format('truetype');
src: url('iconfont.woff2?t=1752205287294') format('woff2'),
url('iconfont.woff?t=1752205287294') format('woff'),
url('iconfont.ttf?t=1752205287294') format('truetype');
}
.iconfont {
@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-yonghu:before {
content: "\e616";
}
.icon-huiyishi1:before {
content: "\e60a";
}
.icon-cooperation:before {
content: "\e611";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,20 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "5270862",
"name": "用户群体-业务查询",
"font_class": "yonghu",
"unicode": "e616",
"unicode_decimal": 58902
},
{
"icon_id": "7414004",
"name": "会议室",
"font_class": "huiyishi1",
"unicode": "e60a",
"unicode_decimal": 58890
},
{
"icon_id": "551475",
"name": "同行互助",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -54,4 +54,18 @@ const userStatus = new EnumManager([
{ value: 1, name: '启用', color: '#52c41a' }, // 黄色(警告色)
{ value: 2, name: '禁用', color: '#ff4d4f' } // 红色(错误色)
])
export {activatyStatus,enumsStatus,orderStatus,announcementStatus,nbdMutualStatus,workTypeStatus,mettingStatus,userStatus}
//门店列表类型状态
const storeStatus = new EnumManager([
{ value: 1, name: '待审核', color: '#faad14' }, // 黄色(警告色)
{ value: 2, name: '启用', color: '#52c41a' }, // 绿色(进行中)
// { value: 98, name: '禁用', color: '#bfbfbf' }, // 灰色(失效色)
{ value: 99, name: '审核不通过', color: '#ff4d4f' } // 红色(错误色)
])
//门店列表类型状态
const homeStatus = new EnumManager([
{ value: 1, name: '待审核', color: '#faad14' }, // 黄色(警告色)
{ value: 2, name: '启用', color: '#52c41a' }, // 绿色(进行中)
// { value: 98, name: '禁用', color: '#bfbfbf' }, // 灰色(失效色)
{ value: 99, name: '审核不通过', color: '#ff4d4f' } // 红色(错误色)
])
export {activatyStatus,enumsStatus,orderStatus,announcementStatus,nbdMutualStatus,workTypeStatus,mettingStatus,userStatus,storeStatus,homeStatus}

View File

@ -168,7 +168,7 @@ export default [
name: 'mettingMgt',
component: 'RouteViewLayout',
meta: {
icon: 'icon-zhoubian',
icon: 'icon-huiyishi1',
title: '会议室管理',
isMenu: true,
keepAlive: true,
@ -206,7 +206,7 @@ export default [
name: 'customer',
component: 'pages/user/index.vue',
meta: {
icon: HomeOutlined,
icon: 'icon-yonghu',
title: '用户管理',
isMenu: true,
keepAlive: true,

View File

@ -1,6 +1,6 @@
<template>
<a-modal :open="modal.open" :title="modal.title" :width="640" :confirm-loading="modal.confirmLoading"
:after-close="onAfterClose" :cancel-text="cancelText" :ok-text="okText" @ok="handleOk" @cancel="handleCancel" :ok-button-props="{ disabled: formData.status!==2 }">
:after-close="onAfterClose" :cancel-text="cancelText" :ok-text="okText" @ok="handleOk" @cancel="handleCancel" >
<a-spin :spinning="spining">
<a-form ref="formRef" :model="formData" :rules="formRules">
<a-card class="mb-8-2">
@ -135,7 +135,8 @@ function handleOk() {
const params = {
...values,
cover: formData.value.cover?spliceUrl(formData.value.cover[0]):'',
images: formData.value.images ? formData.value.images.map(item => spliceUrl(item)) : []
images: formData.value.images ? formData.value.images.map(item => spliceUrl(item)) : [],
status:1
}
let result = null
switch (modal.value.type) {

View File

@ -144,6 +144,7 @@ const columns = [
{ title: '活动标题', dataIndex: 'title' },
{ title: '活动时间', dataIndex: 'openAt', align: 'center' },
{ title: '活动内容', dataIndex: 'content', align: 'center', width: 100 },
{ title: '备注', dataIndex: 'remark'},
{ title: '状态', dataIndex: 'status', align: 'center', width: 100 },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 140, align: 'center' },
]

View File

@ -1,6 +1,6 @@
<template>
<a-modal :open="modal.open" :title="modal.title" :width="640" :confirm-loading="modal.confirmLoading"
:after-close="onAfterClose" :cancel-text="cancelText" :ok-text="okText" @ok="handleOk" @cancel="handleCancel" :ok-button-props="{ disabled: formData.status!==1 }">
:after-close="onAfterClose" :cancel-text="cancelText" :ok-text="okText" @ok="handleOk" @cancel="handleCancel">
<a-spin :spinning="spining">
<a-form ref="formRef" :model="formData" :rules="formRules" :label-col="{ style: { width: '90px' } }">
<a-card class="mb-8-2">
@ -118,15 +118,13 @@ function handleOk() {
formRef.value
.validateFields()
.then(async (values) => {
console.log(2222)
try {
showLoading()
const params = {
...values,
cover:formData.value.cover?spliceUrl(formData.value.cover[0]):''
cover:formData.value.cover?spliceUrl(formData.value.cover[0]):'',
status:1
}
console.log(params);
let result = null
switch (modal.value.type) {
case 'create':

View File

@ -121,6 +121,8 @@ const columns = [
{ title: '简介', dataIndex: 'desc', ellipsis: true },
{ title: '排序', dataIndex: 'sequence', width: 80, align: 'center' },
{ title: '状态', key: 'status', dataIndex: 'status', width: 120, align: 'center' },
{ title: '备注', dataIndex: 'remark', ellipsis: true },
{ title: '创建时间', dataIndex: 'createdAt', width: 200, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 140, align: 'center' },
]

View File

@ -18,7 +18,7 @@
<a-col :span="24">
<a-form-item :label="'状态'" name="status">
<a-radio-group v-model:value="formData.status" :options="enumsStatus.getAll()"></a-radio-group>
<a-radio-group v-model:value="formData.status" :options="homeStatus.getAll()" disabled></a-radio-group>
</a-form-item>
</a-col>
@ -45,7 +45,7 @@ import { useI18n } from 'vue-i18n'
import dayjs from 'dayjs'
import { createMenu, getMenu, updateMenu } from '@/apis/modules/imgmgt'
import {spliceUrl} from '@/utils/util'
import { enumsStatus } from '@/enums/index.js'
import { homeStatus } from '@/enums/index.js'
const emit = defineEmits(['ok'])
const { t } = useI18n() // t
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
@ -108,6 +108,7 @@ function handleOk() {
...values,
img: spliceUrl(formData.value?.img[0]),
scene: 1 ,
status:1
}
let result = null
switch (modal.value.type) {

View File

@ -11,7 +11,7 @@
<a-col v-bind="colSpan">
<a-form-item label="状态" name="status">
<a-select v-model:value="searchFormData.status" allowClear>
<a-select-option v-for="item of enumsStatus.getAll()" :value="item.value">{{ item.label
<a-select-option v-for="item of homeStatus.getAll()" :value="item.value">{{ item.label
}}</a-select-option>
</a-select>
</a-form-item>
@ -27,7 +27,7 @@
</a-row>
</a-form>
</template>
</x-search-bar> -->
</x-search-bar> -->
<a-row :gutter="8" :wrap="false">
<a-col flex="auto">
<a-card type="flex">
@ -47,14 +47,20 @@
</template>
<template v-if="'status' === column.dataIndex">
<a-tag :color="enumsStatus.getColor(record.status)">{{ enumsStatus.getName(record.status)
}}</a-tag>
<a-tag :color="homeStatus.getColor(record.status)">{{ homeStatus.getName(record.status)
}}</a-tag>
</template>
<template v-if="'action' === column.key">
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<a-tooltip>
<template #title> {{ $t('pages.system.user.edit') }}</template>
<edit-outlined /> </a-tooltip></x-action-button>
<x-action-button @click="auditHandleEdit(record, 'audit')" v-if="record.status === 1">
<a-tooltip>
<template #title> {{ '审核' }}</template>
<i class='iconfont icon-shenhe' style='font-size:14px;color:#faad14'></i>
</a-tooltip>
</x-action-button>
<x-action-button @click="handleDelete(record)">
<a-tooltip>
<template #title>{{ $t('pages.system.delete') }}</template>
@ -65,7 +71,18 @@
</a-card>
</a-col>
</a-row>
<a-modal :open="open" :title="'审核'" :width="640" title="审核" ok-text="确认" cancel-text="取消" @ok="handleAuditEdit"
@cancel="open = false">
<a-card class="mb-8-2">
<a-form-item :label="'审核'" name="">
<a-radio-group v-model:value="auditStatus"
:options="[{ value: 2, label: '通过' }, { value: 99, label: '不通过' }]"></a-radio-group>
</a-form-item>
<a-form-item :label="'备注'" name="">
<a-textarea v-model:value="remark"></a-textarea>
</a-form-item>
</a-card>
</a-modal>
<edit-dialog ref="editDialogRef" @ok="onOk"></edit-dialog>
</template>
@ -82,17 +99,22 @@ import EditDialog from './components/EditDialog.vue'
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
import { useI18n } from 'vue-i18n'
import { delMenu, getDataList } from '@/apis/modules/imgmgt'
import { enumsStatus } from '@/enums/index.js'
import { homeStatus } from '@/enums/index.js'
defineOptions({
name: 'homeBanner',
})
const currentForm = ref({})
const open = ref(false)
const auditStatus = ref(2)
const remark = ref('')
const { t } = useI18n() // t
const columns = [
{ title: '图片', dataIndex: 'img', width: 100, align: 'center' },
{ title: '名称', dataIndex: 'title', key: 'name' },
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
{ title: '备注', dataIndex: 'remark', align: 'center' },
{ title: '顺序', dataIndex: 'sequence', width: 100, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 140, align: 'center' },
]
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
@ -128,7 +150,29 @@ async function getPageList() {
hideLoading()
}
}
const auditHandleEdit = (params) => {
currentForm.value = params
open.value = true
}
const handleAuditEdit = async () => {
try {
const params = {
...currentForm.value,
status: auditStatus.value,
remark: remark.value
}
const result = await apis.imgmgt.updateMenu(currentForm.value.id, params).catch(() => {
throw new Error()
})
if (config('http.code.success') === result?.success) {
getPageList()
open.value = false
message.success('审核成功')
}
} catch (error) {
message.error(error.message)
}
}
/**
* 删除
*/

View File

@ -13,6 +13,10 @@ export const CommentItem = {
type: Number,
default: 0,
},
parentName:{
type:String,
default:''
}
},
setup(props) {
// 日期格式化函数
@ -22,7 +26,7 @@ export const CommentItem = {
// 返回渲染函数
return () => {
const { comment, depth } = props
const { comment, depth,parentName } = props
// 创建子评论元素(递归部分)
let childComments = null
if (comment.children?.length && depth < 10) {
@ -35,21 +39,22 @@ export const CommentItem = {
comment: child,
key: child.id,
depth: depth + 1, // 传递增加后的深度
parentName:comment.pusherName||''
})
)
)
}
// 构建主组件结构
return h('div', { class: 'comment' }, [
return h('div', { class: 'comment'}, [
// 评论头部
h('div', { class: 'comment-header' }, [
h('span', { class: 'username' }, comment.pusherName),
h('span', { class: 'time' }, formatDate(comment.createdAt)),
h('div', { class: 'comment-header',style:{display:'flex',justifyContent: 'space-between'} }, [
h('div', { class: 'username' }, parentName&&depth!==0?`${comment.pusherName}@${parentName}`:comment.pusherName),
h('span', { class: 'time',style:{color:'#999999'} }, formatDate(comment.createdAt)),
]),
// 评论内容
h('div', { class: 'comment-content' }, comment.content),
h('div', { class: 'comment-content',style:{color:'#999999',marginBottom:'5px'} }, comment.content),
// 子评论容器
childComments,

View File

@ -98,14 +98,14 @@
</a-form-item>
</a-card>
</a-modal>
<a-modal v-model:open="historyOpen" :title="'历史记录'" @ok="historyOpen = false">
<a-modal v-model:open="historyOpen" destroyOnClose :title="'历史记录'" @ok="historyOpen = false">
<a-spin :spinning="spining">
<a-card class="mb-8-2">
<p>{{ nbdMutualAidInfo.content }}</p>
<div v-if="nbdMutualAidInfo.histories.length > 0">
<comment-item v-for="comment in nbdMutualAidInfo.histories" :key="comment.id" :comment="comment" />
<p style="background-color: #f9f9f9;padding: 10px;border-radius: 5px;box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);">{{ nbdMutualAidInfo.content }}</p>
<div v-if="nbdMutualAidInfo.histories&&nbdMutualAidInfo.histories.length > 0" >
<comment-item v-for="comment in nbdMutualAidInfo.histories" :key="comment.id" :comment="comment" :parentName="comment.pusherName"/>
</div>
<span v-else>暂无记录...</span>
<div v-else>暂无评论记录...</div>
</a-card>
</a-spin>
</a-modal>

View File

@ -19,7 +19,7 @@
<a-col :span="24">
<a-form-item :label="'状态'" name="status">
<a-radio-group v-model:value="formData.status"
:options="enumsStatus.getAll()"></a-radio-group>
:options="homeStatus.getAll()" disabled></a-radio-group>
</a-form-item>
</a-col>
<a-col :span="24">
@ -43,7 +43,7 @@ import { useForm, useModal, useSpining } from '@/hooks'
import { message } from 'ant-design-vue'
import { useI18n } from 'vue-i18n'
import dayjs from 'dayjs'
import { enumsStatus } from '@/enums/index.js'
import { homeStatus } from '@/enums/index.js'
import { spliceUrl } from '@/utils/util'
const emit = defineEmits(['ok'])
const { t } = useI18n() // t
@ -107,6 +107,7 @@ function handleOk() {
...values,
img: spliceUrl(formData.value?.img[0]),
scene: 2,
status:1
}
let result = null
switch (modal.value.type) {

View File

@ -11,7 +11,7 @@
<a-col v-bind="colSpan">
<a-form-item label="状态" name="status">
<a-select v-model:value="searchFormData.status" allowClear>
<a-select-option v-for="item of enumsStatus.getAll()" :value="item.value">{{ item.label }}</a-select-option>
<a-select-option v-for="item of homeStatus.getAll()" :value="item.value">{{ item.label }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
@ -26,7 +26,7 @@
</a-row>
</a-form>
</template>
</x-search-bar> -->
</x-search-bar> -->
<a-row :gutter="8" :wrap="false">
<a-col flex="auto">
<a-card type="flex">
@ -39,20 +39,27 @@
</a-button>
</x-action-bar>
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
:pagination="paginationState" :scroll="{ x: 1000 }" @change="onTableChange">
:pagination="paginationState" :scroll="{ x: 1000 }" @change="onTableChange">
<template #bodyCell="{ column, record }">
<template v-if="'img' === column.dataIndex">
<a-image :width="60" :src="record.img?config('http.apiBasic')+record.img:errImg" />
<a-image :width="60" :src="record.img ? config('http.apiBasic') + record.img : errImg" />
</template>
<template v-if="'status' === column.dataIndex">
<a-tag :color="enumsStatus.getColor(record.status)">{{ enumsStatus.getName(record.status) }}</a-tag>
<a-tag :color="homeStatus.getColor(record.status)">{{ homeStatus.getName(record.status)
}}</a-tag>
</template>
<template v-if="'action' === column.key">
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<a-tooltip>
<template #title> {{ $t('pages.system.user.edit') }}</template>
<edit-outlined /> </a-tooltip></x-action-button>
<x-action-button @click="auditHandleEdit(record)" v-if="record.status === 1">
<a-tooltip>
<template #title> {{ '审核' }}</template>
<i class='iconfont icon-shenhe' style='font-size:14px;color:#faad14'></i>
</a-tooltip>
</x-action-button>
<x-action-button @click="handleDelete(record)">
<a-tooltip>
<template #title>{{ $t('pages.system.delete') }}</template>
@ -63,7 +70,18 @@
</a-card>
</a-col>
</a-row>
<a-modal :open="open" :title="'审核'" :width="640" title="审核" ok-text="确认" cancel-text="取消" @ok="handleAuditEdit"
@cancel="open = false">
<a-card class="mb-8-2">
<a-form-item :label="'审核'" name="">
<a-radio-group v-model:value="auditStatus"
:options="[{ value: 2, label: '通过' }, { value: 99, label: '不通过' }]"></a-radio-group>
</a-form-item>
<a-form-item :label="'备注'" name="">
<a-textarea v-model:value="remark"></a-textarea>
</a-form-item>
</a-card>
</a-modal>
<edit-dialog ref="editDialogRef" @ok="onOk"></edit-dialog>
</template>
@ -80,17 +98,22 @@ import EditDialog from './components/EditDialog.vue'
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
import { useI18n } from 'vue-i18n'
import { delMenu, getDataList } from '@/apis/modules/imgmgt'
import { enumsStatus } from '@/enums/index.js'
import { homeStatus } from '@/enums/index.js'
defineOptions({
name: 'homeBanner',
name: 'neighBanner',
})
const currentForm = ref({})
const open = ref(false)
const auditStatus = ref(2)
const remark = ref('')
const { t } = useI18n() // t
const columns = [
{ title: '图片', dataIndex: 'img', width: 100, align: 'center' },
{ title: '名称', dataIndex: 'title', key: 'name' },
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
{ title: '备注', dataIndex: 'remark',align: 'center' },
{ title: '顺序', dataIndex: 'sequence', width: 100, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 140, align: 'center' },
]
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
@ -109,7 +132,7 @@ async function getPageList() {
const { success, data, total } = await apis.imgmgt
.getDataList({
pageSize,
current:current,
current: current,
scene: 2,
...searchFormData.value,
})
@ -126,7 +149,29 @@ async function getPageList() {
hideLoading()
}
}
const auditHandleEdit = (params) => {
currentForm.value = params
open.value = true
}
const handleAuditEdit = async () => {
try {
const params = {
...currentForm.value,
status: auditStatus.value,
remark: remark.value
}
const result = await apis.imgmgt.updateMenu(currentForm.value.id, params).catch(() => {
throw new Error()
})
if (config('http.code.success') === result?.success) {
getPageList()
open.value = false
message.success('审核成功')
}
} catch (error) {
message.error(error.message)
}
}
/**
* 删除
*/

View File

@ -40,7 +40,7 @@
<a-col :span="24">
<a-form-item :label="'状态'" name="status">
<a-radio-group v-model:value="formData.status"
:options="enumsStatus.getAll()"></a-radio-group>
:options="storeStatus.getAll()" disabled></a-radio-group>
</a-form-item>
</a-col>
<a-col :span="24">
@ -104,7 +104,7 @@ import apis from '@/apis'
import { useForm, useModal, useSpining } from '@/hooks'
import { message } from 'ant-design-vue'
import { useI18n } from 'vue-i18n'
import { enumsStatus } from '@/enums/index.js'
import { storeStatus } from '@/enums/index.js'
import { spliceUrl } from '@/utils/util'
import { init } from 'echarts'
const areaFormRef = ref()
@ -166,8 +166,8 @@ async function handleEdit(record = {}) {
return
}
formData.value = { ...data }
formData.value.storeCover=data.storeCover?[config('http.apiBasic')+data.storeCover]:''
formData.value.img=data.img?[config('http.apiBasic')+data.img]:''
formData.value.storeCover=data.storeCover?[config('http.apiBasic')+data.storeCover]:[]
formData.value.img=data.img?[config('http.apiBasic')+data.img]:[]
initData()
}
/**
@ -183,7 +183,8 @@ function handleOk() {
storeCover: formData.value.storeCover ? spliceUrl(formData.value.storeCover[0]) : '',
img: formData.value.img ? spliceUrl(formData.value.img[0]) : '',
latitude: parseFloat(formData.value.latitude),
longitude: parseFloat(formData.value.longitude)
longitude: parseFloat(formData.value.longitude),
status:1
}
let result = null
switch (modal.value.type) {

View File

@ -14,7 +14,7 @@
:pagination="paginationState" @change="onTableChange">
<template #bodyCell="{ column, record }">
<template v-if="'status' === column.dataIndex">
<a-tag :color="enumsStatus.getColor(record.status)">{{ enumsStatus.getName(record.status)
<a-tag :color="storeStatus.getColor(record.status)">{{ storeStatus.getName(record.status)
}}</a-tag>
</template>
<template v-if="'action' === column.key">
@ -22,17 +22,36 @@
<a-tooltip>
<template #title>编辑</template>
<edit-outlined /> </a-tooltip></x-action-button>
<x-action-button @click="handleDelete(record)">
<x-action-button @click="auditHandleEdit(record)" v-if="record.status === 1">
<a-tooltip>
<template #title>撤销</template>
<delete-outlined style="color: #ff4d4f" /> </a-tooltip></x-action-button>
<template #title>审核</template>
<i class='iconfont icon-shenhe' style='font-size:14px;color:#faad14'></i>
</a-tooltip>
</x-action-button>
<x-action-button @click="handleDelete(record.id)">
<a-tooltip>
<template #title>删除</template>
<delete-outlined style="color: #ff4d4f" />
</a-tooltip>
</x-action-button>
</template>
</template>
</a-table>
</a-card>
</a-col>
</a-row>
<a-modal :open="open" :title="'审核'" :width="640" title="审核" ok-text="确认" cancel-text="取消" @ok="handleAuditEdit"
@cancel="open = false">
<a-card class="mb-8-2">
<a-form-item :label="'审核'" name="">
<a-radio-group v-model:value="auditStatus"
:options="[{ value: 2, label: '通过' }, { value: 99, label: '不通过' }]"></a-radio-group>
</a-form-item>
<a-form-item :label="'备注'" name="">
<a-textarea v-model:value="remark"></a-textarea>
</a-form-item>
</a-card>
</a-modal>
<edit-dialog ref="editDialogRef" @ok="onOk"></edit-dialog>
</template>
@ -45,7 +64,7 @@ import { usePagination } from '@/hooks'
import EditDialog from './components/EditDialog.vue'
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
import { useI18n } from 'vue-i18n'
import { enumsStatus } from '@/enums/index.js'
import { storeStatus } from '@/enums/index.js'
defineOptions({
name: 'serverList',
})
@ -59,11 +78,14 @@ const columns = [
{ title: '详细地址', dataIndex: 'storeAddress', ellipsis: true },
{ title: '营业时间', dataIndex: 'openAt' },
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 140, align: 'center' },
]
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } =
usePagination()
const currentForm = ref({})
const open = ref(false)
const auditStatus = ref(2)
const remark = ref('')
const editDialogRef = ref()
getPageList()
/**
@ -94,7 +116,29 @@ async function getPageList() {
hideLoading()
}
}
const auditHandleEdit = (params) => {
currentForm.value = params
open.value = true
}
const handleAuditEdit = async () => {
try {
const params = {
...currentForm.value,
status: auditStatus.value,
remark: remark.value
}
const result = await apis.serverList.updateMenu(currentForm.value.id, params).catch(() => {
throw new Error()
})
if (config('http.code.success') === result?.success) {
getPageList()
open.value = false
message.success('审核成功')
}
} catch (error) {
message.error(error.message)
}
}
/**
* 删除
*/

View File

@ -85,7 +85,8 @@ function handleOk() {
showLoading()
const params = {
...values,
iconUrl:formData.value.iconUrl?spliceUrl(formData.value.iconUrl[0]):''
iconUrl:formData.value.iconUrl?spliceUrl(formData.value.iconUrl[0]):'',
status:1
}
let result = null
switch (modal.value.type) {

View File

@ -13,18 +13,27 @@
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
:pagination="paginationState" @change="onTableChange">
<template #bodyCell="{ column, record }">
<template v-if="'iconUrl'===column.dataIndex">
<a-image :width="60" :src="record.iconUrl?config('http.apiBasic')+record.iconUrl:errImg" />
<template v-if="'iconUrl' === column.dataIndex">
<a-image :width="60" :src="record.iconUrl ? config('http.apiBasic') + record.iconUrl : errImg" />
</template>
<template v-if="'status' === column.dataIndex">
<a-tag :color="orderStatus.getColor(record.status)">{{ orderStatus.getName(record.status)}}</a-tag>
<a-tag :color="orderStatus.getColor(record.status)">{{
orderStatus.getName(record.status)}}</a-tag>
</template>
<template v-if="'action' === column.key">
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<a-tooltip>
<template #title>编辑分类</template>
<edit-outlined /> </a-tooltip></x-action-button>
<x-action-button @click="handleDelete(record)">
<edit-outlined />
</a-tooltip>
</x-action-button>
<x-action-button @click="auditHandleEdit(record)" v-if="record.status === 1">
<a-tooltip>
<template #title>审核</template>
<i class='iconfont icon-shenhe' style='font-size:14px;color:#faad14'></i>
</a-tooltip>
</x-action-button>
<x-action-button @click="handleDelete(record.id)">
<a-tooltip>
<template #title>{{ $t('pages.system.delete') }}</template>
<delete-outlined style="color: #ff4d4f" />
@ -36,7 +45,18 @@
</a-card>
</a-col>
</a-row>
<a-modal :open="open" :title="'审核'" :width="640" title="审核" ok-text="确认" cancel-text="取消" @ok="handleAuditEdit"
@cancel="open = false">
<a-card class="mb-8-2">
<a-form-item :label="'审核'" name="">
<a-radio-group v-model:value="auditStatus"
:options="[{ value: 2, label: '通过' }, { value: 99, label: '不通过' }]"></a-radio-group>
</a-form-item>
<a-form-item :label="'备注'" name="">
<a-textarea v-model:value="remark"></a-textarea>
</a-form-item>
</a-card>
</a-modal>
<edit-dialog ref="editDialogRef" @ok="onOk"></edit-dialog>
</template>
@ -54,13 +74,17 @@ import errImg from '@/assets/blankSpace.png'
defineOptions({
name: 'serverType',
})
const currentForm = ref({})
const open = ref(false)
const auditStatus = ref(2)
const remark = ref('')
const { t } = useI18n() // t
const columns = [
{ title: '分类名称', dataIndex: 'label' },
// { title: '', dataIndex: 'iconUrl' },
{ title: '分类排序', dataIndex: 'sequence' },
// { title: '', dataIndex: 'status', width: 120, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 140, align: 'center' },
]
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } =
usePagination()
@ -95,7 +119,29 @@ async function getPageList() {
hideLoading()
}
}
const auditHandleEdit = (params) => {
currentForm.value = params
open.value = true
}
const handleAuditEdit = async () => {
try {
const params = {
...currentForm.value,
status: auditStatus.value,
remark: remark.value
}
const result = await apis.serverType.updateMenu(currentForm.value.id, params).catch(() => {
throw new Error()
})
if (config('http.code.success') === result?.success) {
getPageList()
open.value = false
message.success('审核成功')
}
} catch (error) {
message.error(error.message)
}
}
/**
* 删除
*/

View File

@ -149,12 +149,13 @@ const handleClick = async () => {
status: auditStatus.value,
remark: remark.value
}
const result = await apis.orderList.updateMenu(formData.value.id, params).catch(() => {
const result = await apis.orderList.updateMenu(currentInfo.value.id, params).catch(() => {
throw new Error(error)
})
if (config('http.code.success') === result?.success) {
message.success('已审核')
open.value=false
getPageList()
}
} catch (error) {
message.error({ content: error.message })

View File

@ -97,6 +97,7 @@ function handleOk() {
showLoading()
const params = {
...values,
status:1
}
let result = null
switch (modal.value.type) {

View File

@ -72,6 +72,7 @@ const { t } = useI18n() // 解构出t方法
const columns = [
{ title: '分类名称', dataIndex: 'label' },
{ title: '分类排序', dataIndex: 'sequence' },
{ title: '备注', dataIndex: 'remark' },
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
]