| | |
| | | <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) => { |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |
| | | }); |