Compare commits
22 Commits
main
...
ec1c68dbc8
| Author | SHA1 | Date | |
|---|---|---|---|
| ec1c68dbc8 | |||
| 973792d196 | |||
| 68594b62b8 | |||
| 96edc4e21e | |||
| 78746d3a2d | |||
| 59843de257 | |||
| 20680032bc | |||
| aa5f1f5b9b | |||
| 6f4be5956e | |||
| 5d07ca6d0e | |||
| 5a1567dc34 | |||
| bc9fd221a5 | |||
| 256edf264e | |||
| 7328df959d | |||
| bea6e51eea | |||
| d01ce5d4a4 | |||
| 28214cade5 | |||
| bf81c37459 | |||
| 22a49b1d65 | |||
| e522bf59a6 | |||
| 04e69632f9 | |||
| f8c38c5936 |
@@ -63,7 +63,7 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<ConfigGlobal :size="currentSize">
|
<ConfigGlobal :size="currentSize">
|
||||||
<div class="h-100% w-100%" :class="greyMode ? `${prefixCls}-grey-mode` : ''">
|
<div class="h-100% w-100%" style="overflow-y: auto;" :class="greyMode ? `${prefixCls}-grey-mode` : ''">
|
||||||
<RouterView />
|
<RouterView />
|
||||||
</div>
|
</div>
|
||||||
<routerSearch />
|
<routerSearch />
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import { encryptAES } from '@/components/LowDesign/src/utils/aes'
|
import { encryptAES } from '@/components/LowDesign/src/utils/aes'
|
||||||
|
import download from '@/utils/download'
|
||||||
|
|
||||||
//获取表单开发列表
|
//获取表单开发列表
|
||||||
export const getDbList = (data) => {
|
export const getDbList = (data) => {
|
||||||
@@ -158,6 +159,11 @@ export const exportExcelData = (tableId, data) => {
|
|||||||
return request.download({ url: `/jeelowcode/excel/exportExcel/${tableId}`, method: 'POST', data })
|
return request.download({ url: `/jeelowcode/excel/exportExcel/${tableId}`, method: 'POST', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//导出Excel表数据
|
||||||
|
export const exportExcelDataCustom = (explain,tableId, data) => {
|
||||||
|
return request.download({ url: `/jeelowcode/excel/exportExcelCustom/${tableId}`, method: 'POST', data }).then((data) => download.excel(data, explain, 'xlsx'))
|
||||||
|
}
|
||||||
|
|
||||||
//下载导入模板
|
//下载导入模板
|
||||||
export const downloadImportTemplate = (tableId) => {
|
export const downloadImportTemplate = (tableId) => {
|
||||||
return request.download({ url: `/jeelowcode/excel/exportExcelTemplate/${tableId}` })
|
return request.download({ url: `/jeelowcode/excel/exportExcelTemplate/${tableId}` })
|
||||||
|
|||||||
105
src/components/BpmTaskAssign/TaskSelectAssigneeForm.vue
Normal file
105
src/components/BpmTaskAssign/TaskSelectAssigneeForm.vue
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
||||||
|
<div v-for="taskAssignRule in props?.taskAssignRules" :key="taskAssignRule.taskDefinitionKey">
|
||||||
|
<el-divider content-position="left">{{ taskAssignRule?.taskDefinitionName }}</el-divider>
|
||||||
|
<el-form-item :label="taskAssignRule.taskDefinitionName+'候选人'"
|
||||||
|
:prop="taskAssignRule.taskDefinitionKey"
|
||||||
|
label-width="200">
|
||||||
|
<UserSelect
|
||||||
|
v-model="formData[taskAssignRule.taskDefinitionKey]"
|
||||||
|
:column="userSelectColumn"
|
||||||
|
:prop="taskAssignRule.taskDefinitionKey"
|
||||||
|
type="edit"
|
||||||
|
:func="(value)=>{console.log(JSON.stringify(value))}"
|
||||||
|
>
|
||||||
|
</UserSelect>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</ContentWrap>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
// 从 UserSelect 组件导入 Column 类型
|
||||||
|
import type {Column} from '@/components/LowDesign/src/shareControl/UserSelect.vue'
|
||||||
|
|
||||||
|
// 定义组件选项
|
||||||
|
defineOptions({
|
||||||
|
name: "BpmTaskSelectAssigneeForm"
|
||||||
|
})
|
||||||
|
|
||||||
|
interface TaskAssignRule {
|
||||||
|
id: number
|
||||||
|
modelId: string
|
||||||
|
processDefinitionId: string
|
||||||
|
taskDefinitionKey: string
|
||||||
|
taskDefinitionName: string
|
||||||
|
type: number
|
||||||
|
options: number[]
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
taskAssignRules: TaskAssignRule[]
|
||||||
|
modelValue: {}
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const formRef = ref()
|
||||||
|
const formData = ref(props.modelValue)
|
||||||
|
const formRules = ref({})
|
||||||
|
const userSelectColumn: Column = {
|
||||||
|
label: '候选人',
|
||||||
|
findType: 'all',
|
||||||
|
multiple: false,
|
||||||
|
columnKey: ['sex', 'post', 'deptName']
|
||||||
|
}
|
||||||
|
|
||||||
|
const emit = defineEmits(['updateModelValue'])
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.modelValue,
|
||||||
|
(val: {}) => {
|
||||||
|
formData.value = val
|
||||||
|
},
|
||||||
|
{
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => formData.value,
|
||||||
|
(val: {}) => {
|
||||||
|
emit('updateModelValue', val)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
const validateAssignee = (successCallBack: () => void, failCallback: () => void) => {
|
||||||
|
formRef.value.validate((valid: boolean) => {
|
||||||
|
if (valid) successCallBack()
|
||||||
|
else failCallback()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({validateAssignee})
|
||||||
|
|
||||||
|
// 初始化 formData
|
||||||
|
onMounted(() => {
|
||||||
|
if (props.taskAssignRules) {
|
||||||
|
props.taskAssignRules.forEach(rule => {
|
||||||
|
formData.value[rule.taskDefinitionKey] = ''
|
||||||
|
formRules.value[rule.taskDefinitionKey] = [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择候选人',
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -18,6 +18,18 @@
|
|||||||
v-bind="userVBind"
|
v-bind="userVBind"
|
||||||
class="w-100%"
|
class="w-100%"
|
||||||
></userSelect>
|
></userSelect>
|
||||||
|
</span>
|
||||||
|
<span prop="delegateDictId" style="display:none">
|
||||||
|
|
||||||
|
<DicTableSelect
|
||||||
|
id="costomDictSelect"
|
||||||
|
:column="distSelectColumn"
|
||||||
|
size="default"
|
||||||
|
type="add"
|
||||||
|
prop="fields_7897245"
|
||||||
|
:scope="dictSelectScope"
|
||||||
|
@set-form-data="handleSetFormData"
|
||||||
|
></DicTableSelect>
|
||||||
</span>
|
</span>
|
||||||
<!-- 顶部统计 -->
|
<!-- 顶部统计 -->
|
||||||
<div
|
<div
|
||||||
@@ -383,12 +395,108 @@ interface Props {
|
|||||||
dicRowKey?: string //dicTable模式 行数据的 Key
|
dicRowKey?: string //dicTable模式 行数据的 Key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dictSelectScope = {
|
||||||
|
"key": 0,
|
||||||
|
"value": "",
|
||||||
|
"column": {
|
||||||
|
"type": "dicTableSelect",
|
||||||
|
"controlType": "select",
|
||||||
|
"label": "表格选择框",
|
||||||
|
// "fixedSearch":{
|
||||||
|
// "approveStatusName":"已审批"
|
||||||
|
// },
|
||||||
|
"separator": " | ",
|
||||||
|
"multiple": true,
|
||||||
|
"display": true,
|
||||||
|
"span": 12,
|
||||||
|
"disabled": false,
|
||||||
|
"required": false,
|
||||||
|
"hideLabel": false,
|
||||||
|
"i18nCode": "fields_7897245",
|
||||||
|
"dictTable": "1959187451673116674",
|
||||||
|
"dictCode": "id",
|
||||||
|
"dictText": "personName",
|
||||||
|
"dictTableColumn": [
|
||||||
|
"personName",
|
||||||
|
"personAge",
|
||||||
|
"personSex",
|
||||||
|
"mobile",
|
||||||
|
"approveStatusName"
|
||||||
|
],
|
||||||
|
"prop": "fields_7897245",
|
||||||
|
"dataType": "string",
|
||||||
|
"className": "control-dicTableSelect control-fields_7897245 ",
|
||||||
|
"props": {
|
||||||
|
"lable": "personName",
|
||||||
|
"value": "id"
|
||||||
|
},
|
||||||
|
"rules": [
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"size": "default",
|
||||||
|
"disabled": false
|
||||||
|
}
|
||||||
|
|
||||||
|
const distSelectColumn = {
|
||||||
|
"type": "dicTableSelect",
|
||||||
|
"controlType": "select",
|
||||||
|
"multiple": true,
|
||||||
|
"label": "表格选择框",
|
||||||
|
"separator": " | ",
|
||||||
|
"display": true,
|
||||||
|
"span": 12,
|
||||||
|
"disabled": false,
|
||||||
|
// "fixedSearch":{
|
||||||
|
// "approveStatusName":"已审批"
|
||||||
|
// },
|
||||||
|
"required": false,
|
||||||
|
"hideLabel": false,
|
||||||
|
"i18nCode": "fields_7897245",
|
||||||
|
"dictTable": "1959187451673116674",
|
||||||
|
"dictCode": "id",
|
||||||
|
"dictText": "personName",
|
||||||
|
"dictTableColumn": [
|
||||||
|
"personName",
|
||||||
|
"personAge",
|
||||||
|
"personSex",
|
||||||
|
"mobile",
|
||||||
|
"approveStatusName"
|
||||||
|
]
|
||||||
|
,
|
||||||
|
"prop": "fields_7897245",
|
||||||
|
"dataType": "string",
|
||||||
|
"className": "control-dicTableSelect control-fields_7897245 ",
|
||||||
|
"props": {
|
||||||
|
"lable": "personName",
|
||||||
|
"value": "id"
|
||||||
|
},
|
||||||
|
"rules": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
model: 'default',
|
model: 'default',
|
||||||
fixedSearch: () => {
|
fixedSearch: () => {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const handleSetFormData = (key, val) => {
|
||||||
|
const cleaned = val.split('|').map(s => s.trim()).join(','); // "1975577437793124352 | 1965778349088899074"
|
||||||
|
console.log(cleaned);
|
||||||
|
// 在这里添加其他处理逻辑
|
||||||
|
useFun.requestApi('get', '/jeelowcode/outsidePerson/importOutside?tableId='+props.tableId+'&ids=' + cleaned, {
|
||||||
|
}).then(res => {
|
||||||
|
if (res.length > 0) {
|
||||||
|
message.success('下发成功')
|
||||||
|
useFun.refreshChange()
|
||||||
|
} else {
|
||||||
|
message.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
const userVBind = {
|
const userVBind = {
|
||||||
prop: 'delegateUserId',
|
prop: 'delegateUserId',
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
@@ -440,6 +548,17 @@ const userVBind = {
|
|||||||
}else if(props.tableId=='1968562717683908610'){ // 考试计划
|
}else if(props.tableId=='1968562717683908610'){ // 考试计划
|
||||||
useFun.requestApi('get', '/jeelowcode/examIssus/addRecord?tableId='+props.tableId+'&ids=' + ids+'&userIds='+resultValue, {
|
useFun.requestApi('get', '/jeelowcode/examIssus/addRecord?tableId='+props.tableId+'&ids=' + ids+'&userIds='+resultValue, {
|
||||||
|
|
||||||
|
}).then(res => {
|
||||||
|
if (res.length > 0) {
|
||||||
|
message.success('下发成功')
|
||||||
|
useFun.refreshChange()
|
||||||
|
} else {
|
||||||
|
message.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else if(props.tableId=='1983351353033953281'){ // 工作事项
|
||||||
|
useFun.requestApi('get', '/jeelowcode/itemIssus/addResult?tableId='+props.tableId+'&ids=' + ids+'&userIds='+resultValue, {
|
||||||
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
message.success('下发成功')
|
message.success('下发成功')
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dic-table-select-box w-100%">
|
<div class="dic-table-select-box w-100%">
|
||||||
|
{{ JSON.stringify(props) }}
|
||||||
<div
|
<div
|
||||||
class="table-input pos-relative"
|
class="table-input pos-relative"
|
||||||
:class="[{ disabled }, type, size]"
|
:class="[{ disabled }, type, size]"
|
||||||
@@ -273,9 +274,9 @@ const getCurrTableSelect = (type?) => {
|
|||||||
const dicObj = {}
|
const dicObj = {}
|
||||||
const textList: string[] = []
|
const textList: string[] = []
|
||||||
const ids = tableRef.value.tableSelect.map((item) => {
|
const ids = tableRef.value.tableSelect.map((item) => {
|
||||||
if (item[props.column.dictText]) {
|
if (item[props.column.dictCode]) {
|
||||||
dicObj[item[dicCode.value]] = item[props.column.dictText]
|
dicObj[item[dicCode.value]] = item[props.column.dictCode]
|
||||||
textList.push(item[props.column.dictText])
|
textList.push(item[props.column.dictCode])
|
||||||
}
|
}
|
||||||
return item[dicCode.value]
|
return item[dicCode.value]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ defineOptions({ name: 'UserSelect' })
|
|||||||
* all_sub 所有下级
|
* all_sub 所有下级
|
||||||
*/
|
*/
|
||||||
|
|
||||||
interface Column {
|
export interface Column {
|
||||||
label: string
|
label: string
|
||||||
findType: 'all' | 'now' | 'sub' | 'all_sub' | 'direct_sub' //查询类型
|
findType: 'all' | 'now' | 'sub' | 'all_sub' | 'direct_sub' //查询类型
|
||||||
columnKey: Array<'mobile' | 'email' | 'sex' | 'post' | 'deptName'> //扩展显示列
|
columnKey: Array<'mobile' | 'email' | 'sex' | 'post' | 'deptName'> //扩展显示列
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const dicObj = {
|
|||||||
{ label: '邮箱', value: 'email' }, { label: '性别', value: 'sex' }, { label: '岗位', value: 'post' }, { label: '部门', value: 'deptName' }
|
{ label: '邮箱', value: 'email' }, { label: '性别', value: 'sex' }, { label: '岗位', value: 'post' }, { label: '部门', value: 'deptName' }
|
||||||
],
|
],
|
||||||
userFindType: [{ label: '全部用户', value: 'all' }, { label: '本级用户', value: 'now' }, { label: '本级及下级用户', value: 'sub' }],
|
userFindType: [{ label: '全部用户', value: 'all' }, { label: '本级用户', value: 'now' }, { label: '本级及下级用户', value: 'sub' }],
|
||||||
deptFindType: [{ label: '全部部门', value: 'all' }, { label: '本级部门', value: 'now' }, { label: '本级及下级部门', value: 'sub' }],
|
deptFindType: [{ label: '全部部门', value: 'all' }, { label: '本级部门', value: 'now' }, { label: '本级及下级部门', value: 'sub' }, { label: '外协单位', value: 'out' }, { label: '内部单位', value: 'internal' }],
|
||||||
customControlType: [{ label: '未全局注册', value: false }, { label: '已全局注册', value: true }],
|
customControlType: [{ label: '未全局注册', value: false }, { label: '已全局注册', value: true }],
|
||||||
regionType: [{ label: '全球-国家', value: 'gj' }, { label: '中国-省市区', value: 'ssq' }, { label: '中国-省市', value: 'ss' }, { label: '中国-省', value: 's' }],
|
regionType: [{ label: '全球-国家', value: 'gj' }, { label: '中国-省市区', value: 'ssq' }, { label: '中国-省市', value: 'ss' }, { label: '中国-省', value: 's' }],
|
||||||
dictTextFormatter: [
|
dictTextFormatter: [
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { encryptAES, decryptAES } from '@/components/LowDesign/src/utils/aes'
|
|||||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
import router from '@/router/index'
|
import router from '@/router/index'
|
||||||
|
import {exportExcelDataCustom} from '@/api/design/table'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@ export default {
|
|||||||
* @param options 请求配置 如:{ params:{ text:'测试' } }
|
* @param options 请求配置 如:{ params:{ text:'测试' } }
|
||||||
*/
|
*/
|
||||||
requestApi: (Method, url, options) => callApiFun(Method, url, options),
|
requestApi: (Method, url, options) => callApiFun(Method, url, options),
|
||||||
|
exportExcelCustom: (tableId, data) => exportExcelDataCustom(tableId, data),
|
||||||
cloneDeep, //深拷贝
|
cloneDeep, //深拷贝
|
||||||
listToTree,//列表转树结构
|
listToTree,//列表转树结构
|
||||||
formatDate,//时间格式化
|
formatDate,//时间格式化
|
||||||
|
|||||||
@@ -546,13 +546,15 @@ export const formDataFormatting = (formOption, formData, formType) => {
|
|||||||
echoObj[dicKey].push(...data[key].split(','))
|
echoObj[dicKey].push(...data[key].split(','))
|
||||||
}
|
}
|
||||||
} else echoObj[type].push(...data[key].split(','))
|
} else echoObj[type].push(...data[key].split(','))
|
||||||
} else if (column[key]?.controlType == 'date') {
|
} else if (column[key]?.controlType == 'date'||key=='create_time') {
|
||||||
|
|
||||||
if (data[key]) {
|
if (data[key]) {
|
||||||
if (typeof data[key] == 'number' || typeof data[key] == 'string') {
|
if (typeof data[key] == 'number' || typeof data[key] == 'string') {
|
||||||
data[key] = data[key] + ''
|
data[key] = data[key] + ''
|
||||||
if (!(/[-|\/]/g.test(data[key]))) {
|
if (!(/[-|\/]/g.test(data[key]))) {
|
||||||
//如果是时间戳强制转换
|
//如果是时间戳强制转换
|
||||||
data[key] = formatDate(new Date(data[key]), column[key].valueFormat || 'YYYY-MM-DD HH:mm:ss')
|
const timestamp = parseInt(data[key], 10)
|
||||||
|
data[key] = formatDate(new Date(timestamp), column[key].valueFormat || 'YYYY-MM-DD HH:mm:ss')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<el-input v-model="formData.processInstanceKey" disabled placeholder="请输入流程标识" />
|
<el-input v-model="formData.processInstanceKey" disabled placeholder="请输入流程标识" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="规则类型" prop="type">
|
<el-form-item label="规则类型" prop="type">
|
||||||
<el-select v-model="formData.type" clearable style="width: 100%">
|
<el-select v-model="formData.type" clearable style="width: 100%" disabled>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_TASK_ASSIGN_RULE_TYPE)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_TASK_ASSIGN_RULE_TYPE)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -165,7 +165,7 @@ const open = async (row) => {
|
|||||||
resetForm()
|
resetForm()
|
||||||
// 2. 再设置表单
|
// 2. 再设置表单
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
formData.value.type = undefined as unknown as number
|
formData.value.type = 30
|
||||||
formData.value.taskName = row.name
|
formData.value.taskName = row.name
|
||||||
formData.value.taskId = row.id
|
formData.value.taskId = row.id
|
||||||
formData.value.processInstanceName = row.processInstance.name
|
formData.value.processInstanceName = row.processInstance.name
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<Icon icon="ep:close" />
|
<Icon icon="ep:close" />
|
||||||
不通过
|
不通过
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<!--
|
||||||
<el-button type="primary" @click="openTaskUpdateAssigneeForm(item.id)">
|
<el-button type="primary" @click="openTaskUpdateAssigneeForm(item.id)">
|
||||||
<Icon icon="ep:edit" />
|
<Icon icon="ep:edit" />
|
||||||
转办
|
转办
|
||||||
@@ -53,6 +54,7 @@
|
|||||||
<Icon icon="ep:plus" />
|
<Icon icon="ep:plus" />
|
||||||
加签
|
加签
|
||||||
</el-button>
|
</el-button>
|
||||||
|
-->
|
||||||
<el-button type="warning" @click="handleBack(item)">
|
<el-button type="warning" @click="handleBack(item)">
|
||||||
<Icon icon="ep:back" />
|
<Icon icon="ep:back" />
|
||||||
回退
|
回退
|
||||||
@@ -173,6 +175,8 @@ const handleAudit = async (task, pass) => {
|
|||||||
getDetail()
|
getDetail()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const printPage = async () => {
|
const printPage = async () => {
|
||||||
|
|
||||||
const { href } = router.resolve({ name: 'BpmProcessInstanceInfo',
|
const { href } = router.resolve({ name: 'BpmProcessInstanceInfo',
|
||||||
@@ -231,6 +235,10 @@ const getProcessInstance = async () => {
|
|||||||
if (processDefinition.formType === 10) {
|
if (processDefinition.formType === 10) {
|
||||||
detailForm.value.formId = processDefinition.formId
|
detailForm.value.formId = processDefinition.formId
|
||||||
detailForm.value.optionsData = JSON.parse(processDefinition.formConf)
|
detailForm.value.optionsData = JSON.parse(processDefinition.formConf)
|
||||||
|
if (data.formVariables.jeelowcode_subtable_data) {
|
||||||
|
data.formVariables = { ...data.formVariables, ...data.formVariables.jeelowcode_subtable_data }
|
||||||
|
delete data.formVariables.jeelowcode_subtable_data
|
||||||
|
}
|
||||||
detailForm.value.defaultData = data.formVariables
|
detailForm.value.defaultData = data.formVariables
|
||||||
// setConfAndFields2(
|
// setConfAndFields2(
|
||||||
// detailForm,
|
// detailForm,
|
||||||
|
|||||||
@@ -38,8 +38,9 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
<el-button type="primary" v-hasPermi="['bpm:process-instance:query']" @click="handleCreate">
|
<el-button type="primary" v-hasPermi="['bpm:process-instance:create']" @click="handleCreate">
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 发起流程
|
<Icon icon="ep:plus" class="mr-5px"/>
|
||||||
|
发起流程
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<!-- 自定义操作栏 -->
|
<!-- 自定义操作栏 -->
|
||||||
@@ -47,20 +48,20 @@
|
|||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-hasPermi="['bpm:process-instance:cancel']"
|
v-hasPermi="['bpm:process-instance:query']"
|
||||||
@click="handleDetail(row)"
|
@click="handleDetail(row)"
|
||||||
>
|
>
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
v-if="row.result === 1"
|
v-if="row.result === 1|| row.result === 2"
|
||||||
v-hasPermi="['bpm:process-instance:query']"
|
v-hasPermi="['bpm:process-instance:cancel']"
|
||||||
@click="handleCancel(row)"
|
@click="handleCancel(row)"
|
||||||
>
|
>
|
||||||
取消
|
取消
|
||||||
</el-button> -->
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
@@ -203,7 +204,8 @@ const searchChange = (params, done) => {
|
|||||||
|
|
||||||
/** 清空按钮操作 */
|
/** 清空按钮操作 */
|
||||||
const resetChange = () => {
|
const resetChange = () => {
|
||||||
searchChange({}, () => {})
|
searchChange({}, () => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const sizeChange = (pageSize) => {
|
const sizeChange = (pageSize) => {
|
||||||
|
|||||||
175
src/views/bpm/task/copy/index.vue
Normal file
175
src/views/bpm/task/copy/index.vue
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
<!-- 工作流,抄送我的流程 -->
|
||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<avue-crud
|
||||||
|
ref="crudRef"
|
||||||
|
v-model="tableForm"
|
||||||
|
v-model:page="tablePage"
|
||||||
|
v-model:search="tableSearch"
|
||||||
|
:data="tableData"
|
||||||
|
:option="tableOption"
|
||||||
|
:permission="permission"
|
||||||
|
@search-change="searchChange"
|
||||||
|
@search-reset="resetChange"
|
||||||
|
@refresh-change="getTableData"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
>
|
||||||
|
<template #menu="{ row }">
|
||||||
|
<el-button link type="primary" @click="handleAudit(row)">流程</el-button>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
</ContentWrap>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import {dateFormatter} from '@/utils/formatTime'
|
||||||
|
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'BpmCopyTask'
|
||||||
|
})
|
||||||
|
|
||||||
|
// 路由
|
||||||
|
const {push} = useRouter()
|
||||||
|
// 列表的加载中
|
||||||
|
const loading = ref(true)
|
||||||
|
|
||||||
|
const {getCurrPermi} = useCrudPermi()
|
||||||
|
|
||||||
|
// 表格的配置
|
||||||
|
const tableOption = reactive({
|
||||||
|
addBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
viewBtn: true,
|
||||||
|
viewBtnText: '详情',
|
||||||
|
viewBtnIcon: 'none',
|
||||||
|
align: 'center',
|
||||||
|
headerAlign: 'center',
|
||||||
|
searchMenuSpan: 6,
|
||||||
|
searchMenuPosition: 'left',
|
||||||
|
labelSuffix: ' ',
|
||||||
|
span: 24,
|
||||||
|
dialogWidth: '50%',
|
||||||
|
column: {
|
||||||
|
taskId: {
|
||||||
|
label: '任务编号'
|
||||||
|
},
|
||||||
|
taskName: {
|
||||||
|
label: '任务名称'
|
||||||
|
},
|
||||||
|
processInstanceId: {
|
||||||
|
label: '流程编号',
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
processInstanceName: {
|
||||||
|
label: '所属流程',
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
startUserNickname: {
|
||||||
|
label: '流程发起人',
|
||||||
|
},
|
||||||
|
reason: {
|
||||||
|
label: '抄送原因'
|
||||||
|
},
|
||||||
|
creatorNickname: {
|
||||||
|
label: '抄送人'
|
||||||
|
},
|
||||||
|
createTime: {
|
||||||
|
label: '抄送时间',
|
||||||
|
type: 'datetime',
|
||||||
|
width: 180,
|
||||||
|
formatter: (row: any, value: any, rowv: any, column: any) => {
|
||||||
|
return dateFormatter(row, column, value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
searchCreateTime: {
|
||||||
|
label: '抄送时间',
|
||||||
|
display: false,
|
||||||
|
hide: true,
|
||||||
|
search: true,
|
||||||
|
searchType: 'datetimerange',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
searchRange: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const tableForm = ref<any>({})
|
||||||
|
const tableData = ref([])
|
||||||
|
const tableSearch = ref<any>({})
|
||||||
|
const tablePage = ref({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
const permission = getCurrPermi(['bpm:task'])
|
||||||
|
|
||||||
|
const crudRef = ref()
|
||||||
|
useCrudHeight(crudRef)
|
||||||
|
|
||||||
|
const getTableData = async () => {
|
||||||
|
// 列表的加载中...
|
||||||
|
loading.value = true
|
||||||
|
// 拼接查询参数
|
||||||
|
let searchObj = {
|
||||||
|
...tableSearch.value,
|
||||||
|
pageNo: tablePage.value.currentPage,
|
||||||
|
pageSize: tablePage.value.pageSize
|
||||||
|
}
|
||||||
|
// 处理时间参数,如果为空则去掉这个属性
|
||||||
|
if (!searchObj.createTime?.length) delete searchObj.createTime
|
||||||
|
// 去掉空字符串属性
|
||||||
|
for (let key in searchObj) if (searchObj[key] === '') delete searchObj[key]
|
||||||
|
|
||||||
|
// 请求我的待阅数据
|
||||||
|
try {
|
||||||
|
const data = await ProcessInstanceApi.getProcessInstanceCCPage(searchObj)
|
||||||
|
tableData.value = data.list
|
||||||
|
tablePage.value.total = data.total
|
||||||
|
} finally {
|
||||||
|
// 无论请求成功或者失败,这里都需要将加载中关闭
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const searchChange = (params: any, done: any) => {
|
||||||
|
tablePage.value.currentPage = 1
|
||||||
|
// 获取数据
|
||||||
|
getTableData().finally(() => done())
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetChange = () => {
|
||||||
|
searchChange({}, () => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const sizeChange = (pageSize) => {
|
||||||
|
tablePage.value.pageSize = pageSize
|
||||||
|
resetChange()
|
||||||
|
}
|
||||||
|
|
||||||
|
const currentChange = (currentPage) => {
|
||||||
|
tablePage.value.currentPage = currentPage
|
||||||
|
getTableData()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAudit = (row: any) => {
|
||||||
|
push({
|
||||||
|
name: 'BpmProcessInstanceDetail',
|
||||||
|
query: {
|
||||||
|
id: row.processInstanceId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 初始化 **/
|
||||||
|
onMounted(async () => {
|
||||||
|
await getTableData()
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
<el-button link type="primary" @click="handleAudit(row)">审批</el-button>
|
<el-button link type="primary" @click="handleAudit(row)">审批</el-button>
|
||||||
<!-- <el-button link type="primary" @click="handleCC(row)">抄送</el-button>-->
|
<el-button link type="primary" @click="handleCC(row)">抄送</el-button>
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
<TaskCCDialogForm ref="taskCCDialogForm" />
|
<TaskCCDialogForm ref="taskCCDialogForm" />
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ const getUserKey = (val) => {
|
|||||||
else if ([20, 21].includes(val)) key = 'deptIds'
|
else if ([20, 21].includes(val)) key = 'deptIds'
|
||||||
else if (val == 22) key = 'postIds'
|
else if (val == 22) key = 'postIds'
|
||||||
else if ([30, 31, 32].includes(val)) key = 'userIds'
|
else if ([30, 31, 32].includes(val)) key = 'userIds'
|
||||||
|
else if (val == 35) key = 'userSelects'
|
||||||
else if (val == 40) key = 'userGroupIds'
|
else if (val == 40) key = 'userGroupIds'
|
||||||
else if (val == 50) key = 'scripts'
|
else if (val == 50) key = 'scripts'
|
||||||
return key
|
return key
|
||||||
@@ -95,7 +96,8 @@ const tableOption = reactive({
|
|||||||
postIds: {display: false},
|
postIds: {display: false},
|
||||||
userIds: {display: false},
|
userIds: {display: false},
|
||||||
userGroupIds: {display: false},
|
userGroupIds: {display: false},
|
||||||
scripts: { display: false }
|
scripts: {display: false},
|
||||||
|
userSelects: {display: false},
|
||||||
}
|
}
|
||||||
const key = getUserKey(val)
|
const key = getUserKey(val)
|
||||||
if (key) columnObj[key].display = true
|
if (key) columnObj[key].display = true
|
||||||
@@ -112,6 +114,7 @@ const tableOption = reactive({
|
|||||||
let arr = row.options.map((id) => {
|
let arr = row.options.map((id) => {
|
||||||
if (key == 'deptIds') return lowStore.dicObj.deptSelect?.[id] || id
|
if (key == 'deptIds') return lowStore.dicObj.deptSelect?.[id] || id
|
||||||
else if (key == 'userIds') return lowStore.dicObj.userSelect?.[id] || id
|
else if (key == 'userIds') return lowStore.dicObj.userSelect?.[id] || id
|
||||||
|
else if (key == 'userSelects') return ''
|
||||||
else return dicObj.value[key][id]
|
else return dicObj.value[key][id]
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -198,7 +201,7 @@ const rowUpdate = async (form, index, done, loading) => {
|
|||||||
const delKey = ['roleIds', 'deptIds', 'postIds', 'userIds', 'userGroupIds', 'scripts']
|
const delKey = ['roleIds', 'deptIds', 'postIds', 'userIds', 'userGroupIds', 'scripts']
|
||||||
if (key) {
|
if (key) {
|
||||||
if (typeof form[key] == 'number') form[key] = form[key] + ''
|
if (typeof form[key] == 'number') form[key] = form[key] + ''
|
||||||
const value = form[key]
|
const value = key === 'userSelects' ? '' : form[key]
|
||||||
form.options = typeof value == 'string' ? value.split(',') : value
|
form.options = typeof value == 'string' ? value.split(',') : value
|
||||||
}
|
}
|
||||||
delKey.forEach((prop) => delete form[prop])
|
delKey.forEach((prop) => delete form[prop])
|
||||||
|
|||||||
@@ -61,6 +61,13 @@ const tabsPaneList = ref([
|
|||||||
calcHeight: 200,
|
calcHeight: 200,
|
||||||
fixedSearch: {file_main_type: 4}
|
fixedSearch: {file_main_type: 4}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '工作档案',
|
||||||
|
name: 'workArchive',
|
||||||
|
formId: '1966386366515343361',
|
||||||
|
calcHeight: 200,
|
||||||
|
fixedSearch: {file_main_type: 5}
|
||||||
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
// 定义点击tab的事件动作
|
// 定义点击tab的事件动作
|
||||||
|
|||||||
@@ -86,6 +86,17 @@
|
|||||||
<Icon :size="14" icon="hugeicons:java"/>
|
<Icon :size="14" icon="hugeicons:java"/>
|
||||||
<span class="ml-3px!">JAVA增强</span>
|
<span class="ml-3px!">JAVA增强</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<!-- 批量同步 -->
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:size="size"
|
||||||
|
@click="handleBatchSync"
|
||||||
|
v-hasPermi="['jeelowcode:dbform:sync']"
|
||||||
|
>
|
||||||
|
<Icon :size="14" icon="simple-icons:oracle"/>
|
||||||
|
<span class="ml-3px!">批量同步</span>
|
||||||
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ size, row }">
|
<template #menu="{ size, row }">
|
||||||
<div class="flex justify-center flex-items-center">
|
<div class="flex justify-center flex-items-center">
|
||||||
@@ -190,7 +201,8 @@
|
|||||||
@click="openDataOrigin"
|
@click="openDataOrigin"
|
||||||
:disabled="!tableForm.dataOrigin"
|
:disabled="!tableForm.dataOrigin"
|
||||||
>
|
>
|
||||||
<Icon :size="14" icon="lucide:text-search"></Icon> <span>数据源SQL配置</span>
|
<Icon :size="14" icon="lucide:text-search"></Icon>
|
||||||
|
<span>数据源SQL配置</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -211,10 +223,12 @@
|
|||||||
<span>表格扩展配置</span>
|
<span>表格扩展配置</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="sortPopup = true">
|
<el-button @click="sortPopup = true">
|
||||||
<Icon :size="14" icon="mdi:sort"></Icon> <span>默认排序</span>
|
<Icon :size="14" icon="mdi:sort"></Icon>
|
||||||
|
<span>默认排序</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="searchPopup = true">
|
<el-button @click="searchPopup = true">
|
||||||
<Icon :size="14" icon="lucide:text-search"></Icon> <span>默认搜索</span>
|
<Icon :size="14" icon="lucide:text-search"></Icon>
|
||||||
|
<span>默认搜索</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -417,7 +431,8 @@
|
|||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="copySampleStr(key)"
|
@click="copySampleStr(key)"
|
||||||
>点击复制</el-button
|
>点击复制
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1524,7 +1539,8 @@ const searchChange = (params, done) => {
|
|||||||
|
|
||||||
/** 清空按钮操作 */
|
/** 清空按钮操作 */
|
||||||
const resetChange = () => {
|
const resetChange = () => {
|
||||||
searchChange({}, () => {})
|
searchChange({}, () => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const sizeChange = (pageSize) => {
|
const sizeChange = (pageSize) => {
|
||||||
@@ -1738,13 +1754,35 @@ const rowDel = async (form) => {
|
|||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getTableData()
|
await getTableData()
|
||||||
} catch {}
|
} catch {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const beforeUnload = (event) => {
|
const beforeUnload = (event) => {
|
||||||
if (isUnload.value) return (event.returnValue = '您确定要关闭页面吗?')
|
if (isUnload.value) return (event.returnValue = '您确定要关闭页面吗?')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 批量同步 **/
|
||||||
|
const handleBatchSync = async () => {
|
||||||
|
// 首先需要查询有没有需要同步的表单,如果没有则提示消息并结束,如果有则打开弹窗
|
||||||
|
let searchObj = {
|
||||||
|
isDbSync: 'N',
|
||||||
|
pageNo: tablePage.value.currentPage,
|
||||||
|
pageSize: -1
|
||||||
|
}
|
||||||
|
const data = await TableApi.getDbList(searchObj)
|
||||||
|
if (data?.records?.length > 0) {
|
||||||
|
// 将data.records取出来,每个记录的id作为row.id,并且发起普通同步
|
||||||
|
const promises = data.records.map((row) => TableApi.asyncDbData(row.id, 'default'))
|
||||||
|
await Promise.all(promises).catch(() => message.alert('同步失败'))
|
||||||
|
// 刷新列表
|
||||||
|
getTableData()
|
||||||
|
} else {
|
||||||
|
// 没有需要同步的表单,提示信息并结束方法
|
||||||
|
message.info('没有需要同步的表单')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
window.addEventListener('beforeunload', beforeUnload)
|
window.addEventListener('beforeunload', beforeUnload)
|
||||||
|
|||||||
@@ -70,7 +70,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="bottom-card">
|
<div class="bottom-card">
|
||||||
<div class="bottom-card-title">
|
<div class="bottom-card-title">
|
||||||
<span>隐患排查治理</span>
|
<!-- 隐患排查治理 标题需要隐藏 2025-10-31 -->
|
||||||
|
<span></span>
|
||||||
<img width="50%" style="margin: 8px 0" src="@/assets/images/line_1.png" />
|
<img width="50%" style="margin: 8px 0" src="@/assets/images/line_1.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="type-wrapper">
|
<div class="type-wrapper">
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="center-container">
|
<div class="center-container">
|
||||||
<div class="center-content">
|
<div class="center-content">
|
||||||
<span class="title">隐患排查治理</span>
|
<!-- 隐患排查治理 这个标题需要隐藏 2025-10-31 -->
|
||||||
|
<span class="title"></span>
|
||||||
<img class="bottom-border-line" src="@/assets/images/title_border_line_1.png" />
|
<img class="bottom-border-line" src="@/assets/images/title_border_line_1.png" />
|
||||||
<span class="sub-title">分类风险</span>
|
<span class="sub-title">隐患等级</span>
|
||||||
<img width="50%" src="@/assets/images/line_1.png" />
|
<img width="50%" src="@/assets/images/line_1.png" />
|
||||||
|
|
||||||
<div class="type-wrapper">
|
<div class="type-wrapper">
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ import RiskStatisticsPanel from './components/RiskStatisticsPanel.vue'
|
|||||||
import HighRiskAlertPanel from './components/HighRiskAlertPanel.vue'
|
import HighRiskAlertPanel from './components/HighRiskAlertPanel.vue'
|
||||||
import TimeoutWorkOrderPanel from './components/TimeoutWorkOrderPanel.vue'
|
import TimeoutWorkOrderPanel from './components/TimeoutWorkOrderPanel.vue'
|
||||||
import HiddenDangerPanel from './components/HiddenDangerPanel.vue'
|
import HiddenDangerPanel from './components/HiddenDangerPanel.vue'
|
||||||
|
import {error} from "echarts/types/src/util/log";
|
||||||
|
|
||||||
// 类型定义
|
// 类型定义
|
||||||
interface AlertItem {
|
interface AlertItem {
|
||||||
@@ -484,7 +485,16 @@ const handleHiddenDangerPannelData = (query) => {
|
|||||||
_data2.general = Number(res.records[0].general)
|
_data2.general = Number(res.records[0].general)
|
||||||
_data2.major = Number(res.records[0].major)
|
_data2.major = Number(res.records[0].major)
|
||||||
|
|
||||||
|
// 安全指数另算,再起一个报表
|
||||||
|
// dashboardData.value.hiddenDangerData.safetyIndex = res.records[0].safetyIndex
|
||||||
|
// 在这里添加获取安全指数的逻辑
|
||||||
|
getTableList('hidden_danger_safety_index', query).then(res => {
|
||||||
|
if (res.records && res.records.length > 0) {
|
||||||
dashboardData.value.hiddenDangerData.safetyIndex = res.records[0].safetyIndex
|
dashboardData.value.hiddenDangerData.safetyIndex = res.records[0].safetyIndex
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('获取隐患排查治理数据失败:', error)
|
||||||
|
})
|
||||||
|
|
||||||
// 获取隐患排查治理处理进度数据
|
// 获取隐患排查治理处理进度数据
|
||||||
getTableList('hidden_danger_process_progress', query).then(res => {
|
getTableList('hidden_danger_process_progress', query).then(res => {
|
||||||
|
|||||||
@@ -33,9 +33,10 @@
|
|||||||
|
|
||||||
<div class="center-container">
|
<div class="center-container">
|
||||||
<div class="center-content">
|
<div class="center-content">
|
||||||
<span class="title">隐患排查治理</span>
|
<!-- 隐患排查治理 -->
|
||||||
|
<span class="title"></span>
|
||||||
<img class="bottom-border-line" src="@/assets/images/title_border_line_1.png" />
|
<img class="bottom-border-line" src="@/assets/images/title_border_line_1.png" />
|
||||||
<span class="sub-title">分类风险</span>
|
<span class="sub-title">隐患等级</span>
|
||||||
<img width="50%" src="@/assets/images/line_1.png" />
|
<img width="50%" src="@/assets/images/line_1.png" />
|
||||||
<div class="type-wrapper">
|
<div class="type-wrapper">
|
||||||
<div class="type-item">
|
<div class="type-item">
|
||||||
|
|||||||
@@ -60,7 +60,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="bottom-card">
|
<div class="bottom-card">
|
||||||
<div class="bottom-card-title">
|
<div class="bottom-card-title">
|
||||||
<span>隐患排查治理</span>
|
<!--隐患排查治理-->
|
||||||
|
<span></span>
|
||||||
<img width="50%" style="margin: 8px 0" src="@/assets/images/line_1.png" />
|
<img width="50%" style="margin: 8px 0" src="@/assets/images/line_1.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="type-wrapper">
|
<div class="type-wrapper">
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<!-- 顶部标题栏 -->
|
<!-- 顶部标题栏 -->
|
||||||
<div class="header-container">
|
<div class="header-container">
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<img class="back-img" @click="returnToHeadquarters" src="@/assets/images/screen/back_image.png" />
|
<img class="back-img" @click="returnToHeadquarters"
|
||||||
|
src="@/assets/images/screen/back_image.png"/>
|
||||||
<div class="back-button" @click="openRegionSelector"> {{ selectedRegion }}
|
<div class="back-button" @click="openRegionSelector"> {{ selectedRegion }}
|
||||||
<span>···</span>
|
<span>···</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,23 +23,28 @@
|
|||||||
<div class="left-wrapper">
|
<div class="left-wrapper">
|
||||||
<OverviewPanel :totalCount="dashboardData?.totalCount || 0"
|
<OverviewPanel :totalCount="dashboardData?.totalCount || 0"
|
||||||
:formalEmployeeCount="dashboardData?.formalEmployeeCount || 0"
|
:formalEmployeeCount="dashboardData?.formalEmployeeCount || 0"
|
||||||
:externalStaffCount="dashboardData?.externalStaffCount || 0" :visitorCount="dashboardData?.visitorCount || 0"
|
:externalStaffCount="dashboardData?.externalStaffCount || 0"
|
||||||
|
:visitorCount="dashboardData?.visitorCount || 0"
|
||||||
:parkStatistics="dashboardData?.parkStatistics"/>
|
:parkStatistics="dashboardData?.parkStatistics"/>
|
||||||
<RiskStatisticsPanel :riskStatistics="riskStatistics" :dangerDetail="dangerDetail" :park="parkValue"
|
<RiskStatisticsPanel :riskStatistics="riskStatistics" :dangerDetail="dangerDetail"
|
||||||
|
:park="parkValue"
|
||||||
@tab-change="handleRiskTabChange" :campus_id="query.campus_id"/>
|
@tab-change="handleRiskTabChange" :campus_id="query.campus_id"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-wrapper">
|
<div class="right-wrapper">
|
||||||
<HighRiskAlertPanel :alertData="dashboardData?.alertData" :alertDetails="dashboardData?.alertData.details"
|
<HighRiskAlertPanel :alertData="dashboardData?.alertData"
|
||||||
|
:alertDetails="dashboardData?.alertData.details"
|
||||||
:sourceIndex="sourceIndex"/>
|
:sourceIndex="sourceIndex"/>
|
||||||
<TimeoutWorkOrderPanel :timeoutWorkOrders="dashboardData?.timeoutWorkOrders"
|
<TimeoutWorkOrderPanel :timeoutWorkOrders="dashboardData?.timeoutWorkOrders"
|
||||||
:alertDetails="dashboardData?.timeoutWorkOrders.details" :sourceIndex="sourceIndex" />
|
:alertDetails="dashboardData?.timeoutWorkOrders.details"
|
||||||
|
:sourceIndex="sourceIndex"/>
|
||||||
</div>
|
</div>
|
||||||
<HiddenDangerPanel :hiddenDangerData="dashboardData?.hiddenDangerData"/>
|
<HiddenDangerPanel :hiddenDangerData="dashboardData?.hiddenDangerData"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 区域选择弹窗 -->
|
<!-- 区域选择弹窗 -->
|
||||||
<RegionSelector v-model="regionSelectorVisible" :modelSelected="selectedPark" :regions="regionOption"
|
<RegionSelector v-model="regionSelectorVisible" :modelSelected="selectedPark"
|
||||||
|
:regions="regionOption"
|
||||||
@change="onRegionChange"/>
|
@change="onRegionChange"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -252,7 +258,9 @@ onMounted(async () => {
|
|||||||
// 去重region字段,使用Map来确保唯一性
|
// 去重region字段,使用Map来确保唯一性
|
||||||
const regionMap = new Map()
|
const regionMap = new Map()
|
||||||
records.filter((el) => el.region_id == query.regionCode)
|
records.filter((el) => el.region_id == query.regionCode)
|
||||||
.map(el => { return el })
|
.map(el => {
|
||||||
|
return el
|
||||||
|
})
|
||||||
.forEach(el => {
|
.forEach(el => {
|
||||||
if (!regionMap.has(el.park_name)) {
|
if (!regionMap.has(el.park_name)) {
|
||||||
regionMap.set(el.park_name, {
|
regionMap.set(el.park_name, {
|
||||||
@@ -480,7 +488,16 @@ const handleHiddenDangerPannelData = (query) => {
|
|||||||
_data2.general = Number(res.records[0].general)
|
_data2.general = Number(res.records[0].general)
|
||||||
_data2.major = Number(res.records[0].major)
|
_data2.major = Number(res.records[0].major)
|
||||||
|
|
||||||
|
// 安全指数另算,再起一个报表
|
||||||
|
// dashboardData.value.hiddenDangerData.safetyIndex = res.records[0].safetyIndex
|
||||||
|
// 在这里添加获取安全指数的逻辑
|
||||||
|
getTableList('hidden_danger_safety_index', query).then(res => {
|
||||||
|
if (res.records && res.records.length > 0) {
|
||||||
dashboardData.value.hiddenDangerData.safetyIndex = res.records[0].safetyIndex
|
dashboardData.value.hiddenDangerData.safetyIndex = res.records[0].safetyIndex
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('获取隐患排查治理数据失败:', error)
|
||||||
|
})
|
||||||
|
|
||||||
// 获取隐患排查治理处理进度数据
|
// 获取隐患排查治理处理进度数据
|
||||||
getTableList('hidden_danger_process_progress', query).then(res => {
|
getTableList('hidden_danger_process_progress', query).then(res => {
|
||||||
@@ -1219,12 +1236,10 @@ const timeOut1 = (): void => {
|
|||||||
|
|
||||||
.left-top {
|
.left-top {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
background-image:
|
background-image: url('@/assets/images/screen/left_top_img.png'),
|
||||||
url('@/assets/images/screen/left_top_img.png'),
|
|
||||||
url('@/assets/images/screen/left_center_img.png'),
|
url('@/assets/images/screen/left_center_img.png'),
|
||||||
url('@/assets/images/screen/left_bottom_img.png');
|
url('@/assets/images/screen/left_bottom_img.png');
|
||||||
background-position:
|
background-position: top center,
|
||||||
top center,
|
|
||||||
left center,
|
left center,
|
||||||
bottom center;
|
bottom center;
|
||||||
|
|
||||||
@@ -1232,8 +1247,7 @@ const timeOut1 = (): void => {
|
|||||||
background-repeat: no-repeat, no-repeat, no-repeat;
|
background-repeat: no-repeat, no-repeat, no-repeat;
|
||||||
|
|
||||||
/* 设置位置 */
|
/* 设置位置 */
|
||||||
background-size:
|
background-size: 100% 90px,
|
||||||
100% 90px,
|
|
||||||
cover,
|
cover,
|
||||||
100% 68px;
|
100% 68px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -1396,12 +1410,10 @@ const timeOut1 = (): void => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.left-bottom {
|
.left-bottom {
|
||||||
background-image:
|
background-image: url('@/assets/images/screen/left_top_2_img.png'),
|
||||||
url('@/assets/images/screen/left_top_2_img.png'),
|
|
||||||
url('@/assets/images/screen/left_center_img.png'),
|
url('@/assets/images/screen/left_center_img.png'),
|
||||||
url('@/assets/images/screen/left_bottom_img.png');
|
url('@/assets/images/screen/left_bottom_img.png');
|
||||||
background-position:
|
background-position: top center,
|
||||||
top center,
|
|
||||||
left center,
|
left center,
|
||||||
bottom center;
|
bottom center;
|
||||||
|
|
||||||
@@ -1409,8 +1421,7 @@ const timeOut1 = (): void => {
|
|||||||
background-repeat: no-repeat, no-repeat, no-repeat;
|
background-repeat: no-repeat, no-repeat, no-repeat;
|
||||||
|
|
||||||
/* 设置位置 */
|
/* 设置位置 */
|
||||||
background-size:
|
background-size: 100% 90px,
|
||||||
100% 90px,
|
|
||||||
cover,
|
cover,
|
||||||
100% 68px;
|
100% 68px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -1462,8 +1473,6 @@ const timeOut1 = (): void => {
|
|||||||
row-gap: 1rem;
|
row-gap: 1rem;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.center-container {
|
.center-container {
|
||||||
|
|||||||
Reference in New Issue
Block a user