post_select.blade.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. @extends('module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <style >
  6. .op_block{
  7. position: relative;
  8. margin-top: 30px;
  9. }
  10. .draggable_content {
  11. width: 60%;
  12. float: left;
  13. margin: 20px 0 0;
  14. }
  15. .tips{
  16. float: right;
  17. width: 35%;
  18. margin: 20px 0 0;
  19. border: 1px solid #ccc;
  20. }
  21. .tips_body{
  22. padding: 20px;
  23. }
  24. .tips_body p{
  25. line-height: 30px;
  26. margin-bottom: 10px;
  27. font-size: 20px;
  28. }
  29. .draggable_content h2{
  30. line-height: 50px;
  31. text-align: center;
  32. border-bottom: 1px solid #ccc;
  33. }
  34. .draggable_content .select{
  35. border: 1px solid #ccc;
  36. width: 45%;
  37. margin-right: 30px;
  38. float: left;
  39. }
  40. .draggable_content .options{
  41. width: 50%;
  42. float: left;
  43. border: 1px solid #ccc;
  44. }
  45. .list-group{
  46. padding: 20px;
  47. width: 80%;
  48. margin: 20px auto;
  49. border: 2px dashed #ccc;
  50. min-height: 1200px;
  51. }
  52. .list-group-item{
  53. border-radius: 10px;
  54. border: 1px dashed #0a9fd9;
  55. line-height: 30px;
  56. margin-bottom: 10px;
  57. padding: 10px 30px;
  58. }
  59. .operation{
  60. width: 100%;
  61. float: left;
  62. text-align: center;
  63. margin-top: 30px;
  64. }
  65. .mask {
  66. position: absolute;
  67. top: 0px;
  68. left: 0px;
  69. background-color: #777;
  70. z-index: 9;
  71. filter: alpha(opacity=60);
  72. opacity:0.5;
  73. -moz-opacity:0.5;
  74. }
  75. </style>
  76. @endpush
  77. @push('js')
  78. <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
  79. <link href="{{theme_asset('app/css/recruit/recruit.css')}}" rel="stylesheet" type="text/css"/>
  80. <link rel="stylesheet" href="{{ theme_asset('app/css/element.css') }}">
  81. @endpush
  82. @section('content')
  83. <div id="app">
  84. <div class="recruit_container clearfix">
  85. <div class="recruit_show_content" style="margin-top: 10px;width: 100%">
  86. <div class="title" style="text-align: center"><h2>晋江市公开招聘第十三批村务(社区)专职工作者择岗系统</h2></div>
  87. {{-- <div>--}}
  88. {{-- <div class="operation">--}}
  89. {{-- <el-button type="success" @click="rand()">生成随机测试数据</el-button> <el-button type="success" @click="enter()">进入指定测试数据</el-button>--}}
  90. {{-- </div>--}}
  91. {{-- <p style="text-align: center;line-height: 30px">当前测试数据:uid->{{ $info->uid }};recruit_id->{{ $info->recruit_id }};appoint_id->{{ $info->appoint_id }}</p>--}}
  92. {{-- </div>--}}
  93. <div role="alert" class="el-message el-message--error" style="position:relative" v-if="status == -1">
  94. <i class="el-message__icon el-icon-error"></i>
  95. <p class="el-message__content">您已放弃择岗</p>
  96. </div>
  97. <div role="alert" class="el-message el-message--success" style="position:relative" v-if="status == 1">
  98. <i class="el-message__icon el-icon-success"></i>
  99. <p class="el-message__content">您已提交择岗意向,请耐心等待结果!</p>
  100. </div>
  101. <div class="op_block clearfix" ref="opblock">
  102. <div class="draggable_content">
  103. <div class="select">
  104. <h2>意向镇(街道)</h2>
  105. <draggable :list="select_list" :disabled="!enabled" class="list-group" ghost-class="ghost" @start="dragging = true" @end="dragging = false" v-bind="dragOptions">
  106. <div class="list-group-item" v-for="(element,index) in select_list" :key="element.name">
  107. @{{ index+1 }} @{{ element.name }}
  108. </div>
  109. </draggable>
  110. </div>
  111. <div class="options">
  112. <h2>可选镇(街道)</h2>
  113. <draggable :list="options_list" :disabled="!enabled" class="list-group" ghost-class="ghost" @start="dragging = true" @end="dragging = false" v-bind="dragOptions">
  114. <div class="list-group-item" v-for="element in options_list" :key="element.name" v-text="element.name">
  115. </div>
  116. </draggable>
  117. </div>
  118. </div>
  119. <div class="tips">
  120. <h2 style="text-align: center;line-height: 50px;border-bottom: 1px solid #ccc">
  121. 择岗系统操作说明
  122. </h2>
  123. <div class="tips_body">
  124. <p>
  125. 1.志愿优先原则。择岗系统开放后,每名考生按照意向依次对19个镇(街道)进行排序,系统将按照考生填报的镇(街道)顺序,依次进行检索录用。
  126. </p>
  127. <p>
  128. 2.排名优先原则。择岗系统关闭后,系统将按照参与择岗的考生综合成绩分数由高到低对考生进行排名,随后依照排名先后依次检索每一名考生的镇(街道)志愿,对其进行检索录用。
  129. </p>
  130. <p>
  131. 3.检索录用原则。系统按照考生排名当检索到某个考生时,首先将匹配考生填报的第一志愿镇(街道),若此时考生填报的第一志愿镇(街道)仍有空缺的岗位名额,系统将自动将考生录用到该镇(街道),择岗就完成,并不再对考生的其余志愿镇(街道)进行检索匹配;若此时考生填报的第一志愿镇(街道)岗位员额已满,系统将继续检索考生填报的第二志愿镇(街道),以此类推,循环往复,直至考生所填报的最后一个志愿镇(街道)。
  132. </p>
  133. <p>
  134. 4.其他注意事项。若出现考生综合成绩分数一致而选择同一镇(街道)岗位的情况,按照笔试卷面成绩由高到低排序,确定优先录取顺序。若笔试的卷面成绩也相同,比较考生所录用的志愿顺序,录用志愿顺序在前者优先录用,录用志愿顺序相同的则全部、超额录用。
  135. </p>
  136. </div>
  137. </div>
  138. <div class="operation" v-if="status == 0">
  139. <el-button type="warning" @click="giveup()">放弃择岗</el-button> <el-button type="success" @click="post()">提交择岗</el-button>
  140. </div>
  141. <div id="mask" class="mask" :style="switch_mask" ></div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. @endsection
  147. @section('script')
  148. <script src="{{theme_asset('app/js/vue.min.js')}}"></script>
  149. <script src="{{theme_asset('app/js/qs.min.js')}}"></script>
  150. <script src="{{theme_asset('app/js/axios.js')}}"></script>
  151. <script src="{{theme_asset('app/js/Sortable.min.js')}}"></script>
  152. <script src="{{theme_asset('app/js/vuedraggable.umd.min.js')}}"></script>
  153. <script src="{{theme_asset('app/js/element.js')}}"></script>
  154. <script>
  155. let recruit_id = '{{ $info->recruit_id }}';
  156. let appoint_id = '{{ $info->appoint_id }}';
  157. let status = '{{ $info->status }}';
  158. const app = new Vue({
  159. el: '#app',
  160. data: {
  161. enabled: true,
  162. select_list: eval({!! $select_list !!}),
  163. options_list: eval({!! $options_list !!}),
  164. dragging: false,
  165. loading: true,
  166. post_data: {
  167. recruit_id: recruit_id,
  168. appoint_id: appoint_id,
  169. uid: '{{ $info->uid }}'
  170. },
  171. status: status,
  172. switch_mask:{}
  173. },
  174. methods: {
  175. post: function() {
  176. if(this.select_list.length != 13){
  177. this.$message.error('请对13个镇(街道)进行排序!');
  178. return false;
  179. }
  180. var msg = "您正在提交择岗的操作!";
  181. this.$confirm(msg, '警告', {
  182. confirmButtonText: '确认提交',
  183. cancelButtonText: '我再想想',
  184. type: 'warning'
  185. }).then(() => {
  186. this.loading = this.$loading({
  187. lock: false,
  188. text: '加载中',
  189. spinner: 'el-icon-loading',
  190. background: 'rgba(0, 0, 0, 0.7)'
  191. });
  192. this.post_data._token = '{{csrf_token()}}';
  193. this.post_data.select = this.select_list;
  194. axios.post("{{route('recruit.comfirm_post')}}",Qs.stringify(this.post_data)).then(response => {
  195. if(response.data.status){
  196. this.$alert(response.data.msg, '提交成功', {
  197. confirmButtonText: '确定',
  198. callback: action => {
  199. window.location.reload();
  200. }
  201. });
  202. }else{
  203. this.$message.error(response.data.msg);
  204. this.loading.close();
  205. return false;
  206. }
  207. });
  208. }).catch(() => {
  209. });
  210. },
  211. giveup: function(){
  212. var msg = "您正在进行放弃择岗的操作!";
  213. this.$confirm(msg, '警告', {
  214. confirmButtonText: '确认放弃',
  215. cancelButtonText: '我再想想',
  216. type: 'warning'
  217. }).then(() => {
  218. this.loading = this.$loading({
  219. lock: false,
  220. text: '加载中',
  221. spinner: 'el-icon-loading',
  222. background: 'rgba(0, 0, 0, 0.7)'
  223. });
  224. this.post_data._token = '{{csrf_token()}}';
  225. axios.post("{{route('recruit.give_up_post')}}",Qs.stringify(this.post_data)).then(response => {
  226. if(response.data.status){
  227. this.$alert(response.data.msg, '提交成功', {
  228. confirmButtonText: '确定',
  229. callback: action => {
  230. window.location.reload();
  231. }
  232. });
  233. }else{
  234. this.$message.error(response.data.msg);
  235. this.loading.close();
  236. return false;
  237. }
  238. });
  239. }).catch(() => {
  240. });
  241. },
  242. showMask: function(){
  243. this.switch_mask.width = '100%';
  244. this.switch_mask.height = '1400px';
  245. },
  246. rand: function(){
  247. let href = location.protocol + '//' + location.host + location.pathname;
  248. window.location.href = href;
  249. },
  250. enter: function(){
  251. this.$prompt('请输入用户ID', '提示', {
  252. confirmButtonText: '确定',
  253. cancelButtonText: '取消',
  254. inputPattern: /^-?\d+$/,
  255. inputErrorMessage: '用户ID不正确'
  256. }).then(({ value }) => {
  257. let href = location.protocol + '//' + location.host + location.pathname + '?uid='+value
  258. window.location.href = href;
  259. }).catch(() => {
  260. });
  261. }
  262. },
  263. computed: {
  264. dragOptions() {
  265. return {
  266. animation: 500,
  267. group: "description",
  268. disabled: false,
  269. ghostClass: "ghost"
  270. };
  271. }
  272. },
  273. created(){
  274. if(this.status == -1){
  275. this.showMask()
  276. }
  277. if(this.status != 0){
  278. this.enabled = false;
  279. }
  280. }
  281. })
  282. </script>
  283. @endsection