yanghao hace 4 semanas
padre
commit
be02dfd4e9
Se han modificado 2 ficheros con 82 adiciones y 194 borrados
  1. 0 146
      src/views/findings/copyright/data.js
  2. 82 48
      src/views/findings/copyright/index.vue

+ 0 - 146
src/views/findings/copyright/data.js

@@ -1,146 +0,0 @@
-;[
-  {
-    name: '发明人',
-    identifier: 'jointInventors',
-    dataType: 'text',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '0',
-    sort: 1,
-    actualValue: '张三',
-    dropdownList: null
-  },
-  {
-    name: '是否有出质',
-    identifier: 'pledged',
-    dataType: 'dropdown',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '',
-    sort: 1,
-    actualValue: '是',
-    dropdownList: [
-      {
-        name: '是',
-        value: '是'
-      },
-      {
-        name: '否',
-        value: '否'
-      }
-    ]
-  },
-  {
-    name: '是否自主申报',
-    identifier: 'selfDeclared',
-    dataType: 'dropdown',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '',
-    sort: 1,
-    actualValue: '否',
-    dropdownList: [
-      {
-        name: '是',
-        value: '是'
-      },
-      {
-        name: '否',
-        value: '否'
-      }
-    ]
-  },
-  {
-    name: '下次缴费截止日期',
-    identifier: 'nextPaymentDate',
-    dataType: 'date',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '0',
-    sort: 1,
-    actualValue: '1787383290000',
-    dropdownList: null
-  },
-  {
-    name: '最近缴费日期',
-    identifier: 'lastPaymentDate',
-    dataType: 'date',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '0',
-    sort: 1,
-    actualValue: '1784704890000',
-    dropdownList: null
-  },
-  {
-    name: '有效期限',
-    identifier: 'validUntil',
-    dataType: 'date',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '0',
-    sort: 1,
-    actualValue: '2100324090000',
-    dropdownList: null
-  },
-  {
-    name: '授权公告日',
-    identifier: 'grantDate',
-    dataType: 'date',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '0',
-    sort: 1,
-    actualValue: '1784704890000',
-    dropdownList: null
-  },
-  {
-    name: '申请日',
-    identifier: 'applicationDate',
-    dataType: 'date',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '0',
-    sort: 1,
-    actualValue: '1779434490000',
-    dropdownList: null
-  },
-  {
-    name: '专利号',
-    identifier: 'patentNo',
-    dataType: 'text',
-    required: 0,
-    unit: '',
-    accessMode: 'rw',
-    defaultValue: '',
-    maxValue: '',
-    minValue: '0',
-    sort: 1,
-    actualValue: 'YFZL20260823',
-    dropdownList: null
-  }
-]

+ 82 - 48
src/views/findings/copyright/index.vue

@@ -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;