| | |
| | | <template> |
| | | <a-drawer |
| | | <a-modal |
| | | :title="title" |
| | | :maskClosable="true" |
| | | :width="drawerWidth" |
| | | placement="right" |
| | | :closable="true" |
| | | @close="handleCancel" |
| | | @cancel="handleCancel" |
| | | :visible="visible" |
| | | :footer="null" |
| | | style="height: 100%;overflow: auto;padding-bottom: 53px;"> |
| | | |
| | | <template slot="title"> |
| | |
| | | <a-form-model-item label="设备编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> |
| | | <a-input-search :readOnly="true" |
| | | v-model="model.equipmentId" |
| | | :disabled="disSeach" @search="deviceSearch" enter-button placeholder='请选择设备编码'/> |
| | | :disabled="disSeach" @search="deviceSearch" enter-button placeholder='请选择设备编码' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | |
| | | |
| | | <div class="drawer-bootom-button" v-show="!disableSubmit"> |
| | | <a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消"> |
| | | <a-popconfirm title="确定放弃操作?" @confirm="handleCancel" okText="确定" cancelText="取消"> |
| | | <a-button style="margin-right: .8rem">取消</a-button> |
| | | </a-popconfirm> |
| | | <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">提交</a-button> |
| | | </div> |
| | | <device-list-model ref="deviceListModel" @sendSelectionRows="getDeviceRows"></device-list-model> |
| | | </a-drawer> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | |
| | | equipmentId: |
| | | [ |
| | | { |
| | | required: true, message: '请选择设备编号!', |
| | | required: true, message: '请选择设备编号!' |
| | | }, |
| | | // { |
| | | // validator: this.validatequipmentId |
| | |
| | | that.visible = true; |
| | | //根据屏幕宽度自适应抽屉宽度 |
| | | this.resetScreenSize(); |
| | | |
| | | // that.userId = record.id; |
| | | // console.log(record) |
| | | that.model = Object.assign({}, record); |
| | |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | refresh () { |
| | | this.userId="" |
| | | this.nextDepartOptions=[]; |
| | |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | |
| | | |
| | | // validatequipmentId(rule, value, callback){ |
| | | // if(!value){ |
| | | // callback() |
| | |
| | | }else{ |
| | | this.departIdShow=true; |
| | | } |
| | | }, |
| | | /** |
| | | * 编辑或查看详情数据时清除抽屉表单验证 |
| | | */ |
| | | removeValidate(){ |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |