瀏覽代碼

全局通知

LiuJ 2 周之前
父節點
當前提交
48a42b1741
共有 3 個文件被更改,包括 545 次插入290 次删除
  1. 322 104
      src/layout/components/Navbar.vue
  2. 216 186
      src/views/job/creatJob.vue
  3. 7 0
      src/views/news/addJobHunting.vue

+ 322 - 104
src/layout/components/Navbar.vue

@@ -17,52 +17,85 @@
         <lang-select class="right-menu-item hover-effect" />
       </template> -->
       <div class="noticeIconBox">
-        <img src="@/assets/public/nav/notice1.png" class="noticeIconImg" @click="showTabs = !showTabs"/>
-        <span class="unreadCount">{{msg.count}}</span>
+        <img src="@/assets/public/nav/notice1.png" class="noticeIconImg" @click="showTabs = !showTabs" />
+        <span class="unreadCount">{{ msg.count }}</span>
         <!-- <img src="@/assets/public/nav/arrowDown.png" class="arrowDown" /> -->
 
         <div class="noticeTabsBox" v-if="showTabs" ref="noticeTabsBox">
           <div class="noticeTabsTitleBox">
-            <div :class="{'noticeTabs': true, 'active': tabsIndex == 1}" @click="changeTabs(1)">
+            <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 1 }" @click="changeTabs(1)">
               <div class="noticeTabsItem">
                 资讯
                 <span class="noticeMessageNew" v-if="msg.apply_articale.length > 0"></span>
               </div>
             </div>
-            <div :class="{'noticeTabs': true, 'active': tabsIndex == 2}" @click="changeTabs(2)">
+            <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 2 }" @click="changeTabs(2)">
               <div class="noticeTabsItem">
                 商品
                 <span class="noticeMessageNew" v-if="msg.good.length > 0"></span>
               </div>
             </div>
-            <!-- <div :class="{'noticeTabs': true, 'active': tabsIndex == 3}" @click="changeTabs(3)">
+            <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 3 }" @click="changeTabs(3)">
+
               <div class="noticeTabsItem">
                 求职招聘
                 <span class="noticeMessageNew"></span>
               </div>
-            </div> -->
+            </div>
+
+            <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 4 }" @click="changeTabs(4)">
+              <div class="noticeTabsItem">
+                书刊
+                <span class="noticeMessageNew"></span>
+              </div>
+            </div>
+          </div>
+          <div class="noticeTabsLine" v-if="tabsIndex == 3" style="height: 20px; margin: 0px; margin-top: -20px;">
+            <ul class="noticeTabsLink">
+              <li v-if="qiu" @click="changeJob(1)">求职
+                <img src="@/assets/public/nav/arrowDown.png" class="arrowDown" />
+              </li>
+              <li v-if="zhao" @click="changeJob(2)">
+                招聘
+                <img src="@/assets/public/nav/arrowDown.png" class="arrowDown" />
+              </li>
+            </ul>
           </div>
           <div class="noticeTabsLinkLine">
             <div v-if="userType == 10000">
-              <div v-if="tabsIndex == 1" @click="goToPath(1,0)">待审核列表</div>
-              <div v-if="tabsIndex == 2" @click="goToPath(2,0)">待审核列表</div>
-              <div v-if="tabsIndex == 3" @click="goToPath(3,0)">待审核列表</div>
+              <div v-if="tabsIndex == 1" @click="goToPath(1, 0)">待审核列表</div>
+              <div v-if="tabsIndex == 2" @click="goToPath(2, 0)">待审核列表</div>
+              <div class="qiuFlex" v-if="tabsIndex == 3 && qiu == true" @click="goToPath(3, 0)">
+                <span :class="{ 'qiuPillow': true, 'qiuPillowHover': qiu1 == true }" @mouseover="handleQiu(1)"
+                  @click="goToPath(3.1, 0)">待审核列表</span>
+                <span :class="{ 'qiuPillow': true, 'qiuPillowHover': qiu2 == true }" @mouseover="handleQiu(2)"
+                  @click="goToPath(3.2, 0)">职场机会</span>
+              </div>
+              <div class="qiuFlex" v-if="tabsIndex == 3 && zhao == true">
+                <span :class="{ 'qiuPillow': true, 'qiuPillowHover': zhao1 == true }" @mouseover="handleQiu(3)"
+                  @click="goToPath(3.3, 0)">待审核列表</span>
+                <span :class="{ 'qiuPillow': true, 'qiuPillowHover': zhao2 == true }" @mouseover="handleQiu(4)"
+                  @click="goToPath(3.4, 0)">人才库</span>
+              </div>
+              <div v-if="tabsIndex == 4" @click="goToPath(4, 0)">待审核列表</div>
             </div>
             <div v-else>
-              <div v-if="tabsIndex == 1" @click="goToPath(1,-1)">资讯列表</div>
-              <div v-if="tabsIndex == 2" @click="goToPath(2,-1)">商品列表</div>
-              <div v-if="tabsIndex == 3" @click="goToPath(3,-1)">求职招聘列表</div>
+              <div v-if="tabsIndex == 1" @click="goToPath(1, -1)">资讯列表</div>
+              <div v-if="tabsIndex == 2" @click="goToPath(2, -1)">商品列表</div>
+              <div v-if="tabsIndex == 3" @click="goToPath(3, -1)">求职招聘列表</div>
+              <div v-if="tabsIndex == 4" @click="goToPath(4, -1)">书刊列表</div>
             </div>
           </div>
-          <div class="noticeTabsDataBox" v-if="tabsIndex==1">
+          <div class="noticeTabsDataBox" v-if="tabsIndex == 1">
             <div v-if="msg.apply_articale && msg.apply_articale.length > 0">
-              <div class="noticeTabsDataItem" v-for="item in msg.apply_articale" :key="item.id" @click="goToPath(1,item.id)">
+              <div class="noticeTabsDataItem" v-for="item in msg.apply_articale" :key="item.id"
+                @click="goToPath(1, item.id)">
                 <div class="noticeTabsDataItemImg newsIcon">
                   <img src="@/assets/public/nav/message-news.png">
                 </div>
                 <div class="noticeTabsDataItemContent">
-                  <div class="noticeNewsTitle">{{item.title}}</div>
-                  <div class="noticeNewsTime">{{item.updated_at}}</div>
+                  <div class="noticeNewsTitle">{{ item.title }}</div>
+                  <div class="noticeNewsTime">{{ item.updated_at }}</div>
                 </div>
               </div>
             </div>
@@ -75,15 +108,39 @@
               </div>
             </div>
           </div>
-          <div class="noticeTabsDataBox" v-if="tabsIndex==2">
+          <div class="noticeTabsDataBox" v-if="tabsIndex == 2">
             <div v-if="msg.good && msg.good.length > 0">
-              <div class="noticeTabsDataItem" v-for="item in msg.good" :key="item.id" @click="goToPath(2,item.id)">
+              <div class="noticeTabsDataItem" v-for="item in msg.good" :key="item.id" @click="goToPath(2, item.id)">
                 <div class="noticeTabsDataItemImg newsIcon">
                   <img src="@/assets/public/nav/message-news.png">
                 </div>
                 <div class="noticeTabsDataItemContent">
-                  <div class="noticeNewsTitle">{{item.name}}</div>
-                  <div class="noticeNewsTime">{{item.updated_at}}</div>
+                  <div class="noticeNewsTitle">{{ item.name }}</div>
+                  <div class="noticeNewsTime">{{ item.updated_at }}</div>
+                </div>
+              </div>
+            </div>
+            <div v-else class="noticeTabsDataItemEmpty">
+              <div class="noticeEmpty">
+                <img src="@/assets/public/nav/message-empty.png">
+              </div>
+              <div class="noticeEmptyText">
+                暂无消息
+              </div>
+            </div>
+          </div>
+          <!-- 求职信息  待审核 -->
+          <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && qiu == true && qiu1 == true">
+            <div v-if="msg.job_hunting && msg.job_hunting.length > 0">
+              <div class="noticeTabsDataItem" v-for="item in msg.job_hunting" :key="item.id"
+                @click="goToPath(3.1, item.id)">
+                <!-- 待审核求职 -->
+                <div class="noticeTabsDataItemImg newsIcon">
+                  <img src="@/assets/public/nav/message-news.png">
+                </div>
+                <div class="noticeTabsDataItemContent">
+                  <div class="noticeNewsTitle">{{ item.user_name + ':' + item.website_name + '-' + '发布求职信息了' }}</div>
+                  <div class="noticeNewsTime">{{ item.updated_at }}</div>
                 </div>
               </div>
             </div>
@@ -96,76 +153,117 @@
               </div>
             </div>
           </div>
-          <!-- <div class="noticeTabsDataBox" v-if="tabsIndex==3">
-            
-          </div> -->
-        </div>
-      </div>
 
-      <!--刘剑 --> 
-      <!--<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
-        <div class="avatar-wrapper">
-          <div class="avatar-wrapper">
-            <img src="@/assets/public/nav/notice1.png" class="user-notice" style="width:40px;height:40px;" />
-            <span class="unread-count">{{msg.count}}</span>
-            <img src="@/assets/public/nav/arrowDown.png" class="arrowDown" />
+          <!-- 求职信息  职场机会 -->
+          <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && qiu == true && qiu2 == true">
+            <div v-if="msg.job_apply && msg.job_apply.length > 0">
+              <div class="noticeTabsDataItem" v-for="item in msg.job_apply" :key="item.id"
+                @click="goToPath(3.22, item.id)">
+
+                <div class="noticeTabsDataItemImg newsIcon">
+                  <img src="@/assets/public/nav/message-news.png">
+                </div>
+                <div class="noticeTabsDataItemContent">
+                  <div class="noticeNewsTitle">{{ item.business_name + ':' + item.website_name + ' ' + '关注了' +
+                    item.user_name
+                    + '的简历' }}</div>
+                  <div class="noticeNewsTime">{{ item.updated_at }}</div>
+                </div>
+              </div>
+            </div>
+            <div v-else class="noticeTabsDataItemEmpty">
+              <div class="noticeEmpty">
+                <img src="@/assets/public/nav/message-empty.png">
+              </div>
+              <div class="noticeEmptyText">
+                暂无消息
+              </div>
+            </div>
           </div>
-        </div>
-        <el-dropdown-menu slot="dropdown" style="width: 200px;">
-          <router-link to="/examine" v-if="msg.apply_articale && msg.apply_articale.length > 0">
-            <div class="userMenuDownItem">
-              <el-dropdown-item>
-                <span style="display:block; text-align: center; width: 100%; color: #409EFF;">审核列表</span>
-              </el-dropdown-item>
+
+          <!-- 招聘信息  招聘信息  job_recruiting -->
+          <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && zhao == true && zhao1 == true">
+            <div v-if="msg.job_recruiting && msg.job_recruiting.length > 0">
+              <div class="noticeTabsDataItem" v-for="item in msg.job_recruiting" :key="item.id"
+                @click="goToPath(3.3, item.id)">
+                <!-- 招聘信息 job_recruiting -->
+                <div class="noticeTabsDataItemImg newsIcon">
+                  <img src="@/assets/public/nav/message-news.png">
+                </div>
+                <div class="noticeTabsDataItemContent">
+                  <div class="noticeNewsTitle">{{ item.user_name + ':' + item.website_name + ' ' + '-' + item.title
+                    + '岗位' }}
+                  </div>
+                  <div class="noticeNewsTime">{{ item.updated_at }}</div>
+                </div>
+              </div>
             </div>
-          </router-link>
-          <router-link :to="`/creatNews?id=${item.id}`" v-for="item in msg.apply_articale" :key="item.id">
-            <div class="userMenuDownItem" style="width: 200px;">
-              <el-dropdown-item divided style="width: 200px;">
-                <el-tooltip :content="item.title" effect="dark" placement="top">
-                  <span style="display:block;width: 150px;" :alt="item.title">{{ item.title.substring(0, 10) }}</span>
-                </el-tooltip>
-              </el-dropdown-item>
+            <div v-else class="noticeTabsDataItemEmpty">
+              <div class="noticeEmpty">
+                <img src="@/assets/public/nav/message-empty.png">
+              </div>
+              <div class="noticeEmptyText">
+                暂无消息
+              </div>
             </div>
-          </router-link>
-          <router-link to="/hall" v-if="msg.chat && msg.chat.length > 0">
-            <div class="userMenuDownItem">
-              <el-dropdown-item>
-                <span style="display:block;  color: #409EFF;">未读单聊</span>
-              </el-dropdown-item>
+          </div>
+
+
+
+          <!-- 招聘信息  人才库   job_apply -->
+          <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && zhao == true && zhao2 == true">
+            <div v-if="msg.job_apply && msg.job_apply.length > 0">
+              <div class="noticeTabsDataItem" v-for="item in msg.job_apply" :key="item.id"
+                @click="goToPath(3.4, item.id)">
+                <!-- 人才库 job_apply -->
+                <div class="noticeTabsDataItemImg newsIcon">
+                  <img src="@/assets/public/nav/message-news.png">
+                </div>
+                <div class="noticeTabsDataItemContent">
+
+                  <div class="noticeNewsTitle">{{ item.user_name + ': 求职了' + '-' + item.business_name +
+                    '-' +
+                    item.job_name }}</div>
+                  <div class="noticeNewsTime">{{ item.updated_at }}</div>
+                </div>
+              </div>
             </div>
-          </router-link>
-          <router-link to="/hall" v-for="item in msg.chat" :key="item.id">
-            <div class="userMenuDownItem" style="width: 200px;">
-              <el-dropdown-item divided style="width: 200px;">
-                <el-tooltip :content="item.content" effect="dark" placement="top">
-                  <span style="display:block;width: 150px;" :alt="item.content">{{ item.content.substring(0, 10)
-                  }}</span>
-                </el-tooltip>
-              </el-dropdown-item>
+            <div v-else class="noticeTabsDataItemEmpty">
+              <div class="noticeEmpty">
+                <img src="@/assets/public/nav/message-empty.png">
+              </div>
+              <div class="noticeEmptyText">
+                暂无消息
+              </div>
             </div>
-          </router-link>
-          <router-link to="/hall" v-if="msg.chat_group && msg.chat_group.length > 0">
-            <div class="userMenuDownItem">
-              <el-dropdown-item>
-                <span style="display:block; color: #409EFF;">未读群聊</span>
-              </el-dropdown-item>
+          </div>
+
+
+          <div class="noticeTabsDataBox" v-if="tabsIndex == 4">
+            <div v-if="msg.book && msg.book.length > 0">
+              <div class="noticeTabsDataItem" v-for="item in msg.book" :key="item.id" @click="goToPath(4, item.id)">
+                <div class="noticeTabsDataItemImg newsIcon">
+                  <img src="@/assets/public/nav/message-news.png">
+                </div>
+                <div class="noticeTabsDataItemContent">
+                  <div class="noticeNewsTitle">{{ item.title }}</div>
+                  <div class="noticeNewsTime">{{ item.updated_at }}</div>
+                </div>
+              </div>
             </div>
-          </router-link>
-          <router-link to="/hall" v-for="item in msg.chat_group" :key="item.id">
-            <div class="userMenuDownItem" style="width: 200px;">
-              <el-dropdown-item divided style="width: 200px;">
-                <el-tooltip :content="item.content" effect="dark" placement="top">
-                  <span style="display:block;width: 150px;" :alt="item.content">{{ item.content.substring(0, 10)
-                  }}</span>
-                </el-tooltip>
-              </el-dropdown-item>
+            <div v-else class="noticeTabsDataItemEmpty">
+              <div class="noticeEmpty">
+                <img src="@/assets/public/nav/message-empty.png">
+              </div>
+              <div class="noticeEmptyText">
+                暂无消息
+              </div>
             </div>
-          </router-link>
-        </el-dropdown-menu>
-      </el-dropdown> -->
+          </div>
+        </div>
+      </div>
 
-      <!-- 用户头像和菜单 --> 
+      <!-- 用户头像和菜单 -->
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
         <div class="avatar-wrapper">
           <!-- <img src="@/assets/public/nav/notice.png" class="user-notice"> -->
@@ -221,7 +319,7 @@ import Search from '@/components/HeaderSearch'
 import axios from 'axios';
 import router, { resetRouter } from '@/router'
 import BASEURL from '@/utils/baseUrl'
-import { getUseType,removeLoginStatus } from '@/utils/auth'
+import { getUseType, removeLoginStatus } from '@/utils/auth'
 
 export default {
   components: {
@@ -238,7 +336,14 @@ export default {
       msg: {},
       userType: '', //用户类型
       tabsIndex: 1, //显示哪个选项卡
-      showTabs: false //是否显示悬浮菜单
+      showTabs: true, //是否显示悬浮菜单
+      //求职招聘
+      qiu: false,
+      zhao: true,
+      qiu1: true,
+      qiu2: false,
+      zhao1: true,
+      zhao2: false
     }
   },
   computed: {
@@ -333,32 +438,74 @@ export default {
       this.tabsIndex = index;
     },
     //2.3跳转方法
-    goToPath(type,id){
+    goToPath(type, id) {
       //如果id是0 跳转到列表
-      if(id==0){
-        if(type == 1){
+      if (id == 0) {
+        if (type == 1) {
           this.$router.push(`/examine`);
-        }else if(type == 2){
+        } else if (type == 2) {
           this.$router.push(`/goodListApply`);
-        }else if(type == 3){
+        } else if (type == 3.1) {  //求职 待审核
+          this.$router.push(`/jobHuntingListApply`);
+        }
+        else if (type == 3.2) { // 职场机会
+          this.$router.push(`/jobHuntingListApply`);
+        }
+        else if (type == 3.3) {   // 招聘 待审核
+          this.$router.push(`/jobRecruitingListApply`);
+        }
+        else if (type == 3.4) {   // 人才库
           this.$router.push(`/jobHuntingList`);
         }
-      }else if(id==-1){
-        if(type == 1){
+        else if (type == 4) {
+          this.$router.push(`/bookListApply`);
+        }
+      } else if (id == -1) {
+        if (type == 1) {
           this.$router.push(`/articleList`);
-        }else if(type == 2){
+        } else if (type == 2) {
           this.$router.push(`/goodList`);
-        }else if(type == 3){
+        } else if (type == 3) {
+          this.$router.push(`/jobHuntingList`);
+        }
+        else if (type == 3.1) {  //求职 待审核
+          this.$router.push(`/jobHuntingList`);
+        }
+        else if (type == 3.2) { // 职场机会
           this.$router.push(`/jobHuntingList`);
         }
-      }else{
-        if(type == 1){
+        else if (type == 3.3) {   // 招聘 待审核
+          this.$router.push(`/jobRecruitingList`);
+        }
+        else if (type == 3.4) {   // 人才库
+          this.$router.push(`/jobHuntingList`);
+        }
+        else if (type == 4) {
+          this.$router.push(`/bookList`);
+        }
+      } else {
+        if (type == 1) {
           this.$router.push(`/creatNews?id=${id}`);
-        }else if(type == 2){
+        } else if (type == 2) {
           this.$router.push(`/addGood?id=${id}`);
-        }else if(type == 3){
+        } else if (type == 3) {
           this.$router.push(`/addJobHunting?id=${id}`);
         }
+        else if (type == 3.1) {  //求职 待审核
+          this.$router.push(`/addJobHunting?id=${id}`);
+        }
+        else if (type == 3.2) { // 职场机会
+          this.$router.push(`/addJobHunting?id=${id}`);
+        }
+        else if (type == 3.3) {   // 招聘 待审核
+          this.$router.push(`/creatJob?id=${id}`);
+        }
+        else if (type == 3.4) {   // 人才库
+          this.$router.push(`/addJobHunting?id=${id}`);
+        }
+        else if (type == 4) {
+          this.$router.push(`/addBook?id=${id}`);
+        }
       }
       this.showTabs = false;
     },
@@ -366,13 +513,37 @@ export default {
     handleClickOutside(event) {
       const noticeTabsBox = this.$refs.noticeTabsBox;
       const noticeIconImg = event.target.closest('.noticeIconImg');
-      
+
       // 如果点击的不是通知图标,并且点击的区域不在通知框内,则关闭通知框
       if (!noticeIconImg && noticeTabsBox && !noticeTabsBox.contains(event.target)) {
         this.showTabs = false;
       }
     },
     //2.通知消息 end---------------------------------------->
+    changeJob(index) {
+      if (index == 1) {
+        this.qiu = false;
+        this.zhao = true;
+      } else if (index == 2) {
+        this.qiu = true;
+        this.zhao = false;
+      }
+    },
+    handleQiu(index) {
+      if (index == 1) {
+        this.qiu1 = true;
+        this.qiu2 = false;
+      } else if (index == 2) {
+        this.qiu1 = false;
+        this.qiu2 = true;
+      } else if (index == 3) {
+        this.zhao1 = true;
+        this.zhao2 = false;
+      } else if (index == 4) {
+        this.zhao1 = false;
+        this.zhao2 = true;
+      }
+    }
   }
 }
 </script>
@@ -498,12 +669,14 @@ export default {
       box-sizing: border-box;
       padding-top: 8px;
       position: relative;
+
       .noticeIconImg {
         width: 34px;
         height: 34px;
         cursor: pointer;
       }
-      .unreadCount{
+
+      .unreadCount {
         position: absolute;
         top: 5px;
         right: 10px;
@@ -516,6 +689,7 @@ export default {
         color: #fff;
         border-radius: 50%;
       }
+
       //通知消息 悬浮菜单
       .noticeTabsBox {
         position: absolute;
@@ -527,23 +701,27 @@ export default {
         right: 20px;
         top: 50px;
         box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15);
-        padding:25px 20px;
+        padding: 25px 20px;
         box-sizing: border-box;
+
         .noticeTabsTitleBox {
           display: flex;
           align-items: center;
           border-bottom: 1px solid #E9EDF7;
+
           .noticeTabs {
             height: 41px;
             border-bottom: 2px solid #fff;
             margin-right: 40px;
             display: flex;
             cursor: pointer;
+
             .noticeTabsItem {
               height: 20px;
               line-height: 20px;
               font-size: 16px;
               position: relative;
+
               .noticeMessageNew {
                 width: 5px;
                 height: 5px;
@@ -555,22 +733,25 @@ export default {
               }
             }
           }
+
           .active {
             border-bottom: 2px solid #5570F1;
           }
         }
+
         .noticeTabsLinkLine {
           height: 38px;
           box-sizing: border-box;
           font-size: 14px;
           cursor: pointer;
           background: #F5F7FB;
-          border:1px solid #E3E8FA;
+          border: 1px solid #E3E8FA;
           text-align: center;
           line-height: 38px;
           border-radius: 8px;
           margin: 20px 0;
         }
+
         .noticeTabsDataBox {
           .noticeTabsDataItem {
             display: flex;
@@ -579,10 +760,13 @@ export default {
             border-radius: 8px;
             box-sizing: border-box;
             padding: 5px 10px;
+
             &:hover {
               background: #F5F7FB;
             }
+
             height: 95px;
+
             .noticeTabsDataItemImg {
               border-radius: 50%;
               width: 26px;
@@ -593,11 +777,14 @@ export default {
               margin-right: 15px;
               margin-top: 6px;
             }
-            .newsIcon{
+
+            .newsIcon {
               background: #BAC5F8;
             }
-            .noticeTabsDataItemContent{
+
+            .noticeTabsDataItemContent {
               flex: 1;
+
               .noticeNewsTitle {
                 font-size: 14px;
                 line-height: 28px;
@@ -609,20 +796,23 @@ export default {
                 -webkit-line-clamp: 2;
                 -webkit-box-orient: vertical;
               }
+
               .noticeNewsTime {
                 height: 30px;
-                line-height:30px;
+                line-height: 30px;
                 font-size: 14px;
-                color:#999;
+                color: #999;
               }
             }
           }
+
           .noticeTabsDataItemEmpty {
             .noticeEmpty {
               text-align: center;
               padding-top: 150px;
               box-sizing: border-box;
             }
+
             .noticeEmptyText {
               text-align: center;
               color: #999;
@@ -668,4 +858,32 @@ export default {
 .unread-count:empty {
   display: none;
 }
+
+.noticeTabsLink {
+  //  去掉圆点
+  list-style: none;
+}
+
+.qiuPillow {
+  border-radius: 4px;
+  padding: -1px;
+  width: 48%;
+  height: 36px;
+  display: block;
+}
+
+.qiuPillowHover {
+  border-radius: 4px;
+  padding: -1px;
+  width: 48%;
+  height: 36px;
+  background: #dfe9ee;
+  border: #dfe1e7 1px solid;
+}
+
+.qiuFlex {
+  display: flex;
+  justify-content: space-between;
+  text-align: center;
+}
 </style>

+ 216 - 186
src/views/job/creatJob.vue

@@ -6,18 +6,22 @@
         <div class="formDiv">
           <div v-if="creatNews_user_type == 10000">
             <el-form-item label="站点名称:" prop="web_site_id" class="custom-align-right">
-              <el-cascader :key="parentKey" v-model="form.web_site_id" placeholder="请选择站点名称" popper-class="my_cascader" :options="creatNews_nav_pool_arr" @change="creatNews_nav_pool_change_fun(form.web_site_id)" filterable clearable></el-cascader>
+              <el-cascader :key="parentKey" v-model="form.web_site_id" placeholder="请选择站点名称" popper-class="my_cascader"
+                :options="creatNews_nav_pool_arr" @change="creatNews_nav_pool_change_fun(form.web_site_id)" filterable
+                clearable></el-cascader>
             </el-form-item>
           </div>
           <el-form-item label="导航池名称:" prop="cat_arr_id" class="custom-align-right">
-              <el-cascader :key="parentKey_2" v-model="form.cat_arr_id" placeholder="请选择导航池名称" :props="parentData_2" popper-class="my_cascader" filterable clearable></el-cascader>
-            </el-form-item>
+            <el-cascader :key="parentKey_2" v-model="form.cat_arr_id" placeholder="请选择导航池名称" :props="parentData_2"
+              popper-class="my_cascader" filterable clearable></el-cascader>
+          </el-form-item>
           <el-form-item label="招聘职位名称" prop="title" class="custom-align-right">
             <el-input v-model="form.title" autocomplete="off" placeholder="请输入招聘职位名称"></el-input>
           </el-form-item>
-          <el-form-item label="工作地点:"  prop="province_id" class="custom-align-right">
-            <el-select v-model="form.province_id" placeholder="请选择省" style="display:inline-block;width:50%" @change = "province_change">
-              <el-option v-for="item in province_array" :key="item.id" :label="item.name" :value="item.id"  > 
+          <el-form-item label="工作地点:" prop="province_id" class="custom-align-right">
+            <el-select v-model="form.province_id" placeholder="请选择省" style="display:inline-block;width:50%"
+              @change="province_change">
+              <el-option v-for="item in province_array" :key="item.id" :label="item.name" :value="item.id">
               </el-option>
             </el-select>
             <el-select v-model="form.city_id" placeholder="请选择市" style="width:50%">
@@ -32,7 +36,7 @@
             </el-select>
           </el-form-item>
           <el-form-item label="职位类别:" prop="zw_id" class="custom-align-right">
-            <el-select v-model="form.zw_id" placeholder="请选择职位类别" @change = "zwid_change">
+            <el-select v-model="form.zw_id" placeholder="请选择职位类别" @change="zwid_change">
               <el-option v-for="item in zw_array" :key="item.zwid" :label="item.zwname" :value="item.zwid">
               </el-option>
             </el-select>
@@ -55,30 +59,36 @@
             </el-form-item>
             <el-form-item label="工作经验:" prop="experience" class="custom-align-right">
               <el-select v-model="form.experience" clearable placeholder="请选择工作经验">
-                <el-option v-for="item in experience_array" :key="item.evalue" :label="item.ename" :value="item.evalue"></el-option>
+                <el-option v-for="item in experience_array" :key="item.evalue" :label="item.ename"
+                  :value="item.evalue"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="学历要求:" prop="educational" class="custom-align-right">
               <el-select v-model="form.educational" clearable placeholder="请选择学历要求">
-                <el-option v-for="item in educational_array" :key="item.evalue" :label="item.ename" :value="item.evalue"></el-option>
+                <el-option v-for="item in educational_array" :key="item.evalue" :label="item.ename"
+                  :value="item.evalue"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="月薪:" prop="salary" class="custom-align-right">
               <el-select v-model="form.salary" clearable placeholder="请输入月薪">
-                <el-option v-for="item in salary_array" :key="item.evalue" :label="item.ename" :value="item.evalue"></el-option>
+                <el-option v-for="item in salary_array" :key="item.evalue" :label="item.ename"
+                  :value="item.evalue"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="招聘人数:" prop="number" class="custom-align-right">
               <el-input v-model="form.number" autocomplete="off" placeholder="请输入招聘人数"></el-input>
             </el-form-item>
 
-            <el-form-item label="语言能力:" prop="language" class="custom-align-right" style="width: 50%;display: inline-block;">
+            <el-form-item label="语言能力:" prop="language" class="custom-align-right"
+              style="width: 50%;display: inline-block;">
               <el-select v-model="form.language" clearable placeholder="请选择语种">
-                <el-option v-for="item in language_array" :key="item.evalue" :label="item.ename" :value="item.evalue"></el-option>
+                <el-option v-for="item in language_array" :key="item.evalue" :label="item.ename"
+                  :value="item.evalue"></el-option>
               </el-select>
             </el-form-item>
-           
-            <el-form-item label="掌握程度:" prop="level" class="custom-align-right" style="width: 50%;display: inline-block;">
+
+            <el-form-item label="掌握程度:" prop="level" class="custom-align-right"
+              style="width: 50%;display: inline-block;">
               <el-select v-model="form.level" clearable placeholder="请选择掌握程度">
                 <el-option v-for="item in level_array" :key="item.evalue" :label="item.ename" :value="item.evalue">
                 </el-option>
@@ -88,35 +98,42 @@
               <el-input v-model="form.description" type="textarea" :rows="2" placeholder="介绍公司对该职位的职位描述..."> </el-input>
             </el-form-item>
             <el-form-item label="具体要求:" prop="jt_description" class="custom-align-right" style="display:block;">
-              <el-input v-model="form.jt_description" type="textarea" :rows="2" placeholder="介绍公司对该职位的具体要求..."> </el-input>
+              <el-input v-model="form.jt_description" type="textarea" :rows="2" placeholder="介绍公司对该职位的具体要求...">
+              </el-input>
             </el-form-item>
           </div>
           <div>
             <!--公司信息  start-->
             <el-form-item label="公司名称:" prop="business_name" class="custom-align-right">
-              <el-input v-model="form.business_name" autocomplete="off"  placeholder="请输入公司名称" :disabled="creatNews_user_type !== '10000'"></el-input>
+              <el-input v-model="form.business_name" autocomplete="off" placeholder="请输入公司名称"
+                :disabled="creatNews_user_type !== '10000'"></el-input>
             </el-form-item>
             <el-form-item label="所属行业:" prop="company_hy_id" class="custom-align-right">
-              <el-select v-model="form.company_hy_id" clearable placeholder="请选择公司所属的行业" :disabled="creatNews_user_type !== '10000'">
+              <el-select v-model="form.company_hy_id" clearable placeholder="请选择公司所属的行业"
+                :disabled="creatNews_user_type !== '10000'">
                 <el-option v-for="item in hy_array" :key="item.hyid" :label="item.hyname" :value="item.hyid">
-                </el-option> 
+                </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="公司规模:" prop="company_size" class="custom-align-right">
-              <el-select v-model="form.company_size" clearable placeholder="请选择公司的规模" :disabled="creatNews_user_type !== '10000'">
-                <el-option v-for="item in companysize_array" :key="item.evalue" :label="item.ename" :value="item.evalue">
+              <el-select v-model="form.company_size" clearable placeholder="请选择公司的规模"
+                :disabled="creatNews_user_type !== '10000'">
+                <el-option v-for="item in companysize_array" :key="item.evalue" :label="item.ename"
+                  :value="item.evalue">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="公司性质:" prop="company_nature" class="custom-align-right">
-              <el-select v-model="form.company_nature" clearable placeholder="请选择公司的性质" :disabled="creatNews_user_type !== '10000'">
-                <el-option v-for="item in companynature_array" :key="item.id" :label="item.nature_name" :value="item.id">
+              <el-select v-model="form.company_nature" clearable placeholder="请选择公司的性质"
+                :disabled="creatNews_user_type !== '10000'">
+                <el-option v-for="item in companynature_array" :key="item.id" :label="item.nature_name"
+                  :value="item.id">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="公司简介:" prop="introduction" class="custom-align-right">
-              <el-input v-model="form.introduction" autocomplete="off" :disabled="creatNews_user_type !== '10000'" type="textarea" :rows="2"
-                placeholder="请填写公司简介..."> </el-input>
+              <el-input v-model="form.introduction" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
+                type="textarea" :rows="2" placeholder="请填写公司简介..."> </el-input>
             </el-form-item>
             <el-form-item label="联系人:" prop="real_name" class="custom-align-right">
               <el-input v-model="form.real_name" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
@@ -131,12 +148,14 @@
                 placeholder="请输入公司网址"></el-input>
             </el-form-item>
             <el-form-item label="地址:" prop="address_arr_id" class="custom-align-right">
-              <CityCascader v-model="form.address_arr_id" @update-city-id="update_address_arr_id" :user_type="creatNews_user_type"></CityCascader>
+              <CityCascader v-model="form.address_arr_id" @update-city-id="update_address_arr_id"
+                :user_type="creatNews_user_type"></CityCascader>
               <el-input v-model="form.address" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
                 placeholder="请输入公司地址"></el-input>
             </el-form-item>
             <el-form-item label="邮箱:" prop="email" class="custom-align-right">
-              <el-input v-model="form.email" autocomplete="off" :disabled="creatNews_user_type !== '10000'" placeholder="请输入邮箱"></el-input>
+              <el-input v-model="form.email" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
+                placeholder="请输入邮箱"></el-input>
             </el-form-item>
             <!--公司信息  end-->
           </div>
@@ -214,7 +233,7 @@ export default {
       address_arr_id: [],//地址
       // company_hyid_array: [],//所属行业
       creatNews_user_type: '0',//判断用户类型'
-      
+
       form: {
         web_site_id: '',//站点名称
         user_type: "??",//判断用户类型'
@@ -280,13 +299,13 @@ export default {
         hy_id: [{ required: true, trigger: 'blur', validator: validateEmpty }],
         // 职位描述
         description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
-         // 具体要求
-         jt_description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+        // 具体要求
+        jt_description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
         // 截止日期
         due_data: [{ required: true, trigger: 'blur', validator: validateEmpty }],
 
 
-        
+
         // 公司名称
         business_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
         // 所属行业
@@ -311,7 +330,7 @@ export default {
       parentKey: 0,//获取父级导航
       webDpate: {
         checkStrictly: true,
-        lazy: true, 
+        lazy: true,
 
       },
       parentData: {
@@ -378,7 +397,7 @@ export default {
           })
         }
       },
-      
+
       inputList: [
         { value: '' }
       ]
@@ -398,30 +417,30 @@ export default {
     province_change(value) {
       this.form.city_id = ''; // 清空城市选择
       this.$store.dispatch('news/getJobRecruitingArea', { pid: value }).then(res => {
-        this.city_array = res.data; 
+        this.city_array = res.data;
       })
     },
     // 3.获取行业分类
     get_hyid(value) {
       this.$store.dispatch('news/getIndustry').then(res => {
-      this.hy_array = res.data;
-      }) 
+        this.hy_array = res.data;
+      })
     },
     // 4.获取职位类别
     get_zwid(value) {
       this.$store.dispatch('news/getPositionList').then(res => {
         this.zw_array = res.data;
-        
+
       })
     },
     zwid_change(value) {
       // 修改此处,确保传递的是正确的参数对象
       this.form.jtzw_id = ''; // 清空具体职位选择
       this.$store.dispatch('news/getPositionList', { zwpid: value }).then(res => {
-        this.jtzw_array = res.data; 
+        this.jtzw_array = res.data;
       })
     },
-    
+
     // 6.获取职位性质
     get_natureid(value) {
       this.$store.dispatch('news/getJobNature').then(res => {
@@ -476,7 +495,7 @@ export default {
         this.companynature_array = res.data;
       })
     },
-  //  15.获取地址
+    //  15.获取地址
     get_address_arr_id(value) {
       this.$store.dispatch('news/getJobRecruitingArea').then(res => {
         this.address_arr_id = res.data;
@@ -488,72 +507,72 @@ export default {
       this.$refs.form.validate(valid => {
         if (valid) {
           // if(this.creatNews_user_type === '10000'){
-            this.form.user_type = this.creatNews_user_type;
-            this.form.website_id = this.websiteid;
-           
-            if(this.form.province_id != '' && this.form.province_id != null && this.form.province_id != undefined){
-              this.form.city_arr_id[0] = this.form.province_id;
-            }else{
-              this.form.city_arr_id[0] = null;
-            }
-            if(this.form.city_id != '' && this.form.city_id != null && this.form.city_id != undefined){
-              this.form.city_arr_id[1] = this.form.city_id;
-            }else{
-              this.form.city_arr_id[1] = null;
-            }
-            if(this.form.due_data != '' && this.form.due_data != null && this.form.due_data != undefined){
-              this.form.due_data = formatLocalDate(this.form.due_data); 
-            }else{
-              this.form.due_data = null;
-            }
-            delete this.form.nav_add_pool_id;
-            delete this.form.province_id;
-            delete this.form.job_pronviceid;
-            delete this.form.city_id;
-            delete this.form.createjob_pronvice;
-            delete this.form.web_site_id;
-            this.$store.dispatch('news/addJobRecruiting', this.form).then(res => {
-              if (res.code == 200) { 
-                //汇报结果
-                this.$message({
-                  type: 'success',
-                  message: '已成功发布职位!'
-                });
-                this.cleatForm(2);
-                //返回列表页
-                this.returnPage()
-              } else {
-                this.$message({
-                  type: 'error',
-                  message: ": '发布失败!'.".this.$message
-                });
-              }
-            }).catch(() => {
+          this.form.user_type = this.creatNews_user_type;
+          this.form.website_id = this.websiteid;
+
+          if (this.form.province_id != '' && this.form.province_id != null && this.form.province_id != undefined) {
+            this.form.city_arr_id[0] = this.form.province_id;
+          } else {
+            this.form.city_arr_id[0] = null;
+          }
+          if (this.form.city_id != '' && this.form.city_id != null && this.form.city_id != undefined) {
+            this.form.city_arr_id[1] = this.form.city_id;
+          } else {
+            this.form.city_arr_id[1] = null;
+          }
+          if (this.form.due_data != '' && this.form.due_data != null && this.form.due_data != undefined) {
+            this.form.due_data = formatLocalDate(this.form.due_data);
+          } else {
+            this.form.due_data = null;
+          }
+          delete this.form.nav_add_pool_id;
+          delete this.form.province_id;
+          delete this.form.job_pronviceid;
+          delete this.form.city_id;
+          delete this.form.createjob_pronvice;
+          delete this.form.web_site_id;
+          this.$store.dispatch('news/addJobRecruiting', this.form).then(res => {
+            if (res.code == 200) {
+              //汇报结果
+              this.$message({
+                type: 'success',
+                message: '已成功发布职位!'
+              });
+              this.cleatForm(2);
+              //返回列表页
+              this.returnPage()
+            } else {
               this.$message({
-                type: 'info',
-                message: '网络错误,请重试!'
+                type: 'error',
+                message: ": '发布失败!'.".this.$message
               });
-            })
+            }
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '网络错误,请重试!'
+            });
+          })
           // }
         }
       })
     },
-    
+
     //1.3 清理表单
     cleatForm(type) {
       // if (type == 1) {
-        //使用了外链,进行部分表单清理
-        //this.form.cat_arr_id = "";
-        this.form.cat_arr_id = "";
-        this.form.province_id = "";
-        this.form.title = "";
-        this.form.zw_id = "";
-        this.form.jtzw_id = "";
-        this.form.nature_id = "";
-        this.form.city_id = "";
-        this.form.hy_id = "";
-        this.form.description = "";
-        this.form.due_data = "";
+      //使用了外链,进行部分表单清理
+      //this.form.cat_arr_id = "";
+      this.form.cat_arr_id = "";
+      this.form.province_id = "";
+      this.form.title = "";
+      this.form.zw_id = "";
+      this.form.jtzw_id = "";
+      this.form.nature_id = "";
+      this.form.city_id = "";
+      this.form.hy_id = "";
+      this.form.description = "";
+      this.form.due_data = "";
       // }
       if (this.creatNews_user_type == '10000') {
         //完全清理表单
@@ -589,45 +608,45 @@ export default {
     //跳转操作 end ------------------------------------------------------------>
 
     //3.回显操作 ------------------------------------------------------------>
-  //   //3.1回显数据
-  //3.1回显数据
-  getMainData() {
-    if(this.creatNews_user_type === '10000' || this.$route.query.id != undefined){
-      let data = {
-        id: this.$route.query.id
-      };
-      this.$store.dispatch('news/getJobRecruitingInfo', data).then(res => {
-        //判断web_site_id是否为字符串,如果是转换为数字、
-        //职位信息 
-        if (typeof res.data.web_site_id === 'string') {
-          this.form.web_site_id = Number(res.data.website_id);
-        } else {
-          this.form.web_site_id = res.data.website_id                           //站点名称
-        }
-        this.form.cat_arr_id = Array.isArray(res.data.cat_arr_id) ? res.data.cat_arr_id : JSON.parse(res.data.cat_arr_id);
-        this.parentKey_2 += 1; // 触发级联选择器重新加载
-        this.loadCascaderPath(this.form.cat_arr_id); // 加载路径数据
-        //回显行政区划
-        this.form.city_arr_id = Array.isArray(res.data.city_arr_id) ? res.data.city_arr_id : JSON.parse(res.data.city_arr_id);
-        
-        this.form.title = res.data.title;                                       //职位名称
-        
-        this.parentKey += 1; // 触发级联选择器重新加载
-        if (this.form.city_arr_id.length > 0) {
-          this.form.province_id = this.form.city_arr_id[0]?? '';
-          if (this.form.city_arr_id.length > 1) {
-            this.province_change(this.form.city_arr_id[0]);
-            this.form.city_id = this.form.city_arr_id[1]?? '';
-          }else{
-            let data = {
-              'pid': this.form.city_arr_id[0]
+    //   //3.1回显数据
+    //3.1回显数据
+    getMainData() {
+      if (this.creatNews_user_type === '10000' || this.$route.query.id != undefined) {
+        let data = {
+          id: this.$route.query.id
+        };
+        this.$store.dispatch('news/getJobRecruitingInfo', data).then(res => {
+          //判断web_site_id是否为字符串,如果是转换为数字、
+          //职位信息 
+          if (typeof res.data.web_site_id === 'string') {
+            this.form.web_site_id = Number(res.data.website_id);
+          } else {
+            this.form.web_site_id = res.data.website_id                           //站点名称
+          }
+          this.form.cat_arr_id = Array.isArray(res.data.cat_arr_id) ? res.data.cat_arr_id : JSON.parse(res.data.cat_arr_id);
+          this.parentKey_2 += 1; // 触发级联选择器重新加载
+          this.loadCascaderPath(this.form.cat_arr_id); // 加载路径数据
+          //回显行政区划
+          this.form.city_arr_id = Array.isArray(res.data.city_arr_id) ? res.data.city_arr_id : JSON.parse(res.data.city_arr_id);
+
+          this.form.title = res.data.title;                                       //职位名称
+
+          this.parentKey += 1; // 触发级联选择器重新加载
+          if (this.form.city_arr_id.length > 0) {
+            this.form.province_id = this.form.city_arr_id[0] ?? '';
+            if (this.form.city_arr_id.length > 1) {
+              this.province_change(this.form.city_arr_id[0]);
+              this.form.city_id = this.form.city_arr_id[1] ?? '';
+            } else {
+              let data = {
+                'pid': this.form.city_arr_id[0]
+              }
+              this.$store.dispatch('news/getJobRecruitingArea', data).then(res => {
+                this.city_id = res.data;
+              })
             }
-            this.$store.dispatch('news/getJobRecruitingArea',data ).then(res => {
-              this.city_id = res.data;
-            })
           }
-        }
-        
+
           this.form.hy_id = res.data.hy_id;                //行业分类
           this.form.zw_id = res.data.zw_id;                //职位类别
           this.zwid_change(this.form.zw_id);
@@ -655,49 +674,49 @@ export default {
           this.form.address = res.data.address;
           this.form.address_arr_id = Array.isArray(res.data.address_arr_id) ? res.data.address_arr_id : JSON.parse(res.data.address_arr_id);
           this.form.email = res.data.email;
-        this.inputList = [];
-        console.log(this.inputList)
-      })
-    }else{
-      this.$store.dispatch('news/getJobCompany').then(res => {
-        // 企业信息
-        this.form.business_name = res.data.business_name;
-        this.form.company_hy_id = res.data.company_hy_id;
-        this.form.company_size = res.data.company_size;
-        this.form.company_nature = res.data.company_nature;
-        this.form.introduction = res.data.introduction;
-        this.form.real_name = res.data.real_name;
-        this.form.mobile = res.data.mobile;
-        this.form.company_url = res.data.company_url;
-        this.form.address = res.data.address;
-        this.form.address_arr_id = Array.isArray(res.data.address_arr_id) ? res.data.address_arr_id : JSON.parse(res.data.address_arr_id);
-        this.form.email = res.data.email;
-        this.inputList = [];
-      })
-    }     
-  
-  },
-  async loadCascaderPath(path) {
-    for (let i = 0; i < path.length; i++) {
-      const parentId = path[i - 1] || 0; // 获取当前层级的父级ID
-      const level = i; // 当前层级的索引
-
-      await this.$store.dispatch('pool/categoryList', { pid: parentId })
-        .then((res) => {
-          const nodes = res.data.map(item => ({
-            value: item.id,
-            label: item.name,
-            leaf: level >= 3, // 假设4层结构,设置叶子节点标记
-          }));
-
-          // 级联选择器加载数据
-          if (level === path.length - 1) {
-            this.form.cat_arr_id = path; // 确保最后一级路径正确设置
-            this.parentKey += 1; // 强制刷新 cascader
-          }
-        });
-    }
-  },
+          this.inputList = [];
+          console.log(this.inputList)
+        })
+      } else {
+        this.$store.dispatch('news/getJobCompany').then(res => {
+          // 企业信息
+          this.form.business_name = res.data.business_name;
+          this.form.company_hy_id = res.data.company_hy_id;
+          this.form.company_size = res.data.company_size;
+          this.form.company_nature = res.data.company_nature;
+          this.form.introduction = res.data.introduction;
+          this.form.real_name = res.data.real_name;
+          this.form.mobile = res.data.mobile;
+          this.form.company_url = res.data.company_url;
+          this.form.address = res.data.address;
+          this.form.address_arr_id = Array.isArray(res.data.address_arr_id) ? res.data.address_arr_id : JSON.parse(res.data.address_arr_id);
+          this.form.email = res.data.email;
+          this.inputList = [];
+        })
+      }
+
+    },
+    async loadCascaderPath(path) {
+      for (let i = 0; i < path.length; i++) {
+        const parentId = path[i - 1] || 0; // 获取当前层级的父级ID
+        const level = i; // 当前层级的索引
+
+        await this.$store.dispatch('pool/categoryList', { pid: parentId })
+          .then((res) => {
+            const nodes = res.data.map(item => ({
+              value: item.id,
+              label: item.name,
+              leaf: level >= 3, // 假设4层结构,设置叶子节点标记
+            }));
+
+            // 级联选择器加载数据
+            if (level === path.length - 1) {
+              this.form.cat_arr_id = path; // 确保最后一级路径正确设置
+              this.parentKey += 1; // 强制刷新 cascader
+            }
+          });
+      }
+    },
     //1.3提交修改
     editToServe() {
       //添加要修改的id
@@ -708,8 +727,8 @@ export default {
       this.$refs.form.validate(valid => {
         if (valid) {
           this.form.city_arr_id[0] = this.form.province_id;
-          if(this.form.city_id!= '' && this.form.city_id!= null && this.form.city_id!= undefined){
-            this.form.city_arr_id[1] = this.form.city_id; 
+          if (this.form.city_id != '' && this.form.city_id != null && this.form.city_id != undefined) {
+            this.form.city_arr_id[1] = this.form.city_id;
           }
           // 假设你有一个 JSON 字符串变量 jsonStr,这里将其转换为数组
           try {
@@ -808,7 +827,7 @@ export default {
   mounted() {
     this.creatNews_user_type = getUseType()
     this.websiteid = getWebSiteId()
-    if(this.creatNews_user_type !== '10000'){
+    if (this.creatNews_user_type !== '10000') {
       this.form.web_site_id = this.websiteid;
       // console.log("this.form.web_site_id==",this.form.web_site_id)
     }
@@ -838,16 +857,25 @@ export default {
       this.getMainData();
     } else {
       this.editStatus = false;
-      console.log(typeof(this.creatNews_user_type))
-      if(this.creatNews_user_type === '3'){
+      console.log(typeof (this.creatNews_user_type))
+      if (this.creatNews_user_type === '3') {
         this.getMainData();
-        console.log("添加新闻!",this.creatNews_user_type)
+        console.log("添加新闻!", this.creatNews_user_type)
       }
     }
 
-    
+
 
   },
+  watch: {
+    '$route'(to, from) {
+      console.log(from, '---------------------------------------');
+      // 监听路由参数中的 id 变化,若变化则更新页面状态并获取数据
+      if (to.query.id) {
+        this.getMainData();
+      }
+    },
+  }
 };
 </script>
 
@@ -930,19 +958,21 @@ export default {
 .ql-indent-8 {
   padding-left: 128px;
 }
-#company_list{
+
+#company_list {
   height: 500px;
   overflow: auto;
   padding: 20px 50px;
 }
-#company_list .descriptions{
+
+#company_list .descriptions {
   line-height: 36px;
   font-size: 16px;
   color: #606266;
   font-weight: bold;
   padding-left: 30px;
   width: 500px;
-  margin-right:200px;
+  margin-right: 200px;
   background-color: aquamarine;
 }
 

+ 7 - 0
src/views/news/addJobHunting.vue

@@ -1080,6 +1080,13 @@ export default {
     }
   },
   watch: {
+    '$route'(to, from) {
+      console.log(from, '---------------------------------------');
+      // 监听路由参数中的 id 变化,若变化则更新页面状态并获取数据
+      if (to.query.id) {
+        this.getMainData();
+      }
+    },
     'form.job_experience': {
       handler(newVal, oldVal) {
         newVal.forEach((item, index) => {