|
@@ -6,9 +6,70 @@
|
|
|
|
|
|
@push('css')
|
|
|
<style >
|
|
|
- .container {
|
|
|
- width: 1000px;
|
|
|
- margin: 20px auto;
|
|
|
+ .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
|
|
@@ -16,20 +77,78 @@
|
|
|
@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="container">
|
|
|
- <h2>晋江市公开招聘第十三批村务(社区)专职工作者</h2>
|
|
|
- <draggable :list="list" :disabled="!enabled" class="list-group" ghost-class="ghost"
|
|
|
- :move="checkMove" @start="dragging = true" @end="dragging = false">
|
|
|
- <div class="list-group-item" v-for="element in list" :key="element.name" v-text="element.name">
|
|
|
+ <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>
|
|
|
- </draggable>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -37,24 +156,142 @@
|
|
|
|
|
|
@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,
|
|
|
- list: [
|
|
|
- { name: "1 - John", id: 0 },
|
|
|
- { name: "2 - Joao", id: 1 },
|
|
|
- { name: "3 - Jean", id: 2 }
|
|
|
- ],
|
|
|
- dragging: false
|
|
|
+ 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: {
|
|
|
- checkMove: function(e) {
|
|
|
- window.console.log("Future index: " + e.draggedContext.futureIndex);
|
|
|
+ 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;
|
|
|
}
|
|
|
}
|
|
|
})
|