index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. <template>
  2. <div class="box">
  3. <banner></banner>
  4. <p class="list_title">{{ $t("nav.AntibodyDatabase") }}</p>
  5. <!-- 头部 -->
  6. <div class="classificationMenu">
  7. <div class="list list_pc">
  8. <div class="SpeciesBox">
  9. <!-- Name -->
  10. <div class="list-s" v-if="nameObject.list.length">
  11. <div class="list_tit">Name</div>
  12. <div class="SpeciesBox_list2" style="flex: 1;">
  13. <el-checkbox-group
  14. style="flex: 1;"
  15. v-model="nameList"
  16. @change="nameChange"
  17. >
  18. <el-checkbox class="list_checkbox" v-for="(item, index) in nameObject.show ? nameObject.list : nameObject.list.slice(0, 12)" :key="index" :label="item.name">
  19. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start" v-if="item.name.length > 20">
  20. <span> {{subString(item.sampleName, 20)}}</span>
  21. </el-tooltip>
  22. <span v-else>{{ item.sampleName }}</span>
  23. <!-- ({{ item.count }}) -->
  24. </el-checkbox>
  25. </el-checkbox-group>
  26. </div>
  27. <img v-if="nameObject.show" class="SpeciesImg" src="@/assets/img/superscript.png" alt="" @click="nameObject.show = false">
  28. <img v-else class="SpeciesImg" src="@/assets/img/subscript.png" alt="" @click="nameObject.show = true">
  29. </div>
  30. <!-- Target -->
  31. <div class="list-s" v-if="targetObject.list.length">
  32. <div class="list_tit">Target</div>
  33. <div class="SpeciesBox_list2" style="flex: 1;">
  34. <el-checkbox-group
  35. style="flex: 1;"
  36. v-model="targetList"
  37. @change="targetChange"
  38. >
  39. <el-checkbox class="list_checkbox" v-for="(item, index) in targetObject.show ? targetObject.list : targetObject.list.slice(0, !$util.isMobileDevice() ? 12 : 0)" :key="index" :label="item.name">
  40. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start" v-if="item.name.length > 20">
  41. <span> {{subString(item.sampleName, 20)}}</span>
  42. </el-tooltip>
  43. <span v-else>{{ item.sampleName }}</span>
  44. ({{ item.count }})
  45. </el-checkbox>
  46. </el-checkbox-group>
  47. </div>
  48. <img v-if="targetObject.show" class="SpeciesImg" src="@/assets/img/superscript.png" alt="" @click="targetObject.show = false">
  49. <img v-else class="SpeciesImg" src="@/assets/img/subscript.png" alt="" @click="targetObject.show = true">
  50. </div>
  51. <!-- Inventor -->
  52. <div class="list-s" v-if="companyObject.list.length" style="border: none;">
  53. <div class="list_tit">Inventor</div>
  54. <div class="SpeciesBox_list2" style="flex: 1;">
  55. <el-checkbox-group
  56. style="flex: 1;"
  57. v-model="companyList"
  58. @change="companyChange"
  59. >
  60. <el-checkbox class="list_checkbox" v-for="(item, index) in companyObject.show ? companyObject.list : companyObject.list.slice(0, !$util.isMobileDevice() ? 12 : 0)" :key="index" :label="item.name">
  61. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start" v-if="item.name.length > 20">
  62. <span> {{subString(item.sampleName, 20)}}</span>
  63. </el-tooltip>
  64. <span v-else>{{ item.sampleName }}</span>
  65. ({{ item.count }})
  66. </el-checkbox>
  67. </el-checkbox-group>
  68. </div>
  69. <img v-if="companyObject.show" class="SpeciesImg" src="@/assets/img/superscript.png" alt="" @click="companyObject.show = false">
  70. <img v-else class="SpeciesImg" src="@/assets/img/subscript.png" alt="" @click="companyObject.show = true">
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <!-- 列表 -->
  76. <div class="article">
  77. <template>
  78. <el-table
  79. :data="overView"
  80. stripe
  81. empty-text="Not Date"
  82. style="width: 100%"
  83. @row-click="gotoArticle">
  84. <el-table-column prop="catalog" :label="$t('AntibodyDatabase.CatNo')" width="140"/>
  85. <el-table-column prop="name" :label="$t('AntibodyDatabase.AntibodyName')" />
  86. <el-table-column prop="targetAbbreviation" :label="$t('AntibodyDatabase.Target')" width="400">
  87. <!-- <template slot-scope="scope">
  88. <span>{{ $util.targetDictionaries(scope.row.productTarget) }}</span>
  89. </template> -->
  90. </el-table-column>
  91. <!-- <el-table-column prop="moa" :label="$t('AntibodyDatabase.MOA')" /> -->
  92. <el-table-column prop="company" :label="$t('AntibodyDatabase.Inventor')"/>
  93. </el-table>
  94. </template>
  95. </div>
  96. <div class="articleMove">
  97. <template>
  98. <el-table
  99. :data="overView"
  100. stripe
  101. empty-text="Not Date"
  102. style="width: 100%"
  103. @row-click="gotoArticle">
  104. <el-table-column prop="catalog" width="75" :label="$t('AntibodyDatabase.CatNo')" />
  105. <el-table-column prop="name" width="112" :label="$t('AntibodyDatabase.AntibodyName')" />
  106. <el-table-column prop="target" :label="$t('AntibodyDatabase.Target')" >
  107. <template slot-scope="scope">
  108. <span>{{ $util.targetDictionaries(scope.row.target) }}</span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column prop="company" :label="$t('AntibodyDatabase.Inventor')" />
  112. </el-table>
  113. </template>
  114. </div>
  115. </div>
  116. </template>
  117. <script>
  118. import banner from "@/components/banner";
  119. export default {
  120. name: "antibody",
  121. components: {
  122. banner
  123. },
  124. data() {
  125. return {
  126. overView: [],
  127. nameObject: {
  128. name: "Inventor",
  129. list: "",
  130. show: false
  131. },
  132. targetObject: {
  133. name: "Inventor",
  134. list: "",
  135. show: false
  136. },
  137. companyObject: {
  138. name: "Inventor",
  139. list: "",
  140. show: false
  141. },
  142. checkList: [],
  143. nameList: [],
  144. targetList: [],
  145. companyList: []
  146. };
  147. },
  148. methods: {
  149. tapSuperscript(i) {
  150. this.speciesList[i].show = !this.speciesList[i].show;
  151. },
  152. // 搜索
  153. nameChange(e) {
  154. console.log(e);
  155. this.nameList = e
  156. this.changeSearchAll()
  157. },
  158. targetChange(e) {
  159. console.log(e);
  160. this.targetList = e
  161. this.changeSearchAll()
  162. },
  163. companyChange(e) {
  164. console.log(e);
  165. this.companyList = e
  166. this.changeSearchAll()
  167. },
  168. // 字符串截取
  169. subString (str, len) {
  170. if (str.length > len) {
  171. return str.substring(0, len) + '...'
  172. } else {
  173. return str
  174. }
  175. },
  176. changeSearchAll() {
  177. this.$api.post("/basb/searchAll", {
  178. articleFlag: 0,
  179. nameList: this.nameList,
  180. targetList: this.targetList,
  181. companyList: this.companyList
  182. }).then(res => {
  183. console.log(res)
  184. this.overView = res.data
  185. console.log(this.overView)
  186. })
  187. },
  188. gotoArticle(row, column, event) {
  189. console.log(row, column, event)
  190. this.$router.push({
  191. path: "/antibodyDetail",
  192. query: {
  193. id: row.id
  194. }
  195. });
  196. },
  197. // 获取双特异性抗体-针对database获取统计信息
  198. getDoubleInfo() {
  199. this.$api.post("/basb/searchStatisticForDatabase", {}).then(res => {
  200. console.log(res)
  201. if (res.code == 0) {
  202. // this.species = res.data
  203. this.nameObject.list = res.data.nameList
  204. this.targetObject.list = res.data.targetList
  205. this.companyObject.list = res.data.companyList
  206. }
  207. })
  208. }
  209. },
  210. mounted() {},
  211. created() {
  212. this.changeSearchAll()
  213. this.getDoubleInfo()
  214. }
  215. };
  216. </script>
  217. <style lang="scss">
  218. .site-header-suggestion-select {
  219. .el-autocomplete-suggestion__wrap {
  220. max-height: 380px;
  221. }
  222. }
  223. </style>
  224. <style lang="scss" scoped>
  225. @media screen and (min-width: 751px) and (max-width: 9999px) {
  226. .box {
  227. .list_title{
  228. width: 1200px;
  229. margin: 30px auto 0;
  230. font-size: 18px;
  231. font-weight: 600;
  232. }
  233. .article /deep/{
  234. width: 1200px;
  235. margin: 30px auto 90px;
  236. .cell{
  237. color: #000;
  238. }
  239. .el-table__row td{
  240. background-color: #fff !important;
  241. cursor: pointer;
  242. }
  243. .el-table__row--striped td{
  244. background-color: #F0FAFE !important;
  245. cursor: pointer;
  246. }
  247. }
  248. .articleMove{
  249. display: none;
  250. }
  251. // 筛选项
  252. .classificationMenu {
  253. width: 1200px;
  254. margin: 20px auto;
  255. .list {
  256. display: flex;
  257. align-content: center;
  258. .list-name {
  259. width: 190px;
  260. min-height: 40px;
  261. background: #dff3ff;
  262. // background-color: #f7faff;
  263. font-size: 16px;
  264. font-family: Arial;
  265. color: #000;
  266. padding-left: 20px;
  267. display: flex;
  268. align-items: center;
  269. }
  270. .SpeciesBox{
  271. flex: 1;
  272. // background: #F7FAFF;
  273. background: #DFF3FE;
  274. position: relative;
  275. .SpeciesImg{
  276. position: absolute;
  277. right: 10px;
  278. bottom: 10px;
  279. width: 15px;
  280. height: 15px;
  281. cursor: pointer;
  282. }
  283. }
  284. .list-s /deep/ {
  285. display: flex;
  286. // align-items: flex-start;
  287. align-items: center;
  288. position: relative;
  289. border-bottom: 1px solid rgba(7,91,169,.1);
  290. // padding: 10px 0;
  291. .list_tit{
  292. width: 260px;
  293. text-align: center;
  294. font-weight: bold;
  295. // padding-top: 10px;
  296. }
  297. .SpeciesBox_list2{
  298. padding: 10px;
  299. background-color: #F1FAFF;
  300. }
  301. .list_checkbox{
  302. width: 23%;
  303. }
  304. .SpeciesBox_list{
  305. max-height: 240px;
  306. overflow-y: auto;
  307. }
  308. .el-checkbox {
  309. padding: 6px 0;
  310. margin-right: 10px !important;
  311. .el-checkbox__label {
  312. font-size: 14px;
  313. font-family: Arial;
  314. color: #6f6f6f;
  315. }
  316. }
  317. .is-checked {
  318. .el-checkbox__label {
  319. color: #005bab;
  320. }
  321. }
  322. .top_img {
  323. position: absolute;
  324. top: 50%;
  325. right: 16px;
  326. transform: translateY(-50%);
  327. width: 24px;
  328. cursor: pointer;
  329. }
  330. .purple_img {
  331. display: flex;
  332. align-items: center;
  333. background: #ffffff;
  334. border-radius: 2px;
  335. border: 1px solid #005bab;
  336. padding: 6px 10px;
  337. cursor: pointer;
  338. .icon {
  339. width: 26px;
  340. }
  341. .name {
  342. font-size: 14px;
  343. font-family: Arial;
  344. color: #005bab;
  345. }
  346. }
  347. .active {
  348. background: #005bab;
  349. border-radius: 2px;
  350. border: 1px solid #005bab;
  351. .name {
  352. color: #fff;
  353. }
  354. }
  355. }
  356. }
  357. }
  358. }
  359. }
  360. @media screen and (min-width: 0px) and (max-width: 750px) {
  361. .box {
  362. .list_title{
  363. width: 100%;
  364. padding: 0.15rem 0.2rem;
  365. box-sizing: border-box;
  366. font-size: 16px;
  367. font-weight: 600;
  368. }
  369. .article{
  370. display: none;
  371. }
  372. .articleMove /deep/{
  373. width: 100%;
  374. padding: 0 0.15rem 0.15rem;
  375. // box-sizing: border-box;
  376. overflow-x: hidden;
  377. .cell{
  378. color: #000;
  379. font-size: 0.1rem;
  380. }
  381. .el-table__row td{
  382. background-color: #fff !important;
  383. cursor: pointer;
  384. }
  385. .el-table__row--striped td{
  386. background-color: #F0FAFE !important;
  387. cursor: pointer;
  388. }
  389. }
  390. // 筛选项
  391. .classificationMenu {
  392. margin-bottom: 0.2rem;
  393. .list {
  394. // border-bottom: 1px solid #ededed;
  395. .list-name {
  396. width: 100%;
  397. min-height: 0.4rem;
  398. background: #dff3ff;
  399. font-size: 16px;
  400. font-family: Arial;
  401. color: #000;
  402. padding-left: 0.2rem;
  403. display: flex;
  404. align-items: center;
  405. }
  406. .SpeciesBox{
  407. padding: 0.1rem 0.15rem;
  408. }
  409. .list-s /deep/ {
  410. position: relative;
  411. background: #F7FAFF;
  412. // padding:0 0.15rem;
  413. .SpeciesBox_list{
  414. max-height: 310px;
  415. overflow-y: auto;
  416. }
  417. .list_tit{
  418. font-size: 14px;
  419. margin-bottom: .1rem;
  420. background: #dff3ff;
  421. line-height: 0.4rem;
  422. padding-left: 0.1rem;
  423. }
  424. .SpeciesBox_list2{
  425. padding:0 0.1rem;
  426. }
  427. .SpeciesImg{
  428. position: absolute;
  429. top: 0.14rem;
  430. right: 0.1rem;
  431. width: 26px;
  432. height: 14px;
  433. padding: 0 5px;
  434. background: #005bab;
  435. border-radius: 2px;
  436. }
  437. .SpeciesBox_name{
  438. font-size: 14px;
  439. line-height: 1;
  440. margin-bottom: 0.1rem;
  441. }
  442. .el-checkbox {
  443. padding: 6px 0;
  444. .el-checkbox__label {
  445. font-size: 12px;
  446. font-family: Arial;
  447. color: #000;
  448. }
  449. }
  450. .is-checked {
  451. .el-checkbox__label {
  452. color: #005bab;
  453. }
  454. }
  455. }
  456. }
  457. }
  458. }
  459. }
  460. </style>