|
|
@ -225,7 +225,8 @@ |
|
|
|
<el-table v-show="gridStaffTableFlag" |
|
|
|
:data="gridStaffTableListData" |
|
|
|
style="width: 100%" |
|
|
|
height="350"> |
|
|
|
height="350" |
|
|
|
> |
|
|
|
<el-table-column prop="name" |
|
|
|
label="网格工作人员名字" |
|
|
|
width="260"></el-table-column> |
|
|
@ -245,10 +246,19 @@ |
|
|
|
class-name="small-padding fixed-width"> |
|
|
|
<template slot="header" |
|
|
|
slot-scope="scope"> |
|
|
|
<el-button size="mini" |
|
|
|
<!-- <el-button size="mini" |
|
|
|
type="primary" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="addGridPeo(scope.row)">新增</el-button> |
|
|
|
@click="addGridPeo(scope.row)">新增</el-button> --> |
|
|
|
<el-dropdown @command="handleCommand"> |
|
|
|
<el-button type="primary" > |
|
|
|
新增 <i class="el-icon-arrow-down el-icon--right"></i> |
|
|
|
</el-button> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item command="newAdd" >新添加</el-dropdown-item> |
|
|
|
<el-dropdown-item command="fromOrg">从组织添加</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button size="mini" |
|
|
@ -488,7 +498,37 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="dialogVisiblePeoAgency"> |
|
|
|
<el-dialog title="新增人员ccccc" |
|
|
|
:visible.sync="dialogVisiblePeoAgency" |
|
|
|
width="850" |
|
|
|
> |
|
|
|
<el-form :model="peoFormAgency" |
|
|
|
label-width="120px" |
|
|
|
ref="addPeoAgencyForm" |
|
|
|
:rules="rulesAgencyPeo"> |
|
|
|
<el-form-item label="工作人员" prop="selectedList"> |
|
|
|
<el-select v-model="peoFormAgency.selectedList" |
|
|
|
multiple |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option v-for="item in agencyStaffTableListData" |
|
|
|
:key="item.staffId" |
|
|
|
:value="item.staffId" |
|
|
|
:label="item.name" |
|
|
|
> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer"> |
|
|
|
<el-button @click="cancelPeoAgency">取 消</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
@click="submitPeoAgency">确 定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
<!-- 人员修改 --> |
|
|
|
<el-dialog v-if="modifyPeo" |
|
|
|
title="人员修改" |
|
|
@ -1293,7 +1333,16 @@ export default { |
|
|
|
label: 'agencyName', |
|
|
|
children: 'subAgencyList', |
|
|
|
checkStrictly: true |
|
|
|
} |
|
|
|
}, |
|
|
|
dialogVisiblePeoAgency:false,//通过组织添加 |
|
|
|
peoFormAgency:{ |
|
|
|
gridId:"", |
|
|
|
selectedList:[] |
|
|
|
}, |
|
|
|
rulesAgencyPeo:{ |
|
|
|
selectedList:[{required:true,message:"请选择人员",trigger:"blur"}] |
|
|
|
}, |
|
|
|
tableKey:"" |
|
|
|
}; |
|
|
|
}, |
|
|
|
created () { |
|
|
@ -1761,6 +1810,9 @@ export default { |
|
|
|
disableFlag: "", |
|
|
|
newRoles: [], |
|
|
|
}; |
|
|
|
this.peoFormAgency = { |
|
|
|
selectedList:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
// 网格新增弹框重置函数 |
|
|
|
GridFormRest () { |
|
|
@ -1978,11 +2030,16 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增网格人员 |
|
|
|
async addGridPeo () { |
|
|
|
async addGridPeo (command) { |
|
|
|
if (command === 'newAdd') { |
|
|
|
this.dialogVisiblePeo = true; |
|
|
|
this.peoForm.orgType = "grid"; |
|
|
|
} else if (command === 'fromOrg') { |
|
|
|
await this.getAgencyStaffListData() |
|
|
|
console.log(this.agencyStaffTableListData); |
|
|
|
this.peoForm.orgType = "grid"; |
|
|
|
this.dialogVisiblePeoAgency = true; |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 修改网格人员 |
|
|
|
async xiuGridPeo (row) { |
|
|
@ -2625,7 +2682,6 @@ export default { |
|
|
|
// 根据id获取网格详情 |
|
|
|
async getGridDetailsById () { |
|
|
|
const url = "/gov/org/grid/griddetail"; |
|
|
|
|
|
|
|
let params = { |
|
|
|
gridId: this.judgeOrgInfoLevel.id, |
|
|
|
}; |
|
|
@ -2816,6 +2872,37 @@ export default { |
|
|
|
this.longitude = lonlat[0]; |
|
|
|
// this.formData.address = selPosition.address + selPosition.name; |
|
|
|
}, |
|
|
|
|
|
|
|
handleCommand(command) { |
|
|
|
this.addGridPeo(command); |
|
|
|
}, |
|
|
|
cancelPeoAgency(){ |
|
|
|
this.dialogVisiblePeoAgency = false |
|
|
|
this.peoFormAgency.selectedList = []; // 清空选择的工作人员 |
|
|
|
}, |
|
|
|
submitPeoAgency(){ |
|
|
|
this.$refs["addPeoAgencyForm"].validate((valid, err) => { |
|
|
|
if (valid) { |
|
|
|
this.submitPeoAgencyDo(); |
|
|
|
} else { |
|
|
|
app.util.validateRule(err); |
|
|
|
return console.log("error submit!!", valid, err); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
async submitPeoAgencyDo(){ |
|
|
|
let url = "/gov/org/grid/addgridstaffs" |
|
|
|
this.peoFormAgency.gridId = this.currentGridOrgId |
|
|
|
const {data,code,msg} = await requestPost(url,this.peoFormAgency) |
|
|
|
if(code == 0){ |
|
|
|
this.$message.success('添加成功') |
|
|
|
this.dialogVisiblePeoAgency = false |
|
|
|
this.getGridStaffListData(); |
|
|
|
this.peoFormAgency.selectedList = [] |
|
|
|
} else{ |
|
|
|
this.$message.err(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|