From 7678c30ff853730d22a0fa374367404af8aea946 Mon Sep 17 00:00:00 2001 From: yz3456 <2753272399@qq.com> Date: 星期五, 03 五月 2024 10:22:16 +0800 Subject: [PATCH] 完成会议审批模块 --- ruoyi-ui/src/views/meeting/approve.vue | 300 +++++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 227 insertions(+), 73 deletions(-) diff --git a/ruoyi-ui/src/views/meeting/approve.vue b/ruoyi-ui/src/views/meeting/approve.vue index 076a163..0563977 100644 --- a/ruoyi-ui/src/views/meeting/approve.vue +++ b/ruoyi-ui/src/views/meeting/approve.vue @@ -1,10 +1,8 @@ <template> <div class="app-container"> - <el-backtop :bottom="150" :right="30"> <el-button type="primary" circle class="el-icon-top"></el-button> </el-backtop> - <h1 style="font-size:21px;padding-top:30px;display: flex;"> <span>浼氳瀹℃壒</span> @@ -12,128 +10,286 @@ <div style="display: flex; align-items: center;"> </div> </h1> - <hr> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> - <el-form :model="queryParams1"> - <el-row> - <el-form-item label="" prop="people"> - <el-input v-model="queryParams1.people" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" clearable style="width: 200px; + <el-form-item label="鏃堕棿" prop="happenTime"> + <el-date-picker + v-model="dateRange" + style="width: 240px; height: 35px; - text-align: left; border-radius: 16px 16px 16px 16px; - opacity: 0.5;" @keyup.enter.native="handleQuery"> - <i slot="prefix" class="el-input__icon el-icon-search"></i> - </el-input> - </el-form-item> - </el-row> + opacity: 0.5;" + value-format="yyyy-MM-dd" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + ></el-date-picker> + </el-form-item> + <el-form-item label="鍦扮偣" prop="place" > + <el-input + v-model="queryParams.place" + placeholder="璇疯緭鍏ュ湴鐐�" + clearable + style="width: 200px; + height: 35px; + border-radius: 16px 16px 16px 16px; + opacity: 0.5;" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="鐢宠閮ㄩ棬鎴栧搴�" prop="applyApart" > + <el-input + v-model="queryParams.applyApart" + placeholder="璇疯緭鍏ョ敵璇烽儴闂ㄦ垨瀹跺涵" + clearable + style="width: 200px; + height: 35px; + border-radius: 16px 16px 16px 16px; + opacity: 0.5;" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + + <el-form-item> + <el-button size="mini" @click="handleQuery" style=" width: 65px; height: 32px;background: #FFDDE3; + border-radius: 6px 6px 6px 6px;opacity:1;">鎼滅储</el-button> + <el-button size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3; + border-radius: 6px 6px 6px 6px; + opacity: 1;">閲嶇疆</el-button> + </el-form-item> </el-form> - <el-table :data="tableData" border :header-cell-style="{ background: 'pink', fontSize: '13px', color: 'black' }" - :row-class-name="tableRowClassName" :row-key="getRowId"> + + <el-table v-loading="loading" :data="meetingList" :row-key="getRowId" ref="multipleTable" + @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> + <!-- <el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> --> + + <el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80px"/> <el-table-column label="鏍囬" prop="title" sortable align="center"> <template slot-scope="scope">{{ scope.row.title ? scope.row.title : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="鍦扮偣" prop="address" sortable align="center"> + <el-table-column label="鍦扮偣" prop="place" sortable align="center"> <template slot-scope="scope">{{ - scope.row.address ? scope.row.address : '鈥斺�斺�斺��' }}</template> + scope.row.place ? scope.row.place : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="鍙绾充汉鏁�" prop="capacity" sortable align="center"> + <el-table-column label="鍙绾充汉鏁�" prop="conPeople" sortable align="center" min-width="150"> <template slot-scope="scope">{{ - scope.row.capacity ? scope.row.capacity : '鈥斺�斺�斺��' }}</template> + scope.row.conPeople ? scope.row.conPeople : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="鍙備笌浜烘暟" prop="persons" sortable align="center"> + <el-table-column label="鍙備笌浜烘暟" prop="partPeople" sortable align="center" min-width="120"> <template slot-scope="scope">{{ - scope.row.persons ? scope.row.persons : '鈥斺�斺�斺��' }}</template> + scope.row.partPeople ? scope.row.partPeople : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="鐢宠浜�" prop="applicant" sortable align="center"> + <el-table-column label="鐢宠浜�" prop="applyPerson" sortable align="center" min-width="120"> <template slot-scope="scope">{{ - scope.row.applicant ? scope.row.applicant : '鈥斺�斺�斺��' }}</template> + scope.row.applyPerson ? scope.row.applyPerson : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="鐢宠閮ㄩ棬鎴栧搴�" prop="applyOrganization" sortable align="center"> + <el-table-column label="鐢宠閮ㄩ棬鎴栧搴�" prop="applyApart" sortable align="center" min-width="150"> <template slot-scope="scope">{{ - scope.row.applyOrganization ? scope.row.applyOrganization : '鈥斺�斺�斺��' }}</template> + scope.row.applyApart ? scope.row.applyApart : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="寮�濮嬫椂闂�" prop="begin" sortable align="center"> - <template slot-scope="scope">{{ scope.row.begin - ? scope.row.begin : '鈥斺�斺�斺��' }}</template> + <el-table-column label="寮�濮嬫椂闂�" prop="startTime" sortable align="center"min-width="120"> + <template slot-scope="scope">{{ scope.row.startTime + ? scope.row.startTime : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="缁撴潫鏃堕棿" prop="end" sortable align="center"> - <template slot-scope="scope">{{ scope.row.end ? - scope.row.end : '鈥斺�斺�斺��' }}</template> + <el-table-column label="缁撴潫鏃堕棿" prop="endTime" sortable align="center" min-width="120"> + <template slot-scope="scope">{{ scope.row.endTime ? + scope.row.endTime : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="鏄惁鎽嗘斁姘寸墝" prop="card" sortable align="center"> - <template slot-scope="scope">{{ scope.row.card - ? scope.row.card : '鈥斺�斺�斺��' }}</template> + <el-table-column label="鏄惁鎽嗘斁姘寸墝" prop="isPlacebrand" sortable align="center" min-width="150"> + <template slot-scope="scope">{{scope.row.isPlacebrand===1? '鏄�': '鍚�'}}</template> </el-table-column> - <el-table-column label="鑱旂郴浜�" prop="name" sortable align="center"> - <template slot-scope="scope">{{ scope.row.name ? - scope.row.name : '鈥斺�斺�斺��' }}</template> + <el-table-column label="鑱旂郴浜�" prop="connPerson" sortable align="center" min-width="100"> + <template slot-scope="scope">{{ scope.row.connPerson ? + scope.row.connPerson : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="鑱旂郴鐢佃瘽" prop="phone" sortable align="center"> - <template slot-scope="scope">{{ scope.row.phone - ? scope.row.phone : '鈥斺�斺�斺��' }}</template> + <el-table-column label="鑱旂郴鐢佃瘽" prop="connPhone" sortable align="center" min-width="100"> + <template slot-scope="scope">{{ scope.row.connPhone + ? scope.row.connPhone : '鈥斺�斺�斺��' }}</template> </el-table-column> - <el-table-column label="瀹℃壒鐘舵��" prop="status" sortable align="center"> - <template slot-scope="scope">{{ scope.row.status - ? scope.row.status : '鈥斺�斺�斺��' }}</template> + <el-table-column label="鐘舵��" prop="statu" sortable align="center"> + <template slot-scope="scope">{{scope.row.statu===1? '鍚屾剰': '鎷掔粷'}}</template> </el-table-column> - <el-table-column label="鎿嶄綔" align="center" width="250" class-name="small-padding fixed-width"> + <el-table-column label="鎿嶄綔" align="center" width="200" class-name="small-padding fixed-width"> <template slot-scope="scope" v-if="scope.row.roleId !== 1"> <div class="button-container"> - <el-button v-show="agree" size="mini" type="text" @click="agree(scope.row)">鍚屾剰</el-button> - <el-button v-show="agree" size="mini" type="text" icon="el-icon-delete">鎷掔粷</el-button> - <el-button v-show="agree1" size="mini" type="text" icon="el-icon-delete">閲嶆柊瀹℃壒</el-button> + <el-button size="mini" type="text" icon="el-icon-edit" @click="agree(scope.row)">鍚屾剰</el-button> + <el-button size="mini" type="text" icon="el-icon-delete" @click="refuse(scope.row)">鎷掔粷</el-button> <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button> </div> </template> </el-table-column> </el-table> + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + style="background: #FEF7FC;" + /> </div> </template> <script> + import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; + import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; + + + import { Notification, MessageBox, Message, Loading } from 'element-ui' + //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁� --鎺ュソ浜� + import {listMeeting2,updateStatu} from "@/api/meeting/index"; export default { + created() { + this.getList(); + }, data() { return { - tableData: [ - { title: '1', name: 'asasd', address: 'asdadsdasd', id: 9, age: '30' }, - { title: '2', name: 'qweqwqwe', address: 'qweqweqwe', id: 2, age: '30' }, - { title: '3', name: 'zxczxczxc', address: 'zxczxczcx', id: 3, age: '30' }, - { title: '4', name: 'fghfghfh', address: 'fghfghfgh', id: 4, age: '30' }, - { title: '5', name: 'rtyrtyrty', address: 'rtyrtyrty', id: 5, age: '30' }, - { title: '6', name: 'yuiyuiyui', address: 'yuiyuiyui', id: 6, age: '30' }, - { title: '7', name: 'hjkljkljk', address: 'jkljklhlkjl', id: 7, age: '30' }, - ], - queryParams1: { + formDat1:{ + id:undefined, + statu:undefined + }, + // 鏄剧ず鎼滅储鏉′欢 + loading: true, + showSearch: true, + open: false, + title: "", + // 鎬绘潯鏁� + total: 0, + meetingList: [], + formDat:{ + id: undefined, + title: undefined, + place: undefined, + conPeople: undefined, + partPeople: undefined, + applyPerson: undefined, + applyApart: undefined, + startTime: undefined, + endTime: undefined, + happenStartTime: undefined, + happenEndTime: undefined, + isPlacebrand: undefined, + connPerson: undefined, + connPhone: undefined, + statu: undefined, + createTime: undefined + }, + queryParams: { pageNum: 1, pageSize: 10, - happenTime: undefined, - people: undefined, - address: undefined, - title: undefined, - remark: undefined, - status: undefined, - agree1: false, - agree: true, + place:undefined, + apply_Apart:undefined, + start_Time:undefined, + applyPerson:undefined + }, + dateRange: [], + // 琛ㄥ崟鏍¢獙 + rules: {}, + typeOptions: [ + { + value: '1', + label: '鏄�', + }, + { + value: '0', + label: '鍚�', + } + ], + typeOptions2: [ + { + value: '1', + label: '鍚屾剰', + }, + { + value: '0', + label: '鎷掔粷', + } + ], } - } }, methods: { + agree(row){ + this.formDat1.id = row.id + this.formDat1.statu = 1 + // this.$refs['elForm'].validate(valid => { + // if (valid) { + if (row.id != undefined) { + updateStatu(this.formDat1).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + // this.btn = false + }); + } else { + this.$modal.msgSuccess("淇敼澶辫触"); + } + this.getList(); + this.getList(); + // } + // }) + }, + refuse(row){ + this.formDat1.id = row.id + this.formDat1.statu = 0 + if (row.id != undefined) { + updateStatu(this.formDat1).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + // this.btn = false + }); + } else { + this.$modal.msgSuccess("淇敼澶辫触"); + } + this.getList(); + this.getList(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + // alert(this.ids) + this.single = selection.length!=1 + this.multiple = !selection.length + }, + getList() { + this.loading = true; + this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0] + this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] + listMeeting2(this.queryParams).then(response => { + this.meetingList = response.data.data; + + this.total = response.data.total; + this.loading = false; + } + + ); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.dateRange = []; + this.resetForm("queryForm"); + this.handleQuery(); + }, + + tableRowClassName({ row, rowIndex }) { @@ -147,14 +303,7 @@ return row.id }, - agree(row){ - this.agree1 = true - this.agree = false - row.status = '鍚屾剰' - - alert(row.status) - }, // 鏌ョ湅璇︾粏淇℃伅 handleCheck(row){ const id = row.id; @@ -168,6 +317,11 @@ }); }, + + + + + } } </script> -- Gitblit v1.9.1