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

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335
  1. <template>
  2. <div class="el-col el-col-21" style="padding-left:10px " >
  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. //单个项目参数
  395. columns: [{title: '日期',key: 'date'},{title: '浏览量',key: 'view'},{title: '下载量',key: 'download'},{title: 'commit',key: 'commit'}],
  396. currentPage:1,
  397. pageSize1:10,
  398. paramsID:{type:'all' ,beginTime:'',endTime:'',openi:'false'},
  399. tableDataIDTotal: [],
  400. tableDataID: [],
  401. tableDataIDOpenI:[],
  402. tableDataContTop10:[],
  403. create_time_pro: '',
  404. dynamic_pro:7,
  405. pro_name:'',
  406. alias:'',
  407. pro_id:'',
  408. ownerName:'',
  409. radarOpenI:'',
  410. echartsOITd:'',
  411. echartsSelectData:'',
  412. option:'',
  413. };
  414. },
  415. methods: {
  416. // download_file(){
  417. // this.params.type='all'
  418. // },
  419. popMark(){
  420. alert("数据为空时,不能下载!")
  421. },
  422. exportData(){
  423. // this.getOneProList(this.pro_id,'all',true,7)
  424. // this.getOneProList(this.pro_id,'all',false,7)
  425. // this.fileName()
  426. if (this.tableDataID!=''){
  427. this.currentPage=1
  428. var saveFileName = this.getFileName()
  429. export2Excel(this.columns,this.tableDataID,saveFileName)
  430. }else{
  431. alert("数据为空时,不能下载!")
  432. }
  433. },
  434. getFileName(){
  435. var now = new Date(); // 当前日期
  436. var nowDayOfWeek = now.getDay(); // 今天本周的第几天
  437. var nowDay = now.getDate(); // 当前日
  438. var nowMonth = now.getMonth(); // 当前月
  439. var nowYear = now.getFullYear(); // 当前年
  440. var today = this.saveFormatDate(nowYear,nowMonth+1,nowDay);
  441. var tmp = new Date(now.setTime(now.getTime()-24*60*60*1000));
  442. var yesterday = this.saveFormatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate());
  443. var yesterday_tmp = this.formatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate())
  444. var startDate=''
  445. var endDate=''
  446. var saveFileName = ''
  447. if (typeof this.paramsID.type=="undefined" || this.paramsID.type=="null" || this.paramsID.type==""){
  448. // startDate= this.saveFormatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate());
  449. endDate = this.saveFormatDate(this.create_time_pro[1].getFullYear(),this.create_time_pro[1].getMonth() + 1,this.create_time_pro[1].getDate());
  450. var tmp = this.formatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate())
  451. startDate = this.comparedate(tmp,this.recordBeginTime)
  452. console.log("comparedate:"+startDate)
  453. saveFileName = this.alias+"_"+startDate+'_'+endDate
  454. }else{
  455. switch(this.paramsID.type){
  456. case "yesterday":{
  457. startDate = this.comparedate(yesterday_tmp,this.recordBeginTime)
  458. endDate = startDate
  459. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  460. break
  461. }
  462. case "current_week":{
  463. var now = new Date(); // 当前日期
  464. var nowDayOfWeek = now.getDay(); // 今天本周的第几天
  465. var day = nowDayOfWeek || 7;
  466. startDate = this.formatDate(now.getFullYear(), nowMonth+1, nowDay + 1 - day);
  467. startDate = this.comparedate(startDate,this.recordBeginTime)
  468. endDate = yesterday
  469. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  470. break
  471. }
  472. case "current_month":{
  473. startDate = this.formatDate(nowYear,nowMonth+1,1);
  474. startDate = this.comparedate(startDate,this.recordBeginTime)
  475. endDate = yesterday
  476. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  477. break
  478. }
  479. case "last_month":{
  480. let lastMonthDate = new Date(); // 上月日期
  481. lastMonthDate.setDate(1);
  482. lastMonthDate.setMonth(lastMonthDate.getMonth()-1);
  483. let lastYear = lastMonthDate.getFullYear();
  484. let lastMonth = lastMonthDate.getMonth();
  485. startDate=this.formatDate(lastYear, lastMonth+1, 1);
  486. startDate = this.comparedate(startDate,this.recordBeginTime)
  487. var monthStartDate = new Date(lastYear, lastMonth, 1);
  488. var monthEndDate = new Date(lastYear, lastMonth+1, 1);
  489. var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24)
  490. endDate=this.saveFormatDate(lastYear, lastMonth+1, days); //月份从0开始,所以+1保存月份
  491. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  492. break
  493. }
  494. case "monthly":{
  495. var temp=new Date(now - 1000 * 60 * 60 * 24 * 30)
  496. startDate = this.formatDate(temp.getFullYear(),temp.getMonth()+1,temp.getDate());
  497. startDate = this.comparedate(startDate,this.recordBeginTime)
  498. endDate = yesterday
  499. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  500. break
  501. }
  502. case "current_year":{
  503. startDate = this.formatDate(now.getFullYear(), 1, 1);
  504. startDate = this.comparedate(startDate,this.recordBeginTime)
  505. endDate = yesterday
  506. saveFileName = this.alias+"_"+startDate+'_'+ endDate
  507. break
  508. }
  509. case "all":{
  510. console.log("e:"+today)
  511. startDate = 'all'
  512. endDate = yesterday
  513. saveFileName = this.alias+'_所有'
  514. break
  515. }
  516. }
  517. }
  518. return saveFileName
  519. },
  520. resetPage(){
  521. this.page=1
  522. this.params.page = 1
  523. },
  524. resetCurrentPage(){
  525. this.currentPage=1
  526. },
  527. handleSizeChange(val){
  528. this.params.pagesize = val
  529. this.resetPage()
  530. this.getAllProList(this.params.type, this.dynamic)
  531. },
  532. handleCurrentChange(val){
  533. console.log(val)
  534. this.params.page = val
  535. this.page = val
  536. switch(this.params.type){
  537. case "yesterday":{
  538. this.value_time=''
  539. this.getAllProList(this.params.type,1)
  540. break
  541. }
  542. case "current_week":{
  543. this.value_time=''
  544. this.getAllProList(this.params.type,2)
  545. break
  546. }
  547. case "current_month":{
  548. this.value_time=''
  549. this.getAllProList(this.params.type,3)
  550. break
  551. }
  552. case "last_month":{
  553. this.value_time=''
  554. this.getAllProList(this.params.type,4)
  555. break
  556. }
  557. case "monthly":{
  558. this.value_time=''
  559. this.getAllProList(this.params.type,5)
  560. break
  561. }
  562. case "current_year":{
  563. this.value_time=''
  564. this.getAllProList(this.params.type,6)
  565. break
  566. }
  567. case "all":{
  568. this.value_time=''
  569. this.getAllProList(this.params.type,7)
  570. break
  571. }
  572. case "":{
  573. // this.value_time=''
  574. this.getAllProList(this.params.type,0)
  575. break
  576. }
  577. }
  578. },
  579. saveFormatDate(myyear,mymonth,myweekday) {
  580. // var myyear = this.date.getFullYear();
  581. // var mymonth = this.date.getMonth() + 1;
  582. // var myweekday = this.date.getDate();
  583. if (mymonth < 10) {
  584. mymonth = "0" + mymonth;
  585. }
  586. if (myweekday < 10) {
  587. myweekday = "0" + myweekday;
  588. }
  589. console.log((myyear +''+ mymonth +''+ myweekday))
  590. return (myyear +''+ mymonth +''+ myweekday);
  591. },
  592. formatDate(myyear,mymonth,myweekday) {
  593. // var myyear = this.date.getFullYear();
  594. // var mymonth = this.date.getMonth() + 1;
  595. // var myweekday = this.date.getDate();
  596. if (mymonth < 10) {
  597. mymonth = "0" + mymonth;
  598. }
  599. if (myweekday < 10) {
  600. myweekday = "0" + myweekday;
  601. }
  602. return (myyear +'-'+ mymonth +'-'+ myweekday);
  603. },
  604. //获得某月的天数
  605. getAllProList(type_val,index){
  606. console.log("类型:"+type_val)
  607. this.dynamic = index
  608. if (typeof type_val=="undefined" || type_val=="null" || type_val==""){
  609. this.params.type=''
  610. this.params.beginTime=this.formatDate(this.value_time[0].getFullYear(),this.value_time[0].getMonth() + 1,this.value_time[0].getDate())
  611. this.params.endTime=this.formatDate(this.value_time[1].getFullYear(),this.value_time[1].getMonth() + 1,this.value_time[1].getDate())
  612. }else{
  613. this.params.type=type_val
  614. this.params.beginTime=''
  615. this.params.endTime=''
  616. this.value_time=[]
  617. }
  618. this.$axios.get('../api/v1/projectboard/project',{
  619. params:this.params
  620. }).then((res)=>{
  621. this.recordBeginTime=res.data.recordBeginTime
  622. this.lastUpdatedTime=res.data.lastUpdatedTime
  623. this.tableData = res.data.pageRecords
  624. this.totalPage=res.data.totalPage
  625. this.totalNum = res.data.totalCount//this.totalPage*this.params.pagesize
  626. // console.log("this.totalPage:"+this.totalPage)
  627. })
  628. },
  629. searchName(){
  630. this.params.q = this.search
  631. this.params.page = 1
  632. this.page=1
  633. this.getAllProList(this.params.type, this.dynamic)
  634. },
  635. goToDetailPage(pro_id,pro_name,ownerName,alias){
  636. this.currentPage=1
  637. document.getElementById("pro_main").style.display="none";
  638. document.getElementById("pro_detail").style.display="block";
  639. // console.log(pro_id)
  640. // console.log(pro_name)
  641. this.pro_name=pro_name;
  642. this.alias=alias;
  643. this.pro_id=pro_id;
  644. this.ownerName=ownerName
  645. this.getOneProData(pro_id);
  646. this.getOneProList(pro_id,"current_year",true,0);
  647. this.getOneProList(pro_id,"monthly",false,5);
  648. },
  649. tableHeaderStyle({row,column,rowIndex,columnIndex}){
  650. if(rowIndex===0){
  651. return 'background:#f5f5f6;color:#606266'
  652. }
  653. },
  654. cellStyle({row,column,rowIndex,columnIndex}){
  655. if(rowIndex%2 === 1){
  656. return 'background:#f5f5f6;color:#606266'
  657. }
  658. },
  659. handleSizeChangeID(val){
  660. this.pageSize1=val
  661. },
  662. handleCurrentChangeID(currentPage){
  663. this.currentPage = currentPage;
  664. },
  665. getOneProData(pro_id){
  666. this.$axios.get('../api/v1/projectboard/project/'+pro_id,{
  667. }).then((res)=>{
  668. this.tableDataIDTotal = res.data
  669. this.tableDataContTop10=res.data.top10
  670. // this.drawLine()
  671. this.drawRadarOpenI()
  672. })
  673. },
  674. getOneProList(pro_id,type_val,bool_val,index){
  675. this.dynamic_pro=index
  676. console.log("日期类型:"+type_val)
  677. if (typeof type_val=="undefined" || type_val=="null" || type_val==""){
  678. this.paramsID.type=''
  679. this.paramsID.beginTime= this.formatDate(this.create_time_pro[0].getFullYear(),this.create_time_pro[0].getMonth() + 1,this.create_time_pro[0].getDate())
  680. this.paramsID.endTime=this.formatDate(this.create_time_pro[1].getFullYear(),this.create_time_pro[1].getMonth() + 1,this.create_time_pro[1].getDate())
  681. }else{
  682. this.create_time_pro=[]
  683. this.paramsID.type=type_val
  684. this.paramsID.beginTime=''
  685. this.paramsID.endTime=''
  686. }
  687. this.paramsID.openi=bool_val
  688. this.$axios.get('../api/v1/projectboard/project/'+pro_id+"/period",{
  689. params:this.paramsID
  690. }).then((res)=>{
  691. if (bool_val){
  692. this.tableDataIDOpenI = res.data
  693. this.drawOpenItrend()
  694. }else{
  695. this.tableDataID = res.data
  696. this.drawSelectData()
  697. }
  698. })
  699. },
  700. drawRadarOpenI(){
  701. 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)]
  702. console.log("ydata:",ydata)
  703. var i = -1;
  704. var option = {
  705. titile:{
  706. text:""
  707. },
  708. tooltip: {
  709. trigger: 'item',
  710. backgroundColor:'rgba(255,255,255,0.8)',
  711. color:'black',
  712. borderWidth:'1',
  713. borderColor:'gray',
  714. textStyle:{
  715. color:'black'
  716. },
  717. position: 'right',
  718. // formatter: function (params) {
  719. // console.log('params:',params)
  720. // console.log('params.data:',params[0])
  721. // let str = params.data.name + "<br />";
  722. // params.data.forEach((item) => {
  723. // str +=
  724. // '<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 />";
  725. // });
  726. // return str;
  727. // },
  728. // formatter: function (params, ticket, callback) {
  729. // console.log(params);
  730. // var showHtm="";
  731. // var data = params.data.value
  732. // for(var i=0;i<data.length;i++){
  733. // //x轴名称
  734. // var name = data[i];
  735. // //值
  736. // var value = params[i][2];
  737. // showHtm+= text+ '--' + name + ' :' + value+'<br>'
  738. // }
  739. // return showHtm;
  740. // }
  741. },//提示层
  742. legend: {
  743. // data: ['']
  744. },
  745. radar: {
  746. name: {
  747. textStyle: {
  748. color: 'rgb(0,0,0)', //字体颜色
  749. borderRadius: 3, //圆角
  750. padding: [3, 5] //padding
  751. }
  752. },
  753. slpitNumber:5,
  754. center: ['50%', '50%'],
  755. splitArea: { // 坐标轴在 grid 区域中的分隔区域
  756. show: false,
  757. },
  758. indicator: [{
  759. name: '社区影响力',
  760. max: 100
  761. },
  762. {
  763. name: '项目成熟度',
  764. max: 100
  765. },
  766. {
  767. name: '开发活跃度',
  768. max: 100
  769. },
  770. {
  771. name: '项目健康度',
  772. max: 100
  773. },
  774. {
  775. name: '团队健康度',
  776. max: 100
  777. },
  778. {
  779. name: '项目发展趋势',
  780. max: 100
  781. }
  782. ],
  783. },
  784. series: [{
  785. type: 'radar',
  786. lineStyle:{
  787. width:2,
  788. color: '#0366D6',
  789. normal:{
  790. color:'#0366D6 '
  791. }
  792. },
  793. itemStyle : {
  794. normal : {
  795. color:'#0366D6'
  796. }
  797. },
  798. data: [{
  799. value: ydata,
  800. name:"数据"
  801. }]
  802. }]
  803. }
  804. this.radarOpenI.setOption(option)
  805. },
  806. drawOpenItrend(){
  807. var xdata_openI=[]
  808. var ydata_openI=[]
  809. for(var i =0;i<this.tableDataIDOpenI.length;i++){
  810. xdata_openI.push(this.tableDataIDOpenI[i].date);
  811. ydata_openI.push(this.roundingF(this.tableDataIDOpenI[i].openi))
  812. }
  813. console.log("ydata_openI:"+ydata_openI)
  814. console.log(xdata_openI)
  815. var option = {
  816. title : {
  817. text: 'OpenI指数趋势',
  818. textStyle: {
  819.                 fontSize: 12,
  820.             },
  821. left:'center',
  822. top:'bottom',
  823. subtext: '',
  824. },
  825. tooltip : {
  826. trigger: 'axis',
  827. backgroundColor:'rgba(255,255,255,0.8)',
  828. color:'black',
  829. borderWidth:'1',
  830. borderColor:'#DCE7FB',
  831. textStyle:{
  832. color:'black'
  833. },
  834. },
  835. legend: {
  836. orient: 'vertical',
  837. top:'top',  
  838. },
  839. // calculable : true,
  840. xAxis : [
  841. {
  842. type : 'category',
  843. boundaryGap: false,
  844. data : xdata_openI,
  845. }
  846. ],
  847. yAxis : [
  848. {
  849. type : 'value',
  850. }
  851. ],
  852. series : [
  853. {
  854. data: ydata_openI,
  855. type: 'line',
  856. areaStyle: {
  857. type:'linear',
  858. color:'#DCE7FB',
  859. opacity: 0.3,
  860. origin:"start",
  861. normal:{
  862. color:'#DCE7FB'
  863. }
  864. },
  865. lineStyle:{
  866. width:1,
  867. normal:{
  868. color:'#0366D6'
  869. }
  870. },
  871. itemStyle : {
  872. normal : {
  873. color:'#0366D6'
  874. }
  875. },
  876. }
  877. ]
  878. };
  879. this.echartsOITd.setOption(option)
  880. // setTimeout(function (){
  881. // window.onresize = function () {
  882. // this.echartsOITd.resize();
  883. // }
  884. // },200)
  885. },
  886. drawSelectData(){
  887. // $("#selectData").removeAttr("selectData").empty();
  888. var xdata=[]
  889. var ydata_view=[]
  890. var ydata_download=[]
  891. var ydata_commit=[]
  892. // if ()
  893. for(var i =0;i<this.tableDataID.length;i++){
  894. xdata.push(this.tableDataID[this.tableDataID.length-1-i].date);
  895. ydata_view.push(this.tableDataID[this.tableDataID.length-1-i].view)
  896. ydata_download.push(this.tableDataID[this.tableDataID.length-1-i].download)
  897. ydata_commit.push(this.tableDataID[this.tableDataID.length-1-i].commit)
  898. }
  899. console.log("ydata_openI:"+ydata_download)
  900. console.log(xdata)
  901. this.option = {
  902. title : {
  903. text: '',
  904. textStyle: {
  905.                 fontSize: 12,
  906.             },
  907. left:'center',
  908. top:'bottom',
  909. subtext: '',
  910. },
  911. tooltip : {
  912. trigger: 'axis',
  913. backgroundColor:'rgba(255,255,255,0.8)',
  914. color:'black',
  915. borderWidth:'1',
  916. borderColor:'gray',
  917. textStyle:{
  918. color:'black'
  919. },
  920. },
  921. legend: {
  922. data:['浏览量','下载量','commit'],
  923. // orient: 'vertical',
  924. // top:'top',  
  925. },
  926. toolbox: {
  927. show : false,
  928. feature : {
  929. mark : {show: true},
  930. dataView : {show: false, readOnly: false},
  931. magicType : {show: true, type: ['line', 'bar']},
  932. restore : {show: false},
  933. saveAsImage : {show: true}
  934. }
  935. },
  936. calculable : true,
  937. xAxis : [
  938. {
  939. type : 'category',
  940. data : xdata,
  941. }
  942. ],
  943. yAxis : [
  944. {
  945. type : 'value',
  946. }
  947. ],
  948. series : [
  949. { name:"浏览量",
  950. data: ydata_view,
  951. type: 'line',
  952. areaStyle: {},
  953. },
  954. {
  955. name:"下载量",
  956. data: ydata_download,
  957. type: 'line',
  958. areaStyle: {},
  959. },
  960. {
  961. name:"commit",
  962. data: ydata_commit,
  963. type: 'line',
  964. areaStyle: {},
  965. },
  966. ]
  967. };
  968. // this.echartsSelectData.resize()
  969. this.echartsSelectData.setOption(this.option)
  970. // setTimeout(function (){
  971. // window.onresize = function () {
  972. // this.echartsSelectData.resize;
  973. // }
  974. // },200)
  975. // // 使用刚指定的选择项数据显示图表。
  976. // var selectArr = this.echartsSelectData.getOption().legend[0].data;//legend所有值
  977. // var checkboxs=document.getElementsByName('checkboxchart');
  978. // $(".checkboxchart").click(function(){
  979. // var obj = {};
  980. // for(var i=0; i<checkboxs.length; i++){
  981. // if(checkboxs[i].checked){
  982. // obj[selectArr[i]] = true;
  983. // }else{
  984. // obj[selectArr[i]] = false;
  985. // }
  986. // }
  987. // option.legend.selected = obj;
  988. // this.echartsSelectData.setOption(option);
  989. // });
  990. },
  991. roundingF(value){
  992. return Number(value).toFixed(2)
  993. },
  994. clickCheckBox(){
  995. // 使用刚指定的选择项数据显示图表。
  996. var selectArr = this.echartsSelectData.getOption().legend[0].data;//legend所有值
  997. var checkboxs=document.getElementsByName('checkboxchart');
  998. // $(".checkboxchart").click(function(){
  999. var obj = {};
  1000. for(var i=0; i<checkboxs.length; i++){
  1001. if(checkboxs[i].checked){
  1002. obj[selectArr[i]] = true;
  1003. }else{
  1004. obj[selectArr[i]] = false;
  1005. }
  1006. }
  1007. this.option.legend.selected = obj;
  1008. this.echartsSelectData.setOption(this.option);
  1009. // });
  1010. },
  1011. comparedate(date1,date2){
  1012. console.log("date1:"+date1)
  1013. console.log("date1:"+date2)
  1014. var oDate1 = new Date(date1);
  1015. var oDate2 = new Date(date2);
  1016. if(oDate1.getTime() < oDate2.getTime()){
  1017. var data = date2.split('-')
  1018. return data[0]+''+data[1]+''+data[2]
  1019. } else {
  1020. var data = date1.split('-')
  1021. return data[0]+''+data[1]+''+data[2]
  1022. }
  1023. },
  1024. goBack(){
  1025. if( $("#pro_detail").is(':visible') ){
  1026. document.getElementById("pro_main").style.display = "block";
  1027. document.getElementById("pro_detail").style.display = "none";
  1028. }
  1029. },
  1030. },
  1031. filters:{
  1032. rounding (value) {
  1033. return Number(value).toFixed(2)
  1034. },
  1035. changeType(value){
  1036. if(value==false){
  1037. return "否"
  1038. }else{
  1039. return "是"
  1040. }
  1041. },
  1042. discriptionFun(value){
  1043. if(value==''){
  1044. return "暂无描述"
  1045. }
  1046. },
  1047. showMode(value){
  1048. if(value==1){
  1049. return "可读权限"
  1050. }else if(value==2){
  1051. return "可写权限"
  1052. }else if(value==3){
  1053. return "管理员"
  1054. }else if(value==4){
  1055. return "所有者"
  1056. }else{
  1057. return "未定义"
  1058. }
  1059. },
  1060. showContext(value){
  1061. if (value.mode!=-1){
  1062. return " <img class=\"ui avatar image\" src= \" "+ value.RelAvatarLink+ " \" > "+" <a href= \" " + AppSubUrl+"/"+value.user+ "\">"+value.user+" </a>"
  1063. }
  1064. else{
  1065. return " <a href=\" mailto:" + value.email + "class=\"circular ui button\">" +value.user+ "</a>"
  1066. }
  1067. },
  1068. transformTimestamp(timestamp){
  1069. let a = new Date(timestamp*1000);
  1070. const date = new Date(a);
  1071. const Y = date.getFullYear() + '/';
  1072. const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/';
  1073. const D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' ';
  1074. const h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':';
  1075. const m = (date.getMinutes() <10 ? '0'+date.getMinutes() : date.getMinutes());
  1076. const dateString = Y + M + D + h + m ;//+ s;
  1077. return dateString;
  1078. },
  1079. },
  1080. mounted() {
  1081. this.getAllProList("all",7)
  1082. console.log("id:"+this.pro_id);
  1083. document.getElementById('radar_openi').style.width = document.getElementById('pro_main').offsetWidth*0.22+'px'
  1084. document.getElementById('line_openi').style.width = document.getElementById('pro_main').offsetWidth*0.33+'px'
  1085. document.getElementById('selectData').style.width = document.getElementById('pro_main').offsetWidth*0.8+'px'
  1086. this.radarOpenI = this.$echarts.init(document.getElementById('radar_openi'))
  1087. this.echartsOITd = this.$echarts.init(document.getElementById('line_openi'))
  1088. this.echartsSelectData = this.$echarts.init(document.getElementById('selectData'))
  1089. if (window.history && window.history.pushState) {
  1090. history.pushState(null, null, document.URL);
  1091. window.addEventListener('popstate', this.goBack, false);
  1092. }
  1093. // window.onresize=function(){
  1094. // this.radarOpenI.resize();
  1095. // this.echartsOITd.resize();
  1096. // this.echartsSelectData.resize();
  1097. // }
  1098. // console.log("this.radarOpenI:"+this.radarOpenI)
  1099. },
  1100. watch:{
  1101. search(val){
  1102. if(!val){
  1103. this.params.q = this.search
  1104. this.params.page = 1
  1105. this.page=1
  1106. this.getAllProList(this.params.type, this.dynamic)
  1107. }
  1108. }
  1109. },
  1110. created() {
  1111. // this.download_a=document.getElementById("download_file")
  1112. },
  1113. updated(){
  1114. if(document.querySelectorAll('img[avatar]').length!==0){
  1115. window.LetterAvatar.transform()
  1116. }
  1117. }
  1118. }
  1119. </script>
  1120. <style scoped>
  1121. .pro_item{
  1122. font-size: 16px;
  1123. color: rgba(16, 16, 16, 100);
  1124. font-family: SourceHanSansSC-bold;
  1125. }
  1126. .sta_item{
  1127. font-size: 14px;
  1128. color: rgb(0 0 0);
  1129. font-family: SourceHanSansSC-bold;
  1130. }
  1131. .update_time{
  1132. line-height: 17px;
  1133. font-size: 12px;
  1134. color:rgba(187, 187, 187, 100);
  1135. margin-left: 10px;
  1136. }
  1137. .btnFirst{
  1138. line-height: 1.5;
  1139. margin: -3.5px;
  1140. border: 1px solid rgba(22, 132, 252, 100);
  1141. border-right: none;
  1142. background: #FFFF;
  1143. color: #1684FC;
  1144. width: 60px;
  1145. height: 30px;
  1146. border-radius:4px 0px 0px 4px;
  1147. }
  1148. .btn{
  1149. line-height: 1.5;
  1150. margin: -3.5px;
  1151. border: 1px solid rgba(22, 132, 252, 100);
  1152. border-right: none;
  1153. background: #FFFF;
  1154. color: #1684FC;
  1155. width: 60px;
  1156. height: 30px;
  1157. }
  1158. .btnLast{
  1159. line-height: 1.5;
  1160. margin: -3.5px;
  1161. border: 1px solid rgba(22, 132, 252, 100);
  1162. /* border-right: none; */
  1163. background: #FFFF;
  1164. color: #1684FC;
  1165. width: 60px;
  1166. height: 30px;
  1167. border-radius:0px 4px 4px 0px;
  1168. }
  1169. .btnFirst, .btn, .btnLast {
  1170. cursor: pointer;
  1171. }
  1172. /*
  1173. .btn:focus,
  1174. .btn:active{
  1175. background-color:#409effd6 ;
  1176. } */
  1177. /* /deep/ .el-date-picker {
  1178. width: 250px;
  1179. } */
  1180. /deep/ .el-table tbody tr:hover>td {
  1181. background-color:#D3D3D3!important;
  1182. opacity:1
  1183. }
  1184. /deep/ .el-table {
  1185. font-size: 12px;
  1186. }
  1187. /deep/ .el-range-separator{
  1188. width: 20% !important;
  1189. }
  1190. .colorChange {
  1191. background-color: #1684FC;
  1192. color: #FFFF;
  1193. cursor: default;
  1194. }
  1195. .items{
  1196. text-align: center;
  1197. border-right:1px solid rgba(219, 219, 219, 100);
  1198. }
  1199. .item_l{
  1200. margin-right: 5px;
  1201. border:1px solid rgba(219, 219, 219, 100);
  1202. height: 370px;
  1203. width: 100%;
  1204. }
  1205. .item_r{
  1206. margin-right:5px;
  1207. border:1px solid rgba(219, 219, 219, 100);
  1208. height: 370px;
  1209. overflow:auto
  1210. }
  1211. .item_echart{
  1212. margin-top: 10px;
  1213. margin-right: 5px;
  1214. border:1px solid rgba(219, 219, 219, 100);
  1215. height: 350px;
  1216. width: 100%;
  1217. }
  1218. .item_content{
  1219. color:#0366D6;
  1220. margin-top: 10px;
  1221. font-weight:bold;
  1222. }
  1223. </style>