This commit is contained in:
yanran200730
2023-04-06 10:02:25 +08:00
parent 89c406d802
commit ec189139b6
6 changed files with 19 additions and 13 deletions

View File

@@ -19,7 +19,7 @@
<ai-echart-v2 v-else-if="/Chart/.test(data.type)"
style="height: 100%; width: 100%;"
:ref="'chart' + index"
:key="`chart${index}`"
:key="`chart-${index}`"
:theme="theme"
:data="values"
:ops="chartList[data.config]"/>

View File

@@ -82,7 +82,7 @@
<div class="table-options">
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
<el-button type="text" @click="push(row.id)" v-if="row.status === '1'">推送精选</el-button>
<el-button type="text" @click="push(row.id)" v-if="row.status === '1' && row.pushStatus === '0'">推送精选</el-button>
</div>
</template>
</el-table-column>

View File

@@ -1,7 +1,7 @@
<template>
<div class="AppHelp">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
<component ref="component" :is="component" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>

View File

@@ -46,7 +46,7 @@
<el-cascader v-model="form.systemRuleId" ref="cascaderArr" :props="etOps" clearable placeholder="请选择" @change="handleTypeForm" :options="rulesOps"/>
</el-form-item>
<el-form-item label="自定义事件" prop="ruleName">
<ai-select v-model="form.ruleName" placeholder="请选择自定义事件" :selectList="$dict.getDict('appIntegralApplyEventType')">
<ai-select v-model="form.ruleName" @change="change" placeholder="请选择自定义事件" :selectList="dict.getDict('appIntegralApplyEventType')">
</ai-select>
</el-form-item>
@@ -54,7 +54,7 @@
<div>常规</div>
</el-form-item>
<el-form-item label="周期范围" prop="scoringCycle">
<ai-select v-model="form.scoringCycle" :selectList="$dict.getDict('integralRuleScoringCycle')" :disabled="isOneAndTen"/>
<ai-select v-model="form.scoringCycle" :selectList="dict.getDict('integralRuleScoringCycle')" :disabled="isOneAndTen"/>
</el-form-item>
<el-form-item label="奖励次数">
<el-input type="number" placeholder="请输入,周期范围内,不填写表示不限制" v-model.number="form.numberLimit" clearable :disabled="isOneAndTen"/>
@@ -68,7 +68,7 @@
<ai-area-select
clearable
@fullname="v => form.areaName = v"
:disabled-level="$store.state.user.info.areaList.length - 1"
:disabled-level="$store.state.user.info.areaList.length"
always-show
:instance="instance"
v-model="form.areaId">
@@ -173,7 +173,7 @@
{required: true, message: "请选择事件/类型", trigger: "change"},
],
ruleName: [
{required: true, message: "请输入自定义事件", trigger: "change"},
{required: true, message: "请选择自定义事件", trigger: "change"},
],
scoringCycle: [
{required: true, message: "请选择周期范围", trigger: "change"},
@@ -231,6 +231,10 @@
}
});
},
change (e) {
console.log(this.dict.getDict('appIntegralApplyEventType'))
},
closed () {
this.form.ruleType = '0'
this.form.systemRuleId = ''

View File

@@ -13,7 +13,7 @@
<template v-else>
<el-option v-for="(item, index) in ops" :key="index"
:label="item.dictName||item[actionProp.label]"
:value="item.dictValue>-1?item.dictValue:item[actionProp.value]"
:value="item.dictValue>-1 || item.dictValue ?item.dictValue:item[actionProp.value]"
:disabled="check(item[actionProp.value])"/>
</template>
</el-select>

View File

@@ -1,6 +1,6 @@
<template>
<section class="AiEchart">
<div ref="AiEchart" class="chart" :style="{minWidth:grid.width,minHeight:grid.height}"/>
<div :ref="AiEchart" class="chart" :style="{minWidth:grid.width,minHeight:grid.height}"/>
<slot v-if="$slots.default"/>
<render-component v-else-if="ops.render" :render="ops.render" :options="chartOptions" :data="data"/>
</section>
@@ -39,7 +39,8 @@ export default {
data() {
return {
chart: null,
timer: null
timer: null,
AiEchart: `AiEchart-${new Date().getTime()}`
}
},
computed: {
@@ -176,14 +177,14 @@ export default {
}
},
initChart() {
this.chart = echarts.init(this.$refs.AiEchart)
this.chart = echarts.init(this.$refs[this.AiEchart])
this.chart.setOption(this.chartOptions || {})
},
watchResize() {
this.timer && clearInterval(this.timer)
this.timer = setInterval(() => {
if (this.chart?.getHeight() != this.$refs.AiEchart?.clientHeight ||
this.chart?.getWidth() != this.$refs.AiEchart?.clientWidth) {
if (this.chart?.getHeight() != this.$refs[this.AiEchart]?.clientHeight ||
this.chart?.getWidth() != this.$refs[this.AiEchart]?.clientWidth) {
this.chart?.resize()
}
}, 1000)
@@ -196,6 +197,7 @@ export default {
},
mounted() {
this.$nextTick(() => {
console.log(this.$refs[this.AiEchart])
this.watchResize()
this.initChart()
this.getChartData()