5.1日 暂定 水电表管理
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user