|
|
@@ -267,10 +267,10 @@ export default {
|
|
|
// 获取某一页面的数据,展示在表格
|
|
|
changePage: function (page) {
|
|
|
this.currentPage = page;
|
|
|
- // this.getDataListPage(this.currentPage);
|
|
|
|
|
|
//携带搜索条件
|
|
|
let data = {
|
|
|
+ informationName: this.searchName,
|
|
|
asc: this.timeSortVal == "dec" ? false : true,
|
|
|
report: "",
|
|
|
download: "",
|
|
|
@@ -303,9 +303,10 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
console.log(this.currentPage);
|
|
|
- // this.getDataListPage(this.currentPage);
|
|
|
+
|
|
|
//携带搜索条件
|
|
|
let data = {
|
|
|
+ informationName: this.searchName,
|
|
|
asc: this.timeSortVal == "dec" ? false : true,
|
|
|
report: "",
|
|
|
download: "",
|
|
|
@@ -333,13 +334,20 @@ export default {
|
|
|
window.open(url);
|
|
|
|
|
|
let data = {
|
|
|
- // asc: asc,
|
|
|
- // report: report,
|
|
|
- //download: 1,
|
|
|
+ informationName: this.searchName,
|
|
|
+ asc: this.timeSortVal == "dec" ? false : true,
|
|
|
+ report: "",
|
|
|
+ download: "",
|
|
|
Page: this.currentPage,
|
|
|
Rows: this.pageSize,
|
|
|
agentId: this.userId,
|
|
|
};
|
|
|
+ if (this.reportSortVal) {
|
|
|
+ data.report = this.reportSortVal === "already" ? true : false;
|
|
|
+ }
|
|
|
+ if (this.downloadSortVal) {
|
|
|
+ data.download = this.downloadSortVal === "already" ? true : false;
|
|
|
+ }
|
|
|
this.newGetDataList(data);
|
|
|
},
|
|
|
//查看详情
|
|
|
@@ -359,20 +367,34 @@ export default {
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
}); */
|
|
|
+ let report = '';
|
|
|
+ let download = '';
|
|
|
+ if (this.reportSortVal) {
|
|
|
+ report = this.reportSortVal === "already" ? true : false;
|
|
|
+ }
|
|
|
+ if (this.downloadSortVal) {
|
|
|
+ download = this.downloadSortVal === "already" ? true : false;
|
|
|
+ }
|
|
|
this.$router.push({
|
|
|
- path: '/inforList/detail',
|
|
|
+ path: "/inforList/detail",
|
|
|
query: {
|
|
|
tag: "infoListDetail",
|
|
|
informationId: config.informationId,
|
|
|
nowIndex: i,
|
|
|
- agentId: this.userId,
|
|
|
- Page: this.currentPage,
|
|
|
- Rows: this.pageSize,
|
|
|
+
|
|
|
+ informationName: this.searchName,
|
|
|
+ asc: this.timeSortVal == "dec" ? false : true,
|
|
|
+ report: report,
|
|
|
+ download: download,
|
|
|
+ Page: this.currentPage,
|
|
|
+ Rows: this.pageSize,
|
|
|
+ agentId: this.userId,
|
|
|
+
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
//获取资料列表
|
|
|
- getDataList: function () {
|
|
|
+ getDataListPage: function () {
|
|
|
this.$http({
|
|
|
url: "/firmsUploadListByAgent",
|
|
|
method: "post",
|
|
|
@@ -384,7 +406,6 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- console.log(res);
|
|
|
if (res.data.code === 200) {
|
|
|
this.tableData = res.data.data;
|
|
|
this.sum = res.data.count;
|
|
|
@@ -394,27 +415,6 @@ export default {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
- //分页 获取资料列表
|
|
|
- getDataListPage: function (nowpage) {
|
|
|
- this.$http({
|
|
|
- url: "/firmsUploadListByAgent",
|
|
|
- method: "post",
|
|
|
- data: {
|
|
|
- agentId: this.userId,
|
|
|
- Page: nowpage,
|
|
|
- Rows: this.pageSize,
|
|
|
- },
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- console.log(res,2222);
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.tableData = res.data.data;
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
- },
|
|
|
//条件筛选 获取新的资料列表
|
|
|
newGetDataList: function (config) {
|
|
|
console.log("new Getdata1", config);
|
|
|
@@ -427,11 +427,6 @@ export default {
|
|
|
if (res.data.code === 200) {
|
|
|
this.tableData = res.data.data;
|
|
|
this.sum = res.data.count;
|
|
|
-
|
|
|
- //添加资料名称搜索筛选分页
|
|
|
- if (this.searchName) {
|
|
|
- this.searchByName(config.Page);
|
|
|
- }
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -457,7 +452,6 @@ export default {
|
|
|
this.timeSortVal = "dec";
|
|
|
this.reportSortVal = "";
|
|
|
this.downloadSortVal = "";
|
|
|
- // this.newGetDataList(data);
|
|
|
|
|
|
this.$http({
|
|
|
url: "/firmsUploadListByAgent",
|
|
|
@@ -476,32 +470,35 @@ export default {
|
|
|
},
|
|
|
|
|
|
searchByCondition: function () {
|
|
|
- console.log("insearchByCondition", this.searchName);
|
|
|
+ let asc = this.timeSortVal === "dec" ? false : true;
|
|
|
+ let report = "";
|
|
|
+ if (this.reportSortVal === "already") {
|
|
|
+ report = this.reportSortVal === "already" ? true : false;
|
|
|
+ } else if (this.reportSortVal === "notyet") {
|
|
|
+ report = this.reportSortVal === "notyet" ? false : true;
|
|
|
+ }
|
|
|
+ let download = "";
|
|
|
+ if (this.downloadSortVal === "already") {
|
|
|
+ download = this.downloadSortVal === "already" ? true : false;
|
|
|
+ } else if (this.downloadSortVal === "notyet") {
|
|
|
+ download = this.downloadSortVal === "notyet" ? false : true;
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ informationName: '',
|
|
|
+ asc: asc,
|
|
|
+ report: report,
|
|
|
+ download: download,
|
|
|
+ Page: this.currentPage,
|
|
|
+ Rows: this.pageSize,
|
|
|
+ agentId: this.userId,
|
|
|
+ };
|
|
|
if (!this.searchName) {
|
|
|
- let asc = this.timeSortVal === "dec" ? false : true;
|
|
|
- let report = "";
|
|
|
- if (this.reportSortVal === "already") {
|
|
|
- report = this.reportSortVal === "already" ? true : false;
|
|
|
- } else if (this.reportSortVal === "notyet") {
|
|
|
- report = this.reportSortVal === "notyet" ? false : true;
|
|
|
- }
|
|
|
- let download = "";
|
|
|
- if (this.downloadSortVal === "already") {
|
|
|
- download = this.downloadSortVal === "already" ? true : false;
|
|
|
- } else if (this.downloadSortVal === "notyet") {
|
|
|
- download = this.downloadSortVal === "notyet" ? false : true;
|
|
|
- }
|
|
|
- let data = {
|
|
|
- asc: asc,
|
|
|
- report: report,
|
|
|
- download: download,
|
|
|
- Page: 1,
|
|
|
- Rows: this.pageSize,
|
|
|
- agentId: this.userId,
|
|
|
- };
|
|
|
this.newGetDataList(data);
|
|
|
+ console.log("insearchByCondition", data);
|
|
|
} else {
|
|
|
- console.log("ssssssssssssssssssssssssssss");
|
|
|
+ data.informationName = this.searchName;
|
|
|
+ this.newGetDataList(data);
|
|
|
+ console.log("insearchByCondition", data);
|
|
|
}
|
|
|
},
|
|
|
//待办跳转
|
|
|
@@ -528,11 +525,11 @@ export default {
|
|
|
// }
|
|
|
// },
|
|
|
mounted() {
|
|
|
- setTimeout(()=>{
|
|
|
- this.userId = localStorage.getItem('userId');
|
|
|
- this.getDataListPage()
|
|
|
- },500)
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ this.userId = localStorage.getItem("userId");
|
|
|
+ this.getDataListPage();
|
|
|
+ }, 500);
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|