diff --git a/src/api/device/index.js b/src/api/device/index.js
index c2e96d9..b17ef77 100644
--- a/src/api/device/index.js
+++ b/src/api/device/index.js
@@ -45,7 +45,7 @@ const devicesInfo = (id) => {
});
}
//更新设备信息
-const updateDevices = (id) => {
+const updateDevices = (id,data) => {
return request({
url: `/devices/${id}`,
method: "put",
diff --git a/src/api/myUser/index.js b/src/api/myUser/index.js
index c66e77c..faef55c 100644
--- a/src/api/myUser/index.js
+++ b/src/api/myUser/index.js
@@ -24,7 +24,7 @@ const deleteUser = (id) => {
});
}
//更新用户信息
-const updateAuth = (id, data) => {
+const updatePassword = (id, data) => {
return request({
url: `/users/${id}/auth`,
method: "put",
@@ -32,7 +32,7 @@ const updateAuth = (id, data) => {
});
}
//更新用户密码
-const updatePassword = (id, data) => {
+const updateAuth = (id, data) => {
return request({
url: `/users/${id}/auth`,
method: "put",
diff --git a/src/views/manage/datas/edit.vue b/src/views/manage/datas/edit.vue
index 7d73c19..8cba50e 100644
--- a/src/views/manage/datas/edit.vue
+++ b/src/views/manage/datas/edit.vue
@@ -196,8 +196,9 @@
:on-change="handleChangeFiles"
list-type="picture"
multiple
- accept="application/json,image/png,image/jpg,image/jpeg"
+ accept="application/json,image/jpeg"
>
+
选择文件
请上传大小不超过 10M,格式为
- png/jpg/jpeg/json 的文件
+ json/jpg 的文件
@@ -524,8 +525,8 @@ const initData = () => {
DataSetApi.dataSetInfo(id).then((res) => {
if (res.data.code == 0) {
let resolution = res.data.data.image_resolution.split("x");
- res.data.data.image_width=resolution[0];
- res.data.data.image_height=resolution[1];
+ res.data.data.image_width = resolution[0];
+ res.data.data.image_height = resolution[1];
form.value = res.data.data;
codeHtml.value = JSON.stringify(res.data.data.dataset_parameters);
if (codeHtml.value == "{}") {
@@ -557,12 +558,14 @@ const initData = () => {
const handleQuery = () => {
DataSetApi.rawFiles(ID.value).then((res) => {
if (res.data.code == 0) {
- let list = [];
- res.data.data.file_name_list.forEach((item) => {
- list.push({ name: item, url: item });
- });
- imageList.value = list;
- imgCount.value = imageList.value.length;
+ if (res.data.data.file_name_list) {
+ let list = [];
+ res.data.data.file_name_list.forEach((item) => {
+ list.push({ name: item, url: item });
+ });
+ imageList.value = list;
+ imgCount.value = imageList.value.length;
+ }
}
});
};
diff --git a/src/views/manage/equipment/addNet.vue b/src/views/manage/equipment/addNet.vue
index 0c11607..89ce725 100644
--- a/src/views/manage/equipment/addNet.vue
+++ b/src/views/manage/equipment/addNet.vue
@@ -133,7 +133,11 @@ const handleSubmit = useThrottleFn(() => {
function initUnregistedList() {
DeviceApi.unregisted(queryParams).then((res) => {
if (res.data.code == 0) {
- unregistedList.value = res.data.data.UnregistedList;
+ let list = [];
+ res.data.data.device_info.forEach(item => {
+ list.push(item.device_info);
+ })
+ unregistedList.value = list;
}
});
}
diff --git a/src/views/manage/equipment/addPcie.vue b/src/views/manage/equipment/addPcie.vue
index e405538..7a82d44 100644
--- a/src/views/manage/equipment/addPcie.vue
+++ b/src/views/manage/equipment/addPcie.vue
@@ -135,7 +135,12 @@ const handleSubmit = useThrottleFn(() => {
function initUnregistedList() {
DeviceApi.unregisted(queryParams).then((res) => {
if (res.data.code == 0) {
- unregistedList.value = res.data.data.UnregistedList;
+ let list = [];
+ res.data.data.device_info.forEach(item => {
+ item.device_info.pcie_index = item.pcie_index;
+ list.push(item.device_info);
+ })
+ unregistedList.value = list;
}
});
}
diff --git a/src/views/manage/equipment/edit.vue b/src/views/manage/equipment/edit.vue
index 1ac4cc2..3d111f9 100644
--- a/src/views/manage/equipment/edit.vue
+++ b/src/views/manage/equipment/edit.vue
@@ -62,7 +62,7 @@ import DeviceApi from "@/api/device";
const route = useRoute();
const router = useRouter();
-const form = reactive({});
+const form = ref({});
const formRef = ref(ElForm); // 表单
const loading = ref(false); // 加载状态
const list = ref([]); // 注册设备
@@ -79,7 +79,7 @@ const handleSubmit = useThrottleFn(() => {
formRef.value.validate((valid: any) => {
if (valid) {
loading.value = true;
- DeviceApi.updateDevices(form)
+ DeviceApi.updateDevices(form.value.device_id,form.value)
.then((res) => {
if (res.data.code == 0) {
ElMessage.success("保存成功");
@@ -112,10 +112,10 @@ function initPage() {
data.cmpt_interface_type = device_info.cmpt_interface_type;
list.value.push(data);
}
- form.device_id = res.data.data.device_id || device_info.device_id;
- form.device_name = device_info.device_name;
- form.device_desc = device_info.device_desc;
- form.infomation = device_info.infomation;
+ form.value.device_id = res.data.data.device_id || device_info.device_id;
+ form.value.device_name = device_info.device_name;
+ form.value.device_desc = device_info.device_desc;
+ form.value.infomation = device_info.infomation;
})
.finally(() => {
loading.value = false;
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index b5ed013..970d4c5 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -107,7 +107,7 @@
show-password
/>
-
+
{
+ UserAPI.updatePassword(row.user_id, { password: value }).then((res) => {
if (res.data.code == 0) {
ElMessage.success("密码重置成功,新密码是:" + value);
} else {