mode
This commit is contained in:
parent
361046f21c
commit
24702ae2e4
|
@ -15,10 +15,8 @@ export default {
|
|||
return {};
|
||||
},
|
||||
mounted() {
|
||||
if (this.data) {
|
||||
this.$nextTick(() => {
|
||||
if (Object.keys(this.data).length!==0) {
|
||||
this.initLine();
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<template>
|
||||
<el-row>
|
||||
<el-row class="logo-box" type="flex" align="middle" justify="center">
|
||||
<el-image
|
||||
class="logo"
|
||||
:style="{ width: collapse ? '30px' : '150px' }"
|
||||
:src="collapse ? small_logo : !status ? logo : logo_white"
|
||||
/>
|
||||
<el-image
|
||||
class="logo"
|
||||
:style="{ width: collapse ? '30px' : '150px' }"
|
||||
:src="collapse ? small_logo : !status ? logo : logo_white"
|
||||
/>
|
||||
</el-row>
|
||||
<el-menu
|
||||
:default-active="activeKey"
|
||||
|
@ -15,10 +15,26 @@
|
|||
class="el-menu-vertical-demo"
|
||||
active-text-color="#409EFF"
|
||||
>
|
||||
<el-menu-item v-for="item in menu" :key="item.id" :index="item.id">
|
||||
<i :class="item.icon" />
|
||||
<span>{{ item.title }}</span>
|
||||
</el-menu-item>
|
||||
<div v-for="item in menu" :key="item.id">
|
||||
<el-menu-item v-if="!item.children" :index="item.id">
|
||||
<i :class="item.icon" />
|
||||
<span>{{ item.title }}</span>
|
||||
</el-menu-item>
|
||||
<el-submenu :index="item.id" v-else>
|
||||
<template slot="title">
|
||||
<i :class="item.icon" />
|
||||
<span>{{ item.title }}</span>
|
||||
</template>
|
||||
<el-menu-item
|
||||
v-for="(child, i) in item.children"
|
||||
:key="i"
|
||||
:index="child.id"
|
||||
>
|
||||
<i :class="child.icon" />
|
||||
<span>{{ child.title }}</span>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</div>
|
||||
</el-menu>
|
||||
</el-row>
|
||||
</template>
|
||||
|
@ -59,18 +75,28 @@ export default {
|
|||
id: "4",
|
||||
title: "设置",
|
||||
icon: "el-icon-setting",
|
||||
content: "userList",
|
||||
children: [
|
||||
{
|
||||
id: "4-1",
|
||||
title: "用户设置",
|
||||
icon: "el-icon-user",
|
||||
content: "userList",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleSelect(key, keyPath) {
|
||||
this.$store.commit("set_tabs_key", key);
|
||||
this.$store.commit("set_tabs", this.menu[Number(key) - 1]);
|
||||
this.$emit("handleSelect", keyPath[0]);
|
||||
keyPath.length === 1
|
||||
? this.$store.commit("set_tabs", this.menu[Number(key) - 1])
|
||||
: this.$store.commit(
|
||||
"set_tabs",
|
||||
this.menu[Number(keyPath[0]) - 1].children[key[key.length - 1] - 1]
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
type="card"
|
||||
closable
|
||||
@edit="handleTabsEdit"
|
||||
@tab-click="handleClick"
|
||||
>
|
||||
<el-tab-pane
|
||||
:key="item.name"
|
||||
|
@ -31,7 +32,7 @@
|
|||
<span slot="label"
|
||||
><i :class="item.icon"></i> {{ item.title }}</span
|
||||
>
|
||||
<div class="pane-box"><component :is="item.content" /></div>
|
||||
<div class="pane-box"><component :is="item.content" :key="item.id"/></div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-main>
|
||||
|
@ -81,18 +82,22 @@ export default {
|
|||
this.status = params;
|
||||
},
|
||||
|
||||
handleClick(key){
|
||||
this.$store.commit("set_tabs_key", key.name);
|
||||
},
|
||||
|
||||
handleTabsEdit(targetName, action) {
|
||||
if (action === "remove") {
|
||||
const key = this.$store.state.tabs.findIndex((item) => {
|
||||
return targetName == item.id;
|
||||
});
|
||||
this.$store.commit("set_tabs_key", this.$store.state.tabs[key - 1].id);
|
||||
this.$store.commit(
|
||||
"delete_tabs_item",
|
||||
this.tabs.find((item) => {
|
||||
return item.id === targetName;
|
||||
})
|
||||
);
|
||||
this.$store.commit("set_tabs_key", this.$store.state.tabs[key - 1].id);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -28,11 +28,14 @@ import { get } from "api/api";
|
|||
import FecrTable from "components/FecrTable";
|
||||
export default {
|
||||
components: { FecrTable },
|
||||
props: {
|
||||
company_name: [String],
|
||||
},
|
||||
data() {
|
||||
return { data: {}, business: [] };
|
||||
return {
|
||||
data: {},
|
||||
business: [],
|
||||
cid: this.$store.state.tabs.find((item) => {
|
||||
return this.$store.state.tabsKey === item.id;
|
||||
}).cid,
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
|
@ -41,11 +44,8 @@ export default {
|
|||
|
||||
methods: {
|
||||
init() {
|
||||
const cid = this.$store.state.tabs.find((item) => {
|
||||
return this.$store.state.tabsKey === item.id;
|
||||
}).cid;
|
||||
get("/admin/company/basic_data", {
|
||||
cid,
|
||||
cid: this.cid,
|
||||
}).then((res) => {
|
||||
this.data = res.result;
|
||||
this.business = res.result["工商信息"]
|
||||
|
@ -69,6 +69,14 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
"$store.state.tabsKey"(newVal) {
|
||||
this.cid = this.$store.state.tabs.find((item) => {
|
||||
return newVal === item.id;
|
||||
}).cid
|
||||
this.init()
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<span>评级结果地图</span>
|
||||
<i class="el-icon-more"></i>
|
||||
</el-row>
|
||||
<fecr-map :height.sync="height" :data="ratingProvince" />
|
||||
<fecr-map :height.sync="height" :data="ratingProvince" v-if="$store.state.tabsKey == 1"/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -91,10 +91,6 @@ export default {
|
|||
},
|
||||
|
||||
created() {
|
||||
// this.height = document.body.clientHeight * 0.35;
|
||||
// window.addEventListener("resize", function () {
|
||||
// this.height = document.body.clientHeight * 0.35;
|
||||
// });
|
||||
this.getRatingPie();
|
||||
this.getRatingTable();
|
||||
this.getRatingNumber();
|
||||
|
|
|
@ -3,8 +3,14 @@
|
|||
<el-row class="row-flex">
|
||||
<el-card v-for="(item, index) in data" :key="index">
|
||||
<el-descriptions :title="index">
|
||||
<el-descriptions-item v-for="(v, k) in item" :key="k" :label="k">
|
||||
{{ v }}
|
||||
<el-descriptions-item
|
||||
v-for="(v, k) in item"
|
||||
:key="k"
|
||||
:label="k"
|
||||
:labelStyle="{ color: v !== null ? '#000' : '#F56C6C' }"
|
||||
:contentStyle="{ color: v !== null ? '#000' : '#F56C6C' }"
|
||||
>
|
||||
{{ v === null ? '---':v }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
|
|
@ -31,16 +31,30 @@
|
|||
style="margin-bottom: 20px"
|
||||
>
|
||||
<el-row type="flex" align="middle">
|
||||
<p style="margin-right: 20px;font-size:16px;font-weight:800">{{$store.state.tabs.find((item) => {
|
||||
return $store.state.tabsKey === item.id;
|
||||
}).data.company_name}}</p>
|
||||
<span style="font-size:14px">{{$store.state.tabs.find((item) => {
|
||||
return $store.state.tabsKey === item.id;
|
||||
}).data.report_date}}</span>
|
||||
<p style="margin-right: 20px; font-size: 16px; font-weight: 800">
|
||||
{{
|
||||
$store.state.tabs.find((item) => {
|
||||
return $store.state.tabsKey === item.id;
|
||||
}).data.company_name
|
||||
}}
|
||||
</p>
|
||||
<span style="font-size: 14px">{{
|
||||
$store.state.tabs.find((item) => {
|
||||
return $store.state.tabsKey === item.id;
|
||||
}).data.report_date
|
||||
}}</span>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="primary" size="small" @click="active--" :disabled="active===0">上一步</el-button>
|
||||
<el-button type="primary" size="small" @click="active++">下一步</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="preStep"
|
||||
:disabled="active === 0"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" @click="nextStep"
|
||||
>下一步</el-button
|
||||
>
|
||||
</el-row>
|
||||
</el-row>
|
||||
<financial v-if="active === 0" />
|
||||
|
@ -77,10 +91,20 @@ export default {
|
|||
this.active =
|
||||
this.tags.findIndex((item) => {
|
||||
return item.status === 0;
|
||||
})-1
|
||||
}) - 1;
|
||||
},
|
||||
|
||||
methods: {},
|
||||
methods: {
|
||||
preStep() {
|
||||
this.tags[this.active].status = 0;
|
||||
this.active--;
|
||||
|
||||
},
|
||||
nextStep() {
|
||||
this.active++;
|
||||
this.tags[this.active].status = 1;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<!-- 评级报告 -->
|
||||
<template>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-col :span="11">
|
||||
<el-col :span="12">
|
||||
<el-container>
|
||||
<el-aside style="width: 40%">
|
||||
<el-tree
|
||||
:data="tree"
|
||||
:props="defaultProps"
|
||||
:props="props"
|
||||
@node-click="handleNodeClick"
|
||||
></el-tree>
|
||||
</el-aside>
|
||||
|
@ -18,68 +18,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { get } from "@/api/api";
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
tree: [
|
||||
{
|
||||
label: "一级 1",
|
||||
children: [
|
||||
{
|
||||
label: "二级 1-1",
|
||||
children: [
|
||||
{
|
||||
label: "三级 1-1-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "一级 2",
|
||||
children: [
|
||||
{
|
||||
label: "二级 2-1",
|
||||
children: [
|
||||
{
|
||||
label: "三级 2-1-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "二级 2-2",
|
||||
children: [
|
||||
{
|
||||
label: "三级 2-2-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "一级 3",
|
||||
children: [
|
||||
{
|
||||
label: "二级 3-1",
|
||||
children: [
|
||||
{
|
||||
label: "三级 3-1-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "二级 3-2",
|
||||
children: [
|
||||
{
|
||||
label: "三级 3-2-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
tree: [],
|
||||
props: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
|
@ -88,9 +33,35 @@ export default {
|
|||
|
||||
computed: {},
|
||||
|
||||
created() {},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
async init() {
|
||||
const res = await get("/admin/rating/report_data", {
|
||||
rid: this.$store.state.tabs.find((item) => {
|
||||
return this.$store.state.tabsKey === item.id;
|
||||
}).data.rid,
|
||||
});
|
||||
this.tree = res.result["报告内容"].map((item) => {
|
||||
return {
|
||||
label: item["章节"],
|
||||
children: item["章节内容"].map((ele) => {
|
||||
return {
|
||||
label: ele["小节"],
|
||||
children: ele["小节内容"].map(() => {
|
||||
return {
|
||||
label: "段落",
|
||||
};
|
||||
}),
|
||||
};
|
||||
}),
|
||||
};
|
||||
});
|
||||
console.log(this.tree);
|
||||
},
|
||||
|
||||
handleNodeClick(data) {
|
||||
console.log(data);
|
||||
},
|
||||
|
|
|
@ -27,7 +27,7 @@ module.exports = {
|
|||
devServer: {
|
||||
disableHostCheck:true,
|
||||
open: false,//open 在devServer启动且第一次构建完成时,自动用我们的系统的默认浏览器去打开要开发的网页
|
||||
host: 'localhost',//默认是 localhost。如果你希望服务器外部可访问,指定如下 host: '0.0.0.0',设置之后之后可以访问ip地址
|
||||
host: '0.0.0.0',//默认是 localhost。如果你希望服务器外部可访问,指定如下 host: '0.0.0.0',设置之后之后可以访问ip地址
|
||||
port: 8081,
|
||||
hot: true,//hot配置是否启用模块的热替换功能,devServer的默认行为是在发现源代码被变更后,通过自动刷新整个页面来做到事实预览,开启hot后,将在不刷新整个页面的情况下通过新模块替换老模块来做到实时预览。
|
||||
https: false,
|
||||
|
|
Loading…
Reference in New Issue