南昌市物联网技防平台-前端
Administrator
2021-03-22 0c1a6d462b3d8440b66fc15552b3e2b1064acb3a
src/views/parcel/parcel.vue
@@ -52,6 +52,7 @@
          dialogClickModal: false,
          headerAlign: 'center',
          align: 'center',
          tree:true,
          column: [
            {
              label: '坐标',
@@ -77,22 +78,81 @@
              prop: "imgUrl",
            },
            {
              label: "过包裹时间",
              label: "过机时间",
              prop: "samplingTime",
            },
            {
              label: "过机时间",
              prop: "dateTime",
              type: "datetime",
              format: "yyyy-MM-dd HH:mm:ss",
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              searchRange: true,
              searchSpan: 8,
              hide: true,
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              search: true,
              rules: [
                {
                  required: true,
                  message: "请输入时间",
                  trigger: "blur"
                }
              ]
            },
            {
              label: "是否违禁",
              prop: "sex",
              prop: "mechineMark",
              dicData: [
                {
                  label: "是",
                  value: 1
                },
                {
                  label: "否",
                  value: 0
                },
              ]
            },
            {
              label: "是否违禁",
              search: true,
              searchLabelWidth: 120,
              searchSpan: 4,
              hide: true,
              prop: "decisioDiagramResult",
              type: "select",
              dicData: [
                {
                  label: "是",
                  value: "1"
                  value: "contraband"
                },
                {
                  label: "否",
                  value: "0"
                  value: "normal"
                },
              ]
            },
            {
              label: "违禁包裹物品",
              prop: "decisioDiagramResultDetails",
            }
          ],
          group: [
            {
              label: '违禁品信息',
              prop: 'coordsDetailVoList',
              column: [
                {
                  label: '违禁品名称',
                  prop: 'objName'
                },
                {
                  label: '违禁品编号',
                  prop: 'objCode'
                }
              ]
            }
          ]
@@ -154,16 +214,48 @@
        this.onLoad(this.page, this.query);
      },
      onLoad(page, params = {}) {
        this.loading = true;
        params ={
          status:this.$route.query.status,
          type:this.$route.query.type
        const { dateTime } = this.query;
        let values = {
          ...params,
        };
        if (this.$route.query.type && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) {
            if (this.$route.query.status != undefined && this.$route.query.status != null && this.$route.query.status == "" ) {
              this.activeClass = this.$route.query.type;
              this.page.currentPage = 1;
              params = {
                status:this.$route.query.status,
                type:this.$route.query.type
              }
            } else {
              this.activeClass = 0;
              this.page.currentPage = 1;
              params = {
                type:this.$route.query.type
              };
            }
        }
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            ...this.query,
          };
          values.dateTime = null;
        } else {
          values = {
            ...params,
            ...this.query,
          };
        }
        this.loading = true;
        getList(page.currentPage, page.pageSize,values).then(res => {
          const data = res.data.data;
          console.log(data,111);
          this.page.total = data.totalSize;
          this.data = data.records;
          this.data = data.data;
          this.loading = false;
          this.selectionClear();
        });