| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <!-- -->
- <template>
- <div>
- <el-container>
- <el-header style="padding: 20px;">
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
- <el-form-item label="会议主题">
- <el-input v-model="formInline.title" placeholder="会议主题" clearable ></el-input>
- </el-form-item>
- <el-form-item label="计划开始时间">
- <el-date-picker
- clearable
- v-model="formInline.stTm"
- value-format="yyyy-MM-dd HH:mm"
- format="yyyy-MM-dd HH:mm"
- type="datetime"
- placeholder="选择日期时间">
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button icon="el-icon-search" type="primary" @click="searchData">查询</el-button>
- </el-form-item>
- </el-form>
- </el-header>
- <el-main>
- <el-table
- @row-click="rowClick"
- :data="tableData"
- :height="tableHight"
- stripe
- border
- style="width: 100%">
- <el-table-column
- prop="title"
- label="会议主题"
- show-overflow-tooltip
- width="180">
- </el-table-column>
- <el-table-column
- prop="address"
- label="会议地点"
- show-overflow-tooltip
- width="180">
- </el-table-column>
- <el-table-column
- prop="content"
- label="会议内容"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- prop="stTm"
- label="计划开始时间">
- </el-table-column>
- <el-table-column
- prop="enTm"
- label="计划结束时间">
- </el-table-column>
- <el-table-column
- :formatter="isHasQuesFormatter"
- prop="isHasQues"
- label="是否有问卷">
- </el-table-column>
- <el-table-column
- :formatter="isOutFormatter"
- prop="isOut"
- label="是否签退">
- </el-table-column>
- </el-table>
- </el-main>
- <el-footer>
- <el-pagination
- style="text-align:center;"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page.sync="pageNum"
- :page-sizes="[10, 20, 30, 40, 50, 100]"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total">
- </el-pagination>
- </el-footer>
- </el-container>
- </div>
- </template>
- <script>
- //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
- //例如:import 《组件名称》 from '《组件路径》';
- import { getMeetingTableDataLists,deleteMeetingDataBase } from "../../../api/meetingAPI.js";
- export default {
- //import引入的组件需要注入到对象中才能使用
- components: {},
- props:['changeTabName'],
- data() {
- //这里存放数据
- return {
- formInline: {
- title: '',
- stTm: ''
- },
- tableHight:window.innerHeight - 360,
- tableData: [],
- pageNum:1,
- pageSize:10,
- total:0,
- };
- },
- //监听属性 类似于data概念
- computed: {},
- //监控data中的数据变化
- watch: {
- changeTabName(){
- this.getMeetingTableData();
- }
- },
- //方法集合
- methods: {
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- this.pageSize = val;
- this.getMeetingTableData();
- },
- handleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- this.pageNum = val;
- this.getMeetingTableData();
- },
- // 表格行点击事件
- rowClick(row, column, event){
- console.log(row);
- console.log(column);
- console.log(event);
- this.$emit('tableRowClick',row)
- },
- getMeetingTableData(){
- var _self = this;
- let obj = {
- "pageNum":_self.pageNum,
- "pageSize":_self.pageSize,
- "title":_self.formInline.title,
- "stTm":_self.formInline.stTm,
- "state":"4",
- }
- getMeetingTableDataLists(obj).then(response => {
- _self.tableData = response.data.list;
- _self.total = response.data.total;
- });
- },
- //查询按钮事件
- searchData(){
- this.getMeetingTableData();
- },
- //结束会议
- isHasQuesFormatter:function(row, column){
- return row.isHasQues == "1" ? '是':'否'
- },
- isOutFormatter:function(row, column){
- return row.isOut == "1" ? '是':'否'
- },
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {
- },
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- },
- beforeCreate() {}, //生命周期 - 创建之前
- beforeMount() {}, //生命周期 - 挂载之前
- beforeUpdate() {}, //生命周期 - 更新之前
- updated() {}, //生命周期 - 更新之后
- beforeDestroy() {}, //生命周期 - 销毁之前
- destroyed() {}, //生命周期 - 销毁完成
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
- }
- </script>
- <style scoped>
- </style>
|