QuKatie 3 rokov pred
rodič
commit
b3954fc7ec

+ 51 - 7
src/components/basic-container/main.vue

@@ -1,9 +1,21 @@
 <template>
-  <div class="basic-container"
-       :style="styleName"
-       :class="{'basic-container--block':block}">
+  <div
+    class="basic-container"
+    :style="styleName"
+    :class="{ 'basic-container--block': block }"
+  >
     <el-card class="basic-container__card">
-      <slot></slot>
+      <div v-show="show">
+        <slot></slot>
+      </div>
+      <div v-if="showBtn" class="basic-container-foot" @click="show = !show" @mouseenter="enter" @mouseleave="leave">
+        <div v-show="show">
+          <i class="el-icon-caret-top" /><span v-show="showSpan">隐藏</span>
+        </div>
+        <div v-show="!show">
+          <i class="el-icon-caret-bottom" /><span v-show="showSpan">显示</span>
+        </div>
+      </div>
     </el-card>
   </div>
 </template>
@@ -11,6 +23,12 @@
 <script>
 export default {
   name: "basicContainer",
+  data() {
+    return {
+      show: true,
+      showSpan: false
+    };
+  },
   props: {
     radius: {
       type: [String, Number],
@@ -22,14 +40,26 @@ export default {
     block: {
       type: Boolean,
       default: false
+    },
+    showBtn: {
+      type: Boolean,
+      default: false
+    }
+  },
+  methods: {
+    enter() {
+      this.showSpan = true;
+    },
+    leave() {
+      this.showSpan = false;
     }
   },
   computed: {
-    styleName () {
+    styleName() {
       return {
         borderRadius: this.setPx(this.radius),
-        background: this.background,
-      }
+        background: this.background
+      };
     }
   }
 };
@@ -51,5 +81,19 @@ export default {
   &:first-child {
     padding-top: 6px;
   }
+  &-foot {
+    cursor: pointer;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    color: #d3dce6;
+    span {
+      margin-left: 4px;
+      font-size: 14px;
+    }
+  }
+  &-foot:hover {
+    color: #409eff;
+  }
 }
 </style>

+ 1 - 1
src/page/index/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="avue-contail">
+  <div class="avue-contail" :class="{'avue--collapse':isCollapse}">
     <div class="avue-header">
       <!-- 顶部导航栏 -->
       <!-- <top ref="top"/> -->

+ 15 - 2
src/page/index/tags.vue

@@ -19,7 +19,15 @@
     <div
       class="avue-tags__box"
       :class="{ 'avue-tags__box--close': !website.isFirstPage }"
+      style="display:flex;align-items: center;"
     >
+      <div
+        class="avue-breadcrumb"
+        :class="[{ 'avue-breadcrumb--active': isCollapse }]"
+        v-if="showCollapse"
+      >
+        <i class="icon-navicon" @click="setCollapse"></i>
+      </div>
       <el-tabs
         v-model="active"
         type="card"
@@ -220,7 +228,8 @@ export default {
       "tag",
       "website",
       "isFullScren",
-      "userInfo"
+      "userInfo",
+      "isCollapse"
     ]),
     ...mapState({
       showTag: state => state.common.showTag,
@@ -228,13 +237,17 @@ export default {
       showColor: state => state.common.showColor,
       showTheme: state => state.common.showTheme,
       showLock: state => state.common.showLock,
-      showFullScren: state => state.common.showFullScren
+      showFullScren: state => state.common.showFullScren,
+      showCollapse: state => state.common.showCollapse
     }),
     tagLen() {
       return this.tagList.length || 0;
     }
   },
   methods: {
+    setCollapse() {
+      this.$store.commit("SET_COLLAPSE");
+    },
     logout() {
       this.$confirm(this.$t("logoutTip"), this.$t("tip"), {
         confirmButtonText: this.$t("submitText"),

+ 2 - 1
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -43,7 +43,7 @@
     </div>
     <div class="customer-main">
       <containerTitle title="基础信息"></containerTitle>
-      <basic-container>
+      <basic-container :showBtn="true">
         <avue-form
           ref="form"
           class="trading-form"
@@ -578,6 +578,7 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
+      show: true,
       oldExchange: null,
       treeStyle: "height:" + (window.innerHeight - 315) + "px",
       itemtypeList: [],

+ 21 - 12
src/views/salaryManagement/primarySchool/detailsPage.vue

@@ -19,10 +19,12 @@
         >保存数据
       </el-button>
     </div>
-    <basic-container style="margin-top: 60px;">
-      <avue-form ref="form" v-model="form" :option="option"> </avue-form>
+    <div class="customer-main">
+       <containerTitle title="基础资料"></containerTitle>
+    <basic-container>
+      <avue-form class="trading-form" ref="form" v-model="form" :option="option" />
     </basic-container>
-    <containerTitle title="基础资料"></containerTitle>
+    <containerTitle title="基础明细"></containerTitle>
     <basic-container>
       <avue-crud
         ref="crud"
@@ -101,6 +103,7 @@
         </p>
       </el-dialog>
     </basic-container>
+    </div>
   </div>
 </template>
 
@@ -160,7 +163,7 @@ export default {
                 trigger: "blur"
               }
             ],
-            span: 8,
+            span: 6,
             change: ({ value }) => {
               if (value) {
                 this.optionList.column.forEach(e => {
@@ -184,7 +187,7 @@ export default {
               label: "dictValue",
               value: "dictKey"
             },
-            span: 8,
+            span: 6,
             rules: [
               {
                 required: true,
@@ -206,20 +209,18 @@ export default {
                   }
                 });
               }
-            },
-            row: true
+            }
           },
           {
             label: "备注",
             prop: "remarks",
             type: "textarea",
-            span: 24,
+            span: 12,
             minRows: 2
           }
         ]
       },
       optionList: {
-        searchShow: false,
         searchMenuSpan: 16,
         addBtn: false,
         border: true,
@@ -236,7 +237,7 @@ export default {
             prop: "cname",
             width: 100,
             searchSpan: 8,
-            search: true,
+            search: false,
             cell: true
           },
           {
@@ -953,9 +954,9 @@ export default {
     }
     if (this.detailData.status == 1) {
       this.option.disabled = true;
-      this.optionList.searchShow = true;
+      this.findObject(this.optionList.column, "cname").search=true
     }
-    this.optionList.height = window.innerHeight - 430;
+    this.optionList.height = window.innerHeight - 380;
   },
   methods: {
     cellStyle() {
@@ -1197,3 +1198,11 @@ export default {
   background: #a4cf57 !important;
 }
 </style>
+<style lang="scss" scoped>
+.trading-form ::v-deep .el-form-item {
+  margin-bottom: 0px !important;
+}
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+</style>