Browse Source

fix:去除动物部分导出,修复查询功能,修改状态描述

LYK 5 days ago
parent
commit
6b8612619b

+ 2 - 2
src/view/animal/application/index.vue

@@ -67,7 +67,7 @@
           </el-select>
         </el-form-item> -->
       </el-form>
-      <div style="text-align: right">
+      <!-- <div style="text-align: right">
         <el-button
           @click="handleExport"
           style="height: 25px"
@@ -75,7 +75,7 @@
         >
           导出
         </el-button>
-      </div>
+      </div> -->
     </div>
 
     <div class="list-container">

+ 2 - 2
src/view/animal/applicationRemoval/index.vue

@@ -53,12 +53,12 @@
         </el-form-item>
       </el-form>
       <div style="text-align: right">
-        <el-button
+        <!-- <el-button
           @click="handleExport"
           color="#2c78ff"
         >
           导出
-        </el-button>
+        </el-button> -->
         <el-button
           color="#2c78ff"
           @click="openCageApplicationModal()"

+ 2 - 2
src/view/animal/return/index.vue

@@ -36,9 +36,9 @@
           <el-input v-model="state.queryParams.userName" style="width: 100%" placeholder="申请人" clearable @change="search" />
         </el-form-item>
       </el-form>
-      <div style="text-align: right">
+      <!-- <div style="text-align: right">
         <el-button @click="handleExport" style="height: 25px" type="primary">导出</el-button>
-      </div>
+      </div> -->
     </div>
 
     <div class="list-container">

+ 1 - 1
src/view/entry/manage.vue

@@ -140,7 +140,7 @@
                   v-else-if="item.appointStatus === ApplicationStatus.AVAILABLE_FOR_ADMISSION"
                   type="success"
                 >
-                  入室
+                  入室
                 </van-tag>
                 <van-tag
                   v-else-if="item.appointStatus === ApplicationStatus.OUT_OF_ROOM"

+ 17 - 3
src/view/laboratory/inspection/index.vue

@@ -9,10 +9,10 @@
 <template>
   <div class="entry-container">
     <div class="search-wrap">
-      <van-search placeholder="请输入任务名称" v-model="state.queryParams.taskTitle" :clearabled="true"
+      <van-search placeholder="请输入任务名称" v-model.trim="state.queryParams.taskTitle" clearable
         style="padding: 0; flex: 1" class="mr10"></van-search>
       <div>
-        <van-button type="primary" style="width: 60px" shape="circle" size="small" @click="onLoad">
+        <van-button type="primary" style="width: 60px" shape="circle" size="small" @click="onSearch">
           搜索
         </van-button>
       </div>
@@ -121,11 +121,17 @@ const state = reactive({
 const changeType = () => {
   state.queryParams.pageNum = 1
   state.list = []
+  state.finished = false
+  state.loading = true
   onLoad()
 }
 
 const onLoad = async () => {
-  const [err, res]: ToResponse = await to(inspectionNewApi.getList(state.queryParams))
+  const params = JSON.parse(JSON.stringify(state.queryParams))
+  if (!params.taskTitle) {
+    delete params.taskTitle
+  }
+  const [err, res]: ToResponse = await to(inspectionNewApi.getList(params))
   if (err) return
   const list = res?.data?.list || []
   for (const item of list) {
@@ -138,6 +144,14 @@ const onLoad = async () => {
   }
 }
 
+const onSearch = () => {
+  state.queryParams.pageNum = 1
+  state.list = []
+  state.finished = false
+  state.loading = true
+  onLoad()
+}
+
 onMounted(() => {
   onLoad()
 })

+ 6 - 3
src/view/user/edit.vue

@@ -81,6 +81,7 @@ import Cropper from 'cropperjs'
 import 'cropperjs/dist/cropper.css'
 import axios from 'axios'
 import { userImgSize } from '/@/constants/pageConstants'
+import { getResourceUrl } from '/@/utils/url'
 
 const router = useRouter()
 const storesUseUserInfo = useUserInfo()
@@ -187,9 +188,11 @@ const initCropper = () => {
     }
   })
 }
-const editAvatar = () => {
-  openDialog(state.form.avatar)
-}
+  const editAvatar = () => {
+    const src = (userInfos.value && userInfos.value.avatar) || state.form.avatar || ''
+    const fullSrc = getResourceUrl(src)
+    openDialog(fullSrc)
+  }
 const onAvatarSubmit = () => {
   const base64Url = cropperState.cropper.getCroppedCanvas({ width: 500, height: 500 }).toDataURL('image/jpeg')
   let file = dataURLtoFile(base64Url, 'avatar.png')