Browse Source

工序步骤不需要传入加热区编号

feature/layout_0214
zhangjiming 5 months ago
parent
commit
b7b883b17d
  1. 38
      src/services/globalCmd/globalCmd.ts
  2. 10
      src/views/oreManage/components/CraftConfig.vue
  3. 8
      src/views/oreManage/components/StepItemEx.vue

38
src/services/globalCmd/globalCmd.ts

@ -3,15 +3,15 @@ import { addTxnRecord } from "../txn";
type UpTrayStepStruct = { type UpTrayStepStruct = {
method: "upTray"; method: "upTray";
params: {
heaterId: number;
};
// params: {
// heaterId: number;
// };
}; };
type DownTrayStepStruct = { type DownTrayStepStruct = {
method: "downTray"; method: "downTray";
params: {
heaterId: number;
};
// params: {
// heaterId: number;
// };
}; };
export type TubeSolStruct = { export type TubeSolStruct = {
tubeNum: number; tubeNum: number;
@ -30,15 +30,15 @@ type AddLiquidStepStruct = {
}; };
type MoveToSolStepStruct = { type MoveToSolStepStruct = {
method: "moveToSol"; method: "moveToSol";
params: {
heaterId: number;
};
// params: {
// heaterId: number;
// };
}; };
type MoveToHeaterStepStruct = { type MoveToHeaterStepStruct = {
method: "moveToHeater"; method: "moveToHeater";
params: {
heaterId: number;
};
// params: {
// heaterId: number;
// };
}; };
type ShakingStepStruct = { type ShakingStepStruct = {
method: "shaking"; method: "shaking";
@ -50,15 +50,15 @@ type ShakingStepStruct = {
type StartHeatingStepStruct = { type StartHeatingStepStruct = {
method: "startHeating"; method: "startHeating";
params: { params: {
heaterId: number;
// heaterId: number;
temperature: number; temperature: number;
}; };
}; };
type StopHeatingStepStruct = { type StopHeatingStepStruct = {
method: "stopHeating"; method: "stopHeating";
params: {
heaterId: number;
};
// params: {
// heaterId: number;
// };
}; };
type TakePhotoStepStruct = { type TakePhotoStepStruct = {
method: "takePhoto"; method: "takePhoto";
@ -116,6 +116,8 @@ export const CmdDescMap: { [k in OperationCmd]: string } = {
closeClaw: "收合夹爪", closeClaw: "收合夹爪",
moveMachineArm: "移动机械臂", moveMachineArm: "移动机械臂",
moveTube: "移动试管", moveTube: "移动试管",
openDoor: "开门",
closeDoor: "关门",
}; };
export type OperationCmd = export type OperationCmd =
@ -137,8 +139,8 @@ export type OperationCmd =
| "closeClaw" // 收合夹爪 | "closeClaw" // 收合夹爪
| "moveMachineArm" // 移动机械臂 | "moveMachineArm" // 移动机械臂
| "moveTube" // 移动试管 | "moveTube" // 移动试管
| 'openDoor' //开门
| 'closeDoor' //关门
| "openDoor" //开门
| "closeDoor"; //关门
export function debugCmd(params: { command: OperationCmd; params: Record<string, any> }) { export function debugCmd(params: { command: OperationCmd; params: Record<string, any> }) {
const commandId = addTxnRecord({ ...params, category: "debug" }); const commandId = addTxnRecord({ ...params, category: "debug" });

10
src/views/oreManage/components/CraftConfig.vue

@ -66,14 +66,7 @@ const emit = defineEmits<{
function addStep(step: StepCmd) { function addStep(step: StepCmd) {
let st: StepStruct; let st: StepStruct;
if (step === "upTray" || step === "downTray" || step === "moveToSol" || step === "moveToHeater" || step === "stopHeating") {
st = {
method: step,
params: {
heaterId: 2,
},
};
} else if (step === "addLiquid") {
if (step === "addLiquid") {
st = { st = {
method: step, method: step,
params: { params: {
@ -85,7 +78,6 @@ function addStep(step: StepCmd) {
st = { st = {
method: step, method: step,
params: { params: {
heaterId: 2,
temperature: 100, temperature: 100,
}, },
}; };

8
src/views/oreManage/components/StepItemEx.vue

@ -33,7 +33,7 @@
<span></span> <span></span>
</div> </div>
</section> </section>
<section
<!-- <section
v-if=" v-if="
step.method === 'upTray' || step.method === 'upTray' ||
step.method === 'downTray' || step.method === 'downTray' ||
@ -51,16 +51,16 @@
:value="item.value" /> :value="item.value" />
</el-select> </el-select>
</div> </div>
</section>
</section> -->
<section v-if="step.method === 'startHeating'" class="bg-[#f4f4f4] h-12 flex items-center px-10 text-[#5e5e5e] gap-5"> <section v-if="step.method === 'startHeating'" class="bg-[#f4f4f4] h-12 flex items-center px-10 text-[#5e5e5e] gap-5">
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<el-select v-model="step.params.heaterId" placeholder="Select" style="width: 100px">
<!-- <el-select v-model="step.params.heaterId" placeholder="Select" style="width: 100px">
<el-option <el-option
v-for="item in settingStore.areaOptions" v-for="item in settingStore.areaOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" /> :value="item.value" />
</el-select>
</el-select> -->
<input <input
type="number" type="number"
v-model="step.params.temperature" v-model="step.params.temperature"

Loading…
Cancel
Save