| | |
| | | v-model="clientConfigsList.clientName" |
| | | ></a-input> |
| | | </a-form-item> |
| | | <div v-if="!clientConfigsList.clientConfigs || clientConfigsList.clientConfigs.length === 0" style="text-align: center"> |
| | | <a-button type="primary" @click="addConditions"> 添加规则 </a-button> |
| | | </div> |
| | | <div v-for="(subItem, subIndex) in clientConfigsList.clientConfigs" :key="subIndex"> |
| | | <div style="display: flex"> |
| | | <div>条件{{ subIndex + 1 }}:</div> |
| | |
| | | ></a-input> |
| | | </a-form-item> |
| | | </div> |
| | | <div style="text-align: center"> |
| | | <div style="text-align: center" v-if="subIndex === clientConfigsList.clientConfigs.length - 1"> |
| | | <a-button type="primary" @click="addConditions"> 增加条件 </a-button> |
| | | </div> |
| | | </div> |
| | |
| | | // 加油趋势:清除频次配置,设置默认值 |
| | | Object.assign(target, { |
| | | ruleType: 2, |
| | | countType: null, |
| | | countRef: null, |
| | | countType: 2, |
| | | countRef: 1, |
| | | countTrend: target.countTrend || 1, |
| | | historyMonths: target.historyMonths || 3, |
| | | recentMonths: target.recentMonths || 3, |
| | |
| | | this.clientConfigsList = Object.assign({}, record, { |
| | | clientConfigs: (record.clientConfigs || []).length |
| | | ? record.clientConfigs.map((item) => this.buildCondition(item)) |
| | | : [this.buildCondition()], |
| | | : [], |
| | | }) |
| | | }, |
| | | close() { |
| | |
| | | } |
| | | if (res.success) { |
| | | this.$message.success(res.message) |
| | | // 添加/编辑成功后刷新页面以更新字典缓存 |
| | | window.location.reload() |
| | | this.$emit('ok') |
| | | } |
| | | } catch (err) { |