This commit is contained in:
commit
3272bee817
|
@ -94,8 +94,7 @@ namespace BLL
|
||||||
newWelder.IsFaceTrain = welder.IsFaceTrain;
|
newWelder.IsFaceTrain = welder.IsFaceTrain;
|
||||||
newWelder.MaxHanTiao = welder.MaxHanTiao;
|
newWelder.MaxHanTiao = welder.MaxHanTiao;
|
||||||
newWelder.MaxWeldingWire = welder.MaxWeldingWire;
|
newWelder.MaxWeldingWire = welder.MaxWeldingWire;
|
||||||
newWelder.IsOAM = welder.IsOAM;
|
newWelder.IsOAM = welder.IsOAM;
|
||||||
|
|
||||||
|
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
var pw = from x in db.Project_Welder
|
var pw = from x in db.Project_Welder
|
||||||
|
|
|
@ -108,4 +108,39 @@
|
||||||
|
|
||||||
window.parent.addExampleTab(node);
|
window.parent.addExampleTab(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var websock;
|
||||||
|
|
||||||
|
function initWebSocket(){ //初始化weosocket
|
||||||
|
const wsuri = "ws://127.0.0.1:18099/hik/screen";
|
||||||
|
websock = new WebSocket(wsuri);
|
||||||
|
websock.onmessage = websocketonmessage;
|
||||||
|
websock.onopen = websocketonopen;
|
||||||
|
websock.onerror = websocketonerror;
|
||||||
|
websock.onclose = websocketclose;
|
||||||
|
}
|
||||||
|
function websocketonopen(){ //连接建立之后执行send方法发送数据
|
||||||
|
|
||||||
|
setInterval(() => {
|
||||||
|
let actions = { "test": "12345" };
|
||||||
|
websocketsend(JSON.stringify(actions));
|
||||||
|
}, 10000);
|
||||||
|
}
|
||||||
|
function websocketonerror(){//连接建立失败重连
|
||||||
|
initWebSocket();
|
||||||
|
}
|
||||||
|
function websocketonmessage(e){ //数据接收
|
||||||
|
const redata = JSON.parse(e.data);
|
||||||
|
data = redata;
|
||||||
|
$("welderCode").value(data.jobNo)
|
||||||
|
}
|
||||||
|
function websocketsend(Data){//数据发送
|
||||||
|
websock.send(Data);
|
||||||
|
}
|
||||||
|
function websocketclose(e){ //关闭
|
||||||
|
console.log('断开连接', e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
|
@ -121,7 +121,7 @@
|
||||||
<f:Panel ID="Panel5" Title="面板1" BoxFlex="1" runat="server" ShowBorder="false" ShowHeader="false"
|
<f:Panel ID="Panel5" Title="面板1" BoxFlex="1" runat="server" ShowBorder="false" ShowHeader="false"
|
||||||
Layout="VBox">
|
Layout="VBox">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Image ID="imgPhoto1" CssClass="userphoto" ImageUrl="~/res/images/blank_150.png"
|
<f:Image ID="imgPhoto1" CssClass="userphoto" ImageUrl="~/res/images/blank_150.png" ImageWidth="150px" ImageHeight="200px"
|
||||||
runat="server" BoxFlex="1">
|
runat="server" BoxFlex="1">
|
||||||
</f:Image>
|
</f:Image>
|
||||||
<f:FileUpload ID="filePhoto1" runat="server" ButtonText="上传头像到百度" ButtonOnly="true"
|
<f:FileUpload ID="filePhoto1" runat="server" ButtonText="上传头像到百度" ButtonOnly="true"
|
||||||
|
|
|
@ -411,7 +411,12 @@
|
||||||
filePhoto1.Reset();
|
filePhoto1.Reset();
|
||||||
|
|
||||||
var welder = Funs.DB.HJGL_BS_Welder.FirstOrDefault(x=>x.WED_ID== WED_ID);
|
var welder = Funs.DB.HJGL_BS_Welder.FirstOrDefault(x=>x.WED_ID== WED_ID);
|
||||||
welder.PhotoUrl = imgPhoto1.ImageUrl.Replace("/", "\\");
|
welder.PhotoUrl = imgPhoto1.ImageUrl.Replace("~", "");
|
||||||
|
var pw = Funs.DB.Project_Welder.Where(x => x.WED_ID == WED_ID);
|
||||||
|
foreach(var w in pw)
|
||||||
|
{
|
||||||
|
w.ExchangeTime = null;
|
||||||
|
}
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning);
|
Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue