fixed 因日志格式问题导致无法修改制剂数据

This commit is contained in:
LittleBoy 2024-12-20 23:31:34 +08:00
parent a740a36953
commit f30cde879c
3 changed files with 15 additions and 32 deletions

View File

@ -18,6 +18,9 @@ const { loading, runAsync, error } = useRequest(saveProduct, {
})
function handleSave() {
currentData.created_at = undefined;
currentData.updated_at = undefined;
currentData.status = undefined;
runAsync(currentData).then(() => {
editData.value = undefined;
emit('saved')
@ -33,32 +36,6 @@ function handleFinishError(errorInfo: any) {
function onValuesChange() {
error.value = undefined
}
/*
[
{ id: 1, name: "能量密度", alias: "power" },
{ id: 2, name: "蛋白Pro", alias: "protein" },
{ id: 3, name: "Glu", alias: "glu" },
{ id: 4, name: "Fat", alias: "fat" },
{ id: 5, name: "纤维素", alias: "cellulose" },
{ id: 6, name: "Na", alias: "na" },
{ id: 7, name: "K", alias: "k" },
{ id: 8, name: "Ca", alias: "ca" },
{ id: 9, name: "P", alias: "p" },
{ id: 10, name: "Mg", alias: "mg" },
];
*/
// const DataFields = [
// { label: '', name: 'power',message:'' },
// { label: 'Pro', name: 'protein',message:'Pro' },
// { label: 'Glu', name: 'glu',message:'Glu' },
// { label: 'Fat', name: 'fat',message:'Fat' },
// { label: '', name: 'cellulose',message:'' },
// { label: 'Na', name: 'na',message:'Na' },
// { label: 'K', name: 'k',message:'K' },
// { label: 'Ca', name: 'ca',message:'Ca' },
// { label: 'P', name: 'p',message:'P' },
// { label: 'Mg', name: 'mg',message:'Mg' },
// ]
</script>
<template>
<Modal :width="640" :open="true" :footer="null" @cancel="handleCancel" :mask-closable="false"

View File

@ -43,7 +43,10 @@ function handleDelete(id: number) {
}
})
}
function handleSearch(){
searchParams.value.page = 1;
run()
}
</script>
<template>
<div class="data-fields-container">
@ -63,7 +66,7 @@ function handleDelete(id: number) {
</Select>
</Space>
<Space class="form-item" :size="15">
<Button :icon="h(SearchOutlined)" type="primary" @click="run">查询</Button>
<Button :icon="h(SearchOutlined)" type="primary" @click="handleSearch">查询</Button>
<Button :icon="h(PlusOutlined)" class="btn-info" @click="editProduct = { id: 0 }">新增</Button>
</Space>
</Space>

View File

@ -46,6 +46,11 @@ function handleDelete(id: number) {
}
})
}
function handleSearch() {
searchParams.value.page = 1;
run()
}
</script>
<template>
<div class="data-fields-container">
@ -69,7 +74,7 @@ function handleDelete(id: number) {
</Select>
</Space>
<Space class="form-item" :size="15">
<Button :icon="h(SearchOutlined)" type="primary" @click="run">查询</Button>
<Button :icon="h(SearchOutlined)" type="primary" @click="handleSearch">查询</Button>
<Button :icon="h(PlusOutlined)" class="btn-info" @click="editUser = { id: 0 }">新增</Button>
</Space>
</Space>
@ -113,6 +118,4 @@ function handleDelete(id: number) {
<EditModal v-if="!!editUser" v-model="editUser" @saved="refresh" />
</div>
</template>
<style lang="scss">
</style>
<style lang="scss"></style>