Browse Source

基本完成

yuanyiming 2 years ago
parent
commit
519f91cd9d

+ 1 - 1
src/views/projectApply/projectApplication.vue

@@ -82,7 +82,7 @@
         tooltip-effect="dark"
         stripe
         class="fontSize core_dialogue"
-        style="height: 480px;overflow: auto;"
+        style="height: 481px;overflow: auto;"
         :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
         @selection-change="handleSelectionChange">
         <!-- selection-change批量选择功能后续可能用到 -->

+ 135 - 64
src/views/projectApply/projectApplication2.vue

@@ -18,15 +18,7 @@
 
       <div class="PA2textArea">
         <div class="PA2textAreaTit">项目创新点</div>
-        <el-input
-        type="textarea"
-        :rows="6"
-        resize="none"
-        class="textArea"
-        placeholder="请输入内容"
-        v-model="data[0][0]">
-      
-        </el-input>
+        <vue-editor  :editorToolbar="customToolbar" v-model="data[0][0]"></vue-editor>
       </div>
 
       <div class="PA2mid">
@@ -34,78 +26,97 @@
       </div>
       <div class="PA2textArea">
         <div class="PA2textAreaTit PA2textAreaTit2">一、项目预期成果、数量及形式</div>
-        <el-input
-        type="textarea"
-        :rows="6"
-        resize="none"
-        class="textArea"
-        placeholder="请输入内容"
-        v-model="data[0][1]">
-        </el-input>
+        <vue-editor  :editorToolbar="customToolbar" v-model="data[0][1]"></vue-editor>
+        
       </div>
       <div class="PA2textArea">
         <div class="PA2textAreaTit PA2textAreaTit2">二、创客人才培养预期成果、数量</div>
-        <el-input
-        type="textarea"
-        :rows="6"
-        resize="none"
-        class="textArea"
-        placeholder="请输入内容"
-        v-model="data[0][2]">
+        <vue-editor  :editorToolbar="customToolbar" v-model="data[0][2]"></vue-editor>
        
-        </el-input>
       </div>
       <div class="PA2textArea">
         <div class="PA2textAreaTit PA2textAreaTit2">三、项目预期孵化、转化创业项目情况</div>
-        <el-input
-        type="textarea"
-        :rows="6"
-        resize="none"
-        class="textArea"
-        placeholder="请输入内容"
-        v-model="data[0][3]">
-        </el-input>
+        <vue-editor  :editorToolbar="customToolbar" v-model="data[0][3]"></vue-editor>
+        
       </div>
       <div class="PA2textArea">
         <div class="PA2textAreaTit">项目实施计划</div>
-        <el-input
-        type="textarea"
-        :rows="6"
-        resize="none"
-        class="textArea"
-        placeholder="请输入内容"
-        v-model="data[0][4]">
-        </el-input>
+        <vue-editor  :editorToolbar="customToolbar" v-model="data[0][4]"></vue-editor>
+        
       </div>
       <div class="baseBtn">
         <div class="blockWidth">
           <el-button type="primary"  @click="audit">立即修改</el-button>
         </div>
       </div>
-  
+      <!-- 修改对话框开始 -->
+      <el-dialog
+          title="提示"
+          :visible.sync="submitHint"
+          width="600px"
+          class="projectApplicationfundAddDialog"
+          style="top: 120px;"
+          :before-close="init">
+          <div class="addDialogLogo">LOGO</div>
+          <div class="deleteContent">确定修改项目基本信息?</div>
+          <span slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitAll" class="btn5">确认提交</el-button>
+            <el-button @click="init" class="btn5" style="background:#cccccc" size="small">取消</el-button>
+          </span>
+        </el-dialog>
+      <!-- 修改对话框结束 -->
     </div>
   </template>
   
   <script>
+import { VueEditor } from "vue2-editor";
+
       export default {
+        components:{
+          VueEditor
+        },
         data() {
           return {
             data:[],
+            submitHint:false,
+            customToolbar: [
+              ["bold", "italic", "underline"], [{ list: "ordered" }, { list: "bullet" }],
+              [{ align: "" }, { align: "center" }, { align: "right"}, { align: "justify"}],
+              [{header:[false,1,2,3,4]}]
+            ],
           }
         },
         methods:{
           content(){      //导航栏项目详情跳转
-            // alert('111')
             this.$router.push('/projectApplicationDetails')
           },
-          audit(){   //立即审核按钮
-            // this.$router.push('/projectApplication')
-            this.$message.success('修改成功')
-          },
          
           backBtn(){
             this.$router.push('/projectApplicationApply2')
           },
+          audit(){   //立即审核按钮
+            this.submitHint=true
+          },
+          submitAll(){
+            let param={
+              uid:this.$store.state.userInfo.userid,
+              pid:JSON.parse(localStorage.getItem('pid')),
+              message:JSON.stringify(this.data)
+            }
+              this.ajax
+                  .post(this.$store.state.api+'/UpdateProjectDetail',param)
+                  .then(res=>{
+                    console.log(res);
+                    this.$message.success('修改成功')
+                    this.init()
+                  },err=>{
+                    console.log(err);
+                  })
+          },
+          init(){
+            this.submitHint=false
+
+          },
           getData(){   //初始化完成获取基本数据进行填充
             let param={
               uid:this.$store.state.userInfo.userid,
@@ -114,21 +125,9 @@
               this.ajax
                     .get(this.$store.state.api+'/GetProjectDetailMessage',param)
                     .then(res=>{
-                      // let data=JSON.parse(res.data[0][0].chapters)
-                      // console.log(data)
-                      this.data = JSON.parse(res.data[0][0].chapters)
-                      // console.log(res.data[0][0]['chapters'])
-                      // console.log(data[0]);
-                      // let obj={}
-                      // for(let key in data[0]){
-                      //   obj[key] =data[0][key]
-                      // }
-                      // this.textarea1=obj[0];
-                      // this.textarea2=obj[1];
-                      // this.textarea3=obj[2];
-                      // this.textarea4=obj[3];
-                      // this.textarea5=obj[4];
-
+                      let data=JSON.parse(res.data[0][0].chapters)
+                      console.log(data)
+                      this.data=data
                     },err=>{
                       console.log(err);
                     })
@@ -136,14 +135,83 @@
         },
         created(){
           this.getData();
-          // this.value=(this.options[0].value)
         }
       }
   </script>
   
   <style lang="less">
   .projectApplication2{
-
+ //项目修改对话框开始
+ .projectApplicationfundAddDialog{  
+ 
+ .el-dialog__header{
+   border-radius: 10px 10px 0 0;
+ }
+ .el-dialog{
+   border-radius:10px ;
+ }
+ 
+ .deleteContent{
+   width: 100%;
+   text-align: center;
+   font-size: 22px;
+   color: #000;
+ }
+ .addDialogLogo{
+   width: 60px;
+   height: 30px;
+   line-height: 30px;
+   background: #f2f2f2;
+   position: absolute;
+   left: 10px;
+   top: 10px;
+   text-align: center;
+ }
+ .el-dialog__header{
+ background: #32455b;
+ }
+ .el-dialog__title{
+   font-size: 22px;
+   color:rgb(246, 247, 246);
+ }
+ .addDialogMid{
+   box-sizing: border-box;
+   padding:0 60px 0 10px;
+   .addDialogTit{
+     display: flex;
+     span{
+       width: 80px;
+       line-height: 40px;
+       text-align: left;
+     }
+   }
+ .addDialogTit1{
+   display: flex;
+   justify-content: space-between;
+   margin-bottom: 15px;
+ }
+ .addDialogTit2{
+   margin-top: 10px;
+   font-size: 18px;
+   color: #000;
+   text-indent: 2em;
+ }
+ .addDialogCon{
+   margin-top: 20px;
+ }
+}
+.dialog-footer{
+ display: flex;
+ justify-content: center;
+ .btn5{
+   height: 40px;
+   font-size: 16px;
+   background: #0e72e6;
+   width: 200px;
+ }
+}
+}
+//项目修改对话框结束
     .PA2textArea{     //标题栏
         margin: 15px 0;
         .PA2textAreaTit{
@@ -154,6 +222,9 @@
             margin-bottom: 15px;
             color: #2387ff;
         }
+        .ql-toolbar.ql-snow{
+          display: flex;
+        }
         .PA2textAreaTit2{
             font-size: 16px;
         }

+ 8 - 6
src/views/projectApply/projectApplicationApply3.vue

@@ -167,7 +167,7 @@
           :modal="true"
           :close-on-click-modal="true"
           class="AddFund"
-          :before-close="this.init">
+          :before-close="init">
      
             <div class="littleBlock">
               <div class="dialogLabel">一月</div>
@@ -268,7 +268,7 @@ import { VueEditor } from "vue2-editor";
       data() {
         return {
           addFundDialog:false,
-          setFund:false,
+          setFund:true,
           mouthItems:[      //表格基础
             {prop:'one',label:'一月'},
             {prop:'two',label:'二月'},
@@ -410,10 +410,10 @@ import { VueEditor } from "vue2-editor";
     }
     .AddFund{    //添加对话框
       .el-input__inner{
-          width: 90px;
+          width: 90%;
       }
       .el-dialog{
-          width: 1100px;
+          width: 700px;
           border-radius: 5px;
           overflow: hidden;
         }
@@ -421,8 +421,9 @@ import { VueEditor } from "vue2-editor";
         .el-dialog__body{
           display: flex;
           align-items: center;
-          justify-content: space-between;
+          justify-content: flex-start;
           flex-wrap: wrap;
+          
         }
         
         .el-dialog__header{
@@ -439,7 +440,8 @@ import { VueEditor } from "vue2-editor";
             display: flex;
             margin-top: 20px;
             margin-right: 15px;
-            width: 15%;
+            flex-shrink: 0;
+            width: 22%;
             .dialogLabel{     //label
               min-width: 50px;
               font-size: 16px;

+ 122 - 23
src/views/projectApply/projectApplicationDetails.vue

@@ -253,6 +253,23 @@
               </span>
         </el-dialog>
       <!-- 删除成员对话框结束 -->
+
+       <!-- 修改对话框开始 -->
+       <el-dialog
+          title="提示"
+          :visible.sync="submitHint"
+          width="600px"
+          class="projectApplicationfundAddDialog"
+          style="top: 120px;"
+          :before-close="init">
+          <div class="addDialogLogo">LOGO</div>
+          <div class="deleteContent">确定修改项目基本信息?</div>
+          <span slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitAll" class="btn5">确认提交</el-button>
+            <el-button @click="init" class="btn5" style="background:#cccccc" size="small">取消</el-button>
+          </span>
+        </el-dialog>
+      <!-- 修改对话框结束 -->
   </div>
 </template>
 
@@ -266,11 +283,12 @@
           delMember:false,
           amendMemberDialog:false,
           addMemberDialog:false,
+          submitHint:false,
           select:{    //数据详情框数据
             project:'疯狂星期四',   
             person:'袁一鸣',
-            departmentData:"",  //select框值
-            sort:'',
+            departmentData:"",  //部门框值
+            sort:'',     //分类值
             tel:'17739460368',
             Date:'',
             Fund:'200000',
@@ -299,8 +317,6 @@
         }
       },
       methods:{
-        
-
         addMember(){       //添加成员按钮,显示对话框
             this.addMemberDialog=true
         },
@@ -317,16 +333,16 @@
             this.addTabMember={}
             this.addMemberDialog=false;
         },
-        amendDialogData(val){   //列表修改按钮
+        amendDialogData(val){   //人员信息列表修改按钮
           this.iid=val;
           console.log(val);
           // this.amendTabMember=val
           Object.assign(this.amendTabMember,val)
           this.amendMemberDialog=true;
         },
-        commit2(){       //对话框确定修改按钮
+        commit2(){       //人员信息对话框确定修改按钮
           this.tableData.forEach((e,i)=>{
-            if (e.id==this.iid.id) {
+            if (e.id == this.iid.id) {
               Object.assign(e,this.amendTabMember)
               this.amendMemberDialog=false;
               this.$message.success('修改信息成功')
@@ -346,39 +362,52 @@
             }
           })
         },
-        init(){
-          this.addMemberDialog=false;
-          this.amendMemberDialog=false;
-          this.delMember=false;
-
-        },
-
-        remark(){    //导航栏项目详情按钮
-          this.$router.push('/projectApplication2')
-        },
         audit(){    //立即审核按钮
           // this.$message.success('审核成功')
+          this.submitHint=true
+        },
+        submitAll(){
           let param={
             uid:this.$store.state.userInfo.userid,
             pid:JSON.parse(localStorage.getItem('pid')),
             tit:this.select.project,
             leader:this.select.person,
             beginTime:this.select.Date,
-            cid:'',
+            cid:this.select.departmentData,
             mon:this.select.Fund,
             phone:this.select.tel,
-            tid:'',
+            tid:this.select.sort,
             student:JSON.stringify(this.tableData),
             con:this.textarea
           }
             this.ajax
                   .post(this.$store.state.api+'/UpdateProjectBase',param)
                   .then(res=>{
-                    this.$message.success('修改成功')
+                    console.log(res);
+                    if (res.data==1) {
+                      this.$message.success('修改成功')
+                      this.submitHint=false
+                      this.getData()
+                      return
+                    }
+                    this.$message.error('修改失败')
+                   
+
                   },err=>{
                     console.log(err);
                   })
         },
+        init(){
+          this.addMemberDialog=false;
+          this.amendMemberDialog=false;
+          this.delMember=false;
+          this.submitHint=false;
+        },
+
+        remark(){    //导航栏项目详情按钮
+          this.$router.push('/projectApplication2')
+        },
+
         back(){     //返回按钮
           this.$router.push('/projectApplication')
         },
@@ -401,8 +430,8 @@
                     this.textarea=data.brief;
                     this.tableData=JSON.parse(data.course_student) 
                     this.select.tel=data.phone;
-                    this.select.department=data.typeid;
-                    this.select.sort=data.courseId
+                    // this.select.department=data.typeid;
+                    // this.select.sort=data.courseId
                     this.select.departmentData = data['classid']
                     this.select.sort = data['typeid']
                   },err=>{
@@ -534,6 +563,76 @@
 
         }
   }
-  
+  //项目修改对话框开始
+  .projectApplicationfundAddDialog{  
+ 
+ .el-dialog__header{
+   border-radius: 10px 10px 0 0;
+ }
+ .el-dialog{
+   border-radius:10px ;
+ }
+ 
+ .deleteContent{
+   width: 100%;
+   text-align: center;
+   font-size: 22px;
+   color: #000;
+ }
+ .addDialogLogo{
+   width: 60px;
+   height: 30px;
+   line-height: 30px;
+   background: #f2f2f2;
+   position: absolute;
+   left: 10px;
+   top: 10px;
+   text-align: center;
+ }
+ .el-dialog__header{
+ background: #32455b;
+ }
+ .el-dialog__title{
+   font-size: 22px;
+   color:rgb(246, 247, 246);
+ }
+ .addDialogMid{
+   box-sizing: border-box;
+   padding:0 60px 0 10px;
+   .addDialogTit{
+     display: flex;
+     span{
+       width: 80px;
+       line-height: 40px;
+       text-align: left;
+     }
+   }
+ .addDialogTit1{
+   display: flex;
+   justify-content: space-between;
+   margin-bottom: 15px;
+ }
+ .addDialogTit2{
+   margin-top: 10px;
+   font-size: 18px;
+   color: #000;
+   text-indent: 2em;
+ }
+ .addDialogCon{
+   margin-top: 20px;
+ }
+}
+.dialog-footer{
+ display: flex;
+ justify-content: center;
+ .btn5{
+   height: 40px;
+   font-size: 16px;
+   background: #0e72e6;
+   width: 200px;
+ }
+}
+}
+//项目修改对话框结束
 }
 </style>