From 49c31a3feb1e2d3174016f5a12c13cf500460ca3 Mon Sep 17 00:00:00 2001 From: yang <1441163367@qq.com> Date: 星期四, 27 十月 2022 15:47:00 +0800 Subject: [PATCH] 新增展开和收起按钮 --- src/views/padSunmaryProcedure/padWord.vue | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/padSunmaryProcedure/padWord.vue b/src/views/padSunmaryProcedure/padWord.vue index 39ad152..0b023a3 100644 --- a/src/views/padSunmaryProcedure/padWord.vue +++ b/src/views/padSunmaryProcedure/padWord.vue @@ -3,18 +3,22 @@ <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> + <div> + <el-button v-if="1" icon="el-icon-caret-top" @click="ShowHide(0)"></el-button> + <el-button v-if="0" icon="el-icon-caret-bottom" @click="ShowHide(1)"></el-button> + <el-button icon="el-icon-upload el-icon--right" @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="id" :id="id"></BiLu> + <BiLu v-if="activeName == 'first'"></BiLu> </el-tab-pane> <el-tab-pane label="璐d护闄愭湡鏀规閫氱煡涔�" name="second"> - <GaiZheng v-if="id" :id="id"></GaiZheng> + <GaiZheng v-if="activeName == 'second'"></GaiZheng> </el-tab-pane> <el-tab-pane label="澶勭綒鍐冲畾涔�" name="third"> - <JueDingShu v-if="id" :id="id"></JueDingShu> + <JueDingShu v-if="activeName == 'third'"></JueDingShu> </el-tab-pane> </el-tabs> </div> @@ -35,31 +39,35 @@ }, data() { return { + btn: 1, id: '', - form:{ - id:'' + form: { + id: '' }, name1: "", activeName: 'first' } }, created() { + this.id = this.$store.state.user.id if (this.$route.query) { this.$nextTick(() => { - this.id = this.$route.query.id - console.log(this.id,'id==========') this.name1 = this.$route.query.name }) } }, methods: { + ShowHide(type) { + this.btn = type; + window.android.toShowHide() + } goHome() { this.$router.push({ path: '/pad', }) }, submit() { - submitcase(this.id).then(res => { + submitcase({id: this.id}).then(res => { this.goHome() }) }, @@ -73,6 +81,7 @@ },*/ handleClick(tab, event) { console.log(tab, event); + this.activeName = tab.name } } } -- Gitblit v1.9.1