❤️ssm大学生企业推荐系统
开发意义
大学生企业推荐系统采用B/S结构、java开发语言、以及Mysql数据库等技术。系统主要分为管理员和学生、企业三部分,管理员主要功能包括:首页、个人中心、学生管理、企业管理、招聘信息管理、个人简历管理、应聘职位管理、评价企业管理、交流论坛、系统管理,学生;首页、个人中心、招聘信息管理、个人简历管理、应聘职位管理、评价企业管理,企业;首页、个人中心、招聘信息管理、个人简历管理、应聘职位管理、评价企业管理,前台首页;首页、招聘信息、个人简历、交流论坛、个人中心、后台管理等功能,基本上实现了整个大学生企业推荐系统信息管理的过程。本系统在一般大学生企业推荐系统的基础上增加了最新信息的功能方便学生快速浏览,是一个高效的、动态的、相互友好的大学生企业推荐系统。
软件功能模块设计

启动项目
后台路径地址:localhost:8080/项目名称/admin/dist/index.html
前台路径地址:localhost:8080/项目名称/front/index.html
http://localhost:8080/ssm3n8lp/front/index.html
http://localhost:8080/ssm3n8lp/admin/dist/index.html#/index
项目导入参考地址
技术栈
后端:SpringBoot、JDK8、MAVEN3.6.0、MySQL5.7等。
前端:Vue.js、Element UI、Axios、Nodev12.18.3等。
开发工具:IDEA、VS Code。
系统展示
后台







前台




部分代码
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.ZhaopinxinxiEntity;
import com.entity.view.ZhaopinxinxiView;
import com.service.ZhaopinxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 招聘信息
* 后端接口
* @author
* @email
* @date 2021-03-11 00:56:04
*/
@RestController
@RequestMapping("/zhaopinxinxi")
public class ZhaopinxinxiController {
@Autowired
private ZhaopinxinxiService zhaopinxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ZhaopinxinxiEntity zhaopinxinxi,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("qiye")) {
zhaopinxinxi.setQiyezhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<ZhaopinxinxiEntity> ew = new EntityWrapper<ZhaopinxinxiEntity>();
PageUtils page = zhaopinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zhaopinxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ZhaopinxinxiEntity zhaopinxinxi, HttpServletRequest request){
EntityWrapper<ZhaopinxinxiEntity> ew = new EntityWrapper<ZhaopinxinxiEntity>();
PageUtils page = zhaopinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zhaopinxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ZhaopinxinxiEntity zhaopinxinxi){
EntityWrapper<ZhaopinxinxiEntity> ew = new EntityWrapper<ZhaopinxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( zhaopinxinxi, "zhaopinxinxi"));
return R.ok().put("data", zhaopinxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ZhaopinxinxiEntity zhaopinxinxi){
EntityWrapper< ZhaopinxinxiEntity> ew = new EntityWrapper< ZhaopinxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( zhaopinxinxi, "zhaopinxinxi"));
ZhaopinxinxiView zhaopinxinxiView = zhaopinxinxiService.selectView(ew);
return R.ok("查询招聘信息成功").put("data", zhaopinxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ZhaopinxinxiEntity zhaopinxinxi = zhaopinxinxiService.selectById(id);
zhaopinxinxi.setClicknum(zhaopinxinxi.getClicknum()+1);
zhaopinxinxi.setClicktime(new Date());
zhaopinxinxiService.updateById(zhaopinxinxi);
return R.ok().put("data", zhaopinxinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ZhaopinxinxiEntity zhaopinxinxi = zhaopinxinxiService.selectById(id);
zhaopinxinxi.setClicknum(zhaopinxinxi.getClicknum()+1);
zhaopinxinxi.setClicktime(new Date());
zhaopinxinxiService.updateById(zhaopinxinxi);
return R.ok().put("data", zhaopinxinxi);
}
/**
* 赞或踩
*/
@RequestMapping("/thumbsup/{id}")
public R thumbsup(@PathVariable("id") String id,String type){
ZhaopinxinxiEntity zhaopinxinxi = zhaopinxinxiService.selectById(id);
if(type.equals("1")) {
zhaopinxinxi.setThumbsupnum(zhaopinxinxi.getThumbsupnum()+1);
} else {
zhaopinxinxi.setCrazilynum(zhaopinxinxi.getCrazilynum()+1);
}
zhaopinxinxiService.updateById(zhaopinxinxi);
return R.ok();
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ZhaopinxinxiEntity zhaopinxinxi, HttpServletRequest request){
zhaopinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(zhaopinxinxi);
zhaopinxinxiService.insert(zhaopinxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ZhaopinxinxiEntity zhaopinxinxi, HttpServletRequest request){
zhaopinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(zhaopinxinxi);
zhaopinxinxiService.insert(zhaopinxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ZhaopinxinxiEntity zhaopinxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(zhaopinxinxi);
zhaopinxinxiService.updateById(zhaopinxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
zhaopinxinxiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<ZhaopinxinxiEntity> wrapper = new EntityWrapper<ZhaopinxinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("qiye")) {
wrapper.eq("qiyezhanghao", (String)request.getSession().getAttribute("username"));
}
int count = zhaopinxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,ZhaopinxinxiEntity zhaopinxinxi, HttpServletRequest request,String pre){
EntityWrapper<ZhaopinxinxiEntity> ew = new EntityWrapper<ZhaopinxinxiEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicknum");
params.put("order", "desc");
PageUtils page = zhaopinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zhaopinxinxi), params), params));
return R.ok().put("data", page);
}
}
<template>
<div class="addEdit-block">
<el-form
class="detail-form-content"
ref="ruleForm"
:model="ruleForm"
:rules="rules"
label-width="80px"
:style="{backgroundColor:addEditForm.addEditBoxColor}"
>
<el-row>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="招聘编号" prop="zhaopinbianhao">
<el-input v-model="ruleForm.zhaopinbianhao"
placeholder="招聘编号111" readonly></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" v-if="ruleForm.zhaopinbianhao" label="招聘编号" prop="zhaopinbianhao">
<el-input v-model="ruleForm.zhaopinbianhao"
placeholder="招聘编号" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="职位" prop="zhiwei">
<el-input v-model="ruleForm.zhiwei"
placeholder="职位" clearable :readonly="ro.zhiwei"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="职位" prop="zhiwei">
<el-input v-model="ruleForm.zhiwei"
placeholder="职位" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="上班地点" prop="shangbandidian">
<el-input v-model="ruleForm.shangbandidian"
placeholder="上班地点" clearable :readonly="ro.shangbandidian"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="上班地点" prop="shangbandidian">
<el-input v-model="ruleForm.shangbandidian"
placeholder="上班地点" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="上班时间" prop="shangbanshijian">
<el-input v-model="ruleForm.shangbanshijian"
placeholder="上班时间" clearable :readonly="ro.shangbanshijian"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="上班时间" prop="shangbanshijian">
<el-input v-model="ruleForm.shangbanshijian"
placeholder="上班时间" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="薪资待遇" prop="xinzidaiyu">
<el-input v-model="ruleForm.xinzidaiyu"
placeholder="薪资待遇" clearable :readonly="ro.xinzidaiyu"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="薪资待遇" prop="xinzidaiyu">
<el-input v-model="ruleForm.xinzidaiyu"
placeholder="薪资待遇" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="招聘人数" prop="zhaopinrenshu">
<el-input v-model="ruleForm.zhaopinrenshu"
placeholder="招聘人数" clearable :readonly="ro.zhaopinrenshu"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="招聘人数" prop="zhaopinrenshu">
<el-input v-model="ruleForm.zhaopinrenshu"
placeholder="招聘人数" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="24">
<el-form-item class="upload" v-if="type!='info' && !ro.tupian" label="图片" prop="tupian">
<file-upload
tip="点击上传图片"
action="file/upload"
:limit="3"
:multiple="true"
:fileUrls="ruleForm.tupian?ruleForm.tupian:''"
@change="tupianUploadChange"
></file-upload>
</el-form-item>
<div v-else>
<el-form-item v-if="ruleForm.tupian" label="图片" prop="tupian">
<img style="margin-right:20px;" v-bind:key="index" v-for="(item,index) in ruleForm.tupian.split(',')" :src="item" width="100" height="100">
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="企业账号" prop="qiyezhanghao">
<el-input v-model="ruleForm.qiyezhanghao"
placeholder="企业账号" clearable :readonly="ro.qiyezhanghao"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="企业账号" prop="qiyezhanghao">
<el-input v-model="ruleForm.qiyezhanghao"
placeholder="企业账号" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="企业名称" prop="qiyemingcheng">
<el-input v-model="ruleForm.qiyemingcheng"
placeholder="企业名称" clearable :readonly="ro.qiyemingcheng"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="企业名称" prop="qiyemingcheng">
<el-input v-model="ruleForm.qiyemingcheng"
placeholder="企业名称" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="负责人" prop="fuzeren">
<el-input v-model="ruleForm.fuzeren"
placeholder="负责人" clearable :readonly="ro.fuzeren"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="负责人" prop="fuzeren">
<el-input v-model="ruleForm.fuzeren"
placeholder="负责人" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="联系方式" prop="lianxifangshi">
<el-input v-model="ruleForm.lianxifangshi"
placeholder="联系方式" clearable :readonly="ro.lianxifangshi"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="联系方式" prop="lianxifangshi">
<el-input v-model="ruleForm.lianxifangshi"
placeholder="联系方式" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<el-form-item class="input" v-if="type!='info'" label="邮箱" prop="youxiang">
<el-input v-model="ruleForm.youxiang"
placeholder="邮箱" clearable :readonly="ro.youxiang"></el-input>
</el-form-item>
<div v-else>
<el-form-item class="input" label="邮箱" prop="youxiang">
<el-input v-model="ruleForm.youxiang"
placeholder="邮箱" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item class="textarea" v-if="type!='info'" label="职位要求" prop="zhiweiyaoqiu">
<el-input
style="min-width: 200px; max-width: 600px;"
type="textarea"
:rows="8"
placeholder="职位要求"
v-model="ruleForm.zhiweiyaoqiu" >
</el-input>
</el-form-item>
<div v-else>
<el-form-item v-if="ruleForm.zhiweiyaoqiu" label="职位要求" prop="zhiweiyaoqiu">
<span>{{ruleForm.zhiweiyaoqiu}}</span>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item v-if="type!='info'" label="企业介绍" prop="qiyejieshao">
<editor
style="min-width: 200px; max-width: 600px;"
v-model="ruleForm.qiyejieshao"
class="editor"
action="file/upload">
</editor>
</el-form-item>
<div v-else>
<el-form-item v-if="ruleForm.qiyejieshao" label="企业介绍" prop="qiyejieshao">
<span v-html="ruleForm.qiyejieshao"></span>
</el-form-item>
</div>
</el-col>
</el-row>
<el-form-item class="btn">
<el-button v-if="type!='info'" type="primary" class="btn-success" @click="onSubmit">提交</el-button>
<el-button v-if="type!='info'" class="btn-close" @click="back()">取消</el-button>
<el-button v-if="type=='info'" class="btn-close" @click="back()">返回</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
// 数字,邮件,手机,url,身份证校验
import { isNumber,isIntNumer,isEmail,isPhone, isMobile,isURL,checkIdCard } from "@/utils/validate";
export default {
data() {
let self = this
var validateIdCard = (rule, value, callback) => {
if(!value){
callback();
} else if (!checkIdCard(value)) {
callback(new Error("请输入正确的身份证号码"));
} else {
callback();
}
};
var validateUrl = (rule, value, callback) => {
if(!value){
callback();
} else if (!isURL(value)) {
callback(new Error("请输入正确的URL地址"));
} else {
callback();
}
};
var validateMobile = (rule, value, callback) => {
if(!value){
callback();
} else if (!isMobile(value)) {
callback(new Error("请输入正确的手机号码"));
} else {
callback();
}
};
var validatePhone = (rule, value, callback) => {
if(!value){
callback();
} else if (!isPhone(value)) {
callback(new Error("请输入正确的电话号码"));
} else {
callback();
}
};
var validateEmail = (rule, value, callback) => {
if(!value){
callback();
} else if (!isEmail(value)) {
callback(new Error("请输入正确的邮箱地址"));
} else {
callback();
}
};
var validateNumber = (rule, value, callback) => {
if(!value){
callback();
} else if (!isNumber(value)) {
callback(new Error("请输入数字"));
} else {
callback();
}
};
var validateIntNumber = (rule, value, callback) => {
if(!value){
callback();
} else if (!isIntNumer(value)) {
callback(new Error("请输入整数"));
} else {
callback();
}
};
return {
addEditForm: {"btnSaveFontColor":"#fff","selectFontSize":"14px","btnCancelBorderColor":"#DCDFE6","inputBorderRadius":"4px","inputFontSize":"14px","textareaBgColor":"#fff","btnSaveFontSize":"14px","textareaBorderRadius":"4px","uploadBgColor":"#fff","textareaBorderStyle":"solid","btnCancelWidth":"88px","textareaHeight":"120px","dateBgColor":"#fff","btnSaveBorderRadius":"4px","uploadLableFontSize":"14px","textareaBorderWidth":"1px","inputLableColor":"#606266","addEditBoxColor":"rgba(251, 249, 249, 1)","dateIconFontSize":"14px","btnSaveBgColor":"#409EFF","uploadIconFontColor":"#8c939d","textareaBorderColor":"#DCDFE6","btnCancelBgColor":"#ecf5ff","selectLableColor":"#606266","btnSaveBorderStyle":"solid","dateBorderWidth":"1px","dateLableFontSize":"14px","dateBorderRadius":"4px","btnCancelBorderStyle":"solid","selectLableFontSize":"14px","selectBorderStyle":"solid","selectIconFontColor":"#C0C4CC","btnCancelHeight":"44px","inputHeight":"40px","btnCancelFontColor":"#606266","dateBorderColor":"#DCDFE6","dateIconFontColor":"#C0C4CC","uploadBorderStyle":"solid","dateBorderStyle":"solid","dateLableColor":"#606266","dateFontSize":"14px","inputBorderWidth":"1px","uploadIconFontSize":"28px","selectHeight":"40px","inputFontColor":"#606266","uploadHeight":"148px","textareaLableColor":"#606266","textareaLableFontSize":"14px","btnCancelFontSize":"14px","inputBorderStyle":"solid","btnCancelBorderRadius":"4px","inputBgColor":"#fff","inputLableFontSize":"14px","uploadLableColor":"#606266","uploadBorderRadius":"4px","btnSaveHeight":"44px","selectBgColor":"#fff","btnSaveWidth":"88px","selectIconFontSize":"14px","dateHeight":"40px","selectBorderColor":"#DCDFE6","inputBorderColor":"#DCDFE6","uploadBorderColor":"#DCDFE6","textareaFontColor":"#606266","selectBorderWidth":"1px","dateFontColor":"#606266","btnCancelBorderWidth":"1px","uploadBorderWidth":"1px","textareaFontSize":"14px","selectBorderRadius":"4px","selectFontColor":"#606266","btnSaveBorderColor":"#409EFF","btnSaveBorderWidth":"1px"},
id: '',
type: '',
ro:{
zhaopinbianhao : false,
zhiwei : false,
zhiweiyaoqiu : false,
shangbandidian : false,
shangbanshijian : false,
xinzidaiyu : false,
zhaopinrenshu : false,
tupian : false,
qiyezhanghao : false,
qiyemingcheng : false,
fuzeren : false,
lianxifangshi : false,
youxiang : false,
qiyejieshao : false,
thumbsupnum : false,
crazilynum : false,
clicktime : false,
clicknum : false,
},
ruleForm: {
zhaopinbianhao: this.getUUID(),
zhiwei: '',
zhiweiyaoqiu: '',
shangbandidian: '',
shangbanshijian: '',
xinzidaiyu: '',
zhaopinrenshu: '',
tupian: '',
qiyezhanghao: '',
qiyemingcheng: '',
fuzeren: '',
lianxifangshi: '',
youxiang: '',
qiyejieshao: '',
clicktime: '',
},
rules: {
zhaopinbianhao: [
],
zhiwei: [
],
zhiweiyaoqiu: [
],
shangbandidian: [
],
shangbanshijian: [
],
xinzidaiyu: [
{ validator: validateIntNumber, trigger: 'blur' },
],
zhaopinrenshu: [
{ validator: validateIntNumber, trigger: 'blur' },
],
tupian: [
],
qiyezhanghao: [
],
qiyemingcheng: [
],
fuzeren: [
],
lianxifangshi: [
],
youxiang: [
{ validator: validateEmail, trigger: 'blur' },
],
qiyejieshao: [
],
thumbsupnum: [
{ validator: validateIntNumber, trigger: 'blur' },
],
crazilynum: [
{ validator: validateIntNumber, trigger: 'blur' },
],
clicktime: [
],
clicknum: [
{ validator: validateIntNumber, trigger: 'blur' },
],
}
};
},
props: ["parent"],
computed: {
},
created() {
this.addEditStyleChange()
this.addEditUploadStyleChange()
},
methods: {
// 下载
download(file){
window.open(`${file}`)
},
// 初始化
init(id,type) {
if (id) {
this.id = id;
this.type = type;
}
if(this.type=='info'||this.type=='else'){
this.info(id);
}else if(this.type=='cross'){
var obj = this.$storage.getObj('crossObj');
for (var o in obj){
if(o=='zhaopinbianhao'){
this.ruleForm.zhaopinbianhao = obj[o];
this.ro.zhaopinbianhao = true;
continue;
}
if(o=='zhiwei'){
this.ruleForm.zhiwei = obj[o];
this.ro.zhiwei = true;
continue;
}
if(o=='zhiweiyaoqiu'){
this.ruleForm.zhiweiyaoqiu = obj[o];
this.ro.zhiweiyaoqiu = true;
continue;
}
if(o=='shangbandidian'){
this.ruleForm.shangbandidian = obj[o];
this.ro.shangbandidian = true;
continue;
}
if(o=='shangbanshijian'){
this.ruleForm.shangbanshijian = obj[o];
this.ro.shangbanshijian = true;
continue;
}
if(o=='xinzidaiyu'){
this.ruleForm.xinzidaiyu = obj[o];
this.ro.xinzidaiyu = true;
continue;
}
if(o=='zhaopinrenshu'){
this.ruleForm.zhaopinrenshu = obj[o];
this.ro.zhaopinrenshu = true;
continue;
}
if(o=='tupian'){
this.ruleForm.tupian = obj[o];
this.ro.tupian = true;
continue;
}
if(o=='qiyezhanghao'){
this.ruleForm.qiyezhanghao = obj[o];
this.ro.qiyezhanghao = true;
continue;
}
if(o=='qiyemingcheng'){
this.ruleForm.qiyemingcheng = obj[o];
this.ro.qiyemingcheng = true;
continue;
}
if(o=='fuzeren'){
this.ruleForm.fuzeren = obj[o];
this.ro.fuzeren = true;
continue;
}
if(o=='lianxifangshi'){
this.ruleForm.lianxifangshi = obj[o];
this.ro.lianxifangshi = true;
continue;
}
if(o=='youxiang'){
this.ruleForm.youxiang = obj[o];
this.ro.youxiang = true;
continue;
}
if(o=='qiyejieshao'){
this.ruleForm.qiyejieshao = obj[o];
this.ro.qiyejieshao = true;
continue;
}
if(o=='thumbsupnum'){
this.ruleForm.thumbsupnum = obj[o];
this.ro.thumbsupnum = true;
continue;
}
if(o=='crazilynum'){
this.ruleForm.crazilynum = obj[o];
this.ro.crazilynum = true;
continue;
}
if(o=='clicktime'){
this.ruleForm.clicktime = obj[o];
this.ro.clicktime = true;
continue;
}
if(o=='clicknum'){
this.ruleForm.clicknum = obj[o];
this.ro.clicknum = true;
continue;
}
}
}
// 获取用户信息
this.$http({
url: `${this.$storage.get('sessionTable')}/session`,
method: "get"
}).then(({ data }) => {
if (data && data.code === 0) {
var json = data.data;
if(json.qiyezhanghao!=''&&json.qiyezhanghao){
this.ruleForm.qiyezhanghao = json.qiyezhanghao
}
if(json.qiyemingcheng!=''&&json.qiyemingcheng){
this.ruleForm.qiyemingcheng = json.qiyemingcheng
}
if(json.fuzeren!=''&&json.fuzeren){
this.ruleForm.fuzeren = json.fuzeren
}
if(json.lianxifangshi!=''&&json.lianxifangshi){
this.ruleForm.lianxifangshi = json.lianxifangshi
}
if(json.youxiang!=''&&json.youxiang){
this.ruleForm.youxiang = json.youxiang
}
} else {
this.$message.error(data.msg);
}
});
},
// 多级联动参数
info(id) {
this.$http({
url: `zhaopinxinxi/info/${id}`,
method: "get"
}).then(({ data }) => {
if (data && data.code === 0) {
this.ruleForm = data.data;
} else {
this.$message.error(data.msg);
}
});
},
// 提交
onSubmit() {
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
// ${column.compare}
this.$refs["ruleForm"].validate(valid => {
if (valid) {
this.$http({
url: `zhaopinxinxi/${!this.ruleForm.id ? "save" : "update"}`,
method: "post",
data: this.ruleForm
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.parent.showFlag = true;
this.parent.addOrUpdateFlag = false;
this.parent.zhaopinxinxiCrossAddOrUpdateFlag = false;
this.parent.search();
this.parent.contentStyleChange();
}
});
} else {
this.$message.error(data.msg);
}
});
}
});
},
// 获取uuid
getUUID () {
return new Date().getTime();
},
// 返回
back() {
this.parent.showFlag = true;
this.parent.addOrUpdateFlag = false;
this.parent.zhaopinxinxiCrossAddOrUpdateFlag = false;
this.parent.contentStyleChange();
},
tupianUploadChange(fileUrls) {
this.ruleForm.tupian = fileUrls;
this.addEditUploadStyleChange()
},
addEditStyleChange() {
this.$nextTick(()=>{
// input
document.querySelectorAll('.addEdit-block .input .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.inputHeight
el.style.color = this.addEditForm.inputFontColor
el.style.fontSize = this.addEditForm.inputFontSize
el.style.borderWidth = this.addEditForm.inputBorderWidth
el.style.borderStyle = this.addEditForm.inputBorderStyle
el.style.borderColor = this.addEditForm.inputBorderColor
el.style.borderRadius = this.addEditForm.inputBorderRadius
el.style.backgroundColor = this.addEditForm.inputBgColor
})
document.querySelectorAll('.addEdit-block .input .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.inputHeight
el.style.color = this.addEditForm.inputLableColor
el.style.fontSize = this.addEditForm.inputLableFontSize
})
// select
document.querySelectorAll('.addEdit-block .select .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.selectHeight
el.style.color = this.addEditForm.selectFontColor
el.style.fontSize = this.addEditForm.selectFontSize
el.style.borderWidth = this.addEditForm.selectBorderWidth
el.style.borderStyle = this.addEditForm.selectBorderStyle
el.style.borderColor = this.addEditForm.selectBorderColor
el.style.borderRadius = this.addEditForm.selectBorderRadius
el.style.backgroundColor = this.addEditForm.selectBgColor
})
document.querySelectorAll('.addEdit-block .select .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.selectHeight
el.style.color = this.addEditForm.selectLableColor
el.style.fontSize = this.addEditForm.selectLableFontSize
})
document.querySelectorAll('.addEdit-block .select .el-select__caret').forEach(el=>{
el.style.color = this.addEditForm.selectIconFontColor
el.style.fontSize = this.addEditForm.selectIconFontSize
})
// date
document.querySelectorAll('.addEdit-block .date .el-input__inner').forEach(el=>{
el.style.height = this.addEditForm.dateHeight
el.style.color = this.addEditForm.dateFontColor
el.style.fontSize = this.addEditForm.dateFontSize
el.style.borderWidth = this.addEditForm.dateBorderWidth
el.style.borderStyle = this.addEditForm.dateBorderStyle
el.style.borderColor = this.addEditForm.dateBorderColor
el.style.borderRadius = this.addEditForm.dateBorderRadius
el.style.backgroundColor = this.addEditForm.dateBgColor
})
document.querySelectorAll('.addEdit-block .date .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.dateHeight
el.style.color = this.addEditForm.dateLableColor
el.style.fontSize = this.addEditForm.dateLableFontSize
})
document.querySelectorAll('.addEdit-block .date .el-input__icon').forEach(el=>{
el.style.color = this.addEditForm.dateIconFontColor
el.style.fontSize = this.addEditForm.dateIconFontSize
el.style.lineHeight = this.addEditForm.dateHeight
})
// upload
let iconLineHeight = parseInt(this.addEditForm.uploadHeight) - parseInt(this.addEditForm.uploadBorderWidth) * 2 + 'px'
document.querySelectorAll('.addEdit-block .upload .el-upload--picture-card').forEach(el=>{
el.style.width = this.addEditForm.uploadHeight
el.style.height = this.addEditForm.uploadHeight
el.style.borderWidth = this.addEditForm.uploadBorderWidth
el.style.borderStyle = this.addEditForm.uploadBorderStyle
el.style.borderColor = this.addEditForm.uploadBorderColor
el.style.borderRadius = this.addEditForm.uploadBorderRadius
el.style.backgroundColor = this.addEditForm.uploadBgColor
})
document.querySelectorAll('.addEdit-block .upload .el-form-item__label').forEach(el=>{
el.style.lineHeight = this.addEditForm.uploadHeight
el.style.color = this.addEditForm.uploadLableColor
el.style.fontSize = this.addEditForm.uploadLableFontSize
})
document.querySelectorAll('.addEdit-block .upload .el-icon-plus').forEach(el=>{
el.style.color = this.addEditForm.uploadIconFontColor
el.style.fontSize = this.addEditForm.uploadIconFontSize
el.style.lineHeight = iconLineHeight
el.style.display = 'block'
})
// 多文本输入框
document.querySelectorAll('.addEdit-block .textarea .el-textarea__inner').forEach(el=>{
el.style.height = this.addEditForm.textareaHeight
el.style.color = this.addEditForm.textareaFontColor
el.style.fontSize = this.addEditForm.textareaFontSize
el.style.borderWidth = this.addEditForm.textareaBorderWidth
el.style.borderStyle = this.addEditForm.textareaBorderStyle
el.style.borderColor = this.addEditForm.textareaBorderColor
el.style.borderRadius = this.addEditForm.textareaBorderRadius
el.style.backgroundColor = this.addEditForm.textareaBgColor
})
document.querySelectorAll('.addEdit-block .textarea .el-form-item__label').forEach(el=>{
// el.style.lineHeight = this.addEditForm.textareaHeight
el.style.color = this.addEditForm.textareaLableColor
el.style.fontSize = this.addEditForm.textareaLableFontSize
})
// 保存
document.querySelectorAll('.addEdit-block .btn .btn-success').forEach(el=>{
el.style.width = this.addEditForm.btnSaveWidth
el.style.height = this.addEditForm.btnSaveHeight
el.style.color = this.addEditForm.btnSaveFontColor
el.style.fontSize = this.addEditForm.btnSaveFontSize
el.style.borderWidth = this.addEditForm.btnSaveBorderWidth
el.style.borderStyle = this.addEditForm.btnSaveBorderStyle
el.style.borderColor = this.addEditForm.btnSaveBorderColor
el.style.borderRadius = this.addEditForm.btnSaveBorderRadius
el.style.backgroundColor = this.addEditForm.btnSaveBgColor
})
// 返回
document.querySelectorAll('.addEdit-block .btn .btn-close').forEach(el=>{
el.style.width = this.addEditForm.btnCancelWidth
el.style.height = this.addEditForm.btnCancelHeight
el.style.color = this.addEditForm.btnCancelFontColor
el.style.fontSize = this.addEditForm.btnCancelFontSize
el.style.borderWidth = this.addEditForm.btnCancelBorderWidth
el.style.borderStyle = this.addEditForm.btnCancelBorderStyle
el.style.borderColor = this.addEditForm.btnCancelBorderColor
el.style.borderRadius = this.addEditForm.btnCancelBorderRadius
el.style.backgroundColor = this.addEditForm.btnCancelBgColor
})
})
},
addEditUploadStyleChange() {
this.$nextTick(()=>{
document.querySelectorAll('.addEdit-block .upload .el-upload-list--picture-card .el-upload-list__item').forEach(el=>{
el.style.width = this.addEditForm.uploadHeight
el.style.height = this.addEditForm.uploadHeight
el.style.borderWidth = this.addEditForm.uploadBorderWidth
el.style.borderStyle = this.addEditForm.uploadBorderStyle
el.style.borderColor = this.addEditForm.uploadBorderColor
el.style.borderRadius = this.addEditForm.uploadBorderRadius
el.style.backgroundColor = this.addEditForm.uploadBgColor
})
})
},
}
};
</script>
<style lang="scss">
.editor{
height: 500px;
& /deep/ .ql-container {
height: 310px;
}
}
.amap-wrapper {
width: 100%;
height: 500px;
}
.search-box {
position: absolute;
}
.addEdit-block {
margin: -10px;
}
.detail-form-content {
padding: 12px;
}
.btn .el-button {
padding: 0;
}
</style>
论文和PPT


关键字:ssm大学生企业推荐系统-小明的学习圈子www.stucoding.com
