program.vue 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651
  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 programTeamNum = ref(0);
  643. const handleChangeTab = (idx) => {
  644. tidx.value = idx;
  645. if(idx===2){
  646. getProgramProgressData();
  647. }
  648. }
  649. const handleAdd = () => {
  650. programid.value = '';
  651. programTitle.value = '创建项目';
  652. programShow.value = true;
  653. programForm.value = {
  654. id:'',
  655. enterpriseName: '',
  656. creditCode: '',
  657. industryCode: '',
  658. staffSizeCode: '',
  659. province:'',
  660. city:'',
  661. area:'',
  662. areaCode:'',
  663. coachList:[],
  664. background:''
  665. };
  666. proxy.$refs.programRef.resetFields();
  667. };
  668. const handleAddJZ = () => {
  669. xmjzTitle.value = '添加项目进展';
  670. xmjzShow.value = true;
  671. xmjzForm.value = {
  672. id:'',
  673. enterpriseId:'',
  674. bbb:'',
  675. ccc:'',
  676. background:'',
  677. progress:''
  678. };
  679. };
  680. const handleExpand = (item, index) => {
  681. programTeamNum.value = 0;
  682. programid.value = item.id;
  683. programTeamForm.value.companyName = item.enterpriseName;
  684. companyList.value.forEach(c => { c.select = false; });
  685. item.select = true;
  686. getTeamListByCompanyId();
  687. };
  688. const getTeamListByCompanyId = ()=> {
  689. getTeamListById({enterpriseId: programid.value}).then(res=>{
  690. if(res.code!==0) proxy.$message.error(res.msg);
  691. teamList.value = res.data;
  692. programTeamNum.value = res.data?.length||0;
  693. })
  694. }
  695. const handleSelect = (team, index) => {
  696. teamid.value = team.teamId;
  697. queryParams.value.teamId = team.teamId;
  698. companyList.value.forEach(item => {
  699. if(item.teams){
  700. item.teams.forEach(t => t.select = false);
  701. }
  702. });
  703. team.select = true;
  704. getUserList();
  705. };
  706. const handleSetTeam = (team, index) => {
  707. };
  708. const handleAddTeam = () => {
  709. if(!programid.value) return proxy.$message.error('请先选择项目')
  710. if(programTeamNum.value>0) return proxy.$message.error('该项目已有团队,请先删除或修改')
  711. programTeamShow.value = true;
  712. };
  713. const getUserList = async () => {
  714. let query = {...queryParams.value};
  715. loading.value = true;
  716. const res = await getCoachList(query);
  717. userList.value = res.data.list;
  718. total.value = res.data.total;
  719. loading.value = false;
  720. }
  721. const handleSizeChange = (e)=>{
  722. queryParams.value.limit = e;
  723. getUserList();
  724. }
  725. const handleCurrentChange = (e)=>{
  726. queryParams.value.page = e;
  727. getUserList();
  728. }
  729. const handleTeamDetail = (team) => {
  730. getProgramTeamInfo(team.id).then(res=>{
  731. if(res.code!==0) return proxy.$message.error(res.msg);
  732. teamForm.value = {...teamForm.value,...res.data};
  733. teamForm.value.companyName = companyList.value.find(c => c.id === team.enterpriseId)?.enterpriseName;
  734. teamShow.value = true;
  735. })
  736. }
  737. const handleUsers = (team) => {
  738. proxy.$router.push({path:'/agentTeamUser',query:{teamId: team.id, enterpriseId: team.enterpriseId}});
  739. }
  740. const handleTeamDelete = async team => {
  741. await proxy.$modal.confirm('确认删除团队【' + team.teamName + '】吗?').finally(() => buttonLoading3.value = false);
  742. deleteProgramTeam(team.id).then(res=>{
  743. if(res.code === 0) proxy?.$modal.msgSuccess("删除成功");
  744. else return proxy?.$modal.msgError(res.msg);
  745. getTeamListByCompanyId();
  746. });
  747. }
  748. const getProgramList = async () => {
  749. loading.value = true;
  750. const res = await getCoachProgramList({enterpriseName:programName.value});
  751. if(res.code!==0) return proxy.$message.error(res.msg);
  752. companyList.value = res.data.map((d,i)=>{
  753. return {
  754. ...d,
  755. expand: false,
  756. select: false,
  757. teams: res.data[i].teams.map(t => {
  758. return {
  759. ...t,
  760. select: false
  761. }
  762. })
  763. }
  764. });
  765. loading.value = false;
  766. userList.value = [];
  767. teamList.value = [];
  768. total.value = 0;
  769. queryParams.value.teamId = '';
  770. queryParams.value.page = 1;
  771. queryParams.value.realName = '';
  772. programid.value = '';
  773. }
  774. const handleEdit = (row) => {
  775. reset();
  776. getCoachInfo(row.id).then(response => {
  777. userForm.value = {...userForm.value,...response.data};
  778. userTitle.value = "编辑成员详情";
  779. userShow.value = true;
  780. });
  781. }
  782. async function handleDelete(row) {
  783. await proxy?.$modal.confirm('确认删除成员【' + row.realName + '】吗?').finally(() => loading.value = false);
  784. let res = await deleteCoach([row.id]);
  785. if (res.code === 0) proxy?.$modal.msgSuccess("删除成功");
  786. else return proxy?.$modal.msgError(res.msg);
  787. await getUserList();
  788. }
  789. const reset = () => {
  790. userForm.value = {
  791. id:'',
  792. enterpriseId:'',
  793. teamId:'',
  794. realName:'',
  795. username:'',
  796. gender:'',
  797. birthdate:'',
  798. mobile:'',
  799. dept:'',
  800. education:'',
  801. divisionOfLabour:'',
  802. post:'',
  803. level:'',
  804. userType:2,
  805. category:'',
  806. introduction:'',
  807. userStory:''
  808. };
  809. proxy.resetForm("userRef");
  810. }
  811. const handleChangeDate = (e) => {
  812. userForm.value.birthdate = proxy.parseTime(new Date(e), '{yy}-{mm}-{dd}');
  813. }
  814. const submitForm2 = () => {
  815. proxy.$refs.userRef.validate((valid) => {
  816. if (valid) {
  817. buttonLoading2.value = true;
  818. userForm.value.username = userForm.value.mobile;
  819. userForm.value.enterpriseId = programid.value;
  820. userForm.value.teamId = teamid.value;
  821. if(userForm.value.id){
  822. updateCoach(userForm.value).then((res)=>{
  823. if(res.code!==0) return proxy.$message.error(res.msg);
  824. buttonLoading2.value = false;
  825. userShow.value = false;
  826. getUserList();
  827. })
  828. }else{
  829. addCoach(userForm.value).then((res)=>{
  830. if(res.code!==0) return proxy.$message.error(res.msg);
  831. buttonLoading2.value = false;
  832. userShow.value = false;
  833. getUserList();
  834. })
  835. }
  836. } else {
  837. return false;
  838. }
  839. });
  840. }
  841. const cancel2 = () => {
  842. userShow.value = false;
  843. reset();
  844. }
  845. const handleDownloadExcel = () => {
  846. window.location.href = `${window.SITE_CONFIG["apiURL"]}/sys/user/download?token=${Cookies.get("token")}`;
  847. }
  848. const uploadFileSuccess = e =>{
  849. programTeamForm.value.file = e.data;
  850. proxy?.$modal.msgSuccess('上传成功');
  851. }
  852. const beforeAvatarUpload = (e) => {
  853. let type = e.name.split('.')[e.name.split('.').length-1];
  854. let isExcel = e.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
  855. if(type.toLowerCase() !== 'xlsx' && type.toLowerCase() !== 'xls' && !isExcel){
  856. proxy?.$modal.msgError('请上传xlsx或xls格式的Excel文件!');
  857. return false;
  858. }
  859. }
  860. const handleAddUser = () => {
  861. if(!teamid.value) return proxy.$message.error('请先选择团队');
  862. reset();
  863. userTitle.value = "新增成员详情";
  864. userShow.value = true;
  865. }
  866. const submitForm3 = () => {
  867. proxy.$refs.teamRef.validate((valid) => {
  868. if (valid) {
  869. buttonLoading3.value = true;
  870. teamForm.value.enterpriseId = programid.value;
  871. updateProgramTeam(teamForm.value).then((res)=>{
  872. if(res.code!==0) return proxy.$message.error(res.msg);
  873. buttonLoading3.value = false;
  874. teamShow.value = false;
  875. getTeamListByCompanyId();
  876. })
  877. } else {
  878. return false;
  879. }
  880. });
  881. }
  882. const cancel3 = () => {
  883. teamShow.value = false;
  884. }
  885. const handleProgramDetail = program => {
  886. programTitle.value = "项目详情";
  887. programid.value = program.id;
  888. getCoachProgramInfo(program.id).then(res => {
  889. programForm.value = {...programForm.value,...res.data};
  890. if(programForm.value.coachList===null) programForm.value.coachList = [];
  891. let areas = programForm.value.areaCode.split('-');
  892. if(areas.length === 3){
  893. programForm.value.province = areas[0];
  894. cityAreaDetailInfoList(areas[0]);
  895. programForm.value.city = areas[1];
  896. countyAreaDetailInfoList(areas[1]);
  897. programForm.value.area = areas[2];
  898. }
  899. cocahNames.value = programForm.value.coachList.map(item => item.coachName).join(';');
  900. programShow.value = true;
  901. })
  902. }
  903. const handleProgramDelete = async program => {
  904. await proxy.$modal.confirm('确认删除项目【' + program.enterpriseName + '】吗?');
  905. deleteCoachProgram(program.id).then(res=>{
  906. if(res.code === 0) proxy?.$modal.msgSuccess("删除成功");
  907. else return proxy?.$modal.msgError(res.msg);
  908. getProgramList();
  909. });
  910. }
  911. const hangleSelectCoach = () => {
  912. getCoachList({page:1,limit:-1,realName:coachName.value}).then(res => {
  913. if(res.code!==0) return proxy.$message.error(res.msg);
  914. coachList.value = res.data.list.filter(d=>d.userType=='1');
  915. coachList.value.forEach(item => {
  916. item.checked = false;
  917. })
  918. coachShow.value = true;
  919. })
  920. }
  921. const submitForm5 = () => {
  922. if(coachSelecteds.value.length===0) return proxy.$message.warning('请至少选择一位教练')
  923. programForm.value.coachList = JSON.parse(JSON.stringify(coachSelecteds.value)).map(c=>{return {coachId:c.id,coachName:c.realName}});
  924. cocahNames.value = programForm.value.coachList.map(c=>c.coachName).join(';');
  925. checkAll.value = false;
  926. isIndeterminate.value = false;
  927. coachSelecteds.value = [];
  928. coachList.value = [];
  929. coachShow.value = false;
  930. }
  931. const cancel5 = () => {
  932. coachShow.value = false;
  933. }
  934. const submitForm4 = () => {
  935. proxy.$refs.programRef.validate((valid) => {
  936. if (valid) {
  937. buttonLoading5.value = true;
  938. programForm.value.id = programid.value;
  939. programForm.value.areaCode = `${programForm.value.province}-${programForm.value.city}-${programForm.value.area}`;
  940. let dto = JSON.parse(JSON.stringify(programForm.value));
  941. if(dto.coachList.length===0) return proxy.$message.warning('请至少选择一位教练');
  942. if(dto.id){
  943. updateCoachProgram(programForm.value).then((res)=>{
  944. if(res.code!==0) return proxy.$message.error(res.msg);
  945. else proxy?.$modal.msgSuccess("编辑成功");
  946. buttonLoading5.value = false;
  947. programShow.value = false;
  948. getProgramList();
  949. })
  950. }else{
  951. addCoachProgram(dto).then((res)=>{
  952. if(res.code!==0) return proxy.$message.error(res.msg);
  953. else proxy?.$modal.msgSuccess("创建成功");
  954. buttonLoading5.value = false;
  955. programShow.value = false;
  956. getProgramList();
  957. })
  958. }
  959. } else {
  960. return false;
  961. }
  962. });
  963. }
  964. const cancel4 = () => {
  965. programShow.value = false;
  966. programForm.value = {
  967. id:'',
  968. enterpriseName: '',
  969. creditCode: '',
  970. industryCode: '',
  971. staffSizeCode: '',
  972. province:'',
  973. city:'',
  974. area:'',
  975. areaCode:'',
  976. coachList:[],
  977. background:''
  978. }
  979. proxy.$refs.programRef.resetFields();
  980. }
  981. const handleCheckAllChange = (val) => {
  982. coachSelecteds.value = val ? JSON.parse(JSON.stringify(coachList.value)) : [];
  983. isIndeterminate.value = false;
  984. coachList.value.forEach(item => item.checked = val)
  985. }
  986. const handleChangeCoach = () => {
  987. let trues = coachList.value.filter(item => item.checked).length;
  988. if(trues>0&&trues<coachList.value.length) isIndeterminate.value = true;
  989. else isIndeterminate.value = false;
  990. if(trues===coachList.value.length) checkAll.value = true;
  991. else checkAll.value = false;
  992. coachSelecteds.value = coachList.value.filter(item => item.checked);
  993. }
  994. const handleDeleteCoach = (item,index) => {
  995. let i = coachList.value.findIndex(c => c.id === item.id);
  996. if(i>-1) coachList.value[i].checked = false;
  997. coachSelecteds.value.splice(index,1);
  998. let trues = coachList.value.filter(item => item.checked).length;
  999. if(trues>0&&trues<coachList.value.length) isIndeterminate.value = true;
  1000. else isIndeterminate.value = false;
  1001. if(trues===coachList.value.length) checkAll.value = true;
  1002. else checkAll.value = false;
  1003. }
  1004. const handleBeforeUpload = (e,node,data)=>{
  1005. let type = e.name.split('.')[e.name.split('.').length-1];
  1006. let isExcel = e.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
  1007. if(type.toLowerCase() !== 'xlsx' && type.toLowerCase() !== 'xls' && !isExcel){
  1008. proxy?.$modal.msgError('请上传xlsx或xls格式的Excel文件!');
  1009. return false;
  1010. }
  1011. setTimeout(()=>{
  1012. getUserList();
  1013. },1000)
  1014. }
  1015. const handleSuccess = (e,node,data)=>{
  1016. if(e.code===0){
  1017. proxy?.$modal.msgSuccess('导入成功!'+e.msg);
  1018. }else {
  1019. proxy?.$modal.msgError('导入失败!'+e.msg);
  1020. }
  1021. }
  1022. const submitForm6 = () => {
  1023. proxy.$refs.programTeamRef.validate((valid) => {
  1024. if (valid) {
  1025. buttonLoading6.value = true;
  1026. programTeamForm.value.enterpriseId = programid.value;
  1027. addProgramTeam(programTeamForm.value).then((res)=>{
  1028. if(res.code!==0) return proxy.$message.error(res.msg);
  1029. else proxy?.$modal.msgSuccess("保存成功");
  1030. buttonLoading6.value = false;
  1031. programTeamShow.value = false;
  1032. getTeamListByCompanyId();
  1033. })
  1034. } else {
  1035. return false;
  1036. }
  1037. });
  1038. }
  1039. const cancel6 = () => {
  1040. programTeamShow.value = false;
  1041. }
  1042. const getProgramProgressData = async () => {
  1043. loading.value = true;
  1044. const res = await getProgramProgressList({enterpriseName:programName2.value});
  1045. if(res.code!==0) return proxy.$message.error(res.msg);
  1046. else{
  1047. companyList2.value = res.data;
  1048. loading.value = false;
  1049. }
  1050. }
  1051. const handleEdit7 = (row) => {
  1052. xmjzTitle.value = '编辑项目进展';
  1053. getProgramProgressInfo(row.id).then((res)=>{
  1054. if(res.code!==0) return proxy.$message.error(res.msg);
  1055. else{
  1056. xmjzForm.value = res.data;
  1057. getCoachProgramInfo(res.data.enterpriseId).then(res => {
  1058. xmjzForm.value.background = res.data.background;
  1059. xmjzForm.value.bbb = staffSize.value.find(item => item.value === res.data.staffSizeCode).label;
  1060. xmjzForm.value.ccc = res.data.coachList.map(item => item.coachName);
  1061. xmjzShow.value = true;
  1062. })
  1063. }
  1064. })
  1065. }
  1066. const handleDelete7 = async (row) => {
  1067. await proxy.$modal.confirm('确认删除吗?');
  1068. deleteProgramProgress([row.id]).then(res=>{
  1069. if(res.code === 0) proxy?.$modal.msgSuccess("删除成功");
  1070. else return proxy?.$modal.msgError(res.msg);
  1071. getProgramProgressData();
  1072. });
  1073. }
  1074. const handleChange7 = row => {
  1075. getCoachProgramInfo(row).then(res => {
  1076. xmjzForm.value.background = res.data.background;
  1077. xmjzForm.value.bbb = staffSize.value.find(item => item.value === res.data.staffSizeCode).label;
  1078. xmjzForm.value.ccc =res.data.coachList.map(item => item.coachName);
  1079. })
  1080. }
  1081. const submitForm7 = () => {
  1082. proxy.$refs.xmjzRef.validate((valid) => {
  1083. if (valid) {
  1084. buttonLoading7.value = true;
  1085. if(xmjzForm.value.id){
  1086. updateProgramProgress(xmjzForm.value).then((res)=>{
  1087. if(res.code!==0) return proxy.$message.error(res.msg);
  1088. buttonLoading7.value = false;
  1089. xmjzShow.value = false;
  1090. getProgramProgressData();
  1091. })
  1092. }else{
  1093. addProgramProgress(xmjzForm.value).then((res)=>{
  1094. if(res.code!==0) return proxy.$message.error(res.msg);
  1095. buttonLoading7.value = false;
  1096. xmjzShow.value = false;
  1097. getProgramProgressData();
  1098. })
  1099. }
  1100. } else {
  1101. return false;
  1102. }
  1103. });
  1104. }
  1105. const cancel7 = () => {
  1106. xmjzShow.value = false;
  1107. xmjzForm.value = {
  1108. id:'',
  1109. enterpriseId:'',
  1110. bbb:'',
  1111. ccc:'',
  1112. background:'',
  1113. progress:''
  1114. }
  1115. proxy.$refs.xmjzRef.resetFields();
  1116. }
  1117. onMounted(() => {
  1118. getProgramList();
  1119. });
  1120. </script>
  1121. <style scoped lang="scss">
  1122. ::v-deep .queryInput .el-input__inner{
  1123. border: none !important;
  1124. height: 30px !important;
  1125. line-height: 30px !important;
  1126. padding: 0 !important;
  1127. width: 200px !important;
  1128. }
  1129. .query{
  1130. width: 100%;
  1131. padding: 16px 20px;
  1132. box-sizing: border-box;
  1133. background: #FFFFFF;
  1134. border-radius: 6px;
  1135. border: 1px solid #F3F4F6;
  1136. margin-top: 11px;
  1137. }
  1138. .page{
  1139. padding: 28px 16px 12px;
  1140. background: #FAFAFA;
  1141. .title{
  1142. font-family: PingFang-SC, PingFang-SC;
  1143. font-weight: bold;
  1144. font-size: 16px;
  1145. color: #111111;
  1146. line-height: 16px;
  1147. }
  1148. .tabs{
  1149. position: relative;
  1150. display: flex;
  1151. align-items: center;
  1152. border-bottom: 1px solid #E5E7EB;
  1153. padding-bottom: 18px;
  1154. margin-top: 32px;
  1155. .t_pre{
  1156. width: 116px;
  1157. font-family: PingFangSC, PingFang SC;
  1158. font-weight: 400;
  1159. font-size: 14px;
  1160. color: #111111;
  1161. line-height: 16px;
  1162. text-align: center;
  1163. position: relative;
  1164. cursor: pointer;
  1165. &.active{
  1166. font-weight: bold;
  1167. color: #761E6A;
  1168. &::after{
  1169. content: '';
  1170. position: absolute;
  1171. bottom: -18px;
  1172. left: 0;
  1173. width: 100%;
  1174. height: 2px;
  1175. background: #761E6A;
  1176. }
  1177. }
  1178. }
  1179. .t_add{
  1180. width: 112px;
  1181. height: 30px;
  1182. background: #761E6A;
  1183. border-radius: 6px;
  1184. font-family: PingFangSC, PingFang SC;
  1185. font-weight: 400;
  1186. font-size: 14px;
  1187. color: #FFFFFF;
  1188. line-height: 26px;
  1189. text-align: center;
  1190. position: absolute;
  1191. top: -10px;
  1192. right: 0;
  1193. cursor: pointer;
  1194. border: 1px solid #833478;
  1195. &.t_add2{
  1196. background: #FFFFFF;
  1197. color: #833478;
  1198. right: 130px;
  1199. }
  1200. }
  1201. }
  1202. .content{
  1203. width: 100%;
  1204. height: calc(100vh - 220px);
  1205. background: #FFFFFF;
  1206. border: 1px solid #F3F4F6;
  1207. margin-top: 5px;
  1208. .team_user_list{
  1209. height: 100%;
  1210. padding: 20px;
  1211. background: #FFFFFF;
  1212. display: flex;
  1213. .tul_left{
  1214. width: 280px;
  1215. padding-right: 20px;
  1216. box-sizing: border-box;
  1217. border-right: 1px solid #E5E7EB;
  1218. .tull_top{
  1219. display: flex;
  1220. align-items: center;
  1221. justify-content: space-between;
  1222. .tullt_l{
  1223. font-family: PingFangSC, PingFang SC;
  1224. font-weight: 600;
  1225. font-size: 16px;
  1226. color: #0D162A;
  1227. line-height: 16px;
  1228. }
  1229. .tullt_r{
  1230. width: 73px;
  1231. height: 28px;
  1232. border-radius: 6px;
  1233. border: 1px solid #761E6A;
  1234. font-family: PingFangSC, PingFang SC;
  1235. font-weight: 400;
  1236. font-size: 12px;
  1237. color: #761E6A;
  1238. line-height: 24px;
  1239. text-align: center;
  1240. cursor: pointer;
  1241. }
  1242. }
  1243. .tull_query{
  1244. margin-top: 12px;
  1245. width: 100%;
  1246. height: 34px;
  1247. border-radius: 6px;
  1248. border: 1px solid #E2E7F5;
  1249. padding: 0 16px;
  1250. box-sizing: border-box;
  1251. display: flex;
  1252. align-items: center;
  1253. justify-content: space-between;
  1254. img{
  1255. width: 16px;
  1256. height: 16px;
  1257. cursor: pointer;
  1258. }
  1259. }
  1260. .tull_list{
  1261. width: 100%;
  1262. height: calc(100% - 100px);
  1263. overflow-y: auto;
  1264. margin-top: 20px;
  1265. .tull_item{
  1266. width: 100%;
  1267. margin-top: 24px;
  1268. cursor: pointer;
  1269. padding: 12px;
  1270. box-sizing: border-box;
  1271. border-radius: 6px;
  1272. &:hover,&.active{
  1273. background: rgba(118,30,106,0.06);
  1274. .tname span{
  1275. color: #761E6A;
  1276. i{
  1277. color: #761E6A !important;
  1278. }
  1279. }
  1280. }
  1281. &:first-child{
  1282. margin-top: 0;
  1283. }
  1284. .tname{
  1285. width: 100%;
  1286. display: flex;
  1287. align-items: center;
  1288. justify-content: space-between;
  1289. position: relative;
  1290. img{
  1291. width: 16px;
  1292. height: 16px;
  1293. cursor: pointer;
  1294. }
  1295. span{
  1296. font-family: PingFangSC, PingFang SC;
  1297. font-weight: 400;
  1298. font-size: 14px;
  1299. color: #111111;
  1300. line-height: 16px;
  1301. margin-left: 10px;
  1302. }
  1303. &:hover,&.active{
  1304. border-radius: 6px;
  1305. span{
  1306. color: #761E6A;
  1307. }
  1308. i{
  1309. color: #761E6A !important;
  1310. }
  1311. }
  1312. }
  1313. .tuser_list{
  1314. margin-top: 9px;
  1315. width: 100%;
  1316. height: 36px;
  1317. padding-left: 34px;
  1318. display: flex;
  1319. align-items: center;
  1320. cursor: pointer;
  1321. position: relative;
  1322. span{
  1323. font-family: PingFangSC, PingFang SC;
  1324. font-weight: 400;
  1325. font-size: 14px;
  1326. color: #4B5563;
  1327. line-height: 16px;
  1328. &:first-child{
  1329. margin-right: 5px;
  1330. }
  1331. }
  1332. &:hover,&.active{
  1333. background: #F0F2F8;
  1334. border-radius: 6px;
  1335. span{
  1336. color: #761E6A;
  1337. }
  1338. i{
  1339. color: #761E6A !important;
  1340. }
  1341. }
  1342. i{
  1343. position: absolute;
  1344. right: 10px;
  1345. top: 12px;
  1346. }
  1347. }
  1348. }
  1349. }
  1350. }
  1351. .tul_right{
  1352. width: calc(100% - 281px);
  1353. padding-left: 23px;
  1354. box-sizing: border-box;
  1355. .tulr_top{
  1356. .tullt_l{
  1357. font-family: PingFangSC, PingFang SC;
  1358. font-weight: 600;
  1359. font-size: 16px;
  1360. color: #0D162A;
  1361. line-height: 16px;
  1362. }
  1363. }
  1364. }
  1365. }
  1366. .empty{
  1367. width: 100%;
  1368. height: 100%;
  1369. display: flex;
  1370. flex-direction: column;
  1371. align-items: center;
  1372. justify-content: center;
  1373. img{
  1374. width: 90px;
  1375. height: 76px;
  1376. }
  1377. p{
  1378. font-family: PingFangSC, PingFang SC;
  1379. font-weight: 400;
  1380. font-size: 14px;
  1381. color: #1D2129;
  1382. line-height: 20px;
  1383. margin-top: 20px;
  1384. }
  1385. .e_add{
  1386. width: 114px;
  1387. height: 32px;
  1388. background: #761E6A;
  1389. border-radius: 6px;
  1390. font-family: PingFangSC, PingFang SC;
  1391. font-weight: 400;
  1392. font-size: 14px;
  1393. color: #FFFFFF;
  1394. line-height: 32px;
  1395. text-align: center;
  1396. margin-top: 36px;
  1397. cursor: pointer;
  1398. }
  1399. }
  1400. }
  1401. }
  1402. .tl_czs{
  1403. .tlc_pre{
  1404. font-family: PingFangSC, PingFang SC;
  1405. font-weight: 400;
  1406. font-size: 14px;
  1407. color: #1D2129;
  1408. line-height: 20px;
  1409. padding: 12px 0;
  1410. border-bottom: 1px solid #ECEEF5;
  1411. cursor: pointer;
  1412. &:first-child{
  1413. padding-top: 0;
  1414. }
  1415. &:last-child{
  1416. border: none;
  1417. padding-bottom: 0;
  1418. }
  1419. &:hover{
  1420. color: #761E6A;
  1421. }
  1422. }
  1423. }
  1424. .f_s{
  1425. width: 100%;
  1426. height: 42px;
  1427. border-radius: 6px;
  1428. border: 1px solid #dcdfe6;
  1429. padding: 11px 11px 11px 16px;
  1430. box-sizing: border-box;
  1431. cursor: pointer;
  1432. .fs_text{
  1433. font-family: PingFangSC, PingFang SC;
  1434. font-weight: 400;
  1435. font-size: 14px;
  1436. color: #C0C4CC;
  1437. line-height: 20px;
  1438. &.active{
  1439. color: #606266;
  1440. }
  1441. }
  1442. }
  1443. .f_title{
  1444. font-family: PingFangSC, PingFang SC;
  1445. font-weight: 600;
  1446. font-size: 16px;
  1447. color: #0D162A;
  1448. line-height: 16px;
  1449. margin-bottom: 20px;
  1450. }
  1451. .f_pldr{
  1452. margin-top: 20px;
  1453. .fp_box{
  1454. display: flex;
  1455. width: 526px;
  1456. height: 125px;
  1457. border-radius: 4px;
  1458. border: 1px solid #EDEEF0;
  1459. position: relative;
  1460. .fpb_pre{
  1461. width: calc(50% - 1px);
  1462. height: 100%;
  1463. display: flex;
  1464. align-items: center;
  1465. justify-content: center;
  1466. .fpbp_btn{
  1467. width: 140px;
  1468. height: 36px;
  1469. border-radius: 6px;
  1470. border: 1px solid #E5E7EB;
  1471. font-family: PingFangSC, PingFang SC;
  1472. font-weight: 400;
  1473. font-size: 12px;
  1474. color: #761E6A;
  1475. line-height: 32px;
  1476. text-align: center;
  1477. cursor: pointer;
  1478. }
  1479. &.sc{
  1480. border-left: 1px solid #EDEEF0;
  1481. .fpbp_btn{
  1482. background: #761E6A;
  1483. border: 1px solid #761E6A;
  1484. color: #FFFFFF;
  1485. }
  1486. }
  1487. }
  1488. img{
  1489. width: 50px;
  1490. height: 20px;
  1491. position: absolute;
  1492. left: 50%;
  1493. margin-left: -25px;
  1494. top: 50%;
  1495. margin-top: -10px;
  1496. }
  1497. }
  1498. p{
  1499. margin-top: 11px;
  1500. font-family: PingFangSC, PingFang SC;
  1501. font-weight: 400;
  1502. font-size: 12px;
  1503. color: #C1C7D2;
  1504. line-height: 20px;
  1505. text-align: justify;
  1506. }
  1507. }
  1508. .f_sdlr{
  1509. padding-top: 10px;
  1510. .fs_add{
  1511. width: 80px;
  1512. height: 32px;
  1513. background: #761E6A;
  1514. border-radius: 6px;
  1515. font-family: PingFangSC, PingFang SC;
  1516. font-weight: 400;
  1517. font-size: 14px;
  1518. color: #FFFFFF;
  1519. line-height: 32px;
  1520. text-align: center;
  1521. margin-top: 20px;
  1522. cursor: pointer;
  1523. &.del{
  1524. background: rgb(212, 96, 96);
  1525. margin: 0;
  1526. margin-top: 5px;
  1527. }
  1528. }
  1529. }
  1530. .ed_coach{
  1531. .ec_l{
  1532. width: calc(50% - 1px);
  1533. height: 100%;
  1534. padding-right: 30px;
  1535. box-sizing: border-box;
  1536. border-right: 1px solid #ECEEF5;
  1537. .ecl_cbs{
  1538. width: 100%;
  1539. // height: calc(100% - 143px);
  1540. max-height: 376px;
  1541. overflow-y: auto;
  1542. }
  1543. }
  1544. .ec_r{
  1545. width: 50%;
  1546. padding-left: 30px;
  1547. box-sizing: border-box;
  1548. .ecr_text{
  1549. font-family: PingFang-SC, PingFang-SC;
  1550. font-weight: bold;
  1551. font-size: 16px;
  1552. color: #252525;
  1553. line-height: 22px;
  1554. span{
  1555. color: #B9B9B9;
  1556. }
  1557. }
  1558. .ecr_names{
  1559. margin-left: -16px;
  1560. overflow: hidden;
  1561. .en_pre{
  1562. float: left;
  1563. padding: 10px;
  1564. background: #F9FAFB;
  1565. border-radius: 6px;
  1566. margin: 19px 0 0 16px;
  1567. span{
  1568. font-family: PingFangSC, PingFang SC;
  1569. font-weight: 400;
  1570. font-size: 14px;
  1571. color: #252525;
  1572. line-height: 14px;
  1573. }
  1574. img{
  1575. width: 16px;
  1576. height: 16px;
  1577. margin-left: 10px;
  1578. cursor: pointer;
  1579. }
  1580. }
  1581. }
  1582. }
  1583. }
  1584. :v-deep .el-dialog__wrapper{
  1585. background: rgba(0,0,0,.3) !important;
  1586. }
  1587. ::v-deep .el-dialog__title{
  1588. font-weight: bold !important;
  1589. }
  1590. ::v-deep .el-dialog{
  1591. margin-top: 15vh !important;
  1592. }
  1593. ::v-deep .el-drawer__header span{
  1594. font-weight: bold;
  1595. font-size: 16px;
  1596. color: #1D2129;
  1597. line-height: 22px;
  1598. }
  1599. </style>
  1600. <style>
  1601. .el-upload-list{
  1602. display: none;
  1603. }
  1604. </style>