¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | :maskClosable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | cancelText="å
³é"> |
| | | <CutterModalForm ref="realForm" @ok="submitCallback" :disableSubmit="disableSubmit"/> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import CutterModalForm from './CutterModalForm.vue' |
| | | |
| | | export default { |
| | | name: 'CutterModal', |
| | | components: { |
| | | CutterModalForm |
| | | }, |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '', |
| | | width: 700, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods: { |
| | | // æ·»å æç¨åå
· |
| | | handleCutterAdd() { |
| | | const { attributionId, attributionType, docId } = this.currentTreeNodeInfo |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.add({ |
| | | attributionId: attributionId, |
| | | attributionType: attributionType, |
| | | docId: docId |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // ç¼è¾åå
·ä¿¡æ¯ |
| | | handleCutterEdit(record) { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | if (this.$refs.realForm) { |
| | | this.$refs.realForm.edit({ ...record }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleOk() { |
| | | this.$refs.realForm.submitForm() |
| | | }, |
| | | |
| | | submitCallback() { |
| | | this.$emit('submitSuccess') |
| | | this.visible = false |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | } |
| | | } |
| | | } |
| | | </script> |