转办功能可以选择全部机关
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'">
|
<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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue