转办功能可以选择全部机关
This commit is contained in:
parent
b87671aa1e
commit
595111c613
|
|
@ -87,4 +87,15 @@ getStationByOrg
|
|||
})
|
||||
}
|
||||
|
||||
export function getOrgunits(orgNumber, orgLevel) {
|
||||
return request({
|
||||
url: '/tOrgunits/getAllOrgunits',
|
||||
method: 'post',
|
||||
params: {
|
||||
orgNumber,
|
||||
orgLevel
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -548,14 +548,19 @@
|
|||
<tr v-if="isAgreeRepair === '3'">
|
||||
<th><span style="color:red">*</span>转办机关</th>
|
||||
<td>
|
||||
<el-select v-model="transferOrg" clearable size="mini" placeholder="请选择" style="width:100%">
|
||||
<el-option
|
||||
v-for="item in orgList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-cascader
|
||||
v-model="transferOrg"
|
||||
:options="orgList"
|
||||
:props="{
|
||||
checkStrictly: true,
|
||||
value: 'value',
|
||||
label: 'label',
|
||||
emitPath: false
|
||||
}"
|
||||
placeholder="请选择转办机关"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="isAgreeRepair === '3'">
|
||||
|
|
@ -869,13 +874,12 @@ import HandleDialog from '@/components/HandleDialog'
|
|||
import { removeAttachementById, listAttachmentByBizseq } from '@/api/attachment'
|
||||
import { abnRemTransfer, bizRemoveNext, getBizRemInfo, removeBizRemListBySplistid, getBizRemoveRecordList, returnToApplyer, addrRemovCheck, checknb, getaicepsYbList, geteGtAlterRecoderList
|
||||
} from '@/api/abnormal'
|
||||
import { getUsersWithPermission, getStationByOrg } from '@/api/user'
|
||||
import {getUsersWithPermission, getStationByOrg, getOrgunits} from '@/api/user'
|
||||
import { getConstant, getCD72 } from '@/api/system'
|
||||
import { validBeforeUpload } from '@/api/fileUpload'
|
||||
import editor from '@/components/editor.vue'
|
||||
import { taskOpinion } from '@/api/task'
|
||||
import { getContentsWithBizseq, saveOrUpdateContent, getNewestOpinion } from '@/api/credit'
|
||||
import { nextRemTask } from '@/api/illegal'
|
||||
import { isMenHu } from '@/utils/utils'
|
||||
import { checkPyBlacklist } from '@/api/pyBlacklist'
|
||||
|
||||
|
|
@ -1138,14 +1142,11 @@ export default {
|
|||
this.getRepairDecContent()
|
||||
// 加载常用语
|
||||
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) {
|
||||
res.data.forEach(each => {
|
||||
console.log(each)
|
||||
this.orgList.push(each)
|
||||
})
|
||||
// 将扁平数据转换为树形结构以适应 cascader
|
||||
this.orgList = this.convertToTreeStructure(res.data)
|
||||
}
|
||||
})
|
||||
// 加载企业移出原因
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,14 +350,19 @@
|
|||
<tr v-if="isAgreeRepair === '3'">
|
||||
<th><span style="color:red">*</span>转办机关</th>
|
||||
<td>
|
||||
<el-select v-model="transferOrg" clearable size="mini" placeholder="请选择" style="width:100%">
|
||||
<el-option
|
||||
v-for="item in orgList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-cascader
|
||||
v-model="transferOrg"
|
||||
:options="orgList"
|
||||
:props="{
|
||||
checkStrictly: true,
|
||||
value: 'value',
|
||||
label: 'label',
|
||||
emitPath: false
|
||||
}"
|
||||
placeholder="请选择转办机关"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="isAgreeRepair === '3'">
|
||||
|
|
@ -613,7 +618,7 @@
|
|||
<script>
|
||||
import { removeAttachementById, listAttachmentByBizseq, uploadFile } from '@/api/attachment'
|
||||
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 { getContentsWithBizseq, saveOrUpdateContent, getNewestOpinion } from '@/api/credit'
|
||||
import editor from '@/components/editor.vue'
|
||||
|
|
@ -768,15 +773,12 @@ export default {
|
|||
this.tasklistid = this.$route.query.tasklistid
|
||||
this.getRepairDecContent()
|
||||
|
||||
console.log(this.user.orgCode)
|
||||
//加载转办机关下拉框选项
|
||||
getStationByOrg({'regorg' : this.user.orgCode}).then(res => {
|
||||
getOrgunits('15', 0).then(res => {
|
||||
if (res.code === 0) {
|
||||
res.data.forEach(each => {
|
||||
console.log(each)
|
||||
this.orgList.push(each)
|
||||
})
|
||||
}
|
||||
// 将扁平数据转换为树形结构以适应 cascader
|
||||
this.orgList = this.convertToTreeStructure(res.data)
|
||||
}
|
||||
})
|
||||
|
||||
// 加载严重违法主体
|
||||
|
|
@ -1495,6 +1497,34 @@ export default {
|
|||
// }})
|
||||
// window.open(href)
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue