Browse Source

fix: 完善个问题人画像、大屏

main
wxc 1 year ago
parent
commit
11655299a0
  1. 2
      src/components/datav/card.vue
  2. 10
      src/components/datav/chart-bar.vue
  3. 6
      src/components/datav/tabs.vue
  4. 23
      src/views/datav/CaseVerif.vue
  5. 1
      src/views/sensitivePerception/DepartNegative.vue
  6. 88
      vite.config.ts.timestamp-1730686774606-8b00c58248ca4.mjs

2
src/components/datav/card.vue

@ -23,7 +23,7 @@ defineProps({
<style lang="scss" scoped> <style lang="scss" scoped>
.datav-card { .datav-card {
padding: 12px; padding: 12px;
margin-top: 20px; margin-bottom: 20px;
position: relative; position: relative;
z-index: 1; z-index: 1;
&::before { &::before {

10
src/components/datav/chart-bar.vue

@ -10,7 +10,9 @@
:size="size" :size="size"
:style="{'--label-width': `${labelWidth}px`}" :style="{'--label-width': `${labelWidth}px`}"
> >
<span class="bar-item-label mr-10">{{ item.label }}</span> <span class="bar-item-label mr-10">
{{ item.label }}
</span>
<div class="bar-item_content mr-16" > <div class="bar-item_content mr-16" >
<div <div
class="bar-item_content-bar" class="bar-item_content-bar"
@ -70,8 +72,9 @@ const props = defineProps({
const max = ref(100); const max = ref(100);
watch( watch(
() => props.data, () => props.data,
(arr) => { () => {
getMax() getMax()
} }
); );
@ -131,6 +134,9 @@ function getColor(val) {
.bar-item-label { .bar-item-label {
text-align: right; text-align: right;
width: var(--label-width); width: var(--label-width);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.bar-item_content { .bar-item_content {
width: calc(100% - var(--label-width) - 80px); width: calc(100% - var(--label-width) - 80px);

6
src/components/datav/tabs.vue

@ -41,8 +41,10 @@ const props = defineProps({
default: "", default: "",
}, },
}); });
const slots = useSlots().default();
const emit = defineEmits(["update:modelValue"]); const emit = defineEmits(["update:modelValue"]);
const activeTab = ref(props.modelValue); const activeTab = ref(props.modelValue || slots[0].props.name);
watch(() => props.modelValue, () => { watch(() => props.modelValue, () => {
activeTab.value = props.modelValue activeTab.value = props.modelValue
}) })
@ -52,7 +54,7 @@ watch(activeTab, (val) => {
provide("activeTab", activeTab); provide("activeTab", activeTab);
const slots = useSlots().default();
function handleChangeActiveTab(name) { function handleChangeActiveTab(name) {
activeTab.value = name; activeTab.value = name;

23
src/views/datav/CaseVerif.vue

@ -7,21 +7,26 @@
<el-col :span="6"> <el-col :span="6">
<datav-card title="分县市局排名" subTitle="案件数"> <datav-card title="分县市局排名" subTitle="案件数">
<datav-tabs <datav-tabs
v-model="activeTab"
type="bottom-button" type="bottom-button"
> >
<datav-tab-item label="分县市局" name="1"> <datav-tab-item label="分县市局" name="1">
<el-scrollbar height="350px">
<datav-chart-bar <datav-chart-bar
:data="fxsjBarList" :data="fxsjBarList"
size="large" size="large"
:color="colors"
/> />
</el-scrollbar>
</datav-tab-item> </datav-tab-item>
<datav-tab-item label="局属单位" name="2"> <datav-tab-item label="局属单位" name="2">
<el-scrollbar height="350px">
<datav-chart-bar <datav-chart-bar
:data="jsdwBarList" :data="jsdwBarList"
:max="11" :max="11"
size="large" size="large"
:color="colors"
/> />
</el-scrollbar>
</datav-tab-item> </datav-tab-item>
</datav-tabs> </datav-tabs>
</datav-card> </datav-card>
@ -385,7 +390,21 @@ const option4 = {
], ],
}; };
const activeTab = ref("1");
const colors = [
{
color: "linear-gradient( 270deg, #FB002D 0%, #822232 100%)",
percentage: 80,
},
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
},
];
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

1
src/views/sensitivePerception/DepartNegative.vue

@ -158,6 +158,7 @@
<span <span
v-for="item in departInfo.deputyRole" v-for="item in departInfo.deputyRole"
:key="item" :key="item"
class="mr-10"
>{{ item }}</span >{{ item }}</span
> >
</span> </span>

88
vite.config.ts.timestamp-1730686774606-8b00c58248ca4.mjs

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save