yxk-20260509-党委会反馈表单
新增时,可上传附件
This commit is contained in:
@@ -18,26 +18,26 @@
|
|||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
>
|
>
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<!-- <a-col :span="12">-->
|
||||||
<a-form-item label="责任部门ID" name="responDeptid">
|
<!-- <a-form-item label="责任部门ID" name="responDeptid">-->
|
||||||
<a-input v-model:value="formData.responDeptid" allow-clear />
|
<!-- <a-input v-model:value="formData.responDeptid" allow-clear />-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
<a-col :span="12">
|
<!-- <a-col :span="12">-->
|
||||||
<a-form-item label="责任部门名称" name="responDeptname">
|
<!-- <a-form-item label="责任部门名称" name="responDeptname">-->
|
||||||
<a-input v-model:value="formData.responDeptname" allow-clear />
|
<!-- <a-input v-model:value="formData.responDeptname" allow-clear />-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
<a-col :span="12">
|
<!-- <a-col :span="12">-->
|
||||||
<a-form-item label="反馈人ID" name="responPersonid">
|
<!-- <a-form-item label="反馈人ID" name="responPersonid">-->
|
||||||
<a-input v-model:value="formData.responPersonid" allow-clear />
|
<!-- <a-input v-model:value="formData.responPersonid" allow-clear />-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
<a-col :span="12">
|
<!-- <a-col :span="12">-->
|
||||||
<a-form-item label="反馈人姓名" name="responPersonname">
|
<!-- <a-form-item label="反馈人姓名" name="responPersonname">-->
|
||||||
<a-input v-model:value="formData.responPersonname" allow-clear />
|
<!-- <a-input v-model:value="formData.responPersonname" allow-clear />-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="完成状态" name="bpmStatus">
|
<a-form-item label="完成状态" name="bpmStatus">
|
||||||
<a-input v-model:value="formData.bpmStatus" allow-clear />
|
<a-input v-model:value="formData.bpmStatus" allow-clear />
|
||||||
@@ -53,6 +53,17 @@
|
|||||||
<a-textarea v-model:value="formData.actualExect" :rows="4" allow-clear />
|
<a-textarea v-model:value="formData.actualExect" :rows="4" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="附件" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||||
|
<SUploadFile
|
||||||
|
:key="uploadKey"
|
||||||
|
ref="uploadFileRef"
|
||||||
|
:bussiness-id="formData.id"
|
||||||
|
:bussiness-secret-level="uploadSecretLevel"
|
||||||
|
:multiple="true"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</JModal>
|
</JModal>
|
||||||
@@ -65,6 +76,8 @@
|
|||||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||||
import { bgPartymatterFeedbackSaveOrUpdate } from '../BgPartymatter.api';
|
import { bgPartymatterFeedbackSaveOrUpdate } from '../BgPartymatter.api';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { buildUUID } from '/@/utils/uuid';
|
||||||
|
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||||
|
|
||||||
const emit = defineEmits(['success']);
|
const emit = defineEmits(['success']);
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
@@ -73,6 +86,9 @@
|
|||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const saving = ref(false);
|
const saving = ref(false);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
const uploadFileRef = ref<InstanceType<typeof SUploadFile> | null>(null);
|
||||||
|
const uploadSecretLevel = ref(1);
|
||||||
|
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: 3 } };
|
||||||
@@ -99,15 +115,22 @@
|
|||||||
formData[key] = '';
|
formData[key] = '';
|
||||||
});
|
});
|
||||||
formData.mainId = mainId;
|
formData.mainId = mainId;
|
||||||
|
uploadKey.value += 1;
|
||||||
nextTick(() => formRef.value?.clearValidate?.());
|
nextTick(() => formRef.value?.clearValidate?.());
|
||||||
}
|
}
|
||||||
|
|
||||||
function open(mainId: string) {
|
function open(mainId: string, secretLevel?: string | number) {
|
||||||
resetForm(mainId);
|
resetForm(mainId);
|
||||||
|
uploadSecretLevel.value = normalizeSecretLevel(secretLevel);
|
||||||
void applyCurrentUserFeedbackInfo();
|
void applyCurrentUserFeedbackInfo();
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function normalizeSecretLevel(value?: string | number) {
|
||||||
|
const level = Number(value);
|
||||||
|
return [1, 2, 3, 4].includes(level) ? level : 1;
|
||||||
|
}
|
||||||
|
|
||||||
function getCurrentLoginDepart() {
|
function getCurrentLoginDepart() {
|
||||||
const userInfo = (userStore.getUserInfo || {}) as Record<string, any>;
|
const userInfo = (userStore.getUserInfo || {}) as Record<string, any>;
|
||||||
const loginInfo = (userStore.getLoginInfo || {}) as Record<string, any>;
|
const loginInfo = (userStore.getLoginInfo || {}) as Record<string, any>;
|
||||||
@@ -162,8 +185,14 @@
|
|||||||
saving.value = true;
|
saving.value = true;
|
||||||
try {
|
try {
|
||||||
await applyCurrentUserFeedbackInfo();
|
await applyCurrentUserFeedbackInfo();
|
||||||
|
if (!formData.id && uploadFileRef.value?.hasPendingFiles?.()) {
|
||||||
|
formData.id = buildUUID();
|
||||||
|
}
|
||||||
const res = await bgPartymatterFeedbackSaveOrUpdate({ ...formData }, false);
|
const res = await bgPartymatterFeedbackSaveOrUpdate({ ...formData }, false);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (formData.id && uploadFileRef.value?.hasPendingFiles?.()) {
|
||||||
|
await uploadFileRef.value.bindBussinessId(formData.id);
|
||||||
|
}
|
||||||
createMessage.success(res.message || '保存成功');
|
createMessage.success(res.message || '保存成功');
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
emit('success');
|
emit('success');
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
createMessage.warning('主表数据不存在,无法新增反馈');
|
createMessage.warning('主表数据不存在,无法新增反馈');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
feedbackModalRef.value?.open(mainForm.id);
|
feedbackModalRef.value?.open(mainForm.id, mainForm.secretLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveSubApproveUserVariable() {
|
async function saveSubApproveUserVariable() {
|
||||||
|
|||||||
Reference in New Issue
Block a user