Procházet zdrojové kódy

配置下拉搜索

chenrui  před 2 roky
rodič
revize
0f31701056

+ 2 - 1
src/views/securityCheck/components/securityCheckHeader.vue

@@ -68,6 +68,7 @@
       <template v-if="withSelect">
         <a-form-item prop="selection" style="margin-right: 16px">
           <a-select
+            :mode="mode"
             :placeholder="selectPlaceholder"
             :value="formData.selection ? formData.selection : undefined"
             @change="handleChange"
@@ -136,7 +137,7 @@ export default {
   props: {
     mode: {
       type: String,
-      default: "combobox",
+      default: "",
     },
     title: {
       type: String,

+ 17 - 19
src/views/securityCheck/views/cargoCharts.vue

@@ -6,6 +6,7 @@
         @change="change"
         :withExportButton="false"
         @search="search"
+        mode="combobox"
         selectPlaceholder="目的地"
         :optionLists="destination"
       />
@@ -52,7 +53,7 @@ import { agent, routeall } from "@/api/statistics/statistics.js";
 export default {
   data() {
     return {
-      multiple:"multiple",
+      multiple: "multiple",
       queryData: {
         beginDate: "",
         endDate: "",
@@ -197,19 +198,17 @@ export default {
     GraphicEchart,
     SecurityCheckHeader,
   },
-  created(){
+  created() {
     this.formatDate();
   },
   mounted() {
     if (Object.keys(this.$route.query).length !== 0) {
-      const { beginDate, endDate, places, proxyId } =
-        this.$route.query;
+      const { beginDate, endDate, places, proxyId } = this.$route.query;
       this.queryData.beginDate = beginDate;
       this.queryData.endDate = endDate;
-      if(typeof(places)=="string"){
+      if (typeof places == "string") {
         this.queryData.places = [places];
-      }
-      else{
+      } else {
         this.queryData.places = places;
       }
       this.queryData.proxyId = proxyId;
@@ -229,11 +228,11 @@ export default {
       this.queryData.endDate = `${myyear}-${mymonth}-${myweekday}`;
     },
     search(data) {
-      if(typeof(data[1])=="string"&&data[1]==""){
-        data[1] =[]
+      if (typeof data[1] == "string" && data[1] == "") {
+        data[1] = [];
       }
-      if(typeof(data[1])=="string"&&data[1]!=""){
-        data[1] = [data[1]]
+      if (typeof data[1] == "string" && data[1] != "") {
+        data[1] = [data[1]];
       }
       this.queryData = {
         beginDate: data[0][0],
@@ -247,11 +246,11 @@ export default {
     echar(data) {
       let params = {
         startTime: this.queryData.beginDate,
-          endTime: this.queryData.endDate,
-          destination:this.queryData.places,
-          agentCode: this.queryData.proxyId,
-          openResult: "",
-          riskRating: data,
+        endTime: this.queryData.endDate,
+        destination: this.queryData.places,
+        agentCode: this.queryData.proxyId,
+        openResult: "",
+        riskRating: data,
       };
       if (data == "总数") {
         params.riskRating = "";
@@ -264,7 +263,6 @@ export default {
     //货物关联统计接口
     async relationDate() {
       try {
-       
         // console.log(params);
         const result = await agent(this.queryData);
         if (result.status == 200) {
@@ -402,8 +400,8 @@ export default {
       }
     },
     change() {
-      let param = JSON.parse(JSON.stringify(this.queryData,))
-      param.places = param.places[0]
+      let param = JSON.parse(JSON.stringify(this.queryData));
+      param.places = param.places[0];
       this.$router.push({
         path: "./cargoRelevanceTable",
         query: this.queryData,

+ 1 - 0
src/views/securityCheck/views/cargoRelevanceTable.vue

@@ -5,6 +5,7 @@
         title="航空货物关联统计"
         @change="changeHandler"
         @search="searchHandler"
+        mode="combobox"
         selectPlaceholder="目的地"
         :optionLists="destination"
       />