优化
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import http from '@/utils/http'
|
import http from '@/utils/http'
|
||||||
|
|
||||||
const BASE_URL = '/admin/meterialInfo'
|
const BASE_URL = '/admin/materialInfo'
|
||||||
|
|
||||||
export interface MeterialInfoResp {
|
export interface MaterialInfoResp {
|
||||||
materialName: string
|
materialName: string
|
||||||
encoding: string
|
encoding: string
|
||||||
unitWeight: string
|
unitWeight: string
|
||||||
maxWeight: string
|
materialSpec: string
|
||||||
photoUrl: string
|
photoUrl: string
|
||||||
createUser: string
|
createUser: string
|
||||||
createTime: string
|
createTime: string
|
||||||
@@ -23,12 +23,15 @@ export interface MaterialInfoPageQuery extends MaterialInfoQuery, PageQuery {}
|
|||||||
|
|
||||||
/** @desc 查询物料信息列表 */
|
/** @desc 查询物料信息列表 */
|
||||||
export function listMaterialInfo(query: MaterialInfoPageQuery) {
|
export function listMaterialInfo(query: MaterialInfoPageQuery) {
|
||||||
return http.get<PageRes<MeterialInfoResp[]>>(`${BASE_URL}`, query)
|
return http.get<PageRes<MaterialInfoResp[]>>(`${BASE_URL}`, query)
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MaterialInfoDetailResp {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @desc 查询物料信息详情 */
|
/** @desc 查询物料信息详情 */
|
||||||
export function getMaterialInfo(id: string) {
|
export function getMaterialInfo(id: string) {
|
||||||
return http.get<MeterialInfoDetailResp>(`${BASE_URL}/${id}`)
|
return http.get<MaterialInfoDetailResp>(`${BASE_URL}/${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @desc 新增物料信息 */
|
/** @desc 新增物料信息 */
|
||||||
@@ -47,6 +50,6 @@ export function deleteMaterialInfo(id: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @desc 导出物料信息 */
|
/** @desc 导出物料信息 */
|
||||||
export function exportMaterialInfo(query: MeterialInfoQuery) {
|
export function exportMaterialInfo(query: MaterialInfoQuery) {
|
||||||
return http.download(`${BASE_URL}/export`, query)
|
return http.download(`${BASE_URL}/export`, query)
|
||||||
}
|
}
|
||||||
|
|||||||
20
src/types/components.d.ts
vendored
20
src/types/components.d.ts
vendored
@@ -13,7 +13,9 @@ declare module 'vue' {
|
|||||||
ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb']
|
ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb']
|
||||||
ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem']
|
ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem']
|
||||||
AButton: typeof import('@arco-design/web-vue')['Button']
|
AButton: typeof import('@arco-design/web-vue')['Button']
|
||||||
|
ACard: typeof import('@arco-design/web-vue')['Card']
|
||||||
ACheckbox: typeof import('@arco-design/web-vue')['Checkbox']
|
ACheckbox: typeof import('@arco-design/web-vue')['Checkbox']
|
||||||
|
ACheckboxGroup: typeof import('@arco-design/web-vue')['CheckboxGroup']
|
||||||
ACol: typeof import('@arco-design/web-vue')['Col']
|
ACol: typeof import('@arco-design/web-vue')['Col']
|
||||||
AConfigProvider: typeof import('@arco-design/web-vue')['ConfigProvider']
|
AConfigProvider: typeof import('@arco-design/web-vue')['ConfigProvider']
|
||||||
ADescriptions: typeof import('@arco-design/web-vue')['Descriptions']
|
ADescriptions: typeof import('@arco-design/web-vue')['Descriptions']
|
||||||
@@ -25,10 +27,13 @@ declare module 'vue' {
|
|||||||
AEmpty: typeof import('@arco-design/web-vue')['Empty']
|
AEmpty: typeof import('@arco-design/web-vue')['Empty']
|
||||||
AForm: typeof import('@arco-design/web-vue')['Form']
|
AForm: typeof import('@arco-design/web-vue')['Form']
|
||||||
AFormItem: typeof import('@arco-design/web-vue')['FormItem']
|
AFormItem: typeof import('@arco-design/web-vue')['FormItem']
|
||||||
|
AGrid: typeof import('@arco-design/web-vue')['Grid']
|
||||||
|
AGridItem: typeof import('@arco-design/web-vue')['GridItem']
|
||||||
AIcon: typeof import('@arco-design/web-vue')['Icon']
|
AIcon: typeof import('@arco-design/web-vue')['Icon']
|
||||||
AImage: typeof import('@arco-design/web-vue')['Image']
|
AImage: typeof import('@arco-design/web-vue')['Image']
|
||||||
AInput: typeof import('@arco-design/web-vue')['Input']
|
AInput: typeof import('@arco-design/web-vue')['Input']
|
||||||
AInputPassword: typeof import('@arco-design/web-vue')['InputPassword']
|
AInputNumber: typeof import('@arco-design/web-vue')['InputNumber']
|
||||||
|
AInputSearch: typeof import('@arco-design/web-vue')['InputSearch']
|
||||||
ALayout: typeof import('@arco-design/web-vue')['Layout']
|
ALayout: typeof import('@arco-design/web-vue')['Layout']
|
||||||
ALayoutHeader: typeof import('@arco-design/web-vue')['LayoutHeader']
|
ALayoutHeader: typeof import('@arco-design/web-vue')['LayoutHeader']
|
||||||
ALayoutSider: typeof import('@arco-design/web-vue')['LayoutSider']
|
ALayoutSider: typeof import('@arco-design/web-vue')['LayoutSider']
|
||||||
@@ -36,17 +41,30 @@ declare module 'vue' {
|
|||||||
AMenu: typeof import('@arco-design/web-vue')['Menu']
|
AMenu: typeof import('@arco-design/web-vue')['Menu']
|
||||||
AMenuItem: typeof import('@arco-design/web-vue')['MenuItem']
|
AMenuItem: typeof import('@arco-design/web-vue')['MenuItem']
|
||||||
AModal: typeof import('@arco-design/web-vue')['Modal']
|
AModal: typeof import('@arco-design/web-vue')['Modal']
|
||||||
|
AOverflowList: typeof import('@arco-design/web-vue')['OverflowList']
|
||||||
APopover: typeof import('@arco-design/web-vue')['Popover']
|
APopover: typeof import('@arco-design/web-vue')['Popover']
|
||||||
|
AProgress: typeof import('@arco-design/web-vue')['Progress']
|
||||||
|
ARadio: typeof import('@arco-design/web-vue')['Radio']
|
||||||
|
ARadioGroup: typeof import('@arco-design/web-vue')['RadioGroup']
|
||||||
|
ARangePicker: typeof import('@arco-design/web-vue')['RangePicker']
|
||||||
ARow: typeof import('@arco-design/web-vue')['Row']
|
ARow: typeof import('@arco-design/web-vue')['Row']
|
||||||
AScrollbar: typeof import('@arco-design/web-vue')['Scrollbar']
|
AScrollbar: typeof import('@arco-design/web-vue')['Scrollbar']
|
||||||
ASelect: typeof import('@arco-design/web-vue')['Select']
|
ASelect: typeof import('@arco-design/web-vue')['Select']
|
||||||
ASpace: typeof import('@arco-design/web-vue')['Space']
|
ASpace: typeof import('@arco-design/web-vue')['Space']
|
||||||
|
AStatistic: typeof import('@arco-design/web-vue')['Statistic']
|
||||||
ASubMenu: typeof import('@arco-design/web-vue')['SubMenu']
|
ASubMenu: typeof import('@arco-design/web-vue')['SubMenu']
|
||||||
ASwitch: typeof import('@arco-design/web-vue')['Switch']
|
ASwitch: typeof import('@arco-design/web-vue')['Switch']
|
||||||
ATable: typeof import('@arco-design/web-vue')['Table']
|
ATable: typeof import('@arco-design/web-vue')['Table']
|
||||||
ATabPane: typeof import('@arco-design/web-vue')['TabPane']
|
ATabPane: typeof import('@arco-design/web-vue')['TabPane']
|
||||||
ATabs: typeof import('@arco-design/web-vue')['Tabs']
|
ATabs: typeof import('@arco-design/web-vue')['Tabs']
|
||||||
|
ATag: typeof import('@arco-design/web-vue')['Tag']
|
||||||
|
ATextarea: typeof import('@arco-design/web-vue')['Textarea']
|
||||||
ATooltip: typeof import('@arco-design/web-vue')['Tooltip']
|
ATooltip: typeof import('@arco-design/web-vue')['Tooltip']
|
||||||
|
ATree: typeof import('@arco-design/web-vue')['Tree']
|
||||||
|
ATreeSelect: typeof import('@arco-design/web-vue')['TreeSelect']
|
||||||
|
ATrigger: typeof import('@arco-design/web-vue')['Trigger']
|
||||||
|
ATypographyParagraph: typeof import('@arco-design/web-vue')['TypographyParagraph']
|
||||||
|
AUpload: typeof import('@arco-design/web-vue')['Upload']
|
||||||
Avatar: typeof import('./../components/Avatar/index.vue')['default']
|
Avatar: typeof import('./../components/Avatar/index.vue')['default']
|
||||||
AWatermark: typeof import('@arco-design/web-vue')['Watermark']
|
AWatermark: typeof import('@arco-design/web-vue')['Watermark']
|
||||||
Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default']
|
Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default']
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ const columns: ColumnItem[] = reactive([
|
|||||||
span: 24,
|
span: 24,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '物料单次可称量最大重量(kg)',
|
label: '物料规格',
|
||||||
field: 'maxWeight',
|
field: 'materialSpec',
|
||||||
type: 'input-number',
|
type: 'input',
|
||||||
span: 24,
|
span: 24,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ const columns = ref<TableInstanceColumns[]>([
|
|||||||
{ title: '物料名称', dataIndex: 'materialName', slotName: 'materialName' },
|
{ title: '物料名称', dataIndex: 'materialName', slotName: 'materialName' },
|
||||||
{ title: '物料编码', dataIndex: 'encoding', slotName: 'encoding' },
|
{ title: '物料编码', dataIndex: 'encoding', slotName: 'encoding' },
|
||||||
{ title: '物料单位重量(g)', dataIndex: 'unitWeight', slotName: 'unitWeight' },
|
{ title: '物料单位重量(g)', dataIndex: 'unitWeight', slotName: 'unitWeight' },
|
||||||
{ title: '物料单次可称量最大重量(kg)', dataIndex: 'maxWeight', slotName: 'maxWeight' },
|
{ title: '物料规格', dataIndex: 'materialSpec', slotName: 'materialSpec' },
|
||||||
// 可给photoUrl列添加宽度,优化显示
|
|
||||||
{ title: '物料照片', dataIndex: 'photoUrl', slotName: 'photoUrl', width: 120, align: 'center' },
|
{ title: '物料照片', dataIndex: 'photoUrl', slotName: 'photoUrl', width: 120, align: 'center' },
|
||||||
{ title: '创建人', dataIndex: 'createUserString', slotName: 'createUser' },
|
{ title: '创建人', dataIndex: 'createUserString', slotName: 'createUser' },
|
||||||
{ title: '创建时间', dataIndex: 'createTime', slotName: 'createTime' },
|
{ title: '创建时间', dataIndex: 'createTime', slotName: 'createTime' },
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Message, type TreeNodeData } from '@arco-design/web-vue'
|
import { Message } from '@arco-design/web-vue'
|
||||||
import { useWindowSize } from '@vueuse/core'
|
import { useWindowSize } from '@vueuse/core'
|
||||||
import { addUser, getUser, updateUser } from '@/apis/system/user'
|
import { addUser, getUser, updateUser } from '@/apis/system/user'
|
||||||
import { type ColumnItem, GiForm } from '@/components/GiForm'
|
import { type ColumnItem, GiForm } from '@/components/GiForm'
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ import { DisEnableStatusList } from '@/constant/common'
|
|||||||
import { useDownload, useResetReactive, useTable } from '@/hooks'
|
import { useDownload, useResetReactive, useTable } from '@/hooks'
|
||||||
import { isMobile } from '@/utils'
|
import { isMobile } from '@/utils'
|
||||||
import has from '@/utils/has'
|
import has from '@/utils/has'
|
||||||
|
import type { ColumnItem } from '@/components/GiForm'
|
||||||
|
|
||||||
defineOptions({ name: 'SystemUser' })
|
defineOptions({ name: 'SystemUser' })
|
||||||
|
|
||||||
@@ -122,7 +123,7 @@ const queryFormColumns: ColumnItem[] = reactive([
|
|||||||
hideLabel: true,
|
hideLabel: true,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
placeholder: '搜索用户名/昵称/描述',
|
placeholder: '搜索用户名',
|
||||||
showWordLimit: false,
|
showWordLimit: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -167,7 +168,7 @@ const columns: TableInstanceColumns[] = [
|
|||||||
fixed: !isMobile() ? 'left' : undefined,
|
fixed: !isMobile() ? 'left' : undefined,
|
||||||
},
|
},
|
||||||
{ title: '用户名', dataIndex: 'username', slotName: 'username', minWidth: 100, ellipsis: true, tooltip: true },
|
{ title: '用户名', dataIndex: 'username', slotName: 'username', minWidth: 100, ellipsis: true, tooltip: true },
|
||||||
{ title:'卡号', dataIndex: 'cardNo', slotName: 'cardNo' },
|
{ title: '卡号', dataIndex: 'cardNo', slotName: 'cardNo' },
|
||||||
{ title: '状态', dataIndex: 'status', slotName: 'status', align: 'center' },
|
{ title: '状态', dataIndex: 'status', slotName: 'status', align: 'center' },
|
||||||
{ title: '性别', dataIndex: 'gender', slotName: 'gender', align: 'center' },
|
{ title: '性别', dataIndex: 'gender', slotName: 'gender', align: 'center' },
|
||||||
{ title: '角色', dataIndex: 'roleNames', slotName: 'roleNames', minWidth: 165 },
|
{ title: '角色', dataIndex: 'roleNames', slotName: 'roleNames', minWidth: 165 },
|
||||||
|
|||||||
Reference in New Issue
Block a user