You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ProAnalysis.vue 63 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336
  1. <template>
  2. <div style="width: 100%;">
  3. <div id = "pro_main">
  4. <div style="margin-top: 10px;">
  5. <b class="pro_item">项目分析</b> <span class="update_time">数据更新时间:</span> <span style="font-size: 12px;">{{lastUpdatedTime}}&nbsp/&nbsp从{{recordBeginTime}}开始统计</span>
  6. </div>
  7. <bar-label :width="'95%'" :height="'500px'"></bar-label>
  8. <div style="margin-top: 20px;">
  9. <span class="sta_iterm">统计周期:</span>
  10. <button type="button" class='btnFirst' id ="yesterday" v-bind:class="{colorChange:1==dynamic}" @click="resetPage(),getAllProList('yesterday',1)">昨天</button>
  11. <button type="button" class='btn' id = "current_week" v-bind:class="{colorChange:2==dynamic}" @click="resetPage(),getAllProList('current_week',2)">本周</button>
  12. <button type="button" class='btn' id = "current_month" v-bind:class="{colorChange:3==dynamic}" @click="resetPage(),getAllProList('current_month',3)">本月</button>
  13. <button type="button" class='btn' id = "last_month" v-bind:class="{colorChange:4==dynamic}" @click="resetPage(),getAllProList('last_month',4)">上月</button>
  14. <button type="button" class='btn' id = "monthly" v-bind:class="{colorChange:5==dynamic}" @click="resetPage(),getAllProList('monthly',5)">近30天</button>
  15. <button type="button" class='btn' id = "current_year" v-bind:class="{colorChange:6==dynamic}" @click="resetPage(),getAllProList('current_year',6)">今年</button>
  16. <button type="button" class='btnLast' id = "all" v-bind:class="{colorChange:7==dynamic}" @click="resetPage(),getAllProList('all',7)">所有</button>
  17. <span style="margin-left: 20px;">
  18. <el-date-picker
  19. v-model="value_time"
  20. prefix-icon="el-icon-time"
  21. @change="resetPage(),getAllProList('',0)"
  22. type="daterange"
  23. size='small'
  24. range-separator="至"
  25. start-placeholder="开始日期"
  26. end-placeholder="结束日期">
  27. </el-date-picker>
  28. </span>
  29. <span style="float:right; margin-right: 20px;">
  30. <div style="display:inline-block;margin-left: 20px; ">
  31. <a class="el-icon-download" v-if="tableData!=''" :href= "'../api/v1/projectboard/downloadAll/?type='+this.params.type+'&beginTime='+this.params.beginTime+'&endTime='+this.params.endTime+'&q='+this.params.q+'&sort=openi'" ></a>
  32. <i class="el-icon-download" v-else="tableData=''" href="#" style="color:rgba(187, 187, 187, 100);" @click='popMark()'></i>
  33. <!-- <span ><a id = "download_file" :href= "'../api/v1/projectboard/downloadAll/?type='+this.params.type+'&beginTime='+this.params.beginTime+'&endTime='+this.params.endTime+'&q='+this.params.q+'&sort=openi'" >下载报告</a> </span> -->
  34. <span >
  35. <a id = "download_file" v-if="tableData!=''" :href= "'../api/v1/projectboard/downloadAll/?type='+this.params.type+'&beginTime='+this.params.beginTime+'&endTime='+this.params.endTime+'&q='+this.params.q+'&sort=openi'">下载报告</a>
  36. <a id = "download_file" v-else="tableData=''" href= "#" style="color:rgba(187, 187, 187, 100);" @click='popMark()'>下载报告</a>
  37. </span>
  38. </div>
  39. <span style="display:inline-block;margin-left: 20px; ">
  40. <el-input size="small" placeholder="输入项目关键字搜索" v-model="search" class="input-with-select" @keyup.enter.native="searchName() "><i slot="suffix" class="el-input__icon el-icon-search" @click="searchName() "></i>
  41. </el-input>
  42. </span>
  43. </span>
  44. </div>
  45. <div style="margin-top: 30px;">
  46. <el-table
  47. :data="tableData"
  48. style="width: 100%"
  49. :header-cell-style="tableHeaderStyle"
  50. :cell-style='cellStyle'>
  51. <el-table-column
  52. label="ID"
  53. align="left"
  54. prop="repo_id"
  55. stripe
  56. >
  57. </el-table-column>
  58. <el-table-column
  59. label="项目名称中文"
  60. align="left"
  61. prop="name"
  62. v-if='0'
  63. >
  64. </el-table-column>
  65. <el-table-column
  66. label="项目名称"
  67. width="125px"
  68. align="left"
  69. prop="alias"
  70. style="color:#0366D6;font-family: Roboto"
  71. >
  72. <template slot-scope="scope">
  73. <a @click=goToDetailPage(scope.row.repo_id,scope.row.name,scope.row.ownerName,scope.row.alias)>{{scope.row.alias}} </a>
  74. </template>
  75. </el-table-column>
  76. <el-table-column
  77. label="拥有者"
  78. align="center"
  79. prop="ownerName"
  80. stripe
  81. >
  82. </el-table-column>
  83. <el-table-column
  84. prop="isPrivate"
  85. label="私有"
  86. align="center">
  87. <template slot-scope="scope">
  88. {{scope.row.isPrivate|changeType}}
  89. </template>
  90. </el-table-column>
  91. <el-table-column
  92. prop="openi"
  93. label="OpenI指数"
  94. align="center">
  95. <template slot-scope="scope">
  96. {{scope.row.openi | rounding}}
  97. </template>
  98. </el-table-column>
  99. <el-table-column
  100. prop="view"
  101. label="浏览量"
  102. align="center">
  103. </el-table-column>
  104. <el-table-column
  105. prop="download"
  106. label="代码下载量"
  107. align="center">
  108. </el-table-column>
  109. <el-table-column
  110. prop="pr"
  111. label="PR"
  112. align="center">
  113. </el-table-column>
  114. <el-table-column
  115. prop="commit"
  116. label="Commit数"
  117. align="center">
  118. </el-table-column>
  119. <el-table-column
  120. prop="watch"
  121. label="关注数"
  122. align="center">
  123. </el-table-column>
  124. <el-table-column
  125. prop="star"
  126. label="点赞数"
  127. align="center">
  128. </el-table-column>
  129. <el-table-column
  130. prop="fork"
  131. label="派生数"
  132. align="center">
  133. </el-table-column>
  134. <el-table-column
  135. prop="issue"
  136. label="任务数"
  137. align="center">
  138. </el-table-column>
  139. <el-table-column
  140. prop="issueClosed"
  141. label="已解决任务"
  142. align="center">
  143. </el-table-column>
  144. <el-table-column
  145. prop="contributor"
  146. label="贡献者数"
  147. align="center">
  148. </el-table-column>
  149. <el-table-column
  150. prop="isFork"
  151. label="派生"
  152. align="center">
  153. <template slot-scope="scope">
  154. {{scope.row.isFork|changeType}}
  155. </template>
  156. </el-table-column>
  157. <el-table-column
  158. prop="isMirror"
  159. label="镜像"
  160. align="center">
  161. <template slot-scope="scope">
  162. {{scope.row.isMirror|changeType}}
  163. </template>
  164. </el-table-column>
  165. <el-table-column
  166. prop="createUnix"
  167. label="项目创建时间"
  168. width="120px"
  169. align="center">
  170. <template slot-scope="scope">
  171. {{scope.row.createUnix|transformTimestamp}}
  172. </template>
  173. </el-table-column>
  174. </el-table>
  175. </div>
  176. <div style="margin-top:50px;text-align:center">
  177. <el-pagination
  178. background
  179. @size-change="handleSizeChange"
  180. @current-change="handleCurrentChange"
  181. :current-page="page"
  182. :page-size="pageSize"
  183. :page-sizes="[5,10,20]"
  184. layout="total, sizes,prev, pager, next,jumper"
  185. :total="totalNum">
  186. </el-pagination>
  187. </div>
  188. </div>
  189. <div id ="pro_detail" style="display:none;width: 100%;">
  190. <div style="margin-top: 10px;">
  191. <a class="pro_item" :href="'../../../'+this.ownerName+'/'+this.pro_name">{{this.ownerName}}&nbsp/&nbsp{{this.alias}}</a> <span class="update_time">数据更新时间:</span><span style="font-size: 12px;">{{tableDataIDTotal.lastUpdatedTime}}&nbsp/&nbsp从{{tableDataIDTotal.recordBeginTime}}开始统计</span>
  192. </div>
  193. <div style="margin-top: 10px;">
  194. 项目描述:{{tableDataIDTotal.description | discriptionFun}}
  195. </div>
  196. <div style="margin-top:20px">
  197. <el-row >
  198. <el-col :span='4' class="items">
  199. <el-row>项目创建时间 </el-row>
  200. <el-row class="item_content">{{tableDataIDTotal.creatTime}}</el-row>
  201. </el-col>
  202. <el-col :span='4' class="items">
  203. <el-row>OpenI指数</el-row>
  204. <el-row class="item_content">{{tableDataIDTotal.openi | rounding}}</el-row>
  205. </el-col>
  206. <el-col :span='4' class="items">
  207. <el-row>评论数 </el-row>
  208. <el-row class="item_content">{{tableDataIDTotal.comment}}</el-row>
  209. </el-col>
  210. <el-col :span='4' class="items">
  211. <el-row>浏览量 </el-row>
  212. <el-row class="item_content">{{tableDataIDTotal.view}}</el-row>
  213. </el-col>
  214. <el-col :span='4' class="items">
  215. <el-row>代码下载量</el-row>
  216. <el-row class="item_content">{{tableDataIDTotal.download}}</el-row>
  217. </el-col>
  218. <el-col :span='4' style="text-align: center;">
  219. <el-row>任务完成比例</el-row>
  220. <el-row class="item_content">{{Math.round(tableDataIDTotal.issueClosedRatio * 100) }}%</el-row>
  221. </el-col>
  222. </el-row>
  223. </div>
  224. <div style="margin-top:30px;">
  225. <el-row :gutter="20">
  226. <el-col :span=18 >
  227. <div class="item_l" id="charts">
  228. <div style="font-size:14px;color:#0366D6;margin:20px 5px;">OpenI指数:{{tableDataIDTotal.openi | rounding}}</div>
  229. <div >
  230. <el-col :span='8' id="radar_openi" :style="{ height: '300px'}"></el-col>
  231. <el-col :span='16' id="line_openi" :style="{ height: '300px',float:'right'}"></el-col>
  232. </div>
  233. </div>
  234. </el-col>
  235. <el-col :span=6 >
  236. <div class="item_r">
  237. <div style="margin:0 5px;">
  238. <div style="font-size:14px;color:rgb(0,0,0);margin:10px 5px">贡献者TOP10</div>
  239. <div>
  240. <el-table
  241. :data="tableDataContTop10"
  242. style="width: 100%"
  243. stripe
  244. :header-cell-style="tableHeaderStyle"
  245. >
  246. <el-table-column
  247. label="用户名"
  248. align="left"
  249. prop="user">
  250. <template slot-scope="scope">
  251. <a v-if="scope.row.relAvatarLink!=''" :href="AppSubUrl +'../../../'+ scope.row.user"><img class="ui avatar s16 image js-popover-card" :src="scope.row.relAvatarLink">{{scope.row.user}} </a>
  252. <a v-else :href="'mailto:'+ scope.row.email "> <img class="ui avatar s16 image js-popover-card" :avatar="scope.row.email"> {{scope.row.user}}</a>
  253. </template>
  254. </el-table-column>
  255. <el-table-column
  256. label="身份"
  257. align="center"
  258. prop="mode"
  259. v-if='0'>
  260. <template slot-scope="scope">
  261. {{scope.row.mode | showMode}}
  262. </template>
  263. </el-table-column>
  264. <el-table-column
  265. prop="pr"
  266. label="PR"
  267. width="50px"
  268. align="center">
  269. </el-table-column>
  270. <el-table-column
  271. prop="commit"
  272. label="commit"
  273. align="center">
  274. </el-table-column>
  275. </el-table>
  276. </div>
  277. </div>
  278. </div>
  279. </el-col>
  280. </el-row>
  281. </div>
  282. <div style="margin-top: 20px;">
  283. <span class="sta_iterm">统计周期:</span>
  284. <button type="button" class='btnFirst' id ="yesterday_pro" v-bind:class="{colorChange:1==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'yesterday',false,1)">昨天</button>
  285. <button type="button" class='btn' id = "current_week_pro" v-bind:class="{colorChange:2==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'current_week',false,2)">本周</button>
  286. <button type="button" class='btn' id = "current_month_pro" v-bind:class="{colorChange:3==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'current_month',false,3)">本月</button>
  287. <button type="button" class='btn' id = "last_month_pro" v-bind:class="{colorChange:4==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'last_month',false,4)">上月</button>
  288. <button type="button" class='btn' id = "monthly_pro" v-bind:class="{colorChange:5==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'monthly',false,5)">近30天</button>
  289. <button type="button" class='btn' id = "current_year_pro" v-bind:class="{colorChange:6==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'current_year',false,6)">今年</button>
  290. <button type="button" class='btnLast' id = "all_pro" v-bind:class="{colorChange:7==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'all',false,7)">所有</button>
  291. <span style="margin-left: 20px;">
  292. <el-date-picker
  293. v-model="create_time_pro"
  294. prefix-icon="el-icon-time"
  295. @change="resetCurrentPage(),getOneProList(pro_id,'',false,0),clickCheckBox"
  296. type="daterange"
  297. size='small'
  298. range-separator="至"
  299. start-placeholder="开始日期"
  300. end-placeholder="结束日期">
  301. </el-date-picker>
  302. </span>
  303. <span style="float:right; margin-right: 20px;">
  304. <div style="display:inline-block;margin-left: 20px;">
  305. <a v-if="tableDataID!=''" @click="exportData()" class="el-icon-download"></a>
  306. <a v-else="tableDataID=''" @click="exportData()" style="color:rgba(187, 187, 187, 100);" class="el-icon-download"></a>
  307. <span >
  308. <a v-if="tableDataID!=''" @click="exportData()">下载报告</a>
  309. <a v-else="tableDataID=''" @click="exportData()" style="color:rgba(187, 187, 187, 100);">下载报告</a>
  310. </span>
  311. </div>
  312. </span>
  313. </div>
  314. <div class="item_echart" id ='linecharts'>
  315. <div style="margin-top:10px;margin-left: 5px;">
  316. <label for="label" @change='clickCheckBox'>
  317. <input type="checkbox" class="checkboxchart" name="checkboxchart" checked="checked" value="浏览量"/>浏览量
  318. <input type="checkbox" class="checkboxchart" name="checkboxchart" checked="checked" value="下载量"/>下载量
  319. <input type="checkbox" class="checkboxchart" name="checkboxchart" checked="checked" value="commit"/>commit
  320. </label>
  321. </div>
  322. <div id ="selectData" style="height: 300px;">
  323. </div>
  324. </div>
  325. <div style="margin-top: 30px;">
  326. <el-table
  327. :data="tableDataID.slice((currentPage-1)*pageSize1,currentPage*pageSize1)"
  328. style="width: 100%"
  329. :header-cell-style="tableHeaderStyle"
  330. :cell-style='cellStyle'>
  331. <el-table-column
  332. label="日期"
  333. align="center"
  334. prop="date"
  335. stripe
  336. >
  337. </el-table-column>
  338. <el-table-column
  339. label="浏览量"
  340. align="center"
  341. prop="view">
  342. </el-table-column>
  343. <el-table-column
  344. prop="download"
  345. label="下载量"
  346. align="center">
  347. </el-table-column>
  348. <el-table-column
  349. prop="commit"
  350. label="commit"
  351. align="center">
  352. </el-table-column>
  353. </el-table>
  354. </div>
  355. <div style="margin-top:50px;text-align:center">
  356. <el-pagination
  357. background
  358. @size-change="handleSizeChangeID"
  359. @current-change="handleCurrentChangeID"
  360. :current-page="currentPage"
  361. :page-size="pageSize1"
  362. :page-sizes="[5,10,20]"
  363. layout="total, sizes,prev, pager, next,jumper"
  364. :total="tableDataID.length">
  365. </el-pagination>
  366. </div>
  367. </div>
  368. </div>
  369. </template>
  370. <script>
  371. // import barLabel from './basic/barLabel.vue';
  372. const {AppSubUrl, StaticUrlPrefix, csrf} = window.config;
  373. import { export2Excel } from '../excel/util.js'
  374. export default{
  375. name:'ProAnalysis',
  376. components: {
  377. // barLabel,
  378. },
  379. data() {
  380. return {
  381. recordBeginTime:'',
  382. lastUpdatedTime:'',
  383. page:1,
  384. pageSize:10,
  385. params:{type:'all',page:1,pagesize:10,beginTime:'',endTime:'',q:'',sort:'openi'},
  386. tableData: [],
  387. totalPage:0,
  388. totalNum:0,
  389. pickerOptions: {
  390. },
  391. value_time: '',
  392. search:'',
  393. dynamic:7,
  394. download_a:"",
  395. downLoadSrc:'',
  396. //单个项目参数
  397. columns: [{title: '日期',key: 'date'},{title: '浏览量',key: 'view'},{title: '下载量',key: 'download'},{title: 'commit',key: 'commit'}],
  398. currentPage:1,
  399. pageSize1:10,
  400. paramsID:{type:'all' ,beginTime:'',endTime:'',openi:'false'},
  401. tableDataIDTotal: [],
  402. tableDataID: [],
  403. tableDataIDOpenI:[],
  404. tableDataContTop10:[],
  405. create_time_pro: '',
  406. dynamic_pro:7,
  407. pro_name:'',
  408. alias:'',
  409. pro_id:'',
  410. ownerName:'',
  411. radarOpenI:'',
  412. echartsOITd:'',
  413. echartsSelectData:'',
  414. option:'',
  415. };
  416. },
  417. methods: {
  418. // download_file(){
  419. // this.params.type='all'
  420. // },
  421. popMark(){
  422. alert("数据为空时,不能下载!")
  423. },
  424. exportData(){
  425. // this.getOneProList(this.pro_id,'all',true,7)
  426. // this.getOneProList(this.pro_id,'all',false,7)
  427. // this.fileName()
  428. if (this.tableDataID!=''){
  429. this.currentPage=1
  430. var saveFileName = this.getFileName()
  431. export2Excel(this.columns,this.tableDataID,saveFileName)
  432. }else{
  433. alert("数据为空时,不能下载!")
  434. }
  435. },
  436. getFileName(){
  437. var now = new Date(); // 当前日期
  438. var nowDayOfWeek = now.getDay(); // 今天本周的第几天
  439. var nowDay = now.getDate(); // 当前日
  440. var nowMonth = now.getMonth(); // 当前月
  441. var nowYear = now.getFullYear(); // 当前年
  442. var today = this.saveFormatDate(nowYear,nowMonth+1,nowDay);
  443. var tmp = new Date(now.setTime(now.getTime()-24*60*60*1000));
  444. var yesterday = this.saveFormatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate());
  445. var yesterday_tmp = this.formatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate())
  446. var startDate=''
  447. var endDate=''
  448. var saveFileName = ''
  449. if (typeof this.paramsID.type=="undefined" || this.paramsID.type=="null" || this.paramsID.type==""){
  450. // startDate= this.saveFormatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate());
  451. endDate = this.saveFormatDate(this.create_time_pro[1].getFullYear(),this.create_time_pro[1].getMonth() + 1,this.create_time_pro[1].getDate());
  452. var tmp = this.formatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate())
  453. startDate = this.comparedate(tmp,this.recordBeginTime)
  454. console.log("comparedate:"+startDate)
  455. saveFileName = this.alias+"_"+startDate+'_'+endDate
  456. }else{
  457. switch(this.paramsID.type){
  458. case "yesterday":{
  459. startDate = this.comparedate(yesterday_tmp,this.recordBeginTime)
  460. endDate = startDate
  461. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  462. break
  463. }
  464. case "current_week":{
  465. var now = new Date(); // 当前日期
  466. var nowDayOfWeek = now.getDay(); // 今天本周的第几天
  467. var day = nowDayOfWeek || 7;
  468. startDate = this.formatDate(now.getFullYear(), nowMonth+1, nowDay + 1 - day);
  469. startDate = this.comparedate(startDate,this.recordBeginTime)
  470. endDate = yesterday
  471. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  472. break
  473. }
  474. case "current_month":{
  475. startDate = this.formatDate(nowYear,nowMonth+1,1);
  476. startDate = this.comparedate(startDate,this.recordBeginTime)
  477. endDate = yesterday
  478. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  479. break
  480. }
  481. case "last_month":{
  482. let lastMonthDate = new Date(); // 上月日期
  483. lastMonthDate.setDate(1);
  484. lastMonthDate.setMonth(lastMonthDate.getMonth()-1);
  485. let lastYear = lastMonthDate.getFullYear();
  486. let lastMonth = lastMonthDate.getMonth();
  487. startDate=this.formatDate(lastYear, lastMonth+1, 1);
  488. startDate = this.comparedate(startDate,this.recordBeginTime)
  489. var monthStartDate = new Date(lastYear, lastMonth, 1);
  490. var monthEndDate = new Date(lastYear, lastMonth+1, 1);
  491. var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24)
  492. endDate=this.saveFormatDate(lastYear, lastMonth+1, days); //月份从0开始,所以+1保存月份
  493. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  494. break
  495. }
  496. case "monthly":{
  497. var temp=new Date(now - 1000 * 60 * 60 * 24 * 30)
  498. startDate = this.formatDate(temp.getFullYear(),temp.getMonth()+1,temp.getDate());
  499. startDate = this.comparedate(startDate,this.recordBeginTime)
  500. endDate = yesterday
  501. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  502. break
  503. }
  504. case "current_year":{
  505. startDate = this.formatDate(now.getFullYear(), 1, 1);
  506. startDate = this.comparedate(startDate,this.recordBeginTime)
  507. endDate = yesterday
  508. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  509. break
  510. }
  511. case "all":{
  512. console.log("e:"+today)
  513. startDate = 'all'
  514. endDate = yesterday
  515. saveFileName = this.alias+'_所有'
  516. break
  517. }
  518. }
  519. }
  520. return saveFileName
  521. },
  522. resetPage(){
  523. this.page=1
  524. this.params.page = 1
  525. },
  526. resetCurrentPage(){
  527. this.currentPage=1
  528. },
  529. handleSizeChange(val){
  530. this.params.pagesize = val
  531. this.resetPage()
  532. this.getAllProList(this.params.type, this.dynamic)
  533. },
  534. handleCurrentChange(val){
  535. console.log(val)
  536. this.params.page = val
  537. this.page = val
  538. switch(this.params.type){
  539. case "yesterday":{
  540. this.value_time=''
  541. this.getAllProList(this.params.type,1)
  542. break
  543. }
  544. case "current_week":{
  545. this.value_time=''
  546. this.getAllProList(this.params.type,2)
  547. break
  548. }
  549. case "current_month":{
  550. this.value_time=''
  551. this.getAllProList(this.params.type,3)
  552. break
  553. }
  554. case "last_month":{
  555. this.value_time=''
  556. this.getAllProList(this.params.type,4)
  557. break
  558. }
  559. case "monthly":{
  560. this.value_time=''
  561. this.getAllProList(this.params.type,5)
  562. break
  563. }
  564. case "current_year":{
  565. this.value_time=''
  566. this.getAllProList(this.params.type,6)
  567. break
  568. }
  569. case "all":{
  570. this.value_time=''
  571. this.getAllProList(this.params.type,7)
  572. break
  573. }
  574. case "":{
  575. // this.value_time=''
  576. this.getAllProList(this.params.type,0)
  577. break
  578. }
  579. }
  580. },
  581. saveFormatDate(myyear,mymonth,myweekday) {
  582. // var myyear = this.date.getFullYear();
  583. // var mymonth = this.date.getMonth() + 1;
  584. // var myweekday = this.date.getDate();
  585. if (mymonth < 10) {
  586. mymonth = "0" + mymonth;
  587. }
  588. if (myweekday < 10) {
  589. myweekday = "0" + myweekday;
  590. }
  591. console.log((myyear +''+ mymonth +''+ myweekday))
  592. return (myyear +''+ mymonth +''+ myweekday);
  593. },
  594. formatDate(myyear,mymonth,myweekday) {
  595. // var myyear = this.date.getFullYear();
  596. // var mymonth = this.date.getMonth() + 1;
  597. // var myweekday = this.date.getDate();
  598. if (mymonth < 10) {
  599. mymonth = "0" + mymonth;
  600. }
  601. if (myweekday < 10) {
  602. myweekday = "0" + myweekday;
  603. }
  604. return (myyear +'-'+ mymonth +'-'+ myweekday);
  605. },
  606. //获得某月的天数
  607. getAllProList(type_val,index){
  608. console.log("类型:"+type_val)
  609. this.dynamic = index
  610. if (typeof type_val=="undefined" || type_val=="null" || type_val==""){
  611. this.params.type=''
  612. this.params.beginTime=this.formatDate(this.value_time[0].getFullYear(),this.value_time[0].getMonth() + 1,this.value_time[0].getDate())
  613. this.params.endTime=this.formatDate(this.value_time[1].getFullYear(),this.value_time[1].getMonth() + 1,this.value_time[1].getDate())
  614. }else{
  615. this.params.type=type_val
  616. this.params.beginTime=''
  617. this.params.endTime=''
  618. this.value_time=[]
  619. }
  620. this.$axios.get('../api/v1/projectboard/project',{
  621. params:this.params
  622. }).then((res)=>{
  623. this.recordBeginTime=res.data.recordBeginTime
  624. this.lastUpdatedTime=res.data.lastUpdatedTime
  625. this.tableData = res.data.pageRecords
  626. this.totalPage=res.data.totalPage
  627. this.totalNum = res.data.totalCount//this.totalPage*this.params.pagesize
  628. // console.log("this.totalPage:"+this.totalPage)
  629. })
  630. },
  631. searchName(){
  632. this.params.q = this.search
  633. this.params.page = 1
  634. this.page=1
  635. this.getAllProList(this.params.type, this.dynamic)
  636. },
  637. goToDetailPage(pro_id,pro_name,ownerName,alias){
  638. this.currentPage=1
  639. document.getElementById("pro_main").style.display="none";
  640. document.getElementById("pro_detail").style.display="block";
  641. // console.log(pro_id)
  642. // console.log(pro_name)
  643. this.pro_name=pro_name;
  644. this.alias=alias;
  645. this.pro_id=pro_id;
  646. this.ownerName=ownerName
  647. this.getOneProData(pro_id);
  648. this.getOneProList(pro_id,"current_year",true,0);
  649. this.getOneProList(pro_id,"monthly",false,5);
  650. },
  651. tableHeaderStyle({row,column,rowIndex,columnIndex}){
  652. if(rowIndex===0){
  653. return 'background:#f5f5f6;color:#606266'
  654. }
  655. },
  656. cellStyle({row,column,rowIndex,columnIndex}){
  657. if(rowIndex%2 === 1){
  658. return 'background:#f5f5f6;color:#606266'
  659. }
  660. },
  661. handleSizeChangeID(val){
  662. this.pageSize1=val
  663. },
  664. handleCurrentChangeID(currentPage){
  665. this.currentPage = currentPage;
  666. },
  667. getOneProData(pro_id){
  668. this.$axios.get('../api/v1/projectboard/project/'+pro_id,{
  669. }).then((res)=>{
  670. this.tableDataIDTotal = res.data
  671. this.tableDataContTop10=res.data.top10
  672. // this.drawLine()
  673. this.drawRadarOpenI()
  674. })
  675. },
  676. getOneProList(pro_id,type_val,bool_val,index){
  677. this.dynamic_pro=index
  678. console.log("日期类型:"+type_val)
  679. if (typeof type_val=="undefined" || type_val=="null" || type_val==""){
  680. this.paramsID.type=''
  681. this.paramsID.beginTime= this.formatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate())
  682. this.paramsID.endTime=this.formatDate(this.create_time_pro[1].getFullYear(),this.create_time_pro[1].getMonth() + 1,this.create_time_pro[1].getDate())
  683. }else{
  684. this.create_time_pro=[]
  685. this.paramsID.type=type_val
  686. this.paramsID.beginTime=''
  687. this.paramsID.endTime=''
  688. }
  689. this.paramsID.openi=bool_val
  690. this.$axios.get('../api/v1/projectboard/project/'+pro_id+"/period",{
  691. params:this.paramsID
  692. }).then((res)=>{
  693. if (bool_val){
  694. this.tableDataIDOpenI = res.data
  695. this.drawOpenItrend()
  696. }else{
  697. this.tableDataID = res.data
  698. this.drawSelectData()
  699. }
  700. })
  701. },
  702. drawRadarOpenI(){
  703. var ydata = [this.roundingF(this.tableDataIDTotal.impact),this.roundingF(this.tableDataIDTotal.completeness),this.roundingF(this.tableDataIDTotal.liveness),this.roundingF(this.tableDataIDTotal.projectHealth),this.roundingF(this.tableDataIDTotal.teamHealth),this.roundingF(this.tableDataIDTotal.growth)]
  704. console.log("ydata:",ydata)
  705. var i = -1;
  706. var option = {
  707. titile:{
  708. text:""
  709. },
  710. tooltip: {
  711. trigger: 'item',
  712. backgroundColor:'rgba(255,255,255,0.8)',
  713. color:'black',
  714. borderWidth:'1',
  715. borderColor:'gray',
  716. textStyle:{
  717. color:'black'
  718. },
  719. position: 'right',
  720. // formatter: function (params) {
  721. // console.log('params:',params)
  722. // console.log('params.data:',params[0])
  723. // let str = params.data.name + "<br />";
  724. // params.data.forEach((item) => {
  725. // str +=
  726. // '<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;left:5px;background-color:'+params.color+'"></span>' + item.seriesName + " : " + '<span style="float:right">'+item.data[1] +'</span>'+ "<br />";
  727. // });
  728. // return str;
  729. // },
  730. // formatter: function (params, ticket, callback) {
  731. // console.log(params);
  732. // var showHtm="";
  733. // var data = params.data.value
  734. // for(var i=0;i<data.length;i++){
  735. // //x轴名称
  736. // var name = data[i];
  737. // //值
  738. // var value = params[i][2];
  739. // showHtm+= text+ '--' + name + ' :' + value+'<br>'
  740. // }
  741. // return showHtm;
  742. // }
  743. },//提示层
  744. legend: {
  745. // data: ['']
  746. },
  747. radar: {
  748. name: {
  749. textStyle: {
  750. color: 'rgb(0,0,0)', //字体颜色
  751. borderRadius: 3, //圆角
  752. padding: [3, 5] //padding
  753. }
  754. },
  755. slpitNumber:5,
  756. center: ['50%', '50%'],
  757. splitArea: { // 坐标轴在 grid 区域中的分隔区域
  758. show: false,
  759. },
  760. indicator: [{
  761. name: '社区影响力',
  762. max: 100
  763. },
  764. {
  765. name: '项目成熟度',
  766. max: 100
  767. },
  768. {
  769. name: '开发活跃度',
  770. max: 100
  771. },
  772. {
  773. name: '项目健康度',
  774. max: 100
  775. },
  776. {
  777. name: '团队健康度',
  778. max: 100
  779. },
  780. {
  781. name: '项目发展趋势',
  782. max: 100
  783. }
  784. ],
  785. },
  786. series: [{
  787. type: 'radar',
  788. lineStyle:{
  789. width:2,
  790. color: '#0366D6',
  791. normal:{
  792. color:'#0366D6 '
  793. }
  794. },
  795. itemStyle : {
  796. normal : {
  797. color:'#0366D6'
  798. }
  799. },
  800. data: [{
  801. value: ydata,
  802. name:"数据"
  803. }]
  804. }]
  805. }
  806. this.radarOpenI.setOption(option)
  807. },
  808. drawOpenItrend(){
  809. var xdata_openI=[]
  810. var ydata_openI=[]
  811. for(var i =0;i<this.tableDataIDOpenI.length;i++){
  812. xdata_openI.push(this.tableDataIDOpenI[i].date);
  813. ydata_openI.push(this.roundingF(this.tableDataIDOpenI[i].openi))
  814. }
  815. console.log("ydata_openI:"+ydata_openI)
  816. console.log(xdata_openI)
  817. var option = {
  818. title : {
  819. text: 'OpenI指数趋势',
  820. textStyle: {
  821.                 fontSize: 12,
  822.             },
  823. left:'center',
  824. top:'bottom',
  825. subtext: '',
  826. },
  827. tooltip : {
  828. trigger: 'axis',
  829. backgroundColor:'rgba(255,255,255,0.8)',
  830. color:'black',
  831. borderWidth:'1',
  832. borderColor:'#DCE7FB',
  833. textStyle:{
  834. color:'black'
  835. },
  836. },
  837. legend: {
  838. orient: 'vertical',
  839. top:'top',  
  840. },
  841. // calculable : true,
  842. xAxis : [
  843. {
  844. type : 'category',
  845. boundaryGap: false,
  846. data : xdata_openI,
  847. }
  848. ],
  849. yAxis : [
  850. {
  851. type : 'value',
  852. }
  853. ],
  854. series : [
  855. {
  856. data: ydata_openI,
  857. type: 'line',
  858. areaStyle: {
  859. type:'linear',
  860. color:'#DCE7FB',
  861. opacity: 0.3,
  862. origin:"start",
  863. normal:{
  864. color:'#DCE7FB'
  865. }
  866. },
  867. lineStyle:{
  868. width:1,
  869. normal:{
  870. color:'#0366D6'
  871. }
  872. },
  873. itemStyle : {
  874. normal : {
  875. color:'#0366D6'
  876. }
  877. },
  878. }
  879. ]
  880. };
  881. this.echartsOITd.setOption(option)
  882. // setTimeout(function (){
  883. // window.onresize = function () {
  884. // this.echartsOITd.resize();
  885. // }
  886. // },200)
  887. },
  888. drawSelectData(){
  889. // $("#selectData").removeAttr("selectData").empty();
  890. var xdata=[]
  891. var ydata_view=[]
  892. var ydata_download=[]
  893. var ydata_commit=[]
  894. // if ()
  895. for(var i =0;i<this.tableDataID.length;i++){
  896. xdata.push(this.tableDataID[this.tableDataID.length-1-i].date);
  897. ydata_view.push(this.tableDataID[this.tableDataID.length-1-i].view)
  898. ydata_download.push(this.tableDataID[this.tableDataID.length-1-i].download)
  899. ydata_commit.push(this.tableDataID[this.tableDataID.length-1-i].commit)
  900. }
  901. console.log("ydata_openI:"+ydata_download)
  902. console.log(xdata)
  903. this.option = {
  904. title : {
  905. text: '',
  906. textStyle: {
  907.                 fontSize: 12,
  908.             },
  909. left:'center',
  910. top:'bottom',
  911. subtext: '',
  912. },
  913. tooltip : {
  914. trigger: 'axis',
  915. backgroundColor:'rgba(255,255,255,0.8)',
  916. color:'black',
  917. borderWidth:'1',
  918. borderColor:'gray',
  919. textStyle:{
  920. color:'black'
  921. },
  922. },
  923. legend: {
  924. data:['浏览量','下载量','commit'],
  925. // orient: 'vertical',
  926. // top:'top',  
  927. },
  928. toolbox: {
  929. show : false,
  930. feature : {
  931. mark : {show: true},
  932. dataView : {show: false, readOnly: false},
  933. magicType : {show: true, type: ['line', 'bar']},
  934. restore : {show: false},
  935. saveAsImage : {show: true}
  936. }
  937. },
  938. calculable : true,
  939. xAxis : [
  940. {
  941. type : 'category',
  942. data : xdata,
  943. }
  944. ],
  945. yAxis : [
  946. {
  947. type : 'value',
  948. }
  949. ],
  950. series : [
  951. { name:"浏览量",
  952. data: ydata_view,
  953. type: 'line',
  954. areaStyle: {},
  955. },
  956. {
  957. name:"下载量",
  958. data: ydata_download,
  959. type: 'line',
  960. areaStyle: {},
  961. },
  962. {
  963. name:"commit",
  964. data: ydata_commit,
  965. type: 'line',
  966. areaStyle: {},
  967. },
  968. ]
  969. };
  970. // this.echartsSelectData.resize()
  971. this.echartsSelectData.setOption(this.option)
  972. // setTimeout(function (){
  973. // window.onresize = function () {
  974. // this.echartsSelectData.resize;
  975. // }
  976. // },200)
  977. // // 使用刚指定的选择项数据显示图表。
  978. // var selectArr = this.echartsSelectData.getOption().legend[0].data;//legend所有值
  979. // var checkboxs=document.getElementsByName('checkboxchart');
  980. // $(".checkboxchart").click(function(){
  981. // var obj = {};
  982. // for(var i=0; i<checkboxs.length; i++){
  983. // if(checkboxs[i].checked){
  984. // obj[selectArr[i]] = true;
  985. // }else{
  986. // obj[selectArr[i]] = false;
  987. // }
  988. // }
  989. // option.legend.selected = obj;
  990. // this.echartsSelectData.setOption(option);
  991. // });
  992. },
  993. roundingF(value){
  994. return Number(value).toFixed(2)
  995. },
  996. clickCheckBox(){
  997. // 使用刚指定的选择项数据显示图表。
  998. var selectArr = this.echartsSelectData.getOption().legend[0].data;//legend所有值
  999. var checkboxs=document.getElementsByName('checkboxchart');
  1000. // $(".checkboxchart").click(function(){
  1001. var obj = {};
  1002. for(var i=0; i<checkboxs.length; i++){
  1003. if(checkboxs[i].checked){
  1004. obj[selectArr[i]] = true;
  1005. }else{
  1006. obj[selectArr[i]] = false;
  1007. }
  1008. }
  1009. this.option.legend.selected = obj;
  1010. this.echartsSelectData.setOption(this.option);
  1011. // });
  1012. },
  1013. comparedate(date1,date2){
  1014. console.log("date1:"+date1)
  1015. console.log("date1:"+date2)
  1016. var oDate1 = new Date(date1);
  1017. var oDate2 = new Date(date2);
  1018. if(oDate1.getTime() < oDate2.getTime()){
  1019. var data = date2.split('-')
  1020. return data[0]+''+data[1]+''+data[2]
  1021. } else {
  1022. var data = date1.split('-')
  1023. return data[0]+''+data[1]+''+data[2]
  1024. }
  1025. },
  1026. goBack(){
  1027. if( $("#pro_detail").is(':visible') ){
  1028. document.getElementById("pro_main").style.display = "block";
  1029. document.getElementById("pro_detail").style.display = "none";
  1030. }
  1031. },
  1032. },
  1033. filters:{
  1034. rounding (value) {
  1035. return Number(value).toFixed(2)
  1036. },
  1037. changeType(value){
  1038. if(value==false){
  1039. return "否"
  1040. }else{
  1041. return "是"
  1042. }
  1043. },
  1044. discriptionFun(value){
  1045. if(value==''){
  1046. return "暂无描述"
  1047. }
  1048. },
  1049. showMode(value){
  1050. if(value==1){
  1051. return "可读权限"
  1052. }else if(value==2){
  1053. return "可写权限"
  1054. }else if(value==3){
  1055. return "管理员"
  1056. }else if(value==4){
  1057. return "所有者"
  1058. }else{
  1059. return "未定义"
  1060. }
  1061. },
  1062. showContext(value){
  1063. if (value.mode!=-1){
  1064. return " <img class=\"ui avatar image\" src= \" "+ value.RelAvatarLink+ " \" > "+" <a href= \" " + AppSubUrl+"/"+value.user+ "\">"+value.user+" </a>"
  1065. }
  1066. else{
  1067. return " <a href=\" mailto:" + value.email + "class=\"circular ui button\">" +value.user+ "</a>"
  1068. }
  1069. },
  1070. transformTimestamp(timestamp){
  1071. let a = new Date(timestamp*1000);
  1072. const date = new Date(a);
  1073. const Y = date.getFullYear() + '/';
  1074. const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/';
  1075. const D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' ';
  1076. const h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':';
  1077. const m = (date.getMinutes() <10 ? '0'+date.getMinutes() : date.getMinutes());
  1078. const dateString = Y + M + D + h + m ;//+ s;
  1079. return dateString;
  1080. },
  1081. },
  1082. mounted() {
  1083. this.getAllProList("all",7)
  1084. console.log("id:"+this.pro_id);
  1085. document.getElementById('radar_openi').style.width = document.getElementById('pro_main').offsetWidth*0.22+'px'
  1086. document.getElementById('line_openi').style.width = document.getElementById('pro_main').offsetWidth*0.33+'px'
  1087. document.getElementById('selectData').style.width = document.getElementById('pro_main').offsetWidth*0.8+'px'
  1088. this.radarOpenI = this.$echarts.init(document.getElementById('radar_openi'))
  1089. this.echartsOITd = this.$echarts.init(document.getElementById('line_openi'))
  1090. this.echartsSelectData = this.$echarts.init(document.getElementById('selectData'))
  1091. if (window.history && window.history.pushState) {
  1092. history.pushState(null, null, document.URL);
  1093. window.addEventListener('popstate', this.goBack, false);
  1094. }
  1095. // window.onresize=function(){
  1096. // this.radarOpenI.resize();
  1097. // this.echartsOITd.resize();
  1098. // this.echartsSelectData.resize();
  1099. // }
  1100. // console.log("this.radarOpenI:"+this.radarOpenI)
  1101. },
  1102. watch:{
  1103. search(val){
  1104. if(!val){
  1105. this.params.q = this.search
  1106. this.params.page = 1
  1107. this.page=1
  1108. this.getAllProList(this.params.type, this.dynamic)
  1109. }
  1110. }
  1111. },
  1112. created() {
  1113. // this.download_a=document.getElementById("download_file")
  1114. },
  1115. updated(){
  1116. if(document.querySelectorAll('img[avatar]').length!==0){
  1117. window.LetterAvatar.transform()
  1118. }
  1119. }
  1120. }
  1121. </script>
  1122. <style scoped>
  1123. .pro_item{
  1124. font-size: 16px;
  1125. color: rgba(16, 16, 16, 100);
  1126. font-family: SourceHanSansSC-bold;
  1127. }
  1128. .sta_item{
  1129. font-size: 14px;
  1130. color: rgb(0 0 0);
  1131. font-family: SourceHanSansSC-bold;
  1132. }
  1133. .update_time{
  1134. line-height: 17px;
  1135. font-size: 12px;
  1136. color:rgba(187, 187, 187, 100);
  1137. margin-left: 10px;
  1138. }
  1139. .btnFirst{
  1140. line-height: 1.5;
  1141. margin: -3.5px;
  1142. border: 1px solid rgba(22, 132, 252, 100);
  1143. border-right: none;
  1144. background: #FFFF;
  1145. color: #1684FC;
  1146. width: 60px;
  1147. height: 30px;
  1148. border-radius:4px 0px 0px 4px;
  1149. }
  1150. .btn{
  1151. line-height: 1.5;
  1152. margin: -3.5px;
  1153. border: 1px solid rgba(22, 132, 252, 100);
  1154. border-right: none;
  1155. background: #FFFF;
  1156. color: #1684FC;
  1157. width: 60px;
  1158. height: 30px;
  1159. }
  1160. .btnLast{
  1161. line-height: 1.5;
  1162. margin: -3.5px;
  1163. border: 1px solid rgba(22, 132, 252, 100);
  1164. /* border-right: none; */
  1165. background: #FFFF;
  1166. color: #1684FC;
  1167. width: 60px;
  1168. height: 30px;
  1169. border-radius:0px 4px 4px 0px;
  1170. }
  1171. .btnFirst, .btn, .btnLast {
  1172. cursor: pointer;
  1173. }
  1174. /*
  1175. .btn:focus,
  1176. .btn:active{
  1177. background-color:#409effd6 ;
  1178. } */
  1179. /* /deep/ .el-date-picker {
  1180. width: 250px;
  1181. } */
  1182. /deep/ .el-table tbody tr:hover>td {
  1183. background-color:#D3D3D3!important;
  1184. opacity:1
  1185. }
  1186. /deep/ .el-table {
  1187. font-size: 12px;
  1188. }
  1189. /deep/ .el-range-separator{
  1190. width: 20% !important;
  1191. }
  1192. .colorChange {
  1193. background-color: #1684FC;
  1194. color: #FFFF;
  1195. cursor: default;
  1196. }
  1197. .items{
  1198. text-align: center;
  1199. border-right:1px solid rgba(219, 219, 219, 100);
  1200. }
  1201. .item_l{
  1202. margin-right: 5px;
  1203. border:1px solid rgba(219, 219, 219, 100);
  1204. height: 370px;
  1205. width: 100%;
  1206. }
  1207. .item_r{
  1208. margin-right:5px;
  1209. border:1px solid rgba(219, 219, 219, 100);
  1210. height: 370px;
  1211. overflow:auto
  1212. }
  1213. .item_echart{
  1214. margin-top: 10px;
  1215. margin-right: 5px;
  1216. border:1px solid rgba(219, 219, 219, 100);
  1217. height: 350px;
  1218. width: 100%;
  1219. }
  1220. .item_content{
  1221. color:#0366D6;
  1222. margin-top: 10px;
  1223. font-weight:bold;
  1224. }
  1225. </style>