未验证 提交 464405f4 编写于 作者: B break60 提交者: GitHub

Python, sql, sqoop,datax task node editor adds zoom function #2929 (#2933)

* Python, sql, sqoop task node editor adds zoom function

* fix
上级 186ba3ba
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
name="code-sql-mirror" name="code-sql-mirror"
style="opacity: 0;"> style="opacity: 0;">
</textarea> </textarea>
<a class="ans-modal-box-max">
<em class="ans-icon-max" @click="setEditorVal"></em>
</a>
</div> </div>
</div> </div>
</m-list-box> </m-list-box>
...@@ -123,6 +126,9 @@ ...@@ -123,6 +126,9 @@
name="code-json-mirror" name="code-json-mirror"
style="opacity: 0;"> style="opacity: 0;">
</textarea> </textarea>
<a class="ans-modal-box-max">
<em class="ans-icon-max" @click="setJsonEditorVal"></em>
</a>
</div> </div>
</div> </div>
</m-list-box> </m-list-box>
...@@ -144,6 +150,7 @@ ...@@ -144,6 +150,7 @@
import _ from 'lodash' import _ from 'lodash'
import i18n from '@/module/i18n' import i18n from '@/module/i18n'
import mListBox from './_source/listBox' import mListBox from './_source/listBox'
import mScriptBox from './_source/scriptBox'
import mDatasource from './_source/datasource' import mDatasource from './_source/datasource'
import mLocalParams from './_source/localParams' import mLocalParams from './_source/localParams'
import mStatementList from './_source/statementList' import mStatementList from './_source/statementList'
...@@ -197,6 +204,62 @@ ...@@ -197,6 +204,62 @@
createNodeId: Number createNodeId: Number
}, },
methods: { methods: {
setEditorVal() {
let self = this
let modal = self.$modal.dialog({
className: 'scriptModal',
closable: false,
showMask: true,
maskClosable: true,
onClose: function() {
},
render (h) {
return h(mScriptBox, {
on: {
getSriptBoxValue (val) {
editor.setValue(val)
},
closeAble () {
// this.$modal.destroy()
modal.remove()
}
},
props: {
item: editor.getValue()
}
})
}
})
},
setJsonEditorVal() {
let self = this
let modal = self.$modal.dialog({
className: 'scriptModal',
closable: false,
showMask: true,
maskClosable: true,
onClose: function() {
},
render (h) {
return h(mScriptBox, {
on: {
getSriptBoxValue (val) {
jsonEditor.setValue(val)
},
closeAble () {
// this.$modal.destroy()
modal.remove()
}
},
props: {
item: jsonEditor.getValue()
}
})
}
})
},
_onSwitch (is) { _onSwitch (is) {
if(is) { if(is) {
this.customConfig = 1 this.customConfig = 1
...@@ -475,3 +538,10 @@ ...@@ -475,3 +538,10 @@
components: { mListBox, mDatasource, mLocalParams, mStatementList, mSelectInput } components: { mListBox, mDatasource, mLocalParams, mStatementList, mSelectInput }
} }
</script> </script>
<style lang="scss" rel="stylesheet/scss" scope>
.ans-modal-box-max {
position: absolute;
right: -12px;
top: -16px;
}
</style>
\ No newline at end of file
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
<div class="from-mirror"> <div class="from-mirror">
<textarea id="code-python-mirror" name="code-python-mirror" style="opacity: 0;"> <textarea id="code-python-mirror" name="code-python-mirror" style="opacity: 0;">
</textarea> </textarea>
<a class="ans-modal-box-max">
<em class="ans-icon-max" @click="setEditorVal"></em>
</a>
</div> </div>
</div> </div>
</m-list-box> </m-list-box>
...@@ -57,6 +60,7 @@ ...@@ -57,6 +60,7 @@
import _ from 'lodash' import _ from 'lodash'
import i18n from '@/module/i18n' import i18n from '@/module/i18n'
import mListBox from './_source/listBox' import mListBox from './_source/listBox'
import mScriptBox from './_source/scriptBox'
import mResources from './_source/resources' import mResources from './_source/resources'
import mLocalParams from './_source/localParams' import mLocalParams from './_source/localParams'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
...@@ -100,6 +104,34 @@ ...@@ -100,6 +104,34 @@
_onLocalParams (a) { _onLocalParams (a) {
this.localParams = a this.localParams = a
}, },
setEditorVal() {
let self = this
let modal = self.$modal.dialog({
className: 'scriptModal',
closable: false,
showMask: true,
maskClosable: true,
onClose: function() {
},
render (h) {
return h(mScriptBox, {
on: {
getSriptBoxValue (val) {
editor.setValue(val)
},
closeAble () {
// this.$modal.destroy()
modal.remove()
}
},
props: {
item: editor.getValue()
}
})
}
})
},
/** /**
* return resourceList * return resourceList
*/ */
...@@ -342,4 +374,9 @@ ...@@ -342,4 +374,9 @@
} }
} }
} }
.ans-modal-box-max {
position: absolute;
right: -12px;
top: -16px;
}
</style> </style>
\ No newline at end of file
...@@ -89,6 +89,9 @@ ...@@ -89,6 +89,9 @@
name="code-sql-mirror" name="code-sql-mirror"
style="opacity: 0;"> style="opacity: 0;">
</textarea> </textarea>
<a class="ans-modal-box-max">
<em class="ans-icon-max" @click="setEditorVal"></em>
</a>
</div> </div>
</div> </div>
</m-list-box> </m-list-box>
...@@ -140,6 +143,7 @@ ...@@ -140,6 +143,7 @@
import i18n from '@/module/i18n' import i18n from '@/module/i18n'
import mUdfs from './_source/udfs' import mUdfs from './_source/udfs'
import mListBox from './_source/listBox' import mListBox from './_source/listBox'
import mScriptBox from './_source/scriptBox'
import mSqlType from './_source/sqlType' import mSqlType from './_source/sqlType'
import mDatasource from './_source/datasource' import mDatasource from './_source/datasource'
import mLocalParams from './_source/localParams' import mLocalParams from './_source/localParams'
...@@ -190,6 +194,34 @@ ...@@ -190,6 +194,34 @@
createNodeId: Number createNodeId: Number
}, },
methods: { methods: {
setEditorVal() {
let self = this
let modal = self.$modal.dialog({
className: 'scriptModal',
closable: false,
showMask: true,
maskClosable: true,
onClose: function() {
},
render (h) {
return h(mScriptBox, {
on: {
getSriptBoxValue (val) {
editor.setValue(val)
},
closeAble () {
// this.$modal.destroy()
modal.remove()
}
},
props: {
item: editor.getValue()
}
})
}
})
},
/** /**
* return sqlType * return sqlType
*/ */
...@@ -495,5 +527,10 @@ ...@@ -495,5 +527,10 @@
color: #ff0000; color: #ff0000;
padding-right: 4px; padding-right: 4px;
} }
.ans-modal-box-max {
position: absolute;
right: -12px;
top: -16px;
}
</style> </style>
...@@ -190,6 +190,9 @@ ...@@ -190,6 +190,9 @@
name="code-sqoop-mirror" name="code-sqoop-mirror"
style="opacity: 0;"> style="opacity: 0;">
</textarea> </textarea>
<a class="ans-modal-box-max">
<em class="ans-icon-max" @click="setEditorVal"></em>
</a>
</div> </div>
</div> </div>
</m-list-box> </m-list-box>
...@@ -492,6 +495,7 @@ ...@@ -492,6 +495,7 @@
import _ from 'lodash' import _ from 'lodash'
import i18n from '@/module/i18n' import i18n from '@/module/i18n'
import mListBox from './_source/listBox' import mListBox from './_source/listBox'
import mScriptBox from './_source/scriptBox'
import mDatasource from './_source/datasource' import mDatasource from './_source/datasource'
import mLocalParams from './_source/localParams' import mLocalParams from './_source/localParams'
import disabledState from '@/module/mixin/disabledState' import disabledState from '@/module/mixin/disabledState'
...@@ -619,7 +623,34 @@ ...@@ -619,7 +623,34 @@
backfillItem: Object backfillItem: Object
}, },
methods: { methods: {
setEditorVal() {
let self = this
let modal = self.$modal.dialog({
className: 'scriptModal',
closable: false,
showMask: true,
maskClosable: true,
onClose: function() {
},
render (h) {
return h(mScriptBox, {
on: {
getSriptBoxValue (val) {
editor.setValue(val)
},
closeAble () {
// this.$modal.destroy()
modal.remove()
}
},
props: {
item: editor.getValue()
}
})
}
})
},
_handleQueryType(o){ _handleQueryType(o){
this.sourceMysqlParams.srcQueryType = this.srcQueryType this.sourceMysqlParams.srcQueryType = this.srcQueryType
}, },
...@@ -1028,5 +1059,10 @@ ...@@ -1028,5 +1059,10 @@
color: #ff0000; color: #ff0000;
padding-right: 4px; padding-right: 4px;
} }
.ans-modal-box-max {
position: absolute;
right: -12px;
top: -16px;
}
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册