Parcourir la source

图纸下载。设备记录。

jiaxiaoqiang il y a 3 mois
Parent
commit
6772d83bb1

+ 10 - 6
src/views/pro-operation/drawing/index.vue

@@ -10,7 +10,13 @@
         </div>
         <div class="suit-title">{{ box?.drawingTitle }}</div>
         <div class="suit-desc">{{ box?.created }}</div>
-        <el-button class="download-btn" type="primary"  @click="download(box)"  :key="box.drawingPath">下载</el-button>
+        <el-button
+          class="download-btn"
+          type="primary"
+          @click="download(box)"
+          :key="box.drawingPath"
+          >下载</el-button
+        >
       </div>
     </div>
   </el-scrollbar>
@@ -49,17 +55,16 @@ const download = async (row: any) => {
   // 3. 创建隐藏a标签触发下载
   const link = document.createElement("a");
   link.href = tempUrl;
-  link.download = row.filename;
+  link.download = row.fileName;
   link.style.display = "none";
   document.body.appendChild(link);
   link.click();
 
   // 4. 清理内存
   URL.revokeObjectURL(tempUrl);
-  document.body.removeChild(link)
+  document.body.removeChild(link);
   downloadBtnLoading.value = false;
-}
-
+};
 </script>
 
 <style lang="scss" scoped>
@@ -89,7 +94,6 @@ const download = async (row: any) => {
       height: 263px;
       width: 100%;
       overflow: hidden;
-
     }
 
     .suit-title {

+ 26 - 51
src/views/pro-steps/components/shebeijilu.vue

@@ -1,7 +1,6 @@
 <template>
-  <div >
+  <div>
     <div class="recordBox">
-
       <div class="select">
         <el-select
           multiple
@@ -18,66 +17,45 @@
             :value="item.value"
           />
         </el-select>
-        <div class="selectBtn" >
+        <div class="selectBtn">
           <el-button
             class="btn"
-
             style="background-color: #0a59f7"
             @click="binding(item)"
-
-          >确认绑定</el-button
+            >确认绑定</el-button
           >
-          <el-button
-            class="btn"
-
-            type="info"
-            @click="cancel(item)"
-
-          >取消</el-button
+          <el-button class="btn" type="info" @click="cancel(item)"
+            >取消</el-button
           >
         </div>
       </div>
 
-      <div class="footerBtn" >
+      <div class="footerBtn">
         <el-button
-
           class="bottomBtn"
           style="background-color: #0a59f7"
-
           @click="openScanCode(index)"
           >点击扫描其它设备</el-button
         >
       </div>
     </div>
-    <el-table :data="equitListData" class="tableView-sbjl" >
-      <el-table-column
-
-        prop="equitCode"
-        label="设备编码"
-        align="center"
-      />
-      <el-table-column
-
-        prop="equitName"
-        label="设备名称"
-        align="center"
-      />
-      <el-table-column  prop="created" label="创建时间" align="center" />
-      <el-table-column  prop="validDate" label="设备有效期" align="center" />
-<!--      <el-table-column prop="flag" align="center" label="是否合格">-->
-<!--        <template #default="scope">-->
-<!--          <span-->
-<!--            :class="{-->
-<!--              'red-text': scope.row.flag == 0,-->
-<!--              'green-text': scope.row.writeData == 1,-->
-<!--            }"-->
-<!--          >-->
-<!--            {{ scope.row.flag == 1 ? "合格" : "不合格" }}-->
-<!--          </span>-->
-<!--        </template>-->
-<!--      </el-table-column>-->
-
-
+    <el-table :data="equitListData" class="tableView-sbjl">
+      <el-table-column prop="equitCode" label="设备编码" align="center" />
+      <el-table-column prop="equitName" label="设备名称" align="center" />
+      <el-table-column prop="created" label="创建时间" align="center" />
+      <el-table-column prop="validDate" label="设备有效期" align="center" />
+      <!--      <el-table-column prop="flag" align="center" label="是否合格">-->
+      <!--        <template #default="scope">-->
+      <!--          <span-->
+      <!--            :class="{-->
+      <!--              'red-text': scope.row.flag == 0,-->
+      <!--              'green-text': scope.row.writeData == 1,-->
+      <!--            }"-->
+      <!--          >-->
+      <!--            {{ scope.row.flag == 1 ? "合格" : "不合格" }}-->
+      <!--          </span>-->
+      <!--        </template>-->
+      <!--      </el-table-column>-->
     </el-table>
     <div
       style="
@@ -115,7 +93,7 @@ import { useDictionaryStore } from "@/store";
 const dictS = useDictionaryStore();
 const selectStatus = ref(false);
 
-const selectValues = ref([])
+const selectValues = ref([]);
 const binding = async (item: any) => {
   try {
     const { data } = await batchDevice({
@@ -130,8 +108,7 @@ const binding = async (item: any) => {
   }
 };
 const cancel = (item: any) => {
-
-  selectValues.value = []
+  selectValues.value = [];
 };
 
 const store = useProcessStore();
@@ -177,6 +154,7 @@ const scanCode = async () => {
     inputValueVal.value = "";
     showStatusVal.value = false;
   }
+  getEquitList();
 };
 onMounted(async () => {
   getEquitList();
@@ -225,7 +203,6 @@ onMounted(async () => {
     overflow: hidden;
     height: 40px;
 
-
     .bottomBtn {
       width: 100%;
       height: 100%;
@@ -260,7 +237,6 @@ onMounted(async () => {
   }
 
   //描述样式
-
 }
 
 .tableView-sbjl {
@@ -269,6 +245,5 @@ onMounted(async () => {
   padding: 20px 0px;
   border-radius: 16px;
   margin-top: 10px;
-
 }
 </style>