home.vue 55 KB

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