123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <!--检查记录-->
- <template>
- <view id="safetyInspect">
- <view class="tabTitle" v-if="userType==1">
- <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
- <view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
- <view :class="{on:curTab==index}" class="tabTitle_across"></view>
- </view>
- </view>
- <inspection-records ref="child" v-if="pageType==0" style="display: flex;flex: 1;overflow-y: auto;"></inspection-records>
- <rectify-list ref="child" v-if="pageType==1" style="display: flex;flex: 1;overflow-y: auto;"></rectify-list>
- </view>
- </template>
- <script>
- import { inspectionRecords } from '@/pages_manage/workbench/securityCheck/inspectionRecords.vue'
- import { rectifyList } from '@/pages_manage/workbench/problemRectification/rectifyList'
- export default {
- components: {
- inspectionRecords,
- rectifyList,
- },
- name: "safetyInspect",
- data() {
- return {
- userType:uni.getStorageSync('userType'),
- pageType:0,
- curTab:0,
- tabText:['检查记录','问题整改',],
-
- }
- },
- onLoad() {
-
- //判断如果是学生端进入只显示问题整改
- if(this.userType==2){
- this.pageType=1
- }
- },
- onShow() {
-
- this.dataList=[];
- console.log(3333)
- uni.removeStorageSync('First')
- this.$refs.child.getList()
-
- },
- mounted(){
-
-
- },
- methods: {
- //顶部tab点击
- tabClick(index) {
- this.curTab = index;
-
- this.pageType=index;
-
- },
-
- }
- }
- </script>
- <style lang="stylus" scoped>
- #safetyInspect {
- height: 100%;
- width: 100%;
- flex :1;
- display flex;
- flex-direction column
- overflow hidden
- .tabTitle{
- display flex;
- width:100%;
- height: 100rpx;
- background: #fff;
- margin-bottom 16rpx;
-
- .tabTitle_li{
- width:146rpx;
- text-align center;
- .tabTitle_text{
- display: inline-block;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 70rpx;
- &.on{
- color:#0183FA;
- }
- }
- .tabTitle_across{
- width: 80rpx;
- height: 5rpx;
- background: #0183FA;
- border-radius: 3rpx;
- margin-left 34rpx;
- display none;
- &.on{
- display block;
- }
- }
-
- }
-
-
- }
-
- }
- </style>
|