ソースを参照

程序同步页面问题修改

yejian 3 年 前
コミット
6f57de318e

+ 5 - 1
imcs-ui/src/views/zuihou/resourceProductMgr/equipmentProgramMgr/Index.vue

@@ -319,6 +319,8 @@
 		          message: this.$t("resource.tips.tongbTips"),
 		          type: "success"
 		        })
+            this.fetch()
+            this.fetch2()
 	  			}
 	  		})
 	  	},
@@ -463,6 +465,7 @@
 		        ids.push(item.id)
 		      })
 		      this.delete(ids)
+          this.fetch2()
 	      }).catch(() => {})
 	    },
 	    clearSelections () {
@@ -482,7 +485,8 @@
 	        }
 	      })
 	    },
-	    view (row) {
+      view (row) {
+	  	  console.log(row)
 	      this.$refs.edit.setTenant(row, this.dicts)
 	      this.$refs.edit.type = "view"
 	      this.dialog.title = this.$t("common.view")

+ 27 - 27
imcs-ui/src/views/zuihou/resourceProductMgr/equipmentProgramMgr/components/Edit.vue

@@ -1,31 +1,31 @@
 <template>
-  <el-dialog 
-  	:close-on-click-modal="false" 
-  	:close-on-press-escape="false" 
-  	:title="title" 
+  <el-dialog
+  	:close-on-click-modal="false"
+  	:close-on-press-escape="false"
+  	:title="title"
   	:append-to-body="true"
-  	:visible.sync="isVisible" 
-  	:width="width" 
+  	:visible.sync="isVisible"
+  	:width="width"
   	top="50px"
   >
     <el-form ref="form" :model="tenant" :disabled="true" :rules="rules" label-position="right" label-width="130px">
       <el-form-item :label='$t("resource.form.pgContent")+":"' prop="pgContent">
-        <el-input v-model="pgContent" :readOnly="true" type="textarea" :rows="6" style="width: 100%;"/>
+        <el-input v-model="pgContent" :readOnly="true" type="textarea" :rows="20" style="width: 100%;"/>
       </el-form-item>
-      <div>
-      	<h2 class="editTitle">刀具</h2>
-      	<el-table
-		      :data="toolList"
-		      style="width: 100%"
-		    >
-		      <el-table-column prop="specification" :label='$t("resource.table.programTool.specification")'></el-table-column>
-		      <el-table-column prop="model" :label='$t("resource.table.programTool.model")'></el-table-column>
-		      <el-table-column prop="brand" :label='$t("resource.table.programTool.brand")'></el-table-column>
-		      <el-table-column prop="usageTime" :label='$t("resource.table.programTool.usageTime")'></el-table-column>
-		      <el-table-column prop="duration" :label='$t("resource.table.programTool.duration")'></el-table-column>
-		    </el-table>
-      </div>
-      
+<!--      <div>-->
+<!--      	<h2 class="editTitle">刀具</h2>-->
+<!--      	<el-table-->
+<!--		      :data="toolList"-->
+<!--		      style="width: 100%"-->
+<!--		    >-->
+<!--		      <el-table-column prop="specification" :label='$t("resource.table.programTool.specification")'></el-table-column>-->
+<!--		      <el-table-column prop="model" :label='$t("resource.table.programTool.model")'></el-table-column>-->
+<!--		      <el-table-column prop="brand" :label='$t("resource.table.programTool.brand")'></el-table-column>-->
+<!--		      <el-table-column prop="usageTime" :label='$t("resource.table.programTool.usageTime")'></el-table-column>-->
+<!--		      <el-table-column prop="duration" :label='$t("resource.table.programTool.duration")'></el-table-column>-->
+<!--		    </el-table>-->
+<!--      </div>-->
+
     </el-form>
     <div slot="footer" class="dialog-footer">
       <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
@@ -76,7 +76,7 @@ export default {
       },
       // 附件的值
       fileList: [/*
-      	{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, 
+      	{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'},
       	{name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}
       */],
       roles: [],
@@ -200,10 +200,10 @@ export default {
     	if(val){
     		this.tenant = { ...val }
     		// 如果附件存在 /
-    		if(!!val.id){
+    		//if(!!val.id){
     			// 查询【程序】信息
 	  			this.getProgram(val.id)
-    		}
+    		//}
     	}
       // 字典表
       this.dicts = dicts
@@ -289,10 +289,10 @@ export default {
     		}
     	})
     },
-    // 根据[文件名]获取文件内容 
+    // 根据[文件名]获取文件内容
     getProgram(programId){
-    	programCenterApi.getProgram({programId: programId}).then(res => {
-    		res = res.data 
+    	programCenterApi.getProgram({id: programId}).then(res => {
+    		res = res.data
     		console.log("根据[文件名]:", res)
     		if(res.isSuccess){
     			const obj = res.data

+ 7 - 3
imcs-ui/src/views/zuihou/resourceProductMgr/equipmentProgramMgr/components/Upload.vue

@@ -10,7 +10,7 @@
   >
     <el-form ref="form" :model="tenant" :disabled="formDisabled" :rules="rules" label-position="right" label-width="130px">
       <el-form-item :label='$t("resource.form.target_resource")+":"' prop="no">
-        <el-input v-model="tenant.no"  readonly="readonly" />
+        <el-input v-model="tenant.resourceName"  readonly="readonly" />
       </el-form-item>
       <el-form-item :label='$t("resource.form.pgUpload")+":"' prop="filePath">
         <el-input v-model="tenant.filePath"  :placeholder='$t("common.pleaseEnter")'/>
@@ -175,6 +175,8 @@
           this.tenant.size = response.data.size
           // 查询【程序】信息
           this.getProgram(response.data.filename)
+          // 程序名称
+          this.tenant.name = response.data.filename
         }
       },
       // 文件上传失败时的钩子
@@ -193,7 +195,8 @@
           name: '',
           filePath: '',
           size: null,
-          runTime: null
+          runTime: null,
+          resourceName:'',
         }
       },
       resetFile(){
@@ -220,7 +223,8 @@
         if(val){
           this.tenant = { ...val }
           //赋值
-          this.tenant.no = val.name
+          this.tenant.no = val.code
+          this.tenant.resourceName = val.name
           this.tenant.resourceId = val.id
           // 如果附件存在 /
           if(!!val.filePath){