Browse Source

no message

linwenxin 2 tháng trước cách đây
mục cha
commit
a3bca67810

+ 3 - 3
package-lock.json

@@ -4761,9 +4761,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.16.0",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.16.0.tgz",
-      "integrity": "sha512-buUD/42d2Cky43EW+G30dhUDaZlj4JWcIhD102c1JwK0fnVuKhsG0BBgoS9x0qrF3BevulID+74R7CQV3buBiA==",
+      "version": "2.17.0",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.17.0.tgz",
+      "integrity": "sha512-I4li2mOPOLQSSGBTzuUneLfLsdoJ76hsrSrGU3028QnhprVHAS8o2CyPwUzFiSL9sj6Jiw3QkiNOqPxA79Y/nA==",
       "requires": {
         "@turf/turf": "^6.5.0",
         "@vuemap/vue-amap": "^0.1.12",

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "@jiaminghi/data-view": "^2.10.0",
     "@turf/turf": "^6.5.0",
     "@vue/composition-api": "^1.7.1",
-    "@zjlib/element-plugins": "^2.16.0",
+    "@zjlib/element-plugins": "^2.17.0",
     "@zjlib/element-ui2": "^1.0.3",
     "axios": "0.18.1",
     "chatgpt": "^4.1.2",

+ 10 - 0
src/components/template/template-page-1.vue

@@ -28,6 +28,8 @@
       :filterMethod="filterMethod"
       :sortMethod="sortMethod"
       :moreParameters="moreParameters"
+      :searchSelectOnChanre="searchSelectOnChanre"
+      :searchSelectDynamicData="searchSelectDynamicData"
     >
       <template slot="more-search">
         <slot name="moreSearch"></slot>
@@ -85,6 +87,14 @@ export default {
       type: Object,
       default: () => ({})
     },
+    searchSelectOnChanre: {
+      type: Object,
+      default: () => ({})
+    },
+    searchSelectDynamicData: {
+      type: Object,
+      default: () => ({})
+    },
     // 表格列解析渲染数据更改
     columnParsing: {
       type: Function

+ 38 - 1
src/views/workOrder/qualityFeedback/index.vue

@@ -10,6 +10,8 @@
     :operation="operation()"
     :moreParameters="moreParameters"
     :expName="expName"
+    :searchSelectDynamicData="searchSelectDynamicData"
+    :searchSelectOnChanre="searchSelectOnChanre"
   >
     <div class="cartographer_big">
       <el-dialog title="配置" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
@@ -161,9 +163,44 @@ export default {
       createWebsitList: [],
       statusTypeList: [],
       expName: '',
-      kaiguan: true
+      kaiguan: true,
+      searchSelectDynamicData: {
+        PRODUCT_CATEGORY: [],
+        PRODUCT_SUBCLASS: []
+      },
+      searchSelectOnChanre: {
+        // 产品大类
+        PRODUCT_CATEGORY: (v, data) => {
+          data.queryData.find(item => item.param === 'a.small_id').value = ''
+          this.searchSelectDynamicData.PRODUCT_SUBCLASS = this.PRODUCT_SUBCLASS.filter(item => item.parentId === v)
+        },
+        // 产品小类
+        PRODUCT_SUBCLASS: (v, data) => {}
+      }
     }
   },
+  created() {
+    getClassifyList({ type: 2, status: true }).then(res => {
+      var classifyListLv2 = []
+      this.searchSelectDynamicData.PRODUCT_CATEGORY = res.data.map(item => {
+        var { children, ...data } = item
+        classifyListLv2.push(
+          ...(children || []).map(item => {
+            return {
+              label: item.name,
+              value: item.categoryId,
+              parentId: item.parentId
+            }
+          })
+        )
+        return {
+          label: item.name,
+          value: item.categoryId
+        }
+      })
+      this.PRODUCT_SUBCLASS = classifyListLv2
+    })
+  },
   computed: {
     moreParameters() {
       return [