分页查询bug修复

This commit is contained in:
宋伟佳
2021-09-02 15:51:10 +08:00
parent ab9cd62bbe
commit bb2e4b92b0
7 changed files with 142 additions and 97 deletions
@@ -593,7 +593,7 @@
class="common-button-primary"
size="small"
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
@click="getStandData">
@click="getStandDataBtn">
查询
</el-button>
</el-form-item>
@@ -746,7 +746,7 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import {saveTaskFirst, queryTaskFirst} from "api/process";
import { saveTaskFirst, queryTaskFirst } from "api/process";
import seeDatalis from "@/pages/localTool/standContrast/pages/seeDatalis";
export default {
@@ -774,7 +774,7 @@ export default {
pageSizeNo: this.$store.getters.userInfo.configContent
},
standList: [], //新添加的标准
commentText: '',
commentText: "",
modalshowflag: false, // drawer开关
modalshowflag2: false,
nodeList2: [],
@@ -796,21 +796,21 @@ export default {
},
formRules: {
listType: [
{required: true, message: "请选择清单类型", trigger: "change"}
{ required: true, message: "请选择清单类型", trigger: "change" }
],
listName: [
{required: true, message: "请填写清单名称", trigger: "change"}
{ required: true, message: "请填写清单名称", trigger: "change" }
]
},
roleFormRules: {
dockUserName: [
{required: true, message: "请选择会签责任人", trigger: "change"}
{ required: true, message: "请选择会签责任人", trigger: "change" }
],
ministerUserName: [
{required: true, message: "请选择修订责任人", trigger: "change"}
{ required: true, message: "请选择修订责任人", trigger: "change" }
],
directorUserName: [
{required: true, message: "请选择审批责任人", trigger: "change"}
{ required: true, message: "请选择审批责任人", trigger: "change" }
]
},
dataList: [],//清单里的标准数据
@@ -968,17 +968,17 @@ export default {
this.sarAccessListDatas.forEach(item => {
// 适用车型转换
if (item.carType !== null) {
let k = (item.carType || "").split(',')
let k = (item.carType || "").split(",");
for (let i in this.energyKindOptions) {
for (let m = 0; m < k.length; m++) {
if (this.energyKindOptions[i].value === k[m]) {
k[m] = this.energyKindOptions[i].label
k[m] = this.energyKindOptions[i].label;
}
item.carType = k.join(',')
item.carType = k.join(",");
}
}
}
})
});
this.total = res.data.total;
}, e => {
});
@@ -1024,6 +1024,11 @@ export default {
};
this.getStandData();
},
//查询标准按钮
getStandDataBtn() {
this.pageNo = 1;
this.getStandData();
},
getStandData() {
this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage", {
standType: this.standardSearch.standType,
@@ -1082,14 +1087,14 @@ export default {
//保存事件
handleSave() {
this.saveLoading = true;
this.listForm.fileName = this.fileInfoList
this.listForm.fileName = this.fileInfoList;
let _formData = new FormData();
_formData.append("id", this.bpnId || "");
_formData.append("createUser", this.$store.getters.userInfo.userId);
_formData.append("createUserName", this.$store.getters.userInfo.userName);
_formData.append("prcType", "4");
_formData.append("json", JSON.stringify({
taskInfo: '引入法规标准清单',
taskInfo: "引入法规标准清单",
form: this.listForm,
roleForm: this.roleForm,
commentText: this.commentText
@@ -1107,15 +1112,15 @@ export default {
if (this.dataList.length < 1) {
this.$message.warning("标准不能为空");
} else {
this.listForm.commentText = this.commentText
this.listForm.fileName = this.fileInfoList
this.listForm.commentText = this.commentText;
this.listForm.fileName = this.fileInfoList;
var json = Object.assign(this.listForm, this.roleForm);
this.$refs["qdfbForm"].validate((valid) => {
if (valid) {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true
this.$http.get("lawss/activiti/startProcess", {type: "4"}, {
this.isSubmit = true;
this.$http.get("lawss/activiti/startProcess", { type: "4" }, {
_this: this
}, res => {
if (res.ok) {
@@ -1130,7 +1135,7 @@ export default {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
this.isSubmit = false;
});
}
});
@@ -1148,9 +1153,9 @@ export default {
delFileInfo(file, fileList) {
this.fileInfoList.forEach((item, index) => {
if (item.name === file.name || item.id === file.id) {
this.fileInfoList.splice(index, 1)
this.fileInfoList.splice(index, 1);
}
})
});
},
fileUpload() {
this.fileMadel = true;
@@ -1158,7 +1163,7 @@ export default {
// 上传文件成功回调
uploadBackSuccess(res, file, fileList) {
if (res.ok) {
this.fileInfoList.push(res.data)
this.fileInfoList.push(res.data);
this.$message.success("上传成功");
} else {
this.$message.error(res.message);
@@ -1168,7 +1173,7 @@ export default {
// 相关附件 上传之前钩子
beforeUpload(file) {
var filename = file.name;
this.listForm.fileName = this.listForm.fileName + ',' + file.name
this.listForm.fileName = this.listForm.fileName + "," + file.name;
var index1 = filename.lastIndexOf(".");
var index2 = filename.length;
var fileSuffix = filename.substring(index1, index2);
@@ -1295,30 +1300,30 @@ export default {
this.listForm.descriptionList = this.selectedList[0].remark;
// 将查询出的文件名字和id组合成数组
if (this.selectedList[0].fileName !== null) {
let textName = this.selectedList[0].fileName.split(',').map(item => {
let textName = this.selectedList[0].fileName.split(",").map(item => {
return {
name: item
}
})
let textId = this.selectedList[0].fileIds.split(',').map(item => {
};
});
let textId = this.selectedList[0].fileIds.split(",").map(item => {
return {
id: item
}
})
};
});
textName.forEach(item => {
this.$set(item, 'id', '')
})
this.$set(item, "id", "");
});
for (let i = 0; i < textName.length; i++) {
textName[i].id = textId[i].id
textName[i].id = textId[i].id;
}
this.fileInfoList = textName
this.fileInfoList = textName;
} else {
this.fileInfoList = []
this.fileInfoList = [];
}
this.ListModel = false;
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById",
{id: this.selectedList[0].id, page: this.page, Size: this.pageSize}, {
{ id: this.selectedList[0].id, page: this.page, Size: this.pageSize }, {
_this: this
}, res => {
if (res.data === null) {
@@ -1327,13 +1332,13 @@ export default {
this.dataList = res.data.records;
this.dataList.forEach(item => {
if (item.xcxssrqgj === null) {
this.$set(item, "XCXSSRQ", '');
this.$set(item, "ZCCSSRQ", '');
this.$set(item, "XCXSSRQ", "");
this.$set(item, "ZCCSSRQ", "");
} else {
this.$set(item, "XCXSSRQ", item.xcxssrqgj);
this.$set(item, "ZCCSSRQ", item.zccssrqgj);
}
})
});
this.listForm.dataList = res.data.records;
let formId = [];
this.dataList.map(item => {
@@ -1355,8 +1360,8 @@ export default {
},
// 表格某一行的单击事件
rowClick(row, column) {
const selectData = this.selectList
this.$refs.selection.clearSelection()
const selectData = this.selectList;
this.$refs.selection.clearSelection();
if (selectData.length === 1) {
selectData.forEach(item => {
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
@@ -1367,18 +1372,18 @@ export default {
else {
this.$refs.selection.toggleRowSelection(row, true);
}
})
});
} else {
this.$refs.selection.toggleRowSelection(row, true);
}
},
select(selection, row) {
// 清除 所有勾选项
this.$refs.selection.clearSelection()
this.$refs.selection.clearSelection();
// 当表格数据都没有被勾选的时候 就返回
// 主要用于将当前勾选的表格状态清除
if (selection.length === 0) return
this.$refs.selection.toggleRowSelection(row, true)
if (selection.length === 0) return;
this.$refs.selection.toggleRowSelection(row, true);
},
//标准表格选择框改变
selectStandChange(data) {
@@ -1436,7 +1441,7 @@ export default {
this.$http.get("sys/dictype/getDicTypeListCode", {}, {
_this: this
}, res => {
this.energyKindOptions = res.data.ENERGYTYPES //适用车型
this.energyKindOptions = res.data.ENERGYTYPES; //适用车型
this.countryOptions = res.data.COUNTRY;
this.standStateOptions = res.data.WBZTCLASS; // 文本状态
this.setMap(this.standStateOptions);
@@ -272,7 +272,7 @@
class="common-button-primary"
size="small"
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
@click="getStandData">
@click="getStandDataBtn">
查询
</el-button>
</el-form-item>
@@ -519,6 +519,11 @@ export default {
};
this.getStandData();
},
//标准查询按钮
getStandDataBtn(){
this.pageNo = 1;
this.getStandData();
},
getStandData() {
this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage", {
standType: this.standardSearch.standType,
@@ -787,16 +792,16 @@ export default {
this.searchData();
},
pageSizeChange(pageSize) {
this.pageSize = this.$store.getters.userInfo.configContent;
this.pageSize = pageSize;
this.searchData();
},
pageChangeNo(page){
this.page = page
this.addList()
this.pageNo = page
this.getStandData();
},
pageSizeChangeNo(pageSize){
this.pageSizeNo = this.$store.getters.userInfo.configContent;
this.addList()
this.pageSizeNo = pageSize;
this.getStandData();
},
// 将文本状态的id与name对应
@@ -218,7 +218,7 @@
class="common-button-primary"
size="small"
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
@click="getStandData">
@click="getStandDataBtn">
查询
</el-button>
</el-form-item>
@@ -818,7 +818,7 @@ export default {
this.getStandData();
},
pageSizeChange(pageSize) {
this.pageSize = this.$store.getters.userInfo.configContent;
this.pageSize = pageSize;
this.getStandData();
},
pageChangeNo(page) {
@@ -843,6 +843,11 @@ export default {
});
},
//获取标准查询按钮
getStandDataBtn(){
this.page = 1;
this.getStandData();
},
//获取标准数据
getStandData() {
this.$http.post("SarStandItems/sar-stand-items/findStand", {
@@ -94,8 +94,9 @@
prop="distributePerson"
label="分发责任人">
<template slot-scope="scope">
<el-input v-model="scope.row.distributePersonId" style="display: none;"/>
<el-input v-model="scope.row.distributePerson" placeholder="请选择责任人" @click.native="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)"/>
<el-input v-model="scope.row.distributePersonId" style="display: none;" />
<el-input v-model="scope.row.distributePerson" placeholder="请选择责任人"
@click.native="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)" />
</template>
</el-table-column>
</el-table>
@@ -106,11 +107,11 @@
<el-collapse-item title="意见填写">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
@@ -205,7 +206,7 @@
class="common-button-primary"
size="small"
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
@click="getStandData">
@click="getStandDataBtn">
查询
</el-button>
</el-form-item>
@@ -392,11 +393,11 @@ export default {
productData: [], //添加抽屉的数据
standList: [], //新添加的标准
modalshowflag: false, // drawer开关
commentText: '',
commentText: "",
drawerTitle: "", //drawer标题
// 查询相关参数
searching: false,
fileType: 'FBGBJBD',
fileType: "FBGBJBD",
standardSearch: {
standType: "",
standName: ""
@@ -540,20 +541,20 @@ export default {
if (this.selectList.length) {
this.dataList.forEach((item, index) => {
if (this.selectList.includes(item.productLine)) {
const newItem = JSON.parse(JSON.stringify(item))
newItem.distributePersonId = data[0].id
newItem.distributePerson = data[0].name
this.$set(this.dataList, index, newItem)
const newItem = JSON.parse(JSON.stringify(item));
newItem.distributePersonId = data[0].id;
newItem.distributePerson = data[0].name;
this.$set(this.dataList, index, newItem);
}
})
});
} else {
const newItem = JSON.parse(JSON.stringify(this.dataList[this.currentIndex]))
newItem.distributePersonId = data[0].id
newItem.distributePerson = data[0].name
this.$set(this.dataList, this.currentIndex, newItem)
const newItem = JSON.parse(JSON.stringify(this.dataList[this.currentIndex]));
newItem.distributePersonId = data[0].id;
newItem.distributePerson = data[0].name;
this.$set(this.dataList, this.currentIndex, newItem);
this.listForm.dataList[this.currentIndex].distributePersonId = data[0].id;
this.listForm.dataList[this.currentIndex].distributePerson = data[0].name;
this.currentIndex = -1
this.currentIndex = -1;
}
}
this.modalshowflag = false;
@@ -589,7 +590,7 @@ export default {
this.standModel = true;
this.$nextTick(() => {
this.$refs.projectTable.clearSelection();
})
});
},
// 点击批量删除事件
deleteList() {
@@ -656,7 +657,7 @@ export default {
_formData.append("createUserName", this.$store.getters.userInfo.uName);
_formData.append("prcType", "5");
_formData.append("json", JSON.stringify({
taskInfo: '选择已拆分标准',
taskInfo: "选择已拆分标准",
form: this.listForm,
roleForm: this.roleForm,
commentText: this.commentText
@@ -677,7 +678,7 @@ export default {
if (item.distributePerson === "" || item.distributePerson === null || item.distributePerson === undefined) {
this.$message.warning("请选择分发责任人");
} else {
this.isSubmit = true
this.isSubmit = true;
this.listForm.commentText = this.commentText;
var json = Object.assign(this.listForm, this.roleForm);
this.$refs["listForm"].validate((valid) => {
@@ -699,7 +700,7 @@ export default {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
this.isSubmit = false;
});
}
});
@@ -734,12 +735,12 @@ export default {
//选择拆分标准确定事件
OkDrawer() {
if (this.selectedList.length === 1) {
this.listForm.standNumber = this.selectedList[0].standSortShow + '\xa0\xa0' + this.selectedList[0].standNumber + '-' + this.selectedList[0].standYear ;
this.listForm.standNumber = this.selectedList[0].standSortShow + "\xa0\xa0" + this.selectedList[0].standNumber + "-" + this.selectedList[0].standYear;
this.listForm.standName = this.selectedList[0].standName;
this.listForm.standType = this.selectedList[0].standType;
this.listForm.standId = this.selectedList[0].id;
this.listForm.XCXSSRQ = this.selectedList[0].xcxssrqgj
this.listForm.ZCCSSRQ = this.selectedList[0].zccssrqgj
this.listForm.XCXSSRQ = this.selectedList[0].xcxssrqgj;
this.listForm.ZCCSSRQ = this.selectedList[0].zccssrqgj;
this.listForm.id = this.selectedList[0].id;
this.$http.get("SarStandItems/sar-stand-items/findAllItems", {
ids: this.listForm.id,
@@ -793,7 +794,7 @@ export default {
this.getStandData();
},
pageSizeChange(pageSize) {
this.pageSize = this.$store.getters.userInfo.configContent;
this.pageSize = pageSize;
this.getStandData();
},
pageChangeNo(page) {
@@ -818,6 +819,11 @@ export default {
});
},
//获取标准查询按钮
getStandDataBtn() {
this.page = 1;
this.getStandData();
},
//获取标准数据
getStandData() {
this.$http.post("SarStandItems/sar-stand-items/findStand", {
@@ -846,7 +852,7 @@ export default {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label);
});
},
}
},
computed: {},
watch: {
@@ -280,7 +280,7 @@
class="common-button-primary"
size="small"
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
@click="getProjectData">
@click="getProjectDataBtn">
查询
</el-button>
</el-form-item>
@@ -417,8 +417,6 @@ export default {
searching: false,
//项目检索条件
projectSearch: {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
projectNumber: "",
projectName: ""
},
@@ -451,15 +449,22 @@ export default {
choiceShow() {
this.projectModel = true;
},
//项目查询按钮
getProjectDataBtn() {
this.page = 1;
this.getProjectData();
},
//获取项目数据
getProjectData() {
this.$http.get("sarStandProjectLibrary/queryProject", {
page: this.page,
pageSize: this.pageSize,
...this.projectSearch
}, {
_this: this
}, res => {
this.ProjectDatas = res.data.Maintenance.records;
this.total = res.data.Maintenance.total
this.total = res.data.Maintenance.total;
});
},
//点击清空按钮事件
@@ -524,7 +529,12 @@ export default {
this.selectedList = data;
},
pageChange(page) {
this.page = page;
this.getProjectData();
},
pageSizeChange(pageSize) {
this.pageSize = pageSize;
this.getProjectData();
},
// 点击查看
handlePreview(item) {
@@ -536,9 +546,6 @@ export default {
}
});
window.open(routeUrl.href, "_blank");
},
pageSizeChange(pageSize) {
},
//流程保存事件
handleSave() {
@@ -282,7 +282,7 @@
class="common-button-primary"
size="small"
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
@click="getProjectData">
@click="getProjectDataBtn">
查询
</el-button>
</el-form-item>
@@ -420,8 +420,6 @@ export default {
searching: false,
//项目检索条件
projectSearch: {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
projectNumber: "",
projectName: ""
},
@@ -443,9 +441,16 @@ export default {
choiceShow() {
this.projectModel = true;
},
//项目查询按钮
getProjectDataBtn(){
this.page = 1;
this.getProjectData();
},
//获取项目数据
getProjectData() {
this.$http.get("sarStandProjectLibrary/queryProjectWorkFlow", {
page: this.page,
pageSize: this.pageSize,
...this.projectSearch
}, {
_this: this
@@ -543,10 +548,12 @@ export default {
this.selectedList = data;
},
pageChange(page) {
this.page = page;
this.getProjectData();
},
pageSizeChange(pageSize) {
this.pageSize = pageSize;
this.getProjectData();
},
//流程保存事件
handleSave() {
@@ -156,7 +156,7 @@
class="common-button-primary"
size="small"
v-btn-permission=""
@click="getProjectData">
@click="getProjectDataBtn">
查询
</el-button>
</el-form-item>
@@ -260,7 +260,7 @@
type="primary"
class="common-button-primary"
size="small"
@click="searchSarAccess">
@click="searchSarAccessBtn">
查询
</el-button>
</el-form-item>
@@ -448,6 +448,11 @@ export default {
handleTabs(type) {
this.active = type;
},
//项目清单查询按钮
getProjectDataBtn(){
this.page = 1;
this.getProjectData();
},
//查询项目列表
getProjectData() {
this.$http.get("sarStandProjectLibrary/queryProjectConfirm", {
@@ -490,6 +495,11 @@ export default {
}
},
//清单查询按钮
searchSarAccessBtn(){
this.pageNo = 1;
this.searchSarAccess();
},
//查询清单列表
searchSarAccess() {
this.$http.get("sarLawsDetailedList/sar-laws-detailed-list/getAllStand", {