fxyk-modal.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. console.log(111);
  54. return {'color':'#FF0014'}
  55. }
  56. }
  57. },
  58. methods: {
  59. // 关闭
  60. cancle() {
  61. this.$emit('cancle')
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .word-one {
  68. font-size: 33rpx;
  69. font-family: SimSun;
  70. font-weight: 400;
  71. line-height: 44rpx;
  72. color: #FFAF38;
  73. }
  74. .word-two {
  75. font-size: 29rpx;
  76. font-family: SimSun;
  77. font-weight: 400;
  78. line-height: 40rpx;
  79. color: #FFFFFF;
  80. }
  81. </style>