Commit 22e394e6 authored by zhangboyang's avatar zhangboyang

看板优化

parent 729b54f6
...@@ -3540,7 +3540,8 @@ ...@@ -3540,7 +3540,8 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
...@@ -3550,7 +3551,8 @@ ...@@ -3550,7 +3551,8 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -3667,7 +3669,8 @@ ...@@ -3667,7 +3669,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -3679,6 +3682,7 @@ ...@@ -3679,6 +3682,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -3804,7 +3808,8 @@ ...@@ -3804,7 +3808,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -3937,6 +3942,7 @@ ...@@ -3937,6 +3942,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
......
...@@ -52,4 +52,17 @@ html { ...@@ -52,4 +52,17 @@ html {
#app > div { #app > div {
height: 100%; height: 100%;
} }
html {
/*隐藏滚动条,当IE下溢出,仍然可以滚动*/
-ms-overflow-style: none;
/*火狐下隐藏滚动条*/
overflow: -moz-scrollbars-none;
}
/*Chrome下隐藏滚动条,溢出可以透明滚动*/
html::-webkit-scrollbar {
width: 0px;
}
#app div{
overflow: hidden;
}
</style> </style>
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="字号1颜色"> <el-form-item label="字号1颜色" v-if="ruleForm.ChartType!=5">
<el-input v-model="ruleForm.FontColor1"> <el-input v-model="ruleForm.FontColor1">
<template slot="append"> <template slot="append">
<el-color-picker size="mini" v-model="ruleForm.FontColor1"></el-color-picker> <el-color-picker size="mini" v-model="ruleForm.FontColor1"></el-color-picker>
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="字号2颜色"> <el-form-item label="字号2颜色" v-if="ruleForm.ChartType!=5">
<el-input v-model="ruleForm.FontColor2"> <el-input v-model="ruleForm.FontColor2">
<template slot="append"> <template slot="append">
<el-color-picker size="mini" v-model="ruleForm.FontColor2"></el-color-picker> <el-color-picker size="mini" v-model="ruleForm.FontColor2"></el-color-picker>
...@@ -187,9 +187,9 @@ export default { ...@@ -187,9 +187,9 @@ export default {
return { return {
comboxstore: comBox, comboxstore: comBox,
columns: [ columns: [
{ value: "ID", label: "ID", width: 50 }, // { value: "ID", label: "ID", width: 50 },
{ value: "BoardCode", label: "看板编码" }, // { value: "BoardCode", label: "看板编码" },
{ value: "BoardName", label: "看板名称" }, // { value: "BoardName", label: "看板名称" },
{ {
value: "LayoutID", value: "LayoutID",
label: "布局", label: "布局",
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
:boardstore="ruleForm" :boardstore="ruleForm"
:chart="GetChartStore(column)" :chart="GetChartStore(column)"
:Api="Api.charapi" :Api="Api.charapi"
v-if="GetChartStore(column).IsShow"
></component> ></component>
</div> </div>
</template> </template>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
> >
<table style="width:100%;height:100%"> <table style="width:100%;height:100%">
<tr> <tr>
<td style="width:50%"> <td style="width:50%;height:100%">
<div style="height:100%"> <div style="height:100%">
<table style="height: 100%; width: 100%;text-align: center;"> <table style="height: 100%; width: 100%;text-align: center;">
<tr style="height:30%"> <tr style="height:30%">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
>{{row!=null&&row.Name!=null?row.Name:''}}</td> >{{row!=null&&row.Name!=null?row.Name:''}}</td>
</tr> </tr>
<tr style="height:70%"> <tr style="height:70%">
<td class="value" valign="top"> <td class="value" valign="top" style="display:table-cell; vertical-align:middle">
<font <font
:color="chart.FontColor" :color="chart.FontColor"
:style="{color:chart.FontColor1!=null?chart.FontColor1:'red',fontSize:chart.FontSize1!=0?chart.FontSize1+'px':'150px'}" :style="{color:chart.FontColor1!=null?chart.FontColor1:'red',fontSize:chart.FontSize1!=0?chart.FontSize1+'px':'150px'}"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</table> </table>
</div> </div>
</td> </td>
<td style="width:50%"> <td style="width:50%;height:100%">
<div :style="{fontSize:30+'px',height:100+'%'}"> <div :style="{fontSize:30+'px',height:100+'%'}">
<table style="height: 100%; width: 100%;text-align: center;"> <table style="height: 100%; width: 100%;text-align: center;">
<template v-if="row!=null&&row.Detail"> <template v-if="row!=null&&row.Detail">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div style="font-size:30px" :style="{color:chart.FontColor,background:chart.BackgroundColor}"> <div style="font-size:30px" :style="{color:chart.FontColor,background:chart.BackgroundColor}">
<div style="width:100%"> <div style="width:100%">
<table style="width:100%;height:100%"> <table style="width:100%;height:100%">
<tr style="height:8%"> <tr style="height:8%" :style="{fontSize:chart.FontSize1!=0?chart.FontSize1+'px':'30px'}">
<td <td
v-for="(item,index) in titlestore" v-for="(item,index) in titlestore"
class="tableclass" class="tableclass"
...@@ -10,16 +10,31 @@ ...@@ -10,16 +10,31 @@
:style="{color:item.Color,width:item.Width+'%'}" :style="{color:item.Color,width:item.Width+'%'}"
>{{item.Key}}</td> >{{item.Key}}</td>
</tr> </tr>
<tr v-for="(item,index) in itemdata" :key="index" :style="{color:getfontcolor(item)}"> <template v-for="(item,index) in itemdata">
<template v-for="(obj,index1) in item"> <tr
<td :key="index"
:key="index1" :style="{fontSize:chart.FontSize2!=0?chart.FontSize2+'px':'30px',color:getfontcolor(item)}"
class="tableclass" >
:style="{width:getwidth(obj)+'%'}" <template v-for="(obj,index1) in item">
v-if="obj.Key.indexOf('_')>0" <td
>{{obj.Value}}</td> :key="index1"
</template> class="tableclass"
</tr> :style="{width:getwidth(obj)+'%'}"
v-if="obj.Key.indexOf('_')>0"
>{{obj.Value}}</td>
</template>
</tr>
</template>
<template v-if="itemdata.length<chart.PageSize">
<tr v-for="(tt,index) in (chart.PageSize-itemdata.length)" :key="'tt'+index" :style="{fontSize:chart.FontSize2!=0?chart.FontSize2+'px':'30px'}">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td></td>
</tr>
</template>
</table> </table>
</div> </div>
</div> </div>
...@@ -32,6 +47,7 @@ var _this; ...@@ -32,6 +47,7 @@ var _this;
export default { export default {
name: "charttable1", name: "charttable1",
inject: ["reload"], inject: ["reload"],
props: ["boardstore", "chart", "Api"],
data() { data() {
return { return {
store: null, store: null,
...@@ -60,21 +76,11 @@ export default { ...@@ -60,21 +76,11 @@ export default {
? 1000 ? 1000
: (this.chart.PageSize * this.chart.RefreshTime - 5) * 1000; : (this.chart.PageSize * this.chart.RefreshTime - 5) * 1000;
} }
// console.log("laodDataTime" + this.laodDataTime);
} }
}, },
laodDataTime: function(val, oldval) { laodDataTime: function(val, oldval) {
console.log("加载时间变化,new:" + val + " old:" + oldval); console.log("加载时间变化,new:" + val + " old:" + oldval);
if (val != oldval) { if (val != oldval) {
if (this.timer) {
this.timer = null;
console.log("第2次加载");
clearInterval(this.timer);
this._loadDataInterval();
} else {
console.log("第3次加载");
this._loadDataInterval();
}
} }
}, },
"chart.RefreshTime": function(val, oldval) { "chart.RefreshTime": function(val, oldval) {
...@@ -94,48 +100,70 @@ export default { ...@@ -94,48 +100,70 @@ export default {
if (val != oldval) { if (val != oldval) {
_this._refreshPage(); _this._refreshPage();
} }
},
bodystore: val => {
console.log("bodystore.Length" + val.length);
} }
}, },
props: ["boardstore", "chart", "Api"],
computed: {}, computed: {},
mounted() { mounted() {
//换行时间 //换页时间 获取数据
// var _this = this;
if (this.chart.RefreshType == 1) {
var time =
this.chart.RefreshTime != 0
? this.chart.RefreshTime
: this.boardstore.RefreshTime;
console.log(this.chart.PositionIndex + "获取数据时间" + time);
this.timer = setInterval(function() {
_this.loadData();
}, time * 1000);
}
//换行 获取数据
if (this.chart.RefreshType == 2) {
var changeRowTime =
this.chart.RefreshTime != 0
? this.chart.RefreshTime
: this.boardstore.RefreshTime;
//换行时间*每页条数 -3 就是获取数据时间
var time = changeRowTime * this.chart.PageSize - 3;
console.log(this.chart.PositionIndex + "获取数据时间" + time);
this.timer = setInterval(function() {
_this.loadData();
}, time * 1000);
//3秒后开始执行换行定时器
setTimeout(() => {
var timerow =
(this.chart.RefreshTime != 0
? this.chart.RefreshTime
: this.boardstore.RefreshTime) * 1000;
this.timer1 = setInterval(() => {
_this._changeItemData();
}, timerow);
}, 3000);
}
}, },
methods: { methods: {
//数据换行/换页时间 //数据换行/换页时间
_itemRefreshTime() { _itemRefreshTime() {},
var time =
(this.chart.RefreshTime != 0
? this.chart.RefreshTime
: this.boardstore.RefreshTime) * 1000;
// console.log("换数据时间:" + time);
this.timer1 = setInterval(() => {
_this._changeItemData();
}, time);
},
//刷新页面 //刷新页面
_refreshPage() { _refreshPage() {
this.reload(); if (this.timer) {
}, clearInterval(this.timer); //在vue实例销毁钱,清除我们的定时器
//获取数据定时器 }
_loadDataInterval() { if (this.timer1) {
var me = this; clearInterval(this.timer1); //在vue实例销毁钱,清除我们的定时器
clearInterval(this.timer);
if (this.timer == null) {
this.timer = setInterval(function() {
console.log("获取数据时间:" + me.laodDataTime);
// console.log(new Date());
_this.loadData();
}, me.laodDataTime);
} }
this.reload();
}, },
loadData() { loadData() {
var me = this; var me = this;
if (!this.chart.IsShow) { if (!this.chart.IsShow) {
return; return;
} }
console.log("加载数据");
var url = me.Api.url; var url = me.Api.url;
var data = { var data = {
ProcName: me.boardstore.ProcName, ProcName: me.boardstore.ProcName,
...@@ -163,6 +191,7 @@ export default { ...@@ -163,6 +191,7 @@ export default {
} else { } else {
me.pageindex++; me.pageindex++;
} }
console.log("位置:" + this.chart.PositionIndex + "加载数据");
if (this.chart.RefreshType == 2) { if (this.chart.RefreshType == 2) {
if (this.itemdata.length == 0) { if (this.itemdata.length == 0) {
this.loadData(); this.loadData();
...@@ -201,16 +230,13 @@ export default { ...@@ -201,16 +230,13 @@ export default {
}, },
_getData(rows) { _getData(rows) {
var me = this; var me = this;
var data = me._changeDataType(rows); var data = me._changeDataType(rows);
if (this.chart.RefreshType == 2) { if (this.chart.RefreshType == 2) {
for (let index = 0; index < data.length; index++) { for (let index = 0; index < data.length; index++) {
let element = data[index]; let element = data[index];
me.bodystore.push(element); me.bodystore.push(element);
} }
// _this.bodystore= _this.bodystore.uniquetwo();
} else if (this.chart.RefreshType == 1) { } else if (this.chart.RefreshType == 1) {
debugger;
this.bodystore = data; this.bodystore = data;
} }
}, },
...@@ -230,6 +256,19 @@ export default { ...@@ -230,6 +256,19 @@ export default {
}); });
return arr; return arr;
}, },
//换行
_changeItemData() {
if (this.chart.RefreshType == 2) {
console.log(this.chart.PositionIndex + "换行");
if (this.itemdata.length == 0) return;
var rowdata = this.bodystore.shift();
this.itemdata.push(rowdata);
this.itemdata.shift(); //移除第一条
} else if (this.chart.RefreshType == 1) {
this.itemdata = this.bodystore;
}
},
getfontcolor(data) { getfontcolor(data) {
var color = "red"; var color = "red";
if (data == null) return; if (data == null) return;
...@@ -247,17 +286,6 @@ export default { ...@@ -247,17 +286,6 @@ export default {
return element.Width; return element.Width;
} }
} }
},
_changeItemData() {
if (this.chart.RefreshType == 2) {
if (this.itemdata.length == 0) return;
var rowdata = this.bodystore.shift();
this.itemdata.push(rowdata);
this.itemdata.shift(); //移除第一条
} else if (this.chart.RefreshType == 1) {
debugger;
this.itemdata = this.bodystore;
}
} }
}, },
...@@ -270,6 +298,7 @@ export default { ...@@ -270,6 +298,7 @@ export default {
} }
}, },
created() { created() {
console.log("位置" + this.chart.PositionIndex);
_this = this; _this = this;
this.loadData(); this.loadData();
this.laodDataTime = this.laodDataTime =
...@@ -278,7 +307,7 @@ export default { ...@@ -278,7 +307,7 @@ export default {
: this.boardstore.RefreshTime) * 1000; : this.boardstore.RefreshTime) * 1000;
setTimeout(() => { setTimeout(() => {
console.log("第一次加载"); console.log("第一次加载");
_this._loadDataInterval(); // _this._loadDataInterval();
}, 1000); }, 1000);
if (this.chart.RefreshType == 2) { if (this.chart.RefreshType == 2) {
//执行换行/换页程序 //执行换行/换页程序
...@@ -296,6 +325,7 @@ export default { ...@@ -296,6 +325,7 @@ export default {
} }
li { li {
width: 100%; width: 100%;
list-style-type: none;
} }
.seamspan { .seamspan {
text-align: center; text-align: center;
...@@ -351,7 +381,7 @@ table { ...@@ -351,7 +381,7 @@ table {
display: none; display: none;
} }
.item li { .item li {
list-style-type: disc; list-style-type: none;
height: auto; height: auto;
} }
/* .seamless-warp { /* .seamless-warp {
......
...@@ -51,10 +51,20 @@ namespace FTT.Board.Controllers ...@@ -51,10 +51,20 @@ namespace FTT.Board.Controllers
using (var db = string.IsNullOrEmpty(dto.ConnStr) ? MsSqlDbContextWraper.NewContext() : MsSqlDbContextWraper.NewContext(dto.ConnStr)) using (var db = string.IsNullOrEmpty(dto.ConnStr) ? MsSqlDbContextWraper.NewContext() : MsSqlDbContextWraper.NewContext(dto.ConnStr))
{ {
return db.Sql(string.Format("Exec {0} @PageSize,@PageIndex,@Flag,@WorkTeamID", dto.ProcName)) var list = db.Sql(string.Format("Exec {0} @PageSize,@PageIndex,@Flag,@WorkTeamID", dto.ProcName))
.Parameter("PageSize", dto.PageSize).Parameter("PageIndex", dto.PageIndex).Parameter("Flag", dto.Flag).Parameter("WorkTeamID", dto.WorkTeamID) .Parameter("PageSize", dto.PageSize).Parameter("PageIndex", dto.PageIndex).Parameter("Flag", dto.Flag).Parameter("WorkTeamID", dto.WorkTeamID)
.QueryMany<dynamic>(); .QueryMany<dynamic>();
//foreach (var item in list)
//{
// var obj = (Object)item;
// //遍历匿名对象
// foreach (System.Reflection.PropertyInfo p in obj.GetType().GetProperties())
// {
// Console.WriteLine("name:{0},value:{1}", p.Name, p.GetValue(item));
// }
//}
return list;
} }
} }
......
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