Browse Source

Merge branch 'master' of https://172.16.32.165/lighter/vue-intergration-platform

xiaochan 1 year ago
parent
commit
8d2f1d5cf3

+ 5 - 1
src/components/si-sheet-upload/DrgGroupResult.vue

@@ -53,7 +53,11 @@
           <el-table-column prop="feeStand" label="标杆费用" width="130" ></el-table-column>
           <el-table-column prop="totalFee" label="总费用" width="130" ></el-table-column>
           <el-table-column prop="setlTime" label="结算时间" width="130" ></el-table-column>
-          <el-table-column prop="groupMessages" label="分组提示" ></el-table-column>
+          <el-table-column prop="medTypeName" label="医疗类别" width="120" ></el-table-column>
+          <el-table-column prop="insuplcAdmdvsName" label="参保地" width="120" ></el-table-column>
+          <el-table-column prop="clrOptinsName" label="清算机构" width="100" ></el-table-column>
+          <el-table-column prop="psnTypeName" label="人员类别" width="120" ></el-table-column>
+          <el-table-column prop="groupMessages" label="分组提示" show-overflow-tooltip ></el-table-column>
         </el-table>
         <el-pagination
             :current-page="queryuploadTerm.currentPage"

+ 68 - 0
src/views/dictionary/OprtDoctorLevel.vue

@@ -15,6 +15,7 @@
         />
         <el-button icon="Search" type="primary" @click="queryInfo">查询</el-button>
         <el-button type="success" @click="addInfo">添加</el-button>
+        <el-button type="primary" @click="centerDialogVisible=true">批量导入</el-button>
       </header>
       <div class="layout_main layout_el-table">
         <el-table :data="asideTableData"
@@ -84,6 +85,41 @@
       </div>
     </div>
   </div>
+  <el-dialog
+      v-model="centerDialogVisible"
+      title="批量导入"
+      width="500"
+      align-center
+  >
+    <div>
+      <el-upload
+          class="upload-demo"
+          ref="upload"
+          accept=".xlsx,.xls"
+          :action="apiUrl + '/opLevelManagement/uploadOpLevelManagement'"
+          :headers="header"
+          :file-list="fileList"
+          :limit="1"
+          :on-exceed="fileSizeOutLimit"
+          :on-success="uploadSuccess"
+          :on-error="uploadError"
+          :auto-upload="false"
+      >
+        <template #trigger>
+          <el-button type="primary" icon="Picture">选取文件</el-button>
+        </template>
+        <el-button style="margin-left: 10px" type="success" icon="Upload" @click="submitUpload">上传</el-button>
+        <template #tip>
+          <div class="el-upload__tip">只能上传 xls/xlsx 文件</div>
+        </template>
+      </el-upload>
+    </div>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button @click="centerDialogVisible = false">关闭</el-button>
+      </div>
+    </template>
+  </el-dialog>
 </template>
 
 <script setup name="OprtDoctorLevel">
@@ -99,6 +135,38 @@ import {
 } from '@/api/dictionary/oprt-lecel'
 import {ElMessage} from 'element-plus'
 import PageLayer from "@/layout/PageLayer";
+import {ref} from "vue";
+import {useUserStore} from "@/pinia/user-store";
+import {formatYear} from "@/utils/date";
+
+const centerDialogVisible = ref(false)
+
+const fileList = ref([])
+const apiUrl = import.meta.env.VITE_BASE_URL
+const upload = ref(null)
+const header = {
+  token: useUserStore().getToken,
+}
+
+
+const fileSizeOutLimit = () => {
+  ElMessage.error('已经选取excel,如须更换请先移除已选取的excel!')
+}
+const uploadSuccess = (response) => {
+  console.log('response',response)
+  if(response.code ==200){
+    ElMessage.success('上传成功!')
+  }else {
+    ElMessage.error('上传失败,错误信息:'+response.message)
+  }
+}
+const uploadError = (error,file,fileList) => {
+  ElMessage.error('上传失败!')
+}
+const submitUpload = () => {
+    upload.value.submit()
+}
+
 
 const innerHeight = window.innerHeight
 const asideQueryParam = ref({