fixed 因日志格式问题导致无法修改制剂数据
This commit is contained in:
parent
a740a36953
commit
f30cde879c
@ -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"
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user