authorize.vue 6.7 KB

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