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