Commit 9d639c4e authored by 金燚波's avatar 金燚波

【编号:11336】祥麟看板数据接入

parent 7a9990ac
......@@ -48,7 +48,9 @@ export default {
{ ID: 5, Text: "Table1" ,name:"table1",src:require("@/assets/image/table1.jpg")},
{ ID: 6, Text: "Table2" ,name:"table2",src:require("@/assets/image/table1.jpg")},
{ ID: 11, Text: "Table3" ,name:"table3",src:require("@/assets/image/table1.jpg")},
// { ID: 6, Text: "pie" ,name:"pie",src:require("@/assets/image/table1.jpg")},
{ ID: 7, Text: "ViewBoard" ,name:"针车车间",src:require("@/assets/image/back-img.png")},
// { ID: 8, Text: "bar" ,name:"柱状图",src:require("@/assets/image/table1.jpg")},
// { ID: 9, Text: "scatter" ,name:"散点图",src:require("@/assets/image/table1.jpg")},
......@@ -59,5 +61,10 @@ export default {
{ ID: 1, Text: "换页" },
{ ID: 2, Text: "换行" },
// { ID: 3, Text: "滚动" },
],
align:[
{ ID: 1, Text: "Left" },
{ ID: 2, Text: "Center" },
{ ID: 3, Text: "Right" },
]
}
\ No newline at end of file
......@@ -26,9 +26,10 @@
:title="getDialogTitle()"
:visible.sync="dialogVisible"
width="35%"
:before-close="handleClose"
>
<div>
<div style="overflow-y:auto;height:70vh">
<div>
<el-form
:inline="true"
......@@ -64,6 +65,9 @@
<el-form-item label="是否显示">
<el-switch v-model="ruleForm.IsShow"></el-switch>
</el-form-item>
<!-- <el-form-item label="是否换行">
<el-switch v-model="ruleForm.IsWrap"></el-switch>
</el-form-item> -->
</el-row>
<el-row>
<el-form-item label="区域" prop="PositionIndex">
......@@ -87,6 +91,28 @@
<el-switch v-model="ruleForm.IsTimeShow"></el-switch>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="水平对齐" v-if="ruleForm.ChartType==5 || ruleForm.ChartType==6 || ruleForm.ChartType== 11">
<el-select v-model="ruleForm.Horizontal" placeholder="请选择对齐方式">
<el-option
v-for="item in comboxstore.align"
:key="item.ID"
:label="item.Text"
:value="item.ID"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="垂直位置" v-if="ruleForm.ChartType==5 || ruleForm.ChartType==6 || ruleForm.ChartType== 11">
<el-select v-model="ruleForm.RefreshType" placeholder="请选择容器刷新类别">
<el-option
v-for="item in comboxstore.RefreshTypeCombox"
:key="item.ID"
:label="item.Text"
:value="item.ID"
></el-option>
</el-select>
</el-form-item> -->
</el-row>
<el-row>
<el-form-item label="背景色">
<el-input v-model="ruleForm.BackgroundColor">
......@@ -95,11 +121,19 @@
</template>
</el-input>
</el-form-item>
<el-form-item label="边框色">
<el-input v-model="ruleForm.BorderColor">
<template slot="append">
<el-color-picker size="mini" v-model="ruleForm.BorderColor"></el-color-picker>
</template>
</el-input>
</el-form-item>
<el-form-item label="刷新频率">
<el-input-number v-model="ruleForm.RefreshTime" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="刷新类别" v-if="ruleForm.ChartType==5 || ruleForm.ChartType==6">
<!-- v-if="ruleForm.ChartType==5 || ruleForm.ChartType==6" -->
<el-form-item label="刷新类别" v-if="ruleForm.ChartType==5 || ruleForm.ChartType==6 || ruleForm.ChartType== 11">
<el-select v-model="ruleForm.RefreshType" placeholder="请选择容器刷新类别">
<el-option
v-for="item in comboxstore.RefreshTypeCombox"
......@@ -109,9 +143,10 @@
></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="字号1颜色" v-if="ruleForm.ChartType!=5">
<el-form-item label="字号1颜色" v-if="ruleForm.ChartType!=5 && ruleForm.ChartType!=11">
<el-input v-model="ruleForm.FontColor1">
<template slot="append">
<el-color-picker size="mini" v-model="ruleForm.FontColor1"></el-color-picker>
......@@ -123,7 +158,7 @@
</el-form-item>
</el-row>
<el-row>
<el-form-item label="字号2颜色" v-if="ruleForm.ChartType!=5">
<el-form-item label="字号2颜色" v-if="ruleForm.ChartType!=5 && ruleForm.ChartType!=11">
<el-input v-model="ruleForm.FontColor2">
<template slot="append">
<el-color-picker size="mini" v-model="ruleForm.FontColor2"></el-color-picker>
......@@ -306,7 +341,10 @@ export default {
Flag: "",
PageSize: "",
PageIndex: "",
PositionIndex: ""
PositionIndex: "",
Horizontal: 1,
BorderColor: '#000000',
IsWrap: false
},
rules: {
PositionIndex: [
......@@ -478,6 +516,7 @@ export default {
if (res.success) {
me.totalCount = res.total;
me.DataList = res.rows;
console.log('detailrows', res.rows)
}
me.Loading = false;
});
......
......@@ -201,7 +201,7 @@ export default {
};
</script>
<style>
<style scoped>
.el-header {
background-color: #040f3c !important;
}
......
......@@ -71,7 +71,7 @@
</script>
<style>
<style scoped>
div {
overflow: initial !important;
}
......
......@@ -110,7 +110,7 @@
}
};
</script>
<style>
<style scoped>
.el-header {
background-color: #B3C0D1;
color: #333;
......
......@@ -3,7 +3,7 @@
<el-container
v-loading="loading"
style="height:100%;width:100%; "
:style="{background:ruleForm.BackgroundColor} "
:style="{background:ruleForm.BackgroundColor}"
>
<el-header
style="padding: 0"
......@@ -35,8 +35,7 @@
class="allContent"
v-for="(rows,index1) in item"
:key="rows+'row'"
:style="{height:getRowHeight(item,index1)+'%'}"
>
:style="{height:getRowHeight(item,index1)+'%'}">
<template v-if="item.length>0">
<template v-for="(column,index2) in rows">
<div
......@@ -52,7 +51,8 @@
:Api="Api.charapi"
:id="id1+index2"
v-if="GetChartStore(column).IsShow"
></component>
>
</component>
</div>
</template>
</template>
......@@ -84,6 +84,7 @@ import Panle1 from "@/views/chart/Panle1";
import Panle2 from "@/views/chart/Panle2";
import Table1 from "@/views/chart/Table1";
import Table2 from "@/views/chart/Table2";
import Table3 from "@/views/chart/Table3";
import pie from "@/views/chart/echarts/pie/index";
import radar from "@/views/chart/echarts/radar/index";
import bar from "@/views/chart/echarts/bar/index";
......@@ -99,6 +100,7 @@ export default {
Panle2,
Table1,
Table2,
Table3,
pie,
radar,
bar,
......@@ -115,6 +117,7 @@ export default {
loading: false,
comboxstore: comBox,
ruleForm: null,
timer: null,
timer1: null,
pageindex: 0,
id1:'pie1',
......@@ -170,7 +173,7 @@ export default {
console.log('rows'+JSON.stringify(res))
if (res.success) {
me.ruleForm = res.rows[0];
console.log(JSON.stringify( me.ruleForm))
console.log('me.ruleForm', me.ruleForm)
} else {
me.$message.error(res.message);
......@@ -183,6 +186,7 @@ export default {
"ID",
this.ruleForm.LayoutID
);
console.log('布局布局',layout)
return layout;
},
GetChartStore(item) {
......@@ -195,14 +199,17 @@ export default {
break;
case "foot":
chart = this.ruleForm.BoardDetail.GetFirstElement("ChartType", 2);
break;
default:
chart = this.ruleForm.BoardDetail.GetFirstElement(
"PositionIndex",
item
);
console.log('chartchart',this.ruleForm.BoardDetail, chart)
break;
}
return chart;
},
setHeadOrFoot(name) {
......@@ -230,7 +237,7 @@ export default {
"ID",
chartstore.ChartType
);
console.log(chart.Text)
console.log('chart.Text', chart.Text)
return chart.Text;
},
getChartWidth(chart, rows) {
......@@ -319,10 +326,14 @@ export default {
// }
},
beforeDestroy() {
console.log('beforeDestroy')
if (this.timer) {
console.log('beforeDestroytime')
clearInterval(this.timer); //在vue实例销毁钱,清除我们的定时器
console.log('beforeDestroytime', this.timer)
}
if (this.timer1) {
console.log('beforeDestroytime1')
clearInterval(this.timer1); //在vue实例销毁钱,清除我们的定时器
}
},
......
This diff is collapsed.
......@@ -107,7 +107,7 @@ export default {
}
};
</script>
<style>
<style scoped>
table {
height: 100%;
width: 100%;
......
......@@ -332,7 +332,7 @@ export default {
}
};
</script>
<style >
<style scoped>
.seamless-warp {
height: 95%;
overflow: hidden;
......
......@@ -231,7 +231,7 @@ export default {
}
};
</script>
<style >
<style scoped>
.seamless-warp {
height: 95%;
overflow: hidden;
......
......@@ -175,7 +175,7 @@ export default {
PageIndex: me.pageindex,
Flag: me.chart.Flag,
WorkTeamID: me.chart.WorkTeamID,
CharTypeID: me.chart.ChartType,
CharTypeID: 5, // me.chart.ChartType
ConnStr: me.boardstore.ConnectionString
};
Axios({
......@@ -323,7 +323,7 @@ export default {
}
};
</script>
<style >
<style scoped>
.seamless-warp {
height: 95%;
overflow: hidden;
......
This diff is collapsed.
......@@ -29,16 +29,19 @@ export default {
(this.chart.RefreshTime != 0
? this.chart.RefreshTime
: this.boardstore.RefreshTime) * 1000;
this.timer = setInterval(function() {
this.timer = setTimeout(function() {
console.log('loadData1.2')
_this.loadData(1, 2);
}, time);
this.timer = setInterval(function() {
console.log('getCurrentDateTime')
_this.date = _this.getCurrentDateTime(); //修改数据date
}, 1000);
},
beforeDestroy() {
if (this.timer) {
clearInterval(this.timer); //在vue实例销毁钱,清除我们的定时器
console.log('head销毁')
window.clearInterval(this.timer); //在vue实例销毁钱,清除我们的定时器
}
},
methods: {
......
......@@ -24,20 +24,15 @@ namespace FTT.Board.Controllers.API
WorkTeamID = WorkTeamID
}, true);
model.TitleList = Table2Model.ToModel<TitleList>(dataSet.Tables[0]);
model.Statisticss = Table2Model.ToModel<Statistics>(dataSet.Tables[1]);
model.TimeYieldDetails = Table2Model.ToModelList<TimeYieldDetail>(dataSet.Tables[2]);
model.QIDetails = Table2Model.ToModelList<QIDetail>(dataSet.Tables[3]);
//model.TitleList = Table2Model.ToModel<TitleList>(dataSet.Tables[0]);
model.Statisticss = Table2Model.ToModel<Statistics>(dataSet.Tables[0]);
model.QIDetails = Table2Model.ToModelList<QIDetail>(dataSet.Tables[2]);
model.TimeYieldDetails = Table2Model.ToModelList<TimeYieldDetail>(dataSet.Tables[3]);
return model.ToString();
}
public class FactoryBoardProductDataResponse
{
/// <summary>
/// 标题
/// </summary>
public TitleList TitleList { get; set; }
/// <summary>
/// 统计
/// </summary>
......@@ -62,47 +57,63 @@ namespace FTT.Board.Controllers.API
}
}
/// <summary>
/// 标题
/// 统计
/// </summary>
public class TitleList
public class Statistics
{
/// <summary>
/// 主标题
/// 标题
/// </summary>
public string Title { get; set; }
/// <summary>
///
/// </summary>
public string TitleInspection { get; set; }
}
/// <summary>
/// 统计
/// </summary>
public class Statistics
{
/// <summary>
/// 今日产量
/// </summary>
public int DayYield { get; set; }
/// <summary>
/// 今日投产量
/// </summary>
public int DayPutYield { get; set; }
/// <summary>
/// 不良数
/// </summary>
public int InspectionQty { get; set; }
public int DayInspectionQty { get; set; }
/// <summary>
/// 直通率
/// </summary>
public string ThroughRate { get; set; }
public string DayThroughRate { get; set; }
/// <summary>
/// 成品入库量
/// </summary>
public int DayStockInQty { get; set; }
/// <summary>
/// 节拍时间
/// </summary>
public string SwayedTime { get; set; }
public string DaySwayedTime { get; set; }
/// <summary>
/// 月产量
/// </summary>
public int MonthYield { get; set; }
/// <summary>
/// 月投产量
/// </summary>
public int MonthPutYield { get; set; }
/// <summary>
/// 月不良数
/// </summary>
public int MonthInspectionQty { get; set; }
/// <summary>
/// 月直通率
/// </summary>
public string MonthThroughRate { get; set; }
/// <summary>
/// 月成品入库量
/// </summary>
public int MonthStockInQty { get; set; }
/// <summary>
/// 月节拍时间
/// </summary>
public string MonthSwayedTime { get; set; }
}
/// <summary>
......@@ -119,12 +130,12 @@ namespace FTT.Board.Controllers.API
/// <summary>
/// 时间段
/// </summary>
public string TimeSlot { get { return this.BeginDate.ToString("HH : mm") + " - " + this.EndDate.ToString("HH : mm"); } }
public string TimeSlot { get; set; }
/// <summary>
/// 时间长度
/// </summary>
public string TimeSpan { get { return ((this.EndDate - this.BeginDate).TotalMinutes / 60).ToString("f1") + " H"; } }
public string TimeSpan { get; set; }
/// <summary>
/// 产量
......@@ -135,6 +146,10 @@ namespace FTT.Board.Controllers.API
/// 节拍时间
/// </summary>
public string SwayedTime { get; set; }
/// <summary>
/// 入库量
/// </summary>
public int StockInQty { get; set; }
}
/// <summary>
......
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