转办功能可以选择全部机关

This commit is contained in:
zhouxy 2026-01-28 16:54:56 +08:00
parent b87671aa1e
commit 595111c613
3 changed files with 102 additions and 32 deletions

View File

@ -87,4 +87,15 @@ getStationByOrg
}) })
} }
export function getOrgunits(orgNumber, orgLevel) {
return request({
url: '/tOrgunits/getAllOrgunits',
method: 'post',
params: {
orgNumber,
orgLevel
}
})
}

View File

@ -548,14 +548,19 @@
<tr v-if="isAgreeRepair === '3'"> <tr v-if="isAgreeRepair === '3'">
<th><span style="color:red">*</span>转办机关</th> <th><span style="color:red">*</span>转办机关</th>
<td> <td>
<el-select v-model="transferOrg" clearable size="mini" placeholder="请选择" style="width:100%"> <el-cascader
<el-option v-model="transferOrg"
v-for="item in orgList" :options="orgList"
:key="item.value" :props="{
:label="item.label" checkStrictly: true,
:value="item.value" value: 'value',
label: 'label',
emitPath: false
}"
placeholder="请选择转办机关"
clearable
style="width: 100%"
/> />
</el-select>
</td> </td>
</tr> </tr>
<tr v-if="isAgreeRepair === '3'"> <tr v-if="isAgreeRepair === '3'">
@ -869,13 +874,12 @@ import HandleDialog from '@/components/HandleDialog'
import { removeAttachementById, listAttachmentByBizseq } from '@/api/attachment' import { removeAttachementById, listAttachmentByBizseq } from '@/api/attachment'
import { abnRemTransfer, bizRemoveNext, getBizRemInfo, removeBizRemListBySplistid, getBizRemoveRecordList, returnToApplyer, addrRemovCheck, checknb, getaicepsYbList, geteGtAlterRecoderList import { abnRemTransfer, bizRemoveNext, getBizRemInfo, removeBizRemListBySplistid, getBizRemoveRecordList, returnToApplyer, addrRemovCheck, checknb, getaicepsYbList, geteGtAlterRecoderList
} from '@/api/abnormal' } from '@/api/abnormal'
import { getUsersWithPermission, getStationByOrg } from '@/api/user' import {getUsersWithPermission, getStationByOrg, getOrgunits} from '@/api/user'
import { getConstant, getCD72 } from '@/api/system' import { getConstant, getCD72 } from '@/api/system'
import { validBeforeUpload } from '@/api/fileUpload' import { validBeforeUpload } from '@/api/fileUpload'
import editor from '@/components/editor.vue' import editor from '@/components/editor.vue'
import { taskOpinion } from '@/api/task' import { taskOpinion } from '@/api/task'
import { getContentsWithBizseq, saveOrUpdateContent, getNewestOpinion } from '@/api/credit' import { getContentsWithBizseq, saveOrUpdateContent, getNewestOpinion } from '@/api/credit'
import { nextRemTask } from '@/api/illegal'
import { isMenHu } from '@/utils/utils' import { isMenHu } from '@/utils/utils'
import { checkPyBlacklist } from '@/api/pyBlacklist' import { checkPyBlacklist } from '@/api/pyBlacklist'
@ -1138,14 +1142,11 @@ export default {
this.getRepairDecContent() this.getRepairDecContent()
// //
this.opinionOptions = this.$util.getCommonWords(this.user.primaryKey) this.opinionOptions = this.$util.getCommonWords(this.user.primaryKey)
console.log(this.user.orgCode)
// //
getStationByOrg({ 'regorg': this.user.orgCode }).then(res => { getOrgunits('15', 0).then(res => {
if (res.code === 0) { if (res.code === 0) {
res.data.forEach(each => { // cascader
console.log(each) this.orgList = this.convertToTreeStructure(res.data)
this.orgList.push(each)
})
} }
}) })
// //
@ -2203,6 +2204,34 @@ export default {
} }
}) })
} }
},
convertToTreeStructure(data) {
// 使
//
if (data && data.length > 0 && data[0].hasOwnProperty('children')) {
return data //
} else {
//
// parentCode code
const map = {}
const roots = []
//
data.forEach(item => {
map[item.value] = { ...item, children: [] }
})
//
data.forEach(item => {
if (item.parentValue && map[item.parentValue]) {
map[item.parentValue].children.push(map[item.value])
} else {
roots.push(map[item.value])
}
})
return roots
}
} }
} }
} }

View File

@ -350,14 +350,19 @@
<tr v-if="isAgreeRepair === '3'"> <tr v-if="isAgreeRepair === '3'">
<th><span style="color:red">*</span>转办机关</th> <th><span style="color:red">*</span>转办机关</th>
<td> <td>
<el-select v-model="transferOrg" clearable size="mini" placeholder="请选择" style="width:100%"> <el-cascader
<el-option v-model="transferOrg"
v-for="item in orgList" :options="orgList"
:key="item.value" :props="{
:label="item.label" checkStrictly: true,
:value="item.value" value: 'value',
label: 'label',
emitPath: false
}"
placeholder="请选择转办机关"
clearable
style="width: 100%"
/> />
</el-select>
</td> </td>
</tr> </tr>
<tr v-if="isAgreeRepair === '3'"> <tr v-if="isAgreeRepair === '3'">
@ -613,7 +618,7 @@
<script> <script>
import { removeAttachementById, listAttachmentByBizseq, uploadFile } from '@/api/attachment' import { removeAttachementById, listAttachmentByBizseq, uploadFile } from '@/api/attachment'
import { illRemTransfer, nextRemTask, listIllegalRem, returnToApplyer } from '@/api/illegal' import { illRemTransfer, nextRemTask, listIllegalRem, returnToApplyer } from '@/api/illegal'
import { getUsersWithPermission, getStationByOrg } from '@/api/user' import {getUsersWithPermission, getStationByOrg, getOrgunits} from '@/api/user'
import { taskOpinion } from '@/api/task' import { taskOpinion } from '@/api/task'
import { getContentsWithBizseq, saveOrUpdateContent, getNewestOpinion } from '@/api/credit' import { getContentsWithBizseq, saveOrUpdateContent, getNewestOpinion } from '@/api/credit'
import editor from '@/components/editor.vue' import editor from '@/components/editor.vue'
@ -768,14 +773,11 @@ export default {
this.tasklistid = this.$route.query.tasklistid this.tasklistid = this.$route.query.tasklistid
this.getRepairDecContent() this.getRepairDecContent()
console.log(this.user.orgCode)
// //
getStationByOrg({'regorg' : this.user.orgCode}).then(res => { getOrgunits('15', 0).then(res => {
if (res.code === 0) { if (res.code === 0) {
res.data.forEach(each => { // cascader
console.log(each) this.orgList = this.convertToTreeStructure(res.data)
this.orgList.push(each)
})
} }
}) })
@ -1495,6 +1497,34 @@ export default {
// }}) // }})
// window.open(href) // window.open(href)
window.open(process.env.NODE_ENV === '"development"' ? `/${name}` : `/crss/${name}`) window.open(process.env.NODE_ENV === '"development"' ? `/${name}` : `/crss/${name}`)
},
convertToTreeStructure(data) {
// 使
//
if (data && data.length > 0 && data[0].hasOwnProperty('children')) {
return data //
} else {
//
// parentCode code
const map = {}
const roots = []
//
data.forEach(item => {
map[item.value] = { ...item, children: [] }
})
//
data.forEach(item => {
if (item.parentValue && map[item.parentValue]) {
map[item.parentValue].children.push(map[item.value])
} else {
roots.push(map[item.value])
}
})
return roots
}
} }
} }
} }