5.1日 暂定 水电表管理

This commit is contained in:
Zy
2026-05-01 18:36:37 +08:00
parent 7b89144dd4
commit a8bb4e66ad
103 changed files with 1071 additions and 533 deletions

View File

@@ -182,9 +182,10 @@ const rules = ref({
/** 获取编辑小区的信息 */
function getCommunityinfo() {
const id = Number(editId.value);
const id = editId.value;
getVillageByIdAPI(id).then((res) => {
city.value = (res.data.city as string).split('/');
city.value = res.data.city.split('/');
console.log(res.data.city.split('/'));
if (res.data.villageImageUrl) {
villageImg.value = res.data.villageImageUrl
.split(',')
@@ -196,7 +197,9 @@ function getCommunityinfo() {
};
});
}
builtTime.value = res.data.completDate.split(' ')[0];
if (res.data.completDate) {
builtTime.value = res.data.completDate.split(' ')[0];
}
form.value = {
...res.data,
completDate: builtTime.value
@@ -204,7 +207,6 @@ function getCommunityinfo() {
});
}
if (isedit.value) {
console.log('编辑小区id', editId.value, typeof editId.value, Boolean(editId.value));
getCommunityinfo();
}
// 请求头
@@ -335,7 +337,6 @@ function submitFormInfo() {
}
if (isedit.value) {
console.log('编辑小区提交的数据', form.value);
editVillageAPI<communitylist_rows_type>(form.value).then((res) => {
ElMessage.success('编辑成功');
cancelForm();