user5 1 éve
szülő
commit
3ad9420d92

+ 2 - 2
src/api/sys/OSSService.js

@@ -206,12 +206,12 @@ export async function openWindowOnUrl (row) {
   if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
     await getTemporaryByUrl(row.url).then((data) => {
       // eslint-disable-next-line no-undef
-      onPreview(data.data)
+      onPreview(data)
     })
     return
   }
   await getTemporaryByUrl(row.url).then((data) => {
-    rowUrl = data.data
+    rowUrl = data
   })
   if (suffix === 'pdf') {
     window.open('https://view.xdocin.com/xdoc?_xdoc=' + encodeURIComponent(rowUrl), '_blank')

+ 1 - 1
src/views/cw/workContract/ContractRegistration.vue

@@ -180,7 +180,7 @@
           </vxe-column>
           <vxe-column min-width="100px"  title="借用状态" fixed="right" align="center" field="borrowType" >
             <template #default="scope">
-              <el-button  @click="detailBorrow(scope.row)" text  :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>
+              <el-button  @click="detailBorrow(scope.row)" :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>
             </template>
           </vxe-column>
 

+ 8 - 4
src/views/cw/workContract/CwWorkContractBorrowForm.vue

@@ -200,7 +200,6 @@
     methods: {
       init (id) {
         if (id) {
-          console.log('进来了')
           this.loading = true
           this.inputForm.id = id
           this.$nextTick(() => {
@@ -208,11 +207,13 @@
             this.cwWorkContractBorrowService.findById(this.inputForm.id).then((data) => {
               this.$refs.archiveFile.clearUpload()
               this.$refs.uploadFile.clearUpload()
-              console.log('data1', data)
               if (this.commonJS.isEmpty(data.id)) {
                 contractInfoService.findById(this.inputForm.id).then((data) => {
                   this.inputForm = this.recover(this.inputForm, data)
-                  this.inputForm.borrowName = this.userName
+                  // this.inputForm.borrowName = this.userName
+					if (this.commonJS.isEmpty(this.inputForm.borrowName)){
+						this.inputForm.borrowName = this.userName
+					}
                   this.inputForm.borrowData = this.moment(new Date()).format('YYYY-MM-DD')
                   this.$refs.uploadFile.newUpload('view', data.contractProperList, 'cwWorkContract', null, null, null, null, false)
                   this.$refs.archiveFile.newUpload('view', data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
@@ -227,7 +228,10 @@
                   this.$refs.archiveFile.newUpload('view', data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
                 })
                 this.inputForm = this.recover(this.inputForm, data)
-                this.inputForm.borrowName = this.userName
+                // this.inputForm.borrowName = this.userName
+				  if (this.commonJS.isEmpty(this.inputForm.borrowName)){
+					  this.inputForm.borrowName = this.userName
+				  }
                 // this.inputForm.borrowData = new Date()
 				  this.inputForm.borrowData = this.moment(new Date()).format('YYYY-MM-DD')
                 this.loading = false