zmc
2023-07-11 77a108bd860c737449b46809f6e8a4e1242e5e3b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<script>
import ImportedTest from './ImportedTest.vue';
import TimeTest from './TimeTest.vue';
import ShopNameAndID from './ShopNameAndID.vue';
import ExceptionType from './ExceptionType.vue';
import ExceptionButton from './ExceptionButton.vue';
 
import dayjs from 'dayjs';
export default {
  components: {
    ImportedTest,
    TimeTest,
    ShopNameAndID,
    ExceptionType,
    ExceptionButton
},
  data() {
    return {
      today: 'today,nice',
      article: [
        { id: 1, title: '标题一' },
        { id: 2, title: '标题二' },
        { id: 3, title: '标题三' }
      ],
      fsize: 1,
      math: 3,
      comp: null,
 
      // 时间选择器
      timeSelect: {
        beginTime: '',
        endTime: ''
      },
      //店铺Id
      devId: '',
 
      // 选中的异常类型
      exceptionType: [],
      activeNames: ['1'],
      //某家店铺关于异常类型的数据
      exceptionData:[],
    };
  },
  methods: {
    // 从时间选择器组件拿到开始和结束时间
    giveTime(val) {
      //将中国标准时间转为指定格式
      this.timeSelect.beginTime = dayjs(val[0]).format('YYYY-MM-DD HH:mm:ss');
      this.timeSelect.endTime = dayjs(val[1]).format('YYYY-MM-DD HH:mm:ss');
    }
  }
};
</script>
 
<template>
  <div>11</div>
  <ImportedTest value="today,nice"></ImportedTest>
  <ImportedTest :value="today"></ImportedTest>
  <div :style="{ fontSize: fsize + 'em' }">
    <ImportedTest
      v-for="item in article"
      :key="item"
      :title="item.title"
      @enlarge-text="fsize += 0.1"
    >
    </ImportedTest>
  </div>
 
  <div>
    <TimeTest @submit-time="giveTime"></TimeTest>
    开始和结束时间为:{{ this.timeSelect.beginTime }} --{{
      this.timeSelect.endTime
    }}
  </div>
  <el-collapse v-model="activeNames">
    <el-collapse-item title="Consistency" name="1">
      <div>
        Consistent with real life: in line with the process and logic of real
        life, and comply with languages and habits that the users are used to;
      </div>
      <div>
        Consistent within interface: all elements should be consistent, such as:
        design style, icons and texts, position of elements, etc.
      </div>
    </el-collapse-item>
  </el-collapse>
  <ShopNameAndID @submit-id="(n) => (devId = n)"></ShopNameAndID>
  {{ devId }}
 
  <div>
    <ExceptionType
      @submit-exception-type="(val) => (this.exceptionType = val)"
    ></ExceptionType>
    {{ this.exceptionType }}
  </div>
 
  <div>
    <ExceptionButton
      devId="fucheng310104200914"
      exceptionValue="1"
      @submit-exception-data="(n) => exceptionData = n"
    >
      缘家
    </ExceptionButton>
  </div>
  <div v-for="item in exceptionData" :key="item">
    {{ item }}
  </div>
</template>