Browse Source

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

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

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

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

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

@ -73,6 +73,7 @@
style="width: 200px"
v-model="item.classId"
clearable
v-if="fileClasss.length"
>
<el-option
v-for="item in fileClasss"
@ -86,6 +87,8 @@
plain
@click="handleUpdateFileClass(item)"
:disabled="!item.classId"
v-if="fileClasss.length"
>修改文件分类</el-button
>
<el-button type="danger" @click="remove(item)"
@ -94,78 +97,82 @@
</div>
</div>
</div>
<h4>已分类文件</h4>
<el-scrollbar max-height="400px">
<el-row :gutter="20">
<el-col
:span="12"
v-for="item in fileClasss"
:key="item"
class="file-class-item"
>
<header class="text-primary">
{{ item.classTitle }}
</header>
<div style="min-height: 60px">
<div
class="flex between mb-8 file-list-item file-list-item_active"
v-for="(item, index) in fileList.filter(
(file) => file.fileClassId === item.id
)"
:key="index"
>
<div class="flex gap v-center">
<div v-if="!item.loading">
<template
v-if="
getFileType(item.fileName) ===
FileType.IMG
"
<div v-if="fileClasss.length">
<h4>已分类文件</h4>
<el-scrollbar max-height="400px">
<el-row :gutter="20">
<el-col
:span="12"
v-for="item in fileClasss"
:key="item"
class="file-class-item"
>
<header class="text-primary">
{{ item.classTitle }}
</header>
<div style="min-height: 60px">
<div
class="flex between mb-8 file-list-item file-list-item_active"
v-for="(item, index) in fileList.filter(
(file) => file.fileClassId === item.id
)"
:key="index"
>
<div class="flex gap v-center">
<div v-if="!item.loading">
<template
v-if="
getFileType(item.fileName) ===
FileType.IMG
"
>
<div
class="img-box"
:style="{
backgroundImage: `url(${BASE_PATH}/file/stream/${item.filePath})`,
}"
@click="filePreview(item)"
></div>
</template>
<template v-else>
<icon
:name="
getIconName(item.fileName)
"
:size="40"
/>
</template>
</div>
<el-progress
type="circle"
:percentage="item.percent"
:width="40"
color="var(--primary-color)"
v-else
></el-progress>
<span>{{ item.fileName }}</span>
</div>
<div class="flex gap v-center">
<el-button
type="info"
plain
@click="cancelFileClass(item)"
size="small"
>取消分类</el-button
>
<el-button
type="danger"
@click="remove(item)"
size="small"
>删除文件</el-button
>
<div
class="img-box"
:style="{
backgroundImage: `url(${BASE_PATH}/file/stream/${item.filePath})`,
}"
@click="filePreview(item)"
></div>
</template>
<template v-else>
<icon
:name="getIconName(item.fileName)"
:size="40"
/>
</template>
</div>
<el-progress
type="circle"
:percentage="item.percent"
:width="40"
color="var(--primary-color)"
v-else
></el-progress>
<span>{{ item.fileName }}</span>
</div>
<div class="flex gap v-center">
<el-button
type="info"
plain
@click="cancelFileClass(item)"
size="small"
>取消分类</el-button
>
<el-button
type="danger"
@click="remove(item)"
size="small"
>删除文件</el-button
>
</div>
</div>
</div>
</el-col>
</el-row>
</el-scrollbar>
</el-col>
</el-row>
</el-scrollbar>
</div>
<footer class="flex end mt-20">
<el-button type="primary" size="large" @click="handleSubmit"
>确认佐证材料</el-button

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

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

2
src/components/negative/dialog.vue

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

56
src/views/sensitivePerception/DepartNegative.vue

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

8
src/views/sensitivePerception/PoliceNegative.vue

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

Loading…
Cancel
Save