home.vue 50 KB

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