|
|
@ -1,243 +1,185 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="dialog-h-content scroll-h"> |
|
|
|
<el-form |
|
|
|
ref="ref_form" |
|
|
|
<el-form ref="ref_form" |
|
|
|
:inline="true" |
|
|
|
:model="dataForm" |
|
|
|
:rules="dataRule" |
|
|
|
:disabled="formType === 'detail'" |
|
|
|
class="form" |
|
|
|
> |
|
|
|
<el-form-item |
|
|
|
label="组织名称 " |
|
|
|
class="form"> |
|
|
|
<el-form-item label="组织名称 " |
|
|
|
prop="organizationName" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
class="item_width_1" |
|
|
|
style="display: block"> |
|
|
|
<el-input class="item_width_1" |
|
|
|
maxlength="50" |
|
|
|
show-word-limit |
|
|
|
placeholder="请输入组织名称 " |
|
|
|
v-model="dataForm.organizationName" |
|
|
|
> |
|
|
|
v-model="dataForm.organizationName"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
label="分类名称 " |
|
|
|
<el-form-item label="分类名称 " |
|
|
|
prop="categoryCode" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
v-model="dataForm.categoryCode" |
|
|
|
style="display: block"> |
|
|
|
<el-select v-model="dataForm.categoryCode" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in categoryList" |
|
|
|
clearable> |
|
|
|
<el-option v-for="item in categoryList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
label="组织人数 " |
|
|
|
<el-form-item label="组织人数 " |
|
|
|
prop="organizationPersonCount" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
class="item_width_1" |
|
|
|
style="display: block"> |
|
|
|
<el-input class="item_width_1" |
|
|
|
type="number" |
|
|
|
maxlength="50" |
|
|
|
show-word-limit |
|
|
|
placeholder="请输入组织人数 " |
|
|
|
v-model="dataForm.organizationPersonCount" |
|
|
|
> |
|
|
|
v-model="dataForm.organizationPersonCount"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
label="组织成员 " |
|
|
|
<el-form-item label="组织成员 " |
|
|
|
prop="organizationPersonnel" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
style="display: block"> |
|
|
|
<div class="m-staffs"> |
|
|
|
<div |
|
|
|
class="item" |
|
|
|
<div class="item" |
|
|
|
:key="'staff' + index" |
|
|
|
v-for="(item, index) in dataForm.organizationPersonnel" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
class="item_width_1" |
|
|
|
v-for="(item, index) in dataForm.organizationPersonnel"> |
|
|
|
<el-input class="item_width_1" |
|
|
|
maxlength="50" |
|
|
|
show-word-limit |
|
|
|
placeholder="成员姓名" |
|
|
|
v-model="item.personName" |
|
|
|
/> |
|
|
|
v-model="item.personName" /> |
|
|
|
|
|
|
|
<el-input |
|
|
|
style="margin-left: 10px" |
|
|
|
<el-input style="margin-left: 10px" |
|
|
|
class="item_width_1" |
|
|
|
maxlength="50" |
|
|
|
show-word-limit |
|
|
|
placeholder="联系电话" |
|
|
|
v-model="item.personPhone" |
|
|
|
/> |
|
|
|
v-model="item.personPhone" /> |
|
|
|
|
|
|
|
<el-button |
|
|
|
style="margin-left: 10px" |
|
|
|
<el-button style="margin-left: 10px" |
|
|
|
size="small" |
|
|
|
@click="handleDelStaff(index)" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
@click="handleDelStaff(index)">删除</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="item-add"> |
|
|
|
<el-button size="small" @click="handleAddStaff">添加</el-button> |
|
|
|
<el-button size="small" |
|
|
|
@click="handleAddStaff">添加</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
label="服务事项" |
|
|
|
<el-form-item label="服务事项" |
|
|
|
prop="serviceItem" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
class="item_width_1" |
|
|
|
style="display: block"> |
|
|
|
<el-input class="item_width_1" |
|
|
|
type="textarea" |
|
|
|
maxlength="1000" |
|
|
|
show-word-limit |
|
|
|
:rows="3" |
|
|
|
placeholder="请输入服务事项,不超过1000字" |
|
|
|
v-model="dataForm.serviceItem" |
|
|
|
></el-input> |
|
|
|
v-model="dataForm.serviceItem"></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
label="负责人 " |
|
|
|
<el-form-item label="负责人 " |
|
|
|
prop="principalName" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
class="item_width_1" |
|
|
|
style="display: block"> |
|
|
|
<el-input class="item_width_1" |
|
|
|
maxlength="50" |
|
|
|
show-word-limit |
|
|
|
placeholder="请输入负责人 " |
|
|
|
v-model="dataForm.principalName" |
|
|
|
> |
|
|
|
v-model="dataForm.principalName"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
label="联系电话 " |
|
|
|
<el-form-item label="联系电话 " |
|
|
|
prop="principalPhone" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
class="item_width_1" |
|
|
|
style="display: block"> |
|
|
|
<el-input class="item_width_1" |
|
|
|
maxlength="50" |
|
|
|
show-word-limit |
|
|
|
placeholder="请输入联系电话 " |
|
|
|
v-model="dataForm.principalPhone" |
|
|
|
> |
|
|
|
v-model="dataForm.principalPhone"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
label="创建时间" |
|
|
|
<el-form-item label="创建时间" |
|
|
|
prop="organizationCreatedTime" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
<el-date-picker |
|
|
|
v-model="dataForm.organizationCreatedTime" |
|
|
|
style="display: block"> |
|
|
|
<el-date-picker v-model="dataForm.organizationCreatedTime" |
|
|
|
placeholder="创建时间" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
> |
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
label="位置坐标" |
|
|
|
<el-form-item label="位置坐标" |
|
|
|
prop="longitude" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
style="display: block"> |
|
|
|
<div style="width: 500px"> |
|
|
|
<el-input |
|
|
|
class="item_width_4" |
|
|
|
<el-input class="item_width_4" |
|
|
|
maxlength="50" |
|
|
|
placeholder="请输入关键字" |
|
|
|
v-model="dataForm.address" |
|
|
|
> |
|
|
|
v-model="dataForm.address"> |
|
|
|
</el-input> |
|
|
|
<el-button |
|
|
|
style="margin-left: 10px" |
|
|
|
<el-button style="margin-left: 10px" |
|
|
|
type="primary" |
|
|
|
size="small" |
|
|
|
@click="handleSearchMap" |
|
|
|
>查询</el-button |
|
|
|
> |
|
|
|
<div id="app" class="div_map"></div> |
|
|
|
@click="handleSearchMap">查询</el-button> |
|
|
|
<div id="app" |
|
|
|
class="div_map"></div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<span>经度</span> |
|
|
|
<el-input |
|
|
|
class="item_width_3" |
|
|
|
<el-input class="item_width_3" |
|
|
|
maxlength="50" |
|
|
|
placeholder="请输入经度" |
|
|
|
v-model="dataForm.longitude" |
|
|
|
> |
|
|
|
v-model="dataForm.longitude"> |
|
|
|
</el-input> |
|
|
|
<span style="margin-left: 20px">纬度</span> |
|
|
|
<el-input |
|
|
|
class="item_width_3" |
|
|
|
<el-input class="item_width_3" |
|
|
|
maxlength="50" |
|
|
|
placeholder="请输入纬度" |
|
|
|
v-model="dataForm.latitude" |
|
|
|
> |
|
|
|
v-model="dataForm.latitude"> |
|
|
|
</el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
label="备注" |
|
|
|
<el-form-item label="备注" |
|
|
|
prop="remark" |
|
|
|
label-width="150px" |
|
|
|
style="display: block" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
class="item_width_1" |
|
|
|
style="display: block"> |
|
|
|
<el-input class="item_width_1" |
|
|
|
type="textarea" |
|
|
|
maxlength="500" |
|
|
|
show-word-limit |
|
|
|
:rows="3" |
|
|
|
placeholder="请输入备注,不超过500字" |
|
|
|
v-model="dataForm.remark" |
|
|
|
></el-input> |
|
|
|
v-model="dataForm.remark"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<div class="div_btn resi-btns"> |
|
|
|
<el-button size="small" @click="handleCancle">取 消</el-button> |
|
|
|
<el-button |
|
|
|
v-if="formType != 'detail'" |
|
|
|
<el-button size="small" |
|
|
|
@click="handleCancle">取 消</el-button> |
|
|
|
<el-button v-if="formType != 'detail'" |
|
|
|
type="primary" |
|
|
|
size="small" |
|
|
|
:disabled="btnDisable" |
|
|
|
@click="handleComfirm" |
|
|
|
>确 定</el-button |
|
|
|
> |
|
|
|
@click="handleComfirm">确 定</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -448,26 +390,25 @@ export default { |
|
|
|
app.util.validateRule(messageObj); |
|
|
|
this.btnDisable = false; |
|
|
|
} else { |
|
|
|
if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) { |
|
|
|
return this.$message({ |
|
|
|
type: "error", |
|
|
|
message: "手机号格式有误", |
|
|
|
}); |
|
|
|
} |
|
|
|
// if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) { |
|
|
|
// return this.$message({ |
|
|
|
// type: "error", |
|
|
|
// message: "手机号格式有误", |
|
|
|
// }); |
|
|
|
// } |
|
|
|
const { |
|
|
|
dataForm: { organizationPersonnel }, |
|
|
|
} = this; |
|
|
|
let vlt = organizationPersonnel.every((item) => { |
|
|
|
return ( |
|
|
|
item.personName && |
|
|
|
item.personPhone && |
|
|
|
formVltHelper.userOrMobile(item.personPhone) |
|
|
|
item.personPhone |
|
|
|
); |
|
|
|
}); |
|
|
|
if (!vlt) { |
|
|
|
return this.$message({ |
|
|
|
type: "error", |
|
|
|
message: "成员姓名/手机号为空或格式有误", |
|
|
|
message: "成员姓名/手机号为空", |
|
|
|
}); |
|
|
|
} |
|
|
|
this.submit(); |
|
|
|