fix:系统迭代

This commit is contained in:
HH 2024-07-11 17:23:28 +08:00
parent e94d5cf239
commit 6f6a738920
7 changed files with 263 additions and 101 deletions

View File

@ -65,6 +65,13 @@ export function otheWareHousePage(params) {
params: params
});
}
//应急仓库详情
export function emerWareHouseDetail(wareHouseId: any) {
return request({
url: `/screen/index/emerWareHouseDetail/${wareHouseId}`,
method: "GET",
});
}
//应急通讯录体系
export function performUserPage(params) {
return request({

View File

@ -116,7 +116,7 @@ export function rkStatByType(params) {
//应急数据统计
export function emerStat(params) {
return request({
url: `/screen/statistic/emerStat`,
url: `/screen/statistic/emerTeamStat`,
method: "GET",
params: params,
});

View File

@ -26,98 +26,202 @@ import { emerStat } from "@/api/statistics";
//线
const tenementRef = ref();
let jobTypeOption = {
tooltip: {
trigger: "axis",
},
legend: {
data: ["待完成", "已完成"],
top: "top",
left: "center",
orient: "horizontal",
itemWidth: 15,
itemHeight: 15,
itemGap: 15,
borderRadius: 0,
textStyle: {
color: "#D0DEEE",
fontFamily: "Source Han Sans CN, Source Han Sans CN",
fontSize: 15,
fontWeight: 400,
},
},
backgroundColor: '#031245',
color: [
'#63caff',
'#49beff',
'#03387a',
'#03387a',
'#03387a',
'#6c93ee',
'#a9abff',
'#f7a23f',
'#27bae7',
'#ff6d9d',
'#cb79ff',
'#f95b5a',
'#ccaf27',
'#38b99c',
'#93d0ff',
'#bd74e0',
'#fd77da',
'#dea700',
],
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
left: 20,
right: 20,
bottom: 10,
top: 40,
},
xAxis: {
type: "category",
// boundaryGap: false,
data: [],
axisLabel: {
color: '#c0c3cd',
fontSize: 14,
interval: 0,
},
yAxis: [
{
type: "value",
name: "数量",
nameTextStyle: {
//y
color: "#6C8097",
axisTick: {
lineStyle: {
color: '#384267',
},
show: true,
},
splitLine: {
show: false,
},
axisLine: {
show: true,
lineStyle: {
color: "#6C8097",
color: '#384267',
width: 1,
type: 'dashed',
},
show: true,
},
data: [],
type: 'category',
},
yAxis: {
axisLabel: {
color: '#c0c3cd',
fontSize: 14,
},
axisTick: {
lineStyle: {
color: '#384267',
width: 1,
},
show: true,
},
splitLine: {
show: true,
lineStyle: {
color: "#6C8097",
type: "dashed",
color: '#384267',
type: 'dashed',
},
},
axisLabel: {
color: "rgb(139, 143, 147)",
textStyle: {
fontSize: 14,
axisLine: {
lineStyle: {
color: '#384267',
width: 1,
type: 'dashed',
},
show: true,
},
axisTick: {
show: false,
name: '',
},
},
],
series: [
{
name: "数量",
type: "line",
data: [],
symbolSize: 10,
data: [200, 85, 112, 275, 305, 415, 741, 405],
type: 'bar',
barMaxWidth: 'auto',
barWidth: 30,
itemStyle: {
color: "#FFFFFF", // 线
shadowColor: "#fff",
shadowBlur: 15,
borderColor: "#aaa",
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: 'linear',
global: false,
colorStops: [
{
offset: 0,
color: '#0b9eff',
},
{
offset: 1,
color: '#63caff',
},
],
},
},
label: {
show: true,
position: 'top',
distance: 10,
color: '#fff',
},
},
{
data: [1, 1, 1, 1, 1, 1, 1, 1],
type: 'pictorialBar',
barMaxWidth: '20',
symbol: 'diamond',
symbolOffset: [0, '50%'],
symbolSize: [30, 15],
},
{
data: [200, 85, 112, 275, 305, 415, 741, 405],
type: 'pictorialBar',
barMaxWidth: '20',
symbolPosition: 'end',
symbol: 'diamond',
symbolOffset: [0, '-50%'],
symbolSize: [30, 12],
zlevel: 2,
},
{
data: [741, 741, 741, 741, 741, 741, 741, 741],
type: 'bar',
barMaxWidth: 'auto',
barWidth: 30,
barGap: '-100%',
zlevel: -1,
},
{
data: [1, 1, 1, 1, 1, 1, 1, 1],
type: 'pictorialBar',
barMaxWidth: '20',
symbol: 'diamond',
symbolOffset: [0, '50%'],
symbolSize: [30, 15],
zlevel: -2,
},
],
dataZoom: [
{
type: "slider",
show: false,
endValue: 50,
bottom: "3%",
zoomLock: true,
showDataShadow: false,
showDetail: false,
},
{
type: "inside",
show: true,
xAxisIndex: [0],
moveOnMouseWheel: false,
preventDefaultMouseMove: false,
},
],
tooltip: {
trigger: 'axis',
show: false,
},
};
//线
const getemerStat = () => {
let params = {
startTime: "",
endTime: "",
startTime: null,
endTime: null,
};
emerStat(params).then((res: any) => {
console.log(res, "res");
jobTypeOption.xAxis.data = [];
jobTypeOption.series[0].data = [];
jobTypeOption.series[2].data = [];
jobTypeOption.series[3].data = [];
res.data.forEach((item) => {
jobTypeOption.xAxis.data.push(item.typeName);
jobTypeOption.series[0].data.push(item.typeNum);
jobTypeOption.xAxis.data.push(item.orgName);
jobTypeOption.series[0].data.push(item.teamNum);
jobTypeOption.series[2].data.push(item.teamNum);
});
let max = Math.max(...jobTypeOption.series[0].data);
for (let i = 0; i < res.data.length; i++) {
jobTypeOption.series[3].data.push(max);
}
const tenementChart = echarts.init(tenementRef.value);
tenementChart.setOption(jobTypeOption, true);
});

View File

@ -90,7 +90,7 @@ let jobTypeOption = {
],
series: [
{
name: "数量",
name: "类型总数量",
type: "line",
data: [],
symbolSize: 10,
@ -101,6 +101,36 @@ let jobTypeOption = {
borderColor: "#aaa",
},
},
{
name: "预警数量",
type: "line",
data: [],
symbolSize: 10,
itemStyle: {
color: "#FFFFFF", // 线
shadowColor: "#fff",
shadowBlur: 15,
borderColor: "#aaa",
},
},
],
dataZoom: [
{
type: "slider",
show: false,
endValue: 50,
bottom: "3%",
zoomLock: true,
showDataShadow: false,
showDetail: false,
},
{
type: "inside",
show: true,
xAxisIndex: [0],
moveOnMouseWheel: false,
preventDefaultMouseMove: false,
},
],
};
//线
@ -112,9 +142,11 @@ const getrkStatByType = () => {
rkStatByType(params).then((res: any) => {
jobTypeOption.xAxis.data = [];
jobTypeOption.series[0].data = [];
jobTypeOption.series[1].data = [];
res.data.forEach((item) => {
jobTypeOption.xAxis.data.push(item.typeName);
jobTypeOption.series[0].data.push(item.typeCount);
jobTypeOption.series[1].data.push(item.warningCount);
});
const tenementChart = echarts.init(tenementRef.value);
tenementChart.setOption(jobTypeOption, true);

View File

@ -3,7 +3,7 @@
<BaseDialog
:dialogVisible="props.visible"
@close="onclone"
titleName="应急队伍详情"
titleName="应急事件详情"
width="50%"
@onSubmit="handleSubmit"
:footerclosed="true"

View File

@ -3,7 +3,7 @@
<BaseDialog
:dialogVisible="props.visible"
@close="onclone"
titleName="应急队伍详情"
titleName="应急物资详情"
width="50%"
@onSubmit="handleSubmit"
:footerclosed="true"
@ -84,6 +84,17 @@
></el-input>
</el-form-item>
</el-form>
<el-table
:data="tableData"
max-height="180"
style="width: 100%"
show-overflow-tooltip
>
<el-table-column type="index" label="序号" align="center" width="60" />
<el-table-column prop="equname" label="装备名称" align="center" />
<el-table-column prop="equnum" label="装备数量" align="center" width="110" />
<el-table-column prop="equtype" label="装备类型" align="center" />
</el-table>
</BaseDialog>
</template>
@ -91,6 +102,7 @@
import { reactive, ref, onMounted, watch } from "vue";
import { ElMessage, FormInstance, FormRules } from "element-plus";
import { areaTree, riskTypeList } from "@/api/account";
import { emerWareHouseDetail } from "@/api/homePage";
const formRef = ref<FormInstance>();
const props = defineProps({
visible: {
@ -105,6 +117,7 @@ const props = defineProps({
id: String,
});
const form = ref<any>({ content: "" });
const tableData = ref([])
const emits = defineEmits(["close", "onSubmit"]);
const handleSubmit = () => {
onclone();
@ -127,6 +140,11 @@ const getRiskTypeList = () => {
types.value = res.data;
});
};
const getemerWareHouseDetail = (id) => {
emerWareHouseDetail(id).then((res: any) => {
tableData.value = res.data.equipList
})
}
onMounted(() => {
getareaTree();
getRiskTypeList();
@ -136,6 +154,7 @@ watch(
() => props.visible,
() => {
form.value = props.form;
if(form.value.houseId)getemerWareHouseDetail(form.value.houseId)
}
);
</script>

View File

@ -3,7 +3,7 @@
<BaseDialog
:dialogVisible="props.visible"
@close="onclone"
titleName="应急队伍详情"
titleName="应急体系详情"
width="50%"
@onSubmit="handleSubmit"
:footerclosed="true"