Selaa lähdekoodia

Merge branch 'master' of http://49.4.49.126:3000/GYEE_R.D/SIS_Web

# Conflicts:
#	src/views/point.vue
maxiaoxia 3 vuotta sitten
vanhempi
commit
fde0a1c664
2 muutettua tiedostoa jossa 12 lisäystä ja 49 poistoa
  1. 1 0
      package.json
  2. 11 49
      src/views/point.vue

+ 1 - 0
package.json

@@ -11,6 +11,7 @@
     "core-js": "^3.6.5",
     "echarts": "^5.0.0",
     "element-ui": "^2.4.5",
+    "stompjs": "^2.3.3",
     "vue": "^2.6.11",
     "vue-json-excel": "^0.3.0",
     "vue-router": "^3.2.0",

+ 11 - 49
src/views/point.vue

@@ -32,21 +32,18 @@
         collapse-tags
         filterable
       ></el-cascader>
-      <el-button type="primary" @click="search">查询</el-button>
+      <el-button type="primary" @click="search" >查询</el-button>
 
       <download-excel
         class="export-excel-wrapper"
         :data="tableData"
         :fields="json_fields"
         :name="excelTitle"
-        :disabled="disabled"
+         :disabled='disabled'
       >
         <!-- 上面可以自定义自己的样式,还可以引用其他组件button -->
         <el-button type="primary">导出EXCEL</el-button>
       </download-excel>
-      <el-button type="primary" @click="Formdialog = true"
-        >保存到数据库</el-button
-      >
     </div>
     <el-table :data="tableData" style="width: 100%">
       <el-table-column
@@ -58,19 +55,6 @@
       >
       </el-table-column>
     </el-table>
-    <el-dialog title="选择数据库表" :visible.sync="Formdialog" width="45%">
-      <el-select v-model="value2" placeholder="请选择" filterable>
-        <el-option
-          v-for="item in tableList"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
-        >
-        </el-option>
-      </el-select>
-      <el-button type="primary" @click="saveUnionTable">确认保存</el-button>
-      <el-button @click="Formdialog = false">取消</el-button>
-    </el-dialog>
   </div>
 </template>
 <script>
@@ -78,16 +62,14 @@ import XLSX from "xlsx";
 export default {
   data() {
     return {
-      Formdialog: false,
-      disabled: true,
-      excelTitle: "" || "excel",
+      disabled:true,
+      excelTitle:'' || 'excel',
       props: { multiple: true },
       tableData: [{}],
       excelData: [],
       arr: [],
       value: "",
       value1: "",
-      value2: "",
       tableList: [],
       options: [],
       json_fields: {},
@@ -162,16 +144,16 @@ export default {
             }
           }
           this.arr = arr;
-          console.log(arr);
+          console.log(arr)
           var cluHead = {};
-          for (let i in arr) {
-            cluHead[arr[i]] = arr[i];
+          for(let i in arr){
+            cluHead[arr[i]] = arr[i]
           }
-          console.log(cluHead);
-          this.json_fields = cluHead;
+          console.log(cluHead)
+          this.json_fields = cluHead
           this.$nextTick(() => {
             this.tableData = json;
-            this.disabled = false;
+            this.disabled = false
           });
         })
         .catch(function (error) {
@@ -180,7 +162,7 @@ export default {
     },
 
     handleChange(file, fileList) {
-      this.excelTitle = file.name;
+      this.excelTitle = file.name
       const fileReader = new FileReader();
       fileReader.onload = (ev) => {
         try {
@@ -200,26 +182,6 @@ export default {
       };
       fileReader.readAsBinaryString(file.raw);
     },
-    saveUnionTable() {
-      this.$http
-        .post("UnionTable/saveData", this.value2 )
-        .then((res) => {
-          console.log(res.data);
-          if (res.data == "保存成功") {
-            this.$message({
-              type: "success",
-              message: "保存成功!",
-            });
-            this.Formdialog = false;
-          } else {
-            this.$message({
-              type: "fail",
-              message: "保存失败!",
-            });
-          }
-        });
-      this.Formdialog = false;
-    },
   },
 };
 </script>