componentStore.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <style>
  2. h2 {
  3. font-size: 18px;
  4. font-weight: 600;
  5. }
  6. .btn-primary {
  7. color: #fff;
  8. background-color: #7bb4e1;
  9. border-color: #7bb4e1;
  10. }
  11. .btn-primary:hover {
  12. color: #fff;
  13. background-color: #5078cb;
  14. border-color: #5078cb;
  15. border-left-color: #5078cb;
  16. border-right-color: #5078cb;
  17. }
  18. .btn-primary:active {
  19. color: #fff;
  20. background-color: #f39800;
  21. border-color: #f39800;
  22. }
  23. .tr-default {
  24. color: #fff;
  25. background-color: #7bb4e1;
  26. }
  27. .totalNum {
  28. font-weight: bold;
  29. color: #f39800;
  30. }
  31. td {
  32. line-height: 1.1;
  33. }
  34. .location ul {
  35. border-bottom: solid 1px #ddd;
  36. }
  37. .location {
  38. line-height: 28px;
  39. }
  40. .table-bordered{
  41. border: none !important;
  42. background: #fff;
  43. }
  44. .table-bordered .tr-default{
  45. color: #323232;
  46. background: #fff;
  47. height: 40px;
  48. }
  49. .table-bordered .tr-default th{
  50. border-bottom: none;
  51. font-size: 14px;
  52. }
  53. .table-bordered td,.table-bordered th{
  54. border: none !important;
  55. font-size: 14px;
  56. vertical-align: middle !important;
  57. background: #fff;
  58. }
  59. .table-bordered td{
  60. height: 50px;
  61. }
  62. .table-bordered td{
  63. border-top: #cfcfcf 1px dashed !important;
  64. }
  65. #collect-container {
  66. width: 1026px;
  67. padding: 0;
  68. margin:10px 0 0 0;
  69. display: inline-block;
  70. background: #fff;
  71. }
  72. .collect-item{
  73. width: 193px;
  74. height: 210px;
  75. float:left;
  76. margin:8px 4px;
  77. border: 1px solid #d8d8d8;
  78. position: relative;
  79. background:#fff;
  80. text-align: center;
  81. }
  82. .collect-dobatch{
  83. background:url(static/img/user/images/collect-select.png) no-repeat right top;
  84. border: 1px solid #5078cb;
  85. }
  86. .cancle-batch{
  87. background:url(static/img/user/images/collect-noselect.png) no-repeat right top;
  88. border: 1px solid #d8d8d8;
  89. }
  90. .collect-img{
  91. width: 120px;
  92. height: 100px;
  93. margin-bottom:10px;
  94. text-align: center;
  95. margin-top:15px;
  96. }
  97. .collect-content{
  98. text-align: center;
  99. }
  100. .collect-content>p{
  101. padding-bottom:10px;
  102. }
  103. .collect-batch{
  104. display:inline-block;
  105. }
  106. .collect-delete{
  107. position: absolute;
  108. top:3px;
  109. left:170px;
  110. }
  111. #collect{
  112. display: inline-block;
  113. margin: 10px;
  114. }
  115. .page{
  116. float: left;
  117. height: 40px;
  118. background: #fff;
  119. top: 0;
  120. padding: 10px 0;
  121. border-top: #e8e8e8 1px solid;
  122. }
  123. .page-not-allowed{
  124. cursor : not-allowed!important;
  125. }
  126. .page-allowed{
  127. cursor : pointer!important;
  128. color : #5078cb;
  129. }
  130. .com-del-box{
  131. position: fixed;
  132. z-index: 2;
  133. height: 152px;
  134. opacity: 1;
  135. background-color: white;
  136. width: 310px;
  137. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  138. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  139. margin: -155px 0 0 -75px;
  140. top: 55%;
  141. left: 50%;
  142. }
  143. .com-del-box .title{
  144. height: 30px;
  145. background-color: #5078cb;
  146. text-align: right;
  147. padding-right: 15px;
  148. line-height: 30px;
  149. }
  150. .com-del-box .title a{
  151. color: white;
  152. font-size: 16px;
  153. }
  154. .com-del-box .content{
  155. width: 100%;
  156. text-align: center;
  157. margin: 0 auto;
  158. }
  159. .com-del-box .content p{
  160. line-height: 50px;
  161. font-size: 14px;
  162. padding-top: 10px;
  163. }
  164. .com-del-box .content p i{
  165. color: #5078cb;
  166. font-size: 16px;
  167. margin-right: 10px;
  168. }
  169. .com-del-box .content div{
  170. width: 100%;
  171. text-align: center;
  172. margin: 0 auto;
  173. }
  174. .com-del-box .content div a{
  175. width: 55px;
  176. height: 26px;
  177. line-height: 26px;
  178. display: inline-block;
  179. text-align: center;
  180. font-size: 14px;
  181. }
  182. .com-del-box .content div a:first-child{
  183. background: #b4b5b9;
  184. color: #333;
  185. margin-right: 10px;
  186. }
  187. .com-del-box .content div a:last-child{
  188. background: #5078cb;
  189. color: #fff;
  190. }
  191. .com-del-box .content div a:hover{
  192. background: #3f7ae3;
  193. color: #fff;
  194. }
  195. .collect-batch{
  196. display: inline-block;
  197. float: right;
  198. margin-right: 20px;
  199. }
  200. .check-active label{
  201. margin-right: 0 !important;
  202. }
  203. .check-active span{
  204. font-weight: normal;
  205. }
  206. .collect-delete:hover{
  207. color: #f00;
  208. cursor: pointer;
  209. }
  210. .collect-item:hover .collect-delete{
  211. color: #f00;
  212. }
  213. .page button{
  214. border: #ccc 1px solid;
  215. background: #fff;
  216. padding: 0 5px;
  217. }
  218. .no-collect{
  219. height: 255px;
  220. width:100%;
  221. display:inline-flex;
  222. justify-content: center;
  223. align-items: center;
  224. background: white;
  225. }
  226. .no-collect p{
  227. padding-top:10px;
  228. font-size: 14px;
  229. color: #999;
  230. margin-left:15px;
  231. line-height: 28px;
  232. }
  233. .no-collect p a{
  234. color: #5078cb;
  235. display: block;
  236. background: url(static/img/all/icon_nianxian.jpg)no-repeat;
  237. background-position: 0px 7px;
  238. padding-left: 25px;
  239. }
  240. </style>
  241. <div class="user_right fr">
  242. <div class="rt_menu">
  243. <span style="color:#5078cb">产品收藏({{totalElements}})</span>
  244. <span ng-click="doBatch()" style="margin-left:840px" ng-hide="isBatch || collectInfo.length == 0 || !collectInfo"><a>批量操作</a></span>
  245. <div ng-show="isBatch" class="collect-batch">
  246. <span ng-click="cancleBatch()"><a>取消</a></span>
  247. <span ng-click="deleteByselected()"><a>移除</a></span>
  248. <span>
  249. <label class="check-active">
  250. <input type="checkbox" id="isChooseAll" ng-checked="isChooseAll" ng-click="chooseAllCollect()">
  251. <label for="isChooseAll"></label>
  252. <span style="margin-left: 0;">全选</span>
  253. </label>
  254. </span>
  255. </div>
  256. </div>
  257. <!-- 产品收藏具体信息 -->
  258. <div id="collect-container" ng-if=" collectInfo.length != 0 ">
  259. <ul id="collect">
  260. <li ng-repeat="item in collectInfo" class="collect-item" ng-click="setActive(item)" ng-mouseenter="show = true" ng-mouseleave="show = false" ng-class="{'cancle-batch':!item.active && isBatch, 'collect-dobatch':item.active && isBatch}">
  261. <a name="detail" href="product/component/{{item.componentinfo.uuid}}/">
  262. <img ng-src="{{item.componentinfo.img || 'static/img/user/images/default.png'}}" class="collect-img" />
  263. <div class="collect-content">
  264. <p ng-bind="item.componentinfo.code"></p>
  265. <p ng-bind="item.componentinfo.brand.nameEn">
  266. <p ng-bind="item.componentinfo.kind.nameCn">
  267. </div>
  268. </a>
  269. <span class="collect-delete" ng-click="cancleStore(item.id)" ng-show="show && !isBatch"><i class="fa fa-trash fa-2x"></i></span>
  270. </li>
  271. </ul>
  272. </div>
  273. <div class="page" ng-if=" collectInfo.length != 0 ">
  274. <ul>
  275. <li><button type="button" ng-disabled="overPrevious" ng-click="jumpToPage(pageInfo.page - 1)" ng-class="{'page-not-allowed': overPrevious, 'page-allowed' : !overPrevious}">上一页</button></li>
  276. <li>第<input ng-model="toPage" ng-search="jumpToPage(toPage)">页</li>
  277. <li><button type="button" ng-disabled="overNext" ng-click="jumpToPage(pageInfo.page + 1)" ng-class="{'page-not-allowed': overNext, 'page-allowed' : !overNext}">下一页</button></li>
  278. </ul>
  279. </div>
  280. <div class="no-collect" ng-if="collectInfo.length == 0">
  281. <img src="static/img/all/empty-cart.png">
  282. <p>
  283. <span>暂无产品收藏</span>
  284. <br>
  285. <a href="/">马上去逛一逛</a>
  286. </p>
  287. </div>
  288. <!-- <table ng-table="componentTableParams"
  289. class="table table-bordered table-striped text-center">
  290. <thead>
  291. <tr class="text-center tr-default">
  292. <th width="50" class="text-center">序号</th>
  293. <th width="auto" class="text-center">器件型号</th>
  294. <th width="auto" class="text-center">器件品牌</th>
  295. <th width="auto" class="text-center">器件类目</th>
  296. <th width="110" class="text-center">收藏时间</th>
  297. <th width="90" class="text-center">操作</th>
  298. </tr>
  299. </thead>
  300. <tbody>
  301. <tr ng-repeat="component in $data">
  302. <td>{{$index+1}}</td>
  303. <td><a
  304. ng-href="product#/component/{{component.componentinfo.uuid}}/"
  305. ng-bind="component.componentinfo.code"></a></td>
  306. <td ng-bind="component.componentinfo.brand.nameCn"></td>
  307. <td ng-bind="component.componentinfo.kind.nameCn"></td>
  308. <td ng-bind="component.createtime |date : 'yyyy-MM-dd'"></td>
  309. <td>
  310. <button class="btn btn-primary btn-sm"
  311. ng-click="cancleStore(component.id)">取消收藏</button>
  312. </td>
  313. </tr>
  314. <tr ng-if="$data.length == 0">
  315. <td colspan="10" class="text-center"
  316. style="line-height: 40px; font-size: 20px;"><i
  317. class="fa fa-smile-o fa-lg"></i> 您还没有收藏器件</td>
  318. </tr>
  319. </tbody>
  320. </table> -->
  321. </div>
  322. <div class="com-del-box" ng-if="deleteDiv">
  323. <div class="title">
  324. <a ng-click="cancleDelete()"><i class="fa fa-close fa-lg"></i></a>
  325. </div>
  326. <div class="content">
  327. <p><i class="fa fa-exclamation-circle"></i>是否从收藏夹中移除选中产品</p>
  328. <div><a ng-click="cancleDelete()">取消</a><a ng-click="confirmDelete()">确认</a></div>
  329. </div>
  330. </div>