src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue
@@ -8,7 +8,7 @@
            <a-col :span="24">
              <a-form-item label="设备组" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
                <a-input-search :readOnly="true" v-decorator="['equipmentId', validatorRules.equipmentId]"
                                @search="deviceSearch" enter-button/>
                                @search="deviceSearch" enter-button placeholder="请选择设备"/>
              </a-form-item>
            </a-col>
          </a-row>
@@ -44,6 +44,7 @@
        </a-form>
      </a-spin>
      <device-calend-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-calend-list-model>
      <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"/>
    </a-modal>
  </div>
</template>
@@ -62,10 +63,11 @@
  } from '@/api/api'
  import Calendar from 'vue-calendar-component';
  import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal'
  export default {
    name: 'ShiftInfoModel',
    components: {DeviceCalendListModel,Calendar},
    components: { SelectDeviceModal, DeviceCalendListModel,Calendar},
    props: {},
    data() {
      return {
@@ -239,9 +241,10 @@
        this.value = value;
      },
      deviceSearch() {
        this.$refs.deviceRepairListModel.openPage()
        this.$refs.deviceRepairListModel.title = '选择设备'
        this.$refs.deviceRepairListModel.disableSubmit = false
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentId') ? this.form.getFieldValue('equipmentId').split(',') : []
      },
      getDeviceRows(val) {
        console.log("========",val);
@@ -342,6 +345,21 @@
        this.close()
      },
      /**
       * 选择已有设备后点击确定时触发
       * @param data 已选择的设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        console.log('data=', data)
        this.form.setFieldsValue({
          equipmentId: data.join(',')
        })
      }
    }
  }
</script>