ソースを参照

Merge remote-tracking branch 'origin/qingban' into qingban

# Conflicts:
#	src/views/pro-steps/components/ceshishuju.vue
jxq 1 週間 前
コミット
4554a77d72

+ 1 - 1
.env.development

@@ -11,7 +11,7 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_UPLOAD_URL = 'http://139.155.176.112:19000'
 
 # 开发接口地址
-VITE_APP_API_URL = 'http://192.168.1.112:7103'
+VITE_APP_API_URL = 'http://192.168.0.26:7104'
 # Websocket地址
 VITE_WEBSOCKET_URL = 'ws://192.168.1.112:7103'
 ``

+ 1 - 1
docker/Dockerfile

@@ -12,7 +12,7 @@ RUN echo "server {  \
                       gzip_vary on;\
                       client_max_body_size 100m;\
                       location   /client-server/ { \
-                        proxy_pass              http://192.168.1.4:7103/; \
+                        proxy_pass              http://192.168.1.4:8191/; \
                         proxy_redirect          off; \
                         proxy_set_header        Host client-server; \
                         proxy_set_header        X-Real-IP \$remote_addr; \

ファイルの差分が大きいため隠しています
+ 1 - 1
public/LuckExcel/luckysheet.umd.js


+ 20 - 0
src/api/process/index.ts

@@ -19,6 +19,26 @@ export function getOrders(data: any) {
   );
 }
 
+export function queryOpsList(data: any) {
+  return request(
+      {
+        url: "/api/v1/plan/workOrder/queryOps",
+        method: "post",
+        data: data,
+      },
+  );
+}
+export function getTaskWorkOrder(data: any) {
+  return request(
+      {
+        url: "/api/v1/plan/workOrder/taskWorkPage",
+        method: "post",
+        data: data,
+      },
+      { loadingKey: "getProcessOrders" }
+  );
+}
+
 /**
  * 扫码开工
  *

+ 2 - 2
src/api/prosteps/ceshishuju.ts

@@ -1,9 +1,9 @@
 import request from "@/utils/request";
 
 //获取当前列表
-export function dataArrayList(processId: string,deviceNo :string) {
+export function dataArrayList(processId: string,deviceNo :string,pageNo :string) {
   return request({
-    url: `/api/v1/testData/get/${processId}/${deviceNo}`,
+    url: `/api/v1/testData/get/${processId}/${deviceNo}/${pageNo}`,
     method: "get",
   });
 }

+ 2 - 2
src/components/AddMsg/index.vue

@@ -91,7 +91,7 @@ import { sendMsg, getStationType } from "@/api/process";
 import { emitter, EventsNames } from "@/utils/common";
 import { useDictionaryStore } from "@/store";
 import { useProcessStore } from "@/store/modules/processView";
-import { getOrders } from "@/api/process";
+import { getTaskWorkOrder } from "@/api/process";
 const dictS = useDictionaryStore();
 const store = useProcessStore();
 const route = useRoute();
@@ -137,7 +137,7 @@ const submit = async () => {
   }
 };
 const getOrdersData = async () => {
-  const { code, data } = await getOrders({
+  const { code, data } = await getTaskWorkOrder({
     pageNo: 1,
     pageSize: 999999999,
     queryComplete: 0,

+ 8 - 2
src/components/ExcelView/index.vue

@@ -3,6 +3,8 @@
     <div class="header">
       <div style="display: flex">
         <span v-if="option.out" class="btn" @click="downloadExcel">导出</span>
+    
+
         <!-- <el-button
           type="primary"
           class="btn"
@@ -48,7 +50,6 @@ import { onMounted, ref, watch } from "vue";
 import { exportExcel } from "./export";
 import LuckyExcel from "luckyexcel";
 import resData from "./resetData";
-
 const props = defineProps({
   //双向绑定的data
   data: {
@@ -192,6 +193,12 @@ const leadingExcel = (item, fileList) => {
     emits("update:data", data);
     inName.value = file.name;
     window.luckysheet.create(resetOb.value);
+    luckysheet.imageInsertAfter = function (item) {
+      console.log("新的图片插入完成");
+      console.log("文件对象:", item);
+
+      // 在这里添加自定义逻辑
+    };
   });
 };
 //导出
@@ -271,7 +278,6 @@ defineExpose({
   addImg,
 });
 onMounted(() => {
-console.log(luckysheet)
   if (props.data == null) {
     inName.value = "表格模版";
     resetOb.value.data = resetdata;

+ 8 - 2
src/views/pro-operation/remove/index.vue

@@ -47,7 +47,7 @@
               }"
             >
               <el-select v-model="ruleForm1.seqs" multiple placeholder="请选择" value-key="value">
-                <el-option v-for="item in infoData?.processWorkSeq" :key="item" :label="item" :value="item" />
+                <el-option v-for="item in processList" :key="item" :label="item" :value="item" />
               </el-select>
             </el-form-item>
             <el-form-item
@@ -158,6 +158,7 @@ import { addRework, addRework1, getList, getList1, delError } from "@/api/rework
 import { useProcessStore } from "@/store/modules/processView";
 import { useDictionaryStore } from "@/store/modules/dictionary";
 import { getUserTree } from "@/api/user/index";
+import {getunProcessedList} from "@/api/prosteps/index.js";
 const dictStroe = useDictionaryStore();
 const processStore = useProcessStore();
 const ruleForm = ref({
@@ -174,10 +175,15 @@ const ruleForm1 = ref({
   },
 });
 const tableData = ref([]);
+
+const processList=ref([]);
 const toAdd = () => {
   formStatus.value = false;
-  breakReportInfoById(processStore.scanInfo.id).then((res) => {
+  /*breakReportInfoById(processStore.scanInfo.id).then((res) => {
     infoData.value = res.data;
+  });*/
+  getunProcessedList(processStore.scanInfo.id).then((res) => {
+    processList.value = res.data ?? [];
   });
 };
 const toList = () => {

+ 8 - 2
src/views/pro-operation/rework/index.vue

@@ -51,7 +51,7 @@
                 @change="selectProcessWorkSeqChange"
               >
                 <el-option
-                  v-for="item in infoData?.processWorkSeq"
+                  v-for="item in processList"
                   :key="item"
                   :label="item"
                   :value="item"
@@ -135,6 +135,7 @@ import {
 } from "@/api/rework";
 import { useProcessStore } from "@/store/modules/processView";
 import { useDictionaryStore } from "@/store/modules/dictionary";
+import {getunProcessedList} from "@/api/prosteps/index.js";
 const dictStroe = useDictionaryStore();
 const processStore = useProcessStore();
 const infoIndex = ref(null);
@@ -163,10 +164,15 @@ const getReworkTempList = async () => {
   console.log(ReworkTempList.value);
 };
 const tableData = ref([]);
+
+const processList=ref([]);
 const toAdd = () => {
   formStatus.value = false;
-  breakReportInfoById(processStore.scanInfo.id).then((res) => {
+  /*breakReportInfoById(processStore.scanInfo.id).then((res) => {
     infoData.value = res.data;
+  });*/
+  getunProcessedList(processStore.scanInfo.id).then((res) => {
+    processList.value = res.data ?? [];
   });
 };
 const toList = () => {

+ 155 - 76
src/views/pro-steps/components/ceshishuju.vue

@@ -11,25 +11,66 @@
     <div class="bottom-box">
       <el-scrollbar style="height: calc(100vh - 300px); margin-top: 10px">
         <el-table :data="selectedDeviceList" class="left-selected-devs">
-          <el-table-column fixed prop="deviceNo" label="设备编号" align="center" />
-          <el-table-column fixed prop="deviceName" label="设备名称" align="center" />
+          <el-table-column
+            fixed
+            prop="deviceNo"
+            label="设备编号"
+            align="center"
+          />
+          <el-table-column
+            fixed
+            prop="deviceName"
+            label="设备名称"
+            align="center"
+          />
 
           <el-table-column label="操作">
             <template #default="scope">
-              <el-button link class="btnText" type="primary" @click="preToStart(scope.row)"> 开始 </el-button>
+              <el-button
+                link
+                class="btnText"
+                type="primary"
+                @click="preToStart(scope.row)"
+              >
+                开始
+              </el-button>
 
-              <el-button link class="btnText" type="primary" @click="preToLook(scope.row)"> 查看 </el-button>
-              <el-button link class="btnText" type="danger" @click="preDel(scope.row)"> 删除 </el-button>
+              <el-button
+                link
+                class="btnText"
+                type="primary"
+                @click="preToLook(scope.row)"
+              >
+                查看
+              </el-button>
+              <el-button
+                  link
+                  class="btnText"
+                  type="danger"
+                  @click="preDel(scope.row)"
+              >
+                删除
+              </el-button>
             </template>
           </el-table-column>
         </el-table>
       </el-scrollbar>
-
-      <el-table :data="tableData" class="tableView-cssj">
-        <el-table-column fixed prop="parameterName" label="测试项目" align="center" />
-        <el-table-column fixed prop="deviceCode" label="测试设备" align="center" />
+     <div class="tableView-cssj">
+      <el-table :data="tableData">
+        <el-table-column
+          fixed
+          prop="parameterName"
+          label="测试项目"
+          align="center"
+        />
+        <el-table-column
+          fixed
+          prop="deviceCode"
+          label="测试设备"
+          align="center"
+        />
         <el-table-column fixed prop="value" label="测试值" align="center" />
-        <!--        <el-table-column prop="flag" align="center" label="是否合格">
+<!--        <el-table-column prop="flag" align="center" label="是否合格">
           <template #default="scope">
             <span
               :class="{
@@ -74,7 +115,19 @@
         <!--                    </el-popconfirm>-->
         <!--        </template>-->
         <!--      </el-table-column>-->
+
       </el-table>
+       <div style="margin-top:25px">
+       <el-pagination
+         background
+         :page-size="20"
+         :pager-count="8"
+         layout="->,prev, pager, next"
+         :total="pageTotal"
+         @current-change="handlePageChange"
+       />
+       </div>
+     </div>
     </div>
 
     <el-dialog title="编辑测试项" v-model="dialogVisible">
@@ -88,7 +141,7 @@
         <el-form-item label="测试值">
           <el-input v-model="editRow.value" />
         </el-form-item>
-        <!--        <el-form-item label="是否合格">
+<!--        <el-form-item label="是否合格">
           <el-radio v-model="editRow.flag" :label="1">合格</el-radio>
           <el-radio v-model="editRow.flag" :label="0">不合格</el-radio>
         </el-form-item>-->
@@ -99,15 +152,17 @@
       </template>
     </el-dialog>
 
-    <CrudTable
-      ref="ctableRef"
-      tableTitle="设备绑定"
-      :multipleRow="multipleRow"
-      tableType="DEVICE"
-      @selected-sure="onSelectedFinish"
-    />
+        <CrudTable
+                ref="ctableRef"
+                tableTitle="设备绑定"
+                :multipleRow="multipleRow"
+                tableType="DEVICE"
+                @selected-sure="onSelectedFinish"
+        />
+
+
 
-    <el-dialog title="设置时间" v-model="startSettingVisible" append-to-body style="top: 20%">
+    <el-dialog title="设置时间" v-model="startSettingVisible" append-to-body style="top:20%">
       <el-date-picker
         v-model="startSettingTime"
         type="datetimerange"
@@ -133,8 +188,7 @@ import {
   getDeviceList,
   getDeviceListPage,
   getDataDevice,
-  addDataDevice,
-  delDataDevice,
+  addDataDevice, delDataDevice
 } from "@/api/prosteps/ceshishuju";
 import { useProcessStore } from "@/store";
 import { emitter, EventsNames } from "@/utils/common";
@@ -146,51 +200,67 @@ const onSelectedFinish = (val) => {
   if (Object.keys(val).length == 0) {
     ElMessage.error("请选择设备,数据不能为空!");
   }
-  val?.forEach((item, index) => {
-    const dataDevice = ref({});
-    dataDevice.value.processId = store.scanInfo.id;
-    dataDevice.value.seqNo = store.scanInfo.seqNo;
-    dataDevice.value.operationId = store.scanInfo.operationId;
-    dataDevice.value.operationName = store.scanInfo.operationName;
-    dataDevice.value.workOrderCode = store.scanInfo.workOrderCode;
-    dataDevice.value.deviceNo = item.deviceNo;
-    dataDevice.value.deviceName = item.deviceName;
-    dataDeviceList.value.push(dataDevice.value);
-  });
-  addDataDevice(dataDeviceList.value).then((res) => {
-    if (res.code === "200") {
-      const param = ref({ processId: store.scanInfo.id });
-      getDataDevice(param.value).then((data) => {
-        selectedDeviceList.value = JSON.parse(JSON.stringify(data.data));
-      });
-    }
-  });
-};
+  val?.forEach(
+      (item,index)=>{
+        const dataDevice =  ref({});
+        dataDevice.value.processId = store.scanInfo.id;
+        dataDevice.value.seqNo = store.scanInfo.seqNo;
+        dataDevice.value.operationId = store.scanInfo.operationId;
+        dataDevice.value.operationName = store.scanInfo.operationName;
+        dataDevice.value.workOrderCode = store.scanInfo.workOrderCode;
+        dataDevice.value.deviceNo = item.deviceNo;
+        dataDevice.value.deviceName = item.deviceName;
+        dataDeviceList.value.push(dataDevice.value);
+      }
+
+  )
+  addDataDevice(dataDeviceList.value).then(
+      (res)=>{
+         if(res.code==='200'){
+           const param=ref({processId:store.scanInfo.id});
+           getDataDevice(param.value).then(
+               (data)=>{
+                 selectedDeviceList.value = JSON.parse(JSON.stringify(data.data));
+               }
+           )
+         }
+      }
+  )
+
+}
 const store = useProcessStore();
 const ctableRef = ref({});
 const csObj = ref<any>(null);
 const startCreat = () => {
-  ctableRef.value.startSelect({ deviceType: "DDS" });
-  ctableRef.value?.mergeOption({
-    selection: true,
-    reserveSelection: true,
-  });
+  ctableRef.value.startSelect({deviceType : "DDS"});
+    ctableRef.value?.mergeOption({
+        selection: true,
+        reserveSelection: true,
+    });
+
 };
+const currentPage = ref(1);
+const handlePageChange =(val: number)=>{
+  currentPage.value=val;
+  getList();
+}
 const tableData = ref<any[]>([]);
 
 const currentRow = ref<any>(null);
 const handleCurrentChange = (val: any) => {
   currentRow.value = val;
 };
+const pageTotal = ref(0);
 const deviceList = ref<any[]>([]);
 const getList = () => {
-  if (!currentToStartRow || !currentToStartRow.deviceNo) {
-    tableData.value = [];
+  if(!currentToStartRow||!currentToStartRow.deviceNo){
+    tableData.value=[];
     return;
   }
-  dataArrayList(store.scanInfo.id, currentToStartRow.deviceNo).then((res: any) => {
+  dataArrayList(store.scanInfo.id,currentToStartRow.deviceNo,currentPage.value.toString()).then((res: any) => {
     csObj.value = res.data;
     tableData.value = JSON.parse(res.data.testData);
+    pageTotal.value=res.data.total;
     console.log(tableData.value, "返回的列表数据");
   });
 };
@@ -210,31 +280,34 @@ const handleSelectionAllChange = (vals: any[]) => {
 
 const afterTimeStart = () => {
   const testParam = ref({});
-  testParam.value.processId = store.scanInfo.id;
+  testParam.value.processId=store.scanInfo.id;
   testParam.value.deviceNo = currentToStartRow.deviceNo;
   testParam.value.times = startSettingTime.value;
-  testParam.value.operationName = store.scanInfo.operationName;
-  startCSSJTesting(testParam.value).then((data) => {
-    if (data.code === "200") {
-      dialogDevice.value = false;
-      startSettingVisible.value = false;
-    }
-    if (!emitter.all.has(EventsNames.TEST_DATA)) {
-      emitter.on(EventsNames.TEST_DATA, (mesaage: any) => {
-        console.log("测试数据获取成功");
-        getList();
-      });
+  startCSSJTesting(testParam.value).then(
+    (data) => {
+      if (data.code === "200") {
+        dialogDevice.value = false;
+        startSettingVisible.value = false;
+      }
+      if (!emitter.all.has(EventsNames.TEST_DATA)) {
+        emitter.on(EventsNames.TEST_DATA, (mesaage: any) => {
+          console.log("测试数据获取成功");
+          getList();
+        });
+      }
     }
-  });
+  );
 };
 onMounted(() => {
   getList();
   deviceSearch.value.deviceType = "DDS";
   getDeviceListPageAll();
-  const param = ref({ processId: store.scanInfo.id });
-  getDataDevice(param.value).then((data) => {
-    selectedDeviceList.value = JSON.parse(JSON.stringify(data.data));
-  });
+  const param=ref({processId:store.scanInfo.id});
+  getDataDevice(param.value).then(
+      (data)=>{
+        selectedDeviceList.value = JSON.parse(JSON.stringify(data.data));
+      }
+  )
 });
 
 const getDeviceListPageAll = () => {
@@ -307,17 +380,21 @@ const preToStart = (row) => {
   startSettingVisible.value = true;
 };
 
-const preDel = (row) => {
-  delDataDevice({ id: row.id }).then((data) => {
-    if (data.code === "200") {
-      ElMessage.success("操作成功!");
-      const param = ref({ processId: store.scanInfo.id });
-      getDataDevice(param.value).then((data) => {
-        selectedDeviceList.value = JSON.parse(JSON.stringify(data.data));
-      });
+const preDel = (row) =>{
+  delDataDevice({id:row.id}).then(
+    (data)=>{
+      if(data.code==='200'){
+        ElMessage.success("操作成功!");
+        const param=ref({processId:store.scanInfo.id});
+        getDataDevice(param.value).then(
+            (data)=>{
+              selectedDeviceList.value = JSON.parse(JSON.stringify(data.data));
+            }
+        )
+      }
     }
-  });
-};
+  )
+}
 const preToLook = (row) => {
   currentToStartRow = JSON.parse(JSON.stringify(row));
   // startSettingVisible.value = true;
@@ -355,11 +432,13 @@ const afterTimeCancel = () => {
   margin-right: 10px;
 }
 .tableView-cssj {
+  width: 550px;
   flex: 1;
   height: calc(100vh - 300px);
   padding: 20px 0px;
   border-radius: 16px;
   margin-top: 10px;
+  background-color: #fff;
 }
 .btn {
   width: 180px;

+ 2 - 4
src/views/pro-steps/components/excel.vue

@@ -87,7 +87,7 @@
             v-for="item in options"
             :key="item.id"
             :label="item.signatureName"
-            :value="item.signatureFiles"
+            :value="item.signBase64"
           />
         </el-select>
         <el-button
@@ -136,9 +136,7 @@ const addImg = () => {
     excelViewRef.value.selectCellValue.c &&
     excelViewRef.value.selectCellValue.r
   ) {
-    excelViewRef.value.addImg(
-      import.meta.env.VITE_APP_UPLOAD_URL + imgUrl.value
-    );
+    excelViewRef.value.addImg("data:image/png;base64," + imgUrl.value);
   } else {
     ElMessage.error("请先选择签章部署单元格");
   }

+ 3 - 3
src/views/process/components/steps.vue

@@ -131,7 +131,7 @@ emitter.on(EventsNames.PROCESS_REDER, () => {
 //   }
 // };
 const boxClick = (item, index) => {
-  if (item.exists != true) return;
+  //if (item.exists != true) return;
   store.odersData.operationType = item.operationType;
   selectSeqArray.value =
     ordersDataArray.value[selectOrderIndex.value].ops[index].seqs;
@@ -220,12 +220,12 @@ onBeforeUnmount(() => {
   background-color: grey;
   animation-name: stepHover;
   animation-duration: $animation-duration;
-  cursor: not-allowed;
+  /*cursor: not-allowed;*/
 }
 
 .stepBoxDisabled {
   background-color: green;
-  cursor: not-allowed;
+  /*cursor: not-allowed;*/
 }
 
 .stepIndexHover {

+ 7 - 3
src/views/process/orders.vue

@@ -39,7 +39,7 @@
 <script lang="ts" setup>
 import Order from "@/views/process/components/order.vue";
 import { useCommonStoreHook, useDictionaryStore, useProcessStore } from "@/store";
-import { getOrders } from "@/api/process";
+import { getOrders,getTaskWorkOrder,queryOpsList } from "@/api/process";
 import { emitter, EventsNames } from "@/utils/common";
 import { Search } from "@element-plus/icons-vue";
 
@@ -64,7 +64,7 @@ const ordersQuery = ref({
 const wrapRef = ref(null);
 //获取未完成订单Data
 const getOrdersData = async () => {
-  const { code, data } = await getOrders(ordersQuery.value);
+  const { code, data } = await getTaskWorkOrder(ordersQuery.value);
   if (code == "200") {
     if (ordersQuery.value.pageNo == 1) {
       ordersDataArray.value = data.records;
@@ -99,13 +99,15 @@ const resetOrdersDataArray = async () => {
 const activeName = ref("false");
 //这里是存放控制当前选择工序的index
 const selectIndex = ref(null);
-const setSlectIndex = (index: number) => {
+const setSlectIndex = async (index: number) => {
   // if (selectIndex.value == index) return;
   if (index == null) {
     selectIndex.value = null;
     selectedOderStatus.value = false;
     return;
   }
+  setSlectIndex(null);
+  ordersDataArray.value[index].ops = []
   selectIndex.value = index;
   store.odersData.productLineId = ordersDataArray.value[selectIndex.value].productLineId;
   store.odersData.workOrderCode = ordersDataArray.value[selectIndex.value].workOrderCode;
@@ -118,6 +120,8 @@ const setSlectIndex = (index: number) => {
   store.useSeqNo = "";
   selectSeqArray.value = [];
   selectSeqIndex.value = null;
+  const {code, data} = await queryOpsList({workOrderCode: store.odersData.workOrderCode});
+  ordersDataArray.value[selectIndex.value].ops = data
   emit("getindex", selectIndex.value);
 };
 const handleClick = (tab: TabsPaneContext, event: Event) => {