Files
cn-rdms-web/src/views/feedback/modules/feedback-search.vue
dk 9d147ee263 feat(feedback): 增加反馈搜索状态筛选功能
- 在反馈搜索组件中引入状态字典选项
- 为反馈搜索区域增加状态选择器字段
- 设置反馈页面初始搜索参数中的状态值为1

fix(personal-center): 限制已完成项目的编辑操作
- 根据项目完成状态动态控制编辑按钮的显示
- 从个人中心我的项目详情对话框中移除已完成项目的操作权限

refactor(project): 优化任务操作权限控制逻辑
- 移除原有的任务权限钩子函数依赖
- 使用当前用户身份直接判断任务操作权限
- 只有任务负责人才能进行编辑和删除操作
- 已完成任务不可编辑
- 重构成更清晰的任务操作按钮显示逻辑

fix(project): 完成任务禁用工时记录删除功能
- 添加计算属性控制完成状态下的工时记录删除权限
- 在工时记录面板中根据任务状态控制删除操作的显示
2026-07-02 16:34:08 +08:00

66 lines
1.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup lang="ts">
import { computed, onMounted, ref } from 'vue';
import { FEEDBACK_STATUS_DICT_CODE } from '@/constants/dict';
import { fetchGetUserSimpleList } from '@/service/api';
import { useDict } from '@/hooks/business/dict';
import TableSearchFields, { type SearchField } from '@/components/custom/table-search-fields.vue';
defineOptions({ name: 'FeedbackSearch' });
const emit = defineEmits<{
reset: [];
search: [];
}>();
const model = defineModel<Api.Feedback.FeedbackSearchParams>('model', { required: true });
// 提交人下拉选项全员简易列表value 取用户 idID 铁律 string
const userOptions = ref<{ label: string; value: string }[]>([]);
const { dictOptions: statusOptions } = useDict(FEEDBACK_STATUS_DICT_CODE);
// 分类保留在左侧分面;搜索区补充标题关键词、提交人、状态
const fields = computed<SearchField[]>(() => [
{ key: 'title', label: '标题', type: 'input', placeholder: '请输入标题关键词' },
{
key: 'creator',
label: '提交人',
type: 'select',
placeholder: '请选择提交人',
filterable: true,
options: userOptions.value
},
{
key: 'status',
label: '状态',
type: 'select',
placeholder: '请选择状态',
options: statusOptions.value
}
]);
async function loadUserOptions() {
const { data, error } = await fetchGetUserSimpleList();
if (!error && data) {
userOptions.value = data.map(item => ({ label: item.nickname, value: item.id }));
}
}
function reset() {
emit('reset');
}
function search() {
// 输入期不实时 trim避免受控 input 吃掉词间空格);提交前规整一次,空串归一为 undefined
model.value.title = model.value.title?.trim() || undefined;
emit('search');
}
onMounted(loadUserOptions);
</script>
<template>
<TableSearchFields v-model="model" :fields="fields" :columns="4" @reset="reset" @search="search" />
</template>
<style scoped></style>