Browse Source

fix: 添加单位

master
buaixuexideshitongxue 22 hours ago
parent
commit
c0441d23f9
  1. 8
      src/components/negativeInfo/police-dialog.vue

8
src/components/negativeInfo/police-dialog.vue

@ -46,7 +46,7 @@
<div><dt>姓名</dt><dd>{{ policeInfo.name || "/" }}</dd></div>
<div><dt>性别</dt><dd>{{ policeInfo.idCode ? getGenderFromIdCode(policeInfo.idCode) : "/" }}</dd></div>
<div><dt>年龄</dt><dd>{{ policeAge }}</dd></div>
<div><dt>所属单位</dt><dd>{{ activeRow.parentDepartName ? activeRow.parentDepartName + "/" : "" }}{{ activeRow.departName || "/" }}</dd></div>
<div><dt>所属单位</dt><dd>{{ departmentName }}</dd></div>
<div><dt>警号</dt><dd>{{ policeInfo.empNo || "/" }}</dd></div>
<div><dt>身份证号</dt><dd>{{ policeInfo.idCode || "/" }}</dd></div>
<div><dt>入职时间</dt><dd>{{ policeInfo.employmentDate || "/" }}</dd></div>
@ -139,6 +139,11 @@ const emit = defineEmits(["update:modelValue"]);
const time = ref([]);
const policeInfo = ref({});
const departmentInfo = ref({});
const departmentName = computed(() => {
const info = departmentInfo.value.departName ? departmentInfo.value : props.activeRow;
return [info.parentDepartName, info.departName].filter(Boolean).join("/") || "/";
});
const policeAge = computed(() => {
const idCode = String(policeInfo.value.idCode || "").trim();
let birthText;
@ -225,6 +230,7 @@ async function getProfileData() {
negativeList.value = data.negatives;
policeInfo.value = data.policeInfo;
departmentInfo.value = { departName: data.departName, parentDepartName: data.parentDepartName };
negativeInfo.value = data.negativeInfo;
problemSourcesPieOptions.value.series[0].data = data.problemSourcesList;
problemSourcesPieOptions.value.title.text = String(data.negativeInfo.size ?? 0);

Loading…
Cancel
Save