fix:修复bug
This commit is contained in:
@@ -35,10 +35,8 @@
|
||||
<div class="content">
|
||||
<div class="amount"
|
||||
v-if="info && info.fit">
|
||||
<div v-if="typeof info.fit === 'string'">
|
||||
{{ info.fit }}
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
<div >
|
||||
<span style="font-size: 62px">{{ fitInteger }}</span>.{{ fitDecimal }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,6 +52,7 @@
|
||||
<span class="text">分组人数占比</span>
|
||||
</div>
|
||||
<piechart ref="chart"
|
||||
height="226px"
|
||||
:data="fitChartData"></piechart>
|
||||
<div class="download-chart-data"
|
||||
@click="download('pie')">
|
||||
@@ -122,9 +121,9 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="data.text.value >= 0"
|
||||
style="color: #52c19a">{{ data.text.value == 0? '0': data.text.value}}</div>
|
||||
style="color: #52c19a">{{ data.text.value}}</div>
|
||||
<div v-else
|
||||
style="color: #923139">{{ data.text.value == 0? '0': data.text.value }}</div>
|
||||
style="color: #923139">{{ data.text.value}}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -168,9 +167,9 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="data.text.value >= 0"
|
||||
style="color: #52c19a">{{ data.text.value == 0? '0': data.text.value}}</div>
|
||||
style="color: #52c19a">{{ data.text.value }}</div>
|
||||
<div v-else
|
||||
style="color: #923139">{{ data.text.value == 0? '0': data.text.value }}</div>
|
||||
style="color: #923139">{{ data.text.value }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -295,7 +294,10 @@ watch(() => props.info, (info) => {
|
||||
if (!info) return
|
||||
fitChartData.value = info.fit_chart
|
||||
if (typeof info.fit === 'string') {
|
||||
fit.value = info.fit
|
||||
const fit = info.fit + ''
|
||||
const splitIndex = fit.indexOf('.')
|
||||
fitInteger.value = fit.slice(0, splitIndex)
|
||||
fitDecimal.value = fit.slice(splitIndex + 1)
|
||||
}
|
||||
if (typeof info.fit === 'number') {
|
||||
const fit = info.fit + ''
|
||||
@@ -332,10 +334,10 @@ watch(() => props.info, (info) => {
|
||||
d1.value = info.raw_data.data.map((item, index) => {
|
||||
for (let i in item) {
|
||||
if (childrenlist.indexOf(i) > -1 && item[i].value == 0) {
|
||||
item[i] ="0"
|
||||
item[i] =parseFloat(0).toFixed(5)
|
||||
}
|
||||
if (childrenlist.indexOf(i) > -1 && item[i].value) {
|
||||
item[i] = item[i].value
|
||||
item[i] =item[i].value
|
||||
}
|
||||
}
|
||||
return {
|
||||
@@ -367,7 +369,7 @@ watch(() => props.info, (info) => {
|
||||
d2.value = info.zero_data.data.map((item, index) => {
|
||||
for (let i in item) {
|
||||
if (childrenlist2.indexOf(i) > -1 && item[i].value == 0) {
|
||||
item[i] ="0"
|
||||
item[i] =parseFloat(0).toFixed(5)
|
||||
}
|
||||
if (childrenlist2.indexOf(i) > -1 && item[i].value) {
|
||||
item[i] = item[i].value
|
||||
|
||||
@@ -14,18 +14,22 @@
|
||||
</div>
|
||||
<div>
|
||||
<a-spin tip="Loading..." v-if="loading">
|
||||
<a-alert
|
||||
<a-alert
|
||||
message="努力加载中..."
|
||||
></a-alert>
|
||||
</a-spin>
|
||||
<div v-else-if=" !info || info.raw_data.columns.length <=0" class="empty-data">
|
||||
></a-alert>
|
||||
</a-spin>
|
||||
<div v-else-if=" !info || info.raw_data.columns.length <=0">
|
||||
<div class="bgfa"></div>
|
||||
<div class="empty-data">
|
||||
|
||||
<img class="empty-img"
|
||||
:src="require('@/assets/img/publish/no-data.png')"
|
||||
alt="" />
|
||||
<div class="empty-text">由于样本量较小 暂无分析数据</div>
|
||||
</div>
|
||||
<a-tabs v-model:activeKey="activeKey"
|
||||
@change="changeTab">
|
||||
</div>
|
||||
</div>
|
||||
<a-tabs v-model:activeKey="activeKey"
|
||||
@change="changeTab" v-else>
|
||||
|
||||
<a-tab-pane v-for="item in tabList"
|
||||
:key="item.key"
|
||||
@@ -49,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-tabs>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -300,7 +304,6 @@ watchEffect(() => {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
background: #fafafa;
|
||||
min-height: 600px;
|
||||
|
||||
.empty-img {
|
||||
@@ -317,4 +320,11 @@ watchEffect(() => {
|
||||
top: 75px;
|
||||
z-index: 99999;
|
||||
}
|
||||
.bgfa{
|
||||
position:absolute;
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
</span>
|
||||
<div class="right-btn ml-8">
|
||||
<span>
|
||||
{{infoConfig.options[0].length }}{{ infoConfig.config.concept}}
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="create"
|
||||
|
||||
@@ -9,7 +9,7 @@ export default class Maxdiff extends Config {
|
||||
this.design_version = is_modified === undefined ? 0 : this.design_version;
|
||||
this.version = is_modified === undefined ? 2 : this.version;
|
||||
this.task = 3 //随机任务
|
||||
this.concept = 3 //任务选项
|
||||
this.concept = 4 //任务选项
|
||||
this.is_placeholder = 0//问题提示
|
||||
this.placeholder = '' //提示内容
|
||||
this.help = ''
|
||||
|
||||
@@ -319,9 +319,9 @@ export default {
|
||||
};
|
||||
optionList.value.push(newOption);
|
||||
copyInfo.value.options[0] = optionList.value;
|
||||
copyInfo.value.config.task = Number.parseInt(
|
||||
(optionList.value.length * 3) / copyInfo.value.config.concept
|
||||
);
|
||||
// copyInfo.value.config.task = Number.parseInt(
|
||||
// (optionList.value.length * 3) / copyInfo.value.config.concept
|
||||
// );
|
||||
emitInfo(true);
|
||||
};
|
||||
const onUpLoadChange = (value) => {
|
||||
@@ -569,8 +569,6 @@ export default {
|
||||
const editChange = (index, value, isupodateV) => {
|
||||
if (!value) {
|
||||
message.error("选项不能为空");
|
||||
|
||||
console.log(props.info?.options[0][index].option);
|
||||
optionList.value[index].option = props.info?.options[0][index].option;
|
||||
optionList.value[index].option = props.info?.options[0][index].option;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user