infoPage.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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="table-button-box">
  23. <p class="table-button-null"></p>
  24. <p class="table-button-p" @click="delUserButton(scope.row)"
  25. v-hasPermi="['laboratory:duty:remove']">移除</p>
  26. <p class="table-button-null"></p>
  27. </div>
  28. </template>
  29. </el-table-column>
  30. </el-table>
  31. </div>
  32. </div>
  33. <div style="padding:0 20px 10px 20px;">
  34. <pagination :page-sizes="[5, 10, 15, 20]"
  35. :total="total"
  36. layout="total, prev, pager, next, sizes, jumper"
  37. :page.sync="param.pageNum"
  38. :limit.sync="param.pageSize"
  39. @pagination="getListPlan"
  40. />
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import { getInfoByDate,delXxpDuty } from '@/api/laboratory/onDutyConfiguration'
  46. export default {
  47. name: 'infoPage',
  48. props:{
  49. propsData:{},
  50. },
  51. data(){
  52. return{
  53. tableButtonType:this.hasPermiDom(['laboratory:duty:remove']),
  54. listData:[],
  55. loading:false,
  56. param:{
  57. pageNum:1,
  58. pageSize:5,
  59. },
  60. total:0,
  61. }
  62. },
  63. created(){
  64. this.getListPlan();
  65. },
  66. mounted(){
  67. },
  68. methods:{
  69. outButton(){
  70. this.$parent.goPage('get')
  71. },
  72. getListPlan(){
  73. this.loading = true;
  74. let obj = {
  75. pageNum:this.param.pageNum,
  76. pageSize:this.param.pageSize,
  77. deptId:this.propsData.checkTreeId,
  78. dutyTime:this.propsData.time,
  79. }
  80. console.log(obj);
  81. getInfoByDate(obj).then(response => {
  82. this.loading = false;
  83. if(response.rows[0]){
  84. this.$set(this,'total',response.total);
  85. this.$set(this,'listData',response.rows);
  86. }else{
  87. this.outButton();
  88. }
  89. })
  90. },
  91. delUserButton(row){
  92. let self = this;
  93. this.$confirm('是否确认删除该流程?', "警告", {
  94. confirmButtonText: "确定",
  95. cancelButtonText: "取消",
  96. type: "warning"
  97. }).then(function() {
  98. delXxpDuty(row.id).then(response => {
  99. self.msgSuccess(response.msg);
  100. self.getListPlan()
  101. })
  102. }).then(() => {
  103. }).catch(() => {});
  104. },
  105. }
  106. }
  107. </script>
  108. <style scoped lang="scss">
  109. .onDutyConfigurationInfo{
  110. flex:1;
  111. display: flex;
  112. flex-direction: column;
  113. overflow: hidden;
  114. *{
  115. margin:0;
  116. padding:0;
  117. }
  118. .onDutyConfigurationInfo-title-box{
  119. display: flex;
  120. height: 80px;
  121. border-bottom:1px solid #E0E0E0;
  122. p:nth-child(1){
  123. flex:1;
  124. line-height:80px;
  125. margin-left:20px;
  126. color:#0045AF;
  127. font-size:16px;
  128. font-weight:900;
  129. }
  130. p:nth-child(2){
  131. margin:20px;
  132. }
  133. }
  134. .list-max-big-box{
  135. flex:1;
  136. padding:0 20px 20px;
  137. .for-list-max-big-box{
  138. .for-title-p{
  139. height:80px;
  140. line-height:80px;
  141. font-size:16px;
  142. color:#0045AF;
  143. }
  144. }
  145. }
  146. }
  147. </style>
  148. <style lang="scss">
  149. .onDutyConfigurationInfo{
  150. .el-table__empty-text{
  151. font-size: 12px;
  152. background: none;
  153. color:#909399;
  154. }
  155. }
  156. </style>