| 
					
				 | 
			
			
				@@ -87,6 +87,34 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-form-item label="审核时间" prop="auditTime"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-date-picker v-model="auditTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <!-- 开方耗时区间筛选 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <el-form-item label="开方耗时" prop="operateTimeRange"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-input-number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          v-model="operateTime.minVal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :min="0" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          placeholder="最小值" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          style="width: 100px" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-select v-model="operateTime.minUnit" size="small" style="width: 70px; margin: 0 8px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-option label="秒" value="sec" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-option label="分" value="min" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ~ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-input-number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          v-model="operateTime.maxVal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :min="0" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          placeholder="最大值" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          style="width: 100px; margin-left: 8px" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-select v-model="operateTime.maxUnit" size="small" style="width: 70px; margin: 0 8px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-option label="秒" value="sec" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-option label="分" value="min" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -150,6 +178,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table-column label="审核时间" align="center" prop="auditTime" width="180" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        prop="operate_second" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        label="操作时长" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        min-width="140" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <template slot-scope="{ row }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {{ formatSeconds(row.operateSecond) }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table-column label="创建时间" align="center" prop="createTime" width="180" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <template slot-scope="scope"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -191,6 +228,13 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   components: { prescribeDetails }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      operateTime: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        minVal: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        minUnit: 'sec', // 默认单位:秒 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        maxVal: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        maxUnit: 'sec' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      dateRange: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       companyList:[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       createTime:null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       pjtUrl: process.env.VUE_APP_BASE_API+"/", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -256,7 +300,9 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         auditETime:null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         doctorName:null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         orderStatus:null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        appId:null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        appId:null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        minOperateSeconds: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        maxOperateSeconds: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        actName:"10", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 表单参数 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -320,7 +366,20 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 查询处方列表 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.loading = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      listPrescribe(this.queryParams).then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 构造请求参数(避免直接修改 queryParams) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const params = { ...this.queryParams }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 处理开方时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (this.dateRange?.length === 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        params.startOperateTime = this.dateRange[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        params.endOperateTime = this.dateRange[1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        delete params.startOperateTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        delete params.endOperateTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      listPrescribe(params).then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.prescribeList = response.rows; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.total = response.total; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.loading = false; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -387,6 +446,21 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 搜索按钮操作 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleQuery() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParams.pageNum = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const toSeconds = (val, unit) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (val == null || val === '') return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return unit === 'min' ? val * 60 : val; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const minSec = toSeconds(this.operateTime.minVal, this.operateTime.minUnit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const maxSec = toSeconds(this.operateTime.maxVal, this.operateTime.maxUnit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      //核心校验:如果两个值都存在,max 不能小于 min 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (minSec != null && maxSec != null && minSec > maxSec) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$message.warning('开方耗时:最大值不能小于最小值!'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return; // 阻止查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParams.minOperateSeconds = toSeconds(this.operateTime.minVal, this.operateTime.minUnit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParams.maxOperateSeconds = toSeconds(this.operateTime.maxVal, this.operateTime.maxUnit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 重置按钮操作 */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -396,8 +470,15 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParams.sTime=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParams.eTime=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.auditTime=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.dateRange = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParams.auditSTime=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParams.auditETime=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.operateTime = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        minVal: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        minUnit: 'sec', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        maxVal: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        maxUnit: 'sec' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.handleQuery(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 多选框选中数据 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -513,6 +594,32 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			},10000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }).catch(() => {}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 表格排序变化(点击表头排序) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleSortChange({ prop, order }) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (order === 'ascending') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParams.sortField = prop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParams.sortOrder = 'asc'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else if (order === 'descending') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParams.sortField = prop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParams.sortOrder = 'desc'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 取消排序 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        delete this.queryParams.sortField; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        delete this.queryParams.sortOrder; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.handleQuery(); // 重新查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 秒数转“X分Y秒” 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    formatSeconds(seconds) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (seconds == null || seconds === '') return '0秒' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const sec = Math.floor(Number(seconds)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const min = Math.floor(sec / 60) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const remainingSec = sec % 60 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (min > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return `${min}分${remainingSec}秒` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return `${remainingSec}秒` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 |