pdca.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="pdca-page">
  3. <uni-segmented-control
  4. :current="current"
  5. :values="items"
  6. @clickItem="onClickItem"
  7. style-type="text"
  8. active-color="#3377FF" />
  9. <view class="content">
  10. <scroll-view class="scroll-y" scroll-y="true">
  11. <one-textarea
  12. v-if="current === 0"
  13. :defaultPlanValue="'99999'"
  14. />
  15. <do-and-check
  16. v-if="current === 1"
  17. />
  18. <view v-if="current === 2">
  19. 选项卡3的内容
  20. </view>
  21. <one-textarea
  22. v-if="current === 3"
  23. title="对策处置(Action)"
  24. label="对策处置"
  25. :defaultactionValue="'123'"
  26. />
  27. </scroll-view>
  28. <view class="fixed-buttom-btn">
  29. <view class="btn-text cancle">
  30. <text>取消</text>
  31. </view>
  32. <view class="btn-text">
  33. <text>确定</text>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. // 改善任务PDCA
  41. import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
  42. import oneTextarea from './pdca-components/one-textarea.vue'
  43. import doAndCheck from './pdca-components/do-and-check.vue'
  44. export default {
  45. data() {
  46. return {
  47. items: ['改善计划(P)', '执行过程(D)', '改善确认(C)', '对策处置(A)'],
  48. current: 1,
  49. }
  50. },
  51. created() {
  52. uni.setNavigationBarTitle({
  53. title: '改善计划'
  54. });
  55. },
  56. methods: {
  57. onClickItem(e) {
  58. if (this.current !== e.currentIndex) {
  59. this.current = e.currentIndex;
  60. }
  61. }
  62. },
  63. components: {
  64. uniSegmentedControl,
  65. oneTextarea,
  66. doAndCheck
  67. }
  68. }
  69. </script>
  70. <style lang="less">
  71. .pdca-page {
  72. height: 100%;
  73. .content {
  74. height: calc(100% - 141.5rpx);
  75. .scroll-y {
  76. height: 100%;
  77. }
  78. }
  79. }
  80. </style>