|
@@ -7,10 +7,11 @@
|
|
|
<div class="headerDiv_two">
|
|
|
<div>
|
|
|
<!-- 检索信息 -->
|
|
|
- <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
|
|
|
- </mySearch>
|
|
|
+ <searchPatent ref="searchPatent" style="margin-left: 10px;" :searchFiled="searchFiled"
|
|
|
+ @searchValue="handleSearchValue"></searchPatent>
|
|
|
</div>
|
|
|
<div style="margin-right: 10px;display: flex;">
|
|
|
+ <!-- 视图切换 -->
|
|
|
<div style="margin-right: 10px;">
|
|
|
<el-button-group class="margin-left_10">
|
|
|
<el-tooltip v-for="item in viewList" :key="item.value" class="item" effect="dark" :content="item.title"
|
|
@@ -22,6 +23,7 @@
|
|
|
</el-tooltip>
|
|
|
</el-button-group>
|
|
|
</div>
|
|
|
+ <!-- 显示栏位管理等下拉菜单 -->
|
|
|
<div>
|
|
|
<el-dropdown trigger="click" split-button type="primary" size="small">
|
|
|
<span @click="handleCommand('3')">显示栏位管理</span>
|
|
@@ -32,7 +34,7 @@
|
|
|
<el-dropdown-menu style="text-align:center">
|
|
|
<el-dropdown-item command="0"> Excel导入 </el-dropdown-item>
|
|
|
<el-dropdown-item command="1">专利号导入 </el-dropdown-item>
|
|
|
- <!-- <el-dropdown-item command="2">检索条件导入 </el-dropdown-item> -->
|
|
|
+ <el-dropdown-item command="2">检索条件导入 </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</el-dropdown-item>
|
|
@@ -42,8 +44,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-header>
|
|
|
- <el-main>
|
|
|
- <component :is="componentType" :tableData="tableData" :queryParams="queryParams"></component>
|
|
|
+ <el-main v-loading="loading">
|
|
|
+ <component :is="viewSelected" :tableData="tableData" :queryParams="queryParams" :patentNoList.sync="patentNoList"
|
|
|
+ :column="customList" @on-sort="handleSort">
|
|
|
+ </component>
|
|
|
</el-main>
|
|
|
<el-footer style="display: flex;justify-content: space-between;align-items: center;">
|
|
|
<div>
|
|
@@ -52,32 +56,46 @@
|
|
|
已勾选 <b>{{ selectedTotal }}</b> 条
|
|
|
</span>
|
|
|
<el-popover placement="bottom" title="" width="220" trigger="click">
|
|
|
- <el-main class="patent-fast-edit-popover" v-loading="selectNumberLoading">
|
|
|
+ <el-main class="patent-fast-edit-popover">
|
|
|
<div class="btn" @click="handleCancelSelectNumber">取消选择</div>
|
|
|
<div class="btn" @click="handleSelectNumber(0)">本页选择</div>
|
|
|
</el-main>
|
|
|
<el-button type="info" size="small" class="margin-left_10" slot="reference"> 选择专利<i
|
|
|
class="el-icon-arrow-down el-icon--right"></i></el-button>
|
|
|
</el-popover>
|
|
|
- <el-button type="primary" size="small" style="margin-left: 10px;"> 删除</el-button>
|
|
|
+ <el-button @click="handleDel" v-if="selectedTotal > 0" type="primary" size="small" style="margin-left: 10px;">
|
|
|
+ 删除</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
|
|
|
- :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
|
|
|
+ <el-pagination background layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :current-page.sync="queryParams.current" :page-sizes="sizeArr" :page-size.sync="queryParams.size"
|
|
|
+ @current-change="handleCurrentChange" @size-change="getList" :total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
|
|
|
</el-footer>
|
|
|
</el-container>
|
|
|
+
|
|
|
+ <field ref="field" type="patent" @getFieldList="getFieldList"></field>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import commodityTable from './view/table.vue'
|
|
|
+import { fastSelectPatent } from '@/views/project/patentCollection/components/mixins/fastSelectPatent'
|
|
|
+import PatentAbstractListView from '@/views/project/patentCollection/components/views/Abstract.vue'
|
|
|
+import PatentTableListView from '@/views/project/patentCollection/components/views/Table.vue'
|
|
|
+import PatentPictureListView from '@/views/project/patentCollection/components/views/Picture'
|
|
|
+import searchPatent from '@/views/report/components/patentList/components/searchPatent.vue';
|
|
|
+import field from '@/views/components/dialog/fields.vue';
|
|
|
export default {
|
|
|
+ mixins: [fastSelectPatent],
|
|
|
components: {
|
|
|
- commodityTable,
|
|
|
+ PatentAbstractListView,
|
|
|
+ PatentTableListView,
|
|
|
+ PatentPictureListView,
|
|
|
+ searchPatent,
|
|
|
+ field,
|
|
|
},
|
|
|
props: {
|
|
|
productId: {
|
|
@@ -116,55 +134,78 @@ export default {
|
|
|
viewSelected: "patent-table-list-view",
|
|
|
//检索字段
|
|
|
searchFiled: [],
|
|
|
- //检索条件
|
|
|
- searchOption: {},
|
|
|
- // 显示指定的子组件
|
|
|
- componentType: 'commodityTable',
|
|
|
- // 查询专利所需字段
|
|
|
- queryParams: {
|
|
|
- current: 1,
|
|
|
- size: 10,
|
|
|
- },
|
|
|
+ // 检索条件
|
|
|
+ searchStr: '',
|
|
|
+ // sort表格排序
|
|
|
+ sort: [],
|
|
|
+ //页大小
|
|
|
+ sizeArr: [10, 20, 30, 40, 50, 100],
|
|
|
+ // 分页信息
|
|
|
+ // queryParams: {
|
|
|
+ // current: 1,
|
|
|
+ // size: 10,
|
|
|
+ // },
|
|
|
// 专利总数
|
|
|
- total: 0,
|
|
|
+ // total: 0,
|
|
|
// 子组件table数据源
|
|
|
- tableData: [],
|
|
|
+ // tableData: [],
|
|
|
+ // 显示栏位
|
|
|
+ customList: [],
|
|
|
+ // 表格的loading
|
|
|
+ loading: false,
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
async mounted() {
|
|
|
- this.customList = await this.$commonJS.getCustomField('patent', { projectId: `${this.productId}productId`, taskId: this.taskId || null })
|
|
|
+ this.customList = await this.$commonJS.getCustomField('patent', { projectId: `${this.productId}productId`, taskId: this.taskId || null, from: 'product', })
|
|
|
await this.getColumn()
|
|
|
// 获取专利信息
|
|
|
- this.getList()
|
|
|
+ // this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 删除
|
|
|
+ handleDel() {
|
|
|
+ this.$confirm('此操作将永久删除选中的专利, 不可恢复, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let params = this.isAdd
|
|
|
+ this.$api.del(params).then(response => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.info('已取消删除操作')
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 处理后的条件
|
|
|
+ handleSearchValue({ searchStr, customFields }) {
|
|
|
+ this.searchStr = searchStr
|
|
|
+ // this.customFields = customFields
|
|
|
+ // this.$refs.customFields.close()
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
//获取检索字段
|
|
|
async getColumn() {
|
|
|
let params = [{
|
|
|
tableName: 'patent',
|
|
|
- projectId: this.projectId,
|
|
|
+ projectId: `${this.productId}productId`,
|
|
|
+ from: 'product',//来源
|
|
|
}]
|
|
|
await this.$api.getQueryFields(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
let conditionDTOList = JSON.parse(JSON.stringify(res.data.data[0].conditionDTOList))
|
|
|
- let field = conditionDTOList.filter(item => {
|
|
|
- return item.group == 'nos'
|
|
|
- })
|
|
|
- let custom = conditionDTOList.filter(item => {
|
|
|
- return item.group == 'customField'
|
|
|
- })
|
|
|
- let customField = custom.filter(item => {
|
|
|
- return item.type != 'tree' && item.type != 'Array'
|
|
|
- })
|
|
|
- let arr = field.concat(customField)
|
|
|
// 搜索字段
|
|
|
- this.searchFiled = this.$commonJS.getField(arr, (u) => u.ifSearch == true, {
|
|
|
+ this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
|
|
|
label: 'name',
|
|
|
value: 'field',
|
|
|
type: 'type',
|
|
|
group: 'group',
|
|
|
- fieldType: 'fieldType',
|
|
|
- groupBy: 'groupBy',
|
|
|
+ // fieldType: 'fieldType',
|
|
|
+ // groupBy: 'groupBy',
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -176,12 +217,13 @@ export default {
|
|
|
}
|
|
|
let params = {
|
|
|
...this.queryParams,//分页信息及区分同族类型
|
|
|
- projectId: this.projectId,
|
|
|
+ productId: this.productId,
|
|
|
searchQuery: this.searchStr || '',//检索条件
|
|
|
- customFields: this.customFields || [],
|
|
|
+ customFields: [],
|
|
|
orderDTOList: this.sort,//排序信息
|
|
|
}
|
|
|
- this.$store.commit("SET_PATENT_RECORDS", []);
|
|
|
+ this.loading = true
|
|
|
+ // this.$store.commit("SET_PATENT_RECORDS", []);
|
|
|
this.$api.QueryPatent(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableData = res.data.data
|
|
@@ -194,13 +236,32 @@ export default {
|
|
|
// if (this.quickSelect) {
|
|
|
// this.commonSwitch()
|
|
|
// }
|
|
|
+ this.loading = false
|
|
|
this.isRefresh()
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
this.tableData = []
|
|
|
this.total = 0
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
},
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.queryParams.current = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ //排序
|
|
|
+ handleSort({ column, prop, order }) {
|
|
|
+ //如需要多个字段排序,则不需要清空
|
|
|
+ var params = {
|
|
|
+ sort: this.sort,
|
|
|
+ column,
|
|
|
+ prop,
|
|
|
+ order,
|
|
|
+ }
|
|
|
+ this.sort = this.$commonJS.getSortData(params)
|
|
|
+ this.queryParams.current = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
//切换视图
|
|
|
async handleChangeView(item) {
|
|
|
this.viewSelected = item.value
|
|
@@ -215,6 +276,45 @@ export default {
|
|
|
}
|
|
|
this.getList()
|
|
|
},
|
|
|
+ // 显示栏位管理下拉菜单事件
|
|
|
+ handleCommand(even) {
|
|
|
+ switch (even) {
|
|
|
+ case '0'://Excel导入
|
|
|
+ this.patentImport(this.productId,1)
|
|
|
+ break
|
|
|
+ case '1'://专利号导入
|
|
|
+ this.patentImport(this.productId,2)
|
|
|
+ break
|
|
|
+ case '2'://检索条件导入
|
|
|
+ this.patentImport(this.productId,4)
|
|
|
+ break
|
|
|
+ case '3'://显示栏位管理
|
|
|
+ this.handleFieldManage()
|
|
|
+ break
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //显示栏位管理
|
|
|
+ async handleFieldManage() {
|
|
|
+ this.$refs.field.open(this.customList)
|
|
|
+ },
|
|
|
+ //获取自定义显示栏位
|
|
|
+ getFieldList(data) {
|
|
|
+ this.customList = data
|
|
|
+ },
|
|
|
+ //专利导入
|
|
|
+ patentImport(productId, type) {
|
|
|
+ var form = {
|
|
|
+ importToId: productId,
|
|
|
+ importToType: 2,//0专题库1报告2产品
|
|
|
+ type: type,
|
|
|
+ // ifUpdate: false,
|
|
|
+ // crons: '',
|
|
|
+ }
|
|
|
+ this.$commonJS.toImportParent(form, type)
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|