diff --git a/src/components/datav/chart-bar.vue b/src/components/datav/chart-bar.vue index 1bf4e46..3caa60e 100644 --- a/src/components/datav/chart-bar.vue +++ b/src/components/datav/chart-bar.vue @@ -8,9 +8,10 @@ class="flex v-center bar-item between" v-for="item in data" :size="size" + :style="{'--label-width': `${labelWidth}px`}" > - {{ item.label }} -
+ {{ item.label }} +
item.dictLabel).join(' ') +} + +export function getGenderFromIdCode(idCode) { + // 检查身份证号码是否有效(长度为18位) + if (!idCode || idCode.length !== 18) { + return ""; + } + // 获取第17位数字 + const genderCode = parseInt(idCode.charAt(16), 10); + // 检查是否为数字 + if (isNaN(genderCode)) { + return ""; + } + // 根据第17位数字判断性别 + return genderCode % 2 === 0 ? "女" : "男"; } \ No newline at end of file diff --git a/src/views/datav/Gobal.vue b/src/views/datav/Gobal.vue index 2e16fe5..d7e4af5 100644 --- a/src/views/datav/Gobal.vue +++ b/src/views/datav/Gobal.vue @@ -387,49 +387,49 @@ const option1 = ref({ const data1 = [ { - name: "开福分局", + label: "开福分局", value: 97, unit: "%", numerator: 97, denominator: 100, }, { - name: "芙蓉分局", + label: "芙蓉分局", value: 90, unit: "%", numerator: 90, denominator: 100, }, { - name: "岳麓分局", + label: "岳麓分局", value: 85, unit: "%", numerator: 85, denominator: 100, }, { - name: "雨花分局", + label: "雨花分局", value: 80, unit: "%", numerator: 80, denominator: 100, }, { - name: "望城分局", + label: "望城分局", value: 71, unit: "%", numerator: 71, denominator: 100, }, { - name: "浏阳市局", + label: "浏阳市局", value: 66, unit: "%", numerator: 66, denominator: 100, }, { - name: "长沙县局", + label: "长沙县局", value: 62, unit: "%", numerator: 62, diff --git a/src/views/sensitivePerception/DepartNegative.vue b/src/views/sensitivePerception/DepartNegative.vue index 3dd3fe8..a782416 100644 --- a/src/views/sensitivePerception/DepartNegative.vue +++ b/src/views/sensitivePerception/DepartNegative.vue @@ -19,7 +19,7 @@ - + - + + +