guhongwei 5 years ago
parent
commit
280ad71166
3 changed files with 64 additions and 44 deletions
  1. 15 3
      src/views/home/index.vue
  2. 48 40
      src/views/want/info/context/jobinfo.vue
  3. 1 1
      src/views/want/resume/index.vue

+ 15 - 3
src/views/home/index.vue

@@ -7,7 +7,7 @@
           <el-col class="topLeftTxt">
             <ul>
               <li>
-                <span class="number number_s">3</span>
+                <span class="number number_s">{{ totalSelf }}</span>
                 <p>我的投递</p>
               </li>
               <li>
@@ -138,13 +138,17 @@ export default {
     tableDataSign: [],
     tableDataWhe: [],
     noticeList: [],
+    totalSelf: 0,
   }),
   created() {
     this.getNoticeList();
+    this.searchNumber();
+  },
+  computed: {
+    ...mapState(['user']),
   },
-  computed: {},
   methods: {
-    ...mapActions(['noticeOperation']),
+    ...mapActions(['noticeOperation', 'lettersOperation']),
     async getNoticeList() {
       let result = await this.noticeOperation({ type: 'list', data: { userid: this.user.id, type: 3 } });
       if (`${result.errcode}` === '0') {
@@ -158,6 +162,14 @@ export default {
         this.getNoticeList();
       }
     },
+    async searchNumber() {
+      let result = await this.lettersOperation({ type: 'list', data: { studname: this.user.xm } });
+      if (`${result.errcode}` === '0') {
+        this.$set(this, `totalSelf`, result.total);
+      } else {
+        this.$message.error(result.errmsg ? result.errmsg : 'error');
+      }
+    },
   },
 };
 </script>

+ 48 - 40
src/views/want/info/context/jobinfo.vue

@@ -24,44 +24,25 @@
     </el-row>
     <el-card class="box-card" shadow="never" style="margin-top: 2rem">
       <el-row>
-        <el-table :data="list" style="width: 100%" :show-header="false">
-          <el-table-column align="left">
-            <template v-slot="scope">
-              <el-row type="flex" align="middle" justify="center">
-                <el-col :span="3">
-                  <div class="demo-basic--circle">
-                    <div><el-avatar shape="square" :size="80" :src="squareUrl"></el-avatar></div>
-                  </div>
-                </el-col>
-                <el-col :span="21">
-                  <el-row type="flex" align="middle" justify="center">
-                    <el-col :span="18">
-                      <el-link type="primary" @click="turnDetail(scope.row.id)">{{ scope.row.title }}</el-link>
-                    </el-col>
-                    <el-col :span="6">
-                      <span style="color: #F56C6C;">{{ scope.row.date }}</span>
-                    </el-col>
-                  </el-row>
-                  <el-row type="flex" align="bottom" justify="center">
-                    <el-col :span="8"> &nbsp; </el-col>
-                    <el-col :span="10"> &nbsp; </el-col>
-                    <el-col :span="8"> &nbsp; </el-col>
-                  </el-row>
-                  <el-row type="flex" align="bottom" justify="center">
-                    <el-col :span="8"> &nbsp; </el-col>
-                    <el-col :span="10">
-                      &nbsp;
-                    </el-col>
-                    <!-- <el-col :span="6">
-                      <i class="el-icon-view" style="padding-right: 0.3rem"></i>
-                      <span style="font-size: 0.9rem; color: #999999;">{{ scope.row.view }} </span>
-                    </el-col> -->
-                  </el-row>
-                </el-col>
-              </el-row>
-            </template>
-          </el-table-column>
-        </el-table>
+        <el-col class="list" :span="24" v-for="(item, index) in list" :key="index">
+          <el-col :span="3" class="image">
+            <el-image style="width:80px;height:80px;" :src="item.logo_url"></el-image>
+          </el-col>
+          <el-col :span="20" class="info">
+            <el-col :span="24" class="title">
+              <el-link @click="turnDetail(item.id)">{{ item.title }}</el-link>
+            </el-col>
+            <el-col :span="24" class="type">
+              <p>招聘类型:{{ item.is_practice === 0 ? '全职' : '实习' }}</p>
+            </el-col>
+            <el-col :span="24" class="schname">
+              <p>主办方:{{ item.schname }}</p>
+            </el-col>
+            <el-col :span="24" class="corpname">
+              <p>参会企业:{{ item.corpname }}</p>
+            </el-col>
+          </el-col>
+        </el-col>
       </el-row>
     </el-card>
     <el-row class="row_pagination">
@@ -91,7 +72,7 @@ export default {
   },
   computed: {},
   methods: {
-    ...mapActions(['jobinfoOperation']),
+    ...mapActions(['jobinfoOperation', 'corpOperation']),
     async search(page) {
       let skip = 0;
       if (page) {
@@ -99,8 +80,14 @@ export default {
       }
       let result = await this.jobinfoOperation({ type: 'list', data: { skip: skip, limit: this.$limit, ...this.searchInfo } });
       if (`${result.errcode}` === '0') {
-        this.$set(this, `list`, result.data);
+        for (const val of result.data) {
+          let { identity } = await this.corpOperation({ type: 'search', data: { corpid: val.corpid } });
+          console.log(identity.logo_url);
+          val.logo_url = identity.logo_url;
+        }
+        console.log(result.data);
         this.$set(this, `totalRow`, result.total);
+        this.$set(this, `list`, result.data);
       } else {
         this.$message.error(result.errmsg ? result.errmsg : 'error');
       }
@@ -113,6 +100,10 @@ export default {
 </script>
 
 <style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
 .row_pagination {
   text-align: right;
   margin-top: 1rem;
@@ -120,4 +111,21 @@ export default {
 .search_center {
   text-align: center;
 }
+.list {
+  padding: 12px 0;
+  border-bottom: 1px solid #ccc;
+}
+.list:hover {
+  background-color: #cccccc3f;
+}
+.image {
+  text-align: center;
+}
+/deep/.info .title .el-link {
+  font-size: 20px;
+  color: #409eff;
+}
+.info p {
+  font-size: 14px;
+}
 </style>

+ 1 - 1
src/views/want/resume/index.vue

@@ -88,7 +88,7 @@
                 <form-item label="学校"> <el-input v-model="info.info.yx" placeholder="请输入院校" readonly></el-input></form-item>
                 <form-item label="所学专业"> <el-input v-model="info.info.zy" placeholder="请输入所学专业" readonly></el-input></form-item>
                 <form-item label="生源地"> <el-input v-model="info.info.syszd" placeholder="请输入学生生源地" readonly></el-input></form-item>
-                <form-item label="手机号"> <el-input v-model="contact.mobile" placeholder="请输入手机号"  :maxlength="11" type="text"></el-input></form-item>
+                <form-item label="手机号"> <el-input v-model="contact.mobile" placeholder="请输入手机号" :maxlength="11" type="text"></el-input></form-item>
                 <form-item label="邮箱"> <el-input v-model="contact.email" placeholder="请输入邮箱"></el-input></form-item>
               </el-row>
             </el-card>