history.vue 4.43 KB
Newer Older
xd's avatar
xd committed
1 2
<template>
  <div class="main">
xd's avatar
xd committed
3 4
    <div class="titles" style="height:40px;">
      <span>同步成员历史</span>
xd's avatar
xd committed
5 6 7
      <el-button class="button buttondark" size="small" @click="handleCancel"
        >返回</el-button
      >
xd's avatar
xd committed
8 9 10 11 12 13
    </div>
    <div class="lists">
      <el-table
        stripe
        class="list"
        ref="multipleTable"
xd's avatar
xd committed
14
        :data="main"
xd's avatar
xd committed
15 16 17
        tooltip-effect="dark"
        style="width: 100%"
        :header-cell-style="setListsHeadStyle"
xd's avatar
xd committed
18
        height="calc(100vh - 300px)"
xd's avatar
xd committed
19
      >
xd's avatar
xd committed
20 21
        <el-table-column
          label="序号"
xd's avatar
xd committed
22
          width="120"
xd's avatar
xd committed
23 24 25
          type="index"
          align="center"
        ></el-table-column>
xd's avatar
xd committed
26
        <el-table-column label="头像" align="center" width="240" >
xd's avatar
xd committed
27
          <template slot-scope="scope">
xd's avatar
xd committed
28
              <span><img :src="scope.row.thumbAvatar" alt="" style="width:60px;height60px;"></span>
xd's avatar
xd committed
29 30
          </template>
        </el-table-column>
xd's avatar
xd committed
31
        <el-table-column
xd's avatar
xd committed
32
          prop="userName"
xd's avatar
xd committed
33 34
          label="姓名"
          align="center"
xd's avatar
xd committed
35
           width="240"
xd's avatar
xd committed
36 37
        ></el-table-column>
        <el-table-column
xd's avatar
xd committed
38 39
          prop="userId"
          label="企业微信号"
xd's avatar
xd committed
40 41 42 43 44 45
          align="center"
        ></el-table-column>
        <el-table-column
          prop="bar"
          label="更新时间"
          align="center"
xd's avatar
xd committed
46
    
xd's avatar
xd committed
47 48 49 50 51
        ></el-table-column>
      </el-table>
    </div>
    <div class="pages">
      <el-pagination
xd's avatar
xd committed
52 53 54 55 56 57 58
        @current-change="handleCurrentChange"
        :current-page="page.currentPage"
        :page-size="page.size"
        layout="total, prev, pager, next, jumper"
        :total="page.total"
      >
      </el-pagination>
xd's avatar
xd committed
59 60 61 62
    </div>
  </div>
</template>
<script>
xd's avatar
xd committed
63
import { getHistoryList } from "@/api/in/mail"
xd's avatar
xd committed
64
export default {
xd's avatar
xd committed
65
  
xd's avatar
xd committed
66
  data() {
xd's avatar
xd committed
67
    return {
xd's avatar
xd committed
68 69
      main: [],
      list: {      
xd's avatar
xd committed
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
        search: {
          bar: [
            {
              id: "1",
              name: "全部"
            },
            {
              id: "2",
              name: "测试"
            }
          ],
          taskType: [
            {
              id: "1",
              name: "全部"
            },
            {
              id: "2",
              name: "测试"
            }
          ]
        }
      },
      data: {
        search: {
          bar: "",
          taskType: "",
          date: "",
          keys: ""
        }
      },
xd's avatar
xd committed
101 102 103 104
      isShow: true,
      page: {
        currentPage: 1,
        size: 20,
wengjianling's avatar
wengjianling committed
105
        total: 0
xd's avatar
xd committed
106 107
      },
    };
xd's avatar
xd committed
108
  },
xd's avatar
xd committed
109 110 111
  created() {
    this.getList()
  },
xd's avatar
xd committed
112
  methods: {
xd's avatar
xd committed
113
    getList() {      
xd's avatar
xd committed
114 115 116 117
      let params = {
        pageNum: 1
      }
      getHistoryList(params).then(res => {
wengjianling's avatar
wengjianling committed
118 119 120
        // console.log(res,"res");
        this.main = res.data.pageInfo.list
        this.page.total = Number(res.data.pageInfo.total)
xd's avatar
xd committed
121 122
      })
    },
xd's avatar
xd committed
123
    setListsHeadStyle({ row, column, rowIndex, columnIndex }) {
xd's avatar
xd committed
124
      if (rowIndex === 0) {
xd's avatar
xd committed
125
        return "background-color: #0B0F32; border-right: 1px solid white;color: white;";
xd's avatar
xd committed
126
      } else {
xd's avatar
xd committed
127
        return "";
xd's avatar
xd committed
128 129
      }
    },
xd's avatar
xd committed
130 131 132 133
    handleCurrentChange() {},
    handleCancel() {
      this.isShow = false;
      this.$emit("isShow", false);
xd's avatar
xd committed
134 135
    }
  }
xd's avatar
xd committed
136
};
xd's avatar
xd committed
137 138
</script>
<style lang="scss" scoped>
xd's avatar
xd committed
139 140 141 142 143 144 145 146
.titles {
  height: 48px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f8f8f8;
}
xd's avatar
xd committed
147
.btn {
xd's avatar
xd committed
148 149 150
  font-size: 14px;
  font-weight: bold;
  color: rgba(102, 102, 102, 1);
xd's avatar
xd committed
151 152
}
.main {
xd's avatar
xd committed
153
  width: 100%;
xd's avatar
xd committed
154 155 156 157
  position: relative;
  background-color: #fff;
  box-sizing: border-box;
  height: 100%;
xd's avatar
xd committed
158 159 160 161
  padding: 0px 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
xd's avatar
xd committed
162
  box-shadow: 0px 2px 4px 0px #ddd;
xd's avatar
xd committed
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
}
.searchs {
  height: 40px;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.buttons {
  width: 266px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}
.buttonlight {
  background-color: #e8e9fe;
  color: #4e59c7;
  border: 1px solid #4e59c7;
  box-sizing: border-box;
}
xd's avatar
xd committed
184

xd's avatar
xd committed
185 186 187 188 189 190 191 192
.buttondark {
  width: 88px;
  height: 32px;
  background-color: #4e59c7;
  color: #ffffff;
  border: 1px solid #4e59c7;
  box-sizing: border-box;
}
xd's avatar
xd committed
193

xd's avatar
xd committed
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
.searchzone {
  height: 40px;
  width: auto;
  min-width: 654px;
  text-align: right;
}
.lists {
  height: auto;
  min-height: 70%;
  width: 100%;
  margin-top: 20px;
}
.listButtonRed {
  color: red;
}
.pages {
  height: 40px;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
}
</style>