更新swag
This commit is contained in:
@@ -3387,6 +3387,12 @@
|
|||||||
],
|
],
|
||||||
"summary": "获取当前库存列表",
|
"summary": "获取当前库存列表",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "只查询有库存的原料",
|
||||||
|
"name": "has_stock",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "排序字段, 例如 \"stock DESC\"",
|
"description": "排序字段, 例如 \"stock DESC\"",
|
||||||
@@ -3710,6 +3716,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"enum": [
|
"enum": [
|
||||||
|
7,
|
||||||
-1,
|
-1,
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
@@ -3719,12 +3726,12 @@
|
|||||||
5,
|
5,
|
||||||
-1,
|
-1,
|
||||||
5,
|
5,
|
||||||
6,
|
6
|
||||||
7
|
|
||||||
],
|
],
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"x-enum-varnames": [
|
"x-enum-varnames": [
|
||||||
|
"_numLevels",
|
||||||
"DebugLevel",
|
"DebugLevel",
|
||||||
"InfoLevel",
|
"InfoLevel",
|
||||||
"WarnLevel",
|
"WarnLevel",
|
||||||
@@ -3734,8 +3741,7 @@
|
|||||||
"FatalLevel",
|
"FatalLevel",
|
||||||
"_minLevel",
|
"_minLevel",
|
||||||
"_maxLevel",
|
"_maxLevel",
|
||||||
"InvalidLevel",
|
"InvalidLevel"
|
||||||
"_numLevels"
|
|
||||||
],
|
],
|
||||||
"name": "level",
|
"name": "level",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
@@ -7262,6 +7268,10 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"maxLength": 255
|
"maxLength": 255
|
||||||
},
|
},
|
||||||
|
"max_addition_ratio": {
|
||||||
|
"description": "最大添加比例",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "原料名称",
|
"description": "原料名称",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -8819,6 +8829,10 @@
|
|||||||
"id": {
|
"id": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"max_addition_ratio": {
|
||||||
|
"description": "最大添加比例",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -9859,6 +9873,10 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"maxLength": 255
|
"maxLength": 255
|
||||||
},
|
},
|
||||||
|
"max_addition_ratio": {
|
||||||
|
"description": "最大添加比例",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "原料名称",
|
"description": "原料名称",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -10581,6 +10599,7 @@
|
|||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
7,
|
||||||
-1,
|
-1,
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
@@ -10590,10 +10609,10 @@
|
|||||||
5,
|
5,
|
||||||
-1,
|
-1,
|
||||||
5,
|
5,
|
||||||
6,
|
6
|
||||||
7
|
|
||||||
],
|
],
|
||||||
"x-enum-varnames": [
|
"x-enum-varnames": [
|
||||||
|
"_numLevels",
|
||||||
"DebugLevel",
|
"DebugLevel",
|
||||||
"InfoLevel",
|
"InfoLevel",
|
||||||
"WarnLevel",
|
"WarnLevel",
|
||||||
@@ -10603,8 +10622,7 @@
|
|||||||
"FatalLevel",
|
"FatalLevel",
|
||||||
"_minLevel",
|
"_minLevel",
|
||||||
"_maxLevel",
|
"_maxLevel",
|
||||||
"InvalidLevel",
|
"InvalidLevel"
|
||||||
"_numLevels"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ import { PaginationDTO, Response, StockLogSourceType } from '../enums';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {object} GetCurrentStockListParams
|
* @typedef {object} GetCurrentStockListParams
|
||||||
|
* @property {boolean} [has_stock] - 只查询有库存的原料
|
||||||
* @property {string} [order_by] - 排序字段, 例如 "stock DESC"
|
* @property {string} [order_by] - 排序字段, 例如 "stock DESC"
|
||||||
* @property {number} [page] - 页码
|
* @property {number} [page] - 页码
|
||||||
* @property {number} [page_size] - 每页数量
|
* @property {number} [page_size] - 每页数量
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import NutrientList from '../views/feed/NutrientList.vue'; // 修正拼写错误
|
|||||||
import PigAgeStageList from '../views/feed/PigAgeStageList.vue'; // 导入 PigAgeStageList 组件
|
import PigAgeStageList from '../views/feed/PigAgeStageList.vue'; // 导入 PigAgeStageList 组件
|
||||||
import PigBreedList from '../views/feed/PigBreedList.vue'; // 导入 PigBreedList 组件
|
import PigBreedList from '../views/feed/PigBreedList.vue'; // 导入 PigBreedList 组件
|
||||||
import RecipeList from '../views/feed/RecipeList.vue';
|
import RecipeList from '../views/feed/RecipeList.vue';
|
||||||
|
import StockManagement from '../views/inventory/StockManagement.vue';
|
||||||
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
@@ -45,6 +46,7 @@ const routes = [
|
|||||||
{path: '/feed/pig-age-stages', component: PigAgeStageList, meta: {requiresAuth: true, title: '年龄阶段管理'}}, // 添加年龄阶段管理路由
|
{path: '/feed/pig-age-stages', component: PigAgeStageList, meta: {requiresAuth: true, title: '年龄阶段管理'}}, // 添加年龄阶段管理路由
|
||||||
{path: '/feed/pig-breeds', component: PigBreedList, meta: {requiresAuth: true, title: '品种管理'}}, // 添加品种管理路由
|
{path: '/feed/pig-breeds', component: PigBreedList, meta: {requiresAuth: true, title: '品种管理'}}, // 添加品种管理路由
|
||||||
{path: '/feed/recipes', component: RecipeList, meta: {requiresAuth: true, title: '配方管理'}},
|
{path: '/feed/recipes', component: RecipeList, meta: {requiresAuth: true, title: '配方管理'}},
|
||||||
|
{path: '/inventory/stock', component: StockManagement, meta: {requiresAuth: true, title: '库存管理'}},
|
||||||
|
|
||||||
{path: '/monitor/device-command-logs', component: DeviceCommandLogView, meta: {requiresAuth: true, title: '设备命令日志'}},
|
{path: '/monitor/device-command-logs', component: DeviceCommandLogView, meta: {requiresAuth: true, title: '设备命令日志'}},
|
||||||
{path: '/monitor/medication-logs', component: MedicationLogsView, meta: {requiresAuth: true, title: '用药记录'}},
|
{path: '/monitor/medication-logs', component: MedicationLogsView, meta: {requiresAuth: true, title: '用药记录'}},
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
* @returns {string} - 格式化后的字符串,如果输入无效则返回空字符串或提示
|
* @returns {string} - 格式化后的字符串,如果输入无效则返回空字符串或提示
|
||||||
*/
|
*/
|
||||||
export function formatRFC3339(rfc3339String) {
|
export function formatRFC3339(rfc3339String) {
|
||||||
if (!rfc3339String) {
|
if (!rfc3339String || rfc3339String.startsWith('0001-01-01')) {
|
||||||
return '--'; // 或者返回空字符串 ''
|
return '--';
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user