| | |
| | | <template> |
| | | <a-drawer |
| | | <a-modal |
| | | :title="title" |
| | | :maskClosable="true" |
| | | :width="drawerWidth" |
| | | placement="right" |
| | | :closable="true" |
| | | @close="handleCancel" |
| | | @cancel="visible=false" |
| | | :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"> |
| | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> |
| | | <a-form-model-item v-if="isDepartType == 0" label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> |
| | | <j-select-equipment-depart :disabled="disableSubmit" v-model="model.selectedDeparts" :multi="false" @back="backDepartInfo" :backDepart="true" :treeOpera="true"></j-select-equipment-depart> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item v-if="isDepartType == -1" label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请选择设备类型" |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | | {{item.equipmentTypeName}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车间分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction"> |
| | | <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'请选择车间!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> |
| | | |
| | | |
| | | |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-model-item> |
| | | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-form-model-item v-if="isDepartType == -1" label="系统版本号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请输入系统版本号" |
| | | v-model="model.systemVersion"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item v-if="isDepartType == 0" label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请选择设备类型" |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label="系统版本号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-form-model-item v-if="isDepartType == 0" label="系统版本号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请输入系统版本号" |
| | | v-model="model.systemVersion"/> |
| | | </a-form-model-item> |
| | |
| | | |
| | | |
| | | <div class="drawer-bootom-button" v-show="!disableSubmit"> |
| | | <a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消"> |
| | | <a-popconfirm title="确定放弃操作?" @confirm="close" 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> |
| | | |
| | |
| | | import DeviceListModel from './DeviceListModal' |
| | | import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' |
| | | import AFormModelItem from 'ant-design-vue/es/form-model/FormItem' |
| | | import {mapActions} from 'vuex' |
| | | export default { |
| | | name: "UserModal", |
| | | components: { |
| | |
| | | equipmentId: |
| | | [ |
| | | { |
| | | required: true, message: '请选择设备编号!', |
| | | required: true, message: '请选择设备编号!' |
| | | }, |
| | | // { |
| | | // validator: this.validatequipmentId |
| | |
| | | rolesOptions:[], |
| | | nextDepartOptions:[], |
| | | nextProductionOptions:[], |
| | | selectList:[] |
| | | selectList:[], |
| | | isDepartType:'' |
| | | } |
| | | }, |
| | | created () { |
| | | const token = Vue.ls.get(ACCESS_TOKEN); |
| | | this.headers = {"X-Access-Token":token} |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | // this.initRoleList() |
| | | // this.initTenantList() |
| | | }, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | | }, |
| | | queryGroup() { |
| | | getAction(this.url.queryEquipmentType).then(res => { |
| | | if (res.success) { |
| | |
| | | that.visible = true; |
| | | //根据屏幕宽度自适应抽屉宽度 |
| | | this.resetScreenSize(); |
| | | |
| | | // that.userId = record.id; |
| | | // console.log(record) |
| | | that.model = Object.assign({}, record); |
| | |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | refresh () { |
| | | this.userId="" |
| | | this.nextDepartOptions=[]; |
| | |
| | | obj.then((res)=>{ |
| | | if(res.success){ |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | |
| | | // } |
| | | // }) |
| | | // }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | |
| | | |
| | | // validatequipmentId(rule, value, callback){ |
| | | // if(!value){ |
| | |
| | | }else{ |
| | | this.departIdShow=true; |
| | | } |
| | | }, |
| | | /** |
| | | * 编辑或查看详情数据时清除抽屉表单验证 |
| | | */ |
| | | removeValidate(){ |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |