| | |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="生产装置名称" prop="produceDeviceName"> |
| | | <el-input class="input-length" :disabled="!disabled" v-model.trim="productionDeviceForm.produceDeviceName" placeholder="请输入生产装置名称" clearable></el-input> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="productionDeviceForm.produceDeviceName" placeholder="请输入生产装置名称" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="所属部门" prop="depId"> |
| | | <el-cascader :options="departmentList" :disabled="!disabled" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable style="width: 85%" v-model="productionDeviceForm.depId"> </el-cascader> |
| | | <el-cascader :options="departmentList" :disabled="!disabled" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable style="width: 90%" v-model="productionDeviceForm.depId"> </el-cascader> |
| | | <!-- <el-select class="input-length" v-model="productionDeviceForm.depName" placeholder="请选择所属部门" clearable filterable></el-select>--> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="风险等级" prop="riskLevel"> |
| | | <el-select class="input-length" :disabled="!disabled" v-model="productionDeviceForm.riskLevel" placeholder="请选择风险等级" clearable filterable> |
| | | <el-select class="input-add" :disabled="!disabled" v-model="productionDeviceForm.riskLevel" placeholder="请选择风险等级" clearable filterable> |
| | | <el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="区域位置" prop="location"> |
| | | <el-input class="input-length" :disabled="!disabled" v-model.trim="productionDeviceForm.location" type="textarea" placeholder="请输入区域位置" maxlength="150"></el-input> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="productionDeviceForm.location" type="textarea" placeholder="请输入区域位置" maxlength="150"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | <el-form-item label="创建人" prop="location"> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="productionDeviceForm.createByUserName" placeholder="请输入区域位置"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | <el-form-item label="创建时间" prop="location"> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="productionDeviceForm.gmtCreate" placeholder="请输入区域位置"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | <el-form-item label="最后修改人" prop="location"> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="productionDeviceForm.lastEditUserName" placeholder="请输入区域位置"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | <el-form-item label="最后修改时间" prop="location"> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="productionDeviceForm.gmtModitify" placeholder="请输入区域位置"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | interface stateType { |
| | | isShowProductionDeviceDialog: Boolean; |
| | | disabled: Boolean; |
| | | personTime: Boolean; |
| | | productionDeviceForm: { |
| | | produceDeviceName: string; |
| | | depId: number | null; |
| | |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | personTime: false, |
| | | departmentList: [], |
| | | isShowProductionDeviceDialog: false, |
| | | levelList: [ |
| | |
| | | }); |
| | | if (type === '新增') { |
| | | state.disabled = true; |
| | | state.personTime = false; |
| | | state.title = '新增生产装置'; |
| | | state.productionDeviceForm = { |
| | | produceDeviceName: '', |
| | |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.personTime = true; |
| | | state.title = '查看生产装置'; |
| | | state.productionDeviceForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.personTime = false; |
| | | state.title = '修改生产装置'; |
| | | state.productionDeviceForm = JSON.parse(JSON.stringify(value)); |
| | | } |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .input-length { |
| | | width: 85%; |
| | | } |
| | | </style> |
| | | <style scoped></style> |