home.vue 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690
  1. <template>
  2. <div class="">
  3. <div class="flex-box ts flex-center-center" v-if="isSubject">
  4. <img mode="scaleToFill" src="./assets/image/tz.png" />
  5. <div class="flex-1">你正在使用个人体验版,如需正式使用,请联系管理员</div>
  6. <div class="btn" type="primary" @click="openGly">联系管理员</div>
  7. </div>
  8. <el-row style="min-width:1160px;">
  9. <el-col :span="18" style="min-width:780px;">
  10. <el-row class="home-left-header">
  11. <el-col :span="7" class="hlheader-user" v-loading="">
  12. <el-row :gutter="40">
  13. <el-col :span="24" class="hlheader-user-info">
  14. <div class="headimg" style=" margin-right: 0px;cursor:pointer;">
  15. <userImage :user_name="user_info.name" :img_url="user_info.img_url" fontSize="1.1" width="60px" height="60px"></userImage>
  16. </div>
  17. <div class="headtext">
  18. <div class="greetings" style="margin-top:7px;">
  19. <div style="margin-top:2px;">{{ user_info.name }}</div>
  20. &nbsp;
  21. <span style="margin-top:2px;">
  22. {{
  23. time <= 4
  24. ? '夜深了'
  25. : time > 4 && time <= 11
  26. ? '早上好'
  27. : time > 11 && time <= 14
  28. ? '中午好'
  29. : time > 14 && time <= 19
  30. ? '下午好'
  31. : time > 19 && time <= 24
  32. ? '晚上好'
  33. : ''
  34. }}
  35. </span>
  36. </div>
  37. <p style="margin-top: 16px; color: #666;">
  38. <span>
  39. {{
  40. time <= 4
  41. ? '烦恼尽退散'
  42. : time > 4 && time <= 11
  43. ? '又是美好的一天'
  44. : time > 11 && time <= 14
  45. ? '吃饱睡好更有动力'
  46. : time > 14 && time <= 19
  47. ? '致敬奋斗中的自己'
  48. : time > 19 && time <= 24
  49. ? '该养精蓄锐了'
  50. : ''
  51. }}
  52. </span>
  53. </p>
  54. </div>
  55. </el-col>
  56. </el-row>
  57. </el-col>
  58. <el-col :span="17" style="margin:0;padding:0;" v-if="creatorJurisdiction">
  59. <el-col :gutter="50" style="margin:0;padding:34px 0 0 0;" class="quick_button_box">
  60. <div style="display:flex;justify-content: space-around;">
  61. <div v-for="(item, index) in fits" :key="index" @click="openGzd(item.url)" style="display:flex;cursor:pointer;padding:0 5px 0 5px">
  62. <img :src="item.img" style="width:46px;height:46px;margin:10px 5px 0 0" />
  63. <p style="display: inline-block;width:100%;">
  64. <b style="display: inline-block;color:#303133;font-size:16px;margin-top:11px;">{{ item.name }}</b>
  65. <br />
  66. <span style="color:#606266;font-size:12px;display: inline-block;margin-top:8px;">{{ item.value }}</span>
  67. </p>
  68. </div>
  69. </div>
  70. </el-col>
  71. </el-col>
  72. <el-col v-else :span="17" style="margin-top:34px;padding:0 0 10px 0;height:58px;" v-loading="authorityManagerHeaderLoad">
  73. <el-col :gutter="50" style="margin:0;padding:0;" class="quick_button_box">
  74. <div style="display:flex;justify-content: space-around;">
  75. <p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/individual_statistics' })">
  76. <b style="color:#26A2FF;font-size:27px;">{{ headDayBs.b ? headDayBs.b : '0' }}</b>
  77. <br />
  78. <span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">今日B分</span>
  79. </p>
  80. <p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/individual_statistics' })">
  81. <b style="color:#26A2FF;font-size:27px;">{{ authorityManagerHeaders.b ? authorityManagerHeaders.b : '0' }}</b>
  82. <br />
  83. <span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月B分</span>
  84. </p>
  85. <p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/individual_statistics' })">
  86. <b style="color:#26A2FF;font-size:27px;">{{ authorityManagerHeaders.a ? authorityManagerHeaders.a : '0' }}</b>
  87. <br />
  88. <span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月A分</span>
  89. </p>
  90. <p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/my_task' })">
  91. <b style="color:#26A2FF;font-size:27px;">
  92. {{
  93. authorityManagerHeaders.performance
  94. ? authorityManagerHeaders.performance.complete_count + '/' + authorityManagerHeaders.performance.total_count
  95. : '0/0'
  96. }}
  97. </b>
  98. <br />
  99. <span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月任务进度</span>
  100. </p>
  101. </div>
  102. </el-col>
  103. </el-col>
  104. </el-row>
  105. <el-row class="left-all-style">
  106. <el-row>
  107. <el-col :span="22"><span class="title">排行榜</span></el-col>
  108. <el-col :span="2"><span class="noremind" @click="$router.push({ path: RankingPush })">查看详情</span></el-col>
  109. </el-row>
  110. <div v-loading="tabPositionLoad">
  111. <div style="width:100%;height:30px;margin-top:20px;">
  112. <el-radio-group v-model="tabPosition" style="margin-bottom: 30px;display:flex">
  113. <div v-for="(item, index) in rankingList" :key="index" style="">
  114. <el-radio-button :label="item.val" @click.native="tabPositions($event, item)">
  115. <span style="width:84px;coloe:#606266;display: block;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;">
  116. {{ item.group_name }}
  117. </span>
  118. </el-radio-button>
  119. </div>
  120. </el-radio-group>
  121. </div>
  122. <div style="display:flex;margin-top:16px;padding-top:24px;height:100%;" v-loading="addUpRankingLoad">
  123. <div class="nopoint_box" style="" v-if="rankingListDetails.length == 0">
  124. <div class="noimg" style="margin:0;"></div>
  125. <span class="title1" style="margin:0;">暂无积分数据</span>
  126. </div>
  127. <div v-else v-for="(item, index) in rankingListDetails" :key="index" style="text-align:center;width:80px;cursor:pointer;margin:0 20px;">
  128. <div class="" style="cursor:pointer;position: relative;height: 60px;">
  129. <svg-icon
  130. v-if="item.rank <= 3"
  131. :icon-class="item.rank == 1 ? 'first' : item.rank == 2 ? 'secondPlace' : item.rank == 3 ? 'third' : ''"
  132. style="z-index:1;position: absolute;left: 26px;top: -18px;font-size:28px;"
  133. />
  134. <div
  135. v-if="item.rank == 4 || item.rank == 5"
  136. style="z-index:1;position: absolute;left: 27px;top: -14px;width:24px;height:24px;border:1px solid #C0C4CC;border-radius:50%;background-color:#fff;font-size:12px;text-align-center;line-height:24px;color:#303133;"
  137. >
  138. <b style="">{{ item.rank }}</b>
  139. </div>
  140. <div
  141. v-if="item.employee_id == user_info.id && index == 0 && item.rank > 3"
  142. style="z-index:1;position: absolute;left: 26px;top: -14px;width:25px;height:25px;border:1px solid #C0C4CC;border-radius:50%;background-color:#fff;font-size:12px;text-align-center;line-height:24px;color:#303133;"
  143. >
  144. <b>{{ item.rank }}</b>
  145. </div>
  146. <div style="position: absolute;left: 8px;top: -16px;z-index:2;">
  147. <div
  148. v-if="index == 5 || index == 6"
  149. style="width:60px;height:24px;border:1px solid #C0C4CC;background-color:#fff;border-radius:20px;font-size:12px;color:#303133;text-align:center;line-height:24px"
  150. >
  151. <b>{{ index == 5 ? '倒数第2' : index == 6 ? '倒数第1' : '' }}</b>
  152. </div>
  153. </div>
  154. <userImage :img_url="item.employee_img_url" fontSize="1" :user_name="item.employee_name" width="60px" height="60px"></userImage>
  155. </div>
  156. <span
  157. style="color:#303133;font-size:14px;text-align:center;margin-top:10px;display: inline-block;width:100%;display: block;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"
  158. >
  159. {{ item.employee_name }}
  160. <span v-if="item.employee_id == user_info.id">(我)</span>
  161. </span>
  162. </div>
  163. </div>
  164. </div>
  165. </el-row>
  166. <el-row class="left-all-style">
  167. <el-row style="">
  168. <el-col :span="24"><b class="title" style="margin-bottom:15px;display:block">积分构成</b></el-col>
  169. <div v-loading="IntegralFormChartLoad">
  170. <el-col :span="5" style="position: relative;left:10px;z-index:1;margin-top:10px;" v-if="!this.employeeRout">
  171. <el-cascader
  172. v-model="dept_name1"
  173. :options="dept_tree"
  174. @change="dept1_null"
  175. :props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
  176. ref="dept1"
  177. filterable
  178. change-on-select
  179. placeholder="请选择部门"
  180. clearable
  181. ></el-cascader>
  182. </el-col>
  183. <div class="nopoint_box" style="height:325px;" v-show="IntegralFormnone">
  184. <div class="noimg" style="width: 150px;height: 150px;margin-top:94px;"></div>
  185. <span class="title1">
  186. 暂无积分数据,
  187. <span v-if="$supremeAuthority()!='employee'" @click="$router.push({ path: '/award_punish' })" style="color:#409EFF;cursor:pointer;">去奖扣积分></span>
  188. </span>
  189. </div>
  190. <div v-show="!IntegralFormnone" style="margin-top:20px;"><div ref="IntegralFormChart" :style="{ width: '100%', height: '400px' }"></div></div>
  191. </div>
  192. </el-row>
  193. </el-row>
  194. <el-row class="left-all-style">
  195. <el-row style="">
  196. <el-col :span="24" style="display:flex">
  197. <b class="title" style="margin:0 20px 15px 0;display:block">本月积分情况</b>
  198. <el-checkbox v-model="exclusiveMonthChecked">不包含自动积分加分项</el-checkbox>
  199. </el-col>
  200. <div v-loading="monthlyIntegralloading">
  201. <el-col :span="5" style="position: relative;left:10px;z-index:1;" v-if="!this.employeeRout">
  202. <el-cascader
  203. v-model="dept_name2"
  204. :options="dept_tree"
  205. @change="monthlyIntegralchange"
  206. :props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
  207. ref="dept2"
  208. filterable
  209. change-on-select
  210. placeholder="请选择部门"
  211. clearable
  212. ></el-cascader>
  213. </el-col>
  214. <div class="nopoint_box" style="height:381px;" v-if="monthlyIntegralnone">
  215. <div class="noimg" style="width: 150px;height: 150px;margin-top:90px;"></div>
  216. <span class="title1">暂无积分数据</span>
  217. </div>
  218. <div v-show="!monthlyIntegralnone">
  219. <div ref="monthlyIntegralChart" :style="{ width: '100%', height: '350px', marginTop: '40px' }"></div>
  220. <div style="width:90%;display:flex;justify-content: space-around;margin-top:30px;padding-left:40px">
  221. <p v-for="(item, index) in monthlyIntegralList" :key="index" style="text-align:center">
  222. <b style="display:block;color:#303133;font-size:18px;" v-if="index < 3">
  223. {{ index == 0 ? item.total_point : index == 1 ? item.reward_point : index == 2 ? item.deduction_point : '' }}
  224. </b>
  225. <b style="display:block;color:#303133;font-size:18px;" v-else-if="index == 3">{{ item.ratio == -1 ? '—' : item.ratio + ':1' }}</b>
  226. <b style="display:block;color:#303133;font-size:18px;" v-else>
  227. {{ item.toRatio.ratio + '%' }}
  228. <svg-icon
  229. :icon-class="item.toRatio.type == 1 ? 'litrearrows' : item.toRatio.type == 2 ? 'droparrows' : ''"
  230. style="font-size:10px;margin-bottom:2px"
  231. />
  232. </b>
  233. <span style="color:rgb(48, 49, 51);font-size:14px;margin-top:5px;display:block;">{{ item.name }}</span>
  234. </p>
  235. </div>
  236. </div>
  237. </div>
  238. </el-row>
  239. </el-row>
  240. <el-row v-if="!this.employeeRout" class="left-all-style" style="">
  241. <el-row style="">
  242. <el-col :span="24"><b class="title" style="margin-bottom:15px;display:block">管理者奖扣任务执行情况</b></el-col>
  243. <div v-loading="ManagerSAwardloading">
  244. <el-col :span="5" style="position: relative;left:10px;z-index:1;">
  245. <el-cascader
  246. v-model="dept_name3"
  247. :options="dept_tree"
  248. @change="ManagerSAwardlchange"
  249. :props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
  250. ref="dept3"
  251. filterable
  252. change-on-select
  253. placeholder="请选择部门"
  254. clearable
  255. ></el-cascader>
  256. </el-col>
  257. <div class="nopoint_box" style="height:401px;" v-if="ManagerSAwardnone">
  258. <div class="noimg" style="width: 150px;height: 170px;margin-top:90px;"></div>
  259. <span class="title1">暂无积分数据</span>
  260. </div>
  261. <div v-show="!ManagerSAwardnone" :style="{ width: widths }">
  262. <div ref="ManagerSAwardChart" :style="{ width: widths, height: '400px', marginTop: '40px' }"></div>
  263. <div style="width:90%;display:flex;justify-content: space-around;padding-left:40px">
  264. <p
  265. v-for="(item, index) in ManagerSAwardlList"
  266. :key="index"
  267. style="z-index:1;"
  268. class="ManagerSAwardlStyle"
  269. @click="$router.push({ path: '/manager_statistics' })"
  270. >
  271. <b class="ManagerSAwardlStyleB" v-if="index != 2">{{ item.val }}</b>
  272. <b class="ManagerSAwardlStyleB" v-else-if="index == 2">{{ item.val == -1 ? '—' : item.val + ':1' }}</b>
  273. <span class="ManagerSAwardlStyleSpan">{{ item.name }}</span>
  274. </p>
  275. </div>
  276. </div>
  277. </div>
  278. </el-row>
  279. </el-row>
  280. </el-col>
  281. <el-col :span="6" style="min-width:280px;">
  282. <el-row v-if="!creatorJurisdiction">
  283. <div class="right-all-style" style="background-color:#fff;padding:20px;;text-align:left;margin-bottom: 10px;">
  284. <span class="title">常用</span>
  285. <div>
  286. <span v-for="(item, index) in inCommonUse" :key="index" @click="$router.push({ path: item.push })" class="inCommonUseStyle">
  287. <img :src="item.image" alt="" style="width:31px;height:31px;margin:11px 10% 0 8%;" />
  288. <b>{{ item.name }}</b>
  289. </span>
  290. </div>
  291. </div>
  292. </el-row>
  293. <el-row>
  294. <div class="right-all-style" v-loading="highestPrizeBuckleloading" style="background:#fff;padding: 20px 20px 0;">
  295. <span class="title">待我审批({{ auditList.length }})</span>
  296. <div class="nopoint_box" v-if="auditList.length == 0">
  297. <div class="noimg"></div>
  298. <span class="title1" style="padding-bottom:20px;">还没有待我审批</span>
  299. </div>
  300. <div v-else style="padding:20px 0 20px 0;" class="flex-box-v">
  301. <div
  302. v-for="(item, index) in auditList"
  303. class="List_border"
  304. :key="index"
  305. style="cursor:pointer;display:flex;padding-top:10px;"
  306. @click="openDetail(item)"
  307. >
  308. <userImage width="45px" height="45px" :id="item.employee_id" :user_name="item.employee_name" style="margin-right:8px"></userImage>
  309. <div class="rightexamineAndApproveList2">
  310. <p style="width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#303133;font-size:16px">
  311. <b>
  312. {{ item.employee_name
  313. }}{{
  314. item.source_type == 1
  315. ? '的积分任务'
  316. : item.source_type == 2
  317. ? '的积分申请'
  318. : item.source_type == 3
  319. ? '的积分录入'
  320. : item.source_type == 4
  321. ? '的绩效工作'
  322. : ''
  323. }}
  324. </b>
  325. </p>
  326. <p
  327. style="padding:10px 0;font-size:13px;line-height:20px;color:#303133;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; "
  328. >
  329. {{ item.remark.rule || item.remark.customize }}
  330. </p>
  331. <div style="display:flex;padding-bottom:10px;justify-content: space-between;">
  332. <span style="color:#909399">{{ item.event_time }}</span>
  333. <div><span style="color:#26A2FF;cursor:pointer">审批</span></div>
  334. </div>
  335. </div>
  336. </div>
  337. <div
  338. class="more"
  339. v-show="auditList.length >= 3"
  340. style="text-align: center;color: #909399;font-size: 14px; padding:16px 16px 0 16px; cursor: pointer;"
  341. @click="$router.push({ path: '/approval_list' })"
  342. >
  343. 查看更多
  344. </div>
  345. </div>
  346. </div>
  347. </el-row>
  348. <el-row>
  349. <div class="right-all-style" v-loading="highestPrizeBuckleloading" style="background:#fff;padding: 20px 20px 0;">
  350. <span class="title">本周奖分最高</span>
  351. <div class="nopoint_box" v-if="!prize.id">
  352. <div class="noimg"></div>
  353. <span class="title1" style="padding-bottom:20px;">暂无积分数据</span>
  354. </div>
  355. <div v-else style="display:flex;padding:20px 0 20px 0;">
  356. <userImage width="45px" height="45px" :user_name="prize.name" fontSize=".9" style="margin-right:8px"></userImage>
  357. <div class="rightexamineAndApproveList" style="border:0px">
  358. <p
  359. style="width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#73767c;font-size:16px;display:flex;justify-content: space-between;"
  360. >
  361. <b style="color:#303133;font-size:16px;margin:0px 0 0 5px;">{{ prize.name }}</b>
  362. <span style="color:#26A2FF;font-size:16px;">
  363. <span v-if="prize.point > 0">+</span>
  364. {{ prize.point }} B分
  365. </span>
  366. </p>
  367. <p
  368. style="margin:8px 0 0 5px;font-size:13px;line-height:20px;color:#303133;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:3;"
  369. >
  370. {{ prize.remark ? prize.remark.customize : '' }}
  371. </p>
  372. </div>
  373. </div>
  374. </div>
  375. </el-row>
  376. <el-row>
  377. <div class="right-all-style" v-loading="highestPrizeBuckleloading" style="background:#fff;padding: 20px 20px 0;">
  378. <span class="title">本周扣分最多</span>
  379. <div class="nopoint_box" v-if="!buckle.id">
  380. <div class="noimg"></div>
  381. <span class="title1" style="padding-bottom:10px;">暂无积分数据</span>
  382. </div>
  383. <div v-else style="display:flex;padding:20px 0 20px 0;">
  384. <userImage width="45px" height="45px" :user_name="buckle.name" fontSize=".9" style="margin-right:8px"></userImage>
  385. <div class="rightexamineAndApproveList">
  386. <p
  387. style="width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#73767c;font-size:16px;display:flex;justify-content: space-between;"
  388. >
  389. <b style="color:#303133;font-size:16px;margin:0px 0 0 5px;">{{ buckle.name }}</b>
  390. <span style="color:#FF9600;font-size:16px;">{{ buckle.point }} B分</span>
  391. </p>
  392. <p
  393. style="margin:8px 0 0 5px;font-size:13px;line-height:20px;color:#303133;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:3;"
  394. >
  395. {{ buckle.remark ? buckle.remark.customize : '' }}
  396. </p>
  397. </div>
  398. </div>
  399. </div>
  400. </el-row>
  401. <el-row>
  402. <div class="right-all-style" v-loading="announLoad" style="background:#fff;padding: 20px 20px 20px 20px;">
  403. <div style="display:flex;justify-content: space-between;">
  404. <span class="title">系统通知</span>
  405. <span v-if="announcement.title" @click="$router.push({ path: '/update_notice' })" class="announcementc" style="font-size:13px;">查看详情</span>
  406. </div>
  407. <div v-if="announcement.title" class="announs">
  408. <b style="font-size:15px;margin:10px 0 0 10px;display: inline-block;">{{ announcement.title }}</b>
  409. <div class="announDetails" style="padding:0 0 0 18px;margin-top:10px;" v-html="announcement.focus"></div>
  410. </div>
  411. <div v-else class="nopoint_box">
  412. <div class="noimg"></div>
  413. <span class="title1" style="padding-bottom:10px;">暂无系统通知</span>
  414. </div>
  415. </div>
  416. </el-row>
  417. </el-col>
  418. </el-row>
  419. <div class="updateNotice">
  420. <el-dialog title="系统通知" :visible.sync="updateVisible" width="500px" top="20vh" :before-close="updateClose">
  421. <b style="font-size:16px;margin:0 0 10px 0;display: inline-block;">{{ announcement.title }}</b>
  422. <div class="announDetails" style="padding:0 0 0 0" v-html="announcement.focus"></div>
  423. <span slot="footer" class="dialog-footer"><el-button @click="$router.push({ path: '/update_notice' })" type="primary" round>查看详情</el-button></span>
  424. </el-dialog>
  425. </div>
  426. <examinePopup :title="'审核详情'" :id="detail_id" :show.sync="detailShow"></examinePopup>
  427. </div>
  428. </template>
  429. <script>
  430. var bool = true; // 五秒执行一次变量
  431. import examinePopup from '@/components/examinePopup';
  432. import { contactAdminToUseApp } from 'dingtalk-design-libs';
  433. export default {
  434. components: { examinePopup },
  435. data() {
  436. return {
  437. isSubject: false, //判断是否是个人版进入
  438. mainCorpId: '', //如果是个人版,这个企业ID是登录者所在的企业ID,不是钉钉那边提供的隐藏企业ID
  439. announLoad: false,
  440. announcement: {},
  441. updateVisible: false,
  442. employeeRout: this.$authoritys('employee'),
  443. authorityManagerHeaderLoad: false, //管理员头部loading
  444. authorityManagerHeaders: {}, //管理员头部 数据
  445. headDayBs: {},//管理员头部 数据 天
  446. creatorJurisdiction: this.$getIsCreator('creator'), //是否创始人
  447. widths: '100%',
  448. time: this.$moment().format('HH'),
  449. user_info: this.$getUserData(),
  450. fits: [
  451. {
  452. name: '奖扣A/B分',
  453. value: '表现好坏,有奖有罚',
  454. img: require('./assets/image/prizeBuckle.png'),
  455. url: '/award_punish'
  456. },
  457. // {
  458. // name: "绩效",
  459. // value: "工作目标与价值的体现",
  460. // img: require("./assets/image/performance.png"),
  461. // url: "/award_punish",
  462. // },
  463. {
  464. name: '管理者奖扣',
  465. value: '管理执行到位,奖罚分明',
  466. img: require('./assets/image/performance.png'),
  467. url: '/manager_statistics'
  468. },
  469. {
  470. name: '任务',
  471. value: '认可积极完成任务的人',
  472. img: require('./assets/image/task.png'),
  473. url: '/my_issue'
  474. }
  475. ],
  476. //排行榜
  477. RankingPush: '', //查看更多跳转
  478. tabPositionLoad: false, //排名分类loading
  479. addUpRankingLoad: false, //排名人员loading
  480. tabPosition: '0',
  481. rankingList: [], //排行榜数据
  482. rankingListDetails: [], //排行榜人员列表
  483. //积分构成
  484. IntegralFormnone: false, //积分构成为空或报错,展示的开关
  485. dept_name1: [], //积分构成--部门
  486. IntegralFormChartLoad: false, //积分构成loading
  487. //本月积分情况
  488. exclusiveMonthBranch: 0, //本月积分情况--部门
  489. exclusiveMonthChecked: true, //本月积分情况--不包含自动积分加分项
  490. dept_name2: [], //本月积分情况--部门
  491. monthlyIntegralList: [
  492. //本月积分情况数据
  493. { total_point: '0', name: '本月总积分' },
  494. { reward_point: '0', name: '本月总奖分' },
  495. { deduction_point: '0', name: '本月总扣分' },
  496. { ratio: '0', name: '奖扣分比例' },
  497. { toRatio: { ratio: '0', type: 0 }, name: '对比上月总分' },
  498. { toRatio: { ratio: '0', type: 0 }, name: '对比上月奖分' },
  499. { toRatio: { ratio: '0', type: 0 }, name: '对比上月扣分' }
  500. ],
  501. monthlyIntegralloading: false, //本月积分情况loading
  502. monthlyIntegralnone: false, //本月积分情况为空或报错,展示的开关
  503. //管理者奖扣
  504. dept_name3: [], //管理者统计数据--部门
  505. ManagerSAwardloading: false, //管理者统计 loading
  506. ManagerSAwardnone: false, //管理者奖扣执行情况为空或报错,展示的开关
  507. ManagerSAwardlList: [
  508. //管理者统计数据
  509. { val: '0', name: '总奖分' },
  510. { val: '0', name: '总扣分' },
  511. { val: '0', name: '奖扣分比例' },
  512. { val: '0', name: '奖扣人次' },
  513. { val: '0', name: '奖扣执行人数' },
  514. { val: '0', name: '达标人数' },
  515. { val: '0', name: '未达标人数' }
  516. ],
  517. dept_tree: [], //部门列表
  518. //奖扣分
  519. highestPrizeBuckleloading: false, //奖扣分最高loading
  520. prize: {}, //奖分
  521. buckle: {}, //扣分
  522. inCommonUse: [
  523. { name: '奖扣积分', image: require('./assets/image/entry_list.png'), push: '/award_punish' },
  524. { name: '发布任务', image: require('./assets/image/my_publish.png'), push: '/my_issue' },
  525. { name: '申请积分', image: require('./assets/image/a_apply.png'), push: '/apply_list' },
  526. { name: '领任务', image: require('./assets/image/task_hall.png'), push: '/get_task' }
  527. ],
  528. // 待我审批模块
  529. auditList: [],
  530. detail_id: 0,
  531. detailShow: false
  532. };
  533. },
  534. watch: {
  535. exclusiveMonthChecked() {
  536. this.monthlyIntegral();
  537. }
  538. },
  539. mounted() {
  540. if (this.employeeRout) {
  541. this.inCommonUse = [];
  542. this.inCommonUse.push(
  543. { name: '申请积分', image: require('./assets/image/a_apply.png'), push: '/apply_list' },
  544. { name: '领任务', image: require('./assets/image/task_hall.png'), push: '/get_task' }
  545. );
  546. }
  547. this.function_All();
  548. window.addEventListener('resize', this.selfAdaption);
  549. // 个人版处理
  550. if (this.$getUserData().is_personal == 1) {
  551. this.isSubject = true;
  552. this.mainCorpId = this.$getUserData().main_corp_id;
  553. }
  554. var url = window.location.href;
  555. var rUrl = this.GetRequest(url).url || '';
  556. console.log('url=' + rUrl);
  557. this.$nextTick(function() {
  558. if (rUrl) {
  559. setTimeout(() => {
  560. this.$router.push({ path: '/' + rUrl });
  561. }, 200);
  562. }
  563. });
  564. },
  565. methods: {
  566. GetRequest(urlStr) {
  567. if (typeof urlStr == 'undefined') {
  568. var url = decodeURI(location.search); //获取url中"?"符后的字符串
  569. } else {
  570. var url = '?' + urlStr.split('?')[1];
  571. }
  572. var theRequest = new Object();
  573. var strs;
  574. if (url.indexOf('?') != -1) {
  575. var str = url.substr(1);
  576. strs = str.split('&');
  577. for (var i = 0; i < strs.length; i++) {
  578. theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
  579. }
  580. }
  581. return theRequest;
  582. },
  583. openGly() {
  584. contactAdminToUseApp({ id: '55493', corpId: this.mainCorpId }).catch(err => {
  585. // 入参不正确,或者遇到技术异常时才会进入这个链路
  586. console.error(err);
  587. });
  588. },
  589. function_All() {
  590. if (this.$getIsCreator('creator')) {
  591. //是否是创始人
  592. } else {
  593. this.authorityManagerHeader();
  594. }
  595. this.noticeList(); //系统公告
  596. this.integralForm(); //积分构成
  597. this.getDepartment(); //获取部门列表
  598. this.rankingListname(); //获取自定义排行榜名
  599. this.monthlyIntegral(); //本月积分情况
  600. this.getSpList(); //待我审批列表
  601. if (!this.employeeRout) {
  602. this.ManagerSAward(); //管理者奖扣任务执行情况
  603. }
  604. this.highestPrizeBuckle(); //奖扣分最高积分事件
  605. },
  606. //审批
  607. openDetail(item) {
  608. this.detail_id = item.id;
  609. this.detailShow = true;
  610. },
  611. // 待我审批列表
  612. getSpList() {
  613. let params = {
  614. source_type: 0,
  615. type: 'waiting',
  616. page: 1,
  617. pt_id: 0,
  618. page_size: '3'
  619. };
  620. this.$axios('get', '/api/integral/review/list', params)
  621. .then(res => {
  622. if (res.data.code == 1) {
  623. this.auditList = res.data.data.list;
  624. }
  625. })
  626. .finally(() => {});
  627. },
  628. noticeList() {
  629. //系统公告
  630. this.announLoad = true;
  631. let params = {
  632. page: 1,
  633. page_size: 10
  634. };
  635. this.$axios('get', '/api/announcement/list', params)
  636. .then(res => {
  637. if (res.data.code == 1) {
  638. let list = res.data.data.list[0];
  639. if (this.$getCache('noticeId')) {
  640. if (this.$getCache('noticeId') != list.id) {
  641. this.updateVisible = true;
  642. this.$setCache('noticeId', list.id);
  643. }
  644. } else {
  645. this.$setCache('noticeId', list.id);
  646. this.updateVisible = true;
  647. }
  648. this.announcement = list;
  649. }
  650. })
  651. .finally(() => {
  652. this.announLoad = false;
  653. });
  654. },
  655. updateClose(none) {
  656. none();
  657. },
  658. //echarts自适应
  659. selfAdaption() {
  660. var myChart1 = this.$echarts.init(this.$refs.monthlyIntegralChart);
  661. var myChart2 = this.$echarts.init(this.$refs.IntegralFormChart);
  662. var myChart3 = this.$echarts.init(this.$refs.ManagerSAwardChart);
  663. myChart1.resize();
  664. myChart2.resize();
  665. myChart3.resize();
  666. },
  667. openGzd(val) {
  668. val ? this.$router.push({ path: val }) : '';
  669. },
  670. popout() {
  671. if (bool) {
  672. const h = this.$createElement;
  673. this.$notify({
  674. message: h('b', { style: 'color:rgb(38, 162, 255)' }, '任务功能将在近期开放,敬请期待')
  675. });
  676. bool = false;
  677. setTimeout(() => {
  678. bool = true;
  679. }, 5000);
  680. } else {
  681. }
  682. },
  683. Administrator() {
  684. this.popout();
  685. },
  686. //管理员头部
  687. authorityManagerHeader() {
  688. this.authorityManagerHeaderLoad = true;
  689. let params1 = this.$axios('get', '/api/integral/statistics/', {employee_id: this.user_info.id, month: this.$moment().format('YYYY-MM')}, 'v2')
  690. let params2 = this.$axios('get', '/api/integral/statistics/', {employee_id: this.user_info.id, day: this.$moment().format('YYYY-MM-DD')}, 'v2')
  691. Promise.all([params1, params2]).then(res => {
  692. this.authorityManagerHeaders = res[0].data.data;
  693. this.headDayBs = res[1].data.data;
  694. })
  695. .finally(() => {
  696. this.authorityManagerHeaderLoad = false;
  697. });
  698. },
  699. //排行榜
  700. customRanking(target_id, date_interval) {
  701. //自定义排名 date_interval=时间
  702. let data = {
  703. group_id: target_id,
  704. pt_id: 3,
  705. index_ranking: 1
  706. };
  707. data.date =
  708. date_interval == 1
  709. ? this.$moment().format('YYYYMM')
  710. : date_interval == 2
  711. ? this.$moment().format('YYYYQ')
  712. : date_interval == 3
  713. ? this.$moment().format('YYYY')
  714. : '0';
  715. this.$axios('get', '/api/integral/statistics/groups/rank', data)
  716. .then(res => {
  717. let lists = res.data.data.list;
  718. let rankingList = [];
  719. let arr = false;
  720. for (let i in lists) {
  721. let rankingJson = {};
  722. if (lists[i].employee_name) {
  723. arr = true;
  724. } else {
  725. arr = false;
  726. rankingJson.employee_id = lists[i].employee_id;
  727. rankingJson.employee_img_url = lists[i].img_url;
  728. rankingJson.employee_name = lists[i].name;
  729. rankingJson.point = lists[i].point;
  730. rankingJson.rank = lists[i].rank;
  731. rankingJson.status_remark = '';
  732. rankingList.push(rankingJson);
  733. }
  734. }
  735. if (arr) {
  736. this.rankingListDetails = lists;
  737. } else {
  738. this.rankingListDetails = rankingList;
  739. }
  740. })
  741. .finally(() => {
  742. this.addUpRankingLoad = false;
  743. });
  744. },
  745. addUpRanking() {
  746. //累计B分排名
  747. let params = {
  748. dept_id: 0,
  749. sort: 'DESC',
  750. page: 1,
  751. page_size: 10,
  752. pt_id: 3,
  753. type: 'all',
  754. index_ranking: 1
  755. };
  756. this.$axios('get', '/api/integral/statistics/ranking', params, 'v2')
  757. .then(res => {
  758. this.rankingListDetails = res.data.data.list;
  759. })
  760. .finally(() => {
  761. this.addUpRankingLoad = false;
  762. });
  763. },
  764. departmentOfRanking() {
  765. //部门B分排名
  766. this.RankingPush = '/dept_rank';
  767. let params = {
  768. dept_id: 0,
  769. sort: 'DESC',
  770. pt_id: 3,
  771. time_type: 1,
  772. page: 1,
  773. page_size: 10,
  774. position: 'all',
  775. month: this.$moment().format('YYYY-MM'),
  776. index_ranking: 1
  777. };
  778. this.$axios('get', '/api/integral/statistics/ranking', params, 'v2')
  779. .then(res => {
  780. this.rankingListDetails = res.data.data.list;
  781. })
  782. .finally(() => {
  783. this.addUpRankingLoad = false;
  784. });
  785. },
  786. rankingListname() {
  787. //获取排名列表
  788. this.tabPositionLoad = true;
  789. let params = {
  790. page: 1,
  791. page_size: 7
  792. };
  793. this.$axios('get', '/api/integral/statistics/ranking/list', params)
  794. .then(res => {
  795. if (res.data.code == 1) {
  796. let lists = res.data.data.list;
  797. for (let i in lists) {
  798. lists[i].val = i;
  799. if (lists[i].type == 'normal') {
  800. lists[i].group_name = '阶段排名(月)';
  801. }
  802. if (lists[i].type == 'all') {
  803. lists[i].group_name = '累计B分排名';
  804. }
  805. this.rankingList.push(lists[i]);
  806. }
  807. this.addUpRankingLoad = true;
  808. this.departmentOfRanking(); //进入获取部门B分排名数据
  809. } else {
  810. self.$message.error(res.data.data.msg);
  811. }
  812. })
  813. .finally(() => {
  814. this.tabPositionLoad = false;
  815. // self.item_loading = false;
  816. });
  817. },
  818. tabPositions(e, item) {
  819. //排行榜点击分类
  820. if (e.target.tagName === 'INPUT') return;
  821. if (item) {
  822. this.addUpRankingLoad = true;
  823. }
  824. if (item.type == 'normal') {
  825. this.RankingPush = '/dept_rank';
  826. this.departmentOfRanking();
  827. } else if (item.type == 'all') {
  828. this.RankingPush = '/total_rank';
  829. this.addUpRanking();
  830. } else if (item.type == 'custom') {
  831. this.RankingPush = '/custom_rank';
  832. this.customRanking(item.target_id, item.date_interval);
  833. }
  834. },
  835. //积分构成
  836. dept1_null(val) {
  837. let valItem = 0;
  838. for (let i in val) {
  839. valItem = val[i];
  840. }
  841. this.integralForm(valItem);
  842. this.$nextTick(() => {
  843. this.$refs.dept1.dropDownVisible = false;
  844. });
  845. },
  846. integralForm(item) {
  847. this.IntegralFormChartLoad = true;
  848. let listslength = [];
  849. let params = {};
  850. if (item) {
  851. (params.dept_id = item), (params.month = this.$moment().format('YYYY-MM'));
  852. } else {
  853. (params.dept_id = null), (params.month = this.$moment().format('YYYY-MM'));
  854. }
  855. if (this.employeeRout) {
  856. params.employee_id = this.$getUserData().id;
  857. }
  858. this.$axios('get', '/api/integral/statistics/pie/b', params, 'v2')
  859. .then(res => {
  860. let lists = res.data.data.list;
  861. listslength = lists;
  862. let legendData1 = [];
  863. let legendData2 = [];
  864. let dadalist = [];
  865. //分为两列展示
  866. for (let i in lists) {
  867. if (lists[i].name.length > 15) {
  868. lists[i].name = lists[i].name.slice(0, 15) + '...';
  869. }
  870. //分为两列展示
  871. if (i < 8) {
  872. legendData1.push(lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%');
  873. } else {
  874. legendData2.push(lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%');
  875. }
  876. let dataListDx = {};
  877. if (lists[i].ratio < 0) {
  878. dataListDx.value = 0;
  879. } else {
  880. dataListDx.value = lists[i].ratio;
  881. }
  882. dataListDx.name = lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%';
  883. dadalist.push(dataListDx);
  884. }
  885. this.drawLine(legendData1, dadalist); //图表
  886. })
  887. .finally(() => {
  888. if (listslength.length == 0) {
  889. this.IntegralFormnone = true;
  890. } else {
  891. this.IntegralFormnone = false;
  892. }
  893. this.IntegralFormChartLoad = false;
  894. });
  895. },
  896. //分为两列展示,多传legendDataTwo
  897. drawLine(legendDataOne, dadalist) {
  898. const chart = this.$refs.IntegralFormChart;
  899. //此处可给固定颜色,不给就所有颜色随机
  900. let colors = ['rgb(38, 162, 255)', '#f36f2a', '#fecb09', '#00b6bd', '#e85d53', '#fecb09', '#725197', '#fcb814', '#41a08d', '#425a95', '#ea8b84', '#9d1d62', '#fcb814'];
  901. let legendDataLeng = legendDataOne.length;
  902. if (legendDataLeng > colors.length) {
  903. //当列表大于固定颜色时,给随机颜色
  904. let colorsLeng = colors.length;
  905. for (let i = 0; i <= legendDataLeng - colorsLeng; i++) {
  906. colors.push('rgb(' + Math.round(Math.random() * 255) + ',' + Math.round(Math.random() * 255) + ',' + Math.round(Math.random() * 255) + ')');
  907. }
  908. }
  909. //只显示 N 条标题,多余隐藏,但是饼图不会隐藏
  910. let DataLengths = [];
  911. let left1 = '45%';
  912. let left2 = '45%';
  913. let leftBT = '25%';
  914. if (chart) {
  915. const myChart = this.$echarts.init(chart);
  916. var legendData1 = legendDataOne;
  917. // var legendData2 = DataLengths;
  918. const option = {
  919. tooltip: {
  920. trigger: 'item',
  921. formatter: '{b}'
  922. },
  923. legend: [
  924. {
  925. type: 'scroll',
  926. orient: 'vertical',
  927. icon: 'square',
  928. left: left1,
  929. align: 'left',
  930. top: '23%',
  931. itemGap: 20,
  932. // bottom:'50%',
  933. textStyle: {
  934. fontSize: 14,
  935. color: 'rgb(48, 49, 51)'
  936. },
  937. data: legendData1
  938. }
  939. ],
  940. color: colors,
  941. grid: {
  942. x: 25,
  943. y: 45,
  944. x2: 5,
  945. y2: 20,
  946. borderWidth: 1
  947. },
  948. toolbox: {
  949. show: true,
  950. feature: {
  951. mark: { show: true },
  952. magicType: {
  953. show: true,
  954. type: ['pie', 'funnel']
  955. }
  956. }
  957. },
  958. series: [
  959. {
  960. name: '',
  961. type: 'pie',
  962. radius: [20, 110],
  963. center: [leftBT, '50%'],
  964. roseType: 'radius',
  965. label: {
  966. show: false
  967. },
  968. emphasis: {
  969. label: {
  970. show: false
  971. }
  972. },
  973. data: dadalist
  974. }
  975. ]
  976. };
  977. myChart.setOption(option);
  978. }
  979. },
  980. //月度积分
  981. monthlyIntegralRanking(date, total, reward, deduction) {
  982. const chart = this.$refs.monthlyIntegralChart;
  983. if (chart) {
  984. const myChart = this.$echarts.init(chart);
  985. const option = {
  986. tooltip: {
  987. trigger: 'axis'
  988. },
  989. color: ['#F56C6C', '#26A2FF', '#FFC100'],
  990. legend: {
  991. right: '0%',
  992. data: ['总积分', '奖分', '扣分']
  993. },
  994. grid: {
  995. left: '3%',
  996. right: '4%',
  997. bottom: '3%',
  998. containLabel: true
  999. },
  1000. toolbox: {
  1001. feature: {}
  1002. },
  1003. xAxis: {
  1004. type: 'category',
  1005. boundaryGap: false,
  1006. data: date
  1007. },
  1008. yAxis: {
  1009. type: 'value',
  1010. axisLine: {
  1011. show: false
  1012. },
  1013. axisTick: {
  1014. show: false
  1015. }
  1016. },
  1017. series: [
  1018. {
  1019. name: '总积分',
  1020. type: 'line',
  1021. data: total
  1022. },
  1023. {
  1024. name: '奖分',
  1025. type: 'line',
  1026. data: reward
  1027. },
  1028. {
  1029. name: '扣分',
  1030. type: 'line',
  1031. data: deduction
  1032. }
  1033. ]
  1034. };
  1035. myChart.setOption(option);
  1036. }
  1037. },
  1038. //月度积分
  1039. monthlyIntegralchange(val) {
  1040. if (val.length == 0) {
  1041. this.exclusiveMonthBranch = 0;
  1042. } else {
  1043. let valItem = 0;
  1044. for (let i in val) {
  1045. valItem = val[i];
  1046. }
  1047. this.exclusiveMonthBranch = valItem;
  1048. }
  1049. this.monthlyIntegral();
  1050. this.$nextTick(() => {
  1051. this.$refs.dept2.dropDownVisible = false;
  1052. });
  1053. },
  1054. monthlyIntegral() {
  1055. this.monthlyIntegralloading = true;
  1056. let params = {};
  1057. let listslength = [];
  1058. if (this.employeeRout) {
  1059. params.employee_id = this.$getUserData().id;
  1060. } else {
  1061. params.dept_id = this.exclusiveMonthBranch;
  1062. }
  1063. params.month = this.$moment().format('YYYY-MM');
  1064. if (this.exclusiveMonthChecked) {
  1065. params.include_fixed = 1;
  1066. } else {
  1067. params.include_fixed = 0;
  1068. }
  1069. this.$axios('get', '/api/integral/statistics/curve', params)
  1070. .then(res => {
  1071. if (res.data.code == 1) {
  1072. let lists = res.data.data;
  1073. listslength = lists;
  1074. this.monthlyIntegralList[0].total_point = lists.total_point;
  1075. this.monthlyIntegralList[1].reward_point = lists.reward_point;
  1076. this.monthlyIntegralList[2].deduction_point = lists.deduction_point;
  1077. this.monthlyIntegralList[3].ratio = lists.ratio;
  1078. this.monthlyIntegralList[4].toRatio = lists.contrast_total;
  1079. this.monthlyIntegralList[5].toRatio = lists.contrast_reward;
  1080. this.monthlyIntegralList[6].toRatio = lists.contrast_deduction;
  1081. let dates = []; //日期
  1082. let totals = []; //总积分
  1083. let rewards = []; //奖分
  1084. let deductions = []; //扣分
  1085. for (let i in lists.total) {
  1086. dates.push(lists.total[i].date);
  1087. totals.push(lists.total[i].point);
  1088. }
  1089. for (let i in lists.reward) {
  1090. rewards.push(lists.reward[i].point);
  1091. }
  1092. for (let i in lists.deduction) {
  1093. deductions.push(lists.deduction[i].point);
  1094. }
  1095. this.monthlyIntegralRanking(dates, totals, rewards, deductions);
  1096. }
  1097. })
  1098. .finally(() => {
  1099. if (listslength.total.length == 0) {
  1100. this.monthlyIntegralnone = true;
  1101. } else {
  1102. this.monthlyIntegralnone = false;
  1103. }
  1104. this.monthlyIntegralloading = false;
  1105. });
  1106. },
  1107. //管理者奖扣统计
  1108. ManagerSAwardCharts(Name, Award, Deduct) {
  1109. //管理着奖扣统计表
  1110. const chart = this.$refs.ManagerSAwardChart;
  1111. if (chart) {
  1112. const myChart = this.$echarts.init(chart);
  1113. const option = {
  1114. tooltip: {
  1115. trigger: 'axis',
  1116. axisPointer: {
  1117. // type: 'cross',
  1118. crossStyle: {
  1119. color: '#999'
  1120. }
  1121. }
  1122. },
  1123. grid: {
  1124. //表格偏移量
  1125. // top: '5% '
  1126. left: '5%',
  1127. right: '0%'
  1128. },
  1129. toolbox: {
  1130. feature: {
  1131. // dataView: {show: false, readOnly: true},
  1132. // magicType: {show: false, type: ['line', 'bar']},
  1133. // restore: {show: false},
  1134. // saveAsImage: {show: false}
  1135. }
  1136. },
  1137. color: ['#26A2FF', '#FFC100'],
  1138. legend: {
  1139. right: '0%', //设置位置
  1140. data: ['奖分', '扣分']
  1141. },
  1142. xAxis: [
  1143. {
  1144. type: 'category',
  1145. data: Name,
  1146. axisPointer: {
  1147. type: 'shadow'
  1148. },
  1149. axisLabel: {
  1150. interval: 0 //横轴信息全部显示
  1151. // rotate:-30,//-30度角倾斜显示
  1152. },
  1153. axisLine: {
  1154. //去掉X轴线
  1155. show: false
  1156. },
  1157. axisTick: {
  1158. //去掉X轴刻度
  1159. show: false
  1160. }
  1161. }
  1162. ],
  1163. yAxis: [
  1164. {
  1165. type: 'value',
  1166. axisLabel: {
  1167. formatter: '{value}'
  1168. },
  1169. axisLine: {
  1170. //去掉Y轴线
  1171. show: false
  1172. },
  1173. axisTick: {
  1174. //去掉Y轴刻度
  1175. show: false
  1176. }
  1177. }
  1178. ],
  1179. series: [
  1180. {
  1181. name: '奖分',
  1182. type: 'bar',
  1183. barWidth: 14, //柱图宽度
  1184. barGap: '0%', //柱图间距
  1185. data: Award
  1186. },
  1187. {
  1188. name: '扣分',
  1189. type: 'bar',
  1190. barWidth: 14, //柱图宽度
  1191. barGap: '0%', //柱图间距
  1192. data: Deduct
  1193. }
  1194. ]
  1195. };
  1196. myChart.setOption(option);
  1197. }
  1198. },
  1199. ManagerSAwardlchange(val) {
  1200. //选中规则
  1201. let valItem = 0;
  1202. for (let i in val) {
  1203. valItem = val[i];
  1204. }
  1205. this.ManagerSAward(valItem);
  1206. this.$nextTick(() => {
  1207. this.$refs.dept3.dropDownVisible = false;
  1208. });
  1209. },
  1210. ManagerSAward(item) {
  1211. //管理者奖扣请求
  1212. this.ManagerSAwardloading = true;
  1213. let params = {};
  1214. let listslength = [];
  1215. if (item) {
  1216. (params.dept_id = item), (params.month = this.$moment().format('YYYY-MM'));
  1217. } else {
  1218. (params.dept_id = 0), (params.month = this.$moment().format('YYYY-MM'));
  1219. }
  1220. this.$axios('get', '/api/integral/statistics/task/pie', params, 'v2')
  1221. .then(res => {
  1222. let datas = res.data.data;
  1223. listslength = datas.list;
  1224. let histogramName = [];
  1225. let histogramAward = [];
  1226. let histogramDeduct = [];
  1227. for (let i in datas.list) {
  1228. histogramName.push(datas.list[i].name);
  1229. histogramAward.push(datas.list[i].reward_point);
  1230. histogramDeduct.push(datas.list[i].deduction_point);
  1231. }
  1232. this.ManagerSAwardlList[0].val = datas.reward_point;
  1233. this.ManagerSAwardlList[1].val = datas.deduction_point;
  1234. this.ManagerSAwardlList[2].val = datas.ratio;
  1235. this.ManagerSAwardlList[3].val = datas.exec_count;
  1236. this.ManagerSAwardlList[4].val = datas.manager_count;
  1237. this.ManagerSAwardlList[5].val = datas.pass_count;
  1238. this.ManagerSAwardlList[6].val = datas.fail_count;
  1239. this.ManagerSAwardCharts(histogramName, histogramAward, histogramDeduct);
  1240. })
  1241. .finally(() => {
  1242. if (listslength.length == 0) {
  1243. this.ManagerSAwardnone = true;
  1244. } else {
  1245. this.ManagerSAwardnone = false;
  1246. }
  1247. this.ManagerSAwardloading = false;
  1248. });
  1249. },
  1250. //奖扣分最高积分事件
  1251. highestPrizeBuckle() {
  1252. this.highestPrizeBuckleloading = true;
  1253. let params = {
  1254. time_type: '1',
  1255. pt_id: '3',
  1256. page: '1',
  1257. page_size: '1'
  1258. };
  1259. this.$axios('get', '/api/integral/statistics/prize/buckle/ranking', params)
  1260. .then(res => {
  1261. if (res.data.code == 1) {
  1262. if (res.data.data.prize.length != 0) {
  1263. this.prize = res.data.data.prize[0];
  1264. } else {
  1265. this.prize = [];
  1266. }
  1267. if (res.data.data.buckle.length != 0) {
  1268. this.buckle = res.data.data.buckle[0];
  1269. } else {
  1270. this.buckle = [];
  1271. }
  1272. }
  1273. })
  1274. .finally(() => {
  1275. this.highestPrizeBuckleloading = false;
  1276. });
  1277. },
  1278. //获取部门
  1279. getDepartment() {
  1280. this.$axios('get', '/api/department/tree').then(res => {
  1281. this.dept_tree = this.getTreeData(res.data.data.list);
  1282. });
  1283. },
  1284. // 递归判断列表,把最后的children设为undefined
  1285. getTreeData(data) {
  1286. for (var i = 0; i < data.length; i++) {
  1287. if (data[i]._child.length < 1) {
  1288. // children若为空数组,则将children设为undefined
  1289. data[i]._child = undefined;
  1290. } else {
  1291. // children若不为空数组,则继续 递归调用 本方法
  1292. this.getTreeData(data[i]._child);
  1293. }
  1294. }
  1295. return data;
  1296. }
  1297. },
  1298. beforeDestroy() {
  1299. //离开路由
  1300. window.removeEventListener('resize', this.selfAdaption); //取消echarts自适应
  1301. }
  1302. };
  1303. </script>
  1304. <style scoped="scoped" lang="scss">
  1305. .ts {
  1306. height: 64px;
  1307. padding: 8px 16px;
  1308. font-size: 14px;
  1309. color: #089fff;
  1310. background: #e6f3ff;
  1311. font-weight: 500;
  1312. box-sizing: border-box;
  1313. margin-bottom: 10px;
  1314. }
  1315. .ts img {
  1316. width: 24px;
  1317. height: 24px;
  1318. }
  1319. .ts .flex-1 {
  1320. padding: 0 8px;
  1321. }
  1322. .ts .btn {
  1323. width: 94px;
  1324. height: 28px;
  1325. background-color: #089fff;
  1326. line-height: 28px;
  1327. font-size: 14px;
  1328. color: #fff;
  1329. border-radius: 3px;
  1330. cursor: pointer;
  1331. text-align: center;
  1332. }
  1333. .updateNotice ::v-deep .el-dialog {
  1334. border-radius: 10px;
  1335. .el-dialog__header {
  1336. padding: 13px 20px;
  1337. text-align: center;
  1338. background-color: #3193fc;
  1339. border-radius: 8px 8px 0 0;
  1340. .el-dialog__title {
  1341. font-size: 16px;
  1342. color: #fff;
  1343. }
  1344. .el-icon-close {
  1345. color: #fff;
  1346. }
  1347. }
  1348. .el-dialog__body {
  1349. padding: 20px 20px 30px 20px;
  1350. }
  1351. .el-dialog__footer {
  1352. .dialog-footer {
  1353. .is-round {
  1354. padding: 10px 19px;
  1355. border-radius: 15px;
  1356. }
  1357. }
  1358. }
  1359. }
  1360. .refresh {
  1361. margin-top: 100px;
  1362. width: 100px;
  1363. }
  1364. .noData {
  1365. text-align: center;
  1366. position: fixed;
  1367. left: 0;
  1368. top: 0;
  1369. right: 0;
  1370. bottom: 0;
  1371. }
  1372. .data-all {
  1373. margin-bottom: 10%;
  1374. color: #595959;
  1375. }
  1376. // .left-all-style{
  1377. // background: #fff;
  1378. // border-radius: 5px;
  1379. // margin: 20px 0 20px 0;
  1380. // .title{
  1381. // padding-left: 10px;
  1382. // font-size: 16px;
  1383. // font-weight: normal;
  1384. // border-left: 2px solid #409EFF;
  1385. // }
  1386. // }
  1387. .left-all-style {
  1388. margin-top: 10px;
  1389. padding: 20px;
  1390. background: #fff;
  1391. border-radius: 5px;
  1392. .title {
  1393. padding-left: 10px;
  1394. font-size: 16px;
  1395. font-weight: normal;
  1396. border-left: 2px solid #409eff;
  1397. }
  1398. .titledes {
  1399. display: block;
  1400. padding-top: 10px;
  1401. font-size: 14px;
  1402. color: #909399;
  1403. }
  1404. .noremind {
  1405. display: block;
  1406. text-align: right;
  1407. font-size: 12px;
  1408. color: #909399;
  1409. cursor: pointer;
  1410. }
  1411. .noremind:hover {
  1412. color: #409eff;
  1413. }
  1414. .noremind:active {
  1415. color: #409eff;
  1416. }
  1417. }
  1418. .right-all-style {
  1419. background: #fff;
  1420. border-radius: 5px;
  1421. margin: 0 0 10px 10px;
  1422. .title {
  1423. padding-left: 10px;
  1424. font-size: 16px;
  1425. font-weight: normal;
  1426. border-left: 2px solid #409eff;
  1427. }
  1428. }
  1429. .home-left-header {
  1430. background: #fff;
  1431. border-radius: 5px;
  1432. // border:1px #e1e4e7 solid;
  1433. // box-shadow: 0 2px 4px rgba(140,140,140,0.1);
  1434. .hlheader-user {
  1435. border-right: 1px #cecccc solid;
  1436. margin: 34px 0;
  1437. }
  1438. .hlheader-user-info .greetings div {
  1439. max-width: 95px;
  1440. display: inline-block;
  1441. overflow: hidden;
  1442. white-space: nowrap;
  1443. text-overflow: ellipsis;
  1444. vertical-align: top;
  1445. }
  1446. .hlheader-user-info {
  1447. display: flex;
  1448. .headimg {
  1449. margin: 0 auto;
  1450. }
  1451. .headtext {
  1452. margin: 0 auto;
  1453. }
  1454. .greetings {
  1455. margin: 0 auto;
  1456. font-size: 16px;
  1457. font-weight: bold;
  1458. // div {
  1459. // max-width: 95px;
  1460. // display: inline-block;
  1461. // overflow: hidden;
  1462. // white-space: nowrap;
  1463. // text-overflow: ellipsis;
  1464. // vertical-align: top;
  1465. // }
  1466. span {
  1467. font-size: 14px;
  1468. color: #666;
  1469. display: inline-block;
  1470. vertical-align: top;
  1471. padding-left: 5px;
  1472. }
  1473. p span {
  1474. line-height: 30px;
  1475. font-size: 14px;
  1476. color: #666;
  1477. display: inline-block;
  1478. vertical-align: top;
  1479. }
  1480. }
  1481. }
  1482. }
  1483. .nopoint_box {
  1484. display: inline-block;
  1485. text-align: center;
  1486. width: 100%;
  1487. margin-bottom: 10px;
  1488. .noimg {
  1489. display: inline-block;
  1490. width: 110px;
  1491. height: 110px;
  1492. margin: 22px auto 16px;
  1493. background: url('./assets/image/nodata_default.png') no-repeat center;
  1494. background-size: 99%;
  1495. }
  1496. .noperson {
  1497. display: inline-block;
  1498. width: 110px;
  1499. height: 110px;
  1500. margin: 22px auto 16px;
  1501. background: url('./assets/image/noperson_default.png') no-repeat center;
  1502. background-size: 99%;
  1503. }
  1504. .title1 {
  1505. display: block;
  1506. text-align: center;
  1507. font-size: 12px !important;
  1508. color: #909399 !important;
  1509. padding: 0;
  1510. }
  1511. a {
  1512. color: #26a2ff;
  1513. }
  1514. }
  1515. .ManagerSAwardlStyle {
  1516. text-align: center;
  1517. display: block;
  1518. cursor: pointer;
  1519. b {
  1520. color: #303133;
  1521. font-size: 18px;
  1522. transition: all 0.5s;
  1523. }
  1524. span {
  1525. color: rgb(48, 49, 51);
  1526. font-size: 14px;
  1527. margin-top: 5px;
  1528. display: block;
  1529. }
  1530. }
  1531. .ManagerSAwardlStyle:hover .ManagerSAwardlStyleB {
  1532. color: #4eb2ff;
  1533. }
  1534. ::v-deep .el-radio-button__inner {
  1535. border: 0px solid #dcdfe6;
  1536. border-radius: 5px;
  1537. padding: 0px 18px;
  1538. height: 36px;
  1539. line-height: 38px;
  1540. }
  1541. ::v-deep .el-radio-button--medium .el-radio-button__inner {
  1542. padding: 7px 13px;
  1543. }
  1544. .el-radio-button:first-child ::v-deep .el-radio-button__inner {
  1545. border: 0px solid #dcdfe6;
  1546. border-radius: 5px;
  1547. }
  1548. .el-radio-button:last-child ::v-deep .el-radio-button__inner {
  1549. border-radius: 5px;
  1550. }
  1551. .rightexamineAndApproveList {
  1552. text-align: left;
  1553. width: 100%;
  1554. // border-bottom:1px solid #EFEFEF;
  1555. }
  1556. .rightexamineAndApproveList2 {
  1557. text-align: left;
  1558. width: 100%;
  1559. border-bottom: 1px solid #efefef;
  1560. }
  1561. .inCommonUseStyle {
  1562. width: 95%;
  1563. height: 54px;
  1564. border: 1px solid #c0c4cc;
  1565. display: block;
  1566. margin: 16px 0 0 10px;
  1567. display: flex;
  1568. line-height: 54px;
  1569. border-radius: 5px;
  1570. cursor: pointer;
  1571. transition: all 0.5s;
  1572. }
  1573. .inCommonUseStyle b {
  1574. transition: all 0.5s;
  1575. color: #303133;
  1576. font-size: 14px;
  1577. }
  1578. .inCommonUseStyle:hover {
  1579. background-color: #fcfcfc;
  1580. border: 1px solid #409eff;
  1581. }
  1582. .inCommonUseStyle:hover b {
  1583. color: #409eff;
  1584. }
  1585. .announs {
  1586. padding: 0 0 10px 0;
  1587. border: 1px solid rgb(236, 236, 236);
  1588. border-radius: 10px;
  1589. overflow: hidden;
  1590. cursor: default;
  1591. // min-height: calc(60vh - 160px);
  1592. margin: 10px 0 0 0;
  1593. }
  1594. ::v-deep .announDetails {
  1595. // max-height: 410px;
  1596. // overflow-y: auto;
  1597. // *{
  1598. // color: #8c8c8c !important;
  1599. // }
  1600. // img{
  1601. // width: 100% !important;
  1602. // }
  1603. }
  1604. .announDetails {
  1605. max-height: 410px;
  1606. overflow-y: auto;
  1607. }
  1608. .announDetails::-webkit-scrollbar {
  1609. width: 9px;
  1610. height: 9px;
  1611. }
  1612. .announDetails::-webkit-scrollbar-track {
  1613. width: 6px;
  1614. background-color: #fff0;
  1615. -webkit-border-radius: 2em;
  1616. -moz-border-radius: 2em;
  1617. border-radius: 2em;
  1618. }
  1619. .announDetails::-webkit-scrollbar-thumb {
  1620. background-color: #fff0;
  1621. background-clip: padding-box;
  1622. min-height: 28px;
  1623. -webkit-border-radius: 2em;
  1624. -moz-border-radius: 2em;
  1625. border-radius: 2em;
  1626. }
  1627. .announDetails:hover::-webkit-scrollbar-thumb {
  1628. overflow-x: none;
  1629. background-color: rgba(144, 147, 153, 0.3);
  1630. }
  1631. .announcementc {
  1632. display: block;
  1633. text-align: right;
  1634. font-size: 13px;
  1635. color: #909399;
  1636. cursor: pointer;
  1637. }
  1638. .announcementc:hover {
  1639. color: #409eff;
  1640. }
  1641. .announcementc:active {
  1642. color: #409eff;
  1643. }
  1644. </style>