This commit is contained in:
高飞 2025-09-02 14:32:15 +08:00
commit 3272bee817
4 changed files with 43 additions and 4 deletions

View File

@ -96,7 +96,6 @@ namespace BLL
newWelder.MaxWeldingWire = welder.MaxWeldingWire;
newWelder.IsOAM = welder.IsOAM;
db.SubmitChanges();
var pw = from x in db.Project_Welder
where x.WED_ID == welder.WED_ID

View File

@ -108,4 +108,39 @@
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>

View File

@ -121,7 +121,7 @@
<f:Panel ID="Panel5" Title="面板1" BoxFlex="1" runat="server" ShowBorder="false" ShowHeader="false"
Layout="VBox">
<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">
</f:Image>
<f:FileUpload ID="filePhoto1" runat="server" ButtonText="上传头像到百度" ButtonOnly="true"

View File

@ -411,7 +411,12 @@
filePhoto1.Reset();
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();
Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning);