|
|
@@ -192,55 +192,64 @@
|
|
|
placeholder="请输入成果概述"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-divider v-if="formData.extAttributes.length" content-position="center"
|
|
|
- >详细信息</el-divider
|
|
|
- >
|
|
|
- <div v-loading="extendLoading">
|
|
|
- <el-form-item
|
|
|
- v-for="(attribute, index) in formData.extAttributes"
|
|
|
- :key="attribute.identifier || index"
|
|
|
- :label="attribute.name"
|
|
|
- :prop="`extAttributes.${index}.actualValue`"
|
|
|
- :rules="getAttributeRules(attribute)"
|
|
|
- label-width="130px"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-if="attribute.dataType === 'dropdown'"
|
|
|
- v-model="attribute.actualValue"
|
|
|
- placeholder="请选择"
|
|
|
- clearable
|
|
|
- class="w-full"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="option in attribute.dropdownList || []"
|
|
|
- :key="option.value"
|
|
|
- :label="option.name"
|
|
|
- :value="option.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- <el-date-picker
|
|
|
- v-else-if="attribute.dataType === 'date'"
|
|
|
- v-model="attribute.dateValue"
|
|
|
- type="date"
|
|
|
- placeholder="请选择日期"
|
|
|
- class="w-full"
|
|
|
- />
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="attribute.actualValue"
|
|
|
- :placeholder="`请输入${attribute.name}`"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
+ <div class="form-extra-sections">
|
|
|
+ <div v-if="formData.extAttributes.length" class="form-extra-section">
|
|
|
+ <el-divider content-position="center">详细信息</el-divider>
|
|
|
+ <div v-loading="extendLoading" class="form-attribute-grid">
|
|
|
+ <div
|
|
|
+ v-for="(attribute, index) in formData.extAttributes"
|
|
|
+ :key="attribute.identifier || index"
|
|
|
+ >
|
|
|
+ <el-form-item
|
|
|
+ :label="attribute.name"
|
|
|
+ :prop="`extAttributes.${index}.actualValue`"
|
|
|
+ :rules="getAttributeRules(attribute)"
|
|
|
+ label-width="130px"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-if="attribute.dataType === 'dropdown'"
|
|
|
+ v-model="attribute.actualValue"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ class="w-full"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="option in attribute.dropdownList || []"
|
|
|
+ :key="option.value"
|
|
|
+ :label="option.name"
|
|
|
+ :value="option.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-date-picker
|
|
|
+ v-else-if="attribute.dataType === 'date'"
|
|
|
+ v-model="attribute.dateValue"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择日期"
|
|
|
+ class="w-full"
|
|
|
+ />
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model="attribute.actualValue"
|
|
|
+ :placeholder="`请输入${attribute.name}`"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="attachmentGroups.length" class="form-extra-section">
|
|
|
+ <el-divider content-position="center">附件资料</el-divider>
|
|
|
+ <div class="form-attachment-grid">
|
|
|
+ <el-form-item v-for="group in attachmentGroups" :key="group.type" :label="group.label">
|
|
|
+ <UploadFile
|
|
|
+ v-model="attachmentFiles[group.type]"
|
|
|
+ :file-type="['pdf', 'png', 'jpg', 'jpeg']"
|
|
|
+ :return-object="true"
|
|
|
+ :limit="10"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <el-divider v-if="attachmentGroups.length" content-position="center">附件资料</el-divider>
|
|
|
- <el-form-item v-for="group in attachmentGroups" :key="group.type" :label="group.label">
|
|
|
- <UploadFile
|
|
|
- v-model="attachmentFiles[group.type]"
|
|
|
- :file-type="['pdf', 'png', 'jpg', 'jpeg']"
|
|
|
- :return-object="true"
|
|
|
- :limit="10"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<el-button type="primary" :loading="formLoading" @click="submitForm">确定</el-button>
|
|
|
@@ -753,6 +762,31 @@ onMounted(async () => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+.form-extra-sections {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 4px;
|
|
|
+}
|
|
|
+
|
|
|
+.form-extra-section {
|
|
|
+ min-width: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.form-attribute-grid,
|
|
|
+.form-attachment-grid {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
|
+ gap: 0 20px;
|
|
|
+ align-items: start;
|
|
|
+}
|
|
|
+
|
|
|
+@media (max-width: 640px) {
|
|
|
+ .form-attribute-grid,
|
|
|
+ .form-attachment-grid {
|
|
|
+ grid-template-columns: 1fr;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
.achievement-detail {
|
|
|
max-height: 68vh;
|
|
|
overflow-y: auto;
|