Commit d7e9c4df authored by 王文琼's avatar 王文琼

看板模板

parent 22e394e6
......@@ -5,6 +5,7 @@
const path = require('path')
var configjson = require("../static/config.json")
var baseurl=process.env.IsNeedConfig?configjson.config.ProjectName+"/":"FTT.Board/";
console.log(baseurl);
module.exports = {
dev: {
......@@ -13,7 +14,7 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
"/api":{
target:"http://localhost/"+baseurl,
target:"http://192.168.1.201:8000/Board/",//+baseurl
// target:'http://jhdsoft.gicp.net:9201/fd_board/',
changOrigin:true,
pathRewrite:{
......
This diff is collapsed.
......@@ -10,10 +10,12 @@
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.18.0",
"element-ui": "^2.7.2",
"axios": "^0.19.0",
"echarts": "^4.2.1",
"element-ui": "^2.11.1",
"moment": "^2.24.0",
"vue": "^2.5.2",
"vue-drag-resize": "^1.3.2",
"vue-router": "^3.0.1",
"vue-seamless-scroll": "^1.1.16"
},
......@@ -37,6 +39,7 @@
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
......@@ -44,6 +47,7 @@
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"sass-loader": "^7.2.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
......
......@@ -46,6 +46,11 @@ export default {
{ ID: 3, Text: "Panle1" ,name:"panle1",src:require("@/assets/image/panle1.jpg")},
{ ID: 4, Text: "Panle2" ,name:"panle2",src:require("@/assets/image/panle2.jpg")},
{ ID: 5, Text: "Table1" ,name:"table1",src:require("@/assets/image/table1.jpg")},
{ ID: 6, Text: "pie" ,name:"pie",src:require("@/assets/image/table1.jpg")},
{ ID: 7, Text: "radar" ,name:"雷达图",src:require("@/assets/image/table1.jpg")},
{ ID: 8, Text: "bar" ,name:"柱状图",src:require("@/assets/image/table1.jpg")},
{ ID: 9, Text: "scatter" ,name:"散点图",src:require("@/assets/image/table1.jpg")},
{ ID: 10, Text: "chartLine" ,name:"折线图",src:require("@/assets/image/table1.jpg")},
],
RefreshTypeCombox: [
......
import Vue from 'vue'
import Router from 'vue-router'
const home = r => { require.ensure(['../views/home/index.vue'], () => { r(require('../views/home/index.vue')) }) }
// board
//boardlist
const boardlist = r => { require.ensure(['../views/board/boardlist/index.vue'], () => { r(require('../views/board/boardlist/index.vue')) }) }
const board = r => { require.ensure(['../views/board/index.vue'], () => { r(require('../views/board/index.vue')) }) }
import home from '../views/home/index.vue'
import boardlist from '../views/board/boardlist/index.vue'
import chartList from '../views/board/chartList/index.vue'
import board from '../views/board/index'
import chartPie from '../views/chart/echarts/pie'
import chartRadar from '../views/chart/echarts/radar'
import chartBar from '../views/chart/echarts/bar'
import chartScatter from '../views/chart/echarts/scatter'
import chartLine from '../views/chart/echarts/line'
import chartDemo from '../views/board/chartDemo'
import chartDemo1 from '../views/board/chartDemo1'
import test from '../views/test/index'
import chartDemoList from '../views/board/chartdemoList'
Vue.use(Router)
export default new Router({
// mode: 'history',
// base: config.ProjectName,//
linkActiveClass: 'active',
routes: [
{
path: '/',
name: '主页',
component: home,
children: [
{
path: '/boardlist',
name: 'boardlist',
meta: {
title: '看板列表',
},
component: boardlist,
},
// mode: 'history',
// base: config.ProjectName,//
linkActiveClass: 'active',
routes: [
{
path: '/',
name: '主页',
component: home,
children: [
{
path: '/boardlist',
name: 'boardlist',
meta: {
title: '看板列表',
},
component: boardlist,
},
{
path: '/chartlist',
name: 'chartlist',
meta: {
title: '图表列表',
},
component: chartList,
},
{
path: '/chartdemoList',
name: 'chartDemoList',
meta: {
title: '图表列表2',
},
component: chartDemoList,
},
]
},
{
path: '/board',
name: 'board',
meta: {
title: '看板',
},
component: board,
},
],
]
},
{
path: '/board',
name: 'board',
meta: {
title: '看板',
},
component: board,
},
{
path: '/pie',
name: 'pie',
meta: {
title: '饼图',
},
component: chartPie,
},
{
path: '/bar',
name: 'bar',
meta: {
title: '柱状图',
},
component: chartBar,
},
{
path: '/radar',
name: 'radar',
meta: {
title: '雷达图',
},
component: chartRadar,
},
{
path: '/test',
name: 'test',
meta: {
title: '测试',
},
component: test,
},
{
path: '/scatter',
name: 'scatter',
meta: {
title: '散点图',
},
component: chartScatter,
},
{
path: '/line',
name: 'line',
meta: {
title: '折线图',
},
component: chartLine,
},
{
path: '/chartdemo',
name: 'chartdemo',
meta: {
title: '图表模板',
},
component: chartDemo,
},{
path: '/chartdemo1',
name: 'chartdemo1',
meta: {
title: '图表模板1',
},
component: chartDemo1,
},
],
})
......@@ -441,6 +441,7 @@ export default {
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
console.log(valid);
this.Action(this.ActionBtn);
} else {
console.log("error submit!!");
......
......@@ -220,6 +220,7 @@ export default {
return name;
},
load() {
console.log("请求数据11。。。")
var me = this;
me.Loading = true;
var url = me.Api.get.url;
......@@ -234,7 +235,9 @@ export default {
me.DataList = res.rows;
}
me.Loading = false;
});
}).catch((res)=>{
console.log(res)
});
},
currentPageChange(val) {
this.PageIndex = val;
......
......@@ -32,6 +32,7 @@
>
<template v-if="item.length>0">
<div
class="allContent"
v-for="(rows,index1) in item"
:key="rows+'row'"
:style="{height:getRowHeight(item,index1)+'%'}"
......@@ -41,6 +42,7 @@
<div
:key="index2+'column'"
class="columndiv"
:style="{width:getChartWidth(GetChartStore(column),rows),height:100+'%',borderColor:ruleForm.BorderColor==null?'red':ruleForm.BorderColor}"
>
<component
......@@ -48,6 +50,7 @@
:boardstore="ruleForm"
:chart="GetChartStore(column)"
:Api="Api.charapi"
:id="id1+index2"
v-if="GetChartStore(column).IsShow"
></component>
</div>
......@@ -80,6 +83,11 @@ import comFoot from "@/views/chart/foot";
import Panle1 from "@/views/chart/Panle1";
import Panle2 from "@/views/chart/Panle2";
import Table1 from "@/views/chart/Table1";
import pie from "@/views/chart/echarts/pie/index";
import radar from "@/views/chart/echarts/radar/index";
import bar from "@/views/chart/echarts/bar/index";
import scatter from "@/views/chart/echarts/scatter/index";
import chartLine from "@/views/chart/echarts/line/index";
export default {
name: "board",
components: {
......@@ -87,7 +95,12 @@ export default {
comFoot,
Panle1,
Panle2,
Table1
Table1,
pie,
radar,
bar,
scatter,
chartLine
},
data() {
return {
......@@ -99,7 +112,11 @@ export default {
comboxstore: comBox,
ruleForm: null,
timer1: null,
pageindex: 0
pageindex: 0,
id1:'pie1',
// columWidth:0,
// columHeight:0
};
},
watch: {
......@@ -121,29 +138,34 @@ export default {
}
}
},
created() {
var boardid = this.$route.query.BoardID;
this.pageindex = this.$route.query.PageIndex;
this.Load(boardid);
},
mounted() {
var id = this.$route.query.BoardID;
var me = this; //声明一个变量指向vue实例this,保证作用域一致
this.timer = setInterval(function() {
me.Load(id); //修改数据date
}, 3000);
// this.$nextTick(() => {
// setInterval(() => {
// console.log("下一页");
// me.setActiveItem("page1");
// }, me.time);
// });
},
methods: {
Load(id) {
console.log("请求数据。。。")
var me = this;
Axios({
method: "get",
url: me.Api.get.url,
params: { MID: id }
}).then(res => {
if (res.success) {
me.ruleForm = res.rows[0];
console.log(JSON.stringify( me.ruleForm))
} else {
me.$message.error(res.message);
}
......@@ -200,6 +222,7 @@ export default {
"ID",
chartstore.ChartType
);
console.log(chart.Text)
return chart.Text;
},
getChartWidth(chart, rows) {
......@@ -295,11 +318,7 @@ export default {
clearInterval(this.timer1); //在vue实例销毁钱,清除我们的定时器
}
},
created() {
var boardid = this.$route.query.BoardID;
this.pageindex = this.$route.query.PageIndex;
this.Load(boardid);
}
};
</script>
<style>
......@@ -307,6 +326,12 @@ export default {
height: 100%;
width: 100%;
}
.allContent{
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
}
.columndiv {
box-sizing: border-box;
border: 1px solid;
......
......@@ -72,6 +72,7 @@ export default {
data: data
}).then(res => {
if (res.success) {
console.log(res)
var title = res.rows[0];
this.text = title.Title || title;
} else {
......
......@@ -47,12 +47,29 @@ export default {
path: "boardlist"
},
// {
// text: "看板",
// name: "board",
// path: "board"
// text: "图表列表",
// name: "chartlist",
// path: "chartlist"
// },
]
}
},
{
text: "图表",
iconCls: "el-icon-share",
children: [
{
text: "方案一",
name: "chartlist",
path: "chartlist"
},
{
text: "方案二",
name: "chartDemoList",
path: "chartDemoList"
},
]
}
]
};
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment