提交 893f18de authored 作者: liuluyu's avatar liuluyu

更新问题归档表单

上级 77f061e6
<template>
<a-modal :open="modelValue" :title="title" :width="600" :footer="null" @cancel="handleCancel" @update:open="handleOpenChange">
<div class="modal-content">
<div class="form-item">
<div class="form-label">执行部门:</div>
<div class="form-value">{{ formData.execDepCode || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">负责人:</div>
<div class="form-value">{{ formData.execUserId || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">实际开始日期:</div>
<div class="form-value">{{ formData.execStartDate || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">实际完成日期:</div>
<div class="form-value">{{ formData.execEndDate || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">整改落实情况:</div>
<div class="form-value">{{ formData.execRemark || '-' }}</div>
</div>
</div>
<template #footer>
<div class="modal-footer">
<a-button type="primary" @click="handleCancel">关闭</a-button>
</div>
</template>
</a-modal>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
// 定义组件props
const props = defineProps({
visible: {
type: Boolean,
default: false,
},
modelValue: {
type: Boolean,
default: false,
},
formData: {
type: Object,
default: () => ({}),
},
title: {
type: String,
default: '执行情况详情',
},
});
// 定义事件
const emit = defineEmits(['update:modelValue', 'cancel']);
// 处理modal打开状态变化
const handleOpenChange = (newVal) => {
emit('update:modelValue', newVal);
};
// 关闭弹窗
const handleCancel = () => {
emit('update:modelValue', false);
emit('cancel');
};
</script>
<style scoped lang="less">
.modal-content {
padding: 0 20px;
}
.form-item {
margin-bottom: 16px;
display: flex;
align-items: flex-start;
}
.form-label {
width: 120px;
font-weight: 500;
color: #333;
margin-right: 16px;
text-align: right;
padding-top: 6px;
}
.form-value {
flex: 1;
color: #666;
line-height: 1.5;
word-break: break-word;
}
.modal-footer {
text-align: center;
margin-top: 24px;
}
</style>
<template>
<a-modal :open="modelValue" :title="title" :width="600" :footer="null" @cancel="handleCancel" @update:open="handleOpenChange">
<div class="modal-content">
<div class="form-item">
<div class="form-label">成因分析:</div>
<div class="form-value">{{ formData.causeAnalysis || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">整改方案:</div>
<div class="form-value">{{ formData.rectifyPlan || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">整改周期:</div>
<div class="form-value">{{ formData.rectifyCycle || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">计划开始日期:</div>
<div class="form-value">{{ formData.planStartDate || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">计划结束日期:</div>
<div class="form-value">{{ formData.planEndDate || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">负责部门:</div>
<div class="form-value">{{ formData.headDepCode || '-' }}</div>
</div>
<div class="form-item">
<div class="form-label">负责人:</div>
<div class="form-value">{{ formData.headUserId || '-' }}</div>
</div>
</div>
<template #footer>
<div class="modal-footer">
<a-button type="primary" @click="handleCancel">关闭</a-button>
</div>
</template>
</a-modal>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
// 定义组件props
const props = defineProps({
visible: {
type: Boolean,
default: false,
},
modelValue: {
type: Boolean,
default: false,
},
formData: {
type: Object,
default: () => ({}),
},
title: {
type: String,
default: '整改计划详情',
},
});
// 定义事件
const emit = defineEmits(['update:modelValue', 'cancel']);
// 处理modal打开状态变化
const handleOpenChange = (newVal) => {
emit('update:modelValue', newVal);
};
// 关闭弹窗
const handleCancel = () => {
emit('update:modelValue', false);
emit('cancel');
};
</script>
<style scoped lang="less">
.modal-content {
padding: 0 20px;
}
.form-item {
margin-bottom: 16px;
display: flex;
align-items: flex-start;
}
.form-label {
width: 120px;
font-weight: 500;
color: #333;
margin-right: 16px;
text-align: right;
padding-top: 6px;
}
.form-value {
flex: 1;
color: #666;
line-height: 1.5;
word-break: break-word;
}
.modal-footer {
text-align: center;
margin-top: 24px;
}
</style>
...@@ -47,7 +47,6 @@ export const columns: BasicColumn[] = [ ...@@ -47,7 +47,6 @@ export const columns: BasicColumn[] = [
dataIndex: 'problemDes', dataIndex: 'problemDes',
resizable: true, resizable: true,
ifShow: false, ifShow: false,
}, },
{ {
title: '风险等级', title: '风险等级',
...@@ -185,12 +184,11 @@ export const formSchema: FormSchema[] = [ ...@@ -185,12 +184,11 @@ export const formSchema: FormSchema[] = [
{ {
label: '问题描述', label: '问题描述',
field: 'problemDes', field: 'problemDes',
component: 'JEditor', component: 'InputTextArea',
required: true, required: true,
componentProps: { componentProps: {
showCount: true,
maxlength: 512, maxlength: 512,
height: 220, rows: 3,
}, },
}, },
{ {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论