Преглед на файлове

更改电动螺丝刀界面

qinhb преди 6 месеца
родител
ревизия
8a5cc3ee41
променени са 1 файла, в които са добавени 21 реда и са изтрити 4 реда
  1. 21 4
      src/views/pro-steps/components/screwdriver.vue

+ 21 - 4
src/views/pro-steps/components/screwdriver.vue

@@ -29,7 +29,7 @@
             v-if="item.deviceType == 'DDLSD'"
             placeholder="请选择任务"
             size="large"
-            style="position: absolute; right: 200px; z-index: 2; width: 140px"
+            style="position: absolute; right: 350px; z-index: 2; width: 140px"
           >
             <el-option
               v-for="item in options"
@@ -38,6 +38,20 @@
               :value="item.value"
             />
           </el-select>
+          <el-select
+              v-model="taskId"
+              v-if="item.deviceType == 'DDLSD'"
+              placeholder="请选择任务"
+              size="large"
+              style="position: absolute; right: 200px; z-index: 2; width: 140px"
+          >
+            <el-option
+                v-for="item in options2"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+            />
+          </el-select>
           <el-button
             class="ces"
             type="primary"
@@ -140,13 +154,13 @@ import {
 import { useProcessStore } from "@/store";
 import { useDictionaryStore } from "@/store";
 import { emitter, EventsNames } from "@/utils/common";
-import dayjs from "dayjs";
 const dictS = useDictionaryStore();
 const store = useProcessStore();
 const tableData = ref([]);
 const materialsData = ref([]);
 const router = useRouter();
 const taskValue = ref("");
+const taskId = ref("1")
 const toStartData = async (data) => {
   const { code } = await startData(data);
   if (code == "200") {
@@ -154,7 +168,8 @@ const toStartData = async (data) => {
   }
 };
 const getTask = async () => {
-  const { data } = await getTaskList({});
+  let params = {operationCode: store.processInfo.operationCode,materialNo: store.scanInfo.materialCode}
+  const { data } = await getTaskList(params);
   options.value = [];
   data.forEach((item) => {
     options.value.push({
@@ -164,7 +179,8 @@ const getTask = async () => {
   });
 };
 const options = ref([]);
-
+const options2 = ref([{value: '1',label: '任务1'},{value: '2',label: '任务2'},{value: '3',label: '任务3'},
+  {value: '4',label: '任务4'},{value: '5',label: '任务5'},{value: '6',label: '任务6'},{value: '7',label: '任务7'},{value: '8',label: '任务8'},]);
 const startTest = (a, b, c) => {
   let obj = {
     deviceName: a,
@@ -176,6 +192,7 @@ const startTest = (a, b, c) => {
     seqNo: store.useSeqNo,
     workOrderCode: store.odersData.workOrderCode,
     taskId: taskValue.value,
+    smallTaskId: taskId.value
   };
   toStartData(obj);
 };