p.id == progressingId
);
- if (current.status == null) {
+ if (current.status == 0) {
await sendUnitApply(progressingId);
- } else if (current.status == 0) {
+ } else if (current.status == 2) {
await queryUnitApply(progressingId);
}
}
@@ -624,13 +622,13 @@ export default {
}
unitApplyList.value = unitApplyListRes.data;
const current = unitApplyListRes.data.find(
- d => d.status == null || d.status == 0
+ d => [0, 1, 2].indexOf(d.status) > -1
);
if (current) {
progressingId = current.id;
initPage(current);
} else {
- const successApply = unitApplyListRes.data.find(d => d.status == 1);
+ const successApply = unitApplyListRes.data.find(d => d.status == 3);
if (successApply) {
isSuccess.value = true;
} else {
@@ -676,7 +674,37 @@ export default {
isSuccess,
modifyOrder,
router: useRouter(),
- progressingId
+ progressingId,
+ status: {
+ 0: {
+ color: "orange",
+ text: "未申领"
+ },
+ 1: {
+ color: "orange",
+ text: "审核通过"
+ },
+ "-1": {
+ color: "red",
+ text: "审核拒绝"
+ },
+ 2: {
+ color: "orange",
+ text: "进行中"
+ },
+ 3: {
+ color: "green",
+ text: "申请通过"
+ },
+ "-3": {
+ color: "red",
+ text: "申请拒绝"
+ },
+ 4: {
+ color: "red",
+ text: "已失效"
+ }
+ }
};
}
};
diff --git a/src/views/CA/UserApply.vue b/src/views/CA/UserApply.vue
index 5b337c9..f56fa2f 100644
--- a/src/views/CA/UserApply.vue
+++ b/src/views/CA/UserApply.vue
@@ -105,16 +105,14 @@
v-for="userApply in userApplyList"
:key="userApply.id"
size="small"
- style="margin-top:10px"
+ style="margin-top: 10px"
>
{{ userApply.idCardName
}}{{
- ["进行中", "已成功", "已失败"][userApply.status] || "未申领"
- }}{{ applyStatus[userApply.status].text }}
身份证号:{{ userApply.idCardNo }}
@@ -195,7 +193,37 @@ export default {
disableEdit: true,
currentApplyId: 0,
isSuccess: false,
- router: this.$router
+ router: this.$router,
+ applyStatus: {
+ 0: {
+ color: "orange",
+ text: "未申领"
+ },
+ 1: {
+ color: "orange",
+ text: "审核通过"
+ },
+ "-1": {
+ color: "red",
+ text: "审核拒绝"
+ },
+ 2: {
+ color: "orange",
+ text: "进行中"
+ },
+ 3: {
+ color: "green",
+ text: "申请通过"
+ },
+ "-3": {
+ color: "red",
+ text: "申请拒绝"
+ },
+ 4: {
+ color: "red",
+ text: "已失效"
+ }
+ }
};
},
methods: {
@@ -317,13 +345,13 @@ export default {
}
this.organizeList = organizeInfo.data;
this.userApplyList = userApplyList.data;
- var success = this.userApplyList.find(p => p.status === 1);
+ var success = this.userApplyList.find(p => p.status === 3);
if (success) {
this.isSuccess = true;
return;
}
var current = this.userApplyList.find(
- p => p.status === null || p.status === 0
+ p => [0, 1, 2].indexOf(p.status) > -1
);
if (current) {
this.form.idCardName = current.idCardName;