fix(ts): 收敛局部类型并删除 XButton

- 删除 XButton/XTextButton,调用点改回 el-button
- ContextMenu 收窄 trigger,移除 Element Plus 不支持的 focus
- RewardActivityVO 三个商品范围数组改必填,表单创建/加载/重置均初始化为 []
- SpuShowcase 恢复直接 v-model,移除 computed 中转
- MES、Demo03、Codegen 等 VO 对齐表单场景,减少局部 Omit/unknown 断言
- MP 补 SimpleTagVO,修复用户标签 never[] 问题
- Redis 图表 option 在声明处定型,模板去除 EChartsOption cast
- 修复 member 统计页 fenToYuan 漏导入

ts:check 252 → 133,无新增类型错误
master
YunaiV 2026-06-21 04:44:53 -07:00
parent f4b2cc4569
commit 08abd54ca0
106 changed files with 551 additions and 626 deletions

View File

@ -20,6 +20,45 @@ export type CodegenTableVO = {
parentMenuId: number parentMenuId: number
} }
export type CodegenTableSaveReqVO = CodegenTableVO & {
frontType?: number | null
genPath?: string
genType?: string
masterTableId?: number
subJoinColumnId?: number
subJoinMany?: boolean
treeParentColumnId?: number
treeNameColumnId?: number
}
export const createEmptyCodegenTableSaveReqVO = (): CodegenTableSaveReqVO => ({
id: 0,
tableId: 0,
isParentMenuIdValid: false,
dataSourceConfigId: 0,
scene: 0,
tableName: '',
tableComment: '',
remark: '',
moduleName: '',
businessName: '',
className: '',
classComment: '',
author: '',
createTime: new Date(),
updateTime: new Date(),
templateType: 0,
parentMenuId: 0,
frontType: null,
genPath: '',
genType: '',
masterTableId: undefined,
subJoinColumnId: undefined,
subJoinMany: undefined,
treeParentColumnId: undefined,
treeNameColumnId: undefined
})
export type CodegenColumnVO = { export type CodegenColumnVO = {
id: number id: number
tableId: number tableId: number
@ -52,7 +91,7 @@ export type CodegenPreviewVO = {
} }
export type CodegenUpdateReqVO = { export type CodegenUpdateReqVO = {
table: CodegenTableVO | any table: CodegenTableSaveReqVO
columns: CodegenColumnVO[] columns: CodegenColumnVO[]
} }
@ -68,7 +107,7 @@ export const getCodegenTablePage = (params: PageParam) => {
// 查询详情代码生成表定义 // 查询详情代码生成表定义
export const getCodegenTable = (id: number) => { export const getCodegenTable = (id: number) => {
return request.get({ url: '/infra/codegen/detail?tableId=' + id }) return request.get<CodegenUpdateReqVO>({ url: '/infra/codegen/detail?tableId=' + id })
} }
// 修改代码生成表定义 // 修改代码生成表定义

View File

@ -1,9 +1,8 @@
import request from '@/config/axios' import request from '@/config/axios'
import type { Dayjs } from 'dayjs'
/** 学生课程信息 */ /** 学生课程信息 */
export interface Demo03Course { export interface Demo03Course {
id: number // 编号 id?: number // 编号
studentId?: number // 学生编号 studentId?: number // 学生编号
name?: string // 名字 name?: string // 名字
score?: number // 分数 score?: number // 分数
@ -11,7 +10,7 @@ export interface Demo03Course {
/** 学生班级信息 */ /** 学生班级信息 */
export interface Demo03Grade { export interface Demo03Grade {
id: number // 编号 id?: number // 编号
studentId?: number // 学生编号 studentId?: number // 学生编号
name?: string // 名字 name?: string // 名字
teacher?: string // 班主任 teacher?: string // 班主任
@ -19,10 +18,10 @@ export interface Demo03Grade {
/** 学生信息 */ /** 学生信息 */
export interface Demo03Student { export interface Demo03Student {
id: number // 编号 id?: number // 编号
name?: string // 名字 name?: string // 名字
sex?: number // 性别 sex?: number // 性别
birthday?: string | Dayjs // 出生日期 birthday?: string | number // 出生日期
description?: string // 简介 description?: string // 简介
} }

View File

@ -1,9 +1,8 @@
import request from '@/config/axios' import request from '@/config/axios'
import type { Dayjs } from 'dayjs'
/** 学生课程信息 */ /** 学生课程信息 */
export interface Demo03Course { export interface Demo03Course {
id: number // 编号 id?: number // 编号
studentId?: number // 学生编号 studentId?: number // 学生编号
name?: string // 名字 name?: string // 名字
score?: number // 分数 score?: number // 分数
@ -11,7 +10,7 @@ export interface Demo03Course {
/** 学生班级信息 */ /** 学生班级信息 */
export interface Demo03Grade { export interface Demo03Grade {
id: number // 编号 id?: number // 编号
studentId?: number // 学生编号 studentId?: number // 学生编号
name?: string // 名字 name?: string // 名字
teacher?: string // 班主任 teacher?: string // 班主任
@ -19,10 +18,10 @@ export interface Demo03Grade {
/** 学生信息 */ /** 学生信息 */
export interface Demo03Student { export interface Demo03Student {
id: number // 编号 id?: number // 编号
name?: string // 名字 name?: string // 名字
sex?: number // 性别 sex?: number // 性别
birthday?: string | Dayjs // 出生日期 birthday?: string | number // 出生日期
description?: string // 简介 description?: string // 简介
demo03courses?: Demo03Course[] demo03courses?: Demo03Course[]
demo03grade?: Demo03Grade demo03grade?: Demo03Grade

View File

@ -1,9 +1,8 @@
import request from '@/config/axios' import request from '@/config/axios'
import type { Dayjs } from 'dayjs'
/** 学生课程信息 */ /** 学生课程信息 */
export interface Demo03Course { export interface Demo03Course {
id: number // 编号 id?: number // 编号
studentId?: number // 学生编号 studentId?: number // 学生编号
name?: string // 名字 name?: string // 名字
score?: number // 分数 score?: number // 分数
@ -11,7 +10,7 @@ export interface Demo03Course {
/** 学生班级信息 */ /** 学生班级信息 */
export interface Demo03Grade { export interface Demo03Grade {
id: number // 编号 id?: number // 编号
studentId?: number // 学生编号 studentId?: number // 学生编号
name?: string // 名字 name?: string // 名字
teacher?: string // 班主任 teacher?: string // 班主任
@ -19,10 +18,10 @@ export interface Demo03Grade {
/** 学生信息 */ /** 学生信息 */
export interface Demo03Student { export interface Demo03Student {
id: number // 编号 id?: number // 编号
name?: string // 名字 name?: string // 名字
sex?: number // 性别 sex?: number // 性别
birthday?: string | Dayjs // 出生日期 birthday?: string | number // 出生日期
description?: string // 简介 description?: string // 简介
demo03courses?: Demo03Course[] demo03courses?: Demo03Course[]
demo03grade?: Demo03Grade demo03grade?: Demo03Grade

View File

@ -5,6 +5,8 @@ export interface CombinationActivityVO {
id?: number id?: number
name?: string name?: string
spuId?: number spuId?: number
spuName?: string
picUrl?: string
totalLimitCount?: number totalLimitCount?: number
singleLimitCount?: number singleLimitCount?: number
startTime?: Date startTime?: Date

View File

@ -10,10 +10,10 @@ export interface RewardActivityVO {
conditionType?: number conditionType?: number
productScope?: number productScope?: number
rules: RewardRule[] rules: RewardRule[]
productScopeValues: number[] // 商品范围:值为品类编号列表、商品编号列表
// 如下仅用于表单,不提交 // 如下仅用于表单,不提交
productScopeValues?: number[] // 商品范围:值为品类编号列表、商品编号列表 productCategoryIds: number[]
productCategoryIds?: number[] productSpuIds: number[]
productSpuIds?: number[]
} }
// 优惠规则 // 优惠规则

View File

@ -5,6 +5,7 @@ export interface SeckillActivityVO {
id?: number id?: number
spuId?: number spuId?: number
name?: string name?: string
picUrl?: string
status?: number status?: number
remark?: string remark?: string
startTime?: Date startTime?: Date

View File

@ -2,14 +2,14 @@ import request from '@/config/axios'
// MES 物料产品分类 VO // MES 物料产品分类 VO
export interface MdItemTypeVO { export interface MdItemTypeVO {
id: number // 分类编号 id?: number // 分类编号
parentId: number // 父分类编号 parentId?: number // 父分类编号
code: string // 分类编码 code?: string // 分类编码
name: string // 分类名称 name?: string // 分类名称
itemOrProduct: string // 物料/产品标识 itemOrProduct: string // 物料/产品标识
sort: number // 显示排序 sort: number // 显示排序
status: number // 状态 status: number // 状态
remark: string // 备注 remark?: string // 备注
} }
// MES 物料产品分类 API // MES 物料产品分类 API

View File

@ -2,14 +2,14 @@ import request from '@/config/axios'
// MES 计量单位 VO // MES 计量单位 VO
export interface MdUnitMeasureVO { export interface MdUnitMeasureVO {
id: number // 单位编号 id?: number // 单位编号
code: string // 单位编码 code?: string // 单位编码
name: string // 单位名称 name?: string // 单位名称
primaryFlag: boolean // 是否主单位 primaryFlag: boolean // 是否主单位
primaryId: number // 主单位编号 primaryId?: number // 主单位编号
changeRate: number // 与主单位换算比例 changeRate?: number // 与主单位换算比例
status: number // 状态 status: number // 状态
remark: string // 备注 remark?: string // 备注
} }
// MES 计量单位 API // MES 计量单位 API

View File

@ -7,6 +7,11 @@ export interface TagVO {
createTime: Date createTime: Date
} }
export interface SimpleTagVO {
tagId: number
name: string
}
// 创建公众号标签 // 创建公众号标签
export const createTag = (data: TagVO) => { export const createTag = (data: TagVO) => {
return request.post({ return request.post({
@ -47,7 +52,7 @@ export const getTagPage = (query: PageParam) => {
// 获取公众号标签精简信息列表 // 获取公众号标签精简信息列表
export const getSimpleTagList = () => { export const getSimpleTagList = () => {
return request.get({ return request.get<SimpleTagVO[]>({
url: '/mp/tag/list-all-simple' url: '/mp/tag/list-all-simple'
}) })
} }

View File

@ -32,10 +32,10 @@ onMounted(() => {
]" ]"
> >
<div :class="[`${prefixCls}-header__back`, 'flex pl-10px pr-10px ']"> <div :class="[`${prefixCls}-header__back`, 'flex pl-10px pr-10px ']">
<ElButton @click="emit('back')"> <el-button @click="emit('back')">
<Icon class="mr-5px" icon="ep:arrow-left" /> <Icon class="mr-5px" icon="ep:arrow-left" />
{{ t('common.back') }} {{ t('common.back') }}
</ElButton> </el-button>
</div> </div>
<div :class="[`${prefixCls}-header__title`, 'flex flex-1 justify-center']"> <div :class="[`${prefixCls}-header__title`, 'flex flex-1 justify-center']">
<slot name="title"> <slot name="title">

View File

@ -23,72 +23,81 @@
<div :class="`${prefixCls}-toolbar`"> <div :class="`${prefixCls}-toolbar`">
<el-upload :beforeUpload="handleBeforeUpload" :fileList="[]" accept="image/*"> <el-upload :beforeUpload="handleBeforeUpload" :fileList="[]" accept="image/*">
<el-tooltip :content="t('cropper.selectImage')" placement="bottom"> <el-tooltip :content="t('cropper.selectImage')" placement="bottom">
<XButton preIcon="ant-design:upload-outlined" type="primary" /> <el-button type="primary">
<Icon icon="ant-design:upload-outlined" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
</el-upload> </el-upload>
<el-space> <el-space>
<el-tooltip :content="t('cropper.btn_reset')" placement="bottom"> <el-tooltip :content="t('cropper.btn_reset')" placement="bottom">
<XButton <el-button
:disabled="!src" :disabled="!src"
preIcon="ant-design:reload-outlined"
size="small" size="small"
type="primary" type="primary"
@click="handlerToolbar('reset')" @click="handlerToolbar('reset')"
/> >
<Icon icon="ant-design:reload-outlined" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :content="t('cropper.btn_rotate_left')" placement="bottom"> <el-tooltip :content="t('cropper.btn_rotate_left')" placement="bottom">
<XButton <el-button
:disabled="!src" :disabled="!src"
preIcon="ant-design:rotate-left-outlined"
size="small" size="small"
type="primary" type="primary"
@click="handlerToolbar('rotate', -45)" @click="handlerToolbar('rotate', -45)"
/> >
<Icon icon="ant-design:rotate-left-outlined" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :content="t('cropper.btn_rotate_right')" placement="bottom"> <el-tooltip :content="t('cropper.btn_rotate_right')" placement="bottom">
<XButton <el-button
:disabled="!src" :disabled="!src"
preIcon="ant-design:rotate-right-outlined"
size="small" size="small"
type="primary" type="primary"
@click="handlerToolbar('rotate', 45)" @click="handlerToolbar('rotate', 45)"
/> >
<Icon icon="ant-design:rotate-right-outlined" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :content="t('cropper.btn_scale_x')" placement="bottom"> <el-tooltip :content="t('cropper.btn_scale_x')" placement="bottom">
<XButton <el-button
:disabled="!src" :disabled="!src"
preIcon="vaadin:arrows-long-h"
size="small" size="small"
type="primary" type="primary"
@click="handlerToolbar('scaleX')" @click="handlerToolbar('scaleX')"
/> >
<Icon icon="vaadin:arrows-long-h" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :content="t('cropper.btn_scale_y')" placement="bottom"> <el-tooltip :content="t('cropper.btn_scale_y')" placement="bottom">
<XButton <el-button
:disabled="!src" :disabled="!src"
preIcon="vaadin:arrows-long-v"
size="small" size="small"
type="primary" type="primary"
@click="handlerToolbar('scaleY')" @click="handlerToolbar('scaleY')"
/> >
<Icon icon="vaadin:arrows-long-v" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :content="t('cropper.btn_zoom_in')" placement="bottom"> <el-tooltip :content="t('cropper.btn_zoom_in')" placement="bottom">
<XButton <el-button
:disabled="!src" :disabled="!src"
preIcon="ant-design:zoom-in-outlined"
size="small" size="small"
type="primary" type="primary"
@click="handlerToolbar('zoom', 0.1)" @click="handlerToolbar('zoom', 0.1)"
/> >
<Icon icon="ant-design:zoom-in-outlined" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :content="t('cropper.btn_zoom_out')" placement="bottom"> <el-tooltip :content="t('cropper.btn_zoom_out')" placement="bottom">
<XButton <el-button
:disabled="!src" :disabled="!src"
preIcon="ant-design:zoom-out-outlined"
size="small" size="small"
type="primary" type="primary"
@click="handlerToolbar('zoom', -0.1)" @click="handlerToolbar('zoom', -0.1)"
/> >
<Icon icon="ant-design:zoom-out-outlined" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
</el-space> </el-space>
</div> </div>

View File

@ -51,7 +51,7 @@ const btnClick = () => {
<img :src="errorMap[type].url" alt="" width="350" /> <img :src="errorMap[type].url" alt="" width="350" />
<div class="text-14px text-[var(--el-color-info)]">{{ errorMap[type].message }}</div> <div class="text-14px text-[var(--el-color-info)]">{{ errorMap[type].message }}</div>
<div class="mt-20px"> <div class="mt-20px">
<ElButton type="primary" @click="btnClick">{{ errorMap[type].buttonText }}</ElButton> <el-button type="primary" @click="btnClick">{{ errorMap[type].buttonText }}</el-button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -114,19 +114,17 @@ const setVisible = () => {
<template #action> <template #action>
<div v-if="layout === 'inline'"> <div v-if="layout === 'inline'">
<!-- update by 芋艿去除搜索的 type="primary"颜色变淡一点 --> <!-- update by 芋艿去除搜索的 type="primary"颜色变淡一点 -->
<ElButton v-if="showSearch" @click="search"> <el-button v-if="showSearch" @click="search">
<Icon class="mr-5px" icon="ep:search" /> <Icon class="mr-5px" icon="ep:search" /> {{ t('common.query') }}
{{ t('common.query') }} </el-button>
</ElButton>
<!-- update by 芋艿 icon="ep:refresh-right" 修改成 icon="ep:refresh" ruoyi-vue 搜索保持一致 --> <!-- update by 芋艿 icon="ep:refresh-right" 修改成 icon="ep:refresh" ruoyi-vue 搜索保持一致 -->
<ElButton v-if="showReset" @click="reset"> <el-button v-if="showReset" @click="reset">
<Icon class="mr-5px" icon="ep:refresh" /> <Icon class="mr-5px" icon="ep:refresh" /> {{ t('common.reset') }}
{{ t('common.reset') }} </el-button>
</ElButton> <el-button v-if="expand" text @click="setVisible">
<ElButton v-if="expand" text @click="setVisible">
{{ t(visible ? 'common.shrink' : 'common.expand') }} {{ t(visible ? 'common.shrink' : 'common.expand') }}
<Icon :icon="visible ? 'ep:arrow-up' : 'ep:arrow-down'" /> <Icon :icon="visible ? 'ep:arrow-up' : 'ep:arrow-down'" />
</ElButton> </el-button>
<!-- add by 芋艿补充在搜索后的按钮 --> <!-- add by 芋艿补充在搜索后的按钮 -->
<slot name="actionMore"></slot> <slot name="actionMore"></slot>
</div> </div>
@ -138,18 +136,16 @@ const setVisible = () => {
<template v-if="layout === 'bottom'"> <template v-if="layout === 'bottom'">
<div :style="bottonButtonStyle"> <div :style="bottonButtonStyle">
<ElButton v-if="showSearch" type="primary" @click="search"> <el-button v-if="showSearch" type="primary" @click="search">
<Icon class="mr-5px" icon="ep:search" /> <Icon class="mr-5px" icon="ep:search" /> {{ t('common.query') }}
{{ t('common.query') }} </el-button>
</ElButton> <el-button v-if="showReset" @click="reset">
<ElButton v-if="showReset" @click="reset"> <Icon class="mr-5px" icon="ep:refresh-right" /> {{ t('common.reset') }}
<Icon class="mr-5px" icon="ep:refresh-right" /> </el-button>
{{ t('common.reset') }} <el-button v-if="expand" text @click="setVisible">
</ElButton>
<ElButton v-if="expand" text @click="setVisible">
{{ t(visible ? 'common.shrink' : 'common.expand') }} {{ t(visible ? 'common.shrink' : 'common.expand') }}
<Icon :icon="visible ? 'ep:arrow-up' : 'ep:arrow-down'" /> <Icon :icon="visible ? 'ep:arrow-up' : 'ep:arrow-down'" />
</ElButton> </el-button>
<!-- add by 芋艿补充在搜索后的按钮 --> <!-- add by 芋艿补充在搜索后的按钮 -->
<slot name="actionMore"></slot> <slot name="actionMore"></slot>
</div> </div>

View File

@ -1,4 +0,0 @@
import XButton from './src/XButton.vue'
import XTextButton from './src/XTextButton.vue'
export { XButton, XTextButton }

View File

@ -1,50 +0,0 @@
<script lang="ts" setup>
import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes'
defineOptions({ name: 'XButton' })
const props = defineProps({
modelValue: propTypes.bool.def(false),
loading: propTypes.bool.def(false),
preIcon: propTypes.string.def(''),
postIcon: propTypes.string.def(''),
title: propTypes.string.def(''),
type: propTypes.oneOf(['', 'primary', 'success', 'warning', 'danger', 'info']).def(''),
link: propTypes.bool.def(false),
circle: propTypes.bool.def(false),
round: propTypes.bool.def(false),
plain: propTypes.bool.def(false),
onClick: { type: Function as PropType<(...args) => any>, default: null }
})
const getBindValue = computed(() => {
const delArr: string[] = ['title', 'preIcon', 'postIcon', 'onClick']
const attrs = useAttrs()
const obj = { ...attrs, ...props }
for (const key in obj) {
if (delArr.indexOf(key) !== -1) {
delete obj[key]
}
}
return obj
})
</script>
<template>
<el-button v-bind="getBindValue" @click="onClick">
<Icon v-if="preIcon" :icon="preIcon" class="mr-1px" />
{{ title ? title : '' }}
<Icon v-if="postIcon" :icon="postIcon" class="mr-1px" />
</el-button>
</template>
<style lang="scss" scoped>
:deep(.el-button.is-text) {
padding: 8px 4px;
margin-left: 0;
}
:deep(.el-button.is-link) {
padding: 8px 4px;
margin-left: 0;
}
</style>

View File

@ -1,49 +0,0 @@
<script lang="ts" setup>
import { propTypes } from '@/utils/propTypes'
import { PropType } from 'vue'
defineOptions({ name: 'XTextButton' })
const props = defineProps({
modelValue: propTypes.bool.def(false),
loading: propTypes.bool.def(false),
preIcon: propTypes.string.def(''),
postIcon: propTypes.string.def(''),
title: propTypes.string.def(''),
type: propTypes.oneOf(['', 'primary', 'success', 'warning', 'danger', 'info']).def('primary'),
circle: propTypes.bool.def(false),
round: propTypes.bool.def(false),
plain: propTypes.bool.def(false),
onClick: { type: Function as PropType<(...args) => any>, default: null }
})
const getBindValue = computed(() => {
const delArr: string[] = ['title', 'preIcon', 'postIcon', 'onClick']
const attrs = useAttrs()
const obj = { ...attrs, ...props }
for (const key in obj) {
if (delArr.indexOf(key) !== -1) {
delete obj[key]
}
}
return obj
})
</script>
<template>
<el-button link v-bind="getBindValue" @click="onClick">
<Icon v-if="preIcon" :icon="preIcon" class="mr-1px" />
{{ title ? title : '' }}
<Icon v-if="postIcon" :icon="postIcon" class="mr-1px" />
</el-button>
</template>
<style lang="scss" scoped>
:deep(.el-button.is-text) {
padding: 8px 4px;
margin-left: 0;
}
:deep(.el-button.is-link) {
padding: 8px 4px;
margin-left: 0;
}
</style>

View File

@ -4,32 +4,34 @@
<slot name="control-header"></slot> <slot name="control-header"></slot>
<template v-if="!$slots['control-header']"> <template v-if="!$slots['control-header']">
<ElButtonGroup key="file-control"> <ElButtonGroup key="file-control">
<XButton preIcon="ep:folder-opened" title="打开文件" @click="refFile.click()" /> <el-button @click="refFile.click()">
<Icon icon="ep:folder-opened" class="mr-1px" /> 打开文件
</el-button>
<el-tooltip effect="light" placement="bottom"> <el-tooltip effect="light" placement="bottom">
<template #content> <template #content>
<div style="color: #409eff"> <div style="color: #409eff">
<!-- <el-button link @click="downloadProcessAsXml()">XML</el-button> --> <!-- <el-button link @click="downloadProcessAsXml()">XML</el-button> -->
<XTextButton title="下载为XML文件" @click="downloadProcessAsXml()" /> <el-button link @click="downloadProcessAsXml()">XML</el-button>
<br /> <br />
<!-- <el-button link @click="downloadProcessAsSvg()">SVG</el-button> --> <!-- <el-button link @click="downloadProcessAsSvg()">SVG</el-button> -->
<XTextButton title="下载为SVG文件" @click="downloadProcessAsSvg()" /> <el-button link @click="downloadProcessAsSvg()">SVG</el-button>
<br /> <br />
<!-- <el-button link @click="downloadProcessAsBpmn()">BPMN</el-button> --> <!-- <el-button link @click="downloadProcessAsBpmn()">BPMN</el-button> -->
<XTextButton title="下载为BPMN文件" @click="downloadProcessAsBpmn()" /> <el-button link @click="downloadProcessAsBpmn()">BPMN</el-button>
</div> </div>
</template> </template>
<XButton title="下载文件" preIcon="ep:download" /> <el-button> <Icon icon="ep:download" class="mr-1px" /> 下载文件 </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light"> <el-tooltip effect="light">
<XButton preIcon="ep:view" title="浏览" /> <el-button> <Icon icon="ep:view" class="mr-1px" /> 浏览 </el-button>
<template #content> <template #content>
<!-- <el-button link @click="previewProcessXML">XML</el-button> --> <!-- <el-button link @click="previewProcessXML">XML</el-button> -->
<XTextButton title="预览XML" @click="previewProcessXML" /> <el-button link @click="previewProcessXML">XML</el-button>
<br /> <br />
<!-- <el-button link @click="previewProcessJson">JSON</el-button> --> <!-- <el-button link @click="previewProcessJson">JSON</el-button> -->
<XTextButton title="预览JSON" @click="previewProcessJson" /> <el-button link @click="previewProcessJson">JSON</el-button>
</template> </template>
</el-tooltip> </el-tooltip>
<el-tooltip <el-tooltip
@ -37,7 +39,9 @@
effect="light" effect="light"
:content="simulationStatus ? '退出模拟' : '开启模拟'" :content="simulationStatus ? '退出模拟' : '开启模拟'"
> >
<XButton preIcon="ep:cpu" title="模拟" @click="processSimulation" /> <el-button @click="processSimulation">
<Icon icon="ep:cpu" class="mr-1px" /> 模拟
</el-button>
</el-tooltip> </el-tooltip>
</ElButtonGroup> </ElButtonGroup>
<ElButtonGroup key="align-control"> <ElButtonGroup key="align-control">
@ -47,11 +51,9 @@
icon="el-icon-s-data" icon="el-icon-s-data"
@click="elementsAlign('left')" @click="elementsAlign('left')"
/> --> /> -->
<XButton <el-button class="align align-bottom" @click="elementsAlign('left')">
preIcon="fa:align-left" <Icon icon="fa:align-left" class="mr-1px" />
class="align align-bottom" </el-button>
@click="elementsAlign('left')"
/>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light" content="向右对齐"> <el-tooltip effect="light" content="向右对齐">
<!-- <el-button <!-- <el-button
@ -59,11 +61,9 @@
icon="el-icon-s-data" icon="el-icon-s-data"
@click="elementsAlign('right')" @click="elementsAlign('right')"
/> --> /> -->
<XButton <el-button class="align align-top" @click="elementsAlign('right')">
preIcon="fa:align-left" <Icon icon="fa:align-left" class="mr-1px" />
class="align align-top" </el-button>
@click="elementsAlign('right')"
/>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light" content="向上对齐"> <el-tooltip effect="light" content="向上对齐">
<!-- <el-button <!-- <el-button
@ -71,11 +71,9 @@
icon="el-icon-s-data" icon="el-icon-s-data"
@click="elementsAlign('top')" @click="elementsAlign('top')"
/> --> /> -->
<XButton <el-button class="align align-left" @click="elementsAlign('top')">
preIcon="fa:align-left" <Icon icon="fa:align-left" class="mr-1px" />
class="align align-left" </el-button>
@click="elementsAlign('top')"
/>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light" content="向下对齐"> <el-tooltip effect="light" content="向下对齐">
<!-- <el-button <!-- <el-button
@ -83,11 +81,9 @@
icon="el-icon-s-data" icon="el-icon-s-data"
@click="elementsAlign('bottom')" @click="elementsAlign('bottom')"
/> --> /> -->
<XButton <el-button class="align align-right" @click="elementsAlign('bottom')">
preIcon="fa:align-left" <Icon icon="fa:align-left" class="mr-1px" />
class="align align-right" </el-button>
@click="elementsAlign('bottom')"
/>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light" content="水平居中"> <el-tooltip effect="light" content="水平居中">
<!-- <el-button <!-- <el-button
@ -96,11 +92,9 @@
@click="elementsAlign('center')" @click="elementsAlign('center')"
/> --> /> -->
<!-- class="align align-center" --> <!-- class="align align-center" -->
<XButton <el-button class="align align-center" @click="elementsAlign('center')">
preIcon="fa:align-left" <Icon icon="fa:align-left" class="mr-1px" />
class="align align-center" </el-button>
@click="elementsAlign('center')"
/>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light" content="垂直居中"> <el-tooltip effect="light" content="垂直居中">
<!-- <el-button <!-- <el-button
@ -108,11 +102,9 @@
icon="el-icon-s-data" icon="el-icon-s-data"
@click="elementsAlign('middle')" @click="elementsAlign('middle')"
/> --> /> -->
<XButton <el-button class="align align-middle" @click="elementsAlign('middle')">
preIcon="fa:align-left" <Icon icon="fa:align-left" class="mr-1px" />
class="align align-middle" </el-button>
@click="elementsAlign('middle')"
/>
</el-tooltip> </el-tooltip>
</ElButtonGroup> </ElButtonGroup>
<ElButtonGroup key="scale-control"> <ElButtonGroup key="scale-control">
@ -122,11 +114,9 @@
icon="el-icon-zoom-out" icon="el-icon-zoom-out"
@click="processZoomOut()" @click="processZoomOut()"
/> --> /> -->
<XButton <el-button @click="processZoomOut()" :disabled="defaultZoom < 0.2">
preIcon="ep:zoom-out" <Icon icon="ep:zoom-out" class="mr-1px" />
@click="processZoomOut()" </el-button>
:disabled="defaultZoom < 0.2"
/>
</el-tooltip> </el-tooltip>
<el-button>{{ Math.floor(defaultZoom * 10 * 10) + '%' }}</el-button> <el-button>{{ Math.floor(defaultZoom * 10 * 10) + '%' }}</el-button>
<el-tooltip effect="light" content="放大视图"> <el-tooltip effect="light" content="放大视图">
@ -135,17 +125,23 @@
icon="el-icon-zoom-in" icon="el-icon-zoom-in"
@click="processZoomIn()" @click="processZoomIn()"
/> --> /> -->
<XButton preIcon="ep:zoom-in" @click="processZoomIn()" :disabled="defaultZoom > 4" /> <el-button @click="processZoomIn()" :disabled="defaultZoom > 4">
<Icon icon="ep:zoom-in" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light" content="重置视图并居中"> <el-tooltip effect="light" content="重置视图并居中">
<!-- <el-button icon="el-icon-c-scale-to-original" @click="processReZoom()" /> --> <!-- <el-button icon="el-icon-c-scale-to-original" @click="processReZoom()" /> -->
<XButton preIcon="ep:scale-to-original" @click="processReZoom()" /> <el-button @click="processReZoom()">
<Icon icon="ep:scale-to-original" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
</ElButtonGroup> </ElButtonGroup>
<ElButtonGroup key="stack-control"> <ElButtonGroup key="stack-control">
<el-tooltip effect="light" content="撤销"> <el-tooltip effect="light" content="撤销">
<!-- <el-button :disabled="!revocable" icon="el-icon-refresh-left" @click="processUndo()" /> --> <!-- <el-button :disabled="!revocable" icon="el-icon-refresh-left" @click="processUndo()" /> -->
<XButton preIcon="ep:refresh-left" @click="processUndo()" :disabled="!revocable" /> <el-button @click="processUndo()" :disabled="!revocable">
<Icon icon="ep:refresh-left" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light" content="恢复"> <el-tooltip effect="light" content="恢复">
<!-- <el-button <!-- <el-button
@ -153,11 +149,15 @@
icon="el-icon-refresh-right" icon="el-icon-refresh-right"
@click="processRedo()" @click="processRedo()"
/> --> /> -->
<XButton preIcon="ep:refresh-right" @click="processRedo()" :disabled="!recoverable" /> <el-button @click="processRedo()" :disabled="!recoverable">
<Icon icon="ep:refresh-right" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip effect="light" content="重新绘制"> <el-tooltip effect="light" content="重新绘制">
<!-- <el-button icon="el-icon-refresh" @click="processRestart" /> --> <!-- <el-button icon="el-icon-refresh" @click="processRestart" /> -->
<XButton preIcon="ep:refresh" @click="processRestart()" /> <el-button @click="processRestart()">
<Icon icon="ep:refresh" class="mr-1px" />
</el-button>
</el-tooltip> </el-tooltip>
</ElButtonGroup> </ElButtonGroup>
</template> </template>

View File

@ -52,7 +52,7 @@
<!-- </el-table>--> <!-- </el-table>-->
<!-- </div>--> <!-- </div>-->
<!-- <div class="element-drawer__button">--> <!-- <div class="element-drawer__button">-->
<!-- <XButton type="primary" proIcon="ep:plus" title="添加字段" @click="openFieldForm(null, -1)" />--> <!-- <el-button type="primary" proIcon="ep:plus" @click="openFieldForm(null, -1)">添加字段</el-button>-->
<!-- </div>--> <!-- </div>-->
<!--字段配置侧边栏--> <!--字段配置侧边栏-->

View File

@ -22,20 +22,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="element-drawer__button"> <div class="element-drawer__button">
<XButton <el-button type="primary" size="small" @click="openListenerForm(null)">
type="primary" <Icon icon="ep:plus" class="mr-1px" /> 添加监听器
preIcon="ep:plus" </el-button>
title="添加监听器" <el-button type="success" size="small" @click="openProcessListenerDialog">
size="small" <Icon icon="ep:select" class="mr-1px" /> 选择监听器
@click="openListenerForm(null)" </el-button>
/>
<XButton
type="success"
preIcon="ep:select"
title="选择监听器"
size="small"
@click="openProcessListenerDialog"
/>
</div> </div>
<!-- 监听器 编辑/创建 部分 --> <!-- 监听器 编辑/创建 部分 -->
@ -141,7 +133,7 @@
<el-divider /> <el-divider />
<p class="listener-filed__title"> <p class="listener-filed__title">
<span><Icon icon="ep:menu" />注入字段</span> <span><Icon icon="ep:menu" />注入字段</span>
<XButton type="primary" @click="openListenerFieldForm(null)" title="添加字段" /> <el-button type="primary" @click="openListenerFieldForm(null)"></el-button>
</p> </p>
<el-table <el-table
:data="fieldsListOfListener" :data="fieldsListOfListener"

View File

@ -33,20 +33,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="element-drawer__button"> <div class="element-drawer__button">
<XButton <el-button size="small" type="primary" @click="openListenerForm(null)">
size="small" <Icon icon="ep:plus" class="mr-1px" /> 添加监听器
type="primary" </el-button>
preIcon="ep:plus" <el-button type="success" size="small" @click="openProcessListenerDialog">
title="添加监听器" <Icon icon="ep:select" class="mr-1px" /> 选择监听器
@click="openListenerForm(null)" </el-button>
/>
<XButton
type="success"
preIcon="ep:select"
title="选择监听器"
size="small"
@click="openProcessListenerDialog"
/>
</div> </div>
<!-- 监听器 编辑/创建 部分 --> <!-- 监听器 编辑/创建 部分 -->

View File

@ -22,12 +22,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="element-drawer__button"> <div class="element-drawer__button">
<XButton <el-button type="primary" @click="openAttributesForm(null, -1)">
type="primary" <Icon icon="ep:plus" class="mr-1px" /> 添加属性
preIcon="ep:plus" </el-button>
title="添加属性"
@click="openAttributesForm(null, -1)"
/>
</div> </div>
<el-dialog <el-dialog

View File

@ -2,7 +2,9 @@
<div class="panel-tab__content"> <div class="panel-tab__content">
<div class="panel-tab__content--title"> <div class="panel-tab__content--title">
<span><Icon icon="ep:menu" style="margin-right: 8px; color: #555" />消息列表</span> <span><Icon icon="ep:menu" style="margin-right: 8px; color: #555" />消息列表</span>
<XButton type="primary" title="创建新消息" preIcon="ep:plus" @click="openModel('message')" /> <el-button type="primary" @click="openModel('message')">
<Icon icon="ep:plus" class="mr-1px" /> 创建新消息
</el-button>
</div> </div>
<el-table :data="messageList" border> <el-table :data="messageList" border>
<el-table-column type="index" label="序号" width="60px" /> <el-table-column type="index" label="序号" width="60px" />
@ -31,7 +33,9 @@
style="padding-top: 8px; margin-top: 8px; border-top: 1px solid #eee" style="padding-top: 8px; margin-top: 8px; border-top: 1px solid #eee"
> >
<span><Icon icon="ep:menu" style="margin-right: 8px; color: #555" />信号列表</span> <span><Icon icon="ep:menu" style="margin-right: 8px; color: #555" />信号列表</span>
<XButton type="primary" title="创建新信号" preIcon="ep:plus" @click="openModel('signal')" /> <el-button type="primary" @click="openModel('signal')">
<Icon icon="ep:plus" class="mr-1px" /> 创建新信号
</el-button>
</div> </div>
<el-table :data="signalList" border> <el-table :data="signalList" border>
<el-table-column type="index" label="序号" width="60px" /> <el-table-column type="index" label="序号" width="60px" />

View File

@ -47,14 +47,14 @@
<div> <div>
<div class="flex mb-10px"> <div class="flex mb-10px">
<el-text>输入参数</el-text> <el-text>输入参数</el-text>
<XButton <el-button
class="ml-auto" class="ml-auto"
type="primary" type="primary"
preIcon="ep:plus"
title="添加参数"
size="small" size="small"
@click="openVariableForm('in', null, -1)" @click="openVariableForm('in', null, -1)"
/> >
<Icon icon="ep:plus" class="mr-1px" /> 添加参数
</el-button>
</div> </div>
<el-table :data="inVariableList" max-height="240" fit border> <el-table :data="inVariableList" max-height="240" fit border>
<el-table-column label="源" prop="source" min-width="100px" show-overflow-tooltip /> <el-table-column label="源" prop="source" min-width="100px" show-overflow-tooltip />
@ -82,14 +82,14 @@
<div> <div>
<div class="flex mb-10px"> <div class="flex mb-10px">
<el-text>输出参数</el-text> <el-text>输出参数</el-text>
<XButton <el-button
class="ml-auto" class="ml-auto"
type="primary" type="primary"
preIcon="ep:plus"
title="添加参数"
size="small" size="small"
@click="openVariableForm('out', null, -1)" @click="openVariableForm('out', null, -1)"
/> >
<Icon icon="ep:plus" class="mr-1px" /> 添加参数
</el-button>
</div> </div>
<el-table :data="outVariableList" max-height="240" fit border> <el-table :data="outVariableList" max-height="240" fit border>
<el-table-column label="源" prop="source" min-width="100px" show-overflow-tooltip /> <el-table-column label="源" prop="source" min-width="100px" show-overflow-tooltip />

View File

@ -17,12 +17,9 @@
:key="key" :key="key"
/> />
</el-select> </el-select>
<XButton <el-button type="primary" style="margin-left: 8px" @click="openMessageModel">
type="primary" <Icon icon="ep:plus" class="mr-1px" />
preIcon="ep:plus" </el-button>
style="margin-left: 8px"
@click="openMessageModel"
/>
</div> </div>
</el-form-item> </el-form-item>
<el-dialog <el-dialog

View File

@ -186,14 +186,14 @@
style="width: 100%" style="width: 100%"
@change="updateElementTask" @change="updateElementTask"
/> />
<XButton <el-button
class="!w-1/1 mt-5px" class="!w-1/1 mt-5px"
type="success" type="success"
preIcon="ep:select"
title="选择表达式"
size="small" size="small"
@click="openProcessExpressionDialog" @click="openProcessExpressionDialog"
/> >
<Icon icon="ep:select" class="mr-1px" /> 选择表达式
</el-button>
<!-- 选择弹窗 --> <!-- 选择弹窗 -->
<ProcessExpressionDialog ref="processExpressionDialogRef" @select="selectProcessExpression" /> <ProcessExpressionDialog ref="processExpressionDialogRef" @select="selectProcessExpression" />
</el-form-item> </el-form-item>

View File

@ -22,7 +22,7 @@ const props = defineProps({
default: () => [] default: () => []
}, },
trigger: { trigger: {
type: String as PropType<'click' | 'hover' | 'focus' | 'contextmenu'>, type: String as PropType<'click' | 'hover' | 'contextmenu'>,
default: 'contextmenu' default: 'contextmenu'
}, },
tagItem: { tagItem: {

View File

@ -83,7 +83,9 @@ onMounted(() => {
</ElTabs> </ElTabs>
<!-- 更多 --> <!-- 更多 -->
<div style="margin-top: 10px; text-align: right"> <div style="margin-top: 10px; text-align: right">
<XButton preIcon="ep:view" title="查看全部" type="primary" @click="goMyList" /> <el-button type="primary" @click="goMyList">
<Icon icon="ep:view" class="mr-1px" /> 查看全部
</el-button>
</div> </div>
</ElPopover> </ElPopover>
</div> </div>

View File

@ -275,12 +275,14 @@ const clear = () => {
<ElDivider /> <ElDivider />
<div> <div>
<ElButton class="w-full" type="primary" @click="copyConfig">{{ t('setting.copy') }}</ElButton> <el-button class="w-full" type="primary" @click="copyConfig">
{{ t('setting.copy') }}
</el-button>
</div> </div>
<div class="mt-5px"> <div class="mt-5px">
<ElButton class="w-full" type="danger" @click="clear"> <el-button class="w-full" type="danger" @click="clear">
{{ t('setting.clearAndReset') }} {{ t('setting.clearAndReset') }}
</ElButton> </el-button>
</div> </div>
</ElDrawer> </ElDrawer>
</template> </template>

View File

@ -84,7 +84,7 @@ const handleLock = async () => {
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<ElButton type="primary" @click="handleLock">{{ t('lock.lock') }}</ElButton> <el-button type="primary" @click="handleLock">{{ t('lock.lock') }}</el-button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -106,7 +106,7 @@ function handleShowForm(show = false) {
{{ t('lock.message') }} {{ t('lock.message') }}
</span> </span>
<div :class="`${prefixCls}-entry__footer enter-x`"> <div :class="`${prefixCls}-entry__footer enter-x`">
<ElButton <el-button
type="primary" type="primary"
size="small" size="small"
class="mt-2 mr-2 enter-x" class="mt-2 mr-2 enter-x"
@ -115,8 +115,8 @@ function handleShowForm(show = false) {
@click="handleShowForm(true)" @click="handleShowForm(true)"
> >
{{ t('common.back') }} {{ t('common.back') }}
</ElButton> </el-button>
<ElButton <el-button
type="primary" type="primary"
size="small" size="small"
class="mt-2 mr-2 enter-x" class="mt-2 mr-2 enter-x"
@ -125,8 +125,8 @@ function handleShowForm(show = false) {
@click="goLogin" @click="goLogin"
> >
{{ t('lock.backToLogin') }} {{ t('lock.backToLogin') }}
</ElButton> </el-button>
<ElButton <el-button
type="primary" type="primary"
class="mt-2" class="mt-2"
size="small" size="small"
@ -135,7 +135,7 @@ function handleShowForm(show = false) {
:disabled="loading" :disabled="loading"
> >
{{ t('lock.entrySystem') }} {{ t('lock.entrySystem') }}
</ElButton> </el-button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -376,6 +376,13 @@ export const fenToYuan = (price: string | number): string => {
return formatToFraction(price) return formatToFraction(price)
} }
/**
*
*/
export const fenToYuanNumber = (price: string | number): number => {
return Number(fenToYuan(price))
}
/** /**
* *
* *

View File

@ -123,13 +123,14 @@
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item> <el-form-item>
<XButton <el-button
:loading="loginLoading" :loading="loginLoading"
:title="t('login.login')"
class="w-[100%]" class="w-[100%]"
type="primary" type="primary"
@click="getCode()" @click="getCode()"
/> >
{{ t('login.login') }}
</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
<Verify <Verify

View File

@ -97,23 +97,16 @@
<!-- 登录按钮 / 返回按钮 --> <!-- 登录按钮 / 返回按钮 -->
<el-col :span="24" class="px-10px"> <el-col :span="24" class="px-10px">
<el-form-item> <el-form-item>
<XButton <el-button :loading="loginLoading" class="w-full" type="primary" @click="resetPassword()">
:loading="loginLoading" {{ t('login.resetPassword') }}
:title="t('login.resetPassword')" </el-button>
class="w-full"
type="primary"
@click="resetPassword()"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" class="px-10px"> <el-col :span="24" class="px-10px">
<el-form-item> <el-form-item>
<XButton <el-button :loading="loginLoading" class="w-full" @click="handleBackLogin()">
:loading="loginLoading" {{ t('login.backLogin') }}
:title="t('login.backLogin')" </el-button>
class="w-full"
@click="handleBackLogin()"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -69,13 +69,9 @@
</el-col> </el-col>
<el-col :span="24" class="px-10px"> <el-col :span="24" class="px-10px">
<el-form-item> <el-form-item>
<XButton <el-button :loading="loginLoading" class="w-full" type="primary" @click="getCode()">
:loading="loginLoading" {{ t('login.login') }}
:title="t('login.login')" </el-button>
class="w-full"
type="primary"
@click="getCode()"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<Verify <Verify
@ -90,25 +86,19 @@
<el-form-item> <el-form-item>
<el-row :gutter="5" justify="space-between" style="width: 100%"> <el-row :gutter="5" justify="space-between" style="width: 100%">
<el-col :span="8"> <el-col :span="8">
<XButton <el-button class="w-full" @click="setLoginState(LoginStateEnum.MOBILE)">
:title="t('login.btnMobile')" {{ t('login.btnMobile') }}
class="w-full" </el-button>
@click="setLoginState(LoginStateEnum.MOBILE)"
/>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<XButton <el-button class="w-full" @click="setLoginState(LoginStateEnum.QR_CODE)">
:title="t('login.btnQRCode')" {{ t('login.btnQRCode') }}
class="w-full" </el-button>
@click="setLoginState(LoginStateEnum.QR_CODE)"
/>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<XButton <el-button class="w-full" @click="setLoginState(LoginStateEnum.REGISTER)">
:title="t('login.btnRegister')" {{ t('login.btnRegister') }}
class="w-full" </el-button>
@click="setLoginState(LoginStateEnum.REGISTER)"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>

View File

@ -70,23 +70,16 @@
<!-- 登录按钮 / 返回按钮 --> <!-- 登录按钮 / 返回按钮 -->
<el-col :span="24" class="px-10px"> <el-col :span="24" class="px-10px">
<el-form-item> <el-form-item>
<XButton <el-button :loading="loginLoading" class="w-full" type="primary" @click="signIn()">
:loading="loginLoading" {{ t('login.login') }}
:title="t('login.login')" </el-button>
class="w-full"
type="primary"
@click="signIn()"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" class="px-10px"> <el-col :span="24" class="px-10px">
<el-form-item> <el-form-item>
<XButton <el-button :loading="loginLoading" class="w-full" @click="handleBackLogin()">
:loading="loginLoading" {{ t('login.backLogin') }}
:title="t('login.backLogin')" </el-button>
class="w-full"
@click="handleBackLogin()"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -11,7 +11,7 @@
<el-divider class="enter-x">{{ t('login.qrcode') }}</el-divider> <el-divider class="enter-x">{{ t('login.qrcode') }}</el-divider>
<el-col :span="24" class="px-10px"> <el-col :span="24" class="px-10px">
<div class="mt-4 w-full"> <div class="mt-4 w-full">
<XButton :title="t('login.backLogin')" class="w-full" @click="handleBackLogin()" /> <el-button class="w-full" @click="handleBackLogin()">{{ t('login.backLogin') }}</el-button>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -75,13 +75,9 @@
</el-col> </el-col>
<el-col :span="24" class="px-10px"> <el-col :span="24" class="px-10px">
<el-form-item> <el-form-item>
<XButton <el-button :loading="loginLoading" class="w-full" type="primary" @click="getCode()">
:loading="loginLoading" {{ t('login.register') }}
:title="t('login.register')" </el-button>
class="w-full"
type="primary"
@click="getCode()"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<Verify <Verify
@ -93,7 +89,7 @@
@success="handleRegister" @success="handleRegister"
/> />
</el-row> </el-row>
<XButton :title="t('login.hasUser')" class="w-full" @click="handleBackLogin()" /> <el-button class="w-full" @click="handleBackLogin()">{{ t('login.hasUser') }}</el-button>
</el-form> </el-form>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -8,8 +8,8 @@
</template> </template>
</Form> </Form>
<div style="text-align: center"> <div style="text-align: center">
<XButton :title="t('common.save')" type="primary" @click="submit()" /> <el-button type="primary" @click="submit()">{{ t('common.save') }}</el-button>
<XButton :title="t('common.reset')" type="danger" @click="init()" /> <el-button type="danger" @click="init()">{{ t('common.reset') }}</el-button>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -10,8 +10,8 @@
<InputPassword v-model="password.confirmPassword" strength /> <InputPassword v-model="password.confirmPassword" strength />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<XButton :title="t('common.save')" type="primary" @click="submit(formRef)" /> <el-button type="primary" @click="submit(formRef)">{{ t('common.save') }}</el-button>
<XButton :title="t('common.reset')" type="danger" @click="reset(formRef)" /> <el-button type="danger" @click="reset(formRef)">{{ t('common.reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>

View File

@ -11,11 +11,11 @@
<template #default="{ row }"> <template #default="{ row }">
<template v-if="row.openid"> <template v-if="row.openid">
已绑定 已绑定
<XTextButton class="mr-5" title="(解绑)" type="primary" @click="unbind(row)" /> <el-button link class="mr-5" type="primary" @click="unbind(row)">()</el-button>
</template> </template>
<template v-else> <template v-else>
未绑定 未绑定
<XTextButton class="mr-5" title="(绑定)" type="primary" @click="bind(row)" /> <el-button link class="mr-5" type="primary" @click="bind(row)">()</el-button>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -41,7 +41,7 @@ const activeName = ref('colum') // Tag 激活的窗口
const basicInfoRef = ref<ComponentRef<typeof BasicInfoForm>>() const basicInfoRef = ref<ComponentRef<typeof BasicInfoForm>>()
const generateInfoRef = ref<ComponentRef<typeof GenerateInfoForm>>() const generateInfoRef = ref<ComponentRef<typeof GenerateInfoForm>>()
const formData = ref<CodegenApi.CodegenUpdateReqVO>({ const formData = ref<CodegenApi.CodegenUpdateReqVO>({
table: {}, table: CodegenApi.createEmptyCodegenTableSaveReqVO(),
columns: [] columns: []
}) })

View File

@ -48,19 +48,15 @@ defineOptions({ name: 'InfraCodegenBasicInfoForm' })
const props = defineProps({ const props = defineProps({
table: { table: {
type: Object as PropType<Nullable<CodegenApi.CodegenTableVO>>, type: Object as PropType<Nullable<CodegenApi.CodegenTableSaveReqVO>>,
default: () => null default: () => null
} }
}) })
const formRef = ref() const formRef = ref()
const formData = ref({ const formData = ref<CodegenApi.CodegenTableSaveReqVO>(
tableName: '', CodegenApi.createEmptyCodegenTableSaveReqVO()
tableComment: '', )
className: '',
author: '',
remark: ''
})
const rules = reactive({ const rules = reactive({
tableName: [required], tableName: [required],
tableComment: [required], tableComment: [required],

View File

@ -304,7 +304,7 @@ defineOptions({ name: 'InfraCodegenGenerateInfoForm' })
const props = defineProps({ const props = defineProps({
table: { table: {
type: Object as PropType<Nullable<CodegenApi.CodegenTableVO>>, type: Object as PropType<Nullable<CodegenApi.CodegenTableSaveReqVO>>,
default: () => null default: () => null
}, },
columns: { columns: {
@ -314,23 +314,9 @@ const props = defineProps({
}) })
const formRef = ref() const formRef = ref()
const formData = ref({ const formData = ref<CodegenApi.CodegenTableSaveReqVO>(
templateType: null, CodegenApi.createEmptyCodegenTableSaveReqVO()
frontType: null, )
scene: null,
moduleName: '',
businessName: '',
className: '',
classComment: '',
parentMenuId: null,
genPath: '',
genType: '',
masterTableId: undefined,
subJoinColumnId: undefined,
subJoinMany: undefined,
treeParentColumnId: undefined,
treeNameColumnId: undefined
})
const rules = reactive({ const rules = reactive({
templateType: [required], templateType: [required],
@ -348,7 +334,7 @@ const rules = reactive({
treeNameColumnId: [required] treeNameColumnId: [required]
}) })
const tables = ref([]) // const tables = ref<CodegenApi.CodegenTableVO[]>([]) //
const menus = ref<any[]>([]) const menus = ref<any[]>([])
const menuTreeProps = { const menuTreeProps = {
label: 'name' label: 'name'
@ -358,7 +344,7 @@ watch(
() => props.table, () => props.table,
async (table) => { async (table) => {
if (!table) return if (!table) return
formData.value = table as any formData.value = table
// //
if (table.dataSourceConfigId >= 0) { if (table.dataSourceConfigId >= 0) {
tables.value = await CodegenApi.getCodegenTableList(formData.value.dataSourceConfigId) tables.value = await CodegenApi.getCodegenTableList(formData.value.dataSourceConfigId)

View File

@ -53,7 +53,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref<Demo03Student>({
id: undefined, id: undefined,
name: undefined, name: undefined,
sex: undefined, sex: undefined,
@ -94,7 +94,7 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as Demo03Student const data = formData.value
if (formType.value === 'create') { if (formType.value === 'create') {
await Demo03StudentApi.createDemo03Student(data) await Demo03StudentApi.createDemo03Student(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

View File

@ -30,7 +30,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref<Demo03Course>({
id: undefined, id: undefined,
studentId: undefined, studentId: undefined,
name: undefined, name: undefined,
@ -49,7 +49,7 @@ const open = async (type: string, id?: number, studentId?: number) => {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
resetForm() resetForm()
formData.value.studentId = studentId as any formData.value.studentId = studentId
// //
if (id) { if (id) {
formLoading.value = true formLoading.value = true
@ -70,7 +70,7 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as Demo03Course const data = formData.value
if (formType.value === 'create') { if (formType.value === 'create') {
await Demo03StudentApi.createDemo03Course(data) await Demo03StudentApi.createDemo03Course(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

View File

@ -158,6 +158,6 @@ const handleDeleteBatch = async () => {
const checkedIds = ref<number[]>([]) const checkedIds = ref<number[]>([])
const handleRowCheckboxChange = (records: Demo03Course[]) => { const handleRowCheckboxChange = (records: Demo03Course[]) => {
checkedIds.value = records.map((item) => item.id) checkedIds.value = records.map((item) => item.id!)
} }
</script> </script>

View File

@ -30,7 +30,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref<Demo03Grade>({
id: undefined, id: undefined,
studentId: undefined, studentId: undefined,
name: undefined, name: undefined,
@ -49,7 +49,7 @@ const open = async (type: string, id?: number, studentId?: number) => {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
resetForm() resetForm()
formData.value.studentId = studentId as any formData.value.studentId = studentId
// //
if (id) { if (id) {
formLoading.value = true formLoading.value = true
@ -70,7 +70,7 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as Demo03Grade const data = formData.value
if (formType.value === 'create') { if (formType.value === 'create') {
await Demo03StudentApi.createDemo03Grade(data) await Demo03StudentApi.createDemo03Grade(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

View File

@ -158,6 +158,6 @@ const handleDeleteBatch = async () => {
const checkedIds = ref<number[]>([]) const checkedIds = ref<number[]>([])
const handleRowCheckboxChange = (records: Demo03Grade[]) => { const handleRowCheckboxChange = (records: Demo03Grade[]) => {
checkedIds.value = records.map((item) => item.id) checkedIds.value = records.map((item) => item.id!)
} }
</script> </script>

View File

@ -142,10 +142,10 @@
<ContentWrap> <ContentWrap>
<el-tabs model-value="demo03Course"> <el-tabs model-value="demo03Course">
<el-tab-pane label="学生课程" name="demo03Course"> <el-tab-pane label="学生课程" name="demo03Course">
<Demo03CourseList :student-id="currentRow.id" /> <Demo03CourseList :student-id="currentRow?.id" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="学生班级" name="demo03Grade"> <el-tab-pane label="学生班级" name="demo03Grade">
<Demo03GradeList :student-id="currentRow.id" /> <Demo03GradeList :student-id="currentRow?.id" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</ContentWrap> </ContentWrap>
@ -238,7 +238,7 @@ const handleDeleteBatch = async () => {
const checkedIds = ref<number[]>([]) const checkedIds = ref<number[]>([])
const handleRowCheckboxChange = (records: Demo03Student[]) => { const handleRowCheckboxChange = (records: Demo03Student[]) => {
checkedIds.value = records.map((item) => item.id) checkedIds.value = records.map((item) => item.id!)
} }
/** 导出按钮操作 */ /** 导出按钮操作 */
@ -257,8 +257,8 @@ const handleExport = async () => {
} }
/** 选中行操作 */ /** 选中行操作 */
const currentRow = ref({}) // const currentRow = ref<Demo03Student>() //
const handleCurrentChange = (row) => { const handleCurrentChange = (row: Demo03Student) => {
currentRow.value = row currentRow.value = row
} }

View File

@ -64,7 +64,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref<Demo03Student>({
id: undefined, id: undefined,
name: undefined, name: undefined,
sex: undefined, sex: undefined,
@ -123,7 +123,7 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as Demo03Student const data = formData.value
// //
data.demo03courses = demo03CourseFormRef.value.getData() data.demo03courses = demo03CourseFormRef.value.getData()
data.demo03grade = demo03GradeFormRef.value.getData() data.demo03grade = demo03GradeFormRef.value.getData()

View File

@ -38,7 +38,7 @@
import { Demo03StudentApi } from '@/api/infra/demo/demo03/inner' import { Demo03StudentApi } from '@/api/infra/demo/demo03/inner'
const props = defineProps<{ const props = defineProps<{
studentId: number // studentId?: number //
}>() }>()
const formLoading = ref(false) // const formLoading = ref(false) //
const formData = ref<any[]>([]) const formData = ref<any[]>([])

View File

@ -18,7 +18,7 @@
import { Demo03StudentApi } from '@/api/infra/demo/demo03/inner' import { Demo03StudentApi } from '@/api/infra/demo/demo03/inner'
const props = defineProps<{ const props = defineProps<{
studentId: number // studentId?: number //
}>() }>()
const formLoading = ref(false) // const formLoading = ref(false) //
const formData = ref<any>({}) const formData = ref<any>({})

View File

@ -23,13 +23,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { Demo03StudentApi } from '@/api/infra/demo/demo03/inner' import { Demo03Grade, Demo03StudentApi } from '@/api/infra/demo/demo03/inner'
const props = defineProps<{ const props = defineProps<{
studentId?: number // studentId?: number //
}>() }>()
const loading = ref(false) // const loading = ref(false) //
const list = ref([]) // const list = ref<Demo03Grade[]>([]) //
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {

View File

@ -238,7 +238,7 @@ const handleDeleteBatch = async () => {
const checkedIds = ref<number[]>([]) const checkedIds = ref<number[]>([])
const handleRowCheckboxChange = (records: Demo03Student[]) => { const handleRowCheckboxChange = (records: Demo03Student[]) => {
checkedIds.value = records.map((item) => item.id) checkedIds.value = records.map((item) => item.id!)
} }
/** 导出按钮操作 */ /** 导出按钮操作 */

View File

@ -64,7 +64,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref<Demo03Student>({
id: undefined, id: undefined,
name: undefined, name: undefined,
sex: undefined, sex: undefined,
@ -123,7 +123,7 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as Demo03Student const data = formData.value
// //
data.demo03courses = demo03CourseFormRef.value.getData() data.demo03courses = demo03CourseFormRef.value.getData()
data.demo03grade = demo03GradeFormRef.value.getData() data.demo03grade = demo03GradeFormRef.value.getData()

View File

@ -38,7 +38,7 @@
import { Demo03StudentApi } from '@/api/infra/demo/demo03/normal' import { Demo03StudentApi } from '@/api/infra/demo/demo03/normal'
const props = defineProps<{ const props = defineProps<{
studentId: number // studentId?: number //
}>() }>()
const formLoading = ref(false) // const formLoading = ref(false) //
const formData = ref<any[]>([]) const formData = ref<any[]>([])

View File

@ -15,13 +15,18 @@
</el-form> </el-form>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { Demo03StudentApi } from '@/api/infra/demo/demo03/normal' import { Demo03Grade, Demo03StudentApi } from '@/api/infra/demo/demo03/normal'
const props = defineProps<{ const props = defineProps<{
studentId: number // studentId?: number //
}>() }>()
const formLoading = ref(false) // const formLoading = ref(false) //
const formData = ref({}) const formData = ref<Demo03Grade>({
id: undefined,
studentId: undefined,
name: undefined,
teacher: undefined
})
const formRules = reactive({ const formRules = reactive({
studentId: [{ required: true, message: '学生编号不能为空', trigger: 'blur' }], studentId: [{ required: true, message: '学生编号不能为空', trigger: 'blur' }],
name: [{ required: true, message: '名字不能为空', trigger: 'blur' }], name: [{ required: true, message: '名字不能为空', trigger: 'blur' }],

View File

@ -223,7 +223,7 @@ const handleDeleteBatch = async () => {
const checkedIds = ref<number[]>([]) const checkedIds = ref<number[]>([])
const handleRowCheckboxChange = (records: Demo03Student[]) => { const handleRowCheckboxChange = (records: Demo03Student[]) => {
checkedIds.value = records.map((item) => item.id) checkedIds.value = records.map((item) => item.id!)
} }
/** 导出按钮操作 */ /** 导出按钮操作 */

View File

@ -66,24 +66,26 @@
<script lang="ts" setup> <script lang="ts" setup>
import * as RedisApi from '@/api/infra/redis' import * as RedisApi from '@/api/infra/redis'
import { RedisMonitorInfoVO } from '@/api/infra/redis/types' import { RedisMonitorInfoVO } from '@/api/infra/redis/types'
import type { EChartsOption } from 'echarts'
const cache = ref<RedisMonitorInfoVO>() const cache = ref<RedisMonitorInfoVO>()
// //
const readRedisInfo = async () => { const readRedisInfo = async () => {
const data = await RedisApi.getCache() cache.value = await RedisApi.getCache()
cache.value = data
} }
// 使 // 使
const usedmemoryEchartChika = reactive<any>({ const usedmemoryEchartChika = reactive<EChartsOption>({
title: { title: {
// //
text: '内存使用情况', text: '内存使用情况',
left: 'center', left: 'center',
show: true, // , true show: true, // , true
offsetCenter: [0, '20%'], // textStyle: {
color: 'yellow', // , #333 color: 'yellow', // , #333
fontSize: 20 // , 15 fontSize: 20 // , 15
}
}, },
toolbox: { toolbox: {
show: false, show: false,
@ -146,12 +148,10 @@ const usedmemoryEchartChika = reactive<any>({
show: true show: true
}, },
detail: { detail: {
textStyle: { fontWeight: 'normal',
fontWeight: 'normal', // 50
// 50 fontSize: 15,
fontSize: 15, color: '#FFFFFF',
color: '#FFFFFF'
},
valueAnimation: true valueAnimation: true
}, },
progress: { progress: {
@ -159,10 +159,10 @@ const usedmemoryEchartChika = reactive<any>({
} }
} }
] ]
}) }) as EChartsOption
// 使 // 使
const commandStatsRefChika = reactive({ const commandStatsRefChika = reactive<EChartsOption>({
title: { title: {
text: '命令统计', text: '命令统计',
left: 'center' left: 'center'
@ -205,7 +205,7 @@ const commandStatsRefChika = reactive({
} }
} }
] ]
}) }) as EChartsOption
/** 加载数据 */ /** 加载数据 */
const getSummary = () => { const getSummary = () => {
@ -216,7 +216,8 @@ const getSummary = () => {
/** 命令使用情况 */ /** 命令使用情况 */
const initCommandStatsChart = async () => { const initCommandStatsChart = async () => {
usedmemoryEchartChika.series[0].data = [] const usedMemorySeries = usedmemoryEchartChika.series![0] as any
usedMemorySeries.data = []
// //
try { try {
const data = await RedisApi.getCache() const data = await RedisApi.getCache()
@ -231,8 +232,8 @@ const initCommandStatsChart = async () => {
}) })
nameList.push(row.command) nameList.push(row.command)
}) })
commandStatsRefChika.legend.data = nameList ;(commandStatsRefChika.legend as any).data = nameList
commandStatsRefChika.series[0].data = commandStats ;(commandStatsRefChika.series![0] as any).data = commandStats
} catch {} } catch {}
} }
const usedMemoryInstance = async () => { const usedMemoryInstance = async () => {
@ -240,7 +241,8 @@ const usedMemoryInstance = async () => {
const data = await RedisApi.getCache() const data = await RedisApi.getCache()
cache.value = data cache.value = data
// //
usedmemoryEchartChika.series[0].detail = { const usedMemorySeries = usedmemoryEchartChika.series![0] as any
usedMemorySeries.detail = {
show: true, // , true show: true, // , true
offsetCenter: [0, '50%'], // offsetCenter: [0, '50%'], //
color: 'auto', // , auto color: 'auto', // , auto
@ -248,12 +250,12 @@ const usedMemoryInstance = async () => {
formatter: cache.value!.info.used_memory_human // formatter: cache.value!.info.used_memory_human //
} }
usedmemoryEchartChika.series[0].data[0] = { usedMemorySeries.data[0] = {
value: cache.value!.info.used_memory_human, value: cache.value!.info.used_memory_human,
name: '内存消耗' name: '内存消耗'
} }
console.log(cache.value!.info) console.log(cache.value!.info)
usedmemoryEchartChika.tooltip = { ;(usedmemoryEchartChika as any).tooltip = {
formatter: '{b} <br/>{a} : ' + cache.value!.info.used_memory_human formatter: '{b} <br/>{a} : ' + cache.value!.info.used_memory_human
} }
} catch {} } catch {}

View File

@ -33,7 +33,7 @@
start-placeholder="开始时间" start-placeholder="开始时间"
end-placeholder="结束时间" end-placeholder="结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
:default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-360px" class="!w-360px"
:shortcuts="defaultShortcuts" :shortcuts="defaultShortcuts"
/> />

View File

@ -33,7 +33,7 @@
start-placeholder="开始时间" start-placeholder="开始时间"
end-placeholder="结束时间" end-placeholder="结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
:default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-360px" class="!w-360px"
:shortcuts="defaultShortcuts" :shortcuts="defaultShortcuts"
/> />

View File

@ -33,8 +33,16 @@ defineOptions({ name: 'OperationDataCard' })
const router = useRouter() // const router = useRouter() //
type OperationDataItem = {
name: string
value: number
routerName: string
prefix?: string
decimals?: number
}
/** 数据 */ /** 数据 */
const data = reactive({ const data = reactive<Record<string, OperationDataItem>>({
orderUndelivered: { name: '待发货订单', value: 9, routerName: 'TradeOrder' }, orderUndelivered: { name: '待发货订单', value: 9, routerName: 'TradeOrder' },
orderAfterSaleApply: { name: '退款中订单', value: 4, routerName: 'TradeAfterSale' }, orderAfterSaleApply: { name: '退款中订单', value: 4, routerName: 'TradeAfterSale' },
orderWaitePickUp: { name: '待核销订单', value: 0, routerName: 'TradeOrder' }, orderWaitePickUp: { name: '待核销订单', value: 0, routerName: 'TradeOrder' },

View File

@ -21,7 +21,7 @@
import dayjs, { Dayjs } from 'dayjs' import dayjs, { Dayjs } from 'dayjs'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
import * as TradeStatisticsApi from '@/api/mall/statistics/trade' import * as TradeStatisticsApi from '@/api/mall/statistics/trade'
import { fenToYuan } from '@/utils' import { fenToYuanNumber } from '@/utils'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { CardTitle } from '@/components/Card' import { CardTitle } from '@/components/Card'
@ -185,11 +185,11 @@ const getOrderCountTrendComparison = async (
for (let item of list) { for (let item of list) {
dates.push(item.value.date) dates.push(item.value.date)
if (series.length === 2) { if (series.length === 2) {
series[0].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // series[0].data.push(fenToYuanNumber(item?.value?.orderPayPrice || 0)) //
series[1].data.push(item?.value?.orderPayCount || 0) // series[1].data.push(item?.value?.orderPayCount || 0) //
} else { } else {
series[0].data.push(fenToYuan(item?.reference?.orderPayPrice || 0)) // series[0].data.push(fenToYuanNumber(item?.reference?.orderPayPrice || 0)) //
series[1].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // series[1].data.push(fenToYuanNumber(item?.value?.orderPayPrice || 0)) //
series[2].data.push(item?.reference?.orderPayCount || 0) // series[2].data.push(item?.reference?.orderPayCount || 0) //
series[3].data.push(item?.value?.orderPayCount || 0) // series[3].data.push(item?.value?.orderPayCount || 0) //
} }
@ -197,7 +197,7 @@ const getOrderCountTrendComparison = async (
eChartOptions.xAxis!['data'] = dates eChartOptions.xAxis!['data'] = dates
eChartOptions.series = series eChartOptions.series = series
// legend 4 2 4 // legend 4 2 4
eChartOptions.legend['data'] = series.map((item) => item.name) ;(eChartOptions.legend as Record<string, unknown>)['data'] = series.map((item) => item.name)
loading.value = false loading.value = false
} }

View File

@ -10,16 +10,16 @@
title="销售额" title="销售额"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(orderComparison?.value?.orderPayPrice || 0)" :value="fenToYuanNumber(orderComparison?.value?.orderPayPrice || 0)"
:reference="fenToYuan(orderComparison?.reference?.orderPayPrice || 0)" :reference="fenToYuanNumber(orderComparison?.reference?.orderPayPrice || 0)"
/> />
</el-col> </el-col>
<el-col :md="6" :sm="12" :xs="24" :loading="loading"> <el-col :md="6" :sm="12" :xs="24" :loading="loading">
<ComparisonCard <ComparisonCard
tag="今日" tag="今日"
title="用户访问量" title="用户访问量"
:value="userComparison?.value?.visitUserCount || 0" :value="Number(userComparison?.value?.visitUserCount || 0)"
:reference="userComparison?.reference?.visitUserCount || 0" :reference="Number(userComparison?.reference?.visitUserCount || 0)"
/> />
</el-col> </el-col>
<el-col :md="6" :sm="12" :xs="24" :loading="loading"> <el-col :md="6" :sm="12" :xs="24" :loading="loading">
@ -71,7 +71,7 @@ import * as MemberStatisticsApi from '@/api/mall/statistics/member'
import { DataComparisonRespVO } from '@/api/mall/statistics/common' import { DataComparisonRespVO } from '@/api/mall/statistics/common'
import { TradeOrderSummaryRespVO } from '@/api/mall/statistics/trade' import { TradeOrderSummaryRespVO } from '@/api/mall/statistics/trade'
import { MemberCountRespVO } from '@/api/mall/statistics/member' import { MemberCountRespVO } from '@/api/mall/statistics/member'
import { fenToYuan } from '@/utils' import { fenToYuanNumber } from '@/utils'
import ComparisonCard from './components/ComparisonCard.vue' import ComparisonCard from './components/ComparisonCard.vue'
import MemberStatisticsCard from './components/MemberStatisticsCard.vue' import MemberStatisticsCard from './components/MemberStatisticsCard.vue'
import OperationDataCard from './components/OperationDataCard.vue' import OperationDataCard from './components/OperationDataCard.vue'

View File

@ -55,6 +55,7 @@ const formData = ref({
id: undefined, id: undefined,
name: '', name: '',
picUrl: '', picUrl: '',
sort: 0,
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
description: '' description: ''
}) })
@ -115,6 +116,7 @@ const resetForm = () => {
id: undefined, id: undefined,
name: '', name: '',
picUrl: '', picUrl: '',
sort: 0,
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
description: '' description: ''
} }

View File

@ -110,7 +110,7 @@
:key="index" :key="index"
:src="picUrl" :src="picUrl"
:preview-src-list="scope.row.picUrls" :preview-src-list="scope.row.picUrls"
:initial-index="index" :initial-index="Number(index)"
class="h-40px w-40px" class="h-40px w-40px"
preview-teleported preview-teleported
/> />

View File

@ -32,9 +32,10 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref<PropertyApi.PropertyVO>({
id: undefined, id: undefined,
name: '' name: '',
remark: ''
}) })
const formRules = reactive({ const formRules = reactive({
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }] name: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
@ -69,7 +70,7 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as PropertyApi.PropertyVO const data = formData.value
if (formType.value === 'create') { if (formType.value === 'create') {
await PropertyApi.createProperty(data) await PropertyApi.createProperty(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -89,7 +90,8 @@ const submitForm = async () => {
const resetForm = () => { const resetForm = () => {
formData.value = { formData.value = {
id: undefined, id: undefined,
name: '' name: '',
remark: ''
} }
formRef.value?.resetFields() formRef.value?.resetFields()
} }

View File

@ -14,7 +14,7 @@
v-for="item in propertyOptions" v-for="item in propertyOptions"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id!"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -101,15 +101,15 @@ const { params } = useRoute() // 查询参数
const loading = ref(true) // const loading = ref(true) //
const total = ref(0) // const total = ref(0) //
const list = ref([]) // const list = ref<PropertyApi.PropertyValueVO[]>([]) //
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
propertyId: params.propertyId, propertyId: Number(params.propertyId),
name: undefined name: undefined
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
const propertyOptions = ref([]) // const propertyOptions = ref<PropertyApi.PropertyVO[]>([]) //
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {

View File

@ -493,22 +493,17 @@ const validateData = (propertyList: any[]) => {
} }
/** 构建所有排列组合 */ /** 构建所有排列组合 */
const build = (propertyValuesList: Property[][]) => { const build = (propertyValuesList: Property[][]): Property[][] => {
if (propertyValuesList.length === 0) { if (propertyValuesList.length === 0) {
return [] return []
} else if (propertyValuesList.length === 1) { } else if (propertyValuesList.length === 1) {
return propertyValuesList[0] return propertyValuesList[0].map((item) => [item])
} else { } else {
const result: Property[][] = [] const result: Property[][] = []
const rest = build(propertyValuesList.slice(1)) const rest = build(propertyValuesList.slice(1))
for (let i = 0; i < propertyValuesList[0].length; i++) { for (let i = 0; i < propertyValuesList[0].length; i++) {
for (let j = 0; j < rest.length; j++) { for (let j = 0; j < rest.length; j++) {
// result.push([propertyValuesList[0][i], ...rest[j]])
if (Array.isArray(rest[j])) {
result.push([propertyValuesList[0][i], ...rest[j]])
} else {
result.push([propertyValuesList[0][i], rest[j]])
}
} }
} }
return result return result

View File

@ -41,7 +41,7 @@ import { fenToYuan } from '@/utils'
defineOptions({ name: 'SkuTableSelect' }) defineOptions({ name: 'SkuTableSelect' })
const props = defineProps({ const props = defineProps({
spuId: propTypes.number.def(null) spuId: propTypes.number.def(undefined)
}) })
const list = ref<any[]>([]) // const list = ref<any[]>([]) //

View File

@ -55,7 +55,7 @@
<UploadImg v-model="formData.picUrl" :disabled="isDetail" height="80px" /> <UploadImg v-model="formData.picUrl" :disabled="isDetail" height="80px" />
</el-form-item> </el-form-item>
<el-form-item label="商品轮播图" prop="sliderPicUrls"> <el-form-item label="商品轮播图" prop="sliderPicUrls">
<UploadImgs v-model="formData.sliderPicUrls" :disabled="isDetail" /> <UploadImgs v-model="sliderPicUrls" :disabled="isDetail" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
@ -92,6 +92,12 @@ const formData = reactive<Spu>({
introduction: '', // introduction: '', //
brandId: undefined // brandId: undefined //
}) })
const sliderPicUrls = computed({
get: () => formData.sliderPicUrls || [],
set: (value: string[]) => {
formData.sliderPicUrls = value
}
})
const rules = reactive({ const rules = reactive({
name: [required], name: [required],
categoryId: [required], categoryId: [required],

View File

@ -57,6 +57,7 @@
import * as PropertyApi from '@/api/mall/product/property' import * as PropertyApi from '@/api/mall/product/property'
import { PropertyAndValues } from '@/views/mall/product/spu/components' import { PropertyAndValues } from '@/views/mall/product/spu/components'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import type { PropType } from 'vue'
defineOptions({ name: 'ProductAttributes' }) defineOptions({ name: 'ProductAttributes' })
@ -82,8 +83,8 @@ const attributeList = ref<PropertyAndValues[]>([]) // 商品属性列表
const attributeOptions = ref([] as PropertyApi.PropertyValueVO[]) // const attributeOptions = ref([] as PropertyApi.PropertyValueVO[]) //
const props = defineProps({ const props = defineProps({
propertyList: { propertyList: {
type: Array, type: Array as PropType<PropertyAndValues[]>,
default: () => {} default: () => []
}, },
isDetail: propTypes.bool.def(false) // isDetail: propTypes.bool.def(false) //
}) })
@ -92,7 +93,7 @@ watch(
() => props.propertyList, () => props.propertyList,
(data) => { (data) => {
if (!data) return if (!data) return
attributeList.value = data as any attributeList.value = data
}, },
{ {
deep: true, deep: true,
@ -114,9 +115,9 @@ const handleCloseProperty = (index: number) => {
/** 显示输入框并获取焦点 */ /** 显示输入框并获取焦点 */
const showInput = async (index: number) => { const showInput = async (index: number) => {
attributeIndex.value = index attributeIndex.value = index
inputRef.value[index].focus() inputRef.value[index]?.focus()
// //
await getAttributeOptions(attributeList.value[index].id) await getAttributeOptions(attributeList.value[index]!.id)
} }
/** 输入框失去焦点或点击回车时触发 */ /** 输入框失去焦点或点击回车时触发 */
@ -124,7 +125,8 @@ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成
const handleInputConfirm = async (index: number, propertyId: number) => { const handleInputConfirm = async (index: number, propertyId: number) => {
if (inputValue.value) { if (inputValue.value) {
// 1. // 1.
if (attributeList.value[index].values.find((item) => item.name === inputValue.value)) { const values = attributeList.value[index]!.values || []
if (values.find((item) => item.name === inputValue.value)) {
message.warning('已存在相同属性值,请重试') message.warning('已存在相同属性值,请重试')
attributeIndex.value = null attributeIndex.value = null
inputValue.value = '' inputValue.value = ''
@ -136,7 +138,8 @@ const handleInputConfirm = async (index: number, propertyId: number) => {
if (existValue) { if (existValue) {
attributeIndex.value = null attributeIndex.value = null
inputValue.value = '' inputValue.value = ''
attributeList.value[index].values.push({ id: existValue.id, name: existValue.name }) values.push({ id: existValue.id!, name: existValue.name })
attributeList.value[index]!.values = values
emit('success', attributeList.value) emit('success', attributeList.value)
return return
} }
@ -144,7 +147,8 @@ const handleInputConfirm = async (index: number, propertyId: number) => {
// 2.2 // 2.2
try { try {
const id = await PropertyApi.createPropertyValue({ propertyId, name: inputValue.value }) const id = await PropertyApi.createPropertyValue({ propertyId, name: inputValue.value })
attributeList.value[index].values.push({ id, name: inputValue.value }) values.push({ id, name: inputValue.value })
attributeList.value[index]!.values = values
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
emit('success', attributeList.value) emit('success', attributeList.value)
} catch { } catch {

View File

@ -36,6 +36,8 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import * as PropertyApi from '@/api/mall/product/property' import * as PropertyApi from '@/api/mall/product/property'
import type { PropType } from 'vue'
import { PropertyAndValues } from '@/views/mall/product/spu/components'
defineOptions({ name: 'ProductPropertyForm' }) defineOptions({ name: 'ProductPropertyForm' })
@ -51,12 +53,12 @@ const formRules = reactive({
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }] name: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
}) })
const formRef = ref() // Ref const formRef = ref() // Ref
const attributeList = ref([]) // const attributeList = ref<PropertyAndValues[]>([]) //
const attributeOptions = ref([] as PropertyApi.PropertyVO[]) // const attributeOptions = ref([] as PropertyApi.PropertyVO[]) //
const props = defineProps({ const props = defineProps({
propertyList: { propertyList: {
type: Array, type: Array as PropType<PropertyAndValues[]>,
default: () => {} default: () => []
} }
}) })
@ -99,7 +101,7 @@ const submitForm = async () => {
if (existProperty) { if (existProperty) {
// //
attributeList.value.push({ attributeList.value.push({
id: existProperty.id, id: existProperty.id!,
...formData.value, ...formData.value,
values: [] values: []
}) })

View File

@ -130,8 +130,8 @@ const getSpuDetails = async (
if (typeof products !== 'undefined') { if (typeof products !== 'undefined') {
const product = products.find((item) => item.skuId === sku.id) const product = products.find((item) => item.skuId === sku.id)
if (product) { if (product) {
product.bargainFirstPrice = formatToFraction(product.bargainFirstPrice) product.bargainFirstPrice = Number(formatToFraction(product.bargainFirstPrice))
product.bargainMinPrice = formatToFraction(product.bargainMinPrice) product.bargainMinPrice = Number(formatToFraction(product.bargainMinPrice))
} }
config = product || config config = product || config
} }
@ -163,8 +163,8 @@ const open = async (type: string, id?: number) => {
id id
)) as BargainActivityApi.BargainActivityVO )) as BargainActivityApi.BargainActivityVO
// , // ,
data.randomMinPrice = formatToFraction(data.randomMinPrice) data.randomMinPrice = Number(formatToFraction(data.randomMinPrice))
data.randomMaxPrice = formatToFraction(data.randomMaxPrice) data.randomMaxPrice = Number(formatToFraction(data.randomMaxPrice))
// //
await getSpuDetails( await getSpuDetails(
data.spuId!, data.spuId!,

View File

@ -39,23 +39,6 @@
<el-form-item> <el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['promotion:bargain-record:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['promotion:bargain-record:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -152,10 +135,9 @@ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
status: null, status: null,
createTime: [] createTime: [] as string[]
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {

View File

@ -104,7 +104,7 @@ const getSpuDetails = async (
if (typeof products !== 'undefined') { if (typeof products !== 'undefined') {
const product = products.find((item) => item.skuId === sku.id) const product = products.find((item) => item.skuId === sku.id)
if (product) { if (product) {
product.combinationPrice = formatToFraction(product.combinationPrice) product.combinationPrice = Number(formatToFraction(product.combinationPrice))
} }
config = product || config config = product || config
} }

View File

@ -179,7 +179,7 @@ const dialogVisible = ref(false)
const queryParams = ref({ const queryParams = ref({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
name: null, name: undefined as string | undefined,
status: undefined status: undefined
}) })
@ -235,8 +235,8 @@ const resetQuery = () => {
queryParams.value = { queryParams.value = {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
name: '', name: undefined,
createTime: [] status: undefined
} }
getList() getList()
} }

View File

@ -194,7 +194,7 @@ onMounted(() => {
for (const dict of getIntDictOptions(DICT_TYPE.PROMOTION_COUPON_STATUS)) { for (const dict of getIntDictOptions(DICT_TYPE.PROMOTION_COUPON_STATUS)) {
statusTabs.push({ statusTabs.push({
label: dict.label, label: dict.label,
value: dict.value as string value: String(dict.value)
}) })
} }
}) })

View File

@ -156,7 +156,7 @@
> >
<el-date-picker <el-date-picker
v-model="formData.validTimes" v-model="formData.validTimes"
:default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)]" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
type="datetimerange" type="datetimerange"
value-format="x" value-format="x"
/> />

View File

@ -57,7 +57,7 @@
:key="index" :key="index"
:src="url" :src="url"
:preview-src-list="scope.row.previewPicUrls" :preview-src-list="scope.row.previewPicUrls"
:initial-index="index" :initial-index="Number(index)"
preview-teleported preview-teleported
/> />
</template> </template>
@ -131,7 +131,7 @@ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
name: null, name: null,
createTime: [] createTime: [] as string[]
}) })
const queryFormRef = ref() // const queryFormRef = ref() //

View File

@ -57,7 +57,7 @@
:key="index" :key="index"
:src="url" :src="url"
:preview-src-list="scope.row.previewPicUrls" :preview-src-list="scope.row.previewPicUrls"
:initial-index="index" :initial-index="Number(index)"
preview-teleported preview-teleported
/> />
</template> </template>
@ -147,7 +147,7 @@ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
name: null, name: null,
createTime: [] createTime: [] as string[]
}) })
const queryFormRef = ref() // const queryFormRef = ref() //

View File

@ -5,7 +5,7 @@
:key="pointActivity.id" :key="pointActivity.id"
class="select-box spu-pic" class="select-box spu-pic"
> >
<el-tooltip :content="pointActivity.name"> <el-tooltip :content="pointActivity.spuName">
<div class="relative h-full w-full"> <div class="relative h-full w-full">
<el-image :src="pointActivity.picUrl" class="h-full w-full" /> <el-image :src="pointActivity.picUrl" class="h-full w-full" />
<Icon <Icon

View File

@ -90,8 +90,11 @@ const formType = ref('') // 表单的类型create - 新增update - 修改
const formData = ref<RewardActivityApi.RewardActivityVO>({ const formData = ref<RewardActivityApi.RewardActivityVO>({
conditionType: PromotionConditionTypeEnum.PRICE.type, conditionType: PromotionConditionTypeEnum.PRICE.type,
productScope: PromotionProductScopeEnum.ALL.scope, productScope: PromotionProductScopeEnum.ALL.scope,
productScopeValues: [],
productCategoryIds: [],
productSpuIds: [],
rules: [] rules: []
} as RewardActivityApi.RewardActivityVO) })
const formRules = reactive({ const formRules = reactive({
name: [{ required: true, message: '活动名称不能为空', trigger: 'blur' }], name: [{ required: true, message: '活动名称不能为空', trigger: 'blur' }],
startAndEndTime: [{ required: true, message: '活动时间不能为空', trigger: 'blur' }], startAndEndTime: [{ required: true, message: '活动时间不能为空', trigger: 'blur' }],
@ -113,9 +116,16 @@ const open = async (type: string, id?: number) => {
if (id) { if (id) {
formLoading.value = true formLoading.value = true
try { try {
const data = await RewardActivityApi.getReward(id) const data: RewardActivityApi.RewardActivityVO = {
productScopeValues: [],
productCategoryIds: [],
productSpuIds: [],
...(await RewardActivityApi.getReward(id))
}
// //
data.startAndEndTime = [data.startTime, data.endTime] if (data.startTime && data.endTime) {
data.startAndEndTime = [data.startTime, data.endTime]
}
// //
data.rules?.forEach((item: any) => { data.rules?.forEach((item: any) => {
item.discountPrice = fenToYuan(item.discountPrice || 0) item.discountPrice = fenToYuan(item.discountPrice || 0)
@ -180,8 +190,11 @@ const resetForm = () => {
formData.value = { formData.value = {
conditionType: PromotionConditionTypeEnum.PRICE.type, conditionType: PromotionConditionTypeEnum.PRICE.type,
productScope: PromotionProductScopeEnum.ALL.scope, productScope: PromotionProductScopeEnum.ALL.scope,
productScopeValues: [],
productCategoryIds: [],
productSpuIds: [],
rules: [] rules: []
} as RewardActivityApi.RewardActivityVO }
} }
/** 获得商品范围 */ /** 获得商品范围 */
@ -193,13 +206,8 @@ const getProductScope = async () => {
break break
case PromotionProductScopeEnum.CATEGORY.scope: case PromotionProductScopeEnum.CATEGORY.scope:
await nextTick() await nextTick()
let productCategoryIds = formData.value.productScopeValues as any
if (Array.isArray(productCategoryIds) && productCategoryIds.length === 1) {
// 使
productCategoryIds = productCategoryIds[0]
}
// //
formData.value.productCategoryIds = productCategoryIds formData.value.productCategoryIds = formData.value.productScopeValues
break break
default: default:
break break
@ -213,9 +221,7 @@ function setProductScopeValues(data: any) {
data.productScopeValues = formData.value.productSpuIds data.productScopeValues = formData.value.productSpuIds
break break
case PromotionProductScopeEnum.CATEGORY.scope: case PromotionProductScopeEnum.CATEGORY.scope:
data.productScopeValues = Array.isArray(formData.value.productCategoryIds) data.productScopeValues = formData.value.productCategoryIds
? formData.value.productCategoryIds
: [formData.value.productCategoryIds]
break break
default: default:
break break

View File

@ -89,7 +89,7 @@ const initGiveCouponList = async () => {
if (isEmpty(rewardRule.value) || isEmpty(rewardRule.value.giveCouponTemplateCounts)) { if (isEmpty(rewardRule.value) || isEmpty(rewardRule.value.giveCouponTemplateCounts)) {
return return
} }
const tempLateIds = Object.keys(rewardRule.value.giveCouponTemplateCounts!) const tempLateIds = Object.keys(rewardRule.value.giveCouponTemplateCounts!).map(Number)
const data = await CouponTemplateApi.getCouponTemplateList(tempLateIds) const data = await CouponTemplateApi.getCouponTemplateList(tempLateIds)
if (!data) { if (!data) {
return return

View File

@ -106,6 +106,7 @@ const getSpuDetails = async (
typeof skuIds === 'undefined' ? spu?.skus : spu?.skus?.filter((sku) => skuIds.includes(sku.id!)) typeof skuIds === 'undefined' ? spu?.skus : spu?.skus?.filter((sku) => skuIds.includes(sku.id!))
selectSkus?.forEach((sku) => { selectSkus?.forEach((sku) => {
let config: SeckillActivityApi.SeckillProductVO = { let config: SeckillActivityApi.SeckillProductVO = {
spuId: spu.id!,
skuId: sku.id!, skuId: sku.id!,
stock: 0, stock: 0,
seckillPrice: 0 seckillPrice: 0
@ -113,7 +114,7 @@ const getSpuDetails = async (
if (typeof products !== 'undefined') { if (typeof products !== 'undefined') {
const product = products.find((item) => item.skuId === sku.id) const product = products.find((item) => item.skuId === sku.id)
if (product) { if (product) {
product.seckillPrice = formatToFraction(product.seckillPrice) product.seckillPrice = Number(formatToFraction(product.seckillPrice))
} }
config = product || config config = product || config
} }

View File

@ -157,7 +157,7 @@
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as SeckillActivityApi from '@/api/mall/promotion/seckill/seckillActivity' import * as SeckillActivityApi from '@/api/mall/promotion/seckill/seckillActivity'
import { SeckillConfigApi } from '@/api/mall/promotion/seckill/seckillConfig' import { SeckillConfigApi, SeckillConfigVO } from '@/api/mall/promotion/seckill/seckillConfig'
import SeckillActivityForm from './SeckillActivityForm.vue' import SeckillActivityForm from './SeckillActivityForm.vue'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { fenToYuanFormat } from '@/utils/formatter' import { fenToYuanFormat } from '@/utils/formatter'
@ -235,7 +235,7 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
const configList = ref([]) // const configList = ref<SeckillConfigVO[]>([]) //
const formatConfigNames = (configId) => { const formatConfigNames = (configId) => {
const config = configList.value.find((item) => item.id === configId) const config = configList.value.find((item) => item.id === configId)
return config != null ? `${config.name}[${config.startTime} ~ ${config.endTime}]` : '' return config != null ? `${config.name}[${config.startTime} ~ ${config.endTime}]` : ''

View File

@ -58,7 +58,7 @@ const canAdd = computed(() => {
return Activitys.value.length < props.limit return Activitys.value.length < props.limit
}) })
// //
const Activitys = ref<SeckillActivityApi.SeckillActivityVO[]>([]) const Activitys = ref<SeckillActivityApi.SeckillActivityVO[]>([])
watch( watch(

View File

@ -179,7 +179,7 @@ const dialogVisible = ref(false)
const queryParams = ref({ const queryParams = ref({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
name: null, name: undefined as string | undefined,
status: undefined status: undefined
}) })
@ -234,7 +234,7 @@ const resetQuery = () => {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
name: undefined, name: undefined,
createTime: [] status: undefined
} }
getList() getList()
} }

View File

@ -63,7 +63,7 @@
:key="index" :key="index"
:src="url" :src="url"
:preview-src-list="scope?.row.sliderPicUrls" :preview-src-list="scope?.row.sliderPicUrls"
:initial-index="index" :initial-index="Number(index)"
preview-teleported preview-teleported
/> />
</template> </template>

View File

@ -24,7 +24,7 @@
<el-col v-loading="loading" :sm="6" :xs="12"> <el-col v-loading="loading" :sm="6" :xs="12">
<SummaryCard <SummaryCard
:decimals="2" :decimals="2"
:value="fenToYuan(summary?.rechargePrice || 0)" :value="fenToYuanNumber(summary?.rechargePrice || 0)"
icon="fa-solid:money-check-alt" icon="fa-solid:money-check-alt"
icon-bg-color="text-yellow-500" icon-bg-color="text-yellow-500"
icon-color="bg-yellow-100" icon-color="bg-yellow-100"
@ -35,7 +35,7 @@
<el-col v-loading="loading" :sm="6" :xs="12"> <el-col v-loading="loading" :sm="6" :xs="12">
<SummaryCard <SummaryCard
:decimals="2" :decimals="2"
:value="fenToYuan(summary?.expensePrice || 0)" :value="fenToYuanNumber(summary?.expensePrice || 0)"
icon="fa-solid:yen-sign" icon="fa-solid:yen-sign"
icon-bg-color="text-green-500" icon-bg-color="text-green-500"
icon-color="bg-green-100" icon-color="bg-green-100"
@ -131,7 +131,7 @@ import {
import SummaryCard from '@/components/SummaryCard/index.vue' import SummaryCard from '@/components/SummaryCard/index.vue'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
import china from '@/assets/map/json/china.json' import china from '@/assets/map/json/china.json'
import { areaReplace, fenToYuan } from '@/utils' import { areaReplace, fenToYuan, fenToYuanNumber } from '@/utils'
import { DICT_TYPE, DictDataType, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, DictDataType, getIntDictOptions } from '@/utils/dict'
import echarts from '@/plugins/echarts' import echarts from '@/plugins/echarts'
import { fenToYuanFormat } from '@/utils/formatter' import { fenToYuanFormat } from '@/utils/formatter'

View File

@ -82,7 +82,7 @@
icon-bg-color="text-green-500" icon-bg-color="text-green-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.orderPayPrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.orderPayPrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.orderPayPrice, trendSummary?.value?.orderPayPrice,
@ -118,7 +118,7 @@
icon-bg-color="text-yellow-500" icon-bg-color="text-yellow-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.afterSaleRefundPrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.afterSaleRefundPrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.afterSaleRefundPrice, trendSummary?.value?.afterSaleRefundPrice,
@ -139,7 +139,7 @@ import { ProductStatisticsApi, ProductStatisticsVO } from '@/api/mall/statistics
import SummaryCard from '@/components/SummaryCard/index.vue' import SummaryCard from '@/components/SummaryCard/index.vue'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
import { DataComparisonRespVO } from '@/api/mall/statistics/common' import { DataComparisonRespVO } from '@/api/mall/statistics/common'
import { calculateRelativeRate, fenToYuan } from '@/utils' import { calculateRelativeRate, fenToYuanNumber } from '@/utils'
import download from '@/utils/download' import download from '@/utils/download'
import { CardTitle } from '@/components/Card' import { CardTitle } from '@/components/Card'
import * as DateUtil from '@/utils/formatTime' import * as DateUtil from '@/utils/formatTime'
@ -174,8 +174,8 @@ const lineChartOptions = reactive<EChartsOption>({
series: [ series: [
{ name: '商品浏览量', type: 'line', smooth: true, itemStyle: { color: '#B37FEB' } }, { name: '商品浏览量', type: 'line', smooth: true, itemStyle: { color: '#B37FEB' } },
{ name: '商品访客数', type: 'line', smooth: true, itemStyle: { color: '#FFAB2B' } }, { name: '商品访客数', type: 'line', smooth: true, itemStyle: { color: '#FFAB2B' } },
{ name: '支付金额', type: 'bar', smooth: true, yAxisIndex: 1, itemStyle: { color: '#1890FF' } }, { name: '支付金额', type: 'bar', yAxisIndex: 1, itemStyle: { color: '#1890FF' } },
{ name: '退款金额', type: 'bar', smooth: true, yAxisIndex: 1, itemStyle: { color: '#00C050' } } { name: '退款金额', type: 'bar', yAxisIndex: 1, itemStyle: { color: '#00C050' } }
], ],
toolbox: { toolbox: {
feature: { feature: {
@ -272,8 +272,8 @@ const getProductStatisticsList = async () => {
const list: ProductStatisticsVO[] = await ProductStatisticsApi.getProductStatisticsList({ times }) const list: ProductStatisticsVO[] = await ProductStatisticsApi.getProductStatisticsList({ times })
// //
for (let item of list) { for (let item of list) {
item.orderPayPrice = fenToYuan(item.orderPayPrice) item.orderPayPrice = fenToYuanNumber(item.orderPayPrice)
item.afterSaleRefundPrice = fenToYuan(item.afterSaleRefundPrice) item.afterSaleRefundPrice = fenToYuanNumber(item.afterSaleRefundPrice)
} }
// Echarts // Echarts
if (lineChartOptions.dataset && lineChartOptions.dataset['source']) { if (lineChartOptions.dataset && lineChartOptions.dataset['source']) {

View File

@ -35,7 +35,7 @@
title="昨日支付金额" title="昨日支付金额"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(summary?.value?.yesterdayPayPrice || 0)" :value="fenToYuanNumber(summary?.value?.yesterdayPayPrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
summary?.value?.yesterdayPayPrice, summary?.value?.yesterdayPayPrice,
@ -49,8 +49,8 @@
tooltip="本月支付金额" tooltip="本月支付金额"
title="本月支付金额" title="本月支付金额"
prefix="¥" prefix="¥"
::decimals="2" :decimals="2"
:value="fenToYuan(summary?.value?.monthPayPrice || 0)" :value="fenToYuanNumber(summary?.value?.monthPayPrice || 0)"
:percent=" :percent="
calculateRelativeRate(summary?.value?.monthPayPrice, summary?.reference?.monthPayPrice) calculateRelativeRate(summary?.value?.monthPayPrice, summary?.reference?.monthPayPrice)
" "
@ -86,7 +86,7 @@
icon-bg-color="text-blue-500" icon-bg-color="text-blue-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.turnoverPrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.turnoverPrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.turnoverPrice, trendSummary?.value?.turnoverPrice,
@ -104,7 +104,7 @@
icon-bg-color="text-purple-500" icon-bg-color="text-purple-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.orderPayPrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.orderPayPrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.orderPayPrice, trendSummary?.value?.orderPayPrice,
@ -122,7 +122,7 @@
icon-bg-color="text-yellow-500" icon-bg-color="text-yellow-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.rechargePrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.rechargePrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.rechargePrice, trendSummary?.value?.rechargePrice,
@ -140,7 +140,7 @@
icon-bg-color="text-green-500" icon-bg-color="text-green-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.expensePrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.expensePrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.expensePrice, trendSummary?.value?.expensePrice,
@ -158,7 +158,7 @@
icon-bg-color="text-cyan-500" icon-bg-color="text-cyan-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.walletPayPrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.walletPayPrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.walletPayPrice, trendSummary?.value?.walletPayPrice,
@ -176,7 +176,7 @@
icon-bg-color="text-yellow-500" icon-bg-color="text-yellow-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.brokerageSettlementPrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.brokerageSettlementPrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.brokerageSettlementPrice, trendSummary?.value?.brokerageSettlementPrice,
@ -194,7 +194,7 @@
icon-bg-color="text-blue-500" icon-bg-color="text-blue-500"
prefix="¥" prefix="¥"
:decimals="2" :decimals="2"
:value="fenToYuan(trendSummary?.value?.afterSaleRefundPrice || 0)" :value="fenToYuanNumber(trendSummary?.value?.afterSaleRefundPrice || 0)"
:percent=" :percent="
calculateRelativeRate( calculateRelativeRate(
trendSummary?.value?.afterSaleRefundPrice, trendSummary?.value?.afterSaleRefundPrice,
@ -218,7 +218,7 @@ import SummaryCard from '@/components/SummaryCard/index.vue'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
import { DataComparisonRespVO } from '@/api/mall/statistics/common' import { DataComparisonRespVO } from '@/api/mall/statistics/common'
import { TradeSummaryRespVO, TradeTrendSummaryRespVO } from '@/api/mall/statistics/trade' import { TradeSummaryRespVO, TradeTrendSummaryRespVO } from '@/api/mall/statistics/trade'
import { calculateRelativeRate, fenToYuan } from '@/utils' import { calculateRelativeRate, fenToYuanNumber } from '@/utils'
import download from '@/utils/download' import download from '@/utils/download'
import { CardTitle } from '@/components/Card' import { CardTitle } from '@/components/Card'
import * as DateUtil from '@/utils/formatTime' import * as DateUtil from '@/utils/formatTime'
@ -322,10 +322,10 @@ const getTradeStatisticsList = async () => {
const list = await TradeStatisticsApi.getTradeStatisticsList({ times }) const list = await TradeStatisticsApi.getTradeStatisticsList({ times })
// //
for (let item of list) { for (let item of list) {
item.turnoverPrice = fenToYuan(item.turnoverPrice) item.turnoverPrice = fenToYuanNumber(item.turnoverPrice)
item.orderPayPrice = fenToYuan(item.orderPayPrice) item.orderPayPrice = fenToYuanNumber(item.orderPayPrice)
item.rechargePrice = fenToYuan(item.rechargePrice) item.rechargePrice = fenToYuanNumber(item.rechargePrice)
item.expensePrice = fenToYuan(item.expensePrice) item.expensePrice = fenToYuanNumber(item.expensePrice)
} }
// Echarts // Echarts
if (lineChartOptions.dataset && lineChartOptions.dataset['source']) { if (lineChartOptions.dataset && lineChartOptions.dataset['source']) {

View File

@ -231,9 +231,27 @@ import { ref, onMounted } from 'vue'
import { getCurrentUserId } from '@/utils/auth' import { getCurrentUserId } from '@/utils/auth'
const message = useMessage() // const message = useMessage() //
const port = ref('') type SerialReader = ReadableStreamDefaultReader<Uint8Array>
const ports = ref([]) type SerialPort = {
const reader = ref('') readable: ReadableStream<Uint8Array>
open: (options: SerialOptions) => Promise<void>
close: () => Promise<void>
}
type SerialOptions = {
baudRate: number
dataBits?: number
stopBits?: number
}
type SerialNavigator = Navigator & {
serial: {
requestPort: () => Promise<SerialPort>
getPorts: () => Promise<SerialPort[]>
}
}
const port = ref<SerialPort>()
const ports = ref<SerialPort[]>([])
const reader = ref<SerialReader>()
defineOptions({ name: 'PickUpOrder' }) defineOptions({ name: 'PickUpOrder' })
@ -335,22 +353,17 @@ const handlePickup = () => {
const connectToSerialPort = async () => { const connectToSerialPort = async () => {
try { try {
// //
if ( if ('serial' in navigator) {
'serial' in navigator && const serial = (navigator as SerialNavigator).serial
navigator.serial != null &&
typeof navigator.serial === 'object' &&
'requestPort' in navigator.serial
) {
// //
port.value = await navigator.serial.requestPort() port.value = await serial.requestPort()
// 访
ports.value = await serial.getPorts()
} else { } else {
message.error('浏览器不支持扫码枪连接,请更换浏览器重试') message.error('浏览器不支持扫码枪连接,请更换浏览器重试')
return return
} }
// 访
ports.value = await navigator.serial.getPorts()
// console.log(port.value, ports.value); // console.log(port.value, ports.value);
// console.log(port.value) // console.log(port.value)
// //
@ -369,6 +382,9 @@ const connectToSerialPort = async () => {
/** 监听扫码枪输入 */ /** 监听扫码枪输入 */
const readData = async () => { const readData = async () => {
if (!port.value) {
return
}
reader.value = port.value.readable.getReader() reader.value = port.value.readable.getReader()
let data = '' // let data = '' //
// //
@ -395,10 +411,10 @@ const readData = async () => {
/** 断开扫码枪 */ /** 断开扫码枪 */
const cutPort = async () => { const cutPort = async () => {
if (port.value !== '') { if (port.value) {
await reader.value.cancel() await reader.value?.cancel()
await port.value.close() await port.value.close()
port.value = '' port.value = undefined
console.log('断开扫码枪连接') console.log('断开扫码枪连接')
message.success('已成功断开扫码枪连接') message.success('已成功断开扫码枪连接')
serialPort.value = false serialPort.value = false

View File

@ -76,9 +76,9 @@ const formData = ref<ConfigApi.ConfigVO>({
// pointTradeDeductUnitPrice // pointTradeDeductUnitPrice
const computedPointTradeDeductUnitPrice = computed({ const computedPointTradeDeductUnitPrice = computed({
get: () => (formData.value.pointTradeDeductUnitPrice / 100).toFixed(2), get: () => formData.value.pointTradeDeductUnitPrice / 100,
set: (newValue: number) => { set: (newValue?: number) => {
formData.value.pointTradeDeductUnitPrice = Math.round(newValue * 100) formData.value.pointTradeDeductUnitPrice = Math.round((newValue ?? 0) * 100)
} }
}) })

View File

@ -81,15 +81,15 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref<MdItemTypeVO>({
id: undefined as unknown as number, id: undefined,
parentId: undefined as unknown as number, parentId: undefined,
code: undefined as unknown as string, code: undefined,
name: undefined as unknown as string, name: undefined,
itemOrProduct: MesItemOrProductEnum.ITEM.value as string, itemOrProduct: MesItemOrProductEnum.ITEM.value,
sort: 0, sort: 0,
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
remark: undefined as unknown as string remark: undefined
}) })
const formRules = reactive({ const formRules = reactive({
parentId: [{ required: true, message: '上级分类不能为空', trigger: 'blur' }], parentId: [{ required: true, message: '上级分类不能为空', trigger: 'blur' }],
@ -133,7 +133,7 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as MdItemTypeVO const data = formData.value
if (formType.value === 'create') { if (formType.value === 'create') {
await MdItemTypeApi.createItemType(data) await MdItemTypeApi.createItemType(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

View File

@ -56,7 +56,7 @@ const filterNode = (value: string, data: MdItemTypeVO) => {
if (!value) { if (!value) {
return true return true
} }
return data.name?.includes(value) return data.name?.includes(value) ?? false
} }
/** 监听搜索关键字变化,触发树过滤 */ /** 监听搜索关键字变化,触发树过滤 */

View File

@ -31,7 +31,7 @@
v-for="item in primaryUnitList" v-for="item in primaryUnitList"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id!"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -83,15 +83,15 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref<MdUnitMeasureVO>({
id: undefined as unknown as number, id: undefined,
code: undefined as unknown as string, code: undefined,
name: undefined as unknown as string, name: undefined,
primaryFlag: true as boolean, primaryFlag: true,
primaryId: undefined as unknown as number, primaryId: undefined,
changeRate: undefined as unknown as number, changeRate: undefined,
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
remark: undefined as unknown as string remark: undefined
}) })
const formRules = reactive({ const formRules = reactive({
code: [{ required: true, message: '单位编码不能为空', trigger: 'blur' }], code: [{ required: true, message: '单位编码不能为空', trigger: 'blur' }],
@ -136,13 +136,13 @@ const submitForm = async () => {
await formRef.value.validate() await formRef.value.validate()
// //
if (formData.value.primaryFlag) { if (formData.value.primaryFlag) {
formData.value.primaryId = undefined as unknown as number formData.value.primaryId = undefined
formData.value.changeRate = undefined as unknown as number formData.value.changeRate = undefined
} }
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as MdUnitMeasureVO const data = formData.value
if (formType.value === 'create') { if (formType.value === 'create') {
await MdUnitMeasureApi.createUnitMeasure(data) await MdUnitMeasureApi.createUnitMeasure(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

View File

@ -23,7 +23,7 @@
class="!w-1/1" class="!w-1/1"
@change="handleChange" @change="handleChange"
> >
<el-option v-for="item in filteredList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in filteredList" :key="item.id" :label="item.name" :value="item.id!">
<div class="flex items-center gap-8px"> <div class="flex items-center gap-8px">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<el-tag v-if="item.code" size="small" type="info" class="ml-4px"> <el-tag v-if="item.code" size="small" type="info" class="ml-4px">

View File

@ -69,7 +69,7 @@ const props = withDefaults(
workOrderId?: number // workOrderId?: number //
workstationId?: number // workstationId?: number //
statuses?: number[] // IN statuses?: number[] // IN
m?: boolean // disabled?: boolean //
clearable?: boolean // clearable?: boolean //
placeholder?: string // placeholder?: string //
}>(), }>(),

Some files were not shown because too many files have changed in this diff Show More