feat: srm 科研管理审批修改 bug
This commit is contained in:
parent
11d019bb1e
commit
80f329c617
|
|
@ -94,24 +94,22 @@
|
|||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所在节点" min-width="60">
|
||||
<el-table-column label="审批信息" width="200">
|
||||
<template #default="scope">
|
||||
{{scope.row.ticket_?.state_?.name}}
|
||||
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
|
||||
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
|
||||
</el-tag>
|
||||
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进行状态" min-width="60">
|
||||
<template #default="scope">
|
||||
{{statusOptions[scope.row.ticket_?.state_?.type]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="paperseEdit(scope.row)"
|
||||
v-auth="'PaperSe.update'"
|
||||
@click="paperseShow(scope.row)"
|
||||
>详情
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
|
|
@ -134,7 +132,7 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer
|
||||
:title="drawerTitle[mode]"
|
||||
title="专利管理"
|
||||
v-model="limitedVisible"
|
||||
:destroy-on-close="true"
|
||||
direction="rtl"
|
||||
|
|
@ -144,8 +142,7 @@
|
|||
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
|
||||
<PaperForm
|
||||
:mode="mode"
|
||||
v-model="addForm"
|
||||
:transitions="transitions"
|
||||
:t_id="t_id"
|
||||
@success="()=>{handleQuery(); limitedVisible = false}"
|
||||
@closed="limitedVisible = false"
|
||||
/>
|
||||
|
|
@ -156,116 +153,57 @@
|
|||
<script>
|
||||
|
||||
import PaperForm from "./paperse_form.vue";
|
||||
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
|
||||
export default {
|
||||
components: { PaperForm},
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
actStateEnum, interveneTypeEnum,
|
||||
apiObj: this.$API.srm.papersecret.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
t_id: null,
|
||||
limitedVisible: false,
|
||||
mode: "add",
|
||||
drawerTitle: {
|
||||
add: "新增论文申密",
|
||||
edit: "审批流",
|
||||
view: "查看论文申密",
|
||||
},
|
||||
statusOptions:{
|
||||
0: "审批中",
|
||||
1: "初始中",
|
||||
2: "已完成",
|
||||
},
|
||||
currentRow: null,
|
||||
//表单数据
|
||||
addForm: {
|
||||
paper_name: "",
|
||||
publication_name:"",
|
||||
author: "",
|
||||
paper_type: "",
|
||||
is_chinese_core: false,
|
||||
is_sci: false,
|
||||
tech_status: [],
|
||||
tech_file: [],
|
||||
ticket_:null
|
||||
},
|
||||
mode: "show",
|
||||
fileList: [],
|
||||
query: {},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket_!==null){
|
||||
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("paperse").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.mode = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.lending_type = "";
|
||||
this.t_id = null;
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
|
||||
getDefaultForm(){
|
||||
return {
|
||||
paper_name: "",
|
||||
publication_name:"",
|
||||
author: "",
|
||||
paper_type: "",
|
||||
is_chinese_core: false,
|
||||
is_sci: false,
|
||||
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
|
||||
{ name: "是否发表过文章", status: "", fileList: [] },
|
||||
{ name: "是否参与过展会展出", status: "", fileList: [] },
|
||||
{ name: "是否应用于生产/销售", status: "", fileList: [] },
|
||||
{ name: "是否参与过技术交流", status: "", fileList: [] }],
|
||||
tech_file: [ { name: "论文内容", status: "", pages: "" },
|
||||
{ name: "图或者照片", pages: "" }],
|
||||
ticket_:null
|
||||
}
|
||||
},
|
||||
// getDefaultForm(){
|
||||
// return {
|
||||
// paper_name: "",
|
||||
// publication_name:"",
|
||||
// author: "",
|
||||
// paper_type: "",
|
||||
// is_chinese_core: false,
|
||||
// is_sci: false,
|
||||
// tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
|
||||
// { name: "是否发表过文章", status: "", fileList: [] },
|
||||
// { name: "是否参与过展会展出", status: "", fileList: [] },
|
||||
// { name: "是否应用于生产/销售", status: "", fileList: [] },
|
||||
// { name: "是否参与过技术交流", status: "", fileList: [] }],
|
||||
// tech_file: [ { name: "论文内容", status: "", pages: "" },
|
||||
// { name: "图或者照片", pages: "" }],
|
||||
// ticket_:null
|
||||
// }
|
||||
// },
|
||||
// 审批流结束之后才可以编辑
|
||||
paperseEdit(row) {
|
||||
this.mode = "view";
|
||||
this.editId = row.id;
|
||||
paperseShow(row) {
|
||||
this.mode = "show";
|
||||
this.t_id = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
},
|
||||
async papersetDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.srm.papersecret.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
|
|
|
|||
|
|
@ -3,28 +3,28 @@
|
|||
<el-main>
|
||||
<el-form :model="localForm" label-width="150px" label-position="left" :rules="rules">
|
||||
<el-form-item label="拟发表论文名称" prop="paper_name">
|
||||
<el-input v-model="localForm.paper_name" clearable :disabled="localMode ==='view'"></el-input>
|
||||
<el-input v-model="localForm.paper_name" clearable :disabled="localMode ==='show'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟投期刊名称" prop="publication_name">
|
||||
<el-input v-model="localForm.publication_name" clearable :disabled="localMode ==='view'"></el-input>
|
||||
<el-input v-model="localForm.publication_name" clearable :disabled="localMode ==='show'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="作者" prop="author" >
|
||||
<el-input v-model="localForm.author" clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟发表文章类型" prop="paper_type">
|
||||
<el-select v-model="localForm.paper_type" placeholder="请选择拟发表文章类型" :disabled="localMode ==='view'">
|
||||
<el-select v-model="localForm.paper_type" placeholder="请选择拟发表文章类型" :disabled="localMode ==='show'">
|
||||
<el-option label="研究论文" value="研究论文"></el-option>
|
||||
<el-option label="综述" value="综述"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否为中文核心" prop="is_chinese_core">
|
||||
<el-radio-group v-model="localForm.is_chinese_core" :disabled="localMode ==='view'">
|
||||
<el-radio-group v-model="localForm.is_chinese_core" :disabled="localMode ==='show'">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否被SCI/EI收录" prop="is_sci">
|
||||
<el-radio-group v-model="localForm.is_sci" :disabled="localMode ==='view'">
|
||||
<el-radio-group v-model="localForm.is_sci" :disabled="localMode ==='show'">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
<el-col :span="12" v-for="(item, index) in localForm.tech_status || []" :key="index">
|
||||
<div class="class-row">
|
||||
<span>{{ item.name }}</span>
|
||||
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='view'">
|
||||
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='show'">
|
||||
<el-radio label="是">是</el-radio>
|
||||
<el-radio label="否">否</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
@ -42,27 +42,32 @@
|
|||
<div v-if="item.status === '是'" class="upload-section">
|
||||
<sc-upload-file
|
||||
multiple
|
||||
:limit="3"
|
||||
:limit="1"
|
||||
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
|
||||
@success = "(res)=>fileUPSuccess(res, item)"
|
||||
:disabled="localMode ==='view'"
|
||||
:disabled="localMode ==='show'"
|
||||
>
|
||||
<el-button type="primary" size="small" icon="el-icon-upload"> </el-button>
|
||||
</sc-upload-file>
|
||||
<div v-if="item.file" class="file-list">
|
||||
<el-link type="primary" :href="item.file" target="_blank">
|
||||
{{ item.file.split('/').pop() }}
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="技术文件" prop="tech_file">
|
||||
<div class="file-item" v-for="(item, index) in localForm.tech_file || []" :key="index">
|
||||
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='view'">
|
||||
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='show'">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
<el-input
|
||||
class="page-input"
|
||||
v-model="item.pages"
|
||||
placeholder="页/张数"
|
||||
:disabled="!item.checked || localMode ==='view'"
|
||||
:disabled="!item.checked || localMode ==='show'"
|
||||
type="number"
|
||||
min="0">
|
||||
<template v-slot:append>页/张</template>
|
||||
|
|
@ -70,7 +75,7 @@
|
|||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="localMode!=='show'">
|
||||
<el-footer>
|
||||
<ticketd_b
|
||||
:workflow_key="'paperse'"
|
||||
:title="ticketTitle"
|
||||
|
|
@ -80,7 +85,6 @@
|
|||
:submit_b_func="submit_b_func"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
@colsed="$emit('closed')"
|
||||
/>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
|
|
@ -100,42 +104,48 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
|
|||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
mode: { type: String, default: "view" }, // add / edit / view
|
||||
modelValue: { type: Object, default: () => ({}) },
|
||||
mode: { type: String,
|
||||
default: "show"
|
||||
},
|
||||
t_id: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
},
|
||||
components: {ticketd, ticketd_b},
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data() {
|
||||
return {
|
||||
ticket_data: {},
|
||||
ticketTitle: "论文申密申请",
|
||||
localMode : this.mode,
|
||||
localForm: {
|
||||
paper_name: "",
|
||||
publication_name:"",
|
||||
author: "",
|
||||
paper_type: "",
|
||||
is_chinese_core: false,
|
||||
is_sci: false,
|
||||
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
|
||||
{ name: "是否发表过文章", status: "", fileList: [] },
|
||||
{ name: "是否参与过展会展出", status: "", fileList: [] },
|
||||
{ name: "是否应用于生产/销售", status: "", fileList: [] },
|
||||
{ name: "是否参与过技术交流", status: "", fileList: [] }],
|
||||
tech_file: [ { name: "论文内容", status: "", pages: "" },
|
||||
{ name: "图或者照片", pages: "" }],
|
||||
ticket_:null
|
||||
},
|
||||
rules: {
|
||||
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
|
||||
},
|
||||
localForm: {
|
||||
ticket_: { state_: { type: '' } },
|
||||
...(this.modelValue || {}) }
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log('mode', this.localMode)
|
||||
let that = this;
|
||||
if (that.t_id) {
|
||||
that.getTid();
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
localForm: {
|
||||
handler(val) {
|
||||
Object.assign(this.ticket_data, {
|
||||
author: val.author,
|
||||
// 其他需要同步的字段...
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async submit_b_func() {
|
||||
let that = this;
|
||||
|
|
@ -144,7 +154,6 @@ export default {
|
|||
}
|
||||
if(that.localMode == "add") {
|
||||
let res = await that.$API.srm.papersecret.create.req(that.localForm);
|
||||
|
||||
that.localForm.id = res.id;
|
||||
} else if (that.localMode == "edit") {
|
||||
await that.$API.srm.papersecret.update.req(that.localForm.id, that.localForm);
|
||||
|
|
|
|||
|
|
@ -98,24 +98,22 @@
|
|||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所在节点" min-width="60">
|
||||
<el-table-column label="审批信息" width="200">
|
||||
<template #default="scope">
|
||||
{{scope.row.ticket_.state_.name}}
|
||||
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
|
||||
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
|
||||
</el-tag>
|
||||
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进行状态" min-width="60">
|
||||
<template #default="scope">
|
||||
{{statusOptions[scope.row.ticket_.state_.type]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="patentEdit(scope.row)"
|
||||
v-auth="'patentinfo.update'"
|
||||
@click="patentShow(scope.row)"
|
||||
>详情
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
|
|
@ -138,7 +136,7 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer
|
||||
:title="drawerTitle[mode]"
|
||||
title="专利审批"
|
||||
v-model="limitedVisible"
|
||||
:destroy-on-close="true"
|
||||
direction="rtl"
|
||||
|
|
@ -148,8 +146,7 @@
|
|||
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
|
||||
<PatentForm
|
||||
:mode="mode"
|
||||
v-model="addForm"
|
||||
:transitions="transitions"
|
||||
:t_id="t_id"
|
||||
@success="()=>{handleQuery(); limitedVisible = false}"
|
||||
@closed="limitedVisible = false"
|
||||
/>
|
||||
|
|
@ -160,25 +157,19 @@
|
|||
<script>
|
||||
|
||||
import PatentForm from "./patent_form.vue";
|
||||
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
|
||||
export default {
|
||||
components: { PatentForm},
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
actStateEnum, interveneTypeEnum,
|
||||
apiObj: this.$API.srm.patentinfo.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
t_id:null,
|
||||
limitedVisible: false,
|
||||
mode: "add",
|
||||
mode: "show",
|
||||
patentType: {
|
||||
"invention": "发明专利",
|
||||
"utility": "实用新型",
|
||||
|
|
@ -189,156 +180,53 @@ export default {
|
|||
'Foreign':'国外申请',
|
||||
'PCT':'PCT申请',
|
||||
},
|
||||
drawerTitle: {
|
||||
add: "新增专利申密",
|
||||
edit: "审批流",
|
||||
view: "查看专利申密",
|
||||
},
|
||||
statusOptions:{
|
||||
0: "审批中",
|
||||
1: "初始中",
|
||||
2: "已完成",
|
||||
},
|
||||
currentRow: null,
|
||||
//表单数据
|
||||
addForm: {
|
||||
author: "",
|
||||
name: "",
|
||||
type: "",
|
||||
is_public: false,
|
||||
area: null,
|
||||
other_area: null,
|
||||
tech_status: [],
|
||||
tech_file: [],
|
||||
ticket_:null
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket_!==null){
|
||||
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("patent").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.mode = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.lending_type = "";
|
||||
this.t_id = null;
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
|
||||
getDefaultForm(){
|
||||
return {
|
||||
name: "",
|
||||
author: "",
|
||||
type: "",
|
||||
is_public: false,
|
||||
area: null,
|
||||
other_area: null,
|
||||
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
|
||||
{ name: "是否发表过文章", status: "", fileList: [] },
|
||||
{ name: "是否参与过展会展出", status: "", fileList: [] },
|
||||
{ name: "是否应用于生产/销售", status: "", fileList: [] },
|
||||
{ name: "是否参与过技术交流", status: "", fileList: [] }],
|
||||
tech_file: [ { name: "技术背景材料", status: "", pages: "" },
|
||||
{ name: "技术交底材料", pages: "" },
|
||||
{ name: "查新检索报告", pages: "" },
|
||||
{ name: "图或者照片", pages: "" }],
|
||||
ticket_:null
|
||||
}
|
||||
},
|
||||
// getDefaultForm(){
|
||||
// return {
|
||||
// name: "",
|
||||
// author: "",
|
||||
// type: "",
|
||||
// is_public: false,
|
||||
// area: null,
|
||||
// other_area: null,
|
||||
// tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
|
||||
// { name: "是否发表过文章", status: "", fileList: [] },
|
||||
// { name: "是否参与过展会展出", status: "", fileList: [] },
|
||||
// { name: "是否应用于生产/销售", status: "", fileList: [] },
|
||||
// { name: "是否参与过技术交流", status: "", fileList: [] }],
|
||||
// tech_file: [ { name: "技术背景材料", status: "", pages: "" },
|
||||
// { name: "技术交底材料", pages: "" },
|
||||
// { name: "查新检索报告", pages: "" },
|
||||
// { name: "图或者照片", pages: "" }],
|
||||
// ticket_:null
|
||||
// }
|
||||
// },
|
||||
// 审批流结束之后才可以编辑
|
||||
patentEdit(row) {
|
||||
this.mode = "view";
|
||||
this.editId = row.id;
|
||||
patentShow(row) {
|
||||
this.mode = "show";
|
||||
this.t_id = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
},
|
||||
async patentDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.srm.patentinfo.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
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>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<el-main>
|
||||
<el-form :model="localForm" label-width="150px" label-position="left" :rules="rules">
|
||||
<el-form-item label="拟申请专利名称" prop="name">
|
||||
<el-input v-model="localForm.name" clearable :disabled="localMode ==='view'"></el-input>
|
||||
<el-input v-model="localForm.name" clearable :disabled="localMode ==='show'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="发明人(设计人)"
|
||||
prop="author"
|
||||
|
|
@ -11,20 +11,20 @@
|
|||
<el-input v-model="localForm.author" clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="专利类型" prop="type">
|
||||
<el-select v-model="localForm.type" placeholder="请选择专利类型" :disabled="localMode ==='view'">
|
||||
<el-select v-model="localForm.type" placeholder="请选择专利类型" :disabled="localMode ==='show'">
|
||||
<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="is_public">
|
||||
<el-radio-group v-model="localForm.is_public" :disabled="localMode ==='view'">
|
||||
<el-radio-group v-model="localForm.is_public" :disabled="localMode ==='show'">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟申请地域">
|
||||
<el-radio-group v-model="localForm.area" :disabled="localMode ==='view'">
|
||||
<el-radio-group v-model="localForm.area" :disabled="localMode ==='show'">
|
||||
<el-radio label="国内申请" value="Domestic"></el-radio>
|
||||
<el-radio label="国外申请" value="Foreign"></el-radio>
|
||||
<el-radio label="PCT申请" value="PCT"></el-radio>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
placeholder = "请输入申请的国家"
|
||||
size = "small"
|
||||
style="margin-top: 10;"
|
||||
:disabled="localMode ==='view'"
|
||||
:disabled="localMode ==='show'"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="技术状态" prop="tech_status">
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<el-col :span="12" v-for="(item, index) in localForm.tech_status || []" :key="index">
|
||||
<div class="class-row">
|
||||
<span>{{ item.name }}</span>
|
||||
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='view'">
|
||||
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='show'">
|
||||
<el-radio label="是">是</el-radio>
|
||||
<el-radio label="否">否</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
@ -51,27 +51,32 @@
|
|||
<div v-if="item.status === '是'" class="upload-section">
|
||||
<sc-upload-file
|
||||
multiple
|
||||
:limit="3"
|
||||
:limit="1"
|
||||
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
|
||||
@success = "(res)=>fileUPSuccess(res, item)"
|
||||
:disabled="localMode ==='view'"
|
||||
:disabled="localMode ==='show'"
|
||||
>
|
||||
<el-button type="primary" size="small" icon="el-icon-upload"> </el-button>
|
||||
</sc-upload-file>
|
||||
<div v-if="item.file && localMode ==='show'" class="file-list">
|
||||
<el-link type="primary" :href="item.file" target="_blank">
|
||||
{{ item.file.split('/').pop() }}
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="技术文件" prop="tech_file">
|
||||
<div class="file-item" v-for="(item, index) in localForm.tech_file || []" :key="index">
|
||||
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='view'">
|
||||
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='show'">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
<el-input
|
||||
class="page-input"
|
||||
v-model="item.pages"
|
||||
placeholder="页数"
|
||||
:disabled="!item.checked || localMode ==='view'"
|
||||
:disabled="!item.checked || localMode ==='show'"
|
||||
type="number"
|
||||
min="0">
|
||||
<template v-slot:append>页</template>
|
||||
|
|
@ -79,7 +84,7 @@
|
|||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="localMode!=='show'">
|
||||
<el-footer>
|
||||
<ticketd_b
|
||||
:workflow_key="'patent'"
|
||||
:title="ticketTitle"
|
||||
|
|
@ -89,7 +94,6 @@
|
|||
:submit_b_func="submit_b_func"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
@colsed="$emit('closed')"
|
||||
/>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
|
|
@ -109,15 +113,16 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
|
|||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
mode: { type: String, default: "view" }, // add / edit / view
|
||||
modelValue: { type: Object, default: () => ({}) },
|
||||
mode: {
|
||||
type: String,
|
||||
default: "show"
|
||||
}, // add / edit / view
|
||||
t_id: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
},
|
||||
components: {ticketd, ticketd_b},
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data() {
|
||||
return {
|
||||
ticket_data: {},
|
||||
|
|
@ -126,33 +131,38 @@ export default {
|
|||
rules: {
|
||||
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
|
||||
},
|
||||
localForm: {
|
||||
ticket_: { state_: { type: '' } },
|
||||
...(this.modelValue || {}) }
|
||||
localForm:{
|
||||
name: "",
|
||||
author: "",
|
||||
type: "",
|
||||
is_public: false,
|
||||
area: null,
|
||||
other_area: null,
|
||||
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
|
||||
{ name: "是否发表过文章", status: "", fileList: [] },
|
||||
{ name: "是否参与过展会展出", status: "", fileList: [] },
|
||||
{ name: "是否应用于生产/销售", status: "", fileList: [] },
|
||||
{ name: "是否参与过技术交流", status: "", fileList: [] }],
|
||||
tech_file: [ { name: "技术背景材料", status: "", pages: "" },
|
||||
{ name: "技术交底材料", pages: "" },
|
||||
{ name: "查新检索报告", pages: "" },
|
||||
{ name: "图或者照片", pages: "" }],
|
||||
ticket_:null
|
||||
},
|
||||
};
|
||||
},
|
||||
// mounted() {
|
||||
// let that = this;
|
||||
// console.log('666666',that.ticket_data)
|
||||
// },
|
||||
watch: {
|
||||
localForm: {
|
||||
handler(val) {
|
||||
Object.assign(this.ticket_data, {
|
||||
author: val.author,
|
||||
// 其他需要同步的字段...
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
if (that.t_id) {
|
||||
that.getTid();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async submit_b_func() {
|
||||
let that = this;
|
||||
if(that.localForm?.id){
|
||||
that.localMode = "edit";
|
||||
}
|
||||
console.log('that.localForm',that.localMode, that.localForm)
|
||||
if(that.localMode == "add") {
|
||||
let res = await that.$API.srm.patentinfo.create.req(that.localForm);
|
||||
that.localForm.id = res.id;
|
||||
|
|
@ -196,19 +206,4 @@ export default {
|
|||
},
|
||||
};
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.status-item {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.status-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.upload-section {
|
||||
margin-left: 10px;
|
||||
border-left: 2px solid #eee;
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</script>
|
||||
Loading…
Reference in New Issue