|
@@ -55,14 +55,14 @@
|
|
<div class="text-item">{{ item.groupName }}</div>
|
|
<div class="text-item">{{ item.groupName }}</div>
|
|
<div class="required-item" v-if="item.isRequired == 1"></div>
|
|
<div class="required-item" v-if="item.isRequired == 1"></div>
|
|
</div>
|
|
</div>
|
|
- <div class="input-item">
|
|
|
|
|
|
+ <div class="input-item" style="width:70%;min-width:none">
|
|
|
|
|
|
<div class="toolbox-automate-rules-create-content_rules-and-condition_rules" style="margin-bottom:10px">
|
|
<div class="toolbox-automate-rules-create-content_rules-and-condition_rules" style="margin-bottom:10px">
|
|
<div class="content">
|
|
<div class="content">
|
|
<div class="rules-list">
|
|
<div class="rules-list">
|
|
<div class="rules-list-item">
|
|
<div class="rules-list-item">
|
|
<template v-for="(value, valueIndex) of item.ruleDetail">
|
|
<template v-for="(value, valueIndex) of item.ruleDetail">
|
|
- <div class="input-item" style="width:100%">
|
|
|
|
|
|
+ <div class="input-item" style="width:100%;min-width:none">
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
:label-col="{ span: 4 }"
|
|
:label-col="{ span: 4 }"
|
|
:wrapper-col="{ span: 20 }"
|
|
:wrapper-col="{ span: 20 }"
|
|
@@ -84,13 +84,63 @@
|
|
</span>
|
|
</span>
|
|
{{ value.cindicatorCode | cindicatorName }}
|
|
{{ value.cindicatorCode | cindicatorName }}
|
|
<a-input-number
|
|
<a-input-number
|
|
|
|
+ v-if="value.cindicatorCode=='charge'||value.cindicatorCode=='cost'"
|
|
:disabled="!editShow"
|
|
:disabled="!editShow"
|
|
style="width: 100px; margin-right: 5px"
|
|
style="width: 100px; margin-right: 5px"
|
|
v-model="value.threshold"
|
|
v-model="value.threshold"
|
|
:min="0.01"
|
|
:min="0.01"
|
|
:max="999999.99"
|
|
:max="999999.99"
|
|
:step="0.01"
|
|
:step="0.01"
|
|
- />{{ value.dataUnit }}
|
|
|
|
|
|
+ />
|
|
|
|
+
|
|
|
|
+ <a-select
|
|
|
|
+ allowClear
|
|
|
|
+ v-else-if="value.cindicatorCode=='dayBudget'"
|
|
|
|
+ v-model="value.threshold"
|
|
|
|
+ style="width: 100px; margin-right: 5px"
|
|
|
|
+ :disabled="!editShow"
|
|
|
|
+ >
|
|
|
|
+ <a-select-option value="0.5">
|
|
|
|
+ 0.5倍预算
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="0.8">
|
|
|
|
+ 0.8倍预算
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="1">
|
|
|
|
+ 1倍预算
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="1.2">
|
|
|
|
+ 1.2倍预算
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ <a-select
|
|
|
|
+ allowClear
|
|
|
|
+ v-else-if="value.cindicatorCode=='bid'"
|
|
|
|
+ v-model="value.threshold"
|
|
|
|
+ style="width: 100px; margin-right: 5px"
|
|
|
|
+ :disabled="!editShow"
|
|
|
|
+ >
|
|
|
|
+ <a-select-option value="1.2">
|
|
|
|
+ 1.2倍出价
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="1.5">
|
|
|
|
+ 1.5倍出价
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ {{ value.cindicatorCode=='charge'||value.cindicatorCode=='cost'?value.dataUnit:'' }}
|
|
|
|
+ <span v-if=" value.ruleCondition == 'between'" style="margin:0 15px">
|
|
|
|
+ ~
|
|
|
|
+ </span>
|
|
|
|
+ <a-input-number
|
|
|
|
+ v-if=" value.ruleCondition == 'between'"
|
|
|
|
+ :disabled="!editShow"
|
|
|
|
+ style="width: 100px; margin-right: 5px"
|
|
|
|
+ v-model="value.thresholdTwo"
|
|
|
|
+ :min="0.01"
|
|
|
|
+ :max="999999.99"
|
|
|
|
+ :step="0.01"
|
|
|
|
+ />
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -108,7 +158,8 @@
|
|
<div class="content">
|
|
<div class="content">
|
|
<div class="rules-list">
|
|
<div class="rules-list">
|
|
<div class="rules-list-item">
|
|
<div class="rules-list-item">
|
|
- <div class="input-item" style="width:100%">
|
|
|
|
|
|
+ <template>
|
|
|
|
+ <div class="input-item" style="width:100%!important;min-width:none">
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
:label-col="{ span: 4 }"
|
|
:label-col="{ span: 4 }"
|
|
:wrapper-col="{ span: 20 }"
|
|
:wrapper-col="{ span: 20 }"
|
|
@@ -121,15 +172,64 @@
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
<!-- <div style="margin-left:20px"> -->
|
|
<!-- <div style="margin-left:20px"> -->
|
|
-
|
|
|
|
|
|
+ <div v-if="item.operate!='TIME'">
|
|
|
|
+ <span style="margin:0 15px 0 0">{{item.operationType|operationType}}</span>
|
|
<a-input-number
|
|
<a-input-number
|
|
:disabled="!editShow"
|
|
:disabled="!editShow"
|
|
style="width: 100px; margin-right: 5px"
|
|
style="width: 100px; margin-right: 5px"
|
|
v-model="item.operationThreshold"
|
|
v-model="item.operationThreshold"
|
|
:min="0.01"
|
|
:min="0.01"
|
|
- :max="999999.99"
|
|
|
|
|
|
+ :max="item.operationValue=='price'?999999.99:99.99"
|
|
:step="0.01"
|
|
:step="0.01"
|
|
/>
|
|
/>
|
|
|
|
+ {{item.operationValue=='price'?'元':'%'}}
|
|
|
|
+ <div v-if="item.operationType != 'to'" style="display:inline-block">
|
|
|
|
+ <span style="margin:0 15px">|</span>
|
|
|
|
+ <span style="margin:0 15px 0 0">{{item.operationType == 'up'?'最高调整至':'最低调整至'}}</span>
|
|
|
|
+ <a-input-number
|
|
|
|
+ v-if="item.operationType == 'up'"
|
|
|
|
+ :disabled="!editShow"
|
|
|
|
+ style="width: 100px; margin-right: 5px"
|
|
|
|
+ v-model="item.maxValue"
|
|
|
|
+ :min="0.01"
|
|
|
|
+ :max="9999.99"
|
|
|
|
+ :step="0.01"
|
|
|
|
+ />
|
|
|
|
+ <a-input-number
|
|
|
|
+ v-else-if="item.operationType == 'down'"
|
|
|
|
+ :disabled="!editShow"
|
|
|
|
+ style="width: 100px; margin-right: 5px"
|
|
|
|
+ v-model="item.minValue"
|
|
|
|
+ :min="0.01"
|
|
|
|
+ :max="9999.99"
|
|
|
|
+ :step="0.01"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <a-select
|
|
|
|
+ allowClear
|
|
|
|
+ v-else
|
|
|
|
+ v-model="item.operationThreshold"
|
|
|
|
+ style="width: 100px; margin-right: 5px"
|
|
|
|
+ :disabled="!editShow"
|
|
|
|
+ >
|
|
|
|
+ <a-select-option value="1">
|
|
|
|
+ 1
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="2">
|
|
|
|
+ 2
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="3">
|
|
|
|
+ 3
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="4">
|
|
|
|
+ 4
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -137,6 +237,7 @@
|
|
|
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</div>
|
|
</div>
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -618,6 +719,14 @@ import timeRange from '@/components/formComponents/timeRange'
|
|
import scheduleTime from '@/components/formComponents/toutiaoTime'
|
|
import scheduleTime from '@/components/formComponents/toutiaoTime'
|
|
import region from '@/components/formComponents/selectRegion'
|
|
import region from '@/components/formComponents/selectRegion'
|
|
import switchConfig from './switchConfig'
|
|
import switchConfig from './switchConfig'
|
|
|
|
+let str = '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
|
|
|
|
+function changeString (str, num){
|
|
|
|
+ let strArr = str.split('')
|
|
|
|
+ for (let i = num; i < strArr.length; i+=(num+1)) {
|
|
|
|
+ strArr[i] = 1
|
|
|
|
+ }
|
|
|
|
+ return strArr.join('')
|
|
|
|
+}
|
|
let statusList = [
|
|
let statusList = [
|
|
{
|
|
{
|
|
id: 2,
|
|
id: 2,
|
|
@@ -916,7 +1025,6 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
inputChange(value) {
|
|
inputChange(value) {
|
|
value.threshold = value.threshold.trim()
|
|
value.threshold = value.threshold.trim()
|
|
- console.log(value)
|
|
|
|
},
|
|
},
|
|
addData(valueElse, value, index) {
|
|
addData(valueElse, value, index) {
|
|
// alert(1)
|
|
// alert(1)
|
|
@@ -985,7 +1093,6 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
inputCheck(val) {
|
|
inputCheck(val) {
|
|
- // console.log(val)
|
|
|
|
},
|
|
},
|
|
|
|
|
|
isCost(val) {
|
|
isCost(val) {
|
|
@@ -1006,9 +1113,7 @@ export default {
|
|
onSubmit() {
|
|
onSubmit() {
|
|
this.$refs.ruleForm.validate((valid) => {
|
|
this.$refs.ruleForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log('submit!', valid)
|
|
|
|
} else {
|
|
} else {
|
|
- console.log('error submit!!')
|
|
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -1033,6 +1138,7 @@ export default {
|
|
datas = this.form.ruleList.map((item) => {
|
|
datas = this.form.ruleList.map((item) => {
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
|
|
+ operationThreshold:item.operationThreshold,
|
|
ruleDetail: item.ruleDetail.map((end) => {
|
|
ruleDetail: item.ruleDetail.map((end) => {
|
|
if (isArray(item.ruleDetail[0])) {
|
|
if (isArray(item.ruleDetail[0])) {
|
|
var data = end.map((c) => {
|
|
var data = end.map((c) => {
|
|
@@ -1063,21 +1169,18 @@ export default {
|
|
? end.threshold == str
|
|
? end.threshold == str
|
|
? ''
|
|
? ''
|
|
: end.threshold
|
|
: end.threshold
|
|
- : end.threshold,
|
|
|
|
|
|
+ : end.ruleCondition == 'between'?end.threshold+'~'+end.thresholdTwo:end.threshold,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- // console.log(data)
|
|
|
|
var params = {
|
|
var params = {
|
|
...this.form,
|
|
...this.form,
|
|
ruleList: datas,
|
|
ruleList: datas,
|
|
accountId: JSON.parse(localStorage.getItem('getRuleDetail')).accountId,
|
|
accountId: JSON.parse(localStorage.getItem('getRuleDetail')).accountId,
|
|
}
|
|
}
|
|
this.saveLoading = true
|
|
this.saveLoading = true
|
|
-
|
|
|
|
- console.log(params)
|
|
|
|
postAction('/ruleAccountThreshold/fillThreshold', params).then((res) => {
|
|
postAction('/ruleAccountThreshold/fillThreshold', params).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.saveLoading = false
|
|
this.saveLoading = false
|
|
@@ -1100,7 +1203,6 @@ export default {
|
|
|
|
|
|
//分页页码改变
|
|
//分页页码改变
|
|
pageNoChange(val) {
|
|
pageNoChange(val) {
|
|
- console.log(val)
|
|
|
|
this.currentPage = val
|
|
this.currentPage = val
|
|
this.selectedCampaign()
|
|
this.selectedCampaign()
|
|
},
|
|
},
|
|
@@ -1122,7 +1224,6 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
selectedCampaign(e) {
|
|
selectedCampaign(e) {
|
|
- // console.log(e.target.value,this.selectedCampaignValue);
|
|
|
|
if (this.accountID) {
|
|
if (this.accountID) {
|
|
this.getExsitGroupList()
|
|
this.getExsitGroupList()
|
|
} else {
|
|
} else {
|
|
@@ -1160,7 +1261,6 @@ export default {
|
|
return showVal
|
|
return showVal
|
|
},
|
|
},
|
|
handlerDANWEI(val) {
|
|
handlerDANWEI(val) {
|
|
- // console.log(val.indexOf("RATE") != -1)
|
|
|
|
|
|
|
|
let returnVal = ''
|
|
let returnVal = ''
|
|
|
|
|
|
@@ -1184,6 +1284,9 @@ export default {
|
|
// this.rulesFieldList=res.result
|
|
// this.rulesFieldList=res.result
|
|
// }
|
|
// }
|
|
// })
|
|
// })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
var data = JSON.parse(localStorage.getItem('getRuleDetail'))
|
|
var data = JSON.parse(localStorage.getItem('getRuleDetail'))
|
|
this.editShow = data.edit
|
|
this.editShow = data.edit
|
|
@@ -1200,11 +1303,13 @@ export default {
|
|
var data = this.form.ruleList.map((item) => {
|
|
var data = this.form.ruleList.map((item) => {
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
|
|
+ operationThreshold:item.operationThreshold,
|
|
ruleDetail: item.ruleDetail.map((end) => {
|
|
ruleDetail: item.ruleDetail.map((end) => {
|
|
if (isArray(end)) {
|
|
if (isArray(end)) {
|
|
var data = end.map((c) => {
|
|
var data = end.map((c) => {
|
|
return {
|
|
return {
|
|
...c,
|
|
...c,
|
|
|
|
+ thresholdTwo:undefined,
|
|
threshold:
|
|
threshold:
|
|
c.modelType == 'tagBox'
|
|
c.modelType == 'tagBox'
|
|
? c.threshold == null
|
|
? c.threshold == null
|
|
@@ -1221,6 +1326,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
return {
|
|
return {
|
|
...end,
|
|
...end,
|
|
|
|
+ thresholdTwo:end.ruleCondition == 'between'?end.threshold.split('~')[1]:undefined,
|
|
threshold:
|
|
threshold:
|
|
end.modelType == 'tagBox'
|
|
end.modelType == 'tagBox'
|
|
? end.threshold == null
|
|
? end.threshold == null
|
|
@@ -1230,7 +1336,7 @@ export default {
|
|
? end.dataType == 'array'
|
|
? end.dataType == 'array'
|
|
? end.threshold
|
|
? end.threshold
|
|
: [end.threshold]
|
|
: [end.threshold]
|
|
- : end.threshold,
|
|
|
|
|
|
+ : end.ruleCondition == 'between'?end.threshold.split('~')[0]:end.threshold
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}),
|
|
}),
|