Browse Source

修改问题加医嘱

xiaoran 2 năm trước cách đây
mục cha
commit
eb0d012061

+ 204 - 45
src/views/data/query/adviceSearch.vue

@@ -4,46 +4,170 @@
       <div class="barBtn-title">医嘱查询</div>
       <div class="barBtn-title">医嘱查询</div>
       <div class="bnh"></div>
       <div class="bnh"></div>
       <div class="barBtn">
       <div class="barBtn">
-        <el-form ref="form" :model="formData" label-width="100px">
-          <el-form-item v-for="(item, index) in formData.seniorList" :key="index">
+         <el-form ref="form" :model="formData1" label-width="100px">
+          <el-form-item
+            v-for="(item, index) in formData1.seniorList"
+            :key="index"
+          >
             <!-- 下拉框开始 -->
             <!-- 下拉框开始 -->
-            <el-select class="width150" filterable v-model="item.key" placeholder="请选择" @change="funSelect(index)">
-              <el-option v-for="(item, index) in fieldList" :label="item.name" :value="item.id" :key="index"></el-option>
+            <el-select
+              v-if="index != 0"
+              v-model="item.select_type"
+              :class="index != 0 ? 'marginLeft' : ''"
+              class="width100"
+              filterable
+              placeholder=""
+              
+            >
+              <!-- fieldList -->
+              <el-option label="且" :value="0" />
+              <el-option label="或者" :value="1" />
+              <el-option label="不包含" :value="2" />
+            </el-select>
+            <span v-if="index != 0" class="pind10" />
+            <el-select
+              v-model="item.key"
+              class="width150"
+              filterable
+              placeholder="请选择"
+              @change="funSelect(index,)"
+              
+            >
+              <!-- fieldList -->
+              <el-option
+                v-for="(item, index) in fieldList"
+                :key="index"
+                :label="item.name"
+                :value="item.id"
+                
+              />
             </el-select>
             </el-select>
             <!-- 下拉框结束 -->
             <!-- 下拉框结束 -->
-            <span class="pind10"></span>
+
+            <span class="pind10" />
+            <!-- 中间选择输入框开始 -->
             <span v-if="item.key == 'YZQX'">
             <span v-if="item.key == 'YZQX'">
               <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
               <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
-                <el-option v-for="(item, index) in YZQXList" :key="index" :label="item.val" :value="item.id"></el-option>
+                <el-option v-for="(item, index) in YZQXList" :key="index" :label="item.val" :value="item.val"></el-option>
               </el-select>
               </el-select>
             </span>
             </span>
             <span v-else-if="item.key == 'KZKS'">
             <span v-else-if="item.key == 'KZKS'">
               <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
               <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
-                <el-option v-for="(item, index) in KZKSList" :key="index" :label="item.val" :value="item.id"></el-option>
+                <el-option v-for="(item, index) in KZKSList" :key="index" :label="item.val" :value="item.val"></el-option>
               </el-select>
               </el-select>
             </span>
             </span>
             <span v-else-if="item.key == 'BRKS'">
             <span v-else-if="item.key == 'BRKS'">
               <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
               <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
-                <el-option v-for="(item, index) in BRKSList" :key="index" :label="item.val" :value="item.id"></el-option>
+                <el-option v-for="(item, index) in BRKSList" :key="index" :label="item.val" :value="item.val"></el-option>
               </el-select>
               </el-select>
             </span>
             </span>
             <span v-else>
             <span v-else>
               <el-input class="width150" v-model="item.value" placeholder=""></el-input>
               <el-input class="width150" v-model="item.value" placeholder=""></el-input>
             </span>
             </span>
+           
             <!-- 中间选择输入框结束 -->
             <!-- 中间选择输入框结束 -->
-            <span class="pind10"></span>
-            <span class="pind10"></span>
+
+            <span class="pind10" />
+            <!-- 条件下拉开始 -->
+            <el-select v-model="item.type" class="width90"  placeholder="">
+              <el-option label="精确" value="1" />
+              <el-option label="模糊" value="0" />
+            </el-select>
+            <!-- 条件下拉结束 -->
+
+            <span class="pind10" />
             <!-- 增减重置选项按钮开始 -->
             <!-- 增减重置选项按钮开始 -->
             <span>
             <span>
-              <el-button :disabled="formData.seniorList.length == 1" v-if="index != 0" type="primary" icon="el-icon-minus" @click="funDel(index)"></el-button>
-              <el-button type="primary" icon="el-icon-plus" @click="funAdd" v-if="index == formData.seniorList.length - 1"></el-button>
+              <el-button
+                v-if="index != 0 "
+                :disabled="formData1.seniorList.length == 1"
+                type="primary"
+                icon="el-icon-minus"
+                @click="funDel(index)"
+              />
+              <el-button
+                v-if="index == formData1.seniorList.length - 1"
+                type="primary"
+                icon="el-icon-plus"
+                @click="funAdd"
+              />
             </span>
             </span>
             <!-- 增减重置选项按钮结束 -->
             <!-- 增减重置选项按钮结束 -->
           </el-form-item>
           </el-form-item>
-          <el-form-item label="开嘱时间">
-            <el-date-picker v-model="formData.startTime" type="date" format="yyyy 年 MM 月 dd 日" value-format="yyyyMMdd" placeholder="开始日期"></el-date-picker>
-            <span class="pind10"></span>
-            <el-date-picker v-model="formData.endTime" type="date" format="yyyy 年 MM 月 dd 日" value-format="yyyyMMdd" placeholder="结束日期"></el-date-picker>
+          <el-form-item label="出院时间">
+            <el-date-picker
+              v-model="formData1.startTime"
+              type="date"
+              format="yyyy 年 MM 月 dd 日"
+              value-format="yyyyMMdd"
+              placeholder="开始日期"
+		          :picker-options="pickerOptions"
+              
+            />
+            <span class="pind10" />
+            <el-date-picker
+              v-model="formData1.endTime"
+              type="date"
+              format="yyyy 年 MM 月 dd 日"
+              value-format="yyyyMMdd"
+              placeholder="结束日期"
+		          :picker-options="pickerOptions"
+             
+            />
+          </el-form-item>
+
+          <el-form-item label="住院天数">
+            <el-input-number
+              v-model="formData1.AAC04_start"
+              :min="1"
+              :step="1"
+              :controls="false"
+              placeholder="起始天数"
+              style="width: 220px"
+              
+            ></el-input-number>
+            <span class="pind10" />
+            <el-input-number
+              v-model="formData1.AAC04_end"
+              :min="1"
+              :step="1"
+              :controls="false"
+              placeholder="终止天数"
+              style="width: 220px"
+              
+            ></el-input-number>
+          </el-form-item>
+
+          <el-form-item label="患者年龄">
+            <el-input-number
+              v-model="formData1.AAA04_start"
+              :min="1"
+              :step="1"
+              :controls="false"
+              :placeholder="formData1.ageType1 ? '起始年龄' : '起始天数'"
+              style="width: 220px"
+             
+            ></el-input-number>
+            <el-select v-model="formData1.ageType1"  placeholder="请选择" style="width: 80px;">
+              <el-option label="年龄" :value="1"></el-option>
+              <el-option label="天数" :value="0"></el-option>
+            </el-select>
+            <span class="pind10" />
+            ——
+            <span class="pind10" />
+            <el-input-number
+              v-model="formData1.AAA04_end"
+              :min="1"
+              :step="1"
+              :controls="false"
+              :placeholder="formData1.ageType2 ? '终止年龄' : '终止天数'"
+              style="width: 220px"
+              
+            ></el-input-number>
+            <el-select v-model="formData1.ageType2"  placeholder="请选择" style="width: 80px;">
+              <el-option label="年龄" :value="1"></el-option>
+              <el-option label="天数" :value="0"></el-option>
+            </el-select>
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
       </div>
       </div>
@@ -150,9 +274,45 @@ export default {
       YZQXList: [], //医嘱起效列表
       YZQXList: [], //医嘱起效列表
       KZKSList: [], //开嘱科室列表
       KZKSList: [], //开嘱科室列表
       BRKSList: [], //病人列表
       BRKSList: [], //病人列表
+            formData1: { // 搜搜条件
+        ageday: "",
+        age_start_type: 2,
+        age_end_type: 2,
+        ageyear: "",
+        endTime: undefined,
+        startTime: undefined,
+        seniorList: [
+          {
+            select_type: 0,
+            key: "",
+            value: "",
+            type: "0",
+            
+          },
+        ],
+        seniorList1: [],
+        hospitalizationon: "",
+        hospitalizationin: "",
+        AAC04_start: undefined,
+        AAC04_end: undefined,
+        AAA04_start: undefined,
+        AAA04_end: undefined,
+        ageType1: 1,
+        ageType2: 1
+      },
+
+      departmentList: [],
+      searchNum: 0,
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now(); 
+        }
+      },
+     
     };
     };
   },
   },
   mounted() {
   mounted() {
+    
     this.funQuery();
     this.funQuery();
   },
   },
   created() {
   created() {
@@ -166,8 +326,10 @@ export default {
     indexAdd(index) {
     indexAdd(index) {
       return index + 1 + (this.paginationData.currentPage - 1) * this.paginationData.pageSize;
       return index + 1 + (this.paginationData.currentPage - 1) * this.paginationData.pageSize;
     },
     },
-    funSelect(index) {
-      this.formData.seniorList[index].value = '';
+    funSelect(index,e) {
+
+      this.formData1.seniorList[index].value = '';
+     
     },
     },
 
 
     funSetList() {},
     funSetList() {},
@@ -187,19 +349,21 @@ export default {
       this.funQuery();
       this.funQuery();
     },
     },
     funDel(i) {
     funDel(i) {
-      let index = i;
+      const index = i;
       if (index == 0) {
       if (index == 0) {
         return;
         return;
       }
       }
-      let list = this.formData.seniorList;
+      const list = this.formData1.seniorList;
       list.splice(index, 1);
       list.splice(index, 1);
-      this.formData.seniorList = list;
+      this.formData1.seniorList = list;
     },
     },
     funAdd() {
     funAdd() {
-      this.formData.seniorList.push({
-        key: '',
-        value: '',
-        type: '0',
+      this.formData1.seniorList.push({
+        key: "",
+        select_type: 0,
+        value: "",
+        type: "0",
+       
       });
       });
     },
     },
     funQuery() {
     funQuery() {
@@ -207,26 +371,21 @@ export default {
         limit: this.paginationData.pageSize,
         limit: this.paginationData.pageSize,
         page: this.paginationData.currentPage, //是当前页数 默认是0 。普通检索的参数是
         page: this.paginationData.currentPage, //是当前页数 默认是0 。普通检索的参数是
       };
       };
-      this.formData.seniorList.forEach(item => {
-        if (item.key == 'AAA28') {
-          pramse.AAA28 = item.value;
-        }
-        if (item.key == 'YZQX') {
-          pramse.YZQX = item.value;
-        }
-        if (item.key == 'BRKS') {
-          pramse.BRKS = item.value;
-        }
-        if (item.key == 'KZKS') {
-          pramse.KZKS = item.value;
-        }
-        if (item.key == 'YZMC') {
-          pramse.YZMC = item.value;
-        }
-      });
+      pramse.field = this.formData1.seniorList;
+      pramse.AAC01_start = this.formData1.startTime;
+      pramse.AAC01_end = this.formData1.endTime;
 
 
-      pramse.start = this.formData.startTime;
-      pramse.end = this.formData.endTime;
+      pramse.AAC04_start = this.formData1.AAC04_start;
+      pramse.AAC04_end = this.formData1.AAC04_end;
+        
+      const { ageType1, ageType2 } = this.formData1
+      if (this.formData1.AAA04_start) { 
+        pramse.AAA04_start = { type: ageType1, value: this.formData1.AAA04_start }
+      }
+      if (this.formData1.AAA04_end) {
+        pramse.AAA04_end = {type:ageType2,value:this.formData1.AAA04_end}
+      }
+      
 
 
       this.$axios.post('/getDoctorAdvice', pramse).then(res => {
       this.$axios.post('/getDoctorAdvice', pramse).then(res => {
         this.tableData = res.data.list || [];
         this.tableData = res.data.list || [];
@@ -237,7 +396,7 @@ export default {
     reset() {
     reset() {
       // 重置数据
       // 重置数据
       this.paginationData.currentPage = 1;
       this.paginationData.currentPage = 1;
-      Object.assign(this.$data.formData, this.$options.data().formData);
+      Object.assign(this.$data.formData1, this.$options.data().formData1);
       this.funQuery();
       this.funQuery();
     },
     },
     searchCondition() {
     searchCondition() {

+ 10 - 7
src/views/data/query/index.vue

@@ -197,7 +197,7 @@
       </div>
       </div>
       <div class="fBtn" style="position: relative">
       <div class="fBtn" style="position: relative">
         <el-button class="btn1" style="position: absolute; right: 30px" @click="reset">重置条件</el-button>
         <el-button class="btn1" style="position: absolute; right: 30px" @click="reset">重置条件</el-button>
-        <el-button class="btn2" @click="funQuery">检索</el-button>
+        <el-button class="btn2" @click="funQuery(1)">检索</el-button>
       </div>
       </div>
     </div>
     </div>
     <div class="tableBox">
     <div class="tableBox">
@@ -389,7 +389,7 @@ export default {
 
 
   },
   },
   created() {
   created() {
-    this.funQuery();
+    this.funQuery(1);
     this.selectInfo();
     this.selectInfo();
   },
   },
   methods: {
   methods: {
@@ -746,8 +746,8 @@ export default {
       });
       });
     },
     },
     // 点击检索按钮
     // 点击检索按钮
-    funQuery() {
-      console.error('this.choice111', this.choice);
+    funQuery(num) {
+      // console.error('this.choice111', this.choice);
       let min = this.formData1.hospitalizationon;
       let min = this.formData1.hospitalizationon;
       let max = this.formData1.hospitalizationin;
       let max = this.formData1.hospitalizationin;
       if (this.labelList.includes(this.labelText)) {
       if (this.labelList.includes(this.labelText)) {
@@ -767,7 +767,7 @@ export default {
           AAC01_end_date: this.formData0.endTime || '',
           AAC01_end_date: this.formData0.endTime || '',
           coder_id: this.formData0.Coder || null, //编码员ID
           coder_id: this.formData0.Coder || null, //编码员ID
           ORG_STATE: this.formData0.medicalRecord || null, //全部病案
           ORG_STATE: this.formData0.medicalRecord || null, //全部病案
-          page: this.paginationData.currentPage, //页码
+          page:num == 1? num: this.paginationData.currentPage, //页码
           limit: this.paginationData.pageSize, //条数
           limit: this.paginationData.pageSize, //条数
         };
         };
         sessionStorage.setItem('Zkpramse', JSON.stringify(pramse));
         sessionStorage.setItem('Zkpramse', JSON.stringify(pramse));
@@ -785,11 +785,14 @@ export default {
           AAC01_start_date: this.formData1.startTime || '',
           AAC01_start_date: this.formData1.startTime || '',
           AAC01_end_date: this.formData1.endTime || '',
           AAC01_end_date: this.formData1.endTime || '',
           field: this.formData1.seniorList || null, //字段条件
           field: this.formData1.seniorList || null, //字段条件
-          page: this.paginationData.currentPage, //页码
+          page: num == 1? num: this.paginationData.currentPage, //页码
           limit: this.paginationData.pageSize, //条数
           limit: this.paginationData.pageSize, //条数
         };
         };
         sessionStorage.setItem('Zkpramse', JSON.stringify(pramse));
         sessionStorage.setItem('Zkpramse', JSON.stringify(pramse));
         sessionStorage.setItem('ZkChoice', this.choice);
         sessionStorage.setItem('ZkChoice', this.choice);
+        if (num == 1) { 
+          this.paginationData.currentPage = 1;
+        }
         this.getinfo(pramse);
         this.getinfo(pramse);
       }
       }
     },
     },
@@ -811,7 +814,7 @@ export default {
       } else {
       } else {
         Object.assign(this.$data.formData1, this.$options.data().formData1);
         Object.assign(this.$data.formData1, this.$options.data().formData1);
       }
       }
-      this.funQuery();
+      this.funQuery(1);
     },
     },
   },
   },
 };
 };