| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057 |
- <style lang="scss" scoped>
- .preview {
- height: 80vh;
- overflow: auto;
- .aname{
- text-align: center;
- margin-bottom: 20px;
- color: #333;
- font-size: 16px;
- }
- .ainfo{
- display: flex;
- margin-bottom: 10px;
- p{
- width: 60%;
- margin-left: 15px;
- line-height: 26px;
- }
- }
- b{
- color: #333;
- }
- div{
- line-height: 26px;
- margin-bottom: 10px;
- overflow: auto;
- }
- }
- </style>
- <template>
- <section v-if="this.role_id==1" class="index-content">
- <div class="index_header">
- <div class="header-item">
- <div class="item-img">
- <img src="../assets/book.png" alt="" />
- <span class="text">
- 期刊总数 <br /><span class="count">{{
- form.journal_total
- }}</span></span
- >
- </div>
- <div class="item-img">
- <img src="../assets/network.png" alt="" />
- <span class="text">
- 文章发布量 <br /><span class="count">{{
- form.article_total
- }}</span></span
- >
- </div>
- </div>
- <div class="header-item">
- <div class="item-text">
- <div>
- <span class="text">会议举办次数</span
- ><span class="count">{{ form.conference_total }}</span>
- </div>
- <div>
- <span class="text">活动举办次数</span>
- <span class="count">{{ form.activity_total }}</span>
- </div>
- </div>
- <div class="item-text">
- <div>
- <span class="text">总阅读次数</span
- ><span class="count">{{ form.article_readnum }}</span>
- </div>
- <div>
- <span class="text">转发次数</span
- ><span class="count">{{ form.article_forwardnum }}</span>
- </div>
- </div>
- </div>
- <div class="header-item" style="position: relative">
- <span style="position: absolute; top: 0; left: 5px; color: #666"
- >搜索热词</span
- >
- <wordcloud
- v-if="form.search_hot_word"
- style="width: 80%; height: 100px; margin-left: 20%"
- :data="form.search_hot_word"
- nameKey="name"
- :fontSize="[10, 24]"
- valueKey="value"
- :color="myColors"
- :showTooltip="false"
- >
- </wordcloud>
- </div>
- </div>
- <div class="index-main">
- <div class="main-item">
- <div class="item-title">期刊统计</div>
- <div class="item-more" style="cursor:pointer;" @click='$router.push({"path":"/journal/journal"})'>查看更多>></div>
- </div>
- <div class="main-content">
- <div class="c1">
- <div class="c1-title">学科期刊分布</div>
- <div ref="subject" style="width: 100%; height: 250px"></div>
- </div>
- <div class="c2">
- <div class="c2-title">单位期刊统计</div>
- <div ref="company" style="width: 100%; height: 250px"></div>
- </div>
- <div class="c1">
- <div class="c1-title">期刊文章TOP5</div>
- <div ref="article" style="width: 100%; height: 250px"></div>
- </div>
- </div>
- </div>
- <div class="index-main">
- <div class="main-item">
- <div class="item-title">文章统计</div>
- <div class="item-more" style="cursor:pointer;" @click='$router.push({"path":"/article/article"})'>查看更多>></div>
- </div>
- <div class="main-content">
- <div class="c1">
- <div class="c1-title">文章来源分析</div>
- <div ref="article_sorce" style="width: 100%; height: 250px"></div>
- </div>
- <div class="c2">
- <div class="c2-title">文章发布/时间统计</div>
- <div ref="article_time" style="width: 100%; height: 250px"></div>
- </div>
- <div class="c1">
- <div class="c1-title">文章阅读量TOP5</div>
- <div ref="article_ready" style="width: 100%; height: 250px">
- <div class="h2">
- <span>序号</span>
- <span>文章标题</span>
- <span>阅读次数</span>
- </div>
- <div
- class="con2"
- v-for="(item, index) in form.article_readnum_top5"
- :key="index"
- @click="getArticle(item.id),open=true"
- >
- <span>{{ index + 1 }}</span>
- <span class="a_title">{{ item.name }}</span>
- <span>{{ item.read_num }}</span>
- </div>
- <div></div>
- </div>
- </div>
- </div>
- </div>
- <div class="index-main">
- <div class="main-item">
- <div class="item-title">会议统计</div>
- <div class="item-more" style="cursor:pointer;" @click='$router.push({"path":"/conference/conference"})'>查看更多>></div>
- </div>
- <div class="main-content">
- <div class="c1">
- <div class="c1-title">会议主办方统计</div>
- <div ref="meet_count" style="width: 100%; height: 250px"></div>
- </div>
- <div class="c1">
- <div class="c2-title">会议发布/时间统计</div>
- <div ref="meet_time" style="width: 100%; height: 250px"></div>
- </div>
- </div>
- </div>
- <el-dialog
- title=""
- :visible.sync="open"
- width="414px">
- <div class="preview">
- <p class="aname">{{article.name}}</p>
- <div class="ainfo">
- <img width="100" :src="article.img" alt="">
- <p>
- 发布单位:{{journal_name}} <br>
- 作者:{{article.author}} <br>
- 发表时间:{{article.publish_time}}
- </p>
- </div>
- <b>文章简介</b>
- <div class="adesc">{{article.desc}}</div>
- <b>文章内容</b>
- <div v-html="article.content"></div>
- </div>
- <!-- <span slot="footer" class="dialog-footer">
- <el-button type="primary" @click="open = false">确 定</el-button>
- </span> -->
- </el-dialog>
- </section>
- <!-- 期刊管理员首页 -->
- <section v-else>
- <CASCI></CASCI>
- </section>
- </template>
- <script>
- import echarts from "echarts";
- import wordcloud from "vue-wordcloud";
- import CASCI from '../components/CASCI'
- export default {
- data() {
- return {
- // chartData: [],
- open:false,
- form: {},
- article:{},
- list: [
- { article_header: "中国生态效率时空演化研究", count: "132" },
- { article_header: "中国生态效率时空演化研究", count: "132" },
- { article_header: "中国生态效率时空演化研究", count: "132" },
- { article_header: "中国生态效率时空演化研究", count: "132" },
- { article_header: "中国生态效率时空演化研究", count: "132" },
- ],
- myColors: ["#1f77b4", "#629fc9", "#94bedb", "#c9e0ef"],
- role_id:1
- };
- },
- components: {
- wordcloud,
- CASCI
- },
- computed: {},
- methods: {
- getEcharts() {
- var myChart = this.$echarts.init(this.$refs.subject);
- var myChart1 = this.$echarts.init(this.$refs.company);
- var myChart2 = this.$echarts.init(this.$refs.article);
- var myChart3 = this.$echarts.init(this.$refs.article_sorce);
- var myChart4 = this.$echarts.init(this.$refs.article_time);
- var myChart5 = this.$echarts.init(this.$refs.meet_count);
- var myChart6 = this.$echarts.init(this.$refs.meet_time);
- // 学科期刊
- let option = {
- backgroundColor: "#fff",
- // title: {
- // text: 'Customized Pie',
- // left: 'center',
- // top: 20,
- // textStyle: {
- // color: '#ccc'
- // }
- // },
- color: ["#9379ff", "#62A2FF", "#FFD053", "#FF9F41", "#FF542C"],
- tooltip: {
- trigger: "item",
- formatter: "{a} <br/>{b} : {c} ({d}%)",
- },
- // visualMap: {
- // show: false,
- // min: 80,
- // max: 600,
- // inRange: {
- // colorLightness: [0, 1]
- // }
- // },
- series: [
- {
- name: "期刊数量",
- type: "pie",
- radius: "55%",
- center: ["50%", "50%"],
- // data: [
- // { value: 335, name: "直接访问" },
- // { value: 310, name: "邮件营销" },
- // { value: 274, name: "联盟广告" },
- // { value: 235, name: "视频广告" },
- // { value: 400, name: "搜索引擎" },
- // ].sort(function (a, b) {
- // return a.value - b.value;
- // }),
- data: this.form.subject_journal.sort(function (a, b) {
- return a.value - b.value;
- }),
- roseType: "radius",
- label: {
- color: "rgba(102, 102, 102,1)",
- fontSize: 14,
- },
- labelLine: {
- lineStyle: {
- color: "rgba(000, 000, 000, 0.1)",
- },
- smooth: 0.2,
- length: 8,
- length2: 5,
- },
- itemStyle: {
- // color: '#c23531',
- // shadowBlur: 200,
- // shadowColor: 'rgba(0, 0, 0, 0.5)'
- },
- animationType: "scale",
- animationEasing: "elasticOut",
- animationDelay: function (idx) {
- return Math.random() * 200;
- },
- },
- ],
- };
- // 单位期刊统计
- let option1 = {
- color: ["#5066FF"],
- tooltip: {
- trigger: "axis",
- axisPointer: {
- // 坐标轴指示器,坐标轴触发有效
- type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
- },
- },
- grid: {
- left: "3%",
- right: "4%",
- bottom: "3%",
- top: "10%",
- containLabel: true,
- },
- xAxis: [
- {
- type: "category",
- // data: ["Mon", "Tue", "Wed", "Thu"],
- data: this.form.organizer_journal_x,
- axisTick: {
- alignWithLabel: true,
- },
- axisLine: {
- lineStyle: {
- color: "#D4D8EE",
- width: 2,
- type: "dotted",
- },
- },
- axisLabel: {
- formatter: function (val) {
- // return "中国科"; //对每个标签处理后的结果(通过js字符串方法处理)
- return val;
- },
- // x轴字体颜色
- textStyle: {
- color: "#999999",
- // lineHeight: 20,
- fontSize: 12,
- },
- align: "center",
- // padding:[10,0 ,0,-40],
- },
- },
- ],
- yAxis: [
- {
- type: "value",
- boundaryGap: ["0%", "20%"],
- axisTick: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisLabel: {
- show: true,
- textStyle: {
- color: "#666666", //更改坐标轴文字颜色
- fontSize: 14, //更改坐标轴文字大小
- },
- },
- splitLine: {
- show: true,
- lineStyle: {
- type: "dashed",
- },
- },
- // data:['0' , '100' , '200' , '300,400]
- },
- ],
- series: [
- {
- name: "期刊数量",
- type: "bar",
- barWidth: "40%",
- // data: [10, 52, 200, 334],
- data: this.form.organizer_journal_y,
- itemStyle: {
- //柱形图圆角,鼠标移上去效果,如果只是一个数字则说明四个参数全部设置为那么多
- normal: {
- //柱形图圆角,初始化效果
- barBorderRadius: [10, 10, 10, 10],
- },
- },
- },
- ],
- };
- // 期刊文章前5
- let option2 = {
- // title: {
- // text: '世界人口总量',
- // subtext: '数据来自网络'
- // },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- type: "shadow",
- },
- },
- // legend: {
- // data: ['2011年', '2012年']
- // },
- grid: {
- left: "3%",
- right: "4%",
- bottom: "3%",
- top: "10%",
- containLabel: true,
- },
- xAxis: {
- type: "value",
- show: false,
- // boundaryGap: ['0', '50%']
- },
- yAxis: {
- // show:false,
- type: "category",
- axisTick: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- // data: ["应用物理", "应用物理", "应用物理", "应用物理", "应用物理"],
- data: this.form.journal_article_x,
- },
- series: [
- // {
- // name: '2011年',
- // type: 'bar',
- // data: [18203, 23489, 29034, 104970, 131744]
- // },
- {
- name: "文章数量",
- type: "bar",
- // data: [19325, 23438, 31000, 121594, 134141],
- data: this.form.journal_article_y,
- barWidth: "30%",
- itemStyle: {
- //柱形图圆角,鼠标移上去效果,如果只是一个数字则说明四个参数全部设置为那么多
- normal: {
- //柱形图圆角,初始化效果
- barBorderRadius: [10, 10, 10, 10],
- color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
- {
- offset: 0,
- color: "#FF852C",
- },
- {
- offset: 1,
- color: "#FFCF29",
- },
- ]),
- label: {
- show: true, //开启显示
- position: "right", //在上方显示
- textStyle: {
- //数值样式
- color: "#666666",
- fontSize: 14,
- },
- },
- },
- },
- },
- ],
- };
- // 文章来源分布
- let option3 = {
- backgroundColor: "#fff",
- // title: {
- // text: 'Customized Pie',
- // left: 'center',
- // top: 20,
- // textStyle: {
- // color: '#ccc'
- // }
- // },
- color: ["#FA9022", "#DCDB01", "#8C70F8", "#34A6FE", "#2A4AD1"],
- tooltip: {
- trigger: "item",
- formatter: "{a} <br/>{b} : {c} ({d}%)",
- },
- // visualMap: {
- // show: false,
- // min: 80,
- // max: 600,
- // inRange: {
- // colorLightness: [0, 1]
- // }
- // },
- series: [
- {
- name: "访问来源",
- type: "pie",
- radius: "55%",
- center: ["50%", "50%"],
- // data: [
- // { value: 335, name: "直接访问" },
- // { value: 310, name: "邮件营销" },
- // { value: 274, name: "联盟广告" },
- // { value: 235, name: "视频广告" },
- // { value: 400, name: "搜索引擎" },
- // ].sort(function (a, b) {
- // return a.value - b.value;
- // }),
- // data:this.form.journal_article.sort(function(a,b){return a.value-b.value}),
- data: this.form.journal_article,
- roseType: "radius",
- label: {
- color: "rgba(102, 102, 102,1)",
- fontSize: 14,
- },
- labelLine: {
- lineStyle: {
- color: "rgba(000, 000, 000, 0.1)",
- },
- smooth: 0.2,
- length: 8,
- length2: 5,
- },
- itemStyle: {
- // color: '#c23531',
- // shadowBlur: 200,
- // shadowColor: 'rgba(0, 0, 0, 0.5)'
- },
- animationType: "scale",
- animationEasing: "elasticOut",
- animationDelay: function (idx) {
- return Math.random() * 200;
- },
- },
- ],
- };
- // 文章分布/时间统计
- let option4 = {
- color: "#FFB81E",
- grid: {
- left: "3%",
- right: "4%",
- bottom: "3%",
- top: "10%",
- containLabel: true,
- },
- xAxis: {
- type: "category",
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: "#D4D8EE",
- width: 2,
- // type:'dotted',
- },
- },
- // data: ["1", "2", "3", "", "", "", ""],
- data: this.form.pubtime_article_x,
- axisLabel: {
- formatter: function (val) {
- // return "中国科学院成都生物研究所 中国科学院成都生物研究所"; //对每个标签处理后的结果(通过js字符串方法处理)
- return val;
- },
- // x轴字体颜色
- textStyle: {
- color: "#999999",
- // lineHeight: 20,
- // fontSize: 12
- },
- align: "left",
- // padding:[10,0 ,0,-40],
- },
- },
- yAxis: {
- type: "value",
- splitLine: {
- show: true,
- lineStyle: {
- type: "dashed",
- },
- },
- axisTick: {
- show: false,
- interval: 100,
- },
- axisLine: {
- show: false,
- },
- boundaryGap: ["0%", "30%"],
- },
- series: [
- {
- // data: [50, 200, 20, 300, 150, 300, 100],
- data: this.form.pubtime_article_y,
- type: "line",
- symbol: "none", //取消折点圆圈
- areaStyle: {
- color: {
- type: "linear",
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [
- {
- offset: 0,
- color: "#FFC765", // 0% 处的颜色
- },
- {
- offset: 1,
- color: "#ffffff", // 100% 处的颜色
- },
- ],
- global: false, // 缺省为 false
- },
- },
- smooth: true,
- },
- ],
- };
- // 会议主办方统计
- let option5 = {
- color: ["#5066FF"],
- tooltip: {
- trigger: "axis",
- axisPointer: {
- // 坐标轴指示器,坐标轴触发有效
- type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
- },
- },
- grid: {
- left: "3%",
- right: "4%",
- bottom: "3%",
- top: "10%",
- containLabel: true,
- },
- xAxis: [
- {
- type: "category",
- // data: ["", "", "", "", "", ""],
- data: this.form.organizer_conference_x,
- axisTick: {
- alignWithLabel: true,
- },
- axisLine: {
- lineStyle: {
- color: "#D4D8EE",
- width: 2,
- type: "dotted",
- },
- },
- axisLabel: {
- formatter: function (val) {
- // return "中国科"; //对每个标签处理后的结果(通过js字符串方法处理)
- return val;
- },
- // x轴字体颜色
- textStyle: {
- color: "#999999",
- // lineHeight: 20,
- fontSize: 12,
- },
- align: "center",
- // padding:[10,0 ,0,-40],
- },
- },
- ],
- yAxis: [
- {
- type: "value",
- boundaryGap: ["0%", "20%"],
- axisTick: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisLabel: {
- show: true,
- textStyle: {
- color: "#666666", //更改坐标轴文字颜色
- fontSize: 14, //更改坐标轴文字大小
- },
- },
- splitLine: {
- show: true,
- lineStyle: {
- type: "dashed",
- },
- },
- // data:['0' , '100' , '200' , '300,400]
- },
- ],
- series: [
- {
- name: "会议数量",
- type: "bar",
- barWidth: "40%",
- // data: [50, 52, 200, 334, 45, 190, 240],
- data: this.form.organizer_conference_y,
- itemStyle: {
- //柱形图圆角,鼠标移上去效果,如果只是一个数字则说明四个参数全部设置为那么多
- normal: {
- //柱形图圆角,初始化效果
- barBorderRadius: [10, 10, 10, 10],
- },
- },
- },
- ],
- };
- // 会议发布/时间统计
- let option6 = {
- color: "#FFB81E",
- grid: {
- left: "3%",
- right: "4%",
- bottom: "3%",
- top: "10%",
- containLabel: true,
- },
- xAxis: {
- type: "category",
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: "#D4D8EE",
- width: 2,
- // type:'dotted',
- },
- },
- // data: ["1", "1", "1", "1", "1", "1", "1"],
- data: this.form.pubtime_conference_x,
- axisLabel: {
- formatter: function (val) {
- return val;
- },
- // x轴字体颜色
- textStyle: {
- color: "#999999",
- // lineHeight: 20,
- // fontSize: 12
- },
- align: "left",
- // padding:[10,0 ,0,-40],
- },
- },
- yAxis: {
- type: "value",
- splitLine: {
- show: true,
- lineStyle: {
- type: "dashed",
- },
- },
- axisTick: {
- show: false,
- interval: 100,
- },
- axisLine: {
- show: false,
- },
- boundaryGap: ["0%", "30%"],
- },
- series: [
- {
- // data: [50, 200, 20, 300, 150, 300, 100],
- data: this.form.pubtime_conference_y,
- type: "line",
- symbol: "none", //取消折点圆圈
- areaStyle: {
- color: {
- type: "linear",
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [
- {
- offset: 0,
- color: "#FFC765", // 0% 处的颜色
- },
- {
- offset: 1,
- color: "#ffffff", // 100% 处的颜色
- },
- ],
- global: false, // 缺省为 false
- },
- },
- smooth: true,
- },
- ],
- };
- myChart.setOption(option);
- myChart1.setOption(option1);
- myChart2.setOption(option2);
- myChart3.setOption(option3);
- myChart4.setOption(option4);
- myChart5.setOption(option5);
- myChart6.setOption(option6);
- },
- getData() {
- this.$api.getIndexData({}).then((res) => {
- this.form = res.data.data;
- this.form.search_hot_word = this.form.search_hot_word.concat(
- this.form.search_hot_word
- );
- let organizer_journal_x = [];
- let organizer_journal_y = [];
- let journal_article_x = [];
- let journal_article_y = [];
- let pubtime_article_x = [];
- let pubtime_article_y = [];
- let organizer_conference_x = [];
- let organizer_conference_y = [];
- let pubtime_conference_x = [];
- let pubtime_conference_y = [];
- this.form.organizer_journal.forEach((item, index) => {
- organizer_journal_x.push(item.name);
- organizer_journal_y.push(item.value);
- });
- this.form.journal_article_top5.forEach((item, index) => {
- journal_article_x.push(item.journal_name);
- journal_article_y.push(item.count);
- });
- this.form.pubtime_article.forEach((item, index) => {
- pubtime_article_x.push(item.publish_time);
- pubtime_article_y.push(item.count);
- });
- this.form.organizer_conference.forEach((item, index) => {
- organizer_conference_x.push(item.organizer_name);
- organizer_conference_y.push(item.count);
- });
- this.form.pubtime_conference.forEach((item, index) => {
- pubtime_conference_x.push(item.publish_time);
- pubtime_conference_y.push(item.count);
- });
- this.form.organizer_journal_x = organizer_journal_x;
- this.form.organizer_journal_y = organizer_journal_y;
- this.form.journal_article_x = journal_article_x.reverse();
- this.form.journal_article_y = journal_article_y.reverse();
- this.form.pubtime_article_x = pubtime_article_x;
- this.form.pubtime_article_y = pubtime_article_y;
- this.form.organizer_conference_x = organizer_journal_x;
- this.form.organizer_conference_y = organizer_journal_y;
- this.form.pubtime_conference_x = pubtime_conference_x;
- this.form.pubtime_conference_y = pubtime_conference_y;
- this.getEcharts();
- });
- },
- getArticle(id){
- this.article={};
- this.$api.getArticle({ id: id }).then((res) => {
- this.article = res.data.data;
- });
- }
- },
- mounted() {},
- beforeCreate(){
- this.$api.getAccountInfo().then((res) => {
- this.role_id = res.data.data.role_id;
- // this.getData();
- // var color = [];
- // for (let i = 0; i < 5; i++) {
- // let c =
- // "rgb(" +
- // [
- // Math.round(Math.random() * 160),
- // Math.round(Math.random() * 160),
- // Math.round(Math.random() * 160),
- // ].join(",") +
- // ")";
- // color.push(c);
- // }
- // this.myColors = color;
- });
- },
- created() {
- this.$api.getAccountInfo().then((res) => {
- this.role_id = res.data.data.role_id;
- this.getData();
- var color = [];
- for (let i = 0; i < 5; i++) {
- let c =
- "rgb(" +
- [
- Math.round(Math.random() * 160),
- Math.round(Math.random() * 160),
- Math.round(Math.random() * 160),
- ].join(",") +
- ")";
- color.push(c);
- }
- this.myColors = color;
- });
- },
- };
- </script>
- <style lang='scss' scoped>
- section {
- // width:100%;
- .index_header {
- background: #ffffff;
- height: 102px;
- border-radius: 10px;
- display: flex;
- align-items: center;
- .header-item {
- flex: 1;
- display: flex;
- justify-content: space-evenly;
- align-items: center;
- height: 56px;
- &:not(:last-child) {
- border-right: 1px solid #d8d8d8;
- }
- .text {
- font-size: 16px;
- color: #666666;
- }
- .count {
- font-size: 32px;
- }
- .item-img {
- display: flex;
- img {
- width: 56px;
- height: 56px;
- margin-right: 30px;
- }
- .text {
- position: relative;
- top: -8px;
- }
- .count {
- color: #208cfe;
- position: relative;
- bottom: -11px;
- }
- }
- .item-text {
- & > div {
- display: flex;
- align-items: center;
- .text {
- width: 120px;
- }
- }
- }
- }
- }
- .index-main {
- background: #ffffff;
- border-radius: 10px;
- margin-top: 20px;
- padding: 20px;
- .main-item {
- position: relative;
- .item-title {
- font-size: 18px;
- font-weight: bold;
- color: #333333;
- margin-bottom: 20px;
- }
- .item-more {
- position: absolute;
- top: 20px;
- right: 20px;
- font-size: 14px;
- color: #3895fe;
- }
- }
- .main-content {
- display: flex;
- & > div:not(:last-child) {
- border-right: 1px solid #eee;
- }
- .c1 {
- flex: 1;
- .h2 {
- font-size: 14px;
- color: #999999;
- height: 40px;
- line-height: 40px;
- width: 80%;
- span:nth-of-type(2) {
- margin-left: 20px;
- }
- span:last-child {
- float: right;
- }
- }
- .con2 {
- font-size: 14px;
- color: #333333;
- height: 36px;
- line-height: 36px;
- background: #fafafa;
- border-radius: 7px;
- margin-bottom: 8px;
- padding: 0 10px;
- display: flex;
- width: 80%;
- cursor: pointer;
- &:nth-of-type(2) {
- color: #ef3d3d;
- }
- &:nth-of-type(3) {
- color: #fdad23;
- }
- &:nth-of-type(4) {
- color: #56ccf6;
- }
- span:nth-of-type(2) {
- margin-left: 20px;
- }
- span:last-child {
- float: right;
- }
- .a_title {
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- width: 80%;
- }
- }
- }
- .c2 {
- flex: 1.5;
- }
- .c1,
- .c2 {
- width: 100%;
- // flex:1;
- padding: 10px;
- box-sizing: border-box;
- }
- .c1-title,
- .c2-title {
- font-size: 15px;
- font-weight: bold;
- color: #666666;
- // margin-top:20px;
- }
- }
- }
- }
- </style>
|