Browse Source

基本信息图表

master_tdsql
xzt 1 year ago
parent
commit
18875f0a3e
  1. 136
      src/views/safetyManage/declarationManage/sluice/declare/components/dataCharts.vue
  2. 97
      src/views/safetyManage/declarationManage/sluice/declare/components/listPage/index.vue
  3. 97
      src/views/safetyManage/declarationManage/sluice/declare/components/listPage/transform.vue
  4. 279
      src/views/safetyManage/declarationManage/sluice/examine/components/listPage/index.vue
  5. 19
      src/views/safetyManage/declarationManage/sluice/examine/components/listPage/transform.vue

136
src/views/safetyManage/declarationManage/sluice/declare/components/dataCharts.vue

@ -1,9 +1,141 @@
<template> <template>
<div class="content"></div> <div class="content">
<div ref="pieEle" style="width: 40%; height: 100%"></div>
<div ref="barEle" style="width: 60%; height: 100%"></div>
</div>
</template> </template>
<script>
import { getPie, getHistogram } from "@/api/yg/jbxx";
import * as echarts from "echarts";
export default {
data() {
return {
pieChartData: [],
barChartData: [],
};
},
created() {
this.getData();
},
methods: {
async getData() {
const res1 = await getPie();
const res2 = await getHistogram();
for (let key in res1[0]) {
this.pieChartData.push({ value: res1[0][key], name: key });
}
// for (let key in res1[0]) {
// this.barChartData.push({ value: res1[0][key], name: key });
// }
this.barChartData = res2;
this.pieInit();
this.barInit();
console.log("pieChartData", this.pieChartData);
console.log("barChartData", this.barChartData);
},
pieInit() {
let chartDom = this.$refs.pieEle;
let myChart = echarts.init(chartDom);
let option = {
title: {
// text: "Referer of a Website",
// subtext: "Fake Data",
left: "center",
},
color: ["#5DB1FF", "#FBD437", "#36CBCB", "#6DD48C"],
tooltip: {
trigger: "item",
},
legend: {
orient: "horizontal",
bottom: "2%",
icon: "circle",
},
series: [
{
name: "水闸占比",
type: "pie",
radius: "50%",
data: this.pieChartData,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
},
],
};
option && myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
});
},
barInit() {
let chartDom = this.$refs.barEle;
let myChart = echarts.init(chartDom);
let option = {
title: {
// text: "World Population",
},
color: ["#38A0FF", "#4CCA73"],
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
legend: {
orient: "horizontal",
bottom: "2%",
icon: "circle",
},
// grid: {
// left: "3%",
// right: "4%",
// bottom: "10%",
// containLabel: true,
// },
xAxis: {
type: "category",
data: Object.keys(this.barChartData),
},
yAxis: {
type: "value",
minInterval: 1, //1
// boundaryGap: [0, 1],
},
series: [
{
name: "已登记",
type: "bar",
data: Object.values(this.barChartData)[0],
},
{
name: "未登记",
type: "bar",
data: Object.values(this.barChartData)[1],
},
],
};
option && myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
});
},
},
};
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
height: 300px; height: 300px;
border: 1px solid #000; // border: 1px solid #000;
background: #fff;
box-shadow: 2px 4px 6px 2px rgba(0, 0, 0, 0.2);
margin-bottom: 10px;
display: flex;
} }
</style> </style>

97
src/views/safetyManage/declarationManage/sluice/declare/components/listPage/index.vue

@ -68,7 +68,7 @@
>申报</el-button >申报</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
icon="el-icon-edit" icon="el-icon-edit"
@ -78,8 +78,8 @@
v-hasPermi="['yg:jbxx:edit']" v-hasPermi="['yg:jbxx:edit']"
>登记</el-button >登记</el-button
> >
</el-col> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
@ -89,7 +89,7 @@
v-hasPermi="['yg:jbxx:remove']" v-hasPermi="['yg:jbxx:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col> -->
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@ -97,16 +97,11 @@
></right-toolbar> ></right-toolbar>
</el-row> </el-row>
<el-table <el-table v-loading="loading" :data="jbxxList">
v-loading="loading"
:data="jbxxList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" fixed />
<el-table-column <el-table-column
label="序号" label="序号"
type="index" type="index"
width="50" width="100"
align="center" align="center"
fixed fixed
/> />
@ -194,14 +189,33 @@
v-hasPermi="['yg:jbxx:transform']" v-hasPermi="['yg:jbxx:transform']"
>换证</el-button >换证</el-button
> >
<el-button
size="mini" <el-popconfirm
type="text" icon="el-icon-info"
icon="el-icon-delete" icon-color="green"
@click="handleDelete(scope.row)" :title="
v-hasPermi="['yg:jbxx:remove']" scope.row.zxStatus == 1 ? scope.row.reason : '确定提交注销申请吗'
>注销</el-button "
:style="{ marginLeft: '10px' }"
@confirm="handleDelete(scope.row)"
> >
<el-button
slot="reference"
size="mini"
type="text"
icon="el-icon-delete"
:style="{ color: 'red' }"
v-hasPermi="['yg:jbxx:remove']"
>
{{
scope.row.zxStatus == 1
? "注销不通过原因"
: scope.row.zxStatus == 0
? "注销申请中"
: "申请注销"
}}
</el-button>
</el-popconfirm>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -1033,24 +1047,37 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const id = row.id;
if (ids) { let form;
this.$confirm("是否删除选中的数据?", "警告", { getJbxx(id).then((res) => {
confirmButtonText: "确定", form = res.data;
cancelButtonText: "取消", form.zxStatus = "0";
type: "warning", updateJbxx(form).then((response) => {
}) if (response.code === 200) {
.then(function () { this.msgSuccess("申请注销审核成功");
return delJbxx(ids);
})
.then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); }
}) });
.catch(function () {}); });
} else {
this.$message.warning("请选择要删除的数据!!"); // const ids = row.id || this.ids;
} // if (ids) {
// this.$confirm("", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// })
// .then(function () {
// return delJbxx(ids);
// })
// .then(() => {
// this.getList();
// this.msgSuccess("");
// })
// .catch(function () {});
// } else {
// this.$message.warning("");
// }
}, },
}, },
}; };

97
src/views/safetyManage/declarationManage/sluice/declare/components/listPage/transform.vue

@ -8,6 +8,10 @@
:close-on-click-modal="false" :close-on-click-modal="false"
@close="close" @close="close"
> >
<div class="noPass" v-if="this.form.status == '1'">
<div class="noPassTitle">审核不通过意见</div>
<div class="noPassContent">{{ this.form.remark }}</div>
</div>
<el-row :gutter="15"> <el-row :gutter="15">
<el-form ref="form" :model="form" :rules="rules" label-width="124px"> <el-form ref="form" :model="form" :rules="rules" label-width="124px">
<el-row :gutter="15"> <el-row :gutter="15">
@ -620,32 +624,43 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { if (this.form.securityCategory == this.form.securityCategoryNow) {
if (valid) { this.$message({
this.form.securityAppraisalSituation = JSON.stringify(this.fileList1); message: "安全类别未更改,无需提交",
this.form.securityCategoryAttachment = JSON.stringify(this.fileList2); type: "warning",
this.form.status = "0"; });
} else {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.securityAppraisalSituation = JSON.stringify(
this.fileList1
);
this.form.securityCategoryAttachment = JSON.stringify(
this.fileList2
);
this.form.status = "0";
if (this.form.id != null) { if (this.form.id != null) {
updateHzxx(this.form).then((response) => { updateHzxx(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
} else { } else {
this.form.wagaId = this.inFo.id; this.form.wagaId = this.inFo.id;
addHzxx(this.form).then((response) => { addHzxx(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
}
} }
} });
}); }
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
@ -719,11 +734,35 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/css/dialog.scss"; @import "@/assets/css/dialog.scss";
// ::v-deep { ::v-deep {
// .el-dialog { .el-dialog {
// margin-top: 10vh !important; // margin-top: 10vh !important;
// } .noPass {
// } // padding: 10px 0;
// display: inline;
border: 1px solid #ccc;
display: flex;
// height: 50px;
margin-bottom: 20px;
.noPassTitle {
display: flex;
justify-content: center;
align-items: center;
padding: 20px 10px;
background: #f0f0f0;
border-right: 1px solid #ccc;
}
.noPassContent {
flex: 1;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
.listTitle { .listTitle {
font-size: 14px; font-size: 14px;
padding-left: 10px; padding-left: 10px;

279
src/views/safetyManage/declarationManage/sluice/examine/components/listPage/index.vue

@ -87,7 +87,7 @@
>审核登记</el-button >审核登记</el-button
> >
</el-col> --> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
@ -97,7 +97,7 @@
v-hasPermi="['yg:jbxx:remove']" v-hasPermi="['yg:jbxx:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col> -->
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@ -105,16 +105,11 @@
></right-toolbar> ></right-toolbar>
</el-row> </el-row>
<el-table <el-table v-loading="loading" :data="jbxxList">
v-loading="loading"
:data="jbxxList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" fixed />
<el-table-column <el-table-column
label="序号" label="序号"
type="index" type="index"
width="50" width="100"
align="center" align="center"
fixed fixed
/> />
@ -187,6 +182,7 @@
>审核登记</el-button >审核登记</el-button
> >
<el-button <el-button
v-if="scope.row.hzStatus == '0'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-folder-checked" icon="el-icon-folder-checked"
@ -195,8 +191,10 @@
>审核换证</el-button >审核换证</el-button
> >
<el-button <el-button
v-if="scope.row.zxStatus == '0'"
size="mini" size="mini"
type="text" type="text"
:style="{ color: 'red' }"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['yg:jbxx:remove']" v-hasPermi="['yg:jbxx:remove']"
@ -214,7 +212,7 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改水闸安全管理基本信息对话框 --> <!-- 申报审核 -->
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
@ -344,6 +342,8 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="submitForm"> </el-button> --> <!-- <el-button type="primary" @click="submitForm"> </el-button> -->
<!-- <el-button @click="cancel">不通过</el-button> --> <!-- <el-button @click="cancel">不通过</el-button> -->
<!-- 申报审核通过 -->
<el-popconfirm <el-popconfirm
icon="el-icon-info" icon="el-icon-info"
icon-color="green" icon-color="green"
@ -352,7 +352,7 @@
> >
<el-button slot="reference" type="primary"> </el-button> <el-button slot="reference" type="primary"> </el-button>
</el-popconfirm> </el-popconfirm>
<!-- 申报审核不通过 -->
<el-popover <el-popover
placement="top" placement="top"
width="300" width="300"
@ -379,9 +379,177 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 注销审核 -->
<el-dialog
title="注销审核"
:visible.sync="zxOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
>
<el-descriptions
class="margin-top"
:column="2"
border
:labelStyle="{
'text-align': 'left',
width: '180px',
height: '50px',
}"
:contentStyle="{ minWidth: '350px' }"
>
<el-descriptions-item>
<template slot="label"> 水闸名称 </template>
{{ this.form.wagaName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 水闸代码 </template>
{{ this.form.wagaCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 水闸类型 </template>
{{ sluiceTypeFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 水闸用途 </template>
{{ this.form.wagaUse }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 行政区划 </template>
{{ $formatAdcd(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 工程规模 </template>
{{ projectScaleFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 水闸所在位置 </template>
{{ this.form.wagaLoc }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 起点经度 </template>
{{ this.form.wagaStartLong }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 起点纬度 </template>
{{ this.form.wagaStartLat }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 终点经度 </template>
{{ this.form.wagaEndLong }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 终点纬度 </template>
{{ this.form.wagaEndLat }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 工程等别 </template>
{{ engineerLevelFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 主要建筑物级别 </template>
{{ majorStructureLevelFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 最大过闸流量 </template>
{{ this.form.desLockDisc }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 闸孔数量 </template>
{{ this.form.gaorNum }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 闸孔总净宽 </template>
{{ this.form.gaorTotNetWid }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 工程建设情况 </template>
{{ engineerConstructionSituationFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 开工时间 </template>
{{ this.form.startDate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 建成时间 </template>
{{ this.form.compDate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 归口管理部门 </template>
{{ this.form.admDep }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 是否为套闸工程 </template>
{{ isGateProjectFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 观测项目 </template>
{{ observationProjectFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 水准基面 </template>
{{ this.form.levelDatum }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 水闸概况 </template>
{{ this.form.sluiceOverview }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 安全类别 </template>
{{ securityCategoryFormat(this.form) }}
</el-descriptions-item>
<!-- <el-descriptions-item>
<template slot="label"> 安全鉴定状态 </template>
{{ securityStatusFormat(this.form) }}
</el-descriptions-item> -->
</el-descriptions>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="submitForm"> </el-button> -->
<!-- <el-button @click="cancel">不通过</el-button> -->
<!-- 注销审核通过 -->
<el-popconfirm
icon="el-icon-info"
icon-color="green"
title="确定通过审核吗,请核实对好数据"
@confirm="zxForm"
>
<el-button slot="reference" type="primary">同意注销</el-button>
</el-popconfirm>
<!-- 注销审核不通过 -->
<el-popover
placement="top"
width="300"
v-model="zxVisible"
style="margin: 0 10px"
>
<el-input
v-model="reason"
placeholder="请输入驳回意见"
type="textarea"
style="margin-bottom: 10px"
></el-input>
<div style="text-align: right; margin: 0">
<el-button type="primary" size="mini" @click="cancelZx">
确定
</el-button>
<el-button size="mini" type="text" @click="zxVisible = false">
取消
</el-button>
</div>
<el-button slot="reference" type="danger"> 不同意注销 </el-button>
</el-popover>
</div>
</el-dialog>
<transform <transform
v-if="djOpen" v-if="djOpen"
ref="transform" ref="transform"
@getList="getList"
:djOpen="djOpen" :djOpen="djOpen"
:areasOptionProps="areasOptionProps" :areasOptionProps="areasOptionProps"
:areasOptions="areasOptions" :areasOptions="areasOptions"
@ -431,6 +599,7 @@ export default {
title: "", title: "",
// //
open: false, open: false,
zxOpen: false,
// //
statusOptions: [], statusOptions: [],
// //
@ -552,6 +721,8 @@ export default {
djOpen: false, djOpen: false,
remark: "", remark: "",
visible: false, visible: false,
zxVisible: false,
reason: "",
}; };
}, },
created() { created() {
@ -876,26 +1047,76 @@ export default {
} }
}); });
}, },
zxForm(row) {
const id = row.id;
delJbxx(id).then((response) => {
if (response.code === 200) {
this.getList();
this.msgSuccess("注销成功");
}
});
},
cancelZx() {
this.form.zxStatus = "1";
this.form.reason = this.reason;
updateJbxx(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("不同意注销成功");
this.getList();
this.zxOpen = false;
this.zxVisible = false;
}
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; // const ids = row.id || this.ids;
if (ids) { const id = row.id;
this.$confirm("是否删除选中的数据?", "警告", { getJbxx(id).then((res) => {
confirmButtonText: "确定", this.form = res.data;
cancelButtonText: "取消", this.zxOpen = true;
type: "warning", });
}) // let form;
.then(function () { // getJbxx(id).then((res) => {
return delJbxx(ids); // form = res.data;
}) // form.zxStatus = "1";
.then(() => { // updateJbxx(form).then((response) => {
this.getList(); // if (response.code === 200) {
this.msgSuccess("删除成功"); // that.msgSuccess("");
}) // that.getList();
.catch(function () {}); // }
} else { // });
this.$message.warning("请选择要删除的数据!!"); // });
} // let that = this;
// if (id) {
// this.$confirm("", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// })
// .then(function () {
// return delJbxx(id);
// })
// .then(() => {
// this.getList();
// this.msgSuccess("");
// })
// .catch(function () {
// let form;
// getJbxx(id).then((res) => {
// form = res.data;
// form.zxStatus = "1";
// updateJbxx(form).then((response) => {
// if (response.code === 200) {
// that.msgSuccess("");
// that.getList();
// }
// });
// });
// });
// } else {
// this.$message.warning("");
// }
}, },
}, },
}; };

19
src/views/safetyManage/declarationManage/sluice/examine/components/listPage/transform.vue

@ -478,27 +478,15 @@ export default {
// this.form.securityAppraisalSituation = JSON.stringify(this.fileList1); // this.form.securityAppraisalSituation = JSON.stringify(this.fileList1);
// this.form.securityCategoryAttachment = JSON.stringify(this.fileList2); // this.form.securityCategoryAttachment = JSON.stringify(this.fileList2);
// if (this.form.id != null) {
this.form.status = "2"; this.form.status = "2";
updateHzxx(this.form).then((response) => { updateHzxx(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("审核通过"); this.msgSuccess("审核通过成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.$emit("getList");
} }
}); });
// } else {
// this.form.wagaId = this.inFo.id;
// addHzxx(this.form).then((response) => {
// if (response.code === 200) {
// this.msgSuccess("");
// this.open = false;
// this.getList();
// }
// });
// }
// }
// });
}, },
// //
notPass() { notPass() {
@ -507,9 +495,10 @@ export default {
this.form.remark = this.remark; this.form.remark = this.remark;
updateHzxx(this.form).then((response) => { updateHzxx(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("审核不通过"); this.msgSuccess("审核不通过成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.$emit("getList");
} }
}); });
}, },

Loading…
Cancel
Save