Kaynağa Gözat

修复周会数据查询失败问题

humingbo 1 yıl önce
ebeveyn
işleme
c48ea8a6ef
1 değiştirilmiş dosya ile 17 ekleme ve 5 silme
  1. 17 5
      src/views/meeting/weekly.vue

+ 17 - 5
src/views/meeting/weekly.vue

@@ -55,6 +55,18 @@
               <el-input size="mini" type="textarea" :autosize="{ minRows: 4, maxRows: 10}" v-model="scope.row.planContent" placeholder="请填写工作计划信息" ></el-input>
             </template>
           </el-table-column>
+          <el-table-column label="预计开始时间" prop="beginDate">
+            <template slot-scope="scope">
+              <el-date-picker
+                v-model="scope.row.beginDate"
+                type="date"
+                size="mini"
+                value-format="yyyy-MM-dd"
+                format="yyyy-MM-dd"
+                placeholder="选择日期">
+              </el-date-picker>
+            </template>
+          </el-table-column>
           <el-table-column label="预计完成时间" prop="completionTimes">
             <template slot-scope="scope">
               <el-date-picker
@@ -81,12 +93,12 @@
           </el-table-column>
           <el-table-column label="操作" prop="op" width="150" v-if="currentWeek===weeks">
             <template slot-scope="scope">
-              <el-button size="mini" type="danger" @click="deleteRow(scope.$index, scope.row)">删除</el-button>
+              <el-button size="mini" type="danger" v-if="scope.row.taskId===undefined || scope.row.taskId===null" @click="deleteRow(scope.$index, scope.row)">删除</el-button>
             </template>
           </el-table-column>
         </el-table>
         <div style="margin-top: 15px;width: 80%;text-align: right" >
-          <el-button size="mini" type="success"  @click="addRow()">添加</el-button>
+          <el-button size="mini" type="success"  @click="addRow()"  v-if="currentWeek===weeks">添加</el-button>
         </div>
       </div>
     </div>
@@ -160,7 +172,7 @@ export default {
         const date = new Date();
         // 获取当前第几周
         let week = this.getYearWeek(date.getFullYear(), Number(date.getMonth()) + 1, date.getDate());
-        let currentWeek = week ;
+        let currentWeek = week+1 ;
         this.meetingWeek = currentWeek
         this.getMeetingsAndWorkPlansByWeeksData(currentWeek)
       })
@@ -323,11 +335,11 @@ export default {
           this.$message.warning(res.data)
         }else{
           if (index == 0) {
-            this.$message({
+           /*  this.$message({
               message: '不能删除此条数据',
               type: 'warning'
             });
-            return;
+            return; */
           }
           this.workPlans.splice(index, 1)
           let id = row.id;