!103 feat(bpm): 列表行根据督办状态显示不同背景色
* feat(bpm): 列表行根据督办状态显示不同背景色 * fix(bpm): defaultCc 改为 provide/inject 传递,修复默认抄送不生效
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
:expandedRowKeys="expandedRowKeys"
|
:expandedRowKeys="expandedRowKeys"
|
||||||
@expand="handleExpand"
|
@expand="handleExpand"
|
||||||
@fetch-success="onFetchSuccess"
|
@fetch-success="onFetchSuccess"
|
||||||
|
:rowClassName="(r) => r.bpmStatus ? 'status-row-' + r.bpmStatus : ''"
|
||||||
>
|
>
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
@@ -934,4 +935,14 @@ import { defHttp } from '/@/utils/http/axios';
|
|||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.status-row-1 td) {
|
||||||
|
background: #fffbe6 !important;
|
||||||
|
}
|
||||||
|
:deep(.status-row-2 td) {
|
||||||
|
background: #fff1f0 !important;
|
||||||
|
}
|
||||||
|
:deep(.status-row-3 td) {
|
||||||
|
background: #f6ffed !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -500,6 +500,7 @@ import {
|
|||||||
provide('extraVars', formScope);
|
provide('extraVars', formScope);
|
||||||
provide('flowVars', computed(() => props.formData?.vars || {}));
|
provide('flowVars', computed(() => props.formData?.vars || {}));
|
||||||
provide('formDefaultReason', defaultHandleReason);
|
provide('formDefaultReason', defaultHandleReason);
|
||||||
|
provide('defaultCcUsers', defaultCcUsers);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initFormData();
|
initFormData();
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" @fetch-success="onFetchSuccess">
|
<BasicTable @register="registerTable" :rowSelection="rowSelection" @fetch-success="onFetchSuccess" :rowClassName="(r) => r.bpmStatus ? 'status-row-' + r.bpmStatus : ''">
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" v-auth="'dqinspecttask:dq_inspect_task:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
<a-button type="primary" v-auth="'dqinspecttask:dq_inspect_task:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
@@ -647,4 +647,14 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.status-row-1 td) {
|
||||||
|
background: #fffbe6 !important;
|
||||||
|
}
|
||||||
|
:deep(.status-row-2 td) {
|
||||||
|
background: #fff1f0 !important;
|
||||||
|
}
|
||||||
|
:deep(.status-row-3 td) {
|
||||||
|
background: #f6ffed !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -427,6 +427,7 @@ import { buildDeptLeaderAssignReason, normalizeDeptNames } from '/@/composables/
|
|||||||
provide('formDefaultReason', defaultHandleReason);
|
provide('formDefaultReason', defaultHandleReason);
|
||||||
provide('extraVars', formScope);
|
provide('extraVars', formScope);
|
||||||
provide('flowVars', computed(() => props.formData?.vars || {}));
|
provide('flowVars', computed(() => props.formData?.vars || {}));
|
||||||
|
provide('defaultCcUsers', defaultCcUsers);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initFormData();
|
initFormData();
|
||||||
|
|||||||
+19
-10
@@ -218,6 +218,7 @@
|
|||||||
const remarksDictOptions = ref([]);
|
const remarksDictOptions = ref([]);
|
||||||
const extraVars = inject('extraVars', ref({}));
|
const extraVars = inject('extraVars', ref({}));
|
||||||
const flowVars = inject('flowVars', ref({}));
|
const flowVars = inject('flowVars', ref({}));
|
||||||
|
const defaultCcUsers = inject('defaultCcUsers', ref([]));
|
||||||
|
|
||||||
function resolvePlaceholders(text) {
|
function resolvePlaceholders(text) {
|
||||||
if (!text) return '';
|
if (!text) return '';
|
||||||
@@ -325,18 +326,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function applyDefaultCcUsers(val) {
|
||||||
|
const list = (Array.isArray(val) ? val : []).filter((u) => u?.username);
|
||||||
|
if (!list.length) return;
|
||||||
|
checkedCc.value = true;
|
||||||
|
const usernames = list.map((u) => u.username);
|
||||||
|
const realnames = list.map((u) => u.realname);
|
||||||
|
ccUserIds.value = usernames.join(',');
|
||||||
|
model.ccUserIds = usernames.join(',');
|
||||||
|
model.ccUserRealNames = realnames.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.defaultCc,
|
() => props.defaultCc,
|
||||||
(val) => {
|
applyDefaultCcUsers,
|
||||||
const list = (Array.isArray(val) ? val : []).filter((u) => u?.username);
|
{ immediate: true }
|
||||||
if (!list.length) return;
|
);
|
||||||
checkedCc.value = true;
|
|
||||||
const usernames = list.map((u) => u.username);
|
watch(
|
||||||
const realnames = list.map((u) => u.realname);
|
() => defaultCcUsers.value,
|
||||||
ccUserIds.value = usernames.join(',');
|
applyDefaultCcUsers,
|
||||||
model.ccUserIds = usernames.join(',');
|
|
||||||
model.ccUserRealNames = realnames.join(',');
|
|
||||||
},
|
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user