|
@ -8,9 +8,9 @@ |
|
|
:label-width="'80px'"> |
|
|
:label-width="'80px'"> |
|
|
<div> |
|
|
<div> |
|
|
|
|
|
|
|
|
<el-form-item label="所属网格" |
|
|
<el-form-item label="所属组织" |
|
|
prop="gridId"> |
|
|
prop="gridId"> |
|
|
<el-select class="item_width_1" |
|
|
<!-- <el-select class="item_width_1" |
|
|
v-model="formData.gridId" |
|
|
v-model="formData.gridId" |
|
|
placeholder="全部" |
|
|
placeholder="全部" |
|
|
size="small" |
|
|
size="small" |
|
@ -20,7 +20,15 @@ |
|
|
:label="item.label" |
|
|
:label="item.label" |
|
|
:value="item.value"> |
|
|
:value="item.value"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> --> |
|
|
|
|
|
|
|
|
|
|
|
<el-cascader class="customer_cascader" |
|
|
|
|
|
ref="myCascader" |
|
|
|
|
|
v-model="agencyIdArray" |
|
|
|
|
|
:options="orgOptions" |
|
|
|
|
|
:props="orgOptionProps" |
|
|
|
|
|
:show-all-levels="false" |
|
|
|
|
|
@change="handleChangeAgency"></el-cascader> |
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="上报渠道" |
|
|
<el-form-item label="上报渠道" |
|
@ -161,6 +169,7 @@ |
|
|
|
|
|
|
|
|
<el-table :data="tableData" |
|
|
<el-table :data="tableData" |
|
|
border |
|
|
border |
|
|
|
|
|
v-loading="tableLoading" |
|
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|
|
class="table" |
|
|
class="table" |
|
|
style="width: 100%" |
|
|
style="width: 100%" |
|
@ -407,10 +416,20 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
|
|
|
tableLoading: false, |
|
|
pageType: "list", // 列表list 新增add 处理dispose 详情info |
|
|
pageType: "list", // 列表list 新增add 处理dispose 详情info |
|
|
user: {}, |
|
|
user: {}, |
|
|
agencyId: '', |
|
|
agencyId: '', |
|
|
gridList: [],//所属网格list--场所区域 |
|
|
gridList: [],//所属网格list--场所区域 |
|
|
|
|
|
agencyIdArray: [], |
|
|
|
|
|
orgOptions: [], |
|
|
|
|
|
orgOptionProps: { |
|
|
|
|
|
multiple: false, |
|
|
|
|
|
value: 'agencyId', |
|
|
|
|
|
label: 'agencyName', |
|
|
|
|
|
children: 'subAgencyList', |
|
|
|
|
|
checkStrictly: true |
|
|
|
|
|
}, |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
|
|
|
|
|
|
statusArray: [ |
|
|
statusArray: [ |
|
@ -448,6 +467,7 @@ export default { |
|
|
|
|
|
|
|
|
formData: { |
|
|
formData: { |
|
|
gridId: '', |
|
|
gridId: '', |
|
|
|
|
|
agencyId: '', |
|
|
sourceType: '', |
|
|
sourceType: '', |
|
|
eventContent: '', |
|
|
eventContent: '', |
|
|
name: '', |
|
|
name: '', |
|
@ -503,11 +523,30 @@ export default { |
|
|
this.user = this.$store.state.user |
|
|
this.user = this.$store.state.user |
|
|
|
|
|
|
|
|
this.agencyId = this.user.agencyId |
|
|
this.agencyId = this.user.agencyId |
|
|
this.loadGrid(); |
|
|
this.getOrgTreeList(); |
|
|
this.getTableData(); |
|
|
this.getTableData(); |
|
|
this.getCateOptions() |
|
|
this.getCateOptions() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
handleChangeAgency (val) { |
|
|
|
|
|
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|
|
|
|
|
if (obj) { |
|
|
|
|
|
if (obj.level === 'grid') { |
|
|
|
|
|
this.formData.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|
|
|
|
|
this.formData.agencyId = '' |
|
|
|
|
|
} else { |
|
|
|
|
|
this.formData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|
|
|
|
|
this.formData.gridId = '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.formData.agencyId = '' |
|
|
|
|
|
this.formData.gridId = '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
handleEventType (val) { |
|
|
handleEventType (val) { |
|
|
// console.log('val-----eee', val) |
|
|
// console.log('val-----eee', val) |
|
|
console.log('nodes---', this.$refs.cascaderEvent.getCheckedNodes()) |
|
|
console.log('nodes---', this.$refs.cascaderEvent.getCheckedNodes()) |
|
@ -579,23 +618,22 @@ export default { |
|
|
this.getTableData(); |
|
|
this.getTableData(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async loadGrid () { |
|
|
getOrgTreeList () { |
|
|
const url = "/gov/org/customergrid/gridoption" |
|
|
const { user } = this.$store.state |
|
|
|
|
|
this.$http |
|
|
let params = { |
|
|
.post('/gov/org/customeragency/agencygridtree', {}) |
|
|
agencyId: this.agencyId, |
|
|
.then(({ data: res }) => { |
|
|
purpose: "query" |
|
|
if (res.code !== 0) { |
|
|
} |
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} else { |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
console.log('获取组织树成功', res.data) |
|
|
|
|
|
this.orgOptions = [] |
|
|
if (code === 0) { |
|
|
this.orgOptions.push(res.data) |
|
|
this.gridList = data |
|
|
} |
|
|
|
|
|
}) |
|
|
} else { |
|
|
.catch(() => { |
|
|
this.$message.error(msg) |
|
|
return this.$message.error('网络错误') |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async handleExport () { |
|
|
async handleExport () { |
|
@ -727,6 +765,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async getTableData () { |
|
|
async getTableData () { |
|
|
|
|
|
this.tableLoading = true |
|
|
const url = "/gov/project/icEvent/list"; |
|
|
const url = "/gov/project/icEvent/list"; |
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list"; |
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list"; |
|
|
const { pageSize, pageNo, formData } = this; |
|
|
const { pageSize, pageNo, formData } = this; |
|
@ -735,6 +774,8 @@ export default { |
|
|
pageNo, |
|
|
pageNo, |
|
|
...formData, |
|
|
...formData, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.tableLoading = false |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
|
|
|
|
|
|
this.total = data.total || 0; |
|
|
this.total = data.total || 0; |
|
@ -791,7 +832,9 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
resetSearch () { |
|
|
resetSearch () { |
|
|
|
|
|
this.agencyIdArray = [] |
|
|
this.formData = { |
|
|
this.formData = { |
|
|
|
|
|
agencyId: '', |
|
|
gridId: '', |
|
|
gridId: '', |
|
|
sourceType: '', |
|
|
sourceType: '', |
|
|
eventContent: '', |
|
|
eventContent: '', |
|
|