|
|
@@ -4,40 +4,25 @@
|
|
|
<p class="data_detail">数据详情</p>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <div class="content_datail" v-if="status">
|
|
|
+ <div class="content_datail">
|
|
|
<div class="detail">
|
|
|
<span>资料名称:</span>
|
|
|
- <span>{{ detailData[nowIndex].informationName || "" }}</span>
|
|
|
+ <span>{{ detailData.informationName || "-" }}</span>
|
|
|
</div>
|
|
|
<div class="detail">
|
|
|
<span>上传时间:</span>
|
|
|
<span>{{
|
|
|
- (detailData[nowIndex].fileUploadDate || "")
|
|
|
+ (detailData.fileUploadDate || "-")
|
|
|
.replace("T", " ")
|
|
|
.slice(0, -4)
|
|
|
.replace(RegExp("-", "g"), "/")
|
|
|
}}</span>
|
|
|
</div>
|
|
|
- <!-- <div class="multiDetail">
|
|
|
-
|
|
|
- <div class="firstColumn">
|
|
|
- <span>车系:</span>
|
|
|
- <span>{{
|
|
|
- detailData[nowIndex].spread
|
|
|
- }}</span>
|
|
|
- </div>
|
|
|
- <div class="secondColumn">
|
|
|
- <span>车型:</span>
|
|
|
- <span>
|
|
|
- {{ detailData[nowIndex].spread }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
<div class="multiDetail">
|
|
|
<div class="firstColumn">
|
|
|
<span>素材时间:</span>
|
|
|
<span>{{
|
|
|
- (detailData[nowIndex].filePulishTime || "").replace(
|
|
|
+ (detailData.filePulishTime || "-").replace(
|
|
|
RegExp("-", "g"),
|
|
|
"/"
|
|
|
)
|
|
|
@@ -46,13 +31,13 @@
|
|
|
<div class="secondColumn">
|
|
|
<span>经销商范围:</span>
|
|
|
<span>
|
|
|
- {{ detailData[nowIndex].accountScope === 1 ? "共通" : "部分" }}
|
|
|
+ {{ detailData.accountScope === 1 ? "共通" : "部分" }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="detail">
|
|
|
<span>资料描述:</span>
|
|
|
- <span>{{ detailData[nowIndex].fileDiscription || "" }}</span>
|
|
|
+ <span>{{ detailData.fileDiscription || "-" }}</span>
|
|
|
</div>
|
|
|
<div class="filesStyle multiDetail">
|
|
|
<span>附件:</span>
|
|
|
@@ -63,7 +48,7 @@
|
|
|
:key="index"
|
|
|
@click="downloadFile(index)"
|
|
|
>
|
|
|
- {{ item.fileName || "附件附件" }}
|
|
|
+ {{ item.fileName || "-" }}
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -74,64 +59,16 @@
|
|
|
|
|
|
<script>
|
|
|
import { env_url } from "../../../config/env";
|
|
|
-
|
|
|
export default {
|
|
|
- props: {
|
|
|
- /* detailData: {
|
|
|
- type: Array,
|
|
|
- default: () => {
|
|
|
- return [];
|
|
|
- },
|
|
|
- }, */
|
|
|
- /* fileData: {
|
|
|
- type: Array,
|
|
|
- default: () => {
|
|
|
- return [];
|
|
|
- },
|
|
|
- }, */
|
|
|
- /* nowIndex: {
|
|
|
- type: Number,
|
|
|
- default: -1,
|
|
|
- }, */
|
|
|
- },
|
|
|
+ props: {},
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- status: false,
|
|
|
- dataObj: {},
|
|
|
- onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试
|
|
|
-
|
|
|
+ onlineUrl: env_url,
|
|
|
informationId: this.$route.query.informationId || "",
|
|
|
- nowIndex: this.$route.query.nowIndex || "",
|
|
|
-
|
|
|
- rows: this.$route.query.Rows || 20,
|
|
|
- page: this.$route.query.Page || 1,
|
|
|
- agentId: (this.$route.query && this.$route.query.agentId) || "",
|
|
|
-
|
|
|
- informationName: this.searchName,
|
|
|
- asc: this.$route.query.asc,
|
|
|
- report: this.$route.query.report,
|
|
|
- download: this.$route.query.download,
|
|
|
-
|
|
|
- detailData: [
|
|
|
- {
|
|
|
- accountScope: "",
|
|
|
- agentId: "",
|
|
|
- asc: "",
|
|
|
- download: "",
|
|
|
- downloadCount: null,
|
|
|
- fileDiscription: "",
|
|
|
- filePulishTime: "",
|
|
|
- fileUploadCreator: "",
|
|
|
- fileUploadDate: "",
|
|
|
- fileUploadDateLt: null,
|
|
|
- id: "",
|
|
|
- informationName: "1234",
|
|
|
- report: "",
|
|
|
- reportId: "",
|
|
|
- totalCount: null,
|
|
|
- },
|
|
|
- ],
|
|
|
+ agentId: localStorage.getItem("userId"),
|
|
|
+ informationName: (this.$route.query && this.$route.query.informationName) || "",
|
|
|
+ detailData: [],
|
|
|
fileData: [],
|
|
|
};
|
|
|
},
|
|
|
@@ -139,18 +76,10 @@ export default {
|
|
|
methods: {
|
|
|
// 下载附件
|
|
|
downloadFile: function (index) {
|
|
|
- /* let config =
|
|
|
- "informationId=" +
|
|
|
- this.fileData[index].informationId +
|
|
|
- "&" +
|
|
|
- "fileId=" +
|
|
|
- this.fileData[index].id; */
|
|
|
let config = "fileId=" + this.fileData[index].id + "&agentId=" + this.agentId;
|
|
|
let url = this.onlineUrl + "/dealerDownload?" + config;
|
|
|
- // console.log("下载附件:", config, url);
|
|
|
window.open(url);
|
|
|
},
|
|
|
-
|
|
|
//查看详情
|
|
|
showDetail: function () {
|
|
|
//获取附件数据
|
|
|
@@ -170,7 +99,6 @@ export default {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
//分页 获取资料列表
|
|
|
getDataListPage: function () {
|
|
|
this.$http({
|
|
|
@@ -178,20 +106,13 @@ export default {
|
|
|
method: "post",
|
|
|
data: {
|
|
|
agentId: this.agentId,
|
|
|
- Page: this.page,
|
|
|
- Rows: this.rows,
|
|
|
informationName: this.informationName,
|
|
|
- asc: this.asc,
|
|
|
- report: this.report,
|
|
|
- download: this.download,
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
- this.detailData = res.data.data;
|
|
|
- console.log(this.detailData);
|
|
|
+ this.detailData = res.data.data[0];
|
|
|
this.showDetail();
|
|
|
- this.status = true;
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -201,8 +122,13 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getDataListPage();
|
|
|
- console.log(this.detailData);
|
|
|
},
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+ console.log(from)
|
|
|
+ let meta = to.meta;
|
|
|
+ meta[2].name = (to.query.informationName || '') + '详情'
|
|
|
+ next()
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|