| | |
| | | form: this.$form.createForm(this), |
| | | headers: {}, |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | { required: true, message: '请输入点检计划编码!' }, |
| | | ] |
| | | }, |
| | | // num: { |
| | | // rules: [ |
| | | // { required: true, message: '请输入点检计划编码!' }, |
| | | // ] |
| | | // }, |
| | | inspectionCycleId: { |
| | | rules: [ |
| | | { required: true, message: '请选择点检周期!' }, |
| | |
| | | listByBusIdAndBusType: "/system/sysUploadRela/listByBusIdAndBusType", |
| | | getInspectionCycle: "/eam/inspectionStandardDetail/getInspectionCycle", |
| | | // getSysDeparts: "/eam/specialtyInspectionPlan/getSysDeparts", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | dataSource: [], |
| | | //用于展示文件 |
| | |
| | | handleOk() { |
| | | const that = this; |
| | | // 触发表单验证 |
| | | that.form.validateFields((err, values) => { |
| | | that.form.validateFields(async (err, values) => { |
| | | if (JSON.stringify(that.fileObject.file) == '{}' && that.uploadId == '' && that.fileList.length == 0) { |
| | | that.$message.warning("请上传文件"); |
| | | return false |
| | |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(that.model, values); |
| | | |
| | | if(!formData.num){ |
| | | await getAction(this.url.getNum, { type: 'SpecialtyInspectionPlan', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | formData.num = res.message; |
| | | } |
| | | }); |
| | | } |
| | | formData.type = "inspection_path_photo"; |
| | | formData.uploadId = that.uploadId; |
| | | formData.fileType = "7";//文件类型 7:图片 |