|
@@ -11,51 +11,31 @@
|
|
|
</mySearch>
|
|
|
</div>
|
|
|
<div style="margin-right: 10px;display: flex;">
|
|
|
- <div>
|
|
|
- <el-button-group style=" display: flex; justify-content: flex-start;margin-right: 10px;">
|
|
|
- <el-button size="small" :type="componentType === 'visual' ? 'primary' : ''"
|
|
|
- @click="onChange2('visual')">可视化</el-button>
|
|
|
- <el-button :type="componentType === 'commodityTable' ? 'primary' : ''" @click="onChange2('commodityTable')"
|
|
|
- size="small">列表</el-button>
|
|
|
- <el-button :type="componentType === 'Card' ? 'primary' : ''" @click="onChange2('Card')"
|
|
|
- size="small">卡片</el-button>
|
|
|
+ <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"
|
|
|
+ placement="top">
|
|
|
+ <el-button @click="handleChangeView(item)" size="small"
|
|
|
+ :type="viewSelected === item.value ? 'primary' : ''">
|
|
|
+ <i :class="item.btn" style="font-size: 12px !important;"></i>
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
</el-button-group>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-popover placement="bottom" title="" width="250" trigger="click">
|
|
|
- <el-main class="patent-fast-edit-popover">
|
|
|
- <div class="btn" @click="handleSelectNumber(-1)">取消选择</div>
|
|
|
- <div class="btn" @click="handleSelectNumber(0)">本页选择</div>
|
|
|
- <div class="btn" @click="handleSelectNumber(1)">全部选择</div>
|
|
|
- <el-divider></el-divider>
|
|
|
- <div class="select-number">
|
|
|
- <span>从</span>
|
|
|
- <el-input size="mini" v-model="queryParams.startNumber" @change="change1"></el-input>
|
|
|
- <span>到</span>
|
|
|
- <el-input size="mini" v-model="queryParams.endNumber" @change="change2"></el-input>
|
|
|
- <el-button type="text" size="" @click="handleSelectNumber(2)">确定</el-button>
|
|
|
- </div>
|
|
|
- </el-main>
|
|
|
- <el-button type="primary" size="small" class="margin-right_10" slot="reference">
|
|
|
- 选择专利<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </el-button>
|
|
|
- </el-popover>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-dropdown split-button type="primary" size="small" @click="handleCommand('0')"
|
|
|
- @command="handleCommand($event)">
|
|
|
- <span>删除</span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown trigger="click" split-button type="primary" size="small">
|
|
|
+ <span @click="handleCommand('3')">显示栏位管理</span>
|
|
|
+ <el-dropdown-menu slot="dropdown" class="text-align_center">
|
|
|
<el-dropdown-item>
|
|
|
- <el-dropdown placement="left-start" @command="handleCommand($event)">
|
|
|
- <span>专利导入</span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item command="1">专利号导入</el-dropdown-item>
|
|
|
- <el-dropdown-item command="2">Excel导入</el-dropdown-item>
|
|
|
+ <el-dropdown @command="handleCommand($event)" placement="left-start">
|
|
|
+ <span> 专利导入 </span>
|
|
|
+ <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-menu>
|
|
|
</el-dropdown>
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item command="3">显示栏位管理</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
|
@@ -65,10 +45,29 @@
|
|
|
<el-main>
|
|
|
<component :is="componentType" :tableData="tableData" :queryParams="queryParams"></component>
|
|
|
</el-main>
|
|
|
- <el-footer>
|
|
|
- <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>
|
|
|
+ <el-footer style="display: flex;justify-content: space-between;align-items: center;">
|
|
|
+ <div>
|
|
|
+ <div style="display:flex;align-items:center">
|
|
|
+ <span v-if="selectedTotal > 0">
|
|
|
+ 已勾选 <b>{{ selectedTotal }}</b> 条
|
|
|
+ </span>
|
|
|
+ <el-popover placement="bottom" title="" width="220" trigger="click">
|
|
|
+ <el-main class="patent-fast-edit-popover" v-loading="selectNumberLoading">
|
|
|
+ <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>
|
|
|
+ </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>
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-footer>
|
|
|
</el-container>
|
|
|
</div>
|
|
@@ -80,60 +79,45 @@ export default {
|
|
|
components: {
|
|
|
commodityTable,
|
|
|
},
|
|
|
- props:{
|
|
|
- productId:{
|
|
|
- default:0
|
|
|
+ props: {
|
|
|
+ productId: {
|
|
|
+ default: 0
|
|
|
},
|
|
|
- productName:{
|
|
|
- default:'--'
|
|
|
+ productName: {
|
|
|
+ default: '--'
|
|
|
},
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- //检索字段
|
|
|
- searchFiled: [
|
|
|
- {
|
|
|
- label: '标题',
|
|
|
- value: 'productName1',
|
|
|
- type: 1,
|
|
|
- placeholder: '请输入标题'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '摘要',
|
|
|
- value: 'productName2',
|
|
|
- type: 1,
|
|
|
- placeholder: '请输入摘要'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '专利号',
|
|
|
- value: 'productName3',
|
|
|
- type: 1,
|
|
|
- placeholder: '请输入专利号'
|
|
|
- },
|
|
|
+ //视图方式
|
|
|
+ viewList: [
|
|
|
{
|
|
|
- label: '申请号',
|
|
|
- value: 'productName4',
|
|
|
- type: 1,
|
|
|
- placeholder: '请输入申请号'
|
|
|
+ value: 'patent-table-list-view',
|
|
|
+ title: '表格视图',
|
|
|
+ btn: 'el-icon-tickets',
|
|
|
},
|
|
|
{
|
|
|
- label: '申请人',
|
|
|
- value: 'productName5',
|
|
|
- type: 1,
|
|
|
- placeholder: '请输入申请人'
|
|
|
+ value: 'patent-abstract-list-view',
|
|
|
+ title: '摘要视图',
|
|
|
+ btn: 'el-icon-news',
|
|
|
},
|
|
|
{
|
|
|
- label: '权利人',
|
|
|
- value: 'productName6',
|
|
|
- type: 1,
|
|
|
- placeholder: '请输入权利人'
|
|
|
+ value: 'patent-picture-list-view',
|
|
|
+ title: '图片视图',
|
|
|
+ btn: 'el-icon-picture-outline',
|
|
|
},
|
|
|
+ // {
|
|
|
+ // value: 'PatentPDFListView',
|
|
|
+ // title: 'PDF视图',
|
|
|
+ // btn: 'iconfont icon-pdf',
|
|
|
+ // }
|
|
|
],
|
|
|
+ //选择的视图
|
|
|
+ viewSelected: "patent-table-list-view",
|
|
|
+ //检索字段
|
|
|
+ searchFiled: [],
|
|
|
//检索条件
|
|
|
- searchOption: {
|
|
|
- questionName: this.eventName,
|
|
|
- applicationScenario: this.applicationScenario
|
|
|
- },
|
|
|
+ searchOption: {},
|
|
|
// 显示指定的子组件
|
|
|
componentType: 'commodityTable',
|
|
|
// 查询专利所需字段
|
|
@@ -147,28 +131,89 @@ export default {
|
|
|
tableData: [],
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
-
|
|
|
+ async mounted() {
|
|
|
+ this.customList = await this.$commonJS.getCustomField('patent', { projectId: `${this.productId}productId`, taskId: this.taskId || null })
|
|
|
+ await this.getColumn()
|
|
|
+ // 获取专利信息
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
- onChange2(val) {
|
|
|
- this.componentType=val
|
|
|
+ //获取检索字段
|
|
|
+ async getColumn() {
|
|
|
+ let params = [{
|
|
|
+ tableName: 'patent',
|
|
|
+ projectId: this.projectId,
|
|
|
+ }]
|
|
|
+ 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, {
|
|
|
+ label: 'name',
|
|
|
+ value: 'field',
|
|
|
+ type: 'type',
|
|
|
+ group: 'group',
|
|
|
+ fieldType: 'fieldType',
|
|
|
+ groupBy: 'groupBy',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- // 选择专利事件
|
|
|
- handleSelectNumber(val) { },
|
|
|
- // 起始数字框
|
|
|
- change1(){},
|
|
|
- // 结束数字框
|
|
|
- change2(){},
|
|
|
- // 分页
|
|
|
- handleCurrentChange(val) { },
|
|
|
- // 删除等下拉菜单
|
|
|
- handleCommand(event) {
|
|
|
- console.log(event);
|
|
|
- },
|
|
|
- //获取检索条件检索
|
|
|
- search(val) {
|
|
|
+ //获取专利信息
|
|
|
+ getList(size) {
|
|
|
+ if (size) {
|
|
|
+ this.queryParams.size = size
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ ...this.queryParams,//分页信息及区分同族类型
|
|
|
+ projectId: this.projectId,
|
|
|
+ searchQuery: this.searchStr || '',//检索条件
|
|
|
+ customFields: this.customFields || [],
|
|
|
+ orderDTOList: this.sort,//排序信息
|
|
|
+ }
|
|
|
+ this.$store.commit("SET_PATENT_RECORDS", []);
|
|
|
+ this.$api.QueryPatent(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.tableData = res.data.data
|
|
|
+ this.total = res.data.total
|
|
|
|
|
|
+ // this.$set(this.queryParams, 'startNumber', this.endNumber > 0 ? this.startNumber : 1)
|
|
|
+ // this.$set(this.queryParams, 'endNumber', this.endNumber > 0 ? this.endNumber : this.total)
|
|
|
+ // this.$store.commit("SET_PATENT_PARAMS", params);
|
|
|
+ // this.$store.commit("SET_PATENT_RECORDS", res.data.data);
|
|
|
+ // if (this.quickSelect) {
|
|
|
+ // this.commonSwitch()
|
|
|
+ // }
|
|
|
+ this.isRefresh()
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.tableData = []
|
|
|
+ this.total = 0
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //切换视图
|
|
|
+ async handleChangeView(item) {
|
|
|
+ this.viewSelected = item.value
|
|
|
+ this.queryParams.current = 1
|
|
|
+ // if (this.viewSelected == 'PatentPDFListView') {
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ if (this.viewSelected === 'patent-picture-list-view') {
|
|
|
+ this.$set(this.queryParams, 'size', 20)
|
|
|
+ } else {
|
|
|
+ this.queryParams.size = 10
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
},
|
|
|
},
|
|
|
}
|
|
@@ -183,6 +228,7 @@ export default {
|
|
|
background: #fff;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.btn1 {
|
|
|
background: #909399;
|
|
|
}
|
|
@@ -233,6 +279,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.patent-left {
|
|
|
margin-top: 69px;
|
|
|
overflow: hidden;
|
|
@@ -260,4 +307,5 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
|
|
|
-}</style>
|
|
|
+}
|
|
|
+</style>
|