Przeglądaj źródła

fix:文件上传

yanghao 1 tydzień temu
rodzic
commit
0c06d8e7d4

+ 4 - 0
src/api/project/index.ts

@@ -36,3 +36,7 @@ export const approvePre = (data: any) =>
 
 export const approveFormal = (data: any) =>
   request.post({ url: '/rd/research-project/approve-formal', data })
+
+/** 待我审批的分页 */
+export const getProjectTodoPage = (params: any) =>
+  request.get({ url: '/rd/research-project/todo-page', params })

Plik diff jest za duży
+ 544 - 478
src/views/researchProject/approval/index.vue


+ 10 - 9
src/views/researchProject/list/index.vue

@@ -106,14 +106,7 @@
             @click="handleSubmitFormal(row)"
             >提交立项</el-button
           >
-          <el-button
-            v-if="canApprove(row)"
-            link
-            type="success"
-            v-hasPermi="['rd:project:approve']"
-            @click="openApprove(row)"
-            >审批</el-button
-          >
+
           <el-button
             v-if="canEdit(row)"
             link
@@ -423,6 +416,7 @@ import { computed, reactive, ref, onMounted } from 'vue'
 import { ElMessage, ElMessageBox, type FormRules } from 'element-plus'
 import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
 import { getSimpleDeptList } from '@/api/system/dept'
+import { getUserProfile } from '@/api/system/user/profile'
 import {
   getProjectPage,
   getProject,
@@ -462,6 +456,7 @@ const defaultProps = {
   value: 'id'
 }
 const deptList = ref<any[]>([])
+let deptId = ref('')
 
 // ========== 类型 ==========
 type ScheduleItem = { workPlan: string; deadline: string; sort?: number }
@@ -602,7 +597,7 @@ const createBudgetDetail = (): BudgetDetail => ({
 
 // formData 中【不包含】任何附件字段
 const createForm = () => ({
-  deptId: null as number | null,
+  deptId: deptId.value,
   projectLevel: '',
   executingUnit: null as number | null,
   projectName: '',
@@ -656,6 +651,7 @@ const openForm = async (project?: any) => {
       formData.value = {
         ...createForm(),
         ...data,
+        deptId: deptId.value,
         scheduleList: data.scheduleList?.length ? data.scheduleList : [createSchedule()],
         budgetList: data.budgetList?.length ? data.budgetList : [createBudgetDetail()]
       }
@@ -814,6 +810,11 @@ const removeProject = async (id: number) => {
     await getList()
   }
 }
+
+onMounted(async () => {
+  const data = await getUserProfile()
+  deptId.value = data.dept.id
+})
 </script>
 
 <style scoped lang="scss">

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików