فهرست منبع

Merge branch 'master' of http://118.190.145.217:3000/xiaojincai/zky-admin

xjc 4 سال پیش
والد
کامیت
814a3273a5
6فایلهای تغییر یافته به همراه198 افزوده شده و 49 حذف شده
  1. 12 0
      src/api.js
  2. 55 19
      src/components/hotel.vue
  3. 2 0
      src/views/activity/AddActivity.vue
  4. 99 20
      src/views/conference/Checker.vue
  5. 16 5
      src/views/conference/Hotel.vue
  6. 14 5
      src/views/conference/Manage.vue

+ 12 - 0
src/api.js

@@ -70,6 +70,9 @@ export default {
 	getAllSysUserList: params => {
 	getAllSysUserList: params => {
 		return axios.get(`${baseURL}/api/admin/user/all`, { params: params })
 		return axios.get(`${baseURL}/api/admin/user/all`, { params: params })
 	},
 	},
+	getUserinfoList: params => {
+		return axios.get(`${baseURL}/api/admin/userinfo/list`, { params: params })
+	},
 	// 获取用户待选期刊列表
 	// 获取用户待选期刊列表
 	getUserJournals: () => {
 	getUserJournals: () => {
 		return axios.get(`${baseURL}/api/admin/user/journals`)
 		return axios.get(`${baseURL}/api/admin/user/journals`)
@@ -276,6 +279,15 @@ export default {
 	getVerifierList: params => {
 	getVerifierList: params => {
 		return axios.get(`${baseURL}/api/admin/verifier/list`, { params: params });
 		return axios.get(`${baseURL}/api/admin/verifier/list`, { params: params });
 	},
 	},
+	addVerifier: params => {
+		return axios.post(`${baseURL}/api/admin/verifier`, params);
+	},
+	deleteVerifier: params => {
+		return axios.delete(`${baseURL}/api/admin/verifier`, {params:params});
+	},
+	addConferenceHotel: params => {
+		return axios.post(`${baseURL}/api/admin/conference/hotel`, params);
+	},
 	getHotelList: params => {
 	getHotelList: params => {
 		return axios.get(`${baseURL}/api/admin/hotel/list`, { params: params });
 		return axios.get(`${baseURL}/api/admin/hotel/list`, { params: params });
 	},
 	},

+ 55 - 19
src/components/hotel.vue

@@ -69,7 +69,7 @@
                 </el-col>                
                 </el-col>                
                 <el-col :span="10">
                 <el-col :span="10">
                    <el-form-item label="选择历史酒店">
                    <el-form-item label="选择历史酒店">
-                        <el-select placeholder="请选择酒店" @change="getData" v-model="cur_id" clearable filterable>
+                        <el-select placeholder="请选择酒店" @change="id=h_id,getData()" v-model="h_id" clearable filterable>
                             <el-option
                             <el-option
                                 v-for="(item, index) in organizerList"
                                 v-for="(item, index) in organizerList"
                                 :key="index"
                                 :key="index"
@@ -286,6 +286,7 @@ export default {
     data(){
     data(){
         return{
         return{
             id:'',
             id:'',
+            h_id:'',
             dialogVisible:false,
             dialogVisible:false,
             h_status:'view',
             h_status:'view',
             organizerList:[],
             organizerList:[],
@@ -307,10 +308,18 @@ export default {
         }
         }
     },
     },
     methods:{
     methods:{
+        getList(){
+            this.$api.getHotelList().then(res=>{
+                this.organizerList=res.data.data.list;
+            })
+        },
         getData() {
         getData() {
-            this.$api.getHotel({id:this.cur_id}).then((res) => {
-                this.form = res.data.data;
-                this.type=res.data.data.rooms
+            this.$api.getHotel({id:this.id}).then((res) => {
+                if(res.data.data){
+                    this.form = res.data.data;
+                    this.type=res.data.data.rooms
+                }
+                
             });
             });
         },
         },
         //添加房型
         //添加房型
@@ -407,28 +416,44 @@ export default {
         save(type){
         save(type){
             var form=this.form;
             var form=this.form;
             form.rooms=this.type;
             form.rooms=this.type;
-            if(this.h_status == 'add' || this.h_status == 'bind'){
-                this.$api.addHotel(form).then(res=>{
+            
+            //会议添加酒店
+            if(this.h_status == 'bind'){
+                form.conference_id=this.huiyi_id;
+                this.$api.addConferenceHotel(form).then(res=>{
                     if(res.data.code == 0){
                     if(res.data.code == 0){
                         this.$message({
                         this.$message({
                                     message: '添加成功',
                                     message: '添加成功',
                                     type: 'success'
                                     type: 'success'
                         })
                         })
-                        if(this.h_status == 'add'){
-                            if(type==1){
+                        if(type==1){
                                 this.form={imgs:[]};
                                 this.form={imgs:[]};
                                 this.type=[{imgs:[]}];
                                 this.type=[{imgs:[]}];
-                            }else{
+                        }else{
                                 this.$emit('addSuccess')
                                 this.$emit('addSuccess')
-                            }
+                        }
+                    }else{
+                        this.$message({
+                                    message: res.data.message,
+                                    type: 'error'
+                        })
+                    }
+                })
+            }
+            //添加酒店
+            if(this.h_status == 'add'){
+                this.$api.addHotel(form).then(res=>{
+                    if(res.data.code == 0){
+                        this.$message({
+                                    message: '添加成功',
+                                    type: 'success'
+                        })
+                        if(type==1){
+                                this.form={imgs:[]};
+                                this.type=[{imgs:[]}];
                         }else{
                         }else{
-                            //绑定酒店
-                            this.$api.putConference().then(res=>{
-                                
-                            })
+                                this.$emit('addSuccess')
                         }
                         }
-                        
-                        
                     }else{
                     }else{
                         this.$message({
                         this.$message({
                                     message: res.data.message,
                                     message: res.data.message,
@@ -436,7 +461,8 @@ export default {
                         })
                         })
                     }
                     }
                 })
                 })
-            }else{
+            }
+            if(this.h_status == 'edit'){
                 this.$api.editHotel(form).then(res=>{
                 this.$api.editHotel(form).then(res=>{
                     if(res.data.code == 0){
                     if(res.data.code == 0){
                         this.$message({
                         this.$message({
@@ -489,21 +515,31 @@ export default {
     },
     },
     watch:{
     watch:{
         status(curVal,oldVal){
         status(curVal,oldVal){
+            //类型变化,下拉框id清空,添加时:数据清空,修改时:获取数据
             this.h_status=curVal
             this.h_status=curVal
+            this.h_id='';
+            this.getList()
             if(curVal!='add' && curVal!='bind'){
             if(curVal!='add' && curVal!='bind'){
                 this.getData();
                 this.getData();
             }
             }
+            if(curVal=='add'){
+                this.form={imgs:[]};
+                this.type=[{imgs:[]}];
+            }
         },
         },
-        cur_id(){
+        cur_id(curVal){
+            //id变化时,赋值给id
+            this.id=curVal;
             this.getData();
             this.getData();
+            this.getList()
         }
         }
     },
     },
     created(){
     created(){
-        console.log(this.huiyi_id,this.huiyi_name)
         this.$api.getHotelList().then(res=>{
         this.$api.getHotelList().then(res=>{
                 this.organizerList=res.data.data.list;
                 this.organizerList=res.data.data.list;
         })
         })
         this.h_status=this.status;
         this.h_status=this.status;
+        this.id=this.cur_id;
         if(this.h_status!='add'&&this.h_status!='bind'){
         if(this.h_status!='add'&&this.h_status!='bind'){
                 this.getData();
                 this.getData();
         }
         }

+ 2 - 0
src/views/activity/AddActivity.vue

@@ -409,6 +409,8 @@ export default {
             this.id=this.$route.query.id;
             this.id=this.$route.query.id;
             this.$api.getActivity({id:this.id}).then(res=>{
             this.$api.getActivity({id:this.id}).then(res=>{
                 this.form=res.data.data
                 this.form=res.data.data
+                this.form.is_popular=Boolean(this.form.is_popular)
+                this.form.is_recommend=Boolean(this.form.is_recommend)
                 this.form.citys=this.form.city.split(' ')
                 this.form.citys=this.form.city.split(' ')
                 this.form.time=[this.form.begin_time,this.form.end_time]
                 this.form.time=[this.form.begin_time,this.form.end_time]
             })
             })

+ 99 - 20
src/views/conference/Checker.vue

@@ -12,10 +12,18 @@
             <div class="filter">
             <div class="filter">
                 <el-form size="small" label-width="70px" :inline="true"  label-position="left">
                 <el-form size="small" label-width="70px" :inline="true"  label-position="left">
                     <el-form-item label="">
                     <el-form-item label="">
-                            <el-select v-model="form.id" clearable placeholder="请选择会议"></el-select>
+                             <el-select v-model="form.conference_id" clearable placeholder="请选择会议">
+                                <el-option
+                                    v-for="(item, index) in conference_list"
+                                    :key="index"
+                                    :label="item.name"
+                                    :value="item.id"
+                                ></el-option>
+                            </el-select>
                     </el-form-item>
                     </el-form-item>
                     <el-form-item label="">
                     <el-form-item label="">
-                            <el-select v-model="form.id" clearable placeholder="请选择核销员"></el-select>
+                            <el-input  clearable placeholder="请输入姓名" v-model="form.user_name">
+                            </el-input>
                     </el-form-item>
                     </el-form-item>
                     <el-form-item>
                     <el-form-item>
                         <el-button @click="getData" type="primary">搜索</el-button>
                         <el-button @click="getData" type="primary">搜索</el-button>
@@ -36,10 +44,10 @@
                     <el-table-column
                     <el-table-column
                     prop="name"  
                     prop="name"  
                     label="核销员头像">
                     label="核销员头像">
-                    <template slot-scope="scope"><img width="100" :src="scope.row.avatar" alt=""></template>
+                    <template slot-scope="scope"><img width="100" :src="scope.row.user_avatar" alt=""></template>
                     </el-table-column>
                     </el-table-column>
                     <el-table-column
                     <el-table-column
-                    prop="name"  
+                    prop="user_name"  
                     label="核销员昵称">
                     label="核销员昵称">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column
                     <el-table-column
@@ -58,7 +66,7 @@
                     <el-table-column  
                     <el-table-column  
                     prop="zip"  width="100" fixed="right"
                     prop="zip"  width="100" fixed="right"
                     label="操作">
                     label="操作">
-                    <template slot-scope="">
+                    <template slot-scope="scope">
                         <el-button @click="del(scope.row.id)" class="edit"  type="text" >解除核销员</el-button>
                         <el-button @click="del(scope.row.id)" class="edit"  type="text" >解除核销员</el-button>
                     </template>
                     </template>
                     </el-table-column>
                     </el-table-column>
@@ -69,34 +77,61 @@
         <el-dialog width="70%"
         <el-dialog width="70%"
         title="添加核销员" :close-on-click-modal='false'
         title="添加核销员" :close-on-click-modal='false'
         :visible.sync="dialogVisible">
         :visible.sync="dialogVisible">
-           <el-button size="small" type="primary">点击获取会议列表</el-button>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="small" type="primary">确 定</el-button>
-            </span>
-        </el-dialog>
-        <el-dialog width="70%"
-        title="会议列表" :close-on-click-modal='false'
-        :visible.sync="dialogVisible1">
            <el-table
            <el-table
                     class="table"
                     class="table"
-                    :data="list"
+                    :data="conference_list"
                     default-expand-all 
                     default-expand-all 
                     style="width: 100%">
                     style="width: 100%">
                     <el-table-column
                     <el-table-column
+                    width="55">
+                    <template slot-scope="scope"><el-radio v-model="check" :label="scope.row.id">&nbsp;</el-radio></template>
+                    </el-table-column>
+                    <el-table-column
                     prop="name"  
                     prop="name"  
                     label="会议名称">
                     label="会议名称">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column
                     <el-table-column
                     prop="name"  
                     prop="name"  
                     label="会议头像">
                     label="会议头像">
+                        <template slot-scope="scope"><img width="100" :src="scope.row.img" alt=""></template>
                     </el-table-column>
                     </el-table-column>
                     <el-table-column
                     <el-table-column
-                    prop="name"  
+                    prop="ctime"  
                     label="创建时间">
                     label="创建时间">
                     </el-table-column>
                     </el-table-column>
+           </el-table>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="sure" size="small" type="primary">确 定</el-button>
+            </span>
+        </el-dialog>
+        <el-dialog width="70%"
+        title="备选核销员列表" :close-on-click-modal='false'
+        :visible.sync="dialogVisible1">
+         <el-input @change="getUser"  clearable placeholder="请输入姓名" v-model="name">
+              <el-button @click="getUser"  slot="append" icon="el-icon-search"></el-button>
+         </el-input>
+           <el-table
+                    class="table"
+                    :data="user_list" height="400"
+                    default-expand-all 
+                    style="width: 100%;margin-top:10px;">
+                    <el-table-column
+                    width="55">
+                    <template slot-scope="scope"><el-radio v-model="check1" :label="scope.row.id">&nbsp;</el-radio></template>
+                    </el-table-column>
+                    <el-table-column
+                    prop="nickname"  
+                    label="用户昵称">
+                    </el-table-column>
+                    <el-table-column
+                    prop=""  
+                    label="用户头像">
+                    <template slot-scope="scope"><img width="100" :src="scope.row.avatar" alt=""></template>
+                    </el-table-column>
            </el-table>
            </el-table>
            <span slot="footer" class="dialog-footer">
            <span slot="footer" class="dialog-footer">
-                <el-button size="small" type="primary">确 定</el-button>
+               <el-button @click="dialogVisible1=false" size="small">返回</el-button>
+                <el-button @click="add" size="small" type="primary">确认选择</el-button>
             </span>
             </span>
         </el-dialog>
         </el-dialog>
     </section>
     </section>
@@ -113,8 +148,13 @@ export default {
             list:[{}],
             list:[{}],
             dialogVisible:false,
             dialogVisible:false,
             dialogVisible1:false,
             dialogVisible1:false,
+            conference_list:[],
+            user_list:[],
             loading:false,
             loading:false,
-            total:0
+            total:0,
+            check:'',
+            check1:'',
+            name:''
         }
         }
     },
     },
     methods:{
     methods:{
@@ -125,14 +165,32 @@ export default {
             this.form.page=this.$refs.pageButton.page
             this.form.page=this.$refs.pageButton.page
             this.getData()
             this.getData()
         },
         },
+        add(){
+            this.$api.addVerifier({conference_id:this.check,user_id:this.check1}).then(res=>{
+                    if(res.data.code == 0){
+                        this.$message({
+                            message: '添加成功',
+                            type: 'success'
+                        })
+                        this.dialogVisible=false;
+                        this.dialogVisible1=false;
+                        this.getData();
+                    }else{
+                        this.$message({
+                            message: res.data.message,
+                            type: 'error'
+                        })
+                    }
+            })
+        },
         del(id){
         del(id){
-                this.$confirm('确定删除吗', '提示', {
+                this.$confirm('确定解除', '提示', {
                         type: 'warning'
                         type: 'warning'
                     }).then(() => {
                     }).then(() => {
-                    this.$api.delUser({id:id}).then((res)=>{
+                    this.$api.deleteVerifier({id:id}).then((res)=>{
                         if(res.data.code==0){
                         if(res.data.code==0){
                             this.$message({
                             this.$message({
-                                message: '删除成功',
+                                message: '除成功',
                                 type: 'success'
                                 type: 'success'
                             })
                             })
                             this.getData()
                             this.getData()
@@ -150,10 +208,31 @@ export default {
                 this.total=res.data.data.total
                 this.total=res.data.data.total
                 this.loading=false
                 this.loading=false
             })
             })
+            this.$api.getConferenceList().then(res=>{
+                this.conference_list=res.data.data.list;
+            })
+            
         },
         },
+        getUser(){
+            this.$api.getUserinfoList({name:this.name}).then(res=>{
+                this.user_list=res.data.data.list;
+            })
+        },
+        sure(){
+            if(this.check){
+                this.dialogVisible1=true
+            }else{
+                this.$message({
+                            message: '请选择会议',
+                            type: 'error'
+                })
+            }
+            
+        }
     },
     },
     created(){
     created(){
         this.getData();
         this.getData();
+        this.getUser();
     }
     }
 }
 }
 </script>
 </script>

+ 16 - 5
src/views/conference/Hotel.vue

@@ -34,13 +34,21 @@
             <div class="filter">
             <div class="filter">
                 <el-form size="small" label-width="70px" :inline="true"  label-position="left">
                 <el-form size="small" label-width="70px" :inline="true"  label-position="left">
                     <el-form-item label="">
                     <el-form-item label="">
-                            <el-select v-model="form.id" clearable placeholder="请选择会议"></el-select>
+                            <el-select v-model="form.conference_id" clearable placeholder="请选择会议">
+                                <el-option
+                                    v-for="(item, index) in conference_list"
+                                    :key="index"
+                                    :label="item.name"
+                                    :value="item.id"
+                                ></el-option>
+                            </el-select>
                     </el-form-item>
                     </el-form-item>
                     <el-form-item label="">
                     <el-form-item label="">
-                            <el-select v-model="form.id" clearable placeholder="请选择酒店"></el-select>
+                            <el-input  clearable placeholder="请输入酒店名称" v-model="form.name">
+                            </el-input>
                     </el-form-item>
                     </el-form-item>
                     <el-form-item>
                     <el-form-item>
-                        <el-button  type="primary">搜索</el-button>
+                        <el-button @click="getData" type="primary">搜索</el-button>
                     </el-form-item>
                     </el-form-item>
                     <el-form-item style="float:right" >
                     <el-form-item style="float:right" >
                         <el-button @click="dialogVisible=true,dialogTitle='添加酒店',status='add'"  icon="el-icon-plud" type="primary">添加酒店</el-button>
                         <el-button @click="dialogVisible=true,dialogTitle='添加酒店',status='add'"  icon="el-icon-plud" type="primary">添加酒店</el-button>
@@ -113,7 +121,8 @@ export default {
             dialogTitle:'添加酒店',
             dialogTitle:'添加酒店',
             dialogVisible:false,
             dialogVisible:false,
             status:'add',
             status:'add',
-            cur_id:''
+            cur_id:'',
+            conference_list:[]
         }
         }
     },
     },
     methods:{
     methods:{
@@ -156,7 +165,9 @@ export default {
     },
     },
     created(){
     created(){
         this.getData()
         this.getData()
-        
+        this.$api.getConferenceList().then(res=>{
+                this.conference_list=res.data.data.list;
+        })
     }
     }
 }
 }
 </script>
 </script>

+ 14 - 5
src/views/conference/Manage.vue

@@ -85,12 +85,13 @@
                     label="状态">
                     label="状态">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column  
                     <el-table-column  
-                    prop="zip"  width="200" fixed="right"
+                    prop="zip"  width="220" fixed="right"
                     label="操作">
                     label="操作">
                     <template slot-scope="scope">
                     <template slot-scope="scope">
-                        <el-button  @click="dialogVisible=true,status='bind',cur_id=scope.row.id,name=scope.row.name"  type="text" >添加酒店</el-button>
-                        <el-button @click="$router.push({path:'/conference/conference/add',query:{id:scope.row.id}})" class="edit" type="text">编辑</el-button>
-                        <el-button @click="del(scope.row.id)" type="text" class="del">删除</el-button>
+                        <el-button  @click="dialogVisible1=true,cur_id=scope.row.id,name=scope.row.name"  type="text" >管理酒店</el-button>
+                        <!-- <el-button  @click="dialogVisible=true,status='bind',cur_id=scope.row.id,name=scope.row.name"  type="text" >添加酒店</el-button> -->
+                        <el-button @click="$router.push({path:'/conference/conference/add',query:{id:scope.row.id}})" class="edit" type="text">编辑会议</el-button>
+                        <el-button @click="del(scope.row.id)" type="text" class="del">删除会议</el-button>
 
 
                     </template>
                     </template>
                     </el-table-column>
                     </el-table-column>
@@ -98,6 +99,12 @@
             <Page  ref="pageButton" :current='form.page' :page_size='form.page_size' :total='total' @pageChange='gopage'/>
             <Page  ref="pageButton" :current='form.page' :page_size='form.page_size' :total='total' @pageChange='gopage'/>
         </div>
         </div>
 
 
+        <el-dialog width="80%" class="hotel"
+        title="酒店列表" :close-on-click-modal='false'
+        :visible.sync="dialogVisible1">
+            会议名称:{{name}}
+            <el-button size="small" @click="dialogVisible=true,status='bind'" type="primary">添加酒店</el-button>
+        </el-dialog>
         <el-dialog width="80%" class="hotel"
         <el-dialog width="80%" class="hotel"
         :title="dialogTitle" :close-on-click-modal='false'
         :title="dialogTitle" :close-on-click-modal='false'
         :visible.sync="dialogVisible">
         :visible.sync="dialogVisible">
@@ -126,6 +133,7 @@ export default {
       loading:false,
       loading:false,
       input:'',
       input:'',
       dialogVisible:false,
       dialogVisible:false,
+      dialogVisible1:false,
       dialogTitle:"添加酒店",
       dialogTitle:"添加酒店",
       defaultProps:{},
       defaultProps:{},
       data: [],
       data: [],
@@ -137,7 +145,8 @@ export default {
       },
       },
       //添加酒店
       //添加酒店
       add(){
       add(){
-
+          this.dialogVisible=false;
+         
       },
       },
       gopage(size){
       gopage(size){
             if(size){
             if(size){