Changes 问卷显示页

This commit is contained in:
彭森 2024-05-07 10:24:34 +08:00
parent bdfe86f678
commit 64e051f2a9
3 changed files with 19 additions and 4 deletions

View File

@ -14,6 +14,7 @@
:headers="headers"
:on-error="onError"
:on-success="onSuccess"
v-model:file-list="fileList"
>
<template #trigger>
<el-button type="primary">上传文件</el-button>
@ -41,6 +42,8 @@ const props = defineProps<{ modelValue: string | null; showDownload?: boolean }>
const emit = defineEmits(["update:modelValue"]);
const headers = ref({Authorization: ""});
const upload = ref<UploadInstance>();
// ref
const fileList = ref([]);
const fileMd = computed({
get() {
return props.modelValue;
@ -80,6 +83,8 @@ const handleExceed: UploadProps["onExceed"] = files => {
file.uid = genFileId();
upload.value!.handleStart(file);
};
const onSuccess = (
response: any,
uploadFile: UploadFile,
@ -87,6 +92,7 @@ const onSuccess = (
) => {
console.log(response, "response");
fileMd.value = response.md;
fileList.value = [];
};
const onError = error => {
ElMessage.warning("上传失败");

View File

@ -316,7 +316,7 @@
</template>
</el-table-column>
<el-table-column
v-for="item in ['2020年', '2021年', '2022年']"
v-for="item in ['2021年', '2022年', '2023年']"
:label="item"
align="center"
>
@ -326,7 +326,7 @@
v-if="
bjDataConfig.企业填报数据.财报.columns.find(
(col) => col.key == scope.row?.key
).addNeed === true && item == '2022年'
).addNeed === true && item == '2023年'
"
class="require-item-sign"
></span>
@ -521,9 +521,9 @@ const rowTemp = ref<RateData | null>(null);
const manDataEditTemp = ref({
经营问卷: {},
财务问卷: {
"2020年": {},
"2021年": {},
"2022年": {},
"2023年": {},
资产负债表: {},
利润表: {},
是否审计: null,
@ -617,9 +617,9 @@ function showDetailEdit(row: RateData) {
manDataEditTemp.value = {
经营问卷: {},
财务问卷: {
"2020年": {},
"2021年": {},
"2022年": {},
"2023年": {},
资产负债表: {},
利润表: {},
是否审计: null,
@ -627,6 +627,7 @@ function showDetailEdit(row: RateData) {
},
};
} else {
debugger
manDataEditTemp.value = JSON.parse(rowTemp.value.man_data);
}
@ -773,6 +774,7 @@ function fileUploadSave() {
.then((res) => {
ElMessage.success("保存成功");
fileUploadDialogVisible.value = false;
fileUploadInfo.value.file_md = null; //
getData();
})
.catch((e) => {

View File

@ -170,6 +170,13 @@ const table = ref(null);
const tableButtonConfig = computed(() => [
{ name: "更新数据", func: getTableData },
]);
//
let timer: NodeJS.Timeout;
const getQueryValue = getQueryValue.bind(null, query);
const getValueFromPath = getValueFromPath.bind(null, tableData);
const setQueryValue = setQueryValue.bind(null, query);
const setValueFromPath = setValueFromPath.bind(null, tableData);
const router = useRouter();
// watch(
// () => props.value.tableModel,