xiangpei
2025-03-03 fabe25575a7b8c8d4bef61c4ef4deaa7dc219cfe
src/views/engineering/index.vue
@@ -105,7 +105,7 @@
      default-expand-all
      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
      :show-overflow-tooltip="true">
      <el-table-column label="项目名称" align="center" prop="projectName" />
      <el-table-column label="项目名称" prop="projectName" />
      <el-table-column label="项目推进类型" align="center" prop="projectType">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/>
@@ -133,18 +133,21 @@
            size="mini"
            type="text"
            icon="el-icon-plus"
            style="margin-right: 10px"
            @click="handleadd(scope.row)"
          >添加子工程</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            v-if="!isProject(scope.row.id)"
            @click="handleUpdate(scope.row)"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            v-if="!isProject(scope.row.id)"
            @click="deleteById(scope.row)"
          >删除</el-button>
        </template>
@@ -310,6 +313,10 @@
      // 关键设置:显示年份选择器
      pickers: ['year']
  },
    isProject(id) {
      const numericPattern = /^\d+(\.\d+)?$/;
      return numericPattern.test(id)
    },
    getProjectOwnerUnit(unitId) {
      console.log(unitId)
      // if (deptId) {