部分:
{{ scope.row.createDate | dateDiff}}
{{ scope.row.resumeName }}
{{scope.row.jobIntention}}
男
女
{{ scope.row.birthday }}岁
1年以下
{{scope.row.seniority}}年
{{scope.row.education}}
期望地点:{{ scope.row.location }}
{{ scope.row.location | areaDiff}}
不限
{{scope.row.salaryExp}}K
部分 代码:export default {
name: 'jobCollectDetailHr',
cityOptions,
areaLabel,
data() {
return {
resumes :[],
// 第二步
desc: {
resumeName: '', // 姓名
sex: '', // 性别
birthday: '', // 年龄
seniority: '', // 工作年限
education: '', // 最高学历
jobWantedState: '', // 求职状态
salaryExp: '', // 期望薪资
location: '', // 期望地点
jobIntention: '', // 期望地点
remarks: [], // 特长标签
},
checkdata:[], // 存储选中的数组,便于【第二步】读取 【当前必须唯一性】
multipleSelectedResumeId:[], // 记录选中的id的拼接,【这么拼接处理,是为了后期直接可多选】=>选择简历
···其余无关代码省略···
}
},
mounted () {
},
methods: {
// 选择记录val
handleSelectionChange(val) {
// this.multipleSelectedResumeId = val; // 获取选择的数组对象
// 处理数组对象,筛选出数组的简历的Id,并处理新的数组
this.checkdata = val; // 定义接收checked全部对象
this.desc = val[0];
console.log(this.checkdata);
// 开始筛选拼接string array返回后台
console.log(this.checkdata.length);
var resultArray = []; // 必须定义中间数组对象进行“数组过渡”,否则组件不生效
if(this.checkdata.length<2){ // 如果选取数据>1条
for(var i=0;i
博主自定义:【因项目我负责,期间,就UI设计图稿、后台逻辑推定等,未进行+前端UI后台的3方对接,导致如下逻辑问题。
本文 · 特此另备份记录:多选,但不重新调用问题。】
详情,见github代码托管【备注时间:20190731 · 最后一次备份】
此处代码由后台返回,因为多选逻辑对接,米钱业务目前只是单选,所以后台给了两个接口定义,只能通过再次post请求(携带选中并推荐的简历id),再次获取返回的data重新渲染页面。
下面的data仅供参考。详情参考项目本地对应:开发文档托管。
{"code":200,"data":[{"id":"186206917952012288","createDate":1564543590000,"pageNum":1,"pageSize":30,"resumeName":"盛东","education":"大专","sex":"男","birthday":33,"seniority":1,"salaryExp":4,"jobIntention":"汽车保险","location":"安徽省/合肥市/经开区-奋达广场"},{"id":"185506447423963136","createDate":1564376585000,"pageNum":1,"pageSize":30,"resumeName":"朱博企","education":"本科","sex":"男","birthday":27,"seniority":6,"salaryExp":10,"jobIntention":"网络工程","location":"黑龙江省/鸡西市/鸡冠区-二环内"},{"id":"185458943827378176","createDate":1564365259000,"pageNum":1,"pageSize":30,"resumeName":"方玉","education":"高中","sex":"女","birthday":38,"seniority":3,"salaryExp":10,"jobIntention":"股市推手","location":"北京市/市辖区/东城区-市内股票证券公司均可"},{"id":"184841977668304896","createDate":1564218163000,"pageNum":1,"pageSize":30,"resumeName":"豪景邱","education":"本科","sex":"男","birthday":28,"seniority":5,"salaryExp":9,"jobIntention":"大厨,配菜员","location":"北京市/市辖区/朝阳区-朝阳区周边均可"},{"id":"184840644760436736","createDate":1564217845000,"pageNum":1,"pageSize":30,"resumeName":"潘金莲","education":"本科","sex":"男","birthday":36,"seniority":3,"salaryExp":7,"jobIntention":"职业模特","location":"湖北省/武汉市/经开区-环球一号周边"},{"id":"184837402777354240","createDate":1564217072000,"pageNum":1,"pageSize":30,"resumeName":"李万禄","education":"高中","sex":"男","birthday":37,"seniority":4,"salaryExp":7,"jobIntention":"送货员,驾驶员","location":"吉林省/长春市/朝阳区-市内各主城区"},{"id":"184836741331419136","createDate":1564216915000,"pageNum":1,"pageSize":30,"resumeName":"红星","education":"大专","sex":"男","birthday":36,"seniority":2,"salaryExp":8,"jobIntention":"驾驶员,配送员","location":"吉林省/长春市/朝阳区-市内均可"},{"id":"184836030598217728","createDate":1564216745000,"pageNum":1,"pageSize":30,"resumeName":"王力宏","education":"硕士及以上","sex":"男","birthday":35,"seniority":6,"salaryExp":10,"jobIntention":"酒吧歌手","location":"吉林省/长春市/朝阳区-市区内"},{"id":"184835022786658304","createDate":1564216505000,"pageNum":1,"pageSize":30,"resumeName":"胡丽菲","education":"初中及以下","sex":"女","birthday":30,"seniority":2,"salaryExp":4,"jobIntention":"快递客服,快递员","location":"上海市/市辖区/徐汇区-市区内均可"},{"id":"184833806635630592","createDate":1564216215000,"pageNum":1,"pageSize":30,"resumeName":"童晓倩","education":"本科","sex":"男","birthday":26,"seniority":2,"salaryExp":7,"jobIntention":"职业模特","location":"天津市/市辖区/河东区-万达广场周边"},{"id":"184808067651600384","createDate":1564210078000,"pageNum":1,"pageSize":30,"resumeName":"王不凡","education":"本科","sex":"女","birthday":23,"seniority":2,"salaryExp":8,"jobIntention":"儿童机器人培训","location":"安徽省/合肥市/蜀山区-青年公寓周边3公里均可"},{"id":"184807491014492160","createDate":1564209941000,"pageNum":1,"pageSize":30,"resumeName":"洪清莲","education":"大专","sex":"女","birthday":27,"seniority":3,"salaryExp":8,"jobIntention":"舵手、大副","location":"湖北省/武汉市/不限-市区内"},{"id":"184806677399207936","createDate":1564209747000,"pageNum":1,"pageSize":30,"resumeName":"吴索隆","education":"大专","sex":"男","birthday":29,"seniority":3,"salaryExp":8,"jobIntention":"拳击教练","location":"湖北省/武汉市/不限-市区内"},{"id":"184805503719702528","createDate":1564209467000,"pageNum":1,"pageSize":30,"resumeName":"东简良","education":"硕士及以上","sex":"男","birthday":26,"seniority":4,"salaryExp":10,"jobIntention":"服装设计师","location":"安徽省/合肥市/包河区-包河区周边"},{"id":"184804827941830656","createDate":1564209306000,"pageNum":1,"pageSize":30,"resumeName":"向娜娜","education":"本科","sex":"女","birthday":27,"seniority":2,"salaryExp":7,"jobIntention":"职业模特","location":"湖北省/武汉市/包河区-包河区周边"},{"id":"184804268853690368","createDate":1564209173000,"pageNum":1,"pageSize":30,"resumeName":"阚清子","education":"本科","sex":"女","birthday":32,"seniority":4,"salaryExp":8,"jobIntention":"职业模特","location":"湖北省/武汉市/包河区-包河区周边"},{"id":"184803718531645440","createDate":1564209042000,"pageNum":1,"pageSize":30,"resumeName":"刘靖越","education":"本科","sex":"男","birthday":25,"seniority":2,"salaryExp":10,"jobIntention":"专职司机","location":"湖北省/武汉市/经开区-正大广场周边"},{"id":"184801329879711744","createDate":1564208472000,"pageNum":1,"pageSize":30,"resumeName":"李大健","education":"本科","sex":"男","birthday":28,"seniority":3,"salaryExp":8,"jobIntention":"汽车维修","location":"吉林省/长春市/朝阳区-朝阳区周边"},{"id":"184796060382658560","createDate":1564207216000,"pageNum":1,"pageSize":30,"resumeName":"步轶男","education":"本科","sex":"女","birthday":30,"seniority":3,"salaryExp":6,"jobIntention":"汽车销售","location":"江苏省/南京市/玄武区-汽车城4S店"},{"id":"184761128012742656","createDate":1564198887000,"pageNum":1,"pageSize":30,"resumeName":"陆一鸣","education":"高中","sex":"男","birthday":28,"seniority":2,"salaryExp":5,"jobIntention":"龚爱国","location":"上海市/县/崇明县-DJ舞者"},{"id":"184758341539463168","createDate":1564198223000,"pageNum":1,"pageSize":30,"resumeName":"江浩淋","education":"高中","sex":"男","birthday":25,"seniority":2,"salaryExp":4,"jobIntention":"吧台员","location":"上海市/市辖区/徐汇区-动心舞厅"},{"id":"184742964117897216","createDate":1564194557000,"pageNum":1,"pageSize":30,"resumeName":"王毅凡","education":"大专","sex":"男","birthday":23,"seniority":1,"salaryExp":3,"jobIntention":"电竞咨询","location":"湖北省/武汉市/经开区-更好广场周边"}],"message":"请求成功"}
具体参考:
该项目的对应单页面src/hr/recommendlist/recommendShow.vue
文件的对应代码。
博主自定义记录篇。
以上就是关于“ elementUI多选框组件:多选数组,取值问题” 的全部内容。