瀏覽代碼

代码上传版

zhangqiOMG 3 年之前
父節點
當前提交
73144dcc19

+ 15 - 1
src/App.vue

@@ -4,10 +4,16 @@
   </div>
 </template>
 <script>
+  import {mapGetters} from 'vuex'
   export default{
     data () {
       return {}
     },
+    computed:{
+    ...mapGetters({
+      searchValue:'searchValue',
+    })
+  },
     methods:{
     },
     created () {
@@ -25,7 +31,7 @@
             })
             sessionStorage.setItem('active_modules',JSON.stringify(val.meta.modules))
             
-            this.$store.dispatch('setActiveApp',{app:app[0],val:''})
+            this.$store.dispatch('setActiveApp',{app:app[0],val:this.searchValue})
 
             let system = JSON.parse(sessionStorage.getItem('module_info'))
             
@@ -54,4 +60,12 @@ body{
   background: rgba(255,255,255,.5);
   box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
 }
+.el-drawer__header{
+  padding: 10px !important;
+  margin-bottom: 0 !important;
+  font-size: 16px  !important;
+  font-family: PingFang SC-Bold, PingFang SC;
+  font-weight: bold  !important;
+  color: #333333  !important;
+}
 </style>

+ 1 - 7
src/HManagement/clueManage/clue_public/modules/add.vue

@@ -15,7 +15,7 @@
             <el-input v-model="param.content.phonenumber" size="small"></el-input>
           </el-form-item>
           <el-form-item label="省市县" prop="province">
-            <el-cascader size="small" class="width-240" v-model="param.content.province" :options="_arealist"
+            <el-cascader size="small" class="width-240" v-model="param.content.province" :options="basicData.data().areaData"
               @change="cascaderChange" ref="cascader">
             </el-cascader>
           </el-form-item>
@@ -81,12 +81,6 @@ export default {
       type:Function
     }
   },
-  inject:['arealist'],
-  computed:{
-    _arealist() {
-      return this.arealist()
-    }
-  },
   methods: {
     onShow () {
       this.drawer = true

+ 11 - 4
src/components/normal-basic-layout/details/index.vue

@@ -35,14 +35,17 @@
           </tabTemp>
           <slot name="custom"></slot>
         </el-col>
-        <el-col style="width:400px;" :span="6">
+        <el-col v-if="collapse" style="width:400px;" :span="6">
           <group v-if="activeApp.isdatateam" ref="group" style="margin-bottom:10px" :ownertable="ownertable?ownertable:idname.slice(0, this.idname.length - 2)" @onSuccess="onSuccess">
-            <el-button slot="collapse" type="text" icon="el-icon-s-unfold" class="inline-16"></el-button>
+            <el-button slot="collapse" type="text" icon="el-icon-s-unfold" class="inline-16" @click="onCollapse"></el-button>
           </group>
           <follow-up v-if="activeApp.isdatafollowup" ref="follow" :ownertable="ownertable?ownertable:idname.slice(0, this.idname.length - 2)">
-            <el-button slot="collapse" type="text" icon="el-icon-s-unfold" class="inline-16"></el-button>
+            <el-button slot="collapse" type="text" icon="el-icon-s-unfold" class="inline-16" @click="onCollapse"></el-button>
           </follow-up>
         </el-col>
+        <div v-else style="text-align-center" class="container normal-panel">
+          <el-button slot="collapse" type="text" icon="el-icon-s-fold" @click="onCollapse"></el-button>
+        </div>
         
       </el-row>
     </div>
@@ -75,7 +78,8 @@ export default {
             "condition": ""
           }
         }
-      }
+      },
+      collapse:true
     }
   },
   computed:{
@@ -157,6 +161,9 @@ export default {
     },
     onTabClick () {
       this.$emit('onTabClick')
+    },
+    onCollapse () {
+      this.collapse?this.collapse = false:this.collapse = true
     }
   },
   mounted () {

+ 5 - 8
src/components/normal-basic-layout/index.vue

@@ -32,7 +32,7 @@
         </div>
         <div class="flex-align-stretch" style="min-width:800px">
           <slot name="custom"></slot>
-          <el-input style="width:200px;" placeholder="搜索" suffix-icon="el-icon-search" @input="searchChange" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+          <el-input style="width:200px;" placeholder="搜索" suffix-icon="el-icon-search" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="clearSearch" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
           </el-input>
         </div>
       </div>
@@ -126,11 +126,12 @@ export default {
     }
   },
   methods:{
-    searchChange (val) {
-      val == '' && this.listData()
+    clearSearch () {
+      this.$store.state.searchValue = ''
+      this.listData(this.param.content.pageNumber = 1)
     },
     async listData () {
-      // console.log(this.activeApp)
+      this.param.content.where.condition = this.searchValue
       this.param.id = this.apiId.query
       const res = await this.$api.requested(this.param)
       this.list = res.data
@@ -232,16 +233,12 @@ export default {
     }
   },
   watch:{
-    $route () {
-      
-    }
   },
   mounted () {
     this.autoQuery === false?'':this.listData()
   },
   created () {
     this.routerName = this.$route.meta.title
-    this.param.content.where.condition = this.searchValue
     this.layout = this.tool.tabelCol(this.$route.name)[this.tableName].tablecols
     this.tableLayout = this.layout
     this.$emit('listCreate',this.param)

+ 6 - 2
src/store/index.js

@@ -76,11 +76,15 @@ export default new Vuex.Store({
     },
     
     setActiveApp (state,data) {
+      console.log(data)
+      //头部区域搜索所传入的数值
+      state.searchValue = data.val
+
+      
       data.app?sessionStorage.setItem('activeApp',JSON.stringify(data.app)):''
       state.appname = data.name
       state.activeApp = JSON.parse(sessionStorage.getItem('activeApp'))
-        //头部区域搜索所传入的数值
-      state.searchValue = data.val
+      
     },
     systemModules (state,data) {
       state.sys_modules = data

+ 1 - 9
src/style/style.css

@@ -179,15 +179,7 @@ ul{
 .el-drawer__wrapper{
   right:60px !important;
 }
-.el-drawer__header{
-  /* margin-bottom: 20px !important; */
-  padding: 10px !important;
-  margin-bottom: 0 !important;
-  font-size: 16px  !important;
-  font-family: PingFang SC-Bold, PingFang SC;
-  font-weight: bold  !important;
-  color: #333333  !important;
-}
+
 .fixed__btn__panel{
   position: absolute;
   display: flex;

+ 3 - 0
src/views/login/login.vue

@@ -93,6 +93,9 @@ export default {
       count:0
     }
   },
+  created () {
+    this.$store.dispatch('DrawerShowChange',false)
+  },
   mounted () {
     if (localStorage.getItem('phonenumber')) {
       this.loginForm.phonenumber = localStorage.getItem('phonenumber')