Bladeren bron

feat开发

xiaweibo 2 maanden geleden
bovenliggende
commit
3b34e8bc94

+ 11 - 18
src/views/production-safety/safetyAssessment/evaluationDepartment/components/EvaluationDepartmentAdvancedPerson.vue

@@ -39,17 +39,9 @@
             <section class="search-btn">
               <el-button type="primary" @click="handleSearch">查询</el-button>
               <el-button @click="handleReset">重置</el-button>
-              <el-dropdown trigger="click" @command="selectDeptType">
-                <el-button type="primary" style="margin:0 10px;">
-                  添加
-                </el-button>
-                <template #dropdown>
-                  <el-dropdown-menu>
-                    <el-dropdown-item command="normal">普通部门</el-dropdown-item>
-                    <el-dropdown-item command="advanced">先进集体部门</el-dropdown-item>
-                  </el-dropdown-menu>
-                </template>
-              </el-dropdown>
+              <el-button type="primary" style="margin:0 10px;" @click="handleAdd">
+                添加
+              </el-button>
               <el-button plain  @click="handleExport">
                 导出
               </el-button>
@@ -79,7 +71,7 @@
     <!-- 添加/编辑先进个人对话框 -->
     <el-dialog
       v-model="addDialogVisible"
-      :title="`${isEditMode ? '编辑' : '新增'}先进个人 (${deptType === 'normal' ? '普通部门' : '先进集体部门'})`"
+      :title="`${isEditMode ? '编辑' : '新增'}先进个人`"
       width="800px"
       :close-on-click-modal="false"
       @close="handleDialogClose"
@@ -269,6 +261,8 @@
 
   // 考核表详情
   const evaluationDetail = ref<Partial<EvaluationTargetItem>>({});
+  // isAdvancedGroup 为 true 表示先进集体部门,false 表示普通部门
+  const isAdvancedGroup = computed(() => Boolean(evaluationDetail.value?.isAdvancedGroup));
   const deptId = ref<number | undefined>(undefined); // 部门ID
   const psemId = ref<number | undefined>(undefined); // 考核表ID(从接口获取)
   const deptUserId = ref<number | undefined>(undefined); // 部门用户ID(从接口获取)
@@ -392,13 +386,12 @@
     handleSearch();
   };
 
-  // 选择部门类型(从下拉菜单触发
-  const selectDeptType = (type: 'normal' | 'advanced') => {
-    deptType.value = type;
+  // 点击添加:根据 isAdvancedGroup 直接打开对应弹窗(true=先进集体部门,false=普通部门
+  const handleAdd = () => {
+    deptType.value = isAdvancedGroup.value ? 'advanced' : 'normal';
     addDialogVisible.value = true;
-    
-    // 如果是先进集体部门,初始化表格数据(默认1行)
-    if (type === 'advanced') {
+
+    if (isAdvancedGroup.value) {
       advancedFormList.value = [
         {
           employeeCode: '',

+ 1 - 1
utils/devProxy/staff/proxy.ts

@@ -3,7 +3,7 @@ import path from 'path';
 
 // staff环境
 const proxyStaff: PROXY_TYPE = {
-  serverHost: 'http://192.168.6.42:8802/',
+  serverHost: 'http://192.168.22.148:8802/',
   // serverHost: 'http://192.168.20.4:8802/',
   skyeyeLoginHost: 'http://192.168.6.42:7000/skyeye-login/#/',
   skyeyePlatformHost: 'http://192.168.6.42:7000/skyeye-pc/#/',