指标加入全局变量字段选项
This commit is contained in:
@@ -76,7 +76,7 @@ switch (process.env.NODE_ENV) {
|
|||||||
case 'wang': // 汪环境
|
case 'wang': // 汪环境
|
||||||
proxyObj = {
|
proxyObj = {
|
||||||
'/Riskmanage': {
|
'/Riskmanage': {
|
||||||
target: 'http://192.168.50.228:8080', // 生产环境
|
target: 'http://192.168.50.223:8080', // 生产环境
|
||||||
changeOrigin: true, // 是否跨域
|
changeOrigin: true, // 是否跨域
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/Riskmanage': '/Riskmanage'
|
'^/Riskmanage': '/Riskmanage'
|
||||||
|
|||||||
2029
h5-datax-manager/package-lock.json
generated
2029
h5-datax-manager/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -324,6 +324,7 @@
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
this.getlist()
|
this.getlist()
|
||||||
|
this.selection = []
|
||||||
this.$store.dispatch('reGetfielduser')
|
this.$store.dispatch('reGetfielduser')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,46 +1,46 @@
|
|||||||
<style>
|
<style>
|
||||||
.dataManageRedact {
|
.dataManageRedact {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_checkbox {
|
.MR_checkbox {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_scope {
|
.MR_scope {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_scope>div {
|
.MR_scope>div {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_scope>div>p {
|
.MR_scope>div>p {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_derive {
|
.MR_derive {
|
||||||
|
|
||||||
margin: 0 40px 0 30px;
|
margin: 0 40px 0 30px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_rule_home {
|
.MR_rule_home {
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
height: 350px;
|
height: 350px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_rule_home::-webkit-scrollbar {
|
.MR_rule_home::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
/* Chrome Safari */
|
/* Chrome Safari */
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_toolbar {
|
.MR_toolbar {
|
||||||
background-color: #F0F0F0;
|
background-color: #F0F0F0;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -54,46 +54,46 @@
|
|||||||
-khtml-user-select: none;
|
-khtml-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.MR_toolbar>p:hover {
|
.MR_toolbar>p:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.codemirrirPs {
|
.codemirrirPs {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 30px 0;
|
margin: 30px 0;
|
||||||
background-color: #999;
|
background-color: #999;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.codemirrirPs>span:nth-of-type(1) {
|
.codemirrirPs>span:nth-of-type(1) {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<div class="dataManageRedact" v-loading="loading">
|
<div class="dataManageRedact" v-loading="loading">
|
||||||
<div :class="smallHeader?'MR_header MR_headerSmall':'MR_header'">
|
<div :class="smallHeader ? 'MR_header MR_headerSmall' : 'MR_header'">
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" icon="el-icon-arrow-left" circle @click="$emit('close')"></el-button>
|
<el-button type="primary" icon="el-icon-arrow-left" circle @click="$emit('close')"></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span v-if="id===0">新增字段 :</span>
|
<span v-if="id === 0">新增字段 :</span>
|
||||||
<span v-else>编辑字段 :</span>
|
<span v-else>编辑字段 :</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<el-button :icon="smallHeader?'el-icon-bottom':'el-icon-top'" circle @click="openHeader">
|
<el-button :icon="smallHeader ? 'el-icon-bottom' : 'el-icon-top'" circle @click="openHeader">
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="success" icon="el-icon-check" circle @click="submit"></el-button>
|
<el-button type="success" icon="el-icon-check" circle @click="submit"></el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="smallHeader?'MR_input MR_inputSmall':'MR_input'">
|
<div :class="smallHeader ? 'MR_input MR_inputSmall' : 'MR_input'">
|
||||||
<div>
|
<div>
|
||||||
<p>字段名称: </p>
|
<p>字段名称: </p>
|
||||||
<el-input placeholder="请输入字段名" maxlength="30" v-model="fieldEn" clearable></el-input>
|
<el-input placeholder="请输入字段名" maxlength="30" v-model="fieldEn" clearable></el-input>
|
||||||
@@ -104,19 +104,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>值类型 : </p>
|
<p>值类型 : </p>
|
||||||
<el-select v-model="valueType" placeholder="请选择">
|
<el-select v-model="valueType" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="数值型" :value="1" v-if="ftype!=5" />
|
<el-option label="数值型" :value="1" v-if="ftype != 5" />
|
||||||
<el-option label="字符型" :value="2" v-if="ftype!=5" />
|
<el-option label="字符型" :value="2" v-if="ftype != 5" />
|
||||||
<!-- <el-option label="枚举型" :value="3" /> -->
|
<!-- <el-option label="枚举型" :value="3" /> -->
|
||||||
<!-- <el-option label="小数型" :value="4" /> -->
|
<!-- <el-option label="小数型" :value="4" /> -->
|
||||||
<!-- <el-option label="数组型" :value="5" /> -->
|
<!-- <el-option label="数组型" :value="5" /> -->
|
||||||
<el-option label="JSON型" :value="6" />
|
<el-option label="JSON型" :value="6" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style="margin: 10px 30px;">
|
||||||
|
<el-checkbox v-model="isLocalVariable">是否局部变量</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1;overflow: auto;">
|
<div style="flex: 1;overflow: auto;">
|
||||||
|
|
||||||
<div v-show="isDerivative=='Derivative'" class="MR_derive">
|
<div v-show="isDerivative == 'Derivative'" class="MR_derive">
|
||||||
|
|
||||||
<el-tabs v-model="activeName">
|
<el-tabs v-model="activeName">
|
||||||
<!-- <el-tab-pane label="条件区域" name="first">
|
<!-- <el-tab-pane label="条件区域" name="first">
|
||||||
@@ -132,15 +136,15 @@
|
|||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div v-show="activeName!=='first'">
|
<div v-show="activeName !== 'first'">
|
||||||
<teV2 v-model="formula" :hint="activeName=='second'">
|
<teV2 v-model="formula" :hint="activeName == 'second'">
|
||||||
|
|
||||||
</teV2>
|
</teV2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="Sourcelist">
|
<div v-if="Sourcelist">
|
||||||
<div v-if="isDerivative=='SQL'" class="MR_derive">
|
<div v-if="isDerivative == 'SQL'" class="MR_derive">
|
||||||
|
|
||||||
<el-select v-model="SQLType" placeholder="请选择数据源类型" style="margin-top: 20px;width: 200px;"
|
<el-select v-model="SQLType" placeholder="请选择数据源类型" style="margin-top: 20px;width: 200px;"
|
||||||
@change="SQLName = ''">
|
@change="SQLName = ''">
|
||||||
@@ -161,19 +165,19 @@
|
|||||||
|
|
||||||
<div class="codemirrirPs">
|
<div class="codemirrirPs">
|
||||||
<span>
|
<span>
|
||||||
{{sqlplaceholder[SQLType]&&sqlplaceholder[SQLType].placeholder}} 按Ctrl唤醒提示
|
{{ sqlplaceholder[SQLType] && sqlplaceholder[SQLType].placeholder }} 按Ctrl唤醒提示
|
||||||
|
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<codemirror v-model="SQLItem" :MYname="sqlplaceholder[SQLType]&&sqlplaceholder[SQLType].mime"
|
<codemirror v-model="SQLItem" :MYname="sqlplaceholder[SQLType] && sqlplaceholder[SQLType].mime"
|
||||||
:mime="sqlplaceholder[SQLType]&&sqlplaceholder[SQLType].mime"></codemirror>
|
:mime="sqlplaceholder[SQLType] && sqlplaceholder[SQLType].mime"></codemirror>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="ftype==4">
|
<div v-if="ftype == 4">
|
||||||
<el-select v-model="interfaceId" placeholder="请选择接口" style="margin-top: 20px;margin-left: 20px;">
|
<el-select v-model="interfaceId" placeholder="请选择接口" style="margin-top: 20px;margin-left: 20px;">
|
||||||
<el-option v-for="item in interfaceList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option v-for="item in interfaceList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
@@ -181,7 +185,7 @@
|
|||||||
<el-cascader style="margin-left: 20px;" placeholder="请选择接口下的字段" v-model="interfaceParseField"
|
<el-cascader style="margin-left: 20px;" placeholder="请选择接口下的字段" v-model="interfaceParseField"
|
||||||
:key="keynum" :options="dataJson" :props="{ checkStrictly: true }" clearable></el-cascader>
|
:key="keynum" :options="dataJson" :props="{ checkStrictly: true }" clearable></el-cascader>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="valueType==6" class="MR_derive">
|
<div v-if="valueType == 6" class="MR_derive">
|
||||||
<p style="margin-top: 20px;">JSON:</p>
|
<p style="margin-top: 20px;">JSON:</p>
|
||||||
<!-- <el-input type="textarea" v-model="jsonValue" :rows="9" style="margin-top: 20px;"
|
<!-- <el-input type="textarea" v-model="jsonValue" :rows="9" style="margin-top: 20px;"
|
||||||
placeholder="请输入格式JSON">
|
placeholder="请输入格式JSON">
|
||||||
@@ -197,13 +201,12 @@
|
|||||||
<!-- </p> -->
|
<!-- </p> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="ftype==6">
|
<div v-if="ftype == 6">
|
||||||
<div v-if="codeKey" class="MR_derive">
|
<div v-if="codeKey" class="MR_derive">
|
||||||
|
|
||||||
<el-select v-model="MqType" placeholder="请选择类型" style="margin-top: 20px;width: 200px;"
|
<el-select v-model="MqType" placeholder="请选择类型" style="margin-top: 20px;width: 200px;"
|
||||||
@change="MqId = ''">
|
@change="MqId = ''">
|
||||||
<el-option v-for="item in MqlistType" :key="item.type" :label="item.type"
|
<el-option v-for="item in MqlistType" :key="item.type" :label="item.type" :value="item.type">
|
||||||
:value="item.type">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
@@ -239,17 +242,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import codemirror from '@/components/common/codemirror.vue'
|
import codemirror from '@/components/common/codemirror.vue'
|
||||||
// import fieldUserTable from './fieldUserTable.vue'
|
// import fieldUserTable from './fieldUserTable.vue'
|
||||||
import bindParam from '@/components/common/bindParam.vue'
|
import bindParam from '@/components/common/bindParam.vue'
|
||||||
import '@/assets/css/ManageRedact.css'
|
import '@/assets/css/ManageRedact.css'
|
||||||
import teV2 from '@/components/common/teV2.vue'
|
import teV2 from '@/components/common/teV2.vue'
|
||||||
import mangeRedactMixin from '@/utils/contminxin/MangeRedactMixin.js'
|
import mangeRedactMixin from '@/utils/contminxin/MangeRedactMixin.js'
|
||||||
// import {
|
// import {
|
||||||
// getInterfaceList
|
// getInterfaceList
|
||||||
// } from '@/api/index.js'
|
// } from '@/api/index.js'
|
||||||
import rule from './rule.vue'
|
import rule from './rule.vue'
|
||||||
export default {
|
export default {
|
||||||
mixins: [mangeRedactMixin],
|
mixins: [mangeRedactMixin],
|
||||||
components: {
|
components: {
|
||||||
// getInterfaceList,
|
// getInterfaceList,
|
||||||
@@ -266,7 +269,7 @@
|
|||||||
},
|
},
|
||||||
setsave: {
|
setsave: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => {}
|
default: () => { }
|
||||||
},
|
},
|
||||||
id: {
|
id: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -274,11 +277,11 @@
|
|||||||
},
|
},
|
||||||
getInfo: {
|
getInfo: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => {}
|
default: () => { }
|
||||||
},
|
},
|
||||||
updata: {
|
updata: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => {}
|
default: () => { }
|
||||||
},
|
},
|
||||||
ftype: {
|
ftype: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -288,7 +291,7 @@
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
codeKey:0, //方便code输入框重新渲染
|
codeKey: 0, //方便code输入框重新渲染
|
||||||
sqlVariable: [],
|
sqlVariable: [],
|
||||||
interfaceParseField: [],
|
interfaceParseField: [],
|
||||||
keynum: 1,
|
keynum: 1,
|
||||||
@@ -314,6 +317,7 @@
|
|||||||
lest: "", //暂存末尾
|
lest: "", //暂存末尾
|
||||||
isshow: false,
|
isshow: false,
|
||||||
islest: true,
|
islest: true,
|
||||||
|
isLocalVariable: false,//是否为局部变量
|
||||||
isStaticJsonValue: 0, //json是否为静态的 0为否
|
isStaticJsonValue: 0, //json是否为静态的 0为否
|
||||||
// interfaceList: [],
|
// interfaceList: [],
|
||||||
ruledata: [{
|
ruledata: [{
|
||||||
@@ -363,7 +367,7 @@
|
|||||||
.interfaceParseField.split('.') : ''
|
.interfaceParseField.split('.') : ''
|
||||||
this.fid = res.data.fieldVo.fieldTypeId
|
this.fid = res.data.fieldVo.fieldTypeId
|
||||||
this.isOutput = res.data.fieldVo.isOutput == 1 ? true : false
|
this.isOutput = res.data.fieldVo.isOutput == 1 ? true : false
|
||||||
|
this.isLocalVariable = res.data.fieldVo.isLocalVariable
|
||||||
if (res.data.fieldVo.isDerivative) {
|
if (res.data.fieldVo.isDerivative) {
|
||||||
this.isDerivative = 'Derivative'
|
this.isDerivative = 'Derivative'
|
||||||
} else if (res.data.fieldVo.useSql) {
|
} else if (res.data.fieldVo.useSql) {
|
||||||
@@ -403,12 +407,12 @@
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if(this.ftype ==6){
|
if (this.ftype == 6) {
|
||||||
this.MqType = this.$store.state.Mqlist.find(x => x.id == res.data.fieldVo
|
this.MqType = this.$store.state.Mqlist.find(x => x.id == res.data.fieldVo
|
||||||
.mqSourceId).type
|
.mqSourceId).type
|
||||||
this.MqId = res.data.fieldVo.mqSourceId
|
this.MqId = res.data.fieldVo.mqSourceId
|
||||||
this.SQLItem = res.data.fieldVo.sqlStatement
|
this.SQLItem = res.data.fieldVo.sqlStatement
|
||||||
console.log(res.data.fieldVo.sqlStatement,this.SQLItem)
|
console.log(res.data.fieldVo.sqlStatement, this.SQLItem)
|
||||||
}
|
}
|
||||||
// console.log(res.data.fieldVo.fieldCondList)
|
// console.log(res.data.fieldVo.fieldCondList)
|
||||||
}
|
}
|
||||||
@@ -651,6 +655,7 @@
|
|||||||
dataSourceId: 0,
|
dataSourceId: 0,
|
||||||
sqlStatement: '', //sql语句
|
sqlStatement: '', //sql语句
|
||||||
sourceType: this.ftype,
|
sourceType: this.ftype,
|
||||||
|
isLocalVariable: this.isLocalVariable
|
||||||
|
|
||||||
}
|
}
|
||||||
if (this.valueType == 6) {
|
if (this.valueType == 6) {
|
||||||
@@ -705,7 +710,7 @@
|
|||||||
obj.sqlStatement = this.SQLItem
|
obj.sqlStatement = this.SQLItem
|
||||||
|
|
||||||
}
|
}
|
||||||
if(this.ftype == 6){
|
if (this.ftype == 6) {
|
||||||
obj.mqSourceId = this.MqId
|
obj.mqSourceId = this.MqId
|
||||||
obj.sqlStatement = this.SQLItem
|
obj.sqlStatement = this.SQLItem
|
||||||
}
|
}
|
||||||
@@ -899,5 +904,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user