zhuliu 1 år sedan
förälder
incheckning
6dfce3ebd6

+ 26 - 683
src/views/components/editor/index.vue

@@ -2,6 +2,12 @@
   <div>
     <editor-zl
       ref="editor1"
+      v-if="!loading"
+      :htmlData="htmlData"
+      :editMode="editMode"
+      :imageData="imageDatas"
+      :docJson="docJson"
+      :projectId="projectId"
       @readyAnalysis="readyAnalysis"
       @imageData="imageData"
     >
@@ -10,708 +16,45 @@
       </div>
     </editor-zl>
 
+    <div v-if="loading" style="opacity: 0">
+      <div v-for="(item, index) in imageList" :key="index">
+        <Chart
+          :key="index"
+          :myId="'chartDom' + index"
+          :ref="'chartDom' + index"
+          :formCount="item.count"
+          :formData="item.form"
+          :selectedData="item.selected"
+          :width="item.form.setting.width + item.form.setting.widthUnit"
+          :height="item.form.setting.height + item.form.setting.heightUnit"
+        ></Chart>
+      </div>
+    </div>
   </div>
 </template>
 
 <script>
 
-import Data from "@/views/analyse/custom/components/Tabs/Data.vue";
-import {
-  detectionChartType,
-  getFormPermissions,
-  getTreeNameByIds,
-  getXAxisName,
-  getSourceName,
-} from "@/utils/chart";
+import dataComponent from './mixins/dataComponent'
+import ready from './mixins/ready'
 export default {
   components: {
-    Data,
   },
   props: {},
+  mixins:[dataComponent,ready],
   data() {
     return {
-      form: {
-        search: {
-          projectId: 330,
-          searchQuery: "", //检索条件
-          customFields: [],
-          orderDTOList: [], //排序信息
-        },
-        setting: {
-          type: 1,
-          showType: 0,
-          tableType: 0,
-          theme: "customed",
-          titleSize: 14,
-          dataSize: 14,
-          axisSize: 14,
-          dataLabel: false,
-          dataLabel2: false,
-          dataLabel3: false,
-          title1Dir: 0,
-          title1: "",
-          title2: "",
-          dataPosition: "top",
-          fontFamily: "sans-serif",
-          fontFamily2: "sans-serif",
-          fontFamily3: "sans-serif",
-          fontFamily4: "sans-serif",
-          fontWeight: false,
-          fontWeight2: false,
-          nameLocation: "end",
-          nameLocation2: "end",
-          width: "100",
-          height: "650",
-          widthUnit: "%",
-          heightUnit: "px",
-          splitLine: false,
-          splitLine2: false,
-          legend: true,
-          gridTop: "10",
-          gridLeft: "10",
-          gridBottom: "10",
-          gridRight: "10",
-          labelColor: "#000000",
-          legendColor: "#000000",
-          legendLocation: "top",
-          legendFontSize: "13",
-          fontSize: "13",
-          fontSize2: "13",
-          fontColor: "#000000",
-          fontColor2: "#000000",
-          show: true,
-          show2: true,
-          interval: true,
-          interval2: true,
-          rotate: "0",
-          rotate2: "0",
-          paddingTop: 10,
-          paddingBottom: 10,
-          paddingRight: 10,
-          paddingLeft: 10,
-          paddingTop2: 0,
-          paddingLeft2: 0,
-          paddingBottom2: 0,
-          paddingRight2: 0,
-          type2: "scroll",
-          barWidth: "",
-          scatterSize: "0",
-          config: {
-            color: [],
-            line: {
-              name: "",
-              first: "",
-              second: "",
-              operator: 0,
-              enable: false,
-            },
-            table: [],
-          },
-        },
-        schema: {
-          x: {
-            num: 10,
-            // field:'PA'
-          },
-          y: {
-            num: 10,
-          },
-        },
-        source: {
-          x: [],
-          y: [],
-        },
-      },
-      selected: {
-        x: [],
-        y: [],
-      },
-      count: {},
-      isEdit: false,
+      editMode: "edit", //编辑模式 "edit"编辑,"clean"清洁,"readonly"只读, "form","print"打印
     };
   },
   watch: {},
   computed: {},
   created() {},
   mounted() {
-    this.init()
+    
   },
   methods: {
-    init() {
-      var data = [
-        {
-          name: "公开日",
-          type: "DateTime",
-          value: "publicDate",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "PD",
-          groupBy: "dateType",
-        },
-        {
-          name: "申请日",
-          type: "DateTime",
-          value: "appDate",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "AD",
-          groupBy: "dateType",
-        },
-        {
-          name: "授权日",
-          type: "DateTime",
-          value: "grantDate",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "GD",
-          groupBy: "dateType",
-        },
-        {
-          name: "申请人",
-          type: "Array",
-          value: "applicant",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          defaultShowStats: true,
-          field: "PA",
-          groupBy: "company",
-        },
-        {
-          name: "标准申请人",
-          type: "String",
-          value: "standerApplicant",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "SAT",
-          groupBy: "company",
-        },
-        {
-          name: "合并申请人",
-          type: "Array",
-          value: "mergeApplicant",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "MAT",
-          groupBy: "company",
-        },
-        {
-          name: "发明人",
-          type: "Array",
-          value: "inventor",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "IN",
-          groupBy: "company",
-        },
-        {
-          name: "合并发明人",
-          type: "Array",
-          value: "mergeInventor",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "MIN",
-          groupBy: "company",
-        },
-        {
-          name: "权利人",
-          type: "Array",
-          value: "rightHolder",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "PE",
-          groupBy: "company",
-        },
-        {
-          name: "标准权利人",
-          type: "String",
-          value: "standerRightHolder",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "SRH",
-          groupBy: "company",
-        },
-        {
-          name: "合并权利人",
-          type: "Array",
-          value: "mergeRightHolder",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "MRH",
-          groupBy: "company",
-        },
-        {
-          name: "代理机构",
-          type: "String",
-          value: "agency",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "AGN",
-          groupBy: "company",
-        },
-        {
-          name: "代理人名称",
-          type: "Array",
-          value: "agent",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "AG",
-          groupBy: "company",
-        },
-        {
-          name: "申请国家",
-          type: "String",
-          value: "appCountry",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "CO",
-          groupBy: "nation",
-        },
-        {
-          name: "申请人国家",
-          type: "String",
-          value: "applicantCountry",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "AAC",
-          groupBy: "nation",
-        },
-        {
-          name: "申请人省份",
-          type: "String",
-          value: "appProvince",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "ADP",
-          groupBy: "nation",
-        },
-        {
-          name: "申请人市区",
-          type: "String",
-          value: "appCity",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "ADC",
-          groupBy: "nation",
-        },
-        {
-          name: "权利人国家",
-          type: "String",
-          value: "rightCountry",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "DZ",
-          groupBy: "nation",
-        },
-        {
-          name: "权利人省份",
-          type: "String",
-          value: "rightProvince",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "RDP",
-          groupBy: "nation",
-        },
-        {
-          name: "权利人市区",
-          type: "String",
-          value: "rightCity",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "RDC",
-          groupBy: "nation",
-        },
-        {
-          name: "IPC分类号",
-          type: "Object",
-          value: "mipc",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "MIPC",
-          groupBy: "classify",
-          children: [
-            {
-              label: "IPC部",
-              type: "1",
-              value: "IC1",
-              group: "nos",
-            },
-            {
-              label: "IPC大类",
-              type: "1",
-              value: "IC2",
-              group: "nos",
-            },
-            {
-              label: "IPC小类",
-              type: "1",
-              value: "IC3",
-              group: "nos",
-            },
-            {
-              label: "IPC大组",
-              type: "1",
-              value: "IC4",
-              group: "nos",
-            },
-            {
-              label: "IPC",
-              type: "1",
-              value: "IC",
-              group: "nos",
-            },
-          ],
-        },
-        {
-          name: "CPC分类号",
-          type: "Object",
-          value: "mcpc",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "MCPC",
-          groupBy: "classify",
-          children: [
-            {
-              label: "CPC部",
-              type: "1",
-              value: "CPC1",
-              group: "nos",
-            },
-            {
-              label: "CPC大类",
-              type: "1",
-              value: "CPC2",
-              group: "nos",
-            },
-            {
-              label: "CPC小类",
-              type: "1",
-              value: "CPC3",
-              group: "nos",
-            },
-            {
-              label: "CPC大组",
-              type: "1",
-              value: "CPC4",
-              group: "nos",
-            },
-            {
-              label: "CPC",
-              type: "1",
-              value: "CPC",
-              group: "nos",
-            },
-          ],
-        },
-        {
-          name: "UPC分类号",
-          type: "Object",
-          value: "mupc",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "MUPC",
-          groupBy: "classify",
-          children: [
-            {
-              label: "UPC大类",
-              type: "1",
-              value: "UPC1",
-              group: "nos",
-            },
-            {
-              label: "UPC",
-              type: "1",
-              value: "UPC",
-              group: "nos",
-            },
-          ],
-        },
-        {
-          name: "LOC分类号",
-          type: "Object",
-          value: "mloc",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "MLOC",
-          groupBy: "classify",
-          children: [
-            {
-              label: "LOC大类",
-              type: "1",
-              value: "LOC1",
-              group: "nos",
-            },
-            {
-              label: "LOC",
-              type: "1",
-              value: "LOC",
-              group: "nos",
-            },
-          ],
-        },
-        {
-          name: "法律状态",
-          type: "String",
-          value: "simpleStatus",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "SS",
-          groupBy: "typeStatus",
-          optionValue: [
-            {
-              label: "有效",
-              value: "1",
-            },
-            {
-              label: "无效",
-              value: "2",
-            },
-            {
-              label: "审中",
-              value: "3",
-            },
-          ],
-        },
-        {
-          name: "专利类型",
-          type: "String",
-          value: "patentType",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "PT",
-          groupBy: "typeStatus",
-          optionValue: [
-            {
-              label: "发明",
-              value: "1罒8",
-            },
-            {
-              label: "实用新型",
-              value: "2罒9",
-            },
-            {
-              label: "外观",
-              value: "3",
-            },
-          ],
-        },
-        {
-          name: "优先权国家",
-          type: "String",
-          value: "priorityCountry",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "PRCO",
-          groupBy: "nation",
-        },
-        {
-          name: "优先权日",
-          type: "DateTime",
-          value: "priorityDate",
-          ifStats: true,
-          ifGroup: true,
-          filedKind: -1,
-          field: "PRD",
-          groupBy: "dateType",
-        },
-      ];
-      var data2 = [];
-      data.forEach((item) => {
-        if (item.filedKind == -1) {
-          item.value = item.field;
-        }
-        if (item.filedKind == 0 && item.type == "tree") {
-        } else {
-          data2.push(item);
-        }
-      });
-      this.$store.commit("SET_SYSTEM_FIELD", data2);
-      this.$store.commit("SET_CHART_FORM", this.form);
-    },
-    readyAnalysis() {
-      this.selected = this.$store.state.chart.selected;
-      this.submit();
-    },
-    submit() {
-      if (!this.form.schema.x.field) {
-        this.$message.error("请选择一维数据");
-        return false;
-      } else {
-        if (this.form.source.x.length == 0) {
-          this.$message.error("一维数据为空");
-          return false;
-        }
-      }
-      if (this.form.schema.y.field) {
-        if (this.form.source.y.length == 0) {
-          this.$message.error("二维数据为空");
-          return false;
-        }
-      }
-      const chartType = this.$constants.chartType.find(
-        (c) => c.value === this.form.setting.type
-      );
-      const { op, cg } = detectionChartType(chartType || {}, this.form);
-      if (op && cg) {
-        this.resetChartType();
-      }
-
-      this.getDataCount();
-    },
-    async getDataCount() {
-      var data = {};
-      var sign = false;
-      var count = [];
-      var dimensions = [];
-      if (this.form.schema.x.field && this.form.schema.y.field) {
-        sign = true;
-        dimensions = ["x", "y"];
-      } else {
-        sign = false;
-        dimensions = ["x"];
-      }
-      if (!this.form.setting.type) {
-        if (sign) {
-          this.form.setting.type = 2;
-        } else {
-          this.form.setting.type = 1;
-        }
-      } else {
-        var chartType = this.$constants.chartType.find((item) => {
-          return item.value == this.form.setting.type;
-        }).type;
-        if (sign && chartType == 1) {
-          this.form.setting.type = 2;
-        } else if (!sign && chartType == 2) {
-          this.form.setting.type = 1;
-        }
-      }
-      dimensions.forEach((dimension) => {
-        var form = this.form;
-        var obj = form.schema[dimension];
-        this.loading = true;
-        if (obj.fieldKind == 0) {
-          count.push({
-            field: "field",
-            fieldId: form.schema[dimension].field,
-            topN: form.schema[dimension].num,
-            values: this.selected[dimension],
-          });
-        } else if (form.schema[dimension].type == "DateTime") {
-          count.push({
-            field: form.schema[dimension].field,
-            topN: form.schema[dimension].num,
-            format: form.schema[dimension].expand,
-            values: this.selected[dimension],
-          });
-        } else {
-          if (["classify"].includes(form.schema[dimension].groupBy)) {
-            count.push({
-              field: form.schema[dimension].expand,
-              topN: form.schema[dimension].num,
-              values: this.selected[dimension],
-            });
-          } else {
-            count.push({
-              field: form.schema[dimension].field,
-              topN: form.schema[dimension].num,
-              values: this.selected[dimension],
-            });
-          }
-        }
-      });
-
-      var params = {
-        ...this.form.search,
-        countVOS: count,
-      };
-      try {
-        const response = await this.$api.esCountAnalysis(params);
-        if (sign) {
-          var res = Object.keys(response.data.analyseMap);
-          for (var i = 0; i < res.length; i++) {
-            var analyseMapData = response.data.analyseMap[res[i]];
-            var obj = {};
-            for (var j = 0; j < analyseMapData.length; j++) {
-              var name = analyseMapData[j].name;
-              obj[name] = analyseMapData[j].number;
-            }
-            var key = res[i];
-            data[key] = obj;
-          }
-        } else {
-          for (var i = 0; i < response.data.detailDTOS.length; i++) {
-            var key = response.data.detailDTOS[i].name;
-            data[key] = response.data.detailDTOS[i].number;
-          }
-        }
-      } catch (e) {
-        data = [];
-      }
-      this.count = data;
-
-      var data = {
-        form: this.form,
-        count: this.count,
-        selectedData: this.selected,
-        other: {
-          search: {
-            projectId: 330,
-            searchQuery: "", //检索条件
-            customFields: [],
-            orderDTOList: [], //排序信息
-          },
-          type: 3,
-        },
-      };
-
-      this.$refs.editor1.showCharts(data);
-    },
-    imageData(imageData, edit) {
-      if (!edit) {
-        return false;
-      }
-      var data = imageData.data;
-      if (!data.other || data.other.type != 3) {
-        return;
-      }
-      var form = {
-        ...data.form,
-        search: data.other.search,
-      };
-      this.$store.commit("SET_CHART_FORM", form);
-      this.$store.commit("SET_CHART_SELECTED", data.selectedData);
-      this.isEdit = true;
-      this.$nextTick(() => {
-        this.isEdit = false;
-      });
-    },
+    
   },
 };
 </script>

+ 695 - 0
src/views/components/editor/mixins/dataComponent.js

@@ -0,0 +1,695 @@
+import Data from "@/views/analyse/custom/components/Tabs/Data.vue";
+import {
+  detectionChartType,
+  getFormPermissions,
+  getTreeNameByIds,
+  getXAxisName,
+  getSourceName,
+} from "@/utils/chart";
+export default{
+    components: {
+        Data,
+      },
+    data() {
+        return {
+            form: {
+                search: {
+                  projectId: 330,
+                  searchQuery: "", //检索条件
+                  customFields: [],
+                  orderDTOList: [], //排序信息
+                },
+                setting: {
+                  type: 1,
+                  showType: 0,
+                  tableType: 0,
+                  theme: "customed",
+                  titleSize: 14,
+                  dataSize: 14,
+                  axisSize: 14,
+                  dataLabel: false,
+                  dataLabel2: false,
+                  dataLabel3: false,
+                  title1Dir: 0,
+                  title1: "",
+                  title2: "",
+                  dataPosition: "top",
+                  fontFamily: "sans-serif",
+                  fontFamily2: "sans-serif",
+                  fontFamily3: "sans-serif",
+                  fontFamily4: "sans-serif",
+                  fontWeight: false,
+                  fontWeight2: false,
+                  nameLocation: "end",
+                  nameLocation2: "end",
+                  width: "100",
+                  height: "650",
+                  widthUnit: "%",
+                  heightUnit: "px",
+                  splitLine: false,
+                  splitLine2: false,
+                  legend: true,
+                  gridTop: "10",
+                  gridLeft: "10",
+                  gridBottom: "10",
+                  gridRight: "10",
+                  labelColor: "#000000",
+                  legendColor: "#000000",
+                  legendLocation: "top",
+                  legendFontSize: "13",
+                  fontSize: "13",
+                  fontSize2: "13",
+                  fontColor: "#000000",
+                  fontColor2: "#000000",
+                  show: true,
+                  show2: true,
+                  interval: true,
+                  interval2: true,
+                  rotate: "0",
+                  rotate2: "0",
+                  paddingTop: 10,
+                  paddingBottom: 10,
+                  paddingRight: 10,
+                  paddingLeft: 10,
+                  paddingTop2: 0,
+                  paddingLeft2: 0,
+                  paddingBottom2: 0,
+                  paddingRight2: 0,
+                  type2: "scroll",
+                  barWidth: "",
+                  scatterSize: "0",
+                  config: {
+                    color: [],
+                    line: {
+                      name: "",
+                      first: "",
+                      second: "",
+                      operator: 0,
+                      enable: false,
+                    },
+                    table: [],
+                  },
+                },
+                schema: {
+                  x: {
+                    num: 10,
+                    // field:'PA'
+                  },
+                  y: {
+                    num: 10,
+                  },
+                },
+                source: {
+                  x: [],
+                  y: [],
+                },
+              },
+              selected: {
+                x: [],
+                y: [],
+              },
+              count: {},
+              isEdit: false,
+        }
+    },
+    mounted() {
+        this.init()
+    },
+    methods: {
+        init() {
+            var data = [
+              {
+                name: "公开日",
+                type: "DateTime",
+                value: "publicDate",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "PD",
+                groupBy: "dateType",
+              },
+              {
+                name: "申请日",
+                type: "DateTime",
+                value: "appDate",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "AD",
+                groupBy: "dateType",
+              },
+              {
+                name: "授权日",
+                type: "DateTime",
+                value: "grantDate",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "GD",
+                groupBy: "dateType",
+              },
+              {
+                name: "申请人",
+                type: "Array",
+                value: "applicant",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                defaultShowStats: true,
+                field: "PA",
+                groupBy: "company",
+              },
+              {
+                name: "标准申请人",
+                type: "String",
+                value: "standerApplicant",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "SAT",
+                groupBy: "company",
+              },
+              {
+                name: "合并申请人",
+                type: "Array",
+                value: "mergeApplicant",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "MAT",
+                groupBy: "company",
+              },
+              {
+                name: "发明人",
+                type: "Array",
+                value: "inventor",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "IN",
+                groupBy: "company",
+              },
+              {
+                name: "合并发明人",
+                type: "Array",
+                value: "mergeInventor",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "MIN",
+                groupBy: "company",
+              },
+              {
+                name: "权利人",
+                type: "Array",
+                value: "rightHolder",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "PE",
+                groupBy: "company",
+              },
+              {
+                name: "标准权利人",
+                type: "String",
+                value: "standerRightHolder",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "SRH",
+                groupBy: "company",
+              },
+              {
+                name: "合并权利人",
+                type: "Array",
+                value: "mergeRightHolder",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "MRH",
+                groupBy: "company",
+              },
+              {
+                name: "代理机构",
+                type: "String",
+                value: "agency",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "AGN",
+                groupBy: "company",
+              },
+              {
+                name: "代理人名称",
+                type: "Array",
+                value: "agent",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "AG",
+                groupBy: "company",
+              },
+              {
+                name: "申请国家",
+                type: "String",
+                value: "appCountry",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "CO",
+                groupBy: "nation",
+              },
+              {
+                name: "申请人国家",
+                type: "String",
+                value: "applicantCountry",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "AAC",
+                groupBy: "nation",
+              },
+              {
+                name: "申请人省份",
+                type: "String",
+                value: "appProvince",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "ADP",
+                groupBy: "nation",
+              },
+              {
+                name: "申请人市区",
+                type: "String",
+                value: "appCity",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "ADC",
+                groupBy: "nation",
+              },
+              {
+                name: "权利人国家",
+                type: "String",
+                value: "rightCountry",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "DZ",
+                groupBy: "nation",
+              },
+              {
+                name: "权利人省份",
+                type: "String",
+                value: "rightProvince",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "RDP",
+                groupBy: "nation",
+              },
+              {
+                name: "权利人市区",
+                type: "String",
+                value: "rightCity",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "RDC",
+                groupBy: "nation",
+              },
+              {
+                name: "IPC分类号",
+                type: "Object",
+                value: "mipc",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "MIPC",
+                groupBy: "classify",
+                children: [
+                  {
+                    label: "IPC部",
+                    type: "1",
+                    value: "IC1",
+                    group: "nos",
+                  },
+                  {
+                    label: "IPC大类",
+                    type: "1",
+                    value: "IC2",
+                    group: "nos",
+                  },
+                  {
+                    label: "IPC小类",
+                    type: "1",
+                    value: "IC3",
+                    group: "nos",
+                  },
+                  {
+                    label: "IPC大组",
+                    type: "1",
+                    value: "IC4",
+                    group: "nos",
+                  },
+                  {
+                    label: "IPC",
+                    type: "1",
+                    value: "IC",
+                    group: "nos",
+                  },
+                ],
+              },
+              {
+                name: "CPC分类号",
+                type: "Object",
+                value: "mcpc",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "MCPC",
+                groupBy: "classify",
+                children: [
+                  {
+                    label: "CPC部",
+                    type: "1",
+                    value: "CPC1",
+                    group: "nos",
+                  },
+                  {
+                    label: "CPC大类",
+                    type: "1",
+                    value: "CPC2",
+                    group: "nos",
+                  },
+                  {
+                    label: "CPC小类",
+                    type: "1",
+                    value: "CPC3",
+                    group: "nos",
+                  },
+                  {
+                    label: "CPC大组",
+                    type: "1",
+                    value: "CPC4",
+                    group: "nos",
+                  },
+                  {
+                    label: "CPC",
+                    type: "1",
+                    value: "CPC",
+                    group: "nos",
+                  },
+                ],
+              },
+              {
+                name: "UPC分类号",
+                type: "Object",
+                value: "mupc",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "MUPC",
+                groupBy: "classify",
+                children: [
+                  {
+                    label: "UPC大类",
+                    type: "1",
+                    value: "UPC1",
+                    group: "nos",
+                  },
+                  {
+                    label: "UPC",
+                    type: "1",
+                    value: "UPC",
+                    group: "nos",
+                  },
+                ],
+              },
+              {
+                name: "LOC分类号",
+                type: "Object",
+                value: "mloc",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "MLOC",
+                groupBy: "classify",
+                children: [
+                  {
+                    label: "LOC大类",
+                    type: "1",
+                    value: "LOC1",
+                    group: "nos",
+                  },
+                  {
+                    label: "LOC",
+                    type: "1",
+                    value: "LOC",
+                    group: "nos",
+                  },
+                ],
+              },
+              {
+                name: "法律状态",
+                type: "String",
+                value: "simpleStatus",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "SS",
+                groupBy: "typeStatus",
+                optionValue: [
+                  {
+                    label: "有效",
+                    value: "1",
+                  },
+                  {
+                    label: "无效",
+                    value: "2",
+                  },
+                  {
+                    label: "审中",
+                    value: "3",
+                  },
+                ],
+              },
+              {
+                name: "专利类型",
+                type: "String",
+                value: "patentType",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "PT",
+                groupBy: "typeStatus",
+                optionValue: [
+                  {
+                    label: "发明",
+                    value: "1罒8",
+                  },
+                  {
+                    label: "实用新型",
+                    value: "2罒9",
+                  },
+                  {
+                    label: "外观",
+                    value: "3",
+                  },
+                ],
+              },
+              {
+                name: "优先权国家",
+                type: "String",
+                value: "priorityCountry",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "PRCO",
+                groupBy: "nation",
+              },
+              {
+                name: "优先权日",
+                type: "DateTime",
+                value: "priorityDate",
+                ifStats: true,
+                ifGroup: true,
+                filedKind: -1,
+                field: "PRD",
+                groupBy: "dateType",
+              },
+            ];
+            var data2 = [];
+            data.forEach((item) => {
+              if (item.filedKind == -1) {
+                item.value = item.field;
+              }
+              if (item.filedKind == 0 && item.type == "tree") {
+              } else {
+                data2.push(item);
+              }
+            });
+            this.$store.commit("SET_SYSTEM_FIELD", data2);
+            this.$store.commit("SET_CHART_FORM", this.form);
+          },
+          readyAnalysis() {
+            this.selected = this.$store.state.chart.selected;
+            this.submit();
+          },
+          submit() {
+            if (!this.form.schema.x.field) {
+              this.$message.error("请选择一维数据");
+              return false;
+            } else {
+              if (this.form.source.x.length == 0) {
+                this.$message.error("一维数据为空");
+                return false;
+              }
+            }
+            if (this.form.schema.y.field) {
+              if (this.form.source.y.length == 0) {
+                this.$message.error("二维数据为空");
+                return false;
+              }
+            }
+            const chartType = this.$constants.chartType.find(
+              (c) => c.value === this.form.setting.type
+            );
+            const { op, cg } = detectionChartType(chartType || {}, this.form);
+            if (op && cg) {
+              this.resetChartType();
+            }
+      
+            this.getDataCount();
+          },
+          async getDataCount() {
+            var data = {};
+            var sign = false;
+            var count = [];
+            var dimensions = [];
+            if (this.form.schema.x.field && this.form.schema.y.field) {
+              sign = true;
+              dimensions = ["x", "y"];
+            } else {
+              sign = false;
+              dimensions = ["x"];
+            }
+            if (!this.form.setting.type) {
+              if (sign) {
+                this.form.setting.type = 2;
+              } else {
+                this.form.setting.type = 1;
+              }
+            } else {
+              var chartType = this.$constants.chartType.find((item) => {
+                return item.value == this.form.setting.type;
+              }).type;
+              if (sign && chartType == 1) {
+                this.form.setting.type = 2;
+              } else if (!sign && chartType == 2) {
+                this.form.setting.type = 1;
+              }
+            }
+            dimensions.forEach((dimension) => {
+              var form = this.form;
+              var obj = form.schema[dimension];
+              this.loading = true;
+              if (obj.fieldKind == 0) {
+                count.push({
+                  field: "field",
+                  fieldId: form.schema[dimension].field,
+                  topN: form.schema[dimension].num,
+                  values: this.selected[dimension],
+                });
+              } else if (form.schema[dimension].type == "DateTime") {
+                count.push({
+                  field: form.schema[dimension].field,
+                  topN: form.schema[dimension].num,
+                  format: form.schema[dimension].expand,
+                  values: this.selected[dimension],
+                });
+              } else {
+                if (["classify"].includes(form.schema[dimension].groupBy)) {
+                  count.push({
+                    field: form.schema[dimension].expand,
+                    topN: form.schema[dimension].num,
+                    values: this.selected[dimension],
+                  });
+                } else {
+                  count.push({
+                    field: form.schema[dimension].field,
+                    topN: form.schema[dimension].num,
+                    values: this.selected[dimension],
+                  });
+                }
+              }
+            });
+      
+            var params = {
+              ...this.form.search,
+              countVOS: count,
+            };
+            try {
+              const response = await this.$api.esCountAnalysis(params);
+              if (sign) {
+                var res = Object.keys(response.data.analyseMap);
+                for (var i = 0; i < res.length; i++) {
+                  var analyseMapData = response.data.analyseMap[res[i]];
+                  var obj = {};
+                  for (var j = 0; j < analyseMapData.length; j++) {
+                    var name = analyseMapData[j].name;
+                    obj[name] = analyseMapData[j].number;
+                  }
+                  var key = res[i];
+                  data[key] = obj;
+                }
+              } else {
+                for (var i = 0; i < response.data.detailDTOS.length; i++) {
+                  var key = response.data.detailDTOS[i].name;
+                  data[key] = response.data.detailDTOS[i].number;
+                }
+              }
+            } catch (e) {
+              data = [];
+            }
+            this.count = data;
+      
+            var data = {
+              form: this.form,
+              count: this.count,
+              selectedData: this.selected,
+              other: {
+                search: {
+                  projectId: 330,
+                  searchQuery: "", //检索条件
+                  customFields: [],
+                  orderDTOList: [], //排序信息
+                },
+                type: 3,
+              },
+            };
+      
+            this.$refs.editor1.showCharts(data);
+          },
+          imageData(imageData, edit) {
+            if (!edit) {
+              return false;
+            }
+            var data = imageData.data;
+            if (!data.other || data.other.type != 3) {
+              return;
+            }
+            var form = {
+              ...data.form,
+              search: data.other.search,
+            };
+            this.$store.commit("SET_CHART_FORM", form);
+            this.$store.commit("SET_CHART_SELECTED", data.selectedData);
+            this.isEdit = true;
+            this.$nextTick(() => {
+              this.isEdit = false;
+            });
+          },
+    },
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 4246 - 0
src/views/components/editor/mixins/ready.js