AchPatentForm.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. <template>
  2. <view class="document-form">
  3. <uv-loading-icon v-if="loading" mode="circle" text="正在加载专利详情..."></uv-loading-icon>
  4. <template v-else-if="form">
  5. <!-- 基本信息 -->
  6. <CommonSection title="基本信息" :isFirst="true">
  7. <CommonInfoRow label="专利名称" :value="form.patentName" />
  8. <CommonInfoRow label="所属科室" :value="form.deptName" />
  9. <!-- <CommonInfoRow label="代理公司" :value="form.companyName" /> -->
  10. <CommonInfoRow label="专利类型" :value="getDictLabel('sci_patent_class', form.patentClass)" />
  11. <CommonInfoRow label="专利范围" :value="getDictLabel('sci_patent_scope', form.patentScope)" />
  12. <CommonInfoRow label="专利状态" :value="getDictLabel('sci_patent_condition', form.patentCondition)" />
  13. <CommonInfoRow label="专利(申请)号" :value="form.patentNumber" />
  14. <CommonInfoRow label="申请人" :value="form.applicantName" />
  15. <CommonInfoRow label="第几参与人" :value="form.patentApplicationCode" />
  16. <CommonInfoRow label="申请日期" :value="formatDate(form.patentApplicationDate)" />
  17. <CommonInfoRow label="分类号" :value="form.classNum" />
  18. <CommonInfoRow label="公开号" :value="form.patentPublicCode" />
  19. <CommonInfoRow label="公开日期" :value="formatDate(form.patentPublicDate)" />
  20. <CommonInfoRow label="授权号" :value="form.patentAccreditCode" />
  21. <CommonInfoRow label="授权日期" :value="formatDate(form.effectiveTime)" />
  22. <CommonInfoRow label="署名" :value="getDictLabel('sci_circuit_signature', form.patentSchoolSignature)
  23. " />
  24. <CommonInfoRow label="专利权人" :value="form.patentObligee" />
  25. <CommonInfoRow label="专利代理机构" :value="form.entrustUnit" />
  26. <CommonInfoRow label="代理人" :value="form.agencyUserName" />
  27. <CommonInfoRow label="代理人联系电话" :value="form.agencyPhone" />
  28. <CommonInfoRow label="专利文献出版日" :value="formatDate(form.publicationDate)" />
  29. <CommonInfoRow label="所属年份" :value="form.patentYeat" />
  30. <CommonInfoRow label="是否失效" :value="form.patentEffectiveness === '10' ? '是' : '否'" />
  31. <CommonInfoRow label="合作类型" :value="getDictLabel('sci_cooperation', form.patentCooperation)" />
  32. <CommonInfoRow label="是否职务专利" :value="form.patentOffice === '10' ? '是' : '否'" />
  33. <CommonInfoRow label="是否为PCT专利" :value="form.patentCt === '10' ? '是' : '否'" />
  34. <CommonInfoRow label="成果权属" :value="getDictLabel('achievement_owner_unit', form.achievementOwnerUnit)
  35. " />
  36. <CommonInfoRow label="所属平台">
  37. <view class="platform-tags">
  38. <template v-if="platformList.length > 0">
  39. <uv-tags v-for="(p, index) in platformList" :key="index" :text="p.platformName === '其他'
  40. ? '其他'
  41. : p.platformType
  42. ? p.platformName + ' (' + p.platformType + ')'
  43. : p.platformName
  44. " type="primary" plain size="mini" class="mr5"></uv-tags>
  45. </template>
  46. <text v-else>-</text>
  47. </view>
  48. </CommonInfoRow>
  49. <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
  50. <!-- 专利转化特有字段 -->
  51. <template v-if="code.includes('专利转化')">
  52. <CommonInfoRow label="转化时间" :value="formatDate(form.invertTime)" />
  53. <CommonInfoRow label="转化金额" :value="(form.invertAmount || '0') + ' 元'" isAmount />
  54. <CommonInfoRow label="转化单位" :value="form.invertUnit" />
  55. <CommonInfoRow label="知识产权交易类型" :value="form.tradeType === '10'
  56. ? '转让'
  57. : form.tradeType === '20'
  58. ? '许可'
  59. : '-'
  60. " />
  61. </template>
  62. <CommonInfoRow label="专利简介" :value="form.patentDesc" isColumn />
  63. </CommonSection>
  64. <!-- 发明(设计)人信息 -->
  65. <CommonSection title="发明(设计)人信息" v-if="form.memberList?.length">
  66. <view class="member-list">
  67. <view class="member-item" v-for="(member, index) in form.memberList" :key="index">
  68. <view class="member-avatar">{{ Number(index) + 1 }}</view>
  69. <view class="member-body">
  70. <view class="member-header">
  71. <text class="name">{{ member.memberName }}</text>
  72. <text class="badge" :class="'badge-' + getMemberBadgeType(member.memberType)">
  73. {{ getDictLabel("sci_paper_member_type", member.memberType) }}
  74. </text>
  75. </view>
  76. <view class="member-tags">
  77. <text class="tag" v-if="member.degree">{{
  78. getDictLabel("sci_academic_degree", member.degree)
  79. }}</text>
  80. <text class="tag" v-if="member.education">{{
  81. getDictLabel("sci_education", member.education)
  82. }}</text>
  83. <text class="tag" v-if="member.jobTitle">{{
  84. getDictLabel("sci_discipline_job_title", member.jobTitle)
  85. }}</text>
  86. </view>
  87. <view class="member-meta">
  88. <view class="meta-item" v-if="member.order">
  89. <text class="meta-label">排名</text>
  90. <text class="meta-value">{{ member.order }}</text>
  91. </view>
  92. <view class="meta-item" v-if="member.contributionRate">
  93. <text class="meta-label">贡献率</text>
  94. <text class="meta-value">{{ member.contributionRate }}%</text>
  95. </view>
  96. </view>
  97. <view class="member-dept" v-if="member.deptName">
  98. <uv-icon name="home" size="24rpx" color="#909399"></uv-icon>
  99. <text>{{ member.deptName }}</text>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </CommonSection>
  105. <!-- 附件信息 -->
  106. <AttachmentList :list="mergedFileList" title="相关附件" />
  107. <!-- 标注经济来源 -->
  108. <CommonSection title="标注经济来源" v-if="form.projList?.length">
  109. <view class="achievement-card" v-for="(row, index) in form.projList" :key="index">
  110. <view class="a-row">
  111. <text class="al">关联类型:</text>
  112. <text class="av">{{
  113. row.sourceType === "10" ? "项目" : "学科"
  114. }}</text>
  115. </view>
  116. <view class="a-row">
  117. <text class="al">项目/学科:</text>
  118. <text class="av">{{ row.projectSource || "-" }}</text>
  119. </view>
  120. </view>
  121. </CommonSection>
  122. <!-- 审批信息 -->
  123. <CommonSection title="审批信息" v-if="form.id">
  124. <FlowTable :id="form.id" :businessCode="'学术专利-' + form.patentCode" defCode="sci_academic_achievement" />
  125. </CommonSection>
  126. <!-- 转化审批信息 -->
  127. <CommonSection title="转化审批信息" v-if="form.id && code.includes('专利转化')">
  128. <FlowTable :id="form.id" :businessCode="'专利转化-' + form.patentCode" defCode="sci_academic_achievement" />
  129. </CommonSection>
  130. </template>
  131. <uv-empty v-else mode="data" text="暂无数据"></uv-empty>
  132. </view>
  133. </template>
  134. <script setup lang="ts">
  135. import { ref, onMounted, watch, computed } from "vue";
  136. import { useDict } from "@/hooks/useDict";
  137. import { useDocumentApi } from "@/api/document";
  138. import { formatDate } from "@/utils/date";
  139. import to from "await-to-js";
  140. import AttachmentList from "./AttachmentList.vue";
  141. import FlowTable from "@/pages/project/components/detail/FlowTable.vue";
  142. import CommonSection from "@/components/ui/CommonSection.vue";
  143. import CommonInfoRow from "@/components/ui/CommonInfoRow.vue";
  144. const props = defineProps<{
  145. code: string;
  146. }>();
  147. const { getDictLabel } = useDict(
  148. "sci_patent_class",
  149. "sci_patent_scope",
  150. "sci_patent_condition",
  151. "sci_circuit_signature",
  152. "sci_cooperation",
  153. "achievement_owner_unit",
  154. "sci_paper_member_type",
  155. "sci_academic_degree",
  156. "sci_education",
  157. "sci_discipline_job_title"
  158. );
  159. const documentApi = useDocumentApi();
  160. const form = ref<any>(null);
  161. const loading = ref(false);
  162. const platformList = computed(() => {
  163. if (form.value?.belongPlatform) {
  164. try {
  165. const data = JSON.parse(form.value.belongPlatform);
  166. return Array.isArray(data) ? data : [];
  167. } catch (e) {
  168. if (form.value.belongPlatform === "其他")
  169. return [{ platformName: "其他" }];
  170. return [{ platformName: form.value.belongPlatform }];
  171. }
  172. }
  173. return [];
  174. });
  175. const mergedFileList = computed(() => {
  176. if (!form.value) return [];
  177. const list: any[] = [];
  178. if (form.value.patentFile) {
  179. try {
  180. const file = JSON.parse(form.value.patentFile);
  181. list.push({ ...file, fileType: "专利附件" });
  182. } catch (e) { }
  183. }
  184. if (form.value.agencyContractFile) {
  185. try {
  186. const file = JSON.parse(form.value.agencyContractFile);
  187. list.push({ ...file, fileType: "委托合同" });
  188. } catch (e) { }
  189. }
  190. if (form.value.invertUrl) {
  191. try {
  192. const file = JSON.parse(form.value.invertUrl);
  193. list.push({ ...file, fileType: "转化附件" });
  194. } catch (e) { }
  195. }
  196. return list;
  197. });
  198. const fetchData = async () => {
  199. if (!props.code) return;
  200. loading.value = true;
  201. const patentCode = props.code.includes("-")
  202. ? props.code.split("-")[1]
  203. : props.code;
  204. const [err, res] = await to(documentApi.getPatentByCode(patentCode));
  205. if (!err && res?.data) {
  206. form.value = res.data;
  207. }
  208. loading.value = false;
  209. };
  210. onMounted(() => {
  211. fetchData();
  212. });
  213. watch(
  214. () => props.code,
  215. () => {
  216. fetchData();
  217. }
  218. );
  219. const getMemberBadgeType = (type: string) => {
  220. const map: Record<string, string> = {
  221. "10": "primary",
  222. "20": "success",
  223. "30": "warning",
  224. };
  225. return map[type] || "default";
  226. };
  227. </script>
  228. <style lang="scss" scoped>
  229. @import "./common.scss";
  230. .member-list {
  231. .member-item {
  232. display: flex;
  233. align-items: flex-start;
  234. background: #fff;
  235. border: 2rpx solid #f0f2f5;
  236. border-radius: 16rpx;
  237. padding: 24rpx;
  238. margin-bottom: 20rpx;
  239. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.04);
  240. &:last-child {
  241. margin-bottom: 0;
  242. }
  243. }
  244. .member-avatar {
  245. width: 56rpx;
  246. height: 56rpx;
  247. background: linear-gradient(135deg, #2979ff 0%, #1a66ff 100%);
  248. color: #fff;
  249. border-radius: 50%;
  250. display: flex;
  251. align-items: center;
  252. justify-content: center;
  253. font-size: 26rpx;
  254. font-weight: 600;
  255. flex-shrink: 0;
  256. margin-right: 20rpx;
  257. }
  258. .member-body {
  259. flex: 1;
  260. min-width: 0;
  261. }
  262. .member-header {
  263. display: flex;
  264. align-items: center;
  265. margin-bottom: 16rpx;
  266. flex-wrap: wrap;
  267. .name {
  268. font-size: 32rpx;
  269. font-weight: 600;
  270. color: #1a1a1a;
  271. margin-right: 16rpx;
  272. }
  273. .badge {
  274. font-size: 22rpx;
  275. padding: 4rpx 16rpx;
  276. border-radius: 20rpx;
  277. color: #fff;
  278. }
  279. .badge-primary {
  280. background: #2979ff;
  281. }
  282. .badge-success {
  283. background: #19be6b;
  284. }
  285. .badge-warning {
  286. background: #ff9900;
  287. }
  288. .badge-default {
  289. background: #909399;
  290. }
  291. }
  292. .member-tags {
  293. display: flex;
  294. flex-wrap: wrap;
  295. margin-bottom: 16rpx;
  296. .tag {
  297. font-size: 24rpx;
  298. color: #606266;
  299. background: #f4f4f5;
  300. padding: 6rpx 16rpx;
  301. border-radius: 8rpx;
  302. margin-right: 12rpx;
  303. margin-bottom: 8rpx;
  304. &:last-child {
  305. margin-right: 0;
  306. }
  307. }
  308. }
  309. .member-meta {
  310. display: flex;
  311. flex-wrap: wrap;
  312. margin-bottom: 12rpx;
  313. .meta-item {
  314. display: flex;
  315. align-items: center;
  316. margin-right: 32rpx;
  317. margin-bottom: 8rpx;
  318. &:last-child {
  319. margin-right: 0;
  320. }
  321. .meta-label {
  322. font-size: 24rpx;
  323. color: #909399;
  324. margin-right: 8rpx;
  325. }
  326. .meta-value {
  327. font-size: 24rpx;
  328. color: #606266;
  329. font-weight: 500;
  330. }
  331. }
  332. }
  333. .member-dept {
  334. display: flex;
  335. align-items: center;
  336. font-size: 24rpx;
  337. color: #909399;
  338. text {
  339. margin-left: 8rpx;
  340. }
  341. }
  342. }
  343. </style>