home.vue 49 KB

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