lighter 3 years ago
parent
commit
81d0687700

+ 96 - 96
src/views/clinic/DoctorInfoManagement.vue

@@ -169,8 +169,8 @@
   </el-container>
 </template>
 
-<script setup>
-import { onMounted, reactive, ref } from 'vue'
+<script setup name="DoctorInfoManagement">
+import { onMounted, reactive, ref } from 'vue';
 import {
   deleteDoctor,
   getAllDoctors,
@@ -181,135 +181,135 @@ import {
   saveDoctorInfo,
   updateDoctorWxHomepageFlag,
   updateWxHomepageOrder,
-} from '@/api/manage-doctor-info'
-import store from '@/store'
-import { ElMessage, ElMessageBox } from 'element-plus'
-import axios from 'axios'
+} from '@/api/manage-doctor-info';
+import store from '@/store';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import axios from 'axios';
 
-const apiUrl = import.meta.env.VITE_BASE_URL
-const windowSize = store.state.app.windowSize
-const tableHeight = windowSize.h - 85
-const allTitles = ref([])
-const allMzDepts = ref([])
-const allDoctors = ref([])
-const totalSize = ref(0)
+const apiUrl = import.meta.env.VITE_BASE_URL;
+const windowSize = store.state.app.windowSize;
+const tableHeight = windowSize.h - 85;
+const allTitles = ref([]);
+const allMzDepts = ref([]);
+const allDoctors = ref([]);
+const totalSize = ref(0);
 const yesOrNo = [
   { code: 1, name: '推荐' },
   { code: 0, name: '不推荐' },
-]
+];
 const sexCodes = [
   { code: 1, name: '男' },
   { code: 2, name: '女' },
   { code: 9, name: '未知' },
-]
+];
 
 const queryParam = reactive({
   deptCode: '',
   doctorName: '',
   currentPage: 1,
   pageSize: 15,
-})
+});
 
 const handleSizeChange = (val) => {
-  queryParam.pageSize = val
-  fetchDoctors()
-}
+  queryParam.pageSize = val;
+  fetchDoctors();
+};
 const handleCurrentChange = (val) => {
-  queryParam.currentPage = val
-  fetchDoctors()
-}
+  queryParam.currentPage = val;
+  fetchDoctors();
+};
 
 const resetSearch = () => {
-  queryParam.deptCode = queryParam.doctorName = ''
-  fetchDoctors()
-}
+  queryParam.deptCode = queryParam.doctorName = '';
+  fetchDoctors();
+};
 
 const handleSelectRec = (code, flag) => {
   updateDoctorWxHomepageFlag(code, flag).then(() => {
-    const message = flag === 1 ? '已在微信服务号首页推荐此医生。' : '已取消此医生在微信服务号首页的推荐。'
-    const type = flag === 1 ? 'success' : 'warning'
+    const message = flag === 1 ? '已在微信服务号首页推荐此医生。' : '已取消此医生在微信服务号首页的推荐。';
+    const type = flag === 1 ? 'success' : 'warning';
     ElMessage({
       message,
       type,
       duration: 3000,
       showClose: true,
-    })
-  })
-}
+    });
+  });
+};
 
 const viewDoctor = (val) => {
   getDoctorInfo(val.code).then((res) => {
-    doctor.value = res
-    edit.value = false
-    drawer.value = true
-  })
-}
+    doctor.value = res;
+    edit.value = false;
+    drawer.value = true;
+  });
+};
 const editDoctor = (val) => {
   getDoctorInfo(val.code).then((res) => {
-    doctor.value = res
-    edit.value = true
-    drawer.value = true
-  })
-}
+    doctor.value = res;
+    edit.value = true;
+    drawer.value = true;
+  });
+};
 
-const doctor = ref({})
+const doctor = ref({});
 const editStyle = {
   padding: '0 15px 15px 50px',
   height: window.innerHeight + 'px',
   overflowY: 'scroll',
-}
-const edit = ref(true)
-const drawer = ref(false)
+};
+const edit = ref(true);
+const drawer = ref(false);
 
-const fileList = ref([])
+const fileList = ref([]);
 
 const beforeAvatarUpload = (file) => {
-  const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'
-  const isLt1M = file.size / 1024 / 1024 < 1
+  const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+  const isLt1M = file.size / 1024 / 1024 < 1;
   if (!isJPG) {
-    ElMessage.error('上传头像图片只能是 jpg 或 png 格式!')
+    ElMessage.error('上传头像图片只能是 jpg 或 png 格式!');
   }
   if (!isLt1M) {
-    ElMessage.error('上传头像图片大小不能超过 1MB!')
+    ElMessage.error('上传头像图片大小不能超过 1MB!');
   }
-  return isJPG && isLt1M
-}
+  return isJPG && isLt1M;
+};
 
-const upload = ref(null)
+const upload = ref(null);
 const header = {
   token: store.state.user.token,
-}
+};
 const submitUpload = () => {
-  upload.value.submit()
-}
+  upload.value.submit();
+};
 const fileSizeOutLimit = () => {
-  ElMessage.error('已经选取头像,如须更换请先移除已选取的头像!')
-}
+  ElMessage.error('已经选取头像,如须更换请先移除已选取的头像!');
+};
 const uploadSuccess = () => {
-  ElMessage.success('上传成功!')
-}
+  ElMessage.success('上传成功!');
+};
 const uploadError = () => {
-  ElMessage.error('上传失败!')
-}
+  ElMessage.error('上传失败!');
+};
 
 const saveDoctor = () => {
   saveDoctorInfo(doctor.value).then(() => {
-    ElMessage.success('保存成功')
-  })
-}
+    ElMessage.success('保存成功');
+  });
+};
 
 const avatarError = () => {
-  return true
-}
+  return true;
+};
 
-const manageOrderDialog = ref(false)
-const recommendDoctors = ref([])
+const manageOrderDialog = ref(false);
+const recommendDoctors = ref([]);
 const manageRecommendOrder = () => {
   getAllRecommendDoctors().then((res) => {
-    recommendDoctors.value = res
-    manageOrderDialog.value = true
-  })
-}
+    recommendDoctors.value = res;
+    manageOrderDialog.value = true;
+  });
+};
 const modifyOrder = (val) => {
   ElMessageBox.prompt('请输入新序号', '提示', {
     confirmButtonText: '确定',
@@ -319,17 +319,17 @@ const modifyOrder = (val) => {
   })
     .then(({ value }) => {
       updateWxHomepageOrder(val.code, value).then(() => {
-        val.wxHomepageOrder = value
+        val.wxHomepageOrder = value;
         ElMessage({
           message: '保存排序成功',
           type: 'success',
           duration: 2000,
           showClose: true,
-        })
-      })
+        });
+      });
     })
-    .catch(() => {})
-}
+    .catch(() => {});
+};
 
 const refreshWxDoctorCache = () => {
   axios('http://192.168.200.3:8805/wxserver/homepage/refreshHomePageDoctors').then((res) => {
@@ -339,12 +339,12 @@ const refreshWxDoctorCache = () => {
         type: 'success',
         duration: 2000,
         showClose: true,
-      })
+      });
     } else {
-      ElMessage.error(res.data.message)
+      ElMessage.error(res.data.message);
     }
-  })
-}
+  });
+};
 
 const beforeDelete = (row) => {
   ElMessageBox.confirm('删除后将无法在服务号首页推荐,是否确认删除?', '提示', {
@@ -359,29 +359,29 @@ const beforeDelete = (row) => {
           type: 'success',
           duration: 2000,
           showClose: true,
-        })
-        fetchDoctors()
-      })
+        });
+        fetchDoctors();
+      });
     })
-    .catch(() => {})
-}
+    .catch(() => {});
+};
 
 const fetchDoctors = () => {
   getAllDoctors(queryParam).then((res) => {
-    totalSize.value = res.totalSize
-    allDoctors.value = res.list
-  })
-}
+    totalSize.value = res.totalSize;
+    allDoctors.value = res.list;
+  });
+};
 
 onMounted(() => {
   getAllTitles().then((res) => {
-    allTitles.value = res
-  })
+    allTitles.value = res;
+  });
   getAllMzDept().then((res) => {
-    allMzDepts.value = res
-    fetchDoctors()
-  })
-})
+    allMzDepts.value = res;
+    fetchDoctors();
+  });
+});
 </script>
 
 <style scoped>

+ 1 - 1
src/views/dashboard/index.vue

@@ -41,7 +41,7 @@
   </el-container>
 </template>
 
-<script setup>
+<script setup name="Dashboard">
 import { computed, onActivated, onMounted, ref, watch } from 'vue';
 import { useStore } from 'vuex';
 import { selectSystemMessages } from '../../api/messages/index';

+ 1 - 10
src/views/hospitalization/case-front-sheet/AllCaseFrontSheet.vue

@@ -214,7 +214,7 @@
 
 <script setup name="AllCaseFrontSheet">
 import { yesOrNo, haveOrNot, searchMethods, autopsies } from './common';
-import { computed, onActivated, onMounted, reactive, ref, watchEffect } from 'vue';
+import { onActivated, onMounted, reactive, ref, watchEffect } from 'vue';
 import store from '@/store';
 import { operations, frontSheetMedTypes } from '@/data/index';
 import {
@@ -240,13 +240,6 @@ import HeadPage from '../../../components/inpatient/frontsheet-printpage/HeadPag
 import TailPage from '../../../components/inpatient/frontsheet-printpage/TailPage.vue';
 import { Export } from '../../../utils/ExportExcel';
 
-const cdStyle = computed(() => {
-  return {
-    position: 'absolute',
-    top: '77px',
-    left: '590px',
-  };
-});
 const currentPage = $ref(1);
 const handleCurrentPageChange = (val) => {
   currentPage = val;
@@ -273,14 +266,12 @@ const overviewParam = reactive({
   lateFlag: '3',
   bah: '',
 });
-const cdPercentage = $ref('');
 const isLateDataMode = $ref(false);
 const searchPatient = () => {
   overviewParam.start = formatDate(dateRange[0]);
   overviewParam.end = formatDate(dateRange[1]);
   basOutPatients(overviewParam).then((res) => {
     isLateDataMode = overviewParam.lateFlag === '1';
-    cdPercentage = res.cdPercentage;
     overview = res.list;
     if (res.list.length === 1) {
       fetchSheetInfo(res.list[0]);

+ 81 - 81
src/views/medical-insurance/allpatient/LogAnalyse.vue

@@ -78,49 +78,49 @@
   </el-container>
 </template>
 
-<script setup>
-import { computed, reactive, ref } from 'vue'
-import { useStore } from 'vuex'
-import { setlShtcuts } from '@/data/shortcuts'
-import { infnos } from '@/data/index'
-import { selectSiLogs, selectSiLogBody } from '../../../api/medical-insurance/si-log'
-import { recoveryTradePermission } from '../../../utils/permission'
-import { autoRecoveryTrade } from '../../../api/medical-insurance/si-manage'
-import { getDateRangeFormatDate } from '../../../utils/date'
-import { ElMessage, ElMessageBox } from 'element-plus'
-const store = useStore()
-const windowSize = store.state.app.windowSize
-const tableHeight = windowSize.h - 85
-const dateRange = ref(null)
+<script setup name="LogAnalyse">
+import { computed, reactive, ref } from 'vue';
+import { useStore } from 'vuex';
+import { setlShtcuts } from '@/data/shortcuts';
+import { infnos } from '@/data/index';
+import { selectSiLogs, selectSiLogBody } from '../../../api/medical-insurance/si-log';
+import { recoveryTradePermission } from '../../../utils/permission';
+import { autoRecoveryTrade } from '../../../api/medical-insurance/si-manage';
+import { getDateRangeFormatDate } from '../../../utils/date';
+import { ElMessage, ElMessageBox } from 'element-plus';
+const store = useStore();
+const windowSize = store.state.app.windowSize;
+const tableHeight = windowSize.h - 85;
+const dateRange = ref(null);
 
-const fullWidth = window.innerWidth
-const drawerWidth = fullWidth * 0.66
+const fullWidth = window.innerWidth;
+const drawerWidth = fullWidth * 0.66;
 
 const formattedStyle = {
   display: 'flex',
   height: window.innerHeight + 'px',
-}
+};
 
 const formattedChildStyle = {
   width: drawerWidth / 2 - 10 + 'px',
   padding: '0 10px 0 10px',
-}
+};
 
 const preStyle = {
   width: drawerWidth / 2 - 60 + 'px',
   height: window.innerHeight - 50 + 'px',
   overflowY: 'auto',
-}
+};
 
 const leftPreCopyStyle = {
   position: 'absolute',
   top: '20px',
   left: drawerWidth / 2 - 100 + 'px',
-}
+};
 
 const currentInfnos = computed(() => {
-  return infnos[headerParam.logType]
-})
+  return infnos[headerParam.logType];
+});
 
 const headerParam = reactive({
   begntime: null,
@@ -131,93 +131,93 @@ const headerParam = reactive({
   needCalTips: null,
   pageSize: 30,
   currentPage: 1,
-})
-const tipMessage = ref(null)
-const logs = ref([])
+});
+const tipMessage = ref(null);
+const logs = ref([]);
 const handleSizeChange = (val) => {
-  headerParam.pageSize = val
-  fetchSiLogs(false)
-}
+  headerParam.pageSize = val;
+  fetchSiLogs(false);
+};
 const handleCurrentChange = (val) => {
-  headerParam.currentPage = val
-  fetchSiLogs(false)
-}
-const showFormatModal = ref(false)
-const formattedBody = ref(null)
-const formattedResult = ref(null)
+  headerParam.currentPage = val;
+  fetchSiLogs(false);
+};
+const showFormatModal = ref(false);
+const formattedBody = ref(null);
+const formattedResult = ref(null);
 const formatBodyResult = (msgid) => {
   selectSiLogBody(msgid).then((res) => {
-    formattedBody.value = JSON.stringify(JSON.parse(res.body), null, 2)
-    formattedResult.value = JSON.stringify(JSON.parse(res.result), null, 2)
-    showFormatModal.value = true
-  })
-}
+    formattedBody.value = JSON.stringify(JSON.parse(res.body), null, 2);
+    formattedResult.value = JSON.stringify(JSON.parse(res.result), null, 2);
+    showFormatModal.value = true;
+  });
+};
 
-const totalSize = ref(0)
+const totalSize = ref(0);
 
 const fetchSiLogs = (needCalTips) => {
-  headerParam.needCalTips = needCalTips
+  headerParam.needCalTips = needCalTips;
   if (dateRange.value) {
-    const dtrge = getDateRangeFormatDate(dateRange.value)
-    headerParam.begntime = dtrge.startTime
-    headerParam.endtime = dtrge.endTime
+    const dtrge = getDateRangeFormatDate(dateRange.value);
+    headerParam.begntime = dtrge.startTime;
+    headerParam.endtime = dtrge.endTime;
   }
   selectSiLogs(headerParam)
     .then((res) => {
-      logs.value = res.list
-      totalSize.value = res.total
+      logs.value = res.list;
+      totalSize.value = res.total;
       if (needCalTips) {
-        tipMessage.value = res.tipMessage
+        tipMessage.value = res.tipMessage;
       }
     })
     .catch(() => {
-      logs.value = []
-      totalSize.value = 0
-      tipMessage.value = null
-    })
-}
+      logs.value = [];
+      totalSize.value = 0;
+      tipMessage.value = null;
+    });
+};
 
 const tableRowClassName = ({ row }) => {
   if (row.infcode === 0) {
-    return 'success-row'
+    return 'success-row';
   }
-  return 'danger-row'
-}
+  return 'danger-row';
+};
 
 const coloredResult = (infcode) => {
-  return infcode === 0 ? '<span style="color: green">成功</span>' : '<span style="color: red">失败</span>'
-}
+  return infcode === 0 ? '<span style="color: green">成功</span>' : '<span style="color: red">失败</span>';
+};
 
 const copyLogBodyResult = (flag) => {
-  const copyArea = document.getElementById('copyArea')
-  copyArea.value = flag === 1 ? formattedBody.value : formattedResult.value
-  copyArea.select()
-  document.execCommand('Copy')
+  const copyArea = document.getElementById('copyArea');
+  copyArea.value = flag === 1 ? formattedBody.value : formattedResult.value;
+  copyArea.select();
+  document.execCommand('Copy');
   ElMessage({
     message: '复制成功',
     type: 'success',
     duration: 2500,
     showClose: true,
-  })
-}
+  });
+};
 
 const exportBodyResultTxt = (row) => {
   selectSiLogBody(row.msgid).then((res) => {
-    let str = '参数:\r\n' + res.body + '\r\n\r\n' + '返回:\r\n' + res.result
-    let uri = 'data:text/csv;charset=utf-8,\ufeff' + encodeURIComponent(str)
-    let link = document.createElement('a')
-    link.href = uri
-    link.download = `【功能号:${res.infno},${row.infname}】报文详细.txt`
-    document.body.appendChild(link)
-    link.click()
-    document.body.removeChild(link)
-  })
-}
+    let str = '参数:\r\n' + res.body + '\r\n\r\n' + '返回:\r\n' + res.result;
+    let uri = 'data:text/csv;charset=utf-8,\ufeff' + encodeURIComponent(str);
+    let link = document.createElement('a');
+    link.href = uri;
+    link.download = `【功能号:${res.infno},${row.infname}】报文详细.txt`;
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+  });
+};
 
-const recoveriableInfnos = ['2207', '2208', '2401', '2304', '2305']
+const recoveriableInfnos = ['2207', '2208', '2401', '2304', '2305'];
 const showRecoveryTrade = (infno) => {
-  return recoveryTradePermission() && recoveriableInfnos.indexOf(infno) !== -1
-}
+  return recoveryTradePermission() && recoveriableInfnos.indexOf(infno) !== -1;
+};
 
 const recoveryTrade = (row) => {
   ElMessageBox.confirm('冲正将取消医保中心接收到的本次交易,请慎重使用!', '警告', {
@@ -227,17 +227,17 @@ const recoveryTrade = (row) => {
       psnNo: row.psnNo,
       omsgid: row.msgid,
       oinfno: row.infno,
-    }
+    };
     autoRecoveryTrade(params).then((res) => {
       ElMessage({
         type: 'success',
         message: res,
         duration: 2500,
         showClose: true,
-      })
-    })
-  })
-}
+      });
+    });
+  });
+};
 </script>
 
 <style scoped>