|
@@ -47,6 +47,9 @@
|
|
|
name="code-sql-mirror"
|
|
|
style="opacity: 0;">
|
|
|
</textarea>
|
|
|
+ <a class="ans-modal-box-max">
|
|
|
+ <em class="ans-icon-max" @click="setEditorVal"></em>
|
|
|
+ </a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</m-list-box>
|
|
@@ -123,6 +126,9 @@
|
|
|
name="code-json-mirror"
|
|
|
style="opacity: 0;">
|
|
|
</textarea>
|
|
|
+ <a class="ans-modal-box-max">
|
|
|
+ <em class="ans-icon-max" @click="setJsonEditorVal"></em>
|
|
|
+ </a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</m-list-box>
|
|
@@ -144,6 +150,7 @@
|
|
|
import _ from 'lodash'
|
|
|
import i18n from '@/module/i18n'
|
|
|
import mListBox from './_source/listBox'
|
|
|
+ import mScriptBox from './_source/scriptBox'
|
|
|
import mDatasource from './_source/datasource'
|
|
|
import mLocalParams from './_source/localParams'
|
|
|
import mStatementList from './_source/statementList'
|
|
@@ -197,6 +204,62 @@
|
|
|
createNodeId: Number
|
|
|
},
|
|
|
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) {
|
|
|
if(is) {
|
|
|
this.customConfig = 1
|
|
@@ -475,3 +538,10 @@
|
|
|
components: { mListBox, mDatasource, mLocalParams, mStatementList, mSelectInput }
|
|
|
}
|
|
|
</script>
|
|
|
+<style lang="scss" rel="stylesheet/scss" scope>
|
|
|
+ .ans-modal-box-max {
|
|
|
+ position: absolute;
|
|
|
+ right: -12px;
|
|
|
+ top: -16px;
|
|
|
+ }
|
|
|
+</style>
|