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

View File

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

View File

@ -49,6 +49,7 @@ Vue.prototype.$moment = moment
// 工具类 // 工具类
Vue.prototype.$util = util Vue.prototype.$util = util
Vue.prototype.$utils = utils Vue.prototype.$utils = utils
Vue.prototype.console = console
Vue.component('paper-swiper', () => import ('@/components/PaperSwiper')) Vue.component('paper-swiper', () => import ('@/components/PaperSwiper'))
Vue.component('paper', () => import ('@/components/Paper')) Vue.component('paper', () => import ('@/components/Paper'))
Vue.component('CommonTitle', () => import ('@/components/CommonTitle')) 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 { ComponentConfig } from './globalConfig'
import { createPathObject } from './utils' import { createPathObject } from './utils'
@ -14,15 +15,17 @@ export function getOptionsByBaseCode(baseCode) {
return OptionsMap[baseCode] return OptionsMap[baseCode]
} }
if (OptionsMap[baseCode] instanceof Promise) { if (OptionsMap[baseCode] instanceof Promise) {
OptionsMap[baseCode].then((data) => { OptionsMap[baseCode]
.then((data) => {
if (Array.isArray(data)) { if (Array.isArray(data)) {
OptionsMap[baseCode] = data OptionsMap[baseCode] = data
} else { } else {
throw new Error('BaseOptionsLoader必须返回Array或Promise<Array>') throw new Error('BaseOptionsLoader必须返回Array或Promise<Array>')
} }
}).catch((e) => { })
.catch((e) => {
console.error(e) console.error(e)
delete OptionsMap[baseCode] OptionsMap[baseCode] = []
}) })
return [] return []
} }
@ -39,10 +42,26 @@ export async function asyncGetOptionsByBaseCode(baseCode) {
return OptionsMap[baseCode] return OptionsMap[baseCode]
} }
export async function asyncGetOptionsLabelByBaseCode(baseCode, value) { export async function asyncGetOptionsItemByBaseCode(baseCode, value, deepOption) {
return asyncGetOptionsByBaseCode(baseCode).then((arr) => { return asyncGetOptionsByBaseCode(baseCode).then((arr) => {
return (arr.find((item) => { if (deepOption) {
return deepFindObjArr(arr, (item) => {
return item.value === value return item.value === value
}) || {}).label }, 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. * 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 (response.config.useResponseData) {
if (data.code !== 0) {
throw new Error(data.data?.message || data.msg)
}
return data.data return data.data
} }
return response.config.useHeader ? response : data return response.config.useHeader ? response : data
@ -75,7 +78,7 @@ service.interceptors.response.use(
location.reload() location.reload()
}) })
} else { } else {
if (error.config.throwError) { // 不被拦截处理 if (error.config.throwError || error.config.useResponseData) { // 不被拦截处理
throw error.response throw error.response
} else { } else {
Message({ Message({

View File

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

View File

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

View File

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

View File

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

View File

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