Browse Source

修改报错

vothin 2 years ago
parent
commit
4519f91d39
1 changed files with 10 additions and 7 deletions
  1. 10 7
      src/views/ncs-orginazition/components/partInfoEdit.vue

+ 10 - 7
src/views/ncs-orginazition/components/partInfoEdit.vue

@@ -531,7 +531,7 @@
             <el-col :span="8">
               <el-form-item :label="this.$t('action.excelUpload')">
                 <el-upload
-                    class="avatar-uploader"
+                    class="excel-uploader"
                     :action="`${excelUpload}`"
                     :show-file-list="false"
                     :on-success="excelUploaded"
@@ -572,7 +572,7 @@ export default {
   name: 'PartInfoEdit',
   props: {
     partId: {
-      type: String,
+      type: Number,
       default: null
     }
   },
@@ -598,7 +598,7 @@ export default {
       otherHostDevice: [],
       uploadurl: serverUrl + '/ncs/upload/uploadFile',
       imageUrl: '',
-      excelUpload: serverUrl + '/ncs/excel/' + this.partId + '/',
+      excelUpload: serverUrl + '/ncs/excel/upload/' + this.partId + '/',
       excelUploadDemo: serverUrl + '/upload/excel/demo/excel_demo.xlsx'
     }
   },
@@ -606,9 +606,10 @@ export default {
     this.isShow = JSON.parse(Storage.getItem('calling_user')).username === 'superadmin'
     // this.nurseLevel0Config = await API_Nurse.getNurseConfigs(this.partId, 0)
     this.getPartInfo()
-    this.getPartents()
+    this.getParents()
     this.getRoles({ page_size: 200, page_no: 1, fixedCondition: ' shop_id = -1 and role_name<>"护士"', sort: ' role_id', dir: 'desc' })
-    this.getOtherHostDevice(this.$store.getters.partId)
+    this.getOtherHostDevice(this.partId)
+    console.log(this.excelUpload)
   },
   methods: {
     getPartInfo() {
@@ -763,7 +764,7 @@ export default {
       })
     },
     /** 获取上级机构数组 特指医院 **/
-    getPartents() {
+    getParents() {
       API_Part.listByType(6).then(res => {
         this.parents = [...res]
       })
@@ -836,7 +837,6 @@ export default {
       }
     },
     getOtherHostDevice(part_id) {
-      console.log("111111111")
       const _this = this
       API_Device.getOtherHostDevice(part_id).then(r => {
         _this.otherHostDevice = r
@@ -892,6 +892,9 @@ export default {
         reader.readAsDataURL(file)
       })
     },
+    getUploadUrl() {
+
+    },
     excelUploaded(res) {
       console.log(res)
     },