|
|
|
@ -5,16 +5,16 @@ |
|
|
|
<el-form :inline="true" :model="queryParams" ref="ref_search_form" label-width="80px"> |
|
|
|
<div class="form-group"> |
|
|
|
<el-form-item label="所属组织" prop="partyOrgId"> |
|
|
|
<el-cascader size="small" clearable |
|
|
|
:props="{ checkStrictly: true, multiple: false, value: 'id', label: 'partyOrgName' }" |
|
|
|
v-model="queryParams.partyOrgId" :options="root4SelectList" @change="handleChangePost"> |
|
|
|
<el-cascader :options="partyOrgTree" clearable size="small" class="u-item-width-normal" placeholder="请选择" |
|
|
|
v-model.trim="queryParams.partyOrgId" @change="handlePartyOrgCascadarChange" |
|
|
|
:props="partyOrgTreeCascadarProps"> |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="当前岗位" prop="postId"> |
|
|
|
<el-cascader size="small" clearable |
|
|
|
:props="{ checkStrictly: true, multiple: false, value: 'id', label: 'name' }" |
|
|
|
v-model="queryParams.partyPositionName" :options="root4SelectList1" @change="handleChangePost"> |
|
|
|
:props="{ checkStrictly: true, multiple: false, value: 'id', label: 'name' }" |
|
|
|
v-model="queryParams.partyPositionName" :options="root4SelectList1" @change="handleChangePost"> |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
@ -62,21 +62,21 @@ |
|
|
|
<el-table-column prop="partyOrgName" header-align="center" align="center" label="所属组织" /> |
|
|
|
<el-table-column prop="partyAttribute" header-align="center" align="center" label="党员性质" /> |
|
|
|
<el-table-column prop="name" header-align="center" align="center" label="姓名" /> |
|
|
|
<el-table-column prop="idNum" header-align="center" align="center" label="身份证" > |
|
|
|
<el-table-column prop="idNum" header-align="center" align="center" label="身份证"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
{{ row.idNum}} |
|
|
|
{{ row.idNum }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="mobile" header-align="center" align="center" label="手机"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
{{ row.mobile}} |
|
|
|
{{ row.mobile }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="partyPositionName" header-align="center" align="center" label="当前岗位" /> |
|
|
|
<el-table-column prop="workContent" header-align="center" align="center" label="工作内容" /> |
|
|
|
<el-table-column prop="workPhotoUrl" header-align="center" align="center" label="图片" width="80"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-image :src="row.workPhotoUrl" fit="fill" :preview-src-list="[row.workPhotoUrl]" |
|
|
|
<el-image v-if="row.workPhotoUrl" :src="row.workPhotoUrl[0]" fit="fill" :preview-src-list="row.workPhotoUrl" |
|
|
|
style="width: 50px; height: 50px;"> |
|
|
|
</el-image> |
|
|
|
</template> |
|
|
|
@ -121,7 +121,6 @@ export default { |
|
|
|
pageSize: 10, |
|
|
|
pageNo: 1, |
|
|
|
total: 0, |
|
|
|
organizeOptions: [], |
|
|
|
postOptions: [], |
|
|
|
timeRange: [], |
|
|
|
tableData: [], |
|
|
|
@ -131,34 +130,100 @@ export default { |
|
|
|
name: '', |
|
|
|
idNum: '', |
|
|
|
mobile: '', |
|
|
|
workStartTime: '', |
|
|
|
workEndTime: '', |
|
|
|
workStartTime: null, |
|
|
|
workEndTime: null, |
|
|
|
}, |
|
|
|
selection: [], |
|
|
|
dialogVisible: false, |
|
|
|
dialogTitle: '', |
|
|
|
root4SelectList: [], |
|
|
|
root4SelectList1: [], |
|
|
|
partyOrgTree: [], // 党组织树数据源 |
|
|
|
partyOrgTreeCascadarProps: { |
|
|
|
lazy: true, |
|
|
|
lazyLoad: function (node, resolve) { |
|
|
|
this.handleNextOrgTreeClick(node, resolve) |
|
|
|
}.bind(this), |
|
|
|
value: 'id', |
|
|
|
label: 'partyOrgName', |
|
|
|
checkStrictly: true, |
|
|
|
multiple: false |
|
|
|
}, |
|
|
|
epmetResultResolver: null // 接口结果解析器 |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getOptions(); |
|
|
|
this.epmetResultResolver = { |
|
|
|
success: function (callback) { |
|
|
|
this.successCallback = callback; |
|
|
|
return this; |
|
|
|
}, |
|
|
|
parse: function (rst) { |
|
|
|
if (rst.code === 0) { |
|
|
|
this.successCallback(rst.data); |
|
|
|
} else { |
|
|
|
this.$message.error(rst.msg || "操作失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
this.epmetResultResolver.$message = this.$message; |
|
|
|
this.communityActivityList(); |
|
|
|
this.treeRoot4Select() |
|
|
|
// this.treeRoot4Select() |
|
|
|
this.treeRoot4Select1() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async treeRoot4Select(){ |
|
|
|
const url = "/actual/base/party/org/listPartyOrgTreeRoot4Select"; |
|
|
|
let params = {}; |
|
|
|
let { data, code, msg } = await requestGet(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.root4SelectList = data |
|
|
|
// 替换:加载党组织树根节点 |
|
|
|
async loadPartyOrgOptions(depth) { |
|
|
|
var url = '/actual/base/party/org/listPartyOrgTreeRoot4Select'; |
|
|
|
var rst = await requestGet(url, { |
|
|
|
"depth": depth || undefined |
|
|
|
}); |
|
|
|
|
|
|
|
this.epmetResultResolver.success(function (data) { |
|
|
|
this.partyOrgTree.length = 0; |
|
|
|
this.partyOrgTree.push(data); |
|
|
|
}.bind(this)).parse(rst); |
|
|
|
}, |
|
|
|
|
|
|
|
// 替换:党组织树懒加载下一级节点 |
|
|
|
async handleNextOrgTreeClick(node, resolve) { |
|
|
|
if (node.level === 0) { |
|
|
|
resolve(null); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var url = '/actual/base/party/org/listNextLevelPartyOrgTreeNodesByPid'; |
|
|
|
var rst = await requestGet(url, { |
|
|
|
partyOrgPid: node.data.id |
|
|
|
}); |
|
|
|
|
|
|
|
this.epmetResultResolver.success(function (data) { |
|
|
|
node.children.length = 0; |
|
|
|
resolve(data); |
|
|
|
}.bind(this)).parse(rst); |
|
|
|
}, |
|
|
|
|
|
|
|
// 替换:党组织级联选择器变更事件 |
|
|
|
handlePartyOrgCascadarChange(selectedNode) { |
|
|
|
if (selectedNode && selectedNode.length > 0) { |
|
|
|
this.queryParams.partyOrgId = selectedNode[selectedNode.length - 1]; |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
this.queryParams.partyOrgId = ''; |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
async treeRoot4Select1(){ |
|
|
|
// async treeRoot4Select(){ |
|
|
|
// const url = "/actual/base/party/org/listPartyOrgTreeRoot4Select"; |
|
|
|
// let params = {}; |
|
|
|
// let { data, code, msg } = await requestGet(url, params); |
|
|
|
// if (code === 0) { |
|
|
|
// this.root4SelectList = data |
|
|
|
// } else { |
|
|
|
// this.$message.error(msg) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
async treeRoot4Select1() { |
|
|
|
const url = "/actual/base/partyPosition/positions"; |
|
|
|
let params = {}; |
|
|
|
let { data, code, msg } = await requestGet(url, params); |
|
|
|
@ -173,89 +238,47 @@ export default { |
|
|
|
let params = { |
|
|
|
pageSize: this.pageSize, |
|
|
|
pageNo: this.pageNo, |
|
|
|
...this.formData, |
|
|
|
...this.queryParams, |
|
|
|
}; |
|
|
|
let { data, code, msg } = await requestGet(url, params); |
|
|
|
if (code === 0) { |
|
|
|
console.log(data,"++++++++++this.data") |
|
|
|
console.log(data, "++++++++++this.data") |
|
|
|
this.total = data.total |
|
|
|
this.tableData = data.list |
|
|
|
console.log(this.tableData,"++++++++++this.tableData") |
|
|
|
this.tableData = data.list.map(item => { |
|
|
|
if (item.workPhotoUrl !== "" && item.workPhotoUrl !== null && item.workPhotoUrl !== '[]') { |
|
|
|
item.workPhotoUrl = this.isValidJSON(item.workPhotoUrl) ? JSON.parse(item.workPhotoUrl).map(item => item.ossUrl) : [item.workPhotoUrl] |
|
|
|
} else { |
|
|
|
item.workPhotoUrl = null |
|
|
|
} |
|
|
|
return item |
|
|
|
}) |
|
|
|
console.log(this.tableData, "++++++++++this.tableData") |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取所属组织 |
|
|
|
async getOptions() { |
|
|
|
const { data } = await requestPost("/gov/org/customeragency/orgtree", {}); |
|
|
|
this.organizeOptions = data ? [this.computeOption(data)] : [] |
|
|
|
const { data: data2 } = await requestGet('/actual/base/partyPosition/page', { |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1000 |
|
|
|
}) |
|
|
|
this.postOptions = data2 ? data2.list : [] |
|
|
|
console.log('this.postOptions==', this.postOptions) |
|
|
|
}, |
|
|
|
// 格式化数据 |
|
|
|
computeOption(opt) { |
|
|
|
return { |
|
|
|
label: opt.agencyName, |
|
|
|
value: opt.agencyId, |
|
|
|
type: "agency", |
|
|
|
children: [ |
|
|
|
...this.processDepartmentList(opt.departmentList), |
|
|
|
...this.processGridList(opt.gridList), |
|
|
|
...this.processSubAgencyList(opt.subAgencyList), |
|
|
|
], |
|
|
|
}; |
|
|
|
}, |
|
|
|
// 处理部门列表 |
|
|
|
processDepartmentList(departmentList) { |
|
|
|
return (departmentList || []).map((item) => ({ |
|
|
|
label: item.deptName, |
|
|
|
value: item.deptId, |
|
|
|
type: "dept", |
|
|
|
typeName: "部门", |
|
|
|
})) |
|
|
|
}, |
|
|
|
// 处理网格列表 |
|
|
|
processGridList(gridList) { |
|
|
|
return (gridList || []).map((item) => ({ |
|
|
|
label: item.gridName, |
|
|
|
value: item.gridId, |
|
|
|
type: "grid", |
|
|
|
typeName: "网格", |
|
|
|
})) |
|
|
|
}, |
|
|
|
// 处理子机构列表 |
|
|
|
processSubAgencyList(subAgencyList) { |
|
|
|
return (subAgencyList || []).map((item) => this.computeOption(item)) |
|
|
|
}, |
|
|
|
// 选择所属组织 |
|
|
|
handleChangeOrg(value) { |
|
|
|
console.log('value==', value) |
|
|
|
this.queryParams.orgId = value[value.length - 1] |
|
|
|
isValidJSON(str) { |
|
|
|
if (typeof str !== 'string') { |
|
|
|
return false |
|
|
|
} |
|
|
|
try { |
|
|
|
JSON.parse(str) |
|
|
|
return true |
|
|
|
} catch (e) { |
|
|
|
return false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 选择岗位 |
|
|
|
handleChangePost(value) { |
|
|
|
this.queryParams.postId = value[value.length - 1] |
|
|
|
}, |
|
|
|
|
|
|
|
// 搜索 |
|
|
|
handleSearch() { |
|
|
|
this.pageNo = 1; |
|
|
|
if(this.timeRange){ |
|
|
|
if(this.timeRange.length==2){ |
|
|
|
this.formData.workStartTime = this.timeRange[0] |
|
|
|
this.formData.workEndTime = this.timeRange[1] |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.formData.workStartTime = '' |
|
|
|
this.formData.workEndTime = '' |
|
|
|
} |
|
|
|
this.queryParams.workStartTime = this.timeRange && this.timeRange[0] || null |
|
|
|
this.queryParams.workEndTime = this.timeRange && this.timeRange[1] || null |
|
|
|
this.communityActivityList(); |
|
|
|
console.log('this.queryParams==', this.queryParams) |
|
|
|
}, |
|
|
|
|
|
|
|
handleSizeChange(val) { |
|
|
|
@ -277,16 +300,16 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 多选 |
|
|
|
selectionChange (selection) { |
|
|
|
selectionChange(selection) { |
|
|
|
this.selection = selection |
|
|
|
}, |
|
|
|
|
|
|
|
// 查看 |
|
|
|
async handleDetail(row) { |
|
|
|
const url = "/actual/base/workRecord/"+row.id; |
|
|
|
const url = "/actual/base/workRecord/" + row.id; |
|
|
|
let { data, code, msg } = await requestGet(url, {}); |
|
|
|
if (code === 0) { |
|
|
|
console.log(data,"++++++++++++++data") |
|
|
|
console.log(data, "++++++++++++++data") |
|
|
|
this.dialogVisible = true |
|
|
|
this.dialogTitle = '详情' |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -304,7 +327,7 @@ export default { |
|
|
|
method: 'GET', |
|
|
|
url, |
|
|
|
responseType: 'blob', |
|
|
|
params: this.formData |
|
|
|
params: this.queryParams |
|
|
|
}).then(res => { |
|
|
|
// this.download(res.data, title + '.xls') |
|
|
|
if (res.headers["content-disposition"]) { |
|
|
|
|