Sfoglia il codice sorgente

军事训练登记

zxr 3 anni fa
parent
commit
f44336316e

+ 2 - 2
src/api/grassrootsregistration/bdgldrill.js

@@ -62,9 +62,9 @@ export function treeselect(query) {
 
 export function getweekwork(query) {
   return request({
-    url: `/grassrootsregistration/bdgldrill/getweekwork?drillTime=${query}`,
+    url: `/grassrootsregistration/bdgldrill/getweekwork`,
     method: 'get',
-
+    params: query
   })
 }
 // 删除修改中的列表数据

+ 13 - 8
src/views/grassrootsregistration/bdgldrill/index.vue

@@ -228,7 +228,7 @@
             type="date"
             value-format="yyyy-MM-dd"
             placeholder="选择训练开始时间"
-            @change="drillTimechange"
+           
           >
           </el-date-picker>
         </el-form-item>
@@ -244,12 +244,13 @@
             type="date"
             value-format="yyyy-MM-dd"
             placeholder="选择训练结束时间"
+             @change="drillTimechange"
           >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="周工作内容">
           <input
-            v-model="form.hr"
+            v-model="nr"
             placeholder=""
             style="
               width: 810px;
@@ -508,7 +509,6 @@
             type="date"
             value-format="yyyy-MM-dd"
             placeholder="选择训练开始时间"
-            @change="drillTimechange"
           >
           </el-date-picker>
         </el-form-item>
@@ -524,6 +524,7 @@
             type="date"
             value-format="yyyy-MM-dd"
             placeholder="选择训练结束时间"
+             @change="drillTimechange"
           >
           </el-date-picker>
         </el-form-item>
@@ -1153,12 +1154,16 @@ export default {
     },
     // 训练开始时间触发
     drillTimechange() {
-      if (this.form.drillTime) {
-        getweekwork(this.form.drillTime).then((res) => {
+      
+      if (this.form.drillTime&&this.form.drillEndtime&&this.form.unitId) {
+        getweekwork({drillTime:this.form.drillTime,drillEndtime:this.form.drillEndtime,unitId:this.form.unitId}).then((res) => {
           this.nr = "";
-          res.data.map((item) => {
-            console.log(item);
-            this.nr += item.contents + ",";
+          res.data.map((item,i) => {
+            if(i==0){
+               this.nr += item.contents;
+            }else{
+               this.nr += ","+item.contents;
+            }
           });
         });
       }