Browse Source

Echarts调整

Hwt 2 years ago
parent
commit
029b99c3da

+ 3 - 1
commandCenter/src/views/industrialInvestment/assembly/indexOptionChart.js

@@ -1157,7 +1157,9 @@ export const columnOptionsChartss = (name = '', xAxis = [], series = [], dataser
             },
             formatter(param) {
                 let el = ``;
+                let elitem = ``;
                 param.forEach((item) => {
+                    elitem = `<p>${item.name}</p>`;
                     el += `<p style="text-align: left;">
         <span style="display:inline-block;margin-right:5px;border-radius:4px;width:12px;height:8px;background-image: linear-gradient(to left, 
           ${item.color.colorStops[0].color}, ${item.color.colorStops[1].color})"></span>
@@ -1165,7 +1167,7 @@ export const columnOptionsChartss = (name = '', xAxis = [], series = [], dataser
                     </p>`;
                 });
                 el += ``;
-                return el;
+                return elitem + el;
             }
         },
         grid: {

+ 3 - 1
commandCenter/src/views/operationalServices/assembly/indexOptionChart.js

@@ -674,8 +674,10 @@ export const columnOptionsChartStacking = (name = '', xAxis = [], series = [], c
                 color: '#FFFFFF'
             },
             formatter(param) {
+                let elitem = ``;
                 let el = ``;
                 param.forEach((item) => {
+                    elitem = `<p>${item.name}</p>`;
                     el += `<p style="text-align: left;">
         <span style="display:inline-block;margin-right:5px;border-radius:4px;width:12px;height:8px;background-image: linear-gradient(to left, 
           ${item.color.colorStops[0].color}, ${item.color.colorStops[1].color})"></span>
@@ -683,7 +685,7 @@ export const columnOptionsChartStacking = (name = '', xAxis = [], series = [], c
                     </p>`;
                 });
                 el += ``;
-                return el;
+                return elitem + el;
             }
         },
         grid: {

+ 6 - 2
operationSupport/src/views/newWorkBench/components/indexOptionChart.js

@@ -672,15 +672,19 @@ export const columnOptionsChartStacking = (name = '', xAxis = [], series = [], c
             },
             formatter(param) {
                 let el = ``;
+                let elitme = ``;
                 param.forEach((item) => {
-                    el += `<p style="text-align: left;">
+                    elitme = `<p>${item.name}</p>`;
+                    el += `
+                    <p style="text-align: left;">
           <span style="display:inline-block;margin-right:5px;border-radius:4px;width:12px;height:8px;background-image: linear-gradient(to left, 
             ${item.color.colorStops[0].color}, ${item.color.colorStops[1].color})"></span>
                         <span>${item.seriesName}:${item.value}${name}</span>
                       </p>`;
                 });
                 el += ``;
-                return el;
+
+                return elitme + el;
             }
         },
         grid: {

+ 83 - 77
operationSupport/src/views/newWorkBench/components/personnelScore.vue

@@ -1,89 +1,95 @@
 <template>
-    <div class="modelBlock">
-        <template v-if="permissionFiltering">
-            <div class="model-title">
-                <div class="model-title-text">运维人员评分</div>
-                <div class="model-title-right">
-                    <el-date-picker
-                        value-format="yyyyMM"
-                        v-model="date"
-                        type="month"
-                        placeholder="选择年"
-                        class="saveColumn-select"
-                        @change="changeTime"
-                        :clearable="false"
-                    >
-                    </el-date-picker>
-                </div>
-            </div>
-            <div class="model-content">
-                <zz-echart :option="clientOptions" class="chart"></zz-echart>
-            </div>
-        </template>
-        <no-permission v-else tipsText="运维人员评分"></no-permission>
-    </div>
+  <div class="modelBlock">
+    <template v-if="permissionFiltering">
+      <div class="model-title">
+        <div class="model-title-text">运维人员评分</div>
+        <div class="model-title-right">
+          <el-date-picker
+            value-format="yyyyMM"
+            v-model="date"
+            type="month"
+            placeholder="选择年"
+            class="saveColumn-select"
+            @change="changeTime"
+            :clearable="false"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div class="model-content">
+        <zz-echart
+          :option="clientOptions"
+          class="chart"
+        ></zz-echart>
+      </div>
+    </template>
+    <no-permission
+      v-else
+      tipsText="运维人员评分"
+    ></no-permission>
+  </div>
 </template>
 <script>
 import { columnOptionsChartName } from './indexOptionChart';
 import permissionComponent from './permissionComponent';
 export default {
-    mixins: [permissionComponent],
-    data() {
-        return {
-            defaultModel: {
-                permissUrl: '23',
-                titleName: '绩效管理'
-            },
-            mixins_query: {
-                communityId: '',
-                date: ''
-            },
-            date: '',
-            clientOptions: columnOptionsChartName(
-                '(分)',
-                ['name1', 'name2', 'name3'],
-                [
-                    {
-                        name: 'name1',
-                        data: 0
-                    },
-                    {
-                        name: 'name2',
-                        data: 0
-                    },
-                    {
-                        name: 'name3',
-                        data: 0
-                    }
-                ],
-                [],
-                10
-            )
-        };
-    },
-    methods: {
-        getData() {
-            this.$http.get('/sc-community/statisticWorkOrderEvaluate', this.mixins_query).then(({ data, msg, status }) => {
-                if (status == 0 && !!data.length) {
-                    let name = [];
-                    data.map((item) => {
-                        name.push(item.date);
-                        item.data = item.evaluation;
-                    });
-                    this.clientOptions = columnOptionsChartName('(分)', name, data, [], 10);
-                }
-            });
-        },
-        changeTime(v) {
-            this.mixins_query.date = v + '01';
-            this.getData();
+  mixins: [permissionComponent],
+  data () {
+    return {
+      defaultModel: {
+        permissUrl: '23',
+        titleName: '绩效管理'
+      },
+      mixins_query: {
+        communityId: '',
+        date: ''
+      },
+      date: '',
+      clientOptions: columnOptionsChartName(
+        '(分)',
+        ['name1', 'name2', 'name3'],
+        [
+          {
+            name: 'name1',
+            data: 0
+          },
+          {
+            name: 'name2',
+            data: 0
+          },
+          {
+            name: 'name3',
+            data: 0
+          }
+        ],
+        [],
+        10
+      )
+    };
+  },
+  methods: {
+    getData () {
+      this.$http.get('/sc-community/statisticWorkOrderEvaluate', this.mixins_query).then(({ data, msg, status }) => {
+        if (status == 0 && !!data.length) {
+          let name = [];
+          data.map((item) => {
+            name.push(item.name);
+            item.data = item.evaluation;
+          });
+          this.clientOptions = columnOptionsChartName('(分)', name, data, [], 10);
         }
+      });
     },
-    created() {
-        this.date = this.$moment().format('YYYYMM') + '01';
-        this.mixins_query.date = this.$moment().format('YYYYMM') + '01';
-        this.getData();
+    changeTime (v) {
+      this.mixins_query.date = v + '01';
+      this.getData();
     }
+  },
+  created () {
+    this.date = this.$moment().format('YYYYMM') + '01';
+    this.mixins_query.date = this.$moment().format('YYYYMM') + '01';
+    this.getData();
+  }
 };
 </script>
 <style scoped lang="scss">