Pārlūkot izejas kodu

Merge branch 'refs/heads/xinyan' into test

xinyan 10 mēneši atpakaļ
vecāks
revīzija
6cd0f612ae

+ 2 - 4
src/views/reportManage/TaskManage/index.vue

@@ -383,11 +383,11 @@ async function handleStatusChange(row) {
     try {
       const response = await postUpdateTaskStatus(query,updatedData);
       if (response.code === 2000) {
-        ElMessage.success('更新成功');
+        ElMessage.success('状态更新成功');
       } else if (response.code == 400) {
         ElMessage.warning(`${response.data.description}`);
       } else {
-        ElMessage.error('更新失败');
+        ElMessage.error('状态更新失败');
       }
     }catch (error){
       console.log('error:', error);
@@ -603,8 +603,6 @@ onMounted(() => {
               :active-value="1"
               :inactive-value="0"
               inline-prompt
-              active-text="是"
-              inactive-text="否"
               @change="handleStatusChange(row)"
           />
         </template>

+ 4 - 7
src/views/reportManage/dataCenter/normalDisplay/components/DateTendency/index.vue

@@ -125,7 +125,7 @@ const option: any = {
     {
       id: 1,
       name: '',
-      type: 'bar',
+      type: 'line',
       encode: {
         x: 'data_datetime',
         y: '',
@@ -185,13 +185,10 @@ async function initLine() {
   option.series = metrics.value.map((metric, index) => ({
     id: index,
     name: metric.label,
-    type: metric.color == '#3fd4cf' ? 'line' : 'bar',
+    type: index === 0 ? 'bar' : 'line',
     encode: { x: 'data_datetime', y: metric.metric },
     yAxisIndex: index,
-    itemStyle: {
-      color: index > 1 ? '#3fd4cf' : (index === 0 ? '#0085ff' : '#ff9500'),
-      borderRadius: [6, 6, 6, 6]
-    },
+    itemStyle: { color: option.series.type == 'bar' ? '#0085ff' : metric.color, borderRadius: [6, 6, 6, 6] },
     lineStyle: { color: metric.color },
     barWidth: '16px',
     areaStyle:
@@ -280,7 +277,7 @@ function changeMetric() {
     const baseConfig: any = {
       id: index,
       name: metric.label,
-      type: metric.color == '#3fd4cf' ? 'line' : 'bar',
+      type: metric.color === '#0085ff' ? 'bar' : 'line',
       encode: { x: 'data_datetime', y: metric.metric },
       yAxisIndex: index,
       itemStyle: { color: metric.color, borderRadius: [6, 6, 6, 6] },

+ 3 - 5
src/views/reportManage/dataCenter/normalDisplay/components/MetricsCards/index.vue

@@ -40,7 +40,6 @@ const metricMap = computed(() => {
 const initializeMetrics = () => {
   selectedMetric.value = [];
   displayMetrics.value = [];
-  //console.log('初始化', selectedMetric.value);
   Object.keys(colorsMap).forEach(key => delete colorsMap[key]);
 
   if (dateType.value === 'day' || dateType.value === 'month') {
@@ -51,15 +50,14 @@ const initializeMetrics = () => {
   } else if (dateType.value === 'week') {
     selectedMetric.value = weekInitData.value;
   }
-  console.log('initData.value', initData);
-  console.log('111', selectedMetric.value);
+  //console.log('initData.value', initData);
+  //console.log('111', selectedMetric.value);
   for (const info of selectedMetric.value) {
     displayMetrics.value.push({metric: info.metric, color: info.color});
     if (info.color) {
       colorsMap[info.color] = true;
     }
   }
-  console.log('initializeMetrics', selectedMetric.value);
   emits('update:modelValue', selectedMetric.value);
 };
 
@@ -135,7 +133,7 @@ watch(selectedMetric, () => {
       info.color = undefined;
     }
   }
-  console.log('watch', selectedMetric.value);
+  //console.log('watch', selectedMetric.value);
 }, {deep: true});
 
 watch(