| | |
| | | </el-radio-group> |
| | | <span v-else>{{tranlateDevState(formData.state)}}</span> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="备注" prop="devId"> |
| | | <el-input v-model="formData.comment" placeholder="请输入设备备注" /> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> |
| | |
| | | const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
| | | const formData = ref<DeviceVO>({ |
| | | id: 0, |
| | | devId: '', |
| | | purchaseDate: new Date().getTime(), |
| | | devCodeIntrinsic: '', |
| | | devCodeHosp: '', |
| | |
| | | category: '', |
| | | brand: '', |
| | | model: '', |
| | | lost: 0, |
| | | comment: '', |
| | | state: 0, |
| | | }) |
| | | |
| | | const formRules = reactive({ |
| | | }) |
| | | const formRef = ref() // 表单 Ref |
| | |
| | | const resetForm = () => { |
| | | formData.value = { |
| | | id: 0, |
| | | purchaseDate: new Date().getTime(), |
| | | devId: '', |
| | | purchaseDate: new Date().getTime(), |
| | | devCodeIntrinsic: '', |
| | | devCodeHosp: '', |
| | | devCodeDept: '', |
| | | category: '', |
| | | brand: '', |
| | | model: '' |
| | | model: '', |
| | | comment: '', |
| | | state: 0, |
| | | } |
| | | formRef.value?.resetFields() |
| | | } |