checkBaikePage.jsp 75 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154
  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/check?id=${cmBaikeProduct.id}
  906. &commodityType=1&publishSource=2&entryId=2">${not empty cmBaikeProduct.id?'查看':'添加'}</a></li>
  907. </ul><br/>
  908. <%-- <div>--%>
  909. <%-- <button onclick="showlog_result(true,'展示正确内容的弹框')">展示正确弹框</button>--%>
  910. <%-- </div>--%>
  911. <div id="dialogmask" class="dialogmask opacity"></div>
  912. <div id="dig" class="ckzl" style="display: none"> 
  913. <div id="dig_content" class="digcontent">
  914. <div class="dig-tab">
  915. <a class="btn btn-primary" onclick="addZl()">添加参考资料</a>
  916. <a class="btn btn-primary" onclick="removeZl()">引用已有资料</a>
  917. </div>
  918. <%--已有资料--%>
  919. <div class="control-group" id="yyzl" style="display: none">
  920. <div class="check-reference-list">
  921. <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">
  922. <c:if test="${videoFile.referenceType eq '1'}">
  923. <div class="controls applicationsan">
  924. <span class="del">[${statusIndex.index}]</span>
  925. <span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}.</a></span>
  926. <span class="del">${videoFile.websiteName}).</span>
  927. <span class="del">${videoFile.publishTime}.</span>
  928. <span class="del">${videoFile.acitationTime}.</span>
  929. <a onclick="saveMataInfo(${videoFile.id})"></a>
  930. </div>
  931. </c:if>
  932. <c:if test="${videoFile.referenceType eq '2'}">
  933. <div class="controls applicationsan">
  934. <span class="del">[${statusIndex.index}]</span>
  935. <span class="del">${videoFile.author}.</span>
  936. <span class="del">${videoFile.workName}.</span>
  937. <span class="del">${videoFile.publicationPlace}.</span>
  938. <span class="del">${videoFile.press}.</span>
  939. <span class="del">${videoFile.publicationYear}.</span>
  940. <span class="del">${videoFile.acitationWeb}.</span>
  941. <a onclick="saveMataInfo(${videoFile.id})"></a>
  942. </div>
  943. </c:if>
  944. <c:if test="${videoFile.referenceType eq '3'}">
  945. <div class="controls applicationsan">
  946. <span class="del">[${statusIndex.index}]</span>
  947. <span class="del">${videoFile.referenceDescription}.</span>
  948. <span class="del">${videoFile.imageDescription}.</span>
  949. <%--
  950. <div class="conList">
  951. <img id="imgaa" src="${videoFile.imageUrl}" height="50px" width="50px" >(图片)</input>
  952. </div>
  953. --%>
  954. <a onclick="saveMataInfo(${videoFile.id})">引用资料</a>
  955. </div>
  956. </c:if>
  957. </c:forEach>
  958. </div>
  959. </div>
  960. <%--添加参考资料--%>
  961. <div id="zl">
  962. <div class="control-group">
  963. <label class="red">*</label>
  964. <label class="control-label">参考资料类型:</label>
  965. <select id="info" onchange="ckzl_change()">
  966. <option id="zllx1" value="1">网络资料</option>
  967. <option id="zllx2" value="2">著作资料</option>
  968. <option id="zllx3" value="3">其他资料</option>
  969. </select>
  970. </div>
  971. <%--网络资料--%>
  972. <div class="wlzl" style="display: block" id="wlzl">
  973. <div class="control-group">
  974. <label class="red">*</label>
  975. <label class="control-label keyClass">输入网址:</label>
  976. <input type="text" id="website" required="true" htmlEscape="false" class="input-xlarge " placeholder="请以http(s)开头"/>
  977. </div>
  978. <div class="control-group">
  979. <label class="red">*</label>
  980. <label class="control-label keyClass">文章名字:</label>
  981. <input type="text" id="articleName" required="true" htmlEscape="false" class="input-xlarge " placeholder="请输入文章名字"/>
  982. </div>
  983. <div class="control-group">
  984. <label class="red">*</label>
  985. <label class="control-label keyClass">网站名称:</label>
  986. <input type="text" id="websiteName" htmlEscape="false" class="input-xlarge " placeholder="请输入网站名称 如:新华网"/>
  987. </div>
  988. <div class="control-group">
  989. <label class="control-label keyClass">发表日期:</label>
  990. <input type="text" id="publishTimeStr" name="publishTimeStr" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
  991. onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
  992. </div>
  993. <div class="control-group">
  994. <label class="control-label keyClass">引文日期:</label>
  995. <input type="text" id="acitationTimeStr" name="publishTimeStr" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
  996. onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
  997. </div>
  998. </div>
  999. <%--著作资料--%>
  1000. <div class="zzzl" style="display: none" id="zzzl">
  1001. <div class="control-group" >
  1002. <label class="red">*</label>
  1003. <label class="control-label keyClass">作者:</label>
  1004. <input type="text" id="author" htmlEscape="false" class="input-xlarge " placeholder="请输入作者名称 多个作者使用英文都好隔开"/>
  1005. </div>
  1006. <div class="control-group">
  1007. <label class="red">*</label>
  1008. <label class="control-label keyClass">著作名:</label>
  1009. <input type="text" id="workName" htmlEscape="false" class="input-xlarge " placeholder="请输入著作名"/>
  1010. </div>
  1011. <div class="control-group">
  1012. <label class="control-label keyClass">出版地:</label>
  1013. <input type="text" id="publicationPlace" htmlEscape="false" class="input-xlarge " placeholder="请输入出版地信息"/>
  1014. </div>
  1015. <div class="control-group">
  1016. <label class="red">*</label>
  1017. <label class="control-label keyClass">出版社:</label>
  1018. <input type="text" id="press" htmlEscape="false" class="input-xlarge " placeholder="请输入出版社名称"/>
  1019. </div>
  1020. <div class="control-group">
  1021. <label class="control-label keyClass">出版年:</label>
  1022. <input type="text" id="publicationYearStr" name="publicationYearStr" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
  1023. onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
  1024. </div>
  1025. <div class="control-group">
  1026. <label class="control-label keyClass">引文编码:</label>
  1027. <input type="text" id="acitationWeb" htmlEscape="false" class="input-xlarge " placeholder="请输入引用著作的页码 如 100 121"/>
  1028. </div>
  1029. </div>
  1030. <%--其他资料--%>
  1031. <div class="qtzl" id="qtzl" style="display: none" >
  1032. <div class="control-group">
  1033. <label class="red">*</label>
  1034. <label class="control-label keyClass">参考资料说明:</label>
  1035. <textarea id="referenceDescription" type="text" style="position: relative;height: 100px; width: 450px;" maxlength="50" ></textarea>
  1036. <label class="bk-input-tip">其他类型参考资料,填写格式请参阅<a href="">《信息与文献 参考文献著录规则 GB/T 7714-2015》</a></label>
  1037. </div>
  1038. <div class="control-group" >
  1039. <label class="control-label keyClass">图片描述:</label>
  1040. <input type="text" id="imageDescription" htmlEscape="false" class="input-xlarge " placeholder="请输入其他参考资料的具体描述"/>
  1041. </div>
  1042. <div class="control-group">
  1043. <label class="control-label">图片上传:</label>
  1044. <div class="auth-qrCode-list clearfix">
  1045. <div class="controls upload-content iconBox mainImageBox" id="mainImageBox">
  1046. <div class="conList">
  1047. <hidden id="referenceImgUrl" path="referenceImgUrl" htmlEscape="false" maxlength="255" class="input-xlarge "/>
  1048. <sys:ckfinder input="referenceImgUrl" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
  1049. <label class="bk-upload-tip">请上传引用的图片资源,需同时上传资料的封面、以及含有对应具体内容的图片;注意:图片需要保证完整、不可遮挡且清晰</label>
  1050. </div>
  1051. </div>
  1052. </div>
  1053. </div>
  1054. </div>
  1055. </div>
  1056. </div>
  1057. <div class="form-actions">
  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" 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. ${cmBaikeProduct.name}
  1141. <%-- <form:input path="name" htmlEscape="false" class="input-xlarge "/>--%>
  1142. <%-- <label id="nameSensitiveWords" class="red"></label>--%>
  1143. </div>
  1144. </div>
  1145. <%--义项名--%>
  1146. <div class="control-group">
  1147. <label class="control-label">义项名:</label>
  1148. <div class="controls not-overflow">
  1149. <div class="content-edit" id="bk-name" name="alias"></div>
  1150. </div>
  1151. </div>
  1152. <%--词条概述--%>
  1153. <div class="control-group">
  1154. <label class="control-label">词条概述:</label>
  1155. <div class="controls not-overflow">
  1156. <div class="content-edit" id="discription" name="discription"></div>
  1157. <label id="discriptionSensitiveWords" class="red"></label>
  1158. </div>
  1159. </div>
  1160. <%--banner--%>
  1161. <div class="control-group" style="width: 1000px">
  1162. <label class="control-label">banner:</label>
  1163. <div class="main-image-list" style="display: flex;flex-wrap: wrap">
  1164. <div class="controls upload-content iconBox mainIgeBox" >
  1165. <div class="conList">
  1166. <form:hidden id="banner" path="banner" htmlEscape="false" maxlength="255"
  1167. class="input-xlarge "/>
  1168. <sys:ckfinder input="banner" type="images" uploadPath="/photo" selectMultiple="false"
  1169. maxWidth="100"
  1170. maxHeight="100"/>
  1171. </div>
  1172. </div>
  1173. </div>
  1174. <br>
  1175. <label style="margin-left: 150px">建议尺寸: 1920 * 400 / PX</label>
  1176. </div>
  1177. <%--概述图册--%>
  1178. <div class="control-group" style="width: 1000px">
  1179. <label class="control-label keyClass">概述图册:</label>
  1180. <div class="display-image-list" style="display: flex;flex-wrap: nowrap; margin-top: -36px">
  1181. <c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">
  1182. <div class="controls upload-content iconBox" id="displayImageBox${index.index}" style="width: 170px">
  1183. <div class="conList">
  1184. <form:hidden id="displayImage${index.index}" path="displayImageList[${index.index}]" htmlEscape="false"
  1185. maxlength="255"
  1186. class="input-xlarge "/>
  1187. <sys:ckfinder input="displayImage${index.index}" type="images" uploadPath="/photo"
  1188. selectMultiple="false"
  1189. maxWidth="100" maxHeight="100"/><br>
  1190. </div>
  1191. </div>
  1192. </c:forEach>
  1193. <c:set var="size" value="${empty cmBaikeProduct.displayImageList?0:cmBaikeProduct.displayImageList.size()}"/>
  1194. <c:forEach var="emptyIndex" begin="${size}" end="${5}">
  1195. <div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="displayImageBox${emptyIndex}" style="width: 170px">
  1196. <div class="conList">
  1197. <form:hidden id="displayImage${emptyIndex}" path="displayImageList[${emptyIndex}]" htmlEscape="false"
  1198. maxlength="255"
  1199. class="input-xlarge "/>
  1200. <sys:ckfinder input="displayImage${emptyIndex}" type="images" uploadPath="/photo"
  1201. selectMultiple="false"
  1202. maxWidth="100" maxHeight="100"/><br>
  1203. </div>
  1204. </div>
  1205. </c:forEach>
  1206. </div>
  1207. <div class="control-label">
  1208. <label class="control-label keyClass" style="margin-left: 90px">概述视频(各视频大小不超过50M,最多上传6个)</label>
  1209. </div>
  1210. <div class="control-group video">
  1211. <label class="control-label">标题:</label>
  1212. <div class="controls">
  1213. <input id="fileTitle" htmlEscape="false" type="text">
  1214. </div>
  1215. <label class="control-label" style="margin-top:10px">视频路径:</label>
  1216. <div class="controls" style="margin-top:10px;width: 600px;">
  1217. <input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />
  1218. <div class="upload">
  1219. <input type="file" name="file" id="productFile" accept=".mp4" >选择文件
  1220. </div>
  1221. <div class="add-submit">
  1222. <input id="addSubmit" type="button" value="上传"/>上传&nbsp;
  1223. </div>
  1224. <div class="upload-loading">
  1225. <img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
  1226. </div>
  1227. </div>
  1228. <div id='file-list-display' style="margin-left:180px">
  1229. <c:if test="${not empty cmBaikeProduct.videoList}">
  1230. <c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">
  1231. <p>${videoFile.fileTitle}
  1232. <span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>
  1233. <span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>
  1234. </p>
  1235. </c:forEach>
  1236. </c:if>
  1237. </div>
  1238. </div>
  1239. </div>
  1240. <%-- <div class="control-group">--%>
  1241. <%-- <div class="control-group">--%>
  1242. <%-- <label class="control-label keyClass">相关视频(各视频大小不超过50M,最多上传6个)</label>--%>
  1243. <%-- </div>--%>
  1244. <%-- <div class="control-group">--%>
  1245. <%-- <label class="control-label">标题:</label>--%>
  1246. <%-- <div class="controls">--%>
  1247. <%-- <input id="fileTitle" htmlEscape="false" type="text">--%>
  1248. <%-- </div>--%>
  1249. <%-- <label class="control-label" style="margin-top:10px">视频路径:</label>--%>
  1250. <%-- <div class="controls" style="margin-top:10px;width: 600px;">--%>
  1251. <%-- <input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />--%>
  1252. <%-- <div class="upload">--%>
  1253. <%-- <input type="file" name="file" id="productFile" accept=".mp4" >选择文件--%>
  1254. <%-- </div>--%>
  1255. <%-- <div class="add-submit">--%>
  1256. <%-- <input id="addSubmit" type="button" value="上传"/>上传&nbsp;--%>
  1257. <%-- </div>--%>
  1258. <%-- <div class="upload-loading">--%>
  1259. <%-- <img alt="gif" src="/static/images/upload.gif" width="32px" border="none">--%>
  1260. <%-- </div>--%>
  1261. <%-- </div>--%>
  1262. <%-- </div>--%>
  1263. <%-- <div class="control-group">--%>
  1264. <%-- <div id='file-list-display' style="margin-left:180px">--%>
  1265. <%-- <c:if test="${not empty cmBaikeProduct.videoList}">--%>
  1266. <%-- <c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">--%>
  1267. <%-- <p>${videoFile.fileTitle}--%>
  1268. <%-- <span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>--%>
  1269. <%-- <span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>--%>
  1270. <%-- </p>--%>
  1271. <%-- </c:forEach>--%>
  1272. <%-- </c:if>--%>
  1273. <%-- </div>--%>
  1274. <%-- </div>--%>
  1275. <%-- </div>--%>
  1276. <%--信息栏--%>
  1277. <div class="control-group paramList" id="paramList">
  1278. <label class="control-label titleClass" style="margin-left: 90px">信息栏:(注:未填写的信息将不会显示在词条页上)</label>
  1279. <div class="controls add-button"><button class="btn btn-primary" type="button" style="margin-left: 20px">增加信息项</button></div>
  1280. <div class="controls param-controls not-overflow"></div>
  1281. </div>
  1282. <%--正文--%>
  1283. <div class="control-group" id="textInfolist">
  1284. <label class="control-label titleClass">正文:</label>
  1285. <div class="controls not-overflow">
  1286. <%-- <div class="bk-textInfo-item">
  1287. <div class="content-edit" id="textInfo-0" name="textInfolist[0].content"></div>
  1288. <div class="bk-textInfo-control"><span>一级目录</span><span>二级目录</span><span>内容</span></div>
  1289. </div>
  1290. --%>
  1291. </div>
  1292. </div>
  1293. <%--参考资料--%>
  1294. <div class="control-group" id="mata">
  1295. <label class="control-label titleClass">参考资料</label>
  1296. <div class="bk-reference-list">
  1297. <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">
  1298. <c:if test="${videoFile.referenceType eq '1'}">
  1299. <div class="controls applicationsan" style="margin-top: 5px">
  1300. <span class="del">[${statusIndex.index+1}]</span>
  1301. <span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}</a></span>
  1302. <span class="del">${videoFile.websiteName}.</span>
  1303. <span class="del">${videoFile.publishTime}.</span>
  1304. <span class="del">${videoFile.acitationTime}.</span>
  1305. <%-- <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>--%>
  1306. <%-- <a onclick="delMaterial(${videoFile.id})">删除</a>--%>
  1307. </div>
  1308. </c:if>
  1309. <c:if test="${videoFile.referenceType eq '2'}">
  1310. <div class="controls applicationsan" style="margin-top: 5px">
  1311. <span class="del">[${statusIndex.index+1}]</span>
  1312. <span class="del">${videoFile.author}.</span>
  1313. <span class="del">${videoFile.workName}.</span>
  1314. <span class="del">${videoFile.publicationPlace}.</span>
  1315. <span class="del">${videoFile.press}.</span>
  1316. <span class="del">${videoFile.publicationYear}.</span>
  1317. <span class="del">${videoFile.acitationWeb}.</span>
  1318. <%-- <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>--%>
  1319. <%-- <a onclick="delMaterial(${videoFile.id})">删除</a>--%>
  1320. </div>
  1321. </c:if>
  1322. <c:if test="${videoFile.referenceType eq '3'}">
  1323. <div class="controls applicationsan" style="margin-top: 5px">
  1324. <span class="del">[${statusIndex.index+1}]</span>
  1325. <span class="del">${videoFile.referenceDescription}.</span>
  1326. <span class="del">${videoFile.imageDescription}.</span>
  1327. <%--
  1328. <div class="conList">
  1329. <img id="imgaa" src="${videoFile.imageUrl}" height="50px" width="50px" ></input>
  1330. </div>
  1331. --%>
  1332. <%-- <a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>--%>
  1333. <%-- <a onclick="delMaterial(${videoFile.id})">删除</a>--%>
  1334. </div>
  1335. </c:if>
  1336. </c:forEach>
  1337. </div>
  1338. </div>
  1339. <%--头图--%>
  1340. <div class="control-group" style="margin-top: 100px">
  1341. <label class="control-label">头图:</label>
  1342. <div class="main-image-list" style="display: flex;flex-wrap: wrap">
  1343. <div class="controls upload-content iconBox mainIgeBox" id="mainIgeBox">
  1344. <div class="conList">
  1345. <form:hidden id="image" path="image" htmlEscape="false" maxlength="255" class="input-xlarge "/>
  1346. <sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
  1347. maxHeight="100"/>
  1348. <br>
  1349. <label style="margin-left: 150px">建议图片尺寸210px*210px,并上传白底图片</label>
  1350. </div>
  1351. </div>
  1352. </div>
  1353. </div>
  1354. <%--分类--%>
  1355. <div class="control-group">
  1356. <label class="control-label keyClass">分类:</label>
  1357. <div class="controls">
  1358. <form:select path="typeId" class="input-xlarge ">
  1359. <form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
  1360. </form:select>
  1361. </div>
  1362. </div>
  1363. <%--SEO关键词--%>
  1364. <div class="control-group">
  1365. <label class="control-label">SEO关键词:</label>
  1366. <div class="auto-input">
  1367. <form:input cssStyle="margin-left: 20px" path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge" readonly="true"/>
  1368. </div>
  1369. </div>
  1370. <%--基础浏览量--%>
  1371. <div class="control-group">
  1372. <label class="control-label keyClass">浏览量:</label>
  1373. <div class="controls">
  1374. <form:input path="actualPv" htmlEscape="false" onkeyup="onlynum(this)" class="input-xlarge digits " readonly="true"/>
  1375. </div>
  1376. </div>
  1377. <div class="control-group">
  1378. <label class="control-label keyClass">供应商:</label>
  1379. <div class="controls">
  1380. ${cmBaikeProduct.shopName}
  1381. </div>
  1382. </div>
  1383. <div class="control-group">
  1384. <label class="control-label keyClass">供应商状态:</label>
  1385. <div class="controls">
  1386. <font color="${cmBaikeProduct.status eq 1?'#2FA4E7':'red'}"> ${cmBaikeProduct.status eq 1?'已发布':'暂不发布'}</font>
  1387. </div>
  1388. </div>
  1389. <div class="control-group">
  1390. <label class="control-label keyClass">审核:</label>
  1391. <div class="controls">
  1392. <input type="radio" name="auditStatus" value="2" onclick="updateAuditStatus(2)" ${empty cmBaikeProduct.auditStatus?'checked=checked':cmBaikeProduct.auditStatus eq 1?'checked=checked':''}> 审核通过
  1393. <input type="radio" name="auditStatus" value="3" onclick="updateAuditStatus(3)" ${cmBaikeProduct.auditStatus eq 3?'checked=checked':''}> 审核失败
  1394. </div>
  1395. </div>
  1396. <div class="control-group" id="failReasonDiv" style="${empty cmBaikeProduct.auditStatus or cmBaikeProduct.auditStatus eq 1?'display: none':''}">
  1397. <label class="control-label"><font color="red">*</font>失败原因</label>
  1398. <div class="controls">
  1399. <textarea type="text" id="failReason" name="failReason" required style="width: 400px;height: 90px">${cmBaikeProduct.failReason}</textarea>
  1400. </div>
  1401. </div>
  1402. <%--提交数据 --%>
  1403. <div class="form-actions">
  1404. <%-- <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;--%>
  1405. <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
  1406. </div>
  1407. </form:form>
  1408. <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
  1409. <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
  1410. <script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
  1411. <script type="text/javascript" src="${ctxStatic}/auto-input.js"></script>
  1412. <script type="text/javascript" src="${ctxStatic}/content-edit.js"></script>
  1413. <script>
  1414. // 内容编辑器列表
  1415. var contentEditMap = new Map()
  1416. // 当前选中的编辑器
  1417. var currentContentEdit = null
  1418. // 当前选中的编辑器元素
  1419. var currentContentEditEl = null
  1420. // 添加资料数据
  1421. var referenceData = {}
  1422. // 资料编辑类型
  1423. var referenceEditTyp = 'add'
  1424. // 引用资料列表
  1425. var referenceList = []
  1426. // 资料标记数量
  1427. var markCount = referenceList.length || 1
  1428. // 正文列表
  1429. var textInfoList = [{}]
  1430. var textInfoItemIndex = 0
  1431. // 信息栏列表
  1432. var paramList = [{}]
  1433. var paramItemIndex = 0
  1434. // 创建内容编辑器
  1435. function createContentEdit(el, value) {
  1436. const contentEdit = new ContentEditInput({
  1437. el: el,
  1438. initValue: value,
  1439. toolbarClick(edit) {
  1440. // 添加
  1441. referenceEditTyp = 'add'
  1442. currentContentEdit = edit
  1443. console.log(currentContentEdit)
  1444. createReferenceList()
  1445. $('#dialogmask').fadeIn()
  1446. $('#dig').fadeIn()
  1447. },
  1448. referenceEdit(ctrid) {
  1449. // 编辑
  1450. referenceEditTyp = 'edit'
  1451. referenceData = referenceList.find(function(item){
  1452. return item.ctrlId == ctrid
  1453. })
  1454. if(!referenceData) return
  1455. initRefrenceFormData(referenceData)
  1456. $('#dialogmask').fadeIn()
  1457. $('#dig').fadeIn()
  1458. },
  1459. })
  1460. contentEditMap.set(el, contentEdit)
  1461. }
  1462. // 从表单获取资料数据
  1463. function setRefrenceData(data){
  1464. const referenceData = {}
  1465. referenceData.id = data.id || '' // 资料id
  1466. referenceData.ctrlId = data.ctrlId || '' // 关联id
  1467. /* (网络资料) */
  1468. referenceData.referenceType= $("#info").val() // '参考类型资料(1.网络;2.著作;3.其他)'
  1469. referenceData.website = $("#website").val()
  1470. referenceData.articleName = $("#articleName").val()
  1471. referenceData.websiteName = $("#websiteName").val()
  1472. referenceData.publishTimeStr = $("#publishTimeStr").val()
  1473. referenceData.acitationTimeStr = $("#acitationTimeStr").val()
  1474. /* 著作资料)*/
  1475. referenceData.author= $("#author").val()
  1476. referenceData.workName= $("#workName").val()
  1477. referenceData.publicationPlace= $("#publicationPlace").val()
  1478. referenceData.press= $("#press").val()
  1479. referenceData.publicationYearStr= $("#publicationYearStr").val()
  1480. referenceData.acitationWeb= $("#acitationWeb").val()
  1481. /* (其他资料) */
  1482. referenceData.referenceDescription= $("#referenceDescription").val()
  1483. referenceData.imageDescription= $("#imageDescription").val()
  1484. referenceData.imageUrl = $("#referenceImgUrl").val()
  1485. referenceData.entryId = data.entryId || '' // 词条id
  1486. referenceData.entryType = data.entryType || ''
  1487. return referenceData
  1488. }
  1489. // 设置资料表单数据
  1490. function initRefrenceFormData(data){
  1491. $("#info").val(data.referenceType)
  1492. $("#website").val(data.website)
  1493. $("#articleName").val(data.articleName)
  1494. $("#websiteName").val(data.websiteName)
  1495. $("#publishTimeStr").val(data.publishTimeStr)
  1496. $("#acitationTimeStr").val(data.acitationTimeStr)
  1497. $("#author").val(data.author)
  1498. $("#workName").val(data.workName)
  1499. $("#publicationPlace").val(data.publicationPlace)
  1500. $("#press").val(data.press)
  1501. $("#publicationYearStr").val(data.publicationYearStr)
  1502. $("#acitationWeb").val(data.acitationWeb)
  1503. $("#referenceDescription").val(data.referenceDescription)
  1504. $("#imageDescription").val(data.imageDescription)
  1505. $("#referenceImgUrl").val(data.imageUrl)
  1506. }
  1507. // 创建信息栏item
  1508. function createParamItem(index){
  1509. var paramItem = $('<div class="param-item"></div>')
  1510. var paramName = $('<div class="param-name"></div>')
  1511. var paramNameInput = $('<input type="text" placeholder="例如:型号">')
  1512. paramNameInput.attr('name', 'paramList['+ index +'].name')
  1513. paramNameInput.attr('class','xxl-name')
  1514. paramNameInput.attr('id','paramName-'+index)
  1515. var paramContent = $('<div class="param-content"></div>')
  1516. var paramContentInput = $('<div class="content-edit"></div>')
  1517. paramContentInput.attr('id', 'param-' + index)
  1518. paramContentInput.attr('name', 'paramList['+index+'].content')
  1519. var deleteBtn = $('<a style="cursor: pointer">删除</a>')
  1520. paramName.append(paramNameInput)
  1521. paramContent.append(paramContentInput)
  1522. paramItem.append([paramName,paramContent,deleteBtn ])
  1523. deleteBtn.on('click', function(){
  1524. $(this).parents('.param-item').remove()
  1525. })
  1526. return paramItem
  1527. }
  1528. // 初始化信息栏
  1529. function initParamList(){
  1530. <c:forEach items="${cmBaikeProduct.paramList}" var="videoFile" varStatus="statusIndex">
  1531. var index=${statusIndex.index}
  1532. paramItemIndex = index
  1533. var paramItem = createParamItem(index)
  1534. $('#paramList .param-controls').append(paramItem)
  1535. createContentEdit('#param-' + index,'${videoFile.content}')
  1536. console.log('${videoFile.name}')
  1537. $('#paramName-'+index).val('${videoFile.name}')
  1538. </c:forEach>
  1539. // paramList.forEach(function(item, index){
  1540. // paramItemIndex = index
  1541. // var paramItem = createParamItem(index)
  1542. // $('#paramList .param-controls').append(paramItem)
  1543. // createContentEdit('#param-' + index)
  1544. // })
  1545. }
  1546. // 创建正文item
  1547. function createTextInfoItem(index, type){
  1548. var inputId = 'textInfo-' + index
  1549. var textInfoItem = $('<div class="bk-textInfo-item"><div>')
  1550. var input = null
  1551. var inputType=null
  1552. if(type == 3){
  1553. input = $('<div class="content-edit"></div>')
  1554. input.attr('id', inputId)
  1555. input.attr('name', 'textInfolist[' + index + '].dictionaryContent')
  1556. inputType=$('<input type="text" />')
  1557. inputType.attr('name','textInfolist[' + index + '].dictionaryType')
  1558. inputType.attr('value',type)
  1559. inputType.attr('style','display: none')
  1560. }else{
  1561. input = $('<input type="text" />')
  1562. input.attr('id', inputId)
  1563. input.attr('name', 'textInfolist[' + index + '].dictionaryContent')
  1564. var placeholder = type == 1 ? '一级标题' : '二级标题'
  1565. input.attr('placeholder', placeholder)
  1566. inputType=$('<input type="text" />')
  1567. inputType.attr('name','textInfolist[' + index + '].dictionaryType')
  1568. inputType.attr('value',type)
  1569. inputType.attr('style','display: none')
  1570. }
  1571. var control = $('<div class="bk-textInfo-control"></div>')
  1572. var first = $('<span>+一级标题</span>')
  1573. var second = $('<span>+二级标题</span>')
  1574. var content = $('<span>+内容</span>')
  1575. var deleteBtn = $('<span>删除</span>')
  1576. control.append([first, second, content, deleteBtn])
  1577. textInfoItem.append([input,inputType,control])
  1578. first.on('click', function(){
  1579. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 1))
  1580. })
  1581. second.on('click', function(){
  1582. var index = $(this).parents('.controls').find('.bk-textInfo-item').length +1
  1583. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 2))
  1584. })
  1585. content.on('click', function(){
  1586. var index = $(this).parents('.controls').find('.bk-textInfo-item').length +1
  1587. $(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 3))
  1588. var inputId = 'textInfo-' + textInfoItemIndex
  1589. createContentEdit('#' + inputId)
  1590. })
  1591. deleteBtn.on('click', function(){
  1592. $(this).parents('.bk-textInfo-item').remove()
  1593. })
  1594. return textInfoItem
  1595. }
  1596. // 初始化正文内容
  1597. function initTextInfoList(){
  1598. var te='${cmBaikeProduct.textInfolist}'
  1599. if(''==te ||null==te ||te=='[]'){
  1600. var textInfoList = [{type:1},{type:2},{type:3}]
  1601. textInfoList.forEach(function(item,index){
  1602. textInfoItemIndex = index
  1603. var inputId = 'textInfo-' + index
  1604. const textInfoIem = createTextInfoItem(index, item.type)
  1605. $('#textInfolist .controls').append(textInfoIem)
  1606. if(item.type == 3){
  1607. createContentEdit('#' + inputId)
  1608. }
  1609. })
  1610. }else{
  1611. <c:forEach items="${cmBaikeProduct.textInfolist}" var="videoFile" varStatus="statusIndex">
  1612. var index=${statusIndex.index}
  1613. textInfoItemIndex = index
  1614. var inputId = 'textInfo-' + index
  1615. var textInfoIem = createTextInfoItem(index, ${videoFile.dictionaryType})
  1616. $('#textInfolist .controls').append(textInfoIem)
  1617. console.log('${videoFile.dictionaryContent}')
  1618. if('${videoFile.dictionaryType}'=='3'){
  1619. createContentEdit('#' + inputId,'${videoFile.dictionaryContent}')
  1620. }else{
  1621. $('#textInfo-' + index).val('${videoFile.dictionaryContent}')
  1622. }
  1623. </c:forEach>
  1624. }
  1625. // $('#textInfolist .controls')
  1626. }
  1627. function createReferenceItem(referenceData){
  1628. var text=null
  1629. if(referenceData.publishTimeStr=='undefined'){
  1630. referenceData.publishTimeStr='111'
  1631. }
  1632. if(referenceData.referenceType == 1){
  1633. text = `
  1634. <div class="controls applicationsan">
  1635. <span class="del">
  1636. <a>\${referenceData.articleName}.</a>
  1637. </span>
  1638. <span class="del">\${referenceData.websiteName}.</span>
  1639. <span class="del">\${referenceData.publishTimeStr}.</span>
  1640. <span class="del">\${referenceData.acitationTimeStr}.</span>
  1641. </div>
  1642. `
  1643. }
  1644. if(referenceData.referenceType == 2){
  1645. text= `
  1646. <div class="controls applicationsan">
  1647. <span class="del">\${referenceData.author}.</span>
  1648. <span class="del">\${referenceData.workName}.</span>
  1649. <span class="del">\${referenceData.publicationPlace}.</span>
  1650. <span class="del">\${referenceData.press}.</span>
  1651. <span class="del">\${referenceData.publicationYearStr}.</span>
  1652. <span class="del">\${referenceData.acitationWeb}</span>
  1653. </div>
  1654. `
  1655. }
  1656. if(referenceData.referenceType == 3){
  1657. text= `
  1658. <div class="controls applicationsan">
  1659. <span class="del">\${referenceData.referenceDescription}.</span>
  1660. <span class="del">\${referenceData.imageDescription}.</span>
  1661. </div>
  1662. `
  1663. }
  1664. return text
  1665. }
  1666. function createAllReferenceItem(referenceData){
  1667. var text=null
  1668. if(referenceData.referenceType == 1){
  1669. text = `
  1670. <div class="controls applicationsan">
  1671. <span class="del">[\${referenceList.length}]</span>
  1672. <span class="del"><a>\${referenceData.articleName}.</a></span>
  1673. <span class="del">\${referenceData.websiteName}.</span>
  1674. <span class="del">\${referenceData.publishTimeStr}.</span>
  1675. <span class="del">\${referenceData.acitationTimeStr}.</span>
  1676. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1677. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1678. </div>
  1679. `
  1680. }
  1681. if(referenceData.referenceType == 2){
  1682. text= `
  1683. <div class="controls applicationsan">
  1684. <span class="del">[\${referenceList.length}]</span>
  1685. <span class="del">\${referenceData.author}.</span>
  1686. <span class="del">\${referenceData.workName}.</span>
  1687. <span class="del">\${referenceData.publicationPlace}.</span>
  1688. <span class="del">\${referenceData.press}.</span>
  1689. <span class="del">\${referenceData.publicationYearStr}.</span>
  1690. <span class="del">\${referenceData.acitationWeb}.</span>
  1691. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1692. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1693. </div>
  1694. `
  1695. }
  1696. if(referenceData.referenceType == 3){
  1697. text= `
  1698. <div class="controls applicationsan">
  1699. <span class="del">[\${referenceList.length}]</span>
  1700. <span class="del">\${referenceData.referenceDescription}.</span>
  1701. <span class="del">\${referenceData.imageDescription}.</span>
  1702. <a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
  1703. <a onclick="delMaterial(\${referenceData.id})">删除</a>
  1704. </div>
  1705. `
  1706. }
  1707. return text
  1708. }
  1709. // 只要referenceList数据有更新就执行一次
  1710. function createReferenceList(){
  1711. $('.check-reference-list').html('')
  1712. referenceList.forEach(function(refData, index){
  1713. console.log(refData)
  1714. var item = createReferenceItem(refData)
  1715. $('.check-reference-list').append(item)
  1716. })
  1717. $('.check-reference-list').find('.controls').on('click', function(){
  1718. var index = $(this).index() + 1
  1719. var result = referenceList[$(this).index()]
  1720. console.log(result)
  1721. if(!result) return
  1722. var con= createReferenceItem(result)
  1723. result.ctrlId = currentContentEdit.confirm(con, result.ctrlId, index)
  1724. $('#dialogmask').fadeOut()
  1725. $('#dig').fadeOut()
  1726. })
  1727. }
  1728. $(function(){
  1729. var refren='${cmBaikeProduct.referenceList}'
  1730. if(''==refren|| null==refren){
  1731. }else{
  1732. referenceList=JSON.parse(refren)
  1733. markCount=referenceList.length
  1734. console.log(markCount)
  1735. }
  1736. //初始化 义项名,词条概述
  1737. createContentEdit('#bk-name','${cmBaikeProduct.alias}')
  1738. createContentEdit('#discription','${cmBaikeProduct.discription}')
  1739. initParamList()
  1740. initTextInfoList()
  1741. $('#paramList .btn').on('click', function(){
  1742. var paramItem = createParamItem(++paramItemIndex)
  1743. $('#paramList .param-controls').append(paramItem)
  1744. createContentEdit('#param-' + paramItemIndex)
  1745. })
  1746. $('#dig .confirm').on('click', function(){
  1747. if(referenceEditTyp === 'add'){
  1748. markCount++
  1749. var result = setRefrenceData({})
  1750. var con=createReferenceItem(result)
  1751. result.ctrlId = currentContentEdit.confirm(con)
  1752. referenceList.push(result)
  1753. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1754. $(this).parents('#dig').fadeOut()
  1755. initRefrenceFormData({})
  1756. var item = createAllReferenceItem(result)
  1757. $('.bk-reference-list').append(item)
  1758. }else{
  1759. var result = setRefrenceData(referenceData)
  1760. const index = referenceList.findIndex(function(item){
  1761. return item.ctrlId == referenceData.ctrlId
  1762. })
  1763. referenceList.splice(index, 1, result)
  1764. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1765. $(this).parents('#dig').fadeOut()
  1766. initRefrenceFormData({})
  1767. }
  1768. var referen=JSON.stringify(referenceList)
  1769. $('#referenceList').val(referen);
  1770. })
  1771. $('#dig .cancel').on('click', function(){
  1772. $(this).parents('#dig').fadeOut()
  1773. $(this).parents('#dig').siblings('#dialogmask').fadeOut()
  1774. initRefrenceFormData({})
  1775. })
  1776. <%-- referenceList = [{ctrlId: 'FDIEKABKKNJEEJAN'}] // referenceList[0].reyt = 1 // referenceList:'[{"type": 1}]'--%>
  1777. <%--console.log('${cmBaikeProduct.materialInfo}')--%>
  1778. // 初始化编辑框引用资料列表
  1779. contentEditMap.forEach(function(item){
  1780. item.edit.ctridList.forEach(function(ctrlId){
  1781. var data = referenceList.find(function(ref){
  1782. return ref.ctrlId == ctrlId
  1783. })
  1784. if(!data) return
  1785. <%-- <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">--%>
  1786. <%-- </c:forEach>--%>
  1787. var text = createReferenceItem(data)
  1788. item.addLiteratureItem(ctrlId, text)
  1789. })
  1790. })
  1791. })
  1792. </script>
  1793. <script>
  1794. var paramIndex = 1;
  1795. var questionIndex = 2;
  1796. //给涉及到参考资料的标签赋值
  1797. $(function () {
  1798. $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
  1799. $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
  1800. var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
  1801. var MutationObserverConfig = {
  1802. childList: true,
  1803. subtree: true,
  1804. characterData: true
  1805. };
  1806. var observer = new MutationObserver(function (mutations) {
  1807. $.each(mutations, function (index, item) {
  1808. if (item.type === 'childList') {
  1809. // 在创建新的 element 时调用
  1810. var target = $(item.target),
  1811. thisWrapper = target.closest('.conList'),
  1812. nextEle = thisWrapper.parents('.controls').next();
  1813. thisWrapper.find('li').css('z-index', 99);
  1814. thisWrapper.find('.cancel-upload').show();
  1815. if (nextEle.hasClass('hide-pic')) {
  1816. nextEle.removeClass('hide-pic');
  1817. }
  1818. }
  1819. })
  1820. });
  1821. var observeEle1 = document.getElementsByClassName('main-image-list')[0];
  1822. var observeEle2 = document.getElementsByClassName('auth-qrCode-list')[0];
  1823. // var observeEle3 = document.getElementsByClassName('auth-image-list')[0];
  1824. var observeEle4 = document.getElementsByClassName('display-image-list')[0];
  1825. observer.observe(observeEle1, MutationObserverConfig);
  1826. observer.observe(observeEle2, MutationObserverConfig);
  1827. // observer.observe(observeEle3, MutationObserverConfig);
  1828. observer.observe(observeEle4, MutationObserverConfig);
  1829. $('body').on('click', '.cancel-upload',function() {
  1830. var wrapper = $(this).closest('.controls');
  1831. var controlsId = wrapper.attr('id');
  1832. wrapper.find('li').css('z-index','-1');
  1833. wrapper.find('input').val('');
  1834. $(this).hide();
  1835. if (controlsId == 'mainImageBox' || controlsId == 'authQrCodeBox' || controlsId=='mainIgeBox') {
  1836. wrapper.removeClass("hide-pic");
  1837. }
  1838. // else if (controlsId.indexOf('authImageBox') != -1) {
  1839. // if ($('.auth-image-list .cancel-upload:visible').length < 8) {
  1840. // wrapper.addClass("hide-pic");
  1841. // }else{
  1842. // wrapper.removeClass("hide-pic");
  1843. // }
  1844. // }
  1845. else if (controlsId.indexOf('displayImageBox') != -1) {
  1846. if ($('.display-image-list .cancel-upload:visible').length < 6) {
  1847. wrapper.addClass("hide-pic");
  1848. }else{
  1849. wrapper.removeClass("hide-pic");
  1850. }
  1851. }
  1852. wrapper.parent().append(wrapper.clone());
  1853. wrapper.remove();
  1854. $(".controls").each(function(i,ele){
  1855. if($(ele).find("input.input-xlarge").val()){
  1856. $(ele).next().removeClass("hide-pic")
  1857. }
  1858. })
  1859. });
  1860. $('body').on('click','.upload-content li',function() {
  1861. var index = $(this).closest('.conList').index() + 1,
  1862. str = 'image'+index+'FinderOpen';
  1863. eval(str+'()');
  1864. });
  1865. $(window).on("load", function () {
  1866. setTimeout(function () {
  1867. $("#authQrCodeBox").find("input.input-xlarge").each(function (i, ele) {
  1868. if ($(ele).val()) {
  1869. $(ele).next().find("li").css("z-index", "99");
  1870. $(ele).parents(".conList").find(".cancel-upload").show();
  1871. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1872. }
  1873. })
  1874. $("#mainImageBox").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. $(".mainIgeBox").find("input.input-xlarge").each(function (i, ele) {
  1882. if ($(ele).val()) {
  1883. $(ele).next().find("li").css("z-index", "99");
  1884. $(ele).parents(".conList").find(".cancel-upload").show();
  1885. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1886. }
  1887. })
  1888. for (var i = 0; i < 8; i++) {
  1889. $("#authImageBox"+i).find("input.input-xlarge").each(function (i, ele) {
  1890. if ($(ele).val()) {
  1891. $(ele).next().find("li").css("z-index", "99");
  1892. $(ele).parents(".conList").find(".cancel-upload").show();
  1893. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1894. }
  1895. })
  1896. }
  1897. for (var i = 0; i < 6; i++) {
  1898. $("#displayImageBox"+i).find("input.input-xlarge").each(function (i, ele) {
  1899. if ($(ele).val()) {
  1900. $(ele).next().find("li").css("z-index", "99");
  1901. $(ele).parents(".conList").find(".cancel-upload").show();
  1902. $(ele).parent().parents(".controls").next().removeClass("hide-pic")
  1903. }
  1904. })
  1905. }
  1906. }, 200);
  1907. });
  1908. var fileIds = $("#fileIds").val();
  1909. //点击上传按钮后上传文件
  1910. $('#addSubmit').click(function () {
  1911. var fileIdArr = fileIds.split(',');
  1912. if (fileIdArr.length >= 7) {
  1913. alertx('最多上传6个视频');
  1914. return;
  1915. }
  1916. var filesById = document.getElementById('productFile');
  1917. var files = $('#productFile');
  1918. var fileList = files.prop('files');
  1919. var fileTitle = $('#fileTitle').val();
  1920. var fileName = $('#uploadFileName').val();
  1921. if (fileTitle == '') {
  1922. alertx('请输入视频标题')
  1923. return;
  1924. }
  1925. if (files === '' || files.length == 0 || fileName == '') {
  1926. alertx('请选择上传文件');
  1927. return;
  1928. }
  1929. $("#fileTitle").val("");
  1930. $("#uploadFileName").val("");
  1931. var data = new FormData();
  1932. var productId = $("#id").val();
  1933. data.append('file', fileList[0]);
  1934. data.append('fileTitle', fileTitle);
  1935. data.append('fileName', fileName);
  1936. data.append('productId', productId);
  1937. data.append('fileIds', fileIds);
  1938. $('.upload-loading').css("display", "inline");
  1939. $.ajax({
  1940. url: "${ctx}/baike/cmBaikeProduct/upload",
  1941. data: data,
  1942. type: "POST",
  1943. processData: false,
  1944. contentType: false,
  1945. dataType: "json",
  1946. success: function (res) {
  1947. if (res.success) {
  1948. filesById.value = '';
  1949. renderFileList(res.productFile);
  1950. $('.upload-loading').hide();
  1951. } else {
  1952. $.jBox.tip(res.msg, 'error');
  1953. $("#uploadFileName").val(fileName);
  1954. $('.upload-loading').hide();
  1955. }
  1956. },
  1957. error: function (json) {
  1958. }
  1959. });
  1960. })
  1961. var fileList = [];
  1962. var files = document.getElementById("productFile"), renderFileList;
  1963. //选择上传文件后显示文件名称
  1964. files.addEventListener("change", function (event) {
  1965. var name = event.target.files[0].name;
  1966. console.log(name)
  1967. $('#uploadFileName').val(name);
  1968. });
  1969. var fileListDisplay = document.getElementById('file-list-display');
  1970. renderFileList = function (data) {
  1971. fileIds += data.id + ',';
  1972. console.log(fileIds);
  1973. $('#fileIds').val(fileIds);
  1974. fileList.push({fileTitle: data.fileTitle, id: data.id, ossUrl: data.ossUrl});
  1975. fileList.forEach(function (file, index) {
  1976. var fileDisplayEl = document.createElement("p");
  1977. var deleteFile = document.createElement("span");
  1978. var viewFile = document.createElement("span");
  1979. var viewFileUrl = document.createElement("a");
  1980. //预览链接
  1981. viewFileUrl.innerHTML = '预览';
  1982. viewFileUrl.setAttribute("onclick", "previewVideo('" + file.ossUrl + "')");
  1983. viewFileUrl.setAttribute("target", "_blank");
  1984. //预览按钮
  1985. viewFile.className = 'viewFile';
  1986. console.log(viewFile);
  1987. viewFile.setAttribute("class","del");
  1988. viewFile.appendChild(viewFileUrl);
  1989. //删除按钮
  1990. deleteFile.innerHTML = '删除';
  1991. deleteFile.className = 'deleteFile';
  1992. console.log(deleteFile);
  1993. deleteFile.setAttribute("class","del");
  1994. deleteFile.setAttribute("onclick", "dataDelete(this, " + file.id + ")");
  1995. fileDisplayEl.setAttribute("id", file.id);
  1996. fileDisplayEl.innerHTML = file.fileTitle;
  1997. fileDisplayEl.appendChild(viewFile);
  1998. fileDisplayEl.appendChild(deleteFile);
  1999. fileListDisplay.appendChild(fileDisplayEl);
  2000. });
  2001. fileList.splice(0, fileList.length);
  2002. };
  2003. })
  2004. //删除参数
  2005. function deleteParam(index) {
  2006. $("#paramRow" + index).remove();
  2007. }
  2008. var content=10;
  2009. //添加正文
  2010. var d=1;
  2011. addDiction =function(dicname,diny,dicTyp){//输入框类型 输入框个数 按钮类型
  2012. $("."+dicname+diny).append("<div class=\"controls "+dicname+d+"\" style=\"margin-left: 0px;margin-top: 5px \">" +
  2013. "<input name=\"textInfo[0].textType\" value =\"1\" type=\"hidden\"/>"+
  2014. "<input htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"(请输入"+dicTyp+")\"/>" +
  2015. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"一级目录\" style=\"margin-left: 15px\" onclick=\"addDiction('"+dicname+"',"+d+",'一级目录'"+")\">一级目录</button>"+
  2016. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"二级目录\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'二级目录'"+")\">二级目录</button>"+
  2017. "<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"内容\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'内容'"+")\">内容</button>"+
  2018. "</div>")
  2019. d=d+1;
  2020. }
  2021. /**
  2022. * @param obj
  2023. * jquery控制input只能输入数字
  2024. */
  2025. function onlynum(obj) {
  2026. obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
  2027. }
  2028. //删除文件
  2029. function dataDelete(that, id) {
  2030. console.log($(that).text());
  2031. $(that).parent().remove();
  2032. var fileIds = $("#fileIds").val();
  2033. if (fileIds.indexOf(id)) {
  2034. fileIds = fileIds.replace(id + ',', '');
  2035. $("#fileIds").val(fileIds);
  2036. }
  2037. $.ajax({
  2038. url: "${ctx}/baike/cmBaikeProduct/deleteFile",
  2039. data: {"fileId": id},
  2040. async: false,
  2041. type: "POST"
  2042. });
  2043. }
  2044. function previewVideo(url) {
  2045. var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
  2046. var title = "视频播放";
  2047. top.$.jBox("iframe:" + url, {
  2048. iframeScrolling: 'yes',
  2049. width: 1000,
  2050. height: 750,
  2051. persistent: true,
  2052. title: title,
  2053. buttons: {"关闭": '-1'}
  2054. });
  2055. }
  2056. function updateAuditStatus(auditStatus) {
  2057. var elementById = document.getElementById("failReasonDiv");
  2058. if (auditStatus === 2) {
  2059. elementById.style.cssText = "display:none";
  2060. } else {
  2061. elementById.style.cssText = "";
  2062. }
  2063. }
  2064. //关键词联动
  2065. function autocomplete(text) {
  2066. var keywordlist=new Array();
  2067. <c:forEach items="${SearchFrequencyVo}" var="search">
  2068. keywordlist.push("${search.keyword}")
  2069. </c:forEach>
  2070. return keywordlist.filter(function (item) {
  2071. return text && item.indexOf(text) > -1;
  2072. });
  2073. }
  2074. new AutoComplete({
  2075. el: '.auto-input',
  2076. callback: autocomplete,
  2077. offsetLeft: -25
  2078. });
  2079. </script>
  2080. </body>
  2081. </html>