|
|
@ -48,9 +48,9 @@ |
|
|
|
filterable |
|
|
|
clearable> |
|
|
|
<el-option v-for="item in serviceList" |
|
|
|
:key="item.categoryKey" |
|
|
|
:label="item.categoryName" |
|
|
|
:value="item.categoryKey"> |
|
|
|
:key="item.label" |
|
|
|
:label="item.value" |
|
|
|
:value="item.label"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
|
|
|
@ -186,7 +186,7 @@ export default { |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
async initForm (type, unitId) { |
|
|
|
async initForm (type, icCityManagementId) { |
|
|
|
this.startLoading() |
|
|
|
this.$refs.ref_form.resetFields(); |
|
|
|
|
|
|
@ -194,9 +194,9 @@ export default { |
|
|
|
await this.loadService() |
|
|
|
|
|
|
|
this.formType = type |
|
|
|
if (unitId) { |
|
|
|
this.unitId = unitId |
|
|
|
this.formData.id = unitId |
|
|
|
if (icCityManagementId) { |
|
|
|
this.icCityManagementId = icCityManagementId |
|
|
|
this.formData.icCityManagementId = icCityManagementId |
|
|
|
await this.loadFormData() |
|
|
|
} else { |
|
|
|
map.setCenter(new TMap.LatLng(36.0722275, 120.38945519)) |
|
|
@ -268,24 +268,13 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
async addUnit () { |
|
|
|
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 |
|
|
|
// if (regPhone.test(this.formData.contactMobile) === false) { |
|
|
|
// this.btnDisable = false |
|
|
|
// this.$message({ |
|
|
|
// type: 'warning', |
|
|
|
// message: '请输入正确的手机号码' |
|
|
|
// }) |
|
|
|
// return false; |
|
|
|
// } |
|
|
|
|
|
|
|
let url = '/gov/org/icCityManagement/add' |
|
|
|
// let url = "http://yapi.elinkservice.cn/mock/245/gov/org/icCityManagement/add" |
|
|
|
// if (this.formType === 'edit') { |
|
|
|
// this.formData.id = this.unitId |
|
|
|
// } |
|
|
|
|
|
|
|
let url = '' |
|
|
|
if (this.formType === 'add'){ |
|
|
|
url = '/gov/org/icCityManagement/add' |
|
|
|
}else { |
|
|
|
url = '/gov/org/icCityManagement/edit' |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, this.formData) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
@ -298,7 +287,6 @@ export default { |
|
|
|
this.btnDisable = false |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleCancle () { |
|
|
|