-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow.html
98 lines (95 loc) · 4.06 KB
/
show.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>聚合招聘信息页面</title>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- 可选的 Bootstrap 主题文件(一般不用引入) -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdn.bootcss.com/vue/2.2.6/vue.min.js"></script>
<style type="text/css">
p {
overflow: hidden;
white-space: nowrap;
cursor: help;
}
</style>
</head>
<body>
<!-- 模态框(Modal) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title" id="myModalLabel">
模态框(Modal)标题
</h4>
</div>
<div class="modal-body">
在这里添加一些文本
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<div id="app-4">
<div class="col-sm-4" data-toggle="modal" data-target=".bs-example-modal-lg" v-for="job in jobs">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span>{{job.companyName}}<button v-on:click="jobinfo" class="btn btn-primary btn-small" style="float: right;margin-top: -8px">
技能要求
</button></h3>
</div>
<div class="panel-body">
<div style="display: none;" id='aaa'>{{job.jobInfo}}</div>
<p title="{{job.title}}">{{job.title}}</p>
<p>{{job.salary}}</p>
<p>{{job.location}}</p>
<p>{{job.time}}</p>
<p>{{job.jobType}}</p>
<p>{{job.experience}}</p>
<p>{{job.nums}}</p>
<p>{{job.jobCategory}}</p>
<p title="{{address}}">地址:{{job.address}}</p>
<p v-html=""><span class="glyphicon glyphicon-link" aria-hidden="true"></span></p>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var vm = new Vue({
el: '#app-4',
data: {
jobs: ""
},
beforeCreate: function() {
var url = "data.php";
var _self = this;
$.get(url, function(data) {
_self.jobs = eval("(" + data + ")");
})
},
methods: {
jobinfo: function (event){
//修改模态框里的相关具体信息
var jobInfo = $(this).parent().parent().parent().find('#aaa').text();
// jobInfo = jobInfo.trim().replace(';','<br />');
console.log(this.$el);
$('#myModalLabel').text('招聘信息');
$('.modal-body').html(jobInfo);
$('#myModal').modal();
}
}
});
// vm.jobinfo();
</script>
</body>
</html>