Browse Source

修改扫楼设备族无法选择问题

zhangyu 5 years ago
parent
commit
6b64bfcc96
1 changed files with 3 additions and 51 deletions
  1. 3 51
      src/views/data_admin/buildData/index.vue

+ 3 - 51
src/views/data_admin/buildData/index.vue

@@ -1225,54 +1225,6 @@
                 this.createPicSwiper();
                 this.rowArr = rowArr;
             },
-            //插件修改
-            customDropdownRenderer(
-                instance,
-                td,
-                row,
-                col,
-                prop,
-                value,
-                cellProperties
-            ) {
-                var selectedId;
-                var optionsList = cellProperties.chosenOptions.data;
-                if (
-                    typeof optionsList === "undefined" ||
-                    typeof optionsList.length === "undefined" ||
-                    !optionsList.length
-                ) {
-                    Handsontable.renderers.TextRenderer(
-                        instance,
-                        td,
-                        row,
-                        col,
-                        prop,
-                        value,
-                        cellProperties
-                    );
-                    return td;
-                }
-                var values = (value + "").split(",");
-                value = [];
-                for (var index = 0; index < optionsList.length; index++) {
-                    if (values.indexOf(optionsList[index].code + "") > -1) {
-                        selectedId = optionsList[index].code;
-                        value.push(optionsList[index].name);
-                    }
-                }
-                value = value.join(", ");
-                Handsontable.renderers.TextRenderer(
-                    instance,
-                    td,
-                    row,
-                    col,
-                    prop,
-                    value,
-                    cellProperties
-                );
-                return td;
-            },
             //下层的弹窗不显示
             picNoShow() {
                 this.picShow = false;
@@ -1772,7 +1724,7 @@
                 }, {
                     editor: "chosen",
                     data: "Family",
-                    renderer: this.customDropdownRenderer,
+                    renderer: tools.customDropdownRenderer,
                     chosenOptions: {
                         data: this.AllFamily
                     }
@@ -1785,8 +1737,8 @@
                 if (arr.length) {
                     return arr.map(item => {
                         return {
-                            code: item.code,
-                            name: item.name
+                            Code: item.code,
+                            Name: item.name
                         };
                     });
                 } else {