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
<template>
  <div class="volunteer_exam">
    <div class="w_row clearfix">
      <section class="w_col_12">
        <p>姓名:</p>
        <article>{{ detail.name }}</article>
      </section>
      <section class="w_col_12">
        <p>年龄:</p>
        <article>{{ detail.age }}</article>
      </section>
      <section class="w_col_12">
        <p>职业:</p>
        <article>{{ detail.job }}</article>
      </section>
      <section class="w_col_12">
        <p>政治面貌:</p>
        <article>{{ is_po(+detail.politicalFace - 1) }}</article>
      </section>
      <section class="w_col_12">
        在读大学生:
        <article>{{ detail.isUniversity === 1 ? "是" : "否" }}</article>
      </section>
      <section class="w_col_12">
        <p>学校名字:</p>
        <article>{{ detail.universityName || "暂无" }}</article>
      </section>
      <section class="w_col_12">
        身份证号码:
        <article>{{ detail.idCard || "暂无" }}</article>
      </section>
      <section class="w_col_12">
        志愿者组织:
        <article>{{ detail.orgName || "暂无" }}</article>
      </section>
      <section class="w_col_12">
        志愿者队伍:
        <article>{{ detail.teamName || "暂无" }}</article>
      </section>
      <section class="w_col_12">
        <p>技能:</p>
        <article>{{ detail.skillName || "暂无" }}</article>
      </section>
    </div>
    <section>
      <p>居住地址:</p>
      <article>{{ detail.address }}</article>
    </section>
    <!---->
 
    <section>
      <p>申请原因:</p>
      <article>{{ detail.applyReson }}</article>
    </section>
    <section>
      <p>证件照:</p>
      <article>
        <div v-for="(it, ix) in photoPathList" :key="ix">
          <img :src="it" @click="onScaleImage(it)" alt="" />
        </div>
      </article>
    </section>
    <section v-if="!show">
      <p>审核状态:</p>
      <article>
        <el-radio v-model="a1" label="2">审核通过</el-radio>
        <el-radio v-model="a1" label="3">驳回</el-radio>
      </article>
    </section>
    <section v-if="a1 === '3'">
      <p>驳回理由:</p>
      <article>
        <textarea
          cols="30"
          rows="10"
          class="m_inp"
          v-model="text"
          maxlength="200"
        ></textarea>
      </article>
    </section>
    <section v-if="show">
      <p>审核状态:</p>
      <article>
        {{ is_type(+detail.state - 1) }}
      </article>
    </section>
    <section v-if="detail.state === 3 && show">
      <p>驳回原因:</p>
      <article>{{ detail.rejectReson }}</article>
    </section>
  </div>
</template>
 
<script>
export default {
  props: {
    item: {
      type: Object,
      default: () => {
        return {};
      },
    },
    door: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  components: {},
  data() {
    return { detail: {}, a1: "2", text: "", show: false };
  },
  watch: {
    item: {
      handler() {
        this.setItem();
      },
      deep: true,
    },
    door: {
      handler(n) {
        if (n.r) {
          this.sub(n.t);
        }
      },
      deep: true,
    },
    a1(n) {
      if (+n === 2) {
        this.text = "";
      }
    },
  },
  methods: {
    is_type(v) {
      return ["待审核", "已通过", "已驳回"][v] || v + 1;
    },
    is_po(v) {
      return ["党员", "团员", "群众"][v] || v + 1;
    },
    onScaleImage(img) {
      this.$store.dispatch("setImage", {
        time: Date.now(),
        tool: 1,
        pic: img,
      });
    },
    sub(type) {
      if (this.show) {
        this.$store.dispatch("setFixed", {
          event: "del",
          type: type,
          time: Date.now(),
        });
        return 0;
      }
      if (+this.a1 === 3) {
        if (!this.text) {
          demo.toast("请输入驳回原因");
          return 0;
        }
      }
      let os = {
        rejectReson: this.text,
        state: this.a1,
        id: this.detail.id,
      };
      this.$api.put("communitymanager/volunteerexamine", os, (e) => {
        demo.toast("操作成功");
        this.$nextTick(() => {
          this.$store.dispatch("setFixed", {
            event: "del",
            type: type,
            time: Date.now(),
          });
          this.$store.dispatch("setPageReset", "/man_vol_exam");
        });
      });
    },
    setItem() {
      if (this.item.id) {
        this.$api.get(
          "communitymanager/volunteerexamine",
          { id: this.item.id },
          (e) => {
            this.detail = e;
            this.photoPathList = e.photoPath ? e.photoPath.split(",") : [];
          }
        );
        this.show = this.item.show;
        if (this.show) {
          this.a1 = "1";
        }
      } else {
        demo.toast("无效志愿者");
      }
    },
  },
  mounted() {
    this.setItem();
  },
};
</script>
<style lang='less' scoped>
.volunteer_exam {
  font-size: 14px;
  color: #333;
  p {
    line-height: 1.2;
  }
  section {
    display: flex;
    margin-bottom: 15px;
    p {
      width: 80px;
      text-align: right;
    }
    article {
      flex: 1;
    }
  }
  img {
    width: 307px;
    height: 185px;
    display: block;
  }
  .m_inp {
    resize: none;
  }
}
</style>