guhongwei 5 년 전
부모
커밋
c1d3c7e185

+ 9 - 1
src/layout/index/law.vue

@@ -10,7 +10,7 @@
         </el-col>
       </el-col>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in infoList" :key="index" @click.native="$router.push({ path: `/detail?id=${item.id}` })">
+        <el-col :span="24" class="list" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
           <el-col :span="19" class="title">
             <p class="textOver"><i class="el-icon-caret-right icon"></i>{{ item.title }}</p>
           </el-col>
@@ -60,6 +60,14 @@ export default {
       this.$set(this, `infoList`, notice);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/detail?id=${item.id}` });
+      }
+    },
   },
   filters: {
     getDate(meta) {

+ 10 - 1
src/layout/index/lunbo.vue

@@ -4,9 +4,10 @@
       <el-col :span="24" style="width:540;height:304px;" v-loading="loading">
         <div class="block">
           <el-carousel height="304px">
-            <el-carousel-item class="list" v-for="(item, index) in infoList" :key="index" @click.native="$router.push({ path: `/detail?id=${item.id}` })">
+            <el-carousel-item class="list" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
               <el-image style="width:540px;height:304px;" :src="item.pic"></el-image>
               <span class="title textOver">{{ item.title }}</span>
+              <span>{{ item.url }}</span>
             </el-carousel-item>
           </el-carousel>
         </div>
@@ -50,6 +51,14 @@ export default {
       this.$set(this, `infoList`, news);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/detail?id=${item.id}` });
+      }
+    },
   },
 };
 </script>

+ 9 - 1
src/layout/index/noticeNews.vue

@@ -13,7 +13,7 @@
           </el-col>
         </el-col>
         <el-col :span="24" class="info">
-          <el-col :span="24" class="list" v-for="(item, index) in infoList" :key="index" @click.native="$router.push({ path: `/detail?id=${item.id}` })">
+          <el-col :span="24" class="list" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
             <el-col :span="19" class="title">
               <p class="textOver"><i class="el-icon-caret-right icon"></i>{{ item.title }}</p>
             </el-col>
@@ -64,6 +64,14 @@ export default {
       this.$set(this, `infoList`, notice);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/detail?id=${item.id}` });
+      }
+    },
   },
   filters: {
     getDate(meta) {

+ 9 - 7
src/layout/index/recruit.vue

@@ -65,13 +65,7 @@
                   </el-col>
                 </el-col>
                 <el-col :span="24">
-                  <el-col
-                    :span="24"
-                    class="zixunList"
-                    v-for="(item, index) in infoList"
-                    :key="index"
-                    @click.native="$router.push({ path: `/detail?id=${item.id}` })"
-                  >
+                  <el-col :span="24" class="zixunList" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
                     <p class="title textOver">{{ item.title }}</p>
                   </el-col>
                 </el-col>
@@ -128,6 +122,14 @@ export default {
       this.$set(this, `infoList`, notice);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/detail?id=${item.id}` });
+      }
+    },
   },
   filters: {
     getJobs(jobs) {

+ 9 - 1
src/layout/index/zhidao.vue

@@ -12,7 +12,7 @@
         </el-col>
       </el-col>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in infoList" :key="index" @click.native="$router.push({ path: `/detail?id=${item.id}` })">
+        <el-col :span="24" class="list" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
           <el-col :span="19" class="title">
             <p class="textOver"><i class="el-icon-caret-right icon"></i>{{ item.title }}</p>
           </el-col>
@@ -62,6 +62,14 @@ export default {
       this.$set(this, `infoList`, notice);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/detail?id=${item.id}` });
+      }
+    },
   },
   filters: {
     getDate(meta) {

+ 9 - 1
src/layout/list/mainRight.vue

@@ -5,7 +5,7 @@
         <span :style="`background:${backColor}`">{{ topTitile }}</span>
       </el-col>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in rightList" :key="index" @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })">
+        <el-col :span="24" class="list" v-for="(item, index) in rightList" :key="index" @click.native="turnTo(item)">
           <el-col :span="5" class="images">
             <el-image style="width:150px;height:95px;" :src="item.pic" v-if="item.pic"></el-image>
             <el-image style="width:150px;height:95px;" :src="Nopic" v-else></el-image>
@@ -58,6 +58,14 @@ export default {
       let skip = (page - 1) * this.pageSize;
       this.$emit('search', { skip: skip, limit: this.pageSize });
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/memberDetail?id=${item.id}` });
+      }
+    },
   },
 };
 </script>

+ 8 - 4
src/layout/list/newsInfo.vue

@@ -29,7 +29,7 @@
                 </el-col>
               </el-col>
             </el-col>
-            <el-col :span="18" class="content textOvers">{{ item.abstract }} </el-col>
+            <el-col :span="18" class="content textOvers">{{ item.abstract }}</el-col>
           </el-col>
         </el-col>
       </el-col>
@@ -64,9 +64,13 @@ export default {
       this.$emit('search', { skip: skip, limit: this.pageSize });
     },
     turnTo(item) {
-      let route = this.$route.path;
-      if (route.includes('member')) this.$router.push({ path: '/memberDetail', query: { id: item.id } });
-      else this.$router.push({ path: `/detail?id=${item.id}` });
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        if (route.includes('member')) this.$router.push({ path: '/memberDetail', query: { id: item.id } });
+        else this.$router.push({ path: `/detail?id=${item.id}` });
+      }
     },
   },
 };

+ 11 - 21
src/layout/member/dangjian.vue

@@ -25,13 +25,7 @@
             </el-col>
           </el-col>
           <el-col :span="24" class="infoLeftList">
-            <el-col
-              :span="24"
-              class="rencaiList"
-              v-for="(item, index) in infoList"
-              :key="index"
-              @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })"
-            >
+            <el-col :span="24" class="rencaiList" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
               <el-col :span="16" class="title">
                 <p class="textOver"><i class="el-icon-s-flag icon"></i>{{ item.title }}</p>
               </el-col>
@@ -51,13 +45,7 @@
             </el-col>
           </el-col>
           <el-col :span="24" class="infoCenterList">
-            <el-col
-              :span="12"
-              class="dangjianList"
-              v-for="(item, index) in infosList"
-              :key="index"
-              @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })"
-            >
+            <el-col :span="12" class="dangjianList" v-for="(item, index) in infosList" :key="index" @click.native="turnTo(item)">
               <el-col :span="24" class="imageTit">
                 <el-image style="width:180px;height:120px;" :src="item.pic" v-if="item.pic"></el-image>
                 <el-image style="width:180px;height:120px;" :src="Nopic" v-else></el-image>
@@ -80,13 +68,7 @@
             </el-col>
           </el-col>
           <el-col :span="24" class="infoLeftList">
-            <el-col
-              :span="24"
-              class="rencaiList"
-              v-for="(item, index) in infossList"
-              :key="index"
-              @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })"
-            >
+            <el-col :span="24" class="rencaiList" v-for="(item, index) in infossList" :key="index" @click.native="turnTo(item)">
               <el-col :span="16" class="title">
                 <p class="textOver"><i class="el-icon-s-flag icon"></i>{{ item.title }}</p>
               </el-col>
@@ -157,6 +139,14 @@ export default {
       this.$set(this, `infossList`, infossList);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/memberDetail?id=${item.id}` });
+      }
+    },
   },
   filters: {
     getDate(meta) {

+ 10 - 13
src/layout/member/gaoceng.vue

@@ -15,12 +15,7 @@
       <el-col :span="24" class="info">
         <el-col :span="12" class="carousel" v-loading="loading">
           <el-carousel height="400">
-            <el-carousel-item
-              class="infoList"
-              v-for="(item, index) in infoList"
-              :key="index"
-              @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })"
-            >
+            <el-carousel-item class="infoList" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
               <el-image style="width:100%;height:400px;" :src="item.pic" v-if="item.pic"></el-image>
               <el-image style="width:100%;height:400px;" :src="noPic" v-else></el-image>
               <span class="textOver">{{ item.title }}</span>
@@ -28,13 +23,7 @@
           </el-carousel>
         </el-col>
         <el-col :span="12" style="height:400px;" v-loading="loading">
-          <el-col
-            :span="24"
-            class="newsList"
-            v-for="(item, index) in infosList"
-            :key="index"
-            @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })"
-          >
+          <el-col :span="24" class="newsList" v-for="(item, index) in infosList" :key="index" @click.native="turnTo(item)">
             <el-col :span="20" class="title">
               <p class="textOver">
                 <i class="el-icon-s-flag icon"></i><span>{{ item.title }}</span>
@@ -97,6 +86,14 @@ export default {
       this.$set(this, `infosList`, columns);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/memberDetail?id=${item.id}` });
+      }
+    },
   },
   filters: {
     getDate(meta) {

+ 9 - 7
src/layout/member/photo.vue

@@ -14,13 +14,7 @@
       </el-col>
       <el-col :span="24" class="info">
         <el-col :span="24" class="list" v-loading="loading">
-          <el-col
-            :span="6"
-            class="tujiList"
-            v-for="(item, index) in infoList"
-            :key="index"
-            @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })"
-          >
+          <el-col :span="6" class="tujiList" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
             <el-col :span="24" class="image">
               <el-image style="width:270px;height:180px;" :src="item.pic"></el-image>
             </el-col>
@@ -82,6 +76,14 @@ export default {
       this.$set(this, `infoList`, infoList);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/memberDetail?id=${item.id}` });
+      }
+    },
   },
 };
 </script>

+ 11 - 15
src/layout/member/xuexi.vue

@@ -25,13 +25,7 @@
             </el-col>
           </el-col>
           <el-col :span="24" class="infoLeftList">
-            <el-col
-              :span="24"
-              class="rencaiList"
-              v-for="(item, index) in infoList"
-              :key="index"
-              @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })"
-            >
+            <el-col :span="24" class="rencaiList" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
               <el-col :span="24" class="title">
                 <p class="textOver"><i class="el-icon-s-flag icon"></i>{{ item.title }}</p>
               </el-col>
@@ -50,13 +44,7 @@
             </el-col>
           </el-col>
           <el-col :span="24" class="infoLeftList">
-            <el-col
-              :span="24"
-              class="zhishiList"
-              v-for="(item, index) in infosList"
-              :key="index"
-              @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })"
-            >
+            <el-col :span="24" class="zhishiList" v-for="(item, index) in infosList" :key="index" @click.native="turnTo(item)">
               <el-col :span="16" class="title">
                 <p class="textOver"><i class="el-icon-s-flag icon"></i>{{ item.title }}</p>
               </el-col>
@@ -76,7 +64,7 @@
             </el-col>
           </el-col>
           <el-col :span="24" class="infoRightList">
-            <el-col :span="24" v-for="(item, index) in infossList" :key="index" @click.native="$router.push({ path: `/memberDetail?id=${item.id}` })">
+            <el-col :span="24" v-for="(item, index) in infossList" :key="index" @click.native="turnTo(item)">
               <el-col :span="24">
                 <el-image style="width:400px;height:280px;" :src="item.pic" v-if="item.pic"></el-image>
                 <el-image style="width:400px;height:280px;" :src="Nopic" v-else></el-image>
@@ -144,6 +132,14 @@ export default {
       this.$set(this, `infossList`, infossList);
       this.loading = false;
     },
+    turnTo(item) {
+      if (item.url !== undefined) {
+        window.location.href = item.url;
+      } else {
+        let route = this.$route.path;
+        this.$router.push({ path: `/memberDetail?id=${item.id}` });
+      }
+    },
   },
   filters: {
     getDate(meta) {