설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

add.htm 53KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="overflow-y: scroll;">
  3. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  4. <div id="append_parent"></div>
  5. <div id="ajaxwaitid"></div>
  6. <div class="page min-hg-c-10">
  7. <form class="form-horizontal" id="post_form" action="{:url('ZcwdPosition/add')}" method="post">
  8. <div class="ncap-form-default">
  9. <dl class="row">
  10. <dt class="tit">
  11. <label for="type">申报类目</label>
  12. </dt>
  13. <dd class="opt">
  14. <!--<label class="curpoin"><input type="radio" id="type{$field1.id}" name="type" value="{$field1.id}" onclick="TypeSwitch({$field1.id});">{$field1.name}</label>
  15. -->
  16. <?php
  17. /*
  18. * <select name="type" class="select" style="margin:0px 5px;height:30px;">
  19. <option value="">--选择地区--</option>
  20. {eyou:foreach name='$pro_list' item='field1'}
  21. <option value="{$field1.id}" {eq name="$Request.param.type" value="$field1.id"}selected{/eq}>{$field1.name}</option>
  22. {/eyou:foreach}
  23. </select>
  24. */
  25. ?>
  26. <select name="type" class="select" id="selectTest" style="margin:0px 5px;height:30px;">
  27. <option value="">--选择申报类目--</option>
  28. {eyou:foreach name='$pos_list' item='field1'}
  29. <option value="{$field1.id}" {eq name="$Request.param.type" value="$field1.id"}selected{/eq}>{$field1.title}</option>
  30. {/eyou:foreach}
  31. </select>
  32. <span style="margin-left: 14px;">服务地区范围: <font id="map_desc">全国</font></span>
  33. <script>
  34. $(function(){
  35. $("#selectTest").change(function(e){
  36. console.log($(this).val());
  37. //发送ajax 请求地区数据
  38. $.ajax({
  39. type:'POST',
  40. url:"{:url('ZcwdPosition/getMap', ['_ajax'=>1])}",
  41. data:{
  42. id: $(this).val()
  43. ,_ajax:1
  44. },
  45. success:function(res){
  46. $('#map_desc').html(res.data);
  47. //重置前置条件
  48. $('#selectTest666').val('0');
  49. $('#citychoose').hide();
  50. $('#selectTest777').val('0');
  51. $('#citychoose2').hide();
  52. }
  53. });
  54. //请求子类数据
  55. $.ajax({
  56. type:'POST',
  57. url:"{:url('ZcwdPosition/getZcSon', ['_ajax'=>1])}",
  58. data:{
  59. id: $(this).val()
  60. ,_ajax:1
  61. },
  62. success:function(res){
  63. $('#selectTest889999').html(res.data);
  64. }
  65. });
  66. //请求等级数据
  67. $.ajax({
  68. type:'POST',
  69. url:"{:url('ZcwdPosition/getLess', ['_ajax'=>1])}",
  70. data:{
  71. id: $(this).val()
  72. ,_ajax:1
  73. },
  74. success:function(res){
  75. $('#selectTest222').html(res.data);
  76. }
  77. });
  78. });
  79. });
  80. </script>
  81. <!-- <span class="err">
  82. </span>
  83. <p class="notic">
  84. </p>-->
  85. <p class="notic2 red" id="title_tips" style="margin-top:10px;">
  86. 提示: 申报专业需要先设定地区范围,且名称不允许重复,前端可根据区域筛选出相关的申报专业;
  87. </p>
  88. </dd>
  89. </dl>
  90. <dl class="row">
  91. <dt class="tit">
  92. <label for="type">申报专业</label>
  93. </dt>
  94. <dd class="opt">
  95. <!--<label class="curpoin"><input type="radio" id="type{$field1.id}" name="type" value="{$field1.id}" onclick="TypeSwitch({$field1.id});">{$field1.name}</label>
  96. -->
  97. <?php
  98. /*
  99. * <select name="type" class="select" style="margin:0px 5px;height:30px;">
  100. <option value="">--选择地区--</option>
  101. {eyou:foreach name='$pro_list' item='field1'}
  102. <option value="{$field1.id}" {eq name="$Request.param.type" value="$field1.id"}selected{/eq}>{$field1.name}</option>
  103. {/eyou:foreach}
  104. </select>
  105. */
  106. ?>
  107. <select name="catid" class="select" id="selectTest889999" style="margin:0px 5px;height:30px;">
  108. <option value="0">--选择申报专业--</option>
  109. </select>
  110. <span style="margin-left: 14px;"></span>
  111. <script>
  112. $(function(){
  113. $("#selectTest889999").change(function(e){
  114. });
  115. });
  116. </script>
  117. <!-- <span class="err">
  118. </span>
  119. <p class="notic">
  120. </p>-->
  121. <p class="notic2 red" id="title_tips" style="margin-top:10px;">
  122. </p>
  123. </dd>
  124. </dl>
  125. <dl class="row">
  126. <dt class="tit"> <label for="title"><em>*</em>精确区域</label> </dt>
  127. <dd class="opt">
  128. <select name="sf" class="select" id="selectTest000_1" style="margin:0px 5px;height:30px;width:120px;">
  129. <option value="0">全国</option>
  130. {eyou:foreach name='$pro_list' item='field1'}
  131. <option value="{$field1.id}" {eq name="$curr_id" value="$field1.id"}selected{/eq}>{$field1.name}</option>
  132. {/eyou:foreach}
  133. </select>
  134. <select name="cs" class="select" id="selectTest000_2" style="margin:0px 5px;height:30px;width:120px;display: none;">
  135. <option value="0">选择市</option>
  136. </select>
  137. <p class="notic2 red" id="title_tips" style="margin-top:10px;">
  138. 提示: 每个申报专业根据精确区域可对应多条规则(即当前设定针对某个区域);
  139. </p>
  140. <script>
  141. $(function(){
  142. $("#selectTest000_1").change(function(e){
  143. console.log($(this).val());
  144. if($("#selectTest000_1").val() == 0){
  145. $('#selectTest000_2').hide();
  146. }else{
  147. //发送ajax 请求地区数据
  148. $.ajax({
  149. type:'POST',
  150. url:"{:url('ZcwdPosition/getCity', ['_ajax'=>1])}",
  151. data:{
  152. id: $("#selectTest000_1").val()
  153. ,_ajax:1
  154. },
  155. success:function(res){
  156. $('#selectTest000_2').html(res.data);
  157. //重置前置条件
  158. $('#selectTest000_2').show();
  159. }
  160. });
  161. }
  162. });
  163. });
  164. </script>
  165. </dd>
  166. </dl>
  167. <dl class="row">
  168. <dt class="tit"> <label for="title"><em>*</em>申报等级</label> </dt>
  169. <dd class="opt">
  170. <select name="sbdj" class="select" id="selectTest222" style="margin:0px 5px;height:30px;">
  171. <option value="0">请选择</option>
  172. <!--<option value="0">初级助理工程师</option>
  173. <option value="1">初级技术员</option>
  174. <option value="2">中级</option>
  175. <option value="3">品牌中级</option>
  176. <option value="4">副高级</option>-->
  177. </select>
  178. <p class="notic2 red" id="title_tips" style="margin-top:10px;">
  179. 提示: 每个申报专业每个区域(省市)每个等级对应一条规则;
  180. </p>
  181. </dd>
  182. </dl>
  183. <?php
  184. /*
  185. * 字段模板
  186. * <dl class="row">
  187. <dt class="tit"> <label for="title"><em>*</em>年龄区间:</label> </dt>
  188. <dd class="opt">
  189. <input type="text" name="title" id="title" onkeyup="DetectionTitleRepeat(this);" class="input-txt" autocomplete="off" value="">
  190. <span style="">助理工程师,技术员</span>
  191. <span class="err"></span>
  192. <p class="notic2 red" id="title_tips">
  193. </p>
  194. </dd>
  195. </dl>
  196. */
  197. ?>
  198. <div style="display: none;">
  199. <hr/>
  200. <b>基本要求设置:</b>
  201. <dl class="row">
  202. <dt class="tit"> <label for="title"><em>*</em>年龄区间:</label> </dt>
  203. <dd class="opt">
  204. <span style="" id="ega-b">
  205. <label class="curpoin">
  206. <input type="radio" name="is_ega" value="0" checked>年龄不限制</label>
  207. &nbsp;&nbsp;
  208. <label class="curpoin">
  209. <input type="radio" name="is_ega" value="1">年龄限制</label>
  210. </span>
  211. <span id="ega_input" style="display:none; margin-left: 15px !important;text-align: center;">
  212. <input style="width:50px !important;" type="number" name="ega[]" id="ega333" class="input-txt" autocomplete="off" value="23">
  213. &nbsp;&nbsp;-&nbsp;&nbsp;
  214. <input style="width:50px !important;" type="number" name="ega[]" id="ega333" class="input-txt" autocomplete="off" value="60">&nbsp;
  215. </span>
  216. <script>
  217. $(function(){
  218. $('#ega-b input[name="is_ega"]').change(function (){
  219. console.log("fdfd");
  220. if($(this).val() == 1){
  221. $('#ega_input').show();
  222. }else{
  223. $('#ega_input').hide();
  224. }
  225. });
  226. });
  227. </script>
  228. <span class="err"></span>
  229. <p class="notic2 red" id="title_tips">
  230. </p>
  231. </dd>
  232. </dl>
  233. <dl class="row">
  234. <dt class="tit">
  235. <label for="type">毕业专业</label>
  236. </dt>
  237. <dd class="opt">
  238. <!--<label class="curpoin"><input type="radio" id="type{$field1.id}" name="type" value="{$field1.id}" onclick="TypeSwitch({$field1.id});">{$field1.name}</label>
  239. -->
  240. <?php
  241. /*
  242. * {eyou:foreach name='$pro_list' item='field1'}
  243. <option value="{$field1.id}" {eq name="$Request.param.type" value="$field1.id"}selected{/eq}>{$field1.name}</option>
  244. {/eyou:foreach}
  245. */
  246. ?>
  247. <select name="byzy" class="select" id="selectTest777" style="margin:0px 5px;height:30px;width:130px;">
  248. <option value="0">不要求</option>
  249. <option value="1">指定相关要求</option>
  250. </select>
  251. <script>
  252. $(function(){
  253. $("#selectTest777").change(function(e){
  254. var item = $("#selectTest").val();
  255. if(item == '' || item == 0){
  256. layer.msg('请先选择申报专业!', {icon: 2,time: 1000});
  257. $("#selectTest777").val('0');
  258. return false;
  259. }
  260. console.log(item);
  261. //发送ajax 请求地区数据
  262. $.ajax({
  263. type:'POST',
  264. url:"{:url('ZcwdPosition/getZs2', ['_ajax'=>1])}",
  265. data:{
  266. id: item //获取当前专业
  267. ,_ajax:1
  268. },
  269. success:function(res){
  270. $('#zhengshu2').html(res.data);
  271. }
  272. });
  273. console.log($(this).val());
  274. var v = $(this).val();
  275. if(v == 1){
  276. $('#citychoose2').show();
  277. }else{
  278. $('#citychoose2').hide();
  279. }
  280. });
  281. });
  282. </script>
  283. <span class="err"></span>
  284. <p class="notic"></p>
  285. </dd>
  286. </dl>
  287. <dl class="row" id="citychoose2" style="display: none;">
  288. <dt class="tit"> <label for="title"><em>*</em>专业选择</label> </dt>
  289. <dd class="opt">
  290. <!---checked-->
  291. <div id="zhengshu2"></div>
  292. <span class="err"></span>
  293. <p class="notic2 red" id="title_tips"></p>
  294. </dd>
  295. </dl>
  296. <dl class="row">
  297. <dt class="tit"> <label for="title"><em>*</em>学历要求</label> </dt>
  298. <dd class="opt">
  299. <select name="xlyq" class="select" id="selectTest333" style="margin:0px 5px;height:30px;width:130px;">
  300. <option value="0">不限制</option>
  301. <option value="1">中专</option>
  302. <option value="2">高技</option>
  303. <option value="3">大专</option>
  304. <option value="4">本科</option>
  305. <option value="5">硕士</option>
  306. <option value="6">博士</option>
  307. </select>
  308. 以上
  309. </dd>
  310. </dl>
  311. <dl class="row">
  312. <dt class="tit"> <label for="title"><em>*</em>学校类型</label> </dt>
  313. <dd class="opt">
  314. <label class="curpoin">
  315. <input type="radio" name="xxlx" value="0" checked>不限制</label>
  316. &nbsp;&nbsp;
  317. <label class="curpoin">
  318. <input type="radio" name="xxlx" value="1">全日制</label>
  319. &nbsp;&nbsp;
  320. <label class="curpoin">
  321. <input type="radio" name="xxlx" value="2">非全日制</label>
  322. </dd>
  323. </dl>
  324. <dl class="row">
  325. <dt class="tit"> <label for="title"><em>*</em>毕业时间:</label> </dt>
  326. <dd class="opt">
  327. <span style="" id="bysj-b">
  328. <label class="curpoin">
  329. <input type="radio" name="bysj" value="0" checked>不限制</label>
  330. &nbsp;&nbsp;
  331. <label class="curpoin">
  332. <input type="radio" name="bysj" value="1">限制</label>
  333. </span>
  334. <span id="bysj_input" style="display:none; margin-left: 15px !important;text-align: center;">
  335. >=
  336. <input style="width:50px !important;" type="number" name="bysj_time" id="bysj333" class="input-txt" autocomplete="off" value="1">
  337. &nbsp;年
  338. </span>
  339. <script>
  340. $(function(){
  341. $('#bysj-b input[name="bysj"]').change(function (){
  342. console.log("fdfd");
  343. if($(this).val() == 1){
  344. $('#bysj_input').show();
  345. }else{
  346. $('#bysj_input').hide();
  347. }
  348. });
  349. });
  350. </script>
  351. <span class="err"></span>
  352. <p class="notic2 red" id="title_tips">
  353. </p>
  354. </dd>
  355. </dl>
  356. <hr/>
  357. <b>设置前置条件:</b>
  358. <dl class="row">
  359. <dt class="tit">
  360. <label for="type">是否需要证书</label>
  361. </dt>
  362. <dd class="opt">
  363. <!--<label class="curpoin"><input type="radio" id="type{$field1.id}" name="type" value="{$field1.id}" onclick="TypeSwitch({$field1.id});">{$field1.name}</label>
  364. -->
  365. <?php
  366. /*
  367. * {eyou:foreach name='$pro_list' item='field1'}
  368. <option value="{$field1.id}" {eq name="$Request.param.type" value="$field1.id"}selected{/eq}>{$field1.name}</option>
  369. {/eyou:foreach}
  370. */
  371. ?>
  372. <select name="is_zs" class="select" id="selectTest666" style="margin:0px 5px;height:30px;width:130px;">
  373. <option value="0">不需要</option>
  374. <option value="1">需要</option>
  375. </select>
  376. <script>
  377. $(function(){
  378. $("#selectTest666").change(function(e){
  379. var item = $("#selectTest").val();
  380. if(item == '' || item == 0){
  381. layer.msg('请先选择申报专业!', {icon: 2,time: 1000});
  382. $("#selectTest666").val('0');
  383. return false;
  384. }
  385. console.log(item);
  386. //发送ajax 请求地区数据
  387. $.ajax({
  388. type:'POST',
  389. url:"{:url('ZcwdPosition/getZs', ['_ajax'=>1])}",
  390. data:{
  391. id: item //获取当前专业
  392. ,_ajax:1
  393. },
  394. success:function(res){
  395. $('#zhengshu').html(res.data);
  396. }
  397. });
  398. console.log($(this).val());
  399. var v = $(this).val();
  400. if(v == 1){
  401. $('#citychoose').show();
  402. }else{
  403. $('#citychoose').hide();
  404. }
  405. });
  406. });
  407. </script>
  408. <span class="err"></span>
  409. <p class="notic"></p>
  410. </dd>
  411. </dl>
  412. <dl class="row" id="citychoose" style="display: none;">
  413. <dt class="tit"> <label for="title"><em>*</em>证书选择</label> </dt>
  414. <dd class="opt">
  415. <!---checked-->
  416. <div id="zhengshu"></div>
  417. <span class="err"></span>
  418. <p class="notic2 red" id="title_tips"></p>
  419. </dd>
  420. </dl>
  421. <dl class="row">
  422. <dt class="tit"> <label for="title"><em>*</em>工作时间年限</label> </dt>
  423. <dd class="opt">
  424. <select name="sjnx" class="select" id="selectTest888" style="margin:0px 5px;height:30px;width:130px;">
  425. <option value="0">不限制</option>
  426. <option value="1">1年</option>
  427. <option value="2">2年</option>
  428. <option value="3">3年</option>
  429. <option value="4">4年</option>
  430. <option value="5">5年</option>
  431. <option value="6">6年</option>
  432. <option value="7">7年</option>
  433. <option value="8">8年</option>
  434. </select>
  435. 以上(包括)
  436. </dd>
  437. </dl>
  438. <dl class="row">
  439. <dt class="tit"> <label for="title"><em>*</em>工作要求:</label> </dt>
  440. <dd class="opt">
  441. {eyou:for start='1' end='10'}
  442. {$i}.&nbsp;<input type="text" name="gzyq[]" value="" id="title" class="input-txt" autocomplete="off" style="margin-top: 5px;width: 800px !important;"><br/>
  443. {/eyou:for}
  444. </dd>
  445. </dl>
  446. <hr/>
  447. <b>其他:</b>
  448. <?php
  449. /*
  450. * <dl class="row 1615775137_dl" style="display: none;" id="1615775137_1">
  451. <dt class="tit"> <label>主题背景</label> </dt>
  452. <dd class="opt">
  453. <div class="tab-pane" id="tab_imgupload">
  454. <table class="table table-bordered">
  455. <tbody>
  456. <tr>
  457. <td >
  458. <div class="sort-list">
  459. <div class="images_upload">
  460. </div>
  461. </div>
  462. <a href="javascript:void(0);" onClick="GetUploadify(30,'','allimg','imgupload_call_back');" class="img-upload b-img-upload mb15" title="点击上传">
  463. <div class="y-line"></div>
  464. <div class="x-line"></div>
  465. </a>
  466. </td>
  467. </tr>
  468. </tbody>
  469. </table>
  470. </div>
  471. <!-- 上传图片显示的样板 start -->
  472. <div class="images_upload_tpl none">
  473. <div class="images_upload ic">
  474. <div class="ic">
  475. <div class='upimg' title="拖动修改排序" onmouseover="upimgMouseover(this);" onmouseout="upimgMouseout(this);">
  476. <div class='icaction' style="display: none">
  477. <span class="load_images" onclick="">
  478. <a href="javascript:void(0);" style="color: white">
  479. <i class='fa fa-search-plus'></i>大图
  480. </a>
  481. </span>
  482. <span class="load_images" onclick="">
  483. <i class='fa fa-file-text-o'></i>信息
  484. </span>
  485. </div>
  486. <div class='cover-bg' style="display: none"></div>
  487. <img src="__STATIC__/admin/images/add-button.jpg"/>
  488. <a class="delect" href="javascript:void(0);" title="删除"></a>
  489. </div>
  490. <div class="load_input" data-showOrHide="hide">
  491. <input type="hidden"/>
  492. <span class="span_input"> <input type="hidden"/> </span>
  493. <textarea placeholder="请输入标题..." style="height: 28px;"></textarea>
  494. <textarea placeholder="请输入链接网址..." style="height: 28px;"></textarea>
  495. <textarea placeholder="广告注释:支持HTML代码" style="height: 64px;"></textarea>
  496. <div class="operation">
  497. <a href="javascript:void(0)">&nbsp;&nbsp;</a>
  498. <a href="javascript:void(0)">&nbsp;&nbsp;</a>
  499. <a style="width: 32%;" href="javascript:void(0);">&nbsp;&nbsp;</a>
  500. </div>
  501. </div>
  502. </div>
  503. </div>
  504. </div>
  505. <!-- 上传图片显示的样板 end -->
  506. </dd>
  507. </dl>
  508. */
  509. ?>
  510. <dl class="row 1615775137_dl" style="display: none;" id="1615775137_2">
  511. <dt class="tit"> <label for="type">广告内容</label> </dt>
  512. <dd class="opt">
  513. <input type="text" name="video_litpic" id="video_litpic" class="input-txt">
  514. <input type="file" id="courseware_file" data-type='local' onchange="upload_video_litpic_1615775137(this)" style="display: none;">
  515. {eq name="$WeappOpen.qny_open" value="1"}
  516. &nbsp;<a href="javascript:void(0);" class="ncap-btn ncap-btn-green" id="upload_video_litpic_qiniu" onclick="$('#courseware_file').attr('data-type', 'qiniu').trigger('click');">七牛云上传</a>
  517. {/eq}
  518. {eq name="$WeappOpen.oss_open" value="1"}
  519. &nbsp;<a href="javascript:void(0);" class="ncap-btn ncap-btn-green" id="upload_video_litpic_oss" onclick="$('#courseware_file').attr('data-type', 'oss').trigger('click');">oss上传</a>
  520. {/eq}
  521. {eq name="$WeappOpen.cos_open" value="1"}
  522. &nbsp;<a href="javascript:void(0);" class="ncap-btn ncap-btn-green" id="upload_video_litpic_cos" onclick="$('#courseware_file').attr('data-type', 'cos').trigger('click');">cos上传</a>
  523. {/eq}
  524. &nbsp;<a href="javascript:void(0);" class="ncap-btn ncap-btn-green " id="upload_video_litpic_local" onclick="$('#courseware_file').attr('data-type', 'local').trigger('click');">本地上传</a>
  525. <input type="hidden" id="OpenPreviewVideoUrl" value="{:url('ZcwdPosition/open_preview_video')}">
  526. &nbsp;<a href="javascript:void(0);" class="ncap-btn ncap-btn-green" id="PreviewVideo" onclick="OpenPreviewVideo();">预览</a>
  527. </dd>
  528. </dl>
  529. <dl class="row 1615775137_dl" style="display: none;" id="1615775137_3">
  530. <dt class="tit"> <label for="type">广告内容</label> </dt>
  531. <dd class="opt">
  532. <textarea rows="5" cols="60" id="html_intro" name="html_intro" style="height: 200px;"></textarea>
  533. <span class="err"></span>
  534. <p class="notic"></p>
  535. </dd>
  536. </dl>
  537. <dl class="row">
  538. <dt class="tit">
  539. <label>其他条件</label>
  540. </dt>
  541. <dd class="opt">
  542. <textarea rows="5" cols="60" id="intro" name="qttj" style="height:60px;"></textarea>
  543. <span class="err"></span>
  544. <p class="notic"></p>
  545. </dd>
  546. </dl>
  547. <dl class="row">
  548. <dt class="tit">
  549. <label>输出结果</label>
  550. </dt>
  551. <dd class="opt">
  552. 匹配算法: 前端根据选择的申报专业和所选资料,按所设定的规则(多条)进行对比,结果可能符合多个区域(符合省市),生成多个报告;
  553. <span class="err"></span>
  554. <p class="notic"></p>
  555. </dd>
  556. </dl>
  557. </div>
  558. <div class="bot"><a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a></div>
  559. </div>
  560. </form>
  561. </div>
  562. <script type="text/javascript">
  563. var SelectedType = 1;
  564. $(function() {
  565. // 新增时,广告类型默认选中图片类型
  566. $('#type1').prop('checked', 'checked');
  567. // 新增时,默认显示图片上传
  568. $('#1615775137_1').show();
  569. // 多媒体类型 && 广告内容不为空 则执行显示 否则 执行隐藏
  570. VideoLitpicValue('#video_litpic');
  571. });
  572. // 切换广告类型
  573. function TypeSwitch(typeValue) {
  574. // 隐藏全部类型内容
  575. $('.1615775137_dl').hide();
  576. // 显示指定类型内容
  577. $('#1615775137_'+typeValue).show();
  578. // 切换类型后设置为当前切换的类型
  579. SelectedType = typeValue;
  580. // 多媒体类型 && 广告内容不为空 则执行显示 否则 执行隐藏
  581. VideoLitpicValue('#video_litpic');
  582. }
  583. // 多媒体类型 && 广告内容不为空 则执行显示 否则 执行隐藏
  584. function VideoLitpicValue(obj) {
  585. // 获取广告内容(多媒体为播放链接)
  586. // var video_litpic = $(obj).val();
  587. // 判断隐藏/显示预览按钮if (2 == SelectedType && video_litpic)
  588. if (2 == SelectedType) {
  589. $('#PreviewVideo').show();
  590. } else {
  591. $('#PreviewVideo').hide();
  592. }
  593. }
  594. // 打开预览视频
  595. function OpenPreviewVideo() {
  596. // 获取视频链接
  597. var video_litpic = $('#video_litpic').val();
  598. if (video_litpic == '') {
  599. $('#video_litpic').focus();
  600. showErrorMsg('请先上传视频');
  601. return false;
  602. }
  603. /* 视频链接后缀验证处理 */
  604. var fileExt = video_litpic.substr(video_litpic.lastIndexOf('.')).toLowerCase();
  605. var fileExt = judgeExt(fileExt);
  606. if (fileExt == -1) {
  607. $('#video_litpic').focus();
  608. showErrorMsg('不支持的视频格式,可在附件设置中修改');
  609. return false;
  610. }
  611. /* END */
  612. /* 视频链接是否存在斜杠处理 */
  613. var fileInfo = video_litpic.lastIndexOf('/');
  614. if (fileInfo == -1) {
  615. $('#video_litpic').focus();
  616. showErrorMsg('视频链接不完整,无法正常预览');
  617. return false;
  618. }
  619. /* END */
  620. // 打开视频播放
  621. $.ajax({
  622. type : 'post',
  623. url : $('#OpenPreviewVideoUrl').val(),
  624. data : {video_litpic: video_litpic},
  625. dataType : 'json',
  626. success : function(res) {
  627. if (1 == res.code) {
  628. var PreviewVideo = "<video style='width:100%; height:100%;' src='"+res.url+"' controls preload='auto' oncontextmenu='return fase' autoplay></video>";
  629. layer.open({
  630. type: 1,
  631. title: false,
  632. fixed: true, //不固定
  633. shadeClose: false,
  634. shade: layer_shade,
  635. area: ['80%', '80%'],
  636. content: PreviewVideo
  637. });
  638. } else {
  639. showErrorMsg(res.msg);
  640. }
  641. },
  642. error: function(e) {
  643. showErrorAlert(e.responseText);
  644. }
  645. });
  646. }
  647. // 上传媒体文件
  648. function upload_video_litpic_1615775137(e) {
  649. var data_type = $(e).attr('data-type');
  650. if ('qiniu' == data_type) {
  651. // 七牛云上传
  652. upload_video_litpic_qiniu(e);
  653. } else if ('oss' == data_type) {
  654. // OSS上传
  655. upload_video_litpic_oss(e);
  656. } else if ('cos' == data_type) {
  657. // COS上传
  658. upload_video_litpic_cos(e);
  659. } else {
  660. // 本地上传
  661. upload_video_litpic_local(e);
  662. }
  663. }
  664. // 七牛云上传
  665. function upload_video_litpic_qiniu(e) {
  666. // 获取文件路径名
  667. var file = $(e)[0].files[0];
  668. // 验证上传格式
  669. var fileName = file.name;
  670. var fileExt = fileName.substr(fileName.lastIndexOf('.')).toLowerCase();
  671. var ext = judgeExt(fileExt);
  672. if (ext == -1) {
  673. showErrorMsg('不支持选中的视频格式,可在附件设置中修改');
  674. return false;
  675. }
  676. // 验证上传大小
  677. var size = "{$upload_max_filesize}";
  678. if (file.size > size) {
  679. showErrorMsg('视频大小超过限制,可在附件设置中修改');
  680. return false;
  681. }
  682. // 执行上传
  683. layer_loading('上传本地');
  684. $.ajax({
  685. type: 'POST',
  686. url: '__ROOT_DIR__/index.php?m=plugins&c=Qiniuyun&a=qiniu_upload',
  687. data: {_ajax: 1},
  688. dataType: "JSON",
  689. success: function(res1) {
  690. if (1 == res1.code) {
  691. var token = res1.data.token;
  692. var formData = new FormData();
  693. formData.append('file', file);
  694. formData.append('token', token);
  695. fileName = res1.data.filePath + fileExt;
  696. formData.append('key', fileName);
  697. $.ajax({
  698. url: res1.data.uphost,
  699. type: 'POST',
  700. dataType: 'JSON',
  701. data: formData,
  702. timeout: 1200000,
  703. cache: false,
  704. processData: false,
  705. contentType: false,
  706. xhr: function () {
  707. myXhr = $.ajaxSettings.xhr();
  708. if (myXhr.upload) {
  709. myXhr.upload.addEventListener('progress', function(e){
  710. var curr = e.loaded;
  711. var total = e.total;
  712. process = parseInt(curr / total * 100);
  713. $("#upload_video_litpic_qiniu").text('上传中...'+process+"%");
  714. });
  715. }
  716. return myXhr;
  717. },
  718. success: function(res2) {
  719. layer.closeAll();
  720. $("#upload_video_litpic_qiniu").text('上传成功');
  721. setTimeout(function() {
  722. $('#upload_video_litpic_qiniu').text('七牛云上传');
  723. }, 2000);
  724. var video_url = res1.data.domain + "/" + res2.key;
  725. $("#video_litpic").val(video_url);
  726. },
  727. error: function(e) {
  728. layer.closeAll();
  729. showErrorMsg(e.responseText);
  730. return false;
  731. }
  732. });
  733. } else {
  734. layer.closeAll();
  735. showErrorMsg(res1.msg);
  736. }
  737. },
  738. error: function(e) {
  739. layer.closeAll();
  740. showErrorMsg(e.responseText);
  741. }
  742. });
  743. }
  744. // 阿里云OSS上传
  745. function upload_video_litpic_oss(e) {
  746. // 获取文件路径名
  747. var file = $(e)[0].files[0];
  748. // 验证上传格式
  749. var fileName = file.name;
  750. var fileExt = fileName.substr(fileName.lastIndexOf('.')).toLowerCase();
  751. var ext = judgeExt(fileExt);
  752. if (ext == -1) {
  753. showErrorMsg('不支持选中的视频格式,可在附件设置中修改');
  754. return false;
  755. }
  756. // 验证上传大小
  757. var size = "{$upload_max_filesize}";
  758. if (file.size > size) {
  759. showErrorMsg('视频大小超过限制,可在附件设置中修改');
  760. return false;
  761. }
  762. // 执行上传
  763. layer_loading('上传阿里云OSS');
  764. $.ajax({
  765. type: 'POST',
  766. url: '__ROOT_DIR__/index.php?m=plugins&c=AliyunOss&a=oss_upload',
  767. data: {_ajax: 1},
  768. dataType: "JSON",
  769. success: function(res1){
  770. if (1 == res1.code){
  771. fileName = res1.data.filePath + fileExt;
  772. //组装发送数据
  773. var request = new FormData();
  774. request.append("OSSAccessKeyId",res1.data.accessid);
  775. request.append("policy",res1.data.policy);
  776. request.append("Signature",res1.data.signature);
  777. request.append("key",fileName);
  778. request.append("success_action_status",201);
  779. request.append('file', file);
  780. $.ajax({
  781. url : res1.data.host,
  782. data : request,
  783. processData: false,
  784. cache: false,
  785. contentType: false,
  786. dataType: 'xml',
  787. type : 'post',
  788. xhr: function () {
  789. myXhr = $.ajaxSettings.xhr();
  790. if (myXhr.upload) {
  791. myXhr.upload.addEventListener('progress', function(e){
  792. var curr = e.loaded;
  793. var total = e.total;
  794. var process = parseInt(curr / total * 100);
  795. $("#upload_video_litpic_oss").text('上传中...'+process+"%");
  796. });
  797. }
  798. return myXhr;
  799. },
  800. success : function(data) {
  801. layer.closeAll();
  802. var res = $(data).find('PostResponse');
  803. if (res) {
  804. var key = res.find('Key').text();
  805. $("#upload_video_litpic_oss").text('上传成功');
  806. setTimeout(function() {
  807. $('#upload_video_litpic_oss').text('oss上传');
  808. }, 2000);
  809. var video_url = res1.data.domain + "/" + key;
  810. $("#video_litpic").val(video_url);
  811. } else {
  812. $("#upload_video_litpic_oss").text('上传失败');
  813. setTimeout(function() {
  814. $('#upload_video_litpic_oss').text('oss上传');
  815. }, 2000);
  816. }
  817. },
  818. error : function(e) {
  819. layer.closeAll();
  820. console.log(e.responseText);
  821. }
  822. });
  823. } else {
  824. layer.closeAll();
  825. showErrorMsg(res1.msg);
  826. }
  827. },
  828. error: function(e) {
  829. layer.closeAll();
  830. showErrorMsg(e.responseText);
  831. }
  832. });
  833. }
  834. // 腾讯云COS上传
  835. function upload_video_litpic_cos(e) {
  836. // 获取文件路径名
  837. var file = $(e)[0].files[0];
  838. // 验证上传格式
  839. var fileName = file.name;
  840. var fileExt = fileName.substr(fileName.lastIndexOf('.')).toLowerCase();
  841. var ext = judgeExt(fileExt);
  842. if (ext == -1) {
  843. showErrorMsg('不支持选中的视频格式,可在附件设置中修改');
  844. return false;
  845. }
  846. // 验证上传大小
  847. var size = "{$upload_max_filesize}";
  848. if (file.size > size) {
  849. showErrorMsg('视频大小超过限制,可在附件设置中修改');
  850. return false;
  851. }
  852. // 上传参数
  853. var formData = new FormData();
  854. formData.append('file', file);
  855. formData.append('file_ext', fileExt);
  856. // 执行上传
  857. $.ajax({
  858. type: 'post',
  859. url: '__ROOT_DIR__/index.php?m=plugins&c=Cos&a=cos_upload&_ajax=1',
  860. data: formData,
  861. contentType: false,
  862. processData: false,
  863. dataType: 'json',
  864. xhr: function () {
  865. myXhr = $.ajaxSettings.xhr();
  866. if (myXhr.upload) {
  867. myXhr.upload.addEventListener('progress', function(e){
  868. var curr = e.loaded;
  869. var total = e.total;
  870. process = parseInt(curr / total * 100);
  871. if (100 == process) {
  872. process = 99;
  873. layer_loading('上传腾讯云');
  874. }
  875. $("#upload_video_litpic_cos").text('上传中...'+process+"%");
  876. });
  877. }
  878. return myXhr;
  879. },
  880. success: function(res) {
  881. layer.closeAll();
  882. if (1 == res.code) {
  883. $("#video_litpic").val(res.data.url);
  884. $("#upload_video_litpic_cos").text('上传成功');
  885. } else {
  886. $("#upload_video_litpic_cos").text('上传失败');
  887. }
  888. setTimeout(function() {
  889. $('#upload_video_litpic_cos').text('cos上传');
  890. }, 2000);
  891. },
  892. error: function(e) {
  893. layer.closeAll();
  894. showErrorMsg(e.responseText);
  895. }
  896. });
  897. }
  898. // 本地上传
  899. function upload_video_litpic_local(e) {
  900. // 获取文件路径名
  901. var file = $(e)[0].files[0];
  902. // 验证上传格式
  903. var fileName = file.name;
  904. var fileExt = fileName.substr(fileName.lastIndexOf('.')).toLowerCase();
  905. var ext = judgeExt(fileExt);
  906. if (ext == -1) {
  907. showErrorMsg('不支持选中的视频格式,可在附件设置中修改');
  908. return false;
  909. }
  910. // 验证上传大小
  911. var size = "{$upload_max_filesize}";
  912. if (file.size > size) {
  913. showErrorMsg('视频大小超过限制,可在附件设置中修改');
  914. return false;
  915. }
  916. // 定义上传数据
  917. var formData = new FormData();
  918. formData.append('file', file);
  919. // 执行上传
  920. layer_loading('上传本地');
  921. $.ajax({
  922. type: 'post',
  923. url : "{:url('Ueditor/upVideo', ['savepath'=>'media'])}",
  924. data: formData,
  925. contentType: false,
  926. processData: false,
  927. dataType: 'json',
  928. xhr: function () {
  929. myXhr = $.ajaxSettings.xhr();
  930. if (myXhr.upload) {
  931. myXhr.upload.addEventListener('progress', function(e){
  932. var curr = e.loaded;
  933. var total = e.total;
  934. process = parseInt(curr / total * 100);
  935. $("#upload_video_litpic_local").html('上传中...'+process+"%");
  936. });
  937. }
  938. return myXhr;
  939. },
  940. success: function (res) {
  941. layer.closeAll();
  942. $("#upload_video_litpic_local").html('上传成功');
  943. setTimeout(function() {
  944. $('#upload_video_litpic_local').html('本地上传');
  945. }, 2000);
  946. if ("SUCCESS" == res.state) {
  947. $("#video_litpic").val(res.url);
  948. } else {
  949. showErrorMsg(res.msg);
  950. }
  951. }
  952. });
  953. }
  954. // 验证格式
  955. function judgeExt(ext) {
  956. var type = "{$media_type}";
  957. var extArr = [];
  958. extArr = type.split("|");
  959. var ext = ext.replace(".","");
  960. return extArr.indexOf(ext);
  961. }
  962. </script>
  963. <script type="text/javascript">
  964. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  965. // 勾选新窗口打开链接
  966. function CheckedTarget(t){
  967. if ($(t).is(':checked')) {
  968. $(t).parent().find('input[name="img_target[]"]').val(1);
  969. }else{
  970. $(t).parent().find('input[name="img_target[]"]').val(0);
  971. }
  972. }
  973. // 鼠标事件,加载查看大图和更新图片
  974. function upimgMouseover(obj)
  975. {
  976. $(obj).find('div.icaction').show();
  977. $(obj).find('div.cover-bg').show();
  978. }
  979. function upimgMouseout(obj)
  980. {
  981. $(obj).find('div.icaction').hide();
  982. $(obj).find('div.cover-bg').hide();
  983. }
  984. // 检测广告名称是否存在重复
  985. function DetectionTitleRepeat(obj) {
  986. // 当前广告ID
  987. var id = 0;
  988. // 传入的广告名称
  989. var title = $(obj).val();
  990. // 执行检测
  991. $.ajax({
  992. type: 'post',
  993. url : "{:url('ZcwdPosition/detection_title_repeat', ['_ajax'=>1])}",
  994. data: {id: id, title: title},
  995. dataType: 'json',
  996. success: function(res) {
  997. if (0 == res.code) {
  998. $('#title_tips').show().html(res.msg);
  999. } else {
  1000. $('#title_tips').hide().html('');
  1001. }
  1002. },
  1003. error: function(e){
  1004. layer.closeAll();
  1005. showErrorAlert(e.responseText);
  1006. }
  1007. });
  1008. }
  1009. // 判断输入框是否为空
  1010. function checkForm(){
  1011. /* if($('input[name=title]').val() == ''){
  1012. layer.msg('广告位名称不能为空!', {icon: 2,time: 1000});
  1013. return false;
  1014. }*/
  1015. if($("#selectTest").val() == ''){
  1016. layer.msg('请选择申报专业!', {icon: 2,time: 1000});
  1017. return false;
  1018. }
  1019. if($("#selectTest222").val() == '' || $("#selectTest222").val() == 0){
  1020. layer.msg('请选择申报等级!', {icon: 2,time: 1000});
  1021. return false;
  1022. }
  1023. //'zyid': $("#selectTest").val(),
  1024. //'sf': $('#selectTest000_1').val(),
  1025. //'cs': $('#selectTest000_2').val(),
  1026. //'sbdj': $('#selectTest000_2').val(),
  1027. layer_loading('正在处理');
  1028. $.ajax({
  1029. type : 'post',
  1030. url : "{:url('ZcwdPosition/add', ['_ajax'=>1])}",
  1031. data : $('#post_form').serialize(),
  1032. dataType : 'json',
  1033. success : function(res) {
  1034. layer.closeAll();
  1035. if (1 == res.code) {
  1036. var _parent = parent;
  1037. _parent.layer.close(parentObj);
  1038. _parent.layer.msg(res.msg, {icon: 1, shade: layer_shade, time: 1000}, function() {
  1039. _parent.window.location.reload();
  1040. });
  1041. } else {
  1042. showErrorMsg(res.msg);
  1043. }
  1044. },
  1045. error: function(e) {
  1046. layer.closeAll();
  1047. showErrorAlert(e.responseText);
  1048. }
  1049. });
  1050. }
  1051. // 显示信息输入框
  1052. function ShowInput(id) {
  1053. var obj = $("#"+id+"_ShowInput");
  1054. var showOrHide = obj.attr('data-showOrHide');
  1055. if ('hide' == showOrHide) {
  1056. obj.show().attr('data-showOrHide', 'show');
  1057. } else {
  1058. obj.hide().attr('data-showOrHide', 'hide');
  1059. }
  1060. }
  1061. // 隐藏信息输入
  1062. function HideInput(id) {
  1063. $("#"+id+"_ShowInput").hide().attr('data-showOrHide', 'hide');
  1064. }
  1065. // 上传图集相册回调函数
  1066. function imgupload_call_back(paths){
  1067. var last_div = $(".images_upload_tpl").html();
  1068. var inputs = $('.span_input input');
  1069. var timestamp = 0;
  1070. for (var i=0; i<paths.length; i++){
  1071. // 生成新的时间戳
  1072. timestamp = (new Date()).getTime();
  1073. // 插入一个 新图片
  1074. $(".images_upload:eq(0)").before(last_div);
  1075. // 处理他的链接地址
  1076. $(".images_upload:eq(0)").find('span:eq(0)').attr('onclick',"Images('"+paths[i]+"', 900, 600);");
  1077. // 处理信息显示隐藏按钮
  1078. $(".images_upload:eq(0)").find('span:eq(1)').attr('onclick', "ShowInput('"+timestamp+"');");
  1079. // 处理他的图片路径
  1080. $(".images_upload:eq(0)").find('img').attr('src',paths[i]);
  1081. // 处理删除按钮
  1082. $(".images_upload:eq(0)").find('a:eq(1)').attr('onclick', "ClearPicArr(this, '"+paths[i]+"', 0);");
  1083. // 处理图片信息框ID
  1084. $(".images_upload:eq(0)").find('.load_input:eq(0)').attr('id', timestamp+'_ShowInput');
  1085. // 处理图片路径及隐藏域
  1086. if (inputs.length > '0') {
  1087. // 修改隐藏域,提交ID隐藏域
  1088. $(".images_upload:eq(0)").find('input:eq(0)').attr('name','img_id[]').attr('value','');
  1089. // 修改隐藏域,提交图片隐藏域
  1090. $(".span_input:eq(0)").find('input:eq(0)').attr('name','img_litpic[]').attr('value',paths[i]);
  1091. // 提交标题
  1092. $(".images_upload:eq(0)").find('textarea:eq(0)').attr('name','img_title[]');
  1093. // 提交跳转链接
  1094. $(".images_upload:eq(0)").find('textarea:eq(1)').attr('name','img_links[]');
  1095. // 处理内容描述
  1096. $(".images_upload:eq(0)").find('textarea:eq(2)').attr('name','img_intro[]');
  1097. // 提交新窗口选项
  1098. $(".images_upload:eq(0)").find('div.operation a:eq(0)').html("<label><input type='checkbox' title='在新窗口打开' onclick='CheckedTarget(this)'/>新窗口<input type='hidden' name='img_target[]' value='0'></label>");
  1099. // 处理收回按钮
  1100. $(".images_upload:eq(0)").find('div.operation a:eq(2)').attr('onclick', "HideInput('"+timestamp+"');").attr('title', "收回").html('<i style="font-size:16px;" class="fa fa-angle-double-up"></i>');
  1101. }
  1102. }
  1103. }
  1104. // 上传之后删除组图input
  1105. function ClearPicArr(obj,path)
  1106. {
  1107. $(obj).parent().parent().parent().remove(); // 删除完服务器的, 再删除 html上的图片
  1108. $.ajax({
  1109. type:'POST',
  1110. url:"{:url('Uploadimgnew/delupload')}",
  1111. data:{action:"del", filename:path, _ajax:1},
  1112. success:function(){}
  1113. });
  1114. }
  1115. // 代码调用js
  1116. function copyToClipBoard(id) {
  1117. var adstr = "{eyou:ad aid='" + id + "'}\r\n <a href='{$"+"field.links}' {$"+"field.target}><img src='{$"+"field.litpic}' alt='{$"+"field.title}' /></a>\r\n{/eyou:ad";
  1118. var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px"><dd>标签 ad 调用:</dd>'
  1119. contentdiv += '<textarea rows="4" cols="60" style="width:400px;height:80px;">' + adstr + '}</textarea>'
  1120. contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color: #F60;">请将对应标签代码复制并粘贴到对应模板文件中!</dd></dl></div>'
  1121. layer.open({
  1122. title: '代码调用',
  1123. type: 1,
  1124. shade: layer_shade,
  1125. skin: 'layui-layer-demo',
  1126. area: ['480px', '240px'], //宽高
  1127. content: contentdiv
  1128. });
  1129. }
  1130. // 图集相册的拖动排序相关 js
  1131. $( ".sort-list" ).sortable({
  1132. start: function( event, ui) {
  1133. }
  1134. ,stop: function( event, ui ) {
  1135. }
  1136. });
  1137. //因为他们要拖动,所以尽量设置他们的文字不能选择。
  1138. // $( ".sort-list" ).disableSelection();
  1139. </script>
  1140. {include file="public/footer" /}