|
|
@ -7,7 +7,7 @@ |
|
|
|
:model="fmData" |
|
|
|
class="demo-form-inline" |
|
|
|
> |
|
|
|
<el-form-item label="所属组织" prop="gridId"> |
|
|
|
<el-form-item label="所属组织" prop="orgId"> |
|
|
|
<el-cascader |
|
|
|
class="customer_cascader" |
|
|
|
ref="myCascader" |
|
|
@ -20,16 +20,17 @@ |
|
|
|
></el-cascader> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="网格员类型" prop="specialType"> |
|
|
|
<el-form-item label="网格员类型" prop="roleKeys"> |
|
|
|
<el-select |
|
|
|
v-model="fmData.specialType" |
|
|
|
v-model="fmData.roleKeys" |
|
|
|
placeholder="请选择" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
class="item_width_2" |
|
|
|
multiple |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in specialTypeOptions" |
|
|
|
v-for="item in roleOptions" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
@ -38,20 +39,27 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="人员姓名" prop="name"> |
|
|
|
<el-input |
|
|
|
v-model="fmData.name" |
|
|
|
class="resi-cell-input" |
|
|
|
<el-form-item label="专兼职" prop="workType"> |
|
|
|
<el-select |
|
|
|
v-model="fmData.workType" |
|
|
|
placeholder="请选择" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
placeholder="请输入" |
|
|
|
class="item_width_2" |
|
|
|
> |
|
|
|
</el-input> |
|
|
|
<el-option |
|
|
|
v-for="item in workTypeOptions" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="手机号" prop="mobile"> |
|
|
|
<el-form-item label="网格员姓名" prop="name"> |
|
|
|
<el-input |
|
|
|
v-model="fmData.mobile" |
|
|
|
v-model="fmData.name" |
|
|
|
class="resi-cell-input" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
@ -60,9 +68,9 @@ |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="身份证号" prop="idCard"> |
|
|
|
<el-form-item label="手机号" prop="mobile"> |
|
|
|
<el-input |
|
|
|
v-model="fmData.idCard" |
|
|
|
v-model="fmData.mobile" |
|
|
|
class="resi-cell-input" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
@ -89,7 +97,7 @@ |
|
|
|
</el-card> |
|
|
|
|
|
|
|
<el-card class="resi-card-table"> |
|
|
|
<div class="resi-row-btn"> |
|
|
|
<div class="resi-row-btn" v-if="false"> |
|
|
|
<el-button |
|
|
|
class="diy-button--add" |
|
|
|
size="small" |
|
|
@ -126,51 +134,70 @@ |
|
|
|
width="50" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="orgNamePath" |
|
|
|
prop="gridName" |
|
|
|
label="所属组织" |
|
|
|
align="center" |
|
|
|
width="250" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="specialTypeDisplay" |
|
|
|
prop="staffName" |
|
|
|
align="center" |
|
|
|
label="网格员类型" |
|
|
|
label="网格员姓名" |
|
|
|
width="120" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="name" |
|
|
|
prop="genderName" |
|
|
|
align="center" |
|
|
|
label="人员姓名" |
|
|
|
label="性别" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="age" |
|
|
|
align="center" |
|
|
|
label="年龄" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="cultureName" |
|
|
|
align="center" |
|
|
|
label="学历" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="mobile" |
|
|
|
label="手机号" |
|
|
|
label="联系电话" |
|
|
|
align="center" |
|
|
|
width="150" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="idCard" |
|
|
|
align="center" |
|
|
|
label="身份证号" |
|
|
|
width="250" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="address" |
|
|
|
align="center" |
|
|
|
label="家庭地址" |
|
|
|
width="250" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="createdTime" |
|
|
|
prop="roleName" |
|
|
|
align="center" |
|
|
|
label="创建时间" |
|
|
|
label="网格员类型" |
|
|
|
width="200" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="updatedTime" |
|
|
|
prop="workTypeName" |
|
|
|
align="center" |
|
|
|
label="更新时间" |
|
|
|
label="专兼职" |
|
|
|
width="100" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
@ -196,7 +223,7 @@ |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="div-table-button--edit" |
|
|
|
>修改</el-button |
|
|
|
>完善信息</el-button |
|
|
|
> |
|
|
|
|
|
|
|
<el-popconfirm |
|
|
@ -264,7 +291,7 @@ |
|
|
|
import { requestPost, requestGet } from "@/js/dai/request"; |
|
|
|
import nextTick from "dai-js/tools/nextTick"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import dict from "@/views/modules/lingshan/shzl/tsrq/dict"; |
|
|
|
import { workTypeOptions, roleOptions, genderOptions } from "./dict"; |
|
|
|
import editForm from "./cpts/edit"; |
|
|
|
import popImport from "./cpts/pop-import"; |
|
|
|
import axios from "axios"; |
|
|
@ -294,15 +321,19 @@ export default { |
|
|
|
checkStrictly: true, |
|
|
|
}, |
|
|
|
|
|
|
|
specialTypeOptions: dict.specialType, |
|
|
|
workTypeOptions, |
|
|
|
roleOptions, |
|
|
|
genderOptions, |
|
|
|
cultureOptions: [], |
|
|
|
|
|
|
|
fmData: { |
|
|
|
orgId: "", |
|
|
|
orgType: "", |
|
|
|
orgId: this.$store.state.user.agencyId, |
|
|
|
orgType: "agency", |
|
|
|
specialType: "", |
|
|
|
name: "", |
|
|
|
mobile: "", |
|
|
|
idCard: "", |
|
|
|
workType: "", |
|
|
|
roleKeys: [], |
|
|
|
}, |
|
|
|
|
|
|
|
importBtnTitle: "导入", |
|
|
@ -341,6 +372,7 @@ export default { |
|
|
|
mounted() { |
|
|
|
this.getOrgTreeList(); |
|
|
|
this.getTableData(); |
|
|
|
this.getCultureOptions(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getOrgTreeList() { |
|
|
@ -523,6 +555,21 @@ export default { |
|
|
|
this.$refs[formName].resetFields(); |
|
|
|
this.handleSearch(); |
|
|
|
}, |
|
|
|
|
|
|
|
// 文化程度 |
|
|
|
async getCultureOptions() { |
|
|
|
const url = "/sys/dict/data/education"; |
|
|
|
let params = { |
|
|
|
formCode: "resi_base_info", |
|
|
|
}; |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.cultureOptions = data; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async handleAdd() { |
|
|
|
this.formShow = true; |
|
|
|
this.formTitle = "新增"; |
|
|
@ -608,22 +655,57 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
getLabelByValue(value, options) { |
|
|
|
let label = ""; |
|
|
|
if (Array.isArray(options)) { |
|
|
|
let selectedItem = options.find((item) => item.value == value); |
|
|
|
if (selectedItem) { |
|
|
|
label = selectedItem.label; |
|
|
|
} |
|
|
|
} |
|
|
|
return label; |
|
|
|
}, |
|
|
|
|
|
|
|
async getTableData() { |
|
|
|
const url = "/epmetuser/lingShan/specialCrowd/listSpecialCrowd"; |
|
|
|
const url = "/data/aggregator/epmetuser/listStaffByOrgAndRoles"; |
|
|
|
const { pageSize, pageNo, fmData } = this; |
|
|
|
const { data, code, msg } = await requestGet(url, { |
|
|
|
const { data, code, msg } = await requestPost(url, { |
|
|
|
pageSize, |
|
|
|
pageNo, |
|
|
|
...fmData, |
|
|
|
roleKeys: |
|
|
|
fmData.roleKeys.length == 0 |
|
|
|
? ["grid_member", "grid_manager"] |
|
|
|
: fmData.roleKeys, |
|
|
|
}); |
|
|
|
if (code === 0) { |
|
|
|
console.log("列表请求成功!!!!!!!!!!!!!!"); |
|
|
|
this.total = data.total || 0; |
|
|
|
this.tableData = data.list |
|
|
|
? data.list.map((item) => { |
|
|
|
return item; |
|
|
|
}) |
|
|
|
: []; |
|
|
|
this.tableData = (data.list || []).map((item) => { |
|
|
|
return { |
|
|
|
...item, |
|
|
|
genderName: this.getLabelByValue( |
|
|
|
item.gender, |
|
|
|
this.genderOptions |
|
|
|
), |
|
|
|
cultureName: this.getLabelByValue( |
|
|
|
item.culture, |
|
|
|
this.cultureOptions |
|
|
|
), |
|
|
|
workTypeName: this.getLabelByValue( |
|
|
|
item.workType, |
|
|
|
this.workTypeOptions |
|
|
|
), |
|
|
|
roleName: this.getLabelByValue( |
|
|
|
item.roleType, |
|
|
|
this.roleOptions |
|
|
|
), |
|
|
|
age: |
|
|
|
typeof item.birthday == "string" |
|
|
|
? new Date().getFullYear() - |
|
|
|
parseInt(item.birthday.substr(0, 4)) |
|
|
|
: "--", |
|
|
|
}; |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|