main
liukewei 11 months ago
parent f053c85b3b
commit 73e40fd4f7

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

@ -9,13 +9,13 @@
<template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip>
</el-tooltip>-->
<screenfull id="screenfull" class="right-menu-item hover-effect" />

@ -117,8 +117,18 @@
/>
</el-select>
</el-form-item>
<el-form-item label="隐患类型" prop="hiddenDangerType">
<el-select v-model="queryParams.hiddenDangerType" placeholder="请选择隐患类型" clearable>
<el-form-item label="隐患类型" prop="areaId">
<el-select v-model="queryParams.areaId" placeholder="请选择行政区域">
<el-option
v-for="dict in dict.type.area_id"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="行政区域" prop="hiddenDangerType">
<el-select v-model="queryParams.hiddenDangerType" placeholder="请选择行政区域" clearable>
<el-option
v-for="dict in dict.type.hidden_danger_type"
:key="dict.value"

@ -22,14 +22,12 @@
</el-select>
</el-form-item>
<el-form-item label="类别" prop="classSecond">
<el-select v-model="queryParams.classSecond" placeholder="请选择类别" clearable>
<el-option
v-for="dict in curDict"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
<el-cascader style="width:500px"
v-model="queryParams.materialNameId"
:options="options"
:props="{ multiple: false, checkStrictly: true }"
@change="handleQueryChange"></el-cascader>
</el-form-item>
<el-form-item label="物资名称" prop="materialName">
@ -144,18 +142,14 @@
<!-- <el-table-column label="类别" align="center" prop="classFirst" />-->
<el-table-column label="类别" align="center" prop="classSecond">
<template slot-scope="scope">
<template v-for="(item, index) in curDict">
<el-tag v-show = "item.value == scope.row.classSecond"
:disable-transitions="true"
:key="item.value"
:index="index"
>
{{ item.label + ' ' }}
</el-tag>
<span>{{classToStr(scope.row.classSecond,1)}}</span>
</template>
</el-table-column>
<el-table-column label="物资名称" align="center" prop="materialName" >
<template slot-scope="scope">
<span>{{classToStr(scope.row.materialName,2)}}</span>
</template>
</el-table-column>
<el-table-column label="物资名称" align="center" prop="materialName" />
<el-table-column label="规格/参数" align="center" prop="materialSpecs" />
<el-table-column label="数量" align="center" prop="materialQuantity" />
<el-table-column label="待处理出库" align="center" prop="sendQuantity" />
@ -247,7 +241,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="类别" prop="classSecond">
<!--<el-form-item label="类别" prop="classSecond">
<el-select v-model="form.classSecond" placeholder="请选择类别">
<el-option
v-for="dict in curDict"
@ -256,11 +250,15 @@
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-form-item>-->
</el-col>
</el-row>
<el-form-item label="物资名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入物资名称" />
<el-form-item label="物资名称" prop="materialNameId" style="width:500px">
<!--<el-input v-model="form.materialName" placeholder="请输入物资名称" />-->
<el-cascader style="width:500px"
v-model="form.materialNameId"
:options="options"
@change="handleChange"></el-cascader>
</el-form-item>
<el-row>
<el-col :span="12">
@ -334,12 +332,14 @@
import {listAllDept } from "@/api/system/dept";
import {addEhsMaterialDetail,listEhsMaterialDetail, updateEhsMaterialDetail , delEhsMaterialDetail} from "@/api/ehs/EhsMaterialDetail";
import { getDicts } from "@/api/system/dict/data";
import options from '../../../assets/materialClass';
export default {
name: "EhsMaterial",
// dicts: ['material_class_1','material_class_2','material_class_3','material_class_4'],
data() {
return {
options:options,
curDict:[],
//
loading: true,
@ -411,7 +411,7 @@
classSecond: [
{ required: true, message: "类别不能为空", trigger: "blur" }
],
materialName: [
materialNameId: [
{ required: true, message: "物资名称不能为空", trigger: "blur" }
],
materialQuantity: [
@ -420,7 +420,9 @@
tel: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }
],
}
},
};
},
created() {
@ -532,6 +534,10 @@
const materialId = row.materialId || this.ids
getEhsMaterial(materialId).then(response => {
this.form = response.data;
this.form.materialNameId = [];
this.form.materialNameId.push(this.form.classSecond);
this.form.materialNameId.push(this.form.materialName);
console.log(this.form.materialNameId);
this.open = true;
this.title = "修改物资信息";
});
@ -540,6 +546,8 @@
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.classSecond = this.form.materialNameId[0];
this.form.materialName = this.form.materialNameId[1];
if (this.form.materialId != null) {
updateEhsMaterial(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
@ -647,6 +655,40 @@
this.$modal.msgSuccess("终止成功");
}).catch(() => {});
},
handleChange(value) {
console.log(value);
},
handleQueryChange(value) {
if(value.length==2){
this.queryParams.classSecond = value[0] ;
this.queryParams.materialName = value[1] ;
}else if(value.length==1){
this.queryParams.classSecond = value[0] ;
}
},
classToStr(value,type) {
let str ="";
if(type==1){
this.options.forEach(item =>{
if(item.value==value){
str = item.label;
}
})
}else{
this.options.forEach(item =>{
let v = value.split("-");
if(item.value==v[0]){
item.children.forEach(it =>{
if(it.value==value){
str = it.label;
}
})
}
})
}
console.log(str);
return str;
},
}
};
</script>

@ -240,9 +240,17 @@
<dict-tag :options="dict.type.risk_report_address_type" :value="scope.row.reportAddressType"/>
</template>
</el-table-column>
<el-table-column label="风险点位置" align="center" prop="riskLocation" />
<el-table-column label="风险点位置" align="center" prop="riskLocation" >
<template slot-scope="scope">
<span>{{toStr(scope.row.riskLocation,1)}}</span>
</template>
</el-table-column>
<el-table-column label="风险点概况" align="center" prop="riskDesc" />
<el-table-column label="涉及群众数量" align="center" prop="peopleQuantity" />
<el-table-column label="涉及群众数量" align="center" prop="peopleQuantity" >
<template slot-scope="scope">
<span>{{toStr(scope.row.peopleQuantity,2)}}</span>
</template>
</el-table-column>
<el-table-column label="抢险救援物资保障地点" align="center" prop="materialsAddr" />
<el-table-column label="预备物资数量" align="center" prop="materialsQuantity" />
<el-table-column label="生活物资保障地点" align="center" prop="lifeAddr" />
@ -480,6 +488,18 @@
riskGrade: [
{ required: true, message: "风险点等级不能为空", trigger: "change" }
],
riskLocation1: [
{ required: true, message: "位置不能为空", trigger: "change" }
],
riskLocation2: [
{ required: true, message: "位置不能为空", trigger: "change" }
],
peopleQuantity1: [
{ required: true, message: "涉及群众数量不能为空", trigger: "change" }
],
peopleQuantity2: [
{ required: true, message: "涉及群众数量不能为空", trigger: "change" }
],
reportAddressType: [
{ required: true, message: "风险点类型不能为空", trigger: "change" }
],
@ -541,8 +561,12 @@
riskGrade: null,
reportAddressType: null,
riskLocation: null,
riskLocation1: "",
riskLocation2: "",
riskDesc: null,
peopleQuantity: null,
peopleQuantity1: "",
peopleQuantity2: "",
materialsAddr: null,
materialsQuantity: null,
lifeAddr: null,
@ -603,6 +627,8 @@
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.riskLocation = this.form.riskLocation1+";"+this.form.riskLocation2;
this.form.peopleQuantity = this.form.peopleQuantity1+";"+this.form.peopleQuantity2
if (this.form.riskId != null) {
updateEhsRisk(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
@ -634,7 +660,23 @@
this.download('ehsRisk/ehsRisk/export', {
...this.queryParams
}, `ehsRisk_${new Date().getTime()}.xlsx`)
},
toStr(v,t) {
if(v!=null){
let s = v.split(";");
if(s.length>1){
if(t==1){//
return s[0]+"村(社区)"+s[1]+"位置"
}else {
return s[0]+"户"+s[1]+"人"
}
}else
return v;
}else
return ""
},
}
};
</script>

@ -298,15 +298,15 @@
</template>
<script>
import {
import {
getEhsIndexStatistics,
getSuperviseAndHandle,
getEhsIndexStatisticsList,
detailslist,
} from "@/api/ehs/IndexStatistics";
import { parseTime } from "@/utils/ruoyi";
import dict from "@/utils/dict";
export default {
} from "@/api/ehs/IndexStatistics";
import { parseTime } from "@/utils/ruoyi";
import dict from "@/utils/dict";
export default {
name: "Index",
dicts: ["hidden_danger_grade", "hidden_danger_status"],
data() {
@ -410,11 +410,11 @@ export default {
this.open = false;
},
},
};
};
</script>
<style scoped lang="scss">
.home {
.home {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
@ -474,5 +474,5 @@ export default {
padding-inline-start: 40px;
}
}
}
}
</style>

@ -1,98 +0,0 @@
<template>
<div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart :chart-data="lineChartData" />
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<raddar-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
export default {
name: 'Index',
components: {
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
},
data() {
return {
lineChartData: lineChartData.newVisitis
}
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
}
}
}
</script>
<style lang="scss" scoped>
.dashboard-editor-container {
padding: 32px;
background-color: rgb(240, 242, 245);
position: relative;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
@media (max-width:1024px) {
.chart-wrapper {
padding: 8px;
}
}
</style>

@ -1,7 +1,7 @@
<template>
<div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">唐河县安全隐患及应急救援管理平台</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"

@ -1,7 +1,7 @@
<template>
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">唐河县安全隐患及应急救援管理平台</h3>
<el-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />

@ -77,13 +77,13 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dept:edit']"
>修改</el-button>
<el-button
<!--<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['system:dept:add']"
>新增</el-button>
>新增</el-button>-->
<el-button
v-if="scope.row.parentId != 0"
size="mini"
@ -100,11 +100,11 @@
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="24" v-if="form.parentId !== 0">
<!-- <el-col :span="24" v-if="form.parentId !== 0">
<el-form-item label="上级部门" prop="parentId">
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
</el-form-item>
</el-col>
</el-col>-->
</el-row>
<el-row>
<el-col :span="12">
@ -193,9 +193,9 @@ export default {
form: {},
//
rules: {
parentId: [
/*parentId: [
{ required: true, message: "上级部门不能为空", trigger: "blur" }
],
],*/
deptName: [
{ required: true, message: "部门名称不能为空", trigger: "blur" }
],
@ -251,7 +251,7 @@ export default {
reset() {
this.form = {
deptId: undefined,
parentId: undefined,
parentId: 100,
deptName: undefined,
orderNum: undefined,
leader: undefined,
@ -274,7 +274,8 @@ export default {
handleAdd(row) {
this.reset();
if (row != undefined) {
this.form.parentId = row.deptId;
//this.form.parentId = row.deptId;
this.form.parentId = 100;
}
this.open = true;
this.title = "添加部门";
@ -310,6 +311,7 @@ export default {
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
console.log(this.form)
if (this.form.deptId != undefined) {
updateDept(this.form).then(response => {
this.$modal.msgSuccess("修改成功");

Loading…
Cancel
Save