This commit is contained in:
2021-04-24 16:39:32 +08:00
parent 6af9e8f15e
commit 76839bc258
4 changed files with 45 additions and 31 deletions

View File

@@ -17,7 +17,7 @@
<script>
import { UploadOutlined } from "@ant-design/icons-vue";
import { message } from "ant-design-vue";
import { ref } from "vue";
import { onUpdated, ref } from "vue";
export default {
name: "Upload",
props: {
@@ -32,14 +32,16 @@ export default {
},
setup(props, context) {
var fileList = ref([]);
if (!props.fileId && props.fileUrl) {
fileList.value.push({
uid: "-1",
status: "done",
url: props.fileUrl,
name: props.fileName
});
}
onUpdated(() => {
if (!props.fileId && props.fileUrl) {
fileList.value.push({
uid: "-1",
status: "done",
url: props.fileUrl,
name: props.name
});
}
});
const updateValue = value => {
context.emit("update:fileId", value); // 传递的方法
};

View File

@@ -1,22 +1,33 @@
<template>
<div class="ca_index">
<a-space>
<a-button>
<router-link to="/ca/userapply"> 个人数字证书申领入口 </router-link>
</a-button>
<div class="ca-index">
<a-space direction="vertical" :size="size">
<div>
<a-space :size="size">
<a-button>
<router-link to="/ca/userapply"> 个人数字证书申领入口 </router-link>
</a-button>
<a-button>
<router-link to="/ca/unitapply"> 企业数字证书申领入口 </router-link>
</a-button>
</a-space>
</div>
<a-button type="primary">
<router-link to="/ca/sealapply"> 电子印章申请入口 </router-link>
</a-button>
<a-button>
<router-link to="/ca/unitapply"> 企业数字证书申领入口 </router-link>
</a-button>
</a-space>
</div>
<router-view></router-view>
</template>
<style lang="less" scoped></style>
<style lang="less" scoped>
.ca-index {
text-align: center;
}
</style>
<script>
export default {
name: "index"
name: "index",
setup() {
return { size: 25 };
}
};
</script>

View File

@@ -83,7 +83,7 @@
</style>
<script>
import Upload from "@/components/Upload";
import { onMounted, reactive, ref } from "vue";
import { onMounted, reactive, ref, inject } from "vue";
import { get, post } from "@/services/http";
import { message } from "ant-design-vue";
export default {
@@ -91,6 +91,7 @@ export default {
Upload
},
setup() {
const useReload = inject("reload");
var formModel = reactive({
sealType: "",
sealName: "",
@@ -100,7 +101,7 @@ export default {
var sealApplyList = ref([]);
var progressingId = ref(0);
var disableEdit = ref(false);
var filePath;
var filePath = ref("");
var showDrawer = ref(false);
onMounted(async () => {
var resp = await get("/api2/ca/sealApplyList");
@@ -115,22 +116,22 @@ export default {
formModel.sealType = currentApply.sealType;
formModel.sealName = currentApply.sealName;
formModel.idCardNumOrTydm = currentApply.idCardNumOrTydm;
filePath = currentApply.sealApplyFilePath;
filePath.value = currentApply.sealApplyFilePath;
}
}
});
async function createSealApply() {
var resp = await post("/api2/ca/sealApply", formModel);
if (resp.errorCode == 0) {
message.success("创建成功");
message.success("创建成功", useReload);
} else {
message.error(resp.errorMsg);
message.error(resp.errorMsg, useReload);
}
}
async function sendSealApply(id) {
var resp = await post("/api2/ca/sendSealApply", { id });
if (resp.errorCode == 0) {
message.success("申请成功");
message.success("申请成功", useReload);
} else {
message.error(resp.errorMsg);
}
@@ -138,7 +139,7 @@ export default {
async function querySealApply(id) {
var resp = await get("/api2/ca/querySealApply", { id });
if (resp.errorCode == 0) {
message.success("申请成功");
message.success("申请成功", useReload);
} else {
message.error(resp.errorMsg);
}

View File

@@ -134,7 +134,7 @@
:disabled="disabledUpload"
>
<a-button block :disabled="disabledUpload">
<a-uploadOutlined />
<UploadOutlined />
点击{{ modelRef.idCardFrontPicId ? "替换" : "上传" }}
</a-button>
</a-upload>
@@ -154,7 +154,7 @@
:disabled="disabledUpload"
>
<a-button block :disabled="disabledUpload">
<a-uploadOutlined />
<UploadOutlined />
点击{{ modelRef.idCardBackPicId ? "替换" : "上传" }}
</a-button>
</a-upload>
@@ -174,7 +174,7 @@
:disabled="disabledUpload"
>
<a-button block :disabled="disabledUpload">
<a-uploadOutlined />
<UploadOutlined />
点击{{ modelRef.businessLicensePicId ? "替换" : "上传" }}
</a-button>
</a-upload>
@@ -228,8 +228,8 @@
{{ unitApply.unitName
}}<a-tag
style="margin-left:4px;"
:color="status[userApply.status].color"
>{{ status[userApply.status].text }}</a-tag
:color="status[unitApply.status].color"
>{{ status[unitApply.status].text }}</a-tag
>
</template>
<template #extra>