123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <view class="pdca-page">
- <uni-segmented-control
- :current="current"
- :values="items"
- @clickItem="onClickItem"
- style-type="text"
- active-color="#3377FF" />
- <view class="content">
- <scroll-view class="scroll-y" scroll-y="true">
- <one-textarea
- v-if="current === 0"
- :defaultPlanValue="plan"
- :disabled="disabled"
- />
- <do-and-check
- v-if="current === 1"
- :disabled="disabled"
- />
- <view v-if="current === 2">
- 选项卡3的内容
- </view>
- <one-textarea
- v-if="current === 3"
- title="对策处置(Action)"
- label="对策处置"
- :defaultactionValue="'123'"
- :disabled="disabled"
- />
- </scroll-view>
- <view class="fixed-buttom-btn" v-if="!disabled">
- <view class="btn-text cancle">
- <text>暂存</text>
- </view>
- <view class="btn-text">
- <text>完成</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- // 改善任务PDCA
- import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
- import oneTextarea from './pdca-components/one-textarea.vue'
- import doAndCheck from './pdca-components/do-and-check.vue'
- export default {
- props: {
- // 是否禁用
- disabled: {
- type: Boolean,
- default: false
- },
- // 详情回显的数据
- values: {
- type: Object,
- default: () => {
- return {}
- }
- },
- // 按钮信息 (包过请求的key)
- btnInfo: {
- type: Object,
- default: () => {
- return {}
- }
- },
- // 任务详情
- missionDetails: {
- type: Object,
- default: () => {
- return {}
- }
- }
- },
- data() {
- return {
- items: ['改善计划(P)', '执行过程(D)', '改善确认(C)', '对策处置(A)'],
- current: 0,
- // plan 改善计划
- plan: ''
- }
- },
- created() {
- uni.setNavigationBarTitle({
- title: '改善计划'
- });
- if(this.disabled) {
- this.plan = this.values['plan'];
- console.log(9, this.values)
- }
- },
- methods: {
- onClickItem(e) {
- if (this.current !== e.currentIndex) {
- this.current = e.currentIndex;
- }
- }
- },
- components: {
- uniSegmentedControl,
- oneTextarea,
- doAndCheck
- }
- }
- </script>
- <style lang="less">
- .pdca-page {
- height: 100%;
- .content {
- height: calc(100% - 141.5rpx);
- .scroll-y {
- height: 100%;
- }
- }
- }
- </style>
|