index.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921
  1. <template>
  2. <div style="padding: 16px">
  3. <div class="block">
  4. <div class="blockCon">
  5. <div class="lefts">
  6. <!-- <el-button-group> -->
  7. <!-- <el-button>按年</el-button> -->
  8. <div style="display: flex;width:auto;">
  9. <el-dropdown>
  10. <el-button :class="formData.year.name ? 'color-btn' : ''">
  11. {{ formData.year.name || '按年' }}
  12. <i class="el-icon-arrow-down el-icon--right"></i>
  13. </el-button>
  14. <el-dropdown-menu slot="dropdown">
  15. <el-dropdown-item v-for="(item, index) in yearList" :key="index" @click.native="funSeleterYear(item)">{{ item.name }}</el-dropdown-item>
  16. </el-dropdown-menu>
  17. </el-dropdown>
  18. <el-dropdown>
  19. <el-button :disabled="formData.year.name == ''" :class="formData.quarter.name ? 'color-btn' : ''">
  20. {{ formData.quarter.name || '按季' }}
  21. <i class="el-icon-arrow-down el-icon--right"></i>
  22. </el-button>
  23. <el-dropdown-menu slot="dropdown">
  24. <el-dropdown-item v-for="(item, index) in quarterList" :key="index" @click.native="funSeleterQuarter(item)">{{ item.name }}</el-dropdown-item>
  25. </el-dropdown-menu>
  26. </el-dropdown>
  27. <!-- <el-dropdown>
  28. <el-button :disabled="formData.year.name == ''" :class="formData.month.name ? 'color-btn' : ''">
  29. {{ formData.month.name || '按月' }}
  30. <i class="el-icon-arrow-down el-icon--right"></i>
  31. </el-button>
  32. <el-dropdown-menu slot="dropdown">
  33. <el-dropdown-item v-for="(item, index) in monthList" :key="index" @click.native="funSeleterMonth(item)">{{ item.name }}</el-dropdown-item>
  34. </el-dropdown-menu>
  35. </el-dropdown> -->
  36. <div class="selects">
  37. <el-date-picker
  38. v-model="formData.startTime"
  39. style="width: 150px;"
  40. type="month"
  41. format="yyyy 年 MM 月"
  42. value-format="yyyyMMdd"
  43. placeholder="开始日期"
  44. ></el-date-picker>
  45. <el-date-picker
  46. v-model="formData.endTime"
  47. type="month"
  48. style="margin-left: 10px; width: 150px;"
  49. format="yyyy 年 MM 月"
  50. value-format="yyyyMMdd"
  51. placeholder="结束日期"
  52. ></el-date-picker>
  53. </div>
  54. <el-button class="btn1" type="primary" @click="funQuery">查询</el-button>
  55. <el-button class="btn2" size="small" @click="getResult" type="primary">重置条件</el-button>
  56. </div>
  57. <div style="margin-right:120px">
  58. <el-button class="btn2" type="primary">查看报告</el-button>
  59. </div>
  60. </div>
  61. <div class="ytext">基于我院病案首次质控结果得出页面展示结果</div>
  62. </div>
  63. </div>
  64. <div class="cardBox">
  65. <Title :title="'质量分析'" />
  66. <div class="contentBox">
  67. <div class="left">
  68. <div class="l">
  69. <div class="i" @click="funGoto" style="cursor: pointer;">
  70. <div class="ba">病案数量</div>
  71. <div class="num">{{ homeData.total }}</div>
  72. <!-- <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" /> -->
  73. </div>
  74. <div class="i" style="background: #af8af1">
  75. <div class="ba">缺陷病案占比</div>
  76. <div class="num">{{ homeData.averageError }}%</div>
  77. <!-- <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" /> -->
  78. </div>
  79. <div class="i" @click="funGototo()" style="cursor: pointer; background: #38a1f1">
  80. <div class="ba">缺陷病案</div>
  81. <div class="num">{{ homeData.errorMedical }}</div>
  82. <!-- <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" /> -->
  83. </div>
  84. <div class="i" style="background: #f6a069">
  85. <div class="ba">平均得分</div>
  86. <div class="num">{{ homeData.averageScore }}</div>
  87. <!-- <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" /> -->
  88. </div>
  89. </div>
  90. <div class="r">
  91. <div class="i">
  92. <!-- <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" /> -->
  93. <div class="t">
  94. <i class="el-icon-s-claim"></i>
  95. </div>
  96. <div class="rt">{{ homeData.highest_score }}</div>
  97. </div>
  98. <div class="i" style="position: relative">
  99. <!-- <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" /> -->
  100. <div class="t">中</div>
  101. <div class="rt" style="color: #ff0000">
  102. {{ homeData.ZHONG ? homeData.ZHONG : 0 }}
  103. </div>
  104. </div>
  105. <!-- </div> -->
  106. <!-- <div class="r"> -->
  107. <div class="i" style="background: lightpink">
  108. <!-- <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" /> -->
  109. <div class="t">良</div>
  110. <div class="rt" style="color: #1da436">
  111. {{ homeData.good ? homeData.good : 0 }}
  112. </div>
  113. </div>
  114. <div class="i" style="background: #f56c6c">
  115. <!-- <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" /> -->
  116. <div class="t">差</div>
  117. <div class="rt" style="color: #000">
  118. {{ homeData.minimum_score }}
  119. </div>
  120. </div>
  121. <span class="textMsg" style="color: #409eff">
  122. <i class="el-icon-s-order" style="color: #409eff"></i>
  123. <el-popover placement="top-start" title="" width="245" trigger="hover">
  124. <div slot v-html="testMsg"></div>
  125. <span slot="reference">等级计算说明</span>
  126. </el-popover>
  127. </span>
  128. </div>
  129. </div>
  130. <div class="right">
  131. <div id="myChart" style="width: 100%; height: 200px"></div>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="cardBox">
  136. <Title :title="'缺陷问题'" />
  137. <el-select v-model="formData.problem" filterable placeholder="请选择" style="margin-right: 20px">
  138. <el-option v-for="(item, index) in departmentList" :label="item.name" :value="item.id" :key="index"></el-option>
  139. </el-select>
  140. <el-select v-model="formData.defectFelg" placeholder="全部" style="margin-right: 20px">
  141. <el-option v-for="(item, index) in levelList" :label="item.name" :value="item.id" :key="index"></el-option>
  142. </el-select>
  143. <el-button class="btn1" type="primary" @click="initCharts1">查询</el-button>
  144. <div class="tableBox1">
  145. <div class="left">
  146. <div class="top">
  147. <div class="lt">
  148. <div class="item">
  149. <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" />
  150. <div class="con">患者基本信息</div>
  151. <div class="baifen">{{ errorDataFelg.base }}%</div>
  152. </div>
  153. <div class="item">
  154. <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" />
  155. <div class="con">诊疗信息</div>
  156. <div class="baifen">{{ errorDataFelg.diagnosis }}%</div>
  157. </div>
  158. <div class="item">
  159. <img class="icon" src="@/assets/404_images/404_cloud.png" alt="" />
  160. <div class="con">费用信息</div>
  161. <div class="baifen">{{ errorDataFelg.cost }}%</div>
  162. </div>
  163. </div>
  164. <el-button class="btn1" type="primary" icon="el-icon-download" @click="funExport('缺陷问题统计', '/errorData')">导出execl</el-button>
  165. </div>
  166. <!-- <el-table :data="errorDataList" style="width: 100%"> -->
  167. <el-table height="400px" v-el-table-infinite-scroll="getDataNext" :data="errorDataList">
  168. <el-table-column type="index" label="序号"></el-table-column>
  169. <el-table-column prop="desc" align="center" label="缺陷描述"></el-table-column>
  170. <el-table-column prop="field" align="center" label="缺陷字段"></el-table-column>
  171. <el-table-column prop="level" align="center" label="缺陷分级">
  172. <template slot-scope="scope">
  173. <span>{{ scope.row.level == '0' ? '强制' : '建议' }}</span>
  174. </template>
  175. </el-table-column>
  176. <el-table-column prop="count" align="center" label="缺陷数量">
  177. <template slot-scope="scope">
  178. <span class="blue" @click="GoDefectList(scope.row)" style="cursor: pointer;">
  179. {{ scope.row.count }}
  180. <!-- <i style="color: red; font-size: 18px; margin-left: 2px" class="el-icon-view"></i> -->
  181. </span>
  182. </template>
  183. </el-table-column>
  184. </el-table>
  185. </div>
  186. <div class="right">
  187. <div id="myChart1" style="width: 100%; height: 500px"></div>
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. </template>
  193. <script>
  194. import Title from '@/components/Title';
  195. import * as echarts from 'echarts';
  196. import { downloadFile } from '@/httpFile';
  197. import elTableInfiniteScroll from 'el-table-infinite-scroll';
  198. export default {
  199. components: {
  200. Title,
  201. },
  202. directives: {
  203. 'el-table-infinite-scroll': elTableInfiniteScroll,
  204. },
  205. data() {
  206. return {
  207. value1: '',
  208. testMsg: '优:≥97分;</br>' + '良:90~96分且不出现A类错误;</br>' + '中:75~89分且不出现A类错误;</br>' + '差:<75分。',
  209. formData: {
  210. startTime: '',
  211. endTime: '',
  212. year: {
  213. name: '',
  214. },
  215. month: {
  216. name: '',
  217. },
  218. quarter: {
  219. name: '',
  220. },
  221. problem: 'all',
  222. defectFelg: 'all',
  223. type: '1',
  224. },
  225. tableData: [],
  226. departmentList: [],
  227. levelList: [],
  228. errorDataFelg: {},
  229. errorDataList: [],
  230. homeData: {},
  231. options: [],
  232. value: '',
  233. quarterList: [],
  234. monthList: [],
  235. yearList: [],
  236. nextListFelg: 0,
  237. page: 2,
  238. chart: null,
  239. chart1: null,
  240. timer: null,
  241. };
  242. },
  243. mounted() {
  244. this.storageSet('endTime', '');
  245. this.storageSet('startTime', '');
  246. // 默认获取当前本年日期
  247. this.getdaTe();
  248. this.funQuery();
  249. this.selectInfo();
  250. },
  251. activated() {
  252. this.chart.resize()
  253. this.chart1.resize()
  254. },
  255. methods: {
  256. // 点击缺陷病案
  257. funGototo(){
  258. this.storageSet('endTime', this.formData.endTime || '');
  259. this.storageSet('startTime', this.formData.startTime || '');
  260. this.goto('/defectList')
  261. },
  262. // 获取默认当前日期
  263. getdaTe(){
  264. let date = new Date();
  265. let yy = date.getFullYear();
  266. let mm = date.getMonth() + 1;
  267. let dd = date.getDate();
  268. mm = mm > 9 ? mm : '0' + mm;
  269. dd = dd > 9 ? dd : '0' + dd;
  270. this.formData.startTime = yy + '0101';
  271. this.formData.endTime = `${yy}${mm}${dd}`;
  272. this.storageSet('endTime', this.formData.endTime || '');
  273. this.storageSet('startTime', this.formData.startTime || '');
  274. },
  275. getDataNext(){
  276. if(this.timer) clearTimeout(this.timer); //清上一次的计数器
  277. this.timer = setTimeout(() =>{
  278. this.getDataNextPage()
  279. },500)
  280. },
  281. getDataNextPage() {
  282. if (this.nextListFelg == 0) {
  283. // this.$message.success('已加载全部数据');
  284. return;
  285. }
  286. let type_id = '';
  287. if (this.formData.type == '1') {
  288. type_id = this.formData.year.id || '';
  289. } else if (this.formData.type == '2') {
  290. type_id = this.formData.quarter.id;
  291. } else {
  292. type_id = this.formData.month.id;
  293. }
  294. let pramse = {
  295. type: this.formData.type, //按年/按月/按季
  296. // type_id: type_id,
  297. year: this.formData.year.name,
  298. quarter: this.formData.quarter.name,
  299. month: this.formData.month.name,
  300. start_time: this.formData.startTime, //开始时间 时间戳or时间
  301. end_time: this.formData.endTime, //结束时间
  302. level: this.formData.defectFelg,
  303. AAC11C: this.formData.problem,
  304. page: this.page,
  305. };
  306. this.$axios.post('/errorData', pramse).then(res => {
  307. for (let item in res.data.list) {
  308. this.errorDataList.push(res.data.list[item]);
  309. }
  310. console.log(this.errorDataList);
  311. this.page = this.page + 1;
  312. this.nextListFelg = res.data.next;
  313. });
  314. // this.$message.success('加载下一页');
  315. },
  316. funExport(fileName, httpUrl) {
  317. let type_id = '';
  318. if (this.formData.type == '1') {
  319. type_id = this.formData.year.id || '';
  320. } else if (this.formData.type == '2') {
  321. type_id = this.formData.quarter.id;
  322. } else {
  323. type_id = this.formData.month.id;
  324. }
  325. // let fileName ='缺陷问题统计'
  326. let pramse = {
  327. is_export: '1',
  328. type: this.formData.type, //按年/按月/按季
  329. // type_id: type_id,
  330. year: this.formData.year.name,
  331. quarter: this.formData.quarter.name,
  332. month: this.formData.month.name,
  333. start_time: this.formData.startTime, //开始时间 时间戳or时间
  334. end_time: this.formData.endTime, //结束时间
  335. };
  336. if (httpUrl == '/errorData') {
  337. pramse.level = this.formData.defectFelg;
  338. pramse.AAC11C = this.formData.problem;
  339. }
  340. this.funExeclPost(fileName, pramse, httpUrl, 'xlsx');
  341. },
  342. funExeclPost(fileName, pramse, httpUrl, format) {
  343. //导出
  344. let httpUrls = '/api' + httpUrl;
  345. downloadFile(httpUrls, pramse, format, fileName).then(res => {
  346. console.log(res);
  347. });
  348. },
  349. selectInfo() {
  350. // let pramse = {};
  351. this.$axios.post('/selectInfo').then(res => {
  352. // this.payList = res.data.pay;
  353. // console.log(this.payList);
  354. this.departmentList = res.data.department;
  355. //出院科室 department
  356. this.levelList = res.data.level;
  357. //问题属性 level
  358. this.quarterList = res.data.quarter;
  359. // 季度
  360. this.monthList = res.data.month;
  361. //月
  362. this.yearList = res.data.year;
  363. });
  364. },
  365. GoDefectList(error) {
  366. this.storageSet('endTime', this.formData.endTime || '');
  367. this.storageSet('startTime', this.formData.startTime || '');
  368. this.$router.push(`/defectList?error_rule=${error.error_rule}`);
  369. },
  370. funQuery() {
  371. this.funAggregate();
  372. this.initCharts1();
  373. },
  374. getResult() {
  375. this.formData.year.name = '';
  376. this.formData.month.name = '';
  377. this.formData.type = '1';
  378. this.formData.quarter.name = '';
  379. this.formData.startTime = '';
  380. this.formData.endTime = '';
  381. this.funQuery();
  382. this.selectInfo();
  383. },
  384. funSeleterYear(val) {
  385. this.formData.year = val;
  386. this.formData.type = '1';
  387. // this.formData.month = {
  388. // name: '',
  389. // };
  390. // this.formData.quarter = {
  391. // name: '',
  392. // };
  393. this.formData.endTime = this.goTimeTwe(val.end);
  394. this.formData.startTime = this.goTimeTwe(val.start);
  395. },
  396. funSeleterMonth(val) {
  397. this.formData.month = val;
  398. this.formData.type = '3';
  399. this.formData.endTime =this.formData.year.name+val.end;
  400. this.formData.startTime = this.formData.year.name+val.start;
  401. },
  402. // 点击季度
  403. funSeleterQuarter(val) {
  404. this.formData.type = '2';
  405. this.formData.quarter = val;
  406. this.formData.endTime =this.formData.year.name+this.zh(val.end);
  407. this.formData.startTime = this.formData.year.name+this.zh(val.start);
  408. // this.formData.endTime = this.goTimeTwe(this.formData.year.name+val.end);
  409. // this.formData.startTime = this.goTimeTwe(this.formData.year.name+val.start);
  410. },
  411. zh(str){
  412. let arr = str.split('-');
  413. return arr.join('');
  414. },
  415. funGoto(type) {
  416. this.storageSet('endTime', this.formData.endTime || '');
  417. this.storageSet('startTime', this.formData.startTime || '');
  418. this.goto('/medicalRecords');
  419. },
  420. funAggregate() {
  421. let type_id = '';
  422. if (this.formData.type == '1') {
  423. type_id = this.formData.year.id || '';
  424. } else if (this.formData.type == '2') {
  425. type_id = this.formData.quarter.id;
  426. } else {
  427. type_id = this.formData.month.id;
  428. }
  429. if ((this.formData.startTime && !this.formData.endTime) || (!this.formData.startTime && this.formData.endTime)) {
  430. this.$message.error('请完成时间区间选择');
  431. return;
  432. }
  433. let pramse = {
  434. // type: this.formData.type, //按年/按月/按季
  435. // type_id: type_id,
  436. // year:this.formData.year.name,
  437. // quarter:this.formData.quarter.name,
  438. // month:this.formData.month.name,
  439. start_time: this.formData.startTime, //开始时间 时间戳or时间
  440. end_time: this.formData.endTime, //结束时间
  441. qa_status: '1',
  442. };
  443. this.$axios.post('/homeCensus', pramse).then(res => {
  444. console.log('平均', res);
  445. this.homeData = res.data;
  446. // let chartsData = [res.data.before, res.data.last, res.data.new];
  447. let year = [res.data.before.year, res.data.last.year, res.data.new.year];
  448. // * 'averageError' => '病案数量',
  449. let newData1 = [res.data.before.averageError, res.data.last.averageError, res.data.new.averageError];
  450. let newData2 = [res.data.before.averageScore, res.data.last.averageScore, res.data.new.averageScore];
  451. // let newData3 = [res.data.before.outstanding, res.data.last.outstanding, res.data.new.outstanding];
  452. let myChart = echarts.init(document.getElementById('myChart'));
  453. this.chart = myChart
  454. window.addEventListener('resize', function () {
  455. myChart.resize();
  456. });
  457. myChart.setOption({
  458. toolbox: {
  459. feature: {
  460. saveAsImage: {
  461. name: '图表',
  462. },
  463. },
  464. },
  465. tooltip: {
  466. trigger: 'axis',
  467. axisPointer: {
  468. type: 'cross',
  469. crossStyle: {
  470. color: '#999',
  471. },
  472. },
  473. },
  474. legend: {
  475. data: ['病案数量', '缺陷病案数量'],
  476. },
  477. grid: {
  478. left: '3%',
  479. right: '3%',
  480. bottom: '3%',
  481. containLabel: true,
  482. },
  483. xAxis: [
  484. {
  485. type: 'category',
  486. data: year,
  487. axisPointer: {
  488. type: 'shadow',
  489. },
  490. },
  491. ],
  492. yAxis: [
  493. {
  494. type: 'value',
  495. name: '数量',
  496. // axisLabel: {
  497. // formatter: "value",
  498. // },
  499. },
  500. // {
  501. // type: 'value',
  502. // name: '得分',
  503. // // axisLabel: {
  504. // // formatter: "value",
  505. // // },
  506. // },
  507. ],
  508. series: [
  509. {
  510. name: '病案数量',
  511. type: 'bar',
  512. barMaxWidth: 30,
  513. tooltip: {
  514. valueFormatter: function (value) {
  515. return value;
  516. },
  517. },
  518. label: {
  519. show: true,
  520. position: 'top',
  521. },
  522. data: newData1,
  523. },
  524. {
  525. name: '缺陷病案数量',
  526. type: 'bar',
  527. barMaxWidth: 30,
  528. tooltip: {
  529. valueFormatter: function (value) {
  530. return value;
  531. },
  532. },
  533. label: {
  534. show: true,
  535. position: 'top',
  536. },
  537. data: newData2,
  538. },
  539. // {
  540. // name: '平均得分',
  541. // type: 'line',
  542. // yAxisIndex: 1,
  543. // tooltip: {
  544. // valueFormatter: function (value) {
  545. // return value;
  546. // },
  547. // },
  548. // label: {
  549. // show: true,
  550. // position: 'top',
  551. // },
  552. // data: newData3,
  553. // },
  554. ],
  555. });
  556. });
  557. },
  558. // https://echarts.apache.org/examples/zh/editor.html?c=mix-line-bar
  559. initCharts1() {
  560. let type_id = '';
  561. if (this.formData.type == '1') {
  562. type_id = this.formData.year.id || '';
  563. } else if (this.formData.type == '2') {
  564. type_id = this.formData.quarter.id;
  565. } else {
  566. type_id = this.formData.month.id;
  567. }
  568. let pramse = {
  569. type: this.formData.type, //按年/按月/按季
  570. // type_id: type_id,
  571. year: this.formData.year.name,
  572. quarter: this.formData.quarter.name,
  573. month: this.formData.month.name,
  574. start_time: this.formData.startTime, //开始时间 时间戳or时间
  575. end_time: this.formData.endTime, //结束时间
  576. qa_status: '1',
  577. level: this.formData.defectFelg,
  578. AAC11C: this.formData.problem,
  579. page: 1,
  580. };
  581. this.$axios.post('/errorData', pramse).then(res => {
  582. this.errorDataList = res.data.list;
  583. this.errorDataFelg = res.data.count;
  584. this.nextListFelg = res.data.next;
  585. console.log(this.errorDataFelg);
  586. // base,diagnosis,cost
  587. let myChartData = [
  588. {
  589. value: this.errorDataFelg.other,
  590. name: '其他' + this.errorDataFelg.other + '%',
  591. },
  592. {
  593. value: this.errorDataFelg.base,
  594. name: '患者基本信息' + this.errorDataFelg.base + '%',
  595. },
  596. {
  597. value: this.errorDataFelg.diagnosis,
  598. name: '诊疗信息' + this.errorDataFelg.diagnosis + '%',
  599. },
  600. {
  601. value: this.errorDataFelg.cost,
  602. name: '费用信息' + this.errorDataFelg.cost + '%',
  603. },
  604. ];
  605. console.log(myChartData);
  606. // for (let item in this.errorDataList) {
  607. // myChartData.push({
  608. // value: this.errorDataList[item].count,
  609. // name: this.errorDataList[item].field,
  610. // });
  611. // }
  612. let myChart = echarts.init(document.getElementById('myChart1'));
  613. this.chart1 = myChart
  614. window.addEventListener('resize', function () {
  615. myChart.resize();
  616. });
  617. myChart.setOption({
  618. toolbox: {
  619. feature: {
  620. saveAsImage: {
  621. name: '图表',
  622. },
  623. },
  624. },
  625. title: {
  626. left: 'center',
  627. },
  628. legend: {
  629. top: '13%',
  630. left: 'center',
  631. },
  632. tooltip: {
  633. trigger: 'item',
  634. },
  635. grid: {
  636. left: '3%',
  637. right: '3%',
  638. bottom: '3%',
  639. containLabel: true,
  640. },
  641. series: [
  642. {
  643. name: 'Access From',
  644. type: 'pie',
  645. radius: '50%',
  646. data: myChartData,
  647. emphasis: {
  648. itemStyle: {
  649. shadowBlur: 10,
  650. shadowOffsetX: 0,
  651. shadowColor: 'rgba(0, 0, 0, 0.5)',
  652. },
  653. },
  654. },
  655. ],
  656. });
  657. });
  658. },
  659. },
  660. };
  661. </script>
  662. <style scoped>
  663. ::v-deep.el-pagination.is-background .btn-next,
  664. ::v-deep.el-pagination.is-background .btn-prev,
  665. ::v-deep.el-pagination.is-background .el-pager li {
  666. margin: 0 5px;
  667. background-color: #fff;
  668. color: #606266;
  669. min-width: 30px;
  670. border-radius: 2px;
  671. border: 1px solid #dfe3f3;
  672. line-height: 27px;
  673. }
  674. ::v-deep.el-pagination.is-background .el-pager li:not(.disabled).active {
  675. background: #7e8bab;
  676. }
  677. ::v-deep.el-table .el-table__row td {
  678. color: #7e8bab;
  679. border-bottom: 1px solid #f4f4f4;
  680. }
  681. ::v-deep.el-table .el-table__header tr th:first-child {
  682. border-radius: 10px 0px 0px 10px;
  683. }
  684. ::v-deep.el-table .el-table__header tr th:last-child {
  685. border-radius: 0px 10px 10px 0px;
  686. }
  687. ::v-deep.el-table .el-table__header tr th {
  688. background: #f1f6ff;
  689. color: #13171e;
  690. border-bottom: 0px;
  691. }
  692. </style>
  693. <style lang="scss" scoped>
  694. .ytext {
  695. font-size: 16px;
  696. color: #e48d53;
  697. font-weight: 400;
  698. line-height: 40px;
  699. text-align: right;
  700. }
  701. .block {
  702. margin-bottom: 16px;
  703. background: #fff;
  704. padding: 25px 15px;
  705. border-radius: 5px;
  706. .blockCon {
  707. // display: flex;
  708. justify-content: space-between;
  709. .lefts {
  710. display: flex;
  711. align-items: center;
  712. justify-content: space-between;
  713. }
  714. .selects {
  715. margin: 0 20px;
  716. span {
  717. margin-right: 10px;
  718. }
  719. }
  720. }
  721. }
  722. .cardBox {
  723. margin: 0 0 16px 0;
  724. background: #fff;
  725. padding: 25px 15px;
  726. border-radius: 5px;
  727. .contentBox {
  728. display: flex;
  729. .left {
  730. display: flex;
  731. flex: 1;
  732. .l {
  733. // max-width: 500px;
  734. // width: 400px;
  735. display: flex;
  736. flex: 1;
  737. flex-wrap: wrap;
  738. .i {
  739. width: calc(50% - 20px);
  740. margin: 5px 0;
  741. min-width: 150px;
  742. margin-right: 20px;
  743. height: 86px;
  744. background: #30b48e;
  745. border-radius: 5px;
  746. position: relative;
  747. overflow: hidden;
  748. display: flex;
  749. align-items: center;
  750. justify-content: space-around;
  751. text-align: center;
  752. .ba {
  753. // flex: 1;
  754. width: 70px;
  755. font-size: 16px;
  756. font-weight: 400;
  757. color: #fff;
  758. // margin: 18px 0 0 38px;
  759. }
  760. .num {
  761. font-size: 24px;
  762. font-weight: bold;
  763. color: #fff;
  764. // margin: 15px 0 0 38px;
  765. // flex: 1;
  766. // margin-left: 20px;
  767. }
  768. .icon {
  769. width: 50px;
  770. position: absolute;
  771. top: 18px;
  772. right: 25px;
  773. }
  774. }
  775. }
  776. .r {
  777. margin: 0 1% 0 0;
  778. .i {
  779. // width: 280px;
  780. flex: 1;
  781. min-width: 180px;
  782. height: 56px;
  783. background: #eaf4ff;
  784. border-radius: 4px;
  785. margin: 0 0 9px 0;
  786. display: flex;
  787. align-items: center;
  788. justify-content: center;
  789. // position: relative;
  790. .icon {
  791. width: 22px;
  792. margin: 6px 0 0 27px;
  793. }
  794. .t {
  795. // flex: 1;
  796. font-size: 18px;
  797. font-weight: 400;
  798. color: #333333;
  799. text-align: left;
  800. margin-left: 10px;
  801. // margin: 5px 0 0 27px;
  802. }
  803. .rt {
  804. margin-left: 10px;
  805. // flex: 1;
  806. // position: absolute;
  807. // right: 15px;
  808. // top: 10px;
  809. font-weight: bold;
  810. color: #38a1f2;
  811. font-size: 18px;
  812. text-align: left;
  813. }
  814. }
  815. .i:nth-child(1) {
  816. background: #93d2f3;
  817. }
  818. .i:nth-child(2) {
  819. background: #f4ce98;
  820. }
  821. .i:nth-child(3) {
  822. background: #de868f;
  823. }
  824. }
  825. }
  826. .right {
  827. width: 521px;
  828. }
  829. }
  830. .tableBox1 {
  831. padding-right: 521px;
  832. position: relative;
  833. .left {
  834. .top {
  835. display: flex;
  836. justify-content: space-between;
  837. margin: 13px 0;
  838. .lt {
  839. display: flex;
  840. .item {
  841. padding: 0 20px 0 0;
  842. background: #f1f6ff;
  843. border-radius: 4px;
  844. display: flex;
  845. align-items: center;
  846. margin: 0 11px 0 0;
  847. .icon {
  848. width: 18px;
  849. margin: 12px;
  850. }
  851. .con {
  852. font-size: 16px;
  853. font-weight: 400;
  854. color: #333333;
  855. }
  856. .baifen {
  857. font-size: 16px;
  858. font-weight: bold;
  859. color: #185da6;
  860. margin: 0 0 0 15px;
  861. }
  862. }
  863. }
  864. }
  865. }
  866. .right {
  867. width: 521px;
  868. position: absolute;
  869. right: 0;
  870. top: 0;
  871. }
  872. }
  873. .tableBox2 {
  874. .top {
  875. display: flex;
  876. justify-content: space-between;
  877. margin: 13px 0;
  878. }
  879. }
  880. }
  881. .blueju {
  882. background: #a0d0f0;
  883. color: #000;
  884. border: 1px solid #d8d9da;
  885. }
  886. .whiteju {
  887. border: 2px solid #d8d9da;
  888. display: flex;
  889. align-items: center;
  890. height: 40px;
  891. }
  892. .footers {
  893. display: flex;
  894. justify-content: flex-end;
  895. margin-top: 20px;
  896. }
  897. .color-btn {
  898. color: #409eff;
  899. border-color: #c6e2ff;
  900. background-color: #ecf5ff;
  901. }
  902. .blue{
  903. // font-size: 20px;
  904. font-weight: 600;
  905. color: #409eff;
  906. text-decoration:underline;
  907. }
  908. </style>