diff --git a/src/apis/home.ts b/src/apis/home.ts index 291a15c..96efbd3 100644 --- a/src/apis/home.ts +++ b/src/apis/home.ts @@ -11,3 +11,8 @@ export const getTaskIng = (): Promise => http.get(`${baseUrl}getIngTask`) export const delTask = (params: string): Promise => http.delete(`${baseUrl}${params}`) export const trayIn = (): Promise => http.post('tray/in') export const trayOut = (): Promise => http.post('tray/out') +export const photoList = (params: System.Page): Promise => http.get('/photo/list', { params }) +export const takePhoto = (params?: { lightIntensity: number | null }): Promise => http.post('/photo/take', params) +export const savePhoto = (params: any): Promise => http.post('/photo/save', params) +export const getPhoto = (id: number): Promise => http.get(`/photo/id=${id}`) +export const delPhoto = (ids: string): Promise => http.delete(`/photo/ids=${ids}`) diff --git a/src/apis/ore.ts b/src/apis/ore.ts index 131e795..c69161e 100644 --- a/src/apis/ore.ts +++ b/src/apis/ore.ts @@ -1,6 +1,6 @@ import http from 'libs/http' -export const getOreList = (): Promise> => http.get(`/ores/list`) +export const getOreList = (params: System.Page = { pageNum: 1, pageSize: 999 }): Promise> => http.get(`/ores/list`, { params }) export const saveOre = (params: { name: string }): Promise => http.post(`/ores`, params) diff --git a/src/components/common/FTTable/index.vue b/src/components/common/FTTable/index.vue index d4c1093..51f9cf2 100644 --- a/src/components/common/FTTable/index.vue +++ b/src/components/common/FTTable/index.vue @@ -176,7 +176,7 @@ defineExpose({
- +
diff --git a/src/components/craft/AddCraft/index.vue b/src/components/craft/AddCraft/index.vue index dc014ad..0cc4bf7 100644 --- a/src/components/craft/AddCraft/index.vue +++ b/src/components/craft/AddCraft/index.vue @@ -81,7 +81,7 @@ const okHandle = async () => { }) } - if (['startHeating', 'shaking'].includes(step.method)) { + if (['startHeating', 'shaking', 'delay'].includes(step.method)) { if (step.params.minutes || step.params.seconds) { step.params.second = (step.params.minutes || 0) * 60 + (step.params.seconds || 0) || undefined } @@ -102,11 +102,14 @@ const okHandle = async () => { case 'shaking': step.params.description = `摇匀: ${step.params.second}秒` break + case 'delay': + step.params.description = `等待: ${step.params.second}秒` + break case 'takePhoto': step.params.description = `拍照` break } - return !allPropertiesDefined(step.params, ['minutes', 'seconds', 'coolingMinutes', 'coolingSeconds', 'description', 'inTemperature']) + return !allPropertiesDefined(step.params, ['minutes', 'seconds', 'coolingMinutes', 'coolingSeconds', 'description', 'inTemperature', 'expand']) }, ) @@ -144,6 +147,7 @@ const stepMap: Record = { startHeating: { name: '加热', method: 'startHeating', params: { temperature: undefined, second: undefined, description: undefined, minutes: undefined, seconds: undefined } }, shaking: { name: '摇匀', method: 'shaking', params: { second: undefined } }, takePhoto: { name: '拍照', method: 'takePhoto', params: { } }, + delay: { name: '等待', method: 'delay', params: { second: undefined } }, } const addStep = (data: CraftTypes.StepItem) => { @@ -168,9 +172,9 @@ const addLiquidRules = { const addLiquidFormRef = ref() -const activeTube = ref(Array.from({ length: 16 }).fill(false)) +const activeTube = ref(Array.from({ length: 16 }).fill(true)) -const selectVisible = ref(false) +const selectVisible = ref(true) const checkChange = () => { activeTube.value = Array.from({ length: 16 }).fill(selectVisible.value) addLiquidForm.value.tubeNums = activeTube.value.map((item, index) => index + 1).filter(item => activeTube.value[item - 1]) @@ -193,6 +197,8 @@ const mousedownHandle = async (e: Event) => { } const addHandle = async () => { + addLiquidForm.value.tubeNums = activeTube.value.map((item, index) => index + 1).filter(item => activeTube.value[item - 1]) + addLiquidFormRef.value.validateField('tubeNums') try { const valid = await addLiquidFormRef.value.validate() if (!valid) { @@ -233,8 +239,8 @@ const addHandle = async () => { ], } - activeTube.value = Array.from({ length: 16 }).fill(false) - selectVisible.value = false + activeTube.value = Array.from({ length: 16 }).fill(true) + selectVisible.value = true addLiquidFormRef.value.resetFields() } catch (error) { @@ -357,12 +363,12 @@ const addHandle = async () => {
-
+
- + - +
@@ -440,7 +446,7 @@ const addHandle = async () => {
-