program.vue 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648
  1. <template>
  2. <div class="page">
  3. <div class="title">{{ title }}</div>
  4. <div class="tabs">
  5. <div class="t_pre" :class="{'active':tidx===1}" @click="handleChangeTab(1)">活动项目</div>
  6. <div class="t_pre" :class="{'active':tidx===2}" @click="handleChangeTab(2)">项目进展</div>
  7. <template v-if="tidx===1">
  8. <div class="t_add t_add2" @click="handleAddTeam" v-hasPermi="['core:project:addTeam']">+ 添加团队</div>
  9. <div class="t_add" @click="handleAdd" v-hasPermi="['core:project:add']">+ 创建项目</div>
  10. </template>
  11. <template v-else-if="tidx===2">
  12. <div class="t_add" @click="handleAddJZ">+ 添加项目进展</div>
  13. </template>
  14. </div>
  15. <template v-if="tidx===1">
  16. <div class="query adfacjb">
  17. <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="programName" style="width: 100%" @keyup.enter.native="getProgramList"></el-input>
  18. </div>
  19. <div class="content">
  20. <template v-if="companyList.length">
  21. <div class="team_user_list">
  22. <div class="tul_left">
  23. <div class="tull_top">
  24. <div class="tullt_l">全部项目</div>
  25. </div>
  26. <div class="tull_list">
  27. <div class="tull_item" :class="{'active':item.select}" v-for="(item,index) in companyList" :key="index" @click="handleExpand(item,index)">
  28. <div class="tname">
  29. <div>
  30. <span>{{ item.enterpriseName }}</span>
  31. </div>
  32. <el-popover placement="right" width="177" trigger="hover">
  33. <div class="tl_czs">
  34. <div class="tlc_pre" @click="handleProgramDetail(item)" v-hasPermi="['core:program:info']">项目详情</div>
  35. <div class="tlc_pre" @click="handleProgramDelete(item)" v-hasPermi="['core:program:delete']">删除项目</div>
  36. </div>
  37. <i slot="reference" class="el-icon-edit" style="font-size: 16px;color: #999;" @click.stop="handleSetTeam(team,idx)"></i>
  38. </el-popover>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="tul_right">
  44. <div class="tulr_top">
  45. <div class="tullt_l">项目团队</div>
  46. </div>
  47. <el-table :data="teamList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无团队" max-height="578px" style="margin-top: 16px;">
  48. <el-table-column label="序号" width="50">
  49. <template #default="scope">
  50. {{ scope.$index + 1 }}
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="团队类型" prop="teamName"></el-table-column>
  54. <el-table-column label="团队人数" prop="teamNum"></el-table-column>
  55. <el-table-column label="团队故事" prop="teamStory" width="700" show-overflow-tooltip></el-table-column>
  56. <el-table-column label="操作" width="200">
  57. <template #default="scope">
  58. <el-button link type="text" size="mini" @click="handleTeamDetail(scope.row)" v-hasPermi="['core:team:info']">编辑</el-button>
  59. <el-button link type="text" size="mini" @click="handleUsers(scope.row)">成员管理</el-button>
  60. <el-button link type="text" size="mini" @click="handleTeamDelete(scope.row)" v-hasPermi="['core:team:delete']">删除</el-button>
  61. </template>
  62. </el-table-column>
  63. </el-table>
  64. </div>
  65. </div>
  66. </template>
  67. <template v-else>
  68. <div class="empty">
  69. <img src="@/assets/images/agent/team.png">
  70. <p>您还没有任何项目及团队成员信息</p>
  71. <div class="e_add" @click="handleAdd" v-hasPermi="['core:project:add']">+ 创建新项目</div>
  72. </div>
  73. </template>
  74. </div>
  75. </template>
  76. <template v-else-if="tidx===2">
  77. <div class="query adfacjb">
  78. <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="programName2" style="width: 100%" @keyup.enter.native="getProgramProgressData"></el-input>
  79. </div>
  80. <div class="content">
  81. <template v-if="companyList2.length">
  82. <el-table :data="companyList2" border cell-class-name="vertical-top-cell" v-loading="loading7" empty-text="暂无项目" max-height="578px" style="margin-top: 6px;">
  83. <el-table-column label="公司名称" prop="enterpriseName"></el-table-column>
  84. <el-table-column label="更新时间" prop="updateDate"></el-table-column>
  85. <el-table-column label="公司背景" prop="background" width="400" show-overflow-tooltip></el-table-column>
  86. <el-table-column label="项目的阶段及状态" prop="progress" width="400" show-overflow-tooltip></el-table-column>
  87. <el-table-column label="操作" width="150">
  88. <template #default="scope">
  89. <el-button link type="text" size="mini" @click="handleEdit7(scope.row)" v-hasPermi="['core:projectprogress:update']">编辑</el-button>
  90. <el-button link type="text" size="mini" @click="handleDelete7(scope.row)" v-hasPermi="['core:projectprogress:delete']">删除</el-button>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. </template>
  95. <template v-else>
  96. <div class="empty">
  97. <img src="@/assets/images/agent/team.png">
  98. <p>您还没有添加过任何项目进展</p>
  99. <div class="e_add" @click="handleAddJZ">+ 添加项目进展</div>
  100. </div>
  101. </template>
  102. </div>
  103. </template>
  104. <template v-else-if="tidx===3"></template>
  105. <el-drawer :title="userTitle" :visible.sync="userShow" append-to-body size="60%" @close="userShow=false">
  106. <el-form ref="userRef" :model="userForm" :rules="userRules" label-width="100px" style="width: 90%;margin: 0 auto;">
  107. <el-row>
  108. <el-col :span="12">
  109. <el-form-item label="姓名" prop="realName">
  110. <el-input v-model="userForm.realName" placeholder="请输入姓名" />
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="12">
  114. <el-form-item label="性别" prop="gender">
  115. <el-select v-model="userForm.gender" placeholder="请选择性别" style="width: 100%;">
  116. <el-option label="男" :value="0"></el-option>
  117. <el-option label="女" :value="1"></el-option>
  118. <el-option label="保密" :value="2"></el-option>
  119. </el-select>
  120. </el-form-item>
  121. </el-col>
  122. </el-row>
  123. <el-row>
  124. <el-col :span="12">
  125. <el-form-item label="类型" prop="category">
  126. <el-select v-model="userForm.category" placeholder="请选择类型" style="width: 100%;">
  127. <el-option v-for="item in UserCategory" :label="item.label" :value="item.value"></el-option>
  128. </el-select>
  129. </el-form-item>
  130. </el-col>
  131. <el-col :span="12">
  132. <el-form-item label="手机号码" prop="mobile">
  133. <el-input type="number" v-model="userForm.mobile" placeholder="请输入手机号码" />
  134. </el-form-item>
  135. </el-col>
  136. </el-row>
  137. <el-row>
  138. <el-col :span="12">
  139. <el-form-item label="所属部门" prop="dept">
  140. <el-input v-model="userForm.dept" placeholder="请输入所属部门" />
  141. </el-form-item>
  142. </el-col>
  143. <el-col :span="12">
  144. <el-form-item label="教育程度" prop="education">
  145. <el-input v-model="userForm.education" placeholder="请输入教育程度" />
  146. </el-form-item>
  147. </el-col>
  148. </el-row>
  149. <el-row>
  150. <el-col :span="12">
  151. <el-form-item label="分工" prop="divisionOfLabour">
  152. <el-input v-model="userForm.divisionOfLabour" placeholder="请输入分工" />
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="12">
  156. <el-form-item label="职位" prop="post">
  157. <el-input v-model="userForm.post" placeholder="请输入职位" />
  158. </el-form-item>
  159. </el-col>
  160. </el-row>
  161. <el-row>
  162. <el-col :span="12">
  163. <el-form-item label="级别" prop="level">
  164. <el-input v-model="userForm.level" placeholder="请输入级别" />
  165. </el-form-item>
  166. </el-col>
  167. </el-row>
  168. <el-row>
  169. <el-col :span="24">
  170. <el-form-item label="人物简介" prop="introduction">
  171. <el-input type="textarea" :rows="2" v-model="userForm.introduction" placeholder="请输入人物简介" />
  172. </el-form-item>
  173. </el-col>
  174. </el-row>
  175. <el-row>
  176. <el-col :span="24">
  177. <el-form-item label="人物故事" prop="userStory">
  178. <el-input type="textarea" :rows="2" v-model="userForm.userStory" placeholder="请输入人物故事" />
  179. </el-form-item>
  180. </el-col>
  181. </el-row>
  182. </el-form>
  183. <div class="demo-drawer__footer" style="display: flex;justify-content: end;">
  184. <el-button :loading="buttonLoading2" type="primary" @click="submitForm2" v-hasPermi="['sys:user:save']">保 存</el-button>
  185. <el-button @click="cancel2" style="margin-right: 5%;">取 消</el-button>
  186. </div>
  187. </el-drawer>
  188. <el-drawer title="团队详情" :visible.sync="teamShow" append-to-body size="60%" @close="teamShow=false">
  189. <el-form ref="teamRef" :model="teamForm" :rules="teamRules" label-width="120px" style="width: 90%;margin: 0 auto;">
  190. <el-row>
  191. <el-col :span="24">
  192. <el-form-item label="所属公司名称" prop="companyName">
  193. <el-input v-model="teamForm.companyName" placeholder="请输入所属公司名称" disabled/>
  194. </el-form-item>
  195. </el-col>
  196. </el-row>
  197. <el-row>
  198. <el-col :span="24">
  199. <el-form-item label="团队类型" prop="teamName">
  200. <el-input v-model="teamForm.teamName" placeholder="请输入团队类型" />
  201. </el-form-item>
  202. </el-col>
  203. </el-row>
  204. <el-row>
  205. <el-col :span="24">
  206. <el-form-item label="团队故事" prop="teamStory">
  207. <el-input type="textarea" v-model="teamForm.teamStory" placeholder="请输入团队故事" />
  208. </el-form-item>
  209. </el-col>
  210. </el-row>
  211. <el-row>
  212. <el-col :span="24">
  213. <el-form-item label="项目阶段及状态" prop="projectSituation">
  214. <el-input type="textarea" v-model="teamForm.projectSituation" placeholder="请输入项目阶段及状态" />
  215. </el-form-item>
  216. </el-col>
  217. </el-row>
  218. </el-form>
  219. <div class="demo-drawer__footer" style="display: flex;justify-content: end;">
  220. <el-button :loading="buttonLoading3" type="primary" @click="submitForm3" v-hasPermi="['core:team:save']">保 存</el-button>
  221. <el-button @click="cancel3" style="margin-right: 5%;">取 消</el-button>
  222. </div>
  223. </el-drawer>
  224. <el-drawer :title="programTitle" :visible.sync="programShow" append-to-body size="60%" @close="cancel4">
  225. <el-form ref="programRef" :model="programForm" :rules="programRules" label-width="140px" style="width: 90%;margin: 0 auto;">
  226. <el-form-item label="公司名称" prop="enterpriseName">
  227. <el-input v-model="programForm.enterpriseName" placeholder="请输入公司名称" />
  228. </el-form-item>
  229. <el-form-item label="统一社会信用代码" prop="creditCode">
  230. <el-input v-model="programForm.creditCode" placeholder="请输入统一社会信用代码" />
  231. </el-form-item>
  232. <el-form-item label="所在地区" prop="area">
  233. <el-select v-model="programForm.province" :placeholder="disabled ? '' : '省'" clearable style="width: 32%"
  234. @change="(val) => { regionChange(val, 'province'); }">
  235. <el-option v-for="item in provinceOptions" :key="item.id" :label="item.name" :value="item.id">
  236. </el-option>
  237. </el-select>
  238. <el-select v-model="programForm.city" :placeholder="disabled ? '' : '市'" clearable style="width: 32%;margin: 0 2%"
  239. @change="(val) => { regionChange(val, 'city'); }">
  240. <el-option v-for="item in cityOptions" :key="item.id" :label="item.name" :value="item.id">
  241. </el-option>
  242. </el-select>
  243. <el-select v-model="programForm.area" :placeholder="disabled ? '' : '区'" clearable style="width: 32%;"
  244. @change="(val) => { regionChange(val, 'area'); }">
  245. <el-option v-for="item in areaOptions" :key="item.id" :label="item.name" :value="item.id">
  246. </el-option>
  247. </el-select>
  248. </el-form-item>
  249. <el-form-item label="所在行业" prop="industryCode">
  250. <el-select v-model="programForm.industryCode" placeholder="请选择所在行业" style="width: 100%;">
  251. <el-option v-for="item in companyIndustry" :label="item.label" :value="item.value"></el-option>
  252. </el-select>
  253. </el-form-item>
  254. <el-form-item label="人员规模" prop="staffSizeCode">
  255. <el-select v-model="programForm.staffSizeCode" placeholder="请选择人员规模" style="width: 100%;">
  256. <el-option v-for="item in staffSize" :label="item.label" :value="item.value"></el-option>
  257. </el-select>
  258. </el-form-item>
  259. <el-form-item label="项目教练" prop="">
  260. <el-popover
  261. placement="top-start"
  262. title="选择教练"
  263. width="790"
  264. trigger="click"
  265. v-model="coachShow"
  266. @show="hangleSelectCoach">
  267. <div class="ed_coach adf">
  268. <div class="ec_l">
  269. <el-input placeholder="请输入教练名搜索" suffix-icon="el-icon-search" v-model="coachName" style="width: 100%;" @keyup.enter.native="handleQueryCoach"></el-input>
  270. <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange" style="margin-top: 65px;">全选</el-checkbox>
  271. <div class="ecl_cbs">
  272. <el-checkbox v-model="coach.checked" v-for="(coach,index) in coachList" :key="coach.id" @change="handleChangeCoach" style="margin-top: 24px;display: block;">{{ coach.realName }}</el-checkbox>
  273. </div>
  274. </div>
  275. <div class="ec_r">
  276. <div class="ecr_text">已选择({{ coachSelecteds.length }}/<span>{{ coachList.length }}</span>)</div>
  277. <div class="ecr_names">
  278. <div class="en_pre adfacjc" v-for="(item,index) in coachSelecteds" :key="index">
  279. <span>{{ item.realName }}</span>
  280. <img src="@/assets/images/agent/delete_mini.png" @click="handleDeleteCoach(item,index)">
  281. </div>
  282. </div>
  283. </div>
  284. </div>
  285. <div class="demo-drawer__footer" style="display: flex;justify-content: end;margin-top: 20px;">
  286. <el-button type="primary" @click="submitForm5">确 认</el-button>
  287. <el-button @click="cancel5" style="margin-right: 5%;">取 消</el-button>
  288. </div>
  289. <div slot="reference">
  290. <div class="f_s adfacjb" v-if="programForm.coachList.length===0">
  291. <div class="fs_text" :class="{'active':coachs!=='请选择'}">{{ coachs }}</div>
  292. <i class="el-icon-arrow-down" style="color: #C0C4CC;"></i>
  293. </div>
  294. <div class="f_s adfacjb" v-else>
  295. <p>{{ cocahNames }}</p>
  296. <i class="el-icon-arrow-down" style="color: #C0C4CC;"></i>
  297. </div>
  298. </div>
  299. </el-popover>
  300. </el-form-item>
  301. <el-form-item label="公司背景" prop="background">
  302. <el-input type="textarea" :rows="2" v-model="programForm.background" placeholder="请输入公司背景" />
  303. </el-form-item>
  304. </el-form>
  305. <div class="demo-drawer__footer" style="display: flex;justify-content: end;">
  306. <el-button :loading="buttonLoading4" type="primary" @click="submitForm4" v-hasPermi="['core:project:save']">保 存</el-button>
  307. <el-button @click="cancel4" style="margin-right: 5%;">取 消</el-button>
  308. </div>
  309. </el-drawer>
  310. <el-drawer title="添加团队" :visible.sync="programTeamShow" append-to-body size="60%" @close="programTeamShow=false">
  311. <el-form :model="programTeamForm" :rules="programTeamRules" ref="programTeamRef" label-width="130px" style="margin: 0 25px;">
  312. <el-row style="width: 100%;">
  313. <el-col :span="12">
  314. <el-form-item label="所属公司名称" prop="companyName">
  315. <el-input v-model="programTeamForm.companyName" clearable placeholder="请输入所属公司名称" disabled></el-input>
  316. </el-form-item>
  317. </el-col>
  318. <el-col :span="12">
  319. <el-form-item label="团队类型" prop="teamName">
  320. <el-input v-model="programTeamForm.teamName" clearable placeholder="请输入团队类型"></el-input>
  321. </el-form-item>
  322. </el-col>
  323. </el-row>
  324. <el-row style="width: 100%;">
  325. <el-col :span="24">
  326. <el-form-item label="团队故事" prop="teamStory">
  327. <el-input type="textarea" v-model="programTeamForm.teamStory" clearable placeholder="请输入团队故事"></el-input>
  328. </el-form-item>
  329. </el-col>
  330. </el-row>
  331. <el-row style="width: 100%;">
  332. <el-col :span="24">
  333. <el-form-item label="项目阶段及状态" prop="projectSituation">
  334. <el-input type="textarea" v-model="programTeamForm.projectSituation" clearable placeholder="请输入项目阶段及状态"></el-input>
  335. </el-form-item>
  336. </el-col>
  337. </el-row>
  338. </el-form>
  339. <div class="demo-drawer__footer" style="display: flex;justify-content: end;">
  340. <el-button :loading="buttonLoading6" type="primary" @click="submitForm6" v-hasPermi="['core:team:save']">保 存</el-button>
  341. <el-button @click="cancel6" style="margin-right: 5%;">取 消</el-button>
  342. </div>
  343. </el-drawer>
  344. <el-drawer :title="xmjzTitle" :visible.sync="xmjzShow" append-to-body size="60%" @close="xmjzClose">
  345. <el-form :model="xmjzForm" :rules="xmjzRules" ref="xmjzRef" label-width="130px" style="margin: 0 25px;">
  346. <el-row style="width: 100%;">
  347. <el-col :span="24">
  348. <el-form-item label="公司名称" prop="enterpriseId">
  349. <el-select v-model="xmjzForm.enterpriseId" placeholder="请选择" @change="handleChange7" style="width: 100%;">
  350. <el-option v-for="item in useAgentStore().companyList" :key="item.id" :label="item.enterpriseName" :value="item.id"></el-option>
  351. </el-select>
  352. </el-form-item>
  353. </el-col>
  354. </el-row>
  355. <el-row style="width: 100%;">
  356. <el-col :span="24">
  357. <el-form-item label="人员规模" prop="">
  358. <el-input v-model="xmjzForm.bbb" clearable disabled></el-input>
  359. </el-form-item>
  360. </el-col>
  361. </el-row>
  362. <el-row style="width: 100%;">
  363. <el-col :span="24">
  364. <el-form-item label="项目教练" prop="">
  365. <el-input v-model="xmjzForm.ccc" clearable disabled></el-input>
  366. </el-form-item>
  367. </el-col>
  368. </el-row>
  369. <el-row style="width: 100%;">
  370. <el-col :span="24">
  371. <el-form-item label="公司背景" prop="">
  372. <el-input type="textarea" v-model="xmjzForm.background" clearable disabled></el-input>
  373. </el-form-item>
  374. </el-col>
  375. </el-row>
  376. <el-row style="width: 100%;">
  377. <el-col :span="24">
  378. <el-form-item label="项目进展" prop="progress">
  379. <el-input :rows="3" type="textarea" v-model="xmjzForm.progress" clearable placeholder="请输入"></el-input>
  380. </el-form-item>
  381. </el-col>
  382. </el-row>
  383. </el-form>
  384. <div class="demo-drawer__footer" style="display: flex;justify-content: end;">
  385. <el-button :loading="buttonLoading7" type="primary" @click="submitForm7" v-hasPermi="['core:projectprogress:save']">保 存</el-button>
  386. <el-button @click="cancel7" style="margin-right: 5%;">取 消</el-button>
  387. </div>
  388. </el-drawer>
  389. </div>
  390. </template>
  391. <script setup name="">
  392. import Cookies from "js-cookie";
  393. import { ref, reactive, getCurrentInstance,onMounted } from 'vue'
  394. import { useRegion } from "@/mixins/region-module";
  395. import {useAgentStore} from "@/store_v3/modules/agent";
  396. useAgentStore().getCompanyData();
  397. const { proxy } = getCurrentInstance();
  398. const { companyIndustry, staffSize, UserCategory} = proxy.useDict("companyIndustry", "staffSize", "UserCategory");
  399. const {
  400. provinceOptions,
  401. cityOptions,
  402. areaOptions,
  403. provincAreaDetailInfoList,
  404. cityAreaDetailInfoList,
  405. countyAreaDetailInfoList,
  406. regionChange
  407. } = useRegion();
  408. provincAreaDetailInfoList();
  409. import {
  410. getCoachProgramList,
  411. getCoachProgramInfo,
  412. addProgramTeam,
  413. updateCoachProgram,
  414. deleteCoachProgram,
  415. getCoachList,
  416. addCoach,
  417. updateCoach,
  418. getCoachInfo,
  419. deleteCoach,
  420. updateProgramTeam,
  421. getProgramTeamInfo,
  422. deleteProgramTeam,
  423. getTeamListById,
  424. addCoachProgram,
  425. getProgramProgressList,
  426. addProgramProgress,
  427. updateProgramProgress,
  428. getProgramProgressInfo,
  429. deleteProgramProgress,
  430. } from '@/api/agent/index.js'
  431. const tidx = ref(1);
  432. const teamList = ref([]);
  433. const programName = ref('')
  434. const programName2 = ref('')
  435. const companyList = ref([]);
  436. const companyList2 = ref([]);
  437. const programid = ref('')
  438. const teamid = ref('')
  439. const loading = ref(false);
  440. const programTitle = ref('项目详情');
  441. const queryParams = ref({
  442. page:1,
  443. limit:10,
  444. teamId:'',
  445. realName:'',
  446. })
  447. const queryParams2 = ref({
  448. page:1,
  449. limit:10,
  450. teamId:'',
  451. enterpriseName:'',
  452. })
  453. const userList = ref([]);
  454. const total = ref(0);
  455. const userTitle = ref('添加成员信息');
  456. const userShow = ref(false);
  457. const userRef = ref(null);
  458. const userForm = ref({
  459. id:'',
  460. enterpriseId:'',
  461. teamId:'',
  462. realName:'',
  463. username:'',
  464. gender:'',
  465. birthdate:'',
  466. mobile:'',
  467. dept:'',
  468. education:'',
  469. divisionOfLabour:'',
  470. post:'',
  471. level:'',
  472. userType:2,
  473. category:'',
  474. introduction:'',
  475. userStory:''
  476. });
  477. const userRules = ref({
  478. realName: [
  479. { required: true, message: '请输入姓名', trigger: 'blur' }
  480. ],
  481. gender: [
  482. { required: true, message: '请选择性别', trigger: 'change' }
  483. ],
  484. birthdate: [
  485. { required: true, message: '请选择出生日期', trigger: 'change' }
  486. ],
  487. mobile: [
  488. { required: true, message: '请输入手机号码', trigger: 'blur' },
  489. { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' }
  490. ],
  491. dept: [
  492. { required: true, message: '请输入所属部门', trigger: 'blur' }
  493. ],
  494. education: [
  495. { required: true, message: '请输入教育程度', trigger: 'blur' }
  496. ],
  497. divisionOfLabour: [
  498. { required: true, message: '请输入分工', trigger: 'blur' }
  499. ],
  500. post: [
  501. { required: true, message: '请输入职位', trigger: 'blur' }
  502. ],
  503. level:[
  504. { required: true, message: '请输入级别', trigger: 'blur' }
  505. ],
  506. category:[
  507. { required: true, message: '请选择成员类型', trigger: 'change' }
  508. ],
  509. introduction:[
  510. { required: true, message: '请输入成员简介', trigger: 'blur' }
  511. ],
  512. userStory:[
  513. { required: true, message: '请输入成员故事', trigger: 'blur' }
  514. ]
  515. });
  516. const buttonLoading2 = ref(false);
  517. const teamRef = ref(null);
  518. const teamShow = ref(false);
  519. const teamForm = ref({
  520. id:'',
  521. enterpriseId:'',
  522. companyName:'',
  523. teamName:'',
  524. teamStory:'',
  525. workTasks:'',
  526. projectSituation:'',
  527. background:''
  528. });
  529. const teamRules = ref({
  530. teamName: [
  531. { required: true, message: '请输入所属公司名称', trigger: 'blur' }
  532. ],
  533. teamStory: [
  534. { required: true, message: '请输入团队故事', trigger: 'blur' }
  535. ],
  536. workTasks: [
  537. { required: true, message: '请输入工作任务', trigger: 'blur' }
  538. ],
  539. projectSituation: [
  540. { required: true, message: '请输入项目阶段及状态', trigger: 'blur' }
  541. ],
  542. background:[
  543. { required: true, message: '请输入团队背景', trigger: 'blur' }
  544. ]
  545. });
  546. const buttonLoading3 = ref(false);
  547. const programForm = ref({
  548. id:'',
  549. enterpriseName: '',
  550. creditCode: '',
  551. industryCode: '',
  552. staffSizeCode: '',
  553. province:'',
  554. city:'',
  555. area:'',
  556. areaCode:'',
  557. coachList:[],
  558. background:''
  559. });
  560. const programRules = ref({
  561. enterpriseName: [
  562. { required: true, message: '请输入公司名称', trigger: 'blur' }
  563. ],
  564. creditCode: [
  565. { required: true, message: '请输入统一社会信用代码', trigger: 'blur' }
  566. ],
  567. industryCode: [
  568. { required: true, message: '请选择所在行业', trigger: 'change' }
  569. ],
  570. staffSizeCode: [
  571. { required: true, message: '请选择人员规模', trigger: 'change' }
  572. ],
  573. area: [
  574. { required: true, message: '请选择所在地区', trigger: 'change' }
  575. ],
  576. background: [
  577. { required: true, message: '请输入企业背景', trigger: 'blur' }
  578. ]
  579. });
  580. const programRef = ref(null);
  581. const programShow = ref(false);
  582. const coachs = ref('请选择')
  583. const coachName = ref('')
  584. const coachShow = ref(false)
  585. const coachSelecteds = ref([])
  586. const coachList = ref([])
  587. const isIndeterminate = ref(false)
  588. const checkAll = ref(false)
  589. const cocahNames = ref('')
  590. const buttonLoading4 = ref(false);
  591. const buttonLoading5 = ref(false);
  592. const title = proxy.$route.meta.title;
  593. const programTeamForm = ref({
  594. id:'',
  595. enterpriseId:'',
  596. companyName:'',
  597. teamName:'',
  598. workTasks:'',
  599. teamStory:'',
  600. projectSituation:'',
  601. file:'',
  602. users:[]
  603. });
  604. const programTeamRules = ref({
  605. companyName: [
  606. { required: true, message: '请输入所属公司名称', trigger: 'blur' }
  607. ],
  608. teamName: [
  609. { required: true, message: '请输入团队类型', trigger: 'blur' }
  610. ],
  611. teamStory: [
  612. { required: true, message: '请输入团队故事', trigger: 'blur' }
  613. ],
  614. projectSituation: [
  615. { required: true, message: '请输入项目阶段及状态', trigger: 'blur' }
  616. ]
  617. });
  618. const programTeamRef = ref(null);
  619. const programTeamShow = ref(false);
  620. const buttonLoading6 = ref(false);
  621. const xmjzTitle = ref('添加项目进展');
  622. const xmjzShow = ref(false);
  623. const loading7 = ref(false);
  624. const xmjzForm = ref({
  625. id:'',
  626. enterpriseId:'',
  627. bbb:'',
  628. ccc:'',
  629. background:'',
  630. progress:''
  631. });
  632. const xmjzRules = ref({
  633. enterpriseId: [
  634. { required: true, message: '请选择公司', trigger: 'change' }
  635. ],
  636. progress: [
  637. { required: true, message: '请输入项目进展', trigger: 'blur' }
  638. ]
  639. });
  640. const xmjzRef = ref(null);
  641. const buttonLoading7 = ref(false);
  642. const handleChangeTab = (idx) => {
  643. tidx.value = idx;
  644. if(idx===2){
  645. getProgramProgressData();
  646. }
  647. }
  648. const handleAdd = () => {
  649. programid.value = '';
  650. programTitle.value = '创建项目';
  651. programShow.value = true;
  652. programForm.value = {
  653. id:'',
  654. enterpriseName: '',
  655. creditCode: '',
  656. industryCode: '',
  657. staffSizeCode: '',
  658. province:'',
  659. city:'',
  660. area:'',
  661. areaCode:'',
  662. coachList:[],
  663. background:''
  664. };
  665. proxy.$refs.programRef.resetFields();
  666. };
  667. const handleAddJZ = () => {
  668. xmjzTitle.value = '添加项目进展';
  669. xmjzShow.value = true;
  670. xmjzForm.value = {
  671. id:'',
  672. enterpriseId:'',
  673. bbb:'',
  674. ccc:'',
  675. background:'',
  676. progress:''
  677. };
  678. };
  679. const handleExpand = (item, index) => {
  680. programid.value = item.id;
  681. programTeamForm.value.companyName = item.enterpriseName;
  682. companyList.value.forEach(c => { c.select = false; });
  683. item.select = true;
  684. getTeamListByCompanyId();
  685. };
  686. const getTeamListByCompanyId = ()=> {
  687. getTeamListById({enterpriseId: programid.value}).then(res=>{
  688. if(res.code!==0) proxy.$message.error(res.msg);
  689. teamList.value = res.data;
  690. })
  691. }
  692. const handleSelect = (team, index) => {
  693. teamid.value = team.teamId;
  694. queryParams.value.teamId = team.teamId;
  695. companyList.value.forEach(item => {
  696. if(item.teams){
  697. item.teams.forEach(t => t.select = false);
  698. }
  699. });
  700. team.select = true;
  701. getUserList();
  702. };
  703. const handleSetTeam = (team, index) => {
  704. };
  705. const handleAddTeam = () => {
  706. if(!programid.value) return proxy.$message.error('请先选择项目')
  707. programTeamShow.value = true;
  708. };
  709. const getUserList = async () => {
  710. let query = {...queryParams.value};
  711. loading.value = true;
  712. const res = await getCoachList(query);
  713. userList.value = res.data.list;
  714. total.value = res.data.total;
  715. loading.value = false;
  716. }
  717. const handleSizeChange = (e)=>{
  718. queryParams.value.limit = e;
  719. getUserList();
  720. }
  721. const handleCurrentChange = (e)=>{
  722. queryParams.value.page = e;
  723. getUserList();
  724. }
  725. const handleTeamDetail = (team) => {
  726. getProgramTeamInfo(team.id).then(res=>{
  727. if(res.code!==0) return proxy.$message.error(res.msg);
  728. teamForm.value = {...teamForm.value,...res.data};
  729. teamForm.value.companyName = companyList.value.find(c => c.id === team.enterpriseId)?.enterpriseName;
  730. teamShow.value = true;
  731. })
  732. }
  733. const handleUsers = (team) => {
  734. proxy.$router.push({path:'/agentTeamUser',query:{teamId: team.id, enterpriseId: team.enterpriseId}});
  735. }
  736. const handleTeamDelete = async team => {
  737. await proxy.$modal.confirm('确认删除团队【' + team.teamName + '】吗?').finally(() => buttonLoading3.value = false);
  738. deleteProgramTeam(team.id).then(res=>{
  739. if(res.code === 0) proxy?.$modal.msgSuccess("删除成功");
  740. else return proxy?.$modal.msgError(res.msg);
  741. getTeamListByCompanyId();
  742. });
  743. }
  744. const getProgramList = async () => {
  745. loading.value = true;
  746. const res = await getCoachProgramList({enterpriseName:programName.value});
  747. if(res.code!==0) return proxy.$message.error(res.msg);
  748. companyList.value = res.data.map((d,i)=>{
  749. return {
  750. ...d,
  751. expand: false,
  752. select: false,
  753. teams: res.data[i].teams.map(t => {
  754. return {
  755. ...t,
  756. select: false
  757. }
  758. })
  759. }
  760. });
  761. loading.value = false;
  762. userList.value = [];
  763. teamList.value = [];
  764. total.value = 0;
  765. queryParams.value.teamId = '';
  766. queryParams.value.page = 1;
  767. queryParams.value.realName = '';
  768. programid.value = '';
  769. }
  770. const handleEdit = (row) => {
  771. reset();
  772. getCoachInfo(row.id).then(response => {
  773. userForm.value = {...userForm.value,...response.data};
  774. userTitle.value = "编辑成员详情";
  775. userShow.value = true;
  776. });
  777. }
  778. async function handleDelete(row) {
  779. await proxy?.$modal.confirm('确认删除成员【' + row.realName + '】吗?').finally(() => loading.value = false);
  780. let res = await deleteCoach([row.id]);
  781. if (res.code === 0) proxy?.$modal.msgSuccess("删除成功");
  782. else return proxy?.$modal.msgError(res.msg);
  783. await getUserList();
  784. }
  785. const reset = () => {
  786. userForm.value = {
  787. id:'',
  788. enterpriseId:'',
  789. teamId:'',
  790. realName:'',
  791. username:'',
  792. gender:'',
  793. birthdate:'',
  794. mobile:'',
  795. dept:'',
  796. education:'',
  797. divisionOfLabour:'',
  798. post:'',
  799. level:'',
  800. userType:2,
  801. category:'',
  802. introduction:'',
  803. userStory:''
  804. };
  805. proxy.resetForm("userRef");
  806. }
  807. const handleChangeDate = (e) => {
  808. userForm.value.birthdate = proxy.parseTime(new Date(e), '{yy}-{mm}-{dd}');
  809. }
  810. const submitForm2 = () => {
  811. proxy.$refs.userRef.validate((valid) => {
  812. if (valid) {
  813. buttonLoading2.value = true;
  814. userForm.value.username = userForm.value.mobile;
  815. userForm.value.enterpriseId = programid.value;
  816. userForm.value.teamId = teamid.value;
  817. if(userForm.value.id){
  818. updateCoach(userForm.value).then((res)=>{
  819. if(res.code!==0) return proxy.$message.error(res.msg);
  820. buttonLoading2.value = false;
  821. userShow.value = false;
  822. getUserList();
  823. })
  824. }else{
  825. addCoach(userForm.value).then((res)=>{
  826. if(res.code!==0) return proxy.$message.error(res.msg);
  827. buttonLoading2.value = false;
  828. userShow.value = false;
  829. getUserList();
  830. })
  831. }
  832. } else {
  833. return false;
  834. }
  835. });
  836. }
  837. const cancel2 = () => {
  838. userShow.value = false;
  839. reset();
  840. }
  841. const handleDownloadExcel = () => {
  842. window.location.href = `${window.SITE_CONFIG["apiURL"]}/sys/user/download?token=${Cookies.get("token")}`;
  843. }
  844. const uploadFileSuccess = e =>{
  845. programTeamForm.value.file = e.data;
  846. proxy?.$modal.msgSuccess('上传成功');
  847. }
  848. const beforeAvatarUpload = (e) => {
  849. let type = e.name.split('.')[e.name.split('.').length-1];
  850. let isExcel = e.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
  851. if(type.toLowerCase() !== 'xlsx' && type.toLowerCase() !== 'xls' && !isExcel){
  852. proxy?.$modal.msgError('请上传xlsx或xls格式的Excel文件!');
  853. return false;
  854. }
  855. }
  856. const handleAddUser = () => {
  857. if(!teamid.value) return proxy.$message.error('请先选择团队');
  858. reset();
  859. userTitle.value = "新增成员详情";
  860. userShow.value = true;
  861. }
  862. const submitForm3 = () => {
  863. proxy.$refs.teamRef.validate((valid) => {
  864. if (valid) {
  865. buttonLoading3.value = true;
  866. teamForm.value.enterpriseId = programid.value;
  867. updateProgramTeam(teamForm.value).then((res)=>{
  868. if(res.code!==0) return proxy.$message.error(res.msg);
  869. buttonLoading3.value = false;
  870. teamShow.value = false;
  871. getTeamListByCompanyId();
  872. })
  873. } else {
  874. return false;
  875. }
  876. });
  877. }
  878. const cancel3 = () => {
  879. teamShow.value = false;
  880. }
  881. const handleProgramDetail = program => {
  882. programTitle.value = "项目详情";
  883. programid.value = program.id;
  884. getCoachProgramInfo(program.id).then(res => {
  885. programForm.value = {...programForm.value,...res.data};
  886. if(programForm.value.coachList===null) programForm.value.coachList = [];
  887. let areas = programForm.value.areaCode.split('-');
  888. if(areas.length === 3){
  889. programForm.value.province = areas[0];
  890. cityAreaDetailInfoList(areas[0]);
  891. programForm.value.city = areas[1];
  892. countyAreaDetailInfoList(areas[1]);
  893. programForm.value.area = areas[2];
  894. }
  895. cocahNames.value = programForm.value.coachList.map(item => item.coachName).join(';');
  896. programShow.value = true;
  897. })
  898. }
  899. const handleProgramDelete = async program => {
  900. await proxy.$modal.confirm('确认删除项目【' + program.enterpriseName + '】吗?');
  901. deleteCoachProgram(program.id).then(res=>{
  902. if(res.code === 0) proxy?.$modal.msgSuccess("删除成功");
  903. else return proxy?.$modal.msgError(res.msg);
  904. getProgramList();
  905. });
  906. }
  907. const hangleSelectCoach = () => {
  908. getCoachList({page:1,limit:-1,realName:coachName.value}).then(res => {
  909. if(res.code!==0) return proxy.$message.error(res.msg);
  910. coachList.value = res.data.list.filter(d=>d.userType=='1');
  911. coachList.value.forEach(item => {
  912. item.checked = false;
  913. })
  914. coachShow.value = true;
  915. })
  916. }
  917. const submitForm5 = () => {
  918. if(coachSelecteds.value.length===0) return proxy.$message.warning('请至少选择一位教练')
  919. programForm.value.coachList = JSON.parse(JSON.stringify(coachSelecteds.value)).map(c=>{return {coachId:c.id,coachName:c.realName}});
  920. cocahNames.value = programForm.value.coachList.map(c=>c.coachName).join(';');
  921. checkAll.value = false;
  922. isIndeterminate.value = false;
  923. coachSelecteds.value = [];
  924. coachList.value = [];
  925. coachShow.value = false;
  926. }
  927. const cancel5 = () => {
  928. coachShow.value = false;
  929. }
  930. const submitForm4 = () => {
  931. proxy.$refs.programRef.validate((valid) => {
  932. if (valid) {
  933. buttonLoading5.value = true;
  934. programForm.value.id = programid.value;
  935. programForm.value.areaCode = `${programForm.value.province}-${programForm.value.city}-${programForm.value.area}`;
  936. let dto = JSON.parse(JSON.stringify(programForm.value));
  937. if(dto.coachList.length===0) return proxy.$message.warning('请至少选择一位教练');
  938. if(dto.id){
  939. updateCoachProgram(programForm.value).then((res)=>{
  940. if(res.code!==0) return proxy.$message.error(res.msg);
  941. else proxy?.$modal.msgSuccess("编辑成功");
  942. buttonLoading5.value = false;
  943. programShow.value = false;
  944. getProgramList();
  945. })
  946. }else{
  947. addCoachProgram(dto).then((res)=>{
  948. if(res.code!==0) return proxy.$message.error(res.msg);
  949. else proxy?.$modal.msgSuccess("创建成功");
  950. buttonLoading5.value = false;
  951. programShow.value = false;
  952. getProgramList();
  953. })
  954. }
  955. } else {
  956. return false;
  957. }
  958. });
  959. }
  960. const cancel4 = () => {
  961. programShow.value = false;
  962. programForm.value = {
  963. id:'',
  964. enterpriseName: '',
  965. creditCode: '',
  966. industryCode: '',
  967. staffSizeCode: '',
  968. province:'',
  969. city:'',
  970. area:'',
  971. areaCode:'',
  972. coachList:[],
  973. background:''
  974. }
  975. proxy.$refs.programRef.resetFields();
  976. }
  977. const handleCheckAllChange = (val) => {
  978. coachSelecteds.value = val ? JSON.parse(JSON.stringify(coachList.value)) : [];
  979. isIndeterminate.value = false;
  980. coachList.value.forEach(item => item.checked = val)
  981. }
  982. const handleChangeCoach = () => {
  983. let trues = coachList.value.filter(item => item.checked).length;
  984. if(trues>0&&trues<coachList.value.length) isIndeterminate.value = true;
  985. else isIndeterminate.value = false;
  986. if(trues===coachList.value.length) checkAll.value = true;
  987. else checkAll.value = false;
  988. coachSelecteds.value = coachList.value.filter(item => item.checked);
  989. }
  990. const handleDeleteCoach = (item,index) => {
  991. let i = coachList.value.findIndex(c => c.id === item.id);
  992. if(i>-1) coachList.value[i].checked = false;
  993. coachSelecteds.value.splice(index,1);
  994. let trues = coachList.value.filter(item => item.checked).length;
  995. if(trues>0&&trues<coachList.value.length) isIndeterminate.value = true;
  996. else isIndeterminate.value = false;
  997. if(trues===coachList.value.length) checkAll.value = true;
  998. else checkAll.value = false;
  999. }
  1000. const handleBeforeUpload = (e,node,data)=>{
  1001. let type = e.name.split('.')[e.name.split('.').length-1];
  1002. let isExcel = e.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
  1003. if(type.toLowerCase() !== 'xlsx' && type.toLowerCase() !== 'xls' && !isExcel){
  1004. proxy?.$modal.msgError('请上传xlsx或xls格式的Excel文件!');
  1005. return false;
  1006. }
  1007. setTimeout(()=>{
  1008. getUserList();
  1009. },1000)
  1010. }
  1011. const handleSuccess = (e,node,data)=>{
  1012. if(e.code===0){
  1013. proxy?.$modal.msgSuccess('导入成功!'+e.msg);
  1014. }else {
  1015. proxy?.$modal.msgError('导入失败!'+e.msg);
  1016. }
  1017. }
  1018. const submitForm6 = () => {
  1019. proxy.$refs.programTeamRef.validate((valid) => {
  1020. if (valid) {
  1021. buttonLoading6.value = true;
  1022. programTeamForm.value.enterpriseId = programid.value;
  1023. addProgramTeam(programTeamForm.value).then((res)=>{
  1024. if(res.code!==0) return proxy.$message.error(res.msg);
  1025. else proxy?.$modal.msgSuccess("保存成功");
  1026. buttonLoading6.value = false;
  1027. programTeamShow.value = false;
  1028. getTeamListByCompanyId();
  1029. })
  1030. } else {
  1031. return false;
  1032. }
  1033. });
  1034. }
  1035. const cancel6 = () => {
  1036. programTeamShow.value = false;
  1037. }
  1038. const getProgramProgressData = async () => {
  1039. loading.value = true;
  1040. const res = await getProgramProgressList({enterpriseName:programName2.value});
  1041. if(res.code!==0) return proxy.$message.error(res.msg);
  1042. else{
  1043. companyList2.value = res.data;
  1044. loading.value = false;
  1045. }
  1046. }
  1047. const handleEdit7 = (row) => {
  1048. xmjzTitle.value = '编辑项目进展';
  1049. getProgramProgressInfo(row.id).then((res)=>{
  1050. if(res.code!==0) return proxy.$message.error(res.msg);
  1051. else{
  1052. xmjzForm.value = res.data;
  1053. getCoachProgramInfo(res.data.enterpriseId).then(res => {
  1054. xmjzForm.value.background = res.data.background;
  1055. xmjzForm.value.bbb = staffSize.value.find(item => item.value === res.data.staffSizeCode).label;
  1056. xmjzForm.value.ccc = res.data.coachList.map(item => item.coachName);
  1057. xmjzShow.value = true;
  1058. })
  1059. }
  1060. })
  1061. }
  1062. const handleDelete7 = async (row) => {
  1063. await proxy.$modal.confirm('确认删除吗?');
  1064. deleteProgramProgress([row.id]).then(res=>{
  1065. if(res.code === 0) proxy?.$modal.msgSuccess("删除成功");
  1066. else return proxy?.$modal.msgError(res.msg);
  1067. getProgramProgressData();
  1068. });
  1069. }
  1070. const handleChange7 = row => {
  1071. getCoachProgramInfo(row).then(res => {
  1072. xmjzForm.value.background = res.data.background;
  1073. xmjzForm.value.bbb = staffSize.value.find(item => item.value === res.data.staffSizeCode).label;
  1074. xmjzForm.value.ccc =res.data.coachList.map(item => item.coachName);
  1075. })
  1076. }
  1077. const submitForm7 = () => {
  1078. proxy.$refs.xmjzRef.validate((valid) => {
  1079. if (valid) {
  1080. buttonLoading7.value = true;
  1081. if(xmjzForm.value.id){
  1082. updateProgramProgress(xmjzForm.value).then((res)=>{
  1083. if(res.code!==0) return proxy.$message.error(res.msg);
  1084. buttonLoading7.value = false;
  1085. xmjzShow.value = false;
  1086. getProgramProgressData();
  1087. })
  1088. }else{
  1089. addProgramProgress(xmjzForm.value).then((res)=>{
  1090. if(res.code!==0) return proxy.$message.error(res.msg);
  1091. buttonLoading7.value = false;
  1092. xmjzShow.value = false;
  1093. getProgramProgressData();
  1094. })
  1095. }
  1096. } else {
  1097. return false;
  1098. }
  1099. });
  1100. }
  1101. const cancel7 = () => {
  1102. xmjzShow.value = false;
  1103. xmjzForm.value = {
  1104. id:'',
  1105. enterpriseId:'',
  1106. bbb:'',
  1107. ccc:'',
  1108. background:'',
  1109. progress:''
  1110. }
  1111. proxy.$refs.xmjzRef.resetFields();
  1112. }
  1113. onMounted(() => {
  1114. getProgramList();
  1115. });
  1116. </script>
  1117. <style scoped lang="scss">
  1118. ::v-deep .queryInput .el-input__inner{
  1119. border: none !important;
  1120. height: 30px !important;
  1121. line-height: 30px !important;
  1122. padding: 0 !important;
  1123. width: 200px !important;
  1124. }
  1125. .query{
  1126. width: 100%;
  1127. padding: 16px 20px;
  1128. box-sizing: border-box;
  1129. background: #FFFFFF;
  1130. border-radius: 6px;
  1131. border: 1px solid #F3F4F6;
  1132. margin-top: 11px;
  1133. }
  1134. .page{
  1135. padding: 28px 16px 12px;
  1136. background: #FAFAFA;
  1137. .title{
  1138. font-family: PingFang-SC, PingFang-SC;
  1139. font-weight: bold;
  1140. font-size: 16px;
  1141. color: #111111;
  1142. line-height: 16px;
  1143. }
  1144. .tabs{
  1145. position: relative;
  1146. display: flex;
  1147. align-items: center;
  1148. border-bottom: 1px solid #E5E7EB;
  1149. padding-bottom: 18px;
  1150. margin-top: 32px;
  1151. .t_pre{
  1152. width: 116px;
  1153. font-family: PingFangSC, PingFang SC;
  1154. font-weight: 400;
  1155. font-size: 14px;
  1156. color: #111111;
  1157. line-height: 16px;
  1158. text-align: center;
  1159. position: relative;
  1160. cursor: pointer;
  1161. &.active{
  1162. font-weight: bold;
  1163. color: #761E6A;
  1164. &::after{
  1165. content: '';
  1166. position: absolute;
  1167. bottom: -18px;
  1168. left: 0;
  1169. width: 100%;
  1170. height: 2px;
  1171. background: #761E6A;
  1172. }
  1173. }
  1174. }
  1175. .t_add{
  1176. width: 112px;
  1177. height: 30px;
  1178. background: #761E6A;
  1179. border-radius: 6px;
  1180. font-family: PingFangSC, PingFang SC;
  1181. font-weight: 400;
  1182. font-size: 14px;
  1183. color: #FFFFFF;
  1184. line-height: 26px;
  1185. text-align: center;
  1186. position: absolute;
  1187. top: -10px;
  1188. right: 0;
  1189. cursor: pointer;
  1190. border: 1px solid #833478;
  1191. &.t_add2{
  1192. background: #FFFFFF;
  1193. color: #833478;
  1194. right: 130px;
  1195. }
  1196. }
  1197. }
  1198. .content{
  1199. width: 100%;
  1200. height: calc(100vh - 220px);
  1201. background: #FFFFFF;
  1202. border: 1px solid #F3F4F6;
  1203. margin-top: 5px;
  1204. .team_user_list{
  1205. height: 100%;
  1206. padding: 20px;
  1207. background: #FFFFFF;
  1208. display: flex;
  1209. .tul_left{
  1210. width: 280px;
  1211. padding-right: 20px;
  1212. box-sizing: border-box;
  1213. border-right: 1px solid #E5E7EB;
  1214. .tull_top{
  1215. display: flex;
  1216. align-items: center;
  1217. justify-content: space-between;
  1218. .tullt_l{
  1219. font-family: PingFangSC, PingFang SC;
  1220. font-weight: 600;
  1221. font-size: 16px;
  1222. color: #0D162A;
  1223. line-height: 16px;
  1224. }
  1225. .tullt_r{
  1226. width: 73px;
  1227. height: 28px;
  1228. border-radius: 6px;
  1229. border: 1px solid #761E6A;
  1230. font-family: PingFangSC, PingFang SC;
  1231. font-weight: 400;
  1232. font-size: 12px;
  1233. color: #761E6A;
  1234. line-height: 24px;
  1235. text-align: center;
  1236. cursor: pointer;
  1237. }
  1238. }
  1239. .tull_query{
  1240. margin-top: 12px;
  1241. width: 100%;
  1242. height: 34px;
  1243. border-radius: 6px;
  1244. border: 1px solid #E2E7F5;
  1245. padding: 0 16px;
  1246. box-sizing: border-box;
  1247. display: flex;
  1248. align-items: center;
  1249. justify-content: space-between;
  1250. img{
  1251. width: 16px;
  1252. height: 16px;
  1253. cursor: pointer;
  1254. }
  1255. }
  1256. .tull_list{
  1257. width: 100%;
  1258. height: calc(100% - 100px);
  1259. overflow-y: auto;
  1260. margin-top: 20px;
  1261. .tull_item{
  1262. width: 100%;
  1263. margin-top: 24px;
  1264. cursor: pointer;
  1265. padding: 12px;
  1266. box-sizing: border-box;
  1267. border-radius: 6px;
  1268. &:hover,&.active{
  1269. background: rgba(118,30,106,0.06);
  1270. .tname span{
  1271. color: #761E6A;
  1272. i{
  1273. color: #761E6A !important;
  1274. }
  1275. }
  1276. }
  1277. &:first-child{
  1278. margin-top: 0;
  1279. }
  1280. .tname{
  1281. width: 100%;
  1282. display: flex;
  1283. align-items: center;
  1284. justify-content: space-between;
  1285. position: relative;
  1286. img{
  1287. width: 16px;
  1288. height: 16px;
  1289. cursor: pointer;
  1290. }
  1291. span{
  1292. font-family: PingFangSC, PingFang SC;
  1293. font-weight: 400;
  1294. font-size: 14px;
  1295. color: #111111;
  1296. line-height: 16px;
  1297. margin-left: 10px;
  1298. }
  1299. &:hover,&.active{
  1300. border-radius: 6px;
  1301. span{
  1302. color: #761E6A;
  1303. }
  1304. i{
  1305. color: #761E6A !important;
  1306. }
  1307. }
  1308. }
  1309. .tuser_list{
  1310. margin-top: 9px;
  1311. width: 100%;
  1312. height: 36px;
  1313. padding-left: 34px;
  1314. display: flex;
  1315. align-items: center;
  1316. cursor: pointer;
  1317. position: relative;
  1318. span{
  1319. font-family: PingFangSC, PingFang SC;
  1320. font-weight: 400;
  1321. font-size: 14px;
  1322. color: #4B5563;
  1323. line-height: 16px;
  1324. &:first-child{
  1325. margin-right: 5px;
  1326. }
  1327. }
  1328. &:hover,&.active{
  1329. background: #F0F2F8;
  1330. border-radius: 6px;
  1331. span{
  1332. color: #761E6A;
  1333. }
  1334. i{
  1335. color: #761E6A !important;
  1336. }
  1337. }
  1338. i{
  1339. position: absolute;
  1340. right: 10px;
  1341. top: 12px;
  1342. }
  1343. }
  1344. }
  1345. }
  1346. }
  1347. .tul_right{
  1348. width: calc(100% - 281px);
  1349. padding-left: 23px;
  1350. box-sizing: border-box;
  1351. .tulr_top{
  1352. .tullt_l{
  1353. font-family: PingFangSC, PingFang SC;
  1354. font-weight: 600;
  1355. font-size: 16px;
  1356. color: #0D162A;
  1357. line-height: 16px;
  1358. }
  1359. }
  1360. }
  1361. }
  1362. .empty{
  1363. width: 100%;
  1364. height: 100%;
  1365. display: flex;
  1366. flex-direction: column;
  1367. align-items: center;
  1368. justify-content: center;
  1369. img{
  1370. width: 90px;
  1371. height: 76px;
  1372. }
  1373. p{
  1374. font-family: PingFangSC, PingFang SC;
  1375. font-weight: 400;
  1376. font-size: 14px;
  1377. color: #1D2129;
  1378. line-height: 20px;
  1379. margin-top: 20px;
  1380. }
  1381. .e_add{
  1382. width: 114px;
  1383. height: 32px;
  1384. background: #761E6A;
  1385. border-radius: 6px;
  1386. font-family: PingFangSC, PingFang SC;
  1387. font-weight: 400;
  1388. font-size: 14px;
  1389. color: #FFFFFF;
  1390. line-height: 32px;
  1391. text-align: center;
  1392. margin-top: 36px;
  1393. cursor: pointer;
  1394. }
  1395. }
  1396. }
  1397. }
  1398. .tl_czs{
  1399. .tlc_pre{
  1400. font-family: PingFangSC, PingFang SC;
  1401. font-weight: 400;
  1402. font-size: 14px;
  1403. color: #1D2129;
  1404. line-height: 20px;
  1405. padding: 12px 0;
  1406. border-bottom: 1px solid #ECEEF5;
  1407. cursor: pointer;
  1408. &:first-child{
  1409. padding-top: 0;
  1410. }
  1411. &:last-child{
  1412. border: none;
  1413. padding-bottom: 0;
  1414. }
  1415. &:hover{
  1416. color: #761E6A;
  1417. }
  1418. }
  1419. }
  1420. .f_s{
  1421. width: 100%;
  1422. height: 42px;
  1423. border-radius: 6px;
  1424. border: 1px solid #dcdfe6;
  1425. padding: 11px 11px 11px 16px;
  1426. box-sizing: border-box;
  1427. cursor: pointer;
  1428. .fs_text{
  1429. font-family: PingFangSC, PingFang SC;
  1430. font-weight: 400;
  1431. font-size: 14px;
  1432. color: #C0C4CC;
  1433. line-height: 20px;
  1434. &.active{
  1435. color: #606266;
  1436. }
  1437. }
  1438. }
  1439. .f_title{
  1440. font-family: PingFangSC, PingFang SC;
  1441. font-weight: 600;
  1442. font-size: 16px;
  1443. color: #0D162A;
  1444. line-height: 16px;
  1445. margin-bottom: 20px;
  1446. }
  1447. .f_pldr{
  1448. margin-top: 20px;
  1449. .fp_box{
  1450. display: flex;
  1451. width: 526px;
  1452. height: 125px;
  1453. border-radius: 4px;
  1454. border: 1px solid #EDEEF0;
  1455. position: relative;
  1456. .fpb_pre{
  1457. width: calc(50% - 1px);
  1458. height: 100%;
  1459. display: flex;
  1460. align-items: center;
  1461. justify-content: center;
  1462. .fpbp_btn{
  1463. width: 140px;
  1464. height: 36px;
  1465. border-radius: 6px;
  1466. border: 1px solid #E5E7EB;
  1467. font-family: PingFangSC, PingFang SC;
  1468. font-weight: 400;
  1469. font-size: 12px;
  1470. color: #761E6A;
  1471. line-height: 32px;
  1472. text-align: center;
  1473. cursor: pointer;
  1474. }
  1475. &.sc{
  1476. border-left: 1px solid #EDEEF0;
  1477. .fpbp_btn{
  1478. background: #761E6A;
  1479. border: 1px solid #761E6A;
  1480. color: #FFFFFF;
  1481. }
  1482. }
  1483. }
  1484. img{
  1485. width: 50px;
  1486. height: 20px;
  1487. position: absolute;
  1488. left: 50%;
  1489. margin-left: -25px;
  1490. top: 50%;
  1491. margin-top: -10px;
  1492. }
  1493. }
  1494. p{
  1495. margin-top: 11px;
  1496. font-family: PingFangSC, PingFang SC;
  1497. font-weight: 400;
  1498. font-size: 12px;
  1499. color: #C1C7D2;
  1500. line-height: 20px;
  1501. text-align: justify;
  1502. }
  1503. }
  1504. .f_sdlr{
  1505. padding-top: 10px;
  1506. .fs_add{
  1507. width: 80px;
  1508. height: 32px;
  1509. background: #761E6A;
  1510. border-radius: 6px;
  1511. font-family: PingFangSC, PingFang SC;
  1512. font-weight: 400;
  1513. font-size: 14px;
  1514. color: #FFFFFF;
  1515. line-height: 32px;
  1516. text-align: center;
  1517. margin-top: 20px;
  1518. cursor: pointer;
  1519. &.del{
  1520. background: rgb(212, 96, 96);
  1521. margin: 0;
  1522. margin-top: 5px;
  1523. }
  1524. }
  1525. }
  1526. .ed_coach{
  1527. .ec_l{
  1528. width: calc(50% - 1px);
  1529. height: 100%;
  1530. padding-right: 30px;
  1531. box-sizing: border-box;
  1532. border-right: 1px solid #ECEEF5;
  1533. .ecl_cbs{
  1534. width: 100%;
  1535. // height: calc(100% - 143px);
  1536. max-height: 376px;
  1537. overflow-y: auto;
  1538. }
  1539. }
  1540. .ec_r{
  1541. width: 50%;
  1542. padding-left: 30px;
  1543. box-sizing: border-box;
  1544. .ecr_text{
  1545. font-family: PingFang-SC, PingFang-SC;
  1546. font-weight: bold;
  1547. font-size: 16px;
  1548. color: #252525;
  1549. line-height: 22px;
  1550. span{
  1551. color: #B9B9B9;
  1552. }
  1553. }
  1554. .ecr_names{
  1555. margin-left: -16px;
  1556. overflow: hidden;
  1557. .en_pre{
  1558. float: left;
  1559. padding: 10px;
  1560. background: #F9FAFB;
  1561. border-radius: 6px;
  1562. margin: 19px 0 0 16px;
  1563. span{
  1564. font-family: PingFangSC, PingFang SC;
  1565. font-weight: 400;
  1566. font-size: 14px;
  1567. color: #252525;
  1568. line-height: 14px;
  1569. }
  1570. img{
  1571. width: 16px;
  1572. height: 16px;
  1573. margin-left: 10px;
  1574. cursor: pointer;
  1575. }
  1576. }
  1577. }
  1578. }
  1579. }
  1580. :v-deep .el-dialog__wrapper{
  1581. background: rgba(0,0,0,.3) !important;
  1582. }
  1583. ::v-deep .el-dialog__title{
  1584. font-weight: bold !important;
  1585. }
  1586. ::v-deep .el-dialog{
  1587. margin-top: 15vh !important;
  1588. }
  1589. ::v-deep .el-drawer__header span{
  1590. font-weight: bold;
  1591. font-size: 16px;
  1592. color: #1D2129;
  1593. line-height: 22px;
  1594. }
  1595. </style>
  1596. <style>
  1597. .el-upload-list{
  1598. display: none;
  1599. }
  1600. </style>