Merge branch 'feature/headquartersSetting' into feature/dockerSetting
This commit is contained in:
commit
41d389880d
@ -4,13 +4,14 @@ const moveModal = (elmnt) => {
|
||||
pos2 = 0,
|
||||
pos3 = 0,
|
||||
pos4 = 0;
|
||||
document.body.addEventListener("mousedown", dragMouseDown, {
|
||||
elmnt.addEventListener("mousedown", dragMouseDown, {
|
||||
passive: false,
|
||||
});
|
||||
|
||||
function dragMouseDown(e) {
|
||||
console.log("dragMouseDown", e);
|
||||
e = e || window.event;
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
// get the mouse cursor position at startup:
|
||||
pos3 = e.clientX;
|
||||
|
||||
@ -69,11 +69,11 @@ const onOk = async () => {
|
||||
formData.delete("file");
|
||||
formData.append("id", props.formState.id);
|
||||
|
||||
if (props.formState.file[0]) {
|
||||
if (Array.isArray(props.formState.file) && props.formState.file[0]) {
|
||||
formData.append("file", props.formState.file[0]);
|
||||
}
|
||||
if (props.formState.Device_image) {
|
||||
formData.append("Device_image", props.formState.Device_image);
|
||||
if (props.formState.device_image && props.formState.file.length !== 0) {
|
||||
formData.append("device_image", props.formState.device_image);
|
||||
}
|
||||
|
||||
const res = await postAssetSubList(formData);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user