This commit is contained in:
shijing 2025-11-04 16:42:25 +08:00
commit 8a33f72193
8 changed files with 1093 additions and 84 deletions

View File

@ -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}/`);
}
}
},
}

165
src/api/model/srm.js Normal file
View File

@ -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 }});
}
},
},
}

449
src/views/srm/paperlist.vue Normal file
View File

@ -0,0 +1,449 @@
<template>
<el-container>
<el-header>
<div class="left-panel-group">
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-auth="'paperrecord.create'"
></el-button>
</div>
<div class="right-panel">
<el-select
v-model="query.paper"
placeholder="选择论文名称"
clearable
filterable
:loading="loading"
@visible-change="handlePatentChange"
>
<el-option
v-for="item in patentList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="论文编号"
prop="paper_number"
min-width="100"
></el-table-column>
<el-table-column
label="名称"
prop="paper_name"
min-width="100"
></el-table-column>
<el-table-column
label="论文类型"
prop="pa_type"
min-width="100"
:formatter="formatPcType">
</el-table-column>
<el-table-column
label="单位"
prop="organization"
min-width="100">
</el-table-column>
<el-table-column
label="作者"
prop="author"
min-width="100"
></el-table-column>
<el-table-column
label="通讯作者"
prop="cor_author"
min-width="100"
></el-table-column>
<el-table-column
label="归属平台"
prop="affiliated_platforms"
min-width="100"
></el-table-column>
<el-table-column
label="归属项目"
prop="affiliated_projects"
min-width="100"
></el-table-column>
<el-table-column
label="接受日期"
prop="accept_date"
min-width="100"
></el-table-column>
<el-table-column
label="发表日期"
prop="public_date"
min-width="100"
></el-table-column>
<el-table-column
label="版面费缴纳"
prop="pub_paid"
min-width="100"
></el-table-column>
<el-table-column
label="状态"
prop="status"
min-width="100"
></el-table-column>
<el-table-column
label="报奖情况"
prop="award_info"
min-width="100"
></el-table-column>
<el-table-column
label="奖金金额(元)"
prop="bonus_amount"
min-width="100"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="filerecordEidt(scope.row)"
v-auth="'paperrecord.update'"
>编辑
</el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="filerecordDel(scope.row)"
>
<template #reference>
<el-button
link
size="small"
type="danger"
v-auth="'paperrecord.delete'"
>删除</el-button
>
</template>
</el-popconfirm>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<el-drawer :title="titleMap[type] " v-model="limitedVisible" size="50%">
<el-form
:model="addForm"
:rules="rules"
ref="addForm"
label-width="100px"
label-position="left"
>
<el-form-item label="论文编号" prop="paper_number">
<el-input v-model="addForm.paper_number" clearable></el-input>
</el-form-item>
<el-form-item label="论文名称" prop="paper">
<el-select
v-model="addForm.paper"
placeholder="请选择"
clearable
:loading="loading"
@visible-change="handlePatentChange">
<el-option
v-for="item in patentList"
:key="item.name"
:value="item.id"
:label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="论文类型" prop="pa_type">
<el-select v-model="addForm.pa_type" placeholder="请选择" clearable>
<el-option label="研究论文" value="research"></el-option>
<el-option label="综述" value="overview"></el-option>
</el-select>
</el-form-item>
<el-form-item label="单位" prop="organization">
<el-input v-model="addForm.organization" clearable></el-input>
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model="addForm.author" clearable></el-input>
</el-form-item>
<el-form-item label="通讯作者" prop="cor_author" label-width="120px">
<el-input v-model="addForm.cor_author" clearable></el-input>
</el-form-item>
<el-form-item label="归属平台" prop="affiliated_platforms">
<el-input v-model="addForm.affiliated_platforms" clearable></el-input>
</el-form-item>
<el-form-item label="归属项目" prop="affiliated_projects" >
<el-input v-model="addForm.affiliated_projects" clearable></el-input>
</el-form-item>
<el-form-item label="接受日期" prop="accept_date" >
<el-date-picker
v-model="addForm.accept_date"
type="date"
align="right"
value-format="YYYY-MM-DD"
unlink-panels
palceholder="选择日期"
></el-date-picker>
</el-form-item>
<el-form-item label="发表日期" prop="public_date" >
<el-date-picker
v-model="addForm.public_date"
type="date"
align="right"
value-format="YYYY-MM-DD"
unlink-panels
palceholder="选择日期"
></el-date-picker>
</el-form-item>
<el-form-item label="版面费缴纳" prop="pub_paid" >
<el-input-number
v-model="addForm.pub_paid"
:precision="2"
:step="0.01"
:min="0"
style="width: 200px"
controls-position="right"></el-input-number>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="addForm.status" placeholder="请选择" clearable>
<el-option
v-for="(label, value) in statusOptions"
:key="value"
:label="label"
:value="value"/>
</el-select>
</el-form-item>
<el-form-item label="报奖情况" prop="award_info" >
<el-input
v-model="addForm.award_info"
clearable type="textarea"
palaceholder="请输入内容"
rows="3">
></el-input>
</el-form-item>
<el-form-item label="奖金发放" prop="bonus_amount" >
<el-input-number
v-model="addForm.bonus_amount"
:precision="2"
:step="0.01"
:min="0"
style="width: 200px"
controls-position="right"></el-input-number>
</el-form-item>
</el-form>
<template #footer>
<el-button
v-auth="'paperrecord.create'"
v-if="type !== 'show'"
type="primary"
:loading="isSaving"
@click="submitHandle()"
> </el-button
>
</template>
</el-drawer>
</template>
<script>
export default {
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
loading: false,
apiObj: this.$API.srm.paperrecord.list,
patentList: [],
statusOptions: {
"审稿中":"审稿中" ,
"一修":"一修",
"二修":"二修",
"接收":"接收",
"发表":"发表"
},
query: {},
editId: null,
isSaving: false,
limitedVisible: false,
limitedWatch: false,
type: "add",
titleMap: {
add: "新增",
edit: "编辑",
show: "查看",
},
//
addForm: {
paper_number: null,
paper: null,
pa_type: null,
organization: null,
author: null,
cor_author: "",
affiliated_platforms: "",
affiliated_projects: "",
accept_date: "",
public_date: "",
pub_paid: "",
status: "",
award_info: "",
bonus_amount: "",
},
};
},
methods: {
formatPcType(row, column, cellValue) {
const map = {
'research': '研究论文',
'overview': '综述'
};
return map[cellValue] || cellValue;
},
handleAdd() {
this.type = "add";
this.addForm = this.getDefaultForm();
this.limitedVisible = true;
},
handlePatentChange(visible){
if(visible){
this.get_patentList();
}
},
async get_patentList() {
const res = await this.$API.srm.paperrecord.get_name.req();
this.patentList = res;
},
handleAdd_outer() {
this.addForm = this.getDefaultForm();
this.type = "add";
this.limitedVisible = true;
this.lending_type = "outer";
this.addForm.is_lending = true;
},
handleCancel() {
this.limitedVisible = false; //
this.lending_type = ""; // lending_type
this.getDefaultForm()//
},
submitHandle() {
let that = this;
that.isSaving = true;
that.submit();
},
getDefaultForm(){
return {
paper_number: null,
paper: null,
pa_type: null,
organization: null,
author: null,
cor_author: "",
affiliated_platforms: "",
affiliated_projects: "",
accept_date: "",
public_date: "",
pub_paid: "",
status: "",
award_info: "",
bonus_amount: "",
}
},
async submit() {
let that = this;
let res = null;
try {
if (that.type === "add") {
res = await that.$API.srm.paperrecord.create.req(that.addForm);
} else {
res = await that.$API.srm.paperrecord.update.req(
that.editId,
that.addForm
);
}
that.isSaving = false;
that.limitedVisible = false;
that.$refs.table.refresh();
} catch (e) {
that.isSaving = false;
}
},
//
filerecordEidt(row) {
this.type = "edit";
this.editId = row.id;
this.limitedVisible = true;
this.addForm = Object.assign({}, row);
},
async filerecordDel(row) {
var id = row.id;
var res = await this.$API.srm.paperrecord.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
},
//
handleQuery() {
this.$refs.table.queryData(this.query);
},
},
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,468 @@
<template>
<el-container>
<el-header>
<div class="left-panel-group">
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-auth="'patentrecord.create'"
></el-button>
</div>
<div class="right-panel">
<el-select
v-model="query.patent"
placeholder="选择专利名称"
clearable
filterable
:loading="loading"
@visible-change="handlePatentChange"
>
<el-option
v-for="item in patentList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="卷号"
prop="volume_number"
min-width="100"
></el-table-column>
<el-table-column
label="申请号(交局后补登)"
prop="application_number"
min-width="100"
></el-table-column>
<el-table-column
label="名称"
prop="patent_name"
min-width="100"
></el-table-column>
<el-table-column
label="专利类型"
prop="pc_type"
min-width="100"
:formatter="formatPcType">
</el-table-column>
<el-table-column
label="单位"
prop="organization"
min-width="100">
</el-table-column>
<el-table-column
label="发明人"
prop="inventors"
min-width="100"
></el-table-column>
<el-table-column
label="代理人"
prop="agent"
min-width="100"
></el-table-column>
<el-table-column
label="归属平台"
prop="affiliated_platforms"
min-width="100"
></el-table-column>
<el-table-column
label="归属项目"
prop="affiliated_projects"
min-width="100"
></el-table-column>
<el-table-column
label="归属日期"
prop="application_date"
min-width="100"
></el-table-column>
<el-table-column
label="授权日"
prop="authorization_date"
min-width="100"
></el-table-column>
<el-table-column
label="有效年限(年)"
prop="validity_years"
min-width="100"
></el-table-column>
<el-table-column
label="年费缴纳"
prop="annuity_paid"
min-width="100"
></el-table-column>
<el-table-column
label="报奖情况"
prop="award_info"
min-width="100"
></el-table-column>
<el-table-column
label="奖金发放(元)"
prop="bonus_amount"
min-width="100"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="filerecordEidt(scope.row)"
v-auth="'patentrecord.update'"
>编辑
</el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="filerecordDel(scope.row)"
>
<template #reference>
<el-button
link
size="small"
type="danger"
v-auth="'patentrecord.delete'"
>删除</el-button
>
</template>
</el-popconfirm>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<el-drawer :title="titleMap[type] " v-model="limitedVisible" size="50%">
<el-form
:model="addForm"
:rules="rules"
ref="addForm"
label-width="100px"
label-position="left"
>
<el-form-item label="卷号" prop="volume_number">
<el-input v-model="addForm.volume_number" clearable></el-input>
</el-form-item>
<el-form-item label="申请号" prop="application_number">
<el-input v-model="addForm.application_number" clearable></el-input>
</el-form-item>
<el-form-item label="专利名称" prop="patent">
<el-select
v-model="addForm.patent"
placeholder="请选择"
clearable
:loading="loading"
@visible-change="handlePatentChange">
<el-option
v-for="item in patentList"
:key="item.name"
:value="item.id"
:label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="专利类型" prop="pc_type">
<el-select v-model="addForm.pc_type" placeholder="请选择" clearable>
<el-option label="发明专利" value="invention"></el-option>
<el-option label="实用新型" value="utility"></el-option>
<el-option label="外观设计" value="design"></el-option>
</el-select>
</el-form-item>
<el-form-item label="单位" prop="organization">
<el-input v-model="addForm.organization" clearable></el-input>
</el-form-item>
<el-form-item label="发明人" prop="inventors">
<el-input v-model="addForm.inventors" clearable></el-input>
</el-form-item>
<el-form-item label="代理人" prop="agent" label-width="120px">
<el-input v-model="addForm.agent" clearable></el-input>
</el-form-item>
<el-form-item label="归属平台" prop="affiliated_platforms">
<el-input v-model="addForm.affiliated_platforms" clearable></el-input>
</el-form-item>
<el-form-item label="归属项目" prop="affiliated_projects" >
<el-input v-model="addForm.affiliated_projects" clearable></el-input>
</el-form-item>
<el-form-item label="申请日" prop="application_date" >
<el-date-picker
v-model="addForm.application_date"
type="date"
align="right"
value-format="YYYY-MM-DD"
unlink-panels
palceholder="选择日期"
></el-date-picker>
</el-form-item>
<el-form-item label="授权日" prop="authorization_date" >
<el-date-picker
v-model="addForm.authorization_date"
type="date"
align="right"
value-format="YYYY-MM-DD"
unlink-panels
palceholder="选择日期"
></el-date-picker>
</el-form-item>
<el-form-item label="有效年限" prop="validity_years" >
<el-input v-model="addForm.validity_years" type="number" min="0" clearable></el-input>
</el-form-item>
<el-form-item label="年费缴纳" prop="annuity_paid" >
<el-input-number
v-model="addForm.annuity_paid"
:precision="2"
:step="0.01"
:min="0"
style="width: 200px"
controls-position="right"></el-input-number>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="addForm.status" placeholder="请选择" clearable>
<el-option
v-for="(label, value) in statusOptions"
:key="value"
:label="label"
:value="value"/>
</el-select>
</el-form-item>
<el-form-item label="报奖情况" prop="award_info" >
<el-input
v-model="addForm.award_info"
clearable type="textarea"
palaceholder="请输入内容"
rows="3">
></el-input>
</el-form-item>
<el-form-item label="奖金发放" prop="bonus_amount" >
<el-input-number
v-model="addForm.bonus_amount"
:precision="2"
:step="0.01"
:min="0"
style="width: 200px"
controls-position="right"></el-input-number>
</el-form-item>
</el-form>
<template #footer>
<el-button
v-auth="'patentrecord.create'"
v-if="type !== 'show'"
type="primary"
:loading="isSaving"
@click="submitHandle()"
> </el-button
>
</template>
</el-drawer>
</template>
<script>
export default {
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
loading: false,
apiObj: this.$API.srm.patentrecord.list,
patentList: [],
statusOptions: {
"not_disclosed":"未公开" ,
"under_examination":"实审中",
"first_office_action":"一通",
"second_office_action":"二通",
"rejected":"驳回",
"reexamination":"复审",
"authorized":"授权"
},
query: {},
editId: null,
isSaving: false,
limitedVisible: false,
limitedWatch: false,
type: "add",
titleMap: {
add: "新增",
edit: "编辑",
show: "查看",
},
//
addForm: {
volume_number: null,
application_number: null,
patent: null,
pc_type: null,
organization: null,
inventors: "",
agent: "",
affiliated_platforms: "",
affiliated_projects: "",
application_date: "",
authorization_date: "",
validity_years: "",
annuity_paid: "",
status: "",
award_info: "",
bonus_amount: "",
},
};
},
methods: {
formatPcType(row, column, cellValue) {
const map = {
'invention': '发明专利',
'utility': '实用新型',
'design': '外观设计'
};
return map[cellValue] || cellValue;
},
handleAdd() {
this.type = "add";
this.addForm = this.getDefaultForm();
this.limitedVisible = true;
},
handlePatentChange(visible){
if(visible){
this.get_patentList();
}
},
async get_patentList() {
const res = await this.$API.srm.patentrecord.get_name.req();
this.patentList = res;
},
handleAdd_outer() {
this.addForm = this.getDefaultForm();
this.type = "add";
this.limitedVisible = true;
this.lending_type = "outer";
this.addForm.is_lending = true;
},
handleCancel() {
this.limitedVisible = false; //
this.lending_type = ""; // lending_type
this.getDefaultForm()//
},
submitHandle() {
let that = this;
that.isSaving = true;
that.submit();
},
getDefaultForm(){
return {
volume_number: null,
application_number: null,
patent: null,
pc_type: null,
organization: null,
inventors: "",
agent: "",
affiliated_platforms: "",
affiliated_projects: "",
application_date: "",
authorization_date: "",
validity_years: "",
annuity_paid: "",
status: "",
award_info: "",
bonus_amount: "",
}
},
async submit() {
let that = this;
let res = null;
try {
if (that.type === "add") {
res = await that.$API.srm.patentrecord.create.req(that.addForm);
} else {
res = await that.$API.srm.patentrecord.update.req(
that.editId,
that.addForm
);
}
that.isSaving = false;
that.limitedVisible = false;
that.$refs.table.refresh();
} catch (e) {
that.isSaving = false;
}
},
//
filerecordEidt(row) {
this.type = "edit";
this.editId = row.id;
this.limitedVisible = true;
this.addForm = Object.assign({}, row);
},
async filerecordDel(row) {
var id = row.id;
var res = await this.$API.srm.patentrecord.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
},
//
handleQuery() {
this.$refs.table.queryData(this.query);
},
},
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>