| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468 |
- <template>
- <div class="upload_Link">
- <span><b>链接上传</b></span>
- <span><b>针对论坛及其他平台链接上传</b></span>
- <div class="contentHead">
- <span>上传平台</span>
- <select name="" id="">
- <option value="">汽车之家</option>
- <option value="">请选择</option>
- </select>
- </div>
- <div class="tableBox">
- <table class="feedbackTable">
- <thead class="theadStyle">
- <tr class="tableHeadStyle1">
- <td>论坛传播情况汇总</td>
- </tr>
- <tr class="tableHeadStyle2">
- <td v-for="(item, index) in tableHeader" :key="index">
- {{ item }}
- </td>
- </tr>
- </thead>
- <tbody class="bodyStyle">
- <tr
- class="tableHeadStyle2 bodyContent"
- v-for="(obj, index) in tableData"
- :key="index"
- :class="{ table_gray: !discolor && index % 2 === 0 }"
- >
- <td v-if="flag">{{ index + 1 }}</td>
- <td>
- {{ obj.releaseTime }}
- </td>
- <td>
- {{ obj.dataName }}
- </td>
- <td>
- {{ obj.carSeries }}
- </td>
- <td>
- {{ obj.carType }}
- </td>
- <td>
- {{ obj.releaseMedia }}
- </td>
- <td>
- {{ obj.projectClass }}
- </td>
- <td>
- {{ obj.draftGenre }}
- </td>
- <td>
- {{ obj.contentClass }}
- </td>
- <td>
- {{ obj.articleTitle }}
- </td>
- <td>
- {{ obj.articleLink }}
- </td>
- <td class="operationStyle">
- <span @click="toggleModal">编辑</span>
- <!-- <span @click="toDel(index)">删除</span> -->
- <span
- @click="
- toggleModal2();
- getIndex(index);nowIndex=index
- "
- >删除</span
- >
- <!-- <Modal2
- v-show="showModal2"
- v-on:closeme2="closeme2"
- v-on:del="toDel2"
- :itemIndex="index"
- ></Modal2> -->
- <div class="modal-backdrop" v-show="showModal2">
- <div class="modal">
- <div class="modal-body">
- <div class="bodyRow">确认删除?</div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn-confirm" @click="toDel(nowIndex);closeme2()">
- 确认
- </button>
- <button type="button" class="btn-close" @click="closeme2">
- 取消
- </button>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <Modal
- v-show="showModal"
- v-on:closeme="closeme"
- :dataset_title="tableData.articleTitle"
- @update="editTitle"
- ></Modal>
- <div class="timeLimitStyle">
- <span>仅可对上传时间为{{ feedbackTimeLimit }}个月内的资料进行反馈</span>
- </div>
- <div class="fileOperation">
- <span class="operationStyle">导入模板</span>
- <button>导入</button>
- <button>导出</button>
- </div>
- </div>
- </template>
- <script>
- import Modal from "../../components/Modal";
- /* import Modal2 from "../../components/Modal2"; */
- export default {
- props: {
- isManufacturer: {
- type: String,
- default: "distributor",
- },
- },
- components: {
- Modal,
- /* Modal2, */
- },
- data() {
- return {
- feedbackTimeLimit: 6,
- showModal: false,
- showModal2: false,
- sonConsfirmFlag: false,
- // 表格配置
- sum: 240, // 一共有多少条数据
- pageSize: 20, // 每页展示的数据
- discolor: false, // 是否隔行变色
- currentPage: 1,
- /* tableHeader: [
- "NO.",
- "DLR Code",
- "经销商名称",
- "所属区域",
- "发布日期",
- "资料名称",
- "反馈日期",
- "发布平台",
- "发布版块",
- "项目分类",
- ], */
- tableHeader: [
- "NO.",
- "发布日期",
- "资料名称",
- "车系",
- "车型",
- "发布版块",
- "项目分类",
- "内容分类1",
- "内容分类2",
- "标题",
- "链接",
- "操作",
- ],
- tableData: [
- {
- releaseTime: "2021/03/04",
- dataName: "雷克萨斯ES上市",
- carSeries: "雷克萨斯ES",
- carType: "ES雷克萨斯",
- releaseMedia: "S雷克萨斯",
- // releasePlate: " ",
- projectClass: "东区",
- draftGenre: "雷克萨斯ES",
- contentClass: "ES雷克萨斯",
- articleTitle: "S雷克萨斯",
- articleLink: "d",
- },
- {
- releaseTime: "2021/03/04",
- dataName: "雷克萨斯ES上市",
- carSeries: "雷克萨斯ES",
- carType: "ES雷克萨斯",
- releaseMedia: "S雷克萨斯",
- // releasePlate: " ",
- projectClass: "东区",
- draftGenre: "雷克萨斯ES",
- contentClass: "ES雷克萨斯",
- articleTitle: "S雷克萨斯",
- articleLink: "d",
- },
- {
- releaseTime: "",
- dataName: "",
- carSeries: "",
- carType: "",
- releaseMedia: "",
- // releasePlate: " ",
- projectClass: "",
- draftGenre: "",
- contentClass: "",
- articleTitle: "",
- articleLink: "",
- },
- {
- releaseTime: "",
- dataName: "",
- carSeries: "",
- carType: "",
- releaseMedia: "",
- // releasePlate: " ",
- projectClass: "",
- draftGenre: "",
- contentClass: "",
- articleTitle: "",
- articleLink: "",
- },
- ],
- flag: true,
- operation: [
- {
- name: "编辑",
- function: () => {
- this.EditForm();
- },
- },
- {
- name: "删除",
- function: () => {
- this.showDetail();
- },
- },
- ],
- };
- },
- methods: {
- EditForm: () => {
- alert("编辑");
- },
- showDetail: () => {
- alert("展示详情");
- },
- toggleModal: function () {
- this.showModal = !this.showModal;
- },
- closeme: function () {
- this.showModal = !this.showModal;
- },
- toggleModal2: function () {
- this.showModal2 = !this.showModal2;
- },
- closeme2: function () {
- this.showModal2 = !this.showModal2;
- },
- editTitle: function (val) {
- this.dataset_title = new Array(val);
- console.log("inEditTitle:", this.dataset_title);
- },
- /* add: function () {
- this.myData.push({
- username: this.username,
- age: this.age,
- });
- (this.username = ""), (this.age = "");
- }, */
- toDel: function (n) {
- console.log("inToDel:", n, this.sonConsfirmFlag);
- // if (this.sonConsfirmFlag) {
- //清空数据
- if (n == -2) {
- this.tableData = "";
- }
- //清空某一项数据
- {
- let obj = this.tableData[n];
- console.log(obj);
- Object.keys(obj).forEach((key) => {
- obj[key] = "";
- });
- }
- // }
- // this.sonConsfirmFlag = false;
- },
- /* toDel2: function (flag) {
- this.sonConsfirmFlag = flag;
- console.log("inToDel2:", this.sonConsfirmFlag);
- }, */
- getIndex: function (index) {
- console.log("inGetIndex", index);
- },
- },
- };
- </script>
- <style scoped lang="less">
- .contentHead {
- height: 55px;
- display: flex;
- align-items: center;
- }
- .contentHead span {
- margin-right: 15px;
- }
- .tableBox {
- width: 1030px;
- overflow: auto;
- }
- .tableBox {
- text-align: center;
- .table {
- table-layout: fixed;
- background-color: #fff;
- border-collapse: collapse;
- border: none;
- td {
- border: 1px solid #ccc;
- }
- span {
- &:hover {
- cursor: pointer;
- }
- }
- }
- }
- .table_gray {
- background: #f5f5f5;
- }
- .tableBox table td {
- border: 1px solid #ccc;
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- }
- // 表头样式
- .theadStyle tr td {
- color: white;
- }
- .tableHeadStyle1 {
- background: #848484;
- height: 30px;
- color: #fff;
- display: flex;
- align-items: center;
- }
- .tableHeadStyle1 td {
- width: 100%;
- padding: 7px 5px;
- }
- .tableHeadStyle2 {
- background: #848484;
- height: 30px;
- color: #fff;
- display: flex;
- align-items: center;
- }
- .tableHeadStyle2 td {
- width: 60px;
- padding: 7px 5px;
- }
- .tableHeadStyle2 td:nth-child(10) {
- width: 100px;
- padding: 7px 5px;
- }
- .tableHeadStyle2 td:nth-child(11) {
- width: 100px;
- padding: 7px 5px;
- }
- .tableHeadStyle2 td:nth-child(12) {
- width: 100px;
- padding: 7px 5px;
- }
- .tableHeadStyle2 td:nth-child(2) {
- width: 100px;
- padding: 7px 5px;
- }
- .tableHeadStyle2 td:nth-child(3) {
- width: 100px;
- padding: 7px 5px;
- }
- .bodyStyle {
- display: block;
- background-color: #fff;
- }
- .bodyContent td {
- background-color: #fff;
- height: 17px;
- }
- .operationStyle {
- color: #0000ff;
- display: flex;
- justify-content: space-around;
- }
- .operationStyle span {
- color: #0000ff;
- }
- .fileOperation {
- display: flex;
- justify-content: flex-start;
- margin: 10px;
- align-items: center;
- }
- .timeLimitStyle {
- padding: 10px;
- }
- .modal-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- background-color: rgba(0, 0, 0, 0.3);
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .modal {
- background-color: #eeeeee;
- box-shadow: 2px 2px 20px 1px;
- overflow-x: auto;
- display: flex;
- flex-direction: column;
- border-radius: 16px;
- width: 1030px;
- }
- .modal-header {
- border-bottom: 1px solid #eee;
- color: #313131;
- justify-content: space-between;
- padding: 15px;
- display: flex;
- }
- .modal-footer {
- border-top: 1px solid #eee;
- justify-content: center;
- padding: 15px;
- display: flex;
- }
- .modal-body {
- position: relative;
- padding: 20px 150px 20px 150px;
- }
- .btn-close,
- .btn-confirm {
- border-radius: 8px;
- margin-left: 16px;
- width: 56px;
- height: 36px;
- border: none;
- cursor: pointer;
- }
- .btn-close {
- color: #313131;
- background-color: gray;
- }
- .btn-confirm {
- color: #fff;
- background-color: #2d8cf0;
- }
- .bodyRow {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- }
- </style>
|