xiaojincai 5 éve
szülő
commit
0238e28440

+ 3 - 1
package.json

@@ -51,7 +51,9 @@
       "plugin:vue/essential",
       "eslint:recommended"
     ],
-    "rules": {},
+    "rules": {
+      "no-console":"off"
+    },
     "parserOptions": {
       "parser": "babel-eslint"
     }

+ 14 - 12
src/views/apply/Change.vue

@@ -17,7 +17,7 @@
                 <el-form-item label="报名时间">
                     <el-date-picker clearable
                     v-model="form.signup_time"
-                    type="date" value-format="yyyy-MM-dd"
+                    type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
                     placeholder="选择日期">
                     </el-date-picker>
                 </el-form-item>
@@ -43,8 +43,8 @@
                 </el-form-item>
                 <el-form-item label="考试时间" >
                     <el-date-picker clearable
-                    v-model="form.exam_time" value-format="yyyy-MM-dd"
-                    type="date"
+                    v-model="form.exam_time" value-format="yyyy-MM-dd HH:mm:ss"
+                    type="datetime"
                     placeholder="选择日期">
                     </el-date-picker>
                 </el-form-item>
@@ -59,7 +59,7 @@
                 <el-form-item label="培训时间">
                     <el-date-picker clearable
                     v-model="form.train_time1"
-                    type="daterange" value-format="yyyy-MM-dd"
+                    type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
                     range-separator="至"
                     start-placeholder="开始日期"
                     end-placeholder="结束日期">
@@ -113,8 +113,8 @@
                 <el-button style="float:right;margin-right:5px" @click="download('apply')"  size="small" type="info" >导出学员申报资料</el-button>
                &nbsp;&nbsp;
                 <el-button style="float:right;margin-right:5px" @click="download('exam')" size="small" type="success" >导出考勤表与申报考试表</el-button>
-                <el-button style="float:right;margin-right:5px" @click="setTime(1)" size="small" type="primary" >设置培训时间</el-button>
                 <el-button style="float:right;margin-right:5px" @click="setTime(2)" size="small" type="primary" >设置考试时间</el-button>
+                <el-button style="float:right;margin-right:5px" @click="setTime(1)" size="small" type="primary" >设置培训时间</el-button>
                 <!--<el-button style="float:right;margin-right:5px" @click="setTime(3)" size="small" type="primary" >生成学时证明</el-button>-->
               
         </div>
@@ -149,7 +149,7 @@
                     </template>
                     </el-table-column>
                     <el-table-column :key='index' v-if='item.checked&&item.name!="状态"&&item.name!="学时证明"' :width='item.width'
-                    :prop="item.value"  :label="item.name" show-overflow-tooltip=true>
+                    :prop="item.value"  :label="item.name" :show-overflow-tooltip="true">
                     </el-table-column>
                 </template>             
                 <el-table-column
@@ -250,7 +250,7 @@ export default {
       },
       getData(){
           var parm=this.form;
-          if(parm.train_time1){parm.train_time=parm.train_time1.join(',')};
+          if(parm.train_time1){parm.train_time=parm.train_time1.join(',')}
           this.loading=true;
           if(this.order_status != '-3'){parm.order_status=this.order_status}else{parm.order_status=''}
           this.$api.getSignList(parm).then(res=>{
@@ -298,11 +298,13 @@ export default {
                     type: 'warning'
                 }).then(() => {
                    this.$api.deleteSign({id:id}).then((res)=>{
-                        this.$message({
-                            message: '删除成功',
-                            type: 'success'
-                        })
-                        this.getData()
+                        if(res.status=="suc"){
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                        }
                 })
             })
       },

+ 16 - 18
src/views/apply/New.vue

@@ -48,8 +48,8 @@
                 </el-form-item>
                 <el-form-item label="考试时间" v-if="more_search">
                     <el-date-picker clearable
-                    v-model="form.exam_time" value-format="yyyy-MM-dd"
-                    type="date"
+                    v-model="form.exam_time" value-format="yyyy-MM-dd HH:mm:ss"
+                    type="datetime"
                     placeholder="选择日期">
                     </el-date-picker>
                 </el-form-item>
@@ -61,7 +61,7 @@
                 <el-form-item label="培训时间" v-if="more_search">
                     <el-date-picker clearable
                     v-model="form.train_time1"
-                    type="daterange" value-format="yyyy-MM-dd"
+                    type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
                     range-separator="至"
                     start-placeholder="开始日期"
                     end-placeholder="结束日期">
@@ -70,7 +70,7 @@
                 <el-form-item>
                     <span @click="more_search=!more_search" style="font-size:12px;color:#999;cursor:pointer;">   高级搜索</span>
                     <i v-if="!more_search" @click="more_search=!more_search" class="el-icon-arrow-down"></i>
-                    <i v-else="more_search" @click="more_search=!more_search" class="el-icon-arrow-up"></i>
+                    <i v-else @click="more_search=!more_search" class="el-icon-arrow-up"></i>
                 </el-form-item>
                 <el-form-item style="">
                        <el-button  @click="list=[],getData()" type="primary" icon="el-icon-search">搜索</el-button>
@@ -120,8 +120,8 @@
                 <el-button style="float:right;margin-right:5px" @click="download('apply')"  size="small" type="info" >导出学员申报资料</el-button>
                &nbsp;&nbsp;
                 <el-button style="float:right;margin-right:5px" @click="download('exam')" size="small" type="success" >导出考勤表与申报考试表</el-button>
-                <el-button style="float:right;margin-right:5px" @click="setTime(1)" size="small" type="primary" >设置培训时间</el-button>
                 <el-button style="float:right;margin-right:5px" @click="setTime(2)" size="small" type="primary" >设置考试时间</el-button>
+                <el-button style="float:right;margin-right:5px" @click="setTime(1)" size="small" type="primary" >设置培训时间</el-button>
                 <!--<el-button style="float:right;margin-right:5px" @click="setTime(3)" size="small" type="primary" >生成学时证明</el-button>-->
               
         </div>
@@ -156,7 +156,7 @@
                         </template>
                     </el-table-column>
                     <el-table-column :key='index' v-if='item.checked&&item.name!="状态"&&item.name!="学时证明"' :width='item.width'
-                    :prop="item.value"  :label="item.name" show-overflow-tooltip=true>
+                    :prop="item.value"  :label="item.name" :show-overflow-tooltip="true">
                     </el-table-column>
                 </template>             
                 <el-table-column
@@ -178,14 +178,14 @@
             width="30%">
             <el-date-picker
             v-model="time1" v-show='date_type == 1'
-            type="daterange" value-format="yyyy-MM-dd"
+            type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
             range-separator="至"
             start-placeholder="开始日期"
             end-placeholder="结束日期">
             </el-date-picker>
             <el-date-picker
             v-model="time2" v-show='date_type == 2'
-            type="date" value-format="yyyy-MM-dd">
+            type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
             </el-date-picker>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="dialogVisible = false">取 消</el-button>
@@ -258,7 +258,7 @@ export default {
       },
       getData(){
           var parm=this.form;
-          if(parm.train_time1){parm.train_time=parm.train_time1.join(',')};
+          if(parm.train_time1){parm.train_time=parm.train_time1.join(',')}
           this.loading=true;
           if(this.order_status != '-3'){parm.order_status=this.order_status}else{parm.order_status=''}
           this.$api.getSignList(parm).then(res=>{
@@ -292,7 +292,6 @@ export default {
           })
       },
       subChange(data){
-          console.log(data)
           this.form.subject_item=this.subject_item+'|'+data.join('|');
           this.getData();
       },
@@ -306,11 +305,13 @@ export default {
                     type: 'warning'
                 }).then(() => {
                    this.$api.deleteSign({id:id}).then((res)=>{
-                        this.$message({
-                            message: '删除成功',
-                            type: 'success'
-                        })
-                        this.getData()
+                       if(res.status=="suc"){
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                       }
                 })
             })
       },
@@ -332,7 +333,6 @@ export default {
       },
       handleSelectionChange(val) {
           this.ids=val      
-          console.log(val)
       },
       setStatus(type,text){
           var ids=[],val=this.ids;
@@ -385,7 +385,6 @@ export default {
       },
       save(){
           var parm={id:this.select_ids}
-          console.log(this.time)
           if(this.date_type == 1){
               parm.train_time=this.time1.join(',')
           }else if(this.date_type == 2){
@@ -438,7 +437,6 @@ export default {
                 ${tr}
             </table>
         `
-        console.log(table)
         newwindow.document.write(table);
         newwindow.window.print();  
       },

+ 15 - 13
src/views/apply/Update.vue

@@ -43,8 +43,8 @@
                 </el-form-item>
                 <el-form-item label="考试时间" >
                     <el-date-picker clearable
-                    v-model="form.exam_time" value-format="yyyy-MM-dd"
-                    type="date"
+                    v-model="form.exam_time" value-format="yyyy-MM-dd HH:mm:ss"
+                    type="datetime"
                     placeholder="选择日期">
                     </el-date-picker>
                 </el-form-item>
@@ -59,7 +59,7 @@
                 <el-form-item label="培训时间">
                     <el-date-picker clearable
                     v-model="form.train_time1"
-                    type="daterange" value-format="yyyy-MM-dd"
+                    type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
                     range-separator="至"
                     start-placeholder="开始日期"
                     end-placeholder="结束日期">
@@ -113,8 +113,8 @@
                 <el-button style="float:right;margin-right:5px" @click="download('apply')"  size="small" type="info" >导出学员申报资料</el-button>
                &nbsp;&nbsp;
                 <el-button style="float:right;margin-right:5px" @click="download('exam')" size="small" type="success" >导出考勤表与申报考试表</el-button>
-                <el-button style="float:right;margin-right:5px" @click="setTime(1)" size="small" type="primary" >设置培训时间</el-button>
                 <el-button style="float:right;margin-right:5px" @click="setTime(2)" size="small" type="primary" >设置考试时间</el-button>
+                <el-button style="float:right;margin-right:5px" @click="setTime(1)" size="small" type="primary" >设置培训时间</el-button>
                 <!--<el-button style="float:right;margin-right:5px" @click="setTime(3)" size="small" type="primary" >生成学时证明</el-button>-->
               
         </div>
@@ -149,7 +149,7 @@
                     </template>
                     </el-table-column>
                     <el-table-column :key='index' v-if='item.checked&&item.name!="状态"&&item.name!="学时证明"' :width='item.width'
-                    :prop="item.value"  :label="item.name" show-overflow-tooltip=true>
+                    :prop="item.value"  :label="item.name" :show-overflow-tooltip="true">
                     </el-table-column>
                 </template>             
                 <el-table-column
@@ -171,14 +171,14 @@
             width="30%">
             <el-date-picker
             v-model="time1" v-show='date_type == 1'
-            type="daterange" value-format="yyyy-MM-dd"
+            type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
             range-separator="至"
             start-placeholder="开始日期"
             end-placeholder="结束日期">
             </el-date-picker>
             <el-date-picker
             v-model="time2" v-show='date_type == 2'
-            type="date" value-format="yyyy-MM-dd">
+            type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
             </el-date-picker>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="dialogVisible = false">取 消</el-button>
@@ -250,7 +250,7 @@ export default {
       },
       getData(){
           var parm=this.form;
-          if(parm.train_time1){parm.train_time=parm.train_time1.join(',')};
+          if(parm.train_time1){parm.train_time=parm.train_time1.join(',')}
           this.loading=true;
           if(this.order_status != '-3'){parm.order_status=this.order_status}else{parm.order_status=''}
           this.$api.getSignList(parm).then(res=>{
@@ -298,11 +298,13 @@ export default {
                     type: 'warning'
                 }).then(() => {
                    this.$api.deleteSign({id:id}).then((res)=>{
-                        this.$message({
-                            message: '删除成功',
-                            type: 'success'
-                        })
-                        this.getData()
+                        if(res.status=="suc"){
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                        }
                 })
             })
       },

+ 1 - 1
src/views/content/addArticle.vue

@@ -205,7 +205,7 @@ export default {
       }
     },
     onBaiduMapReady(e) {
-      const that = this
+      // const that = this
       this.BMap = e.BMap
     },
      getClickInfo(e) {