美文网首页
element-ui steps 查看物流进度步骤条

element-ui steps 查看物流进度步骤条

作者: web30 | 来源:发表于2022-08-26 11:41 被阅读0次
    image.png
    <!-- 查看物流 -->
        <el-drawer
          title="查看物流"
          :size="700"
          :visible.sync="drawerDetailVisible"
          direction="rtl">
          <div class="drawer" v-loading="isLoadingDialog">
            <div class="title">物流单号:{{detailCode}}</div>
            <div class="steps-wrap" v-if="detailData && detailData.length">
              <el-steps class="steps" direction="vertical" process-status="finish" :active="0">
                <el-step 
                   v-for="(item, index) in detailData" 
                    :icon="!index ? 'el-icon-document-checked' : 'el-icon-success'" 
                    :key="index" 
                    :title="item.opeTitle">
                  <div slot="description">
                    <p class="row-remark">{{item.opeRemark}}</p>
                    <p class="row-time">{{item.opeTime}}</p>
                  </div>
                </el-step>
              </el-steps>
            </div>
          </div>
        </el-drawer>
    
    <script>
      <export default{
        data(){
          isLoadingDialog: false,
          drawerDetailVisible: false, // 查看物流弹窗
          detailCode: '', // 查看的物流单号
          detailData: [], // 物流详情
        },
        methods:{
          handleViewDetail(row) {
          const params = {
            id: row.id
          }
          this.isLoadingDialog = true
          this.drawerDetailVisible = true
          this.detailCode = row.wldh
          this.$requestInternet.get('/api/xx', { params }).then(res => {
            this.detailData = res
            // 也可以这样写 
            //  this.detailData = res.reverse()
          }).catch(() => {
            this.detailData = []
          }).finally(() => {
            this.isLoadingDialog = false
          })
          }
        }
      }
    </script>
    

    相关文章

      网友评论

          本文标题:element-ui steps 查看物流进度步骤条

          本文链接:https://www.haomeiwen.com/subject/yfutnrtx.html