SelectedPatent.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  1. <template>
  2. <!-- 对比文件2 -->
  3. <div style="">
  4. <!-- <el-form :inline="true" style="margin-top:20px">
  5. <el-form-item>
  6. <el-input v-model="queryParams.name" size="small" placeholder="请输入"></el-input>
  7. </el-form-item>
  8. <el-form-item>
  9. <el-button type="" size="small" @click="getList2">查询</el-button>
  10. <el-button type="" size="small" @click="getPatentList">确定对比清单</el-button>
  11. </el-form-item>
  12. </el-form> -->
  13. <div style="display: flex; justify-content: space-between;">
  14. <div :style="{visibility: selectedTotal>0?'visible':'hidden'}" >
  15. 已勾选 <b>{{ selectedTotal }}</b> 条
  16. </div>
  17. <!-- <el-select v-model="queryParams.showPatent" @chang="showPatent($event)">
  18. <el-option label="未选择" value="0"></el-option>
  19. <el-option label="已选择" value="1"></el-option>
  20. <el-option label="全部展示" value="2"></el-option>
  21. </el-select> -->
  22. <div>
  23. <!-- <el-button type="primary" @click="checkSelected">查看已选择</el-button> -->
  24. <!-- <el-button type="primary" @click="savePatentList" >删除</el-button> -->
  25. </div>
  26. </div>
  27. <!-- <el-tabs v-model="activeName" @tab-click="handleClick" style="margin-top:40px">
  28. <el-tab-pane label="相似特征专利文件" name="first">
  29. <el-table
  30. :data="sameData"
  31. border
  32. :span-method="objectSpanMethod"
  33. style="min-width: 100%; overflow:auto">
  34. <el-table-column
  35. prop="patentNo"
  36. align="center"
  37. label="专利号"
  38. width="200px">
  39. <template slot-scope="scope">
  40. <el-checkbox-group v-model="checkList" style="display:inline-block">
  41. <el-checkbox :label="scope.row.patentNo" @change="getFunInfo(scope.row.patentNo)"> {{scope.row.patentNo}} </el-checkbox>
  42. </el-checkbox-group>
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="word" align="center" label="文字"> </el-table-column>
  46. <el-table-column prop="features" align="center" label="特征"> </el-table-column>
  47. </el-table>
  48. </el-tab-pane>
  49. <el-tab-pane label="选择对比文件" name="second"> -->
  50. <div style="display:flex;justify-content: flex-end;padding-bottom:20px">
  51. <!-- <el-button type="primary" size="small" style="margin-right:10px;width:70px">导入</el-button> -->
  52. <el-button type="primary" size="small" @click="deletePatentList" style="margin-right:10px;width:70px">删除</el-button>
  53. <div class="btn1" @click="sift" style="width:80px;height:32px;display:flex;justify-content:space-around;border-radius:5px; cursor: pointer;">
  54. <img src="@/assets/img/filtrationSearch.png" alt="" style="width:16px;height:16px;margin-top:9px;margin-left:8px"><p style="margin:0 8px 0 0;line-height:32px;color:white;font-size:14px">筛选 </p>
  55. </div>
  56. <el-popover placement="bottom" title="" width="250" trigger="click">
  57. <el-main class="patent-fast-edit-popover" v-loading="selectNumberLoading">
  58. <div class="btn" @click="handleSelectNumber(0)">本页选择</div>
  59. <div class="btn" @click="handleSelectNumber(1)">全部选择</div>
  60. <el-divider></el-divider>
  61. <div class="select-number">
  62. <span>从</span>
  63. <el-input size="mini" v-model="queryParams.startNumber"></el-input>
  64. <span>到</span>
  65. <el-input size="mini" v-model="queryParams.endNumber"></el-input>
  66. <el-button type="text" size="" @click="handleSelectNumber(2)">确定</el-button>
  67. </div>
  68. </el-main>
  69. <el-button type="info" size="small" class="margin-left_10" slot="reference">
  70. 选择专利<i class="el-icon-arrow-down el-icon--right"></i>
  71. </el-button>
  72. </el-popover>
  73. <el-button type="text" size="small" class="margin-left_10" @click="handleCancelSelectNumber">取消选择</el-button>
  74. </div>
  75. <el-table
  76. :data="tableData"
  77. border
  78. :row-key="getRowKeys"
  79. v-loading="loading"
  80. style="min-width: 100%; overflow:auto">
  81. <el-table-column width="80" align="center">
  82. <template slot-scope="scope">
  83. <div>
  84. <el-checkbox-group v-model="checkList" style="display:inline-block">
  85. <el-checkbox :label="scope.row.patentNo" @change="getFunInfo(scope.row.patentNo)">
  86. <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
  87. </el-checkbox>
  88. </el-checkbox-group>
  89. </div>
  90. </template>
  91. </el-table-column>
  92. <el-table-column
  93. prop="patentNo"
  94. label="专利号"
  95. align="center"
  96. width="200px">
  97. <template slot-scope="scope">
  98. <div>
  99. <el-link type="primary" @click="toPatentDetails(scope.row.patentNo)">{{scope.row.patentNo}}</el-link>
  100. </div>
  101. <!-- <el-checkbox-group v-model="checkList" style="display:inline-block">
  102. <el-checkbox :label="scope.row.patentNo" @change="getFunInfo(scope.row.patentNo)">
  103. {{scope.row.patentNo}}
  104. </el-checkbox>
  105. </el-checkbox-group> -->
  106. </template>
  107. </el-table-column>
  108. <el-table-column
  109. prop="name"
  110. label="专利标题"
  111. align="center"
  112. width="300px">
  113. </el-table-column>
  114. <el-table-column
  115. prop="simpleStatus"
  116. align="center"
  117. label="状态">
  118. </el-table-column>
  119. </el-table>
  120. <div class="pagination">
  121. <el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
  122. </div>
  123. <!-- <Patent-List :id="projectId"></Patent-List> -->
  124. <!-- </el-tab-pane>
  125. </el-tabs> -->
  126. <el-dialog title="筛选" :visible.sync="visible" width="1000px" max-height="600" :before-close="close" append-to-body >
  127. <div style="height: 500px">
  128. <el-form ref="form" :model="form" label-width="80px" label-position="left">
  129. <el-form-item label="标题">
  130. <el-input type="textarea" v-model="form.patentName" placeholder="请输入查询内容"></el-input>
  131. </el-form-item>
  132. <el-form-item label="摘要">
  133. <el-input type="textarea" v-model="form.abstractStr" placeholder="请输入查询内容"></el-input>
  134. </el-form-item>
  135. <el-form-item label="专利号">
  136. <el-input type="textarea" v-model="form.patentNo" placeholder="请输入查询内容"></el-input>
  137. </el-form-item>
  138. <el-form-item label="申请号">
  139. <el-input type="textarea" v-model="form.applicationNo" placeholder="请输入查询内容"></el-input>
  140. </el-form-item>
  141. <el-form-item label="申请人">
  142. <el-input type="textarea" v-model="form.applicationName" placeholder="请输入查询内容"></el-input>
  143. </el-form-item>
  144. <el-form-item label="权利人">
  145. <el-input type="textarea" v-model="form.obligeeName" placeholder="请输入查询内容"></el-input>
  146. </el-form-item>
  147. <!-- <el-form-item label="申请号">
  148. <el-input type="textarea" v-model="form.applicationNo" placeholder="请输入查询内容"></el-input>
  149. </el-form-item> -->
  150. </el-form>
  151. </div>
  152. <div slot="footer" class="dialog-footer">
  153. <el-button @click="close">取 消</el-button>
  154. <el-button type="primary" @click="sure" >确 定</el-button>
  155. </div>
  156. </el-dialog>
  157. </div>
  158. </template>
  159. <script>
  160. import { PatentDetails } from '@/views/components/common/mixins';
  161. export default {
  162. mixins:[PatentDetails],
  163. props: ['reportId','loadPatent'],
  164. data() {
  165. return {
  166. selectedTotal:0,
  167. isFetch:true,
  168. quickSelect:false,//是否快速选择
  169. loading: true,
  170. visible: false,
  171. activeName: 'first',
  172. selected: [],
  173. checkList: [],//回显
  174. tableData: [],
  175. sameData: [],
  176. total: 0,
  177. form: {},
  178. formS:{},
  179. startNumber:1,
  180. endNumber:0,
  181. queryParams: {
  182. state:1,
  183. isAdd:[],
  184. isDelete:[],
  185. folder: null,
  186. projectId: null,
  187. read: 'all',
  188. current: 1,
  189. size: 10,
  190. name: '',
  191. abstractStr: '',
  192. publicNo: '',
  193. applicationNo: '',
  194. rightContent: '',
  195. sort: {
  196. order: 'asc',
  197. prop: 'id'
  198. },
  199. field: [],
  200. tree: [],
  201. selected: [],
  202. startNumber: 1,
  203. endNumber: 0,
  204. family: 0,
  205. showPatent: "0",
  206. patentName: "",
  207. patentNo: "",
  208. applicationName: "",
  209. obligeeName:"",
  210. },
  211. mergeArr: ['id', 'patentNo'],
  212. mergeObj: {},
  213. selectNumberLoading: false,
  214. }
  215. },
  216. created() {
  217. },
  218. mounted() {
  219. this.getList()
  220. // this.getSameData()
  221. },
  222. methods: {
  223. sift() {
  224. this.visible = true
  225. },
  226. // 筛选弹窗确定
  227. sure() {
  228. this.formS=JSON.parse(JSON.stringify(this.form))
  229. for (let key in this.formS) {
  230. this.queryParams[key]=this.formS[key]
  231. }
  232. // this.queryParams.patentName=this.form.patentName
  233. this.handleCancelSelectNumber()
  234. this.getList2()
  235. this.visible = false
  236. // this.form = {}
  237. },
  238. close() {
  239. this.visible = false
  240. this.form = this.formS
  241. },
  242. getSelectedTotal(){
  243. this.selectedTotal = Number(this.endNumber) - Number(this.startNumber) + 1 + Number(this.queryParams.isAdd.length) - Number(this.queryParams.isDelete.length)
  244. },
  245. async Switch(type) {//选择...确定公用
  246. let params = { ...this.queryParams }
  247. if (params.field.length == 0) {
  248. params.field = params.tree
  249. }
  250. switch (type) {
  251. case 0:
  252. this.queryParams.selected = this.tableData.map(item => item.patentNo);
  253. this.checkList = [...new Set(this.checkList.concat(this.queryParams.selected))]
  254. // this.endNumber = this.queryParams.endNumber
  255. // this.selectedTotal = this.checkList.length
  256. //
  257. if(!this.quickSelect){
  258. this.queryParams.isAdd=JSON.parse(JSON.stringify(this.checkList))
  259. this.getSelectedTotal()
  260. break;
  261. }
  262. this.tableData.forEach((item,index)=>{
  263. var position = (this.queryParams.current-1)*this.queryParams.size + index + 1
  264. if(position>=this.startNumber){
  265. if(this.endNumber>=this.queryParams.current * this.queryParams.size){
  266. var index1 = this.queryParams.isDelete.findIndex(i=>{
  267. return i == item.patentNo
  268. })
  269. if(index1!=-1){
  270. this.queryParams.isDelete.splice(index1,1)
  271. }
  272. }else{
  273. if(position<=this.endNumber){
  274. var index1 = this.queryParams.isDelete.findIndex(i=>{
  275. return i == item.patentNo
  276. })
  277. if(index1!=-1){
  278. this.queryParams.isDelete.splice(index1,1)
  279. }
  280. }else{
  281. var index2 = this.queryParams.isAdd.findIndex(i=>{
  282. return i == item.patentNo
  283. })
  284. if(index2==-1){
  285. this.queryParams.isAdd.push(item.patentNo)
  286. }
  287. }
  288. }
  289. }else{
  290. var index2 = this.queryParams.isAdd.findIndex(i=>{
  291. return i == item.patentNo
  292. })
  293. if(index2==-1){
  294. this.queryParams.isAdd.push(item.patentNo)
  295. }
  296. }
  297. })
  298. this.getSelectedTotal()
  299. this.getList()
  300. break
  301. case 1:
  302. params.startNumber = 1;
  303. params.endNumber = this.total
  304. this.startNumber = 1
  305. this.endNumber = this.total
  306. // this.commonSwitch()
  307. // this.quickSelect = true
  308. // break
  309. case 2:
  310. // this.selectNumberLoading = true
  311. // this.$api.getComPatentNos(params).then(response => {
  312. // console.log(response.data)
  313. // this.queryParams.selected = response.data
  314. // this.checkList = [...new Set(this.checkList.concat(this.queryParams.selected))]
  315. // // this.checkList = this.queryParams.selected
  316. // this.selectNumberLoading = false
  317. // this.getList()
  318. // }).catch(error => {
  319. // this.selectNumberLoading = false
  320. // })
  321. this.queryParams.isDelete = []
  322. this.queryParams.isAdd = []
  323. if (type == 2) {
  324. if (!Number(this.queryParams.startNumber)||!Number(this.queryParams.endNumber)) {
  325. this.queryParams.endNumber =this.endNumber>0?this.endNumber:this.total
  326. this.queryParams.startNumber =this.endNumber>0?this.startNumber:1
  327. break;
  328. }
  329. this.startNumber = this.queryParams.startNumber
  330. this.endNumber = this.queryParams.endNumber
  331. }
  332. // this.checkList =JSON.parse(JSON.stringify(this.queryParams.selected))
  333. this.checkList=[]
  334. this.queryParams.isDelete = []
  335. this.queryParams.isAdd = []
  336. await this.getList()
  337. this.commonSwitch()
  338. this.quickSelect = true
  339. break
  340. }
  341. },
  342. commonSwitch(){
  343. if(this.queryParams.size*this.queryParams.current>=this.startNumber ){
  344. if(this.queryParams.size*this.queryParams.current>=this.endNumber){
  345. if(this.queryParams.size*(this.queryParams.current-1)+1<=this.startNumber){
  346. var a = this.startNumber-(this.queryParams.size*(this.queryParams.current-1)+1)
  347. var b = this.endNumber-(this.queryParams.size*(this.queryParams.current-1)+1)
  348. for(var y=a;y<=b;y++){
  349. this.toIsDelete(this.tableData[y].patentNo,y)
  350. }
  351. }else{
  352. var a = (this.queryParams.size*(this.queryParams.current-1)+1)-(this.queryParams.size*(this.queryParams.current-1)+1)
  353. var b = this.endNumber-(this.queryParams.size*(this.queryParams.current-1)+1)
  354. for(var y=a;y<=b;y++){
  355. this.toIsDelete(this.tableData[y].patentNo,y)
  356. }
  357. }
  358. }else{
  359. if(this.queryParams.size*(this.queryParams.current-1)+1<=this.startNumber){
  360. var a = this.startNumber-(this.queryParams.size*(this.queryParams.current-1)+1)
  361. var b = this.queryParams.size*this.queryParams.current-(this.queryParams.size*(this.queryParams.current-1)+1)
  362. for(var y=a;y<=b;y++){
  363. this.toIsDelete(this.tableData[y].patentNo,y)
  364. }
  365. }else{
  366. var a = (this.queryParams.size*(this.queryParams.current-1)+1)-(this.queryParams.size*(this.queryParams.current-1)+1)
  367. var b = this.queryParams.size*this.queryParams.current-(this.queryParams.size*(this.queryParams.current-1)+1)
  368. for(var y=a;y<=b;y++){
  369. this.toIsDelete(this.tableData[y].patentNo,y)
  370. }
  371. }
  372. }
  373. }
  374. this.checkList = [...new Set(this.checkList)]
  375. this.selected = this.checkList
  376. this.getSelectedTotal()
  377. // console.log(this.checkList)
  378. },
  379. toIsDelete(patentNo,y){
  380. var index2 = this.queryParams.isDelete.findIndex(i=>{
  381. return i==patentNo
  382. })
  383. if(index2!=-1){
  384. }else{
  385. this.checkList.push(this.tableData[y].patentNo)
  386. }
  387. var index = this.queryParams.selected.findIndex(item=>{
  388. return item == patentNo
  389. })
  390. if(index!=-1){
  391. var index3 = this.queryParams.isDelete.findIndex(m=>{
  392. return m==patentNo
  393. })
  394. if(index3!=-1){
  395. }else{
  396. this.queryParams.isDelete.push(this.queryParams.selected[index])
  397. }
  398. }
  399. },
  400. handleSelectNumber(type) {
  401. this.Switch(type)
  402. },
  403. handleCancelSelectNumber() {//取消选择
  404. this.queryParams.isAdd = []
  405. this.queryParams.isDelete = []
  406. this.startNumber = 1
  407. this.queryParams.startNumber = 1
  408. this.queryParams.endNumber = this.total
  409. this.endNumber = 0
  410. this.queryParams.selected = []
  411. this.checkList = []
  412. this.quickSelect = false
  413. this.selectedTotal = 0
  414. // this.getList()
  415. },
  416. handleClick(tab, event) {
  417. // console.log(tab, event);
  418. },
  419. getFunInfo(val) {
  420. if(this.quickSelect){
  421. var index4 = this.queryParams.selected.findIndex(item=>{
  422. return item == val
  423. })
  424. if(index4!=-1){
  425. var a = {
  426. reportId:this.reportId,
  427. patentNo:val
  428. }
  429. this.$api.deleteCompareNo(a).then(response=>{
  430. if(response.code == 200){
  431. // this.getList()
  432. this.queryParams.selected.splice(index4,1)
  433. }
  434. })
  435. this.isFind(val)
  436. }else{
  437. this.isFind(val)
  438. }
  439. }else{
  440. var index = this.queryParams.selected.findIndex(item=>{
  441. return item == val
  442. })
  443. if(index!=-1){
  444. var a = {
  445. reportId:this.reportId,
  446. patentNo:val
  447. }
  448. this.$api.deleteCompareNo(a).then(response=>{
  449. if(response.code == 200){
  450. this.getList()
  451. }
  452. })
  453. }else{
  454. var index5 = this.queryParams.isAdd.findIndex(item=>{
  455. return item == val
  456. })
  457. if(index5!=-1){
  458. this.queryParams.isAdd.splice(index5,1)
  459. }else{
  460. this.queryParams.isAdd.push(val)
  461. }
  462. }
  463. }
  464. this.getSelectedTotal()
  465. },
  466. isFind(val){
  467. if(this.isFetch){
  468. var index = this.selected.findIndex(item=>{
  469. return item == val
  470. })
  471. if(index!=-1){
  472. this.queryParams.isDelete.push(val)
  473. this.selected.splice(index, 1)
  474. }else{
  475. var index2 = this.queryParams.isDelete.findIndex(i=>{
  476. return i == val
  477. })
  478. if(index2!=-1){
  479. this.queryParams.isDelete.splice(index2, 1)
  480. }else{
  481. var index3 = this.queryParams.isAdd.findIndex(m=>{
  482. return m == val
  483. })
  484. if(index3!=-1){
  485. this.queryParams.isAdd.splice(index3,1)
  486. }else{
  487. this.queryParams.isAdd.push(val)
  488. }
  489. }
  490. }
  491. this.isFetch = false
  492. }else{
  493. var index3 = this.queryParams.isAdd.findIndex(m=>{
  494. return m == val
  495. })
  496. if(index3!=-1){
  497. this.queryParams.isAdd.splice(index3,1)
  498. }else{
  499. var index2 = this.queryParams.isDelete.findIndex(i=>{
  500. return i == val
  501. })
  502. if(index2!=-1){
  503. this.queryParams.isDelete.splice(index2, 1)
  504. }else{
  505. // this.isFetch = true
  506. // this.getFunInfo()
  507. var index = this.selected.findIndex(item=>{
  508. return item == val
  509. })
  510. if(index!=-1){
  511. var index4 = this.queryParams.selected.findIndex(item=>{
  512. return item == val
  513. })
  514. if(index4!=-1){
  515. var a = {
  516. reportId:this.reportId,
  517. patentNo:val
  518. }
  519. this.$api.deleteCompareNo(a).then(response=>{
  520. if(response.code == 200){
  521. this.queryParams.selected.splice(index4,1)
  522. }
  523. })
  524. }else{
  525. this.queryParams.isDelete.push(val)
  526. this.selected.splice(index, 1)
  527. }
  528. }else{
  529. this.queryParams.isAdd.push(val)
  530. }
  531. }
  532. }
  533. }
  534. },
  535. getSameData() {//相似特征
  536. let rep = {
  537. size:this.queryParams.size,
  538. current:this.queryParams.current,
  539. reportId:this.reportId
  540. }
  541. this.$api.simFeaturePatent(rep).then(res => {//相似特征
  542. // console.log("simFeaturePatent", res);
  543. if (res.code==200) {
  544. }
  545. })
  546. // this.getSpanArr(this.sameData)
  547. },
  548. getSpanArr(data) {
  549. this.row = []
  550. this.mergeArr.forEach((key, index1) => {
  551. let count = 0;
  552. this.mergeObj[key] = [];
  553. data.forEach((item, index) => {
  554. if (index === 0) {
  555. this.mergeObj[key].push(1);
  556. } else {
  557. if (item[key] === data[index - 1][key] && item[key] !== 'explain') {
  558. this.mergeObj[key][count] += 1;
  559. this.mergeObj[key].push(0);
  560. } else {
  561. count = index;
  562. this.mergeObj[key].push(1);
  563. }
  564. }
  565. })
  566. })
  567. },
  568. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  569. if (this.mergeArr.indexOf(column.property) !== -1) {
  570. if (this.mergeObj[column.property][rowIndex]) {
  571. return [this.mergeObj[column.property][rowIndex], 1]
  572. } else {
  573. return [0, 0];
  574. }
  575. }
  576. },
  577. getRowKeys(row) {
  578. return row.id
  579. },
  580. // handleSelectionChange(val) {
  581. // this.checkList = val
  582. // },
  583. async handleCurrentChange(val) {//分页
  584. this.queryParams.current = val;
  585. // this.checkList = []
  586. // this.queryParams.endNumber=0
  587. await this.getList();
  588. // console.log(this.checkList);
  589. if(this.quickSelect){
  590. this.commonSwitch()
  591. }
  592. },
  593. deletePatentList() {//删除
  594. let add = {
  595. isDelete:this.queryParams.isDelete,
  596. isAdd:this.queryParams.isAdd,
  597. startNumber:this.startNumber,
  598. endNumber:this.endNumber,
  599. reportId:this.reportId,
  600. }
  601. this.queryParams.startNumber=this.startNumber,
  602. this.queryParams.endNumber=this.endNumber,
  603. this.queryParams.reportId = this.reportId,
  604. this.$api.deleteCompareNo(this.queryParams).then(res => {
  605. if (res.code==200) {
  606. this.startNumber = 1
  607. this.endNumber = 0
  608. this.selectedTotal = 0
  609. this.quickSelect = false
  610. this.queryParams.isAdd=[]
  611. this.queryParams.isDelete=[]
  612. this.checkList = []
  613. // for (let key in this.form) {
  614. // this.queryParams[key]=''
  615. // }
  616. // this.form = {}
  617. this.getList2()
  618. this.$emit("save", true);
  619. this.$message({
  620. message: '删除成功',
  621. type: 'success'
  622. });
  623. }
  624. })
  625. // if (add.patentNos.length>0) {
  626. // this.$api.addCompareFile(add).then(res => {
  627. // console.log(res);
  628. // if (res.code==200) {
  629. // this.$emit("save", true);
  630. // }
  631. // })
  632. // } else {
  633. // this.$confirm('您未做勾选!点击确定将会进行下一步!', '温馨提示', {
  634. // confirmButtonText: '确定',
  635. // cancelButtonText: '取消',
  636. // type: 'warning'
  637. // }).then(() => {//
  638. // this.$emit("save", true);
  639. // }).catch(() => {
  640. // });
  641. // }
  642. },
  643. getList2() {
  644. this.queryParams.current = 1
  645. this.getList()
  646. },
  647. async getList(key) {
  648. this.queryParams.reportId = this.reportId
  649. let params = JSON.parse(JSON.stringify(this.queryParams))
  650. params.tree.map(tree => {
  651. let field = params.field.filter(item => item.key === tree.key)
  652. if (field.length === 0) {
  653. params.field.push(tree)
  654. }
  655. })
  656. params.tree = undefined
  657. this.$store.commit('SET_PATENT_PARAMS', params)
  658. await this.$api.getCompareFile(params).then(response => {
  659. this.loading = false
  660. this.total = response.data.datas.total
  661. this.queryParams.startNumber = this.endNumber>0?this.startNumber:1
  662. // this.queryParams.endNumber =this.queryParams.endNumber==0? response.data.datas.total:this.queryParams.endNumber
  663. this.queryParams.endNumber =this.endNumber>0?this.endNumber: response.data.datas.total
  664. this.tableData = response.data.datas.records
  665. this.queryParams.selected = []
  666. // this.checkList =JSON.parse(JSON.stringify(this.queryParams.selected))
  667. // this.checkList =JSON.parse(JSON.stringify([...new Set(this.checkList.concat(this.queryParams.selected))]))
  668. // this.selected = this.checkList
  669. this.isFetch = true
  670. // this.selectedTotal=response.data.selectedTotal+(this.endNumber-this.startNumber+1)+this.queryParams.isAdd.length-this.queryParams.isDelete.length
  671. }).catch(error => {
  672. })
  673. },
  674. showPatent(even) {//选择下拉框
  675. // console.log(even);
  676. },
  677. },
  678. watch: {
  679. loadPatent(val){
  680. for (let key in this.form) {
  681. this.queryParams[key]=''
  682. }
  683. this.form = {}
  684. this.getList()
  685. },
  686. ChosePatentSure(val) {
  687. if (val) {
  688. if(this.checkList.length>0){
  689. this.deletePatentList()
  690. this.$nextTick(_=>{
  691. this.$emit("save", true);
  692. })
  693. }else{
  694. this.$confirm('您未做勾选!点击确定将会进行下一步!', '温馨提示', {
  695. confirmButtonText: '确定',
  696. cancelButtonText: '取消',
  697. type: 'warning'
  698. }).then(() => {
  699. this.$emit("save", true);
  700. }).catch(() => {
  701. });
  702. }
  703. }
  704. }
  705. }
  706. }
  707. </script>
  708. <style lang="scss" >
  709. .btn1 {
  710. background: #909399;
  711. }
  712. .btn1:hover {
  713. background-color: #a4a7ab;
  714. }
  715. .patent-fast-edit-popover {
  716. padding: 0 !important;
  717. .btn {
  718. color: #000;
  719. line-height: 40px;
  720. border-radius: 5px;
  721. padding-left: 10px;
  722. cursor: pointer;
  723. &:hover {
  724. background: #adadad;
  725. color: #fff;
  726. }
  727. }
  728. .disabled {
  729. cursor: not-allowed !important;
  730. }
  731. .bottom {
  732. text-align: right;
  733. color: #1e9fff;
  734. line-height: 40px;
  735. padding-left: 10px;
  736. font-size: 18px;
  737. }
  738. .el-divider--horizontal {
  739. margin: 10px 0 !important;
  740. }
  741. .select-number {
  742. .el-input {
  743. width: 70px;
  744. }
  745. span {
  746. padding: 0 3px;
  747. }
  748. }
  749. }
  750. </style>