add
This commit is contained in:
parent
2a7d36761d
commit
a65ce4b6a8
@ -16,6 +16,6 @@ VITE_APP_UPLOAD_API = '/uploadApis'
|
|||||||
# VITE_APP_BASE_URL = 'http://47.109.205.240:8080'
|
# VITE_APP_BASE_URL = 'http://47.109.205.240:8080'
|
||||||
# VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
|
# VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
|
||||||
# 内网接口地址
|
# 内网接口地址
|
||||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
VITE_APP_BASE_URL = 'http://192.168.18.74:8080'
|
||||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080'
|
VITE_APP_UPLOAD_URL = 'http://192.168.18.74:8080'
|
||||||
# VITE_APP_VIST_URL = 'http://192.168.18.99'
|
# VITE_APP_VIST_URL = 'http://192.168.18.99'
|
||||||
|
@ -13,5 +13,5 @@ VITE_APP_UPLOAD_API = '/uploadApis'
|
|||||||
# VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
|
# VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
|
||||||
|
|
||||||
# 内网接口地址
|
# 内网接口地址
|
||||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
VITE_APP_BASE_URL = 'http://192.168.18.74:8080'
|
||||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080'
|
VITE_APP_UPLOAD_URL = 'http://192.168.18.74:8080'
|
||||||
|
@ -15,7 +15,7 @@ export function deleteGrid(id) {
|
|||||||
}
|
}
|
||||||
// 修改(PUT)
|
// 修改(PUT)
|
||||||
export function updateGrid(data = {}) {
|
export function updateGrid(data = {}) {
|
||||||
return request('//land-resource/gridManage/edit', {
|
return request('/land-resource/gridManage/edit', {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
|
@ -130,6 +130,7 @@ const containerStyle = computed(() => ({
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
background-color: antiquewhite;
|
||||||
}
|
}
|
||||||
.area-cascader-separator {
|
.area-cascader-separator {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
@ -191,9 +191,15 @@ const handleSubmit = async () => {
|
|||||||
if (dialogTitle.value === '新增网格') {
|
if (dialogTitle.value === '新增网格') {
|
||||||
await createGrid(formData.value);
|
await createGrid(formData.value);
|
||||||
ElMessage.success('新增成功');
|
ElMessage.success('新增成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
} else {
|
} else {
|
||||||
await updateGrid(formData.value);
|
await updateGrid(formData.value);
|
||||||
ElMessage.success('更新成功');
|
ElMessage.success('更新成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error(error.message || '新增失败,请重试');
|
ElMessage.error(error.message || '新增失败,请重试');
|
||||||
|
@ -48,20 +48,21 @@
|
|||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
|
||||||
<el-dialog v-model="addDialogVisible" :title="isEdit ? '编辑网格员' : '新增网格员'" width="600px">
|
<el-dialog :key="dialogTitle" v-model="addDialogVisible" :title="isEdit ? '编辑网格员' : '新增网格员'" width="60%" align-center :draggable="true">
|
||||||
<el-form ref="addFormRef" :model="addForm" :rules="addFormRules" label-width="120px">
|
<el-form ref="addFormRef" :model="addForm" :rules="addFormRules" label-width="120px" class="form-item">
|
||||||
|
<p class="form-title">填写网格员信息</p>
|
||||||
<el-form-item label="网格员姓名" prop="memberName">
|
<el-form-item label="网格员姓名" prop="memberName">
|
||||||
<el-input v-model="addForm.memberName" style="width: 380px" />
|
<el-input v-model="addForm.memberName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="gridId" label-width="0px">
|
<el-form-item label="" prop="gridId" label-width="0px">
|
||||||
<!-- 假设 AreaCascader 是行政区域-网格的级联选择组件 -->
|
<!-- 假设 AreaCascader 是行政区域-网格的级联选择组件 -->
|
||||||
<AreaCascader v-model:region-code="addForm.gridAreaCode" v-model:grid-id="addForm.gridId" split-rows label="" />
|
<AreaCascader v-model:region-code="addForm.gridAreaCode" v-model:grid-id="addForm.gridId" split-rows label="" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电话号码" prop="phone">
|
<el-form-item label="电话号码" prop="phone">
|
||||||
<el-input v-model="addForm.phone" style="width: 380px" />
|
<el-input v-model="addForm.phone" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="note">
|
<el-form-item label="备注" prop="note">
|
||||||
<el-input v-model="addForm.note" type="textarea" style="width: 380px" />
|
<el-input v-model="addForm.note" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -351,6 +352,11 @@ const onExport = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
:deep(.el-dialog__body) {
|
||||||
|
padding: 20px;
|
||||||
|
height: calc(100vh - 300px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
.custom-page {
|
.custom-page {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
.custom-search {
|
.custom-search {
|
||||||
@ -394,4 +400,22 @@ const onExport = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.form-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin: 30px 0;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.form-item {
|
||||||
|
width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
:deep(.area-cascader-label) {
|
||||||
|
padding: 0 12px 0 0;
|
||||||
|
margin: 0;
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user