From 2d6e8ad5a638afb5697aa404d8bcc5d289dc6fba Mon Sep 17 00:00:00 2001 From: TianyangZhang Date: Tue, 4 Nov 2025 13:40:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20srm-=20=E5=A2=9E=E5=8A=A0=E7=A7=91?= =?UTF-8?q?=E7=A0=94=E7=AE=A1=E7=90=86=E5=AE=A1=E6=89=B9=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/ofm.js | 75 +--- src/api/model/srm.js | 165 +++++++++ src/views/srm/paperlist.vue | 449 +++++++++++++++++++++++ src/views/{ofm => srm}/paperse.vue | 4 +- src/views/{ofm => srm}/paperse_form.vue | 6 +- src/views/{ofm => srm}/patent.vue | 4 +- src/views/{ofm => srm}/patent_form.vue | 6 +- src/views/srm/patentlist.vue | 468 ++++++++++++++++++++++++ 8 files changed, 1093 insertions(+), 84 deletions(-) create mode 100644 src/api/model/srm.js create mode 100644 src/views/srm/paperlist.vue rename src/views/{ofm => srm}/paperse.vue (98%) rename src/views/{ofm => srm}/paperse_form.vue (97%) rename src/views/{ofm => srm}/patent.vue (98%) rename src/views/{ofm => srm}/patent_form.vue (97%) create mode 100644 src/views/srm/patentlist.vue diff --git a/src/api/model/ofm.js b/src/api/model/ofm.js index bdd39a0a..40c14a62 100644 --- a/src/api/model/ofm.js +++ b/src/api/model/ofm.js @@ -288,78 +288,5 @@ export default { } } }, - patentinfo: { - list: { - url: `${config.API_URL}/ofm/patentinfo/`, - name: "专利列表", - req: async function(data){ - return await http.get(this.url, data); - } - }, - item: { - name: "专利详情", - req: async function(id){ - return await http.get( `${config.API_URL}/ofm/patentinfo/${id}/`); - } - }, - create: { - url: `${config.API_URL}/ofm/patentinfo/`, - name: "专利创建", - req: async function(data){ - return await http.post(this.url, data); - } - }, - update: { - name: "专利更新", - req: async function(id, data){ - return await http.put( - `${config.API_URL}/ofm/patentinfo/${id}/`, - data - ); - } - }, - delete: { - name: "专利删除", - req: async function(id){ - return await http.delete(`${config.API_URL}/ofm/patentinfo/${id}/`); - } - } - }, - papersecret: { - list: { - url: `${config.API_URL}/ofm/paperse/`, - name: "论文列表", - req: async function(data){ - return await http.get(this.url, data); - } - }, - item: { - name: "论文详情", - req: async function(id){ - return await http.get( `${config.API_URL}/ofm/paperse/${id}/`); - } - }, - create: { - url: `${config.API_URL}/ofm/paperse/`, - name: "论文创建", - req: async function(data){ - return await http.post(this.url, data); - } - }, - update: { - name: "论文更新", - req: async function(id, data){ - return await http.put( - `${config.API_URL}/ofm/paperse/${id}/`, - data - ); - } - }, - delete: { - name: "删除论文", - req: async function(id){ - return await http.delete(`${config.API_URL}/ofm/paperse/${id}/`); - } - } - }, + } diff --git a/src/api/model/srm.js b/src/api/model/srm.js new file mode 100644 index 00000000..a393189c --- /dev/null +++ b/src/api/model/srm.js @@ -0,0 +1,165 @@ +import config from "@/config" +import http from "@/utils/request" + +export default { +patentinfo: { + list: { + url: `${config.API_URL}/srm/patentinfo/`, + name: "专利列表", + req: async function(data){ + return await http.get(this.url, data); + } + }, + item: { + name: "专利详情", + req: async function(id){ + return await http.get( `${config.API_URL}/srm/patentinfo/${id}/`); + } + }, + create: { + url: `${config.API_URL}/srm/patentinfo/`, + name: "专利创建", + req: async function(data){ + return await http.post(this.url, data); + } + }, + update: { + name: "专利更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/srm/patentinfo/${id}/`, + data + ); + } + }, + delete: { + name: "专利删除", + req: async function(id){ + return await http.delete(`${config.API_URL}/srm/patentinfo/${id}/`); + } + }, + }, + papersecret: { + list: { + url: `${config.API_URL}/srm/paperse/`, + name: "论文列表", + req: async function(data){ + return await http.get(this.url, data); + } + }, + item: { + name: "论文详情", + req: async function(id){ + return await http.get( `${config.API_URL}/srm/paperse/${id}/`); + } + }, + create: { + url: `${config.API_URL}/srm/paperse/`, + name: "论文创建", + req: async function(data){ + return await http.post(this.url, data); + } + }, + update: { + name: "论文更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/srm/paperse/${id}/`, + data + ); + } + }, + delete: { + name: "删除论文", + req: async function(id){ + return await http.delete(`${config.API_URL}/srm/paperse/${id}/`); + } + } + }, + patentrecord: { + list: { + url: `${config.API_URL}/srm/patentrecord/`, + name: "专利台账列表", + req: async function(data){ + return await http.get(this.url, data); + } + }, + item: { + name: "专利台账详情", + req: async function(id){ + return await http.get( `${config.API_URL}/srm/patentrecord/${id}/`); + } + }, + create: { + url: `${config.API_URL}/srm/patentrecord/`, + name: "专利台账创建", + req: async function(data){ + return await http.post(this.url, data); + } + }, + update: { + name: "专利台账更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/srm/patentrecord/${id}/`, + data + ); + } + }, + delete: { + name: "删除专利台账", + req: async function(id){ + return await http.delete(`${config.API_URL}/srm/patentrecord/${id}/`); + } + }, + get_name: { + name: "获取专利名称列表", + req: async function(search=''){ + return await http.get(`${config.API_URL}/srm/patentrecord/patent_name/`,{params: { search }}); + } + }, + }, + paperrecord: { + list: { + url: `${config.API_URL}/srm/paperrecord/`, + name: "论文台账列表", + req: async function(data){ + return await http.get(this.url, data); + } + }, + item: { + name: "论文台账详情", + req: async function(id){ + return await http.get( `${config.API_URL}/srm/paperrecord/${id}/`); + } + }, + create: { + url: `${config.API_URL}/srm/paperrecord/`, + name: "论文台账创建", + req: async function(data){ + return await http.post(this.url, data); + } + }, + update: { + name: "论文台账更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/srm/paperrecord/${id}/`, + data + ); + } + }, + delete: { + name: "删除论文台账", + req: async function(id){ + return await http.delete(`${config.API_URL}/srm/paperrecord/${id}/`); + } + }, + get_name: { + name: "获取论文名称列表", + req: async function(search=''){ + return await http.get(`${config.API_URL}/srm/paperrecord/paper_name/`,{params: { search }}); + } + }, + }, +} diff --git a/src/views/srm/paperlist.vue b/src/views/srm/paperlist.vue new file mode 100644 index 00000000..a898ec93 --- /dev/null +++ b/src/views/srm/paperlist.vue @@ -0,0 +1,449 @@ + + + + diff --git a/src/views/ofm/paperse.vue b/src/views/srm/paperse.vue similarity index 98% rename from src/views/ofm/paperse.vue rename to src/views/srm/paperse.vue index bea296d0..b2341b69 100644 --- a/src/views/ofm/paperse.vue +++ b/src/views/srm/paperse.vue @@ -163,7 +163,7 @@ export default { return { workflowName:"", workFlowId:'', - apiObj: this.$API.ofm.papersecret.list, + apiObj: this.$API.srm.papersecret.list, selection: [], checkList: [], fileList: [], @@ -259,7 +259,7 @@ export default { }, async papersetDel(row) { var id = row.id; - var res = await this.$API.ofm.papersecret.delete.req(id); + var res = await this.$API.srm.papersecret.delete.req(id); if (res.err_msg) { this.$message.error(res.err_msg); } else { diff --git a/src/views/ofm/paperse_form.vue b/src/views/srm/paperse_form.vue similarity index 97% rename from src/views/ofm/paperse_form.vue rename to src/views/srm/paperse_form.vue index ddd3094f..997443f6 100644 --- a/src/views/ofm/paperse_form.vue +++ b/src/views/srm/paperse_form.vue @@ -143,17 +143,17 @@ export default { that.localMode = "edit"; } if(that.localMode == "add") { - let res = await that.$API.ofm.papersecret.create.req(that.localForm); + let res = await that.$API.srm.papersecret.create.req(that.localForm); that.localForm.id = res.id; } else if (that.localMode == "edit") { - await that.$API.ofm.papersecret.update.req(that.localForm.id, that.localForm); + await that.$API.srm.papersecret.update.req(that.localForm.id, that.localForm); } }, getTid (){ var that = this; if (that.t_id) { - that.$API.ofm.papersecret.item.req(that.t_id).then(res=>{ + that.$API.srm.papersecret.item.req(that.t_id).then(res=>{ that.localForm = res; if(res.ticket_?.state_?.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) { that.localMode = "edit"; diff --git a/src/views/ofm/patent.vue b/src/views/srm/patent.vue similarity index 98% rename from src/views/ofm/patent.vue rename to src/views/srm/patent.vue index 0703aeaa..db289311 100644 --- a/src/views/ofm/patent.vue +++ b/src/views/srm/patent.vue @@ -167,7 +167,7 @@ export default { return { workflowName:"", workFlowId:'', - apiObj: this.$API.ofm.patentinfo.list, + apiObj: this.$API.srm.patentinfo.list, selection: [], checkList: [], fileList: [], @@ -275,7 +275,7 @@ export default { }, async patentDel(row) { var id = row.id; - var res = await this.$API.ofm.patentinfo.delete.req(id); + var res = await this.$API.srm.patentinfo.delete.req(id); if (res.err_msg) { this.$message.error(res.err_msg); } else { diff --git a/src/views/ofm/patent_form.vue b/src/views/srm/patent_form.vue similarity index 97% rename from src/views/ofm/patent_form.vue rename to src/views/srm/patent_form.vue index 30981f47..5c36e7bd 100644 --- a/src/views/ofm/patent_form.vue +++ b/src/views/srm/patent_form.vue @@ -154,16 +154,16 @@ export default { } console.log('that.localForm',that.localMode, that.localForm) if(that.localMode == "add") { - let res = await that.$API.ofm.patentinfo.create.req(that.localForm); + let res = await that.$API.srm.patentinfo.create.req(that.localForm); that.localForm.id = res.id; } else if (that.localMode == "edit") { - await that.$API.ofm.patentinfo.update.req(that.localForm.id, that.localForm); + await that.$API.srm.patentinfo.update.req(that.localForm.id, that.localForm); } }, getTid (){ var that = this; if (that.t_id) { - that.$API.ofm.patentinfo.item.req(that.t_id).then(res=>{ + that.$API.srm.patentinfo.item.req(that.t_id).then(res=>{ that.localForm = res; if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) { that.localMode = "edit"; diff --git a/src/views/srm/patentlist.vue b/src/views/srm/patentlist.vue new file mode 100644 index 00000000..000790f3 --- /dev/null +++ b/src/views/srm/patentlist.vue @@ -0,0 +1,468 @@ + + + +