关于GridView的横向合并数据信息
此为asp.net
运行展示:
前端代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm4.aspx.cs" Inherits="Web.WebForm4" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
.model_s {
width: 90px; }
.model_er {
width:50px;
} .GridViewStyle {
border-right: 2px solid #A7A6AA;
border-bottom: 2px solid #A7A6AA;
border-left: 2px solid white;
border-top: 2px solid white;
padding: 4px;
} .GridViewStyle a {
color:#0026ff;
} .GridViewHeaderStyle th {
border-left: 1px solid #000000;
border-right: 1px solid #000000;
} .GridViewHeaderStyle {
background-color: #5D7B9D;
font-weight: bold;
color: White;
} .GridViewFooterStyle {
background-color: #5D7B9D;
/*background-color: #b6ff00;*/
font-weight: bold;
color: White;
} .GridViewRowStyle {
background-color: #F7F6F3;
color: #333333;
} .GridViewAlternatingRowStyle {
background-color: #FFFFFF;
color: #284775;
} .GridViewRowStyle td, .GridViewAlternatingRowStyle td {
border: 1px solid #000000;
} .GridViewSelectedRowStyle {
background-color: #E2DED6;
font-weight: bold;
color: #333333;
} .GridViewPagerStyle {
background-color: #284775;
color: #FFFFFF;
} .GridViewPagerStyle table /* to center the paging links*/ {
margin: 0 auto 0 auto;
} #set_ms {
width: 1000px;
border: 0px solid #000000;
margin: 0 auto;
} #sss {
width: 900px;
border: 1px solid #000000;
margin: 100px auto;
}
.modd {
float:right;
}
.user_s {
display:none;
}
</style>
</head>
<body>
<form id="form1" runat="server"> <div id="sss" style="display:block">
<asp:GridView ID="GrvInfo1" runat="server" AutoGenerateColumns="False" OnDataBound="GrvInfo1_DataBound"
OnRowCreated="GrvInfo1_RowCreated" CssClass="GridViewStyle" OnRowDataBound="GrvInfo1_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="序号" SortExpression="stu1" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu1" runat="server" Text='<%# Eval("stu1") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="组别" SortExpression="stu2" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu2" runat="server" Text='<%# Eval("stu2") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="姓名" SortExpression="stu3" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu3" runat="server" Text='<%# Eval("stu3") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="一" SortExpression="stu4_1">
<ItemTemplate>
<asp:Label ID="lblstu4_1" runat="server" Text='<%# Eval("stu4_1") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="二" SortExpression="stu4_2">
<ItemTemplate>
<asp:Label ID="lblstu4_2" runat="server" Text='<%# Eval("stu4_2") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="三" SortExpression="stu4_3">
<ItemTemplate>
<asp:Label ID="lblstu4_3" runat="server" Text='<%# Eval("stu4_3") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="四" SortExpression="stu4_4">
<ItemTemplate>
<asp:Label ID="lblstu4_4" runat="server" Text='<%# Eval("stu4_4") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="五" SortExpression="stu4_5">
<ItemTemplate>
<asp:Label ID="lblstu4_5" runat="server" Text='<%# Eval("stu4_5") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="六" SortExpression="stu4_6" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu4_6" runat="server" Text='<%# Eval("stu4_6") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="日" SortExpression="stu4_7" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu4_7" runat="server" Text='<%# Eval("stu4_7") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
</Columns>
<FooterStyle CssClass="GridViewFooterStyle" />
<RowStyle CssClass="GridViewRowStyle" />
<SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
<PagerStyle CssClass="GridViewPagerStyle" />
<AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
<HeaderStyle CssClass="GridViewHeaderStyle" />
</asp:GridView>
</div>
</form>
<script type="text/javascript">
var _oldColor;
function SetNewColor(source)
{ _oldColor = source.style.backgroundColor; source.style.backgroundColor = '#999999'; }
function SetOldColor(source)
{ source.style.backgroundColor = _oldColor; }
</script>
</body>
</html>
后端代码:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{ this.GrvInfo1.DataSource = new List<ste_ff>()
{
new ste_ff(){stu1="",stu2="南区部",stu3="纪文义",stu4_1="牵头南区工作",stu4_2="牵头南区工作",stu4_3="牵头南区工作",stu4_4="牵头南区工作",stu4_5="牵头南区工作",stu4_6="休息",stu4_7="休息" },
new ste_ff(){stu1="",stu2="南区部",stu3="纪文义1",stu4_1="水泵状态建设",stu4_2="水泵状态建设",stu4_3="水泵状态建设",stu4_4="付款督办",stu4_5="付款督办",stu4_6="休息",stu4_7="休息"},
new ste_ff(){stu1="",stu2="中区部",stu3="纪文义2",stu4_1="双月会准备1",stu4_2="双月会准备2",stu4_3="双月会准备2",stu4_4="制度文库修订汇报",stu4_5="制度文库修订汇报",stu4_6="休息",stu4_7="休息"},
new ste_ff(){stu1="",stu2="中区部",stu3="纪文义3",stu4_1="培训课件审核汇报",stu4_2="培训课件审核汇报",stu4_3="培训课件审核汇报",stu4_4="培训课件审核汇报",stu4_5="培训课件审核汇报",stu4_6="休息",stu4_7="休息"},
new ste_ff(){stu1="",stu2="北区部",stu3="纪文义4",stu4_1="牵头南区工作1",stu4_2="牵头南区工作1",stu4_3="牵头南区工作",stu4_4="牵头南区工作",stu4_5="牵头南区工作",stu4_6="休息",stu4_7="休息"},
};
this.GrvInfo1.DataBind();
}
}
#region 下周计划
protected void GrvInfo1_DataBound(object sender, EventArgs e)
{
//合并行
CommonClass_s.UnitRow_s(GrvInfo1, , "lblstu2");
//合并列
CommonClass_s.UnitCell_s(GrvInfo1, , "lblstu4_1", "lblstu4_2", "lblstu4_3", "lblstu4_4", "lblstu4_5");
} public class CommonClass_s
{
#region 合并行(相同值)-普通列 /// <summary>
/// 合并行(普通列)
/// </summary>
/// <param name=“gv”>所对应的GridView对象</param>
/// <param name=“columnIndex”>所对应要合并的列的索引</param>
public static void UnitRow_s(GridView gv, int columnIndex)
{
int i;
string lastType;
int lastCell;
if (gv.Rows.Count > )
{
lastType = gv.Rows[].Cells[columnIndex].Text;
gv.Rows[].Cells[columnIndex].RowSpan = ;
lastCell = ;
for (i = ; i < gv.Rows.Count; i++)
{
if (gv.Rows[i].Cells[columnIndex].Text == lastType)
{
gv.Rows[i].Cells[columnIndex].Visible = false;
gv.Rows[lastCell].Cells[columnIndex].RowSpan++;
}
else
{
lastType = gv.Rows[i].Cells[columnIndex].Text;
lastCell = i;
gv.Rows[i].Cells[columnIndex].RowSpan = ;
}
}
}
} #endregion #region 合并行(相同值)-模板列 /// <summary>
/// 合并行(模板列)
/// </summary>
/// <param name=“gv”>所对应的GridView对象</param>
/// <param name=“columnIndex”>所对应要合并的列的索引</param>
/// <param name=“lblName”>模板列里面Lable的Id</param>
public static void UnitRow_s(GridView gv, int columnIndex, string lblName)
{
int i;
string lastType;
int lastCell;
if (gv.Rows.Count > )
{
lastType = (gv.Rows[].Cells[columnIndex].FindControl(lblName) as Label).Text;
gv.Rows[].Cells[columnIndex].RowSpan = ;
lastCell = ;
for (i = ; i < gv.Rows.Count; i++)
{
if ((gv.Rows[i].Cells[columnIndex].FindControl(lblName) as Label).Text == lastType)
{
gv.Rows[i].Cells[columnIndex].Visible = false;
gv.Rows[lastCell].Cells[columnIndex].RowSpan++;
}
else
{
lastType = (gv.Rows[i].Cells[columnIndex].FindControl(lblName) as Label).Text;
lastCell = i;
gv.Rows[i].Cells[columnIndex].RowSpan = ;
}
}
}
} #endregion #region 合并列(相同值)-普通列 /// <summary>
/// 合并列(普通列)
/// </summary>
/// <param name="gv">所对应的GridView对象</param>
/// <param name="columnIndex">所对应要合并的列的索引</param>
public static void UnitCell_s(GridView gv, int columnIndex)
{
int i;
string lastType;
if (gv.Rows.Count > )
{
for (i = ; i < gv.Rows.Count; i++)
{
lastType = gv.Rows[i].Cells[columnIndex].Text;
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
if (gv.Rows[i].Cells[columnIndex + ].Text == lastType)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
gv.Rows[i].Cells[columnIndex].ColumnSpan++;
}
else
{
lastType = gv.Rows[i].Cells[columnIndex].Text;
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
}
}
}
} #endregion #region 合并列(相同值)-模板列 /// <summary>
/// 合并行(模板列)
/// </summary>
/// <param name=“gv”>所对应的GridView对象</param>
/// <param name=“columnIndex”>所对应要合并的列的索引</param>
/// <param name=“lblName1”>模板列里面Lable1的Id</param>
/// /// <param name=“lblName1”>模板列里面Lable2的Id</param>
public static void UnitCell_s(GridView gv, int columnIndex, string lblName1, string lblName2, string lblName3, string lblName4, string lblName5)
{
int i;
string lastType1;
string lastType2;
string lastType3;
string lastType4;
string lastType5;
int num_set = ;//单表格列的列宽
if (gv.Rows.Count > )
{
for (i = ; i < gv.Rows.Count; i++)
{
int models = ;
int mnw = ;
lastType1 = (gv.Rows[i].Cells[columnIndex].FindControl(lblName1) as Label).Text;
lastType2 = (gv.Rows[i].Cells[columnIndex + ].FindControl(lblName2) as Label).Text;
lastType3 = (gv.Rows[i].Cells[columnIndex + ].FindControl(lblName3) as Label).Text;
lastType4 = (gv.Rows[i].Cells[columnIndex + ].FindControl(lblName4) as Label).Text;
lastType5 = (gv.Rows[i].Cells[columnIndex + ].FindControl(lblName5) as Label).Text;
string model_r = lastType1 + "," + lastType2 + "," + lastType3 + "," + lastType4 + "," + lastType5;
string[] model_uu = model_r.Trim().Split(',');
gv.Rows[i].Cells[columnIndex].ColumnSpan = ; ///=================== if (lastType1 == lastType2)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
gv.Columns[columnIndex].ItemStyle.Width = num_set * ;
}
if (lastType2 == lastType3)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
if (lastType1 == lastType3)
{
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
gv.Columns[columnIndex].ItemStyle.Width = num_set * ;
}
else
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
} }
if (lastType3 == lastType4)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
if (lastType1 == lastType4)
{
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
gv.Columns[columnIndex].ItemStyle.Width = num_set * ;
}
else
{
if (lastType2 == lastType4)
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
else
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
}
}
if (lastType4 == lastType5)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
if (lastType1 == lastType5)
{
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
gv.Columns[columnIndex].ItemStyle.Width = num_set * ;
}
else
{
if (lastType2 == lastType5)
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
else
{
if (lastType3 == lastType5)
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
else
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
}
}
}
}
}
} #endregion
} protected void GrvInfo1_RowCreated(object sender, GridViewRowEventArgs e)
{
//获取下周所有日期 #region 对获取下周日期的特殊转换(获取下周一时间) DateTime currentTime = DateTime.Now;
int week = Convert.ToInt32(currentTime.DayOfWeek);
week = week == ? : week;
var start_time_next_week = currentTime.AddDays( - week + );//下周星期一
string set_time = start_time_next_week.ToString("yyyy-MM-dd"); #endregion string[] set_num = set_time.Trim().Split('-');
int Year_s = ;//年
int Month_s = ;//月
int Day_s = ;//日
Year_s = Convert.ToInt32(set_num[]);
Month_s = Convert.ToInt32(set_num[]);
Day_s = Convert.ToInt32(set_num[]);
DateTime someDay = new DateTime(Year_s, Month_s, Day_s); //此处换成你实际的日期
int wd = (int)someDay.DayOfWeek;
string date_time1 = null;//用于接收日期字符 for (int i = - wd; i < - wd; i++)
{
DateTime currentDay = someDay.AddDays(i);
DateTime dt = DateTime.Parse(currentDay.ToShortDateString());
date_time1 += dt.Day.ToString() + ",";
}
date_time1 = date_time1.Remove(date_time1.Length - , );
string[] date_time2 = date_time1.Trim().Split(',');
switch (e.Row.RowType)
{
case DataControlRowType.Header://行是标题行
TableCellCollection personHeader = e.Row.Cells;//标题行的单元格集合
personHeader.Clear();//清空 //添加一个表头 比如以及表头有三列 那么序号就是 0 1 2
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("rowspan", ""); //跨2行
personHeader[].Attributes.Add("colspan", ""); //跨1列
personHeader[].Attributes.Add("bgcolor", "DarkGreen");
personHeader[].Text = "序号"; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("rowspan", ""); //跨2行
personHeader[].Attributes.Add("colspan", ""); //跨1列
personHeader[].Attributes.Add("bgcolor", "DarkGreen");
personHeader[].Text = "组别"; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("rowspan", ""); //跨2行
personHeader[].Attributes.Add("colspan", ""); //跨1列
personHeader[].Attributes.Add("bgcolor", "DarkGreen");
personHeader[].Text = "姓名"; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + "</th></tr><tr>"; //再添加一个表头
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "一";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "二";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "三";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "四";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "五";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "六";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "日"; //还可以继续添加
//记住不论多少行表头,每个列的序号是一次递增的,而且需要换行 —</th></tr><tr> break;
}
}
#endregion
行颜色渐变
protected void GrvInfo1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{ e.Row.Attributes.Add("onMouseOver", "SetNewColor(this);");
e.Row.Attributes.Add("onMouseOut", "SetOldColor(this);");
}
}
ste_ff类:
public class ste_ff
{
public string stu1 { set; get; } public string stu1_1 { set; get; }
public string stu2 { set; get; }
public string stu3 { set; get; }
public string stu4_1 { set; get; }
public string stu4_2 { set; get; }
public string stu4_3 { set; get; }
public string stu4_4 { set; get; }
public string stu4_5 { set; get; }
public string stu4_6 { set; get; }
public string stu4_7 { set; get; } public string stu5_1 { set; get; }
public string stu5_2 { set; get; }
public string stu5_3 { set; get; }
public string stu5_4 { set; get; }
public string stu5_5 { set; get; }
public string stu5_6 { set; get; }
public string stu5_7 { set; get; } /// <summary>用于接收星期一ID</summary>
public string stu_ID1 { set; get; }
/// <summary>用于接收星期二ID</summary>
public string stu_ID2 { set; get; }
/// <summary>用于接收星期三ID</summary>
public string stu_ID3 { set; get; }
/// <summary>用于接收星期四ID</summary>
public string stu_ID4 { set; get; }
/// <summary>用于接收星期五ID</summary>
public string stu_ID5 { set; get; }
/// <summary>用于接收星期六ID</summary>
public string stu_ID6 { set; get; }
/// <summary>用于接收星期七ID</summary>
public string stu_ID7 { set; get; }
}
关于GridView的横向合并数据信息的更多相关文章
- Pandas 横向合并DataFrame数据
需要将两个DataFrame进行横向拼接: 对 A_DataFrame 拼接一列数据: 数据样例如下: 将右侧source_df中的 “$factor” 列拼接到左侧qlib_df中,但左侧数据是分钟 ...
- R语言中数据框的横向合并与纵向合并
#横向合并ID<-c(1,2,3,4)name<-c("Jim","Tony","Lisa","Tom")s ...
- datagridview 纵向 横向 合并单元格
datagridview 单元格合并:纵向以及横向合并参考了csdn上不知哪位的代码,具体哪位找不到连接了. 纵向合并: /// <summary> /// 纵向合并,即合并数据项的值 / ...
- Android 横向列表GridView 实现横向滚动
Android 横向列表实现,可左右滑动,如下图 1.主界面布局代码:activity_main.xml a.包裹HorizontalScrollView控件是GirdView横向滚动的基本条件b.G ...
- 用python+selenium获取北上广深成五地PM2.5数据信息并按空气质量排序
从http://www.pm25.com/shenzhen.html抓取北京,深圳,上海,广州,成都的pm2.5指数,并按照空气质量从优到差排序,保存在txt文档里 代码如下: #coding=utf ...
- table_横向合并_纵向合并
colspan是横向合并; rowspan是纵向合并; <caption></caption>表格标题(自动居中)
- 数据库合并数据sql
1.sql2000中只能用自定义的函数解决 )) , 'aa') , 'bb') , 'aaa') , 'bbb') , 'ccc') go )) ) as begin ) select @str = ...
- Saiku设置展示table数据不隐藏空的行数据信息(二十六)
Saiku设置展示table数据不隐藏空的行数据信息 saiku有个 非空的字段 按钮,点击这个后,会自动的把空的行数据信息给隐藏掉,这里我们来设置一下让其行数据不隐藏,为空的就为空. 主要更改两个文 ...
- SqlServer中的UNION操作符在合并数据时去重的原理以及UNION运算符查询结果默认排序的问题
本文出处:http://www.cnblogs.com/wy123/p/7884986.html 周围又有人在讨论UNION和UNION ALL,对于UNION和UNION ALL,网上说的最多的就是 ...
随机推荐
- ubuntu 基本操作
一 :下载文件操作 wge 下载地址 解压命令: tar
- excel导入mysql数据
excel加载mysql数据 1.第一步,选择从mysql导入数据 2.单击会出现弹框: 3.可能有的同学的,这里缺少插件,例如: 4.去下载 这个 插件安装即可.https://dev.mysql. ...
- Linux系统部署JavaWeb项目(超详细tomcat,nginx,mysql)
转载自:Linux系统部署JavaWeb项目(超详细tomcat,nginx,mysql) 我的系统是阿里云的,香港的系统,本人选择的是系统镜像:CentOS 7.3 64位. 具体步骤: 配置Jav ...
- Python对象组合
一个类的对象作为另一个类的对象的属性,称为类的组合. 即 class1.instance1.property = class2.instance 组合也是代码重用的重要方式之一. 先定义三个类:人.汽 ...
- axios发送post form请求
axios发送post form请求 只需修改url和data即可 axios({ url: '/user', method: 'post', data: { firstName: 'Fred', l ...
- 关于vue的多页面标签功能,对于嵌套router-view缓存的最终无奈解决方法
最近写我自己的后台开发框架,要弄一个多页面标签功能,之前有试过vue-element-admin的多页面,以为很完美,就按它的思路重新写了一个,但发现还是有问题的. vue-element-admin ...
- vue-cli4 + TS构建新项目
1. 如果你之前没有安装vue-cli,可以通过如下命令进行安装: npm install -g @vue/cli yarn global add @vue/cli 2. 创建vue项目 vue cr ...
- JAVASE(十六) IO流 :File类、节点流、缓冲流、转换流、编码集、对象流
个人博客网:https://wushaopei.github.io/ (你想要这里多有) 1.File类型 1.1.File类的理解 File类是在java.io包下 File可以理解成一个文件 ...
- ansible取出register变量中最长字符串
背景 在用ansible撰写一个etcd恢复的playbook时,有一个操作是获取etcd启动时的"initial-cluster"启动参数,该参数在etcd集群不同节点不一致,需 ...
- Java实现 蓝桥杯 算法提高 判断名次
算法提高 判断名次 时间限制:1.0s 内存限制:256.0MB 问题描述 某场比赛过后,你想要知道A~E五个人的排名是什么,于是要求他们每个人说了一句话.(经典的开头---_-!)得了第1名的人23 ...