preview.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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" v-model="name" 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. },
  32. computed:{
  33. ...mapState({
  34. typeList: state => state.creatingSituations.typeList,
  35. zhinengDepartments:state => state.creatingSituations.zhinengDepartments,
  36. situationPreview:state=>state.creatingSituations.situationPreview,
  37. }),
  38. // 双向绑定任务名称到 store
  39. name: {
  40. get(){
  41. return this.situationPreview && this.situationPreview.sitName ? this.situationPreview.sitName : ''
  42. },
  43. set(val){
  44. this.$store.commit({
  45. type: 'creatingSituations/comChangeState',
  46. key: 'situationPreview',
  47. data: { ...this.situationPreview, sitName: val }
  48. });
  49. }
  50. },
  51. responsibleDepartments:function(){
  52. const a = this.zhinengDepartments.checkedItems.reduce((prev,cur)=>prev+`${cur.name}(${cur.employees})`,'');
  53. return a;
  54. }
  55. },
  56. methods: {}
  57. }
  58. </script>
  59. <style lang="less" scoped>
  60. .planPreview {
  61. .title {
  62. height: 30rpx;
  63. font-size: 30rpx;
  64. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  65. font-weight: 400;
  66. color: #292C33;
  67. line-height: 30rpx;
  68. margin-bottom: 35rpx;
  69. }
  70. .content {
  71. padding: 31.25rpx 25rpx;
  72. background-color: #fff;
  73. .theme {
  74. font-size: 30rpx;
  75. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  76. font-weight: 400;
  77. color: #292C33;
  78. margin-bottom: 31.25rpx;
  79. }
  80. .rowTwo {
  81. display: flex;
  82. flex-direction: row;
  83. justify-content: space-between;
  84. align-items: center;
  85. .subBlock {
  86. width: 45%;
  87. .subBlocklabel {
  88. font-size: 17.5rpx;
  89. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  90. font-weight: 400;
  91. color: #666F80;
  92. }
  93. .subBlockval {
  94. font-size: 25rpx;
  95. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  96. font-weight: 400;
  97. color: #292C33;
  98. }
  99. &:first-child {
  100. position: relative;
  101. &::after {
  102. display: block;
  103. position: absolute;
  104. top: 50%;
  105. margin-top: -25rpx;
  106. right: 0;
  107. content: '';
  108. width: 1rpx;
  109. height: 50rpx;
  110. background-color: rgba(218, 222, 230, 1);
  111. }
  112. }
  113. }
  114. }
  115. }
  116. .endContent {
  117. display: flex;
  118. flex-direction: row;
  119. align-items: center;
  120. margin-top: 15rpx;
  121. padding: 31.25rpx 25rpx;
  122. background-color: #fff;
  123. span {
  124. font-size: 25rpx;
  125. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  126. font-weight: 400;
  127. color: #525866;
  128. &:last-child {
  129. display: inline-block;
  130. color: rgba(41, 44, 51, 1);
  131. padding-left: 75rpx;
  132. }
  133. }
  134. .inputArea {
  135. padding-left: 31.25rpx;
  136. }
  137. }
  138. }
  139. </style>