Browse Source

no message

linwenxin 4 months ago
parent
commit
c1ac7f84eb
3 changed files with 13 additions and 6 deletions
  1. 3 3
      package-lock.json
  2. 1 1
      package.json
  3. 9 2
      src/components/template/template-page-1.vue

+ 3 - 3
package-lock.json

@@ -4761,9 +4761,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.15.0",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.15.0.tgz",
-      "integrity": "sha512-8Jo7YCwzmIuENfCB6I11TtOUW/MRuFq+lk+n4hFL8m9D7uyGfjvCost5S5qOxIE6ZRo6Iy2oBu+jUcp/SXpnlA==",
+      "version": "2.15.1",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.15.1.tgz",
+      "integrity": "sha512-5Znud9dfeNxLOllQUKbHQ2xRJgwosl/PHAGixqTNC3CBRgUnqsNR4znTC8ACeDyaXYj4GWRpmO1QjApdqTJmZg==",
       "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.15.0",
+    "@zjlib/element-plugins": "^2.15.1",
     "@zjlib/element-ui2": "^1.0.3",
     "axios": "0.18.1",
     "chatgpt": "^4.1.2",

+ 9 - 2
src/components/template/template-page-1.vue

@@ -523,6 +523,13 @@ export default {
       )
       return this.$refs.zjpage.parameterAnalysis({ querylist: querylist_ })
     },
+    processString(input) {
+      // 去除首尾的空格和换行符
+      let trimmedString = input.trim()
+      // 将字符串中的换行符替换为逗号
+      let result = trimmedString.replace(/\n+/g, ',')
+      return result
+    },
     // 导出
     export() {
       this.columnList = this.$refs.zjpage.columnList.filter(item => !item.hidden)
@@ -550,10 +557,10 @@ export default {
           if (
             // item.compare === '=' &&
             typeof item.value === 'string' &&
-            (~item.value.indexOf(',') || ~item.value.indexOf(','))
+            (item.value.includes(',') || item.value.includes(',') || item.value.includes('\n'))
           ) {
             // 去除换行
-            var str = item.value.replace(/\\n/g, '')
+            var str = this.processString(item.value)
             // 去除空格
             str = str.replace(/[\t\r\f\n\s]*/g, '')
             // 转中文逗号