| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <template>
- <div class="record_detail">
- <div class="title">
- <p class="data_detail">数据详情</p>
- </div>
- <div class="content">
- <div class="content_datail" v-if="status">
- <div class="detail">
- <span>资料名称:</span>
- <span>{{ detailData[nowIndex].informationName }}</span>
- </div>
- <div class="detail">
- <span>上传时间:</span>
- <span>{{ detailData[nowIndex].fileUploadDate }}</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 }}</span>
- </div>
- <div class="secondColumn">
- <span>经销商范围:</span>
- <span>
- {{ detailData[nowIndex].accountScope === 1 ? "共通" : "部分" }}
- </span>
- </div>
- </div>
- <div class="detail">
- <span>资料描述:</span>
- <span>{{ detailData[nowIndex].fileDiscription }}</span>
- </div>
- <div class="filesStyle multiDetail">
- <span>附件:</span>
- <div class="filesName">
- <p
- v-for="(item, index) in fileData"
- :key="index"
- @click="downloadFile(index)"
- >
- {{ item.fileName || "附件附件" }}
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- props: {
- /* detailData: {
- type: Array,
- default: () => {
- return [];
- },
- }, */
- /* fileData: {
- type: Array,
- default: () => {
- return [];
- },
- }, */
- /* nowIndex: {
- type: Number,
- default: -1,
- }, */
- },
- components: {},
- data() {
- return {
- status: false,
- 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: {},
- methods: {
- // 下载附件
- downloadFile: function (index) {
- let config =
- "informationId=" +
- this.fileData[index].informationId +
- "&" +
- "fileId=" +
- this.fileData[index].id;
- let url = this.onlineUrl + "/dealerDownload?" + config;
- console.log("下载附件:", config, url);
- window.open(url);
- },
- //查看详情
- showDetail: function () {
- //获取附件数据
- this.$http({
- url: "/selectInformationFileList",
- method: "post",
- data: {
- informationId: this.informationId,
- },
- })
- .then((res) => {
- if (res.data.code === 200) {
- this.fileData = res.data.data;
- }
- })
- .catch((err) => {
- console.log(err);
- });
- },
- //分页 获取资料列表
- 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();
- this.status = true;
- }
- })
- .catch((err) => {
- console.log(err);
- });
- },
- },
- mounted() {
- this.getDataListPage();
- console.log(this.detailData);
- },
- };
- </script>
- <style scoped lang="less">
- .record_detail {
- .title {
- border: 1px solid #ccc;
- border-bottom: 0px;
- .data_detail {
- padding-left: 22px;
- font-size: 14px;
- font-weight: bolder;
- height: 46.8px;
- display: flex;
- align-items: center;
- }
- }
- .content {
- display: flex;
- border: 1px solid #ccc;
- padding: 20px;
- .content_datail {
- width: 100%;
- padding: 20px 50px 0;
- .detail {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- }
- }
- }
- }
- .multiDetail {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- }
- .firstColumn,
- .secondColumn {
- display: flex;
- align-items: center;
- }
- .firstColumn span:nth-child(1) {
- /* width: 80px; */
- display: block;
- margin-right: 16px;
- }
- .secondColumn span:nth-child(1) {
- /* width: 80px; */
- display: block;
- margin-left: 40px;
- margin-right: 16px;
- }
- .detail span:nth-child(1) {
- /* width: 80px; */
- margin-right: 16px;
- }
- .filesStyle span:nth-child(1) {
- /* width: 80px; */
- margin-right: 16px;
- }
- .filesStyle {
- margin-right: 16px;
- }
- .filesName p {
- color: #4b8ec7;
- margin: 4px;
- }
- </style>
|