Merge pull request #6 from Object-you/h5-zj-220809Start
规则改为块类型 加入数组本身选项
This commit is contained in:
@@ -76,7 +76,7 @@ switch (process.env.NODE_ENV) {
|
||||
case 'wang': // 汪环境
|
||||
proxyObj = {
|
||||
'/Riskmanage': {
|
||||
target: 'http://192.168.50.228:8080', // 生产环境
|
||||
target: 'http://192.168.50.223:8080', // 生产环境
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {
|
||||
'^/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>
|
||||
@@ -1,52 +1,61 @@
|
||||
<style>
|
||||
.rule_com {
|
||||
.rule_com {
|
||||
/* height: 51vh; */
|
||||
flex: 1;
|
||||
overflow: scroll;
|
||||
/* overflow-x: hidden; */
|
||||
margin: 0px 0px 0px 10px;
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.rule_com::-webkit-scrollbar {
|
||||
}
|
||||
|
||||
.rule_com::-webkit-scrollbar {
|
||||
/* display: none; */
|
||||
/* Chrome Safari */
|
||||
}
|
||||
|
||||
.Rule_version_buttom {
|
||||
}
|
||||
|
||||
.Rule_version_buttom {
|
||||
/* width: 100px; */
|
||||
margin-left: 20px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.rule_outcontent_box {
|
||||
.rule_outcontent_box {
|
||||
border: 1px dotted #00000022;
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
padding: 10px 0 10px 10px;
|
||||
}
|
||||
|
||||
margin-top: 20px;
|
||||
padding:10px 0 10px 10px;
|
||||
}
|
||||
.rule_outcontent_box>p {
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 10px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
|
||||
<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>
|
||||
<el-button type="primary" icon="el-icon-arrow-left" circle @click="mixinClose"></el-button>
|
||||
</div>
|
||||
<div>
|
||||
<span v-if="id===0">新增规则 :</span>
|
||||
<span v-if="id === 0">新增规则 :</span>
|
||||
<span v-else>编辑规则 :</span>
|
||||
</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 type="success" icon="el-icon-check" circle @click="submit" :disabled="addVersionStatus">
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="smallHeader?'MR_input MR_inputSmall':'MR_input'">
|
||||
<div :class="smallHeader ? 'MR_input MR_inputSmall' : 'MR_input'">
|
||||
<div>
|
||||
<p>规则代码: </p>
|
||||
<el-input placeholder="请输入规则代码" maxlength="30" v-model="code" clearable :disabled="addVersionStatus">
|
||||
@@ -58,7 +67,7 @@
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="smallHeader?'MR_scope MR_scopeSmall':'MR_scope'">
|
||||
<div :class="smallHeader ? 'MR_scope MR_scopeSmall' : 'MR_scope'">
|
||||
<div>
|
||||
<p>规则描述: </p>
|
||||
<el-input placeholder="请输入规则描述" maxlength="300" v-model="description" clearable
|
||||
@@ -70,70 +79,117 @@
|
||||
:addVersionStatus="addVersionStatus" :addVersionDialog="addVersionDialog"
|
||||
:addVersionLoading="addVersionLoading" @addVersion="addVersion" @addVersionClose="addVersionClose"
|
||||
@copyVersion="copyVersion" @delectVersion="delectVersion" @updateVersion="updateVersion"
|
||||
@addVersionSure="addVersionSure" @Dialog="addVersionDialog=$event" @addVersionExamine="addVersionExamine"
|
||||
@versionChange="versionChange" @StatusChange="addVersionStatus=$event" :exportVersion="true" @exportVersion="exportVersion" @importNewVersion="importNewVersion">
|
||||
@addVersionSure="addVersionSure" @Dialog="addVersionDialog = $event" @addVersionExamine="addVersionExamine"
|
||||
@versionChange="versionChange" @StatusChange="addVersionStatus = $event" :exportVersion="true"
|
||||
@exportVersion="exportVersion" @importNewVersion="importNewVersion">
|
||||
</version>
|
||||
|
||||
|
||||
<div class="rule_com">
|
||||
<rule :data="ruledata" :ZIndex="1"></rule>
|
||||
<el-button icon="el-icon-plus" type="success" size="mini" circle @click="addRuleBlock()"></el-button>
|
||||
<template v-for="(item, index) in ruleBlockVoList ">
|
||||
|
||||
<div style="border: 1px solid #9cb1c7 ;padding: 10px;margin: 10px;position: relative;">
|
||||
<div style="position: absolute;top:10px;right: 10px;z-index: 2;">
|
||||
<el-button icon="el-icon-top" :disabled="!index" type="info" size="mini" circle
|
||||
@click="goTop(index)"></el-button>
|
||||
<el-button icon="el-icon-bottom" type="info" :disabled="index == ruleBlockVoList.length - 1"
|
||||
size="mini" circle @click="goBootom(index)">
|
||||
</el-button>
|
||||
<el-button icon="el-icon-close" type="danger" :disabled="!index" size="mini" circle
|
||||
@click="deleteRuleBlock(index)"></el-button>
|
||||
</div>
|
||||
<rule :data="item.ruleConditionVo" :ZIndex="1"></rule>
|
||||
|
||||
<div class="rule_outcontent_box">
|
||||
<p>命中输出:</p>
|
||||
<div class="rule_home" style="margin-top: 10px;">
|
||||
<div class="rule_fa">
|
||||
<el-button icon="el-icon-plus" circle @click="outAdd(0)" disabled></el-button>
|
||||
<el-button icon="el-icon-close" circle disabled='disabled' style="margin-right: 10px">
|
||||
<el-button icon="el-icon-plus" size="mini" circle @click="outAdd(0)" disabled>
|
||||
</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" circle disabled='disabled'
|
||||
style="margin-right: 10px">
|
||||
</el-button>
|
||||
</div>
|
||||
<el-select v-model="resultFieldEn" filterable placeholder="请选择" style="width: 200px;" clearable>
|
||||
<el-option v-for="item in FieldUser" :key="item.id" :label="item.fieldCn" :value="item.fieldEn">
|
||||
<el-select v-model="item.resultFieldEn" size="mini" filterable placeholder="请选择"
|
||||
style="width: 200px;" clearable>
|
||||
<el-option v-for="item in FieldUser" :key="item.id" :label="item.fieldCn"
|
||||
:value="item.fieldEn">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<p style="margin: 10px;">
|
||||
=
|
||||
</p>
|
||||
<el-select filterable value="是否命中" disabled style="width: 255px;">
|
||||
<el-select filterable value="是否命中" size="mini" disabled style="width: 255px;">
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<outcontent :outcontent="outcontent" :ruleOut="true" type="complex_rule" :outType="outTypeSuccess">
|
||||
<outcontent :outcontent="item.strategyOutputList" size='mini' :ruleOut="true"
|
||||
type="complex_rule" :outType="outTypeSuccess">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<el-select v-model="scoreFieldEn" filterable placeholder="请选择" style="width: 200px;" clearable>
|
||||
<el-select v-model="item.scoreFieldEn" size="mini" filterable placeholder="请选择"
|
||||
style="width: 200px;" clearable>
|
||||
<el-option v-for="item in FieldUser" :key="item.id" :label="item.fieldCn"
|
||||
:value="item.fieldEn">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<p style="margin: 10px;">=</p>
|
||||
<div>
|
||||
<el-input v-model="SpecialField.score" maxlength="30" style="width: 255px;">
|
||||
<el-input v-model="item.score" size="mini" maxlength="30" style="width: 255px;">
|
||||
<template slot="prepend">得分</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</outcontent>
|
||||
</div>
|
||||
<br>
|
||||
<div class="rule_outcontent_box">
|
||||
<p>未命中输出:</p>
|
||||
<outcontent :outcontent="failOutputList" :unone="true" :ruleOut="true" type="complex_rule"
|
||||
:outType="outTypeFail">
|
||||
<p style="font-size: 12px;">未命中输出:</p>
|
||||
<outcontent :outcontent="item.failOutputList" size='mini' :unone="true" :ruleOut="true"
|
||||
type="complex_rule" :outType="outTypeFail">
|
||||
|
||||
</outcontent>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mangeRedactMixin from '@/utils/contminxin/MangeRedactMixin.js'
|
||||
import '@/assets/css/ManageRedact.css'
|
||||
import version from '@/components/common/Version.vue'
|
||||
import outcontent from '@/components/models/outcontent.vue'
|
||||
import rule from '@/components/models/RuleCont.vue'
|
||||
export default {
|
||||
import mangeRedactMixin from '@/utils/contminxin/MangeRedactMixin.js'
|
||||
import '@/assets/css/ManageRedact.css'
|
||||
import version from '@/components/common/Version.vue'
|
||||
import outcontent from '@/components/models/outcontent.vue'
|
||||
import rule from '@/components/models/RuleCont.vue'
|
||||
|
||||
class ruledata {
|
||||
constructor() {
|
||||
this.logical = "&&"
|
||||
this.fieldId = null
|
||||
this.operator = null
|
||||
this.fieldValue = null
|
||||
this.conditionType = 1
|
||||
this.children = []
|
||||
this.loopGroupActions = []
|
||||
}
|
||||
}
|
||||
class ruleBlock {
|
||||
constructor() {
|
||||
this.score = '1'
|
||||
this.failOutputList = []
|
||||
this.strategyOutputList = []
|
||||
this.resultFieldEn = ''
|
||||
this.ruleConditionVo = new ruledata()
|
||||
this.scoreFieldEn = ''
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
mixins: [mangeRedactMixin],
|
||||
components: {
|
||||
rule,
|
||||
@@ -159,7 +215,7 @@
|
||||
},
|
||||
getData: {
|
||||
type: Object,
|
||||
default () {
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
@@ -176,22 +232,21 @@
|
||||
version: {},
|
||||
addVersionStatus: false,
|
||||
ruleVersionList: [],
|
||||
scoreFieldEn: '',
|
||||
resultFieldEn: '',
|
||||
// scoreFieldEn: '',
|
||||
// resultFieldEn: '',
|
||||
loading: false,
|
||||
valueScope: '',
|
||||
priority: 0,
|
||||
code: '',
|
||||
name: '',
|
||||
description: '',
|
||||
ruledata: null,
|
||||
outcontent: [],
|
||||
failOutputList: [],
|
||||
SpecialField: {
|
||||
score: '1',
|
||||
ruleAudit: 5
|
||||
},
|
||||
tempisEmpty: false,
|
||||
// ruledata: null,
|
||||
// outcontent: [],
|
||||
// failOutputList: [],
|
||||
// SpecialField: {
|
||||
// score: '1',
|
||||
// },
|
||||
// tempisEmpty: false,
|
||||
parentId: '',
|
||||
outTypeSuccess: {
|
||||
outType: 'success'
|
||||
@@ -199,6 +254,7 @@
|
||||
outTypeFail: {
|
||||
outType: 'fail'
|
||||
},
|
||||
ruleBlockVoList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -217,23 +273,15 @@
|
||||
this.getRuleCont()
|
||||
})
|
||||
} else {
|
||||
this.ruledata = {
|
||||
"logical": "&&",
|
||||
"fieldId": null,
|
||||
"operator": null,
|
||||
"fieldValue": null,
|
||||
"conditionType": 1,
|
||||
"children": [],
|
||||
loopGroupActions: []
|
||||
}
|
||||
this.ruleBlockVoList = [new ruleBlock()]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
FieldUser() {
|
||||
if(this.$store.state.FieldUser){
|
||||
if (this.$store.state.FieldUser) {
|
||||
console.log(this.$store.state.FieldUser.data.fieldList)
|
||||
return this.$store.state.FieldUser.data.fieldList
|
||||
}else{
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}
|
||||
@@ -242,13 +290,32 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
importNewVersion(e){
|
||||
goTop(index) {
|
||||
let obj = this.ruleBlockVoList[index]
|
||||
this.ruleBlockVoList.splice(index, 1)
|
||||
this.ruleBlockVoList.splice(index - 1, 0, obj)
|
||||
},
|
||||
goBootom(index) {
|
||||
let obj = this.ruleBlockVoList[index]
|
||||
this.ruleBlockVoList.splice(index, 1)
|
||||
this.ruleBlockVoList.splice(index + 1, 0, obj)
|
||||
},
|
||||
deleteRuleBlock(index) {
|
||||
this.ruleBlockVoList.splice(index, 1)
|
||||
},
|
||||
addRuleBlock() {
|
||||
this.ruleBlockVoList.push(new ruleBlock())
|
||||
},
|
||||
importNewVersion(e) {
|
||||
this.addVersionLoading = true
|
||||
console.log(e)
|
||||
this.tempisEmpty = false
|
||||
this.deepverify(e.data.ruleConditionVo)
|
||||
if (this.tempisEmpty) {
|
||||
this.addVersionLoading = false
|
||||
let tempisEmpty = {
|
||||
is: false,
|
||||
msg: ''
|
||||
}
|
||||
this.ruleBlockVoListVerify(tempisEmpty, e.data.ruleBlockVoList)
|
||||
if (tempisEmpty.is) {
|
||||
this.$message.error(tempisEmpty.msg)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -257,13 +324,7 @@
|
||||
versionCode: e.name.versionCode,
|
||||
description: e.name.description,
|
||||
ruleId: this.id,
|
||||
score: e.data.score,
|
||||
// ruleAudit: this.SpecialField.ruleAudit,
|
||||
scoreFieldEn: e.data.scoreFieldEn,
|
||||
resultFieldEn: e.data.resultFieldEn,
|
||||
ruleConditionVo: e.data.ruleConditionVo,
|
||||
strategyOutputList: e.data.strategyOutputList,
|
||||
failOutputList: e.data.failOutputList
|
||||
ruleBlockVoList: e.data.ruleBlockVoList,
|
||||
}
|
||||
this.getData.addVersion(obj).then(res => {
|
||||
if (res.status == '1') {
|
||||
@@ -280,28 +341,17 @@
|
||||
}
|
||||
this.addVersionLoading = false
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
async exportVersion(){
|
||||
async exportVersion() {
|
||||
const res = await this.getData.getInfo({
|
||||
id: this.version.id
|
||||
})
|
||||
|
||||
if(res.status!='1'){
|
||||
if (res.status != '1') {
|
||||
return
|
||||
}
|
||||
|
||||
this.mixinSaveJSON(res.data,`${this.name}_${res.data.description}.json`)
|
||||
this.mixinSaveJSON(res.data, `${this.name}_${res.data.description}.json`)
|
||||
|
||||
},
|
||||
addVersionExamine() {
|
||||
@@ -312,19 +362,15 @@
|
||||
},
|
||||
addVersionSure(tempVersion) {
|
||||
this.addVersionLoading = true
|
||||
let tempRuleData = JSON.parse(JSON.stringify(this.ruledata))
|
||||
this.deepTypetransition(tempRuleData)
|
||||
|
||||
// this.deepTypetransition(tempRuleData)
|
||||
let obj = {
|
||||
versionCode: tempVersion.versionCode,
|
||||
description: tempVersion.description,
|
||||
ruleId: this.id,
|
||||
score: this.SpecialField.score,
|
||||
ruleAudit: this.SpecialField.ruleAudit,
|
||||
scoreFieldEn: this.scoreFieldEn,
|
||||
resultFieldEn: this.resultFieldEn,
|
||||
ruleConditionVo: tempRuleData,
|
||||
strategyOutputList: this.outcontent,
|
||||
failOutputList: this.failOutputList
|
||||
|
||||
ruleBlockVoList: this.ruleBlockVoList,
|
||||
|
||||
}
|
||||
this.getData.addVersion(obj).then(res => {
|
||||
if (res.status == '1') {
|
||||
@@ -345,21 +391,15 @@
|
||||
},
|
||||
updateVersion(tempVersion) {
|
||||
this.addVersionLoading = true
|
||||
let tempRuleData = JSON.parse(JSON.stringify(this.ruledata))
|
||||
this.deepTypetransition(tempRuleData)
|
||||
|
||||
// this.deepTypetransition(tempRuleData)
|
||||
let obj = {
|
||||
ruleId: this.id,
|
||||
id: this.version.id,
|
||||
versionCode: tempVersion.versionCode,
|
||||
description: tempVersion.description,
|
||||
ruleId: this.id,
|
||||
score: this.SpecialField.score,
|
||||
ruleAudit: this.SpecialField.ruleAudit,
|
||||
scoreFieldEn: this.scoreFieldEn,
|
||||
resultFieldEn: this.resultFieldEn,
|
||||
ruleConditionVo: tempRuleData,
|
||||
strategyOutputList: this.outcontent,
|
||||
failOutputList: this.failOutputList
|
||||
|
||||
ruleBlockVoList: this.ruleBlockVoList,
|
||||
|
||||
}
|
||||
this.getData.updateVersion(obj).then(res => {
|
||||
@@ -408,28 +448,28 @@
|
||||
id: this.version.id
|
||||
}).then(res => {
|
||||
if (res.status == "1") {
|
||||
this.scoreFieldEn = res.data.scoreFieldEn
|
||||
this.resultFieldEn = res.data.resultFieldEn
|
||||
// this.scoreFieldEn = res.data.scoreFieldEn
|
||||
// this.resultFieldEn = res.data.resultFieldEn
|
||||
this.getType(res.data.ruleConditionVo)
|
||||
this.ruledata = res.data.ruleConditionVo ? res.data.ruleConditionVo : {
|
||||
"logical": "&&",
|
||||
"fieldId": null,
|
||||
"operator": null,
|
||||
"fieldValue": null,
|
||||
"conditionType": 1,
|
||||
"children": [],
|
||||
}
|
||||
this.outcontent = res.data.strategyOutputList
|
||||
this.failOutputList = res.data.failOutputList
|
||||
this.outcontent.forEach(value => {
|
||||
if (!value.variableType) {
|
||||
value.variableType = 1
|
||||
}
|
||||
})
|
||||
this.redeepverify(this.ruledata)
|
||||
this.ruleBlockVoList = res.data.ruleBlockVoList
|
||||
// this.ruledata = res.data.ruleConditionVo ? res.data.ruleConditionVo : {
|
||||
// "logical": "&&",
|
||||
// "fieldId": null,
|
||||
// "operator": null,
|
||||
// "fieldValue": null,
|
||||
// "conditionType": 1,
|
||||
// "children": [],
|
||||
// }
|
||||
// this.outcontent = res.data.strategyOutputList
|
||||
// this.failOutputList = res.data.failOutputList
|
||||
// this.outcontent.forEach(value => {
|
||||
// if (!value.variableType) {
|
||||
// value.variableType = 1
|
||||
// }
|
||||
// })
|
||||
// // this.redeepverify(this.ruledata)
|
||||
|
||||
this.SpecialField.score = res.data.score
|
||||
this.SpecialField.ruleAudit = res.data.ruleAudit
|
||||
// this.SpecialField.score = res.data.score
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
@@ -445,12 +485,7 @@
|
||||
addVersion() {
|
||||
this.addVersionStatus = true
|
||||
this.tempadd = {
|
||||
scoreFieldEn: this.scoreFieldEn,
|
||||
resultFieldEn: this.resultFieldEn,
|
||||
ruledata: this.ruledata,
|
||||
outcontent: this.outcontent,
|
||||
failOutputList: this.failOutputList,
|
||||
score: this.SpecialField.score,
|
||||
ruleBlockVoList : this.ruleBlockVoList
|
||||
}
|
||||
this.reset()
|
||||
},
|
||||
@@ -466,7 +501,7 @@
|
||||
this.$message.error('代码不允许出现中文');
|
||||
return true
|
||||
}
|
||||
if(this.verificationCode(this.code)||this.verificationName(this.name)){
|
||||
if (this.verificationCode(this.code) || this.verificationName(this.name)) {
|
||||
return true
|
||||
}
|
||||
if (this.code.trim() === '') {
|
||||
@@ -493,67 +528,44 @@
|
||||
// this.$message.error('请选择得分时输出变量');
|
||||
// return true
|
||||
// }
|
||||
if (isNaN(Number(this.SpecialField.score)) || String(this.SpecialField.score).trim() === "") {
|
||||
this.$message.error('得分只能是数字');
|
||||
return true
|
||||
}
|
||||
let is = true
|
||||
this.tempisEmpty = false
|
||||
this.deepverify(this.ruledata)
|
||||
if (this.tempisEmpty) {
|
||||
return true
|
||||
}
|
||||
this.outcontent.forEach(value => {
|
||||
if (value.fieldId === "" || String(value.fieldValue).trim() === "" || value.variableType ===
|
||||
"") {
|
||||
is = false
|
||||
}
|
||||
if (value.variableType == 3 && (String(value.fieldValue).trim() === "" || JSON.parse(value
|
||||
.fieldValue).formula.trim() ===
|
||||
'')) {
|
||||
is = false
|
||||
}
|
||||
})
|
||||
this.failOutputList.forEach(value => {
|
||||
if (value.fieldId === "" || String(value.fieldValue).trim() === "" || value.variableType ===
|
||||
"") {
|
||||
is = false
|
||||
}
|
||||
if (value.variableType == 3 && (String(value.fieldValue).trim() === "" || JSON.parse(value
|
||||
.fieldValue).formula.trim() ===
|
||||
'')) {
|
||||
is = false
|
||||
}
|
||||
})
|
||||
if (is === false) {
|
||||
this.$message.error('请检查自定义输出部分是否有未填项');
|
||||
|
||||
let tempisEmpty = {
|
||||
is: false,
|
||||
msg: ''
|
||||
}
|
||||
this.ruleBlockVoListVerify(tempisEmpty, this.ruleBlockVoList)
|
||||
if (tempisEmpty.is) {
|
||||
this.$message.error(tempisEmpty.msg)
|
||||
return true
|
||||
}
|
||||
|
||||
},
|
||||
addVersionClose() {
|
||||
this.addVersionStatus = false
|
||||
this.SpecialField.score = this.tempadd.score
|
||||
this.scoreFieldEn = this.tempadd.scoreFieldEn
|
||||
this.resultFieldEn = this.tempadd.resultFieldEn
|
||||
this.ruledata = this.tempadd.ruledata
|
||||
this.outcontent = this.tempadd.outcontent
|
||||
this.failOutputList = this.tempadd.failOutputList
|
||||
// this.SpecialField.score = this.tempadd.score
|
||||
// this.scoreFieldEn = this.tempadd.scoreFieldEn
|
||||
// this.resultFieldEn = this.tempadd.resultFieldEn
|
||||
// this.ruledata = this.tempadd.ruledata
|
||||
// this.outcontent = this.tempadd.outcontent
|
||||
// this.failOutputList = this.tempadd.failOutputList
|
||||
this.ruleBlockVoList = this.tempadd.ruleBlockVoList
|
||||
},
|
||||
reset() {
|
||||
this.ruledata = {
|
||||
"logical": "&&",
|
||||
"fieldId": null,
|
||||
"operator": null,
|
||||
"fieldValue": null,
|
||||
"conditionType": 1,
|
||||
"children": [],
|
||||
loopGroupActions: []
|
||||
}
|
||||
this.SpecialField.score = 1
|
||||
this.outcontent = []
|
||||
this.failOutputList = []
|
||||
this.scoreFieldEn = ""
|
||||
this.resultFieldEn = ""
|
||||
// this.ruledata = {
|
||||
// "logical": "&&",
|
||||
// "fieldId": null,
|
||||
// "operator": null,
|
||||
// "fieldValue": null,
|
||||
// "conditionType": 1,
|
||||
// "children": [],
|
||||
// loopGroupActions: []
|
||||
// }
|
||||
// this.SpecialField.score = 1
|
||||
// this.outcontent = []
|
||||
// this.failOutputList = []
|
||||
// this.scoreFieldEn = ""
|
||||
// this.resultFieldEn = ""
|
||||
this.ruleBlockVoList = [new ruleBlock()]
|
||||
},
|
||||
delectVersion() {
|
||||
this.getData.delectVersion({
|
||||
@@ -574,14 +586,14 @@
|
||||
|
||||
},
|
||||
getType(obj) {
|
||||
if (obj.conditionType == 2 && !obj.valueType) {
|
||||
obj.valueType = this.mixinGetvalueType(obj.fieldId)
|
||||
}
|
||||
if (obj.children.length > 0) {
|
||||
obj.children.forEach(value => {
|
||||
this.getType(value)
|
||||
})
|
||||
}
|
||||
// if (obj.conditionType == 2 && !obj.valueType) {
|
||||
// obj.valueType = this.mixinGetvalueType(obj.fieldId)
|
||||
// }
|
||||
// if (obj.children.length > 0) {
|
||||
// obj.children.forEach(value => {
|
||||
// this.getType(value)
|
||||
// })
|
||||
// }
|
||||
},
|
||||
outAdd(index) {
|
||||
this.outcontent.splice(index, 0, {
|
||||
@@ -592,36 +604,39 @@
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
|
||||
|
||||
this.loading = true
|
||||
if (this.verification()) {
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
let tempRuleData = JSON.parse(JSON.stringify(this.ruledata))
|
||||
this.deepTypetransition(tempRuleData)
|
||||
// let tempRuleData = JSON.parse(JSON.stringify(this.ruledata))
|
||||
// this.deepTypetransition(tempRuleData)
|
||||
|
||||
|
||||
|
||||
this.outcontent.forEach(value => {
|
||||
value.fieldEn = this.mixinGetvalueEn(value.fieldId)
|
||||
})
|
||||
this.failOutputList.forEach(value => {
|
||||
value.fieldEn = this.mixinGetvalueEn(value.fieldId)
|
||||
})
|
||||
// this.outcontent.forEach(value => {
|
||||
// value.fieldEn = this.mixinGetvalueEn(value.fieldId)
|
||||
// })
|
||||
// this.failOutputList.forEach(value => {
|
||||
// value.fieldEn = this.mixinGetvalueEn(value.fieldId)
|
||||
// })
|
||||
|
||||
let obj = {
|
||||
"code": this.code.trim(),
|
||||
"name": this.name.trim(),
|
||||
"priority": this.priority,
|
||||
"description": String(this.description).trim(),
|
||||
difficulty: 2,
|
||||
ruleAudit: this.SpecialField.ruleAudit,
|
||||
ruleVersionList: [{
|
||||
score: this.SpecialField.score,
|
||||
scoreFieldEn: this.scoreFieldEn,
|
||||
resultFieldEn: this.resultFieldEn,
|
||||
ruleConditionVo: tempRuleData,
|
||||
strategyOutputList: this.outcontent,
|
||||
failOutputList: this.failOutputList
|
||||
// score: this.SpecialField.score,
|
||||
// scoreFieldEn: this.scoreFieldEn,
|
||||
// resultFieldEn: this.resultFieldEn,
|
||||
// ruleConditionVo: tempRuleData,
|
||||
// strategyOutputList: this.outcontent,
|
||||
// failOutputList: this.failOutputList
|
||||
ruleBlockVoList: this.ruleBlockVoList
|
||||
}],
|
||||
}
|
||||
|
||||
@@ -642,7 +657,7 @@
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
this.$message.error('网络出现问题-_-');
|
||||
|
||||
})
|
||||
} else {
|
||||
obj.id = this.id
|
||||
@@ -660,7 +675,7 @@
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
this.$message.error('网络出现问题-_-');
|
||||
|
||||
})
|
||||
}
|
||||
console.log(obj)
|
||||
@@ -669,46 +684,85 @@
|
||||
this.ruledata[index].operator = ""
|
||||
this.ruledata[index].fieldValue = ""
|
||||
},
|
||||
redeepverify(obj) {
|
||||
if (obj.fieldEn) {
|
||||
if ((obj.fieldEn.indexOf('.') != -1 && obj.fieldEn[0] == '%') || obj.conditionType == 3||obj.conditionType===2) {
|
||||
obj.fieldEn = obj.fieldEn.split('.')
|
||||
}
|
||||
}
|
||||
if (obj.children.length > 0) {
|
||||
obj.children.forEach(value => {
|
||||
this.redeepverify(value)
|
||||
})
|
||||
}
|
||||
if (obj.loopGroupActions.length > 0) {
|
||||
obj.loopGroupActions.forEach(value => {
|
||||
if (value.actionValue.indexOf('.') != -1) {
|
||||
value.actionValue = value.actionValue.split('.')
|
||||
}
|
||||
})
|
||||
|
||||
ruleBlockVoListVerify(tempisEmpty, ruleBlockVoList) {
|
||||
ruleBlockVoList.forEach(obj => {
|
||||
if (!tempisEmpty.is) {
|
||||
this.deepverify(tempisEmpty, obj.ruleConditionVo)
|
||||
|
||||
let is = false
|
||||
obj.strategyOutputList.forEach(value => {
|
||||
if (value.fieldId === "" || String(value.fieldValue).trim() === "" || value.variableType ===
|
||||
"") {
|
||||
is = true
|
||||
this.verifyFlicker(value)
|
||||
}
|
||||
},
|
||||
deepverify(obj) {
|
||||
if (this.tempisEmpty) {
|
||||
if (value.variableType == 3 && (String(value.fieldValue).trim() === "" || JSON.parse(value
|
||||
.fieldValue).formula.trim() ===
|
||||
'')) {
|
||||
is = true
|
||||
this.verifyFlicker(value)
|
||||
}
|
||||
})
|
||||
obj.failOutputList.forEach(value => {
|
||||
if (value.fieldId === "" || String(value.fieldValue).trim() === "" || value.variableType ===
|
||||
"") {
|
||||
is = true
|
||||
this.verifyFlicker(value)
|
||||
}
|
||||
if (value.variableType == 3 && (String(value.fieldValue).trim() === "" || JSON.parse(value
|
||||
.fieldValue).formula.trim() ===
|
||||
'')) {
|
||||
is = true
|
||||
this.verifyFlicker(value)
|
||||
}
|
||||
})
|
||||
if (is === true) {
|
||||
tempisEmpty.msg = '请检查自定义输出部分是否有未填项'
|
||||
tempisEmpty.is = true
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
if (isNaN(Number(obj.score)) || String(obj.score).trim() === "") {
|
||||
tempisEmpty.msg = '得分只能是数字'
|
||||
tempisEmpty.is = true
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
deepverify(tempisEmpty, obj) {
|
||||
if (tempisEmpty.is) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (obj.conditionType == 0) {
|
||||
if (obj.fieldId && obj.fieldValue && obj.operator) {} else {
|
||||
this.tempisEmpty = true
|
||||
if (obj.fieldId && obj.fieldValue && obj.operator) { } else {
|
||||
tempisEmpty.is = true
|
||||
return
|
||||
}
|
||||
}
|
||||
if (obj.children.length === 0 && obj.conditionType != 2) {
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('非规则节点后不允许为空');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = '非规则节点后不允许为空'
|
||||
this.verifyFlicker(obj)
|
||||
return
|
||||
}
|
||||
|
||||
if (obj.conditionType == 5) { //如果是条件组
|
||||
if (obj.children.length === 0 && obj.conditionType != 5) {
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('条件组后不允许为空');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = '条件组后不允许为空'
|
||||
return
|
||||
}
|
||||
obj.condGroupResultCondition.children[0].fieldValue = obj.condGroupResultCondition.children[0]
|
||||
@@ -724,100 +778,130 @@
|
||||
if (obj.condGroupResultCondition.children[0].fieldValue !== 0 && obj.condGroupResultCondition
|
||||
.children[1].fieldValue !==
|
||||
0) {
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('条件组命中条件只能为数字且不为空与空格');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = '条件组命中条件只能为数字且不为空与空格'
|
||||
this.verifyFlicker(obj,'red1')
|
||||
return
|
||||
}
|
||||
}
|
||||
if (obj.condGroupResultCondition.children[0].fieldValue < 0) {
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('条件组命中左边不能小于0');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = '条件组命中左边不能小于0'
|
||||
this.verifyFlicker(obj,'red1')
|
||||
return
|
||||
}
|
||||
if (obj.condGroupResultCondition.children[1].fieldValue > obj.children.length) {
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('条件组命中右边不能大于条件总个数');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = '条件组命中右边不能大于条件总个数'
|
||||
this.verifyFlicker(obj,'red1')
|
||||
return
|
||||
}
|
||||
if (Number(obj.condGroupResultCondition.children[0].fieldValue) > Number(obj.condGroupResultCondition
|
||||
.children[1].fieldValue)) {
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('条件组命中左边不能大于右边');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = '条件组命中左边不能大于右边'
|
||||
this.verifyFlicker(obj,'red1')
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
if (obj.conditionType == 3 && !obj.fieldEn) { //如果是for节点 且没有选择 被遍历的指标
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('for后需要确定循环的数组');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = 'for后需要确定循环的数组'
|
||||
this.verifyFlicker(obj,'red1')
|
||||
return
|
||||
}
|
||||
if (obj.conditionType == 2) {
|
||||
obj.fieldValue = obj.fieldValue.trim()
|
||||
if (!obj.fieldEn || !obj.operator || !obj.fieldValue) {
|
||||
if (obj.fieldValue !== 0) {
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('规则节点不允许有空值');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = '规则节点不允许有空值'
|
||||
this.verifyFlicker(obj)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if (obj.conditionType == 3 && obj.loopResultCondition.children.length === 0) { //如果是for节点 且没有子节点
|
||||
this.tempisEmpty = true
|
||||
this.$message.error('for的输出节点后不允许为空');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = 'for的输出节点后不允许为空'
|
||||
this.verifyFlicker(obj,'red2')
|
||||
return
|
||||
}
|
||||
if (obj.conditionType == 3 && obj.loopResultCondition.children.length != 0) { //如果是for节点 且 有输出节点
|
||||
obj.loopResultCondition.children.forEach(value => {
|
||||
this.deepverify(value)
|
||||
this.deepverify(tempisEmpty, value)
|
||||
})
|
||||
}
|
||||
if (obj.children.length > 0) { //如果有子节点
|
||||
obj.children.forEach(value => {
|
||||
this.deepverify(value)
|
||||
this.deepverify(tempisEmpty, value)
|
||||
})
|
||||
}
|
||||
if (obj.loopGroupActions.length > 0) { //如果有输出节点
|
||||
console.log(obj)
|
||||
|
||||
let is = false
|
||||
obj.loopGroupActions.forEach(value => {
|
||||
if (!value.actionKey || !value.actionType || !value.actionValue) {
|
||||
if (value.actionValue === 0 && value.actionType != 1) {
|
||||
this.tempisEmpty = true
|
||||
if (!value.actionKey || !value.actionType ) {
|
||||
this.verifyFlicker(value)
|
||||
is = true
|
||||
|
||||
}else{
|
||||
|
||||
if (!value.actionValue &&( value.actionType != 1&&value.actionType != 5)) {
|
||||
console.log(value)
|
||||
this.verifyFlicker(value)
|
||||
is = true
|
||||
}
|
||||
}
|
||||
})
|
||||
if (is) {
|
||||
this.$message.error('输出变量不允许有空值');
|
||||
tempisEmpty.is = true
|
||||
tempisEmpty.msg = '输出变量不允许有空值'
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
deepTypetransition(obj) {
|
||||
if (Array.isArray(obj.fieldEn)) {
|
||||
obj.fieldEn = obj.fieldEn.join('.')
|
||||
async verifyFlicker(obj,str = 'red') {
|
||||
this.$set(obj, str, true)
|
||||
|
||||
let MaxFlicker = 6
|
||||
flicker(0)
|
||||
function flicker(num) {
|
||||
setTimeout(() => {
|
||||
obj[str] = !obj[str]
|
||||
if (num < MaxFlicker) {
|
||||
flicker(num + 1)
|
||||
}
|
||||
if (obj.children.length > 0) {
|
||||
obj.children.forEach(value => {
|
||||
this.deepTypetransition(value)
|
||||
})
|
||||
|
||||
}, 300)
|
||||
}
|
||||
if (obj.loopGroupActions.length > 0) {
|
||||
obj.loopGroupActions.forEach(value => {
|
||||
if (Array.isArray(value.actionValue)) {
|
||||
value.actionValue = value.actionValue.join('.')
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
// deepTypetransition(obj) {
|
||||
// if (Array.isArray(obj.fieldEn)) {
|
||||
// obj.fieldEn = obj.fieldEn.join('.')
|
||||
// }
|
||||
// if (obj.children.length > 0) {
|
||||
// obj.children.forEach(value => {
|
||||
// this.deepTypetransition(value)
|
||||
// })
|
||||
// }
|
||||
// if (obj.loopGroupActions.length > 0) {
|
||||
// obj.loopGroupActions.forEach(value => {
|
||||
// if (Array.isArray(value.actionValue)) {
|
||||
// value.actionValue = value.actionValue.join('.')
|
||||
// }
|
||||
// })
|
||||
|
||||
// }
|
||||
// }
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -3,17 +3,19 @@
|
||||
<div style="display: flex;align-items: center;">
|
||||
<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')">
|
||||
<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].indexOf(valueType)==-1"></el-option>
|
||||
<el-option label="等于" value="==" v-show="[5].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].indexOf(valueType)==-1"></el-option>
|
||||
<el-option label="不等于" value="!=" v-show="[5].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,7].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,7].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,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="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="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="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-input :value="value2" @input="$emit('update:value2',$event)" maxlength="30" :size="size"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
margin: 12px 0px 0 0;
|
||||
height: 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.RuleIcon {
|
||||
@@ -42,6 +43,7 @@
|
||||
|
||||
<template>
|
||||
<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">
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
@@ -91,35 +93,42 @@
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
:style="{border: '1px dashed '+ color[ZIndex%5],borderRadius: '5px',paddingRight: '5px',paddingBottom: '5px',position:'relative',minWidth:'30px',minHeight:'40px'}">
|
||||
<div v-if="data.conditionType==3" style="display: flex;margin-top: 6px;">
|
||||
<div class="Rule_cont" :style="{marginTop:'12px'}"></div>
|
||||
: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':''}">
|
||||
<!-- {{data}} -->
|
||||
<div v-if="data.conditionType==3" style="display: flex;margin-top: 6px;" :style="{backgroundColor:data.red1?'#f56c6c':''}">
|
||||
|
||||
<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>
|
||||
<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)"
|
||||
:props="{ expandTrigger: 'hover' }" @change="EnChange"></el-cascader> -->
|
||||
|
||||
<!-- for 的输入 -->
|
||||
</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?'此处不支持继续遍历请删除此节点':''}}
|
||||
|
||||
<div v-for="(item,index) in data.children" style="display: flex;margin-top: 7px;">
|
||||
<div class="Rule_cont"
|
||||
:style="{marginTop:item.conditionType===0?'12px':(index===0?'11px':'20px')}">
|
||||
</div>
|
||||
|
||||
<!-- conditionType==2 规则部分 -->
|
||||
<div v-if="item.conditionType==2" style="display: flex;">
|
||||
|
||||
<!-- {{fieldType}} -->
|
||||
<div v-if="fieldType!='for'" style="display: flex;">
|
||||
<!-- 普通规则部分 -->
|
||||
|
||||
<!-- 不为输出节点 则拉选 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)">
|
||||
</el-cascader>
|
||||
</el-cascader> -->
|
||||
|
||||
<!-- <bigElCascader v-model="item.fieldEn" filterable size="mini" :options="fieldUserObj"
|
||||
clearable @change="ruleCascaderChange(item)" :Mykey="keyValue"
|
||||
@@ -131,7 +140,8 @@
|
||||
|
||||
<!-- 加入 变量选择 -->
|
||||
</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
|
||||
@change="selectChange(item)">
|
||||
<el-option v-for="cont in suseingfield" :key="cont.id" :label="cont.fieldCn"
|
||||
@@ -156,14 +166,17 @@
|
||||
</el-select> -->
|
||||
|
||||
</div>
|
||||
<div v-else style="display: flex;">
|
||||
<div v-else style="display: flex;" :style="{backgroundColor:item.red?'#f56c6c':''}">
|
||||
<!-- {{sEn}} -->
|
||||
<!-- for规则部分 -->
|
||||
|
||||
<!-- {{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)">
|
||||
</el-cascader>
|
||||
</el-cascader> -->
|
||||
|
||||
<ruleRelation v-model="item.operator" :value2.sync="item.fieldValue"
|
||||
:variableType.sync="item.variableType" :valueType="getvalueTypebyEn(item.fieldEn)"
|
||||
@@ -194,14 +207,14 @@
|
||||
</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输出 -->
|
||||
<rule :suseingfield="useingfield" :out="'out'" :data="data.loopResultCondition" :ZIndex="ZIndex+1"
|
||||
@delectLogical="delectLogical"></rule>
|
||||
</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>
|
||||
[
|
||||
<el-input size="mini" v-model="data.condGroupResultCondition.children[0].fieldValue"
|
||||
@@ -213,8 +226,12 @@
|
||||
|
||||
</div>
|
||||
<div v-if="data.loopGroupActions.length>0" class="RuleCont_for_out">
|
||||
<!-- 打点 - for计算 -->
|
||||
<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-option v-for="cont in fielduser" :key="cont.id" :label="cont.fieldCn" :value="cont.fieldEn"
|
||||
v-if="item.actionType!=6||cont.valueType==6">
|
||||
@@ -230,9 +247,10 @@
|
||||
<el-input size="mini" style="width: 120px;" v-model="item.actionValue"
|
||||
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)"
|
||||
:props="{ expandTrigger: 'hover' }"></el-cascader>
|
||||
:props="{ expandTrigger: 'hover' }"></el-cascader> -->
|
||||
|
||||
<i class="el-icon-circle-plus-outline" style="color: #66B1FF;margin-left: 3px;"
|
||||
@click="addLoopOut(index)"></i>
|
||||
@@ -288,8 +306,8 @@
|
||||
},
|
||||
mounted() {
|
||||
if (this.data) {
|
||||
// console.log(this.data.fieldEn)
|
||||
if (Array.isArray(this.data.fieldEn)) {
|
||||
// console.log(this.data)
|
||||
if (this.data.fieldEn) {
|
||||
if (this.data.fieldEn.length > 0) {
|
||||
this.EnChange(this.data.fieldEn, false)
|
||||
}
|
||||
@@ -369,12 +387,12 @@
|
||||
let obj = {}
|
||||
if (this.fieldType == "for") {
|
||||
obj = this.sdataJson
|
||||
} else if (Array.isArray(this.data.fieldEn)) {
|
||||
// console.log(1, this.data.fieldEn)
|
||||
obj = JSON.parse(this.mixinGetFieldByEn(this.data.fieldEn[0]).jsonValue)
|
||||
} else if (this.data.fieldEn) {
|
||||
console.log(1, this.data.fieldEn)
|
||||
obj = JSON.parse(this.mixinGetFieldByEn(this.data.fieldEn.split('.')[0]).jsonValue)
|
||||
}
|
||||
if (Array.isArray(this.data.fieldEn)) {
|
||||
this.data.fieldEn.forEach((value, index) => {
|
||||
if (this.data.fieldEn) {
|
||||
this.data.fieldEn.split('.').forEach((value, index) => {
|
||||
if (index != 0) {
|
||||
obj = obj[value]
|
||||
}
|
||||
@@ -492,6 +510,7 @@
|
||||
item.operator = ""
|
||||
},
|
||||
getvalueTypebyEn(e) { //通过En 获取 valueType
|
||||
e && (e = e.split('.'))
|
||||
if (!Array.isArray(e)) {
|
||||
return
|
||||
}
|
||||
@@ -527,14 +546,14 @@
|
||||
},
|
||||
EnChange(e, clear = true) {
|
||||
|
||||
this.En = e.join('.')
|
||||
this.En = e
|
||||
if (!clear) return
|
||||
this.deepClearEn(this.data)
|
||||
},
|
||||
deepClearEn(obj) { // 递归清除用到父级的 En
|
||||
obj.children.forEach(value => {
|
||||
if (Array.isArray(value.fieldEn)) {
|
||||
if (value.fieldEn[0][0] == "%") {
|
||||
if (value.fieldEn) {
|
||||
if (value.fieldEn[0] == "%") {
|
||||
value.fieldEn = ""
|
||||
}
|
||||
}
|
||||
@@ -700,7 +719,7 @@
|
||||
this.data.children.push({
|
||||
"logical": 'for',
|
||||
"fieldId": "",
|
||||
"fieldEn":[],
|
||||
"fieldEn":"",
|
||||
"operator": "",
|
||||
"fieldValue": "",
|
||||
"conditionType": 3,
|
||||
|
||||
@@ -75,16 +75,17 @@
|
||||
<div>
|
||||
<div class="rule_home">
|
||||
<div class="rule_fa">
|
||||
<el-button icon="el-icon-plus" circle @click="outAdd(0)"></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-plus" circle @click="outAdd(0)" :size="size"></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>
|
||||
<slot></slot>
|
||||
</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">
|
||||
<el-button icon="el-icon-plus" circle @click="outAdd(index+1)"></el-button>
|
||||
<el-button icon="el-icon-close" circle @click="outDelect(index)" style="margin-right: 10px"></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)" :size="size" style="margin-right: 10px"></el-button>
|
||||
</div>
|
||||
<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'}"
|
||||
@@ -92,11 +93,11 @@
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
@@ -201,6 +202,10 @@
|
||||
default: () => {
|
||||
return null
|
||||
}
|
||||
},
|
||||
size:{
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
@@ -320,6 +325,7 @@
|
||||
if (this.radio == '') {
|
||||
this.$message.error('请选择一个字段,或者选择取消')
|
||||
} else {
|
||||
// console.log(this.tempcur)
|
||||
if (this.tempcur.split('###')[1] === "Data") {
|
||||
this.Data.forEach((value, index) => {
|
||||
if (index === parseInt(this.tempcur.split('###')[0])) {
|
||||
@@ -330,10 +336,11 @@
|
||||
}
|
||||
})
|
||||
} else if (this.tempcur.split('###')[1] === "out") {
|
||||
console.log(this.outcontent)
|
||||
// console.log(this.outcontent)
|
||||
this.outcontent.forEach((value, index) => {
|
||||
if (index === parseInt(this.tempcur.split('###')[0])) {
|
||||
value.fieldId = this.radio
|
||||
value.fieldEn = this.mixinGetvalueEn(value.fieldId)
|
||||
// value.fieldEn = this.mixinGetvalueEn(this.radio)
|
||||
this.$set(value,'fieldEn',this.mixinGetvalueEn(this.radio))
|
||||
value.fieldValue = ''
|
||||
|
||||
@@ -89,7 +89,8 @@
|
||||
style="text-align: center;font-size: 100px;color: #d0d0d0;margin-top: 50px;user-select: none;">
|
||||
请选择引擎信息
|
||||
</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-card shadow="hover" v-if="engineSummary">
|
||||
<div class="tendencyAna_summaryHome">
|
||||
@@ -238,12 +239,12 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<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>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<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-column prop="result" label="调用时间" width="180">
|
||||
</el-table-column>
|
||||
@@ -255,7 +256,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<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"
|
||||
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">
|
||||
@@ -265,7 +266,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<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-column prop="result" label="结果" width="180">
|
||||
</el-table-column>
|
||||
@@ -277,7 +278,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<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"
|
||||
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"
|
||||
@@ -288,7 +289,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<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-column prop="result" label="命中" width="180">
|
||||
</el-table-column>
|
||||
@@ -300,7 +301,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<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"
|
||||
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">
|
||||
@@ -310,7 +311,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<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-column prop="result" label="命中" width="180">
|
||||
</el-table-column>
|
||||
@@ -322,7 +323,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<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;"
|
||||
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">
|
||||
@@ -332,7 +333,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<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-column prop="result" label="命中" width="180">
|
||||
</el-table-column>
|
||||
@@ -344,7 +345,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<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;"
|
||||
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">
|
||||
@@ -354,7 +355,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<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-column prop="result" label="命中" width="180">
|
||||
@@ -366,6 +367,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import store from './store'
|
||||
|
||||
import './styles/index.scss'; // global css
|
||||
import myMixin from '@/utils/mixin.js';
|
||||
|
||||
import myCascader from './components/common/Cascader'
|
||||
// import 'codemirror/lib/codemirror.css'
|
||||
// import VueCodemirror from 'vue-codemirror'
|
||||
|
||||
@@ -36,6 +36,9 @@ const i18n = new VueI18n({
|
||||
});
|
||||
|
||||
|
||||
Vue.component("myCascader",myCascader)
|
||||
|
||||
|
||||
Date.prototype.format = function(fmt) {
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, //月份
|
||||
|
||||
@@ -212,7 +212,7 @@ export default new Vuex.Store({
|
||||
value: value.fieldEn,
|
||||
valueType: value.valueType,
|
||||
jsonValue: value.jsonValue,
|
||||
children: GetdeepObj(JSON.parse(value.jsonValue))
|
||||
children: GetdeepObj(JSON.parse(value.jsonValue),true,true,true)
|
||||
}
|
||||
} else {
|
||||
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)) {
|
||||
let arr = []
|
||||
for (let key in obj) {
|
||||
@@ -20,7 +20,15 @@ export const GetdeepObj = (obj, length = true ,first=false) => {
|
||||
obj2.children.push({
|
||||
value: '[]',
|
||||
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)
|
||||
@@ -28,7 +36,7 @@ export const GetdeepObj = (obj, length = true ,first=false) => {
|
||||
arr.push({
|
||||
value: key,
|
||||
label: key,
|
||||
children: GetdeepObj(obj[key], length,first)
|
||||
children: GetdeepObj(obj[key], length,first,my)
|
||||
})
|
||||
} else {
|
||||
arr.push({
|
||||
@@ -54,7 +62,14 @@ export const GetdeepObj = (obj, length = true ,first=false) => {
|
||||
obj.push({
|
||||
value: '[0]',
|
||||
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){
|
||||
if(!e||e.length==0) return
|
||||
if(typeof e == 'string') e = e.split('.')
|
||||
if(!Array.isArray(e)) e=e.split('.')
|
||||
let obj =this.FieldUserObj
|
||||
e.forEach((value,index)=>{
|
||||
|
||||
Reference in New Issue
Block a user