|
|
@@ -13,7 +13,7 @@
|
|
|
v-model="searchName"
|
|
|
/>
|
|
|
</div>
|
|
|
- <button @click="searchByName">搜索</button>
|
|
|
+ <button @click="searchByName()">搜索</button>
|
|
|
</div>
|
|
|
<!-- <div class="searchBox">
|
|
|
<div class="search_inside">
|
|
|
@@ -66,14 +66,22 @@
|
|
|
>
|
|
|
<!-- <td v-for="(item, i) in obj" :key="i" :style="trStyle"> -->
|
|
|
<td>{{ obj.informationName || "北京博瑞" }}</td>
|
|
|
- <td>{{ obj.filePulishTime || "2021/02" }}</td>
|
|
|
+ <td>{{ (obj.filePulishTime || "").replace("-", "/") }}</td>
|
|
|
<td>{{ obj.accountScope == 1 ? "共通" : "部分" }}</td>
|
|
|
- <td>{{ obj.fileUploadDate || "2021/01/10 12:12" }}</td>
|
|
|
+ <td>
|
|
|
+ {{
|
|
|
+ (obj.fileUploadDate || "")
|
|
|
+ .replace("T", " ")
|
|
|
+ .slice(0, -4)
|
|
|
+ .replace(RegExp("-", "g"), "/")
|
|
|
+ }}
|
|
|
+ </td>
|
|
|
<td>{{ obj.download > 0 ? "已下载" : "未下载" }}</td>
|
|
|
<td>
|
|
|
<span
|
|
|
@click="waitToReport(obj.report, index)"
|
|
|
- :class="showItemOperation" class="reportStyle"
|
|
|
+ :class="showItemOperation"
|
|
|
+ class="reportStyle"
|
|
|
>待办</span
|
|
|
>
|
|
|
<!-- :class="{ reportStyle: obj.report == 0 ? true : false }" -->
|
|
|
@@ -116,7 +124,7 @@
|
|
|
<script>
|
|
|
import TablePage from "../../components/TablePage";
|
|
|
import Detail from "./components/InfoListItemDetail";
|
|
|
-import { env_url } from "../../config/env"
|
|
|
+import { env_url } from "../../config/env";
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
|
@@ -206,6 +214,7 @@ export default {
|
|
|
onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试
|
|
|
userId: 254,
|
|
|
endDate: "",
|
|
|
+ localReport: "",
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -217,35 +226,39 @@ export default {
|
|
|
return this.$route.query && this.$route.query.tag ? true : false;
|
|
|
},
|
|
|
showItemOperation: function () {
|
|
|
- let nowDate = this.CurentTime();
|
|
|
+ let now = new Date().getTime();
|
|
|
|
|
|
+ /* if (!this.localReport) {
|
|
|
+ console.log(this.localReport);
|
|
|
+ return { showItemOperationStyle: false };
|
|
|
+ } else {
|
|
|
+ return { showItemOperationStyle: true };
|
|
|
+ if (!this.endDate) {
|
|
|
+ console.log("超出反馈时间");
|
|
|
+ return { showItemOperationStyle: true };
|
|
|
+ } else {
|
|
|
+ let end = Date.parse(new Date(this.endDate));
|
|
|
+ if (now > end) {
|
|
|
+ return { showItemOperationStyle: true };
|
|
|
+ } else {
|
|
|
+ return { showItemOperationStyle: false };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } */
|
|
|
if (!this.endDate) {
|
|
|
- console.log(nowDate);
|
|
|
+ console.log("超出反馈时间", this.endDate);
|
|
|
return { showItemOperationStyle: true };
|
|
|
} else {
|
|
|
- console.log(this.endDate);
|
|
|
- if (nowDate < this.endDate) {
|
|
|
- return { showItemOperationStyle: false };
|
|
|
- } else {
|
|
|
+ let end = Date.parse(new Date(this.endDate));
|
|
|
+ if (now > end) {
|
|
|
return { showItemOperationStyle: true };
|
|
|
+ } else {
|
|
|
+ return { showItemOperationStyle: false };
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- CurentTime: function () {
|
|
|
- var now = new Date();
|
|
|
- var year = now.getFullYear(); //年
|
|
|
- var month = now.getMonth() + 1; //月
|
|
|
- var day = now.getDate(); //日
|
|
|
- var clock = year + "/";
|
|
|
-
|
|
|
- if (month < 10) clock += "0";
|
|
|
- clock += month + "/";
|
|
|
- if (day < 10) clock += "0";
|
|
|
- clock += day;
|
|
|
- return clock;
|
|
|
- },
|
|
|
download: function () {
|
|
|
alert("下载");
|
|
|
},
|
|
|
@@ -256,7 +269,7 @@ export default {
|
|
|
|
|
|
//携带搜索条件
|
|
|
let data = {
|
|
|
- asc: this.changePage == "dec" ? false : true,
|
|
|
+ asc: this.timeSortVal == "dec" ? false : true,
|
|
|
report: "",
|
|
|
download: "",
|
|
|
Page: this.currentPage,
|
|
|
@@ -291,7 +304,7 @@ export default {
|
|
|
// this.getDataListPage(this.currentPage);
|
|
|
//携带搜索条件
|
|
|
let data = {
|
|
|
- asc: this.changePage == "dec" ? false : true,
|
|
|
+ asc: this.timeSortVal == "dec" ? false : true,
|
|
|
report: "",
|
|
|
download: "",
|
|
|
Page: this.currentPage,
|
|
|
@@ -371,35 +384,6 @@ export default {
|
|
|
if (res.data.code === 200) {
|
|
|
this.tableData = res.data.data;
|
|
|
this.sum = res.data.count;
|
|
|
- //修改素材时间显示格式
|
|
|
- let len = this.tableData.length;
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
- let newValue = "";
|
|
|
- let temp = this.tableData[i].filePulishTime;
|
|
|
- if (
|
|
|
- this.tableData[0].filePulishTime.length != null &&
|
|
|
- this.tableData[0].filePulishTime.length >= 7
|
|
|
- ) {
|
|
|
- newValue = temp.slice(0, 4) + "/" + temp.slice(5, 7); //+ "/" + temp.slice(8,10)
|
|
|
- this.$set(this.tableData[i], "filePulishTime", newValue);
|
|
|
- }
|
|
|
- }
|
|
|
- //修改上传时间显示格式
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
- let newValue = "";
|
|
|
- let temp = this.tableData[i].fileUploadDate;
|
|
|
- if (this.tableData[0].fileUploadDate.length >= 10) {
|
|
|
- newValue =
|
|
|
- temp.slice(0, 4) +
|
|
|
- "/" +
|
|
|
- temp.slice(5, 7) +
|
|
|
- "/" +
|
|
|
- temp.slice(8, 10) +
|
|
|
- " " +
|
|
|
- temp.slice(11, 19);
|
|
|
- this.$set(this.tableData[i], "fileUploadDate", newValue);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -421,35 +405,6 @@ export default {
|
|
|
console.log(res);
|
|
|
if (res.data.code === 200) {
|
|
|
this.tableData = res.data.data;
|
|
|
- //修改素材时间显示格式
|
|
|
- let len = this.tableData.length;
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
- let newValue = "";
|
|
|
- let temp = this.tableData[i].filePulishTime;
|
|
|
- if (
|
|
|
- this.tableData[0].filePulishTime.length != null &&
|
|
|
- this.tableData[0].filePulishTime.length >= 7
|
|
|
- ) {
|
|
|
- newValue = temp.slice(0, 4) + "/" + temp.slice(5, 7); //+ "/" + temp.slice(8,10)
|
|
|
- this.$set(this.tableData[i], "filePulishTime", newValue);
|
|
|
- }
|
|
|
- }
|
|
|
- //修改上传时间显示格式
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
- let newValue = "";
|
|
|
- let temp = this.tableData[i].fileUploadDate;
|
|
|
- if (this.tableData[0].fileUploadDate.length >= 10) {
|
|
|
- newValue =
|
|
|
- temp.slice(0, 4) +
|
|
|
- "/" +
|
|
|
- temp.slice(5, 7) +
|
|
|
- "/" +
|
|
|
- temp.slice(8, 10) +
|
|
|
- " " +
|
|
|
- temp.slice(11, 19);
|
|
|
- this.$set(this.tableData[i], "fileUploadDate", newValue);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -465,38 +420,13 @@ export default {
|
|
|
data: config,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- console.log("new Getdata2", res);
|
|
|
if (res.data.code === 200) {
|
|
|
this.tableData = res.data.data;
|
|
|
this.sum = res.data.count;
|
|
|
- //修改素材时间显示格式
|
|
|
- let len = this.tableData.length;
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
- let newValue = "";
|
|
|
- let temp = this.tableData[i].filePulishTime;
|
|
|
- if (
|
|
|
- this.tableData[0].filePulishTime.length != null &&
|
|
|
- this.tableData[0].filePulishTime.length >= 7
|
|
|
- ) {
|
|
|
- newValue = temp.slice(0, 4) + "/" + temp.slice(5, 7); //+ "/" + temp.slice(8,10)
|
|
|
- this.$set(this.tableData[i], "filePulishTime", newValue);
|
|
|
- }
|
|
|
- }
|
|
|
- //修改上传时间显示格式
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
- let newValue = "";
|
|
|
- let temp = this.tableData[i].fileUploadDate;
|
|
|
- if (this.tableData[0].fileUploadDate.length >= 10) {
|
|
|
- newValue =
|
|
|
- temp.slice(0, 4) +
|
|
|
- "/" +
|
|
|
- temp.slice(5, 7) +
|
|
|
- "/" +
|
|
|
- temp.slice(8, 10) +
|
|
|
- " " +
|
|
|
- temp.slice(11, 19);
|
|
|
- this.$set(this.tableData[i], "fileUploadDate", newValue);
|
|
|
- }
|
|
|
+
|
|
|
+ //添加资料名称搜索筛选分页
|
|
|
+ if (this.searchName) {
|
|
|
+ this.searchByName(config.Page);
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -504,13 +434,14 @@ export default {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
//搜索资料名
|
|
|
- searchByName: function () {
|
|
|
- console.log("insearchByName", this.searchName);
|
|
|
+ searchByName: function (p) {
|
|
|
+ console.log("insearchByName", p);
|
|
|
let searchName = this.searchName;
|
|
|
let data = {
|
|
|
informationName: searchName,
|
|
|
- Page: 1,
|
|
|
+ Page: p,
|
|
|
Rows: this.pageSize,
|
|
|
agentId: this.userId,
|
|
|
//搜索条件重置
|
|
|
@@ -522,37 +453,57 @@ export default {
|
|
|
this.timeSortVal = "dec";
|
|
|
this.reportSortVal = "";
|
|
|
this.downloadSortVal = "";
|
|
|
- this.newGetDataList(data);
|
|
|
+ // this.newGetDataList(data);
|
|
|
+
|
|
|
+ this.$http({
|
|
|
+ url: "/firmsUploadListByAgent",
|
|
|
+ method: "post",
|
|
|
+ data: data,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ this.sum = res.data.count;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
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;
|
|
|
+ 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);
|
|
|
+ } else {
|
|
|
+ console.log("ssssssssssssssssssssssssssss");
|
|
|
}
|
|
|
- let data = {
|
|
|
- asc: asc,
|
|
|
- report: report,
|
|
|
- download: download,
|
|
|
- Page: 1,
|
|
|
- Rows: this.pageSize,
|
|
|
- agentId: this.userId,
|
|
|
- };
|
|
|
- this.newGetDataList(data);
|
|
|
},
|
|
|
//待办跳转
|
|
|
waitToReport: function (flag, i) {
|
|
|
this.endDate = this.tableData[i].endDate;
|
|
|
+ this.localReport = this.tableData[i].report;
|
|
|
if (flag) {
|
|
|
console.log("待办跳转");
|
|
|
this.$router.replace({ path: "/uploadLink/sonuploadLink" });
|