|
|
@@ -38,7 +38,7 @@
|
|
|
</select>
|
|
|
<span>排序</span>
|
|
|
<select name="" id="timeSort" v-model="timeSortVal">
|
|
|
- <option value="">时间降序</option>
|
|
|
+ <option value="dec">时间降序</option>
|
|
|
<option value="asc">时间升序</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
@@ -100,11 +100,6 @@
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<Detail></Detail>
|
|
|
- <!-- <Detail
|
|
|
- :detailData="tableData"
|
|
|
- :nowIndex="nowIndex"
|
|
|
- :fileData="tableFileData"
|
|
|
- ></Detail> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -131,7 +126,7 @@ export default {
|
|
|
return {
|
|
|
nowIndex: 0,
|
|
|
searchName: "",
|
|
|
- timeSortVal: "",
|
|
|
+ timeSortVal: "dec",
|
|
|
reportSortVal: "",
|
|
|
downloadSortVal: "",
|
|
|
//initialPage: true,
|
|
|
@@ -315,6 +310,32 @@ 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 >= 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) => {
|
|
|
@@ -336,6 +357,32 @@ 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 >= 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) => {
|
|
|
@@ -355,6 +402,32 @@ 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 >= 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) => {
|
|
|
@@ -367,13 +440,24 @@ export default {
|
|
|
let searchName = this.searchName;
|
|
|
let data = {
|
|
|
informationName: searchName,
|
|
|
+ Page: 1,
|
|
|
+ Rows: this.pageSize,
|
|
|
+ agentId: this.userId,
|
|
|
+ //搜索条件重置
|
|
|
+ asc: false,
|
|
|
+ report: "",
|
|
|
+ download: "",
|
|
|
};
|
|
|
+ //搜索条件重置
|
|
|
+ this.timeSortVal = "dec";
|
|
|
+ this.reportSortVal = "";
|
|
|
+ this.downloadSortVal = "";
|
|
|
this.newGetDataList(data);
|
|
|
},
|
|
|
|
|
|
searchByCondition: function () {
|
|
|
console.log("insearchByCondition", this.searchName);
|
|
|
- let asc = this.timeSortVal === "asc" ? false : true;
|
|
|
+ let asc = this.timeSortVal === "dec" ? false : true;
|
|
|
let report = "";
|
|
|
if (this.reportSortVal === "already") {
|
|
|
report = this.reportSortVal === "already" ? true : false;
|