auditBaikeProductPage.jsp 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171
  1. <%@ page import="com.thinkgem.jeesite.common.config.Global" %>
  2. <%@ page contentType="text/html;charset=UTF-8" %>
  3. <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
  4. <html>
  5. <head>
  6. <title>采美词条</title>
  7. <meta name="decorator" content="default"/>
  8. <style>
  9. .applicationsan{
  10. user-select: none;
  11. cursor: pointer;
  12. }
  13. .controls{
  14. width: 520px;
  15. }
  16. .controls.not-overflow{
  17. overflow: initial !important;
  18. }
  19. .content-edit{
  20. position: relative;
  21. width: 100%;
  22. z-index: 999;
  23. }
  24. .content-edit .bk-input{
  25. padding: 4px 6px;
  26. font-size: 14px;
  27. line-height: 20px;
  28. color: #555;
  29. border-radius: 4px;
  30. background-color: #fff;
  31. border: 1px solid #ccc
  32. }
  33. .content-edit .bk-input img.scapegoat{
  34. width: 16px;
  35. height: 16px;
  36. vertical-align: -3px;
  37. }
  38. .content-edit .bk-toolbar{
  39. position: absolute;
  40. padding: 6px 12px;
  41. border: 1px solid #f1f1f1;
  42. left: 0;
  43. top: 0;
  44. transform: translateY(-100%);
  45. font-size: 14px;
  46. text-align: center;
  47. background: #fff;
  48. color: #999;
  49. cursor: pointer;
  50. display: none;
  51. }
  52. .content-edit .bk-bubble{
  53. font-size: 14px;
  54. padding: 0 4px;
  55. line-height: 18px;
  56. border-radius: 12px;
  57. position: absolute;
  58. right: 0;
  59. top: 0;
  60. transform: translate(50%, -50%);
  61. background: #ddd;
  62. color: #fff;
  63. box-sizing: border-box;
  64. min-width: 18px;
  65. text-align: center;
  66. display: none;
  67. cursor: pointer;
  68. }
  69. .content-edit .bk-literature{
  70. position: absolute;
  71. bottom: 0;
  72. left: 0;
  73. transform: translateY(100%);
  74. background: #fff;
  75. border: 1px solid #ddd;
  76. padding: 0;
  77. margin: 0;
  78. width: 100%;
  79. box-sizing: border-box;
  80. display: none;
  81. }
  82. .content-edit .bk-literature li{
  83. list-style-type: none;
  84. padding: 8px 16px;
  85. display: flex;
  86. justify-content: space-between;
  87. z-index: 200;
  88. }
  89. .content-edit .bk-literature li .controls{
  90. margin-left: initial;
  91. width: inherit;
  92. }
  93. .content-edit .bk-literature .bk-control{
  94. max-width: 80%;
  95. overflow: hidden;
  96. white-space: nowrap;
  97. text-overflow: ellipsis;
  98. }
  99. .content-edit .bk-literature .bk-control span{
  100. cursor: pointer;
  101. }
  102. .content-edit .bk-literature .bk-control span:hover{
  103. text-decoration: underline;
  104. }
  105. .content-edit .bk-literature .bk-literature-control span{
  106. margin-left: 12px;
  107. cursor: pointer;
  108. color: #2fa4e7;
  109. }
  110. .bk-textInfo-item{
  111. position: relative;
  112. display: flex;
  113. align-items: center;
  114. margin-bottom: 16px;
  115. }
  116. .bk-textInfo-item input{
  117. display: block;
  118. width: 100%;
  119. }
  120. .bk-textInfo-item .bk-textInfo-control{
  121. flex: 1;
  122. display: flex;
  123. flex-wrap: nowrap;
  124. column-gap: 8px;
  125. margin-left: 16px;
  126. position: absolute;
  127. right: 0;
  128. top: 5px;
  129. transform: translateX(105%);
  130. }
  131. .bk-textInfo-item .bk-textInfo-control span{
  132. font-size: 12px;
  133. text-decoration: underline;
  134. white-space: nowrap;
  135. cursor: pointer;
  136. color:#2fa4e7;
  137. }
  138. .paramList{
  139. position: relative;
  140. }
  141. .paramList .param-item{
  142. display: flex;
  143. align-items: center;
  144. column-gap: 16px;
  145. position: relative;
  146. margin-bottom: 16px;
  147. }
  148. .paramList .param-name input{
  149. display: block;
  150. width: initial;
  151. }
  152. .paramList .param-name{
  153. width: 30%;
  154. }
  155. .paramList .param-content{
  156. flex: 1;
  157. }
  158. .paramList a{
  159. position: absolute;
  160. right: 0;
  161. top: 10%;
  162. transform: translateX(130%);
  163. }
  164. .paramList .control-group{
  165. position: relative;
  166. }
  167. .paramList .add-button{
  168. margin-bottom: 16px;
  169. }
  170. .controls .conList{
  171. display: inline-block;
  172. margin-right: 15px;
  173. }
  174. .conList .btn:nth-of-type(1){
  175. margin-left: 25px;
  176. }
  177. .select2-choice{
  178. width: 100px;
  179. }
  180. .upload-content {
  181. float: left;
  182. margin-top: -100px;
  183. margin-right: -40px;
  184. }
  185. .upload-content .conList .btn:nth-of-type(1) {
  186. width: 90px;
  187. height: 100px;
  188. border: 2px solid #eee;
  189. background: #fff;
  190. position: relative;
  191. }
  192. .upload-content .conList .btn:nth-of-type(1)>div {
  193. position: absolute;
  194. top: 50%;
  195. left: 50%;
  196. transform: translate(-50%, -50%);
  197. color: #666;
  198. }
  199. .upload-content .conList .btn:nth-of-type(1) span {
  200. font-size: 35px;
  201. }
  202. .upload-content .conList .btn:nth-of-type(1) h5 {
  203. color: #666;
  204. }
  205. .cancel-upload {
  206. background: transparent;
  207. border: none;
  208. box-shadow: none;
  209. position: relative;
  210. top: -38px;
  211. left: -25px;
  212. cursor: pointer;
  213. z-index: 100;
  214. }
  215. .upload-content .conList ol li {
  216. width: 114px;
  217. min-height: 80px;
  218. text-align: center;
  219. background: #fff;
  220. position: relative;
  221. top: 120px;
  222. margin-left: 2px;
  223. height: 100px;
  224. display: flex;
  225. justify-content: center;
  226. align-items: center;
  227. box-sizing: border-box;
  228. }
  229. .hide-pic {
  230. display: none !important;
  231. }
  232. .upload-image-list{
  233. width: 660px;
  234. float: left;
  235. }
  236. .iconBox{
  237. font-size: 0;
  238. }
  239. .controls .conList{
  240. display: inline-block;
  241. margin-right: 15px;
  242. }
  243. .conList .btn:nth-of-type(1){
  244. margin-left: 25px;
  245. }
  246. .select2-choice{
  247. width: 100px;
  248. }
  249. .upload-content {
  250. float: left;
  251. margin-top: -70px;
  252. margin-left: 20px !important;
  253. }
  254. .upload-content .conList .btn:nth-of-type(1) {
  255. width: 90px;
  256. height: 100px;
  257. border: 2px solid #eee;
  258. background: #fff;
  259. position: relative;
  260. }
  261. .upload-content .conList .btn:nth-of-type(1)>div {
  262. position: absolute;
  263. top: 50%;
  264. left: 50%;
  265. transform: translate(-50%, -50%);
  266. color: #666;
  267. }
  268. .upload-content .conList .btn:nth-of-type(1) span {
  269. font-size: 35px;
  270. }
  271. .upload-content .conList .btn:nth-of-type(1) h5 {
  272. color: #666;
  273. }
  274. .cancel-upload {
  275. background: transparent;
  276. border: none;
  277. box-shadow: none;
  278. position: relative;
  279. top: -38px;
  280. left: -25px;
  281. cursor: pointer;
  282. z-index: 100;
  283. }
  284. .display-image-list .cancel-upload{
  285. top: -106px;
  286. left: 114px;
  287. }
  288. .display-image-list .conList{
  289. position: relative;
  290. }
  291. .hide-pic {
  292. display: none !important;
  293. }
  294. .select2-choice{
  295. width: 200px
  296. }
  297. .red {
  298. color: red;
  299. }
  300. .upload {
  301. position: relative;
  302. display: inline-block;
  303. background: #D0EEFF;
  304. border: 1px solid #99D3F5;
  305. border-radius: 4px;
  306. padding: 4px 12px;
  307. color: #1E88C7;
  308. text-decoration: none;
  309. text-indent: 0;
  310. line-height: 20px;
  311. margin-left: 20px;
  312. cursor: pointer;
  313. width: 52px;
  314. height: 20px;
  315. }
  316. .upload input {
  317. position: absolute;
  318. width: 170px;
  319. font-size: 20px;
  320. right: 0;
  321. top: 0;
  322. opacity: 0;
  323. cursor: pointer;
  324. }
  325. .upload:hover {
  326. background: #AADFFD;
  327. border-color: #78C3F3;
  328. color: #004974;
  329. text-decoration: none;
  330. }
  331. .add-submit {
  332. position: relative;
  333. display: inline;
  334. background: #D0EEFF;
  335. border: 1px solid #99D3F5;
  336. border-radius: 4px;
  337. padding: 4px 12px;
  338. color: #1E88C7;
  339. text-decoration: none;
  340. text-indent: 0;
  341. line-height: 20px;
  342. margin-left: 20px;
  343. cursor: pointer;
  344. width: 52px;
  345. height: 30px;
  346. }
  347. .add-submit input {
  348. position: absolute;
  349. width: 50px;
  350. font-size: 20px;
  351. right: 0;
  352. top: 0;
  353. opacity: 0;
  354. cursor: pointer;
  355. }
  356. .add-submit:hover {
  357. background: #AADFFD;
  358. border-color: #78C3F3;
  359. color: #004974;
  360. text-decoration: none;
  361. }
  362. .upload-loading{
  363. display: none;
  364. width: 32px;
  365. height: 32px;
  366. margin-left: 10px;
  367. }
  368. .upload-loading img{
  369. width: 16px;
  370. height: 16px;
  371. margin: 0 auto 0;
  372. }
  373. #file-list-display {
  374. width: 600px;
  375. height: auto;
  376. float: left;
  377. margin-left: 20px;
  378. }
  379. #file-list-display p {
  380. line-height: 30px;
  381. font-size: 14px;
  382. color: #333333;
  383. margin: 0;
  384. }
  385. #file-list-display p .del {
  386. color: #2fa4e7;
  387. font-size: 12px;
  388. cursor: pointer;
  389. margin-left: 20px;
  390. }
  391. .Main-content{
  392. height: 100px;
  393. }
  394. .dialogmask {
  395. position: fixed;
  396. top: 0px;
  397. height: 100%;
  398. width: 100%;
  399. z-index: 1000;
  400. display: none;
  401. }
  402. .opacity { /*遮罩浑浊处理*/
  403. opacity: 0.3;
  404. filter: alpha(opacity=30);
  405. background-color: #000;
  406. }
  407. .box {
  408. overflow: hidden;
  409. position: fixed;
  410. width: 55%;
  411. height: 60%;
  412. z-index: 1005; /*值越大,和其他层层叠时越在上面*/
  413. left: 20%;
  414. top: 15%;
  415. background-color: #fff;
  416. border: 1px solid rgb(0, 153, 153);
  417. }
  418. .ckzl {
  419. overflow: hidden;
  420. position: fixed;
  421. width: 600px;
  422. max-height: 600px;
  423. z-index: 1000; /*值越大,和其他层层叠时越在上面*/
  424. left: 50%;
  425. top: 50%;
  426. background-color: #fff;
  427. transform: translate(-50%, -50%);
  428. padding: 32px;
  429. border: 1px solid #ddd;
  430. }
  431. .ckzl .digcontent .dig-tab{
  432. display: flex;
  433. align-items: center;
  434. padding-bottom: 24px;
  435. }
  436. .ckzl .digcontent .dig-tab a{
  437. margin-right: 16px;
  438. }
  439. .ckzl .digcontent .control-group{
  440. margin-left: 0 !important;
  441. margin-top: 12px;
  442. }
  443. .ckzl .form-actions{
  444. display: flex;
  445. align-items: center;
  446. background: transparent;
  447. padding: 0;
  448. padding-top: 20px;
  449. background-color: transparent;
  450. margin-bottom: 0;
  451. border-top: 1px solid #e5e5e5
  452. }
  453. .ckzl .form-actions button{
  454. margin-left: 16px;
  455. }
  456. .ckzl .auth-qrCode-list{
  457. margin-top: -60px;
  458. margin-left: 30px;
  459. }
  460. .ckzl .bk-upload-tip{
  461. margin-left: 24px;
  462. margin-top: 16px;
  463. font-size: 12px;
  464. color: #999;
  465. }
  466. .ckzl .bk-input-tip{
  467. margin-left: 100px;
  468. font-size: 12px;
  469. color: #999;
  470. }
  471. .dialogtitle {
  472. width: 100%;
  473. height: 30px;
  474. line-height: 30px;
  475. position: absolute;
  476. font-size: 18px;
  477. top: 0px;
  478. background-color: lightgrey;
  479. }
  480. .dialogcontent {
  481. padding-top: 20px;
  482. OVERFLOW: scroll;
  483. height: calc(100% - 20px);
  484. height: -webkit-calc(100% - 20px);
  485. margin-left: 30px;
  486. }
  487. .logcontent {
  488. padding: 10px;
  489. }
  490. .pla::-webkit-input-placeholder{
  491. color: green;
  492. }
  493. #mainIgeBox{
  494. margin-top: -174px;
  495. margin-left: 0 !important;
  496. }
  497. #mainIgeBox label{
  498. margin-left: 27px !important;
  499. margin-top: 14px;
  500. }
  501. .video{
  502. margin-left: 95px;
  503. margin-top: 80px;
  504. }
  505. </style>
  506. <script type="text/javascript">
  507. //显示弹框,并且根据结果是true或false来更改标题部分的颜色
  508. function showlog_result(result, info) {//展示具体弹框内容,以及根据结果是否正确变更title的颜色
  509. $("#dialog").css({display: "block"});//通过Jquery的css()更改样式
  510. $("#dialogmask").css({display: "block"});
  511. // var s=document.getElementById("logcontent").innerHTML;
  512. // $("#logcontent").html(s);
  513. }
  514. //关闭弹窗
  515. function dialog(){
  516. document.getElementById("dialog").style.display='none';
  517. document.getElementById("dialogmask").style.display='none';
  518. }
  519. //显示资料弹窗
  520. function digCk(type){
  521. document.getElementById("dig").style.display='block';
  522. document.getElementById("dig").title=type;
  523. }
  524. //隐藏资料弹窗
  525. function cantral(){
  526. document.getElementById("dig").style.display='none';
  527. }
  528. //添加资料
  529. function addZl(){
  530. document.getElementById("zl").style.display='block';
  531. document.getElementById("yyzl").style.display='none';
  532. document.getElementById("confimRefrence").style.display='block';
  533. }
  534. function removeZl(){
  535. document.getElementById("zl").style.display='none';
  536. document.getElementById("yyzl").style.display='block';
  537. document.getElementById("confimRefrence").style.display='none';
  538. }
  539. //不同资料显示不同的内容
  540. function ckzl_change(){
  541. var content=$("#info").val();
  542. if(2 == content){
  543. document.getElementById("wlzl").style.display='none';
  544. document.getElementById("zzzl").style.display='block';
  545. document.getElementById("qtzl").style.display='none';
  546. }else if(3 == content){
  547. document.getElementById("wlzl").style.display='none';
  548. document.getElementById("zzzl").style.display='none';
  549. document.getElementById("qtzl").style.display='block';
  550. }else{
  551. document.getElementById("wlzl").style.display='block';
  552. document.getElementById("zzzl").style.display='none';
  553. document.getElementById("qtzl").style.display='none';
  554. }
  555. }
  556. //信息栏只读设置
  557. function readflag(index){
  558. var info=document.getElementById("name["+index+"]").value;
  559. //标题为空则内容只读
  560. if(undefined != info && null!=info && '' !=info){
  561. document.getElementById("content["+index+"]").readOnly=false;
  562. }else{
  563. document.getElementById("content["+index+"]").readOnly=true;
  564. }
  565. }
  566. $(document).ready(function() {
  567. var flag=document.getElementById("createEntryGuidance").innerHTML;
  568. if('添加'==flag){
  569. showlog_result(null,null);
  570. }
  571. $("#inputForm").validate({
  572. submitHandler: function(form){
  573. // $('.xxl-name').each(function (index, item) {
  574. // $(item).attr('name', 'paramList['+ index +'].name')
  575. // })
  576. var status = $("input[name='status']:checked").val();
  577. // 计算空数据条数
  578. debugger
  579. var propertyArr = [];
  580. var name = $("#name").val();
  581. // var alias = $("#alias").val();
  582. // var discription = $("#discription").val();
  583. var shopId = $("#shopId").val();
  584. // var param0 = $('input[name="paramList[0].name"]').val();
  585. var seoKeyword = $("#seoKeyword").val();
  586. var publishTime = $('input[name="publishTime"]').val();
  587. var basePv = $("#basePv").val();
  588. var typeId = $("#typeId").val();
  589. propertyArr[0] = name;
  590. // propertyArr[1] = discription;
  591. // propertyArr[1] = param0;
  592. propertyArr[1] = seoKeyword;
  593. propertyArr[2] = shopId;
  594. propertyArr[3] = publishTime;
  595. propertyArr[4] = basePv;
  596. propertyArr[5] = typeId;
  597. // propertyArr[8] = alias;
  598. // propertyArr[9] = image;
  599. // alert("1111111111111111");
  600. var emptyNum = 0;
  601. for (var i = 0; i < propertyArr.length; i++) {
  602. var property = propertyArr[i].trim();
  603. if ("" === property) {
  604. emptyNum++;
  605. }
  606. }
  607. $("#emptyNum").val(emptyNum);
  608. // 检测敏感词
  609. var propertyMap = new Map();
  610. propertyMap.set("name", name);
  611. // propertyMap.set("alias", alias);
  612. // propertyMap.set("discription", discription);
  613. // propertyMap.set("productLink", productLink);
  614. for (var i = 0; i <= 9; i++) {
  615. var paramName = "\"paramList[" + i + "].name\"";
  616. var contentName = "\"paramList[" + i + "].content\"";
  617. var param = $('input[name=' + paramName + ']').val();
  618. var content = $('input[name=' + contentName + ']').val();
  619. if ( param === undefined || param === '') {
  620. break;
  621. } else {
  622. propertyMap.set("param" + i, param);
  623. propertyMap.set("content" + i, content);
  624. }
  625. }
  626. // propertyMap.set("advantage", advantage);
  627. // propertyMap.set("disadvantage", disadvantage);
  628. // propertyMap.set("principle", principle);
  629. propertyMap.set("seoKeyword", seoKeyword);
  630. // propertyMap.set("brand", brand);
  631. // propertyMap.set("producePlace", producePlace);
  632. // propertyMap.set("company", company);
  633. // propertyMap.set("adaptiveMan", adaptiveMan);
  634. // propertyMap.set("unAdaptiveMan", unAdaptiveMan);
  635. // propertyMap.set("aroundOperation", aroundOperation);
  636. // if (2 == commodityType) {
  637. // propertyMap.set("authLink", authLink);
  638. // }
  639. <%--for (var i = 0; i <= 20; i++) {--%>
  640. <%-- var questionName = "\"questionList[" + i + "].question\"";--%>
  641. <%-- var answerName = "\"questionList[" + i + "].answer\"";--%>
  642. <%-- var question = $('input[name=' + questionName + ']').val();--%>
  643. <%-- var answer = $('input[name=' + answerName + ']').val();--%>
  644. <%-- if (question === undefined || question === '') {--%>
  645. <%-- break;--%>
  646. <%-- } else {--%>
  647. <%-- propertyMap.set("question" + i, question);--%>
  648. <%-- propertyMap.set("answer" + i, answer);--%>
  649. <%-- }--%>
  650. <%--}--%>
  651. var sensitiveWords = '${sensitiveWords}';
  652. const mint = new MintFilter(sensitiveWords.split('|'));
  653. var filterSync = '';
  654. var touchWords = '';
  655. var touchNum = 0;
  656. <%--debugger--%>
  657. propertyMap.forEach(function (value,key,map) {
  658. filterSync = mint.filterSync(value);
  659. filterSync.words.forEach(word=>{
  660. touchWords += touchWords === '' ? word : "," + word;
  661. })
  662. if (touchWords !== '') {
  663. // 增加敏感词触发数量
  664. touchNum++;
  665. // 设置敏感词提示
  666. $("#" + key + "SensitiveWords").text("敏感词:" + touchWords);
  667. touchWords = '';
  668. }
  669. });
  670. if (1 == status && emptyNum > 0) {
  671. var msg = "您还剩余" + emptyNum + "项未完善,将会导致用户对您产品/仪器的认识度不够,确认是否提交?";
  672. top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
  673. if (v == 'ok') {
  674. if (touchNum > 0) {
  675. var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
  676. "请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
  677. "当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
  678. "将会影响发布时审核不通过!";
  679. top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
  680. if (v == 'ok') {
  681. loading('正在提交,请稍等...');
  682. form.submit();
  683. }
  684. }, {buttonsFocus: 1, persistent: true});
  685. } else{
  686. loading('正在提交,请稍等...');
  687. form.submit();
  688. }
  689. }
  690. }, {buttonsFocus: 1, persistent: true});
  691. } else {
  692. if (touchNum > 0) {
  693. var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
  694. "请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
  695. "当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
  696. "将会影响发布时审核不通过!";
  697. top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
  698. if (v == 'ok') {
  699. loading('正在提交,请稍等...');
  700. form.submit();
  701. }
  702. }, {buttonsFocus: 1, persistent: true});
  703. } else{
  704. loading('正在提交,请稍等...');
  705. form.submit();
  706. }
  707. }
  708. },
  709. errorContainer: "#messageBox",
  710. errorPlacement: function(error, element) {
  711. $("#messageBox").text("输入有误,请先更正。");
  712. if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
  713. error.appendTo(element.parent().parent());
  714. } else {
  715. error.insertAfter(element);
  716. }
  717. }
  718. });
  719. });
  720. function saveInfo(){
  721. var content=$("#info").val();//参考资料类型
  722. var website=$("#website").val();//网址
  723. var articleName=$("#articleName").val();//文章名字
  724. var websiteName=$("#websiteName").val();//网站名称
  725. var publishTimeStr=$("#publishTimeStr").val();//发布日期
  726. var acitationTimeStr=$("#acitationTimeStr").val();//引文日期
  727. var productId="";
  728. <c:if test="${cmBaikeProduct.entryId eq 2}">
  729. productId=${cmBaikeProduct.id}
  730. </c:if>
  731. var zlid=document.getElementById("dig").lang;
  732. var params={}
  733. if(content==1){
  734. params={
  735. //网络资料
  736. "referenceType":content,
  737. "website":website,
  738. "articleName":articleName,
  739. "websiteName":websiteName,
  740. "publishTimeStr":publishTimeStr,
  741. "acitationTimeStr":acitationTimeStr,
  742. //公共
  743. "productId":productId,//词条id
  744. "productType":document.getElementById("dig").title,//词条内容
  745. "flagId":document.getElementById("dig").tabIndex,//添加修改标识 1添加 2修改
  746. "zlId":zlid//资料id 用于修改
  747. }
  748. }else if(content=2){
  749. params={
  750. "referenceType":content,
  751. "author":$("#author").val(),//作者
  752. "workName":$("#workName").val(),//著作名
  753. "publicationPlace":$("#publicationPlace").val(),//出版地
  754. "press":$("#press").val(),//出版社
  755. "publicationYearStr":$("#publicationYearStr").val(),//出版年
  756. "acitationWeb":$("#acitationWeb").val(),//引文页码
  757. //公共
  758. "productId":productId,//词条id
  759. "productType":document.getElementById("dig").title,//词条内容
  760. "flagId":document.getElementById("dig").tabIndex,//添加修改标识 1添加 2修改
  761. "zlId":zlid//资料id 用于修改
  762. }
  763. }else if(content=3){
  764. params={
  765. //其他资料
  766. "referenceDescription":$("#referenceDescription").val(),//参考资料说明
  767. "imageDescription":$("#imageDescription").val(),//图片描述
  768. "imageUrl":$("#image").val(),//图片地址
  769. //公共
  770. "productId":productId,//词条id
  771. "productType":document.getElementById("dig").title,//词条内容
  772. "flagId":document.getElementById("dig").tabIndex,//添加修改标识 1添加 2修改
  773. "zlId":zlid//资料id 用于修改
  774. }
  775. }
  776. // alert(content+"---"+website+"---"+articleName+"---"+websiteName+"---"+publishTime+"---"+acitationTime);
  777. // var params={
  778. // //网络资料
  779. // "referenceType":content,
  780. // "website":website,
  781. // "articleName":articleName,
  782. // "websiteName":websiteName,
  783. // "publishTimeStr":publishTimeStr,
  784. // "acitationTimeStr":acitationTimeStr,
  785. // //著作资料
  786. // "author":$("#author").val(),//作者
  787. // "workName":$("#workName").val(),//著作名
  788. // "publicationPlace":$("#publicationPlace").val(),//出版地
  789. // "press":$("#press").val(),//出版社
  790. // "publicationYearStr":$("#publicationYearStr").val(),//出版年
  791. // "acitationWeb":$("#acitationWeb").val(),//引文页码
  792. // //其他资料
  793. // "referenceDescription":$("#referenceDescription").val(),//参考资料说明
  794. // "imageDescription":$("#imageDescription").val(),//图片描述
  795. // "imageUrl":$("#image").val(),//图片地址
  796. // //公共
  797. // "productId":productId,//词条id
  798. // "productType":document.getElementById("dig").title,//词条内容
  799. // "flagId":document.getElementById("dig").tabIndex,//添加修改标识 1添加 2修改
  800. // "zlId":zlid//资料id 用于修改
  801. // }
  802. $.ajax({
  803. url : "${ctx}/baike/cmBaikeProduct/saveMaterialinfo",
  804. data : params,
  805. type : 'post',
  806. success : function(data){
  807. document.getElementById("dig").style.display='none';
  808. alert("保存资料成功");
  809. $("#dig").load(location.href+" #dig>*","");
  810. <%--window.location.href = "${ctx}/baike/cmBaikeProduct/form?commodityType=1";--%>
  811. },
  812. error : function(){
  813. alert(222);
  814. }
  815. })
  816. }
  817. function saveMataInfo(){
  818. }
  819. function imgSizeChange(){
  820. // if($("#img"+size).width==){
  821. //
  822. // }
  823. // alert();
  824. // document.getElementById("imgaa").style.width=100px;
  825. parent.location.href = "https://zp.caimei365.com/12/ross/activity/challenge";
  826. }
  827. //删除资料
  828. function delMaterial(mid){
  829. var msg='确定删除该资料?';
  830. top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
  831. if(v=='ok'){
  832. $.ajax({
  833. url : "${ctx}/baike/cmBaikeProduct/delMaterialinfo",
  834. data : {"mid":mid},
  835. type : 'post',
  836. success : function(data){
  837. top.$.jBox.tip('删除资料成功', 'success');
  838. $("#mata").load(location.href+" #mata>*","");
  839. <%--window.location.href = "${ctx}/baike/cmBaikeProduct/form?commodityType=1";--%>
  840. },
  841. error : function(){
  842. alert(222);
  843. }
  844. })
  845. }
  846. // top.$.jBox.tip('删除成功', 'success');
  847. // window.location.reload();
  848. return;
  849. },{buttonsFocus:1,persistent: true});
  850. }
  851. //编辑资料
  852. function upMaterial(mid){
  853. $.ajax({
  854. url : "${ctx}/baike/cmBaikeProduct/getMaterialinfo",
  855. data : {"mid":mid},
  856. type : 'post',
  857. success : function(data){
  858. $("#info").val(data.referenceType);
  859. var content=$("#info").val();
  860. // $("#info option[value='3']").prop("selected",true);
  861. if(2 == content){
  862. document.getElementById("wlzl").style.display='none';
  863. document.getElementById("zzzl").style.display='block';
  864. document.getElementById("qtzl").style.display='none';
  865. }else if(3 == content){
  866. document.getElementById("wlzl").style.display='none';
  867. document.getElementById("zzzl").style.display='none';
  868. document.getElementById("qtzl").style.display='block';
  869. }else{
  870. document.getElementById("wlzl").style.display='block';
  871. document.getElementById("zzzl").style.display='none';
  872. document.getElementById("qtzl").style.display='none';
  873. }
  874. //判断是编辑还是添加 1添加 2编辑
  875. if(data.referenceType==1){
  876. $("#website").val(data.website);
  877. $("#articleName").val(data.articleName);
  878. $("#websiteName").val(data.websiteName);
  879. $("#publishTimeStr").val(data.publishTimeStr);
  880. $("#acitationTimeStr").val(data.acitationTimeStr);
  881. document.getElementById("dig").style.display='block';
  882. }
  883. if(data.referenceType==2){
  884. $("#author").val(data.author);
  885. $("#workName").val(data.workName);
  886. $("#publicationPlace").val(data.publicationPlace);
  887. $("#press").val(data.press);
  888. $("#publicationYearStr").val(data.publicationYearStr);
  889. $("#acitationWeb").val(data.acitationWeb);
  890. document.getElementById("dig").style.display='block';
  891. }
  892. document.getElementById("dig").tabIndex=2;
  893. document.getElementById("dig").lang=mid;
  894. },
  895. error : function(){
  896. alert(222);
  897. }
  898. })
  899. }
  900. </script>
  901. </head>
  902. <body>
  903. <ul class="nav nav-tabs">
  904. <li><a href="${ctx}/baike/cmBaikeProduct?commodityType=1&publishSource=2">供应商词条</a></li>
  905. <li class="active"><a id="createEntryGuidance" href="${ctx}/baike/cmBaikeProduct/toAuditPage?id=${cmBaikeProduct.id}&commodityType=1&entryId=2">${not empty cmBaikeProduct.id?'审核':'添加'}</a></li>
  906. </ul><br/>
  907. <%-- <div>--%>
  908. <%-- <button onclick="showlog_result(true,'展示正确内容的弹框')">展示正确弹框</button>--%>
  909. <%-- </div>--%>
  910. <div id="dialogmask" class="dialogmask opacity"></div>
  911. <div id="dig" class="ckzl" style="display: none"> 
  912. <div id="dig_content" class="digcontent">
  913. <div class="dig-tab">
  914. <a class="btn btn-primary" onclick="addZl()">添加参考资料</a>
  915. <a class="btn btn-primary" onclick="removeZl()">引用已有资料</a>
  916. </div>
  917. <%--已有资料--%>
  918. <div class="control-group" id="yyzl" style="display: none">
  919. <div class="check-reference-list">
  920. <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">
  921. <c:if test="${videoFile.referenceType eq '1'}">
  922. <div class="controls applicationsan">
  923. <span class="del">[${statusIndex.index}]</span>
  924. <span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}.</a></span>
  925. <span class="del">${videoFile.websiteName}).</span>
  926. <span class="del">${videoFile.publishTime}.</span>
  927. <span class="del">${videoFile.acitationTime}.</span>
  928. <a onclick="saveMataInfo(${videoFile.id})"></a>
  929. </div>
  930. </c:if>
  931. <c:if test="${videoFile.referenceType eq '2'}">
  932. <div class="controls applicationsan">
  933. <span class="del">[${statusIndex.index}]</span>
  934. <span class="del">${videoFile.author}.</span>
  935. <span class="del">${videoFile.workName}.</span>
  936. <span class="del">${videoFile.publicationPlace}.</span>
  937. <span class="del">${videoFile.press}.</span>
  938. <span class="del">${videoFile.publicationYear}.</span>
  939. <span class="del">${videoFile.acitationWeb}.</span>
  940. <a onclick="saveMataInfo(${videoFile.id})"></a>
  941. </div>
  942. </c:if>
  943. <c:if test="${videoFile.referenceType eq '3'}">
  944. <div class="controls applicationsan">
  945. <span class="del">[${statusIndex.index}]</span>
  946. <span class="del">${videoFile.referenceDescription}.</span>
  947. <span class="del">${videoFile.imageDescription}.</span>
  948. <%--
  949. <div class="conList">
  950. <img id="imgaa" src="${videoFile.imageUrl}" height="50px" width="50px" >(图片)</input>
  951. </div>
  952. --%>
  953. <a onclick="saveMataInfo(${videoFile.id})">引用资料</a>
  954. </div>
  955. </c:if>
  956. </c:forEach>
  957. </div>
  958. </div>
  959. <%--添加参考资料--%>
  960. <div id="zl">
  961. <div class="control-group">
  962. <label class="red">*</label>
  963. <label class="control-label">参考资料类型:</label>
  964. <select id="info" onchange="ckzl_change()">
  965. <option id="zllx1" value="1">网络资料</option>
  966. <option id="zllx2" value="2">著作资料</option>
  967. <option id="zllx3" value="3">其他资料</option>
  968. </select>
  969. </div>
  970. <%--网络资料--%>
  971. <div class="wlzl" style="display: block" id="wlzl">
  972. <div class="control-group">
  973. <label class="red">*</label>
  974. <label class="control-label keyClass">输入网址:</label>
  975. <input type="text" id="website" required="true" htmlEscape="false" class="input-xlarge " placeholder="请以http(s)开头"/>
  976. </div>
  977. <div class="control-group">
  978. <label class="red">*</label>
  979. <label class="control-label keyClass">文章名字:</label>
  980. <input type="text" id="articleName" required="true" htmlEscape="false" class="input-xlarge " placeholder="请输入文章名字"/>
  981. </div>
  982. <div class="control-group">
  983. <label class="red">*</label>
  984. <label class="control-label keyClass">网站名称:</label>
  985. <input type="text" id="websiteName" htmlEscape="false" class="input-xlarge " placeholder="请输入网站名称 如:新华网"/>
  986. </div>
  987. <div class="control-group">
  988. <label class="control-label keyClass">发表日期:</label>
  989. <input type="text" id="publishTimeStr" name="publishTimeStr" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
  990. onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
  991. </div>
  992. <div class="control-group">
  993. <label class="control-label keyClass">引文日期:</label>
  994. <input type="text" id="acitationTimeStr" name="publishTimeStr" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
  995. onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
  996. </div>
  997. </div>
  998. <%--著作资料--%>
  999. <div class="zzzl" style="display: none" id="zzzl">
  1000. <div class="control-group" >
  1001. <label class="red">*</label>
  1002. <label class="control-label keyClass">作者:</label>
  1003. <input type="text" id="author" htmlEscape="false" class="input-xlarge " placeholder="请输入作者名称 多个作者使用英文都好隔开"/>
  1004. </div>
  1005. <div class="control-group">
  1006. <label class="red">*</label>
  1007. <label class="control-label keyClass">著作名:</label>
  1008. <input type="text" id="workName" htmlEscape="false" class="input-xlarge " placeholder="请输入著作名"/>
  1009. </div>
  1010. <div class="control-group">
  1011. <label class="control-label keyClass">出版地:</label>
  1012. <input type="text" id="publicationPlace" htmlEscape="false" class="input-xlarge " placeholder="请输入出版地信息"/>
  1013. </div>
  1014. <div class="control-group">
  1015. <label class="red">*</label>
  1016. <label class="control-label keyClass">出版社:</label>
  1017. <input type="text" id="press" htmlEscape="false" class="input-xlarge " placeholder="请输入出版社名称"/>
  1018. </div>
  1019. <div class="control-group">
  1020. <label class="control-label keyClass">出版年:</label>
  1021. <input type="text" id="publicationYearStr" name="publicationYearStr" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
  1022. onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
  1023. </div>
  1024. <div class="control-group">
  1025. <label class="control-label keyClass">引文编码:</label>
  1026. <input type="text" id="acitationWeb" htmlEscape="false" class="input-xlarge " placeholder="请输入引用著作的页码 如 100 121"/>
  1027. </div>
  1028. </div>
  1029. <%--其他资料--%>
  1030. <div class="qtzl" id="qtzl" style="display: none" >
  1031. <div class="control-group">
  1032. <label class="red">*</label>
  1033. <label class="control-label keyClass">参考资料说明:</label>
  1034. <textarea id="referenceDescription" type="text" style="position: relative;height: 100px; width: 450px;" maxlength="50" ></textarea>
  1035. <label class="bk-input-tip">其他类型参考资料,填写格式请参阅<a href="">《信息与文献 参考文献著录规则 GB/T 7714-2015》</a></label>
  1036. </div>
  1037. <div class="control-group" >
  1038. <label class="control-label keyClass">图片描述:</label>
  1039. <input type="text" id="imageDescription" htmlEscape="false" class="input-xlarge " placeholder="请输入其他参考资料的具体描述"/>
  1040. </div>
  1041. <div class="control-group">
  1042. <label class="control-label">图片上传:</label>
  1043. <div class="auth-qrCode-list clearfix">
  1044. <div class="controls upload-content iconBox mainImageBox" id="mainImageBox">
  1045. <div class="conList">
  1046. <hidden id="referenceImgUrl" path="referenceImgUrl" htmlEscape="false" maxlength="255" class="input-xlarge "/>
  1047. <sys:ckfinder input="referenceImgUrl" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
  1048. <label class="bk-upload-tip">请上传引用的图片资源,需同时上传资料的封面、以及含有对应具体内容的图片;注意:图片需要保证完整、不可遮挡且清晰</label>
  1049. </div>
  1050. </div>
  1051. </div>
  1052. </div>
  1053. </div>
  1054. </div>
  1055. </div>
  1056. <div class="form-actions">
  1057. <button class="confirm btn btn-primary" id="confimRefrence">确 定</button>
  1058. <button class="cancel btn btn-primary">取 消</button>
  1059. </div>
  1060. </div>
  1061. <%-- <div id="dialogmask" class="dialogmask opacity"></div>--%>
  1062. <div id="dialog" class="box" style="display: none"> 
  1063. <div id="dialog_content" class="dialogcontent">
  1064. <%-- <div id="logcontent" class="logcontent"><a herf="https://www.baidu.com">三生三世</a></div>--%>
  1065. <%-- <a herf="https://www.baidu.com">十里桃花</a>--%>
  1066. <div><h4>创建词条引导</h4></div>
  1067. <br>
  1068. <div>欢迎进入创建词条引导,为便于您更好的通过审核,请务必确保您已知晓百科词条的<a href="${ctx}/baike/cmBaikeProduct/entry" target="_blank">编辑须知</a>,如有疑问,您可以<a>点此</a>求助采美工作人员。</div>
  1069. <br>
  1070. <div><h5>声明</h5></div>
  1071. <br>
  1072. <div>在正式创建词条前,首先请你承诺:</div>
  1073. <div>1.不在百科添加广告性质的内容, 如联系方式,官方网站链接等;</div>
  1074. <div>2.不在百科编写涉及反动,违法犯罪,色情,暴力的内容;</div>
  1075. <div>3.不在百科编写虚假的、捏造的、恶搞的、缺乏根据的内容;</div>
  1076. <div>4.不侵犯他人合理权益;</div>
  1077. <div>5.接受违反以上规则时,百科账号会被封禁的结果。</div>
  1078. <br>
  1079. <div><h5>词条名</h5></div>
  1080. <br>
  1081. <div>成功创建词条的首要条件是了解一些基础知识!</div>
  1082. <br>
  1083. <div><h5>■什么是词条?</h5></div>
  1084. <br>
  1085. <div>词条指的是对于单一事物内容的介绍,例如技术,成分等。每个词条都有属于自己的名称,你可以通过搜索词条的名称来找到它们。</div>
  1086. <div>已有词条重名?创建多义词!</div>
  1087. <div>与已有词条意义相同?反馈同义词!</div>
  1088. <br>
  1089. <div><h5>■什么是规范的词条名?</h5></div> <br>
  1090. <div>采美百科规范的词条名是一个专有名词,请使用正式的全称或最广为人知的常见名。</div>
  1091. <div>例如:皮秒激光美容、光子嫩肤、线粒体、葡聚糖等</div>
  1092. <br>
  1093. <div><h5>主题</h5></div> <br>
  1094. <div>恭喜你已经完成了创建词条的第一步!现在想一想你要创建的词条属于什么类型?</div>
  1095. <div>选择正确的类型,精确定位你的创建难点所在!</div>
  1096. <br>
  1097. <div><h5>产品成分类词条</h5></div> <br>
  1098. <div>如玻尿酸钠、葡聚糖、虎杖等</div>
  1099. <br>
  1100. <div><h5>产品技术词条</h5></div> <br>
  1101. <div>如射频、皮秒、808半导体激光技术、透热疗法、448KHz、LDM水滴提升等</div>
  1102. <br>
  1103. <div><h5>词条创建要求</h5></div> <br>
  1104. <div><h6>1.描述客观</h6></div>
  1105. <div>描述事物时以事实为依
  1106. 据不加入感情色彩,不掺杂个人的好恶。百科词条
  1107. 是客观内容的集合,只站在第三方立场,以事实说话。例如,
  1108. 某篮球运动员某一场的投篮命中率较差,一般的表述是命中率低,
  1109. 甚至使用“打铁”之类的贬义词。而这样的表述模糊不清,多少算低,多
  1110. 少算高各有标准;同时也会造成支持者和反对者的口水战。所以直接把赛事数据
  1111. 列出,是高是低各自评说即可。另外在筛选内容时,也要保证公正客观,尤其对于争
  1112. 议性内容,保留多方观点并附以可靠的参考资料,是处理争议内容较为可取的做法。</div>
  1113. <br>
  1114. <div><h6>2.修饰适当</h6></div> <br>
  1115. <div>百科词条提倡用语“客观”,在一般性的叙述中(区别于引用原文的引述)尽量少的使用形容词和程度副词(最XXXX、十分XXX……)。</div>
  1116. <br>
  1117. <div><h6>3.参考资料要有效</h6></div> <br>
  1118. <div>参考资料是正文内容客观的另一种表现形式。词条某条内容,光靠“说”自己客观是不够的,应以可信有效的参考资料作为佐证来源,才能证明该内容是否已获得公众知晓或认可。
  1119. 特色词条应该保证一半以上的信息点都是有可靠来源的(由科学百科权威认证的特色词条,应确保词条正文中(含概述)每个目录模块中都有至少一条权威参考资料)。
  1120. 这里的有来源不是要求一字一句的复制粘贴,而是“内容虽经必要提炼、整理,但却不失原意”。例如前述的两个姜文词条中的文段,整理后的内容要素和观点依然来自参考资料,并没有增减其原意。
  1121. </div>
  1122. <br>
  1123. <div>可靠的来源一般包括文献、书籍等出版物、主流媒体发布的消息、政府或公众机构官网发布的内容等。关于可靠的来源的具体定义,请参阅百度百科:参考资料。</div>
  1124. <br>
  1125. <div>如,“<a>牛顿第一运动定律</a>”词条中,定律内容、发现者、适用范围等都是必不可少的重要内容,这些部分的缺失会导致读者对词条内容的错误认识。</div>
  1126. <div align="center"><input class="btn btn-primary" type="button" onclick="dialog()" value="我已阅读并知晓"></div>  
  1127. </div>
  1128. </div>
  1129. <form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save?auditFlag=1" enctype="application/json" method="post" class="form-horizontal">
  1130. <form:hidden path="id"/>
  1131. <form:hidden path="fileIds"/>
  1132. <form:hidden path="commodityType"/>
  1133. <form:hidden path="emptyNum"/>
  1134. <form:hidden path="referenceList"/>
  1135. <sys:message content="${message}"/>
  1136. <%--词条名称--%>
  1137. <div class="control-group">
  1138. <label class="control-label">词条名称:</label>
  1139. <div class="controls">
  1140. <form:input path="name" htmlEscape="false" class="input-xlarge "/>
  1141. <label id="nameSensitiveWords" class="red"></label>
  1142. </div>
  1143. </div>
  1144. <%--义项名--%>
  1145. <div class="control-group">
  1146. <label class="control-label">义项名:</label>
  1147. <div class="controls not-overflow">
  1148. <div class="content-edit" id="bk-name" name="alias"></div>
  1149. </div>
  1150. </div>
  1151. <%--词条概述--%>
  1152. <div class="control-group">
  1153. <label class="control-label">词条概述:</label>
  1154. <div class="controls not-overflow">
  1155. <div class="content-edit" id="discription" name="discription"></div>
  1156. <label id="discriptionSensitiveWords" class="red"></label>
  1157. </div>
  1158. </div>
  1159. <%--banner--%>
  1160. <div class="control-group" style="width: 1000px">
  1161. <label class="control-label">banner:</label>
  1162. <div class="main-image-list" style="display: flex;flex-wrap: wrap">
  1163. <div class="controls upload-content iconBox mainIgeBox" >
  1164. <div class="conList">
  1165. <form:hidden id="banner" path="banner" htmlEscape="false" maxlength="255"
  1166. class="input-xlarge "/>
  1167. <sys:ckfinder input="banner" type="images" uploadPath="/photo" selectMultiple="false"
  1168. maxWidth="100"
  1169. maxHeight="100"/>
  1170. </div>
  1171. </div>
  1172. </div>
  1173. <br>
  1174. <label style="margin-left: 150px">建议尺寸: 1920 * 400 / PX</label>
  1175. </div>
  1176. <%--概述图册--%>
  1177. <div class="control-group" style="width: 1000px">
  1178. <label class="control-label keyClass">概述图册:</label>
  1179. <div class="display-image-list" style="display: flex;flex-wrap: nowrap; margin-top: -36px">
  1180. <c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">
  1181. <div class="controls upload-content iconBox" id="displayImageBox${index.index}" style="width: 170px">
  1182. <div class="conList">
  1183. <form:hidden id="displayImage${index.index}" path="displayImageList[${index.index}]" htmlEscape="false"
  1184. maxlength="255"
  1185. class="input-xlarge "/>
  1186. <sys:ckfinder input="displayImage${index.index}" type="images" uploadPath="/photo"
  1187. selectMultiple="false"
  1188. maxWidth="100" maxHeight="100"/><br>
  1189. </div>
  1190. </div>
  1191. </c:forEach>
  1192. <c:set var="size" value="${empty cmBaikeProduct.displayImageList?0:cmBaikeProduct.displayImageList.size()}"/>
  1193. <c:forEach var="emptyIndex" begin="${size}" end="${5}">
  1194. <div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="displayImageBox${emptyIndex}" style="width: 170px">
  1195. <div class="conList">
  1196. <form:hidden id="displayImage${emptyIndex}" path="displayImageList[${emptyIndex}]" htmlEscape="false"
  1197. maxlength="255"
  1198. class="input-xlarge "/>
  1199. <sys:ckfinder input="displayImage${emptyIndex}" type="images" uploadPath="/photo"
  1200. selectMultiple="false"
  1201. maxWidth="100" maxHeight="100"/><br>
  1202. </div>
  1203. </div>
  1204. </c:forEach>
  1205. </div>
  1206. <div class="control-label">
  1207. <label class="control-label keyClass" style="margin-left: 90px">概述视频(各视频大小不超过50M,最多上传6个)</label>
  1208. </div>
  1209. <div class="control-group video">
  1210. <label class="control-label">标题:</label>
  1211. <div class="controls">
  1212. <input id="fileTitle" htmlEscape="false" type="text">
  1213. </div>
  1214. <label class="control-label" style="margin-top:10px">视频路径:</label>
  1215. <div class="controls" style="margin-top:10px;width: 600px;">
  1216. <input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />
  1217. <div class="upload">
  1218. <input type="file" name="file" id="productFile" accept=".mp4" >选择文件
  1219. </div>
  1220. <div class="add-submit">
  1221. <input id="addSubmit" type="button" value="上传"/>上传&nbsp;
  1222. </div>
  1223. <div class="upload-loading">
  1224. <img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
  1225. </div>
  1226. </div>
  1227. <div id='file-list-display' style="margin-left:180px">
  1228. <c:if test="${not empty cmBaikeProduct.videoList}">
  1229. <c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">
  1230. <p>${videoFile.fileTitle}
  1231. <span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>
  1232. <span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>
  1233. </p>
  1234. </c:forEach>
  1235. </c:if>
  1236. </div>
  1237. </div>
  1238. </div>
  1239. <%-- <div class="control-group">--%>
  1240. <%-- <div class="control-group">--%>
  1241. <%-- <label class="control-label keyClass">概述视频(各视频大小不超过50M,最多上传6个)</label>--%>
  1242. <%-- </div>--%>
  1243. <%-- <div class="control-group">--%>
  1244. <%-- <label class="control-label">标题:</label>--%>
  1245. <%-- <div class="controls">--%>
  1246. <%-- <input id="fileTitle" htmlEscape="false" type="text">--%>
  1247. <%-- </div>--%>
  1248. <%-- <label class="control-label" style="margin-top:10px">视频路径:</label>--%>
  1249. <%-- <div class="controls" style="margin-top:10px;width: 600px;">--%>
  1250. <%-- <input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />--%>
  1251. <%-- <div class="upload">--%>
  1252. <%-- <input type="file" name="file" id="productFile" accept=".mp4" >选择文件--%>
  1253. <%-- </div>--%>
  1254. <%-- <div class="add-submit">--%>
  1255. <%-- <input id="addSubmit" type="button" value="上传"/>上传&nbsp;--%>
  1256. <%-- </div>--%>
  1257. <%-- <div class="upload-loading">--%>
  1258. <%-- <img alt="gif" src="/static/images/upload.gif" width="32px" border="none">--%>
  1259. <%-- </div>--%>
  1260. <%-- </div>--%>
  1261. <%-- </div>--%>
  1262. <%-- <div class="control-group">--%>
  1263. <%-- <div id='file-list-display' style="margin-left:180px">--%>
  1264. <%-- <c:if test="${not empty cmBaikeProduct.videoList}">--%>
  1265. <%-- <c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">--%>
  1266. <%-- <p>${videoFile.fileTitle}--%>
  1267. <%-- <span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>--%>
  1268. <%-- <span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>--%>
  1269. <%-- </p>--%>
  1270. <%-- </c:forEach>--%>
  1271. <%-- </c:if>--%>
  1272. <%-- </div>--%>
  1273. <%-- </div>--%>
  1274. <%-- </div>--%>
  1275. <%--信息栏--%>
  1276. <div class="control-group paramList" id="paramList">
  1277. <label class="control-label titleClass" style="margin-left: 90px">信息栏:(注:未填写的信息将不会显示在词条页上)</label>
  1278. <div class="controls add-button"><button class="btn btn-primary" type="button" style="margin-left: 20px">增加信息项</button></div>
  1279. <div class="controls param-controls not-overflow"></div>
  1280. </div>
  1281. <%--正文--%>
  1282. <div class="control-group" id="textInfolist">
  1283. <label class="control-label titleClass">正文:</label>
  1284. <div class="controls not-overflow">
  1285. <%-- <div class="bk-textInfo-item">
  1286. <div class="content-edit" id="textInfo-0" name="textInfolist[0].content"></div>
  1287. <div class="bk-textInfo-control"><span>一级目录</span><span>二级目录</span><span>内容</span></div>
  1288. </div>
  1289. --%>
  1290. </div>
  1291. </div>
  1292. <%--参考资料--%>
  1293. <div class="control-group" id="mata">
  1294. <label class="control-label titleClass">参考资料</label>
  1295. <div class="bk-reference-list">
  1296. <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">
  1297. <c:if test="${videoFile.referenceType eq '1'}">
  1298. <div class="controls applicationsan" style="margin-top: 5px">
  1299. <span class="del">[${statusIndex.index+1}]</span>
  1300. <span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}</a></span>
  1301. <span class="del">${videoFile.websiteName}.</span>
  1302. <span class="del">${videoFile.publishTime}.</span>
  1303. <span class="del">${videoFile.acitationTime}.</span>
  1304. <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>
  1305. <a onclick="delMaterial(${videoFile.id})">删除</a>
  1306. </div>
  1307. </c:if>
  1308. <c:if test="${videoFile.referenceType eq '2'}">
  1309. <div class="controls applicationsan" style="margin-top: 5px">
  1310. <span class="del">[${statusIndex.index+1}]</span>
  1311. <span class="del">${videoFile.author}.</span>
  1312. <span class="del">${videoFile.workName}.</span>
  1313. <span class="del">${videoFile.publicationPlace}.</span>
  1314. <span class="del">${videoFile.press}.</span>
  1315. <span class="del">${videoFile.publicationYear}.</span>
  1316. <span class="del">${videoFile.acitationWeb}.</span>
  1317. <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>
  1318. <a onclick="delMaterial(${videoFile.id})">删除</a>
  1319. </div>
  1320. </c:if>
  1321. <c:if test="${videoFile.referenceType eq '3'}">
  1322. <div class="controls applicationsan" style="margin-top: 5px">
  1323. <span class="del">[${statusIndex.index+1}]</span>
  1324. <span class="del">${videoFile.referenceDescription}.</span>
  1325. <span class="del">${videoFile.imageDescription}.</span>
  1326. <%--
  1327. <div class="conList">
  1328. <img id="imgaa" src="${videoFile.imageUrl}" height="50px" width="50px" ></input>
  1329. </div>
  1330. --%>
  1331. <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>
  1332. <a onclick="delMaterial(${videoFile.id})">删除</a>
  1333. </div>
  1334. </c:if>
  1335. </c:forEach>
  1336. </div>
  1337. </div>
  1338. <%--头图--%>
  1339. <div class="control-group" style="margin-top: 100px">
  1340. <label class="control-label">头图:</label>
  1341. <div class="main-image-list" style="display: flex;flex-wrap: wrap">
  1342. <div class="controls upload-content iconBox mainIgeBox" id="mainIgeBox">
  1343. <div class="conList">
  1344. <form:hidden id="image" path="image" htmlEscape="false" maxlength="255" class="input-xlarge "/>
  1345. <sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
  1346. maxHeight="100"/>
  1347. <br>
  1348. <label style="margin-left: 150px">建议图片尺寸210px*210px,并上传白底图片</label>
  1349. </div>
  1350. </div>
  1351. </div>
  1352. </div>
  1353. <%--分类--%>
  1354. <div class="control-group">
  1355. <label class="control-label keyClass">分类:</label>
  1356. <div class="controls">
  1357. <form:select path="typeId" class="input-xlarge ">
  1358. <form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
  1359. </form:select>
  1360. </div>
  1361. </div>
  1362. <%--SEO关键词--%>
  1363. <div class="control-group">
  1364. <label class="control-label">SEO关键词:</label>
  1365. <div class="auto-input">
  1366. <form:input cssStyle="margin-left: 20px" path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge"/>
  1367. </div>
  1368. </div>
  1369. <div class="control-group">
  1370. <label class="control-label keyClass">添加时间:</label>
  1371. <div class="controls">
  1372. <%--<input name="addTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
  1373. value="<fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>--%>
  1374. <fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
  1375. </div>
  1376. </div>
  1377. <%--基础浏览量--%>
  1378. <div class="control-group">
  1379. <label class="control-label keyClass">浏览量:</label>
  1380. <div class="controls">
  1381. <form:input path="actualPv" htmlEscape="false" onkeyup="onlynum(this)" class="input-xlarge digits " readonly="true"/>
  1382. </div>
  1383. </div>
  1384. <div class="control-group">
  1385. <label class="control-label keyClass">供应商:</label>
  1386. <div class="controls">
  1387. ${cmBaikeProduct.shopName}
  1388. </div>
  1389. </div>
  1390. <div class="control-group">
  1391. <label class="control-label keyClass">供应商状态:</label>
  1392. <div class="controls">
  1393. <font color="${cmBaikeProduct.status eq 1?'#2FA4E7':'red'}"> ${cmBaikeProduct.status eq 1?'已发布':'暂不发布'}</font>
  1394. </div>
  1395. </div>
  1396. <div class="control-group">
  1397. <label class="control-label keyClass">审核:</label>
  1398. <div class="controls">
  1399. <input type="radio" name="auditStatus" value="2" onclick="updateAuditStatus(2)" ${empty cmBaikeProduct.auditStatus?'checked=checked':cmBaikeProduct.auditStatus eq 1?'checked=checked':''}> 审核通过
  1400. <input type="radio" name="auditStatus" value="3" onclick="updateAuditStatus(3)" ${cmBaikeProduct.auditStatus eq 3?'checked=checked':''}> 审核失败
  1401. </div>
  1402. </div>
  1403. <div class="control-group" id="failReasonDiv" style="${empty cmBaikeProduct.auditStatus or cmBaikeProduct.auditStatus eq 1?'display: none':''}">
  1404. <label class="control-label"><font color="red">*</font>失败原因</label>
  1405. <div class="controls">
  1406. <textarea type="text" id="failReason" name="failReason" required style="width: 400px;height: 90px">${cmBaikeProduct.failReason}</textarea>
  1407. </div>
  1408. </div>
  1409. <div class="form-actions">
  1410. <%-- onclick="checkInfo()"--%>
  1411. <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
  1412. <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
  1413. </div>
  1414. </form:form>
  1415. <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
  1416. <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
  1417. <script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
  1418. <script type="text/javascript" src="${ctxStatic}/auto-input.js"></script>
  1419. <script type="text/javascript" src="${ctxStatic}/content-edit.js"></script>
  1420. <script>
  1421. // 内容编辑器列表
  1422. var contentEditMap = new Map()
  1423. // 当前选中的编辑器
  1424. var currentContentEdit = null
  1425. // 当前选中的编辑器元素
  1426. var currentContentEditEl = null
  1427. // 添加资料数据
  1428. var referenceData = {}
  1429. // 资料编辑类型
  1430. var referenceEditTyp = 'add'
  1431. // 引用资料列表
  1432. var referenceList = []
  1433. // 资料标记数量
  1434. var markCount = referenceList.length || 1
  1435. // 正文列表
  1436. var textInfoList = [{}]
  1437. var textInfoItemIndex = 0
  1438. // 信息栏列表
  1439. var paramList = [{}]
  1440. var paramItemIndex = 0
  1441. // 创建内容编辑器
  1442. function createContentEdit(el, value) {
  1443. const contentEdit = new ContentEditInput({
  1444. el: el,
  1445. initValue: value,
  1446. toolbarClick(edit) {
  1447. // 添加
  1448. referenceEditTyp = 'add'
  1449. currentContentEdit = edit
  1450. console.log(currentContentEdit)
  1451. createReferenceList()
  1452. $('#dialogmask').fadeIn()
  1453. $('#dig').fadeIn()
  1454. },
  1455. referenceEdit(ctrid) {
  1456. // 编辑
  1457. referenceEditTyp = 'edit'
  1458. referenceData = referenceList.find(function(item){
  1459. return item.ctrlId == ctrid
  1460. })
  1461. if(!referenceData) return
  1462. initRefrenceFormData(referenceData)
  1463. $('#dialogmask').fadeIn()
  1464. $('#dig').fadeIn()
  1465. },
  1466. })
  1467. contentEditMap.set(el, contentEdit)
  1468. }
  1469. // 从表单获取资料数据
  1470. function setRefrenceData(data){
  1471. const referenceData = {}
  1472. referenceData.id = data.id || '' // 资料id
  1473. referenceData.ctrlId = data.ctrlId || '' // 关联id
  1474. /* (网络资料) */
  1475. referenceData.referenceType= $("#info").val() // '参考类型资料(1.网络;2.著作;3.其他)'
  1476. referenceData.website = $("#website").val()
  1477. referenceData.articleName = $("#articleName").val()
  1478. referenceData.websiteName = $("#websiteName").val()
  1479. referenceData.publishTimeStr = $("#publishTimeStr").val()
  1480. referenceData.acitationTimeStr = $("#acitationTimeStr").val()
  1481. /* 著作资料)*/
  1482. referenceData.author= $("#author").val()
  1483. referenceData.workName= $("#workName").val()
  1484. referenceData.publicationPlace= $("#publicationPlace").val()
  1485. referenceData.press= $("#press").val()
  1486. referenceData.publicationYearStr= $("#publicationYearStr").val()
  1487. referenceData.acitationWeb= $("#acitationWeb").val()
  1488. /* (其他资料) */
  1489. referenceData.referenceDescription= $("#referenceDescription").val()
  1490. referenceData.imageDescription= $("#imageDescription").val()
  1491. referenceData.imageUrl = $("#referenceImgUrl").val()
  1492. referenceData.entryId = data.entryId || '' // 词条id
  1493. referenceData.entryType = data.entryType || ''
  1494. return referenceData
  1495. }
  1496. // 设置资料表单数据
  1497. function initRefrenceFormData(data){
  1498. $("#info").val(data.referenceType)
  1499. $("#website").val(data.website)
  1500. $("#articleName").val(data.articleName)
  1501. $("#websiteName").val(data.websiteName)
  1502. $("#publishTimeStr").val(data.publishTimeStr)
  1503. $("#acitationTimeStr").val(data.acitationTimeStr)
  1504. $("#author").val(data.author)
  1505. $("#workName").val(data.workName)
  1506. $("#publicationPlace").val(data.publicationPlace)
  1507. $("#press").val(data.press)
  1508. $("#publicationYearStr").val(data.publicationYearStr)
  1509. $("#acitationWeb").val(data.acitationWeb)
  1510. $("#referenceDescription").val(data.referenceDescription)
  1511. $("#imageDescription").val(data.imageDescription)
  1512. $("#referenceImgUrl").val(data.imageUrl)
  1513. }
  1514. // 创建信息栏item
  1515. function createParamItem(index){
  1516. var paramItem = $('<div class="param-item"></div>')
  1517. var paramName = $('<div class="param-name"></div>')
  1518. var paramNameInput = $('<input type="text" placeholder="例如:型号">')
  1519. paramNameInput.attr('name', 'paramList['+ index +'].name')
  1520. paramNameInput.attr('class','xxl-name')
  1521. paramNameInput.attr('id','paramName-'+index)
  1522. var paramContent = $('<div class="param-content"></div>')
  1523. var paramContentInput = $('<div class="content-edit"></div>')
  1524. paramContentInput.attr('id', 'param-' + index)
  1525. paramContentInput.attr('name', 'paramList['+index+'].content')
  1526. var deleteBtn = $('<a style="cursor: pointer">删除</a>')
  1527. paramName.append(paramNameInput)
  1528. paramContent.append(paramContentInput)
  1529. paramItem.append([paramName,paramContent,deleteBtn ])
  1530. deleteBtn.on('click', function(){
  1531. $(this).parents('.param-item').remove()
  1532. })
  1533. return paramItem
  1534. }
  1535. // 初始化信息栏
  1536. function initParamList(){
  1537. var te='${cmBaikeProduct.paramList}';
  1538. if(''==te ||null==te ||te=='[]') {
  1539. var paramList=[{},{},{}]
  1540. paramList.forEach(function(item, index){
  1541. paramItemIndex = index
  1542. var paramItem = createParamItem(index)
  1543. $('#paramList .param-controls').append(paramItem)
  1544. createContentEdit('#param-' + index)
  1545. })
  1546. }else{
  1547. <c:forEach items="${cmBaikeProduct.paramList}" var="videoFile" varStatus="statusIndex">
  1548. var index=${statusIndex.index}
  1549. paramItemIndex = index
  1550. var paramItem = createParamItem(index)
  1551. $('#paramList .param-controls').append(paramItem)
  1552. createContentEdit('#param-' + index,'${videoFile.content}')
  1553. console.log('${videoFile.name}')
  1554. $('#paramName-'+index).val('${videoFile.name}')
  1555. </c:forEach>
  1556. }
  1557. // paramList.forEach(function(item, index){
  1558. // paramItemIndex = index
  1559. // var paramItem = createParamItem(index)
  1560. // $('#paramList .param-controls').append(paramItem)
  1561. // createContentEdit('#param-' + index)
  1562. // })
  1563. }
  1564. // 创建正文item
  1565. function createTextInfoItem(index, type){
  1566. var inputId = 'textInfo-' + index
  1567. var textInfoItem = $('<div class="bk-textInfo-item"><div>')
  1568. var input = null
  1569. var inputType=null
  1570. if(type == 3){
  1571. input = $('<div class="content-edit"></div>')
  1572. input.attr('id', inputId)
  1573. input.attr('name', 'textInfolist[' + index + '].dictionaryContent')
  1574. inputType=$('<input type="text" />')
  1575. inputType.attr('name','textInfolist[' + index + '].dictionaryType')
  1576. inputType.attr('value',type)
  1577. inputType.attr('style','display: none')
  1578. }else{
  1579. input = $('<input type="text" />')
  1580. input.attr('id', inputId)
  1581. input.attr('name', 'textInfolist[' + index + '].dictionaryContent')
  1582. var placeholder = type == 1 ? '一级标题' : '二级标题'
  1583. input.attr('placeholder', placeholder)
  1584. inputType=$('<input type="text" />')
  1585. inputType.attr('name','textInfolist[' + index + '].dictionaryType')
  1586. inputType.attr('value',type)
  1587. inputType.attr('style','display: none')
  1588. }
  1589. var control = $('<div class="bk-textInfo-control"></div>')
  1590. var first = $('<span>+一级标题</span>')
  1591. var second = $('<span>+二级标题</span>')
  1592. var content = $('<span>+内容</span>')
  1593. var deleteBtn = $('<span>删除</span>')
  1594. control.append([first, second, content, deleteBtn])
  1595. textInfoItem.append([input,inputType,control])
  1596. first.on('click', function(){
  1597. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 1))
  1598. })
  1599. second.on('click', function(){
  1600. var index = $(this).parents('.controls').find('.bk-textInfo-item').length +1
  1601. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 2))
  1602. })
  1603. content.on('click', function(){
  1604. var index = $(this).parents('.controls').find('.bk-textInfo-item').length +1
  1605. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 3))
  1606. var inputId = 'textInfo-' + textInfoItemIndex
  1607. createContentEdit('#' + inputId)
  1608. })
  1609. deleteBtn.on('click', function(){
  1610. $(this).parents('.bk-textInfo-item').remove()
  1611. })
  1612. return textInfoItem
  1613. }
  1614. // 初始化正文内容
  1615. function initTextInfoList(){
  1616. var te='${cmBaikeProduct.textInfolist}'
  1617. if(''==te ||null==te ||te=='[]'){
  1618. var textInfoList = [{type:1},{type:2},{type:3}]
  1619. textInfoList.forEach(function(item,index){
  1620. textInfoItemIndex = index
  1621. var inputId = 'textInfo-' + index
  1622. const textInfoIem = createTextInfoItem(index, item.type)
  1623. $('#textInfolist .controls').append(textInfoIem)
  1624. if(item.type == 3){
  1625. createContentEdit('#' + inputId)
  1626. }
  1627. })
  1628. }else{
  1629. <c:forEach items="${cmBaikeProduct.textInfolist}" var="videoFile" varStatus="statusIndex">
  1630. var index=${statusIndex.index}
  1631. textInfoItemIndex = index
  1632. var inputId = 'textInfo-' + index
  1633. var textInfoIem = createTextInfoItem(index, ${videoFile.dictionaryType})
  1634. $('#textInfolist .controls').append(textInfoIem)
  1635. console.log('${videoFile.dictionaryContent}')
  1636. if('${videoFile.dictionaryType}'=='3'){
  1637. createContentEdit('#' + inputId,'${videoFile.dictionaryContent}')
  1638. }else{
  1639. $('#textInfo-' + index).val('${videoFile.dictionaryContent}')
  1640. }
  1641. </c:forEach>
  1642. }
  1643. // $('#textInfolist .controls')
  1644. }
  1645. function createReferenceItem(referenceData){
  1646. var text=null
  1647. if(referenceData.publishTimeStr=='undefined'){
  1648. referenceData.publishTimeStr='111'
  1649. }
  1650. if(referenceData.referenceType == 1){
  1651. text = `
  1652. <div class="controls applicationsan">
  1653. <span class="del">
  1654. <a>\${referenceData.articleName}.</a>
  1655. </span>
  1656. <span class="del">\${referenceData.websiteName}.</span>
  1657. <span class="del">\${referenceData.publishTimeStr}.</span>
  1658. <span class="del">\${referenceData.acitationTimeStr}.</span>
  1659. </div>
  1660. `
  1661. }
  1662. if(referenceData.referenceType == 2){
  1663. text= `
  1664. <div class="controls applicationsan">
  1665. <span class="del">\${referenceData.author}.</span>
  1666. <span class="del">\${referenceData.workName}.</span>
  1667. <span class="del">\${referenceData.publicationPlace}.</span>
  1668. <span class="del">\${referenceData.press}.</span>
  1669. <span class="del">\${referenceData.publicationYearStr}.</span>
  1670. <span class="del">\${referenceData.acitationWeb}</span>
  1671. </div>
  1672. `
  1673. }
  1674. if(referenceData.referenceType == 3){
  1675. text= `
  1676. <div class="controls applicationsan">
  1677. <span class="del">\${referenceData.referenceDescription}.</span>
  1678. <span class="del">\${referenceData.imageDescription}.</span>
  1679. </div>
  1680. `
  1681. }
  1682. return text
  1683. }
  1684. function createAllReferenceItem(referenceData){
  1685. var text=null
  1686. if(referenceData.referenceType == 1){
  1687. text = `
  1688. <div class="controls applicationsan">
  1689. <span class="del">[\${referenceList.length}]</span>
  1690. <span class="del"><a>\${referenceData.articleName}.</a></span>
  1691. <span class="del">\${referenceData.websiteName}.</span>
  1692. <span class="del">\${referenceData.publishTimeStr}.</span>
  1693. <span class="del">\${referenceData.acitationTimeStr}.</span>
  1694. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1695. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1696. </div>
  1697. `
  1698. }
  1699. if(referenceData.referenceType == 2){
  1700. text= `
  1701. <div class="controls applicationsan">
  1702. <span class="del">[\${referenceList.length}]</span>
  1703. <span class="del">\${referenceData.author}.</span>
  1704. <span class="del">\${referenceData.workName}.</span>
  1705. <span class="del">\${referenceData.publicationPlace}.</span>
  1706. <span class="del">\${referenceData.press}.</span>
  1707. <span class="del">\${referenceData.publicationYearStr}.</span>
  1708. <span class="del">\${referenceData.acitationWeb}.</span>
  1709. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1710. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1711. </div>
  1712. `
  1713. }
  1714. if(referenceData.referenceType == 3){
  1715. text= `
  1716. <div class="controls applicationsan">
  1717. <span class="del">[\${referenceList.length}]</span>
  1718. <span class="del">\${referenceData.referenceDescription}.</span>
  1719. <span class="del">\${referenceData.imageDescription}.</span>
  1720. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1721. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1722. </div>
  1723. `
  1724. }
  1725. return text
  1726. }
  1727. // 只要referenceList数据有更新就执行一次
  1728. function createReferenceList(){
  1729. $('.check-reference-list').html('')
  1730. referenceList.forEach(function(refData, index){
  1731. console.log(refData)
  1732. var item = createReferenceItem(refData)
  1733. $('.check-reference-list').append(item)
  1734. })
  1735. $('.check-reference-list').find('.controls').on('click', function(){
  1736. var index = $(this).index() + 1
  1737. var result = referenceList[$(this).index()]
  1738. console.log(result)
  1739. if(!result) return
  1740. var con= createReferenceItem(result)
  1741. result.ctrlId = currentContentEdit.confirm(con, result.ctrlId, index)
  1742. $('#dialogmask').fadeOut()
  1743. $('#dig').fadeOut()
  1744. })
  1745. }
  1746. $(function(){
  1747. var refren='${cmBaikeProduct.referenceList}'
  1748. if(''==refren|| null==refren){
  1749. }else{
  1750. referenceList=JSON.parse(refren)
  1751. markCount=referenceList.length
  1752. console.log(markCount)
  1753. }
  1754. //初始化 义项名,词条概述
  1755. createContentEdit('#bk-name','${cmBaikeProduct.alias}')
  1756. createContentEdit('#discription','${cmBaikeProduct.discription}')
  1757. initParamList()
  1758. initTextInfoList()
  1759. $('#paramList .btn').on('click', function(){
  1760. var paramItem = createParamItem(++paramItemIndex)
  1761. $('#paramList .param-controls').append(paramItem)
  1762. createContentEdit('#param-' + paramItemIndex)
  1763. })
  1764. $('#dig .confirm').on('click', function(){
  1765. if(referenceEditTyp === 'add'){
  1766. markCount++
  1767. var result = setRefrenceData({})
  1768. var con=createReferenceItem(result)
  1769. result.ctrlId = currentContentEdit.confirm(con)
  1770. referenceList.push(result)
  1771. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1772. $(this).parents('#dig').fadeOut()
  1773. initRefrenceFormData({})
  1774. var item = createAllReferenceItem(result)
  1775. $('.bk-reference-list').append(item)
  1776. }else{
  1777. var result = setRefrenceData(referenceData)
  1778. const index = referenceList.findIndex(function(item){
  1779. return item.ctrlId == referenceData.ctrlId
  1780. })
  1781. referenceList.splice(index, 1, result)
  1782. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1783. $(this).parents('#dig').fadeOut()
  1784. initRefrenceFormData({})
  1785. }
  1786. var referen=JSON.stringify(referenceList)
  1787. $('#referenceList').val(referen);
  1788. })
  1789. $('#dig .cancel').on('click', function(){
  1790. $(this).parents('#dig').fadeOut()
  1791. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1792. initRefrenceFormData({})
  1793. })
  1794. <%-- referenceList = [{ctrlId: 'FDIEKABKKNJEEJAN'}] // referenceList[0].reyt = 1 // referenceList:'[{"type": 1}]'--%>
  1795. <%--console.log('${cmBaikeProduct.materialInfo}')--%>
  1796. // 初始化编辑框引用资料列表
  1797. contentEditMap.forEach(function(item){
  1798. item.edit.ctridList.forEach(function(ctrlId){
  1799. var data = referenceList.find(function(ref){
  1800. return ref.ctrlId == ctrlId
  1801. })
  1802. if(!data) return
  1803. <%-- <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">--%>
  1804. <%-- </c:forEach>--%>
  1805. var text = createReferenceItem(data)
  1806. item.addLiteratureItem(ctrlId, text)
  1807. })
  1808. })
  1809. })
  1810. </script>
  1811. <script>
  1812. var paramIndex = 1;
  1813. var questionIndex = 2;
  1814. //给涉及到参考资料的标签赋值
  1815. $(function () {
  1816. $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
  1817. $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
  1818. var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
  1819. var MutationObserverConfig = {
  1820. childList: true,
  1821. subtree: true,
  1822. characterData: true
  1823. };
  1824. var observer = new MutationObserver(function (mutations) {
  1825. $.each(mutations, function (index, item) {
  1826. if (item.type === 'childList') {
  1827. // 在创建新的 element 时调用
  1828. var target = $(item.target),
  1829. thisWrapper = target.closest('.conList'),
  1830. nextEle = thisWrapper.parents('.controls').next();
  1831. thisWrapper.find('li').css('z-index', 99);
  1832. thisWrapper.find('.cancel-upload').show();
  1833. if (nextEle.hasClass('hide-pic')) {
  1834. nextEle.removeClass('hide-pic');
  1835. }
  1836. }
  1837. })
  1838. });
  1839. var observeEle1 = document.getElementsByClassName('main-image-list')[0];
  1840. var observeEle2 = document.getElementsByClassName('auth-qrCode-list')[0];
  1841. // var observeEle3 = document.getElementsByClassName('auth-image-list')[0];
  1842. var observeEle4 = document.getElementsByClassName('display-image-list')[0];
  1843. observer.observe(observeEle1, MutationObserverConfig);
  1844. observer.observe(observeEle2, MutationObserverConfig);
  1845. // observer.observe(observeEle3, MutationObserverConfig);
  1846. observer.observe(observeEle4, MutationObserverConfig);
  1847. $('body').on('click', '.cancel-upload',function() {
  1848. var wrapper = $(this).closest('.controls');
  1849. var controlsId = wrapper.attr('id');
  1850. wrapper.find('li').css('z-index','-1');
  1851. wrapper.find('input').val('');
  1852. $(this).hide();
  1853. if (controlsId == 'mainImageBox' || controlsId == 'authQrCodeBox' || controlsId=='mainIgeBox') {
  1854. wrapper.removeClass("hide-pic");
  1855. }
  1856. // else if (controlsId.indexOf('authImageBox') != -1) {
  1857. // if ($('.auth-image-list .cancel-upload:visible').length < 8) {
  1858. // wrapper.addClass("hide-pic");
  1859. // }else{
  1860. // wrapper.removeClass("hide-pic");
  1861. // }
  1862. // }
  1863. else if (controlsId.indexOf('displayImageBox') != -1) {
  1864. if ($('.display-image-list .cancel-upload:visible').length < 6) {
  1865. wrapper.addClass("hide-pic");
  1866. }else{
  1867. wrapper.removeClass("hide-pic");
  1868. }
  1869. }
  1870. wrapper.parent().append(wrapper.clone());
  1871. wrapper.remove();
  1872. $(".controls").each(function(i,ele){
  1873. if($(ele).find("input.input-xlarge").val()){
  1874. $(ele).next().removeClass("hide-pic")
  1875. }
  1876. })
  1877. });
  1878. $('body').on('click','.upload-content li',function() {
  1879. var index = $(this).closest('.conList').index() + 1,
  1880. str = 'image'+index+'FinderOpen';
  1881. eval(str+'()');
  1882. });
  1883. $(window).on("load", function () {
  1884. setTimeout(function () {
  1885. $("#authQrCodeBox").find("input.input-xlarge").each(function (i, ele) {
  1886. if ($(ele).val()) {
  1887. $(ele).next().find("li").css("z-index", "99");
  1888. $(ele).parents(".conList").find(".cancel-upload").show();
  1889. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1890. }
  1891. })
  1892. $("#mainImageBox").find("input.input-xlarge").each(function (i, ele) {
  1893. if ($(ele).val()) {
  1894. $(ele).next().find("li").css("z-index", "99");
  1895. $(ele).parents(".conList").find(".cancel-upload").show();
  1896. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1897. }
  1898. })
  1899. $(".mainIgeBox").find("input.input-xlarge").each(function (i, ele) {
  1900. if ($(ele).val()) {
  1901. $(ele).next().find("li").css("z-index", "99");
  1902. $(ele).parents(".conList").find(".cancel-upload").show();
  1903. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1904. }
  1905. })
  1906. for (var i = 0; i < 8; i++) {
  1907. $("#authImageBox"+i).find("input.input-xlarge").each(function (i, ele) {
  1908. if ($(ele).val()) {
  1909. $(ele).next().find("li").css("z-index", "99");
  1910. $(ele).parents(".conList").find(".cancel-upload").show();
  1911. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1912. }
  1913. })
  1914. }
  1915. for (var i = 0; i < 6; i++) {
  1916. $("#displayImageBox"+i).find("input.input-xlarge").each(function (i, ele) {
  1917. if ($(ele).val()) {
  1918. $(ele).next().find("li").css("z-index", "99");
  1919. $(ele).parents(".conList").find(".cancel-upload").show();
  1920. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1921. }
  1922. })
  1923. }
  1924. }, 200);
  1925. });
  1926. var fileIds = $("#fileIds").val();
  1927. //点击上传按钮后上传文件
  1928. $('#addSubmit').click(function () {
  1929. var fileIdArr = fileIds.split(',');
  1930. if (fileIdArr.length >= 7) {
  1931. alertx('最多上传6个视频');
  1932. return;
  1933. }
  1934. var filesById = document.getElementById('productFile');
  1935. var files = $('#productFile');
  1936. var fileList = files.prop('files');
  1937. var fileTitle = $('#fileTitle').val();
  1938. var fileName = $('#uploadFileName').val();
  1939. if (fileTitle == '') {
  1940. alertx('请输入视频标题')
  1941. return;
  1942. }
  1943. if (files === '' || files.length == 0 || fileName == '') {
  1944. alertx('请选择上传文件');
  1945. return;
  1946. }
  1947. $("#fileTitle").val("");
  1948. $("#uploadFileName").val("");
  1949. var data = new FormData();
  1950. var productId = $("#id").val();
  1951. data.append('file', fileList[0]);
  1952. data.append('fileTitle', fileTitle);
  1953. data.append('fileName', fileName);
  1954. data.append('productId', productId);
  1955. data.append('fileIds', fileIds);
  1956. $('.upload-loading').css("display", "inline");
  1957. $.ajax({
  1958. url: "${ctx}/baike/cmBaikeProduct/upload",
  1959. data: data,
  1960. type: "POST",
  1961. processData: false,
  1962. contentType: false,
  1963. dataType: "json",
  1964. success: function (res) {
  1965. if (res.success) {
  1966. filesById.value = '';
  1967. renderFileList(res.productFile);
  1968. $('.upload-loading').hide();
  1969. } else {
  1970. $.jBox.tip(res.msg, 'error');
  1971. $("#uploadFileName").val(fileName);
  1972. $('.upload-loading').hide();
  1973. }
  1974. },
  1975. error: function (json) {
  1976. }
  1977. });
  1978. })
  1979. var fileList = [];
  1980. var files = document.getElementById("productFile"), renderFileList;
  1981. //选择上传文件后显示文件名称
  1982. files.addEventListener("change", function (event) {
  1983. var name = event.target.files[0].name;
  1984. console.log(name)
  1985. $('#uploadFileName').val(name);
  1986. });
  1987. var fileListDisplay = document.getElementById('file-list-display');
  1988. renderFileList = function (data) {
  1989. fileIds += data.id + ',';
  1990. console.log(fileIds);
  1991. $('#fileIds').val(fileIds);
  1992. fileList.push({fileTitle: data.fileTitle, id: data.id, ossUrl: data.ossUrl});
  1993. fileList.forEach(function (file, index) {
  1994. var fileDisplayEl = document.createElement("p");
  1995. var deleteFile = document.createElement("span");
  1996. var viewFile = document.createElement("span");
  1997. var viewFileUrl = document.createElement("a");
  1998. //预览链接
  1999. viewFileUrl.innerHTML = '预览';
  2000. viewFileUrl.setAttribute("onclick", "previewVideo('" + file.ossUrl + "')");
  2001. viewFileUrl.setAttribute("target", "_blank");
  2002. //预览按钮
  2003. viewFile.className = 'viewFile';
  2004. console.log(viewFile);
  2005. viewFile.setAttribute("class","del");
  2006. viewFile.appendChild(viewFileUrl);
  2007. //删除按钮
  2008. deleteFile.innerHTML = '删除';
  2009. deleteFile.className = 'deleteFile';
  2010. console.log(deleteFile);
  2011. deleteFile.setAttribute("class","del");
  2012. deleteFile.setAttribute("onclick", "dataDelete(this, " + file.id + ")");
  2013. fileDisplayEl.setAttribute("id", file.id);
  2014. fileDisplayEl.innerHTML = file.fileTitle;
  2015. fileDisplayEl.appendChild(viewFile);
  2016. fileDisplayEl.appendChild(deleteFile);
  2017. fileListDisplay.appendChild(fileDisplayEl);
  2018. });
  2019. fileList.splice(0, fileList.length);
  2020. };
  2021. })
  2022. //删除参数
  2023. function deleteParam(index) {
  2024. $("#paramRow" + index).remove();
  2025. }
  2026. var content=10;
  2027. //添加正文
  2028. var d=1;
  2029. addDiction =function(dicname,diny,dicTyp){//输入框类型 输入框个数 按钮类型
  2030. $("."+dicname+diny).append("<div class=\"controls "+dicname+d+"\" style=\"margin-left: 0px;margin-top: 5px \">" +
  2031. "<input name=\"textInfo[0].textType\" value =\"1\" type=\"hidden\"/>"+
  2032. "<input htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"(请输入"+dicTyp+")\"/>" +
  2033. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"一级目录\" style=\"margin-left: 15px\" onclick=\"addDiction('"+dicname+"',"+d+",'一级目录'"+")\">一级目录</button>"+
  2034. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"二级目录\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'二级目录'"+")\">二级目录</button>"+
  2035. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"内容\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'内容'"+")\">内容</button>"+
  2036. "</div>")
  2037. d=d+1;
  2038. }
  2039. /**
  2040. * @param obj
  2041. * jquery控制input只能输入数字
  2042. */
  2043. function onlynum(obj) {
  2044. obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
  2045. }
  2046. //删除文件
  2047. function dataDelete(that, id) {
  2048. console.log($(that).text());
  2049. $(that).parent().remove();
  2050. var fileIds = $("#fileIds").val();
  2051. if (fileIds.indexOf(id)) {
  2052. fileIds = fileIds.replace(id + ',', '');
  2053. $("#fileIds").val(fileIds);
  2054. }
  2055. $.ajax({
  2056. url: "${ctx}/baike/cmBaikeProduct/deleteFile",
  2057. data: {"fileId": id},
  2058. async: false,
  2059. type: "POST"
  2060. });
  2061. }
  2062. function previewVideo(url) {
  2063. var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
  2064. var title = "视频播放";
  2065. top.$.jBox("iframe:" + url, {
  2066. iframeScrolling: 'yes',
  2067. width: 1000,
  2068. height: 750,
  2069. persistent: true,
  2070. title: title,
  2071. buttons: {"关闭": '-1'}
  2072. });
  2073. }
  2074. function updateAuditStatus(auditStatus) {
  2075. var elementById = document.getElementById("failReasonDiv");
  2076. if (auditStatus === 2) {
  2077. elementById.style.cssText = "display:none";
  2078. } else {
  2079. elementById.style.cssText = "";
  2080. }
  2081. }
  2082. //关键词联动
  2083. function autocomplete(text) {
  2084. var keywordlist=new Array();
  2085. <c:forEach items="${SearchFrequencyVo}" var="search">
  2086. keywordlist.push("${search.keyword}")
  2087. </c:forEach>
  2088. return keywordlist.filter(function (item) {
  2089. return text && item.indexOf(text) > -1;
  2090. });
  2091. }
  2092. new AutoComplete({
  2093. el: '.auto-input',
  2094. callback: autocomplete,
  2095. offsetLeft: -25
  2096. });
  2097. </script>
  2098. </body>
  2099. </html>