You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
suzhouyingjiPC/src/views/yingji/enforcing.vue

735 lines
18 KiB

<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 16:47:17
-->
2 years ago
<template>
2 years ago
<div class="container-main" ref="main">
<div class="enforce-the-law-title">
<div class="filtrate-condition">
<div class="select-input">
2 years ago
<div class="select-span">年份:</div>
2 years ago
<el-date-picker
v-model="form.plannedYear"
type="month"
placeholder="请选择"
value-format="yyyy-MM"
size="small"
>
</el-date-picker>
</div>
<div class="select-input">
<div class="select-span">区划:</div>
2 years ago
<executive @quhua="quhua" @quhuadizhi="quhuadizhi" ref="executive"></executive>
2 years ago
</div>
<div class="my-checkbox">
<el-checkbox-group v-model="checkList" @change="setmealSelect">
2 years ago
<el-checkbox label="">全部</el-checkbox>
2 years ago
<el-checkbox label="1">已检查</el-checkbox>
2 years ago
<el-checkbox label="2">未检查</el-checkbox>
2 years ago
</el-checkbox-group>
</div>
</div>
<div style="display: flex">
<div class="export" @click="searchList" style="margin-right: 10px">
<span>搜索</span>
</div>
<div
class="export"
@click="chongzhiList"
style="margin-right: 10px; background-color: #fdab5b"
>
2 years ago
<span>重置</span>
</div>
<div class="export" @click="exportFile">
2 years ago
<img src="@/assets/images/export.png" alt="" />
<span>导出excel</span>
</div>
</div>
2 years ago
</div>
<div class="tables">
<el-table
:data="tableData"
style="width: 100%"
:height="484"
:border="false"
v-loading="loads"
:row-class-name="tableRowClassName"
:cell-style="columnStyle"
>
<el-table-column
prop="plannedYear"
label="计划年月"
2 years ago
width="180"
header-align="center"
>
2 years ago
</el-table-column>
<el-table-column
prop="district"
label="行政区划"
width="180"
header-align="center"
>
<template slot-scope="scope">
<span>{{ componendDistrict(scope.row.district) }}</span>
</template>
2 years ago
</el-table-column>
<el-table-column
prop="entprName"
label="企业名称"
header-align="center"
>
</el-table-column>
2 years ago
<el-table-column prop="checkStatus" label="状态" header-align="center">
<template slot-scope="scope">
<div
style="font-family: 'Alibaba PuHuiTi'"
2 years ago
:class="scope.row.checkStatus == '2' ? 'isStyle' : ''"
2 years ago
>
2 years ago
{{ scope.row.checkStatus == 2 ? "未检查" : "已检查" }}
2 years ago
</div>
</template>
</el-table-column>
2 years ago
<el-table-column label="操作" header-align="center">
<template slot-scope="scope">
<div class="tabs-btns">
<div
class="look"
v-if="scope.row.checkStatus == 1"
@click="look(scope.row)"
>
2 years ago
<span>查看执法详情</span>
</div>
2 years ago
</div>
</template>
</el-table-column>
</el-table>
2 years ago
</div>
2 years ago
<div class="pagination">
2 years ago
<my-pagination
:total="total"
@pagesChange="pagesChange"
ref="mypagination"
></my-pagination>
2 years ago
</div>
<!-- 查看 -->
<el-dialog
:visible.sync="addShow"
:show-close="false"
:destroy-on-close="true"
:close-on-click-modal="false"
append-to-body
custom-class="dialog-boxed"
width="50%"
>
<div class="dialog-slot">
<div class="closeClick">
<div class="newplan">
<div class="line"></div>
<div class="span">执法详情</div>
</div>
<img src="@/assets/images/close.png" alt="" @click="shutDownDetail" />
</div>
<div class="content">
<div class="filtrate">
<el-descriptions :column="2" border v-loading="detailLoad">
<el-descriptions-item
:label="item.label"
v-for="(item, index) in listDes"
:key="index"
>
2 years ago
{{
item.value == "null"
? ""
: item.value == "false"
? "暂无"
: item.value
}}
2 years ago
</el-descriptions-item>
</el-descriptions>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
2 years ago
import executive from "./echarts/executive";
2 years ago
import myPagination from "@/views/components/myPagination/index.vue";
import {
businessList,
enforcingDetail,
xzTree,
2 years ago
enforcingGet,
2 years ago
} from "@/api/yingji/keyEnterprise.js";
export default {
2 years ago
components: { myPagination, executive },
2 years ago
name: "Article",
data() {
return {
tableData: [],
2 years ago
option: [],
2 years ago
loads: true,
total: 0,
form: {
2 years ago
district: "",
2 years ago
plannedYear: "",
//检测状态
2 years ago
checkStatus: "",
2 years ago
},
2 years ago
checkList: [""],
2 years ago
checkListTwo: [],
listDes: [
{
2 years ago
eng: "entprName",
label: "企业名称",
2 years ago
value: "",
},
{
2 years ago
eng: "uscCode",
label: "统一社会信用代码",
2 years ago
value: "",
},
2 years ago
// {
// eng: "CREATETIME",
// label: "创建时间",
// value: "",
// },
// {
// eng: "UPDATETIME",
// label: "修改时间",
// value: "",
// },
2 years ago
{
2 years ago
eng: "enterpriseUnitVersion",
label: "钢铁三年专项时,企业设施的版本号",
2 years ago
value: "",
},
{
2 years ago
eng: "examineStartTime",
label: "检查开始时间",
2 years ago
value: "",
},
2 years ago
{
2 years ago
eng: "examineEndTime",
label: "检查结束时间",
2 years ago
value: "",
},
2 years ago
{
2 years ago
eng: "examineSite",
label: "检查场所",
2 years ago
value: "",
},
{
2 years ago
eng: "examineSource",
label: "检查来源",
2 years ago
value: "",
},
2 years ago
2 years ago
{
2 years ago
eng: "examineType",
label: "检查方式",
2 years ago
value: "",
},
{
2 years ago
eng: "executorDept",
label: "执法部门",
2 years ago
value: "",
},
{
2 years ago
eng: "executorDeptCode",
label: "执法部门代码",
2 years ago
value: "",
},
2 years ago
// {
// eng: "executorId",
// label: "检查人员id",
// value: "",
// },
2 years ago
{
2 years ago
eng: "expertsInFlag",
label: "是否专家参与",
2 years ago
value: "",
},
{
2 years ago
eng: "expertsName",
label: "专家姓名",
2 years ago
value: "",
},
2 years ago
// {
// eng: "planExamineId",
// label: "检查方案id",
// value: "",
// },
2 years ago
{
2 years ago
eng: "sourceData",
label: "数据来源",
2 years ago
value: "",
},
{
2 years ago
eng: "threeSpecialType",
label: "是否是三年专项",
2 years ago
value: "",
},
{
2 years ago
eng: "typeCode",
label: "文书类型",
2 years ago
value: "",
},
{
2 years ago
eng: "writNo",
label: "文书文号",
2 years ago
value: "",
},
2 years ago
{
eng: "examineSituation",
label: "检查情况",
value: "",
},
2 years ago
],
searchBefore: {
pageSize: 10,
pageNum: 1,
},
details: {},
addShow: false,
detailLoad: true,
//区划的禁用
2 years ago
};
},
created() {
this.getList();
},
2 years ago
dicts: ["inspection_method", "check_source", "document_type"],
2 years ago
methods: {
2 years ago
filterTable(a, b) {
if (!b) return;
return this.selectDictLabel(a, b);
},
// 匹配行政区划
2 years ago
componendDistrict(district) {
let name;
this.option.map((item) => {
if (item.value == district) {
name = item.label;
} else {
2 years ago
item.children.map((itemTwo) => {
if (itemTwo.value == district) {
name = item.label + "-" + itemTwo.label;
}
2 years ago
});
}
2 years ago
});
return name;
},
// 获取行政区划树
quhuadizhi(district) {
2 years ago
this.option = district;
},
2 years ago
reset() {
2 years ago
this.form = {
district: "",
plannedYear: "",
checkStatus: "",
};
2 years ago
this.$refs.executive.district = [];
2 years ago
this.searchBefore = {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
2 years ago
},
//重置列表
chongzhiList() {
this.reset();
this.getList();
},
2 years ago
shutDownDetail() {
this.addShow = false;
},
look(e) {
this.addShow = true;
this.detailLoad = true;
2 years ago
enforcingGet(e.longId).then((res) => {
2 years ago
for (let key in res.data) {
this.listDes.forEach((value1, index1) => {
if (key == value1.eng) {
this.listDes[index1].value = res.data[key];
return;
}
});
}
2 years ago
this.listDes.forEach((value1, index1) => {
//检查方式
if (value1.eng == "examineType") {
this.listDes[index1].value = this.filterTable(
this.dict.type.inspection_method,
value1.value
);
}
//检查来源
if (value1.eng == "examineSource") {
this.listDes[index1].value = this.filterTable(
this.dict.type.check_source,
value1.value
);
}
//文书类型
if (value1.eng == "typeCode") {
this.listDes[index1].value = this.filterTable(
this.dict.type.document_type,
value1.value
);
}
if (value1.value == "0") {
this.listDes[index1].value = '否'
}
if (value1.value == "1") {
this.listDes[index1].value = '是'
}
});
2 years ago
this.detailLoad = false;
2 years ago
});
2 years ago
},
2 years ago
quhua(e) {
2 years ago
this.form.district = e;
2 years ago
},
2 years ago
searchList() {
this.searchBefore = {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
2 years ago
this.searchBefore = { ...this.searchBefore, ...this.form };
2 years ago
this.getList();
},
getList() {
this.loads = true;
enforcingDetail(this.searchBefore).then((res) => {
console.log(res);
2 years ago
this.tableData = res.rows;
this.total = res.total;
2 years ago
this.loads = false;
});
},
// 多选框变化事件
setmealSelect() {
this.checkList = this.checkList.slice(-1);
if (this.checkList.length > 0) {
this.checkListTwo = this.checkList;
2 years ago
this.form.checkStatus = this.checkList[0];
2 years ago
} else {
this.checkList = this.checkListTwo;
}
},
2 years ago
2 years ago
// tabs不同行给不同class
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return "success-row";
}
return "";
},
// 根据状态数据修改字体颜色
columnStyle({ row, column, rowIndex, columnIndex }) {
if (columnIndex == 3) {
if (row.state == "未执法") {
return "color: #F71052";
} else if (row.state == "已执法") {
return "color: #23B06C";
}
}
},
2 years ago
// 页码,当前页切换事件
pagesChange(pages) {
2 years ago
this.searchBefore.pageNum= pages.pageNum;
2 years ago
this.searchBefore.pageSize = pages.pageSize;
2 years ago
this.getList();
},
2 years ago
// 导出
exportFile() {
2 years ago
this.$confirm(`确认根据您的搜索条件导出搜索之后的数据吗?`, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/pharmaceuticals/bPlanEnterprise/export",
{
...this.form,
},
`执法列表.xlsx`
);
})
.catch(() => {});
2 years ago
},
},
mounted() {
this.checkListTwo = this.checkList;
},
};
</script>
<style lang="scss" scoped>
2 years ago
.isStyle {
color: #f71052;
}
2 years ago
.dialog-slot {
.closeClick {
position: absolute;
top: 0;
right: 0;
padding: 10px 20px;
width: 100%;
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
text-align: center;
background: #f8f9fa;
box-shadow: 0px 1px 0px 0px #dbe0e8;
background-color: #e0eaf8;
img {
width: 18px;
height: 18px;
cursor: pointer;
}
.newplan {
display: flex;
align-items: center;
2 years ago
.line {
margin-right: 10px;
width: 5px;
height: 16px;
background-color: #1e70de;
}
.span {
font-size: 16px;
font-family: "Alibaba PuHuiTi";
font-weight: bold;
color: #1e70de;
}
}
}
.content {
// padding: 15px 10px;
.filtrate {
padding-bottom: 10px;
.select-input {
// margin-right: 10px;
margin-top: 20px;
display: flex;
align-items: center;
2 years ago
.select-span {
font-size: 13px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
// line-height: 40px;
margin-right: 10px;
}
::v-deep .el-select,
.el-cascader {
background-color: transparent;
width: 180px;
.el-input__inner {
height: 33px;
}
2 years ago
// border-radius: 2px;
.el-input
.el-input__suffix
.el-input__suffix-inner
.el-icon-arrow-up::before {
content: "";
background: url(../../assets/images/down2.png) center center
no-repeat;
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
2 years ago
}
.select-input {
width: 45%;
::v-deep .el-input {
.el-input__inner {
height: 33px;
}
}
}
2 years ago
.select-btn {
width: 80px;
height: 33px;
background: #2378ec;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
2 years ago
font-size: 15px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
color: #ffffff;
cursor: pointer;
2 years ago
margin-right: 10px;
}
.select-btn1 {
background: #28b384;
}
}
2 years ago
}
}
::v-deep .el-descriptions-row th {
width: 20% !important;
font-size: 14px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
}
::v-deep .el-descriptions-row td {
width: 30% !important;
font-size: 14px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
}
.container-main {
// height: calc(100vh - 84px);
overflow: hidden;
padding: 0 20px;
height: 100%;
background-color: #fff;
.enforce-the-law-title {
display: flex;
align-items: center;
justify-content: space-between;
padding: 31px 0 12px 0;
.filtrate-condition {
display: flex;
align-items: center;
.select-input {
margin-right: 20px;
display: flex;
align-items: center;
2 years ago
.select-span {
font-size: 14px;
2 years ago
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
2 years ago
line-height: 40px;
margin-right: 10px;
}
2 years ago
::v-deep .el-select {
background-color: transparent;
width: 210px;
.el-input__inner {
height: 33px;
}
// border-radius: 2px;
.el-input
.el-input__suffix
.el-input__suffix-inner
.el-icon-arrow-up::before {
content: "";
background: url(../../assets/images/down2.png) center center
no-repeat;
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
2 years ago
.my-checkbox {
margin-left: 50px;
::v-deep .el-checkbox-group {
.el-checkbox__label {
font-size: 14px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
}
}
}
}
2 years ago
.export {
display: flex;
align-items: center;
justify-content: center;
padding: 6px 19px;
background-color: #2378ec;
cursor: pointer;
img {
width: 22px;
margin-right: 10px;
}
span {
color: #ffffff;
font-size: 14px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
}
}
}
2 years ago
.tables {
margin-top: 10px;
background-color: #eaf2fd;
.tabs-btns {
display: flex;
align-items: center;
justify-content: center;
.look {
display: flex;
align-items: center;
cursor: pointer;
span {
font-size: 15px;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #045ffd;
text-decoration: underline;
}
}
}
::v-deep .el-table {
.success-row {
background-color: rgba(234, 242, 253, 0.25);
}
td {
height: 42px;
text-align: center;
font-size: 14px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
}
th {
height: 45px;
background-color: #eaf2fd;
font-size: 15px;
font-family: "Alibaba PuHuiTi";
font-weight: bold;
color: #525966;
.el-checkbox {
display: none;
}
}
}
::v-deep .el-table::before {
height: 0;
}
}
.pagination {
margin-top: 40px;
}
}
</style>