hejianhao
2025-04-16 dab2d210ca06c1faa514c6388fbd5de1ab355360
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<template>
  <div class='old_record'>
    <v-header
      title="生存认证记录"
      :bar="bar"
      search
      @on-search="onSearch"
    ></v-header>
    <div class="tool flex">
      <!-- <span
        :class="{'active':timed}"
        @click="timed=true"
      >本月</span>
      <span
        :class="{'active':!timed}"
        @click="timed=false"
      >上月</span> -->
      <!-- <span
        v-for="(text , index) in list"
        :key="index"
        :class="{timedIndex == index ?'active' : ''}"
        @click="timed"
      >{{text.name}}</span> -->
    </div>
    <div class="text">
      <p data-content="提示:">1.若生存认证资料不通过,请及时电话联系申请人或在系统添加反馈至申请人</p>
      <!-- <p>2.导出时建议按月筛选导出</p> -->
      <!-- <p>3.若某些老人已通过电话认证、已到现场认证等,社区可直接通过“线下认证”或“批量导入”操作添加线下已认证人员,系统会标注认证方式为“线下认证”</p> -->
    </div>
    <div class="table">
      <v-tool-table
        :trs="trs"
        :tds="tds"
      >
        <template v-slot:btn="{scope}">
          <div class="table_flex">
            <span @click="onShow(scope)">查看</span>
            <span
              @click="onSend(scope)"
              v-if="+scope.type!==2"
            >反馈</span>
          </div>
        </template>
        <template v-slot:type="{scope}">
          <b>{{['','视频认证','人脸核验'][scope.type]}}</b>
        </template>
      </v-tool-table>
    </div>
    <v-tool-page
      :item="paged"
      @on-page="onPage"
    ></v-tool-page>
  </div>
</template>
 
<script>
export default {
  props: {},
  components: {},
  data() {
    return {
      trs: [
        { text: "姓名", val: "authUserName" },
        { text: "身份证号", val: "idCard" },
        { text: "年龄", val: "age", width: "60px" },
        { text: "出生年月", val: "birthDay" },
        { text: "户籍地", val: "domicile" },
        // { text: "联系电话", val: "phone" },
        { text: "申请人", val: "sumitUserName" },
        { text: "申请账号", val: "sumitUserAccount" },
        { text: "认证时间", val: "createAt" },
        { text: "认证方式", val: "btn", slot: "type" },
        { text: "操作", val: "btn" },
      ],
      // list:[
      // {}
 
      // ],
      tds: [],
      bar: [
        { title: "姓名", name: "name" },
        { title: "身份证", name: "idCard" },
        {
          title: "认证时间-年",
          name: "year",
          type: "select",
          list: [
            {
              label:"2021",
              value:2021
            }
          ],
          value: "",
        },
        {
          title: "认证时间-月",
          name: "month",
          type: "select",
          list: [],
          value: "",
        },
        {
          title: "认证方式",
          name: "type",
          type: "select",
          list: ["全部", "视频认证", "人脸认证"].map((r, v) => {
            return { label: r, value: v > 0 ? v : "" };
          }),
        },
      ],
      paged: { page: 0, total: 0, r: 0, limit: 10 },
      timedIndex: 0,
      month: 0,
      search: {},
    };
  },
  watch: {
    timed(n) {
      this.bar[2].value = n
        ? this.month
        : this.month - 1 < 0
        ? 12
        : this.month - 1;
    },
  },
  created() {
    for (let i = 0; i <= 12; i++) {
      this.bar[3].list.push({
        label: i === 0 ? "全部" : i + "月",
        value: i === 0 ? "" : i,
      });
    }
  },
  methods: {
    onSearch(x) {
      this.search = x;
      this.paged.page = 1;
      this.init();
    },
    onPage(v) {
      if (v.page === this.paged.page && v.page && !v.reset) {
        return 0;
      }
      this.paged.page = v.page;
      this.paged.limit = v.limit;
      this.init();
    },
    // 反馈
    onSend(v) {
      this.$store.dispatch("setFixed", {
        event: "add",
        data: {
          title: "反馈",
          type: "old-recs",
          data: { id: v.id },
        },
        time: Date.now(),
      });
    },
    onShow(e) {
      this.$api.get("eldersauthrecords/" + e.id, {}, (ev) => {
        this.$store.dispatch("setFixed", {
          event: "add",
          data: {
            title: "查看",
            type: "old-rec",
            data: ev,
          },
          time: Date.now(),
        });
      });
    }, // 获取数据
    init() {
      let v = demo.copy(
        Object.assign({}, this.search, {
          pageNum: this.paged.page,
          pageSize: this.paged.limit,
        })
      );
      this.$api.post("eldersauthrecords/page", v, (e) => {
        this.paged.total = e.total;
        this.paged.r++;
        this.tds = (e.records || []).map((r) => {
          r.is_check = false;
          return r;
        });
      });
    },
  },
  mounted() {
    let a = demo.timeout("", "object");
    this.month = +a.m;
  },
};
</script>
<style lang='less' scoped>
.old_record {
  overflow-y: auto;
  .text {
    p {
      position: relative;
      padding-left: 40px;
      font-size: 13px;
      color: #669;
      line-height: 1;
      margin-bottom: 5px;
      &::before {
        content: attr(data-content);
        position: absolute;
        left: 0;
        top: 0;
      }
    }
  }
  .table {
    margin: 20px 0;
  }
  .tool {
    margin-bottom: 10px;
    width: 120px;
    height: 36px;
    line-height: 36px;
    display: flex;
    text-align: center;
    span {
      flex: 1;
      color: #999;
      background-color: #fff;
      cursor: pointer;
      &.active {
        color: #333;
        background-color: #ccc;
      }
    }
  }
}
</style>