yangfeng
2023-09-21 d80ad3aedde35c8edd6e992266bff52f8ec0e5c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<template>
  <div class="rightContent">
    <div class="top">
      <SearchCommonView :show-add="false" :placeholder="'请输入产品名称'" :amount-view="false" @searchClick="getList" />
    </div>
    <div class="content">
      <div class="list-view">
        <div
          class="overview-box"
          v-for="item in tableList"
          :key="item.id"
          :class="{
            overview_active: item.baseOperationType === 1,
            overview_done: item.baseOperationType === 2,
            overview_todo: item.baseOperationType === 3
          }"
        >
          <div class="top">
            <div class="label">
              <span style="cursor: pointer" @click="labelClick(item)">{{ item.name }}</span>
            </div>
            <div class="set">...</div>
          </div>
          <div class="bottom">
            <div class="left">
              <div class="left_view">
                <span>2</span>
                <span style="margin-left: 5px">待处理</span>
              </div>
            </div>
            <div class="right">
              <div class="right_status">
                <span style="cursor: pointer">2 正在等待</span>
              </div>
              <div class="right_status" style="margin-top: 5px">
                <span style="cursor: pointer">4 延期</span>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
      </div>
    </div>
  </div>
</template>
 
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getOperationType } from "@/api/overview/overview"
 
export default {
  name: "OverView",
  mixins: [pageMixin],
  props: {},
  components: {},
  computed: {},
  data() {
    return {
      tableList: [],
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
      }
    }
  },
  created() {
    this.getData()
  },
  methods: {
    getList(val) {
      console.log(val)
    },
    labelClick(item) {
      console.log(item)
      this.$router.push({
        name: "overviewList",
        params: { name: item.name, workType: item.baseOperationType, id: item.id }
      })
    },
    async getData() {
      await getOperationType({
        keyword: "",
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        console.log(res.data.data)
        if (res.data.code === 200) {
          const list = res.data.data.map((item) => {
            return {
              ...item
            }
          })
          this.tableList = list || []
          this.pagerOptions.totalCount = res.data.total
        }
      })
    }
  }
}
</script>
 
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.content {
  height: calc(100% - 130px);
  background: #fff;
  border-radius: 12px;
  .list-view {
    padding: 20px 0 0px 20px;
    height: calc(100% - 70px);
    overflow: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    .overview-box {
      min-width: 308px;
      height: 140px;
      margin-bottom: 10px;
      margin-right: 20px;
      border: 1px solid #dee2e6;
      box-shadow: inset 0 0 2px #dee2e6;
      -moz-box-shadow: inset 0 0 2px #dee2e6;
      -webkit-box-shadow: inset 0 0 2px #dee2e6;
      .top {
        height: 35px;
        line-height: 35px;
        display: flex;
        .label {
          margin-left: 20px;
        }
        .set {
          margin-left: auto;
          margin-right: 20px;
          font-size: 20px;
          cursor: no-drop;
          color: #000;
          transform: rotate(-90deg);
          -moz-transform: rotate(-90deg);
          -webkit-transform: rotate(-90deg);
        }
      }
      .bottom {
        display: flex;
        font-size: 13px;
        .left {
          width: 50%;
          // background: #1d80e2;
          .left_view {
            margin-left: 20px;
            height: 30px;
            line-height: 30px;
            padding: 0 5px;
            width: 70px;
            text-align: center;
            color: #fff;
            background: #081e44;
            border-radius: 4px;
            cursor: pointer;
          }
        }
        .right {
          width: 50%;
          .right_status {
          }
        }
      }
    }
    .overview_active {
      border-left: 4px solid #1d80e2;
    }
    .overview_done {
      border-left: 4px solid #1de27f;
    }
    .overview_todo {
      border-left: 4px solid #e2441d;
    }
  }
}
</style>