Explorar o código

切换排班图片访问路径

(cherry picked from commit 5ff6773c79df29b27ffa65f332ef161878012112)
zhonghuizhen hai 1 ano
pai
achega
747d493a1d
Modificáronse 1 ficheiros con 5 adicións e 7 borrados
  1. 5 7
      src/views/business/​scheduleManage/edit.vue

+ 5 - 7
src/views/business/​scheduleManage/edit.vue

@@ -362,10 +362,7 @@ import { previewFile } from '@/api/platform/file/attachment'
 import { mapValues, keyBy } from 'lodash'
 import html2canvas from 'html2canvas'
 import ActionUtils from '@/utils/action'
-import Json from '@/business/platform/serv/components/json.vue'
-import color from '@/store/modules/ibps/modules/color'
-import height from '@/mixins/height'
-import { reset } from '@/api/platform/auth/client'
+import { BASE_URL } from '@/constant'
 
 export default {
     name: 'schedule',
@@ -1091,8 +1088,9 @@ export default {
             this.$nextTick(async () => {
                 const element = this.$refs.schedule
                 console.log(element)
-                const fileId = await this.captureAndUpload(element)
-                const fileUrl = await previewFile(fileId)
+                const filePath = await this.captureAndUpload(element)
+                const fileUrl = BASE_URL + filePath
+                // await previewFile(fileId)
                 const { userId, name } = this.$store.getters
                 const { first, second } = this.$store.getters.level
                 const { title, dateRange } = this.formData
@@ -1130,7 +1128,7 @@ export default {
                         gateway: true,
                         data
                     }).then(res => {
-                        resolve(res.data.id || '')
+                        resolve(res.data.filePath || '')
                     }).catch(error => {
                         reject(error)
                     })