|
|
@ -14,8 +14,10 @@ |
|
|
|
* See the License for the specific language governing permissions and |
|
|
|
* See the License for the specific language governing permissions and |
|
|
|
* limitations under the License. |
|
|
|
* limitations under the License. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
import Vue from 'vue' |
|
|
|
|
|
|
|
let v = new Vue() |
|
|
|
import _ from 'lodash' |
|
|
|
import _ from 'lodash' |
|
|
|
|
|
|
|
import i18n from '@/module/i18n' |
|
|
|
import { jsPlumb } from 'jsplumb' |
|
|
|
import { jsPlumb } from 'jsplumb' |
|
|
|
import JSP from './plugIn/jsPlumbHandle' |
|
|
|
import JSP from './plugIn/jsPlumbHandle' |
|
|
|
import DownChart from './plugIn/downChart' |
|
|
|
import DownChart from './plugIn/downChart' |
|
|
@ -73,6 +75,7 @@ Dag.prototype.create = function () { |
|
|
|
* Action event on the right side of the toolbar |
|
|
|
* Action event on the right side of the toolbar |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
Dag.prototype.toolbarEvent = function ({ item, code, is }) { |
|
|
|
Dag.prototype.toolbarEvent = function ({ item, code, is }) { |
|
|
|
|
|
|
|
let self = this |
|
|
|
switch (code) { |
|
|
|
switch (code) { |
|
|
|
case 'pointer': |
|
|
|
case 'pointer': |
|
|
|
JSP.handleEventPointer(is) |
|
|
|
JSP.handleEventPointer(is) |
|
|
@ -87,8 +90,21 @@ Dag.prototype.toolbarEvent = function ({ item, code, is }) { |
|
|
|
JSP.handleEventScreen({ item, is }) |
|
|
|
JSP.handleEventScreen({ item, is }) |
|
|
|
break |
|
|
|
break |
|
|
|
case 'download': |
|
|
|
case 'download': |
|
|
|
DownChart.download({ |
|
|
|
v.$modal.dialog({ |
|
|
|
dagThis: this.dag |
|
|
|
width: 350, |
|
|
|
|
|
|
|
closable: false, |
|
|
|
|
|
|
|
showMask: true, |
|
|
|
|
|
|
|
maskClosable: true, |
|
|
|
|
|
|
|
title: i18n.$t('Download'), |
|
|
|
|
|
|
|
content: i18n.$t('Please confirm whether the workflow has been saved before downloading'), |
|
|
|
|
|
|
|
ok: { |
|
|
|
|
|
|
|
handle (e) { |
|
|
|
|
|
|
|
DownChart.download({ |
|
|
|
|
|
|
|
dagThis: self.dag |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
cancel: {} |
|
|
|
}) |
|
|
|
}) |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|