caselisting.html 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320
  1. {extend name="public/layout" /} {block name="title"}装修案例列表{/block} {block name="body"}
  2. <link rel="stylesheet" href="__STATIC__/css/swiper.min.css">
  3. <style type="text/css">
  4. html,
  5. body {
  6. display: block;
  7. min-width: 1000px;
  8. }
  9. .layui-fluid {
  10. display: block;
  11. box-shadow: 0 0 4px 0 #B6CADE;
  12. border-radius: 5px;
  13. margin: 15px;
  14. background-color: #ffffff;
  15. box-sizing: border-box;
  16. }
  17. .layui-table thead tr,
  18. .layui-table-header {
  19. background-color: #D8E6F1 !important;
  20. }
  21. .layui-tab {
  22. padding: 15px;
  23. height: 100%;
  24. box-sizing: border-box;
  25. }
  26. .layui-form-item {
  27. width: 100%;
  28. }
  29. .layui-form-item .layui-inline {
  30. display: block;
  31. float: left;
  32. width: 145px;
  33. height: 38px;
  34. line-height: 38px;
  35. background: #FFFFFF;
  36. margin-right: 16px;
  37. }
  38. .layui-form-item .layui-input-inline {
  39. width: 145px;
  40. height: 38px;
  41. line-height: 38px;
  42. margin-bottom: 0;
  43. }
  44. .layui-form-item .layui-input-inline .layui-input {
  45. border: 1px solid #9DB6CF;
  46. border-radius: 5px;
  47. }
  48. .layui-form-select dl dd.layui-this {
  49. background-color: #249EFB;
  50. }
  51. .layui-form-item div.searchBox {
  52. width: 320px;
  53. background: #FFFFFF;
  54. border: 1px solid #B6CADE;
  55. border-radius: 24px;
  56. height: 38px;
  57. overflow: hidden;
  58. padding-left: 18px;
  59. position: relative;
  60. margin-bottom: 0px;
  61. float: right;
  62. }
  63. .searchBox .inputBox {
  64. width: 240px;
  65. float: left;
  66. height: 36px;
  67. line-height: 36px;
  68. border-width: 0;
  69. }
  70. .searchBtn {
  71. position: absolute;
  72. top: 0;
  73. right: 0;
  74. width: 51px;
  75. height: 38px;
  76. background-color: #fff;
  77. }
  78. .searchBtn img {
  79. position: absolute;
  80. width: 26px;
  81. top: 6px;
  82. left: 0;
  83. }
  84. .layui-form-label {
  85. width: auto;
  86. }
  87. .layui-btn-primary {
  88. color: #249EFB;
  89. border: 1px solid #249EFB;
  90. }
  91. .layui-btn-primary:hover {
  92. background-color: #E3F7FF;
  93. color: #249EFB;
  94. }
  95. .layui-table-page>div {
  96. display: flex;
  97. justify-content: flex-start;
  98. }
  99. .layui-btn-xs,
  100. .layui-btn-xs:hover {
  101. border: 1px solid #249EFB;
  102. background-color: #fff;
  103. color: #249EFB;
  104. padding: 0px 10px;
  105. }
  106. .layui-btn-danger,
  107. .layui-btn-danger:hover {
  108. color: #FF5722;
  109. background-color: #fff;
  110. border: 1px solid #FF5722;
  111. padding: 0px 10px;
  112. }
  113. .ml10 {
  114. margin-left: 10px;
  115. }
  116. .operateBtn {
  117. display: flex;
  118. justify-content: flex-start;
  119. }
  120. .flex-end {
  121. padding-bottom: 20px;
  122. display: flex;
  123. justify-content: flex-start;
  124. align-items: center;
  125. }
  126. .layuiadmin-card-header-auto {}
  127. .layui-tab {
  128. width: 98%;
  129. background-color: #fff;
  130. margin: 15px auto;
  131. box-shadow: 0 0 4px 0 #B6CADE;
  132. border-radius: 5px;
  133. }
  134. .layui-tab-title .layui-this {
  135. color: #249EFB;
  136. }
  137. .layui-tab-title .layui-this:after {
  138. width: 50px;
  139. height: 4px;
  140. background-color: #249EFB;
  141. top: 36px !important;
  142. left: 50%;
  143. transform: translateX(-50%);
  144. border: none;
  145. }
  146. .layui-tab-title li {
  147. margin: 0px 5px;
  148. }
  149. .li_active {
  150. font-weight: 700;
  151. background-color: #249EFB;
  152. color: #fff;
  153. }
  154. .relative {
  155. position: relative;
  156. }
  157. .noneClass {
  158. display: none !important;
  159. }
  160. .c_wordlist {
  161. width: 20px;
  162. position: absolute;
  163. top: 43px;
  164. right: 1px;
  165. display: flex;
  166. flex-direction: column;
  167. z-index: 99999;
  168. height: auto;
  169. justify-content: flex-start;
  170. align-items: center;
  171. box-sizing: border-box;
  172. padding: 4px 0px;
  173. overflow: hidden;
  174. max-height: 297px;
  175. -ms-overflow-style: none;
  176. /* IE 10+ */
  177. scrollbar-width: none;
  178. /* Firefox */
  179. overflow-y: scroll;
  180. background-color: #f5f5f5;
  181. }
  182. .c_wordlist::-webkit-scrollbar {
  183. display: none;
  184. /* Chrome Safari */
  185. }
  186. .c_wordlist>li {
  187. width: 20px;
  188. height: 37px;
  189. cursor: pointer;
  190. display: flex;
  191. justify-content: center;
  192. align-items: center;
  193. margin-bottom: 0px;
  194. line-height: 37px;
  195. }
  196. dd {
  197. border-bottom: 1px solid #EFEFEF;
  198. }
  199. .layui-anim-upbit {
  200. -ms-overflow-style: none;
  201. /* IE 10+ */
  202. scrollbar-width: none;
  203. /* Firefox */
  204. overflow-y: scroll;
  205. background-color: #fff;
  206. }
  207. .layui-anim-upbit::-webkit-scrollbar {
  208. display: none;
  209. /* Chrome Safari */
  210. }
  211. .layui-tab-title {
  212. border-bottom: 1px solid #f5f5f5;
  213. }
  214. .layui-form-select dl {
  215. width: 100% !important;
  216. }
  217. /* 手机预览效果--样式 */
  218. .preview_mask {
  219. width: 100%;
  220. height: 100%;
  221. position: fixed;
  222. top: 0px;
  223. left: 0px;
  224. background-color: rgba(0, 0, 0, 0.5);
  225. z-index: 99999;
  226. display: flex;
  227. justify-content: center;
  228. align-items: center;
  229. }
  230. .preview_phone {
  231. width: 410px;
  232. height: 95vh;
  233. max-height: 820px !important;
  234. background: url('__STATIC__/img/phoneModel.png');
  235. background-size: 100% 100%;
  236. display: flex;
  237. justify-content: center;
  238. align-items: center;
  239. }
  240. .page_box {
  241. width: 375px;
  242. height: 96%;
  243. background-color: #fff;
  244. position: relative;
  245. overflow-y: auto;
  246. overflow-x: hidden;
  247. border-radius: 30px;
  248. margin-right: 4px;
  249. }
  250. /* 设置滚动条的样式 */
  251. .page_box::-webkit-scrollbar {
  252. width: 2px;
  253. }
  254. /* 滚动槽 */
  255. .page_box::-webkit-scrollbar-track {
  256. -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
  257. border-radius: 10px;
  258. }
  259. /* 滚动条滑块 */
  260. .page_box::-webkit-scrollbar-thumb {
  261. background: rgba(0, 0, 0, 0.3);
  262. -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5);
  263. }
  264. .page_cover_img {
  265. width: 100%;
  266. height: 225px;
  267. background-color: #ccc;
  268. position: relative;
  269. }
  270. .cover_tab {
  271. max-width: 130px;
  272. height: 28px;
  273. position: absolute;
  274. bottom: 10px;
  275. background-color: rgba(255, 255, 255, 0.5);
  276. border-radius: 14px;
  277. display: flex;
  278. align-items: center;
  279. font-size: 12px;
  280. left: 50%;
  281. transform: translateX(-50%);
  282. z-index: 999999;
  283. }
  284. .cover_tab>div {
  285. width: 65px;
  286. height: 100%;
  287. display: inline-block;
  288. text-align: center;
  289. border-radius: 15px;
  290. line-height: 28px;
  291. cursor: pointer;
  292. }
  293. .activeTab {
  294. background-color: #249EFB;
  295. color: #fff;
  296. }
  297. .enter_vr {
  298. position: absolute;
  299. width: 60px;
  300. height: 30px;
  301. left: 50%;
  302. top: 45%;
  303. transform: translateX(-50%);
  304. color: #fff;
  305. display: flex;
  306. flex-direction: column;
  307. align-items: center;
  308. justify-content: center;
  309. font-size: 18px;
  310. }
  311. .page_title {
  312. padding: 15px 5px 0px;
  313. font-size: 18px;
  314. color: #000;
  315. }
  316. .designer_box {
  317. width: 96%;
  318. height: auto;
  319. overflow: hidden;
  320. box-sizing: border-box;
  321. padding: 10px;
  322. margin: auto;
  323. background-color: #EFF4F8;
  324. margin-top: 10px;
  325. display: flex;
  326. align-items: center;
  327. }
  328. .designer_avatar {
  329. width: 40px;
  330. height: 40px;
  331. border-radius: 50%;
  332. overflow: hidden;
  333. }
  334. .designer_msg {
  335. box-sizing: border-box;
  336. flex: 1;
  337. display: flex;
  338. flex-direction: column;
  339. padding: 0px 10px;
  340. }
  341. .designer_person {
  342. font-size: 15px;
  343. }
  344. .designer_position {
  345. font-size: 10px !important;
  346. }
  347. .designer_style {
  348. margin-top: 4px;
  349. font-size: 12px;
  350. line-height: 18px;
  351. color: #A0BDD4;
  352. }
  353. .page_houseType {
  354. width: 96%;
  355. margin: 10px auto 20px;
  356. border: 1px solid #ececec;
  357. box-sizing: border-box;
  358. padding: 20px;
  359. overflow: hidden;
  360. }
  361. .houseType_msg {
  362. width: 25%;
  363. float: left;
  364. }
  365. .houseType_msg>span {
  366. display: block;
  367. }
  368. .houseType_name {
  369. color: #A9A9A9;
  370. font-size: 14px;
  371. }
  372. .houseType_val {
  373. font-size: 14px;
  374. color: #000;
  375. margin-top: 10px;
  376. }
  377. .page_line {
  378. width: 100%;
  379. height: 8px;
  380. background-color: #ECECEC;
  381. }
  382. .page_tab_box {
  383. width: 100%;
  384. padding: 10px 5px 0px;
  385. display: flex;
  386. font-size: 18px;
  387. }
  388. .page_tab_box>div {
  389. margin-right: 20px;
  390. cursor: pointer;
  391. }
  392. .nowtitbox {
  393. font-size: 18px;
  394. font-weight: bold;
  395. position: relative;
  396. }
  397. .nowtitbox::before {
  398. content: ' ';
  399. display: block;
  400. width: 6px;
  401. height: 2px;
  402. position: absolute;
  403. bottom: 0;
  404. left: 50%;
  405. transform-origin: 100% 0;
  406. transform: translateX(-150%) rotate(-30deg);
  407. background-color: #333333;
  408. }
  409. .nowtitbox::after {
  410. content: ' ';
  411. display: block;
  412. width: 6px;
  413. height: 2px;
  414. position: absolute;
  415. bottom: 0;
  416. left: 50%;
  417. background-color: #333333;
  418. transform-origin: 0 0;
  419. transform: translateX(-50%) rotate(390deg);
  420. }
  421. .richText {
  422. padding: 10px;
  423. }
  424. .richText img {
  425. max-width: 100% !important;
  426. margin: 0px !important;
  427. padding: 0px !important;
  428. }
  429. .richText video {
  430. max-width: 100% !important;
  431. }
  432. .page_time {
  433. color: #b8b8b8;
  434. font-size: 12px;
  435. padding: 0px 5px 16px;
  436. }
  437. .swiper-container {
  438. width: 100%;
  439. height: 225px;
  440. display: block;
  441. }
  442. .swiper-slide {
  443. width: 100%;
  444. height: 100%;
  445. display: inline-block;
  446. text-align: center;
  447. font-size: 18px;
  448. background: #fff;
  449. clear: both;
  450. /* Center slide text vertically */
  451. display: -webkit-box;
  452. display: -ms-flexbox;
  453. display: -webkit-flex;
  454. display: flex;
  455. -webkit-box-pack: center;
  456. -ms-flex-pack: center;
  457. -webkit-justify-content: center;
  458. justify-content: center;
  459. -webkit-box-align: center;
  460. -ms-flex-align: center;
  461. -webkit-align-items: center;
  462. align-items: center;
  463. }
  464. .relative {
  465. position: relative;
  466. }
  467. .lay-close {
  468. position: absolute;
  469. top: 30px;
  470. right: 25%;
  471. color: #fff;
  472. font-size: 38px !important;
  473. font-weight: 700;
  474. cursor: pointer;
  475. }
  476. video {
  477. background-color: #000;
  478. }
  479. .colorA9A9A9 {
  480. color: #A9A9A9 !important;
  481. }
  482. .ablock {
  483. display: inline-block;
  484. width: 100%;
  485. height: 100%;
  486. }
  487. </style>
  488. <body>
  489. <div class="layui-tab">
  490. <ul class="layui-tab-title">
  491. <li class="layui-this">公司上传</li>
  492. <li id="details"><a class="ablock" href="{:url('material/personal_case_list')}">案例审核</a></li>
  493. <li id="details"><a class="ablock" href="{:url('material/case_data_statistics')}">数据统计</a></li>
  494. </ul>
  495. <div class="layui-tab-content">
  496. <div class="layui-tab-item layui-show">
  497. <div class="layui-card">
  498. <div class="layui-card-header layuiadmin-card-header-auto" style="padding: 15px 15px 20px;">
  499. <div class="layui-form flex-end">
  500. <div class="layui-inline" style="margin-right: 0px;">
  501. <label class="layui-form-label">小区</label>
  502. <div class="layui-input-inline relative" id="box212">
  503. <select name="community" lay-filter="community" id="community" lay-search>
  504. <option value="">请选择小区</option>
  505. {notempty name="communityList"}
  506. {volist name="communityList.arr" id="t"}
  507. <option data-py="{$t.s}" value="{$t.id}">{$t.name}</option>
  508. {/volist}
  509. {/notempty}
  510. </select>
  511. <ul class="c_wordlist noneClass">
  512. {notempty name="communityList"}
  513. {volist name="communityList.sort" id="vo"}
  514. <li data-py="{$vo}">{$vo}</li>
  515. {/volist}
  516. {/notempty}
  517. </ul>
  518. </div>
  519. </div>
  520. <div class="layui-inline" style="margin-right: 0px;">
  521. <label class="layui-form-label">风格</label>
  522. <div class="layui-input-inline">
  523. <select name="decostyle" lay-filter="type" id="type" lay-search>
  524. <option value="">请选择分类</option>
  525. {volist name="decostyle" id="t"}
  526. <option value="{$t.id}">{$t.name}</option>
  527. {/volist}
  528. </select>
  529. </div>
  530. </div>
  531. <div class="layui-inline">
  532. <label class="layui-form-label">案例标题</label>
  533. <div class="layui-input-inline">
  534. <input type="text" name="title" placeholder="请输入标题" autocomplete="off"
  535. class="layui-input">
  536. </div>
  537. </div>
  538. <div class="layui-inline" style="margin-right: 0px;">
  539. <label class="layui-form-label">设计师</label>
  540. <div class="layui-input-inline">
  541. <input type="text" name="designer_name" placeholder="请输入设计师名称" autocomplete="off"
  542. class="layui-input">
  543. </div>
  544. </div>
  545. <div class="layui-inline" style="margin-right: 0px;">
  546. <label class="layui-form-label">上传人</label>
  547. <div class="layui-input-inline">
  548. <select name="employee_id" id="employee" lay-search>
  549. <option value="">请选择人员</option>
  550. {volist name="employee" id="e"}
  551. <option value="{$e.id}">{$e.name}</option>
  552. {/volist}
  553. </select>
  554. </div>
  555. </div>
  556. <div class="layui-inline">
  557. <label class="layui-form-label">上传时间</label>
  558. <div class="layui-input-inline select-date">
  559. <input type="text" name="add_time" id="select_date" placeholder="开始时间 - 结束时间" autocomplete="off" class="layui-input">
  560. </div>
  561. </div>
  562. <div class="layui-inline ml10">
  563. <button class="layui-btn layuiadmin-btn-list submitbtn" lay-submit
  564. lay-filter="LAY-app-contlist-search">
  565. <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
  566. </button>
  567. </div>
  568. </div>
  569. <div class="operateBtn">
  570. {auth:check name="material/casedetail"}
  571. <a type="button" class="layui-btn layui-btn-primary caseaddbtn">
  572. 添加装修案例
  573. </a>
  574. {/auth:check}
  575. <a type="button" class="layui-btn layui-btn-primary" id="cate_administration">分类管理</a>
  576. </div>
  577. </div>
  578. <div class="layui-card-body" style="text-align: center;">
  579. <table id="anli-table" lay-filter="anli-table"></table>
  580. </div>
  581. </div>
  582. </div>
  583. </div>
  584. </div>
  585. <div class="preview_mask layui-hide">
  586. <div class="preview_phone">
  587. </div>
  588. <i class="layui-icon layui-icon-close lay-close"></i>
  589. </div>
  590. </body>
  591. {/block} {block name="js"}
  592. <script type="text/html" id="cover_img">
  593. {{# if(d.cover_img != ''){ }}
  594. <img src="{{d.cover_img}}?x-oss-process=image/resize,w_50" style="width: 30px;height: 30px;"/>
  595. {{# }else{ }}
  596. <span style="color: #cccccc;">无</span>
  597. {{# } }}
  598. </script>
  599. <script type="text/html" id="community_name">
  600. {{# if(d.community){ }}
  601. <span>{{d.community.name}}</span>
  602. {{# }else{ }}
  603. <span style="color: #cccccc;">无</span>
  604. {{# } }}
  605. </script>
  606. <script type="text/html" id="designer_name">
  607. {{# if(d.designer){ }}
  608. <span>{{d.designer.name}}</span>
  609. {{# }else{ }}
  610. <span style="color: #cccccc;">无</span>
  611. {{# } }}
  612. </script>
  613. <script type="text/html" id="style_name">
  614. {{# if(d.decostyle){ }}
  615. <span>{{d.decostyle.name}}</span>
  616. {{# }else{ }}
  617. <span style="color: #cccccc;">无</span>
  618. {{# } }}
  619. </script>
  620. <script type="text/html" id="housetype_name">
  621. {{# if(d.housetype){ }}
  622. <span>{{d.housetype.name}}</span>
  623. {{# }else{ }}
  624. <span style="color: #cccccc;">无</span>
  625. {{# } }}
  626. </script>
  627. <script type="text/html" id="roomtpl">
  628. {{# if(d.room){ }}
  629. <span>{{d.room}}</span>
  630. {{# }else{ }}
  631. <span style="color: #cccccc;">无</span>
  632. {{# } }}
  633. </script>
  634. <script type="text/html" id="halltpl">
  635. {{# if(d.hall){ }}
  636. <span>{{d.hall}}</span>
  637. {{# }else{ }}
  638. <span style="color: #cccccc;">无</span>
  639. {{# } }}
  640. </script>
  641. <script type="text/html" id="toilettpl">
  642. {{# if(d.toilet){ }}
  643. <span>{{d.toilet}}</span>
  644. {{# }else{ }}
  645. <span style="color: #cccccc;">无</span>
  646. {{# } }}
  647. </script>
  648. <script type="text/html" id="titletpl">
  649. {{# if(d.title){ }}
  650. <span>{{d.title}}</span>
  651. {{# }else{ }}
  652. <span style="color: #cccccc;">无</span>
  653. {{# } }}
  654. </script>
  655. <script type="text/html" id="moneytpl">
  656. {{# if(d.money){ }}
  657. {{# if(d.money == '暂无报价'){ }}
  658. <span style="color: #cccccc;">暂无报价</span>
  659. {{# }else{ }}
  660. <span>{{d.money}}</span>
  661. {{# } }}
  662. {{# }else{ }}
  663. <span style="color: #cccccc;">无</span>
  664. {{# } }}
  665. </script>
  666. <script type="text/html" id="squaretpl">
  667. {{# if(d.square){ }}
  668. <span>{{d.square}}㎡</span>
  669. {{# }else{ }}
  670. <span style="color: #cccccc;">无</span>
  671. {{# } }}
  672. </script>
  673. <script type="text/html" id="employee_name">
  674. {{# if(d.employee){ }}
  675. <span>{{d.employee.opt_name}}</span>
  676. {{# }else{ }}
  677. <span style="color: #cccccc;">无</span>
  678. {{# } }}
  679. </script>
  680. <script type="text/html" id="show">
  681. <input type="checkbox" name="show" value="{{d.id}}" lay-skin="switch" lay-text="上架|下架" lay-filter="show" {{ d.publish == 1 ? 'checked' : '' }}>
  682. </script>
  683. <script type="text/html" id="table-anli-action">
  684. {auth:check name="material/casedetail"}
  685. <a class="layui-btn layui-btn-xs" lay-event="anli-details">编辑</a>
  686. {/auth:check}
  687. {auth:check name="data/cluedata"}
  688. <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="anli-clue-list">线索记录</a>
  689. {/auth:check}
  690. {auth:check name="material/apicasedelete"}
  691. <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="anli-delete">删除</a>
  692. {/auth:check}
  693. {auth:check name="dailyTasks/assign_org"}
  694. <a class="layui-btn layui-btn-xs" lay-event="daily-tasks">设置任务</a>
  695. {/auth:check}
  696. <a class="layui-btn layui-btn-xs" lay-event="preview">预览</a>
  697. </script>
  698. <script type="text/html" id="recommend">
  699. {{# if(d.recommend){ }}
  700. <span>是</span>
  701. {{# }else{ }}
  702. <span style="color: #cccccc;">否</span>
  703. {{# } }}
  704. </script>
  705. <script src="__STATIC__/js/swiper.min.js"></script>
  706. <script>
  707. layui.config({
  708. base: '__LAYUI__/',
  709. urlbase: '/sys'
  710. }).extend({
  711. index: 'lib/index' //主入口模块
  712. }).use(['index', 'table', 'element','laydate'], function () {
  713. var $ = layui.$,
  714. form = layui.form,
  715. element = layui.element,
  716. table = layui.table,
  717. laydate = layui.laydate,
  718. scrollTopNum = 0;
  719. //日期范围
  720. laydate.render({
  721. elem: '#select_date'
  722. , type: 'date'
  723. , range: true
  724. , trigger: 'click'//呼出事件改成click
  725. });
  726. document.onkeydown=function(event){
  727. var e = event || window.event || arguments.callee.caller.arguments[0];
  728. if(e && e.keyCode==13){
  729. $(".submitbtn").trigger("click");
  730. }
  731. };
  732. //分类管理
  733. $("#cate_administration").click(function () {
  734. layer.open({
  735. type: 2,
  736. title: ['分类管理', 'color:#333333;background-color:#D8E6F1;'],
  737. content: '{:url("material/cate_administration")}?type=',
  738. resize: false,
  739. area: ['80%', '80%'],
  740. // yes: function(index, layero){
  741. // parent.location.reload(); // 父页面刷新
  742. // console.log(index)
  743. // // var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
  744. // // parent.layer.close(index);
  745. // }
  746. end: function () {
  747. location.reload();
  748. }
  749. });
  750. })
  751. $('.caseaddbtn').click(function () {
  752. layer.open({
  753. type: 2,
  754. title: ['添加装修案例', 'color:#333333;background-color:#D8E6F1;'],
  755. content: '{:url("material/case_add")}',
  756. resize: false,
  757. area: ['80%', '80%'],
  758. });
  759. })
  760. //监听搜索
  761. form.on('submit(LAY-app-contlist-search)', function (data) {
  762. var field = data.field;
  763. console.log(data)
  764. //执行重载
  765. table.reload('anli-table', {
  766. where: field
  767. , page: { curr: 1 }
  768. });
  769. });
  770. ///default entery
  771. var firstTabTableLoad = function () {
  772. //装修案例列表
  773. table.render({
  774. elem: '#anli-table',
  775. autoSort: false,
  776. url: "{:url('material/caselist')}",
  777. cols: [
  778. [{
  779. align: 'center',
  780. type: 'numbers',
  781. field: 'id',
  782. width: 80,
  783. title: '序号',
  784. sort: true
  785. }, {
  786. align: 'center',
  787. templet: '#cover_img',
  788. width: 100,
  789. title: '封面图',
  790. }, {
  791. align: 'center',
  792. field: 'title',
  793. title: '案例标题',
  794. minWidth: 100,
  795. templet: '#titletpl'
  796. }, {
  797. align: 'center',
  798. title: '小区',
  799. templet: '#community_name'
  800. }, {
  801. align: 'center',
  802. title: '设计师',
  803. templet: '#designer_name'
  804. }, {
  805. align: 'center',
  806. title: '风格',
  807. templet: '#style_name'
  808. }, {
  809. align: 'center',
  810. title: '户型',
  811. templet: '#housetype_name'
  812. },
  813. {
  814. align: 'center',
  815. field: 'square',
  816. title: '面积',
  817. minWidth: 100,
  818. templet: '#squaretpl'
  819. }
  820. , {
  821. align: 'center',
  822. field: 'money',
  823. title: '价格',
  824. minWidth: 100,
  825. templet: '#moneytpl'
  826. },
  827. {
  828. align: 'center',
  829. field: 'addtime',
  830. title: '上传时间',
  831. minWidth: 100
  832. }, {
  833. align: 'center',
  834. field: 'view_times',
  835. sort: true,
  836. title: '浏览次数',
  837. minWidth: 100
  838. }, {
  839. align: 'center',
  840. field: 'shared_times',
  841. sort: true,
  842. title: '转发次数',
  843. minWidth: 100
  844. }, {
  845. align: 'center',
  846. field: 'visit_due_time',
  847. sort: true,
  848. title: '浏览时长',
  849. minWidth: 100
  850. }, {
  851. align: 'center',
  852. title: '展示',
  853. minWidth: 100,
  854. templet: '#show'
  855. }, {
  856. align: 'center',
  857. title: '推荐',
  858. minWidth: 100,
  859. templet: '#recommend'
  860. }, {
  861. align: 'center',
  862. title: '上传人',
  863. minWidth: 100,
  864. templet: '#employee_name'
  865. }, {
  866. align: 'center',
  867. title: '操作',
  868. width: 380,
  869. align: 'center',
  870. fixed: 'right',
  871. templet: "#table-anli-action"
  872. }]
  873. ],
  874. page: true,
  875. limit: 50,
  876. height: 'full-220',
  877. text: '对不起,加载出现异常!'
  878. });
  879. table.on('sort(anli-table)', function (obj) {
  880. table.reload('anli-table', {
  881. initSort: obj
  882. , where: {
  883. order: obj.field + ' ' + obj.type
  884. }
  885. });
  886. });
  887. //监听列表
  888. table.on('tool(anli-table)', function (obj) {
  889. var data = obj.data;
  890. console.log(data.id);
  891. if (obj.event === 'anli-details') {
  892. layer.open({
  893. type: 2,
  894. title: ['编辑装修案例', 'color:#333333;background-color:#D8E6F1;'],
  895. content: "{:url('material/casedetail')}?id=" + data.id,
  896. resize: false,
  897. area: ['80%', '85%'],
  898. end: function () {
  899. scrollPostion(scrollTopNum)
  900. setTimeout(() => {
  901. $('.layui-table-main').scroll(function (e) {
  902. scrollTopNum = $(this).scrollTop();
  903. console.log(scrollTopNum, '<<<回滚到指定位置');
  904. })
  905. }, 800)
  906. }
  907. });
  908. }
  909. if (obj.event === 'anli-clue-list') {
  910. layer.open({
  911. type: 2,
  912. title: ['素材线索数据', 'color:#333333;background-color:#D8E6F1;'],
  913. content: "{:url('data/cluedata')}?type=materialCase&id=" + data.id,
  914. resize: false,
  915. area: ['80%', '80%']
  916. });
  917. }
  918. if (obj.event === 'anli-delete') {
  919. layer.confirm('确定要删除此素材么?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'], }, function () {
  920. $.get("{:url('material/apicasedelete')}?id=" + data.id, function (res) {
  921. if (res.code === 0) {
  922. layer.msg(res.msg, { anim: 0, time: 400 }, function () {
  923. table.reload('anli-table');
  924. });
  925. } else {
  926. layer.msg(res.msg, { anim: 6, time: 400 });
  927. }
  928. });
  929. });
  930. }
  931. if (obj.event === 'daily-tasks') {
  932. layer.open({
  933. type: 2,
  934. title: ['设置任务', 'color:#333333;background-color:#D8E6F1;'],
  935. content: "{:url('dailyTasks/assign_org')}?type=material_case&id=" + data.id,
  936. resize: false,
  937. area: ['80%', '80%']
  938. });
  939. }
  940. if (obj.event === 'preview') {
  941. requestCaseDetail(data.id);
  942. }
  943. });
  944. };
  945. firstTabTableLoad();
  946. setTimeout(() => {
  947. $('.layui-table-main').scroll(function (e) {
  948. scrollTopNum = $(this).scrollTop();
  949. console.log(scrollTopNum, '<<<记录位置');
  950. })
  951. }, 800)
  952. function scrollPostion(num) {
  953. $('.layui-table-main').scrollTop(num)
  954. }
  955. /*---------------------------------------------------------*/
  956. $(document).click((e) => {
  957. let c_element = $('#community').next();
  958. if (c_element[0].className.indexOf('layui-form-selected') < 0) {
  959. $('.c_wordlist').addClass('noneClass');
  960. }
  961. })
  962. $('dd').click(() => {
  963. $('.c_wordlist').addClass('noneClass');
  964. })
  965. $('#box212').click(() => {
  966. $('.c_wordlist').toggleClass('noneClass');
  967. })
  968. let xqElement = $('.layui-anim-upbit')[0];
  969. xqElement.classList.add('xqElement');
  970. let options = [];
  971. let xqDatalist = $('#community').children();
  972. for (let i = 0; i < xqDatalist.length; i++) {
  973. if (xqDatalist[i].dataset.py) {
  974. options.push(xqDatalist[i].dataset.py)
  975. }
  976. }
  977. $('.c_wordlist').click((e) => {
  978. if (e.target.localName != 'li') {
  979. e.stopPropagation();
  980. return;
  981. }
  982. let index = 0;
  983. let curWord = e.target.dataset.py;
  984. let lilist = $('.c_wordlist').children();
  985. for (let i = 0; i < lilist.length; i++) {
  986. lilist[i].className = '';
  987. }
  988. if (parseInt(curWord) != NaN) {
  989. let word1 = curWord.toLowerCase();
  990. index = options.indexOf(word1)
  991. } else {
  992. index = options.indexOf(curWord)
  993. }
  994. setTimeout(() => {
  995. e.target.className = 'li_active';
  996. let num = index * 37 + 37;
  997. $('.xqElement').scrollTop(num);
  998. }, 50)
  999. e.stopPropagation();
  1000. })
  1001. $('.layui-select-title input').on('input', function (e) {
  1002. if (e.target.placeholder == '请选择小区') {
  1003. let val = $(this).val();
  1004. if (!val) {
  1005. $('.c_wordlist').removeClass('noneClass');
  1006. return;
  1007. }
  1008. $('.c_wordlist').addClass('noneClass');
  1009. }
  1010. })
  1011. /*--------------------------------------------*/
  1012. function requestCaseDetail(id) {
  1013. $.ajax({
  1014. type: 'post',
  1015. url: '{:url("material/preview_casedetail")}',
  1016. data: {
  1017. id: id
  1018. },
  1019. success: function (res) {
  1020. if (res.code == 0) {
  1021. randerPhonePage(res.data);
  1022. $('.preview_mask').removeClass('layui-hide');
  1023. }
  1024. }
  1025. })
  1026. }
  1027. function randerPhonePage(data) {
  1028. let htmls = `<div class="page_box">
  1029. <div class="page_cover_img">
  1030. ${data.vr_case || data.video_case ? `<div class="swiper-container">
  1031. <div class="swiper-wrapper">
  1032. ${data.vr_case ? `<div class="swiper-slide relative">
  1033. <img src="${data.cover_img}" width="100%" height="225px"/>
  1034. <div data-vrlink="${data.vr_case}" class="enter_vr">
  1035. <img src="__STATIC__/img/interVr.png" width="100%"/>
  1036. </div>
  1037. </div>` : ''}
  1038. ${data.video_case ? `<div class="swiper-slide">
  1039. <video width="100%" height="100%" x5-video-orientation="portraint" poster="${data.video_case}?x-oss-process=video/snapshot,t_100,f_jpg" controls>
  1040. <source src="${data.video_case}" type="video/mp4">
  1041. <source src="${data.video_case}" type="video/ogg">
  1042. </video>
  1043. </div>`: ''}
  1044. </div>
  1045. </div>` : ''}
  1046. ${!data.vr_case && !data.video_case ? `<img src="${data.cover_img}" width="100%" height="225px"/>` : ''}
  1047. ${data.vr_case || data.video_case ? `<div class="cover_tab">
  1048. ${data.vr_case ? `<div data-index="0" class="ss-vrlink activeTab">VR案例</div>` : ''}
  1049. ${data.video_case ? `<div data-index="1" class="ss-video ${!data.vr_case ? 'activeTab' : ''}">视频案例</div>` : ''}
  1050. </div>`: ''}
  1051. </div>
  1052. <div class="page_title">
  1053. <span>${data.title}</span>
  1054. </div>
  1055. <div class="designer_box">
  1056. <div class="designer_avatar">
  1057. <img src="${data.designer && data.designer.image_photo ? data.designer.image_photo : data.designer && data.designer.headimgurl ? data.designer.headimgurl : data.company_info && data.company_info.logo ? data.company_info.logo : '__STATIC__/img/default.png'}" width="100%" height="100%" />
  1058. </div>
  1059. <div class="designer_msg">
  1060. ${data.designer ? `<div class="designer_person">
  1061. 设计师:${data.designer && data.designer.name ? data.designer.name : '无'}
  1062. ${data.designer && data.designer.position ? `<span class="designer_position">【${data.designer.position}】</span>` : ''}
  1063. </div>`: `<div class="designer_person">
  1064. ${data.company_info.company_name}
  1065. </div>`}
  1066. ${data.designer ? `<div class="designer_style">
  1067. 擅长风格:${data.designer && data.designer.good_at ? data.designer.good_at.join(',') : '暂未设置'}
  1068. </div>`: `<div class="designer_style">
  1069. 公司地址:${data.company_info.company_address || '无'}
  1070. </div>`}
  1071. </div>
  1072. </div>
  1073. <div class="page_houseType">
  1074. <div class="houseType_msg">
  1075. <span class="houseType_name">户型</span>
  1076. <span class="houseType_val">${data.housetype ? data.housetype.name : '未知'}</span>
  1077. </div>
  1078. <div class="houseType_msg">
  1079. <span class="houseType_name">风格</span>
  1080. <span class="houseType_val">${data.decostyle ? data.decostyle.name : '未知'}</span>
  1081. </div>
  1082. <div class="houseType_msg">
  1083. <span class="houseType_name">面积</span>
  1084. <span class="houseType_val">${data.square}㎡</span>
  1085. </div>
  1086. <div class="houseType_msg">
  1087. <span class="houseType_name">价格</span>
  1088. <span class="houseType_val ${data.money == '暂无报价' ? 'colorA9A9A9' : ''}">${data.money}${data.money == '暂无报价' ? '' : '起'}</span>
  1089. </div>
  1090. </div>
  1091. <div class="page_line"></div>
  1092. <div class="page_tab_box ${data.desc && data.real_case ? '' : 'layui-hide'}">
  1093. <div data-type="1" class="nowtitbox">效果案例</div>
  1094. <div data-type="2">实景案例</div>
  1095. </div>
  1096. <div class="richText rt1 ${!data.desc ? 'layui-hide' : ''}">${data.desc}</div>
  1097. <div class="richText rt2 ${!data.desc && data.real_case ? '' : 'layui-hide'}">${data.real_case}</div>
  1098. <div class="page_time">本案例发布于${data.addtime.split(' ')[0]}</div>
  1099. </div>`;
  1100. $('.preview_phone').html(htmls);
  1101. setTimeout(() => {
  1102. swiperBox = new Swiper('.swiper-container', {
  1103. on: {
  1104. slideChangeTransitionEnd: function () {
  1105. //切换结束时,告诉我现在是第几个slide
  1106. let index = parseInt(this.activeIndex) + 1;
  1107. if (index > 1) {
  1108. $('.ss-video').addClass("activeTab").siblings().removeClass("activeTab");
  1109. } else {
  1110. $('.ss-vrlink').addClass("activeTab").siblings().removeClass("activeTab");
  1111. }
  1112. },
  1113. },
  1114. });
  1115. $('.cover_tab div').click(function () {
  1116. let props = $(this).prop('dataset');
  1117. $(this).addClass("activeTab").siblings().removeClass("activeTab");
  1118. swiperBox.slideTo(parseInt(props.index), 1000, false);
  1119. })
  1120. $('.page_tab_box div').click(function () {
  1121. let type = $(this).prop('dataset').type;
  1122. $(`.rt${type}`).removeClass('layui-hide');
  1123. if (type == 1) {
  1124. $(`.rt${2}`).addClass('layui-hide');
  1125. } else {
  1126. $(`.rt${1}`).addClass('layui-hide');
  1127. }
  1128. $(this).addClass('nowtitbox').siblings().removeClass("nowtitbox");
  1129. })
  1130. }, 300)
  1131. }
  1132. $('.cover_tab div').click(function () {
  1133. $(this).addClass('activeTab').siblings().removeClass("activeTab");
  1134. })
  1135. $('.lay-close').click(function () {
  1136. $('.preview_phone').html('')
  1137. $('.preview_mask').addClass('layui-hide');
  1138. })
  1139. var field = {};
  1140. form.on('select(state)', function (data) {
  1141. field['state'] = data.value;
  1142. table.reload('anli-table', {
  1143. where: field
  1144. , page: { curr: 1 }
  1145. });
  1146. });
  1147. form.on('select(user_id)', function (data) {
  1148. field['user_id'] = data.value;
  1149. table.reload('anli-table', {
  1150. where: field
  1151. , page: { curr: 1 }
  1152. });
  1153. });
  1154. form.on('select(means)', function (data) {
  1155. field['means'] = data.value;
  1156. table.reload('anli-table', {
  1157. where: field
  1158. , page: { curr: 1 }
  1159. });
  1160. });
  1161. form.on('select(date)', function (data) {
  1162. field['date'] = data.value;
  1163. table.reload('anli-table', {
  1164. where: field
  1165. , page: { curr: 1 }
  1166. });
  1167. });
  1168. //备注
  1169. $('body').on('mouseover', '.remarksInfo', function () {
  1170. var type = $(this).data('type');
  1171. layer.tips(type, this, {
  1172. tips: [1, '#3595CC'],
  1173. time: 2000
  1174. });
  1175. });
  1176. form.on('switch(show)', function (obj) {
  1177. var id = obj.value;
  1178. $.ajax({
  1179. type: "post",
  1180. url: '{:url("material/apipublish")}',
  1181. data: {
  1182. id: id,
  1183. cate: 'case'
  1184. },
  1185. success: function (res) {
  1186. layer.msg(res.msg, { time: 2000 });
  1187. }
  1188. });
  1189. });
  1190. //添加案例
  1191. $('.add_al').click(function () {
  1192. layer.open({
  1193. type: 2,
  1194. title: ['新建案例', 'color:#333333;background-color:#D8E6F1;'],
  1195. content: "{:url('material/case_add')}",
  1196. resize: false,
  1197. area: ['80%', '80%'],
  1198. // btn: ['确定','关闭'],
  1199. // yes: function(index){
  1200. // //当点击‘确定’按钮的时候,获取弹出层返回的值
  1201. // // var res = window["layui-layer-iframe" + index].callbackdata();
  1202. // //打印返回的值,看是否有我们想返回的值。
  1203. // console.log(index);
  1204. // //最后关闭弹出层
  1205. // layer.close(index);
  1206. // },
  1207. // cancel: function(){
  1208. // //右上角关闭回调
  1209. // }
  1210. });
  1211. });
  1212. });
  1213. </script>
  1214. {/block}