infoPage.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <div class="onDutyConfigurationInfo">
  3. <div class="onDutyConfigurationInfo-title-box">
  4. <p>{{propsData.time}}值班安排</p>
  5. <p class="add-button-one-90" @click="outButton">返回</p>
  6. </div>
  7. <div class="list-max-big-box scrollbar-box">
  8. <div class="for-list-max-big-box" v-for="(item,index) in listData" :key="index">
  9. <p class="for-title-p">{{item.subjectName}}</p>
  10. <el-table v-loading="loading" border :data="item.dutyList">
  11. <el-table-column label="值班人员" align="left" prop="userName" show-overflow-tooltip/>
  12. <el-table-column label="类别" align="left" prop="data2" show-overflow-tooltip width="230">
  13. <template slot-scope="scope">
  14. <span>{{scope.row.userType == 11?'教职工':'学生'}}</span>
  15. </template>
  16. </el-table-column>
  17. <el-table-column label="电话" align="left" prop="userPhone" show-overflow-tooltip width="200"/>
  18. <el-table-column label="部门" align="left" prop="deptName" show-overflow-tooltip width="300"/>
  19. <el-table-column label="指派日期" align="left" prop="createTime" show-overflow-tooltip width="300"/>
  20. <el-table-column label="操作" align="left" width="210" v-if="tableButtonType && !propsData.type">
  21. <template slot-scope="scope">
  22. <div class="button-box">
  23. <p class="table-min-button" style="color:#0183FA;margin-left:0!important;" @click="delUserButton(scope.row)"
  24. v-hasPermi="['laboratory:duty:remove']">移除</p>
  25. </div>
  26. </template>
  27. </el-table-column>
  28. </el-table>
  29. </div>
  30. </div>
  31. <div style="padding:0 20px 10px 20px;">
  32. <pagination :page-sizes="[5, 10, 15, 20]"
  33. :total="total"
  34. layout="total, prev, pager, next, sizes, jumper"
  35. :page.sync="param.pageNum"
  36. :limit.sync="param.pageSize"
  37. @pagination="getListPlan"
  38. />
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. import { getInfoByDate,delXxpDuty } from '@/api/laboratory/onDutyConfiguration'
  44. export default {
  45. name: 'infoPage',
  46. props:{
  47. propsData:{},
  48. },
  49. data(){
  50. return{
  51. tableButtonType:this.hasPermiDom(['laboratory:duty:remove']),
  52. listData:[],
  53. loading:false,
  54. param:{
  55. pageNum:1,
  56. pageSize:5,
  57. },
  58. total:0,
  59. }
  60. },
  61. created(){
  62. this.getListPlan();
  63. },
  64. mounted(){
  65. },
  66. methods:{
  67. outButton(){
  68. this.$parent.goPage('get')
  69. },
  70. getListPlan(){
  71. this.loading = true;
  72. let obj = {
  73. pageNum:this.param.pageNum,
  74. pageSize:this.param.pageSize,
  75. deptId:this.propsData.checkTreeId,
  76. dutyTime:this.propsData.time,
  77. }
  78. console.log(obj);
  79. getInfoByDate(obj).then(response => {
  80. this.loading = false;
  81. if(response.rows[0]){
  82. this.$set(this,'total',response.total);
  83. this.$set(this,'listData',response.rows);
  84. }else{
  85. this.outButton();
  86. }
  87. })
  88. },
  89. delUserButton(row){
  90. let self = this;
  91. this.$confirm('是否确认删除该流程?', "警告", {
  92. confirmButtonText: "确定",
  93. cancelButtonText: "取消",
  94. type: "warning"
  95. }).then(function() {
  96. delXxpDuty(row.id).then(response => {
  97. self.msgSuccess(response.msg);
  98. self.getListPlan()
  99. })
  100. }).then(() => {
  101. }).catch(() => {});
  102. },
  103. }
  104. }
  105. </script>
  106. <style scoped lang="scss">
  107. .onDutyConfigurationInfo{
  108. flex:1;
  109. display: flex;
  110. flex-direction: column;
  111. overflow: hidden;
  112. *{
  113. margin:0;
  114. padding:0;
  115. }
  116. .onDutyConfigurationInfo-title-box{
  117. display: flex;
  118. height: 80px;
  119. border-bottom:1px solid #E0E0E0;
  120. p:nth-child(1){
  121. flex:1;
  122. line-height:80px;
  123. margin-left:20px;
  124. color:#0045AF;
  125. font-size:16px;
  126. font-weight:900;
  127. }
  128. p:nth-child(2){
  129. margin:20px;
  130. }
  131. }
  132. .list-max-big-box{
  133. flex:1;
  134. padding:0 20px 20px;
  135. .for-list-max-big-box{
  136. .for-title-p{
  137. height:80px;
  138. line-height:80px;
  139. font-size:16px;
  140. color:#0045AF;
  141. }
  142. }
  143. }
  144. }
  145. </style>
  146. <style lang="scss">
  147. .onDutyConfigurationInfo{
  148. .el-table__empty-text{
  149. font-size: 12px;
  150. background: none;
  151. color:#909399;
  152. }
  153. }
  154. </style>