|
@@ -219,6 +219,7 @@
|
|
v-model="item.transformType"
|
|
v-model="item.transformType"
|
|
:updata-dict="item.transformType"
|
|
:updata-dict="item.transformType"
|
|
:dict-key="'TRANSFORM_TYPE'"
|
|
:dict-key="'TRANSFORM_TYPE'"
|
|
|
|
+ @change="changeForm"
|
|
/>
|
|
/>
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
@@ -252,10 +253,16 @@
|
|
min-height="400px"
|
|
min-height="400px"
|
|
append-to-body
|
|
append-to-body
|
|
>
|
|
>
|
|
- <div v-if="isItemFilterType.transformType == 'js' || isItemFilterType.transformType == 'javaBean'">
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-if="
|
|
|
|
+ isItemFilterType.transformType == 'js' ||
|
|
|
|
+ isItemFilterType.transformType == 'javaBean'
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<div class="codemirror">
|
|
<div class="codemirror">
|
|
<!-- //自定义高级规则? -->
|
|
<!-- //自定义高级规则? -->
|
|
<monaco-editor
|
|
<monaco-editor
|
|
|
|
+ v-if="jsScriptVisible"
|
|
v-model.trim="transformScript"
|
|
v-model.trim="transformScript"
|
|
language="javascript"
|
|
language="javascript"
|
|
style="height: 500px"
|
|
style="height: 500px"
|
|
@@ -483,6 +490,7 @@ export default {
|
|
dialogFormVisibleTitle: "",
|
|
dialogFormVisibleTitle: "",
|
|
dialogPermissionVisible: false,
|
|
dialogPermissionVisible: false,
|
|
dialogSwitchVisible: false,
|
|
dialogSwitchVisible: false,
|
|
|
|
+ jsScriptVisible: false,
|
|
permissionTextarea: "",
|
|
permissionTextarea: "",
|
|
isItemFilterType: "", // 选中的转换类型id
|
|
isItemFilterType: "", // 选中的转换类型id
|
|
itemFilterList: [
|
|
itemFilterList: [
|
|
@@ -663,6 +671,12 @@ export default {
|
|
this.isShowPagination = false;
|
|
this.isShowPagination = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ changeForm(val) {
|
|
|
|
+ if (!val) {
|
|
|
|
+ this.dialogSwitchVisible = false;
|
|
|
|
+ this.jsScriptVisible = false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 关闭模态框
|
|
// 关闭模态框
|
|
closeDialog() {
|
|
closeDialog() {
|
|
this.$emit("handleClose");
|
|
this.$emit("handleClose");
|
|
@@ -744,6 +758,7 @@ export default {
|
|
console.log(item);
|
|
console.log(item);
|
|
this.isItemFilterType = item;
|
|
this.isItemFilterType = item;
|
|
this.dialogSwitchVisible = true;
|
|
this.dialogSwitchVisible = true;
|
|
|
|
+ this.jsScriptVisible = true
|
|
if (item.transformType == "js") {
|
|
if (item.transformType == "js") {
|
|
this.itemFilterScriptId = item.itemFilterSort;
|
|
this.itemFilterScriptId = item.itemFilterSort;
|
|
const fnCont = `function dataTransform(data){\n\t//自定义脚本内容\n\treturn data;\n}`;
|
|
const fnCont = `function dataTransform(data){\n\t//自定义脚本内容\n\treturn data;\n}`;
|
|
@@ -751,8 +766,7 @@ export default {
|
|
? item.transformScript
|
|
? item.transformScript
|
|
: fnCont;
|
|
: fnCont;
|
|
} else if (item.transformType == "dict") {
|
|
} else if (item.transformType == "dict") {
|
|
-
|
|
|
|
- }else if (item.transformType == "javaBean") {
|
|
|
|
|
|
+ } else if (item.transformType == "javaBean") {
|
|
this.itemFilterScriptId = item.itemFilterSort;
|
|
this.itemFilterScriptId = item.itemFilterSort;
|
|
const fnCont = `package com;
|
|
const fnCont = `package com;
|
|
|
|
|