峰峰执法平台简易案件程序板块 pad端
zhangxiaoxu123
2023-01-11 539d1ce6b955d5d56b21d97590a2a684c400f64a
src/views/padSunmaryProcedure/padWord.vue
@@ -1,99 +1,159 @@
<template>
  <div style="width: 100%;height: 100%;overflow: auto;">
    <div id="navs">
      <el-button icon="el-icon-arrow-left" @click="goHome">返回</el-button>
<!--      <div>{{ name1 }}</div>-->
      <el-button icon="el-icon-upload el-icon--right" @click="submit">提交</el-button>
  <basic-container :style="{height: screenHeight+'px!important'}">
    <!--头部导航-->
    <div class="nav">
      <el-button icon="el-icon-arrow-left"
                 @click="goHome">返回</el-button>
      <p>{{ name }}</p>
      <div>
        <el-button v-show="btn ==1"
                   icon="el-icon-caret-top"
                   @click="ShowHide(0)"></el-button>
        <el-button v-show="btn ==0"
                   icon="el-icon-caret-bottom"
                   @click="ShowHide(0)"></el-button>
        <el-button icon="el-icon-upload"
                   @click="submit">提交</el-button>
      </div>
    </div>
    <el-tabs type="border-card" style="margin-top: 10px!important;" v-model="activeName" @tab-click="handleClick"
             :stretch="true">
      <el-tab-pane label="调查询问笔录" name="first">
        <BiLu v-if="activeName == 'first'"></BiLu>
      </el-tab-pane>
      <el-tab-pane label="责令限期改正通知书" name="second">
        <GaiZheng v-if="activeName == 'second'"></GaiZheng>
      </el-tab-pane>
      <el-tab-pane label="处罚决定书" name="third">
        <JueDingShu v-if="activeName == 'third'"></JueDingShu>
      </el-tab-pane>
    </el-tabs>
  </div>
    <!--底部选项卡-->
    <div class="tagsContainer">
      <el-tabs type="border-card"
               v-model="activeName"
               :stretch="true"
               @tab-click="handleClick">
        <el-tab-pane label="调查询问笔录"
                     name="first">
          <BiLu v-if="activeName == 'first'" @isKeep1="isKeep1"></BiLu>
        </el-tab-pane>
        <el-tab-pane label="责令限期改正通知书"
                     name="second">
          <GaiZheng v-if="activeName == 'second'" @isKeep2="isKeep2">责令限期改正通知书</GaiZheng>
        </el-tab-pane>
        <el-tab-pane label="处罚决定书"
                     name="third">
          <JueDingShu v-if="activeName == 'third'" @isKeep3="isKeep3">处罚决定书</JueDingShu>
        </el-tab-pane>
      </el-tabs>
    </div>
  </basic-container>
</template>
<script>
import {submitcase} from '../../api/News/pad'
import { submitcase } from '../../api/News/pad'
import BiLu from './word_mange/mangeBL'
import GaiZheng from './word_mange/mangeGZ'
import JueDingShu from './word_mange/mangeJD'
export default {
  name: "padWord",
  name: 'padWord1',
  components: {
    BiLu,
    GaiZheng,
    JueDingShu,
  },
  data() {
    return {
      form:{
        id:this.id,
      },
      name1: "",
      activeName: 'first'
    }
  },
  created() {
    this.id = this.$store.state.user.id
    if (this.$route.query) {
      this.$nextTick(() => {
        this.name1 = this.$route.query.name
        this.name = this.$route.query.name
        // this.id = this.$route.params.id
      })
    }
  },
  data() {
    return {
      name: '案件名称', //展示的案件名称
      btn: 1, //展开和收起
      tabPosition: 'left', //默认左侧选项卡
      activeName: 'first', //选项卡默认打开第一个
      screenHeight: null,
    }
  },
  mounted() {
    window.onresize = () => {
      return () => {
        this.screenHeight = document.body.clientHeight
      }
    }
    this.screenHeight = document.body.clientHeight
  },
  methods: {
      isKeep1(val) {
          //this.isSubmit = val
          this.$store.commit('SET_IsCANSUBMIT1',val)
      },
      isKeep2(val) {
          this.$store.commit('SET_IsCANSUBMIT2',val)
      },
      isKeep3(val) {
          this.$store.commit('SET_IsCANSUBMIT3',val)
      },
    //返回案件列表
    goHome() {
      this.$router.push({
        path: '/pad',
      })
    },
    submit() {
      submitcase(this.form).then(res => {
        this.goHome()
      })
    //收缩顶部
    ShowHide(type) {
      this.btn = type
      window.android.toShowHide()
    },
    /*goToBL() {
      this.$router.push({
        path: '/padWord',
        query: {
          id: row.id,
        }
      })
    },*/
    //提交(去审核)
    submit() {
      if(this.$store.state.user.isCanSubmit1 && this.$store.state.user.isCanSubmit2 && this.$store.state.user.isCanSubmit3) {
          submitcase({ id: this.id }).then((res) => {
              return
              console.log(res,'res-----')
              if(res.data.code == 0) {
                  this.$message.success('提交成功')
                  this.goHome()
              }
          })
      }else {
          this.$message.warning('请先保存再提交')
          return false
      }
    },
    //点击选项卡效果
    handleClick(tab, event) {
      console.log(tab, event);
      this.activeName = tab.name
    }
  }
    },
  },
}
</script>
<style lang="scss">
.el-tabs__content {
  height: calc(100vh - 110px);
  overflow-y: auto;
  .el-message,.el-message--warning{
    z-index: 99999!important;
  }
  .el-input.is-disabled .el-input__inner,.el-range-editor.is-disabled input{
    color: #303133;
  }
.tagsContainer {
  height: 92%;
  overflow: scroll;
  .el-tabs {
    .el-tabs__header {
      position: sticky;
      top: 0;
      z-index: 10000;
    }
    .el-tabs__content {
      // height: calc(100vh - 110px);
      overflow-y: auto;
    }
  }
}
#navs {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
#box {
  width: 80%;
</style>
<style scoped>
.nav {
  height: 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
}
</style>