南昌市物联网技防平台-前端
shuishen
2021-03-31 89d4495d39f259d3cf4a76831b607547d3d4a464
src/views/parcel/parcel.vue
@@ -36,6 +36,7 @@
    <template>
      <div>
          <el-image-viewer 
              class="img"
              v-if="showViewer" 
              :on-close="closeViewer" 
              :url-list="['data:image/png;base64,'+imgUrl]" />
@@ -60,9 +61,6 @@
        showViewer: false, // 显示查看器
        imgUrl:'',
        loading: true,
        dialogTableVisible: false,
        parcelConversation:false,
        oldParcelSatart:false,
        page: {
          pageSize: 10,
          currentPage: 1,
@@ -138,6 +136,7 @@
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              searchRange: true,
              searchSpan: 8,
              searchValue:[this.getStartTime(),this.getEndTime()],
              hide: true,
              addDisplay: false,
              editDisplay: false,
@@ -168,6 +167,7 @@
            {
              label: "是否违禁",
              search: true,
              searchValue: this.getIsKindParams(),
              searchLabelWidth: 120,
              searchSpan: 4,
              hide: true,
@@ -246,6 +246,23 @@
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      getStartTime(){
           if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) {
             return this.$route.query.startTime
           }
      },
      getEndTime(){
           if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) {
             return this.$route.query.endTime
           }
      },
      getIsKindParams(){
        if(this.$route.query.decisioDiagramResult && this.$route.query!='' && this.$route.query!=null && this.$route.query!=undefined){
          //回显
          return this.$route.query.decisioDiagramResult
        }
      },
      //给行加颜色
      rowStyle({row, column, rowIndex}){
         if(row.mechineMark==1){
           return {
@@ -282,7 +299,6 @@
              }
            }
        }
        if (dateTime) {
          values = {
@@ -323,3 +339,10 @@
    }
  };
</script>
<style lang="scss">
    .img {
      .el-icon-circle-close {
        color: white;
      }
    }
</style>