修复分页

zhangtao
laozt 1 year ago
parent e24b029b21
commit 9d845d0b5b

@ -3,8 +3,8 @@
* @version:
* @Author: JC9527
* @Date: 2023-09-04 13:11:33
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 16:36:54
* @LastEditors: laozt 2721205210@qq.com
* @LastEditTime: 2023-12-19 09:51:36
-->
<template>
<div class="pagination">
@ -22,7 +22,6 @@
<el-pagination
background
:small="true"
:page-sizes="[10, 15]"
:total="total"
layout=" prev, pager, next, sizes, jumper"
@current-change="currentChange"

@ -3,8 +3,8 @@
* @version:
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-10-12 10:40:20
* @LastEditors: laozt 2721205210@qq.com
* @LastEditTime: 2023-12-19 10:09:26
-->
<template>
<div class="container-main" ref="main">
@ -101,7 +101,9 @@
header-align="center"
>
<template slot-scope="scope">
<span>{{ scope.row.plannedYear }}-{{ scope.row.plannedMouth }}</span>
<span
>{{ scope.row.plannedYear }}-{{ scope.row.plannedMouth }}</span
>
</template>
</el-table-column>
<el-table-column
@ -152,13 +154,13 @@
</el-table-column>
</el-table>
</div>
<div class="pagination">
<my-pagination
:total="total"
@pagesChange="pagesChange"
ref="mypagination"
></my-pagination>
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="searchBefore.pageNum"
:limit.sync="searchBefore.pageSize"
@pagination="getList"
/>
<!-- 查看 -->
<el-dialog
:visible.sync="addShow"
@ -203,7 +205,6 @@
<script>
import executive from "./echarts/executive";
import myPagination from "@/views/components/myPagination/index.vue";
import {
businessList,
enforcingDetail,
@ -211,7 +212,7 @@ import {
enforcingGet,
} from "@/api/yingji/keyEnterprise.js";
export default {
components: { myPagination, executive },
components: { executive },
name: "Article",
data() {
return {
@ -453,7 +454,6 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.form.plannedYear = this.$moment(new Date()).format("yyyy");
this.searchBefore = { ...this.searchBefore, ...this.form };
@ -518,7 +518,6 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.searchBefore = { ...this.searchBefore, ...this.form };
this.getList();
},

@ -156,13 +156,13 @@
</el-table-column>
</el-table>
</div>
<div class="pagination">
<my-pagination
:total="total"
@pagesChange="pagesChange"
ref="mypagination"
></my-pagination>
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="searchBefore.pageNum"
:limit.sync="searchBefore.pageSize"
@pagination="getList"
/>
<!-- 查看 -->
<el-dialog
:visible.sync="addShow"
@ -208,13 +208,12 @@
</template>
<script>
import myPagination from "@/views/components/myPagination/index.vue";
import { businessList } from "@/api/yingji/keyEnterprise";
import executive from "./echarts/executive";
import dictzh from "@/utils/dictzh.js";
export default {
components: { myPagination, executive },
components: { executive },
name: "Order",
data() {
return {
@ -413,7 +412,6 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.searchBefore = { ...this.searchBefore, ...this.form };
this.getList();
},
@ -433,15 +431,14 @@ export default {
pageNum: 1,
};
this.$refs.executive.district = [];
this.$refs.mypagination.defaultPages();
this.getList();
},
//
pagesChange(pages) {
this.searchBefore.pageNum = pages.pageNum;
this.searchBefore.pageSize = pages.pageSize;
this.getList();
},
// pagesChange(pages) {
// this.searchBefore.pageNum = pages.pageNum;
// this.searchBefore.pageSize = pages.pageSize;
// this.getList();
// },
getList() {
this.load1 = true;
businessList(this.searchBefore).then((res) => {

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: laozt 2721205210@qq.com
* @LastEditTime: 2023-12-13 09:50:24
* @LastEditTime: 2023-12-19 10:06:03
-->
<template>
<div class="container-main" ref="main">
@ -121,13 +121,13 @@
</el-table-column>
</el-table>
</div>
<div class="pagination">
<my-pagination
:total="total"
@pagesChange="pagesChange"
ref="mypagination"
></my-pagination>
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="searchBefore.pageNum"
:limit.sync="searchBefore.pageSize"
@pagination="getList"
/>
<!-- 新增修改 -->
<el-dialog
:visible.sync="dialogVisible"
@ -294,7 +294,6 @@
</template>
<script>
import myPagination from "@/views/components/myPagination/index.vue";
import { Loading } from "element-ui";
import executive from "./echarts/executive";
import {
@ -309,7 +308,7 @@ import {
import { getToken } from "@/utils/auth";
export default {
components: { myPagination, executive },
components: { executive },
name: "Article",
data() {
//
@ -424,7 +423,7 @@ export default {
};
},
created() {
this.queryParms.year = this.$moment(new Date()).format("yyyy")
this.queryParms.year = this.$moment(new Date()).format("yyyy");
this.searchBefore = { ...this.searchBefore, ...this.queryParms };
this.getList();
},
@ -466,7 +465,6 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.searchBefore = { ...this.searchBefore, ...this.queryParms };
this.getList();
},
@ -490,7 +488,6 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.queryParms = {
year: "",
entCode: "",
@ -611,13 +608,6 @@ export default {
}
}
},
//
pagesChange(pages) {
// console.log(pages);
this.searchBefore.pageSize = pages.pageSize;
this.searchBefore.pageNum = pages.pageNum;
this.getList();
},
handleSuccess() {},
},
mounted() {

@ -183,8 +183,6 @@
import completePlan from "./echarts/completePlan";
import finishRate from "./echarts/finishRate";
import executionPlan from "./echarts/executionPlan";
// import myPagination from "@/views/components/myPagination/index";
// import executive from "./echarts/executive";
export default {
data() {

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: laozt 2721205210@qq.com
* @LastEditTime: 2023-12-15 09:41:44
* @LastEditTime: 2023-12-19 09:49:46
-->
<template>
<div class="plan-management">
@ -112,6 +112,7 @@
tooltip-effect="light"
row-key="id"
:row-class-name="tableRowClassName"
height="430"
>
<el-table-column label="计划年份" align="center" prop="plannedYear">
<template slot-scope="scope">
@ -164,19 +165,23 @@
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 发布计划 -->
<add-dialog ref="addDialog" v-on:close="closeAddDialog" />
<!-- 详情对话框 -->
<info-dialog ref="infoDialog" />
<!-- 编辑对话框 -->
<edit-dialog ref="editDialog" />
</div>
</template>
<script>
@ -189,11 +194,12 @@ import {
} from "@/api/yingji/enterprise";
import AddDialog from "@/views/components/AddDialog/index.vue";
import InfoDialog from "./planmanage/components/infoDialog.vue";
import EditDialog from "./planmanage/components/editDialog.vue";
import executive from "./echarts/executive.vue";
import { mapState } from "vuex";
export default {
components: { AddDialog, InfoDialog, executive },
components: { AddDialog, InfoDialog, executive, EditDialog },
data() {
return {
lawHierarchys: [
@ -382,13 +388,7 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
// this.reset();
// const id = row.id || this.ids;
// getEnterprise(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = "";
// });
this.$refs.editDialog.openDialog(row);
},
/** 提交按钮 */
submitForm() {
@ -483,7 +483,6 @@ export default {
created() {
let treeData = JSON.parse(localStorage.getItem("TREE_DATA"));
this.myDistrict = treeData;
this.getList();
},
};

@ -0,0 +1,329 @@
<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-28 11:25:48
* @LastEditors: JC9527
* @LastEditTime: 2023-10-11 11:06:21
-->
<template>
<el-dialog
:visible.sync="dialogVisible"
: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="closeDialog" />
</div>
<div v-loading="loading">
<el-form ref="form" label-width="80px">
<el-form-item label="企业名称:" class="form-input">
<el-input v-model="form.enterpriseName" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="信用代码:" class="form-input">
<el-input v-model="form.enterpriseId" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="行政区划:" class="form-input">
<el-input v-model="form.district" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="发布时间:" class="form-input">
<el-input v-model="form.createTime" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="计划年份:" class="form-input">
<el-date-picker
v-model="form.plannedYear"
type="year"
format="yyyy"
:clearable="false"
:disabled="readonly"
value-format="yyyy"
placeholder="请选择年月"
>
</el-date-picker>
</el-form-item>
<el-form-item label="计划月份:" class="form-input">
<el-select
v-model="plannedMonth"
multiple
collapse-tags
style="margin-left: 20px"
placeholder="请选择月份"
@change="multipleChange"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="备注:" class="form-textarea">
<el-input
v-model="form.remark"
type="textarea"
resize="none"
:maxlength="2000"
show-word-limit
:readonly="readonly"
placeholder="请输入备注"
></el-input>
</el-form-item>
<el-form-item class="btns">
<el-button type="primary" @click="onSubmit" v-if="!readonly"
>确认修改</el-button
>
<el-button @click="closeDialog"></el-button>
</el-form-item>
</el-form>
</div>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
mydistrict: "",
plannedMonth: 1,
form: {
plannedYear: "",
plannedMonth: "",
enterpriseName: "",
district: "",
createTime: "",
planName: "",
planContent: "",
remark: "",
},
options: [
{
value: "1",
label: "1月",
},
{
value: "2",
label: "2月",
},
{
value: "3",
label: "3月",
},
{
value: "4",
label: "4月",
},
{
value: "5",
label: "5月",
},
{
value: "6",
label: "6月",
},
{
value: "7",
label: "7月",
},
{
value: "8",
label: "8月",
},
{
value: "9",
label: "9月",
},
{
value: "10",
label: "10月",
},
{
value: "11",
label: "11月",
},
{
value: "12",
label: "12月",
},
],
id: "",
idTwo: "",
readonly: false,
loading: true,
title: "查看详情",
listDes: [
{
tag: "entprName",
label: "企业名称",
value: "",
},
{
tag: "district",
label: "行政区划",
value: "",
},
{
tag: "createTime",
label: "发布时间",
value: "",
},
{
tag: "plannedYear",
label: "计划年月",
value: "",
},
{
tag: "planName",
label: "计划标题",
value: "",
span: 2,
},
{
tag: "planContent",
label: "计划内容",
value: "",
span: 2,
},
{
tag: "remark",
label: "备注",
value: "",
span: 2,
},
],
district: [],
};
},
methods: {
multipleChange(e) {
// console.log(e.join(","));
this.form.plannedMonth = e.join(",");
},
openDialog(row) {
this.dialogVisible = true;
this.loading = false;
row.district = this.componendDistrict(row.district);
this.form = row;
this.form.plannedMonth = "1";
console.log(this.form);
},
closeDialog() {
this.dialogVisible = false;
},
onSubmit() {},
//
componendDistrict(district) {
let fullName;
let treeData = JSON.parse(localStorage.getItem("TREE_DATA"));
treeData.map((item) => {
if (item.districtCode == district) {
fullName = item.district;
} else {
item.children.map((itemTwo) => {
if (itemTwo.countyCode == district) {
fullName = item.district + "-" + itemTwo.county;
}
});
}
});
return fullName;
},
},
};
</script>
<style lang="scss" scoped>
::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;
}
.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;
.line {
margin-right: 10px;
width: 5px;
height: 16px;
background-color: #1e70de;
}
.span {
font-size: 16px;
font-family: "Alibaba PuHuiTi";
font-weight: bold;
color: #1e70de;
}
}
}
.form-input {
display: inline-block;
width: 50%;
}
::v-deep .el-input {
.el-input__inner {
font-size: 15px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
}
}
.form-textarea {
::v-deep .el-textarea {
height: 180px;
.el-textarea__inner {
height: 100%;
font-size: 15px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
color: #525966;
}
}
}
.btns {
text-align: right;
::v-deep .el-button {
border-radius: 4px;
}
}
}
::v-deep .el-dialog__body {
padding: 30px 15px;
}
</style>
Loading…
Cancel
Save