authorizejinan.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <!--门禁授权-->
  2. <template>
  3. <div class="authorize">
  4. <div class="authorize-page" v-if="pageType == 1">
  5. <div class="title-box">
  6. <div>
  7. <p class="top-p-color">门禁授权</p>
  8. <p class="bottom-p-color"></p>
  9. </div>
  10. <div @click="titleClick">
  11. <p>授权日志</p>
  12. <p></p>
  13. </div>
  14. </div>
  15. <div class="authorize-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.applyStatus" clearable placeholder="请选择状态">
  27. <el-option
  28. v-for="item in optionsListTwo"
  29. :key="item.id"
  30. :label="item.name"
  31. :value="item.id">
  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="college" show-overflow-tooltip/>
  42. <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip/>
  43. <el-table-column label="位置" align="center" prop="position" show-overflow-tooltip v-if="$store.state.settings.smartAlarmType == 1"/>
  44. <el-table-column label="实验室负责人" align="center" prop="subjectName" show-overflow-tooltip/>
  45. <el-table-column label="门禁" align="center" prop="subjectName" show-overflow-tooltip/>
  46. <el-table-column label="授权人数" align="center" prop="safeUserName" width="160px" show-overflow-tooltip/>
  47. <el-table-column label="状态" align="center" prop="applyStatus" width="180px" show-overflow-tooltip>
  48. <template slot-scope="scope">
  49. <span>{{scope.row.applyStatus==1?'在线':(scope.row.applyStatus==2?'离线':'')}}</span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
  53. <template slot-scope="scope">
  54. <div class="button-box">
  55. <p class="table-min-button"
  56. v-hasPermi="['bottle:usegasAuditRecord:list']"
  57. @click="handleClick('',scope.row,'detail')"
  58. >查看授权</p>
  59. </div>
  60. </template>
  61. </el-table-column>
  62. </el-table>
  63. <pagination :page-sizes="[20, 30, 40, 50]"
  64. v-show="total>0"
  65. :total="total"
  66. :page.sync="queryParams.pageNum"
  67. :limit.sync="queryParams.pageSize"
  68. @pagination="getList"/>
  69. </div>
  70. </div>
  71. <lookImpower v-if="pageType == 2" :pageData="pageData"></lookImpower>
  72. </div>
  73. </template>
  74. <script>
  75. import { openDoorApplyList} from "@/api/laboratory/subject";
  76. import lookImpower from "./lookImpower.vue";
  77. export default {
  78. name: "authorize",
  79. components: {
  80. lookImpower
  81. },
  82. data(){
  83. return{
  84. pageType:1,
  85. loading:false,
  86. // 搜索数据
  87. queryParamsData:{
  88. pageNum:1,
  89. pageSize:20,
  90. },
  91. // 搜索实际发送数据
  92. queryParams:{
  93. pageNum:1,
  94. pageSize:20,
  95. },
  96. //数据数量
  97. total:10,
  98. tableList:[{}],
  99. //审批状态
  100. optionsListTwo:[{id:'0',name:'全部'},{id:'1',name:'待审核'},{id:'2',name:'已驳回'},{id:'3',name:'已授权'}],
  101. //详情
  102. pageData:{},
  103. }
  104. },
  105. created() {
  106. },
  107. mounted(){
  108. //this.getList();
  109. },
  110. methods:{
  111. handleClick(index,row,doType){
  112. console.log(1)
  113. if(doType=='detail'){
  114. this.pageType=2
  115. }else if(doType=='back'){
  116. this.pageType=1
  117. }
  118. },
  119. //操作接口
  120. goPageButton(){
  121. this.pageType = 1;
  122. },
  123. titleClick(){
  124. this.$parent.titleClick(2);
  125. },
  126. /** 搜索按钮操作 */
  127. handleQuery() {
  128. this.queryParamsData.pageNum = 1;
  129. this.queryParamsData.pageSize = 20;
  130. this.queryParams = JSON.parse(JSON.stringify(this.queryParamsData));
  131. this.getList();
  132. },
  133. /** 重置按钮操作 */
  134. resetQuery() {
  135. this.$set(this,'queryParamsData',{});
  136. this.$set(this,'queryParams',{});
  137. this.handleQuery();
  138. },
  139. //获取数据列表
  140. getList(){
  141. this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
  142. openDoorApplyList(this.queryParamsData).then(response => {
  143. this.tableList = response.rows;
  144. this.total = response.total
  145. });
  146. },
  147. }
  148. }
  149. </script>
  150. <style scoped lang="scss">
  151. .authorize{
  152. flex:1;
  153. display: flex;
  154. flex-direction: column;
  155. .authorize-page{
  156. flex:1;
  157. display: flex;
  158. flex-direction: column;
  159. overflow: hidden;
  160. .title-box{
  161. display: flex;
  162. border-bottom:1px solid #E0E0E0;
  163. margin-bottom:20px;
  164. div{
  165. height:80px;
  166. margin-right:20px;
  167. cursor: pointer;
  168. p:nth-child(1){
  169. font-size:18px;
  170. text-align: center;
  171. padding:0 20px;
  172. margin-top:26px;
  173. }
  174. p:nth-child(2){
  175. width:40px;
  176. height:4px;
  177. border-radius:40px;
  178. margin:12px auto;
  179. }
  180. .top-p-color{
  181. color: #0045AF;
  182. }
  183. .bottom-p-color{
  184. background: #0045AF;
  185. }
  186. }
  187. .buttonTitleColorA{
  188. color:#0045AF;
  189. }
  190. .buttonTitleColorB{
  191. color:#999999;
  192. }
  193. }
  194. .authorize-min{
  195. flex:1;
  196. display: flex;
  197. flex-direction: column;
  198. overflow: hidden;
  199. margin:0 20px!important;
  200. .button-box{
  201. display: flex;
  202. }
  203. }
  204. }
  205. }
  206. </style>