Browse Source

esop pdf 选择更改

qinhb 1 năm trước cách đây
mục cha
commit
bf109f88a4

+ 3 - 4
src/components/CommonTable/configs/tableConfig.ts

@@ -471,7 +471,7 @@ export const tableConfig = {
 			},
 		],
 	},
-	
+
 	ESOP: {
 		url: "/api/v1/base/drawing",
 		column: [
@@ -497,17 +497,16 @@ export const tableConfig = {
 			  span: 12,
 			  search: false,
 			},
-			{
+			/*{
 			  label: "图纸",
 			  prop: "drawingPath",
-			  type: "img",
 			  span: 24,
 			  display: false,
 			  slot: true,
 			  // formatter: (row, column, cellValue, index) => {
 			  //   return `${row.drawingPath}`;
 			  // },
-			}
+			}*/
 		],
 	},
 

+ 4 - 5
src/views/base/craftManagement/route/components/bottomTable.vue

@@ -26,7 +26,7 @@
             content-type="button"
             :is-link="true"
             :show-pdf-number="form.showAppointPageNum"
-            :pdf-source="getSourceUrl(form.filePath)"
+            :pdf-source="pdfPath"
           />
         </div>
       </template>
@@ -86,9 +86,7 @@ const { selectionChange, multipleUpdate } = Methords; //选中和批量删除事
 
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 const bomVersion = ref(null);
-const getSourceUrl = (filePath) => {
-  return import.meta.env.VITE_APP_UPLOAD_URL + filePath;
-};
+const pdfPath = ref(null)
 const startCreat = () => {
   if (props.tableType === "wuliaocaiji") {
     if (data.value && data.value.length > 0) {
@@ -184,7 +182,8 @@ const onSelectedFinish = (itemValue) => {
     form.value.lower = itemValue.lower;
     form.value.unit = itemValue.unit;
   } else if (props.tableType === "ESOP") {
-    form.value.filePath = itemValue.drawingPath;
+    form.value.filePath = itemValue.pdfPath;
+    pdfPath.value = import.meta.env.VITE_APP_UPLOAD_URL + itemValue.pdfPath
     form.value.drawingCode = itemValue.drawingCode;
     form.value.recordVersion = itemValue.drawingVersion;
     form.value.sortNum = itemValue.sort;