preview.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view class="planPreview">
  3. <view class="title">计划预览</view>
  4. <div class="content">
  5. <div class="theme">主题:督查自查</div>
  6. <div class="rowTwo">
  7. <div class="subBlock">
  8. <span class="subBlocklabel">计划模块</span>
  9. <div class="subBlockval">{{(typeList.checkedItems.map(v=>v.name)).join(',')}}</div>
  10. </div>
  11. <div class="subBlock">
  12. <span class="subBlocklabel">负责职能科室</span>
  13. <div class="subBlockval">{{responsibleDepartments}}</div>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="endContent">
  18. <span>任务名称</span>
  19. <input class="inputArea" :value="name" @input="inputHandle" type="text" >
  20. </div>
  21. </view>
  22. </template>
  23. <script>
  24. import {
  25. mapState
  26. } from "vuex";
  27. export default {
  28. props: {},
  29. data() {
  30. return {
  31. name:''
  32. }
  33. },
  34. computed:{
  35. ...mapState({
  36. typeList: state => state.creatingSituations.typeList,
  37. zhinengDepartments:state => state.creatingSituations.zhinengDepartments,
  38. situationPreview:state=>state.creatingSituations.situationPreview,
  39. }),
  40. responsibleDepartments:function(){
  41. const a = this.zhinengDepartments.checkedItems.reduce((prev,cur)=>prev+`${cur.name}(${cur.employees})`,'');
  42. return a;
  43. }
  44. },
  45. methods: {
  46. inputHandle(e){
  47. this.name = e.detail.value;
  48. this.$store.commit({
  49. type: 'creatingSituations/comChangeState',
  50. key: 'situationPreview',
  51. data:{...this.situationPreview,sitName:e.detail.value}
  52. });
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="less" scoped>
  58. .planPreview {
  59. .title {
  60. height: 30rpx;
  61. font-size: 30rpx;
  62. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  63. font-weight: 400;
  64. color: #292C33;
  65. line-height: 30rpx;
  66. margin-bottom: 35rpx;
  67. }
  68. .content {
  69. padding: 31.25rpx 25rpx;
  70. background-color: #fff;
  71. .theme {
  72. font-size: 30rpx;
  73. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  74. font-weight: 400;
  75. color: #292C33;
  76. margin-bottom: 31.25rpx;
  77. }
  78. .rowTwo {
  79. display: flex;
  80. flex-direction: row;
  81. justify-content: space-between;
  82. align-items: center;
  83. .subBlock {
  84. width: 45%;
  85. .subBlocklabel {
  86. font-size: 17.5rpx;
  87. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  88. font-weight: 400;
  89. color: #666F80;
  90. }
  91. .subBlockval {
  92. font-size: 25rpx;
  93. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  94. font-weight: 400;
  95. color: #292C33;
  96. }
  97. &:first-child {
  98. position: relative;
  99. &::after {
  100. display: block;
  101. position: absolute;
  102. top: 50%;
  103. margin-top: -25rpx;
  104. right: 0;
  105. content: '';
  106. width: 1rpx;
  107. height: 50rpx;
  108. background-color: rgba(218, 222, 230, 1);
  109. }
  110. }
  111. }
  112. }
  113. }
  114. .endContent {
  115. display: flex;
  116. flex-direction: row;
  117. align-items: center;
  118. margin-top: 15rpx;
  119. padding: 31.25rpx 25rpx;
  120. background-color: #fff;
  121. span {
  122. font-size: 25rpx;
  123. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  124. font-weight: 400;
  125. color: #525866;
  126. &:last-child {
  127. display: inline-block;
  128. color: rgba(41, 44, 51, 1);
  129. padding-left: 75rpx;
  130. }
  131. }
  132. .inputArea {
  133. padding-left: 31.25rpx;
  134. }
  135. }
  136. }
  137. </style>