规则改为块类型 加入数组本身选项
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'
|
||||||
|
|||||||
71
h5-enginex-manager/src/components/common/Cascader.vue
Normal file
71
h5-enginex-manager/src/components/common/Cascader.vue
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<el-cascader :value="cascaderValue" filterable :props="{ expandTrigger: 'hover' }" v-bind="$attrs"
|
||||||
|
:options="options" @change="change" :key="key" @visible-change="changeKey"></el-cascader>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: String | Array
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
isString: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
key: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
change(e) {
|
||||||
|
let value
|
||||||
|
if (this.isString) {
|
||||||
|
value = e.join('.')
|
||||||
|
} else {
|
||||||
|
value = e
|
||||||
|
}
|
||||||
|
// console.log(value)
|
||||||
|
this.$emit('input', value)
|
||||||
|
this.$emit('change', value)
|
||||||
|
|
||||||
|
},
|
||||||
|
changeKey(is) {
|
||||||
|
if (is) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
this.key++
|
||||||
|
}, 200)
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
cascaderValue() {
|
||||||
|
if (this.isString) {
|
||||||
|
return this.value ? this.value.split('.') : []
|
||||||
|
} else {
|
||||||
|
return this.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
options() {
|
||||||
|
this.key++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -3,17 +3,19 @@
|
|||||||
<div style="display: flex;align-items: center;">
|
<div style="display: flex;align-items: center;">
|
||||||
<el-select v-model="data" :size="size" :filterable="type==2?'filterable':false" placeholder="请选择"
|
<el-select v-model="data" :size="size" :filterable="type==2?'filterable':false" placeholder="请选择"
|
||||||
ref="select" style="width: 100px;margin-left: 10px;" @change="change" @blur="$emit('blur')">
|
ref="select" style="width: 100px;margin-left: 10px;" @change="change" @blur="$emit('blur')">
|
||||||
<el-option label="大于" value=">" v-show="[2,3,5,6].indexOf(valueType)==-1"></el-option>
|
<el-option label="大于" value=">" v-show="[2,3,5,6,7].indexOf(valueType)==-1"></el-option>
|
||||||
<el-option label="大于等于" value=">=" v-show="[2,3,5,6].indexOf(valueType)==-1"></el-option>
|
<el-option label="大于等于" value=">=" v-show="[2,3,5,6,7].indexOf(valueType)==-1"></el-option>
|
||||||
<el-option label="等于" value="==" v-show="[5].indexOf(valueType)==-1"></el-option>
|
<el-option label="等于" value="==" v-show="[5,7].indexOf(valueType)==-1"></el-option>
|
||||||
<el-option label="小于" value="<" v-show="[2,3,5,6].indexOf(valueType)==-1"></el-option>
|
<el-option label="小于" value="<" v-show="[2,3,5,6,7].indexOf(valueType)==-1"></el-option>
|
||||||
<el-option label="小于等于" value="<=" v-show="[2,3,5,6].indexOf(valueType)==-1"></el-option>
|
<el-option label="小于等于" value="<=" v-show="[2,3,5,6,7].indexOf(valueType)==-1"></el-option>
|
||||||
<el-option label="不等于" value="!=" v-show="[5].indexOf(valueType)==-1"></el-option>
|
<el-option label="不等于" value="!=" v-show="[5,7].indexOf(valueType)==-1"></el-option>
|
||||||
<el-option label="包含" value="contains" v-show="[2,5,6].indexOf(valueType)!=-1"></el-option>
|
<el-option label="包含" value="contains" v-show="[2,5,6].indexOf(valueType)!=-1"></el-option>
|
||||||
<el-option label="不包含" value="not contains" v-show="[2,5,6].indexOf(valueType)!=-1"></el-option>
|
<el-option label="不包含" value="not contains" v-show="[2,5,6].indexOf(valueType)!=-1"></el-option>
|
||||||
<el-option label="为空" value="is empty" v-show="[6].indexOf(valueType)!=-1"></el-option>
|
<el-option label="为空" value="is empty" v-show="[6].indexOf(valueType)!=-1"></el-option>
|
||||||
<el-option label="不为空" value="not empty" v-show="[6].indexOf(valueType)!=-1"></el-option>
|
<el-option label="不为空" value="not empty" v-show="[6].indexOf(valueType)!=-1"></el-option>
|
||||||
<el-option label="正则匹配" value="regex" v-show="[2].indexOf(valueType)!=-1"></el-option>
|
<el-option label="正则匹配" value="regex" v-show="[2].indexOf(valueType)!=-1"></el-option>
|
||||||
|
<el-option label="匹配" value="array contains" v-show="[7].indexOf(valueType)!=-1"></el-option>
|
||||||
|
<el-option label="不匹配" value="array not contains" v-show="[7].indexOf(valueType)!=-1"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-input :value="value2" @input="$emit('update:value2',$event)" maxlength="30" :size="size"
|
<el-input :value="value2" @input="$emit('update:value2',$event)" maxlength="30" :size="size"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
/* background-color: #C7C6C8; */
|
/* background-color: #C7C6C8; */
|
||||||
margin: 12px 0px 0 0;
|
margin: 12px 0px 0 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="rule" :style="{marginLeft:ZIndex==1?'20px':'0px'}" v-if="data">
|
<div class="rule" :style="{marginLeft:ZIndex==1?'20px':'0px'}" v-if="data">
|
||||||
|
|
||||||
<div :style="{position: 'absolute',top:'0px', left: '-20px',marginTop: top===0?'0':'8px'}" class="RuleIcon">
|
<div :style="{position: 'absolute',top:'0px', left: '-20px',marginTop: top===0?'0':'8px'}" class="RuleIcon">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
@@ -91,35 +93,42 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
:style="{border: '1px dashed '+ color[ZIndex%5],borderRadius: '5px',paddingRight: '5px',paddingBottom: '5px',position:'relative',minWidth:'30px',minHeight:'40px'}">
|
:style="{border: '1px dashed '+ color[ZIndex%5],borderRadius: '5px',paddingRight: '5px',paddingBottom: '5px',position:'relative',minWidth:'30px',minHeight:'40px',backgroundColor:data.red&&(data.conditionType==1||data.conditionType==4||data.conditionType==5)?'#f56c6c':''}">
|
||||||
<div v-if="data.conditionType==3" style="display: flex;margin-top: 6px;">
|
<!-- {{data}} -->
|
||||||
|
<div v-if="data.conditionType==3" style="display: flex;margin-top: 6px;" :style="{backgroundColor:data.red1?'#f56c6c':''}">
|
||||||
|
|
||||||
<div class="Rule_cont" :style="{marginTop:'12px'}"></div>
|
<div class="Rule_cont" :style="{marginTop:'12px'}"></div>
|
||||||
|
<myCascader v-model="data.fieldEn" size="mini" :options="fielduserArr" isString clearable @change="EnChange"></myCascader>
|
||||||
<el-cascader v-model="data.fieldEn" filterable size="mini" :options="fielduserArr" :key="keyValue+(data.random?data.random:0)" @visible-change="randomAdd(data,$event)"
|
<!-- <el-cascader v-model="data.fieldEn" filterable size="mini" :options="fielduserArr" :key="keyValue+(data.random?data.random:0)" @visible-change="randomAdd(data,$event)"
|
||||||
:props="{ expandTrigger: 'hover' }" @change="EnChange"></el-cascader>
|
:props="{ expandTrigger: 'hover' }" @change="EnChange"></el-cascader> -->
|
||||||
|
|
||||||
<!-- for 的输入 -->
|
<!-- for 的输入 -->
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:style="{border:data.conditionType==3?'1px dotted #000':'',margin:data.conditionType==3?'5px 10px ':'',padding:data.conditionType==3?'8px':'',paddingLeft:'0px'}">
|
:style="{backgroundColor:data.red&&data.conditionType==3?'#f56c6c':'',border:data.conditionType==3?'1px dotted #000':'',margin:data.conditionType==3?'5px 10px ':'',padding:data.conditionType==3?'8px':'',paddingLeft:'0px'}">
|
||||||
|
|
||||||
{{typeof sdataJson!= 'object'&&typeof sdataJson!= 'array'&&data.conditionType==3?'此处不支持继续遍历请删除此节点':''}}
|
{{typeof sdataJson!= 'object'&&typeof sdataJson!= 'array'&&data.conditionType==3?'此处不支持继续遍历请删除此节点':''}}
|
||||||
|
|
||||||
<div v-for="(item,index) in data.children" style="display: flex;margin-top: 7px;">
|
<div v-for="(item,index) in data.children" style="display: flex;margin-top: 7px;">
|
||||||
<div class="Rule_cont"
|
<div class="Rule_cont"
|
||||||
:style="{marginTop:item.conditionType===0?'12px':(index===0?'11px':'20px')}">
|
:style="{marginTop:item.conditionType===0?'12px':(index===0?'11px':'20px')}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- conditionType==2 规则部分 -->
|
<!-- conditionType==2 规则部分 -->
|
||||||
<div v-if="item.conditionType==2" style="display: flex;">
|
<div v-if="item.conditionType==2" style="display: flex;">
|
||||||
|
|
||||||
<!-- {{fieldType}} -->
|
<!-- {{fieldType}} -->
|
||||||
<div v-if="fieldType!='for'" style="display: flex;">
|
<div v-if="fieldType!='for'" style="display: flex;">
|
||||||
<!-- 普通规则部分 -->
|
<!-- 普通规则部分 -->
|
||||||
|
|
||||||
<!-- 不为输出节点 则拉选 fielduser-->
|
<!-- 不为输出节点 则拉选 fielduser-->
|
||||||
|
|
||||||
<div v-if="data.conditionType!=4&&out!='out'" style="display: flex;">
|
<div v-if="data.conditionType!=4&&out!='out'" style="display: flex;" :style="{backgroundColor:item.red?'#f56c6c':''}">
|
||||||
|
|
||||||
<el-cascader v-model="item.fieldEn" filterable size="mini" :options="fieldUserObj" clearable @change="ruleCascaderChange(item)"
|
<myCascader v-model="item.fieldEn" size="mini" :options="fieldUserObj" isString clearable @change="ruleCascaderChange(item)"></myCascader>
|
||||||
|
<!-- <el-cascader v-model="item.fieldEn" filterable size="mini" :options="fieldUserObj" clearable @change="ruleCascaderChange(item)"
|
||||||
:key="keyValue+(item.random?item.random:0)" :props="{ expandTrigger: 'hover' }" @visible-change="randomAdd(item,$event)">
|
:key="keyValue+(item.random?item.random:0)" :props="{ expandTrigger: 'hover' }" @visible-change="randomAdd(item,$event)">
|
||||||
</el-cascader>
|
</el-cascader> -->
|
||||||
|
|
||||||
<!-- <bigElCascader v-model="item.fieldEn" filterable size="mini" :options="fieldUserObj"
|
<!-- <bigElCascader v-model="item.fieldEn" filterable size="mini" :options="fieldUserObj"
|
||||||
clearable @change="ruleCascaderChange(item)" :Mykey="keyValue"
|
clearable @change="ruleCascaderChange(item)" :Mykey="keyValue"
|
||||||
@@ -131,7 +140,8 @@
|
|||||||
|
|
||||||
<!-- 加入 变量选择 -->
|
<!-- 加入 变量选择 -->
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="display: flex;">
|
<div v-else style="display: flex;" :style="{backgroundColor:item.red?'#f56c6c':''}">
|
||||||
|
打点1
|
||||||
<el-select v-model="item.fieldEn" size="mini" filterable
|
<el-select v-model="item.fieldEn" size="mini" filterable
|
||||||
@change="selectChange(item)">
|
@change="selectChange(item)">
|
||||||
<el-option v-for="cont in suseingfield" :key="cont.id" :label="cont.fieldCn"
|
<el-option v-for="cont in suseingfield" :key="cont.id" :label="cont.fieldCn"
|
||||||
@@ -156,14 +166,17 @@
|
|||||||
</el-select> -->
|
</el-select> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="display: flex;">
|
<div v-else style="display: flex;" :style="{backgroundColor:item.red?'#f56c6c':''}">
|
||||||
<!-- {{sEn}} -->
|
<!-- {{sEn}} -->
|
||||||
<!-- for规则部分 -->
|
<!-- for规则部分 -->
|
||||||
|
|
||||||
<!-- {{sEn}} -->
|
<!-- {{sEn}} -->
|
||||||
<el-cascader size="mini" filterable v-model="item.fieldEn" :options="getUserObj" @visible-change="randomAdd(item,$event)"
|
|
||||||
|
<myCascader v-model="item.fieldEn" size="mini" :options="getUserObj" isString clearable @change="forChange(item)"></myCascader>
|
||||||
|
|
||||||
|
<!-- <el-cascader size="mini" filterable v-model="item.fieldEn" :options="getUserObj" @visible-change="randomAdd(item,$event)"
|
||||||
:key="keyValue+(item.random?item.random:0)" :props="{ expandTrigger: 'hover' }" @change="forChange(item)">
|
:key="keyValue+(item.random?item.random:0)" :props="{ expandTrigger: 'hover' }" @change="forChange(item)">
|
||||||
</el-cascader>
|
</el-cascader> -->
|
||||||
|
|
||||||
<ruleRelation v-model="item.operator" :value2.sync="item.fieldValue"
|
<ruleRelation v-model="item.operator" :value2.sync="item.fieldValue"
|
||||||
:variableType.sync="item.variableType" :valueType="getvalueTypebyEn(item.fieldEn)"
|
:variableType.sync="item.variableType" :valueType="getvalueTypebyEn(item.fieldEn)"
|
||||||
@@ -194,14 +207,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="data.conditionType==3" style="margin-left: 25px;margin-top: 10px;">
|
<div v-if="data.conditionType==3" style="margin-left: 25px;margin-top: 10px;" :style="{backgroundColor:data.red2?'#f56c6c':''}">
|
||||||
<!-- for 的输出 -->
|
<!-- for 的输出 -->
|
||||||
|
<!-- 打点 - for输出 -->
|
||||||
<rule :suseingfield="useingfield" :out="'out'" :data="data.loopResultCondition" :ZIndex="ZIndex+1"
|
<rule :suseingfield="useingfield" :out="'out'" :data="data.loopResultCondition" :ZIndex="ZIndex+1"
|
||||||
@delectLogical="delectLogical"></rule>
|
@delectLogical="delectLogical"></rule>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="data.conditionType==5" class="RuleCont_for_out">
|
<div v-if="data.conditionType==5" class="RuleCont_for_out" :style="{backgroundColor:data.red1?'#f56c6c':''}">
|
||||||
<span style="font-size: 12px;margin-left: 5px;">命中条件:</span>
|
<span style="font-size: 12px;margin-left: 5px;">命中条件:</span>
|
||||||
[
|
[
|
||||||
<el-input size="mini" v-model="data.condGroupResultCondition.children[0].fieldValue"
|
<el-input size="mini" v-model="data.condGroupResultCondition.children[0].fieldValue"
|
||||||
@@ -213,8 +226,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="data.loopGroupActions.length>0" class="RuleCont_for_out">
|
<div v-if="data.loopGroupActions.length>0" class="RuleCont_for_out">
|
||||||
|
<!-- 打点 - for计算 -->
|
||||||
<div v-for="(item,index) in data.loopGroupActions"
|
<div v-for="(item,index) in data.loopGroupActions"
|
||||||
style="display: flex; align-items: center;margin-bottom: 5px;margin-left: 5px;">
|
style="display: flex; align-items: center;margin-bottom: 5px;margin-left: 5px;"
|
||||||
|
:style="{backgroundColor:item.red?'#f56c6c':''}"
|
||||||
|
>
|
||||||
|
|
||||||
<el-select v-model="item.actionKey" style="width: 150px;" size="mini" filterable>
|
<el-select v-model="item.actionKey" style="width: 150px;" size="mini" filterable>
|
||||||
<el-option v-for="cont in fielduser" :key="cont.id" :label="cont.fieldCn" :value="cont.fieldEn"
|
<el-option v-for="cont in fielduser" :key="cont.id" :label="cont.fieldCn" :value="cont.fieldEn"
|
||||||
v-if="item.actionType!=6||cont.valueType==6">
|
v-if="item.actionType!=6||cont.valueType==6">
|
||||||
@@ -230,9 +247,10 @@
|
|||||||
<el-input size="mini" style="width: 120px;" v-model="item.actionValue"
|
<el-input size="mini" style="width: 120px;" v-model="item.actionValue"
|
||||||
v-if="[2,4,6,7].indexOf(item.actionType)!=-1"></el-input>
|
v-if="[2,4,6,7].indexOf(item.actionType)!=-1"></el-input>
|
||||||
|
|
||||||
<el-cascader size="mini" style="width: 120px;" filterable v-model="item.actionValue"
|
<myCascader v-model="item.actionValue" v-if="item.actionType==3" style="width: 120px;" size="mini" :options="getUserObj" isString clearable @change="forChange(item)"></myCascader>
|
||||||
|
<!-- <el-cascader size="mini" style="width: 120px;" filterable v-model="item.actionValue"
|
||||||
:options="getUserObj" :key="keyValue+(item.random?item.random:0)" v-if="item.actionType==3" @visible-change="randomAdd(item,$event)"
|
:options="getUserObj" :key="keyValue+(item.random?item.random:0)" v-if="item.actionType==3" @visible-change="randomAdd(item,$event)"
|
||||||
:props="{ expandTrigger: 'hover' }"></el-cascader>
|
:props="{ expandTrigger: 'hover' }"></el-cascader> -->
|
||||||
|
|
||||||
<i class="el-icon-circle-plus-outline" style="color: #66B1FF;margin-left: 3px;"
|
<i class="el-icon-circle-plus-outline" style="color: #66B1FF;margin-left: 3px;"
|
||||||
@click="addLoopOut(index)"></i>
|
@click="addLoopOut(index)"></i>
|
||||||
@@ -288,8 +306,8 @@
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.data) {
|
if (this.data) {
|
||||||
// console.log(this.data.fieldEn)
|
// console.log(this.data)
|
||||||
if (Array.isArray(this.data.fieldEn)) {
|
if (this.data.fieldEn) {
|
||||||
if (this.data.fieldEn.length > 0) {
|
if (this.data.fieldEn.length > 0) {
|
||||||
this.EnChange(this.data.fieldEn, false)
|
this.EnChange(this.data.fieldEn, false)
|
||||||
}
|
}
|
||||||
@@ -369,12 +387,12 @@
|
|||||||
let obj = {}
|
let obj = {}
|
||||||
if (this.fieldType == "for") {
|
if (this.fieldType == "for") {
|
||||||
obj = this.sdataJson
|
obj = this.sdataJson
|
||||||
} else if (Array.isArray(this.data.fieldEn)) {
|
} else if (this.data.fieldEn) {
|
||||||
// console.log(1, this.data.fieldEn)
|
console.log(1, this.data.fieldEn)
|
||||||
obj = JSON.parse(this.mixinGetFieldByEn(this.data.fieldEn[0]).jsonValue)
|
obj = JSON.parse(this.mixinGetFieldByEn(this.data.fieldEn.split('.')[0]).jsonValue)
|
||||||
}
|
}
|
||||||
if (Array.isArray(this.data.fieldEn)) {
|
if (this.data.fieldEn) {
|
||||||
this.data.fieldEn.forEach((value, index) => {
|
this.data.fieldEn.split('.').forEach((value, index) => {
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
obj = obj[value]
|
obj = obj[value]
|
||||||
}
|
}
|
||||||
@@ -492,6 +510,7 @@
|
|||||||
item.operator = ""
|
item.operator = ""
|
||||||
},
|
},
|
||||||
getvalueTypebyEn(e) { //通过En 获取 valueType
|
getvalueTypebyEn(e) { //通过En 获取 valueType
|
||||||
|
e && (e = e.split('.'))
|
||||||
if (!Array.isArray(e)) {
|
if (!Array.isArray(e)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -527,14 +546,14 @@
|
|||||||
},
|
},
|
||||||
EnChange(e, clear = true) {
|
EnChange(e, clear = true) {
|
||||||
|
|
||||||
this.En = e.join('.')
|
this.En = e
|
||||||
if (!clear) return
|
if (!clear) return
|
||||||
this.deepClearEn(this.data)
|
this.deepClearEn(this.data)
|
||||||
},
|
},
|
||||||
deepClearEn(obj) { // 递归清除用到父级的 En
|
deepClearEn(obj) { // 递归清除用到父级的 En
|
||||||
obj.children.forEach(value => {
|
obj.children.forEach(value => {
|
||||||
if (Array.isArray(value.fieldEn)) {
|
if (value.fieldEn) {
|
||||||
if (value.fieldEn[0][0] == "%") {
|
if (value.fieldEn[0] == "%") {
|
||||||
value.fieldEn = ""
|
value.fieldEn = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -700,7 +719,7 @@
|
|||||||
this.data.children.push({
|
this.data.children.push({
|
||||||
"logical": 'for',
|
"logical": 'for',
|
||||||
"fieldId": "",
|
"fieldId": "",
|
||||||
"fieldEn":[],
|
"fieldEn":"",
|
||||||
"operator": "",
|
"operator": "",
|
||||||
"fieldValue": "",
|
"fieldValue": "",
|
||||||
"conditionType": 3,
|
"conditionType": 3,
|
||||||
|
|||||||
@@ -75,16 +75,17 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="rule_home">
|
<div class="rule_home">
|
||||||
<div class="rule_fa">
|
<div class="rule_fa">
|
||||||
<el-button icon="el-icon-plus" circle @click="outAdd(0)"></el-button>
|
<el-button icon="el-icon-plus" circle @click="outAdd(0)" :size="size"></el-button>
|
||||||
<el-button icon="el-icon-close" circle @click="outDelect(index)" v-if="!unone" disabled style="margin-right: 10px"></el-button>
|
<el-button icon="el-icon-close" circle @click="outDelect(index)" :size="size" v-if="!unone" disabled style="margin-right: 10px"></el-button>
|
||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-for="(value,index) in outcontent" class="rule_home" style="display: flex;position: relative;">
|
<div v-for="(value,index) in outcontent" class="rule_home" style="display: flex;position: relative;" :style="{backgroundColor:value.red?'#f56c6c':''}">
|
||||||
|
<!-- {{value}} -->
|
||||||
<div class="rule_fa">
|
<div class="rule_fa">
|
||||||
<el-button icon="el-icon-plus" circle @click="outAdd(index+1)"></el-button>
|
<el-button icon="el-icon-plus" circle @click="outAdd(index+1)" :size="size"></el-button>
|
||||||
<el-button icon="el-icon-close" circle @click="outDelect(index)" style="margin-right: 10px"></el-button>
|
<el-button icon="el-icon-close" circle @click="outDelect(index)" :size="size" style="margin-right: 10px"></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="ruleOut" class="ruleOut">
|
<div v-if="ruleOut" class="ruleOut">
|
||||||
<span :style="{backgroundColor:value.outCondition?'#afd7ff':'#e8e8e8',border:value.outCondition?'1px solid #409EFF':'1px solid #adadad',color:value.outCondition?'#409EFF':'#adadad',fontSize:'12px',padding:'2px'}"
|
<span :style="{backgroundColor:value.outCondition?'#afd7ff':'#e8e8e8',border:value.outCondition?'1px solid #409EFF':'1px solid #adadad',color:value.outCondition?'#409EFF':'#adadad',fontSize:'12px',padding:'2px'}"
|
||||||
@@ -92,11 +93,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: flex;align-items: center;">
|
<div style="display: flex;align-items: center;">
|
||||||
<el-select :value="getCn(value.fieldId)" placeholder="请选择" style="width: 200px;margin-right: 10px;" @focus="outClick(index)">
|
<el-select :value="getCn(value.fieldId)" :size="size" placeholder="请选择" style="width: 200px;margin-right: 10px;" @focus="outClick(index)">
|
||||||
</el-select>
|
</el-select>
|
||||||
<p style="margin-right: 10px;">=</p>
|
<p style="margin-right: 10px;">=</p>
|
||||||
|
|
||||||
<varialeSelect v-model="value.fieldValue" :valueType="mixinGetvalueType(value.fieldId)" :variableType.sync="value.variableType" width="255px" height="40px" size="—"></varialeSelect>
|
<varialeSelect v-model="value.fieldValue" :size="size" :valueType="mixinGetvalueType(value.fieldId)" :variableType.sync="value.variableType" width="255px"></varialeSelect>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -201,6 +202,10 @@
|
|||||||
default: () => {
|
default: () => {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
size:{
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// watch: {
|
// watch: {
|
||||||
@@ -320,6 +325,7 @@
|
|||||||
if (this.radio == '') {
|
if (this.radio == '') {
|
||||||
this.$message.error('请选择一个字段,或者选择取消')
|
this.$message.error('请选择一个字段,或者选择取消')
|
||||||
} else {
|
} else {
|
||||||
|
// console.log(this.tempcur)
|
||||||
if (this.tempcur.split('###')[1] === "Data") {
|
if (this.tempcur.split('###')[1] === "Data") {
|
||||||
this.Data.forEach((value, index) => {
|
this.Data.forEach((value, index) => {
|
||||||
if (index === parseInt(this.tempcur.split('###')[0])) {
|
if (index === parseInt(this.tempcur.split('###')[0])) {
|
||||||
@@ -330,10 +336,11 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (this.tempcur.split('###')[1] === "out") {
|
} else if (this.tempcur.split('###')[1] === "out") {
|
||||||
console.log(this.outcontent)
|
// console.log(this.outcontent)
|
||||||
this.outcontent.forEach((value, index) => {
|
this.outcontent.forEach((value, index) => {
|
||||||
if (index === parseInt(this.tempcur.split('###')[0])) {
|
if (index === parseInt(this.tempcur.split('###')[0])) {
|
||||||
value.fieldId = this.radio
|
value.fieldId = this.radio
|
||||||
|
value.fieldEn = this.mixinGetvalueEn(value.fieldId)
|
||||||
// value.fieldEn = this.mixinGetvalueEn(this.radio)
|
// value.fieldEn = this.mixinGetvalueEn(this.radio)
|
||||||
this.$set(value,'fieldEn',this.mixinGetvalueEn(this.radio))
|
this.$set(value,'fieldEn',this.mixinGetvalueEn(this.radio))
|
||||||
value.fieldValue = ''
|
value.fieldValue = ''
|
||||||
|
|||||||
@@ -89,7 +89,8 @@
|
|||||||
style="text-align: center;font-size: 100px;color: #d0d0d0;margin-top: 50px;user-select: none;">
|
style="text-align: center;font-size: 100px;color: #d0d0d0;margin-top: 50px;user-select: none;">
|
||||||
请选择引擎信息
|
请选择引擎信息
|
||||||
</p>
|
</p>
|
||||||
<el-row :gutter="20" style="margin-top: 20px;">
|
<template v-if="versionId">
|
||||||
|
<el-row :gutter="20" style="margin-top: 20px;" >
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-card shadow="hover" v-if="engineSummary">
|
<el-card shadow="hover" v-if="engineSummary">
|
||||||
<div class="tendencyAna_summaryHome">
|
<div class="tendencyAna_summaryHome">
|
||||||
@@ -238,12 +239,12 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" style="margin-top: 20px;">
|
<el-row :gutter="20" style="margin-top: 20px;">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" v-if="option1.series[0].data.length">
|
<el-card shadow="hover">
|
||||||
<charts sid="chart1" :option="option1" :height="chart1Size[0]" :width="chart1Size[1]"></charts>
|
<charts sid="chart1" :option="option1" :height="chart1Size[0]" :width="chart1Size[1]"></charts>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" style="position: relative;" v-if="option1.series[0].data.length">
|
<el-card shadow="hover" style="position: relative;" >
|
||||||
<el-table :data="option1TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
<el-table :data="option1TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
||||||
<el-table-column prop="result" label="调用时间" width="180">
|
<el-table-column prop="result" label="调用时间" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -255,7 +256,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" style="margin-top: 20px;">
|
<el-row :gutter="20" style="margin-top: 20px;">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" v-if="option2PutList.length">
|
<el-card shadow="hover" >
|
||||||
<el-select v-model="option2Put" size="mini" multiple collapse-tags value-key="id" :loading="option2PutList.length==0"
|
<el-select v-model="option2Put" size="mini" multiple collapse-tags value-key="id" :loading="option2PutList.length==0"
|
||||||
style="margin-left: 20px;position: absolute;" filterable placeholder="请选择决策结果" :key="num">
|
style="margin-left: 20px;position: absolute;" filterable placeholder="请选择决策结果" :key="num">
|
||||||
<el-option v-for="item in option2PutList" :key="item[0].id" :label="item[0].result" :value="item">
|
<el-option v-for="item in option2PutList" :key="item[0].id" :label="item[0].result" :value="item">
|
||||||
@@ -265,7 +266,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" style="position: relative;" v-if="option2PutList.length">
|
<el-card shadow="hover" style="position: relative;" >
|
||||||
<el-table :data="option2TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
<el-table :data="option2TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
||||||
<el-table-column prop="result" label="结果" width="180">
|
<el-table-column prop="result" label="结果" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -277,7 +278,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" style="margin-top: 20px;">
|
<el-row :gutter="20" style="margin-top: 20px;">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" style="position: relative;" v-if="option3PutList.length">
|
<el-card shadow="hover" style="position: relative;" >
|
||||||
<el-select v-model="option3Put" size="mini" multiple collapse-tags value-key="id" :loading="option3PutList.length==0"
|
<el-select v-model="option3Put" size="mini" multiple collapse-tags value-key="id" :loading="option3PutList.length==0"
|
||||||
style="margin-left: 20px;position: absolute;" filterable placeholder="请选择规则及版本" :key="num">
|
style="margin-left: 20px;position: absolute;" filterable placeholder="请选择规则及版本" :key="num">
|
||||||
<el-option v-for="item in option3PutList" :key="item[0].id" :label="item[0].ruleName+':'+item[0].ruleVersionCode"
|
<el-option v-for="item in option3PutList" :key="item[0].id" :label="item[0].ruleName+':'+item[0].ruleVersionCode"
|
||||||
@@ -288,7 +289,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" v-if="option3PutList.length">
|
<el-card shadow="hover">
|
||||||
<el-table :data="option3TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
<el-table :data="option3TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
||||||
<el-table-column prop="result" label="命中" width="180">
|
<el-table-column prop="result" label="命中" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -300,7 +301,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" style="margin-top: 20px;">
|
<el-row :gutter="20" style="margin-top: 20px;">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" style="position: relative;" v-if="option4PutList.length">
|
<el-card shadow="hover" style="position: relative;" >
|
||||||
<el-select v-model="option4Put" size="mini" multiple collapse-tags value-key="id" :loading="option4PutList.length==0"
|
<el-select v-model="option4Put" size="mini" multiple collapse-tags value-key="id" :loading="option4PutList.length==0"
|
||||||
style="margin-left: 20px;position: absolute;" filterable placeholder="请选择节点" :key="num">
|
style="margin-left: 20px;position: absolute;" filterable placeholder="请选择节点" :key="num">
|
||||||
<el-option v-for="item in option4PutList" :key="item[0].id" :label="item[0].nodeName" :value="item">
|
<el-option v-for="item in option4PutList" :key="item[0].id" :label="item[0].nodeName" :value="item">
|
||||||
@@ -310,7 +311,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" v-if="option4PutList.length">
|
<el-card shadow="hover" >
|
||||||
<el-table :data="option4TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
<el-table :data="option4TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
||||||
<el-table-column prop="result" label="命中" width="180">
|
<el-table-column prop="result" label="命中" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -322,7 +323,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" style="margin-top: 20px;">
|
<el-row :gutter="20" style="margin-top: 20px;">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" style="position: relative;" v-if="option5PutList.length">
|
<el-card shadow="hover" style="position: relative;" >
|
||||||
<el-select v-model="option5Put" size="mini" :loading="option5PutList.length==0" style="margin-left: 20px;position: absolute;z-index: 5;"
|
<el-select v-model="option5Put" size="mini" :loading="option5PutList.length==0" style="margin-left: 20px;position: absolute;z-index: 5;"
|
||||||
filterable value-key="[0][0].id" placeholder="请选择评分卡节点" :key="num">
|
filterable value-key="[0][0].id" placeholder="请选择评分卡节点" :key="num">
|
||||||
<el-option v-for="item in option5PutList" :key="item[0][0].id" :label="item[0][0].scorecardName" :value="item">
|
<el-option v-for="item in option5PutList" :key="item[0][0].id" :label="item[0][0].scorecardName" :value="item">
|
||||||
@@ -332,7 +333,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" style="position: relative;" v-if="option5PutList.length">
|
<el-card shadow="hover" style="position: relative;" >
|
||||||
<el-table :data="option5TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
<el-table :data="option5TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
||||||
<el-table-column prop="result" label="命中" width="180">
|
<el-table-column prop="result" label="命中" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -344,7 +345,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" style="margin-top: 20px;">
|
<el-row :gutter="20" style="margin-top: 20px;">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" style="position: relative;" v-if="option6PutList.length">
|
<el-card shadow="hover" style="position: relative;" >
|
||||||
<el-select v-model="option6Put" size="mini" :loading="option6PutList.length==0" style="margin-left: 20px;position: absolute;z-index: 5;"
|
<el-select v-model="option6Put" size="mini" :loading="option6PutList.length==0" style="margin-left: 20px;position: absolute;z-index: 5;"
|
||||||
filterable value-key="[0][0].id" placeholder="请选择入参" :key="num">
|
filterable value-key="[0][0].id" placeholder="请选择入参" :key="num">
|
||||||
<el-option v-for="item in option6PutList" :key="item[0][0].id" :label="item[0][0].decisonTablesName" :value="item">
|
<el-option v-for="item in option6PutList" :key="item[0][0].id" :label="item[0][0].decisonTablesName" :value="item">
|
||||||
@@ -354,7 +355,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card shadow="hover" style="position: relative;" v-if="option6PutList.length">
|
<el-card shadow="hover" style="position: relative;" >
|
||||||
|
|
||||||
<el-table :data="option6TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
<el-table :data="option6TableData" style="width: 100%;height: 300px;" :default-sort="{prop:'resultCount',order:'descending'}">
|
||||||
<el-table-column prop="result" label="命中" width="180">
|
<el-table-column prop="result" label="命中" width="180">
|
||||||
@@ -366,6 +367,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import store from './store'
|
|||||||
|
|
||||||
import './styles/index.scss'; // global css
|
import './styles/index.scss'; // global css
|
||||||
import myMixin from '@/utils/mixin.js';
|
import myMixin from '@/utils/mixin.js';
|
||||||
|
import myCascader from './components/common/Cascader'
|
||||||
// import 'codemirror/lib/codemirror.css'
|
// import 'codemirror/lib/codemirror.css'
|
||||||
// import VueCodemirror from 'vue-codemirror'
|
// import VueCodemirror from 'vue-codemirror'
|
||||||
|
|
||||||
@@ -36,6 +36,9 @@ const i18n = new VueI18n({
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Vue.component("myCascader",myCascader)
|
||||||
|
|
||||||
|
|
||||||
Date.prototype.format = function(fmt) {
|
Date.prototype.format = function(fmt) {
|
||||||
var o = {
|
var o = {
|
||||||
"M+": this.getMonth() + 1, //月份
|
"M+": this.getMonth() + 1, //月份
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ export default new Vuex.Store({
|
|||||||
value: value.fieldEn,
|
value: value.fieldEn,
|
||||||
valueType: value.valueType,
|
valueType: value.valueType,
|
||||||
jsonValue: value.jsonValue,
|
jsonValue: value.jsonValue,
|
||||||
children: GetdeepObj(JSON.parse(value.jsonValue))
|
children: GetdeepObj(JSON.parse(value.jsonValue),true,true,true)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export const GetdeepObj = (obj, length = true ,first=false) => {
|
export const GetdeepObj = (obj, length = true ,first=false,my = false) => {
|
||||||
if (typeof obj == 'object' && !Array.isArray(obj)) {
|
if (typeof obj == 'object' && !Array.isArray(obj)) {
|
||||||
let arr = []
|
let arr = []
|
||||||
for (let key in obj) {
|
for (let key in obj) {
|
||||||
@@ -20,7 +20,15 @@ export const GetdeepObj = (obj, length = true ,first=false) => {
|
|||||||
obj2.children.push({
|
obj2.children.push({
|
||||||
value: '[]',
|
value: '[]',
|
||||||
label: '第一项',
|
label: '第一项',
|
||||||
children: GetdeepObj(obj[key][0], length,first)
|
children: GetdeepObj(obj[key][0], length,first,my)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (my) {
|
||||||
|
console.log(1)
|
||||||
|
obj2.children.push({
|
||||||
|
value: 'array',
|
||||||
|
label: '本身',
|
||||||
|
valueType: 7,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
arr.push(obj2)
|
arr.push(obj2)
|
||||||
@@ -28,7 +36,7 @@ export const GetdeepObj = (obj, length = true ,first=false) => {
|
|||||||
arr.push({
|
arr.push({
|
||||||
value: key,
|
value: key,
|
||||||
label: key,
|
label: key,
|
||||||
children: GetdeepObj(obj[key], length,first)
|
children: GetdeepObj(obj[key], length,first,my)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
arr.push({
|
arr.push({
|
||||||
@@ -54,7 +62,14 @@ export const GetdeepObj = (obj, length = true ,first=false) => {
|
|||||||
obj.push({
|
obj.push({
|
||||||
value: '[0]',
|
value: '[0]',
|
||||||
label: '第一项',
|
label: '第一项',
|
||||||
children: GetdeepObj(obj[0], length,first)
|
children: GetdeepObj(obj[0], length,first,my)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (my) {
|
||||||
|
obj.push({
|
||||||
|
value: 'array',
|
||||||
|
label: '本身',
|
||||||
|
valueType: 7,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixinGetValueTypeByJSONEn(e){
|
mixinGetValueTypeByJSONEn(e){
|
||||||
if(!e||e.length==0) return
|
if(!e||e.length==0) return
|
||||||
|
if(typeof e == 'string') e = e.split('.')
|
||||||
if(!Array.isArray(e)) e=e.split('.')
|
if(!Array.isArray(e)) e=e.split('.')
|
||||||
let obj =this.FieldUserObj
|
let obj =this.FieldUserObj
|
||||||
e.forEach((value,index)=>{
|
e.forEach((value,index)=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user