Sfoglia il codice sorgente

部分组件样式,错误修改;菜单新增内容与外链的输出方式

lrf402788946 5 anni fa
parent
commit
41d1650d55

+ 3 - 6
src/layout/detail/jobfair/head.vue

@@ -7,9 +7,9 @@
       <el-col :span="24" style="padding: 20px 15px;">
       <el-col :span="24" style="padding: 20px 15px;">
         <el-col :span="18">
         <el-col :span="18">
           <span style="font-size: 16px;">{{ info && info.title ? info.title : '' }}</span>
           <span style="font-size: 16px;">{{ info && info.title ? info.title : '' }}</span>
-          <el-button type="danger" class="btn">参会单位</el-button>
+          <a href="#corpList"><el-button type="danger" class="btn">参会单位</el-button></a>
         </el-col>
         </el-col>
-        <el-col :span="6" class="ticketBtn">
+        <el-col :span="6" class="ticketBtn" style="text-align:right">
           <el-button type="primary" @click="applyTicket()">领取门票</el-button>
           <el-button type="primary" @click="applyTicket()">领取门票</el-button>
         </el-col>
         </el-col>
         <el-col :span="24">
         <el-col :span="24">
@@ -46,10 +46,7 @@ export default {
     // detail: {},
     // detail: {},
   }),
   }),
   created() {},
   created() {},
-  mounted() {
-    // this.$set(this, `detail`, this.list);
-    // this.$set(this, `list`, this.info);
-  },
+  mounted() {},
   computed: {},
   computed: {},
   methods: {
   methods: {
     applyTicket() {
     applyTicket() {

+ 1 - 1
src/layout/detail/talk/talk-head.vue

@@ -9,7 +9,7 @@
           <span style="font-size: .875rem;">宣讲单位:{{ info && info.title ? info.title : '' }}</span>
           <span style="font-size: .875rem;">宣讲单位:{{ info && info.title ? info.title : '' }}</span>
           <el-button type="danger" icon="el-icon-search" class="btn" @click="turnTo">工商查询</el-button>
           <el-button type="danger" icon="el-icon-search" class="btn" @click="turnTo">工商查询</el-button>
         </el-col>
         </el-col>
-        <el-col :span="6" class="ticketBtn">
+        <el-col :span="6" class="ticketBtn" style="text-align:right">
           <el-button type="primary" @click="applyTicket()">领取门票</el-button>
           <el-button type="primary" @click="applyTicket()">领取门票</el-button>
         </el-col>
         </el-col>
         <el-col :span="24">
         <el-col :span="24">

+ 13 - 6
src/layout/detail/web-jobs.vue

@@ -9,17 +9,17 @@
       <el-row class="rowStyle" v-for="(item, index) in list" :key="index" :gutter="10">
       <el-row class="rowStyle" v-for="(item, index) in list" :key="index" :gutter="10">
         <el-col :span="16">
         <el-col :span="16">
           <el-link class="job__name" :underline="false" @click="turnToJobs(item.id)">
           <el-link class="job__name" :underline="false" @click="turnToJobs(item.id)">
-            <span title="查看职位">{{ item.job_name ? item.job_name : '广东省德庆县2019年引进高层次紧缺人才公告' }}</span>
+            <span title="查看职位">{{ item.job_name ? item.job_name : '' }}</span>
           </el-link>
           </el-link>
         </el-col>
         </el-col>
         <el-col class="money" :span="4">
         <el-col class="money" :span="4">
-          {{ item.salary ? item.salary.text : '5K-10K/月' }}
+          {{ item.salary ? item.salary.text : '' }}
         </el-col>
         </el-col>
-        <el-col :span="4">
-          {{ item.num ? item.num : '13人' }}
+        <el-col :span="4" style="text-align:center;">
+          {{ item.job_number | jobNum }}
         </el-col>
         </el-col>
-        <el-col :span="16"> 招聘专业 : {{ item.subject ? item.subject : '法学,经济学,人文地理与城乡规划,环境科学,劳动与社会保障' }} </el-col>
-        <el-col :span="8"> {{ item.edu ? item.edu : '本科及以上' }} | {{ item.city ? item.city : '肇庆市' }} </el-col>
+        <el-col :span="16"> 招聘专业 : {{ item.zy_req ? item.zy_req : '' }} </el-col>
+        <el-col :span="8"> {{ item.xl_req ? item.xl_req : '' }} | {{ item.city ? item.city : '' }} </el-col>
       </el-row>
       </el-row>
       <el-row v-if="!type">
       <el-row v-if="!type">
         <el-col :span="24" style="text-align:center">
         <el-col :span="24" style="text-align:center">
@@ -78,6 +78,13 @@ export default {
       this.$set(this, `list`, this.info.data);
       this.$set(this, `list`, this.info.data);
     },
     },
   },
   },
+  filters: {
+    jobNum(num) {
+      if (!num) return '';
+      num = num.includes('人') ? num : `${num}人`;
+      return num;
+    },
+  },
 };
 };
 </script>
 </script>
 
 

+ 18 - 7
src/layout/layout-part/top-menu.vue

@@ -12,16 +12,19 @@
                 </template>
                 </template>
                 <el-menu-item v-for="(sub, subIndex) in jobs.children" :key="subIndex" :index="sub.path">{{ sub.title }}</el-menu-item>
                 <el-menu-item v-for="(sub, subIndex) in jobs.children" :key="subIndex" :index="sub.path">{{ sub.title }}</el-menu-item>
               </el-submenu>
               </el-submenu>
-              <!-- <el-menu-item v-else :index="item.path" :key="index">{{ item.title }}</el-menu-item> -->
             </template>
             </template>
             <template v-for="(item, index) in menu">
             <template v-for="(item, index) in menu">
-              <el-submenu :index="`${index}`" :key="index">
+              <el-submenu :index="`${index}`" :key="index" v-if="item.type !== 'url' && item.type !== 'content'">
                 <template slot="title">
                 <template slot="title">
                   {{ item.title }}
                   {{ item.title }}
                 </template>
                 </template>
-                <el-menu-item v-for="(sub, subIndex) in item.children" :key="subIndex" :index="sub.path">{{ sub.title }}</el-menu-item>
+                <template v-for="(sub, subIndex) in item.children">
+                  <el-menu-item :index="sub.path" :key="subIndex" v-if="sub.type !== 'url'">{{ sub.title }}</el-menu-item>
+                  <el-menu-item :index="``" :key="subIndex" @click="turnTo(sub.url)" v-else> {{ sub.title }}</el-menu-item>
+                </template>
               </el-submenu>
               </el-submenu>
-              <!-- <el-menu-item v-else :index="item.path" :key="index">{{ item.title }}</el-menu-item> -->
+              <el-menu-item v-else-if="item.type === 'content'" :index="item.path" :key="index">{{ item.title }}</el-menu-item>
+              <el-menu-item v-else :index="``" :key="index" @click="turnTo(item.url)">{{ item.title }}</el-menu-item>
             </template>
             </template>
           </el-menu>
           </el-menu>
         </el-col>
         </el-col>
@@ -62,8 +65,12 @@ export default {
         //获取菜单的栏目
         //获取菜单的栏目
         let allMenu = result.data;
         let allMenu = result.data;
         for (let item of allMenu) {
         for (let item of allMenu) {
-          let res = await this.completeMenu(item);
-          item.children = res;
+          if (item.type === 'content') {
+            item.path = `/info/detail?id=${item.content_id}`;
+          } else if (item.type !== 'url') {
+            let res = await this.completeMenu(item);
+            item.children = res;
+          }
         }
         }
         sessionStorage.setItem('menu', JSON.stringify(allMenu));
         sessionStorage.setItem('menu', JSON.stringify(allMenu));
         this.$set(this, `menu`, allMenu);
         this.$set(this, `menu`, allMenu);
@@ -74,11 +81,15 @@ export default {
       if (`${res.errcode}` === '0') {
       if (`${res.errcode}` === '0') {
         //组合path:res.data内容都为栏目.所以,点击这些栏目显示的列表应该是信息列表,需要用栏目的id作为查询信息的parten_id查出不同栏目的信息
         //组合path:res.data内容都为栏目.所以,点击这些栏目显示的列表应该是信息列表,需要用栏目的id作为查询信息的parten_id查出不同栏目的信息
         for (const col of res.data) {
         for (const col of res.data) {
-          col.path = `/info/list/${col.id}`;
+          if (col.type === 'content') col.path = `/info/detail?id=${col.content_id}`;
+          else if (item.type !== 'url') col.path = `/info/list/${col.id}`;
         }
         }
         return res.data;
         return res.data;
       }
       }
     },
     },
+    turnTo(url) {
+      window.open(url);
+    },
   },
   },
 };
 };
 </script>
 </script>

+ 2 - 2
src/views/index/index.vue

@@ -194,9 +194,9 @@ export default {
         }
         }
         let object = { ...JSON.parse(JSON.stringify(item)), infoList: arr, column: colObject };
         let object = { ...JSON.parse(JSON.stringify(item)), infoList: arr, column: colObject };
         this.$set(this, `notice`, object);
         this.$set(this, `notice`, object);
-      } else if (item.category === '"self1"') {
+      } else if (item.category === 'self1') {
         this.$set(this, `self1List`, item.children);
         this.$set(this, `self1List`, item.children);
-      } else if (item.category === '"self2') {
+      } else if (item.category === 'self2') {
         this.$set(this, `self2List`, item.children);
         this.$set(this, `self2List`, item.children);
       }
       }
     },
     },

+ 4 - 0
src/views/info/detail.vue

@@ -29,6 +29,10 @@
             <el-image :src="info.pic" style="height:60%;width:60%" v-if="info.pic"></el-image>
             <el-image :src="info.pic" style="height:60%;width:60%" v-if="info.pic"></el-image>
           </el-col>
           </el-col>
           <el-col :span="24" style="padding-top: 1rem;font-size: 20px;text-indent: 2rem;line-height: 30px;" v-html="info.content"> </el-col>
           <el-col :span="24" style="padding-top: 1rem;font-size: 20px;text-indent: 2rem;line-height: 30px;" v-html="info.content"> </el-col>
+          <el-col :span="24">附件:</el-col>
+          <el-col :span="24" v-for="(item, index) in info.attachment" :key="index">
+            <el-link type="primary" :href="item.uri">{{ item.name }}</el-link>
+          </el-col>
         </el-row>
         </el-row>
       </template>
       </template>
     </recruitdetail-layout>
     </recruitdetail-layout>

+ 1 - 1
src/views/jobfair/detail.vue

@@ -19,7 +19,7 @@
       <template v-slot:mainLeft>
       <template v-slot:mainLeft>
         <jobfair-head title="招聘会信息" :info="info" @getTicket="getTicket"></jobfair-head>
         <jobfair-head title="招聘会信息" :info="info" @getTicket="getTicket"></jobfair-head>
         <jobfair-context title="招聘会说明" :info="info"></jobfair-context>
         <jobfair-context title="招聘会说明" :info="info"></jobfair-context>
-        <user-defined title="招聘会相关">
+        <user-defined title="招聘会相关" id="corpList">
           <el-tabs v-model="tabs" type="card">
           <el-tabs v-model="tabs" type="card">
             <el-tab-pane label="企业列表" name="corp">
             <el-tab-pane label="企业列表" name="corp">
               <el-table :data="corpList" style="width: 100%" stripe :show-header="false">
               <el-table :data="corpList" style="width: 100%" stripe :show-header="false">

+ 9 - 4
src/views/jobfair/list.vue

@@ -33,15 +33,20 @@
               {{ item.title }}
               {{ item.title }}
             </el-link>
             </el-link>
           </el-col>
           </el-col>
-          <el-col :span="6" style="text-align:center">
-            <span style="color:red;">{{ item.time }}</span>
+          <el-col :span="6" style="text-align:left">
+            <span><span class="el-icon-time"></span>举办时间:{{ item.time }}</span>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
         <el-row>
         <el-row>
-          <span style="color:#606266">{{ item.organizer }}</span>
+          <el-col :span="18">
+            <span style="color:#606266"><span class="el-icon-s-flag"></span>主办方:{{ item.organizer }}</span>
+          </el-col>
+          <el-col :span="6" style="text-align:left">
+            <span style="color:red;"><span class="el-icon-date"></span>截止报名日期:{{ item.end_date }}</span>
+          </el-col>
         </el-row>
         </el-row>
         <el-row>
         <el-row>
-          <span style="color:#606266">{{ item.address }}</span>
+          <span style="color:#606266"><span class="el-icon-location"></span>地址:{{ item.address }}</span>
         </el-row>
         </el-row>
         <!-- <el-row style="color:#606266">
         <!-- <el-row style="color:#606266">
           <el-col :span="20"><span>参与企业25家</span> </el-col>
           <el-col :span="20"><span>参与企业25家</span> </el-col>

+ 18 - 10
src/views/jobinfo/list.vue

@@ -27,24 +27,19 @@
       </el-col>
       </el-col>
     </el-row>
     </el-row>
     <el-row class="rowstyle" v-for="(item, index) in list" :key="index">
     <el-row class="rowstyle" v-for="(item, index) in list" :key="index">
-      <!-- <el-col :span="3">
-        <div class="demo-basic--circle">
-          <div class="block"><el-avatar shape="square" :size="75" :src="squareUrl"></el-avatar></div>
-        </div>
-      </el-col> -->
       <el-col :span="21" type="flex" justify="start">
       <el-col :span="21" type="flex" justify="start">
         <el-row>
         <el-row>
           <el-col :span="20">
           <el-col :span="20">
             <el-link style="color:#850000 " @click="$router.push({ path: '/jobinfo/detail', query: { id: item.id } })">
             <el-link style="color:#850000 " @click="$router.push({ path: '/jobinfo/detail', query: { id: item.id } })">
-              <!-- 学大教育集团(长春分公司)招聘简章 -->{{ item.title }}
+              {{ item.title }}
             </el-link>
             </el-link>
           </el-col>
           </el-col>
-          <!-- <el-col :span="4" prop="">
-            <span style="color:#606266;">2019-06-17 09:30</span>
-          </el-col> -->
+          <el-col :span="4">
+            <span style="color:#606266;">{{ item | getTime(`meta.createdAt`) }}</span>
+          </el-col>
         </el-row>
         </el-row>
         <el-row>
         <el-row>
-          <!-- <span style="color:#606266">{{ item.content }}</span> -->
+          <span style="color:#606266">招聘企业:{{ item.corpname }}</span>
         </el-row>
         </el-row>
         <el-row prop="title">
         <el-row prop="title">
           <span style="color:#606266">招聘类型:{{ `${item.is_practice}` === `0` ? '全职' : '实习' }}</span>
           <span style="color:#606266">招聘类型:{{ `${item.is_practice}` === `0` ? '全职' : '实习' }}</span>
@@ -64,6 +59,7 @@
 
 
 <script>
 <script>
 import { mapActions, mapState } from 'vuex';
 import { mapActions, mapState } from 'vuex';
+import _ from 'lodash';
 export default {
 export default {
   name: 'list',
   name: 'list',
   props: {},
   props: {},
@@ -97,6 +93,18 @@ export default {
       }
       }
     },
     },
   },
   },
+  filters: {
+    getTime(data, col) {
+      let time = _.get(data, col);
+      time = time
+        ? new Date(time)
+            .toLocaleDateString()
+            .replace('/', '-')
+            .replace('/', '-')
+        : '';
+      return time;
+    },
+  },
 };
 };
 </script>
 </script>
 
 

+ 16 - 3
src/views/jobs/list.vue

@@ -21,7 +21,7 @@
     </el-row>
     </el-row>
     <el-row class="rowstyle" v-for="(item, index) in list" :key="index">
     <el-row class="rowstyle" v-for="(item, index) in list" :key="index">
       <el-col :span="3">
       <el-col :span="3">
-        <div class="block"><el-avatar shape="square" :size="75" :src="squareUrl"></el-avatar></div>
+        <div class="block"><el-avatar shape="square" fit="contain" :size="75" :src="getProp(item, 'corpInfo.logo_url')"></el-avatar></div>
       </el-col>
       </el-col>
       <el-col :span="10" class="info">
       <el-col :span="10" class="info">
         <el-row>
         <el-row>
@@ -55,7 +55,7 @@
 
 
 <script>
 <script>
 import { mapActions, mapState } from 'vuex';
 import { mapActions, mapState } from 'vuex';
-
+import _ from 'lodash';
 export default {
 export default {
   name: 'list',
   name: 'list',
   props: {},
   props: {},
@@ -80,7 +80,7 @@ export default {
     type: 'search',
     type: 'search',
   },
   },
   methods: {
   methods: {
-    ...mapActions(['postOperation']),
+    ...mapActions(['postOperation', 'corpOperation']),
     async search(page) {
     async search(page) {
       let skip = 0;
       let skip = 0;
       if (page) {
       if (page) {
@@ -91,12 +91,25 @@ export default {
       let result = await this.postOperation({ type: 'list', data: newData });
       let result = await this.postOperation({ type: 'list', data: newData });
       if (`${result.errcode}` === '0') {
       if (`${result.errcode}` === '0') {
         //给this=>vue的实例下在中的list属性,赋予result.data的值
         //给this=>vue的实例下在中的list属性,赋予result.data的值
+        for (const item of result.data) {
+          let corpInfo = await this.getLogo(item.corpid);
+          item.corpInfo = corpInfo;
+        }
         this.$set(this, `list`, result.data);
         this.$set(this, `list`, result.data);
         this.$set(this, `totalRow`, result.total);
         this.$set(this, `totalRow`, result.total);
+        // this.$set(this, `loading`);
       } else {
       } else {
         this.$message.error(result.errmsg ? result.errmsg : 'error');
         this.$message.error(result.errmsg ? result.errmsg : 'error');
       }
       }
     },
     },
+    async getLogo(corpid) {
+      let result = await this.corpOperation({ type: 'component', data: { corpid: corpid } });
+      if (`${result.errcode}` === '0') return result.data;
+    },
+    getProp(data, pos) {
+      let res = _.get(data, pos);
+      return res;
+    },
   },
   },
 };
 };
 </script>
 </script>