|
@ -25,8 +25,7 @@ |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button type="text" size="small" class="custom-table-button-default" |
|
|
<el-button type="text" size="small" class="custom-table-button-default" |
|
|
@click="dialogVisible = true, selfObj = scope.row"> |
|
|
@click="dialogVisible = true, selfObj = scope.row"> |
|
|
{{ scope.row.sszt === '01' ? '分发' : '上报网格化平台' }} |
|
|
{{ scope.row.sszt === '01' || agencyFlag == 'district' ? '分发' : '上报网格化平台' }} |
|
|
|
|
|
|
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -36,8 +35,8 @@ |
|
|
@current-change="pageCurrentChangeHandle"> |
|
|
@current-change="pageCurrentChangeHandle"> |
|
|
</el-pagination> |
|
|
</el-pagination> |
|
|
|
|
|
|
|
|
<el-dialog :title="selfObj.sszt === '01' ? '分发' : '上报网格化平台'" v-if="dialogVisible" :visible.sync="dialogVisible" |
|
|
<el-dialog :title="selfObj.sszt === '01' ? '分发' : '上报网格化平台'" v-if="dialogVisible" |
|
|
width="50%"> |
|
|
:visible.sync="dialogVisible" width="50%"> |
|
|
<el-form :label-width="$i18n.locale === 'en-US' ? '100px' : '80px'"> |
|
|
<el-form :label-width="$i18n.locale === 'en-US' ? '100px' : '80px'"> |
|
|
<el-form-item label="所属机构:"> |
|
|
<el-form-item label="所属机构:"> |
|
|
<div>{{ selfObj.orgName }}</div> |
|
|
<div>{{ selfObj.orgName }}</div> |
|
@ -54,13 +53,24 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" :model="dataForm" :rules="dataRule" |
|
|
<el-form :inline="true" :model="dataForm" :rules="dataRule" |
|
|
:label-width="$i18n.locale === 'en-US' ? '100px' : '82px'" ref="dataForm" |
|
|
:label-width="$i18n.locale === 'en-US' ? '100px' : '82px'" ref="dataForm" |
|
|
v-if="selfObj.sszt === '01'"> |
|
|
v-if="selfObj.sszt === '01' && agencyFlag != 'district'"> |
|
|
<el-form-item label="所属机构:" prop="ids"> |
|
|
<el-form-item label="所属机构:" prop="ids"> |
|
|
<el-cascader v-model="dataForm.ids" :options="options" clearable style="width:250px;" |
|
|
<el-cascader v-model="dataForm.ids" :options="options" clearable style="width:250px;" |
|
|
:show-all-levels="false" @change="handelChangeCascader" ref="cascader" size="small"> |
|
|
@change="handelChangeCascader" :show-all-levels="false" ref="cascader" size="small"> |
|
|
</el-cascader> |
|
|
</el-cascader> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" :model="dataForm" :rules="dataRule" |
|
|
|
|
|
:label-width="$i18n.locale === 'en-US' ? '100px' : '82px'" ref="dataForm" |
|
|
|
|
|
v-if="agencyFlag == 'district'"> |
|
|
|
|
|
<el-form-item label="所属机构:" prop="ids"> |
|
|
|
|
|
<el-select v-model="dataForm.ids" clearable> |
|
|
|
|
|
<el-option v-for="item in streetList" :key="item.value" :label="item.label" |
|
|
|
|
|
:value="item.value"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button @click="dialogVisible = false, dataForm.ids = null">取 消</el-button> |
|
|
<el-button @click="dialogVisible = false, dataForm.ids = null">取 消</el-button> |
|
|
<el-button type="primary" @click="handleClickSave">确 定</el-button> |
|
|
<el-button type="primary" @click="handleClickSave">确 定</el-button> |
|
@ -93,7 +103,9 @@ export default { |
|
|
dataForm: { |
|
|
dataForm: { |
|
|
ids: [], |
|
|
ids: [], |
|
|
}, |
|
|
}, |
|
|
gridName: null |
|
|
gridName: null, |
|
|
|
|
|
streetList: [], |
|
|
|
|
|
agencyFlag: null |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
components: {}, |
|
|
components: {}, |
|
@ -106,13 +118,17 @@ export default { |
|
|
getOptions() { |
|
|
getOptions() { |
|
|
this.$http |
|
|
this.$http |
|
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
|
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
|
|
.then(({ data: res }) => { |
|
|
.then((res) => { |
|
|
if (res.code !== 0) { |
|
|
if (res.data.code !== 0) { |
|
|
return this.$message.error(res.msg) |
|
|
return this.$message.error(res.msg) |
|
|
} |
|
|
} |
|
|
this.options = res.data.options |
|
|
this.options = res.data.data.options; |
|
|
|
|
|
if (this.$store.state.user.deptId === '1175270520603930625' || this.$store.state.user.deptId === '0') { |
|
|
|
|
|
this.streetList = res.data.data.options.map(item => { return { label: item.label, value: item.value } }) |
|
|
|
|
|
this.agencyFlag = 'district' |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch((err) => { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handelChangeCascader() { |
|
|
handelChangeCascader() { |
|
@ -121,18 +137,24 @@ export default { |
|
|
// 表单提交 |
|
|
// 表单提交 |
|
|
handleClickSave: debounce( |
|
|
handleClickSave: debounce( |
|
|
function () { |
|
|
function () { |
|
|
|
|
|
if (this.selfObj.sszt === '01' || this.agencyFlag === 'district') { |
|
|
this.$refs['dataForm'].validate(valid => { |
|
|
this.$refs['dataForm'].validate(valid => { |
|
|
if (!valid && this.selfObj.sszt === '01') { |
|
|
if (!valid) { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
let url = this.selfObj.sszt === '01' ? '/events/item/changeHotLineToMSItem' : this.selfObj.sszt === '02' ? '/events/item/changeHotLineToFZItem' : '/events/item/changeHotLineToZFItem' |
|
|
let url = this.selfObj.sszt === '01' ? '/events/item/changeHotLineToMSItem' : '/events/item/changeHotlineToStreet' |
|
|
let parm = { |
|
|
let parm = { |
|
|
id: this.selfObj.id |
|
|
id: this.selfObj.id |
|
|
} |
|
|
} |
|
|
if (this.selfObj.sszt === '01') { |
|
|
if (this.selfObj.sszt === '01') { |
|
|
parm.gridId = this.dataForm.ids[this.dataForm.ids.length - 1]; |
|
|
parm.gridId = this.dataForm.ids[this.dataForm.ids.length - 1] |
|
|
parm.gridName = this.gridName; |
|
|
parm.gridName = this.gridName; |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.agencyFlag === 'district') { |
|
|
|
|
|
url = '/events/item/changeHotlineToStreet' |
|
|
|
|
|
parm.streetId = this.dataForm.ids; |
|
|
|
|
|
delete parm.gridId |
|
|
|
|
|
} |
|
|
console.log(parm, url, 'see'); |
|
|
console.log(parm, url, 'see'); |
|
|
this.$http |
|
|
this.$http |
|
|
.post(url, parm) |
|
|
.post(url, parm) |
|
@ -151,6 +173,30 @@ export default { |
|
|
}) |
|
|
}) |
|
|
.catch(() => { }); |
|
|
.catch(() => { }); |
|
|
}); |
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.selfObj.sszt === '02' ? '/events/item/changeHotLineToFZItem' : '/events/item/changeHotLineToZFItem' |
|
|
|
|
|
let parm = { |
|
|
|
|
|
id: this.selfObj.id |
|
|
|
|
|
} |
|
|
|
|
|
console.log(parm, url, 'see'); |
|
|
|
|
|
this.$http |
|
|
|
|
|
.post(url, parm) |
|
|
|
|
|
.then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: this.$t('prompt.success'), |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
this.dialogVisible = false; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { }); |
|
|
|
|
|
} |
|
|
|
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
1000, |
|
|
1000, |
|
|
{ leading: true, trailing: false } |
|
|
{ leading: true, trailing: false } |
|
|