소스 검색

删除打印

zt_yangl 4 년 전
부모
커밋
2504bf4c70
5개의 변경된 파일318개의 추가작업 그리고 7개의 파일을 삭제
  1. 0 1
      src/components/Page.vue
  2. 10 4
      src/router.js
  3. 1 2
      src/views/Home.vue
  4. 152 0
      src/views/conference/AddConference.vue
  5. 155 0
      src/views/conference/Manage.vue

+ 0 - 1
src/components/Page.vue

@@ -49,7 +49,6 @@ export default {
         }
         }
     },
     },
     created(){
     created(){
-        console.log(this.page_size)
     }
     }
 }
 }
 </script>
 </script>

+ 10 - 4
src/router.js

@@ -108,10 +108,16 @@ export default new Router({
       show: 0,
       show: 0,
       isLeaf: 1,
       isLeaf: 1,
       children: [{
       children: [{
-        path: '/conference/conference',
-        component: () => import('./views/message/Message.vue'),
-        name: '会议管理'
-      }, ]
+          path: '/conference/conference',
+          component: () => import('./views/conference/Manage.vue'),
+          name: '会议管理'
+        }, 
+        {
+          path: '/conference/conference/add',
+          component: () => import('./views/conference/AddConference.vue'),
+          name: '新增会议'
+        }, 
+      ]
     },
     },
     {
     {
       path: '/conference/signup',
       path: '/conference/signup',

+ 1 - 2
src/views/Home.vue

@@ -36,7 +36,7 @@
 		<el-container class="main">
 		<el-container class="main">
 			<!-- 左侧菜单 -->
 			<!-- 左侧菜单 -->
 			<el-aside class="left-aside" width="210px">
 			<el-aside class="left-aside" width="210px">
-				<el-menu background-color='#ffffff'	text-color='#666666' :unique-opened='false'  :default-active="$route.path" router class="left-menue" active-text-color="#3895FE">
+				<el-menu background-color='#ffffff'	text-color='#666666' :unique-opened='false'  :default-active="'/'+ $route.path.split('/')[1]+'/'+ $route.path.split('/')[2]" router class="left-menue" active-text-color="#3895FE">
 					<template v-for="(item, index) in $router.options.routes"  >
 					<template v-for="(item, index) in $router.options.routes"  >
 							<el-menu-item  v-if='item.show&&item.isLeaf' :index="item.path"  :key='index'>
 							<el-menu-item  v-if='item.show&&item.isLeaf' :index="item.path"  :key='index'>
 								<i :class="item.icon"></i>
 								<i :class="item.icon"></i>
@@ -129,7 +129,6 @@ export default {
 			})
 			})
 		},
 		},
 		active(i){
 		active(i){
-			console.log(i)
 			let that = this;
 			let that = this;
 			that.inDate.forEach( (item,index,arr) => {
 			that.inDate.forEach( (item,index,arr) => {
 				if(i != index) return item.act = false;
 				if(i != index) return item.act = false;

+ 152 - 0
src/views/conference/AddConference.vue

@@ -0,0 +1,152 @@
+<style lang="scss">
+    .preview{
+        .el-form-item{
+            margin-bottom:15px;
+        }
+        label,p{
+            line-height: 25px !important;
+        }
+    }
+</style>
+<template>
+    <section>
+        <p><span>会议管理></span>新增会议</p>
+        <div class="content">
+            <div class="filter">
+                <el-form size="small" label-width="70px" :inline="true"  label-position="left">
+                    <el-form-item label="">
+                            <el-input clearable placeholder="请输入标题" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item>
+                        <el-button  type="primary">搜索</el-button>
+                    </el-form-item>
+                    <el-form-item style="float:right" >
+                        <el-button @click="dialogVisible=true,dialogTitle='新增调查问卷'" type="primary">发送消息</el-button>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <el-table
+                    class="table"
+                    :data="list" height="57vh"
+                    border  v-loading="loading"
+                    default-expand-all row-key="id"
+                    style="width: 100%">
+                    <el-table-column
+                    prop="name"  
+                    label="标题">
+                    </el-table-column>
+                    <el-table-column
+                    prop="username"  
+                    label="发送者">
+                    </el-table-column>
+                    <el-table-column
+                    prop="username"  
+                    label="接收者">
+                    </el-table-column>
+                    <el-table-column
+                    prop=""  
+                    label="发送时间">
+                    </el-table-column>
+                    <el-table-column  
+                    prop="zip"  width="150"
+                    label="操作">
+                    <template slot-scope="">
+                        <el-button class="edit" type="text" @click="dialogVisible=true,edit=0">编辑</el-button>
+                        <el-button class="del" @click="del" type="text">删除</el-button>
+                    </template>
+                    </el-table-column>
+            </el-table>
+            <Page  ref="pageButton" :current='form.page' :page_size='form.page_size' :total='total' @pageChange='gopage'/>
+        </div>
+
+        <el-dialog
+        :title="dialogTitle" :close-on-click-modal='false'
+        :visible.sync="dialogVisible">
+        <el-form size="small" class="preview" :inline='false' label-width="80px">
+                <el-form-item label="角色名称">
+                    <el-input v-model="form1.name"></el-input>
+                </el-form-item>
+                <el-form-item label="角色权限">
+                    <!-- <el-input placeholder="请输入内容" v-model="input" class="input-with-select">
+                        <el-button slot="append" icon="el-icon-search"></el-button>
+                    </el-input> -->
+                    <el-tree
+                    :data="data"
+                    show-checkbox
+                    node-key="id" default-expand-all
+                    :props="defaultProps">
+                    </el-tree>
+                </el-form-item>
+                <el-form-item label="角色描述">
+                    <el-input v-model="form1.desc"></el-input>
+                </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+            <el-button size="small" type="primary" @click="dialogVisible = false">确 定</el-button>
+        </span>
+        </el-dialog>
+    </section>
+</template>
+<script>
+import Page from '../../components/Page';
+export default {
+  components:{
+        Page
+  },
+  data(){
+    return{
+      edit:0,
+      form:{name:'',page:1,page_size:20},
+      form1:{},
+      total:1,
+      list:[{name:'2333'}],
+      loading:false,
+      input:'',
+      dialogVisible:false,
+      dialogTitle:"",
+      defaultProps:{},
+      data: [],
+    }
+  },
+  methods:{
+      gopage(size){
+            if(size){
+                this.form.page_size=size
+            }
+            this.form.page=this.$refs.pageButton.page
+            this.getData()
+        },
+        getPermissions(){
+            this.$api.getUserPermissions().then(res=>{
+                this.data = res.data.data
+            })
+        },
+        getData(){
+            var parm=this.form;        
+            this.loading=true
+            this.$api.getEnterpriseList(parm).then(res=>{
+                this.list=res.data.data.list;
+                this.total=res.data.data.total
+                this.loading=false
+            })
+        },
+        del(id){
+                this.$confirm('确定删除吗', '提示', {
+                        type: 'warning'
+                    }).then(() => {
+                    this.$api.deleteEnterprise({id:id}).then((res)=>{
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                    })
+                })
+        },
+  },
+  created(){
+    //   this.getPermissions()
+    //   this.getData()
+  }
+}
+</script>

+ 155 - 0
src/views/conference/Manage.vue

@@ -0,0 +1,155 @@
+<style lang="scss">
+    .preview{
+        .el-form-item{
+            margin-bottom:15px;
+        }
+        label,p{
+            line-height: 25px !important;
+        }
+    }
+</style>
+<template>
+    <section>
+        <p><span>会议系统></span>会议管理</p>
+        <div class="content">
+            <div class="filter">
+                <el-form size="small" label-width="70px" :inline="true"  label-position="left">
+                    <el-form-item label="">
+                            <el-input clearable placeholder="请输入标题" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item>
+                        <el-button  type="primary">搜索</el-button>
+                    </el-form-item>
+                    <el-form-item style="float:right" >
+                        <el-button @click="addConference" type="primary">新增会议</el-button>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <el-table
+                    class="table"
+                    :data="list" height="57vh"
+                    border  v-loading="loading"
+                    default-expand-all row-key="id"
+                    style="width: 100%">
+                    <el-table-column
+                    prop="name"  
+                    label="标题">
+                    </el-table-column>
+                    <el-table-column
+                    prop="username"  
+                    label="发送者">
+                    </el-table-column>
+                    <el-table-column
+                    prop="username"  
+                    label="接收者">
+                    </el-table-column>
+                    <el-table-column
+                    prop=""  
+                    label="发送时间">
+                    </el-table-column>
+                    <el-table-column  
+                    prop="zip"  width="150"
+                    label="操作">
+                    <template slot-scope="">
+                        <el-button class="edit" type="text" @click="dialogVisible=true,edit=0">编辑</el-button>
+                        <el-button class="del" @click="del" type="text">删除</el-button>
+                    </template>
+                    </el-table-column>
+            </el-table>
+            <Page  ref="pageButton" :current='form.page' :page_size='form.page_size' :total='total' @pageChange='gopage'/>
+        </div>
+
+        <el-dialog
+        :title="dialogTitle" :close-on-click-modal='false'
+        :visible.sync="dialogVisible">
+        <el-form size="small" class="preview" :inline='false' label-width="80px">
+                <el-form-item label="角色名称">
+                    <el-input v-model="form1.name"></el-input>
+                </el-form-item>
+                <el-form-item label="角色权限">
+                    <!-- <el-input placeholder="请输入内容" v-model="input" class="input-with-select">
+                        <el-button slot="append" icon="el-icon-search"></el-button>
+                    </el-input> -->
+                    <el-tree
+                    :data="data"
+                    show-checkbox
+                    node-key="id" default-expand-all
+                    :props="defaultProps">
+                    </el-tree>
+                </el-form-item>
+                <el-form-item label="角色描述">
+                    <el-input v-model="form1.desc"></el-input>
+                </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+            <el-button size="small" type="primary" @click="dialogVisible = false">确 定</el-button>
+        </span>
+        </el-dialog>
+    </section>
+</template>
+<script>
+import Page from '../../components/Page';
+export default {
+  components:{
+        Page
+  },
+  data(){
+    return{
+      edit:0,
+      form:{name:'',page:1,page_size:20},
+      form1:{},
+      total:1,
+      list:[{name:'2333'}],
+      loading:false,
+      input:'',
+      dialogVisible:false,
+      dialogTitle:"",
+      defaultProps:{},
+      data: [],
+    }
+  },
+  methods:{
+      addConference(){
+          this.$router.push({path:'/conference/conference/add'})
+      },
+      gopage(size){
+            if(size){
+                this.form.page_size=size
+            }
+            this.form.page=this.$refs.pageButton.page
+            this.getData()
+        },
+        getPermissions(){
+            this.$api.getUserPermissions().then(res=>{
+                this.data = res.data.data
+            })
+        },
+        getData(){
+            var parm=this.form;        
+            this.loading=true
+            this.$api.getEnterpriseList(parm).then(res=>{
+                this.list=res.data.data.list;
+                this.total=res.data.data.total
+                this.loading=false
+            })
+        },
+        del(id){
+                this.$confirm('确定删除吗', '提示', {
+                        type: 'warning'
+                    }).then(() => {
+                    this.$api.deleteEnterprise({id:id}).then((res)=>{
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                    })
+                })
+        },
+  },
+  created(){
+    //   this.getPermissions()
+    //   this.getData()
+  }
+}
+</script>