| | |
| | | </template> |
| | | <script setup> |
| | | import { Search, RefreshRight, Plus, Delete } from '@element-plus/icons-vue' |
| | | import { onMounted, ref, nextTick, provide } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | |
| | | import { useStore } from 'vuex' |
| | | const store = useStore() |
| | | const userDepartment = store.state.user.userInfo?.dept_id |
| | | const permission = computed(() => store.state.user.permission); |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | | caseName: '', // 案例名称 |
| | | innovationStatus: '', // 应用创新状态 |
| | | current: 1, // 当前页 |
| | | size: 10, // 每页大小 |
| | | isQueryAll:''//是否查询所有 |
| | | }) |
| | | const searchParams = ref(initSearchParams()) // 查询参数 |
| | | const total = ref(0) // 总条数 |
| | |
| | | async function getList() { |
| | | loading.value = true |
| | | try { |
| | | const res = await gdApplicationInnovationPageApi(searchParams.value) |
| | | // 根据权限设置查询参数 |
| | | const params = { ...searchParams.value } |
| | | if (permission.value.yycx_shtg) { |
| | | params.innovationStatus = '1' |
| | | params.isQueryAll = true |
| | | } else { |
| | | params.isQueryAll = false |
| | | delete params.innovationStatus |
| | | } |
| | | const res = await gdApplicationInnovationPageApi(params) |
| | | res?.data?.data?.records.forEach(item => { |
| | | item.isTheSameDepartment = String(item.createDept) === String(userDepartment) |
| | | }) |