infoPage.vue 4.6 KB

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