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'"> <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" /> <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" /> <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip> </el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom"> <el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" /> <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" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />

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

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

@ -240,9 +240,17 @@
<dict-tag :options="dict.type.risk_report_address_type" :value="scope.row.reportAddressType"/> <dict-tag :options="dict.type.risk_report_address_type" :value="scope.row.reportAddressType"/>
</template> </template>
</el-table-column> </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="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="materialsAddr" />
<el-table-column label="预备物资数量" align="center" prop="materialsQuantity" /> <el-table-column label="预备物资数量" align="center" prop="materialsQuantity" />
<el-table-column label="生活物资保障地点" align="center" prop="lifeAddr" /> <el-table-column label="生活物资保障地点" align="center" prop="lifeAddr" />
@ -480,6 +488,18 @@
riskGrade: [ riskGrade: [
{ required: true, message: "风险点等级不能为空", trigger: "change" } { 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: [ reportAddressType: [
{ required: true, message: "风险点类型不能为空", trigger: "change" } { required: true, message: "风险点类型不能为空", trigger: "change" }
], ],
@ -541,8 +561,12 @@
riskGrade: null, riskGrade: null,
reportAddressType: null, reportAddressType: null,
riskLocation: null, riskLocation: null,
riskLocation1: "",
riskLocation2: "",
riskDesc: null, riskDesc: null,
peopleQuantity: null, peopleQuantity: null,
peopleQuantity1: "",
peopleQuantity2: "",
materialsAddr: null, materialsAddr: null,
materialsQuantity: null, materialsQuantity: null,
lifeAddr: null, lifeAddr: null,
@ -603,6 +627,8 @@
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (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) { if (this.form.riskId != null) {
updateEhsRisk(this.form).then(response => { updateEhsRisk(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -634,7 +660,23 @@
this.download('ehsRisk/ehsRisk/export', { this.download('ehsRisk/ehsRisk/export', {
...this.queryParams ...this.queryParams
}, `ehsRisk_${new Date().getTime()}.xlsx`) }, `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> </script>

@ -6,31 +6,31 @@
本年度共有 本年度共有
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
yearData.unitNum yearData.unitNum
}}</el-button> }}</el-button>
家单位开展安全生产事故隐患排查治理排查出隐患 家单位开展安全生产事故隐患排查治理排查出隐患
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
yearData.hiddenDangerNum yearData.hiddenDangerNum
}}</el-button> }}</el-button>
已整改 已整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
yearData.haveRectifiedNum yearData.haveRectifiedNum
}}</el-button> }}</el-button>
( 整改率为 ( 整改率为
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
yearData.rectifyRate yearData.rectifyRate
}}</el-button> }}</el-button>
未整改 未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
yearData.notRectifiedNum yearData.notRectifiedNum
}}</el-button> }}</el-button>
超期未整改 超期未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
yearData.exceedNotRectifiedNum yearData.exceedNotRectifiedNum
}}</el-button> }}</el-button>
累计落实整改治理资金 累计落实整改治理资金
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
yearData.rectifyMoneySum yearData.rectifyMoneySum
}}</el-button> }}</el-button>
万元 万元
<br /> <br />
<br /> <br />
@ -39,23 +39,23 @@
累计排查出{{ item.name }} 累计排查出{{ item.name }}
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
item.hiddenDangerNum item.hiddenDangerNum
}}</el-button> }}</el-button>
已整改 已整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
item.haveRectifiedNum item.haveRectifiedNum
}}</el-button> }}</el-button>
(整改率为 (整改率为
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
item.rectifyRate item.rectifyRate
}}</el-button> }}</el-button>
)未整改 )未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
item.notRectifiedNum item.notRectifiedNum
}}</el-button> }}</el-button>
超期未整改 超期未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
item.exceedNotRectifiedNum item.exceedNotRectifiedNum
}}</el-button> }}</el-button>
<br /> <br />
<br /> <br />
@ -64,23 +64,23 @@
其中列入督办隐患治理项目 其中列入督办隐患治理项目
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
collectData.hiddenDangerNum collectData.hiddenDangerNum
}}</el-button> }}</el-button>
已整改 已整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
collectData.haveRectifiedNum collectData.haveRectifiedNum
}}</el-button> }}</el-button>
(整改率为 (整改率为
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
collectData.rectifyRate collectData.rectifyRate
}}</el-button> }}</el-button>
未整改 未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
collectData.notRectifiedNum collectData.notRectifiedNum
}}</el-button> }}</el-button>
超期未整改 超期未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick">{{
collectData.exceedNotRectifiedNum collectData.exceedNotRectifiedNum
}}</el-button> }}</el-button>
) )
<br /> <br />
</blockquote> </blockquote>
@ -225,10 +225,10 @@
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -298,181 +298,181 @@
</template> </template>
<script> <script>
import { import {
getEhsIndexStatistics, getEhsIndexStatistics,
getSuperviseAndHandle, getSuperviseAndHandle,
getEhsIndexStatisticsList, getEhsIndexStatisticsList,
detailslist, detailslist,
} from "@/api/ehs/IndexStatistics"; } from "@/api/ehs/IndexStatistics";
import { parseTime } from "@/utils/ruoyi"; import { parseTime } from "@/utils/ruoyi";
import dict from "@/utils/dict"; import dict from "@/utils/dict";
export default { export default {
name: "Index", name: "Index",
dicts: ["hidden_danger_grade", "hidden_danger_status"], dicts: ["hidden_danger_grade", "hidden_danger_status"],
data() { data() {
return { return {
showSearch: true, showSearch: true,
// //
loading: true, loading: true,
// //
total: 0, total: 0,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
params: { params: {
qxStartTime: null, qxStartTime: null,
qxEndTime: null, qxEndTime: null,
pcStartTime: null, pcStartTime: null,
pcEndTime: null, pcEndTime: null,
wcStartTime: null, wcStartTime: null,
wcEndTime: null, wcEndTime: null,
},
}, },
open: false,
yearData: {
unitNum: "",
hiddenDangerNum: "",
haveRectifiedNum: "",
notRectifiedNum: "",
exceedNotRectifiedNum: "",
rectifyMoneySum: "",
rectifyRate: "",
},
collectData: {
hiddenDangerNum: "",
haveRectifiedNum: "",
notRectifiedNum: "",
exceedNotRectifiedNum: "",
rectifyMoneySum: "",
rectifyRate: "",
},
hiddenList: [],
detailsList: [],
//
dateRange: [],
};
},
created() {
this.getIndexDetails();
},
methods: {
dict,
parseTime,
/** 获取拟稿部门下拉列表 */
getIndexDetails() {
getEhsIndexStatistics().then((res) => {
this.yearData.unitNum = res.data.unitNum;
this.yearData.hiddenDangerNum = res.data.hiddenDangerNum;
this.yearData.haveRectifiedNum = res.data.haveRectifiedNum;
this.yearData.notRectifiedNum = res.data.notRectifiedNum;
this.yearData.exceedNotRectifiedNum = res.data.exceedNotRectifiedNum;
this.yearData.rectifyMoneySum = res.data.rectifyMoneySum;
this.yearData.rectifyRate = res.data.rectifyRate;
});
getSuperviseAndHandle().then((res) => {
this.collectData.hiddenDangerNum = res.data.hiddenDangerNum;
this.collectData.haveRectifiedNum = res.data.haveRectifiedNum;
this.collectData.notRectifiedNum = res.data.notRectifiedNum;
this.collectData.exceedNotRectifiedNum = res.data.exceedNotRectifiedNum;
this.collectData.rectifyRate = res.data.rectifyRate;
});
getEhsIndexStatisticsList().then((res) => {
console.log(res);
this.hiddenList = res.data;
});
}, },
open: false, /** 搜索按钮操作 */
yearData: { handleQuery() {
unitNum: "", this.queryParams.pageNum = 1;
hiddenDangerNum: "", this.getList();
haveRectifiedNum: "",
notRectifiedNum: "",
exceedNotRectifiedNum: "",
rectifyMoneySum: "",
rectifyRate: "",
}, },
collectData: { haddenClick() {
hiddenDangerNum: "", this.open = true;
haveRectifiedNum: "", this.handleQuery();
notRectifiedNum: "", },
exceedNotRectifiedNum: "", getList() {
rectifyMoneySum: "", this.loading = true;
rectifyRate: "", console.log(this.queryParams);
detailslist(this.queryParams).then((response) => {
this.detailsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
cancel() {
this.open = false;
}, },
hiddenList: [],
detailsList: [],
//
dateRange: [],
};
},
created() {
this.getIndexDetails();
},
methods: {
dict,
parseTime,
/** 获取拟稿部门下拉列表 */
getIndexDetails() {
getEhsIndexStatistics().then((res) => {
this.yearData.unitNum = res.data.unitNum;
this.yearData.hiddenDangerNum = res.data.hiddenDangerNum;
this.yearData.haveRectifiedNum = res.data.haveRectifiedNum;
this.yearData.notRectifiedNum = res.data.notRectifiedNum;
this.yearData.exceedNotRectifiedNum = res.data.exceedNotRectifiedNum;
this.yearData.rectifyMoneySum = res.data.rectifyMoneySum;
this.yearData.rectifyRate = res.data.rectifyRate;
});
getSuperviseAndHandle().then((res) => {
this.collectData.hiddenDangerNum = res.data.hiddenDangerNum;
this.collectData.haveRectifiedNum = res.data.haveRectifiedNum;
this.collectData.notRectifiedNum = res.data.notRectifiedNum;
this.collectData.exceedNotRectifiedNum = res.data.exceedNotRectifiedNum;
this.collectData.rectifyRate = res.data.rectifyRate;
});
getEhsIndexStatisticsList().then((res) => {
console.log(res);
this.hiddenList = res.data;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
haddenClick() {
this.open = true;
this.handleQuery();
},
getList() {
this.loading = true;
console.log(this.queryParams);
detailslist(this.queryParams).then((response) => {
this.detailsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
cancel() {
this.open = false;
}, },
}, };
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.home { .home {
blockquote { blockquote {
padding: 10px 20px; padding: 10px 20px;
margin: 0 0 20px; margin: 0 0 20px;
font-size: 17.5px; font-size: 17.5px;
border-left: 5px solid #eee; border-left: 5px solid #eee;
} }
hr { hr {
margin-top: 20px; margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
border: 0; border: 0;
border-top: 1px solid #eee; border-top: 1px solid #eee;
} }
.col-item { .col-item {
margin-bottom: 20px; margin-bottom: 20px;
} }
ul { ul {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px; font-size: 13px;
color: #676a6c; color: #676a6c;
overflow-x: hidden; overflow-x: hidden;
ul { ul {
list-style-type: none; list-style-type: none;
} }
h4 { h4 {
margin-top: 0px; margin-top: 0px;
} }
h2 { h2 {
margin-top: 10px; margin-top: 10px;
font-size: 26px; font-size: 26px;
font-weight: 100; font-weight: 100;
} }
p { p {
margin-top: 10px; margin-top: 10px;
b { b {
font-weight: 700; font-weight: 700;
}
} }
}
.update-log { .update-log {
ol { ol {
display: block; display: block;
list-style-type: decimal; list-style-type: decimal;
margin-block-start: 1em; margin-block-start: 1em;
margin-block-end: 1em; margin-block-end: 1em;
margin-inline-start: 0; margin-inline-start: 0;
margin-inline-end: 0; margin-inline-end: 0;
padding-inline-start: 40px; padding-inline-start: 40px;
}
} }
} }
}
</style> </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> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <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-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"

@ -1,7 +1,7 @@
<template> <template>
<div class="register"> <div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form"> <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-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号"> <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" /> <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />

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

Loading…
Cancel
Save