checkBaikePage.jsp 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129
  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=${cmBaikeProduct.commodityType}">采美词条</a></li>
  905. <li class="active"><a id="createEntryGuidance" href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}&commodityType=${cmBaikeProduct.commodityType}">${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="cancel btn btn-primary">取 消</button>
  1058. </div>
  1059. </div>
  1060. <%-- <div id="dialogmask" class="dialogmask opacity"></div>--%>
  1061. <div id="dialog" class="box" style="display: none"> 
  1062. <div id="dialog_content" class="dialogcontent">
  1063. <%-- <div id="logcontent" class="logcontent"><a herf="https://www.baidu.com">三生三世</a></div>--%>
  1064. <%-- <a herf="https://www.baidu.com">十里桃花</a>--%>
  1065. <div><h4>创建词条引导</h4></div>
  1066. <br>
  1067. <div>欢迎进入创建词条引导,为便于您更好的通过审核,请务必确保您已知晓百科词条的<a href="${ctx}/baike/cmBaikeProduct/entry" target="_blank">编辑须知</a>,如有疑问,您可以<a>点此</a>求助采美工作人员。</div>
  1068. <br>
  1069. <div><h5>声明</h5></div>
  1070. <br>
  1071. <div>在正式创建词条前,首先请你承诺:</div>
  1072. <div>1.不在百科添加广告性质的内容, 如联系方式,官方网站链接等;</div>
  1073. <div>2.不在百科编写涉及反动,违法犯罪,色情,暴力的内容;</div>
  1074. <div>3.不在百科编写虚假的、捏造的、恶搞的、缺乏根据的内容;</div>
  1075. <div>4.不侵犯他人合理权益;</div>
  1076. <div>5.接受违反以上规则时,百科账号会被封禁的结果。</div>
  1077. <br>
  1078. <div><h5>词条名</h5></div>
  1079. <br>
  1080. <div>成功创建词条的首要条件是了解一些基础知识!</div>
  1081. <br>
  1082. <div><h5>■什么是词条?</h5></div>
  1083. <br>
  1084. <div>词条指的是对于单一事物内容的介绍,例如技术,成分等。每个词条都有属于自己的名称,你可以通过搜索词条的名称来找到它们。</div>
  1085. <div>已有词条重名?创建多义词!</div>
  1086. <div>与已有词条意义相同?反馈同义词!</div>
  1087. <br>
  1088. <div><h5>■什么是规范的词条名?</h5></div> <br>
  1089. <div>采美百科规范的词条名是一个专有名词,请使用正式的全称或最广为人知的常见名。</div>
  1090. <div>例如:皮秒激光美容、光子嫩肤、线粒体、葡聚糖等</div>
  1091. <br>
  1092. <div><h5>主题</h5></div> <br>
  1093. <div>恭喜你已经完成了创建词条的第一步!现在想一想你要创建的词条属于什么类型?</div>
  1094. <div>选择正确的类型,精确定位你的创建难点所在!</div>
  1095. <br>
  1096. <div><h5>产品成分类词条</h5></div> <br>
  1097. <div>如玻尿酸钠、葡聚糖、虎杖等</div>
  1098. <br>
  1099. <div><h5>产品技术词条</h5></div> <br>
  1100. <div>如射频、皮秒、808半导体激光技术、透热疗法、448KHz、LDM水滴提升等</div>
  1101. <br>
  1102. <div><h5>词条创建要求</h5></div> <br>
  1103. <div><h6>1.描述客观</h6></div>
  1104. <div>描述事物时以事实为依
  1105. 据不加入感情色彩,不掺杂个人的好恶。百科词条
  1106. 是客观内容的集合,只站在第三方立场,以事实说话。例如,
  1107. 某篮球运动员某一场的投篮命中率较差,一般的表述是命中率低,
  1108. 甚至使用“打铁”之类的贬义词。而这样的表述模糊不清,多少算低,多
  1109. 少算高各有标准;同时也会造成支持者和反对者的口水战。所以直接把赛事数据
  1110. 列出,是高是低各自评说即可。另外在筛选内容时,也要保证公正客观,尤其对于争
  1111. 议性内容,保留多方观点并附以可靠的参考资料,是处理争议内容较为可取的做法。</div>
  1112. <br>
  1113. <div><h6>2.修饰适当</h6></div> <br>
  1114. <div>百科词条提倡用语“客观”,在一般性的叙述中(区别于引用原文的引述)尽量少的使用形容词和程度副词(最XXXX、十分XXX……)。</div>
  1115. <br>
  1116. <div><h6>3.参考资料要有效</h6></div> <br>
  1117. <div>参考资料是正文内容客观的另一种表现形式。词条某条内容,光靠“说”自己客观是不够的,应以可信有效的参考资料作为佐证来源,才能证明该内容是否已获得公众知晓或认可。
  1118. 特色词条应该保证一半以上的信息点都是有可靠来源的(由科学百科权威认证的特色词条,应确保词条正文中(含概述)每个目录模块中都有至少一条权威参考资料)。
  1119. 这里的有来源不是要求一字一句的复制粘贴,而是“内容虽经必要提炼、整理,但却不失原意”。例如前述的两个姜文词条中的文段,整理后的内容要素和观点依然来自参考资料,并没有增减其原意。
  1120. </div>
  1121. <br>
  1122. <div>可靠的来源一般包括文献、书籍等出版物、主流媒体发布的消息、政府或公众机构官网发布的内容等。关于可靠的来源的具体定义,请参阅百度百科:参考资料。</div>
  1123. <br>
  1124. <div>如,“<a>牛顿第一运动定律</a>”词条中,定律内容、发现者、适用范围等都是必不可少的重要内容,这些部分的缺失会导致读者对词条内容的错误认识。</div>
  1125. <div align="center"><input class="btn btn-primary" type="button" onclick="dialog()" value="我已阅读并知晓"></div>  
  1126. </div>
  1127. </div>
  1128. <form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" enctype="application/json" method="post" class="form-horizontal">
  1129. <form:hidden path="id"/>
  1130. <form:hidden path="fileIds"/>
  1131. <form:hidden path="commodityType"/>
  1132. <form:hidden path="emptyNum"/>
  1133. <form:hidden path="referenceList"/>
  1134. <sys:message content="${message}"/>
  1135. <%--词条名称--%>
  1136. <div class="control-group">
  1137. <label class="control-label">词条名称:</label>
  1138. <div class="controls">
  1139. ${cmBaikeProduct.name}
  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. <%--概述图册--%>
  1160. <div class="control-group" style="width: 1000px">
  1161. <label class="control-label keyClass">概述图册:</label>
  1162. <div class="display-image-list" style="display: flex;flex-wrap: nowrap; margin-top: -36px">
  1163. <c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">
  1164. <div class="controls upload-content iconBox" id="displayImageBox${index.index}" style="width: 170px">
  1165. <div class="conList">
  1166. <form:hidden id="displayImage${index.index}" path="displayImageList[${index.index}]" htmlEscape="false"
  1167. maxlength="255"
  1168. class="input-xlarge "/>
  1169. <sys:ckfinder input="displayImage${index.index}" type="images" uploadPath="/photo"
  1170. selectMultiple="false"
  1171. maxWidth="100" maxHeight="100"/><br>
  1172. </div>
  1173. </div>
  1174. </c:forEach>
  1175. <c:set var="size" value="${empty cmBaikeProduct.displayImageList?0:cmBaikeProduct.displayImageList.size()}"/>
  1176. <c:forEach var="emptyIndex" begin="${size}" end="${5}">
  1177. <div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="displayImageBox${emptyIndex}" style="width: 170px">
  1178. <div class="conList">
  1179. <form:hidden id="displayImage${emptyIndex}" path="displayImageList[${emptyIndex}]" htmlEscape="false"
  1180. maxlength="255"
  1181. class="input-xlarge "/>
  1182. <sys:ckfinder input="displayImage${emptyIndex}" type="images" uploadPath="/photo"
  1183. selectMultiple="false"
  1184. maxWidth="100" maxHeight="100"/><br>
  1185. </div>
  1186. </div>
  1187. </c:forEach>
  1188. </div>
  1189. <div class="control-label">
  1190. <label class="control-label keyClass" style="margin-left: 90px">概述视频(各视频大小不超过50M,最多上传6个)</label>
  1191. </div>
  1192. <div class="control-group video">
  1193. <label class="control-label">标题:</label>
  1194. <div class="controls">
  1195. <input id="fileTitle" htmlEscape="false" type="text">
  1196. </div>
  1197. <label class="control-label" style="margin-top:10px">视频路径:</label>
  1198. <div class="controls" style="margin-top:10px;width: 600px;">
  1199. <input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />
  1200. <div class="upload">
  1201. <input type="file" name="file" id="productFile" accept=".mp4" >选择文件
  1202. </div>
  1203. <div class="add-submit">
  1204. <input id="addSubmit" type="button" value="上传"/>上传&nbsp;
  1205. </div>
  1206. <div class="upload-loading">
  1207. <img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
  1208. </div>
  1209. </div>
  1210. <div id='file-list-display' style="margin-left:180px">
  1211. <c:if test="${not empty cmBaikeProduct.videoList}">
  1212. <c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">
  1213. <p>${videoFile.fileTitle}
  1214. <span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>
  1215. <span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>
  1216. </p>
  1217. </c:forEach>
  1218. </c:if>
  1219. </div>
  1220. </div>
  1221. </div>
  1222. <%-- <div class="control-group">--%>
  1223. <%-- <div class="control-group">--%>
  1224. <%-- <label class="control-label keyClass">相关视频(各视频大小不超过50M,最多上传6个)</label>--%>
  1225. <%-- </div>--%>
  1226. <%-- <div class="control-group">--%>
  1227. <%-- <label class="control-label">标题:</label>--%>
  1228. <%-- <div class="controls">--%>
  1229. <%-- <input id="fileTitle" htmlEscape="false" type="text">--%>
  1230. <%-- </div>--%>
  1231. <%-- <label class="control-label" style="margin-top:10px">视频路径:</label>--%>
  1232. <%-- <div class="controls" style="margin-top:10px;width: 600px;">--%>
  1233. <%-- <input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />--%>
  1234. <%-- <div class="upload">--%>
  1235. <%-- <input type="file" name="file" id="productFile" accept=".mp4" >选择文件--%>
  1236. <%-- </div>--%>
  1237. <%-- <div class="add-submit">--%>
  1238. <%-- <input id="addSubmit" type="button" value="上传"/>上传&nbsp;--%>
  1239. <%-- </div>--%>
  1240. <%-- <div class="upload-loading">--%>
  1241. <%-- <img alt="gif" src="/static/images/upload.gif" width="32px" border="none">--%>
  1242. <%-- </div>--%>
  1243. <%-- </div>--%>
  1244. <%-- </div>--%>
  1245. <%-- <div class="control-group">--%>
  1246. <%-- <div id='file-list-display' style="margin-left:180px">--%>
  1247. <%-- <c:if test="${not empty cmBaikeProduct.videoList}">--%>
  1248. <%-- <c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">--%>
  1249. <%-- <p>${videoFile.fileTitle}--%>
  1250. <%-- <span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>--%>
  1251. <%-- <span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>--%>
  1252. <%-- </p>--%>
  1253. <%-- </c:forEach>--%>
  1254. <%-- </c:if>--%>
  1255. <%-- </div>--%>
  1256. <%-- </div>--%>
  1257. <%-- </div>--%>
  1258. <%--信息栏--%>
  1259. <div class="control-group paramList" id="paramList">
  1260. <label class="control-label titleClass" style="margin-left: 90px">信息栏:(注:未填写的信息将不会显示在词条页上)</label>
  1261. <div class="controls add-button"><button class="btn btn-primary" type="button" style="margin-left: 20px">增加信息项</button></div>
  1262. <div class="controls param-controls not-overflow"></div>
  1263. </div>
  1264. <%--正文--%>
  1265. <div class="control-group" id="textInfolist">
  1266. <label class="control-label titleClass">正文:</label>
  1267. <div class="controls not-overflow">
  1268. <%-- <div class="bk-textInfo-item">
  1269. <div class="content-edit" id="textInfo-0" name="textInfolist[0].content"></div>
  1270. <div class="bk-textInfo-control"><span>一级目录</span><span>二级目录</span><span>内容</span></div>
  1271. </div>
  1272. --%>
  1273. </div>
  1274. </div>
  1275. <%--参考资料--%>
  1276. <div class="control-group" id="mata">
  1277. <label class="control-label titleClass">参考资料</label>
  1278. <div class="bk-reference-list">
  1279. <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">
  1280. <c:if test="${videoFile.referenceType eq '1'}">
  1281. <div class="controls applicationsan" style="margin-top: 5px">
  1282. <span class="del">[${statusIndex.index+1}]</span>
  1283. <span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}</a></span>
  1284. <span class="del">${videoFile.websiteName}.</span>
  1285. <span class="del">${videoFile.publishTime}.</span>
  1286. <span class="del">${videoFile.acitationTime}.</span>
  1287. <%-- <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>--%>
  1288. <%-- <a onclick="delMaterial(${videoFile.id})">删除</a>--%>
  1289. </div>
  1290. </c:if>
  1291. <c:if test="${videoFile.referenceType eq '2'}">
  1292. <div class="controls applicationsan" style="margin-top: 5px">
  1293. <span class="del">[${statusIndex.index+1}]</span>
  1294. <span class="del">${videoFile.author}.</span>
  1295. <span class="del">${videoFile.workName}.</span>
  1296. <span class="del">${videoFile.publicationPlace}.</span>
  1297. <span class="del">${videoFile.press}.</span>
  1298. <span class="del">${videoFile.publicationYear}.</span>
  1299. <span class="del">${videoFile.acitationWeb}.</span>
  1300. <%-- <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>--%>
  1301. <%-- <a onclick="delMaterial(${videoFile.id})">删除</a>--%>
  1302. </div>
  1303. </c:if>
  1304. <c:if test="${videoFile.referenceType eq '3'}">
  1305. <div class="controls applicationsan" style="margin-top: 5px">
  1306. <span class="del">[${statusIndex.index+1}]</span>
  1307. <span class="del">${videoFile.referenceDescription}.</span>
  1308. <span class="del">${videoFile.imageDescription}.</span>
  1309. <%--
  1310. <div class="conList">
  1311. <img id="imgaa" src="${videoFile.imageUrl}" height="50px" width="50px" ></input>
  1312. </div>
  1313. --%>
  1314. <%-- <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>--%>
  1315. <%-- <a onclick="delMaterial(${videoFile.id})">删除</a>--%>
  1316. </div>
  1317. </c:if>
  1318. </c:forEach>
  1319. </div>
  1320. </div>
  1321. <%--头图--%>
  1322. <div class="control-group" style="margin-top: 100px">
  1323. <label class="control-label">头图:</label>
  1324. <div class="main-image-list" style="display: flex;flex-wrap: wrap">
  1325. <div class="controls upload-content iconBox mainIgeBox" id="mainIgeBox">
  1326. <div class="conList">
  1327. <form:hidden id="image" path="image" htmlEscape="false" maxlength="255" class="input-xlarge "/>
  1328. <sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
  1329. maxHeight="100"/>
  1330. <br>
  1331. <label style="margin-left: 150px">建议图片尺寸210px*210px,并上传白底图片</label>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. </div>
  1336. <%--分类--%>
  1337. <div class="control-group">
  1338. <label class="control-label keyClass">分类:</label>
  1339. <div class="controls">
  1340. <form:select path="typeId" class="input-xlarge ">
  1341. <form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
  1342. </form:select>
  1343. </div>
  1344. </div>
  1345. <%--SEO关键词--%>
  1346. <div class="control-group">
  1347. <label class="control-label">SEO关键词:</label>
  1348. <div class="auto-input">
  1349. <form:input cssStyle="margin-left: 20px" path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge" readonly="true"/>
  1350. </div>
  1351. </div>
  1352. <%--基础浏览量--%>
  1353. <div class="control-group">
  1354. <label class="control-label keyClass">浏览量:</label>
  1355. <div class="controls">
  1356. <form:input path="actualPv" htmlEscape="false" onkeyup="onlynum(this)" class="input-xlarge digits " readonly="true"/>
  1357. </div>
  1358. </div>
  1359. <div class="control-group">
  1360. <label class="control-label keyClass">供应商:</label>
  1361. <div class="controls">
  1362. ${cmBaikeProduct.shopName}
  1363. </div>
  1364. </div>
  1365. <div class="control-group">
  1366. <label class="control-label keyClass">审核:</label>
  1367. <div class="controls">
  1368. <input type="radio" name="auditStatus" value="2" onclick="updateAuditStatus(2)" ${empty cmBaikeProduct.auditStatus?'checked=checked':cmBaikeProduct.auditStatus eq 1?'checked=checked':''}> 审核通过
  1369. <input type="radio" name="auditStatus" value="3" onclick="updateAuditStatus(3)" ${cmBaikeProduct.auditStatus eq 3?'checked=checked':''}> 审核失败
  1370. </div>
  1371. </div>
  1372. <div class="control-group" id="failReasonDiv" style="${empty cmBaikeProduct.auditStatus or cmBaikeProduct.auditStatus eq 1?'display: none':''}">
  1373. <label class="control-label"><font color="red">*</font>失败原因</label>
  1374. <div class="controls">
  1375. <textarea type="text" id="failReason" name="failReason" required style="width: 400px;height: 90px">${cmBaikeProduct.failReason}</textarea>
  1376. </div>
  1377. </div>
  1378. <%--提交数据 --%>
  1379. <div class="form-actions">
  1380. <%-- <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;--%>
  1381. <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
  1382. </div>
  1383. </form:form>
  1384. <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
  1385. <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
  1386. <script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
  1387. <script type="text/javascript" src="${ctxStatic}/auto-input.js"></script>
  1388. <script type="text/javascript" src="${ctxStatic}/content-edit.js"></script>
  1389. <script>
  1390. // 内容编辑器列表
  1391. var contentEditMap = new Map()
  1392. // 当前选中的编辑器
  1393. var currentContentEdit = null
  1394. // 当前选中的编辑器元素
  1395. var currentContentEditEl = null
  1396. // 添加资料数据
  1397. var referenceData = {}
  1398. // 资料编辑类型
  1399. var referenceEditTyp = 'add'
  1400. // 引用资料列表
  1401. var referenceList = []
  1402. // 资料标记数量
  1403. var markCount = referenceList.length || 1
  1404. // 正文列表
  1405. var textInfoList = [{}]
  1406. var textInfoItemIndex = 0
  1407. // 信息栏列表
  1408. var paramList = [{}]
  1409. var paramItemIndex = 0
  1410. // 创建内容编辑器
  1411. function createContentEdit(el, value) {
  1412. const contentEdit = new ContentEditInput({
  1413. el: el,
  1414. initValue: value,
  1415. toolbarClick(edit) {
  1416. // 添加
  1417. referenceEditTyp = 'add'
  1418. currentContentEdit = edit
  1419. console.log(currentContentEdit)
  1420. createReferenceList()
  1421. $('#dialogmask').fadeIn()
  1422. $('#dig').fadeIn()
  1423. },
  1424. referenceEdit(ctrid) {
  1425. // 编辑
  1426. referenceEditTyp = 'edit'
  1427. referenceData = referenceList.find(function(item){
  1428. return item.ctrlId == ctrid
  1429. })
  1430. if(!referenceData) return
  1431. initRefrenceFormData(referenceData)
  1432. $('#dialogmask').fadeIn()
  1433. $('#dig').fadeIn()
  1434. },
  1435. })
  1436. contentEditMap.set(el, contentEdit)
  1437. }
  1438. // 从表单获取资料数据
  1439. function setRefrenceData(data){
  1440. const referenceData = {}
  1441. referenceData.id = data.id || '' // 资料id
  1442. referenceData.ctrlId = data.ctrlId || '' // 关联id
  1443. /* (网络资料) */
  1444. referenceData.referenceType= $("#info").val() // '参考类型资料(1.网络;2.著作;3.其他)'
  1445. referenceData.website = $("#website").val()
  1446. referenceData.articleName = $("#articleName").val()
  1447. referenceData.websiteName = $("#websiteName").val()
  1448. referenceData.publishTimeStr = $("#publishTimeStr").val()
  1449. referenceData.acitationTimeStr = $("#acitationTimeStr").val()
  1450. /* 著作资料)*/
  1451. referenceData.author= $("#author").val()
  1452. referenceData.workName= $("#workName").val()
  1453. referenceData.publicationPlace= $("#publicationPlace").val()
  1454. referenceData.press= $("#press").val()
  1455. referenceData.publicationYearStr= $("#publicationYearStr").val()
  1456. referenceData.acitationWeb= $("#acitationWeb").val()
  1457. /* (其他资料) */
  1458. referenceData.referenceDescription= $("#referenceDescription").val()
  1459. referenceData.imageDescription= $("#imageDescription").val()
  1460. referenceData.imageUrl = $("#referenceImgUrl").val()
  1461. referenceData.entryId = data.entryId || '' // 词条id
  1462. referenceData.entryType = data.entryType || ''
  1463. return referenceData
  1464. }
  1465. // 设置资料表单数据
  1466. function initRefrenceFormData(data){
  1467. $("#info").val(data.referenceType)
  1468. $("#website").val(data.website)
  1469. $("#articleName").val(data.articleName)
  1470. $("#websiteName").val(data.websiteName)
  1471. $("#publishTimeStr").val(data.publishTimeStr)
  1472. $("#acitationTimeStr").val(data.acitationTimeStr)
  1473. $("#author").val(data.author)
  1474. $("#workName").val(data.workName)
  1475. $("#publicationPlace").val(data.publicationPlace)
  1476. $("#press").val(data.press)
  1477. $("#publicationYearStr").val(data.publicationYearStr)
  1478. $("#acitationWeb").val(data.acitationWeb)
  1479. $("#referenceDescription").val(data.referenceDescription)
  1480. $("#imageDescription").val(data.imageDescription)
  1481. $("#referenceImgUrl").val(data.imageUrl)
  1482. }
  1483. // 创建信息栏item
  1484. function createParamItem(index){
  1485. var paramItem = $('<div class="param-item"></div>')
  1486. var paramName = $('<div class="param-name"></div>')
  1487. var paramNameInput = $('<input type="text" placeholder="例如:型号">')
  1488. paramNameInput.attr('name', 'paramList['+ index +'].name')
  1489. paramNameInput.attr('class','xxl-name')
  1490. paramNameInput.attr('id','paramName-'+index)
  1491. var paramContent = $('<div class="param-content"></div>')
  1492. var paramContentInput = $('<div class="content-edit"></div>')
  1493. paramContentInput.attr('id', 'param-' + index)
  1494. paramContentInput.attr('name', 'paramList['+index+'].content')
  1495. var deleteBtn = $('<a style="cursor: pointer">删除</a>')
  1496. paramName.append(paramNameInput)
  1497. paramContent.append(paramContentInput)
  1498. paramItem.append([paramName,paramContent,deleteBtn ])
  1499. deleteBtn.on('click', function(){
  1500. $(this).parents('.param-item').remove()
  1501. })
  1502. return paramItem
  1503. }
  1504. // 初始化信息栏
  1505. function initParamList(){
  1506. <c:forEach items="${cmBaikeProduct.paramList}" var="videoFile" varStatus="statusIndex">
  1507. var index=${statusIndex.index}
  1508. paramItemIndex = index
  1509. var paramItem = createParamItem(index)
  1510. $('#paramList .param-controls').append(paramItem)
  1511. createContentEdit('#param-' + index,'${videoFile.content}')
  1512. console.log('${videoFile.name}')
  1513. $('#paramName-'+index).val('${videoFile.name}')
  1514. </c:forEach>
  1515. // paramList.forEach(function(item, index){
  1516. // paramItemIndex = index
  1517. // var paramItem = createParamItem(index)
  1518. // $('#paramList .param-controls').append(paramItem)
  1519. // createContentEdit('#param-' + index)
  1520. // })
  1521. }
  1522. // 创建正文item
  1523. function createTextInfoItem(index, type){
  1524. var inputId = 'textInfo-' + index
  1525. var textInfoItem = $('<div class="bk-textInfo-item"><div>')
  1526. var input = null
  1527. var inputType=null
  1528. if(type == 3){
  1529. input = $('<div class="content-edit"></div>')
  1530. input.attr('id', inputId)
  1531. input.attr('name', 'textInfolist[' + index + '].dictionaryContent')
  1532. inputType=$('<input type="text" />')
  1533. inputType.attr('name','textInfolist[' + index + '].dictionaryType')
  1534. inputType.attr('value',type)
  1535. inputType.attr('style','display: none')
  1536. }else{
  1537. input = $('<input type="text" />')
  1538. input.attr('id', inputId)
  1539. input.attr('name', 'textInfolist[' + index + '].dictionaryContent')
  1540. var placeholder = type == 1 ? '一级标题' : '二级标题'
  1541. input.attr('placeholder', placeholder)
  1542. inputType=$('<input type="text" />')
  1543. inputType.attr('name','textInfolist[' + index + '].dictionaryType')
  1544. inputType.attr('value',type)
  1545. inputType.attr('style','display: none')
  1546. }
  1547. var control = $('<div class="bk-textInfo-control"></div>')
  1548. var first = $('<span>+一级标题</span>')
  1549. var second = $('<span>+二级标题</span>')
  1550. var content = $('<span>+内容</span>')
  1551. var deleteBtn = $('<span>删除</span>')
  1552. control.append([first, second, content, deleteBtn])
  1553. textInfoItem.append([input,inputType,control])
  1554. first.on('click', function(){
  1555. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 1))
  1556. })
  1557. second.on('click', function(){
  1558. var index = $(this).parents('.controls').find('.bk-textInfo-item').length +1
  1559. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 2))
  1560. })
  1561. content.on('click', function(){
  1562. var index = $(this).parents('.controls').find('.bk-textInfo-item').length +1
  1563. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 3))
  1564. var inputId = 'textInfo-' + textInfoItemIndex
  1565. createContentEdit('#' + inputId)
  1566. })
  1567. deleteBtn.on('click', function(){
  1568. $(this).parents('.bk-textInfo-item').remove()
  1569. })
  1570. return textInfoItem
  1571. }
  1572. // 初始化正文内容
  1573. function initTextInfoList(){
  1574. var te='${cmBaikeProduct.textInfolist}'
  1575. if(''==te ||null==te ||te=='[]'){
  1576. var textInfoList = [{type:1},{type:2},{type:3}]
  1577. textInfoList.forEach(function(item,index){
  1578. textInfoItemIndex = index
  1579. var inputId = 'textInfo-' + index
  1580. const textInfoIem = createTextInfoItem(index, item.type)
  1581. $('#textInfolist .controls').append(textInfoIem)
  1582. if(item.type == 3){
  1583. createContentEdit('#' + inputId)
  1584. }
  1585. })
  1586. }else{
  1587. <c:forEach items="${cmBaikeProduct.textInfolist}" var="videoFile" varStatus="statusIndex">
  1588. var index=${statusIndex.index}
  1589. textInfoItemIndex = index
  1590. var inputId = 'textInfo-' + index
  1591. var textInfoIem = createTextInfoItem(index, ${videoFile.dictionaryType})
  1592. $('#textInfolist .controls').append(textInfoIem)
  1593. console.log('${videoFile.dictionaryContent}')
  1594. if('${videoFile.dictionaryType}'=='3'){
  1595. createContentEdit('#' + inputId,'${videoFile.dictionaryContent}')
  1596. }else{
  1597. $('#textInfo-' + index).val('${videoFile.dictionaryContent}')
  1598. }
  1599. </c:forEach>
  1600. }
  1601. // $('#textInfolist .controls')
  1602. }
  1603. function createReferenceItem(referenceData){
  1604. var text=null
  1605. if(referenceData.publishTimeStr=='undefined'){
  1606. referenceData.publishTimeStr='111'
  1607. }
  1608. if(referenceData.referenceType == 1){
  1609. text = `
  1610. <div class="controls applicationsan">
  1611. <span class="del">
  1612. <a>\${referenceData.articleName}.</a>
  1613. </span>
  1614. <span class="del">\${referenceData.websiteName}.</span>
  1615. <span class="del">\${referenceData.publishTimeStr}.</span>
  1616. <span class="del">\${referenceData.acitationTimeStr}.</span>
  1617. </div>
  1618. `
  1619. }
  1620. if(referenceData.referenceType == 2){
  1621. text= `
  1622. <div class="controls applicationsan">
  1623. <span class="del">\${referenceData.author}.</span>
  1624. <span class="del">\${referenceData.workName}.</span>
  1625. <span class="del">\${referenceData.publicationPlace}.</span>
  1626. <span class="del">\${referenceData.press}.</span>
  1627. <span class="del">\${referenceData.publicationYearStr}.</span>
  1628. <span class="del">\${referenceData.acitationWeb}</span>
  1629. </div>
  1630. `
  1631. }
  1632. if(referenceData.referenceType == 3){
  1633. text= `
  1634. <div class="controls applicationsan">
  1635. <span class="del">\${referenceData.referenceDescription}.</span>
  1636. <span class="del">\${referenceData.imageDescription}.</span>
  1637. </div>
  1638. `
  1639. }
  1640. return text
  1641. }
  1642. function createAllReferenceItem(referenceData){
  1643. var text=null
  1644. if(referenceData.referenceType == 1){
  1645. text = `
  1646. <div class="controls applicationsan">
  1647. <span class="del">[\${referenceList.length}]</span>
  1648. <span class="del"><a>\${referenceData.articleName}.</a></span>
  1649. <span class="del">\${referenceData.websiteName}.</span>
  1650. <span class="del">\${referenceData.publishTimeStr}.</span>
  1651. <span class="del">\${referenceData.acitationTimeStr}.</span>
  1652. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1653. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1654. </div>
  1655. `
  1656. }
  1657. if(referenceData.referenceType == 2){
  1658. text= `
  1659. <div class="controls applicationsan">
  1660. <span class="del">[\${referenceList.length}]</span>
  1661. <span class="del">\${referenceData.author}.</span>
  1662. <span class="del">\${referenceData.workName}.</span>
  1663. <span class="del">\${referenceData.publicationPlace}.</span>
  1664. <span class="del">\${referenceData.press}.</span>
  1665. <span class="del">\${referenceData.publicationYearStr}.</span>
  1666. <span class="del">\${referenceData.acitationWeb}.</span>
  1667. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1668. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1669. </div>
  1670. `
  1671. }
  1672. if(referenceData.referenceType == 3){
  1673. text= `
  1674. <div class="controls applicationsan">
  1675. <span class="del">[\${referenceList.length}]</span>
  1676. <span class="del">\${referenceData.referenceDescription}.</span>
  1677. <span class="del">\${referenceData.imageDescription}.</span>
  1678. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1679. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1680. </div>
  1681. `
  1682. }
  1683. return text
  1684. }
  1685. // 只要referenceList数据有更新就执行一次
  1686. function createReferenceList(){
  1687. $('.check-reference-list').html('')
  1688. referenceList.forEach(function(refData, index){
  1689. console.log(refData)
  1690. var item = createReferenceItem(refData)
  1691. $('.check-reference-list').append(item)
  1692. })
  1693. $('.check-reference-list').find('.controls').on('click', function(){
  1694. var index = $(this).index() + 1
  1695. var result = referenceList[$(this).index()]
  1696. console.log(result)
  1697. if(!result) return
  1698. var con= createReferenceItem(result)
  1699. result.ctrlId = currentContentEdit.confirm(con, result.ctrlId, index)
  1700. $('#dialogmask').fadeOut()
  1701. $('#dig').fadeOut()
  1702. })
  1703. }
  1704. $(function(){
  1705. var refren='${cmBaikeProduct.referenceList}'
  1706. if(''==refren|| null==refren){
  1707. }else{
  1708. referenceList=JSON.parse(refren)
  1709. markCount=referenceList.length
  1710. console.log(markCount)
  1711. }
  1712. //初始化 义项名,词条概述
  1713. createContentEdit('#bk-name','${cmBaikeProduct.alias}')
  1714. createContentEdit('#discription','${cmBaikeProduct.discription}')
  1715. initParamList()
  1716. initTextInfoList()
  1717. $('#paramList .btn').on('click', function(){
  1718. var paramItem = createParamItem(++paramItemIndex)
  1719. $('#paramList .param-controls').append(paramItem)
  1720. createContentEdit('#param-' + paramItemIndex)
  1721. })
  1722. $('#dig .confirm').on('click', function(){
  1723. if(referenceEditTyp === 'add'){
  1724. markCount++
  1725. var result = setRefrenceData({})
  1726. var con=createReferenceItem(result)
  1727. result.ctrlId = currentContentEdit.confirm(con)
  1728. referenceList.push(result)
  1729. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1730. $(this).parents('#dig').fadeOut()
  1731. initRefrenceFormData({})
  1732. var item = createAllReferenceItem(result)
  1733. $('.bk-reference-list').append(item)
  1734. }else{
  1735. var result = setRefrenceData(referenceData)
  1736. const index = referenceList.findIndex(function(item){
  1737. return item.ctrlId == referenceData.ctrlId
  1738. })
  1739. referenceList.splice(index, 1, result)
  1740. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1741. $(this).parents('#dig').fadeOut()
  1742. initRefrenceFormData({})
  1743. }
  1744. var referen=JSON.stringify(referenceList)
  1745. $('#referenceList').val(referen);
  1746. })
  1747. $('#dig .cancel').on('click', function(){
  1748. $(this).parents('#dig').fadeOut()
  1749. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1750. initRefrenceFormData({})
  1751. })
  1752. <%-- referenceList = [{ctrlId: 'FDIEKABKKNJEEJAN'}] // referenceList[0].reyt = 1 // referenceList:'[{"type": 1}]'--%>
  1753. <%--console.log('${cmBaikeProduct.materialInfo}')--%>
  1754. // 初始化编辑框引用资料列表
  1755. contentEditMap.forEach(function(item){
  1756. item.edit.ctridList.forEach(function(ctrlId){
  1757. var data = referenceList.find(function(ref){
  1758. return ref.ctrlId == ctrlId
  1759. })
  1760. if(!data) return
  1761. <%-- <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">--%>
  1762. <%-- </c:forEach>--%>
  1763. var text = createReferenceItem(data)
  1764. item.addLiteratureItem(ctrlId, text)
  1765. })
  1766. })
  1767. })
  1768. </script>
  1769. <script>
  1770. var paramIndex = 1;
  1771. var questionIndex = 2;
  1772. //给涉及到参考资料的标签赋值
  1773. $(function () {
  1774. $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
  1775. $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
  1776. var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
  1777. var MutationObserverConfig = {
  1778. childList: true,
  1779. subtree: true,
  1780. characterData: true
  1781. };
  1782. var observer = new MutationObserver(function (mutations) {
  1783. $.each(mutations, function (index, item) {
  1784. if (item.type === 'childList') {
  1785. // 在创建新的 element 时调用
  1786. var target = $(item.target),
  1787. thisWrapper = target.closest('.conList'),
  1788. nextEle = thisWrapper.parents('.controls').next();
  1789. thisWrapper.find('li').css('z-index', 99);
  1790. thisWrapper.find('.cancel-upload').show();
  1791. if (nextEle.hasClass('hide-pic')) {
  1792. nextEle.removeClass('hide-pic');
  1793. }
  1794. }
  1795. })
  1796. });
  1797. var observeEle1 = document.getElementsByClassName('main-image-list')[0];
  1798. var observeEle2 = document.getElementsByClassName('auth-qrCode-list')[0];
  1799. // var observeEle3 = document.getElementsByClassName('auth-image-list')[0];
  1800. var observeEle4 = document.getElementsByClassName('display-image-list')[0];
  1801. observer.observe(observeEle1, MutationObserverConfig);
  1802. observer.observe(observeEle2, MutationObserverConfig);
  1803. // observer.observe(observeEle3, MutationObserverConfig);
  1804. observer.observe(observeEle4, MutationObserverConfig);
  1805. $('body').on('click', '.cancel-upload',function() {
  1806. var wrapper = $(this).closest('.controls');
  1807. var controlsId = wrapper.attr('id');
  1808. wrapper.find('li').css('z-index','-1');
  1809. wrapper.find('input').val('');
  1810. $(this).hide();
  1811. if (controlsId == 'mainImageBox' || controlsId == 'authQrCodeBox' || controlsId=='mainIgeBox') {
  1812. wrapper.removeClass("hide-pic");
  1813. }
  1814. // else if (controlsId.indexOf('authImageBox') != -1) {
  1815. // if ($('.auth-image-list .cancel-upload:visible').length < 8) {
  1816. // wrapper.addClass("hide-pic");
  1817. // }else{
  1818. // wrapper.removeClass("hide-pic");
  1819. // }
  1820. // }
  1821. else if (controlsId.indexOf('displayImageBox') != -1) {
  1822. if ($('.display-image-list .cancel-upload:visible').length < 6) {
  1823. wrapper.addClass("hide-pic");
  1824. }else{
  1825. wrapper.removeClass("hide-pic");
  1826. }
  1827. }
  1828. wrapper.parent().append(wrapper.clone());
  1829. wrapper.remove();
  1830. $(".controls").each(function(i,ele){
  1831. if($(ele).find("input.input-xlarge").val()){
  1832. $(ele).next().removeClass("hide-pic")
  1833. }
  1834. })
  1835. });
  1836. $('body').on('click','.upload-content li',function() {
  1837. var index = $(this).closest('.conList').index() + 1,
  1838. str = 'image'+index+'FinderOpen';
  1839. eval(str+'()');
  1840. });
  1841. $(window).on("load", function () {
  1842. setTimeout(function () {
  1843. $("#authQrCodeBox").find("input.input-xlarge").each(function (i, ele) {
  1844. if ($(ele).val()) {
  1845. $(ele).next().find("li").css("z-index", "99");
  1846. $(ele).parents(".conList").find(".cancel-upload").show();
  1847. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1848. }
  1849. })
  1850. $("#mainImageBox").find("input.input-xlarge").each(function (i, ele) {
  1851. if ($(ele).val()) {
  1852. $(ele).next().find("li").css("z-index", "99");
  1853. $(ele).parents(".conList").find(".cancel-upload").show();
  1854. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1855. }
  1856. })
  1857. $("#mainIgeBox").find("input.input-xlarge").each(function (i, ele) {
  1858. if ($(ele).val()) {
  1859. $(ele).next().find("li").css("z-index", "99");
  1860. $(ele).parents(".conList").find(".cancel-upload").show();
  1861. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1862. }
  1863. })
  1864. for (var i = 0; i < 8; i++) {
  1865. $("#authImageBox"+i).find("input.input-xlarge").each(function (i, ele) {
  1866. if ($(ele).val()) {
  1867. $(ele).next().find("li").css("z-index", "99");
  1868. $(ele).parents(".conList").find(".cancel-upload").show();
  1869. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1870. }
  1871. })
  1872. }
  1873. for (var i = 0; i < 6; i++) {
  1874. $("#displayImageBox"+i).find("input.input-xlarge").each(function (i, ele) {
  1875. if ($(ele).val()) {
  1876. $(ele).next().find("li").css("z-index", "99");
  1877. $(ele).parents(".conList").find(".cancel-upload").show();
  1878. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1879. }
  1880. })
  1881. }
  1882. }, 200);
  1883. });
  1884. var fileIds = $("#fileIds").val();
  1885. //点击上传按钮后上传文件
  1886. $('#addSubmit').click(function () {
  1887. var fileIdArr = fileIds.split(',');
  1888. if (fileIdArr.length >= 7) {
  1889. alertx('最多上传6个视频');
  1890. return;
  1891. }
  1892. var filesById = document.getElementById('productFile');
  1893. var files = $('#productFile');
  1894. var fileList = files.prop('files');
  1895. var fileTitle = $('#fileTitle').val();
  1896. var fileName = $('#uploadFileName').val();
  1897. if (fileTitle == '') {
  1898. alertx('请输入视频标题')
  1899. return;
  1900. }
  1901. if (files === '' || files.length == 0 || fileName == '') {
  1902. alertx('请选择上传文件');
  1903. return;
  1904. }
  1905. $("#fileTitle").val("");
  1906. $("#uploadFileName").val("");
  1907. var data = new FormData();
  1908. var productId = $("#id").val();
  1909. data.append('file', fileList[0]);
  1910. data.append('fileTitle', fileTitle);
  1911. data.append('fileName', fileName);
  1912. data.append('productId', productId);
  1913. data.append('fileIds', fileIds);
  1914. $('.upload-loading').css("display", "inline");
  1915. $.ajax({
  1916. url: "${ctx}/baike/cmBaikeProduct/upload",
  1917. data: data,
  1918. type: "POST",
  1919. processData: false,
  1920. contentType: false,
  1921. dataType: "json",
  1922. success: function (res) {
  1923. if (res.success) {
  1924. filesById.value = '';
  1925. renderFileList(res.productFile);
  1926. $('.upload-loading').hide();
  1927. } else {
  1928. $.jBox.tip(res.msg, 'error');
  1929. $("#uploadFileName").val(fileName);
  1930. $('.upload-loading').hide();
  1931. }
  1932. },
  1933. error: function (json) {
  1934. }
  1935. });
  1936. })
  1937. var fileList = [];
  1938. var files = document.getElementById("productFile"), renderFileList;
  1939. //选择上传文件后显示文件名称
  1940. files.addEventListener("change", function (event) {
  1941. var name = event.target.files[0].name;
  1942. console.log(name)
  1943. $('#uploadFileName').val(name);
  1944. });
  1945. var fileListDisplay = document.getElementById('file-list-display');
  1946. renderFileList = function (data) {
  1947. fileIds += data.id + ',';
  1948. console.log(fileIds);
  1949. $('#fileIds').val(fileIds);
  1950. fileList.push({fileTitle: data.fileTitle, id: data.id, ossUrl: data.ossUrl});
  1951. fileList.forEach(function (file, index) {
  1952. var fileDisplayEl = document.createElement("p");
  1953. var deleteFile = document.createElement("span");
  1954. var viewFile = document.createElement("span");
  1955. var viewFileUrl = document.createElement("a");
  1956. //预览链接
  1957. viewFileUrl.innerHTML = '预览';
  1958. viewFileUrl.setAttribute("onclick", "previewVideo('" + file.ossUrl + "')");
  1959. viewFileUrl.setAttribute("target", "_blank");
  1960. //预览按钮
  1961. viewFile.className = 'viewFile';
  1962. console.log(viewFile);
  1963. viewFile.setAttribute("class","del");
  1964. viewFile.appendChild(viewFileUrl);
  1965. //删除按钮
  1966. deleteFile.innerHTML = '删除';
  1967. deleteFile.className = 'deleteFile';
  1968. console.log(deleteFile);
  1969. deleteFile.setAttribute("class","del");
  1970. deleteFile.setAttribute("onclick", "dataDelete(this, " + file.id + ")");
  1971. fileDisplayEl.setAttribute("id", file.id);
  1972. fileDisplayEl.innerHTML = file.fileTitle;
  1973. fileDisplayEl.appendChild(viewFile);
  1974. fileDisplayEl.appendChild(deleteFile);
  1975. fileListDisplay.appendChild(fileDisplayEl);
  1976. });
  1977. fileList.splice(0, fileList.length);
  1978. };
  1979. })
  1980. //删除参数
  1981. function deleteParam(index) {
  1982. $("#paramRow" + index).remove();
  1983. }
  1984. var content=10;
  1985. //添加正文
  1986. var d=1;
  1987. addDiction =function(dicname,diny,dicTyp){//输入框类型 输入框个数 按钮类型
  1988. $("."+dicname+diny).append("<div class=\"controls "+dicname+d+"\" style=\"margin-left: 0px;margin-top: 5px \">" +
  1989. "<input name=\"textInfo[0].textType\" value =\"1\" type=\"hidden\"/>"+
  1990. "<input htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"(请输入"+dicTyp+")\"/>" +
  1991. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"一级目录\" style=\"margin-left: 15px\" onclick=\"addDiction('"+dicname+"',"+d+",'一级目录'"+")\">一级目录</button>"+
  1992. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"二级目录\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'二级目录'"+")\">二级目录</button>"+
  1993. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"内容\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'内容'"+")\">内容</button>"+
  1994. "</div>")
  1995. d=d+1;
  1996. }
  1997. /**
  1998. * @param obj
  1999. * jquery控制input只能输入数字
  2000. */
  2001. function onlynum(obj) {
  2002. obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
  2003. }
  2004. //删除文件
  2005. function dataDelete(that, id) {
  2006. console.log($(that).text());
  2007. $(that).parent().remove();
  2008. var fileIds = $("#fileIds").val();
  2009. if (fileIds.indexOf(id)) {
  2010. fileIds = fileIds.replace(id + ',', '');
  2011. $("#fileIds").val(fileIds);
  2012. }
  2013. $.ajax({
  2014. url: "${ctx}/baike/cmBaikeProduct/deleteFile",
  2015. data: {"fileId": id},
  2016. async: false,
  2017. type: "POST"
  2018. });
  2019. }
  2020. function previewVideo(url) {
  2021. var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
  2022. var title = "视频播放";
  2023. top.$.jBox("iframe:" + url, {
  2024. iframeScrolling: 'yes',
  2025. width: 1000,
  2026. height: 750,
  2027. persistent: true,
  2028. title: title,
  2029. buttons: {"关闭": '-1'}
  2030. });
  2031. }
  2032. function updateAuditStatus(auditStatus) {
  2033. var elementById = document.getElementById("failReasonDiv");
  2034. if (auditStatus === 2) {
  2035. elementById.style.cssText = "display:none";
  2036. } else {
  2037. elementById.style.cssText = "";
  2038. }
  2039. }
  2040. //关键词联动
  2041. function autocomplete(text) {
  2042. var keywordlist=new Array();
  2043. <c:forEach items="${SearchFrequencyVo}" var="search">
  2044. keywordlist.push("${search.keyword}")
  2045. </c:forEach>
  2046. return keywordlist.filter(function (item) {
  2047. return text && item.indexOf(text) > -1;
  2048. });
  2049. }
  2050. new AutoComplete({
  2051. el: '.auto-input',
  2052. callback: autocomplete,
  2053. offsetLeft: -25
  2054. });
  2055. </script>
  2056. </body>
  2057. </html>