소스 검색

招聘信息上下架功能

yanliming 1 년 전
부모
커밋
440f7efc43
2개의 변경된 파일34개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 1
      src/api/base/recruitInformationInfo.js
  2. 28 1
      src/views/base/recruitInformationInfo-list.vue

+ 6 - 1
src/api/base/recruitInformationInfo.js

@@ -46,7 +46,12 @@ function check(id) {
   return request.post(constant.serverUrl + "/base/recruitInformationInfo/check/" + id);
 }
 
+function changeIsOnline(id) {
+  return request.post(constant.serverUrl + "/base/recruitInformationInfo/changeIsOnline/" + id);
+}
+
+
 
 export default {
-  pageList, create, edit, add, update, remove, batchRemove,check
+  pageList, create, edit, add, update, remove, batchRemove,check,changeIsOnline
 }

+ 28 - 1
src/views/base/recruitInformationInfo-list.vue

@@ -119,7 +119,17 @@
             <span v-else-if="row.status=='1'" style="color: #67C23A;">已审核</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作"  fixed="right"  width="330">
+        <el-table-column  prop="status"  label="是否上架">
+          <template slot-scope="{row}">
+            <span v-if="row.isOnline">
+              <el-link type="success" @click="handleChangeIsOnline(row)">上架</el-link>
+            </span>
+            <span v-else>
+              <el-link type="info" @click="handleChangeIsOnline(row)">下架</el-link>
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作"  fixed="right"  width="350">
           <template slot-scope="{row}">
             <el-button class="btu1" size="mini" type="warning" @click="handleEdit(row)">编辑</el-button>
             <el-button class="btu1" v-if="row.status=='0'" size="mini" type="primary" @click="handleCheck(row)">审核</el-button>
@@ -401,6 +411,23 @@
           });
         });
       },
+      handleChangeIsOnline(record){
+        var self = this;
+
+        recruitInformationInfoApi.changeIsOnline(record.id).then(function(response) {
+          var jsonData = response.data;
+
+          if (jsonData.result) {
+            self.changePage(self.pageIndex);
+
+            self.$message({
+              type: "success",
+              message: "修改成功!"
+            });
+          }
+        });
+
+      },
       handleDelete(record) {
         var self = this;