repeatTaskDetailsPopup.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <div>
  3. <!-- 重复任务详情弹窗 -->
  4. <el-drawer :visible.sync="Delay_to_open" :with-header="false" :size="'500px'" :before-close="handleClose" :custom-class="'drawer_details'">
  5. <div class="details_title">{{title}}</div>
  6. <div class="details_content" v-if="workDetailData" v-loading="loading">
  7. <ul>
  8. <li class="flex-box">
  9. <div class="label">任务内容</div>
  10. <div class="content_text">{{workDetailData.name}}</div>
  11. </li>
  12. <li class="flex-box">
  13. <div class="label">任务描述</div>
  14. <div class="content_text yellow">{{workDetailData.remark}}</div>
  15. </li>
  16. <li class="flex-box" v-if="workDetailData">
  17. <div class="label">执行周期</div>
  18. <div class="content_text yellow">{{workDetailData.task_expire_day}}{{workDetailData.task_cycle == 1?'天':workDetailData.task_cycle == 2?'周':'月'}}</div>
  19. </li>
  20. <li class="flex-box" v-if="workDetailData.point_config">
  21. <div class="label">逾期扣分</div>
  22. <div class="content_text yellow">{{workDetailData.point_config.timeout_deduction_point}}/天</div>
  23. </li>
  24. <li class="flex-box" v-if="workDetailData.point_config">
  25. <div class="label">任务积分</div>
  26. <div class="content_text yellow">{{workDetailData.point_config.base_point}}</div>
  27. </li>
  28. <li class="flex-box">
  29. <div class="label">任务附件</div>
  30. <div class="content_text">
  31. <el-image
  32. v-for="(item,index) in workDetailData.file_list"
  33. :key="index"
  34. style="width: 100px; height: 100px"
  35. :src="item">
  36. </el-image>
  37. </div>
  38. </li>
  39. </ul>
  40. <el-row style=" margin-bottom: 20px;">
  41. <el-col :span="24" style="line-height: 30px;">审批人</el-col>
  42. <el-col :span="24">
  43. <div>
  44. <userImage class="fl" :id="workDetailData.reviewer_id" :user_name="workDetailData.reviewer_name" width="50px" height="50px" style=" margin-right: 15px;"></userImage>
  45. <p style="margin: 0; line-height: 50px;"><WWOpenData type="userName" :openid="workDetailData.reviewer_name"></WWOpenData></p>
  46. </div>
  47. </el-col>
  48. </el-row>
  49. <el-row v-if="workDetailData.target_info">
  50. <el-col :span="24" style="line-height: 30px;">执行人</el-col>
  51. <el-col :span="24">
  52. <div v-for="(item,index) in workDetailData.target_info" style="margin-bottom: 10px;">
  53. <userImage class="fl" :id="item.id" :user_name="item.name" width="50px" height="50px" style=" margin-right: 15px;"></userImage>
  54. <p style="margin: 0; line-height: 50px;"><WWOpenData type="userName" :openid="item.name"></WWOpenData></p>
  55. </div>
  56. </el-col>
  57. </el-row>
  58. </div>
  59. </el-drawer>
  60. </div>
  61. </template>
  62. <script>
  63. export default {
  64. name: 'repeatTaskDetailsPopup',
  65. props:{
  66. title: {
  67. type: String,
  68. default: ''
  69. },
  70. visible: {
  71. type: Boolean,
  72. default: false
  73. },
  74. id: {
  75. type: Number,
  76. default: 0
  77. },
  78. },
  79. data() {
  80. return {
  81. Delay_to_open:false,//打开抽屉
  82. loading: false,
  83. workDetailData:{},
  84. }
  85. },
  86. components: {},
  87. watch:{},
  88. mounted() {
  89. this.getData()
  90. this.Delay_to_open = this.visible//更换打开抽屉时机,避免打开两次
  91. },
  92. methods: {
  93. // 关闭弹窗
  94. handleClose(){
  95. this.$emit('update:visible', false)
  96. },
  97. // 获取数据
  98. getData(){
  99. let self = this
  100. self.loading = true
  101. let data = {schedule_id: this.id}
  102. self.$http('get','/api/integral/schedule',data
  103. ).then(res => {
  104. if (res.data.code == 1) {
  105. self.workDetailData = res.data.data
  106. }
  107. self.loading = false
  108. }).catch(e => {
  109. self.$message.error(e.data.msg)
  110. self.loading = false
  111. })
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="scss" scoped="scoped">
  117. .details_content{
  118. & .d_userMessage{
  119. margin-left: 10px;
  120. }
  121. & .d_userMessage div:nth-child(1){
  122. font-size: 16px;
  123. margin-bottom: 8px;
  124. }
  125. & .d_userMessage div:nth-child(2){
  126. font-size: 12px;
  127. color: #909399;
  128. }
  129. & .d_progress{
  130. padding: 12px 0;
  131. border-bottom: 1px solid #f1f1f1;
  132. margin-bottom: 10px;
  133. }
  134. & ul{
  135. padding: 12px 0;
  136. border-bottom: 1px solid #f1f1f1;
  137. & li{
  138. padding: 6px 0;
  139. }
  140. & .label{
  141. width: 80px;
  142. text-align: left;
  143. color: #909399;
  144. }
  145. & .content_text{
  146. flex:1
  147. }
  148. }
  149. }
  150. .fontColorF{
  151. color:#909399;
  152. }
  153. </style>