application.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <!--授权日志-->
  2. <template>
  3. <div class="application">
  4. <div class="application-page" v-if="pageType == 1">
  5. <div class="title-box">
  6. <div @click="titleClick(1)">
  7. <p>门禁授权</p>
  8. <p></p>
  9. </div>
  10. <div @click="titleClick(2)">
  11. <p>授权日志</p>
  12. <p class="bottom-p-color"></p>
  13. </div>
  14. </div>
  15. <div class="application-min">
  16. <el-form :model="queryParamsData" ref="queryForm" :inline="true">
  17. <el-form-item label="关键字" prop="searchValue" label-width="68px">
  18. <el-input
  19. maxlength="20"
  20. v-model="queryParamsData.searchValue"
  21. placeholder="姓名/实验室"
  22. clearable
  23. size="small"/>
  24. </el-form-item>
  25. <!-- <el-form-item label="状态" prop="status" label-width="50px">-->
  26. <!-- <el-select v-model="queryParamsData.operate" clearable placeholder="请选择状态">-->
  27. <!-- <el-option-->
  28. <!-- v-for="item in optionsListTwo"-->
  29. <!-- :key="item.code"-->
  30. <!-- :label="item.name"-->
  31. <!-- :value="item.code">-->
  32. <!-- </el-option>-->
  33. <!-- </el-select>-->
  34. <!-- </el-form-item>-->
  35. <el-form-item>
  36. <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
  37. <p class="reset-button-one" @click="resetQuery">重置</p>
  38. </el-form-item>
  39. </el-form>
  40. <el-table v-loading="loading" border :data="tableList">
  41. <el-table-column label="名称" align="center" prop="nickName" show-overflow-tooltip/>
  42. <el-table-column label="类别" align="center" prop="userType" show-overflow-tooltip/>
  43. <el-table-column label="门禁" align="center" prop="hardName" show-overflow-tooltip/>
  44. <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip/>
  45. <el-table-column label="实验室所属学院" align="center" prop="deptName" show-overflow-tooltip/>
  46. <el-table-column label="实验室位置" align="center" prop="posi" width="160px" show-overflow-tooltip/>
  47. <el-table-column label="操作内容" align="center" prop="remark" width="160px" show-overflow-tooltip/>
  48. <el-table-column label="操作时间" align="center" prop="createTime" width="160px" show-overflow-tooltip/>
  49. <el-table-column label="操作人" align="center" prop="createBy" width="160px" show-overflow-tooltip/>
  50. </el-table>
  51. <pagination :page-sizes="[20, 30, 40, 50]"
  52. v-show="total>0"
  53. :total="total"
  54. :page.sync="queryParamsData.pageNum"
  55. :limit.sync="queryParamsData.pageSize"
  56. @pagination="getList"/>
  57. </div>
  58. </div>
  59. <addPage v-if="pageType == 2"></addPage>
  60. </div>
  61. </template>
  62. <script>
  63. import { applyList, entranceUserLogList } from '@/api/laboratory/subject'
  64. import addPage from "./addPage.vue";
  65. export default {
  66. name: "application",
  67. components: {
  68. addPage
  69. },
  70. data(){
  71. return{
  72. pageType:1,
  73. // table操作按钮校验
  74. tableButtonType:this.hasPermiDom(['system:user_student:query','system:user_student:query']),
  75. loading:false,
  76. // 搜索数据
  77. queryParamsData:{
  78. pageNum:1,
  79. pageSize:20,
  80. searchValue:'',
  81. operate:'',
  82. },
  83. // 搜索实际发送数据
  84. queryParams:{
  85. pageNum:1,
  86. pageSize:20,
  87. },
  88. dateRange:[],
  89. //数据数量
  90. total:10,
  91. tableList:[],
  92. //审批状态
  93. optionsListTwo:[{code:null,name:'全部'},{code:0,name:'离线'},{code:2,name:'在线'}],
  94. }
  95. },
  96. created() {
  97. },
  98. mounted(){
  99. this.getList();
  100. },
  101. methods:{
  102. titleClick(type){
  103. this.$parent.titleClick(type);
  104. },
  105. //页面状态切换
  106. goPageButton(type){
  107. if(type == 1){
  108. this.pageType = 1;
  109. }else if(type == 2){
  110. this.pageType = 2;
  111. }else if(type == 3){
  112. this.resetQuery();
  113. this.pageType = 1;
  114. }
  115. },
  116. /** 搜索按钮操作 */
  117. handleQuery() {
  118. this.queryParamsData.pageNum = 1;
  119. this.queryParamsData.pageSize = 20;
  120. this.getList();
  121. },
  122. /** 重置按钮操作 */
  123. resetQuery() {
  124. this.$set(this,'queryParamsData',{});
  125. this.$set(this,'dateRange',[]);
  126. this.handleQuery();
  127. },
  128. //获取数据列表
  129. getList(){
  130. if(this.dateRange&&this.dateRange.length>0) {
  131. this.queryParamsData.startTime = this.dateRange[0];
  132. this.queryParamsData.endTime = this.dateRange[1];
  133. } else {
  134. this.queryParamsData.startTime = null;
  135. this.queryParamsData.endTime = null;
  136. }
  137. entranceUserLogList(this.queryParamsData).then(response => {
  138. this.tableList = response.rows;
  139. this.total = response.total
  140. });
  141. },
  142. }
  143. }
  144. </script>
  145. <style scoped lang="scss">
  146. .application{
  147. flex:1;
  148. display: flex;
  149. flex-direction: column;
  150. .application-page{
  151. flex:1;
  152. display: flex;
  153. flex-direction: column;
  154. overflow: hidden;
  155. .title-box{
  156. display: flex;
  157. border-bottom:1px solid #E0E0E0;
  158. margin-bottom:20px;
  159. div{
  160. height:80px;
  161. margin-right:20px;
  162. cursor: pointer;
  163. p:nth-child(1){
  164. font-size:18px;
  165. text-align: center;
  166. padding:0 20px;
  167. margin-top:26px;
  168. }
  169. p:nth-child(2){
  170. width:40px;
  171. height:4px;
  172. border-radius:40px;
  173. margin:12px auto;
  174. }
  175. .top-p-color{
  176. color: #0045AF;
  177. }
  178. .bottom-p-color{
  179. background: #0045AF;
  180. }
  181. }
  182. .buttonTitleColorA{
  183. color:#0045AF;
  184. }
  185. .buttonTitleColorB{
  186. color:#999999;
  187. }
  188. }
  189. .application-min{
  190. flex:1;
  191. display: flex;
  192. flex-direction: column;
  193. overflow: hidden;
  194. margin:0 20px!important;
  195. .button-box{
  196. display: flex;
  197. }
  198. }
  199. }
  200. }
  201. </style>