Kaynağa Gözat

云塑关于我们——职位管理

ZhouRuiTing 5 yıl önce
ebeveyn
işleme
f05e1e5b26

+ 2 - 2
official_frontend/src/utils/request.js

@@ -7,8 +7,8 @@ import { getToken } from '@/utils/auth'
 const service = axios.create({
     // url = base url + request url
     // baseURL: process.env.VUE_APP_BASE_API,
-    baseURL: "http://111.231.87.63:8088",
-    // baseURL: "http://192.168.5.184:8098",
+    // baseURL: "http://111.231.87.63:8088",
+    baseURL: "http://192.168.5.184:8098",
     // withCredentials: true, // send cookies when cross-domain requests
     timeout: 5000 // request timeout
 })

+ 3 - 3
official_frontend/src/views/about/position.vue

@@ -15,7 +15,7 @@
                     <el-link type="primary" :underline="false" @click="showAll(scope.$index)">查看全文</el-link>
                 </template>
             </el-table-column>
-            <el-table-column prop="publishTime" label="创建时间" width="150"></el-table-column>
+            <el-table-column prop="publishTime" label="发布日期" width="150"></el-table-column>
             <el-table-column label="操作" width="180">
                 <template slot-scope="scope">
                     <el-button size="small" @click="openDialog(true, scope.$index)" :loading="loading">编辑</el-button>
@@ -25,8 +25,8 @@
         </el-table>
 
         <!-- 添加和编辑的dialog -->
-        <el-dialog title="首页标签" :visible.sync="addDialogVisible" width="600px">
-            {{detail}}
+        <el-dialog title="职位信息" :visible.sync="addDialogVisible" width="600px">
+            <p v-html='detail'></p>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="addDialogVisible = false">取消</el-button>
             </span>

+ 9 - 26
official_frontend/src/views/about/positionEdit.vue

@@ -2,9 +2,9 @@
     <div class="app-container">
         <el-form ref="form" :model="cooperationsForm" :rules="rules" label-width="100px">
             <el-form-item label="职位名称" prop="title">
-                <el-input v-model="cooperationsForm.title" placeholder="请输入客户名称" clearable></el-input>
+                <el-input v-model="cooperationsForm.title" placeholder="请输入职位名称" clearable></el-input>
             </el-form-item>
-            <el-form-item label="职位图片" prop="image">
+            <el-form-item label="职位图片" required>
                 <el-upload ref="upload" action="customize" :http-request="uploadDiscardFile" :limit="1" :before-remove="beforeRemove">
                     <el-button size="small" type="primary" :loading="loading">上传一张图片</el-button>
                 </el-upload>
@@ -45,35 +45,18 @@
             };
         },
         methods: {
-            //打开对话框
-            openDialog(isEdit, index) {
-                this.editing = isEdit;
-                if (this.editing) {
-                    this.cooperationsForm.id = this.cooperations[index].id;
-                    this.cooperationsForm.title = this.cooperations[index].companyName;
-                    this.cooperationsForm.title1 = this.cooperations[index].companyName;
-                    this.cooperationsForm.introduction = this.cooperations[index].description;
-                    this.cooperationsForm.image = null;
-                } else {
-                    this.cooperationsForm.id = null;
-                    this.cooperationsForm.title = "";
-                    this.cooperationsForm.title1 = "";
-                    this.cooperationsForm.introduction = "";
-                    this.cooperationsForm.image = null;
-                }
-            },
-
             //获取合作信息
             getCooperations() {
-                this.loading = true;
                 request({
-                    url: "/feedback/listFeedback",
+                    url: "/recruitment/get",
                     method: "post",
-                    params: {pageIndex:1,pageSize: 9999999}
+                    params: {id: this.id}
                 })
                 .then(response => {
-                    this.cooperations = response.data;
-                    this.loading = false;
+                    this.cooperationsForm.id = response.data.id;
+                    this.cooperationsForm.title = response.data.title;
+                    this.cooperationsForm.introduction = response.data.content;
+                    this.cooperationsForm.image = null;
                 })
                 .catch(error => {
                     this.$message({
@@ -93,7 +76,7 @@
                         form.append("title", this.cooperationsForm.title);
                         form.append("content", this.cooperationsForm.introduction);
                         if (this.cooperationsForm.image == null && this.editing == false) {
-                            this.loading =false;
+                            this.loading = false;
                             this.$message({
                                 message: "尚未上传图片",
                                 type: "error"