applicationjinan.vue 6.4 KB

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