!131 fix(fixcontact): 反馈弹窗计划完成时间必填、长文本换行显示与办理情况区按节点权限显隐

Merge pull request !131 from wsm/feature/fix_contact_permession
This commit is contained in:
wsm
2026-08-03 07:04:37 +00:00
committed by Gitee
3 changed files with 58 additions and 19 deletions
@@ -1,5 +1,10 @@
import { h } from 'vue';
import { BasicColumn } from '/@/components/Table'; import { BasicColumn } from '/@/components/Table';
function renderWrappedText({ text }: any) {
return h('div', { style: 'white-space: pre-wrap; word-break: break-word;' }, text ?? '');
}
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '序号', title: '序号',
@@ -86,21 +91,24 @@ export const fixedContactFeedbackColumns: BasicColumn[] = [
}, },
{ {
title: '计划完成情况', title: '计划完成情况',
align: 'center', align: 'left',
dataIndex: 'planFinishStatus', dataIndex: 'planFinishStatus',
width: 160, width: 160,
customRender: renderWrappedText,
}, },
{ {
title: '处理意见、承办情况', title: '处理意见、承办情况',
align: 'center', align: 'left',
dataIndex: 'handleOpinion', dataIndex: 'handleOpinion',
width: 200, width: 200,
customRender: renderWrappedText,
}, },
{ {
title: '办结情况', title: '办结情况',
align: 'center', align: 'left',
dataIndex: 'finishStatus', dataIndex: 'finishStatus',
width: 160, width: 160,
customRender: renderWrappedText,
}, },
{ {
title: '实际完成时间', title: '实际完成时间',
@@ -114,9 +122,10 @@ export const fixedContactFeedbackColumns: BasicColumn[] = [
}, },
{ {
title: '实际完成情况', title: '实际完成情况',
align: 'center', align: 'left',
dataIndex: 'actualFinishStatus', dataIndex: 'actualFinishStatus',
width: 160, width: 160,
customRender: renderWrappedText,
}, },
{ {
title: '反馈人', title: '反馈人',
@@ -28,18 +28,18 @@
<a-col :span="24"> <a-col :span="24">
<a-tooltip :title="isEdit ? '' : '该信息后续不可编辑,请谨慎填写'"> <a-tooltip :title="isEdit ? '' : '该信息后续不可编辑,请谨慎填写'">
<a-form-item label="计划完成情况" name="planFinishStatus" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol"> <a-form-item label="计划完成情况" name="planFinishStatus" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
<a-textarea v-model:value="formData.planFinishStatus" :rows="3" :disabled="isEdit" allow-clear /> <a-textarea v-model:value="formData.planFinishStatus" :auto-size="{ minRows: 3 }" :disabled="isEdit" allow-clear />
</a-form-item> </a-form-item>
</a-tooltip> </a-tooltip>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="处理意见、承办情况" name="handleOpinion" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol"> <a-form-item label="处理意见、承办情况" name="handleOpinion" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
<a-textarea v-model:value="formData.handleOpinion" :rows="3" allow-clear /> <a-textarea v-model:value="formData.handleOpinion" :auto-size="{ minRows: 3 }" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="办结情况" name="finishStatus" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol"> <a-form-item label="办结情况" name="finishStatus" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
<a-textarea v-model:value="formData.finishStatus" :rows="3" allow-clear /> <a-textarea v-model:value="formData.finishStatus" :auto-size="{ minRows: 3 }" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@@ -89,8 +89,8 @@
const uploadKey = ref(0); const uploadKey = ref(0);
const labelCol = { xs: { span: 24 }, sm: { span: 7 } }; const labelCol = { xs: { span: 24 }, sm: { span: 7 } };
const wrapperCol = { xs: { span: 24 }, sm: { span: 17 } }; const wrapperCol = { xs: { span: 24 }, sm: { span: 17 } };
const wideLabelCol = { xs: { span: 24 }, sm: { span: 3 } }; const wideLabelCol = { xs: { span: 24 }, sm: { span: 5 } };
const wideWrapperCol = { xs: { span: 24 }, sm: { span: 21 } }; const wideWrapperCol = { xs: { span: 24 }, sm: { span: 19 } };
const feedbackSaveUrl = '/bg/fixcontact/fixedContact20260730/addFixedContactFeedback20260730'; const feedbackSaveUrl = '/bg/fixcontact/fixedContact20260730/addFixedContactFeedback20260730';
const feedbackEditUrl = '/bg/fixcontact/fixedContact20260730/editFixedContactFeedback20260730'; const feedbackEditUrl = '/bg/fixcontact/fixedContact20260730/editFixedContactFeedback20260730';
@@ -110,6 +110,7 @@
}); });
const formRules = { const formRules = {
planFinishTime: [{ required: true, message: '请选择计划完成时间' }],
planFinishStatus: [{ required: true, message: '请输入计划完成情况' }], planFinishStatus: [{ required: true, message: '请输入计划完成情况' }],
}; };
@@ -206,5 +207,9 @@
<style lang="less" scoped> <style lang="less" scoped>
.bpm-feedback-modal-form { .bpm-feedback-modal-form {
padding: 12px 8px 0; padding: 12px 8px 0;
:deep(textarea.ant-input) {
min-height: 88px;
}
} }
</style> </style>
@@ -118,7 +118,7 @@
<a-divider /> <a-divider />
<div class="feedback-header section-toolbar"> <div class="feedback-header section-toolbar" v-if="showFeedbackInfo">
<div class="section-title">办理情况</div> <div class="section-title">办理情况</div>
<a-space class="section-actions"> <a-space class="section-actions">
<a-tooltip v-if="showAddFeedback" title="可以多次新增反馈"> <a-tooltip v-if="showAddFeedback" title="可以多次新增反馈">
@@ -139,7 +139,7 @@
</a-space> </a-space>
</div> </div>
<a-table <a-table
v-if="showFeedbackDetail" v-if="showFeedbackInfo && showFeedbackDetail"
rowKey="id" rowKey="id"
size="small" size="small"
bordered bordered
@@ -181,6 +181,7 @@
<TaskHandleInnerContent <TaskHandleInnerContent
:form-data="formData" :form-data="formData"
:claim="claim" :claim="claim"
:showSelnextUser="showSelnextUser"
:beforeHandle="saveMainFormBeforeProcessHandle" :beforeHandle="saveMainFormBeforeProcessHandle"
@success="handleProcessSuccess" @success="handleProcessSuccess"
@claimSuccess="handleClaimSuccess" @claimSuccess="handleClaimSuccess"
@@ -191,7 +192,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onMounted, reactive, ref, watch } from 'vue'; import { computed, h, onMounted, reactive, ref, watch } from 'vue';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
@@ -251,15 +252,19 @@
superviseCount: '', superviseCount: '',
}); });
function renderWrappedCell({ text }: Recordable) {
return h('div', { style: 'white-space: pre-wrap; word-break: break-word;' }, text ?? '');
}
const feedbackBaseColumns = [ const feedbackBaseColumns = [
{ title: '反馈部门', dataIndex: 'feedbackDept_dictText', align: 'center', width: 160 }, { title: '反馈部门', dataIndex: 'feedbackDept_dictText', align: 'center', width: 160 },
{ title: '反馈人', dataIndex: 'feedbackUser_dictText', align: 'center', width: 120 }, { title: '反馈人', dataIndex: 'feedbackUser_dictText', align: 'center', width: 120 },
{ title: '计划完成时间', dataIndex: 'planFinishTime', align: 'center', width: 130, customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)) }, { title: '计划完成时间', dataIndex: 'planFinishTime', align: 'center', width: 130, customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)) },
{ title: '计划完成情况', dataIndex: 'planFinishStatus', align: 'center', width: 260 }, { title: '计划完成情况', dataIndex: 'planFinishStatus', align: 'left', width: 260, customRender: renderWrappedCell },
{ title: '处理意见、承办情况', dataIndex: 'handleOpinion', align: 'center', width: 260 }, { title: '处理意见、承办情况', dataIndex: 'handleOpinion', align: 'left', width: 260, customRender: renderWrappedCell },
{ title: '办结情况', dataIndex: 'finishStatus', align: 'center', width: 200 }, { title: '办结情况', dataIndex: 'finishStatus', align: 'left', width: 200, customRender: renderWrappedCell },
{ title: '实际完成时间', dataIndex: 'actualFinishTime', align: 'center', width: 130, customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)) }, { title: '实际完成时间', dataIndex: 'actualFinishTime', align: 'center', width: 130, customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)) },
{ title: '实际完成情况', dataIndex: 'actualFinishStatus', align: 'center', width: 200 }, { title: '实际完成情况', dataIndex: 'actualFinishStatus', align: 'left', width: 200, customRender: renderWrappedCell },
{ title: '附件', dataIndex: 'id', key: 'attachments', align: 'left', width: 340 }, { title: '附件', dataIndex: 'id', key: 'attachments', align: 'left', width: 340 },
]; ];
const feedbackActionColumn = { title: '操作', dataIndex: 'action', key: 'action', align: 'center', width: 120, fixed: 'right' }; const feedbackActionColumn = { title: '操作', dataIndex: 'action', key: 'action', align: 'center', width: 120, fixed: 'right' };
@@ -276,9 +281,21 @@
} }
return props.formDisabled; return props.formDisabled;
}); });
const showProcessHandle = computed(() => props.formBpm && props.formData?.PROCESS_TAB_TYPE === 'run' && !!props.formData?.taskId); const showProcessHandle = computed(() => {
const canManageFeedback = computed(() => props.formBpm && props.formData?.PROCESS_TAB_TYPE === 'run' && !!props.formData?.taskId); const explicit = props.formData?.extendUrlParams?.showProcessHandle;
const showAddFeedback = computed(() => String(props.formData?.extendUrlParams?.addfeedback ?? '') === '1'); if (explicit === '0') return false;
if (explicit === '1') return true;
return props.formBpm && props.formData?.PROCESS_TAB_TYPE === 'run' && !!props.formData?.taskId;
});
const canManageFeedback = computed(() => {
const explicit = props.formData?.extendUrlParams?.showEditFeedback ?? props.formData?.extendUrlParams?.editfeedback;
if (explicit === '0') return false;
if (explicit === '1') return true;
return props.formBpm && props.formData?.PROCESS_TAB_TYPE === 'run' && !!props.formData?.taskId;
});
const showAddFeedback = computed(
() => String(props.formData?.extendUrlParams?.showAddFeedback ?? props.formData?.extendUrlParams?.addfeedback ?? '') === '1'
);
const processInfo = computed(() => ({ const processInfo = computed(() => ({
taskId: props.formData?.taskId, taskId: props.formData?.taskId,
@@ -294,6 +311,14 @@
processDataId: props.formData?.processDataId, processDataId: props.formData?.processDataId,
processTableName: props.formData?.processTableName, processTableName: props.formData?.processTableName,
})); }));
const showFeedbackInfo = computed(() => {
const explicit = props.formData?.extendUrlParams?.showFeedbackInfo;
if (explicit === '0') return false;
if (explicit === '1') return true;
const hasProcess = processInfo.value.taskId || processInfo.value.processInstanceId;
return !!hasProcess;
});
const showSelnextUser = computed(() => String(props.formData?.extendUrlParams?.showSelnextUser ?? '') === '1');
onMounted(() => { onMounted(() => {
initFormData(); initFormData();