modal-input-line.vue 3.44 KB
<template>
  <tui-modal :show="visible" padding="0px" background-color="transparent" @cancel="onCancel" :custom="true">
    <view class="modal-input-line">
      <view class="modal-input-line__content">
        <view v-for="(item, index) in orderStationList" class="line-item">
          <view>
            <view class="tip tip-s" v-if="index === 0">起</view>
            <view class="tip tip-e" v-else-if="index === orderStationList.length - 1">终</view>
            <view class="tip tip-p" v-else>经</view>
            <view class="tip-border" v-if="index !== orderStationList.length - 1"></view>
          </view>
          <view class="info">
            <view class="address"> {{ item.address || '' }} </view>
            <view class="node">
              <text>{{ item.thruDeptName || '' }}</text>
              <text v-if="item.workType === 1" class="n-tag n-tag-b">装</text>
              <text v-if="item.workType === 2" class="n-tag n-tag-y">卸</text>
              <view v-if="item.workType === 3" class="more-n">
                <text class="n-tag n-tag-b">装</text>
                <text class="n-tag n-tag-y">卸</text>
              </view>
            </view>
          </view>
        </view>
      </view>
      <view class="modal-input-line__footer">
        <view class="btn" @click="onCancel">知道了</view>
      </view>
    </view>
  </tui-modal>
</template>

<script>
export default {
  name: 'modal-input-line',
  props: {
    orderStationList: {
      type: Array,
      default: [],
    },
    visible: Boolean,
  },
  methods: {
    onCancel: function () {
      this.$emit('update:visible', false);
    },
  },
};
</script>

<style lang="scss">
.modal-input-line {
  background-color: #ffffff;
  border-radius: 20upx;
  padding: 49rpx 0 30rpx 0;
  &__content {
    padding: 0 20rpx 0 36rpx;
    .line-item {
      display: flex;
      .tip {
        width: 34rpx;
        height: 34rpx;
        border-radius: 50%;
        text-align: center;
        line-height: 34rpx;
        font-size: 22rpx;
      }
      .tip-s {
        background-color: #09acfe;
        color: #ffffff;
      }
      .tip-e {
        background-color: #fd7d07;
        color: #ffffff;
      }
      .tip-p {
        border: 2rpx solid #dddddd;
        color: #999999;
      }
      .tip-border {
        width: 1rpx;
        height: 68rpx;
        border: 3rpx solid #eef0f1;
        margin: 8rpx 0 8rpx 15rpx;
      }
      .info {
        margin-left: 15rpx;
        .address {
          margin-bottom: 12rpx;
          color: #2b2a27;
          font-size: 26rpx;
          font-weight: 700;
        }
        .node {
          color: #2b2a27;
          font-size: 24rpx;
          display: flex;
          .more-n {
            display: flex;
          }
          .n-tag {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-left: 15rpx;
            width: 32rpx;
            height: 32rpx;
            font-size: 22rpx;
            border-radius: 8rpx;
          }
        }
      }
    }
  }
  &__footer {
    display: flex;
    justify-content: center;
    margin-top: 32rpx;
    .btn {
      width: 564rpx;
      height: 82rpx;
      background: #2673fb;
      border-radius: 14rpx;
      color: #ffffff;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
  .n-tag-y {
    color: #fd7d07;
    background-color: #ffe9d6;
  }
  .n-tag-b {
    color: #09acfe;
    background-color: #ddf4ff;
  }
}
</style>