Prechádzať zdrojové kódy

调整QueryView样式;完善待校核筛选输入框

yangguanjin 3 týždňov pred
rodič
commit
864dd5fd26

+ 4 - 0
src/api/system/user.ts

@@ -7,4 +7,8 @@ import { httpGet } from '@/utils/http'
  */
 export const getAuditList = (params: any) => {
   return httpGet('/system/user/get-by-role', params)
+}
+
+export const getUserPage = (params: any) => {
+  return httpGet('/system/user/page', params)
 }

+ 388 - 0
src/components/QueryViewItem/SelectUserModal.vue

@@ -0,0 +1,388 @@
+<template>
+  <wd-popup
+    v-model="visible"
+    position="bottom"
+    :safe-area-inset-bottom="true"
+    custom-style="height: 100vh; border-radius: 0;"
+    @close="handleCancel"
+  >
+    <view class="select-user-modal">
+      <!-- 顶部按钮栏 -->
+      <view class="modal-header">
+        <view class="header-btn cancel-btn" @click="handleCancel">
+          <text>取消</text>
+        </view>
+        <text class="header-title">{{ title }}</text>
+        <view class="header-btn confirm-btn" @click="handleConfirm">
+          <text>确定</text>
+        </view>
+      </view>
+
+      <!-- 搜索栏 -->
+      <view class="search-bar">
+        <wd-search
+          v-model="searchText"
+          placeholder="请输入姓名搜索"
+          :placeholder-left="true"
+          hide-cancel
+          @blur="handleSearch"
+          @clear="handleClear"
+        />
+      </view>
+
+      <!-- 已选中用户 -->
+      <view class="selected-bar">
+        <text class="selected-label">已选中:</text>
+        <scroll-view class="selected-tags-scroll" scroll-x>
+          <view
+            v-for="user in selectedUsers"
+            :key="user.id"
+            class="selected-user-tag"
+          >
+            <text class="selected-user-name">{{ user.nickname || '-' }}</text>
+            <view class="selected-user-remove" @click.stop="handleRemoveSelected(user)">
+              <wd-icon name="close" size="14px" color="#999" />
+            </view>
+          </view>
+        </scroll-view>
+      </view>
+
+      <!-- 列表区域 -->
+      <scroll-view class="user-list" scroll-y>
+        <view
+          v-for="item in userList"
+          :key="item.id"
+          class="user-item"
+          :class="{ 'user-item--selected': isUserSelected(item) }"
+          @click="handleSelectUser(item)"
+        >
+          <view class="user-avatar">
+            <wd-img
+              v-if="item.avatar"
+              width="36"
+              height="36"
+              :src="item.avatar"
+            />
+            <view v-else class="avatar-placeholder">
+              <text class="avatar-text">{{ (item.nickname || '?')[0] }}</text>
+            </view>
+          </view>
+          <view class="user-info">
+            <view class="user-name-row">
+              <text class="user-name">{{ item.nickname || '-' }}</text>
+              <text v-if="item.employeeNo" class="user-employee-no">{{ item.employeeNo }}</text>
+            </view>
+            <text v-if="item.deptName" class="user-dept">{{ item.deptName }}</text>
+          </view>
+        </view>
+        <view v-if="!userList.length" class="empty-tip">
+          <wd-status-tip image="content" tip="暂无数据" />
+        </view>
+      </scroll-view>
+    </view>
+  </wd-popup>
+</template>
+
+<script lang="ts" setup>
+import { ref, watch } from 'vue'
+import { getUserPage } from '@/api/system/user'
+
+interface UserItem {
+  id: string
+  nickname?: string
+  username?: string
+  avatar?: string
+  employeeNo?: string,
+  deptName?: string,
+  [key: string]: any
+}
+
+interface Props {
+  modelValue: boolean
+  title?: string
+  selected?: UserItem[]
+  multiple?: boolean
+}
+
+const props = withDefaults(defineProps<Props>(), {
+  modelValue: false,
+  title: '选择人员',
+  selected: () => [],
+  multiple: true,
+})
+
+const emit = defineEmits<{
+  'update:modelValue': [value: boolean]
+  confirm: [users: UserItem[]]
+  cancel: []
+}>()
+
+const visible = ref(false)
+const searchText = ref('')
+const userList = ref<UserItem[]>([])
+const selectedUsers = ref<UserItem[]>([])
+
+watch(
+  () => props.modelValue,
+  (val) => {
+    visible.value = val
+    if (val) {
+      selectedUsers.value = props.selected ? [...props.selected] : []
+      fetchUserList()
+    }
+  },
+  { immediate: true },
+)
+
+watch(visible, (val) => {
+  if (!val) {
+    searchText.value = ''
+    emit('update:modelValue', false)
+  }
+})
+
+const fetchUserList = (nickName?: string) => {
+  const params: Record<string, any> = {
+    pageNo: 1,
+    pageSize: 100,
+    nickName,
+  }
+  getUserPage(params).then(res => {
+    userList.value = res.data.list
+  })
+}
+
+const handleSearch = () => {
+  fetchUserList(searchText.value)
+}
+
+const handleClear = () => {
+  searchText.value = ''
+  fetchUserList()
+}
+
+const isUserSelected = (item: UserItem) => {
+  return selectedUsers.value.some((u) => u.id === item.id)
+}
+
+const handleSelectUser = (item: UserItem) => {
+  if (props.multiple) {
+    const idx = selectedUsers.value.findIndex((u) => u.id === item.id)
+    if (idx >= 0) {
+      selectedUsers.value.splice(idx, 1)
+    } else {
+      selectedUsers.value.push(item)
+    }
+  } else {
+    // 单选:点击同一项取消选中,点击其他项替换
+    if (selectedUsers.value.length && selectedUsers.value[0].id === item.id) {
+      selectedUsers.value = []
+    } else {
+      selectedUsers.value = [item]
+    }
+  }
+}
+
+const handleRemoveSelected = (user: UserItem) => {
+  const idx = selectedUsers.value.findIndex((u) => u.id === user.id)
+  if (idx >= 0) {
+    selectedUsers.value.splice(idx, 1)
+  }
+}
+
+const handleConfirm = () => {
+  emit('confirm', [...selectedUsers.value])
+  visible.value = false
+}
+
+const handleCancel = () => {
+  visible.value = false
+  emit('cancel')
+}
+</script>
+
+<style lang="scss" scoped>
+.select-user-modal {
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  background-color: #f5f5f5;
+}
+
+.modal-header {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  height: 50px;
+  padding: 0 16px;
+  background-color: #fff;
+  border-bottom: 1px solid #eee;
+}
+
+.header-btn {
+  padding: 0 8px;
+  height: 100%;
+  display: flex;
+  align-items: center;
+}
+
+.cancel-btn {
+  color: rgba(51, 51, 51, 0.7);
+  font-size: 16px;
+}
+
+.confirm-btn {
+  color: rgb(47, 142, 255);
+  font-size: 16px;
+}
+
+.header-title {
+  font-size: 17px;
+  font-weight: 500;
+  color: #333;
+}
+
+.search-bar {
+  background-color: #fff;
+  padding: 0 8px;
+}
+
+.selected-bar {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  padding: 8px 16px;
+  background-color: #fff;
+  border-bottom: 1px solid #eee;
+
+  &--hidden {
+    display: none;
+  }
+}
+
+.selected-label {
+  font-size: 13px;
+  color: #999;
+  flex-shrink: 0;
+}
+
+.selected-tags-scroll {
+  flex: 1;
+  display: flex;
+  flex-direction: row;
+  white-space: nowrap;
+}
+
+.selected-user-tag {
+  display: inline-flex;
+  flex-direction: row;
+  align-items: center;
+  padding: 3px 8px;
+  margin-left: 6px;
+  background-color: #ecf5ff;
+  border: 1px solid #d9ecff;
+  border-radius: 4px;
+  flex-shrink: 0;
+}
+
+.selected-user-name {
+  font-size: 13px;
+  color: rgb(47, 142, 255);
+}
+
+.selected-user-remove {
+  margin-left: 4px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.user-list {
+  flex: 1;
+  overflow: hidden;
+}
+
+.user-item {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  padding: 12px 16px;
+  background-color: #fff;
+  border: 1px solid transparent;
+  border-bottom-color: #f0f0f0;
+
+  &--selected {
+    background-color: #ecf5ff;
+    border-color: rgb(47, 142, 255);
+  }
+}
+
+.user-avatar {
+  width: 36px;
+  height: 36px;
+  margin-right: 12px;
+  flex-shrink: 0;
+}
+
+.avatar-placeholder {
+  width: 36px;
+  height: 36px;
+  border-radius: 50%;
+  background-color: rgb(47, 142, 255);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.avatar-text {
+  color: #fff;
+  font-size: 16px;
+  font-weight: 500;
+}
+
+.user-info {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  min-width: 0;
+}
+
+.user-name-row {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+
+.user-name {
+  font-size: 15px;
+  color: #333;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.user-employee-no {
+  font-size: 12px;
+  color: #999;
+  margin-left: 8px;
+  flex-shrink: 0;
+}
+
+.user-dept {
+  font-size: 12px;
+  color: #999;
+  margin-top: 2px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.empty-tip {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding-top: 80px;
+}
+</style>

+ 1 - 0
src/components/QueryViewItem/index.ts

@@ -5,3 +5,4 @@ export { default as CellCom } from './CellCom.vue'
 export { default as CheckTaskStatusCom } from './CheckTaskStatusCom.vue'
 export { default as EquipTypeCom } from './EquipTypeCom.vue'
 export { default as SelectCom } from './SelectCom.vue'
+export { default as SelectUserModal } from './SelectUserModal.vue'

+ 2 - 1
src/pages/home/index.vue

@@ -281,6 +281,7 @@ const getUnClaimNum = async () => {
     pageNo: 1,
     pageSize: 10,
     taskStatus: 100,
+    checkUserIds: userInfo.value?.id ? [userInfo.value.id] : [],
   }
   const result = await requestFunc(IndexFuncName.PreClaimNumberApi, equipType.value, params)
   const num = result?.data?.total
@@ -317,7 +318,7 @@ const getCheckerOwnTaskNum = async () => {
     pageSize: 10,
     taskStatusList: [400, 500, 510],
     isClaim: false,
-    planCheckUserIds: userInfo.value?.id ? [userInfo.value.id] : [],
+    checkUserIds: userInfo.value?.id ? [userInfo.value.id] : [],
   })
 
   if (result?.code == 0 && result?.data?.total) {

+ 152 - 93
src/pages/pendingVerification/components/QueryView.vue

@@ -1,52 +1,45 @@
 <template>
   <view class="query-view">
-    <view class="query-content" :style="contentStyle">
-      <view class="query-left">
-        <InputCom
-          ref="orderNoRef"
-          title="任务单号:"
-          type="orderNo"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('orderNo', $event)"
-        />
-        <CheckNatureCom
-          ref="checkTypeRef"
-          title="检验性质:"
-          type="checkType"
-          :equip-type="equipType"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('checkType', $event)"
-        />
-        <CheckDateCom
-          ref="checkDateRef"
-          title="检验时间:"
-          type="checkDate"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('checkDate', $event)"
-        />
-        <CellCom
-          ref="mainCheckerStrIdsRef"
-          title="主检人:"
-          type="mainCheckerStrIds"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0, marginBottom: 0 }"
-          @click="showUserListPopup('主检人', 'mainCheckerStrIds')"
-        />
-        <CellCom
-          ref="managerIdRef"
-          title="项目负责人:"
-          type="managerId"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0, marginBottom: 0 }"
-          @click="showUserListPopup('项目负责人', 'managerId')"
-        />
-      </view>
+    <view :style="contentStyle">
+      <view class="query-content">
+        <view class="query-left">
+          <InputCom
+            ref="orderNoRef"
+            title="任务单号:"
+            type="orderNo"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('orderNo', $event)"
+          />
+          <CheckNatureCom
+            ref="checkTypeRef"
+            title="检验性质:"
+            type="checkType"
+            :equip-type="equipType"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('checkType', $event)"
+          />
+          <CheckDateCom
+            ref="checkDateRef"
+            title="检验时间:"
+            type="checkDate"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('checkDate', $event)"
+          />
+          <CellCom
+            ref="mainCheckerStrIdsRef"
+            title="主检人:"
+            type="mainCheckerStrIds"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0, marginBottom: 0 }"
+            @click="showUserListPopup('主检人', 'mainCheckerStrIds')"
+          />
+        </view>
 
-      <view class="query-right">
-        <CellCom
+        <view class="query-right">
+          <!-- <CellCom
           ref="queryTypeRef"
           :title="queryTypeTitle"
           type="queryType"
@@ -54,57 +47,71 @@
           :style="{ marginLeft: 0 }"
           :default-value="defaultValue"
           @click="showUserListPopup(queryTypeTitle, 'queryType')"
-        />
-        <InputCom
-          v-if="equipType === EquipmentType.BOILER || equipType === EquipmentType.CONTAINER"
-          ref="equipCodeRef"
-          title="设备注册代码:"
-          type="equipCode"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('equipCode', $event)"
-        />
-        <InputCom
-          v-if="equipType === EquipmentType.PIPE"
-          ref="projectNoRef"
-          title="工程号:"
-          type="projectNo"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('projectNo', $event)"
-        />
-        <InputCom
-          ref="unitNameRef"
-          title="单位名称:"
-          type="unitName"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('unitName', $event)"
-        />
-        <CellCom
-          ref="checkUserStrIdsRef"
-          title="检验员:"
-          type="checkUserStrIds"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0, marginBottom: 0 }"
-          @click="showUserListPopup('检验员', 'checkUserStrIds')"
-        />
-
-        <view class="btn-group">
-          <button class="btn reset-btn" @click="reset">重置</button>
-          <button class="btn query-btn" @click="query">查询</button>
+        /> -->
+          <InputCom
+            v-if="equipType === EquipmentType.BOILER || equipType === EquipmentType.CONTAINER"
+            ref="equipCodeRef"
+            title="设备注册代码:"
+            type="equipCode"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('equipCode', $event)"
+          />
+          <InputCom
+            v-if="equipType === EquipmentType.PIPE"
+            ref="projectNoRef"
+            title="工程号:"
+            type="projectNo"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('projectNo', $event)"
+          />
+          <InputCom
+            ref="unitNameRef"
+            title="单位名称:"
+            type="unitName"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('unitName', $event)"
+          />
+          <CellCom
+            ref="checkUserStrIdsRef"
+            title="检验员:"
+            type="checkUserStrIds"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0, marginBottom: 0 }"
+            @click="showUserListPopup('检验员', 'checkUserStrIds')"
+          />
+          <CellCom
+            ref="managerIdRef"
+            title="项目负责人:"
+            type="managerId"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0, marginBottom: 0 }"
+            @click="showUserListPopup('项目负责人', 'managerId')"
+          />
         </view>
       </view>
+      <view class="btn-group">
+        <button class="btn reset-btn" @click="reset">重置</button>
+        <button class="btn query-btn" @click="query">查询</button>
+      </view>
     </view>
 
     <view class="query-toggle" @click="toggleFilter">
       <text class="query-toggle-text">查询</text>
-      <image
-        class="arrow-icon"
-        :src="iconMap.ArrowDown"
-        :class="{ 'arrow-rotate': isOpen }"
-      />
+      <image class="arrow-icon" :src="iconMap.ArrowDown" :class="{ 'arrow-rotate': isOpen }" />
     </view>
+
+    <!-- 人员选择弹窗 -->
+    <SelectUserModal
+      v-model="userModalVisible"
+      :title="userModalTitle"
+      :selected="userModalSelected"
+      :multiple="userModalMultiple"
+      @confirm="handleUserConfirm"
+      @cancel="handleUserCancel"
+    />
   </view>
 </template>
 
@@ -117,6 +124,7 @@ import { InputCom } from '@/components/QueryViewItem'
 import { CheckDateCom } from '@/components/QueryViewItem'
 import { CheckNatureCom } from '@/components/QueryViewItem'
 import { CellCom } from '@/components/QueryViewItem'
+import { SelectUserModal } from '@/components/QueryViewItem'
 
 interface Props {
   equipType: EquipmentType
@@ -203,6 +211,13 @@ const reset = () => {
     managerId: '',
   })
 
+  // 清空人员选择缓存
+  userSelectedCache.value = {
+    mainCheckerStrIds: [],
+    checkUserStrIds: [],
+    managerId: [],
+  }
+
   emit('queryAction', params)
 }
 
@@ -216,7 +231,50 @@ const query = () => {
 }
 
 const showUserListPopup = (title: string, type: string) => {
-  console.log('显示用户列表弹窗:', title, type)
+  userModalTitle.value = title
+  userModalType.value = type
+  userModalSelected.value = userSelectedCache.value[type] || []
+  // 主检人、项目负责人为单选,检验员为多选
+  userModalMultiple.value = type === 'checkUserStrIds'
+  userModalVisible.value = true
+}
+
+// 人员选择弹窗相关状态
+const userModalVisible = ref(false)
+const userModalTitle = ref('')
+const userModalType = ref('')
+const userModalSelected = ref<any[]>([])
+const userModalMultiple = ref(true)
+
+// 按字段类型缓存已选用户
+const userSelectedCache = ref<Record<string, any[]>>({
+  mainCheckerStrIds: [],
+  checkUserStrIds: [],
+  managerId: [],
+})
+
+const handleUserConfirm = (users: any[]) => {
+  const type = userModalType.value
+  const displayNames = users.map((u) => u.nickname || u.username || '').join(',')
+  const ids = users.map((u) => u.id).join(',')
+
+  // 缓存已选用户
+  userSelectedCache.value[type] = users
+
+  if (type === 'mainCheckerStrIds') {
+    mainCheckerStrIdsRef.value?.setInputContent(displayNames)
+    params.mainCheckerStrIds = ids
+  } else if (type === 'checkUserStrIds') {
+    checkUserStrIdsRef.value?.setInputContent(displayNames)
+    params.checkUserStrIds = ids
+  } else if (type === 'managerId') {
+    managerIdRef.value?.setInputContent(displayNames)
+    params.managerId = ids
+  }
+}
+
+const handleUserCancel = () => {
+  // 取消不做额外处理
 }
 </script>
 
@@ -237,7 +295,7 @@ const showUserListPopup = (title: string, type: string) => {
 .query-left,
 .query-right {
   flex: 1;
-  padding: 15px 0;
+  padding: 15px 0 0 0;
 }
 
 .query-right {
@@ -248,14 +306,15 @@ const showUserListPopup = (title: string, type: string) => {
   display: flex;
   flex-direction: row;
   justify-content: flex-end;
-  margin-top: 10px;
   padding: 0 10%;
   gap: 10%;
+  margin: 0 20% 10px;
 }
 
 .btn {
   padding: 0 15px;
   height: 30px;
+  width: 40%;
   margin-left: 5px;
   border-radius: 3px;
   display: flex;

+ 72 - 71
src/pages/taskOnlinePage/components/query/QueryView.vue

@@ -1,76 +1,77 @@
 <template>
   <view class="query-view">
-    <view class="query-content" :style="contentStyle">
-      <view class="query-left">
-        <InputCom
-          ref="orderNoRef"
-          title="任务单号:"
-          type="orderNo"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('orderNo', $event)"
-        />
-        <InputCom
-          ref="unitNameRef"
-          title="单位名称:"
-          type="unitName"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('unitName', $event)"
-        />
-        <CheckDateCom
-          ref="checkDateRef"
-          title="检验日期:"
-          type="checkDate"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0, marginBottom: 0 }"
-          @change="handleChange('checkDate', $event)"
-        />
-      </view>
-
-      <view class="query-right">
-        <InputCom
-          v-if="equipType === EquipmentType.BOILER || equipType === EquipmentType.CONTAINER"
-          ref="equipCodeRef"
-          title="设备注册代码:"
-          type="equipCode"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('equipCode', $event)"
-        />
-        <InputCom
-          v-if="equipType === EquipmentType.PIPE"
-          ref="projectNoRef"
-          title="工程号:"
-          type="projectNo"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('projectNo', $event)"
-        />
-        <CheckTaskStatusCom
-          ref="taskStatusListRef"
-          title="主报告状态:"
-          type="taskStatusList"
-          :default-value="[400, 500, 510]"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('taskStatusList', $event)"
-        />
-        <CheckNatureCom
-          ref="checkTypeRef"
-          title="检验性质:"
-          type="checkType"
-          :equip-type="equipType"
-          :text-style="{ width: '100px' }"
-          :style="{ marginLeft: 0, marginBottom: 0 }"
-          @change="handleChange('checkType', $event)"
-        />
+    <view :style="contentStyle">
+      <view class="query-content">
+        <view class="query-left">
+          <InputCom
+            ref="orderNoRef"
+            title="任务单号:"
+            type="orderNo"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('orderNo', $event)"
+          />
+          <InputCom
+            ref="unitNameRef"
+            title="单位名称:"
+            type="unitName"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('unitName', $event)"
+          />
+          <CheckDateCom
+            ref="checkDateRef"
+            title="检验日期:"
+            type="checkDate"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0, marginBottom: 0 }"
+            @change="handleChange('checkDate', $event)"
+          />
+        </view>
 
-        <view class="btn-group">
-          <button class="btn reset-btn" @click="reset">重置</button>
-          <button class="btn query-btn" @click="query">查询</button>
+        <view class="query-right">
+          <InputCom
+            v-if="equipType === EquipmentType.BOILER || equipType === EquipmentType.CONTAINER"
+            ref="equipCodeRef"
+            title="设备注册代码:"
+            type="equipCode"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('equipCode', $event)"
+          />
+          <InputCom
+            v-if="equipType === EquipmentType.PIPE"
+            ref="projectNoRef"
+            title="工程号:"
+            type="projectNo"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('projectNo', $event)"
+          />
+          <CheckTaskStatusCom
+            ref="taskStatusListRef"
+            title="主报告状态:"
+            type="taskStatusList"
+            :default-value="[400, 500, 510]"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('taskStatusList', $event)"
+          />
+          <CheckNatureCom
+            ref="checkTypeRef"
+            title="检验性质:"
+            type="checkType"
+            :equip-type="equipType"
+            :text-style="{ width: '100px' }"
+            :style="{ marginLeft: 0, marginBottom: 0 }"
+            @change="handleChange('checkType', $event)"
+          />
         </view>
       </view>
+      <view class="btn-group">
+        <button class="btn reset-btn" @click="reset">重置</button>
+        <button class="btn query-btn" @click="query">查询</button>
+      </view>
     </view>
 
     <view class="query-toggle" @click="toggleFilter">
@@ -193,7 +194,7 @@ const query = () => {
 .query-left,
 .query-right {
   flex: 1;
-  padding: 15px 0;
+  padding: 15px 0 0 0;
 }
 
 .query-right {
@@ -204,7 +205,7 @@ const query = () => {
   display: flex;
   flex-direction: row;
   justify-content: flex-end;
-  margin-top: 10px;
+  margin: 0 20% 10px;
 }
 
 .btn {
@@ -212,7 +213,7 @@ const query = () => {
   align-items: center;
   justify-content: center;
   height: 30px;
-  padding: 0 15px;
+  width: 30%;
   margin-left: 10%;
   font-size: 15px;
   border: none;

+ 1 - 0
src/pages/taskOnlinePage/taskOnline.vue

@@ -131,6 +131,7 @@ const getQueryParams = () => {
     ...params,
     ...queryData,
     ...statusData,
+    checkUserIds: userInfo.value?.id ? [userInfo.value.id] : [],
   }
 }
 

+ 57 - 55
src/pages/unClaim/components/query/QueryView.vue

@@ -1,59 +1,61 @@
 <template>
   <view class="query-view">
-    <view class="query-content" v-show="isOpen">
-      <view class="query-left">
-        <InputCom
-          ref="orderNoRef"
-          title="任务单号:"
-          type="orderNo"
-          :text-style="{ width: '70px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('orderNo', $event)"
-        />
-
-        <CellCom
-          ref="inspectorIdsRef"
-          title="检验员:"
-          type="inspectorIds"
-          :text-style="{ width: '70px' }"
-          :style="{ marginLeft: 0, marginBottom: 0 }"
-          @click="showUserListPopup('检验员', 'inspectorIds')"
-        />
-
-        <CheckDateCom
-          ref="checkDateRef"
-          type="checkDate"
-          :text-style="{ width: '70px' }"
-          title="检验时间:"
-          :style="{ marginLeft: 0, marginBottom: 0 }"
-          @change="handleChange('checkDate', $event)"
-        />
-      </view>
-
-      <view class="query-right">
-        <InputCom
-          ref="unitNameRef"
-          title="单位名称:"
-          type="unitName"
-          :text-style="{ width: '90px' }"
-          :style="{ marginLeft: 0 }"
-          @change="handleChange('unitName', $event)"
-        />
-
-        <CheckNatureCom
-          ref="checkTypeRef"
-          type="checkType"
-          :equip-type="equipType"
-          title="检验性质:"
-          :text-style="{ width: '90px' }"
-          :style="{ marginLeft: 0, marginBottom: 0 }"
-          @change="handleChange('checkType', $event)"
-        />
-
-        <view class="btn-group">
-          <button class="btn reset-btn" @click="reset">重置</button>
-          <button class="btn query-btn" @click="query">查询</button>
+    <view  v-show="isOpen">
+      <view class="query-content">
+        <view class="query-left">
+          <InputCom
+            ref="orderNoRef"
+            title="任务单号:"
+            type="orderNo"
+            :text-style="{ width: '70px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('orderNo', $event)"
+          />
+  
+            <!-- <CellCom
+            ref="inspectorIdsRef"
+            title="检验员:"
+            type="inspectorIds"
+            :text-style="{ width: '70px' }"
+            :style="{ marginLeft: 0, marginBottom: 0 }"
+            @click="showUserListPopup('检验员', 'inspectorIds')"
+          /> -->
+  
+          <CheckDateCom
+            ref="checkDateRef"
+            type="checkDate"
+            :text-style="{ width: '70px' }"
+            title="检验时间:"
+            :style="{ marginLeft: 0, marginBottom: 0 }"
+            @change="handleChange('checkDate', $event)"
+          />
         </view>
+  
+        <view class="query-right">
+          <InputCom
+            ref="unitNameRef"
+            title="单位名称:"
+            type="unitName"
+            :text-style="{ width: '90px' }"
+            :style="{ marginLeft: 0 }"
+            @change="handleChange('unitName', $event)"
+          />
+  
+          <CheckNatureCom
+            ref="checkTypeRef"
+            type="checkType"
+            :equip-type="equipType"
+            title="检验性质:"
+            :text-style="{ width: '90px' }"
+            :style="{ marginLeft: 0, marginBottom: 0 }"
+            @change="handleChange('checkType', $event)"
+          />
+  
+        </view>
+      </view>
+      <view class="btn-group">
+        <button class="btn reset-btn" @click="reset">重置</button>
+        <button class="btn query-btn" @click="query">查询</button>
       </view>
     </view>
 
@@ -204,16 +206,16 @@ const handleUserChange = (users: any[]) => {
   display: flex;
   flex-direction: row;
   justify-content: flex-end;
-  margin-top: 10px;
+  margin: 0 20% 10px;
 }
 
 .btn {
   display: flex;
   align-items: center;
+  width: 30%;
   justify-content: center;
   height: 30px;
   padding: 0 15px;
-  margin-left: 10%;
   font-size: 15px;
   border: none;
   border-radius: 3px;

+ 5 - 0
src/pages/unClaim/unClaimList.vue

@@ -84,6 +84,7 @@ import TaskItem from './components/TaskItem.vue'
 import UpdateContactPopup from './components/UpdateContactPopup.vue'
 import RadioFilterBar from '@/components/RadioFilterBar/RadioFilterBar.vue'
 import { useConfigStore } from '@/store/config'
+import { useUserStore } from '@/store/user'
 import { TaskOrderFuncName, requestFunc } from '@/api/ApiRouter/taskOrder'
 import {
   SecurityCheckFuncName,
@@ -122,6 +123,9 @@ const currentOrderInfo = ref<any>({})
 const configStore = useConfigStore()
 const equipType = configStore.getEquipType()
 
+const userStore = useUserStore()
+const userInfo = computed(() => userStore.userInfo)
+
 // 设置组件引用
 const setItemRef = (itemId: string) => (ref: any) => {
   if (ref) {
@@ -151,6 +155,7 @@ const fetchList = async (refresh = false) => {
     ...getQueryParams(),
     taskStatus: params.taskStatus,
     pageNo: refresh ? 1 : params.pageNo + 1,
+    checkUserIds: userInfo.value?.id ? [userInfo.value.id] : []
   }
   params.pageNo = queryData.pageNo