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
<template>
  <div class='old_cer'>
    <div class="demo_form">
      <section>
        <p
          class="label"
          data-require
        >标记:</p>
        <article>
          <el-input
            type="text"
            placeholder="请输入标记内容"
            maxlength="10"
            show-word-limit
            v-model="mark"
            >
          </el-input>
        </article>
      </section>
    </div>
  </div>
</template>
 
<script>
export default {
  props: {
    item: {
      type: Object,
      default: () => {
        return {};
      },
    },
    door: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
 
  watch: {
    item: {
      handler() {
        this.setItem();
      },
      deep: true,
    },
    door: {
      handler(n) {
        if (n.r) {
          this.sub(n.t);
        }
      },
      deep: true,
    },
  },
 
  data() {
    return {
      detail: {},
      mark:'',
      url:'',
    };
  },
 
  methods: {
    sub(type) {
      console.log(type)
      let params = {
        id:this.item.data,
        mark:this.mark
      }
      /**sign 高龄认证标记
       * sign-pension 养老认证标记
       * sign-statistic 认证统计
       *  */
      if(this.item.type == 'sign') {
        this.url = 'eldersauth/authRecords/sign'
 
      }
      if(this.item.type == 'sign-pension') {
        this.url = 'eldersauth/pensionAuthRecords/sign'
      }
      if(this.item.type == 'sign-statistic') {
        //高龄认证统计标记
        this.url = 'eldersauth/auth/statistic/sign'
        // if(this.$route.params.id == '1') {
        //   this.url = 'eldersauth/auth/statistic/sign'
        // }
        //养老认证统计标记
        if(this.$route.params.id == '2') {
          this.url = 'eldersauth/pensionAuthRecords/statistic/sign'
        }
        
      }
 
      this.$api.post(this.url, params, e => {
        demo.toast("标记成功")
        this.$nextTick(() => {
          this.$store.dispatch("setFixed", {
            event: "del",
            type: type,
            time: Date.now(),
          });
           
          if(this.item.type == 'sign') {
            this.$store.dispatch("setPageReset", "/affairs_old_certification");
          }
          
          if(this.item.type == 'sign-statistic') {
            this.$store.dispatch("setPageReset", `/affairs_old_certificationStatistics/${this.$route.params.id}`);
          }
 
          if(this.item.type == 'sign-pension') {
            this.$store.dispatch("setPageReset", "/affairs_old_aged");
          }
        });
      })
    },
 
    close(type) {
      this.$store.dispatch("setFixed", {
        event: "del",
        type: type,
        time: Date.now(),
      });
    },
 
  },
 
};
</script>
<style lang='less' scoped>
.old_cer {
  section {
    margin-bottom: 15px;
  }
  .t {
    padding-top: 10px;
  }
}
</style>