Compare commits
3 Commits
c17e7d8abe
...
5e38238162
Author | SHA1 | Date | |
---|---|---|---|
5e38238162 | |||
e3136072a0 | |||
0e4d44fa76 |
50
src/api/dataList/patent.js
Normal file
50
src/api/dataList/patent.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 专利列表
|
||||||
|
export function patentList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/v1/technology/patent',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 专利信息添加
|
||||||
|
export function patentAdd(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/v1/technology/patent/add',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 专利信息详情
|
||||||
|
export function patentDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/v1/technology/patent/detail',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 专利信息修改
|
||||||
|
export function patentEdit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/v1/technology/patent/edit',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 专利信息删除
|
||||||
|
export function patentDelete(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/v1/technology/patent/delete',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 专利上下架
|
||||||
|
export function patentShelf(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/v1/technology/patent/shelf',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
@ -40,3 +40,11 @@ export function researchDetail(data) {
|
|||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 科研机构审核操作
|
||||||
|
export function researchExamine(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/v1/manage/research/examine',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -2,91 +2,92 @@
|
|||||||
|
|
||||||
.el-breadcrumb__inner,
|
.el-breadcrumb__inner,
|
||||||
.el-breadcrumb__inner a {
|
.el-breadcrumb__inner a {
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-upload {
|
.el-upload {
|
||||||
input[type="file"] {
|
input[type='file'] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-upload__input {
|
.el-upload__input {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell {
|
.cell {
|
||||||
.el-tag {
|
.el-tag {
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-padding {
|
.small-padding {
|
||||||
.cell {
|
.cell {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-width {
|
.fixed-width {
|
||||||
.el-button--mini {
|
.el-button--mini {
|
||||||
padding: 7px 10px;
|
padding: 7px 10px;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-col {
|
.status-col {
|
||||||
.cell {
|
.cell {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
.el-tag {
|
.el-tag {
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// to fixed https://github.com/ElemeFE/element/issues/2461
|
// to fixed https://github.com/ElemeFE/element/issues/2461
|
||||||
.el-dialog {
|
.el-dialog {
|
||||||
transform: none;
|
transform: none;
|
||||||
left: 0;
|
left: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
// refine element ui upload
|
// refine element ui upload
|
||||||
.upload-container {
|
.upload-container {
|
||||||
.el-upload {
|
.el-upload {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.el-upload-dragger {
|
.el-upload-dragger {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dropdown
|
// dropdown
|
||||||
.el-dropdown-menu {
|
.el-dropdown-menu {
|
||||||
a {
|
a {
|
||||||
display: block
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fix date-picker ui bug in filter-item
|
// fix date-picker ui bug in filter-item
|
||||||
.el-range-editor.el-input__inner {
|
.el-range-editor.el-input__inner {
|
||||||
display: inline-flex !important;
|
display: inline-flex !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// to fix el-date-picker css style
|
// to fix el-date-picker css style
|
||||||
.el-range-separator {
|
.el-range-separator {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-menu--collapse
|
.el-menu--collapse > div > .el-submenu > .el-submenu__title .el-submenu__icon-arrow {
|
||||||
> div
|
display: none;
|
||||||
> .el-submenu
|
}
|
||||||
> .el-submenu__title
|
input,
|
||||||
.el-submenu__icon-arrow {
|
textarea {
|
||||||
display: none;
|
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial,
|
||||||
}
|
sans-serif;
|
||||||
|
}
|
||||||
|
@ -20,7 +20,7 @@ import './permission' // permission control
|
|||||||
import { getDicts } from '@/api/system/dict/data'
|
import { getDicts } from '@/api/system/dict/data'
|
||||||
import { getConfigKey } from '@/api/system/config'
|
import { getConfigKey } from '@/api/system/config'
|
||||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from '@/utils/ruoyi'
|
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from '@/utils/ruoyi'
|
||||||
import { modeOptions, educationOptions, enterpriseOptions } from '@/utils/parameter'
|
import { modeOptions, educationOptions, enterpriseOptions, patentOptions } from '@/utils/parameter'
|
||||||
// 分页组件
|
// 分页组件
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
// 自定义表格工具组件
|
// 自定义表格工具组件
|
||||||
@ -56,6 +56,7 @@ Vue.prototype.md5 = md5
|
|||||||
Vue.prototype.modeOptions = modeOptions
|
Vue.prototype.modeOptions = modeOptions
|
||||||
Vue.prototype.educationOptions = educationOptions
|
Vue.prototype.educationOptions = educationOptions
|
||||||
Vue.prototype.enterpriseOptions = enterpriseOptions
|
Vue.prototype.enterpriseOptions = enterpriseOptions
|
||||||
|
Vue.prototype.patentOptions = patentOptions
|
||||||
|
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
Vue.component('DictTag', DictTag)
|
Vue.component('DictTag', DictTag)
|
||||||
|
@ -33,3 +33,9 @@ export const enterpriseOptions = [
|
|||||||
{ key: 102, value: '优质企业' },
|
{ key: 102, value: '优质企业' },
|
||||||
{ key: 103, value: '普通企业' },
|
{ key: 103, value: '普通企业' },
|
||||||
]
|
]
|
||||||
|
// 专利类型
|
||||||
|
export const patentOptions = [
|
||||||
|
{ key: 1, value: '发明专利' },
|
||||||
|
{ key: 2, value: '外观设计' },
|
||||||
|
{ key: 3, value: '实用新型' },
|
||||||
|
]
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<el-input v-model="value.code" :disabled="!isAdd"></el-input>
|
<el-input v-model="value.code" :disabled="!isAdd"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<el-button type="primary" @click="" disabled v-if="isAdd"
|
<el-button type="primary" @click="" :disabled="!isAdd"
|
||||||
>查找</el-button
|
>查找</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
v-for="item in levelIII"
|
v-for="item in levelIII"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -124,7 +124,24 @@ export default {
|
|||||||
_value.push(item.value);
|
_value.push(item.value);
|
||||||
}
|
}
|
||||||
newVal.industrys = _key;
|
newVal.industrys = _key;
|
||||||
this.industrysTags = _value;
|
|
||||||
|
let keyObj = [];
|
||||||
|
for (let i = 0; i < _key.length; i++) {
|
||||||
|
keyObj.push([]);
|
||||||
|
let array = _key[i].split("-");
|
||||||
|
for (let j = 0; j < array.length; j++) {
|
||||||
|
keyObj[i].push({
|
||||||
|
id: array[j],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i = 0; i < _value.length; i++) {
|
||||||
|
let array = _value[i].split(">");
|
||||||
|
for (let j = 0; j < array.length; j++) {
|
||||||
|
keyObj[i][j]["name"] = array[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.industrysTags = keyObj;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
154
src/views/components/FieldSingle/index.vue
Normal file
154
src/views/components/FieldSingle/index.vue
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:disabled="!isAdd"
|
||||||
|
ref="form"
|
||||||
|
:model="value"
|
||||||
|
:rules="rules"
|
||||||
|
:label-width="labelWidth + 'px'"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="所属领域:" required>
|
||||||
|
<el-row type="flex" justify="space-between">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item prop="industrys">
|
||||||
|
<el-select
|
||||||
|
v-model="value.industrys[0]"
|
||||||
|
value-key="id"
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="levelIChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in levelI"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-select
|
||||||
|
v-model="value.industrys[1]"
|
||||||
|
value-key="id"
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="levelIIChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in levelII"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-select
|
||||||
|
v-model="value.industrys[2]"
|
||||||
|
value-key="id"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in levelIII"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { industry } from "@/api/config";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: Object,
|
||||||
|
isAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
labelWidth: {
|
||||||
|
type: Number,
|
||||||
|
default: 120,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
levelI: [], // I级数据
|
||||||
|
levelII: [], // II级数据
|
||||||
|
levelIII: [], // III级数据
|
||||||
|
rules: {
|
||||||
|
industrys: [
|
||||||
|
{
|
||||||
|
type: "array",
|
||||||
|
required: true,
|
||||||
|
message: "请选择",
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value(newOld) {
|
||||||
|
const data = Object.assign({}, newOld);
|
||||||
|
let key = [];
|
||||||
|
for (let i = 0; i < data.industrys.length; i++) {
|
||||||
|
key.push(data.industrys[i].key);
|
||||||
|
}
|
||||||
|
if (data.industrys.length > 0) {
|
||||||
|
this.levelIChange(data.industrys[0].key);
|
||||||
|
}
|
||||||
|
if (data.industrys.length > 1) {
|
||||||
|
this.levelIIChange(data.industrys[1].key);
|
||||||
|
}
|
||||||
|
newOld.industrys = key;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getFieldByParent(id) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
industry({ parent_id: id })
|
||||||
|
.then(({ code, msg, data }) => {
|
||||||
|
if (code == 200) {
|
||||||
|
resolve(data);
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(msg);
|
||||||
|
reject({ msg, code });
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async levelIChange(id) {
|
||||||
|
this.value.industrys = [];
|
||||||
|
this.levelII = await this.getFieldByParent(id);
|
||||||
|
},
|
||||||
|
async levelIIChange(id) {
|
||||||
|
this.value.industrys = [];
|
||||||
|
this.levelIII = await this.getFieldByParent(id);
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
let flag = false;
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
flag = valid;
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
industry().then((res) => {
|
||||||
|
this.levelI = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
220
src/views/components/ResearchForm/index.vue
Normal file
220
src/views/components/ResearchForm/index.vue
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="value"
|
||||||
|
:rules="rules"
|
||||||
|
:label-width="labelWidth + 'px'"
|
||||||
|
>
|
||||||
|
<div class="form_title" v-if="showTitle">基本信息</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="机构logo" prop="image">
|
||||||
|
<ImageUpload v-model="value.image" :fileSize="2" :limit="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="机构名称" prop="name">
|
||||||
|
<el-input v-model="value.name" :disabled="!isAdd"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="组织机构代码:" prop="code">
|
||||||
|
<el-row type="flex" justify="space-between">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-input v-model="value.code" :disabled="!isAdd"></el-input>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-button type="primary" @click="" :disabled="!isAdd"
|
||||||
|
>查找</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="所属站点:" prop="tenant_id">
|
||||||
|
<SiteOptions :size="''" :limitWidth="false" v-model="value" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<CityOptions v-model="value" :labelWidth="labelWidth" ref="cityForm" />
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="详细地址:">
|
||||||
|
<el-input v-model="value.address"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<FieldSingle
|
||||||
|
v-model="value"
|
||||||
|
:isAdd="isAdd"
|
||||||
|
:labelWidth="labelWidth"
|
||||||
|
ref="fieldForm"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<InputBoxAdd
|
||||||
|
:labelWidth="labelWidth"
|
||||||
|
v-model="value"
|
||||||
|
title="研究方向"
|
||||||
|
placeholder="请输入研究方向"
|
||||||
|
fieldKey="researchs"
|
||||||
|
ref="directionsForm"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="营业执照:" prop="license">
|
||||||
|
<ImageUpload v-model="value.license" :isShowTip="false" :limit="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="机构简介" prop="introduce">
|
||||||
|
<Editor
|
||||||
|
v-model="value.introduce"
|
||||||
|
:minHeight="150"
|
||||||
|
ref="introduceRef"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import CityOptions from "@/views/components/CityOptions";
|
||||||
|
import FieldSingle from "@/views/components/FieldSingle";
|
||||||
|
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||||
|
import { researchSelect } from "@/api/dataList/research";
|
||||||
|
import { laboratorySelect } from "@/api/dataList/laboratory";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
CityOptions,
|
||||||
|
FieldSingle,
|
||||||
|
InputBoxAdd,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
value: Object,
|
||||||
|
isAdd: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
showTitle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
labelWidth: {
|
||||||
|
type: Number,
|
||||||
|
default: 120,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
researchOptions: [],
|
||||||
|
options: [
|
||||||
|
// { value: "", label: "" }
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
product: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
kind: [{ required: true, message: "请选择", trigger: "change" }],
|
||||||
|
code: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
mobile: [
|
||||||
|
{ required: true, message: "请输入", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
|
message: "请输入正确的手机号码",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
research_id: [{ required: true, message: "请选择", trigger: "change" }],
|
||||||
|
tenant_id: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
school: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
education: [{ required: true, message: "请选择", trigger: "change" }],
|
||||||
|
major: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
job: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
title: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
work_at: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "从业时间不能为空",
|
||||||
|
trigger: ["change", "blur"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
license: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请上传",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
introduce: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.introduceRef.Quill.enable(false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 富文本聚焦
|
||||||
|
handleEditAble() {
|
||||||
|
this.$refs.introduceRef.Quill.enable(true);
|
||||||
|
this.$refs.introduceRef.Quill.focus();
|
||||||
|
},
|
||||||
|
setLaboratory(e) {
|
||||||
|
laboratorySelect({ research_id: e }).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
let flag = false;
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
const cityForm = this.$refs.cityForm.submitForm();
|
||||||
|
const fieldForm = this.$refs.fieldForm.submitForm();
|
||||||
|
if (valid && cityForm && fieldForm) {
|
||||||
|
flag = !flag;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.form_title {
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
// 上传图片框限制
|
||||||
|
// ::v-deep .el-upload--picture-card {
|
||||||
|
// width: 120px;
|
||||||
|
// height: 120px;
|
||||||
|
// line-height: 120px;
|
||||||
|
// }
|
||||||
|
.el-select,
|
||||||
|
.el-date-editor {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
488
src/views/dataList/patent/index.vue
Normal file
488
src/views/dataList/patent/index.vue
Normal file
@ -0,0 +1,488 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
v-show="showSearch"
|
||||||
|
:inline="true"
|
||||||
|
@submit.native.prevent
|
||||||
|
>
|
||||||
|
<el-form-item label="专利名称" prop="title">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.title"
|
||||||
|
placeholder="请输入专利名称"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="openDialog = true"
|
||||||
|
>认领</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" prop="id" align="center" />
|
||||||
|
<el-table-column label="专利名称" prop="title" align="center" />
|
||||||
|
<el-table-column label="申请号" prop="apply_code" align="center" />
|
||||||
|
<el-table-column label="发明人" prop="inventor" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
label="申请(专利权)人"
|
||||||
|
prop="apply_name"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column label="状态" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.shelf_status"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="2"
|
||||||
|
@change="handleStatusChange(scope.row)"
|
||||||
|
></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column label="申请日期" prop="apply_at" align="center">
|
||||||
|
<!-- <template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.apply_at) }}</span>
|
||||||
|
</template> -->
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.page_num"
|
||||||
|
:limit.sync="queryParams.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<!-- 添加或修改对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="700px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="申请人:" prop="apply_name">
|
||||||
|
<el-input
|
||||||
|
v-model="form.apply_name"
|
||||||
|
placeholder="请输入申请(专利权)人"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="申请人地址:" prop="apply_address">
|
||||||
|
<el-input
|
||||||
|
v-model="form.apply_address"
|
||||||
|
placeholder="请输入申请人地址"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发明人:" prop="inventor">
|
||||||
|
<el-input v-model="form.inventor" placeholder="请输入发明人" />
|
||||||
|
<!-- (多个请以 ; 隔开) -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="专利名称:" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入专利名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="申请号:" prop="apply_code">
|
||||||
|
<el-input v-model="form.apply_code" placeholder="请输入申请号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="公开号:" prop="open_code">
|
||||||
|
<el-input v-model="form.open_code" placeholder="请输入公开号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="申请日期:" prop="apply_at">
|
||||||
|
<el-date-picker
|
||||||
|
value-format="yyyyMMdd"
|
||||||
|
v-model.trim="form.apply_at"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择申请日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="公开日:" prop="open_at">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
value-format="yyyyMMdd"
|
||||||
|
v-model.trim="form.open_at"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择公开日"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="专利类型:" prop="kind">
|
||||||
|
<el-select v-model="form.kind" clearable placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in patentOptions"
|
||||||
|
:key="item.key"
|
||||||
|
:label="item.value"
|
||||||
|
:value="item.key"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="IPC分类号:" prop="ipc_code">
|
||||||
|
<el-input v-model="form.ipc_code" placeholder="请输入IPC分类号" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="状态:" prop="shelf_status">
|
||||||
|
<el-radio-group v-model="form.shelf_status">
|
||||||
|
<el-radio :label="1">上架</el-radio>
|
||||||
|
<el-radio :label="2">下架</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-form-item label="摘要:" prop="description">
|
||||||
|
<!-- <Editor v-model="form.description" :minHeight="150" /> -->
|
||||||
|
<el-input
|
||||||
|
v-model.number="form.description"
|
||||||
|
placeholder="请输入摘要"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主权项:" prop="principal_claim">
|
||||||
|
<!-- <Editor v-model="form.principal_claim" :minHeight="150" /> -->
|
||||||
|
<el-input
|
||||||
|
v-model.number="form.principal_claim"
|
||||||
|
placeholder="请输入主权项"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 认领专利 -->
|
||||||
|
<!-- <el-dialog title="认领专利" :visible.sync="openDialog" width="900px">
|
||||||
|
<el-form :model="claimQueryParams" ref="formClaim" :inline="true">
|
||||||
|
<el-form-item label="申请(专利权)人" prop="apply_name">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="claimQueryParams.apply_name"
|
||||||
|
placeholder="请输入申请(专利权)人"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发明人" prop="inventor">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="claimQueryParams.inventor"
|
||||||
|
placeholder="请输入发明人"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQueryClaim"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
v-loading="claimLoading"
|
||||||
|
max-height="500"
|
||||||
|
ref="claimTable"
|
||||||
|
:data="claimList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="数据编号" prop="id" align="center" />
|
||||||
|
<el-table-column label="申请人" prop="apply_name" align="center" />
|
||||||
|
<el-table-column label="发明人" prop="inventor" align="center" />
|
||||||
|
<el-table-column label="申请日期" prop="apply_at" align="center" />
|
||||||
|
<el-table-column label="专利名称" prop="title" align="center" />
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitClaimForm">确 定</el-button>
|
||||||
|
<el-button @click="openDialog = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
patentList,
|
||||||
|
patentAdd,
|
||||||
|
patentDetail,
|
||||||
|
patentEdit,
|
||||||
|
patentDelete,
|
||||||
|
patentShelf,
|
||||||
|
} from "@/api/dataList/patent";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
showSearch: true,
|
||||||
|
queryParams: {
|
||||||
|
title: undefined,
|
||||||
|
page_num: 1,
|
||||||
|
page_size: 10,
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
dataList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
apply_name: [
|
||||||
|
{ required: true, message: "申请人不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
apply_address: [
|
||||||
|
{ required: true, message: "申请人地址不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
open_code: [
|
||||||
|
{ required: true, message: "公开号不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
open_at: [
|
||||||
|
{ required: true, message: "公开日不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
inventor: [
|
||||||
|
{ required: true, message: "发明人不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
title: [
|
||||||
|
{ required: true, message: "专利名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
apply_code: [
|
||||||
|
{ required: true, message: "申请号不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
apply_at: [
|
||||||
|
{ required: true, message: "申请日期不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
kind: [
|
||||||
|
{ required: true, message: "请选择专利类型", trigger: "change" },
|
||||||
|
],
|
||||||
|
ipc_code: [
|
||||||
|
{ required: true, message: "IPC分类号不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
description: [
|
||||||
|
{ required: true, message: "摘要不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
principal_claim: [
|
||||||
|
{ required: true, message: "主权项不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
openDialog: false,
|
||||||
|
claimLoading: false,
|
||||||
|
claimQueryParams: {
|
||||||
|
apply_name: "",
|
||||||
|
inventor: "",
|
||||||
|
page_num: 1,
|
||||||
|
page_size: 100,
|
||||||
|
},
|
||||||
|
claimList: [],
|
||||||
|
ids: [],
|
||||||
|
formClaim: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.page_num = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
// 查找专利条件... 不用了
|
||||||
|
handleQueryClaim() {
|
||||||
|
if (!this.claimQueryParams.apply_name.length)
|
||||||
|
return this.$modal.msgError("请输入申请(专利权)人");
|
||||||
|
if (!this.claimQueryParams.inventor.length)
|
||||||
|
return this.$modal.msgError("请输入发明人");
|
||||||
|
this.claimQueryParams.page_num = 1;
|
||||||
|
this.getClaimList();
|
||||||
|
},
|
||||||
|
// 查找专利... 不用了
|
||||||
|
getClaimList() {
|
||||||
|
this.claimLoading = true;
|
||||||
|
// patentList 临时方法 需修改... 不用了
|
||||||
|
patentList(this.claimQueryParams).then((res) => {
|
||||||
|
this.claimList = res.data.data;
|
||||||
|
this.claimLoading = false;
|
||||||
|
this.claimList.forEach((item) => {
|
||||||
|
if (item.id == "XN0wBrbAZwQl") {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.claimTable.toggleRowSelection(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
patentList(this.queryParams).then((res) => {
|
||||||
|
this.dataList = res.data.data;
|
||||||
|
this.total = res.data.count;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: undefined,
|
||||||
|
apply_name: undefined,
|
||||||
|
apply_address: undefined,
|
||||||
|
inventor: undefined,
|
||||||
|
title: undefined,
|
||||||
|
apply_code: undefined,
|
||||||
|
open_code: undefined,
|
||||||
|
open_at: undefined,
|
||||||
|
apply_at: undefined,
|
||||||
|
kind: undefined,
|
||||||
|
ipc_code: undefined,
|
||||||
|
description: undefined,
|
||||||
|
// shelf_status: 1,
|
||||||
|
principal_claim: undefined,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "新增专利";
|
||||||
|
},
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
patentDetail({ id: row.id }).then((res) => {
|
||||||
|
this.form = res.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改专利";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitClaimForm() {},
|
||||||
|
// 状态修改
|
||||||
|
// handleStatusChange(row) {
|
||||||
|
// let text = row.shelf_status === 1 ? "启用" : "停用";
|
||||||
|
// this.$modal
|
||||||
|
// .confirm('确认要"' + text + '""' + row.id + '"数据吗?')
|
||||||
|
// .then(function () {
|
||||||
|
// return patentShelf({ id: row.id });
|
||||||
|
// })
|
||||||
|
// .then(() => {
|
||||||
|
// this.$modal.msgSuccess(text + "成功");
|
||||||
|
// })
|
||||||
|
// .catch(function () {
|
||||||
|
// row.shelf_status = row.shelf_status === 1 ? 2 : 1;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// this.form.inventor = this.form.inventor.replace(/;/g, ";");
|
||||||
|
if (this.form.id != undefined) {
|
||||||
|
patentEdit(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
patentAdd(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除编号为"' + row.id + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return patentDelete({ id: row.id });
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
107
src/views/examine/research/detail.vue
Normal file
107
src/views/examine/research/detail.vue
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div style="width: 50%">
|
||||||
|
<ResearchForm v-model="form" :isAdd="false" ref="researchForm" />
|
||||||
|
</div>
|
||||||
|
<el-button @click="submitForm(3)">审核拒绝</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm(2)">审核通过</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import ResearchForm from "@/views/components/ResearchForm";
|
||||||
|
import {
|
||||||
|
researchDetail,
|
||||||
|
researchEdit,
|
||||||
|
researchExamine,
|
||||||
|
} from "@/api/dataList/research";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
ResearchForm,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {
|
||||||
|
image: undefined,
|
||||||
|
name: undefined,
|
||||||
|
code: undefined,
|
||||||
|
tenant_id: undefined,
|
||||||
|
province: undefined, // 省code
|
||||||
|
city: undefined, // 市code
|
||||||
|
district: undefined, // 区code
|
||||||
|
address: undefined, // 详细地址
|
||||||
|
industrys: [],
|
||||||
|
researchs: [],
|
||||||
|
license: undefined,
|
||||||
|
introduce: undefined,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitForm(status) {
|
||||||
|
console.log(this.form);
|
||||||
|
if (this.$refs.researchForm.submitForm()) {
|
||||||
|
const str =
|
||||||
|
status == 2
|
||||||
|
? "<span style='color:green'>通过</span>"
|
||||||
|
: "<span class='el-message-box__errormsg'>拒绝</span>";
|
||||||
|
this.$prompt(`您将 ${str} 该数据审核,请输入处理备注`, "审核", {
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
closeOnClickModal: false,
|
||||||
|
inputType: "textarea",
|
||||||
|
inputPattern: status == 2 ? "" : /^.{1,30}$/,
|
||||||
|
inputErrorMessage: "请输入拒绝原因",
|
||||||
|
})
|
||||||
|
.then(({ value }) => {
|
||||||
|
researchEdit(this.form).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
const query = {
|
||||||
|
id: this.form.id,
|
||||||
|
status,
|
||||||
|
remark: value,
|
||||||
|
};
|
||||||
|
researchExamine(query).then((res) => {
|
||||||
|
this.$store.dispatch("tagsView/delView", this.$route);
|
||||||
|
this.$router.go(-1);
|
||||||
|
this.$modal.msgSuccess("处理成功");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
} else {
|
||||||
|
console.log("校验未通过");
|
||||||
|
}
|
||||||
|
// this.$refs["form"].validate((valid) => {
|
||||||
|
// if (valid) {
|
||||||
|
// if (this.form.id != undefined) {
|
||||||
|
// serviceEdit(this.form).then((response) => {
|
||||||
|
// this.$modal.msgSuccess("修改成功");
|
||||||
|
// this.open = false;
|
||||||
|
// this.getList();
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// serviceAdd(this.form).then((response) => {
|
||||||
|
// this.$modal.msgSuccess("新增成功");
|
||||||
|
// this.open = false;
|
||||||
|
// this.getList();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
let { id } = this.$route.query;
|
||||||
|
if (!id) {
|
||||||
|
this.$message.error("无ID");
|
||||||
|
this.$router.go(-1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
researchDetail({ id }).then((res) => {
|
||||||
|
this.form = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
164
src/views/examine/research/index.vue
Normal file
164
src/views/examine/research/index.vue
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="机构名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入机构名称"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核状态" prop="examine_status">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.examine_status"
|
||||||
|
placeholder="请选择审核状态"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
@clear="delete queryParams.examine_status"
|
||||||
|
>
|
||||||
|
<el-option label="审核中" :value="1" />
|
||||||
|
<el-option label="审核通过" :value="2" />
|
||||||
|
<el-option label="审核拒绝" :value="3" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属站点" prop="tenant_id" v-if="is_super">
|
||||||
|
<SiteOptions v-model="queryParams" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="数据编号" align="center" prop="id" />
|
||||||
|
<el-table-column label="机构名称" align="center" prop="name" />
|
||||||
|
<el-table-column label="统一社会信用代码" align="center" prop="code" />
|
||||||
|
<el-table-column label="研究方向" align="center" prop="code" />
|
||||||
|
<el-table-column
|
||||||
|
label="所属领域"
|
||||||
|
align="center"
|
||||||
|
prop="industrys"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.industrys[scope.row.industrys.length - 1] }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="站点" align="center" prop="area" />
|
||||||
|
<el-table-column label="所在地" align="center" prop="address" />
|
||||||
|
<el-table-column label="审核状态" align="center" prop="examine_status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="info" v-if="scope.row.examine_status == 1"
|
||||||
|
>审核中</el-tag
|
||||||
|
>
|
||||||
|
<el-tag type="success" v-else-if="scope.row.examine_status == 2"
|
||||||
|
>审核通过</el-tag
|
||||||
|
>
|
||||||
|
<el-tag type="danger" v-else>审核拒绝</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="申请时间" align="center" prop="created_at">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.created_at) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
:disabled="scope.row.examine_status != 1"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleDetail(scope.row.id)"
|
||||||
|
>审核</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.page_num"
|
||||||
|
:limit.sync="queryParams.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { researchList } from "@/api/dataList/research";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
is_super: this.$store.getters.is_super,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 机构表格数据
|
||||||
|
dataList: null,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
page_num: 1,
|
||||||
|
page_size: 10,
|
||||||
|
name: undefined,
|
||||||
|
examine_status: undefined,
|
||||||
|
tenant_id: undefined,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询机构列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
researchList(this.queryParams).then((response) => {
|
||||||
|
this.dataList = response.data.data;
|
||||||
|
this.total = response.data.count;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.page_num = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.dateRange = [];
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
handleDetail(id) {
|
||||||
|
console.log(id);
|
||||||
|
this.$router.push({
|
||||||
|
path: "/examine/researchDetail",
|
||||||
|
query: { id },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
Reference in New Issue
Block a user