Browse Source

fix: 完善个人问题库、单位问题库

main
wxc 1 year ago
parent
commit
39f84a8b64
  1. 43
      src/components/datav/chart-bar.vue
  2. 9
      src/components/file/upload-group.vue
  3. 10
      src/components/home/work/index.vue
  4. 2
      src/components/negative/dialog.vue
  5. 46
      src/views/sensitivePerception/DepartNegative.vue
  6. 8
      src/views/sensitivePerception/PoliceNegative.vue

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

@ -5,10 +5,11 @@
</div> </div>
<div> <div>
<div <div
class="flex v-center bar-item between" class="flex v-center bar-item between wrap"
v-for="item in data" v-for="item in data"
:size="size" :size="size"
:style="{ '--label-width': `${labelWidth}px` }" :style="{ '--label-width': `${labelWidth}px` }"
:position="labelPosition"
> >
<span class="bar-item-label mr-10"> <span class="bar-item-label mr-10">
{{ item.label }} {{ item.label }}
@ -18,7 +19,7 @@
class="bar-item_content-bar" class="bar-item_content-bar"
:style="{ :style="{
width: `${(item.value / max) * 100}%`, width: `${(item.value / max) * 100}%`,
background: getColor(item.value / max * 100), background: getColor((item.value / max) * 100),
}" }"
></div> ></div>
</div> </div>
@ -61,20 +62,23 @@ const props = defineProps({
}, },
color: { color: {
type: Object, type: Object,
default: "linear-gradient(270deg, #63e700 0%, #19674c 100%)" default: "linear-gradient(270deg, #63e700 0%, #19674c 100%)",
}, },
labelWidth: { labelWidth: {
type: Number, type: Number,
default: 80 default: 80,
} },
labelPosition: {
type: String,
default: "left",
},
}); });
const max = ref(100); const max = ref(100);
watch( watch(
() => props.data, () => props.data,
() => { () => {
getMax() getMax();
} }
); );
@ -85,16 +89,16 @@ function getMax() {
} }
onMounted(() => { onMounted(() => {
getMax() getMax();
}) });
function getColor(val) { function getColor(val) {
if (props.color instanceof String) { if (props.color instanceof String) {
return props.color; return props.color;
} }
if (props.color instanceof Array) { if (props.color instanceof Array) {
const colors = [...props.color] const colors = [...props.color];
colors.sort((a, b) => b.percentage - a.percentage) colors.sort((a, b) => b.percentage - a.percentage);
for (let i = 0; i < colors.length; i++) { for (let i = 0; i < colors.length; i++) {
if (val > colors[0].percentage) { if (val > colors[0].percentage) {
return colors[0].color; return colors[0].color;
@ -118,9 +122,7 @@ function getColor(val) {
} }
.bar-item { .bar-item {
font-size: 17px; font-size: 17px;
height: 32px;
&[size="large"] { &[size="large"] {
height: 42px;
.bar-item_content { .bar-item_content {
.bar-item_content-bar { .bar-item_content-bar {
height: 13px; height: 13px;
@ -128,7 +130,6 @@ function getColor(val) {
} }
} }
&[size="small"] { &[size="small"] {
height: 25px;
font-size: 12px; font-size: 12px;
} }
.bar-item-label { .bar-item-label {
@ -138,6 +139,20 @@ function getColor(val) {
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
&[position="left"] {
height: 32px;
line-height: 32px;
}
&[position="top"] {
margin-bottom: 4px;
.bar-item-label {
width: 100%;
text-align: left;
}
.bar-item_content {
width: calc(100% - 80px);
}
}
.bar-item_content { .bar-item_content {
width: calc(100% - var(--label-width) - 80px); width: calc(100% - var(--label-width) - 80px);
.bar-item_content-bar { .bar-item_content-bar {

9
src/components/file/upload-group.vue

@ -73,6 +73,7 @@
style="width: 200px" style="width: 200px"
v-model="item.classId" v-model="item.classId"
clearable clearable
v-if="fileClasss.length"
> >
<el-option <el-option
v-for="item in fileClasss" v-for="item in fileClasss"
@ -86,6 +87,8 @@
plain plain
@click="handleUpdateFileClass(item)" @click="handleUpdateFileClass(item)"
:disabled="!item.classId" :disabled="!item.classId"
v-if="fileClasss.length"
>修改文件分类</el-button >修改文件分类</el-button
> >
<el-button type="danger" @click="remove(item)" <el-button type="danger" @click="remove(item)"
@ -94,6 +97,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="fileClasss.length">
<h4>已分类文件</h4> <h4>已分类文件</h4>
<el-scrollbar max-height="400px"> <el-scrollbar max-height="400px">
<el-row :gutter="20"> <el-row :gutter="20">
@ -132,7 +136,9 @@
</template> </template>
<template v-else> <template v-else>
<icon <icon
:name="getIconName(item.fileName)" :name="
getIconName(item.fileName)
"
:size="40" :size="40"
/> />
</template> </template>
@ -166,6 +172,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-scrollbar> </el-scrollbar>
</div>
<footer class="flex end mt-20"> <footer class="flex end mt-20">
<el-button type="primary" size="large" @click="handleSubmit" <el-button type="primary" size="large" @click="handleSubmit"
>确认佐证材料</el-button >确认佐证材料</el-button

10
src/components/home/work/index.vue

@ -7,7 +7,7 @@
</el-badge> </el-badge>
<span class="tab-nav-title" v-else>我的待办</span> <span class="tab-nav-title" v-else>我的待办</span>
</template> </template>
<div v-loading="loading"> <div v-loading="loading" class="mt-20">
<home-work-my-todo :data="todos" @refresh="getList" /> <home-work-my-todo :data="todos" @refresh="getList" />
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -18,7 +18,7 @@
</el-badge> </el-badge>
<span class="tab-nav-title" v-else>即将到期</span> <span class="tab-nav-title" v-else>即将到期</span>
</template> </template>
<div v-loading="loading"> <div v-loading="loading" class="mt-20">
<home-work-my-todo :data="todoToExpires" @refresh="getList" /> <home-work-my-todo :data="todoToExpires" @refresh="getList" />
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -26,7 +26,10 @@
<template #label> <template #label>
<span class="tab-nav-title">我的收藏</span> <span class="tab-nav-title">我的收藏</span>
</template> </template>
<div v-loading="loading" class="mt-20">
<home-work-my-fav /> <home-work-my-fav />
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
@ -69,5 +72,8 @@ onMounted(() => {
overflow: visible; overflow: visible;
} }
} }
.el-tabs__header {
margin-bottom: 0;
}
} }
</style> </style>

2
src/components/negative/dialog.vue

@ -128,7 +128,7 @@
</el-row> </el-row>
</main> </main>
<footer class="flex between v-center"> <footer class="flex between v-center">
<div> <div style="min-height: 40px">
<!-- <el-button type="primary" plain size="large">打印</el-button> --> <!-- <el-button type="primary" plain size="large">打印</el-button> -->
</div> </div>
<div v-if="!disabled"> <div v-if="!disabled">

46
src/views/sensitivePerception/DepartNegative.vue

@ -169,7 +169,7 @@
<description-pair <description-pair
label1="民警总人数" label1="民警总人数"
label2="问题涉及民警数" label2="问题涉及民警数"
:value1="departInfo.policeSize" :value1="activeRow.policeSize"
:value2="departInfo.negativePoliceSize" :value2="departInfo.negativePoliceSize"
size="large" size="large"
/> />
@ -178,7 +178,7 @@
<description-pair <description-pair
label1="协辅警人数" label1="协辅警人数"
label2="问题涉及协辅警数" label2="问题涉及协辅警数"
:value1="departInfo.auxSize" :value1="activeRow.auxSize"
:value2="departInfo.negativeAuxSize" :value2="departInfo.negativeAuxSize"
size="large" size="large"
/> />
@ -202,14 +202,24 @@
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12" class="mb-20">
<description-pair <description-pair
label1="110接处警量" label1="110接处警量"
label2="问题数" label2="问题数"
:value1=" :value1="
negativeInfo.jcjBusinessSize negativeInfo.jcj110BusinessSize
" "
:value2="negativeInfo.jcjSize" :value2="negativeInfo.jcj110Size"
/>
</el-col>
<el-col :span="12">
<description-pair
label1="122接处警量"
label2="问题数"
:value1="
negativeInfo.jcj122BusinessSize
"
:value2="negativeInfo.jcj122Size"
/> />
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -288,15 +298,27 @@
<el-row class="mb-20"> <el-row class="mb-20">
<el-col :span="8"> <el-col :span="8">
<h5>个人问题排名</h5> <h5>个人问题排名</h5>
<el-scrollbar max-height="500px">
<datav-chart-bar <datav-chart-bar
size="small" size="small"
:data="policeBarList" :data="policeBarList"
:color="colors" :color="colors"
/> />
<el-empty v-if="policeBarList.length === 0" />
</el-scrollbar>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<h5>突出问题排名</h5> <h5>突出问题排名</h5>
<datav-chart-bar size="small" :data="problemTypeBarList" :color="colors" />
<el-scrollbar max-height="500px">
<datav-chart-bar
size="small"
:data="problemTypeBarList"
:color="colors"
labelPosition="top"
/>
<el-empty v-if="policeBarList.length === 0" />
</el-scrollbar>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<h5>单位问题标签</h5> <h5>单位问题标签</h5>
@ -496,13 +518,13 @@ const radarOption = ref({
}, },
], ],
label: { label: {
show: true show: true,
} },
}, },
], ],
}); });
const problemTypeBarList = ref([]) const problemTypeBarList = ref([]);
async function getProfileData() { async function getProfileData() {
loading.value = true; loading.value = true;
@ -520,10 +542,10 @@ async function getProfileData() {
policeBarList.value = data.policeBarList; policeBarList.value = data.policeBarList;
radarOption.value.radar.indicator = data.problemTypeRadarIndicator radarOption.value.radar.indicator = data.problemTypeRadarIndicator;
radarOption.value.series[0].data[0].value = data.problemTypeRadarData radarOption.value.series[0].data[0].value = data.problemTypeRadarData;
problemTypeBarList.value = data.problemTypeBarList problemTypeBarList.value = data.problemTypeBarList;
loading.value = false; loading.value = false;
} }

8
src/views/sensitivePerception/PoliceNegative.vue

@ -220,9 +220,9 @@
label1="110接处警量" label1="110接处警量"
label2="问题数" label2="问题数"
:value1=" :value1="
negativeInfo.jcjBusinessSize negativeInfo.jcj110BusinessSize
" "
:value2="negativeInfo.jcjSize" :value2="negativeInfo.jcj110Size"
/> />
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -230,9 +230,9 @@
label1="122接处警量" label1="122接处警量"
label2="问题数" label2="问题数"
:value1=" :value1="
negativeInfo.jcjBusinessSize negativeInfo.jcj122BusinessSize
" "
:value2="negativeInfo.jcjSize" :value2="negativeInfo.jcj122Size"
/> />
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">

Loading…
Cancel
Save