assessManagement.vue 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363
  1. <template>
  2. <div class="all boxMinHeight">
  3. <!-- 头部筛选条件,按钮组,流程节点 -->
  4. <header>
  5. <div>
  6. <el-row :gutter="10" type="flex" justify="space-between">
  7. <el-col :span="24">
  8. <div class="flex-box">
  9. <div class="flex-box-ce" style="margin-right: 10px;">
  10. <el-cascader v-model="headValue" :options="options" :props="props" :show-all-levels="false"
  11. style="width: 300px;"></el-cascader>
  12. </div>
  13. <!-- 选择部门下拉框 -->
  14. <div class="dept_wdiv">
  15. <div class="dept_inp" @click="show_dept_selector = true">
  16. <span v-if="deptVisibleName != ''">{{ deptVisibleName }}</span>
  17. <span v-else style="color: #b9b9b9;">选择部门</span>
  18. </div>
  19. <i class="el-icon-arrow-down"></i>
  20. </div>
  21. <EmployeeSelector :title="'选择部门'" :isChecKedAll="false" :can_select_employee="false"
  22. :can_select_dept="true" :dept_children="false" :selected="dept_selected"
  23. :visible.sync="show_dept_selector" @confirm="dept_confirm" />
  24. <!-- 选择部门下拉框 -->
  25. <!-- 选择考核模板下拉框 -->
  26. <el-select v-model="groupValue" @change="groupChange" clearable class="margin-l width-300"
  27. placeholder="选择考核表">
  28. <el-option v-for="item in groupOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
  29. </el-select>
  30. <!-- 选择考核模板下拉框 -->
  31. <!-- 姓名搜索 -->
  32. <el-select v-model="employee_ids" multiple filterable clearable class="margin-l" placeholder="姓名搜索">
  33. <el-option v-for="item in employees" :key="item.id" :label="item.name" :value="item.id"></el-option>
  34. </el-select>
  35. <!-- 姓名搜索 -->
  36. <img v-if="all_finish" src="static/images/guidang.png" class="guidang" />
  37. </div>
  38. </el-col>
  39. </el-row>
  40. <el-row :gutter="10" style="margin-top: 20px;">
  41. <el-col :span="24">
  42. <!-- 按钮组 -->
  43. <div class="flex-box-ce">
  44. <template v-if="!all_finish">
  45. <el-button-group>
  46. <el-button type="primary" icon="el-icon-s-promotion" v-if="$getRole(1) && $isAuthoritys_jx($7)"
  47. @click="amhrsponsor">发起考核</el-button>
  48. <el-button type="primary" icon="el-icon-s-custom" v-if="$getRole(1) || $getRole(2)"
  49. @click="isManagement = true">人员管理</el-button>
  50. <!-- 主管理员、有【开始评分】权限的子管理员 -->
  51. <el-button type="primary" icon="el-icon-edit-outline" v-if="$getRole(1) && $isAuthoritys_jx($8)"
  52. @click="startisChecks">开始评分</el-button>
  53. </el-button-group>
  54. <!-- 主管理员、有【菜单权限】权限的子管理员 -->
  55. <el-dropdown v-if="$getRole(1)" style="margin-left:11px;" @command="handleCommand">
  56. <el-button>更多 <i class="el-icon-arrow-down"></i></el-button>
  57. <el-dropdown-menu slot="dropdown">
  58. <el-dropdown-item v-for="(item, index) in dropdownMenu" :key="index" :command="item.key"
  59. :divided="item.bordok" v-if="item.isShow">
  60. {{ item.name }}
  61. </el-dropdown-item>
  62. </el-dropdown-menu>
  63. </el-dropdown>
  64. </template>
  65. </div>
  66. <!-- 按钮组 -->
  67. </el-col>
  68. </el-row>
  69. </div>
  70. <div class="navigationL flex-box-ce flex-d-wrap">
  71. <div v-for="(item, index) in navigationList" :key="index" class="flex-box-ce"
  72. @click="navClick(item)">
  73. <template v-if="item.num">
  74. <el-badge :value="item.num" class="item">
  75. <span class="flex-box-ce" :class="{ action: navcli == item.id }">
  76. <div>{{ index ? index : '' }} {{ item.name }}</div>
  77. <div v-if="item.hint">
  78. &nbsp;
  79. <el-tooltip class="item" effect="dark" :content="item.hint" placement="top">
  80. <i class="el-icon-warning-outline navsvg1" v-if="item.hint"></i>
  81. </el-tooltip>
  82. </div>
  83. </span>
  84. </el-badge>
  85. </template>
  86. <span class="flex-box-ce" :class="{ action: navcli == item.id }" v-else>
  87. <div>{{ index ? index : '' }} {{ item.name }}</div>
  88. <div v-if="item.hint">
  89. &nbsp;
  90. <el-tooltip class="item" effect="dark" :content="item.hint" placement="top">
  91. <i class="el-icon-warning-outline navsvg1" v-if="item.hint"></i>
  92. </el-tooltip>
  93. </div>
  94. </span>
  95. <div v-if="index == 0" class="navsvg2"></div>
  96. <i v-if="navigationList.length != index + 1 && index != 0" class="el-icon-right navsvg3"></i>
  97. </div>
  98. </div>
  99. <template v-if="$getRole(1)">
  100. <el-alert type="warning" style="margin-bottom: 15px;" v-if="navcli != 0 && navcli != 3 && navcli != 11"
  101. :closable="false">
  102. 该绩效节点“<span style="font-weight: 600;">{{ getNode }}</span>”
  103. 参与人员:<span style="font-weight: 600;">{{ total }}</span>人,
  104. <!-- 已完成录入<span style="font-weight: 600;">{{ asstabData.length }}</span>人,
  105. 未完成录入<span style="font-weight: 600;">{{ total - asstabData.length }}</span>人 -->
  106. <span class="blue" style="cursor: pointer; margin-left: 10px" @click="isPending = true">查看名单</span>
  107. </el-alert>
  108. </template>
  109. <div v-if="navcli == 3 && $getRole(1) && $isAuthoritys_jx($8)" style="margin-bottom: 15px;">
  110. <el-button type="primary" @click="pf()">批量开始评分</el-button>
  111. </div>
  112. </header>
  113. <!-- 头部筛选条件,按钮组 -->
  114. <el-table :data="asstabData" v-loading="assDetLoad" @row-click="assDetClick" style="width: 100%; margin-top: 20px;"
  115. :header-cell-style="{ background: '#ECF5FF' }" @selection-change="handleSelectionChange">
  116. <el-table-column type="selection" width="55" v-if="navcli == 3"></el-table-column>
  117. <el-table-column label="姓名" min-width="200">
  118. <template slot-scope="scope">
  119. <userImage class="fl" :id="scope.row.employee_id" style="margin-top: 9px;" :user_name="scope.row.name"
  120. :img_url="scope.row.img_url" width="35px" height="35px" fontSize="12px"></userImage>
  121. <span style="margin-left: 10px; line-height: 50px;">{{ scope.row.name }}</span>
  122. </template>
  123. </el-table-column>
  124. <el-table-column prop="dept_list" label="部门" min-width="300">
  125. <template slot-scope="scope">
  126. <template v-if="scope.row.dept_list.length > 0">
  127. <span v-for="(item, index) in scope.row.dept_list" :key="index">
  128. {{ item.dept_name }}
  129. <span v-if="scope.row.dept_list.length - index > 1">,</span>
  130. </span>
  131. </template>
  132. <span v-else>--</span>
  133. </template>
  134. </el-table-column>
  135. <el-table-column prop="group_name" label="考核表" min-width="200">
  136. <template slot-scope="scope">
  137. <span v-if="!scope.row.relevance_group.delete_time">{{ scope.row.relevance_group.name }}</span>
  138. <span v-else class="red">该考核表已被删除</span>
  139. </template>
  140. </el-table-column>
  141. <el-table-column prop="final_point" min-width="140" label="考核结果">
  142. <template slot-scope="scope">
  143. <template v-if="scope.row.final_point">
  144. <span v-if="$getRole(1)">{{ scope.row.final_point }}</span>
  145. <span v-else-if="scope.row.publicity">{{ scope.row.final_point }}</span>
  146. <span v-else>-</span>
  147. </template>
  148. <span v-else>-</span>
  149. </template>
  150. </el-table-column>
  151. <el-table-column prop="final_level" min-width="140" label="绩效等级">
  152. <template slot-scope="scope">
  153. <template v-if="scope.row.final_level">
  154. <span v-if="$getRole(1)">{{ scope.row.final_level }}</span>
  155. <span v-else-if="scope.row.publicity">{{ scope.row.final_level }}</span>
  156. <span v-else>-</span>
  157. </template>
  158. <span v-else>-</span>
  159. </template>
  160. </el-table-column>
  161. <el-table-column prop="peoplenum" min-width="200" label="操作">
  162. <template slot-scope="scope">
  163. <el-button type="text" size="medium" @click="assDetClick(scope.row)">查看</el-button>
  164. <template v-if="$isAuthoritys_jx($9) && !all_finish && scope.row.doing_id == 11">
  165. <el-button type="text" size="medium" @click.stop="theResultsOf1(scope.row, 1)">调整考核结果</el-button>
  166. <el-button type="text" size="medium" @click.stop="theResultsOf1(scope.row, 2)">调整绩效等级</el-button>
  167. </template>
  168. <el-button type="text" v-if="navcli == 3 && $getRole(1) && $isAuthoritys_jx($8)" size="medium"
  169. @click.stop="pf(scope.row)">开始评分</el-button>
  170. </template>
  171. </el-table-column>
  172. </el-table>
  173. <Pagination :page="asstabParams.page" :page_size="asstabParams.page_size" :total="total"
  174. @handleSizeChange="handleSizeChange" @handleCurrentChange="handleCurrentChange"></Pagination>
  175. <BrawerBox drawerTitle="请选择开始评分的考核模板" :showDrawer.sync="isChecks">
  176. <template slot="main">
  177. <div v-loading="isChecksLoad">
  178. <div style="padding-top:10px;">
  179. <JxSearch :screen="2" title="搜索考核模板" ref="braSearch" @confirm="braSearch"></JxSearch>
  180. </div>
  181. <template v-if="scoreGroup.length > 0">
  182. <div class="flex-box-ce li" style="margin-top: 20px;"><el-checkbox class="flex-box-ce"
  183. v-model="isAllSelectIndex" label="全选"></el-checkbox></div>
  184. <ul class="ul">
  185. <li v-for="(item, index) in scoreGroup" :key="index" class="flex-box-ce li">
  186. <el-checkbox class="flex-box-ce" style="padding: 0;" :disabled="item.disabled" v-model="item.check">
  187. <div class="flex-box-ce">
  188. <div class="flex-1">
  189. <!-- <span v-if="item.all_exec_over" class="blue-box" style="padding: 5px 10px; border-radius: 3px; width: 80px;height: 24px; font-size: 12px;">已开始评分</span> -->
  190. <span>{{ item.name }}</span>
  191. </div>
  192. <div class="blue" v-if="item.count_employee > 0">{{ item.count_employee }} 人</div>
  193. </div>
  194. </el-checkbox>
  195. </li>
  196. <div class="fontColorC" style="text-align: center;padding: 10px 0;font-size: 12px;">没有更多了</div>
  197. </ul>
  198. </template>
  199. <NoData v-else></NoData>
  200. </div>
  201. </template>
  202. <template slot="footer">
  203. <div style="position: absolute;left: 20px;font-size: 14px;color: #2b7ce0">已选择:{{ getLeng }}个</div>
  204. <el-button plain @click="isChecks = false">取消</el-button>
  205. <el-button type="primary" @click="beginGrade">开始评分</el-button>
  206. </template>
  207. </BrawerBox>
  208. <!-- 导出执行记录 -->
  209. <EmployeeSelector :title="'选择人员'" :isChecKedAll="false" :max="20" :isRequired="true" :can_select_employee="true"
  210. :can_select_dept="false" :user_employee_list="true" :employee_list="employee_list" :visible.sync="isDerive"
  211. @confirm="confirmDerive" />
  212. <!-- 公式结果 -->
  213. <EmployeeSelector :title="'结果公布'" :is_filtration_creator="false" :can_select_employee="true"
  214. :can_select_dept="false" :user_employee_list="true" :employee_list="employee_list" :selected="selected"
  215. :visible.sync="isResult" @confirm="confirmResult" />
  216. <!-- 更多-管理 -->
  217. <BrawerBox drawerTitle="人员管理" :showDrawer.sync="isManagement">
  218. <template slot="main">
  219. <div class="m-content">
  220. <div>
  221. <div class="m-title">变更参与考核人员({{ employee_list.length }}人)</div>
  222. <div class="flex-box-ce" style="margin-top: 20px;">
  223. <div style="margin-right: 20px;cursor: pointer;" @click="showSelectUser(1)">
  224. <i class="el-icon-circle-plus-outline blue"></i>
  225. 添加
  226. </div>
  227. <div style="cursor: pointer;" @click="showSelectUser(2)">
  228. <i class="el-icon-remove-outline red"></i>
  229. 删除
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. </template>
  235. </BrawerBox>
  236. <!-- 更多-管理-人员选择添加 -->
  237. <EmployeeSelector title="添加被考核人员" :is_filtration_creator="false" :can_select_employee="true"
  238. :can_select_dept="false" :user_employee_list="true" :isRequired="true" :employee_list="add_employee_list"
  239. :visible.sync="isShowUser" @confirm="confirmUser">
  240. <template slot="footer">
  241. <div style="text-align: center;" class="orange flex-1">*添加成功后,别忘了帮Ta加入【绩效等级配置】喔!*</div>
  242. </template>
  243. </EmployeeSelector>
  244. <!-- 更多-管理-人员选择删除 -->
  245. <EmployeeSelector :title="packageName + ':选择被删除人员'" :is_filtration_creator="false" :can_select_employee="true"
  246. :can_select_dept="false" :isRequired="true" :user_employee_list="true" :include_deleted="true"
  247. :employee_list="employee_list" :visible.sync="isShowUser2" @confirm="confirmUser2">
  248. <template slot="header">
  249. <div style="text-align: center;" class="orange">*当所有人员都被选中删除时,该周期的绩效考核也会自动删除*</div>
  250. </template>
  251. </EmployeeSelector>
  252. <el-dialog :title="theResults == 1 ? '调整考核结果' : '调整绩效等级'" :visible.sync="comtheResults" width="500px"
  253. :close-on-click-modal="false">
  254. <div class="">
  255. <div>
  256. 员工姓名:
  257. <span style="padding-left: 14px;">{{ theResultsList.name }}</span>
  258. </div>
  259. <br />
  260. <div v-if="theResults == 1">
  261. <div>原考核结果:<span>{{ theResultsList.final_point }}</span></div>
  262. <br />
  263. <div class="flex-box">
  264. <span style="line-height:36px;">新考核结果:</span>
  265. <el-input v-model="theResultInp"
  266. @input="theResultInp = theResultInp.match(/\d+(\.\d{0,2})?/) ? theResultInp.match(/\d+(\.\d{0,2})?/)[0] : ''"
  267. style="width:250px;" placeholder="请输入新考核结果"></el-input>
  268. </div>
  269. </div>
  270. <div v-else>
  271. <div>原绩效等级:<span>{{ theResultsList.final_level }}</span></div>
  272. <br />
  273. <div class="flex-box-ce">
  274. <span>新绩效等级:</span>
  275. <el-select v-model="level" placeholder="请选择" style="width: 200px;">
  276. <el-option v-for="(item, index) in levels" :key="index" :label="item.name" :value="item.name"></el-option>
  277. </el-select>
  278. </div>
  279. </div>
  280. </div>
  281. <span slot="footer" class="dialog-footer">
  282. <el-button @click="comtheResults = false">取 消</el-button>
  283. <el-button type="primary" :disabled="theResultsButid" @click="savecomtheResults()">确 定</el-button>
  284. </span>
  285. </el-dialog>
  286. <el-dialog title="结果" :visible.sync="isShowData" @close="close_list" :append-to-body="true" width="700px">
  287. <el-table :data="showData" style="max-height: 600px;overflow: auto;">
  288. <el-table-column prop="name" label="名称"></el-table-column>
  289. <el-table-column prop="successText" label="结果">
  290. <template slot-scope="scope">
  291. <span v-if="scope.row.successText == '失败'" class="red">失败</span>
  292. <span v-else class="green">成功</span>
  293. </template>
  294. </el-table-column>
  295. <el-table-column prop="reason" label="描述"></el-table-column>
  296. </el-table>
  297. <span slot="footer" class="dialog-footer" v-if="selectUser.length == showData.length">
  298. <el-button type="primary" @click="isShowData = false">确 定</el-button>
  299. </span>
  300. </el-dialog>
  301. <!-- 待处理人员列表 -->
  302. <BrawerBox :drawerTitle="'“' + getNode + '” 相关负责人名单'" :showDrawer.sync="isPending">
  303. <template slot="main">
  304. <div>
  305. <div class="flex-box-ce" style="border-bottom: 1px solid #f1f1f1;padding: 10px 0;"
  306. v-for="(item, index) in pending_employee_list" :key="index" v-if="pending_employee_list.length > 0">
  307. <div class="flex-box-ce">
  308. <userImage style="margin-right: 10px;" :user_name="item.name" :img_url="item.img_url" width="38px"
  309. height="38px" fontSize="12px"></userImage>
  310. <span>{{ item.name }}</span>
  311. </div>
  312. <div style="margin-left: 10px;" class="flex-1">
  313. <template v-if="item.dept_list.length > 0">
  314. <span v-for="(e, index2) in item.dept_list" :key="index2" class="fontColorC">
  315. {{ e.dept_name }}
  316. <span v-if="item.dept_list.length - index > 1">,</span>
  317. </span>
  318. </template>
  319. </div>
  320. </div>
  321. <NoData v-if="pending_employee_list.length == 0"></NoData>
  322. </div>
  323. </template>
  324. <template slot="footer">
  325. <!-- <el-button plain @click="isPending = false">取消</el-button> -->
  326. <el-button type="primary" @click="getPending">导出人员名单</el-button>
  327. </template>
  328. </BrawerBox>
  329. </div>
  330. </template>
  331. <script>
  332. let that;
  333. import PageHead from '@/components/PageHead'; //头部---返回
  334. import JxSearch from '@/performance/components/public/JxSearch'; //搜索
  335. import EmployeeSelector from '@/components/EmployeeSelector';
  336. import BrawerBox from '@/performance/components/public/BrawerBox';
  337. export default {
  338. name: 'assessDetails',
  339. data() {
  340. return {
  341. date_remark: "",
  342. isHeadShow: false,
  343. pending_employee_list: [], //待处理人员
  344. isPending: false,
  345. total: 0, // 当前节点考核总人数
  346. nowass: false, //已开始评分显示隐藏
  347. pushAssMan: null, //头部跳转
  348. assDetLoad: false, //loading
  349. isLoad: false,
  350. headValue: [], //顶部选择考核
  351. options: [], //顶部考核数据
  352. props: {},
  353. groupValue: [], //选择考核模板val
  354. groupOptions: [], //选择考核模板数据
  355. scoreGroup: [], //评分考核模板
  356. isAllSelectIndex: false,
  357. GroupList: [], //评分考核模板备份搜索数据
  358. // 流程节点
  359. navigationList: [
  360. //导航
  361. { id: 0, name: '考核周期: ', num: 0 },
  362. { id: 1, name: '目标制定', num: 0 },
  363. { id: 2, name: '目标确认', num: 0 },
  364. {
  365. id: 3,
  366. name: '执行中',
  367. num: 0,
  368. hint: '目标制定并确认完毕后,进入到【执行中】阶段,期间员工执行计划,上级跟踪过程。进入结果数据收集和评分阶段'
  369. },
  370. { id: 4, name: '结果值录入', num: 0 },
  371. { id: 5, name: '评分', num: 0 },
  372. { id: 9, name: '审批', num: 0 },
  373. { id: 11, name: '结束', num: 0 }
  374. ],
  375. navcli: 0, // 导航当前选中
  376. svaeNavcli: 0, //保存的选中
  377. // 头部筛选条件
  378. asstabParams: {
  379. package_id: 0, //考核包id
  380. dept_ids: [], //部门idx
  381. group_ids: [], //考核模板ID
  382. doing_id: 0, //状态ID
  383. employee_ids: [], //搜索人员ID
  384. page: 1,
  385. page_size: 10
  386. },
  387. employee_ids: [],
  388. asstabData: [], // 表格数据
  389. employees: [], //被考核人员列表
  390. //更多
  391. dropdownMenu: [
  392. { key: 'a', name: '等级配置', isShow: this.$isAuthoritys_jx(this.$10) },
  393. { key: 'b', name: '结果公布', isShow: true },
  394. { key: 'c', name: '导出明细', bordok: true, isShow: this.$isAuthoritys_jx(this.$11) },
  395. { key: 'd', name: '导出结果', isShow: this.$isAuthoritys_jx(this.$11) },
  396. { key: 'k', name: '导出执行计划', isShow: this.$getRole(1) || this.$getRole(2) },
  397. { key: 'y', name: '批量修改目标值', isShow: true },
  398. { key: 'j', name: '批量转交', isShow: true },
  399. // { key: 'e', name: '自定义导出' },
  400. // { key: 'f', name: '批量操作', bordok: true },
  401. { key: 'h', name: '归档&统计', bordok: true, isShow: false },
  402. // { key: 'g', name: '管理', bordok: true, isShow: true }
  403. ],
  404. // 选择部门
  405. deptVisibleName: '',
  406. dept_selected: { dept: [], employee: [] },
  407. show_dept_selector: false,
  408. deptList_id: [],
  409. isChecks: false, //评分开关
  410. isChecksLoad: false,
  411. allassList: [], //所有流程数据
  412. searchList: [], //搜索备份
  413. searchdet: '', //搜索值
  414. packageName: '', //考核包名称
  415. // 公式结果相关
  416. isResult: false,
  417. employee_list: [], //人员列表
  418. selected: { dept: [], employee: [] }, //已选择公式人员
  419. // 更多-管理
  420. isManagement: false,
  421. ManagementTitle: '删除被考核人员',
  422. add_employee_list: [], //可以被添加到绩效包的人员
  423. isShowUser: false, //控制添加人员
  424. isShowUser2: false, //控制删除人员
  425. selected: { dept: [], employee: [] }, //已选择公式人员
  426. userInfo: this.$userInfo(),
  427. theResults: 1, //结果点击按钮
  428. theResultsList: {}, //点击的结果
  429. comtheResults: false, //切换结果控制
  430. theResultInp: '', //调整考核结果值
  431. theResultsButid: false,
  432. deleteNum: 0, //记录考核包人数
  433. isShowData: false,
  434. showData: [],
  435. all_process_done: false, //是否所有人都完成流程了
  436. all_finish: false, //是否已经归档
  437. isDerive: false,//导出执行人员
  438. level: '',
  439. levels: [],
  440. selectUser: [],
  441. pfIndex: 0,
  442. };
  443. },
  444. components: { PageHead, JxSearch, EmployeeSelector, BrawerBox },
  445. computed: {
  446. /* 选择节点名称 */
  447. getNode() {
  448. let name;
  449. this.navigationList.some(item => {
  450. if (item.id == this.navcli) {
  451. name = item.name;
  452. return true;
  453. }
  454. });
  455. return name;
  456. },
  457. getLeng() {
  458. let num = 0;
  459. this.scoreGroup.forEach(item => {
  460. if (item.check) {
  461. num += 1;
  462. }
  463. });
  464. return num;
  465. }
  466. },
  467. watch: {
  468. isChecks(val) {
  469. if (!val) {
  470. this.isAllSelectIndex = false;
  471. }
  472. },
  473. isAllSelectIndex(val) {
  474. this.scoreGroup.forEach(item => {
  475. if (!item.disabled) {
  476. item.check = val;
  477. }
  478. });
  479. },
  480. headValue(val) {
  481. if (!(this.options && this.options.length > 0)) return
  482. this.options.some(item => {
  483. if (item.id == val[0]) {
  484. item.list.some(e => {
  485. if (e.id == val[1]) {
  486. this.packageName = e.name;
  487. return true;
  488. }
  489. });
  490. return true;
  491. }
  492. });
  493. let arr = JSON.parse(JSON.stringify(val));
  494. arr.push(this.pushAssMan);
  495. this.$setCache('assessDetails', arr); //当点击考核记录进入详情,返后时要还原到之前的考核包
  496. this.asstabParams.package_id = val[val.length - 1];
  497. this.asstabParams.group_ids = []; //置空
  498. if (this.svaeNavcli) {
  499. this.navcli = this.svaeNavcli;
  500. this.asstabParams.doing_id = this.svaeNavcli; //置空
  501. this.svaeNavcli = 0;
  502. } else {
  503. this.navcli = 0;
  504. this.asstabParams.doing_id = 0; //置空
  505. }
  506. this.getInitData(this.asstabParams.package_id, () => { });
  507. this.assDelList(); //请求绩效详情列表
  508. this.getDcl();
  509. },
  510. employee_ids(val) {
  511. this.asstabParams.employee_ids = JSON.stringify(val);
  512. this.asstabParams.page = 1;
  513. this.assDelList();
  514. }
  515. },
  516. activated() {
  517. let that = this;
  518. let params = {
  519. cycle_type: 2, //周期类型
  520. keywords: '', //搜索字
  521. page: 1, //当期页
  522. page_size: 10,//一页多少数据
  523. is_manage_scope: 1,
  524. }
  525. let amfTabL;
  526. that.$axiosUser('get', '/api/pro/per/package/list', params)
  527. .then(res => {
  528. if (res.data.code == 1) {
  529. that.tableData = res.data.data.list;
  530. amfTabL = that.tableData[0];
  531. if (amfTabL) {
  532. that.asstabParams.package_id = amfTabL.id;
  533. that.pushAssMan = amfTabL.pushs ? amfTabL.pushs : null;
  534. that.svaeNavcli = amfTabL.navcli ? amfTabL.navcli : 0;
  535. that.asstabParams.doing_id = amfTabL.navcli ? amfTabL.navcli : 0;
  536. that.getInitData(this.asstabParams.package_id, () => { });
  537. that.assDelList(); //请求绩效详情列表
  538. that.getDcl();
  539. }
  540. }
  541. })
  542. },
  543. created() {
  544. let that = this;
  545. let params = {
  546. cycle_type: 2, //周期类型
  547. keywords: '', //搜索字
  548. page: 1, //当期页
  549. page_size: 10,//一页多少数据
  550. is_manage_scope: 1,
  551. }
  552. let amfTabL;
  553. that.$axiosUser('get', '/api/pro/per/package/list', params)
  554. .then(res => {
  555. if (res.data.code == 1) {
  556. that.tableData = res.data.data.list;
  557. amfTabL = that.tableData[0];
  558. if (amfTabL) {
  559. let assessDetails = that.$getCache('assessDetails'); //缓存的数据
  560. that.pushAssMan = amfTabL.pushs ? amfTabL.pushs : null;
  561. that.asstabParams.package_id = amfTabL.id;
  562. that.assessTree(amfTabL.cycle_type, amfTabL.id); //请求绩效树
  563. that.svaeNavcli = amfTabL.navcli ? amfTabL.navcli : 0;
  564. that.asstabParams.doing_id = amfTabL.navcli ? amfTabL.navcli : 0;
  565. that.props = {
  566. lazy: true,
  567. label: 'name',
  568. value: 'id',
  569. children: 'list',
  570. lazyLoad(node, resolve) {
  571. const { level } = node;
  572. that.getAssessTree(node, resolve);
  573. }
  574. }
  575. //回显绩效树的选中
  576. that.getAddEmployee();
  577. }
  578. }
  579. })
  580. },
  581. methods: {
  582. kspf(is) {
  583. let userInfo = this.selectUser[this.pfIndex];
  584. if (userInfo) {
  585. let data = {
  586. id: userInfo.id, //绩效包ID
  587. single: 1 //非单人
  588. };
  589. this.$axiosUser('post', '/api/pro/per/package/start_score', data).then(res => {
  590. if (!is) {
  591. if (!res.data.data.result) {
  592. let list = res.data.data.list;
  593. list.forEach(item => {
  594. item.successText = '失败';
  595. item.name = this.$getEmployeeMapItem(userInfo.employee_id).name;
  596. item.reason = item.reason;
  597. });
  598. this.showData.unshift(...list)
  599. } else {
  600. let data = {
  601. successText: '成功',
  602. name: this.$getEmployeeMapItem(userInfo.employee_id).name,
  603. reason: '已开始评分'
  604. }
  605. this.showData.unshift(data)
  606. }
  607. this.pfIndex++;
  608. this.kspf();
  609. } else {
  610. this.$message.success(res.data.msg);
  611. this.isChecks = false;
  612. this.getInitData(this.asstabParams.package_id);
  613. this.assDelList();
  614. }
  615. });
  616. } else {
  617. this.isChecks = false;
  618. this.getInitData(this.asstabParams.package_id);
  619. this.assDelList();
  620. }
  621. },
  622. pf(item) {
  623. //开始评分按钮
  624. if (item) {
  625. this.selectUser = [item];
  626. }
  627. if (this.selectUser.length == 0) {
  628. this.$message.warning('请选择开始评分的人员');
  629. return;
  630. }
  631. this.$confirm('所选员工的绩效考核将自动进入评分流程,确认开始评分?', '提示', {
  632. confirmButtonText: '确定',
  633. cancelButtonText: '取消'
  634. }).then(() => {
  635. if (this.selectUser.length == 1) {
  636. this.kspf(true);
  637. } else {
  638. this.pfIndex = 0;
  639. this.isShowData = true;
  640. this.kspf();
  641. }
  642. }).catch(() => { });
  643. },
  644. handleSelectionChange(val) {
  645. this.selectUser = val
  646. },
  647. confirmDerive(obj) {
  648. if (obj.employee.length == 0) {
  649. this.$message.error('请选择人员');
  650. return false;
  651. }
  652. let site_id = this.$getCache('site_info').id;
  653. let employee = obj.employee.map(item => {
  654. return item.id;
  655. });
  656. let url = `${this.$serverdomain}/api/pro/download/schedule?site_id=${site_id}&employee_ids=${JSON.stringify(employee)}&package_id=${this.asstabParams.package_id}&searcher_id=${this.userInfo.id
  657. }`;
  658. window.open(url, '_blank');
  659. },
  660. getPending() {
  661. let site_info = this.$getCache('site_info');
  662. let url = `${this.$serverdomain}/api/pro/download/doing_list?site_id=${site_info.id}&searcher_id=${this.userInfo.id}&package_id=${this.asstabParams.package_id}&node_type=${this.navcli
  663. }`;
  664. window.open(url, '_blank');
  665. },
  666. getDcl() {
  667. if (this.navcli == 0 || !this.$getRole(1)) {
  668. return false;
  669. }
  670. this.$axiosUser('get', 'api/pro/per/package/msg/doing_list', { package_id: this.asstabParams.package_id, node_type: this.navcli }).then(res => {
  671. let list = res.data.data.list;
  672. list.forEach(item => {
  673. let user = this.$getEmployeeMapItem(item.employee_id);
  674. if (!user) {
  675. return false;
  676. }
  677. item.dept_list = user.employee_detail.dept_list;
  678. item.name = user.name;
  679. item.img_url = user.img_url;
  680. });
  681. this.pending_employee_list = list;
  682. });
  683. },
  684. // 关闭
  685. close_list() {
  686. this.showData = [];
  687. },
  688. // 获取可被添加人员
  689. getAddEmployee(fun = function () { }) {
  690. this.$axiosUser('get', 'api/pro/per/package/get_subtraction_employee', { package_id: this.asstabParams.package_id }).then(res => {
  691. this.add_employee_list = res.data.data.list;
  692. fun();
  693. });
  694. },
  695. // 添加人员
  696. confirmUser(val) {
  697. let employee_ids = val.employee.map(item => {
  698. return item.id;
  699. });
  700. let data = {
  701. package_id: this.asstabParams.package_id,
  702. employee_ids: JSON.stringify(employee_ids)
  703. };
  704. this.$axiosUser('post', '/api/pro/per/package/add_package_employee', data).then(res => {
  705. this.$message.success('添加成功');
  706. this.isManagement = false;
  707. this.getInitData(this.asstabParams.package_id, () => { });
  708. this.assDelList();
  709. });
  710. },
  711. //删除人员
  712. confirmUser2(val) {
  713. this.$confirm('被考核人删除后,本次考核相关数据将被清空,无法恢复,请确认是否删除?', '删除确认', {
  714. confirmButtonText: '确定',
  715. cancelButtonText: '取消'
  716. })
  717. .then(() => {
  718. let employee_ids = val.employee.map(item => {
  719. return item.id;
  720. });
  721. let data = {
  722. package_id: this.asstabParams.package_id,
  723. employee_ids: JSON.stringify(employee_ids)
  724. };
  725. this.$axiosUser('post', '/api/pro/per/package/delete_package_employee', data).then(res => {
  726. if (employee_ids.length == this.deleteNum) {
  727. this.$alert('删除成功,考核包已无考核人员,该周期的绩效考核也会自动删除', '提示', {
  728. confirmButtonText: '确定',
  729. showClose: false,
  730. callback: action => {
  731. this.$router.go(-1);
  732. }
  733. });
  734. } else {
  735. this.$message.success('删除成功');
  736. this.isManagement = false;
  737. this.getInitData(this.asstabParams.package_id, () => { });
  738. this.assDelList();
  739. }
  740. });
  741. })
  742. .catch(() => { });
  743. },
  744. savecomtheResults(dataId, db) {
  745. this.theResultsButid = true;
  746. let data = {
  747. id: this.theResultsList.id,
  748. change_type: this.theResults,
  749. };
  750. if (this.theResults == 1) {
  751. data.point = this.theResultInp
  752. } else {
  753. if (!this.level) {
  754. this.$message.error('请选择新等级')
  755. this.theResultsButid = false;
  756. return false
  757. }
  758. data.level = this.level
  759. }
  760. this.$axiosUser('post', '/api/pro/per/package/adjustment', data)
  761. .then(res => {
  762. if (res.data.code == 1) {
  763. this.comtheResults = false;
  764. this.level = '';
  765. this.assDelList();
  766. }
  767. })
  768. .finally(() => {
  769. setTimeout(() => {
  770. this.theResultsButid = false;
  771. }, 300);
  772. });
  773. },
  774. theResultsOf1(data, num) {
  775. this.theResultsList = data;
  776. this.theResults = num;
  777. if (num == 2) {
  778. this.getLevels(data);
  779. return false
  780. }
  781. this.comtheResults = true;
  782. },
  783. getLevels(data) {
  784. this.$axiosUser('get', '/api/pro/per/package/levels', { pe_id: data.id }).then(res => {
  785. this.levels = res.data.data.levels
  786. this.comtheResults = true;
  787. });
  788. },
  789. // 更多-选择人员
  790. showSelectUser(index) {
  791. switch (index) {
  792. case 1:
  793. // this.getAddEmployee(() => {
  794. this.isShowUser = true;
  795. // });
  796. break;
  797. case 2:
  798. this.isShowUser2 = true;
  799. break;
  800. }
  801. },
  802. // 添加考核人
  803. openManagement() {
  804. this.$router.push({ path: '/addPersonnel', query: { packageId: this.asstabParams.package_id } });
  805. },
  806. // 提交公式结果
  807. confirmResult(val) {
  808. let noData = val.employee.map(item => {
  809. return item.id;
  810. });
  811. let publicity = {
  812. publicity: noData, //公布人员id列表
  813. concealment: [] //未公布人员id列表
  814. };
  815. this.$axiosUser('post', '/api/pro/per/package/edit_publicity', { id: this.asstabParams.package_id, publicity: JSON.stringify(publicity) }).then(res => {
  816. this.$message.success('操作成功');
  817. this.assDelList();
  818. this.getInitData(this.asstabParams.package_id, () => { });
  819. });
  820. },
  821. // 更多
  822. handleCommand(val) {
  823. switch (val) {
  824. case 'a': //等级配置
  825. this.$router.push({
  826. path: '/classDtail',
  827. query: {
  828. packageName: this.packageName,
  829. packageId: this.asstabParams.package_id,
  830. employee_list: JSON.stringify(this.employee_list)
  831. }
  832. });
  833. break;
  834. case 'b': //公式结果
  835. this.isResult = true;
  836. break;
  837. case 'c': //导出明细
  838. this.$axiosUser('get', '/api/pro/per/package/export/detail', { package_id: this.asstabParams.package_id }).then(res => {
  839. this.$alert('系统正在处理中,处理完将在工作台以“消息”形式通知您,请留意消息通知', '提示', {
  840. confirmButtonText: '我知道了',
  841. callback: action => { }
  842. });
  843. });
  844. break;
  845. case 'd': //导出结果
  846. this.$axiosUser('get', '/api/pro/per/package/export/result', { package_id: this.asstabParams.package_id }).then(res => {
  847. this.$alert('系统正在处理中,处理完将在工作台以“消息”形式通知您,请留意消息通知', '提示', {
  848. confirmButtonText: '我知道了',
  849. callback: action => { }
  850. });
  851. });
  852. break;
  853. case 'g': //管理
  854. this.isManagement = true;
  855. break;
  856. case 'h': //归档
  857. this.pigeonhole();
  858. break;
  859. case 'y': //批量修改目标值
  860. this.$router.push({ path: '/updateTarget', query: { packageId: this.asstabParams.package_id, packageName: this.packageName, index: '2' } });
  861. break;
  862. case 'j': //批量修改目标值
  863. this.$router.push({ path: '/updateTarget', query: { packageId: this.asstabParams.package_id, packageName: this.packageName, index: '1' } });
  864. break;
  865. case 'k': //批量修改目标值
  866. this.isDerive = true;
  867. break;
  868. }
  869. },
  870. // 归档
  871. pigeonhole() {
  872. this.$confirm('为保证统计数据一致且正确,归档操作不可撤销,归档后不能再修改考核内容,请确认考核信息无误后再归档。', '提示', {
  873. confirmButtonText: '确定',
  874. cancelButtonText: '取消',
  875. type: 'warning'
  876. })
  877. .then(() => {
  878. this.$axiosUser('post', '/api/pro/per/package/change_finish', { package_id: this.asstabParams.package_id }).then(res => {
  879. this.$message.success('操作成功');
  880. this.getInitData(this.asstabParams.package_id);
  881. });
  882. })
  883. .catch(() => { });
  884. },
  885. isSelectable(row, index) {
  886. this.nowass = row.all_exec_over ? true : false;
  887. if (row.all_exec_over) {
  888. return false;
  889. } else {
  890. return true;
  891. }
  892. },
  893. //发起考核
  894. amhrsponsor() {
  895. this.$router.push({ name: 'sponsorAssess' });
  896. },
  897. //开始评分
  898. startisChecks() {
  899. this.isChecks = true;
  900. },
  901. // 页面变更
  902. handleCurrentChange(val) {
  903. this.asstabParams.page = val;
  904. this.assDelList();
  905. },
  906. // 页面跳转
  907. handleSizeChange(val) {
  908. this.asstabParams.page_size = val;
  909. this.assDelList();
  910. },
  911. getInitData(id, fun = function () { }) {
  912. this.isLoad = true;
  913. this.$axiosUser('get', '/api/pro/per/package/info_v3_aid', { package_id: id }).then(res => {
  914. let groups = res.data.data.groups;
  915. this.all_finish = res.data.data.all_finish;
  916. this.all_process_done = res.data.data.all_process_done;
  917. this.dropdownMenu.forEach((item, index) => {
  918. if (item.key == 'h' && !this.all_finish && this.all_process_done) {
  919. if (this.all_finish) {
  920. this.$set(this.dropdownMenu[index], 'isShow', false);
  921. } else {
  922. this.$set(this.dropdownMenu[index], 'isShow', true);
  923. }
  924. }
  925. });
  926. groups.forEach(item => {
  927. item.check = false;
  928. if (item.all_exec_over) {
  929. item.disabled = true;
  930. }
  931. });
  932. this.groupOptions = groups; //考核模板下拉
  933. this.scoreGroup = groups; //评分考核模板
  934. this.GroupList = groups; //考核模板搜索
  935. // 公式结果数据
  936. let employees = res.data.data.employees;
  937. let employee_list = [];
  938. let employee = [];
  939. employees.forEach(item => {
  940. employee_list.push(this.$getEmployeeMapItem(item.id));
  941. if (item.publicity) {
  942. employee.push(this.$getEmployeeMapItem(item.id));
  943. }
  944. });
  945. this.employee_list = employee_list;
  946. this.selected.employee = employee;
  947. this.employees = employees;
  948. // 设置各节点数量
  949. let statistics = res.data.data.statistics;
  950. let navigationList = JSON.parse(JSON.stringify(this.navigationList));
  951. let sum = 0;
  952. navigationList.forEach(item => {
  953. if (item.id == 0) item.name = "考核周期: " + this.date_remark
  954. item.num = statistics[item.id]
  955. if (item.id != 0) {
  956. sum += statistics[item.id]
  957. }
  958. })
  959. navigationList[0].num = sum;
  960. this.navigationList = navigationList;
  961. fun();
  962. }).finally(() => {
  963. this.isLoad = false;
  964. });
  965. },
  966. assDelList() {
  967. this.assDetLoad = true;
  968. this.$axiosUser('get', '/api/pro/per/package/info_v3', this.asstabParams).then(res => {
  969. let list = res.data.data.list || [];
  970. list.forEach(item => {
  971. let user = this.$getEmployeeMapItem(item.employee_id);
  972. if (user.employee_detail) {
  973. item.dept_list = user.employee_detail.dept_list;
  974. } else {
  975. item.dept_list = [];
  976. }
  977. item.name = user.name;
  978. item.img_url = user.img_url;
  979. if (item.todo.length > 0) {
  980. item.todo.forEach(e => {
  981. e.userInfo = this.$getEmployeeMapItem(e.employee_id);
  982. });
  983. }
  984. });
  985. this.asstabData = list;
  986. this.total = res.data.data.total;
  987. this.date_remark = res.data.data.date_remark;
  988. this.navigationList.forEach(item => {
  989. if (item.id == 0) item.name = "考核周期: " + this.date_remark
  990. })
  991. }).finally(() => {
  992. this.assDetLoad = false;
  993. });
  994. },
  995. groupChange(data) {
  996. //考核模板选中
  997. this.asstabParams.page = 1;
  998. if (data) {
  999. this.asstabParams.group_ids = JSON.stringify([data]);
  1000. } else {
  1001. this.asstabParams.group_ids = JSON.stringify([]);
  1002. }
  1003. this.assDelList();
  1004. },
  1005. // 开始评分
  1006. beginGrade() {
  1007. let multipleSelection = [];
  1008. let employeeMap = this.$getEmployeeMapAll();
  1009. this.scoreGroup.forEach(item => {
  1010. if (item.check && item.exec_list.length > 0) {
  1011. item.exec_list.forEach(item2 => {
  1012. item2.id = item2.pe_id
  1013. multipleSelection.push(item2);
  1014. })
  1015. }
  1016. });
  1017. //开始评分按钮
  1018. if (multipleSelection.length == 0) {
  1019. this.$message.warning('请选择开始评分的考核模板');
  1020. return;
  1021. }
  1022. this.selectUser = multipleSelection
  1023. this.pf();
  1024. return false
  1025. this.$confirm('所选考核模板员工的绩效考核将自动进入评分流程,确认开始评分?', '提示', {
  1026. confirmButtonText: '确定',
  1027. cancelButtonText: '取消'
  1028. }).then(() => {
  1029. let data = {
  1030. package_id: this.asstabParams.package_id, //绩效包ID
  1031. group_ids: JSON.stringify(multipleSelection), //考核模板列表
  1032. single: 0 //非单人
  1033. };
  1034. this.$axiosUser('post', '/api/pro/per/package/start_score', data).then(res => {
  1035. if (!res.data.data.result) {
  1036. let list = res.data.data.list;
  1037. list.forEach(item => {
  1038. item.successText = item.success ? '成功' : '失败';
  1039. item.name = employeeMap[item.employee_id].name;
  1040. item.reason = item.success ? '已开始评分' : item.reason;
  1041. });
  1042. this.showData = list;
  1043. this.isShowData = true;
  1044. } else {
  1045. this.$message.success(res.data.msg);
  1046. }
  1047. this.isChecks = false;
  1048. this.assDelList(); //请求绩效详情列表
  1049. });
  1050. }).catch(() => { });
  1051. },
  1052. getAssessTree(node, resolve) {
  1053. if (this.options && this.options.length == 0) {
  1054. return
  1055. }
  1056. this.tableDataLoad = true;
  1057. this.$axiosUser('get', 'api/pro/per/package/list', { page: 0, is_manage_scope: 1, cycle_type: node.value }).then(res => {
  1058. let data = res.data.data.list;
  1059. data.forEach(item => {
  1060. item.leaf = true;
  1061. })
  1062. resolve(data)
  1063. }).finally(() => {
  1064. this.tableDataLoad = false;
  1065. });
  1066. },
  1067. //请求绩效树
  1068. assessTree(id, id2) {
  1069. this.assDetLoad = true;
  1070. this.$axiosUser('get', '/api/pro/per/package/list', { page: 0, is_manage_scope: 1 }).then(res => {
  1071. if (res.data.code == 1) {
  1072. let data = res.data.data.list;
  1073. data.forEach(item => {
  1074. item.leaf = true;
  1075. })
  1076. let arr = [
  1077. { name: '月度', id: 2, list: [] },
  1078. { name: '日', id: 1, list: [] },
  1079. { name: '季度', id: 3, list: [] },
  1080. { name: '半年度', id: 4, list: [] },
  1081. { name: '年度', id: 5, list: [] },
  1082. { name: '自定义', id: 6, list: [] }
  1083. ];
  1084. let arr2 = [
  1085. { name: '月度', id: 2, list: [] },
  1086. { name: '日', id: 1, list: [] },
  1087. { name: '季度', id: 3, list: [] },
  1088. { name: '半年度', id: 4, list: [] },
  1089. { name: '年度', id: 5, list: [] },
  1090. { name: '自定义', id: 6, list: [] }
  1091. ];
  1092. data.forEach(item => {
  1093. arr.forEach(item2 => {
  1094. if (item2.id == item.cycle_type) {
  1095. item2.list.push(item);
  1096. }
  1097. });
  1098. });
  1099. arr.some((item, index) => {
  1100. if (item.id == id) {
  1101. arr2[index].list = item.list;
  1102. return true;
  1103. }
  1104. });
  1105. this.options = arr2;
  1106. this.$nextTick(() => {
  1107. this.headValue.push(id, id2);
  1108. })
  1109. }
  1110. });
  1111. },
  1112. navClick(item) {
  1113. this.navcli = item.id;
  1114. this.asstabParams.page = 1;
  1115. this.asstabParams.doing_id = item.id;
  1116. this.getDcl();
  1117. this.assDelList();
  1118. },
  1119. dept_confirm(data) {
  1120. //部门选择
  1121. this.dept_selected = { dept: [], employee: [] };
  1122. this.deptList_id = [];
  1123. this.deptVisibleName = '';
  1124. if (data.dept !== null && data.dept.length != 0) {
  1125. this.dept_selected = data;
  1126. data.dept.forEach((element, index) => {
  1127. this.deptList_id.push(element.dept_id);
  1128. this.deptVisibleName += element.dept_name;
  1129. if (data.dept.length - index > 1) {
  1130. this.deptVisibleName += ',';
  1131. }
  1132. });
  1133. }
  1134. this.asstabParams.page = 1;
  1135. this.asstabParams.dept_ids = JSON.stringify(this.deptList_id);
  1136. this.assDelList();
  1137. },
  1138. assDetClick(row) {
  1139. //列表点击
  1140. this.$router.push({
  1141. path: '/staffAssDet',
  1142. query: { assID: this.asstabParams.package_id, employeeID: row.id, employeeIDs: row.employee_id }
  1143. });
  1144. },
  1145. braSearch(data) {
  1146. //评分搜索
  1147. this.scoreGroup = this.GroupList.filter(item => item.name.includes(data));
  1148. }
  1149. },
  1150. beforeRouteLeave(to, from, next) {
  1151. if (to.name != 'staffAssDet') {
  1152. localStorage.removeItem('assessDetails');
  1153. }
  1154. next();
  1155. }
  1156. };
  1157. </script>
  1158. <style scoped lang="scss">
  1159. /* 归档图片动画 */
  1160. .guidang {
  1161. margin-left: auto;
  1162. width: 70px;
  1163. animation: example 1s;
  1164. }
  1165. @keyframes example {
  1166. from {
  1167. transform: scale(1.4);
  1168. }
  1169. to {
  1170. transform: scale(1);
  1171. }
  1172. }
  1173. /* 归档图片动画 */
  1174. .all {
  1175. position: relative;
  1176. font-size: 14px;
  1177. background-color: #fff;
  1178. padding: 10px 20px;
  1179. box-sizing: border-box;
  1180. }
  1181. .navsvg1 {
  1182. font-size: 15px;
  1183. position: relative;
  1184. margin-top: 2px;
  1185. }
  1186. .navsvg2 {
  1187. width: 4px;
  1188. height: 20px;
  1189. background-color: #e1e1e1;
  1190. margin: -20px 30px 0 30px;
  1191. }
  1192. .navsvg3 {
  1193. margin: -20px 20px 0 20px;
  1194. color: #e1e1e1;
  1195. display: block;
  1196. font-size: 18px;
  1197. }
  1198. header {
  1199. margin-top: 15px;
  1200. .dept_wdiv {
  1201. width: 200px;
  1202. position: relative;
  1203. .dept_inp {
  1204. width: 100%;
  1205. height: 38px;
  1206. position: absolute;
  1207. top: 0;
  1208. right: 0;
  1209. left: 0;
  1210. bottom: 0;
  1211. z-index: 9;
  1212. border: 1px solid #e0e0e0;
  1213. border-radius: 3px;
  1214. line-height: 32px;
  1215. font-size: 12px;
  1216. padding: 0 10px;
  1217. overflow: hidden;
  1218. white-space: nowrap;
  1219. text-overflow: ellipsis;
  1220. cursor: pointer;
  1221. color: #676767;
  1222. }
  1223. i {
  1224. position: absolute;
  1225. top: 0;
  1226. right: 0;
  1227. top: 10px;
  1228. right: 10px;
  1229. font-size: 14px;
  1230. color: #b5b5b5;
  1231. }
  1232. }
  1233. .navigationL {
  1234. width: 100%;
  1235. margin: 30px 0;
  1236. span {
  1237. display: flex;
  1238. cursor: pointer;
  1239. font-size: 14px;
  1240. width: 180px;
  1241. height: 60px;
  1242. position: relative;
  1243. border-radius: 3px;
  1244. align-items: center;
  1245. justify-content: center;
  1246. color: #303133;
  1247. background-color: #ecf5ff;
  1248. margin-bottom: 20px;
  1249. }
  1250. span:hover {
  1251. color: #428eff;
  1252. border: 1px solid #409EFF;
  1253. background-color: #ecf5ff;
  1254. }
  1255. /deep/ .action {
  1256. color: #428eff;
  1257. border: 1px solid #409EFF;
  1258. background-color: #ecf5ff;
  1259. }
  1260. }
  1261. /deep/ .el-table tr:hover {
  1262. cursor: pointer;
  1263. }
  1264. }
  1265. .braTab {
  1266. padding: 20px 0 0 20px;
  1267. /deep/ .el-table tr:hover {
  1268. cursor: pointer;
  1269. }
  1270. /deep/ .el-table__row {
  1271. .cell {
  1272. padding-left: 10px;
  1273. }
  1274. }
  1275. /deep/ td .cell {
  1276. padding: 10px 0;
  1277. }
  1278. }
  1279. .margin-l {
  1280. margin-left: 10px;
  1281. }
  1282. .width-300 {
  1283. width: 300px;
  1284. }
  1285. .m-content {}
  1286. .m-title {
  1287. color: #909399;
  1288. }
  1289. .ul {
  1290. margin: 20px 0;
  1291. margin-top: 0;
  1292. }
  1293. .li {
  1294. border-bottom: 1px solid #ebebeb;
  1295. }
  1296. .li .flex-box-ce {
  1297. padding: 15px 0;
  1298. }
  1299. .li:hover {
  1300. background-color: #f5f7fa;
  1301. }
  1302. </style>