fxyk-modal.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <u-modal v-model="show"
  3. :show-title="false"
  4. :show-confirm-button="false"
  5. :show-cancel-button="false"
  6. :zoom="false">
  7. <view slot="default" style="padding:27rpx 27rpx 65rpx 27rpx">
  8. <view class="d-flex a-center j-end" @click="cancle"><u-icon name="close-circle-fill" color="#A9A3D2" size="60"></u-icon></view>
  9. <view class="text-center word-one" :style="wordColor">{{ data.title }}</view>
  10. <view style="padding-left: 55rpx">
  11. <view class="u-m-t-36 word-two">责任部门:&ensp;{{ data.department }}</view>
  12. <view class="u-m-t-20 word-two">施工时限:&ensp;{{ data.start }}-{{ data.end }}</view>
  13. <view class="u-m-t-16 word-two">
  14. <text>额定天数:&ensp;{{ data.edDay }}天</text> | <text :style="data.status !== 2 || data.ifYq !== 0 ? wordColor : ''">已用时: {{ data.yyDay }}天</text></view>
  15. <view class="u-m-t-18 word-two" :style="wordColor">目前状态:&ensp;进行中</view>
  16. <view v-if="data.status === 3" class="u-m-t-18 word-two" :style="wordColor">终止原因:&ensp;原因原因原因原因原因原因</view>
  17. </view>
  18. </view>
  19. </u-modal>
  20. </template>
  21. <script>
  22. export default {
  23. props: {
  24. // 是否显示模态框
  25. show: {
  26. type: Boolean,
  27. default: false
  28. },
  29. // data.status 1已完成 2进行中 3已终止
  30. // data.ifYq 是否逾期 1逾期 0未逾期
  31. data: {
  32. type: Object,
  33. default: () => {
  34. return {}
  35. }
  36. }
  37. },
  38. computed: {
  39. wordColor() {
  40. // 进行中
  41. if (this.data.status === 2) {
  42. // 已逾期
  43. if (this.data.ifYq) {
  44. return {'color':'#F17E38'}
  45. }
  46. // 未逾期(即将逾期)
  47. else {
  48. return {'color':'#E7AE5E'}
  49. }
  50. }
  51. // 已终止
  52. if (this.data.status === 3) {
  53. return {'color':'#FF0014'}
  54. }
  55. }
  56. },
  57. methods: {
  58. // 关闭
  59. cancle() {
  60. this.$emit('cancle')
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .word-one {
  67. font-size: 33rpx;
  68. font-family: SimSun;
  69. font-weight: 400;
  70. line-height: 44rpx;
  71. color: #FFAF38;
  72. }
  73. .word-two {
  74. font-size: 29rpx;
  75. font-family: SimSun;
  76. font-weight: 400;
  77. line-height: 40rpx;
  78. color: #FFFFFF;
  79. }
  80. </style>