<template>
  <a-tabs ref="tabs" :class="[$style.myDispute, 'sd-has-table']">
    <template>
      <span slot="tabBarExtraContent" :class="$style.morebtn" @click="mored">查看更多 ></span>
    </template>

    <a-tab-pane key="myDispute" :class="$style.panel">
      <span slot="tab">
        <div :class="$style.bluePoint"></div> 在办纠纷<span
          v-show="shownum"
          :class="$style.disputeNums"
          >{{ disputeNums }}</span
        >
      </span>
      <my-dispute-list
        :max-results="6"
        :search-fields="[]"
        :hide-pagination="true"
        module-id="283805356673781760"
        form-list-id="285198500736221184"
        :order-by="['IMPORTANT', 'JF_LAST_MODIFY_TIME']"
        @setNums="setNums"
      />
    </a-tab-pane>
  </a-tabs>
</template>

<script>
import storeMixin from '@/common/store-mixin'
import MyDisputeList from '../case/law-my-case-list.vue'
import components from './_import-components/law-my-dispute-import'

export default {
  name: 'LawMyDispute',
  metaInfo: {
    title: '在办纠纷',
  },
  components: {
    ...components,
    'my-dispute-list': MyDisputeList,
  },
  mixins: [storeMixin],
  data() {
    return {
      disputeNums: 0,
      shownum: false,
    }
  },
  methods: {
    mored(type) {
      this.$router.push(`/sd-frame/law-all-dispute-list`)
    },
    setNums(num) {
      this.disputeNums = num
      this.shownum = true
    },
  },
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
.morebtn {
  font-size: 14px;
  cursor: pointer;
}
.syncbtn {
  margin-right: 10px;
  cursor: pointer;
}
.item {
  .body > div {
    border: 1px solid #eee;
    padding: 0.5rem 0;
  }
}
.my-dispute {
  background: transparent;
  :global(.ant-tabs-tab-active) {
    color: #000000 !important;
    font-weight: 600 !important;
    span {
      padding-left: 5px;
    }
  }
  :global(.ant-tabs-ink-bar-animated) {
    display: none !important;
  }
  :global(.ant-tabs-bar) {
    border: none !important;
  }
  :global(.ant-tabs-top-bar) {
    margin: 0 0 5px 0;
  }
}
.blue-point {
  background: #2775e2;
  width: 5px;
  height: 20px;
  position: absolute;
  border-radius: 5px;
  left: 0px;
  top: 9px;
}
.dispute-nums {
  background: #efefef;
  width: 35px;
  display: inline-block;
  border-radius: 15px;
  font-size: 10px;
  text-align: center;
  padding: 0 !important;
  margin-left: 7px;
}
</style>
