| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-show=" |
| | | problem && |
| | | problem.guid && |
| | | deepCopyProblem.advice && |
| | | deepCopyProblem.advice != '' |
| | | " |
| | | label="问题建议修正" |
| | | prop="_adviseEdit" |
| | | :disabled="false" |
| | |
| | | <el-button type="primary" @click="onSubmit" v-show="!readonly" |
| | | >保存</el-button |
| | | > |
| | | <el-button @click="$emit('submit', false)" v-show="!readonly" |
| | | <el-button @click="onCancel" v-show="!readonly" |
| | | >取消</el-button |
| | | > |
| | | </el-form-item> |
| | |
| | | </CompGenericWrapper> |
| | | </template> |
| | | <script> |
| | | import CompGenericWrapper from './CompGenericWrapper.vue'; |
| | | import ArbitraryPhoto from './ArbitraryPhoto.vue'; |
| | | import CompLedgerPhoto from './CompLedgerPhoto.vue'; |
| | | import CompDevicePhoto from './CompDevicePhoto.vue'; |
| | |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | export default { |
| | | emits: ['submit'], |
| | | emits: ['submit', 'cancel'], |
| | | components: { |
| | | ArbitraryPhoto, |
| | | CompDevicePhoto, |
| | | CompLedgerPhoto, |
| | | CompGenericWrapper |
| | | }, |
| | | props: { |
| | | readonly: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // fixme 2024.11.20 子组件初始化时机问题 |
| | | initPropsCount: 0, |
| | | // 初始预览图片index |
| | | initialIndex: -1, |
| | | // 图片选择最大数量 |
| | |
| | | this.pictureValidate(); |
| | | }, |
| | | deep: true |
| | | }, |
| | | initPropsCount: { |
| | | handler(nv, ov) { |
| | | if (nv >= 3) { |
| | | this.initOptions(); |
| | | } |
| | | }, |
| | | immediate: true |
| | | }, |
| | | problem: { |
| | | handler(nv, ov) { |
| | | if (nv != null && nv != undefined) { |
| | | this.initPropsCount++; |
| | | } |
| | | }, |
| | | immediate: true |
| | | }, |
| | | topTask: { |
| | | handler(nv, ov) { |
| | | if (nv != null && nv != undefined) { |
| | | this.initPropsCount++; |
| | | } |
| | | }, |
| | | immediate: true |
| | | }, |
| | | subtask: { |
| | | handler(nv, ov) { |
| | | if (nv != null && nv != undefined) { |
| | | this.initPropsCount++; |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | return array; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initOptions(); |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | onProAdviseChange(value) { |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advice; |
| | | }, |
| | | handlePictureCardPreview(uploadFile) { |
| | | this.initialIndex = this.fileList.indexOf(uploadFile) |
| | | this.initialIndex = this.fileList.indexOf(uploadFile); |
| | | this.previewDialogVisible = true; |
| | | this.previewDialogImageUrl = uploadFile.url; |
| | | }, |
| | |
| | | } |
| | | return true; |
| | | }, |
| | | onCancel() { |
| | | this.$emit("cancel") |
| | | this.$emit('update:visible', false) |
| | | }, |
| | | onSubmit() { |
| | | this.$refs.formRef.validate((valid) => { |
| | | if (valid && this.pictureValidate()) { |