Browse Source

no message

linwenxin 2 months ago
parent
commit
a5f7f43600

+ 26 - 5
src/views/setting/difficultyFee/difficultyExpenseApproval/InsuranceContractForm.vue

@@ -79,7 +79,9 @@
 <script>
 import { workerApplyDetail, workerApplyWebsitAppeal, workerApplyAppeal } from '@/api/difficultyExpenseApproval.js'
 import { required } from '@/components/template/rules_verify.js'
+import ImageUpload from '@/components/file-upload'
 export default {
+  components: { ImageUpload },
   props: {
     type: {
       type: Number,
@@ -103,7 +105,7 @@ export default {
         createBy: '',
         createTime: '',
         id: '',
-        image: '',
+        image: [],
         maintenancePricePass: '',
         orderBaseId: '',
         pgOrderBase: {},
@@ -255,6 +257,24 @@ export default {
             prop: 'problemDescription',
             rules: [...required]
           }
+        },
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '环境照片',
+            prop: 'image',
+            rules: [...required]
+          },
+          render: (h, { props, onInput }) => {
+            return (
+              <div>
+                <ImageUpload fileList={this.formData.image} limit={100} isEdit={[0, 1].includes(this.type)} />
+                <div style="color:orange">可以上传最多15个文件,图片或者视频</div>
+              </div>
+            )
+          }
         }
       ]
     },
@@ -396,14 +416,14 @@ export default {
     workerApplyDetail({
       orderBaseId: this.item.orderBaseId
     }).then(res => {
-      this.formData = { ...res.data }
+      this.formData = {
+        ...res.data,
+        image: res.data?.image ? res.data?.image?.split(',').map(url => ({ url })) : []
+      }
       this.formDialog = true
       if ([2].includes(this.type)) {
         this.formData1 = {
           ...this.formData?.workerInvolveApplyItems?.[0]
-          // appealUrl: this.formData?.workerInvolveApplyItems?.[0]?.appealUrl
-          //   ? res1.data.leLetterItems?.[0]?.appealUrl.split(',').map(url => ({ url }))
-          //   : []
         }
       }
     })
@@ -416,6 +436,7 @@ export default {
             if (valid) {
               workerApplyWebsitAppeal({
                 ...this.formData,
+                image: this.formData.map(item => item.url).join(','),
                 workerInvolveApplyItem: { ...this.formData1 }
               }).then(res => {
                 this.$message({