|
|
@@ -4,7 +4,7 @@
|
|
|
<p class="data_detail">数据详情</p>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <div class="content_datail">
|
|
|
+ <div class="content_datail" v-if="detailData[nowIndex].informationName">
|
|
|
<div class="detail">
|
|
|
<span>资料名称:</span>
|
|
|
<span>{{ detailData[nowIndex].informationName }}</span>
|
|
|
@@ -63,43 +63,61 @@
|
|
|
<script>
|
|
|
export default {
|
|
|
props: {
|
|
|
- detailData: {
|
|
|
+ /* detailData: {
|
|
|
type: Array,
|
|
|
default: () => {
|
|
|
return [];
|
|
|
},
|
|
|
- },
|
|
|
- fileData: {
|
|
|
+ }, */
|
|
|
+ /* fileData: {
|
|
|
type: Array,
|
|
|
default: () => {
|
|
|
return [];
|
|
|
},
|
|
|
- },
|
|
|
- nowIndex: {
|
|
|
+ }, */
|
|
|
+ /* nowIndex: {
|
|
|
type: Number,
|
|
|
default: -1,
|
|
|
- },
|
|
|
+ }, */
|
|
|
},
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
dataObj: {},
|
|
|
onlineUrl: "http://8.136.230.133:8080",
|
|
|
+ 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) || "",
|
|
|
+
|
|
|
+ detailData: [
|
|
|
+ {
|
|
|
+ accountScope: '',
|
|
|
+ agentId: "",
|
|
|
+ asc: '',
|
|
|
+ download: "",
|
|
|
+ downloadCount: null,
|
|
|
+ fileDiscription: "",
|
|
|
+ filePulishTime: "",
|
|
|
+ fileUploadCreator: "",
|
|
|
+ fileUploadDate: "",
|
|
|
+ fileUploadDateLt: null,
|
|
|
+ id: "",
|
|
|
+ informationName: "1234",
|
|
|
+ report: "",
|
|
|
+ reportId: "",
|
|
|
+ totalCount: null,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ fileData: [],
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
- // 表格总页数
|
|
|
- totalPage() {
|
|
|
- return Math.ceil(this.sum / this.pageSize);
|
|
|
- },
|
|
|
- },
|
|
|
+ computed: {},
|
|
|
methods: {
|
|
|
// 下载附件
|
|
|
downloadFile: function (index) {
|
|
|
- /* let config = {
|
|
|
- informationId: this.fileData[index].informationId,
|
|
|
- fileId: this.fileData[index].id,
|
|
|
- }; */
|
|
|
let config =
|
|
|
"informationId=" +
|
|
|
this.fileData[index].informationId +
|
|
|
@@ -109,40 +127,54 @@ export default {
|
|
|
let url = this.onlineUrl + "/dealerDownload?" + config;
|
|
|
console.log("下载附件:", config, url);
|
|
|
window.open(url);
|
|
|
- /*
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- this.$http({
|
|
|
- //dealerDownload
|
|
|
- //url: '/selectInformationFileList',
|
|
|
- url: "/dealerDownload",
|
|
|
- method: "get",
|
|
|
- params: config,
|
|
|
+ },
|
|
|
+
|
|
|
+ //查看详情
|
|
|
+ showDetail: function () {
|
|
|
+ //获取附件数据
|
|
|
+ this.$http({
|
|
|
+ url: "/selectInformationFileList",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ informationId: this.informationId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.fileData = res.data.data;
|
|
|
+ }
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
- console.log(res);
|
|
|
- window.open(res)
|
|
|
- resolve(res);
|
|
|
- let link = document.createElement("a");
|
|
|
- link.href = window.URL.createObjectURL(new Blob([res.data]));
|
|
|
- link.target = "_blank";
|
|
|
- //文件名和格式
|
|
|
- link.download = "文件模板.txt";
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- document.body.removeChild(link);
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- reject(err);
|
|
|
- });
|
|
|
- }); */
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
- /* infoListDetail: function (i) {
|
|
|
- this.$emit("infoListDetail", i);
|
|
|
- }, */
|
|
|
+ //分页 获取资料列表
|
|
|
+ getDataListPage: function () {
|
|
|
+ this.$http({
|
|
|
+ url: "/firmsUploadListByAgent",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ agentId: this.agentId,
|
|
|
+ Page: this.page,
|
|
|
+ Rows: this.rows,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.detailData = res.data.data;
|
|
|
+ console.log(this.detailData);
|
|
|
+ this.showDetail();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
- /* this.infoListDetail(this.nowIndex); */
|
|
|
+ this.getDataListPage();
|
|
|
+ console.log(this.detailData);
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -207,9 +239,10 @@ export default {
|
|
|
/* width: 80px; */
|
|
|
margin-right: 16px;
|
|
|
}
|
|
|
-/* .detail span:nth-child(2){
|
|
|
- width: 150px;
|
|
|
-} */
|
|
|
+.filesStyle {
|
|
|
+ margin-right: 16px;
|
|
|
+}
|
|
|
+
|
|
|
.filesName p {
|
|
|
color: #4b8ec7;
|
|
|
}
|