浏览代码

公司信息的保存

ccf 3 年之前
父节点
当前提交
15fe0eb325
共有 2 个文件被更改,包括 44 次插入68 次删除
  1. 2 1
      assets/css/kaifain/kaifainAdd.scss
  2. 42 67
      pages/otherpage/companyComplete/add.vue

+ 2 - 1
assets/css/kaifain/kaifainAdd.scss

@@ -165,7 +165,8 @@
         }
       }
       .editor {
-        width: 768px;
+        max-width: 768px;
+        width: 100%;
         height: 380px;
         background: rgba(255, 255, 255, 1);
         border-radius: 3px;

+ 42 - 67
pages/otherpage/companyComplete/add.vue

@@ -53,14 +53,24 @@
                   </div>
                 </el-form-item>
                 <el-form-item>
-                  <el-button v-if="company_info.status==2" @click="active_set(2,false)" type="primary">添加解决方案</el-button>
+                  <el-button v-if="company_info.status==2" @click="active_set(2,false)" type="primary">下一步</el-button>
                   <el-button v-if="company_info.status!=2" @click="active_set(2,false)" type="primary">保存企业信息</el-button>
                 </el-form-item>
               </div>
             </el-form>
 
             <el-form v-if="active==2" style="margin-top: 60px" ref="form" label-width="80px">
-              <solution_add></solution_add>
+              <el-drawer
+                title="添加解决方案"
+                :size="solution_add_size"
+                :append-to-body="true"
+                :modal-append-to-body="true"
+                :wrapperClosable="false"
+                :visible.sync="drawer"
+                :direction="direction"
+                :before-close="handleClose">
+                <solution_add></solution_add>
+              </el-drawer>
             </el-form>
 
             <el-form v-if="active==3" style="margin-top: 60px" ref="form"  label-width="80px">
@@ -218,6 +228,8 @@
     data () {
       return {
         sale_id: '', // 编辑时
+        drawer: true,
+        direction: 'rtl',
         kc_disabled:false,
         zj_disabled:false,
         active:1,
@@ -258,11 +270,19 @@
           img:""
         },
         company_info:{},//公司信息
+        solution_add_size:"700",
       }
     },
+    computed: {
+      ...mapState(["deviceType"]),
+    },
     mounted () {
       this.needLogin();
       this.getCompanyInfo();
+      if (this.deviceType.ios || this.deviceType.android)
+      {
+        this.solution_add_size="100%";
+      }
       var sale_id = this.$route.query.id ? this.$route.query.id : 0;
       this._getConsultCate()
       if (sale_id!=0) {
@@ -521,73 +541,11 @@
       },
       /** 第二步添加 */
       async add_two() {
-        if(!this.teacherInfo.name)
-        {
-          this.$message.error('讲师名称必须填写');
-          return false;
-        }
-
-        if(!this.teacherInfo.op)
-        {
-          this.$message.error('职称必须填写');
-          return false;
-        }
-
-        if(!this.teacherInfo.img)
-        {
-          this.$message.error('封面必须上传');
-          return false;
-        }
-
-        if(!this.teacherInfo.content)
-        {
-          this.$message.error('自我介绍必须填写');
-          return false;
-        }
-        this.teacherInfo.sale_id=this.sale_id;
-        var data=JSON.stringify(this.teacherInfo);
-        await this.$axios.$post('/api/sale/sale_add_two', { data }).then(res => {
-          if (res.status === 1) {
-            this.active=3;
-          }
-        }).catch(err => {
-
-        })
+        this.active=3;
       },
       /** 第三步添加 */
       async add_three(type=1,kc_id=0,zj_id=0) {
-        var video_list=JSON.stringify(this.video_list);
-        var saleInfo=JSON.stringify(this.saleInfo);
-        await this.$axios.$post('/api/sale/sale_add_three', {type, sale_id:this.sale_id, video_list,saleInfo }).then(res => {
-          if (res.status === 1) {
-            if(!res.data.result)
-            {
-              this.video_list=res.data.list;
-              if(type==1)
-              {
-                this.active=4;
-              }
-              else if(type==2)
-              {
-                var new_object={"id":"","video_name":"","list":[{"id":"","kc_id":"","progress":0,"video_name":"","checked":false,"time_type":0,"ymd":"","his":""}]};
-                this.video_list.push(new_object);
-                this.add_video();
-              }
-              else if(type==3)
-              {
-                var new_object={"id":"","kc_id":"","progress":0,"video_name":"","checked":false,"time_type":0,"ymd":"","his":""};
-                this.video_list[zj_id].list.push(new_object);
-                this.add_video();
-              }
-            }
-            else
-            {
-              this.$message.error(res.data.result_msg);
-            }
-          }
-        }).catch(err => {
-
-        })
+        this.active=4;
       },
       /** 第四步添加 */
       async add_fore() {
@@ -640,6 +598,16 @@
 
 <style scope lang="scss">
   @import "@/assets/css/consult/create.scss";
+  /*1.显示滚动条:当内容超出容器的时候,可以拖动:*/
+  .el-drawer__body {
+    overflow: auto;
+    /* overflow-x: auto; */
+  }
+
+  /*2.隐藏滚动条,太丑了*/
+  .el-drawer__container ::-webkit-scrollbar {
+    display: none;
+  }
   .common-upload {
     display: flex;
     align-items: end;
@@ -723,7 +691,7 @@
   .input-with-select .el-input-group__prepend {
     background-color: #fff;
   }
-  .lenrn_content{width: 1000px;margin: 0px auto;background: white}
+  .lenrn_content{max-width: 1000px;width:100%;margin: 0px auto;background: white}
   input::-webkit-outer-spin-button,
   input::-webkit-inner-spin-button {
     -webkit-appearance: none !important;
@@ -806,4 +774,11 @@
       color:#606266;
     }
   }
+
+  @media screen and (max-width: 400px) {
+    .text-content{margin-left: 0px}
+    .el-header{display: none}
+    .el-form{margin-top: 0px !important}
+    .el-form-item__label{text-align: left}
+  }
 </style>