Ver código fonte

修改问题,完善细节

liuYb 4 anos atrás
pai
commit
a3c23ac43b

+ 13 - 8
src/components/Modal.vue

@@ -108,7 +108,7 @@
       </div>
       <div class="modal-footer">
         <!-- <button type="button" class="btn-confirm" @click="confirm">确认</button> -->
-        <button type="button" class="btn-confirm" @click="closeSelf(), edit()">
+        <button type="button" class="btn-confirm" @click="testUrl()">
           确认
         </button>
         <button type="button" class="btn-close" @click="closeSelf">取消</button>
@@ -177,9 +177,6 @@ export default {
     },
 
     edit: function () {
-      if(!this.testUrl){
-        alert("链接输入有误")
-      }
       let obj = {};
       //获取资料名
       let idVal = this.ziliaoId;
@@ -216,13 +213,16 @@ export default {
           releasePlate: this.selectedPlatform,
           releaseMedia: this.releaseP,
           draftGenre: this.contentName1,
-          contentClass: this.contentName1,
+          
+          //内容分类2?
+          contentClass: this.contentName2,
           articleTitle: this.mediaTitle,
           articleLink: this.mediaUrl,
         },
       };
       //console.log("edit2:", this.releaseP);
       this.$emit("update", config);
+      this.$emit("closeme");
     },
     //资料名称列表
     chooseDataName: function () {
@@ -389,13 +389,18 @@ export default {
       //缺少对应列表值 已有资料名在数据中无法查询到
       this.releaseP = this.LinkData.publishPlatformName;
 
-      this.contentName1 = this.LinkData.contentTypeName;
+      this.contentName1 = this.LinkData.mediaTypeName;
       this.contentName2 = this.LinkData.contentTypeName;
     },
     testUrl: function () {
       var regex = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
-      console.log(regex)
-      return regex.test(this.mediaUrl); 
+      let flag = regex.test(this.mediaUrl);
+      console.log(flag,regex)
+      if(flag){
+          this.edit()
+      }else{
+        alert("链接输入有误!\n示例:https://www.baidu.com")
+      }
     }
   },
   mounted() {

+ 1 - 1
src/views/data/InforList.vue

@@ -73,7 +73,7 @@
                 <td>{{ obj.report === "1" ? "已反馈" : "未反馈" }}</td>
 
                 <td v-if="operation" :style="trStyle" class="operationStyle">
-                  <span
+                  <span style="cursor:pointer"
                     v-for="(operationObj, i) in operation"
                     :key="i"
                     @click="

+ 27 - 19
src/views/data/UploadLink.vue

@@ -35,7 +35,7 @@
             :class="{ table_gray: index % 2 === 0 }"
           >
             <td v-if="flag">{{ index + 1 }}</td>
-            
+
             <td>{{ obj.publishDate }}</td>
             <!-- 发布日期 -->
             <td>{{ obj.informationName }}</td>
@@ -48,10 +48,10 @@
             <!-- 发布版块 -->
             <td>{{ obj.projectTypeName }}</td>
             <!-- 项目分类 -->
+            <td>{{ obj.mediaTypeName }}</td>
+            <!-- 内容分类1 -->
             <td>{{ obj.contentTypeName }}</td>
-            <!-- 内容分类 -->
-            <td>{{ obj.contentTypeName }}</td>
-            <!-- 内容分类 -->
+            <!-- 内容分类2 -->
             <td>{{ obj.mediaTitle }}</td>
             <!-- 稿件标题 -->
             <td>
@@ -59,7 +59,7 @@
             </td>
             <!-- 链接 -->
 
-            <td class="operationStyle">
+            <td class="operationStyle" style="cursor: pointer">
               <span @click="toggleModal(index)">编辑</span>
               <span @click="toggleModal2(index)">删除</span>
               <!-- 弹窗: 确定删除? -->
@@ -91,12 +91,17 @@
     </div>
     <div class="pageBottom">
       <div class="fileOperation">
-        <span class="operationStyle xiahuaxian" @click="importTemplate"
+        <span
+          class="operationStyle xiahuaxian"
+          @click="importTemplate"
+          style="cursor: pointer"
           >导入模板</span
         >
-        <!--  <button @click="toggleModal3()">导入</button> -->
-        <!-- <button @click="importDataList">导入</button> -->
-        <label for="fileInput" @change="getFileInfo($event)" class="uploadFile"
+        <label
+          for="fileInput"
+          @change="getFileInfo($event)"
+          class="uploadFile"
+          style="cursor: pointer"
           >导入<input
             type="file"
             name="fileName"
@@ -104,13 +109,9 @@
             accept=".xlsx, .xls"
             multiple
         /></label>
-        <!-- <button @click="toggleModal4()">导出</button> <input
-            type="file"
-            name="fileName"
-            id="fileOutput"
-            accept=".xlsx, .xls"
-        />-->
-        <label for="fileOutput" @click="onOutputExcel()">导出</label>
+        <label for="fileOutput" @click="onOutputExcel()" style="cursor: pointer"
+          >导出</label
+        >
       </div>
       <TablePage
         :currentPage="currentPage"
@@ -227,6 +228,7 @@ export default {
         accountId: "",
         carPlatformName: "",
         carTypeName: "",
+        mediaTypeName: "",
         contentTypeName: "",
         endTime: null,
         id: "",
@@ -234,7 +236,7 @@ export default {
         informationName: "",
         localArea: "",
         mediaTitle: null,
-        mediaTypeName: "",
+        //mediaTypeName: "",
         mediaUrl: "",
         projectTypeName: "",
         publishDate: "",
@@ -535,7 +537,13 @@ export default {
       let date = new Date();
       let m = date.getMonth() + 1;
       let y = date.getFullYear();
-      let d = y + "/" + m;
+      let d = "";
+      if (0 < m < 10) {
+        d = y + "/0" + m;
+      } else {
+        d = y + "/" + m;
+      }
+      // let d = y + "/0" + m;
       this.$http({
         // url: "/base/mediaPublishManager/selectMediaPublishList",
         url: "/base/mediaPublishManager/selectMediaPublishListByMonth",
@@ -582,7 +590,7 @@ export default {
           console.log(res);
           if (res.data.code === 200) {
             this.releaseMedia = res.data.data;
-            console.log("发布版块", this.releaseMedia)
+            console.log("发布版块", this.releaseMedia);
           }
         })
         .catch((err) => {

+ 3 - 4
src/views/data/components/InfoListItemDetail.vue

@@ -57,7 +57,7 @@
         <div class="filesStyle multiDetail">
           <span>附件:</span>
           <div class="filesName">
-            <p
+            <p style="cursor:pointer"
               v-for="(item, index) in fileData"
               :key="index"
               @click="downloadFile(index)"
@@ -259,11 +259,10 @@ export default {
   margin: 4px;
 }
 .filesName {
-  /*   height: 50px;
-  display: flex;
-  flex-direction: column; */
   position: relative;
   left: 50px;
   top: -20px;
+  overflow: auto;
+  max-height: 160px;
 }
 </style>