更新基础分析bug
This commit is contained in:
@@ -858,7 +858,7 @@ const delGroup =index=>{
|
||||
// 拼装answer
|
||||
const getAnswer = ()=>{
|
||||
const newAnswerList = toRaw(answerList.value)
|
||||
const newAnswerGroupListVal = JSON.parse(JSON.stringify(answerGroupList.value))
|
||||
const newAnswerGroupListVal = toRaw(answerGroupList.value)
|
||||
console.log('newAnswerList',newAnswerList);
|
||||
console.log('newAnswerGroupListVal',newAnswerGroupListVal);
|
||||
// 单项拼装
|
||||
|
||||
@@ -99,7 +99,6 @@ const props = defineProps({
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
|
||||
const isValid = computed(() => props.data.count > 0);
|
||||
const questionIndex = computed(() => props.data.question_index);
|
||||
const chartTypeOptions = ref([]);
|
||||
|
||||
@@ -104,7 +104,7 @@ export default defineComponent({
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label);
|
||||
const config = useChartOption(data, type, data_label, null, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label);
|
||||
const config = useChartOption(data, type, data_label, null, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label);
|
||||
const config = useChartOption(data, type, data_label, null, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<script setup>
|
||||
import { getSingleDiagramInfo } from "@api/data-analyse";
|
||||
import { defineComponent, ref, watch, inject } from "vue";
|
||||
import { defineComponent, ref, watch, inject, computed } from "vue";
|
||||
import pieChart from "@/components/chart/PieChart";
|
||||
import ChartAction from "@/views/DataAnalyse/diagram/components/ChartAction";
|
||||
import CascaderSelect from "./CascaderSelect.vue";
|
||||
@@ -96,7 +96,6 @@ const other =
|
||||
// value: 4
|
||||
// },
|
||||
}
|
||||
|
||||
function renderChart(source) {
|
||||
let data = source;
|
||||
let data_label = chart_params.value.data_label;
|
||||
@@ -106,7 +105,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label,other );
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max );
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -117,7 +116,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,6 @@ function getData(optionIndex) {
|
||||
tableSource.value = data.option;
|
||||
tableInstance.value.data = data.option
|
||||
source.value = data.option
|
||||
|
||||
renderChart(data.option);
|
||||
});
|
||||
}
|
||||
@@ -106,7 +105,7 @@ function renderChart(source) {
|
||||
data = clearData(source);
|
||||
}
|
||||
if (data.length === 0) return;
|
||||
const config = useChartOption(data, type, data_label,other );
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
@@ -117,7 +116,7 @@ function handleUpdateAction(params) {
|
||||
if (empty_option) {
|
||||
data = clearData(data);
|
||||
}
|
||||
const config = useChartOption(data, type, data_label, other);
|
||||
const config = useChartOption(data, type, data_label, other, props.data.max);
|
||||
option.value = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { cloneDeep } from "lodash";
|
||||
export default function useChartOption(source, type, enableLabel = true, other = null) {
|
||||
export default function useChartOption(source, type, enableLabel = true, other = null, max) {
|
||||
let defaultOption = {
|
||||
legend: {
|
||||
type: "scroll",
|
||||
@@ -275,7 +275,7 @@ export default function useChartOption(source, type, enableLabel = true, other =
|
||||
const indicator = legendData.map(name => {
|
||||
return {
|
||||
name,
|
||||
max: 12
|
||||
max
|
||||
}
|
||||
})
|
||||
const seriesData = sourceData.map(item =>item.number)
|
||||
|
||||
@@ -136,6 +136,7 @@ function getPermissionInfo() {
|
||||
// 搜索
|
||||
const tableSearchInfo = ref({});
|
||||
function onSearch(payload) {
|
||||
payload.type = 0
|
||||
tableSearchInfo.value = payload;
|
||||
diagramList.value = []
|
||||
current_page.value = 1
|
||||
|
||||
Reference in New Issue
Block a user