408249787 2 سال پیش
والد
کامیت
b883ee39e5
2فایلهای تغییر یافته به همراه13 افزوده شده و 8 حذف شده
  1. 10 2
      src/views/fill/gather/modules/CreateTaskForm.vue
  2. 3 6
      src/views/fill/gather/modules/InfoSelectModal.vue

+ 10 - 2
src/views/fill/gather/modules/CreateTaskForm.vue

@@ -7,6 +7,13 @@
     @cancel="handleCancel"
   >
     <a-form :form="form">
+      <row-list :col="1" v-show="false">
+        <row-item>
+          <a-form-item>
+            <a-input v-decorator="['gatherId']" type="hidden"/>
+          </a-form-item>
+        </row-item>
+      </row-list>
       <a-row type="flex">
         <a-col :sm="20" >
           <a-form-item
@@ -145,7 +152,6 @@ export default {
     SbInfoSelectModal,
     InfoSelectModal
   },
-  props: {},
   created () {
     this.getUser()
   },
@@ -153,10 +159,12 @@ export default {
     base (record) {
       this.visible = true
       this.model = record
-      this.infoNum = record.infos.length
+      this.infoNum = record.fillInfos.length
+      console.log(this.infoNum)
       const { form: { setFieldsValue } } = this
       this.$nextTick(() => {
         setFieldsValue(Object.assign({
+          gatherId: record.id,
           period: record.period,
           warningHour: 2
         }))

+ 3 - 6
src/views/fill/gather/modules/InfoSelectModal.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal
     title="巡检任务项"
-    :width="1000"
+    :width="1300"
     :visible="visible"
     :confirmLoading="confirmLoading"
     class="ant-modal2"
@@ -40,10 +40,6 @@ export default {
           title: '巡检项名称',
           dataIndex: 'name'
         },
-        /* {
-            title: '字段名称',
-            dataIndex: 'fieldKey'
-          }, */
         {
           title: '类型',
           dataIndex: 'type',
@@ -72,11 +68,12 @@ export default {
   },
   created () {
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FILL_INFO_TYPE)
+    console.log(this.typeMap)
   },
   methods: {
     base (record) {
       this.visible = true
-      this.loadData = record.infos
+      this.loadData = record.fillInfos
     },
     handleCancel () {
       this.visible = false