|
@@ -76,6 +76,12 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="8" v-if="reportInfo.issued_status === 2">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ 应填报{{reportInfo.num_reporters}}人,已填报{{reportInfo.num_reported}}人,未填报{{reportInfo.num_unreported}}人
|
|
|
|
+ <el-text class="common-btn-text-primary" @click="viewSituation">完成情况</el-text>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -85,6 +91,18 @@
|
|
<hot-table v-if="showTable" ref="wrapper" :data="hotData" :settings="hotSettings" />
|
|
<hot-table v-if="showTable" ref="wrapper" :data="hotData" :settings="hotSettings" />
|
|
</div>
|
|
</div>
|
|
<informantSelect v-model="isShowSelect" :tree-data="treeData" :default-check-data="reportInfo.user_ids" @confirm="handleContactSelectData" />
|
|
<informantSelect v-model="isShowSelect" :tree-data="treeData" :default-check-data="reportInfo.user_ids" @confirm="handleContactSelectData" />
|
|
|
|
+ <el-dialog v-if="popUp" v-model="reportInfo.user_filling_status" @close="handleDialogClose">
|
|
|
|
+ <el-table :data="reportInfo.user_filling_status">
|
|
|
|
+ <el-table-column label="序号" align="center" type="index" width="50px" />
|
|
|
|
+ <el-table-column label="姓名" align="center" prop="name" />
|
|
|
|
+ <el-table-column label="填报状态" align="center" prop="submission_status">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ {{ scope.row.submission_status == 0 ? '未填报' : '已填报' }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-dialog>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
@@ -123,7 +141,8 @@ const reportInfo = ref({
|
|
num_reported: 0,
|
|
num_reported: 0,
|
|
num_unreported: 0,
|
|
num_unreported: 0,
|
|
field_names: [], //表格内容
|
|
field_names: [], //表格内容
|
|
- user_ids: []
|
|
|
|
|
|
+ user_ids: [],
|
|
|
|
+ user_filling_status: []
|
|
});
|
|
});
|
|
const rules = {
|
|
const rules = {
|
|
table_name: [{ required: true, message: '表名不能为空', trigger: 'blur' }],
|
|
table_name: [{ required: true, message: '表名不能为空', trigger: 'blur' }],
|
|
@@ -138,6 +157,7 @@ const rules = {
|
|
const is_filling_ended = ref(0);
|
|
const is_filling_ended = ref(0);
|
|
const selectedReporter = ref(null);
|
|
const selectedReporter = ref(null);
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
+const personNum = ref();
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
eventId: String
|
|
eventId: String
|
|
@@ -161,7 +181,14 @@ onMounted(async () => {
|
|
const fetchReportDetails = (reportId) => {
|
|
const fetchReportDetails = (reportId) => {
|
|
return fillingList(reportId).then((res: any) => {
|
|
return fillingList(reportId).then((res: any) => {
|
|
reportInfo.value = res.report_info;
|
|
reportInfo.value = res.report_info;
|
|
- const headers = Object.keys(res.table_data["0"]);
|
|
|
|
|
|
+ reportInfo.value.user_filling_status = res.report_info.user_filling_status;
|
|
|
|
+ personNum.value = reportInfo.value.user_ids.length; //统计需要填报的总人数
|
|
|
|
+ let headers = [];
|
|
|
|
+ if (!res.table_data["0"]) {
|
|
|
|
+ return;
|
|
|
|
+ } else {
|
|
|
|
+ headers = Object.keys(res.table_data["0"]);
|
|
|
|
+ }
|
|
const result = [
|
|
const result = [
|
|
headers.map(header => res.table_data["0"][header])
|
|
headers.map(header => res.table_data["0"][header])
|
|
];
|
|
];
|
|
@@ -346,9 +373,15 @@ const handleSaveTemporarily = async (formEl,statuCode) => {
|
|
}
|
|
}
|
|
|
|
|
|
reportInfo.value.issued_status = statuCode;
|
|
reportInfo.value.issued_status = statuCode;
|
|
- const tempHead = reportInfo.value.field_names.flatMap(obj =>
|
|
|
|
- Object.values(obj).filter(value => typeof value === "string")
|
|
|
|
- );
|
|
|
|
|
|
+ let tempHead = [];
|
|
|
|
+ if (!reportInfo.value.field_names) {
|
|
|
|
+ tempHead = [];
|
|
|
|
+ } else {
|
|
|
|
+ tempHead = reportInfo.value.field_names.flatMap(obj =>
|
|
|
|
+ Object.values(obj).filter(value => typeof value === "string")
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
let data = {
|
|
let data = {
|
|
creator_name: reportInfo.value.creator_name,
|
|
creator_name: reportInfo.value.creator_name,
|
|
creator_phone: reportInfo.value.creator_phone,
|
|
creator_phone: reportInfo.value.creator_phone,
|
|
@@ -440,4 +473,11 @@ function findNodeById(data, targetId) {
|
|
}
|
|
}
|
|
return null; // 未找到返回 null
|
|
return null; // 未找到返回 null
|
|
}
|
|
}
|
|
|
|
+const popUp = ref(false);
|
|
|
|
+const viewSituation = () => {
|
|
|
|
+ popUp.value = true;
|
|
|
|
+}
|
|
|
|
+const handleDialogClose = () => {
|
|
|
|
+ popUp.value = false;
|
|
|
|
+};
|
|
</script>
|
|
</script>
|