| | |
| | | <el-button type="primary" @click="onSubmit" v-show="!readonly" |
| | | >保存</el-button |
| | | > |
| | | <el-button @click="onCancel" v-show="!readonly" |
| | | >取消</el-button |
| | | > |
| | | <el-button @click="onCancel" v-show="!readonly">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <ArbitraryPhoto |
| | |
| | | components: { |
| | | ArbitraryPhoto, |
| | | CompDevicePhoto, |
| | | CompLedgerPhoto, |
| | | CompLedgerPhoto |
| | | }, |
| | | props: { |
| | | readonly: { |
| | |
| | | return true; |
| | | }, |
| | | onCancel() { |
| | | this.$emit("cancel") |
| | | this.$emit('cancel'); |
| | | this.$emit('update:visible', false); |
| | | }, |
| | | onSubmit() { |
| | | this.$refs.formRef.validate((valid) => { |
| | |
| | | }); |
| | | if (this.type == 1) { |
| | | let deleteImgCopy = this.deleteImg; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | fileUtil.getImageFiles(picUrls, (files) => { |
| | | data.append('deleteImg', deleteImgCopy); |
| | | deepCopyPro.advise = deepCopyPro.advice; |
| | | delete deepCopyPro['advice']; |
| | |
| | | files.forEach((image) => { |
| | | data.append('images', image); |
| | | }); |
| | | problemApi.updateProblem(data).then((res) => {}); |
| | | problemApi.updateProblem(data).then((res) => { |
| | | this.$emit('submit', false); |
| | | }); |
| | | }); |
| | | this.$emit('submit', false); |
| | | } else { |
| | | const deepCopySubTask = useCloned(this.subtask).cloned.value; |
| | | const that = this; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | fileUtil.getImageFiles(picUrls, (files) => { |
| | | deepCopyPro.insGuid = deepCopySubTask.insGuid; |
| | | delete deepCopyPro['description']; |
| | | deepCopyPro.proName = deepCopyPro.problemname; |
| | | delete deepCopyPro['problemname']; |
| | | deepCopyPro.ptGuid = that.findProTypeByGuid( |
| | | that.currProTypeGuid |
| | | deepCopyPro.ptGuid = this.findProTypeByGuid( |
| | | this.currProTypeGuid |
| | | ).guid; |
| | | deepCopyPro.locationId = deepCopyPro.locationid; |
| | | delete deepCopyPro['locationid']; |
| | |
| | | files.forEach((image) => { |
| | | data.append('images', image); |
| | | }); |
| | | problemApi.newProblem(data).then((res) => {}); |
| | | problemApi.newProblem(data).then((res) => { |
| | | this.$emit('submit', true); |
| | | }); |
| | | }); |
| | | this.$emit('submit', true); |
| | | } |
| | | } |
| | | }); |