123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299 |
- @extends('module.layouts.content')
- @push('meta')
- @endpush
- @push('css')
- <style >
- .op_block{
- position: relative;
- margin-top: 30px;
- }
- .draggable_content {
- width: 60%;
- float: left;
- margin: 20px 0 0;
- }
- .tips{
- float: right;
- width: 35%;
- margin: 20px 0 0;
- border: 1px solid #ccc;
- }
- .tips_body{
- padding: 20px;
- }
- .tips_body p{
- line-height: 30px;
- margin-bottom: 10px;
- font-size: 20px;
- }
- .draggable_content h2{
- line-height: 50px;
- text-align: center;
- border-bottom: 1px solid #ccc;
- }
- .draggable_content .select{
- border: 1px solid #ccc;
- width: 45%;
- margin-right: 30px;
- float: left;
- }
- .draggable_content .options{
- width: 50%;
- float: left;
- border: 1px solid #ccc;
- }
- .list-group{
- padding: 20px;
- }
- .list-group-item{
- border-radius: 10px;
- border: 1px dashed #0a9fd9;
- line-height: 30px;
- margin-bottom: 10px;
- padding: 10px 30px;
- }
- .operation{
- width: 100%;
- float: left;
- text-align: center;
- margin-top: 30px;
- }
- .mask {
- position: absolute;
- top: 0px;
- left: 0px;
- background-color: #777;
- z-index: 9;
- filter: alpha(opacity=60);
- opacity:0.5;
- -moz-opacity:0.5;
- }
- </style>
- @endpush
- @push('js')
- <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
- <link href="{{theme_asset('app/css/recruit/recruit.css')}}" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" href="{{ theme_asset('app/css/element.css') }}">
- @endpush
- @section('content')
- <div id="app">
- <div class="recruit_container clearfix">
- <div class="recruit_show_content" style="margin-top: 10px;width: 100%">
- <div class="title" style="text-align: center"><h2>晋江市公开招聘第十三批村务(社区)专职工作者择岗系统</h2></div>
- <div>
- <div class="operation">
- <el-button type="success" @click="rand()">生成随机测试数据</el-button> <el-button type="success" @click="enter()">进入指定测试数据</el-button>
- </div>
- <p style="text-align: center;line-height: 30px">当前测试数据:uid->{{ $info->uid }};recruit_id->{{ $info->recruit_id }};appoint_id->{{ $info->appoint_id }}</p>
- </div>
- <div role="alert" class="el-message el-message--error" style="position:relative" v-if="status == -1">
- <i class="el-message__icon el-icon-error"></i>
- <p class="el-message__content">您已放弃择岗</p>
- </div>
- <div role="alert" class="el-message el-message--success" style="position:relative" v-if="status == 1">
- <i class="el-message__icon el-icon-success"></i>
- <p class="el-message__content">您已提交择岗意向,请耐心等待结果!</p>
- </div>
- <div class="op_block clearfix" ref="opblock">
- <div class="draggable_content">
- <div class="select">
- <h2>意向镇(街道)</h2>
- <draggable :list="select_list" :disabled="!enabled" class="list-group" ghost-class="ghost" @start="dragging = true" @end="dragging = false" v-bind="dragOptions">
- <div class="list-group-item" v-for="element in select_list" :key="element.name" v-text="element.name">
- </div>
- </draggable>
- </div>
- <div class="options">
- <h2>可选镇(街道)</h2>
- <draggable :list="options_list" :disabled="!enabled" class="list-group" ghost-class="ghost" @start="dragging = true" @end="dragging = false" v-bind="dragOptions">
- <div class="list-group-item" v-for="element in options_list" :key="element.name" v-text="element.name">
- </div>
- </draggable>
- </div>
- </div>
- <div class="tips">
- <h2 style="text-align: center;line-height: 50px;border-bottom: 1px solid #ccc">
- 择岗系统操作说明
- </h2>
- <div class="tips_body">
- <p>
- 1.意向选择:请在右侧,按您的意向顺序,将可选镇(街道)中的选项拖曳进意向镇(街道)中。
- </p>
- <p>
- 2.意向排序:鼠标左键单击(点住),拖动排序,完成后松开。
- </p>
- <p>
- 3.意向可选择1个或多个,请根据自身情况选择。
- </p>
- <p>
- 4.每个人有且仅有一次意向选择机会,提交后无法更改,请考虑好后再行提交。
- </p>
- <p>
- 5.放弃择岗后将跳过择岗环节,后续无法再次参加。
- </p>
- </div>
- </div>
- <div class="operation" v-if="status == 0">
- <el-button type="warning" @click="giveup()">放弃择岗</el-button> <el-button type="success" @click="post()">提交择岗</el-button>
- </div>
- <div id="mask" class="mask" :style="switch_mask" ></div>
- </div>
- </div>
- </div>
- </div>
- @endsection
- @section('script')
- <script src="{{theme_asset('app/js/vue.min.js')}}"></script>
- <script src="{{theme_asset('app/js/qs.min.js')}}"></script>
- <script src="{{theme_asset('app/js/axios.js')}}"></script>
- <script src="{{theme_asset('app/js/Sortable.min.js')}}"></script>
- <script src="{{theme_asset('app/js/vuedraggable.umd.min.js')}}"></script>
- <script src="{{theme_asset('app/js/element.js')}}"></script>
- <script>
- let recruit_id = '{{ $info->recruit_id }}';
- let appoint_id = '{{ $info->appoint_id }}';
- let status = '{{ $info->status }}';
- const app = new Vue({
- el: '#app',
- data: {
- enabled: true,
- select_list: eval({!! $select_list !!}),
- options_list: eval({!! $options_list !!}),
- dragging: false,
- loading: true,
- post_data: {
- recruit_id: recruit_id,
- appoint_id: appoint_id,
- uid: '{{ $info->uid }}'
- },
- status: status,
- switch_mask:{}
- },
- methods: {
- post: function() {
- var msg = "您正在提交择岗的操作!";
- this.$confirm(msg, '警告', {
- confirmButtonText: '确认提交',
- cancelButtonText: '我再想想',
- type: 'warning'
- }).then(() => {
- this.loading = this.$loading({
- lock: false,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- this.post_data._token = '{{csrf_token()}}';
- this.post_data.select = this.select_list;
- axios.post("{{route('recruit.comfirm_post')}}",Qs.stringify(this.post_data)).then(response => {
- if(response.data.status){
- this.$alert(response.data.msg, '提交成功', {
- confirmButtonText: '确定',
- callback: action => {
- window.location.reload();
- }
- });
- }else{
- this.$message.error(response.data.msg);
- this.loading.close();
- return false;
- }
- });
- }).catch(() => {
- });
- },
- giveup: function(){
- var msg = "您正在进行放弃择岗的操作!";
- this.$confirm(msg, '警告', {
- confirmButtonText: '确认放弃',
- cancelButtonText: '我再想想',
- type: 'warning'
- }).then(() => {
- this.loading = this.$loading({
- lock: false,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- this.post_data._token = '{{csrf_token()}}';
- axios.post("{{route('recruit.give_up_post')}}",Qs.stringify(this.post_data)).then(response => {
- if(response.data.status){
- this.$alert(response.data.msg, '提交成功', {
- confirmButtonText: '确定',
- callback: action => {
- window.location.reload();
- }
- });
- }else{
- this.$message.error(response.data.msg);
- this.loading.close();
- return false;
- }
- });
- }).catch(() => {
- });
- },
- showMask: function(){
- this.switch_mask.width = '100%';
- this.switch_mask.height = '1400px';
- },
- rand: function(){
- let href = location.protocol + '//' + location.host + location.pathname;
- window.location.href = href;
- },
- enter: function(){
- this.$prompt('请输入用户ID', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- inputPattern: /^-?\d+$/,
- inputErrorMessage: '用户ID不正确'
- }).then(({ value }) => {
- let href = location.protocol + '//' + location.host + location.pathname + '?uid='+value
- window.location.href = href;
- }).catch(() => {
- });
- }
- },
- computed: {
- dragOptions() {
- return {
- animation: 200,
- group: "description",
- disabled: false,
- ghostClass: "ghost"
- };
- }
- },
- created(){
- if(this.status == -1){
- this.showMask()
- }
- if(this.status != 0){
- this.enabled = false;
- }
- }
- })
- </script>
- @endsection
|