瀏覽代碼

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/ssti-CollegeManage

yuanyiming 2 年之前
父節點
當前提交
f3dd4719be
共有 1 個文件被更改,包括 32 次插入25 次删除
  1. 32 25
      src/views/activityManage/makerActvityDetails.vue

+ 32 - 25
src/views/activityManage/makerActvityDetails.vue

@@ -152,7 +152,7 @@
                       <div class="operations">
                           <!-- <el-button type="primary" > -->
                               <el-button type="primary" size="mini" @click="updateTeacher(scope.row.Id)" style="font-size: 14px;">修改</el-button>
-                              <el-button type="primary" size="mini" style="font-size: 14px;" @click="DeleteS(scope.row.Id)">删除</el-button>
+                              <el-button type="primary" size="mini" style="font-size: 14px;" @click="DeleteS(scope.row)">删除</el-button>
                           <!-- </el-button> -->
                       </div>
                   </template>
@@ -265,7 +265,7 @@
                     </span>
                   </el-dialog>
                   <!-- 删除文件对话框结束 -->
-                          <!-- 提交对话框开始 -->
+                  <!-- 审核对话框开始 -->
                   <el-dialog
                     title="提示"
                     :visible.sync="processDialog"
@@ -278,6 +278,21 @@
                         <el-button @click="processDialog=false;" class="btn5" style="background:#cccccc" size="small">取消</el-button>
                     </span>
                   </el-dialog>
+                  <!-- 审核对话框结束 -->
+                  <!-- 删除老师对话框开始 -->
+                  <el-dialog
+                    title="提示"
+                    :visible.sync="DelTeacherDialog"
+                    width="600px"
+                    class="MAputIn AddMember">
+                    <div class="addDialogLogo">LOGO</div>
+                    <div class="deleteContent">是否删除“{{ delTeacherTable.Name}}”指导老师?</div>
+                    <span slot="footer" class="dialog-footer">
+                        <el-button type="primary" @click="DelTeacherYes" class="btn5" size="small">确认删除</el-button>
+                        <el-button @click="DelTeacherDialog=false;" class="btn5" style="background:#cccccc" size="small">取消</el-button>
+                    </span>
+                  </el-dialog>
+                  <!-- 删除老师对话框结束 -->
       </div>
 </template>
 
@@ -300,6 +315,7 @@ export default {
       dialogVisible1:false,
       addMemberDialog:false,
       processDialog:false,
+      DelTeacherDialog:false,
       customToolbar: [
         ["bold", "italic", "underline"], [{ list: "ordered" }, { list: "bullet" }],
         [{ align: "" }, { align: "center" }, { align: "right"}, { align: "justify"}],
@@ -329,7 +345,10 @@ export default {
       DelFileData:{
         fid:"",
         fileName:"",
-
+      },
+      delTeacherTable:{
+        Id:"",
+        name:"",
       },
       Member:{
         Id:'',
@@ -365,17 +384,6 @@ export default {
       this.DelFileData = this.tableData.reportFile.filter(item=>item.fid==Id)[0];
       this.DelFileDialog = true;
     },
-    // delFile(Id){
-    //   let file = this.tableData.reportFile.filter(item=>item.fid==Id)[0];
-    //   this.$confirm(`确定删除${file.fileName}这个文件吗?`, '提示', {
-    //     confirmButtonText: '确定',
-    //     cancelButtonText: '取消',
-    //     type: 'warning'
-    //   }).then(() => {
-    //     let newFile = this.tableData.reportFile.filter(item=>item.fid!=Id);
-    //     console.log(newFile);
-    //   })
-    // },
     getFile(val) {//上传文件
       val.fid = uuid.v1()
       let newData = [...this.tableData.reportFile,val];
@@ -393,14 +401,19 @@ export default {
       }).catch(err=>{
         this.$message.error(err.message);
       })
-        // console.log(val);
     },
     submit(){
       if(this.check()!=1)return;
       this.dialogVisible1 = true;
     },
-    DeleteS(Id){
-      this.tableData.course_teacher = this.tableData.course_teacher.filter(item=>item.Id!=Id);
+    DeleteS(row){
+      this.delTeacherTable = row;
+      this.DelTeacherDialog = true;
+    },
+    DelTeacherYes(){
+      this.tableData.course_teacher = this.tableData.course_teacher.filter(item=>item.Id!=this.delTeacherTable.Id);
+      this.DelTeacherDialog = false;
+
     },
     //保存修改
     save(){
@@ -421,8 +434,6 @@ export default {
         ph:data.phone,
         beginTime:JSON.stringify(data.begin_at)
       }
-      // console.log(param)
-      // return;
       this.ajax.post(this.$store.state.api+"/UpdateActivity",param).then(res=>{
         if(res.data==1){
           this.$message.success("修改成功");
@@ -434,7 +445,6 @@ export default {
       }).catch(err=>{
         this.$message.error(err.message)
       })
-      console.log(this.tableData)
     },
     change(){
       if(this.Member.Id=='')return this.$message.error("错误");
@@ -558,17 +568,14 @@ export default {
         aId:this.$route.query["Id"]
       }).then(res=>{
         if(!res.data[0][0])return this.$message.error("错误")
+        console.log(res)
         let data = res.data[0][0];
         data.begin_at = JSON.parse(data.begin_at);
         data.course_teacher = JSON.parse(data.course_teacher);
         data.chapters = JSON.parse(data.chapters)
-        // console.log(data.reportFile)
-        // console.log(data.reportFile==''||data.reportFile==null?[]:JSON.parse(data.reportFile))
         data.reportFile = data.reportFile==''||data.reportFile==null?[]:JSON.parse(data.reportFile)
-        // data.reportFile = data.reportFile==''||data.reportFile==null?[]:JSON.parse(data.reportFile);
         this.tableData = data;
-        console.log(this.tableData)
-        // this.$message.success("获取数据成功")
+        console.log(data)
       }).catch(err=>{
         this.$message.error(err.message)
       })