This commit is contained in:
zhenghl 2026-01-06 15:46:50 +08:00
commit 8b022dcadb
12 changed files with 191 additions and 36 deletions

View File

@ -236,7 +236,7 @@ export function isTaskCreater(params) {
export function xrBaseCodeList(data) {
return request({
useResponseData: true,
url: '/xrBaseCode/list',
url: '/constant/list',
method: 'post',
data
}).then((data) => {
@ -253,7 +253,7 @@ export function xrBaseCodeList(data) {
export function xrAttachmentDelLawFile(params) {
return request({
useResponseData: true,
url: '/xrAttachment/delLawFile',
url: '/attachment/delLawFile',
method: 'post',
params
})
@ -262,7 +262,7 @@ export function xrAttachmentDelLawFile(params) {
export function xrAttachmentListByBizSepNo(data) {
return request({
useResponseData: true,
url: '/xrAttachment/listByBizSepNo',
url: '/attachment/listByBizSepNo',
method: 'post',
data
})

View File

@ -2,6 +2,7 @@ import request from '@/utils/request'
export function findNextSequenceFlowList(params) {
return request({
useResponseData: true,
url: '/xrActivity/findNextSequenceFlowList',
method: 'get',
params
@ -10,6 +11,7 @@ export function findNextSequenceFlowList(params) {
export function taskInfo(params) {
return request({
useResponseData: true,
url: '/xrTaskList/taskInfo',
method: 'get',
params
@ -23,6 +25,7 @@ export function taskInfo(params) {
*/
export function getEBaseinfo(params) {
return request({
useResponseData: true,
url: '/baseinfo/getEBaseinfo',
method: 'get',
params
@ -36,6 +39,7 @@ export function getEBaseinfo(params) {
*/
export function baseinfoList(data) {
return request({
useResponseData: true,
url: '/baseinfo/baseinfoList',
method: 'post',
data
@ -44,6 +48,7 @@ export function baseinfoList(data) {
export function marketEntities(data) {
return request({
useResponseData: true,
url: '/xr-claim/marketEntities',
method: 'post',
data
@ -51,6 +56,7 @@ export function marketEntities(data) {
}
export function fetchAicorgUrl(params) {
return request({
useResponseData: true,
url: '/user/fetchAicorgUrl',
method: 'post',
params
@ -59,6 +65,7 @@ export function fetchAicorgUrl(params) {
export function isTaskCreater(params) {
return request({
useResponseData: true,
url: '/xrTaskList/isTaskCreater',
method: 'get',
params
@ -67,6 +74,7 @@ export function isTaskCreater(params) {
export function findCurrentNode(params) {
return request({
useResponseData: true,
url: '/xrActivity/findCurrentNode',
method: 'get',
params
@ -79,6 +87,7 @@ export function findCurrentNode(params) {
*/
export function listBaseinfo(data) {
return request({
useResponseData: true,
url: '/baseinfo/list',
method: 'post',
data
@ -91,6 +100,7 @@ export function listBaseinfo(data) {
*/
export function superviseDeptEBaseinfoList(data) {
return request({
useResponseData: true,
url: '/xr-supervisor/superviseDeptEBaseinfoList',
method: 'post',
data
@ -104,6 +114,7 @@ export function superviseDeptEBaseinfoList(data) {
*/
export function getTOrgunitsByOrgnumber(params) {
return request({
useResponseData: true,
url: '/tOrgunits/getTOrgunitsByOrgnumber',
method: 'get',
params
@ -112,6 +123,7 @@ export function getTOrgunitsByOrgnumber(params) {
export function getEntTSAbnListPage(data) {
return request({
useResponseData: true,
url: '/baseinfo/getEntTSAbnListPage',
method: 'post',
data
@ -120,6 +132,7 @@ export function getEntTSAbnListPage(data) {
export function getEntIllegalPage(data) {
return request({
useResponseData: true,
url: '/baseinfo/getEntIllegalPage',
method: 'post',
data

View File

@ -49,6 +49,7 @@ Vue.prototype.$moment = moment
// 工具类
Vue.prototype.$util = util
Vue.prototype.$utils = utils
Vue.prototype.console = console
Vue.component('paper-swiper', () => import ('@/components/PaperSwiper'))
Vue.component('paper', () => import ('@/components/Paper'))
Vue.component('CommonTitle', () => import ('@/components/CommonTitle'))

View File

@ -0,0 +1,75 @@
export function scanObj(obj, handler) {
for (const key in obj) {
if (
typeof obj[key] === 'object' &&
obj[key] !== null &&
!Array.isArray(obj[key])
) {
scanObj(obj[key], handler)
} else {
handler(obj, key)
}
}
}
export function filterObj(obj, fn, clone = true) {
if (clone) {
obj = JSON.parse(JSON.stringify(obj))
}
scanObj(obj, (currentObj, key) => {
if (!fn(currentObj[key])) {
delete currentObj[key]
}
})
return obj
}
export function resetObj(obj, fn, clone = false) {
if (clone) {
obj = JSON.parse(JSON.stringify(obj))
}
scanObj(obj, (currentObj, key) => {
const readyValue = (() => {
if (Array.isArray(currentObj[key])) {
return []
}
return undefined
})()
currentObj[key] = fn ? fn(currentObj, key, readyValue) : readyValue
})
return obj
}
export function scanObjArr(
objArr,
handler,
options = { children: 'children' },
parent
) {
for (const obj of objArr) {
handler(obj, objArr, parent)
if (Array.isArray(obj[options.children])) {
scanObjArr(obj[options.children], handler, options, obj, parent)
}
}
}
export function deepFindObjArr(
objArr,
handler,
options = { children: 'children' }
) {
let result
let lock = false
scanObjArr(
objArr,
(obj, objArr) => {
if (!lock && handler(obj, objArr)) {
lock = true
result = obj
}
},
options
)
return result
}

View File

@ -1,3 +1,4 @@
import { deepFindObjArr } from './object-helper'
import { ComponentConfig } from './globalConfig'
import { createPathObject } from './utils'
@ -14,16 +15,18 @@ export function getOptionsByBaseCode(baseCode) {
return OptionsMap[baseCode]
}
if (OptionsMap[baseCode] instanceof Promise) {
OptionsMap[baseCode].then((data) => {
if (Array.isArray(data)) {
OptionsMap[baseCode] = data
} else {
throw new Error('BaseOptionsLoader必须返回Array或Promise<Array>')
}
}).catch((e) => {
console.error(e)
delete OptionsMap[baseCode]
})
OptionsMap[baseCode]
.then((data) => {
if (Array.isArray(data)) {
OptionsMap[baseCode] = data
} else {
throw new Error('BaseOptionsLoader必须返回Array或Promise<Array>')
}
})
.catch((e) => {
console.error(e)
OptionsMap[baseCode] = []
})
return []
}
throw new Error('BaseOptionsLoader必须返回Array或Promise<Array>')
@ -39,10 +42,26 @@ export async function asyncGetOptionsByBaseCode(baseCode) {
return OptionsMap[baseCode]
}
export async function asyncGetOptionsLabelByBaseCode(baseCode, value) {
export async function asyncGetOptionsItemByBaseCode(baseCode, value, deepOption) {
return asyncGetOptionsByBaseCode(baseCode).then((arr) => {
return (arr.find((item) => {
return item.value === value
}) || {}).label
if (deepOption) {
return deepFindObjArr(arr, (item) => {
return item.value === value
}, typeof deepOption === 'object' ? deepOption : undefined)
} else {
return (
arr.find((item) => {
return item.value === value
}) || {}
)
}
})
}
export async function asyncGetOptionsLabelByBaseCode(baseCode, value, deepOption) {
return (await asyncGetOptionsItemByBaseCode(baseCode, value, deepOption))?.label
}
export function removeOptionsCache(baseCode) {
delete OptionsMap[baseCode]
}

View File

@ -1,3 +1,4 @@
import { Loading } from 'element-ui'
/**
* Created by PanJiaChen on 16/11/18.
*/
@ -131,3 +132,46 @@ export function resetObj(obj, defaultValue = {}) {
}
}
}
export const createGlobalLoading = (function() {
const handlersMap = {
default: []
}
let loading
return function(handler, scopeKey = 'default', cusLoading) {
if (!handlersMap[scopeKey]) {
handlersMap[scopeKey] = []
}
const handlers = handlersMap[scopeKey]
if (handlers.length === 0) {
if (cusLoading) {
if (typeof cusLoading.start === 'function') {
cusLoading.start()
}
} else {
loading = Loading.service({
lock: true,
text: '请稍后',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
}
}
const id = (new Date()).valueOf()
handlers.push(id)
return (async() => { return typeof handler === 'function' ? handler() : handler })().then((result) => {
return result
}).finally(() => {
handlers.splice(handlers.indexOf(id), 1)
if (handlers.length === 0) {
if (cusLoading) {
if (typeof cusLoading.finally === 'function') {
cusLoading.finally()
}
} else {
loading.close()
}
}
})
}
})()

View File

@ -58,6 +58,9 @@ service.interceptors.response.use(
})
}
if (response.config.useResponseData) {
if (data.code !== 0) {
throw new Error(data.data?.message || data.msg)
}
return data.data
}
return response.config.useHeader ? response : data
@ -75,7 +78,7 @@ service.interceptors.response.use(
location.reload()
})
} else {
if (error.config.throwError) { // 不被拦截处理
if (error.config.throwError || error.config.useResponseData) { // 不被拦截处理
throw error.response
} else {
Message({

View File

@ -28,8 +28,7 @@
</template>
<script>
import { getIsUserProp } from '@/api/abnormal'
import { baseinfoListByRegOrg } from '@/api/force'
import { baseinfoListByRegOrg, getIsUserProp } from '@/api/force'
export default {
props: {
type: {

View File

@ -25,8 +25,7 @@
</template>
<script>
import { getIsUserProp } from '@/api/abnormal'
import { forceDeregisterPageByRegOrg, forceSpePageByRegOrg, pageForceResByRegOrg } from '@/api/force'
import { forceDeregisterPageByRegOrg, forceSpePageByRegOrg, pageForceResByRegOrg, getIsUserProp } from '@/api/force'
export default {
props: {
type: {

View File

@ -109,9 +109,9 @@
<div class="opinion-selector">
<el-radio-group
v-model="localSelection"
@change="(val) => {
@change="() => {
// isUpper
getUsersWithPermission(val === '上级部门处理人' ? 1 : 0);
getUsersWithPermission(localSelection === '上级部门处理人' ? 1 : 0);
scope.easyFormItemBindData.componentScope.formInstance.clearValidate(scope.field.prop);
}"
>
@ -169,24 +169,24 @@ export default {
{
type: 'input',
label: '统一社会信用代码/注册号',
prop: 'uniscid',
prop: 'uniscId',
tableProps: {
showOverflowTooltip: true,
width: '220px',
formatter: (row, column, cellValue, index) => {
return `${row.uniscid || row.regNo || ''}`
return `${row.uniscId || row.regNo || ''}`
}
}
},
{
type: 'input',
label: '主体名称',
prop: 'entname',
prop: 'entName',
tableProps: {
showOverflowTooltip: true,
width: '300px',
formatter: (row, column, cellValue, index) => {
return `${row.entname || ''}`
return `${row.entName || ''}`
}
}
},
@ -396,7 +396,7 @@ export default {
required: true,
span: 24,
options: ({ formData }) => {
return this.flowModel
return this.flowModel || []
},
showInForm: () => {
return !this.readonly
@ -601,7 +601,7 @@ export default {
permission,
this.$store.getters.orgId
).then((data) => {
this.nextPerformerMap = data
this.nextPerformerMap = data.data
}))
}
return Promise.all(ps)
@ -677,7 +677,7 @@ export default {
this.$store.getters.orgId,
isUpper
).then((data) => {
this.nextPerformerMap = data
this.nextPerformerMap = data.data
}))
}
return Promise.all(ps)
@ -691,7 +691,7 @@ export default {
}).then((data) => {
return {
tableData: data,
total: data.total
total: data.length
}
})
},

View File

@ -187,7 +187,7 @@ export default {
width: '180px',
showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => {
return `${row.uniscid || row.regNo}`
return `${row.uniscId || row.regNo}`
}
},
showInTable: () => {
@ -201,7 +201,10 @@ export default {
span: 6,
tableProps: {
width: '200px',
showOverflowTooltip: true
showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => {
return `${row.busName || row.entName}`
}
},
showInTable: () => {
return this.type === 'history'

View File

@ -50,8 +50,7 @@ module.exports = {
// target: `http://172.22.80.129`,
changeOrigin: true
}
},
after: require('./mock/mock-server.js')
}
},
configureWebpack: {
// provide the app's title in webpack's name field, so that