| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058 |
- <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,
- journal_name:""
- };
- },
- 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>
|