-
命中输出:
-
-
-
-
+
+
+
+
+
-
-
-
-
-
- =
-
-
-
-
+
-
-
-
-
-
-
-
=
+
+
命中输出:
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
=
+
+
+ 得分
+
+
+
+
+
+
-
-
-
-
-
+
+
diff --git a/h5-enginex-manager/src/components/common/ruleRelation.vue b/h5-enginex-manager/src/components/common/ruleRelation.vue
index 4d0dd5e..8d12343 100644
--- a/h5-enginex-manager/src/components/common/ruleRelation.vue
+++ b/h5-enginex-manager/src/components/common/ruleRelation.vue
@@ -3,17 +3,19 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -91,35 +93,42 @@
-
+ :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':''}">
+
+
+ :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?'此处不支持继续遍历请删除此节点':''}}
+
+
+
-
+
-
+
-
+
-
+
+ 打点1
-->
-
+
-
+
+
-
-
+
命中条件:
[
+
+ style="display: flex; align-items: center;margin-bottom: 5px;margin-left: 5px;"
+ :style="{backgroundColor:item.red?'#f56c6c':''}"
+ >
+
@@ -230,9 +247,10 @@
-
+
@@ -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,
diff --git a/h5-enginex-manager/src/components/models/outcontent.vue b/h5-enginex-manager/src/components/models/outcontent.vue
index da80380..d58aa89 100644
--- a/h5-enginex-manager/src/components/models/outcontent.vue
+++ b/h5-enginex-manager/src/components/models/outcontent.vue
@@ -75,16 +75,17 @@
-
+
+
-
-
+
+
@@ -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 = ''
diff --git a/h5-enginex-manager/src/components/page/tendencyAnalyse.vue b/h5-enginex-manager/src/components/page/tendencyAnalyse.vue
index 4804b3d..e71e717 100644
--- a/h5-enginex-manager/src/components/page/tendencyAnalyse.vue
+++ b/h5-enginex-manager/src/components/page/tendencyAnalyse.vue
@@ -89,7 +89,8 @@
style="text-align: center;font-size: 100px;color: #d0d0d0;margin-top: 50px;user-select: none;">
请选择引擎信息
-
+
+
@@ -238,12 +239,12 @@
-
+
-
+
@@ -255,7 +256,7 @@
-
+
@@ -265,7 +266,7 @@
-
+
@@ -277,7 +278,7 @@
-
+
-
+
@@ -300,7 +301,7 @@
-
+
@@ -310,7 +311,7 @@
-
+
@@ -322,7 +323,7 @@
-
+
@@ -332,7 +333,7 @@
-
+
@@ -344,7 +345,7 @@
-
+
@@ -354,7 +355,7 @@
-
+
@@ -366,6 +367,7 @@
+
diff --git a/h5-enginex-manager/src/main.js b/h5-enginex-manager/src/main.js
index a003e02..6cfd33c 100644
--- a/h5-enginex-manager/src/main.js
+++ b/h5-enginex-manager/src/main.js
@@ -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, //月份
diff --git a/h5-enginex-manager/src/store/index.js b/h5-enginex-manager/src/store/index.js
index 1d30dca..88045a6 100644
--- a/h5-enginex-manager/src/store/index.js
+++ b/h5-enginex-manager/src/store/index.js
@@ -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 {
diff --git a/h5-enginex-manager/src/utils/GetdeepObj.js b/h5-enginex-manager/src/utils/GetdeepObj.js
index 0f8e56c..12cda06 100644
--- a/h5-enginex-manager/src/utils/GetdeepObj.js
+++ b/h5-enginex-manager/src/utils/GetdeepObj.js
@@ -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,
})
}
diff --git a/h5-enginex-manager/src/utils/mixin.js b/h5-enginex-manager/src/utils/mixin.js
index 7568084..66e84c0 100644
--- a/h5-enginex-manager/src/utils/mixin.js
+++ b/h5-enginex-manager/src/utils/mixin.js
@@ -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)=>{