|
@@ -3,28 +3,32 @@
|
|
|
<div class="title">{{ title }}</div>
|
|
|
<div class="tabs">
|
|
|
<div class="t_pre" :class="{'active':tidx===1}" @click="handleChangeTab(1)">活动项目</div>
|
|
|
- <div class="t_pre" :class="{'active':tidx===2}" @click="handleChangeTab(2)">已完成</div>
|
|
|
- <!-- <div class="t_pre" :class="{'active':tidx===3}" @click="handleChangeTab(3)">已归档</div>-->
|
|
|
- <div class="t_add" @click="handleAdd" v-hasPermi="['core:project:add']">+ 创建新项目</div>
|
|
|
+ <div class="t_pre" :class="{'active':tidx===2}" @click="handleChangeTab(2)">项目进展</div>
|
|
|
+ <template v-if="tidx===1">
|
|
|
+ <div class="t_add t_add2" @click="handleAddTeam" v-hasPermi="['core:project:addTeam']">+ 添加团队</div>
|
|
|
+ <div class="t_add" @click="handleAdd" v-hasPermi="['core:project:add']">+ 创建项目</div>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="tidx===2">
|
|
|
+ <div class="t_add" @click="handleAddJZ">+ 添加项目进展</div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<template v-if="tidx===1">
|
|
|
+ <div class="query adfacjb">
|
|
|
+ <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="programName" style="width: calc(100% - 448px);" @keyup.enter.native="getProgramList"></el-input>
|
|
|
+ <el-select v-model="queryParams.team" placeholder="所有团队" style="width: 200px;"></el-select>
|
|
|
+ <el-select v-model="queryParams.sort" placeholder="排序方式" style="width: 200px;"></el-select>
|
|
|
+ </div>
|
|
|
<div class="content">
|
|
|
- <template v-if="teamList.length">
|
|
|
+ <template v-if="companyList.length">
|
|
|
<div class="team_user_list">
|
|
|
<div class="tul_left">
|
|
|
<div class="tull_top">
|
|
|
- <div class="tullt_l">项目管理</div>
|
|
|
- <div class="tullt_r" @click="handleAddTeam" v-hasPermi="['core:project:addTeam']">+添加团队</div>
|
|
|
- </div>
|
|
|
- <div class="tull_query queryInput">
|
|
|
- <el-input v-model="programName" placeholder="请输入公司名称" @keyup.enter.native="getProgramList"></el-input>
|
|
|
- <img src="@/assets/images/agent/query_mini.png">
|
|
|
+ <div class="tullt_l">全部项目</div>
|
|
|
</div>
|
|
|
<div class="tull_list">
|
|
|
<div class="tull_item" :class="{'active':item.select}" v-for="(item,index) in companyList" :key="index" @click="handleExpand(item,index)">
|
|
|
<div class="tname">
|
|
|
<div>
|
|
|
- <img src="@/assets/images/agent/down_sj.png">
|
|
|
<span>{{ item.enterpriseName }}</span>
|
|
|
</div>
|
|
|
<el-popover placement="right" width="177" trigger="click">
|
|
@@ -32,84 +36,33 @@
|
|
|
<div class="tlc_pre" @click="handleProgramDetail(item)" v-hasPermi="['core:program:info']">项目详情</div>
|
|
|
<div class="tlc_pre" @click="handleProgramDelete(item)" v-hasPermi="['core:program:delete']">删除项目</div>
|
|
|
</div>
|
|
|
- <i slot="reference" class="el-icon-more" style="font-size: 14px;color: #999; transform: rotate(90deg);" @click.stop="handleSetTeam(team,idx)"></i>
|
|
|
+ <i slot="reference" class="el-icon-edit" style="font-size: 16px;color: #999;" @click.stop="handleSetTeam(team,idx)"></i>
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
- <template v-if="item.expand&&item.teams&&item.teams.length">
|
|
|
- <div class="tuser_list" :class="{'active':team.select}" v-for="(team,idx) in item.teams" :key="idx" @click.stop="handleSelect(team,idx)">
|
|
|
- <span>{{ team.teamName }}</span>
|
|
|
- <span>({{ team.teamNum||0 }}人)</span>
|
|
|
- <el-popover placement="right" width="177" trigger="click">
|
|
|
- <div class="tl_czs">
|
|
|
- <div class="tlc_pre" @click="handleTeamDetail(team,item)" v-hasPermi="['core:team:info']">团队详情</div>
|
|
|
- <div class="tlc_pre" @click="handleTeamDelete(team)" v-hasPermi="['core:team:delete']">删除团队</div>
|
|
|
- </div>
|
|
|
- <i slot="reference" class="el-icon-more" style="font-size: 14px;color: #999; transform: rotate(90deg);" @click.stop="handleSetTeam(team,idx)"></i>
|
|
|
- </el-popover>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tul_right">
|
|
|
<div class="tulr_top">
|
|
|
- <div class="tulrt_l queryInput">
|
|
|
- <el-input v-model="queryParams.realName" placeholder="请输入姓名查询" @keyup.enter.native="getUserList"></el-input>
|
|
|
- <img src="@/assets/images/agent/query_mini.png">
|
|
|
- </div>
|
|
|
- <div class="tulrt_r">
|
|
|
- <div class="tr_btn" @click="handleDownloadExcel" v-hasPermi="['core:project:downloadExcel']" v-if="programid&&teamid">模板下载</div>
|
|
|
- <el-upload v-if="programid&&teamid"
|
|
|
- :action="uploadUrl"
|
|
|
- :data="{enterpriseId: programid, teamId: teamid}"
|
|
|
- :headers="uploadHeaders"
|
|
|
- :before-upload="handleBeforeUpload"
|
|
|
- :on-success="handleSuccess"
|
|
|
- >
|
|
|
- <div class="tr_btn" v-hasPermi="['sys:user:export']">批量导入</div>
|
|
|
- </el-upload>
|
|
|
- <div class="tr_btn" @click="handleAddUser" v-hasPermi="['sys:user:add']">添加成员</div>
|
|
|
- </div>
|
|
|
+ <div class="tullt_l">项目团队</div>
|
|
|
</div>
|
|
|
- <el-table :data="userList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无人员" max-height="578px" style="margin-top: 16px;">
|
|
|
+ <el-table :data="teamList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无团队" max-height="578px" style="margin-top: 16px;">
|
|
|
<el-table-column label="序号" width="50">
|
|
|
<template #default="scope">
|
|
|
{{ scope.$index + 1 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="姓名" prop="realName"></el-table-column>
|
|
|
- <el-table-column label="性别" prop="gender">
|
|
|
- <template #default="{ row }">{{ genderCfg[row.gender]||'未知' }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="类型" prop="category">
|
|
|
- <template #default="{ row }">{{ UserCategory.find(u=>u.value===row.category)?.label ||'未知' }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="所属部门" prop="dept"></el-table-column>
|
|
|
- <el-table-column label="手机号码" prop="mobile"></el-table-column>
|
|
|
- <el-table-column label="职位" prop="post"></el-table-column>
|
|
|
- <el-table-column label="级别" prop="level"></el-table-column>
|
|
|
- <el-table-column label="分工" prop="divisionOfLabour"></el-table-column>
|
|
|
- <!-- <el-table-column label="上级" prop="realName"></el-table-column> -->
|
|
|
- <el-table-column label="创建时间" prop="createDate" width="200"></el-table-column>
|
|
|
- <el-table-column label="操作" width="150">
|
|
|
+ <el-table-column label="团队类型" prop="teamName"></el-table-column>
|
|
|
+ <el-table-column label="团队人数" prop="teamNum"></el-table-column>
|
|
|
+ <el-table-column label="团队故事" prop="teamStory" width="700" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column label="操作" width="200">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="text" size="mini" @click="handleEdit(scope.row)" v-hasPermi="['sys:user:update']">编辑</el-button>
|
|
|
- <el-button link type="text" size="mini" @click="handleDelete(scope.row)" v-hasPermi="['sys:user:delete']">删除</el-button>
|
|
|
+ <el-button link type="text" size="mini" @click="handleTeamDetail(scope.row)" v-hasPermi="['core:team:info']">编辑</el-button>
|
|
|
+ <el-button link type="text" size="mini" @click="handleUsers(scope.row)">成员管理</el-button>
|
|
|
+ <el-button link type="text" size="mini" @click="handleTeamDelete(scope.row)" v-hasPermi="['core:team:delete']">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-row style="display: flex;justify-content: center;">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="queryParams.page"
|
|
|
- :page-sizes="[5, 10, 20, 50]"
|
|
|
- :page-size="10"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- v-show="total > 0">
|
|
|
- </el-pagination>
|
|
|
- </el-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -122,7 +75,36 @@
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template v-else-if="tidx===2"></template>
|
|
|
+ <template v-else-if="tidx===2">
|
|
|
+ <div class="query adfacjb">
|
|
|
+ <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="programName2" style="width: calc(100% - 448px);" @keyup.enter.native="getProgramList2"></el-input>
|
|
|
+ <el-select v-model="queryParams2.team" placeholder="所有团队" style="width: 200px;"></el-select>
|
|
|
+ <el-select v-model="queryParams2.sort" placeholder="排序方式" style="width: 200px;"></el-select>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <template v-if="companyList2.length">
|
|
|
+ <el-table :data="companyList2" border cell-class-name="vertical-top-cell" v-loading="loading7" empty-text="暂无项目" max-height="578px" style="margin-top: 6px;">
|
|
|
+ <el-table-column label="公司名称" prop="enterpriseName"></el-table-column>
|
|
|
+ <el-table-column label="更新时间" prop="updateDate"></el-table-column>
|
|
|
+ <el-table-column label="公司背景" prop="background" width="400" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column label="项目的阶段及状态" prop="progress" width="400" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column label="操作" width="150">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button link type="text" size="mini" @click="handleEdit7(scope.row)" v-hasPermi="['core:projectprogress:update']">编辑</el-button>
|
|
|
+ <el-button link type="text" size="mini" @click="handleDelete7(scope.row)" v-hasPermi="['core:projectprogress:delete']">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="empty">
|
|
|
+ <img src="@/assets/images/agent/team.png">
|
|
|
+ <p>您还没有任何项目及团队成员信息</p>
|
|
|
+ <div class="e_add" @click="handleAdd" v-hasPermi="['core:project:add']">+ 创建新项目</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template v-else-if="tidx===3"></template>
|
|
|
<el-drawer :title="userTitle" :visible.sync="userShow" append-to-body size="60%" @close="userShow=false">
|
|
|
<el-form ref="userRef" :model="userForm" :rules="userRules" label-width="100px" style="width: 90%;margin: 0 auto;">
|
|
@@ -243,7 +225,7 @@
|
|
|
<el-button @click="cancel3" style="margin-right: 5%;">取 消</el-button>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
- <el-drawer title="项目详情" :visible.sync="programShow" append-to-body size="60%" @close="programShow=false">
|
|
|
+ <el-drawer :title="programTitle" :visible.sync="programShow" append-to-body size="60%" @close="cancel4">
|
|
|
<el-form ref="programRef" :model="programForm" :rules="programRules" label-width="140px" style="width: 90%;margin: 0 auto;">
|
|
|
<el-form-item label="公司名称" prop="enterpriseName">
|
|
|
<el-input v-model="programForm.enterpriseName" placeholder="请输入公司名称" />
|
|
@@ -305,7 +287,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="demo-drawer__footer" style="display: flex;justify-content: end;margin-top: 20px;">
|
|
|
- <el-button :loading="buttonLoading5" type="primary" @click="submitForm5">确 认</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm5">确 认</el-button>
|
|
|
<el-button @click="cancel5" style="margin-right: 5%;">取 消</el-button>
|
|
|
</div>
|
|
|
<div slot="reference">
|
|
@@ -328,7 +310,7 @@
|
|
|
<el-button @click="cancel4" style="margin-right: 5%;">取 消</el-button>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
- <el-drawer title="添加团队" :visible.sync="programTeamShow" append-to-body size="80%" @close="programTeamShow=false">
|
|
|
+ <el-drawer title="添加团队" :visible.sync="programTeamShow" append-to-body size="60%" @close="programTeamShow=false">
|
|
|
<el-form :model="programTeamForm" :rules="programTeamRules" ref="programTeamRef" label-width="130px" style="margin: 0 25px;">
|
|
|
<el-row style="width: 100%;">
|
|
|
<el-col :span="12">
|
|
@@ -362,6 +344,51 @@
|
|
|
<el-button @click="cancel6" style="margin-right: 5%;">取 消</el-button>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
+ <el-drawer :title="xmjzTitle" :visible.sync="xmjzShow" append-to-body size="60%" @close="xmjzClose">
|
|
|
+ <el-form :model="xmjzForm" :rules="xmjzRules" ref="xmjzRef" label-width="130px" style="margin: 0 25px;">
|
|
|
+ <el-row style="width: 100%;">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="公司名称" prop="enterpriseId">
|
|
|
+ <el-select v-model="xmjzForm.enterpriseId" placeholder="请选择" @change="handleChange7" style="width: 100%;">
|
|
|
+ <el-option v-for="item in useAgentStore().companyList" :key="item.id" :label="item.enterpriseName" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="width: 100%;">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="人员规模" prop="">
|
|
|
+ <el-input v-model="xmjzForm.bbb" clearable disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="width: 100%;">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="项目教练" prop="">
|
|
|
+ <el-input v-model="xmjzForm.ccc" clearable disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="width: 100%;">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="公司背景" prop="">
|
|
|
+ <el-input type="textarea" v-model="xmjzForm.background" clearable disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="width: 100%;">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="项目进展" prop="progress">
|
|
|
+ <el-input :rows="3" type="textarea" v-model="xmjzForm.progress" clearable placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div class="demo-drawer__footer" style="display: flex;justify-content: end;">
|
|
|
+ <el-button :loading="buttonLoading7" type="primary" @click="submitForm7" v-hasPermi="['core:projectprogress:save']">保 存</el-button>
|
|
|
+ <el-button @click="cancel7" style="margin-right: 5%;">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -369,6 +396,8 @@
|
|
|
import Cookies from "js-cookie";
|
|
|
import { ref, reactive, getCurrentInstance,onMounted } from 'vue'
|
|
|
import { useRegion } from "@/mixins/region-module";
|
|
|
+ import {useAgentStore} from "@/store_v3/modules/agent";
|
|
|
+ useAgentStore().getCompanyData();
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const { companyIndustry, staffSize, UserCategory} = proxy.useDict("companyIndustry", "staffSize", "UserCategory");
|
|
|
const {
|
|
@@ -394,32 +423,39 @@
|
|
|
deleteCoach,
|
|
|
updateProgramTeam,
|
|
|
getProgramTeamInfo,
|
|
|
- deleteProgramTeam
|
|
|
+ deleteProgramTeam,
|
|
|
+ getTeamListById,
|
|
|
+ addCoachProgram,
|
|
|
+ getProgramProgressList,
|
|
|
+ addProgramProgress,
|
|
|
+ updateProgramProgress,
|
|
|
+ getProgramProgressInfo,
|
|
|
+ deleteProgramProgress,
|
|
|
} from '@/api/agent/index.js'
|
|
|
- const uploadUrl = `${window.SITE_CONFIG["apiURL"]}/sys/user/import`
|
|
|
- const uploadUrl2 = `${window.SITE_CONFIG["apiURL"]}/sys/oss/uploadFile`
|
|
|
- const uploadHeaders = {token:Cookies.get("token")};
|
|
|
-
|
|
|
const tidx = ref(1);
|
|
|
- const teamList = ref([1]);
|
|
|
+ const teamList = ref([]);
|
|
|
const programName = ref('')
|
|
|
+ const programName2 = ref('')
|
|
|
const companyList = ref([]);
|
|
|
+ const companyList2 = ref([]);
|
|
|
const programid = ref('')
|
|
|
const teamid = ref('')
|
|
|
const loading = ref(false);
|
|
|
+ const programTitle = ref('项目详情');
|
|
|
const queryParams = ref({
|
|
|
page:1,
|
|
|
limit:10,
|
|
|
teamId:'',
|
|
|
realName:'',
|
|
|
})
|
|
|
+ const queryParams2 = ref({
|
|
|
+ page:1,
|
|
|
+ limit:10,
|
|
|
+ teamId:'',
|
|
|
+ enterpriseName:'',
|
|
|
+ })
|
|
|
const userList = ref([]);
|
|
|
const total = ref(0);
|
|
|
- const genderCfg = {
|
|
|
- '0': '男',
|
|
|
- '1': '女',
|
|
|
- '2': '保密',
|
|
|
- }
|
|
|
const userTitle = ref('添加成员信息');
|
|
|
const userShow = ref(false);
|
|
|
const userRef = ref(null);
|
|
@@ -522,7 +558,8 @@
|
|
|
city:'',
|
|
|
area:'',
|
|
|
areaCode:'',
|
|
|
- coachList:[]
|
|
|
+ coachList:[],
|
|
|
+ background:''
|
|
|
});
|
|
|
const programRules = ref({
|
|
|
enterpriseName: [
|
|
@@ -539,6 +576,9 @@
|
|
|
],
|
|
|
area: [
|
|
|
{ required: true, message: '请选择所在地区', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ background: [
|
|
|
+ { required: true, message: '请输入企业背景', trigger: 'blur' }
|
|
|
]
|
|
|
});
|
|
|
const programRef = ref(null);
|
|
@@ -583,22 +623,82 @@
|
|
|
const programTeamRef = ref(null);
|
|
|
const programTeamShow = ref(false);
|
|
|
const buttonLoading6 = ref(false);
|
|
|
- const addType = ref(1)
|
|
|
+
|
|
|
+ const xmjzTitle = ref('添加项目进展');
|
|
|
+ const xmjzShow = ref(false);
|
|
|
+ const loading7 = ref(false);
|
|
|
+ const xmjzForm = ref({
|
|
|
+ id:'',
|
|
|
+ enterpriseId:'',
|
|
|
+ bbb:'',
|
|
|
+ ccc:'',
|
|
|
+ background:'',
|
|
|
+ progress:''
|
|
|
+ });
|
|
|
+ const xmjzRules = ref({
|
|
|
+ enterpriseId: [
|
|
|
+ { required: true, message: '请选择公司', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ progress: [
|
|
|
+ { required: true, message: '请输入项目进展', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ const xmjzRef = ref(null);
|
|
|
+ const buttonLoading7 = ref(false);
|
|
|
+
|
|
|
|
|
|
const handleChangeTab = (idx) => {
|
|
|
tidx.value = idx;
|
|
|
+ if(idx===2){
|
|
|
+ getProgramProgressData();
|
|
|
+ }
|
|
|
}
|
|
|
const handleAdd = () => {
|
|
|
- proxy.$router.push('/agentProgramAddTeam');
|
|
|
+ programid.value = '';
|
|
|
+ programTitle.value = '创建项目';
|
|
|
+ programShow.value = true;
|
|
|
+ programForm.value = {
|
|
|
+ id:'',
|
|
|
+ enterpriseName: '',
|
|
|
+ creditCode: '',
|
|
|
+ industryCode: '',
|
|
|
+ staffSizeCode: '',
|
|
|
+ province:'',
|
|
|
+ city:'',
|
|
|
+ area:'',
|
|
|
+ areaCode:'',
|
|
|
+ coachList:[],
|
|
|
+ background:''
|
|
|
+ };
|
|
|
+ proxy.$refs.programRef.resetFields();
|
|
|
+ };
|
|
|
+
|
|
|
+ const handleAddJZ = () => {
|
|
|
+ xmjzTitle.value = '添加项目进展';
|
|
|
+ xmjzShow.value = true;
|
|
|
+ xmjzForm.value = {
|
|
|
+ id:'',
|
|
|
+ enterpriseId:'',
|
|
|
+ bbb:'',
|
|
|
+ ccc:'',
|
|
|
+ background:'',
|
|
|
+ progress:''
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
const handleExpand = (item, index) => {
|
|
|
programid.value = item.id;
|
|
|
programTeamForm.value.companyName = item.enterpriseName;
|
|
|
- item.expand = !item.expand;
|
|
|
companyList.value.forEach(c => { c.select = false; });
|
|
|
item.select = true;
|
|
|
+ getTeamListByCompanyId();
|
|
|
};
|
|
|
+ const getTeamListByCompanyId = ()=> {
|
|
|
+ getTeamListById({enterpriseId: programid.value}).then(res=>{
|
|
|
+ if(res.code!==0) proxy.$message.error(res.msg);
|
|
|
+ teamList.value = res.data;
|
|
|
+ })
|
|
|
+ }
|
|
|
const handleSelect = (team, index) => {
|
|
|
teamid.value = team.teamId;
|
|
|
queryParams.value.teamId = team.teamId;
|
|
@@ -638,20 +738,23 @@
|
|
|
getUserList();
|
|
|
}
|
|
|
|
|
|
- const handleTeamDetail = (team,item) => {
|
|
|
- getProgramTeamInfo(team.teamId).then(res=>{
|
|
|
+ const handleTeamDetail = (team) => {
|
|
|
+ getProgramTeamInfo(team.id).then(res=>{
|
|
|
if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
teamForm.value = {...teamForm.value,...res.data};
|
|
|
- teamForm.value.companyName = item.enterpriseName;
|
|
|
+ teamForm.value.companyName = companyList.value.find(c => c.id === team.enterpriseId)?.enterpriseName;
|
|
|
teamShow.value = true;
|
|
|
})
|
|
|
}
|
|
|
+ const handleUsers = (team) => {
|
|
|
+ proxy.$router.push({path:'/agentTeamUser',query:{teamId: team.id, enterpriseId: team.enterpriseId}});
|
|
|
+ }
|
|
|
const handleTeamDelete = async team => {
|
|
|
await proxy.$modal.confirm('确认删除团队【' + team.teamName + '】吗?').finally(() => buttonLoading3.value = false);
|
|
|
- deleteProgramTeam(team.teamId).then(res=>{
|
|
|
+ deleteProgramTeam(team.id).then(res=>{
|
|
|
if(res.code === 0) proxy?.$modal.msgSuccess("删除成功");
|
|
|
else return proxy?.$modal.msgError(res.msg);
|
|
|
- getProgramList();
|
|
|
+ getTeamListByCompanyId();
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -674,10 +777,12 @@
|
|
|
});
|
|
|
loading.value = false;
|
|
|
userList.value = [];
|
|
|
+ teamList.value = [];
|
|
|
total.value = 0;
|
|
|
queryParams.value.teamId = '';
|
|
|
queryParams.value.page = 1;
|
|
|
queryParams.value.realName = '';
|
|
|
+ programid.value = '';
|
|
|
}
|
|
|
|
|
|
const handleEdit = (row) => {
|
|
@@ -785,7 +890,7 @@
|
|
|
if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
buttonLoading3.value = false;
|
|
|
teamShow.value = false;
|
|
|
- getProgramList();
|
|
|
+ getTeamListByCompanyId();
|
|
|
})
|
|
|
} else {
|
|
|
return false;
|
|
@@ -797,8 +902,9 @@
|
|
|
}
|
|
|
|
|
|
const handleProgramDetail = program => {
|
|
|
+ programTitle.value = "项目详情";
|
|
|
programid.value = program.id;
|
|
|
- getCoachProgramInfo(program.id).then(res => {
|
|
|
+ getCoachProgramInfo(program.id).then(res => {
|
|
|
programForm.value = {...programForm.value,...res.data};
|
|
|
if(programForm.value.coachList===null) programForm.value.coachList = [];
|
|
|
let areas = programForm.value.areaCode.split('-');
|
|
@@ -851,13 +957,25 @@
|
|
|
buttonLoading5.value = true;
|
|
|
programForm.value.id = programid.value;
|
|
|
programForm.value.areaCode = `${programForm.value.province}-${programForm.value.city}-${programForm.value.area}`;
|
|
|
- updateCoachProgram(programForm.value).then((res)=>{
|
|
|
- if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
- else proxy?.$modal.msgSuccess("保存成功");
|
|
|
- buttonLoading5.value = false;
|
|
|
- programShow.value = false;
|
|
|
- getProgramList();
|
|
|
- })
|
|
|
+ let dto = JSON.parse(JSON.stringify(programForm.value));
|
|
|
+ if(dto.coachList.length===0) return proxy.$message.warning('请至少选择一位教练');
|
|
|
+ if(dto.id){
|
|
|
+ updateCoachProgram(programForm.value).then((res)=>{
|
|
|
+ if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
+ else proxy?.$modal.msgSuccess("编辑成功");
|
|
|
+ buttonLoading5.value = false;
|
|
|
+ programShow.value = false;
|
|
|
+ getProgramList();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ addCoachProgram(dto).then((res)=>{
|
|
|
+ if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
+ else proxy?.$modal.msgSuccess("创建成功");
|
|
|
+ buttonLoading5.value = false;
|
|
|
+ programShow.value = false;
|
|
|
+ getProgramList();
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
@@ -865,6 +983,20 @@
|
|
|
}
|
|
|
const cancel4 = () => {
|
|
|
programShow.value = false;
|
|
|
+ programForm.value = {
|
|
|
+ id:'',
|
|
|
+ enterpriseName: '',
|
|
|
+ creditCode: '',
|
|
|
+ industryCode: '',
|
|
|
+ staffSizeCode: '',
|
|
|
+ province:'',
|
|
|
+ city:'',
|
|
|
+ area:'',
|
|
|
+ areaCode:'',
|
|
|
+ coachList:[],
|
|
|
+ background:''
|
|
|
+ }
|
|
|
+ proxy.$refs.programRef.resetFields();
|
|
|
}
|
|
|
const handleCheckAllChange = (val) => {
|
|
|
coachSelecteds.value = val ? JSON.parse(JSON.stringify(coachList.value)) : [];
|
|
@@ -921,9 +1053,8 @@
|
|
|
else proxy?.$modal.msgSuccess("保存成功");
|
|
|
buttonLoading6.value = false;
|
|
|
programTeamShow.value = false;
|
|
|
- getProgramList();
|
|
|
+ getTeamListByCompanyId();
|
|
|
})
|
|
|
-
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
@@ -932,25 +1063,85 @@
|
|
|
const cancel6 = () => {
|
|
|
programTeamShow.value = false;
|
|
|
}
|
|
|
-
|
|
|
- // const handleAddItem = () => {
|
|
|
- // programTeamForm.value.users.push({
|
|
|
- // id:'',
|
|
|
- // realName:'',
|
|
|
- // gender:'',
|
|
|
- // birthdate:'',
|
|
|
- // mobile:'',
|
|
|
- // dept:'',
|
|
|
- // post:'',
|
|
|
- // divisionOfLabour:'',
|
|
|
- // education:'',
|
|
|
- // level:'',
|
|
|
- // })
|
|
|
- // }
|
|
|
|
|
|
- // const handleDeleteItem = (item,index) => {
|
|
|
- // programTeamForm.value.users.splice(index,1)
|
|
|
- // }
|
|
|
+ const getProgramProgressData = async () => {
|
|
|
+ loading.value = true;
|
|
|
+ const res = await getProgramProgressList({enterpriseName:programName2.value});
|
|
|
+ if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
+ else{
|
|
|
+ companyList2.value = res.data;
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const handleEdit7 = (row) => {
|
|
|
+ xmjzTitle.value = '编辑项目进展';
|
|
|
+ getProgramProgressInfo(row.id).then((res)=>{
|
|
|
+ if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
+ else{
|
|
|
+ xmjzForm.value = res.data;
|
|
|
+ getCoachProgramInfo(res.data.enterpriseId).then(res => {
|
|
|
+ xmjzForm.value.bbb = staffSize.value.find(item => item.value === res.data.staffSizeCode).label;
|
|
|
+ xmjzForm.value.ccc = res.data.coachList.map(item => item.coachName);
|
|
|
+ xmjzShow.value = true;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const handleDelete7 = async (row) => {
|
|
|
+ await proxy.$modal.confirm('确认删除吗?');
|
|
|
+ deleteProgramProgress([row.id]).then(res=>{
|
|
|
+ if(res.code === 0) proxy?.$modal.msgSuccess("删除成功");
|
|
|
+ else return proxy?.$modal.msgError(res.msg);
|
|
|
+ getProgramProgressData();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ const handleChange7 = row => {
|
|
|
+ getCoachProgramInfo(row).then(res => {
|
|
|
+ xmjzForm.value.bbb = staffSize.value.find(item => item.value === res.data.staffSizeCode).label;
|
|
|
+ xmjzForm.value.ccc =res.data.coachList.map(item => item.coachName);
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const submitForm7 = () => {
|
|
|
+ proxy.$refs.xmjzRef.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ buttonLoading7.value = true;
|
|
|
+ if(xmjzForm.value.id){
|
|
|
+ updateProgramProgress(xmjzForm.value).then((res)=>{
|
|
|
+ if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
+ buttonLoading7.value = false;
|
|
|
+ xmjzShow.value = false;
|
|
|
+ getProgramProgressData();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ addProgramProgress(xmjzForm.value).then((res)=>{
|
|
|
+ if(res.code!==0) return proxy.$message.error(res.msg);
|
|
|
+ buttonLoading7.value = false;
|
|
|
+ xmjzShow.value = false;
|
|
|
+ getProgramProgressData();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ const cancel7 = () => {
|
|
|
+ xmjzShow.value = false;
|
|
|
+ xmjzForm.value = {
|
|
|
+ id:'',
|
|
|
+ enterpriseId:'',
|
|
|
+ bbb:'',
|
|
|
+ ccc:'',
|
|
|
+ background:'',
|
|
|
+ progress:''
|
|
|
+ }
|
|
|
+ proxy.$refs.xmjzRef.resetFields();
|
|
|
+ }
|
|
|
|
|
|
onMounted(() => {
|
|
|
getProgramList();
|
|
@@ -966,6 +1157,16 @@
|
|
|
width: 200px !important;
|
|
|
}
|
|
|
|
|
|
+ .query{
|
|
|
+ width: 100%;
|
|
|
+ padding: 16px 20px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 6px;
|
|
|
+ border: 1px solid #F3F4F6;
|
|
|
+ margin-top: 11px;
|
|
|
+ }
|
|
|
+
|
|
|
.page{
|
|
|
padding: 28px 16px 12px;
|
|
|
background: #FAFAFA;
|
|
@@ -1009,29 +1210,35 @@
|
|
|
}
|
|
|
}
|
|
|
.t_add{
|
|
|
- width: 114px;
|
|
|
- height: 32px;
|
|
|
+ width: 112px;
|
|
|
+ height: 30px;
|
|
|
background: #761E6A;
|
|
|
border-radius: 6px;
|
|
|
font-family: PingFangSC, PingFang SC;
|
|
|
font-weight: 400;
|
|
|
font-size: 14px;
|
|
|
color: #FFFFFF;
|
|
|
- line-height: 32px;
|
|
|
+ line-height: 26px;
|
|
|
text-align: center;
|
|
|
position: absolute;
|
|
|
top: -10px;
|
|
|
right: 0;
|
|
|
cursor: pointer;
|
|
|
+ border: 1px solid #833478;
|
|
|
+ &.t_add2{
|
|
|
+ background: #FFFFFF;
|
|
|
+ color: #833478;
|
|
|
+ right: 130px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.content{
|
|
|
width: 100%;
|
|
|
- height: calc(100vh - 140px);
|
|
|
+ height: calc(100vh - 220px);
|
|
|
background: #FFFFFF;
|
|
|
border: 1px solid #F3F4F6;
|
|
|
- margin-top: 15px;
|
|
|
+ margin-top: 5px;
|
|
|
|
|
|
.team_user_list{
|
|
|
height: 100%;
|
|
@@ -1086,15 +1293,20 @@
|
|
|
}
|
|
|
}
|
|
|
.tull_list{
|
|
|
+ width: 100%;
|
|
|
height: calc(100% - 100px);
|
|
|
overflow-y: auto;
|
|
|
- margin-top: 24px;
|
|
|
+ margin-top: 20px;
|
|
|
.tull_item{
|
|
|
+ width: 100%;
|
|
|
margin-top: 24px;
|
|
|
cursor: pointer;
|
|
|
- &.active{
|
|
|
+ padding: 12px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 6px;
|
|
|
+ &:hover,&.active{
|
|
|
+ background: rgba(118,30,106,0.06);
|
|
|
.tname span{
|
|
|
- font-weight: bold;
|
|
|
color: #761E6A;
|
|
|
i{
|
|
|
color: #761E6A !important;
|
|
@@ -1126,7 +1338,6 @@
|
|
|
&:hover,&.active{
|
|
|
border-radius: 6px;
|
|
|
span{
|
|
|
- font-weight: bold;
|
|
|
color: #761E6A;
|
|
|
}
|
|
|
i{
|
|
@@ -1157,7 +1368,6 @@
|
|
|
background: #F0F2F8;
|
|
|
border-radius: 6px;
|
|
|
span{
|
|
|
- font-weight: bold;
|
|
|
color: #761E6A;
|
|
|
}
|
|
|
i{
|
|
@@ -1178,45 +1388,12 @@
|
|
|
padding-left: 23px;
|
|
|
box-sizing: border-box;
|
|
|
.tulr_top{
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- .tulrt_l{
|
|
|
- width: 278px;
|
|
|
- height: 34px;
|
|
|
- border-radius: 6px;
|
|
|
- border: 1px solid #E2E7F5;
|
|
|
- padding: 0 16px;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- img{
|
|
|
- width: 16px;
|
|
|
- height: 16px;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- }
|
|
|
- .tulrt_r{
|
|
|
- display: flex;
|
|
|
- .tr_btn{
|
|
|
- width: 92px;
|
|
|
- height: 36px;
|
|
|
- border-radius: 6px;
|
|
|
- border: 1px solid #C1C7D2;
|
|
|
- margin-left: 20px;
|
|
|
- cursor: pointer;
|
|
|
- font-family: PingFangSC, PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 14px;
|
|
|
- color: #111111;
|
|
|
- line-height: 36px;
|
|
|
- text-align: center;
|
|
|
- &:last-child{
|
|
|
- background: #761E6A;
|
|
|
- color: #FFFFFF;
|
|
|
- }
|
|
|
- }
|
|
|
+ .tullt_l{
|
|
|
+ font-family: PingFangSC, PingFang SC;
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #0D162A;
|
|
|
+ line-height: 16px;
|
|
|
}
|
|
|
}
|
|
|
}
|