浏览代码

Merge remote-tracking branch 'origin/AIControlV1.3.1' into test

zhouna 5 年之前
父节点
当前提交
acc394f8da

+ 9 - 0
src/api/utils.js

@@ -114,6 +114,15 @@ export default {
       }
     }
   },
+  tranformDate(time,str,flag='-'){
+    if(!time){
+      return time;
+    }
+    const year=time.getFullYear();
+    const month = time.getMonth()+1;
+    const day = time.getDate();
+    return year+flag+(month>9?month:'0'+month)+flag+(day>9?day:'0'+day)+str;
+  },
   //获取两个时间间隔天数
   getTimeRangeDay(timeArr) {
     if(!timeArr||timeArr.length==0){

+ 2 - 1
src/components/qualityControl/AddStandardRecord.vue

@@ -134,7 +134,7 @@
           return
         }
         if(!behospitalCode){
-          this.warning("请输入病人住院号");
+          this.warning("请输入病人住院号");
           return
         }
         const param={ hospitalId, behospitalCode };
@@ -149,6 +149,7 @@
               this.saveDisable=false;
             }
           }else{
+            this.medicalRecordlist = [];
             this.saveDisable=true;
             this.warning(res.data.msg);
           }

+ 1 - 1
src/components/qualityControl/AutoTestList.vue

@@ -86,7 +86,7 @@
                            :total="total">
             </el-pagination>
         </div>
-        <el-dialog title="修改" :visible.sync="dialogTaskName" class="autotest-dialog">
+        <el-dialog title="新建" :visible.sync="dialogTaskName" class="autotest-dialog">
             <el-form>
                 <el-form-item label="任务名称:" label-width="80">
                     <el-input v-model="taskName" placeholder="请输入任务名称" autocomplete="off"></el-input>

+ 1 - 2
src/components/qualityControl/AutoTestTask.vue

@@ -34,8 +34,7 @@
                     </template>
                 </el-table-column>
             </el-table>
-            <el-pagination v-if="total>pageSize"
-                           :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                            @current-change="currentChange"
                            background
                            :page-size="pageSize"

+ 19 - 9
src/components/qualityControl/StandardRecord.vue

@@ -201,6 +201,11 @@
       },
       getDataList(isTurnPage) {
         const param = this.getFilterItems(isTurnPage);
+        const {leaveHosDateStart,leaveHosDateEnd}=param;
+        if(leaveHosDateStart&&leaveHosDateEnd&&leaveHosDateStart>leaveHosDateEnd){
+          this.warning('开始时间不能大于结束时间');
+          return;
+        }
         this.searched = true;
         const loading = this.$loading({
             lock: true,
@@ -209,13 +214,17 @@
             background: 'rgba(0, 0, 0, 0.7)'
         });
         api.getStdList(param).then((res) => {
-          loading.close()
-          let list = res.data.data.records
-          this.list = list;
-          this.total = res.data.data.total;
-          if(this.inCurrentPage!==undefined){
-            this.currentPage=this.inCurrentPage;
-            this.inCurrentPage = undefined;
+          loading.close();
+          if(res.data.code==="0"){
+            let list = res.data.data.records;
+            this.list = list;
+            this.total = res.data.data.total;
+            if(this.inCurrentPage!==undefined){
+              this.currentPage=this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }else{
+            this.warning(res.data.msg||'操作失败');
           }
         })
       },
@@ -275,6 +284,7 @@
           this.clearFilter();
         };
         const {hospitalId,behospitalCode, deptId, name,date1,date2} = this.filter;
+        const {tranformDate} = utils;
         const param = {
           current: this.inCurrentPage||this.currentPage,
           size: this.pageSize,
@@ -282,8 +292,8 @@
           deptId,
           name,
           behospitalCode,
-          leaveHosDateEnd:date2,
-          leaveHosDateStart: date1
+          leaveHosDateEnd:tranformDate(date2,' 23:59:59'),
+          leaveHosDateStart: tranformDate(date1," 00:00:00")
         };
         return param;
       },

+ 2 - 2
src/components/qualityControl/TaskDetail.vue

@@ -107,7 +107,7 @@
         <el-dialog title="修改" :visible.sync="dialogVisible" class="autotest-dialog">
             <el-form>
                 <el-form-item label="状态:" label-width="80">
-                    <el-select size="mini" v-model="status" placeholder="状态" clearable>
+                    <el-select size="mini" v-model="status" placeholder="状态">
                         <el-option v-for="item in editStatus" :label="item.name" :value="item.id" :key="item.id"></el-option>
                     </el-select>
                 </el-form-item>
@@ -290,7 +290,7 @@
         }).catch(() => {});
       },
       showDelDialog(id){
-        this.showConfirmDialog('是否删除该任务?',()=>{
+        this.showConfirmDialog('是否删除该缺陷?',()=>{
           api.delTaskDetail({id:id}).then((res)=>{
             if(res.data.code=='0'){
               this.warning(res.data.msg||'操作成功','success');