刘洋 преди 1 година
родител
ревизия
8abe2b3099
променени са 2 файла, в които са добавени 14 реда и са изтрити 6 реда
  1. 8 6
      src/utils/chart.js
  2. 6 0
      src/views/sop/sop-manage/sop-step/index.vue

+ 8 - 6
src/utils/chart.js

@@ -129,12 +129,14 @@ export const createStackingBarOption = ({ xData, seriesData }, extend = {}) => {
         data: item.data,
         // barWidth: item.barWidth ?? '8px',
         stack: '总量',
-        // label: {
-        //   normal: {
-        //     show: true,
-        //     position: 'insideRight',
-        //   },
-        // },
+        label: {
+          // show: true,
+          normal: {
+            show: true,
+            // position: 'insideRight',
+            color: '#fff',
+          },
+        },
         itemStyle: {
           normal: {
             color: colorList[index % colorList.length],

+ 6 - 0
src/views/sop/sop-manage/sop-step/index.vue

@@ -502,6 +502,9 @@ const curFormConfig = computed(() => {
             value: user.userId,
           };
         });
+        if (field.options.length == 1) {
+          field.value = field.options[0].value;
+        }
       }
       // 助理工程师
       if (field.formId.startsWith('assistant_engineer_user')) {
@@ -511,6 +514,9 @@ const curFormConfig = computed(() => {
             value: user.userId,
           };
         });
+        if (!field.options.length) {
+          field.writable = false;
+        }
       }
       if (field.formId.startsWith('week_people_day')) {
         field.value = crmInfo.value.peoperDay;