index.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <!--巡查管理-->-
  2. <template>
  3. <div class="app-container inspectionManagement">
  4. <div class="inspectionManagement-page" v-if="pageType == 1">
  5. <div class="title-box">
  6. <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
  7. <div class="form-button-max-big-box">
  8. <div class="form-button-big-box" style="margin-left:10px;">
  9. <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
  10. <p class="text-p">全部</p>
  11. <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
  12. </div>
  13. <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
  14. <p class="text-p">待检查</p>
  15. <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
  16. </div>
  17. <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
  18. <p class="text-p">检查中</p>
  19. <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
  20. </div>
  21. <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
  22. <p class="text-p">已检查</p>
  23. <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
  24. </div>
  25. </div>
  26. </div>
  27. <el-form-item label="关键字" prop="searchValue">
  28. <el-input
  29. maxLength="30"
  30. v-model="queryParams.searchValue"
  31. placeholder="计划标题/实验室/房间号/检查者"
  32. clearable
  33. style="width: 250px"
  34. />
  35. </el-form-item>
  36. <el-form-item label="学院" prop="data1" label-width="50px">
  37. <el-select v-model="queryParams.data1" clearable placeholder="请选择学院" style="width: 150px">
  38. <el-option
  39. v-for="item in optionsOne"
  40. :key="item.key"
  41. :label="item.label"
  42. :value="item.key">
  43. </el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item label="检查时间" prop="dateRange" style="margin-left:10px;" label-width="70px">
  47. <el-date-picker
  48. :clearable="false"
  49. v-model="dateRange"
  50. size="small"
  51. style="width: 240px"
  52. value-format="yyyy-MM-dd"
  53. type="daterange"
  54. range-separator="-"
  55. start-placeholder="开始日期"
  56. end-placeholder="结束日期"
  57. ></el-date-picker>
  58. </el-form-item>
  59. <el-form-item>
  60. <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
  61. <p class="reset-button-one" @click="resetQuery">重置</p>
  62. </el-form-item>
  63. <div class="form-button-max-big-box">
  64. <div class="form-button-big-box">
  65. <div :class="queryParams.myType==1?'checkDiv':''" style="width:100px;" @click="topRightClickType">
  66. <p class="text-p">本人发起</p>
  67. <p class="el-icon-check icon-p" v-if="queryParams.myType==1"></p>
  68. </div>
  69. </div>
  70. </div>
  71. </el-form>
  72. </div>
  73. <div class="content-box">
  74. <el-table border :data="tableList" ref="multipleTable" @sort-change="sortChange">
  75. <el-table-column label="序号" align="center" type="index" width="60" />
  76. <el-table-column label="计划标题" align="center" prop="hardwareNum" show-overflow-tooltip width="250"/>
  77. <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="220"/>
  78. <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="150"/>
  79. <el-table-column label="检查状态" align="center" prop="deptName" show-overflow-tooltip width="90"/>
  80. <el-table-column label="检查者" align="center" prop="deptName" show-overflow-tooltip width="100"/>
  81. <el-table-column label="检查结果" align="center" prop="deptName" show-overflow-tooltip width="80"/>
  82. <el-table-column label="隐患数" align="center" prop="deptName" show-overflow-tooltip width="80"/>
  83. <el-table-column label="整改进度" align="center" prop="deptName" show-overflow-tooltip width="200"/>
  84. <el-table-column label="计划周期" align="center" prop="deptName" show-overflow-tooltip width="270"/>
  85. <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
  86. <el-table-column label="操作" align="center" prop="deptName" width="230">
  87. <div class="table-button-box">
  88. <p class="table-button-p" @click="goAddPage(3)">详情</p>
  89. <p class="table-button-p" @click="goAddPage(2)">开始检查</p>
  90. <!--<p class="table-button-p">编辑</p>-->
  91. <!--<p class="table-button-p">整改报告</p>-->
  92. <!--<p class="table-button-p">查看附件</p>-->
  93. </div>
  94. </el-table-column>
  95. </el-table>
  96. <pagination :page-sizes="[20, 30, 40, 50]"
  97. v-show="total>0"
  98. :total="total"
  99. :page.sync="queryParams.pageNum"
  100. :limit.sync="queryParams.pageSize"
  101. @pagination="getList"
  102. />
  103. </div>
  104. </div>
  105. <addPage v-if="pageType==2"></addPage>
  106. <infoPage v-if="pageType==3"></infoPage>
  107. </div>
  108. </template>
  109. <script>
  110. import addPage from './addPage.vue'
  111. import infoPage from './infoPage.vue'
  112. export default {
  113. name: 'index',
  114. components: {
  115. addPage,
  116. infoPage
  117. },
  118. data(){
  119. return{
  120. pageType:1,
  121. queryParams:{
  122. pageNum:1,
  123. pageSize:20,
  124. buttonType:1,
  125. myType:0,
  126. timeType:0,
  127. searchValue:"",
  128. data1:""
  129. },
  130. dateRange:[],
  131. tableList:[{}],
  132. total:0,
  133. optionsOne:[{key:1,label:"校级"},{key:2,label:"院级"}],
  134. optionsTwo:[{key:1,label:"启用"},{key:0,label:"停用"}],
  135. }
  136. },
  137. created(){
  138. },
  139. mounted(){
  140. },
  141. methods:{
  142. //开始检查
  143. goAddPage(type){
  144. this.$set(this,'pageType',type);
  145. },
  146. //时间排序方法
  147. sortChange(val){
  148. //ascending 上 descending 下 null 无
  149. console.log('val',val.order)
  150. this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
  151. },
  152. //范围选择
  153. topLeftClickType(type){
  154. if(this.queryParams.buttonType != type){
  155. this.$set(this.queryParams,'buttonType',type);
  156. this.getList();
  157. }
  158. },
  159. topRightClickType(){
  160. this.$set(this.queryParams,'myType',this.queryParams.myType==1?0:1);
  161. },
  162. //获取数据列表
  163. getList(){
  164. // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
  165. // this.queryParamsData.type = 'RFID_RECOGNIZER';
  166. // listHardware(this.queryParamsData).then(response => {
  167. // this.total = response.total;
  168. // this.tableList = response.rows;
  169. // });
  170. },
  171. /** 搜索按钮操作 */
  172. handleQuery() {
  173. this.$set(this.queryParams,'pageNum',1);
  174. this.getList();
  175. },
  176. /** 重置按钮操作 */
  177. resetQuery() {
  178. this.$set(this,'dateRange',[]);
  179. this.$set(this,'queryParams',{
  180. pageNum:1,
  181. pageSize:20,
  182. buttonType:1,
  183. timeType:0,
  184. myType:0,
  185. searchValue:"",
  186. data1:""
  187. });
  188. this.handleQuery();
  189. },
  190. }
  191. }
  192. </script>
  193. <style scoped lang="scss">
  194. .inspectionManagement{
  195. flex: 1;
  196. display: flex !important;
  197. flex-direction: column;
  198. overflow: hidden;
  199. .inspectionManagement-page{
  200. flex: 1;
  201. display: flex !important;
  202. flex-direction: column;
  203. overflow: hidden;
  204. .title-box{
  205. padding-top:20px;
  206. border-bottom:1px solid #dedede;
  207. .form-button-max-big-box{
  208. display: inline-block;
  209. .form-button-big-box{
  210. display: flex;
  211. div{
  212. position: relative;
  213. height:40px;
  214. width:80px;
  215. line-height: 40px;
  216. text-align: center;
  217. color:#999;
  218. font-size:14px;
  219. border:1px solid #999;
  220. border-radius:4px;
  221. margin-left:10px;
  222. font-weight:500;
  223. cursor: pointer;
  224. .icon-p{
  225. width:15px;
  226. height:15px;
  227. line-height:15px;
  228. text-align: center;
  229. position: absolute;
  230. right:0;
  231. bottom:0;
  232. color:#fff;
  233. background: #0183fa;
  234. border-top-left-radius:4px;
  235. }
  236. }
  237. .checkDiv{
  238. color:#0183FA;
  239. border:1px solid #0183FA;
  240. }
  241. }
  242. }
  243. }
  244. .content-box{
  245. flex: 1;
  246. display: flex;
  247. flex-direction: column;
  248. padding:20px;
  249. overflow: hidden;
  250. }
  251. }
  252. }
  253. </style>