lsw 11 달 전
부모
커밋
37a63c3f72

+ 2 - 2
admin-ui/src/views/work/banner/index.vue

@@ -10,10 +10,10 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="图片" align="center" prop="pic">
         <template slot-scope="scope">
-          <el-image class="p_img" style="height: 50px;background-color: aliceblue;" :fit="'contain'" :src="baseUrl + scope.row.pic" :preview-src-list="[baseUrl + scope.row.pic]"></el-image>
+          <el-image class="p_img" style="height: 45px;background-color: aliceblue;" :fit="'contain'" :src="baseUrl + scope.row.pic" :preview-src-list="[baseUrl + scope.row.pic]"></el-image>
         </template>
       </el-table-column>
-      <el-table-column label="跳转文章链接" align="center" prop="contentTitle" v-if="queryParams.types == '新闻'" />
+      <el-table-column label="跳转文章链接" align="center" prop="contentTitle"/>
       <el-table-column label="显示顺序" align="center" prop="orderNum" width="130" />
       <el-table-column label="状态" align="center" prop="state" width="130">
         <template slot-scope="scope">

+ 97 - 120
admin-ui/src/views/work/position/edit.vue

@@ -1,119 +1,87 @@
 <template>
   <div class="cmain">
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="关联账号" prop="userId">
-          <el-input v-model="form.userId" placeholder="请输入关联账号" clearable/>
-        </el-form-item>
-        <el-form-item label="封面" prop="pic">
-          <el-input v-model="form.pic" placeholder="请输入封面" clearable/>
-        </el-form-item>
-        <el-form-item label="职位名称" prop="title">
-          <el-input v-model="form.title" placeholder="请输入职位名称" clearable/>
-        </el-form-item>
-        <el-form-item label="职位要求" prop="contents">
-          <el-input v-model="form.contents" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-        <el-form-item label="职位分类id" prop="positionId">
-          <el-input v-model="form.positionId" placeholder="请输入职位分类id" clearable/>
-        </el-form-item>
-        <el-form-item label="职位分类名称" prop="positionName">
-          <el-input v-model="form.positionName" placeholder="请输入职位分类名称" clearable/>
-        </el-form-item>
-        <el-form-item label="经验要求" prop="experience">
-          <el-input v-model="form.experience" placeholder="请输入经验要求" clearable/>
-        </el-form-item>
-        <el-form-item label="薪资范围" prop="salary">
-          <el-input v-model="form.salary" placeholder="请输入薪资范围" clearable/>
-        </el-form-item>
-        <el-form-item label="最小薪资" prop="min">
-          <el-input v-model="form.min" placeholder="请输入最小薪资" clearable/>
-        </el-form-item>
-        <el-form-item label="最大薪资" prop="max">
-          <el-input v-model="form.max" placeholder="请输入最大薪资" clearable/>
-        </el-form-item>
-        <el-form-item label="职位关键字" prop="tags">
-          <el-input v-model="form.tags" placeholder="请输入职位关键字" clearable/>
-        </el-form-item>
-        <el-form-item label="城市名称" prop="cityName">
-          <el-input v-model="form.cityName" placeholder="请输入城市名称" clearable/>
-        </el-form-item>
-        <el-form-item label="地区名称" prop="regionName">
-          <el-input v-model="form.regionName" placeholder="请输入地区名称" clearable/>
-        </el-form-item>
-        <el-form-item label="地点名" prop="location">
-          <el-input v-model="form.location" placeholder="请输入地点名" clearable/>
-        </el-form-item>
-        <el-form-item label="详细地址" prop="address">
-          <el-input v-model="form.address" placeholder="请输入详细地址" clearable/>
-        </el-form-item>
-        <el-form-item label="楼层/单元室/门牌号" prop="mph">
-          <el-input v-model="form.mph" placeholder="请输入楼层/单元室/门牌号" clearable/>
-        </el-form-item>
-        <el-form-item label="经度" prop="longitude">
-          <el-input v-model="form.longitude" placeholder="请输入经度" clearable/>
-        </el-form-item>
-        <el-form-item label="维度" prop="latitude">
-          <el-input v-model="form.latitude" placeholder="请输入维度" clearable/>
-        </el-form-item>
-        <el-form-item label="职位状态" prop="state">
-          <el-input v-model="form.state" placeholder="请输入职位状态" clearable/>
-        </el-form-item>
-        <el-form-item label="职位审核" prop="audit">
-          <el-input v-model="form.audit" placeholder="请输入职位审核" clearable/>
-        </el-form-item>
-        <el-form-item label="开始时间" prop="startDate">
-          <el-date-picker clearable
-            v-model="form.startDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择开始时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="结束时间" prop="endDate">
-          <el-date-picker clearable
-            v-model="form.endDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择结束时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createTime">
-          <el-date-picker clearable
-            v-model="form.createTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="更新时间" prop="updateTime">
-          <el-date-picker clearable
-            v-model="form.updateTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择更新时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="审核备注" prop="rejectDesc">
-          <el-input v-model="form.rejectDesc" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-      </el-form>
-    <div class="mfooter">
-      <el-button type="primary" @click="submitForm">确 定</el-button>
+    <el-form ref="form" :model="form" :disabled="param.detail || param.audit" :rules="rules" label-width="100px">
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="职位名称" prop="title">
+            <el-input v-model="form.title" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="发布企业" prop="enterpriseName">
+            <el-input v-model="form.enterpriseName">
+              <template slot="append"><span class="pon" @click="op('enterprise', form)">详情</span></template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="工作类型" prop="type">
+            <el-input :value="form.type == 0 ? '全职' : '兼职'" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="职位分类" prop="positionName">
+            <el-input v-model="form.positionName" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="经验要求" prop="experience">
+            <el-input v-model="form.experience" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="薪资范围" prop="salary">
+            <el-input v-model="form.salary" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="城市名称" prop="cityName">
+            <el-input v-model="form.cityName" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="地区名称" prop="regionName">
+            <el-input v-model="form.regionName" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="详细地址" prop="address">
+            <el-input v-model="form.regionName" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="职位状态" prop="state">
+            <el-input :value="form.state == 0 ? '启用' : '关闭'" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-form-item label="职位要求">
+        <div v-html="form.contents" style="color: #808080; background-color: #f5f7fa; padding: 15px; border-radius: 7px; border: 1px solid #dfe4ed"></div>
+      </el-form-item>
+    </el-form>
+    <div class="mfooter" v-if="!param.detail">
+      <el-button type="primary" @click="submitForm(1)">审核通过</el-button>
+      <el-button type="danger" @click="submitForm(2)">不通过</el-button>
       <el-button @click="$layer.close(layerid)">取 消</el-button>
     </div>
   </div>
 </template>
 
 <script>
+import enterprise from '@/views/work/enterprise/edit.vue';
 export default {
   data() {
     return {
       form: {},
-      rules: {
-        type: [
-          { required: true, message: "类型: 0全职 1兼职不能为空", trigger: "change" }
-        ],
-      }
+      rules: {}
     };
   },
   props: {
@@ -129,28 +97,37 @@ export default {
   },
   mounted() {
     if (this.param.id) {
-      this.ajax({ url: '/work/position/detail/' + this.param.id }).then(response => {
+      this.ajax({ url: '/work/position/detail/' + this.param.id }).then((response) => {
         this.form = response.data;
       });
     }
   },
   methods: {
-    submitForm() {
-      this.$refs["form"].validate(valid => {
+    op(tag, row) {
+      if (tag == 'enterprise') {
+        this.iframe({ obj: enterprise, param: { id: row.userId, detail: true }, title: '企业详情', width: '50%', height: '65%' });
+      }
+    },
+    submitForm(audit) {
+      this.$refs['form'].validate((valid) => {
         if (valid) {
-          if (this.form.id) {
-              this.ajax({method: 'post',url: '/work/position/edit', data: this.form }).then(response => {
-                  this.$modal.msgSuccess("修改成功");
-                  this.$layer.close(this.layerid);
-                  this.$parent.getList();
-              });
-          } else {
-              this.ajax({method: 'post',url: '/work/position/add', data: this.form }).then(response => {
-                  this.$modal.msgSuccess("新增成功");
-                  this.$layer.close(this.layerid);
-                  this.$parent.getList();
-               });
-          }
+          this.$prompt('确认审核通过?', {
+            type: 'warning',
+            showInput: audit == 1 ? false : true,
+            inputType: 'textarea',
+            inputPlaceholder: '请输入审核不通过原因',
+            inputValidator: (value) => {
+              if (!value && audit == 2) {
+                return '请输入审核不通过原因';
+              }
+            }
+          }).then(({ value }) => {
+            this.post({ url: '/work/position/edit', data: { id: this.form.id, audit: audit, msg: value } }).then((response) => {
+              this.$modal.msgSuccess('操作成功');
+              this.$layer.close(this.layerid);
+              this.$parent.getList();
+            });
+          });
         }
       });
     }

+ 87 - 54
admin-ui/src/views/work/position/index.vue

@@ -1,8 +1,24 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent v-show="showSearch">
-      <el-form-item label="关联账号" prop="userId">
-        <el-input v-model="queryParams.userId" placeholder="请输入关联账号" @keyup.enter.native="handleQuery" clearable class="inp" />
+      <el-form-item label="关键字搜索" prop="title">
+        <el-input v-model="queryParams.title" placeholder="请输入职位名称或发布企业" @keyup.enter.native="handleQuery" clearable />
+      </el-form-item>
+      <el-form-item label="工作类型" prop="type">
+        <el-select v-model="queryParams.type" placeholder="请选择" class="se" clearable>
+          <el-option value="0" label="全职"></el-option>
+          <el-option value="1" label="兼职"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="审核状态" prop="audit">
+        <el-select v-model="queryParams.audit" placeholder="状态" class="se" clearable>
+          <el-option value="0" label="待审核"></el-option>
+          <el-option value="1" label="审核通过"></el-option>
+          <el-option value="2" label="审核不通过"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="发布日期">
+        <el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@@ -10,42 +26,68 @@
       </el-form-item>
     </el-form>
     <el-row :gutter="10" class="mb8">
-      <el-button type="primary" icon="el-icon-plus" :disabled="ids.length > 0" @click="op('add')" v-hasPermi="['work:position:add']">新增</el-button>
-      <el-button type="success" icon="el-icon-edit" :disabled="ids.length != 1" @click="op('edit', ids)" v-hasPermi="['work:position:edit']">修改</el-button>
       <el-button type="danger" icon="el-icon-delete" :disabled="ids.length == 0" @click="del" v-hasPermi="['work:position:remove']">删除{{ ids.length > 0 ? '(' + ids.length + ')' : '' }}</el-button>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="id" align="center" prop="id" />
-      <el-table-column label="关联账号" align="center" prop="userId" />
-      <el-table-column label="封面" align="center" prop="pic" />
-      <el-table-column label="类型: 0全职 1兼职" align="center" prop="type" />
-      <el-table-column label="职位名称" align="center" prop="title" />
-      <el-table-column label="职位要求" align="center" prop="contents" />
-      <el-table-column label="职位分类id" align="center" prop="positionId" />
-      <el-table-column label="职位分类名称" align="center" prop="positionName" />
+      <el-table-column label="职位名称" align="center" prop="title" width="150" />
+      <el-table-column label="发布企业" align="center" prop="enterpriseName" width="270">
+        <template slot-scope="scope">
+          <div class="pon" @click="op('enterprise', scope.row)">{{ scope.row.enterpriseName }}</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="工作类型" align="center" prop="type">
+        <template slot-scope="scope">
+          <el-tag type="success" v-if="scope.row.type == 0">全职</el-tag>
+          <el-tag type="warning" v-if="scope.row.type == 1">兼职</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="职位分类" align="center" prop="positionName" width="120" />
       <el-table-column label="经验要求" align="center" prop="experience" />
       <el-table-column label="薪资范围" align="center" prop="salary" />
-      <el-table-column label="最小薪资" align="center" prop="min" />
-      <el-table-column label="最大薪资" align="center" prop="max" />
-      <el-table-column label="职位关键字" align="center" prop="tags" />
       <el-table-column label="城市名称" align="center" prop="cityName" />
-      <el-table-column label="地区ancestors" align="center" prop="ancestors" />
       <el-table-column label="地区名称" align="center" prop="regionName" />
-      <el-table-column label="地点名" align="center" prop="location" />
-      <el-table-column label="详细地址" align="center" prop="address" />
-      <el-table-column label="楼层/单元室/门牌号" align="center" prop="mph" />
-      <el-table-column label="经度" align="center" prop="longitude" />
-      <el-table-column label="维度" align="center" prop="latitude" />
-      <el-table-column label="职位状态" align="center" prop="state" />
-      <el-table-column label="职位审核" align="center" prop="audit" />
-      <el-table-column label="审核备注" align="center" prop="rejectDesc" />
-      <el-table-column label="状态 (0关闭 1已发布任务 2已接单 3业主已选中 4任务开始 5验收 6付款)" align="center" prop="status" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="详细地址" align="center" prop="address" width="150">
+        <template slot-scope="scope">
+          <el-popover placement="top-start" title="详细地址" width="300" trigger="hover" :content="scope.row.address + '-' + scope.row.mph">
+            <div slot="reference">
+              <div class="omit">{{ scope.row.address }}-{{ scope.row.mph }}</div>
+            </div>
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column label="是否推荐" align="center" prop="recommend" width="80">
         <template slot-scope="scope">
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:position:edit']">修改</el-button>
+          <el-tag type="info" v-if="scope.row.recommend == 0">否</el-tag>
+          <el-tag type="success" v-if="scope.row.recommend == 1">是</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="职位状态" align="center" prop="state" width="80">
+        <template slot-scope="scope">
+          <el-tag type="success" v-if="scope.row.state == 0">启用</el-tag>
+          <el-tag type="danger" v-if="scope.row.state == 1">关闭</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="职位审核" align="center" width="120">
+        <template slot-scope="scope">
+          <el-tag type="info" v-if="scope.row.audit == 0">待审核</el-tag>
+          <el-tag type="success" v-if="scope.row.audit == 1">审核通过</el-tag>
+          <el-popover placement="top-start" v-if="scope.row.audit == 2" title="拒绝原因" width="300" trigger="hover" :content="scope.row.msg">
+            <div slot="reference">
+              <el-tag type="info">审核不通过</el-tag>
+              <i class="el-icon-warning"></i>
+            </div>
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column label="发布时间" align="center" prop="createTime" width="160" />
+      <el-table-column label="操作" align="center" fixed="right" width="180">
+        <template slot-scope="scope">
+          <el-button size="mini" type="text" icon="el-icon-view" @click="op('detail', scope.row)">详情</el-button>
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="op('audit', scope.row)" v-hasPermi="['work:position:edit']" v-if="scope.row.audit == 0">审核</el-button>
+          <el-button size="mini" type="text" icon="el-icon-sell" @click="op('recommend', scope.row)" v-hasPermi="['work:position:recommend']" v-if="scope.row.audit == 1">推荐</el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:position:remove']">删除</el-button>
         </template>
       </el-table-column>
@@ -59,6 +101,8 @@
 
 <script>
 import edit from './edit';
+import recommend from './recommend';
+import enterprise from '@/views/work/enterprise/edit.vue';
 export default {
   name: 'Position',
   data() {
@@ -66,35 +110,13 @@ export default {
       ids: [],
       showSearch: true,
       response: {},
+      dateRange: [],
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        userId: null,
-        pic: null,
         type: null,
         title: null,
-        contents: null,
-        positionId: null,
-        positionName: null,
-        experience: null,
-        salary: null,
-        min: null,
-        max: null,
-        tags: null,
-        cityName: null,
-        ancestors: null,
-        regionName: null,
-        location: null,
-        address: null,
-        mph: null,
-        longitude: null,
-        latitude: null,
-        state: null,
         audit: null,
-        startDate: null,
-        endDate: null,
-        rejectDesc: null,
-        status: null,
         orderByColumn: 'id',
         isAsc: 'desc'
       }
@@ -105,6 +127,10 @@ export default {
   },
   methods: {
     getList() {
+      if (this.dateRange) {
+        this.queryParams.dateBegin = this.dateRange[0];
+        this.queryParams.dateEnd = this.dateRange[1];
+      }
       this.ajax({ url: '/work/position/list', data: this.queryParams }).then((response) => {
         this.response = response;
       });
@@ -115,18 +141,25 @@ export default {
     },
     resetQuery() {
       this.resetForm('queryForm');
+      this.dateRange = [];
       this.handleQuery();
     },
     selects(rows) {
       this.ids = rows.map((item) => item.id);
     },
     op(tag, row) {
-      if (tag == 'add') {
-        this.iframe({ obj: edit, param: {}, title: '新增', width: '45%', height: '55%' });
+      if (tag == 'enterprise') {
+        this.iframe({ obj: enterprise, param: { id: row.userId, detail: true }, title: '企业详情', width: '50%', height: '65%' });
+      }
+      if (tag == 'recommend') {
+        this.iframe({ obj: recommend, param: { id: row.id }, title: '设为推荐', width: '25%', height: '35%' });
+      }
+      if (tag == 'detail') {
+        this.iframe({ obj: edit, param: { id: row.id, detail: true }, title: '职位详情', width: '45%', height: '70%' });
       }
-      if (tag == 'edit') {
+      if (tag == 'audit') {
         const id = row.id || this.ids[0];
-        this.iframe({ obj: edit, param: { id: id }, title: '编辑', width: '50%', height: '50%' });
+        this.iframe({ obj: edit, param: { id: id, audit: true }, title: '职位审核', width: '45%', height: '70%' });
       }
     },
     del(row) {

+ 62 - 0
admin-ui/src/views/work/position/recommend.vue

@@ -0,0 +1,62 @@
+<template>
+  <div class="cmain">
+    <el-form ref="form" :model="form" :disabled="param.detail || param.audit" :rules="rules" label-width="100px">
+      <el-form-item label="设为推荐" prop="recommend">
+        <el-select v-model="form.recommend" placeholder="请选择">
+          <el-option label="设置" :value="1"></el-option>
+          <el-option label="取消" :value="0"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="图片封面" prop="pic" v-if="form.recommend == 1"><cropper v-model="form.pic" :fixed_number="[2, 1.32]"></cropper></el-form-item>
+    </el-form>
+    <div class="mfooter">
+      <el-button type="primary" @click="submitForm()">确定</el-button>
+      <el-button @click="$layer.close(layerid)">取 消</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      form: { recommend: 1 },
+      rules: {
+        recommend: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        pic: [{ required: true, message: '封面图不能为空', trigger: 'blur' }]
+      }
+    };
+  },
+  props: {
+    param: {
+      type: Object,
+      default: () => {
+        return {};
+      }
+    },
+    layerid: {
+      type: String
+    }
+  },
+  mounted() {
+    if (this.param.id) {
+      this.ajax({ url: '/work/position/detail/' + this.param.id }).then((response) => {
+        this.form = response.data;
+      });
+    }
+  },
+  methods: {
+    submitForm(audit) {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          this.ajax({ method: 'post', url: '/work/position/edit', data: this.form }).then((response) => {
+            this.$modal.msgSuccess('修改成功');
+            this.$layer.close(this.layerid);
+            this.$parent.getList();
+          });
+        }
+      });
+    }
+  }
+};
+</script>

+ 1 - 1
app/App.vue

@@ -30,7 +30,7 @@ button::after {
 /**挂载iconfont字体图标*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/c/font_4507607_rrzirqvsaxe.ttf?t=1718485758759') format('truetype');
+	src: url('https://at.alicdn.com/t/c/font_4507607_mybvdfcho37.ttf?t=1718616245217') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 54 - 1
app/common/common.scss

@@ -173,7 +173,6 @@
 					color: white;
 					border-radius: 18px;
 					line-height: 47px;
-					box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
 				}
 				.title {
 					font-size: 14px;
@@ -216,6 +215,7 @@
 }
 .search {
 	overflow: hidden;
+	padding-top: 5px;
 	.usearch {
 		float: left;
 		width: 75%;
@@ -291,6 +291,59 @@
 		margin-top: 13px;
 	}
 }
+.job{
+	margin-left: -5px;
+	margin-right: -5px;
+	margin-top: 5px;
+	.full_time {
+		float: left;
+		width: 50%;
+		.out {
+			padding: 6px;
+			.int {
+				padding: 10px;
+				background-color: white;
+				overflow: hidden;
+				border-radius: 7px;
+				box-shadow: $box-shadow;
+				image {
+					width: 100%;
+					height: 100px;
+				}
+				.title {
+					font-size: 14px;
+					padding-top: 3px;
+					font-weight: bold;
+				}
+				.desc {
+					font-size: 13px;
+					padding-top: 3px;
+				}
+				.price {
+					padding-top: 3px;
+					font-size: 14px;
+					font-weight: bold;
+					color: #ff5722;
+				}
+				.address {
+					padding-top: 3px;
+					font-size: 13px;
+					color: $font-c;
+					width: 40%;
+					float: left;
+				}
+				.distance {
+					float: right;
+					font-size: 13px;
+					color: $font-c;
+					padding-top: 3px;
+					width: 60%;
+					text-align: right;
+				}
+			}
+		}
+	}
+}
 /**简历******/
 .resume {
 	padding: 15px;

+ 40 - 0
app/components/jobIndex/jobIndex.vue

@@ -0,0 +1,40 @@
+<template>
+	<view class="job">
+		<view class="full_time" v-for="(item, index) in list" :key="index" @click="go('/pages/job/detail?id=' + item.id)">
+			<view class="out">
+				<view class="int">
+					<image :src="ip + item.pic" mode="aspectFill"></image>
+					<view class="title omit">{{ item.title }}</view>
+					<view class="desc">{{ item.job }}</view>
+					<view class="price" v-if="item.type == 0">{{ item.salary }}/月</view>
+					<view class="price" v-if="item.type == 1">{{ item.salary }}/日</view>
+					<view class="address omit">{{ item.regionName || '不限地点' }}</view>
+					<view class="distance omit" v-if="item.distance">距离你{{ item.distance }}km</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'jobIndex',
+	props: {
+		list: {
+			type: Array
+		}
+	},
+	data() {
+		return {
+			ip: this.http.ip
+		};
+	},
+	methods: {
+		go(url) {
+			uni.navigateTo({ url: url });
+		}
+	}
+};
+</script>
+
+<style lang="scss"></style>

+ 13 - 42
app/pages/index/index.vue

@@ -14,47 +14,12 @@
 		<view class="banner">
 			<u-swiper circular :radius="5" :indicator="true" keyName="pic" :list="bannerList" :height="160" class="uni-swiper" @click="click"></u-swiper>
 		</view>
-		<!--菜单-->
-		<view class="menu">
-			<view class="cd" @click="go('/pages/job/map')">
-				<view class="out">
-					<view class="int">
-						<view class="icon" style="background-color: #03a9f4">&#xe647;</view>
-						<view class="title">地图找工</view>
-					</view>
-				</view>
-			</view>
-			<view class="cd" @click="go('/pages/job/list?type=0')">
-				<view class="out">
-					<view class="int">
-						<view class="icon" style="background-color: #4581fb">&#xe9d9;</view>
-						<view class="title">全职</view>
-					</view>
-				</view>
-			</view>
-			<view class="cd" @click="go('/pages/job/list?type=1')">
-				<view class="out">
-					<view class="int">
-						<view class="icon" style="background-color: #ff5722">&#xe62a;</view>
-						<view class="title">兼职</view>
-					</view>
-				</view>
-			</view>
-			<view class="cd" @click="go('/pages/job/enterprise/card')">
-				<view class="out">
-					<view class="int">
-						<view class="icon" style="background-color: #03a9f4">&#xe725;</view>
-						<view class="title">企业卡片</view>
-					</view>
-				</view>
-			</view>
-		</view>
 		<view class="tab">
-			<u-tabs :list="tab" @click="tabClick"></u-tabs>
+			<u-tabs :scrollable="false" :inactiveStyle="{ fontSize: '17px' }" :activeStyle="{ color: '#3c9cff', fontSize: '17px' }" :list="tab" @click="tabClick"></u-tabs>
 		</view>
 		<!--职位列表-->
 		<view class="list">
-			<job :list="list" v-if="list.length > 0"></job>
+			<jobIndex :list="list" v-if="list.length > 0"></jobIndex>
 			<u-empty v-else text="该城市暂无工作"></u-empty>
 		</view>
 	</view>
@@ -64,11 +29,12 @@ export default {
 	data() {
 		return {
 			tab: [
-				{ name: '最新', orderBy: 'id' },
-				{ name: '附近', orderBy: 'distance' }
+				{ name: '推荐工作', orderBy: 'id', type: 0, recommend: 1 },
+				{ name: '身边工作', orderBy: 'distance', type: 0, recommend: 1 },
+				{ name: '现结工作', orderBy: 'id', type: 1, recommend: 1 }
 			],
 			list: [],
-			param: { pageNum: 1, pageSize: 20, type: 0 },
+			param: { pageNum: 1, pageSize: 8, type: 0, recommend: 1 },
 			bannerList: [],
 			noticeList: []
 		};
@@ -134,6 +100,8 @@ export default {
 		},
 		tabClick(e) {
 			this.param.orderBy = e.orderBy;
+			this.param.type = e.type;
+			this.param.recommend = e.recommend;
 			this.getData();
 		},
 		go(url) {
@@ -148,7 +116,10 @@ export default {
 	margin-top: 15px;
 	box-shadow: $box-shadow;
 }
-.menu {
-	box-shadow: none;
+.tab {
+	background-color: white;
+	margin-top: 10px;
+	border-radius: 5px;
+	box-shadow: $box-shadow;
 }
 </style>

+ 72 - 19
app/pages/serve/index.vue

@@ -5,7 +5,7 @@
 			<u-swiper circular :radius="5" :indicator="true" keyName="pic" :list="bannerList" :height="160" class="uni-swiper" @click="click"></u-swiper>
 		</view>
 		<!--菜单-->
-		<view class="menu" style="display: none;">
+		<view class="menu">
 			<view class="cd">
 				<view class="out">
 					<view class="int">
@@ -38,19 +38,51 @@
 					</view>
 				</view>
 			</view>
-			<view class="cd" @click="go('/pages/statement/index/index')">
+			<view class="cd">
 				<view class="out">
 					<view class="int">
-						<view class="icon" style="background-color: #03a9f4">&#xe725;</view>
-						<view class="title">结算广场</view>
+						<view class="icon" style="background-color: #795548">&#xe6a6;</view>
+						<view class="title">社保窗口</view>
 					</view>
 				</view>
 			</view>
-			<view class="cd">
+			<view class="cd" @click="go('/pages/job/map')">
 				<view class="out">
 					<view class="int">
-						<view class="icon" style="background-color: #795548">&#xe6a6;</view>
-						<view class="title">社保窗口</view>
+						<view class="icon" style="background-color: #f44336">&#xe647;</view>
+						<view class="title">地图找工</view>
+					</view>
+				</view>
+			</view>
+			<view class="cd" @click="go('/pages/job/list?type=0')">
+				<view class="out">
+					<view class="int">
+						<view class="icon" style="background-color: #4581fb">&#xe9d9;</view>
+						<view class="title">全职</view>
+					</view>
+				</view>
+			</view>
+			<view class="cd" @click="go('/pages/job/list?type=1')">
+				<view class="out">
+					<view class="int">
+						<view class="icon" style="background-color: #ff5722">&#xe62a;</view>
+						<view class="title">兼职</view>
+					</view>
+				</view>
+			</view>
+			<view class="cd" @click="go('/pages/job/enterprise/card')">
+				<view class="out">
+					<view class="int">
+						<view class="icon" style="background-color: #ff9800">&#xe725;</view>
+						<view class="title">企业卡片</view>
+					</view>
+				</view>
+			</view>
+			<view class="cd" @click="go('/pages/statement/index/index')">
+				<view class="out">
+					<view class="int">
+						<view class="icon" style="background-color: #03a9f4">&#xe63c;</view>
+						<view class="title">结算广场</view>
 					</view>
 				</view>
 			</view>
@@ -65,9 +97,16 @@
 					<text class="icon">&#xe62b;</text>
 				</view>
 			</view>
-			<view class="item" v-for="(item, index) in newsList" :key="index" @click="go('/pages/news/detail?id=' + item.id)">
-				<view class="title omit">{{ item.title }}</view>
-				<view class="date">{{ item.createTime.substring(5, 10) }}</view>
+			<view class="bhe" :style="{ height: expand ? 'auto' : '60px' }">
+				<view class="item" v-for="(item, index) in newsList" :key="index" @click="go('/pages/news/detail?id=' + item.id)">
+					<view class="title omit">{{ item.title }}</view>
+					<view class="date">{{ item.createTime.substring(5, 10) }}</view>
+				</view>
+			</view>
+			<view class="expand" @click="expand = !expand">
+				<text class="icon" v-if="expand">&#xe61c;</text>
+				<text class="icon" v-else>&#xe617;</text>
+				<text>{{ expand ? '收起' : '展开' }}</text>
 			</view>
 		</view>
 		<!--横幅-->
@@ -107,7 +146,8 @@ export default {
 				a4: 'https://chenglantimes.com/prod-api/profile/upload/2024/05/20/1716198212203.jpg'
 			},
 			bannerList: [],
-			newsList: []
+			newsList: [],
+			expand: false
 		};
 	},
 	onLoad() {
@@ -166,16 +206,29 @@ export default {
 			margin-top: -20px;
 		}
 	}
-	.item {
-		padding-top: 9px;
-		font-size: 14px;
+	.bhe {
+		height: 60px;
 		overflow: hidden;
-		.title {
-			float: left;
-			width: 80%;
+		.item {
+			padding-top: 9px;
+			font-size: 15px;
+			overflow: hidden;
+			.title {
+				float: left;
+				width: 80%;
+			}
+			.date {
+				float: right;
+			}
 		}
-		.date {
-			float: right;
+	}
+	.expand {
+		text-align: center;
+		font-size: 15px;
+		color: $font-c;
+		padding-top: 10px;
+		.icon {
+			padding-right: 3px;
 		}
 	}
 }

+ 21 - 23
ruoyi-admin/src/main/java/com/ruoyi/web/work/controller/PositionController.java

@@ -1,25 +1,24 @@
 package com.ruoyi.web.work.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.web.work.domain.Enterprise;
 import com.ruoyi.web.work.domain.Position;
+import com.ruoyi.web.work.service.IEnterpriseService;
 import com.ruoyi.web.work.service.IPositionService;
-import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * 职位管理
+ *
  * @author lsw
  * @date 2024-06-07
  */
@@ -29,9 +28,12 @@ public class PositionController extends BaseController {
     @Autowired
     private IPositionService positionService;
 
+    @Autowired
+    private IEnterpriseService enterpriseService;
+
     @PreAuthorize("@ss.hasPermi('work:position:list')")
     @GetMapping("/list")
-    public TableDataInfo list(Position position){
+    public TableDataInfo list(Position position) {
         startPage();
         List<Position> list = positionService.selectList(position);
         return getDataTable(list);
@@ -39,28 +41,24 @@ public class PositionController extends BaseController {
 
     @PreAuthorize("@ss.hasPermi('work:position:query')")
     @GetMapping(value = "/detail/{id}")
-    public AjaxResult detail(@PathVariable("id") Long id){
-        return AjaxResult.success(positionService.getById(id));
-    }
-
-    @PreAuthorize("@ss.hasPermi('work:position:add')")
-    @Log(title = "职位管理", businessType = BusinessType.INSERT)
-    @PostMapping("/add")
-    public AjaxResult add(@RequestBody Position position){
-        return toAjax(positionService.save(position));
+    public AjaxResult detail(@PathVariable("id") Long id) {
+        Position position = positionService.getById(id);
+        Enterprise enterprise = enterpriseService.getById(position.getUserId());
+        position.setEnterpriseName(enterprise.getName());
+        return AjaxResult.success(position);
     }
 
     @PreAuthorize("@ss.hasPermi('work:position:edit')")
     @Log(title = "职位管理", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
-    public AjaxResult edit(@RequestBody Position position){
+    public AjaxResult edit(@RequestBody Position position) {
         return toAjax(positionService.updateById(position));
     }
 
     @PreAuthorize("@ss.hasPermi('work:position:remove')")
     @Log(title = "职位管理", businessType = BusinessType.DELETE)
     @GetMapping("/remove/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids){
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(positionService.removeByIds(Arrays.asList(ids)));
     }
 }

+ 8 - 11
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/Position.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.ruoyi.web.work.domain.base.BaseData;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -40,6 +39,9 @@ public class Position extends BaseData {
     @ApiModelProperty(value = "职位名称")
     private String title;
 
+    @ApiModelProperty(value = "图片封面")
+    private String pic;
+
     @NotBlank(message = "职位描述不能为空")
     @ApiModelProperty(value = "职位描述")
     private String contents;
@@ -99,6 +101,9 @@ public class Position extends BaseData {
     @ApiModelProperty(value = "职位审核:0=待审核,1=审核通过,2审核不通过")
     private Integer audit;
 
+    @ApiModelProperty(value = "是否推荐:0=否,1=是")
+    private Integer recommend;
+
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "开始时间")
     private Date startDate;
@@ -116,19 +121,11 @@ public class Position extends BaseData {
     private Date updateTime;
 
     @ApiModelProperty(value = "审核备注")
-    private String rejectDesc;
+    private String msg;
 
     @ApiModelProperty(value = "状态 (0关闭 1已发布任务 2已接单 3业主已选中 4任务开始 5验收 6付款)")
     private Integer status;
 
     @TableField(exist = false)
-    @JsonIgnore
-    private String regionId;
-
-    @TableField(exist = false)
-    private String distance;
-
-    @TableField(exist = false)
-    @JsonIgnore
-    private String orderBy;
+    private  String enterpriseName;
 }

+ 3 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/dto/PositionQueryDto.java

@@ -21,6 +21,9 @@ public class PositionQueryDto {
     @ApiModelProperty(value = "类型分类")
     private Integer type;
 
+    @ApiModelProperty(value = "是否推荐:0=否,1=是")
+    private Integer recommend;
+
     @ApiModelProperty(value = "职位名称")
     private String title;
 

+ 3 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/vo/PositionListVo.java

@@ -19,6 +19,9 @@ public class PositionListVo{
     @ApiModelProperty(value = "职位名称")
     private String title;
 
+    @ApiModelProperty(value = "封面图片")
+    private String pic;
+
     @ApiModelProperty(value = "经验要求")
     private String experience;
 

+ 1 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/PositionServiceImpl.java

@@ -118,6 +118,7 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
         position.setUserId(AppUtil.getUser().getId());
         position.setState(0);
         position.setAudit(1);
+        position.setRecommend(0);
         if (!save(position)) {
             throw new ServiceException("发布职位失败");
         }

+ 14 - 5
ruoyi-admin/src/main/resources/mapper/work/PositionMapper.xml

@@ -5,12 +5,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.ruoyi.web.work.mapper.PositionMapper">
 
     <select id="selectList" resultType="com.ruoyi.web.work.domain.Position">
-        select * from tb_position
+        SELECT
+        p.*,
+        e.name AS enterpriseName
+        FROM
+        tb_position p
+        LEFT JOIN tb_enterprise e ON e.id = p.user_id
         <where>
-            <if test="userId != null "> and user_id = #{userId}</if>
-            <if test="type != null "> and type = #{type}</if>
-            <if test="title != null  and title != ''"> and title like concat('%', #{name}, '%')</if>
-        </where>
+            <if test="type != null "> AND p.type = #{type}</if>
+            <if test="audit != null "> AND p.audit = #{audit}</if>
+            <if test="recommend != null "> AND p.recommend = #{recommend}</if>
+            <if test="title != null  and title != ''"> AND concat(p.title,e.name) LIKE concat('%', #{title}, '%')</if>
+            <if test="dateBegin != null  and dateBegin != ''"> AND p.create_time BETWEEN #{dateBegin} AND #{dateEnd} + INTERVAL 1 DAY</if>
+</where>
     </select>
     <select id="manageList" resultType="com.ruoyi.web.work.domain.Position">
         select * from tb_position
@@ -26,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         id,
         type,
         title,
+        pic,
         experience,
         salary,
         region_name,
@@ -45,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="positionId != null"> AND position_id=#{positionId}</if>
         <if test="experience != null  and experience.size() > 0">AND experience IN (<foreach collection="experience" item="name" separator=",">#{name}</foreach>)</if>
         <if test="min != null and max !=null">AND min <![CDATA[ >= ]]> #{min} AND max <![CDATA[ <= ]]> #{max}</if>
+        <if test="recommend != null "> AND recommend = #{recommend}</if>
         <if test="orderBy=='distance' and longitude !=null">ORDER BY distance ASC</if>
         <if test="orderBy=='id'">ORDER BY id DESC</if>
     </select>