house.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. layui.use(['form', 'layer', 'laydate', 'table', 'laytpl', 'layedit', 'upload'], function () {
  2. var form = layui.form,
  3. // layer = parent.layer === undefined ? layui.layer : top.layer,
  4. layer = layui.layer,
  5. $ = layui.jquery,
  6. laydate = layui.laydate,
  7. laytpl = layui.laytpl,
  8. table = layui.table,
  9. layedit = layui.layedit
  10. , upload = layui.upload;
  11. //调用编辑器
  12. var tableIds = 'housesList';
  13. var reloadId = 'tablerReload';
  14. //楼盘列表
  15. var tableIns = table.render({
  16. elem: '#' + tableIds,
  17. url: '/house/indexform',
  18. cellMinWidth: 95,
  19. method: 'post',
  20. page: true,
  21. height: 600,
  22. limit: 20,
  23. id: reloadId,
  24. // limits : [10,15,20,25],is_view
  25. cols: [[
  26. {type: "checkbox", width: 50},
  27. {field: 'id', title: 'ID', width: 80, align: "center", sort: true},
  28. {
  29. field: 'name', title: '标题', align: "center", templet: function (d) {
  30. var html = '<ul style="width:200px;float:left;">';
  31. if (d.is_push == 2) {
  32. html += '<li style="float:left; padding: 0 5px;"><img src="/img/house/housezhutui.png"></li>';
  33. }
  34. if (d.thumb != null && d.thumb != "") {
  35. html += '<li style="float:left;padding: 0 5px;"><img src="/img/house/housetu.png"></li>';
  36. }
  37. if (d.evaluating != null && d.evaluating != "") {
  38. html += '<li style="float:left;padding: 0 5px;"><img src="/img/house/houseping.png"></li>';
  39. }
  40. if (d.video == 1) {
  41. html += '<li style="float:left;padding: 0 5px;"><img src="/img/house/hangpai.png"></li>';
  42. }
  43. if (d.permit != 0) {
  44. html += '<li style="float:left;padding: 0 5px;position:relative;"><img src="/img/house/houseyushouzheng.png"><span style="font-size:12px;;position:absolute;right:7px;top:1px;display:inline-block;width:22px;text-align:center;color:#fff;">' + d.permit + '</span></li>';
  45. }
  46. html += '</ul>';
  47. html += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.pinfanghw.com/house/' + d.id + '" target="_blank">' + d.name + '</a>';
  48. return html;
  49. }
  50. },
  51. {field: 'city_name', title: '区域', width: 90, sort: true, align: 'center'},
  52. {
  53. field: 'album_num',
  54. title: '相册',
  55. width: 80,
  56. event: 'housesPhoto',
  57. align: 'center',
  58. templet: "#housesPhoto",
  59. templet: function (d) {
  60. return '<a href="javascript:;">[' + d.album_num + ']</a>'
  61. }
  62. },
  63. {field: 'news_num', title: '资讯',width:70, event:'housesNews', align:'center',templet:"#housesNews",templet:function(d){
  64. return '<a href="javascript:;">['+d.news_num+']</a>'
  65. }},
  66. {
  67. field: 'type_num',
  68. title: '户型',
  69. width: 80,
  70. event: 'housesType',
  71. align: 'center',
  72. templet: "#housesType",
  73. templet: function (d) {
  74. return '<a href="#">[' + d.type_num + ']</a>'
  75. }
  76. },
  77. {
  78. field: 'peitao_num',
  79. title: '周边配套',
  80. width: 90,
  81. event: 'houseFacilities',
  82. align: 'center',
  83. templet: "#houseFacilities",
  84. templet: function (d) {
  85. return '<a href="#">[' + d.peitao_num + ']</a>'
  86. }
  87. },
  88. {field: 'click_num', title: '点击', width: 80, align: 'center', sort: true},
  89. {field: 'sort', title: '排序', width: 80, edit: 'text', align: 'center', sort: true, templet: "#sortBox"},
  90. {field: 'create_at', title: '添加时间', width: 150, align: 'center'},
  91. {
  92. field: 'is_view',
  93. title: '审核',
  94. width: 70,
  95. align: 'center',
  96. templet: "#Toexamine",
  97. templet: function (d) {
  98. switch (d.is_view) {
  99. case '2':
  100. return '<input type="checkbox" value="' + d.id + '" name="' + d.is_view + '" house="' + d.name + '" lay-skin="switch" lay-filter="switchTest" lay-text="|">'
  101. break;
  102. case '1':
  103. return '<input type="checkbox" checked value="' + d.id + '" name="' + d.is_view + '" house="' + d.name + '" lay-skin="switch" lay-filter="switchTest" lay-text="|">'
  104. break;
  105. }
  106. }
  107. },
  108. {title: '操作', width: 200, templet: '#housesListBar', fixed: "right", align: "center"}
  109. ]]
  110. });
  111. tableIns.reload('tablerReload'); //重新加载
  112. var $ = layui.$, active = {
  113. reload: function () {
  114. var form = pfgs_serialize($('form'));
  115. var name = '';
  116. var id = '';
  117. if (form.input_house == 'name') {
  118. name = form.input_house_text;
  119. } else if (form.input_house == 'id') {
  120. id = form.input_house_text;
  121. }
  122. var city = '';
  123. if (form.province != '') {
  124. city = form.province;
  125. }
  126. if (form.city != '') {
  127. city = form.city;
  128. }
  129. table.reload('tablerReload', {
  130. where: {
  131. sort: form.input_sort,
  132. id: id,
  133. name: name,
  134. city: city,
  135. is_view: form.show,
  136. end_time: form.end_time,
  137. start_time: form.start_time,
  138. is_push: form.is_push
  139. },
  140. page: {
  141. curr: 1
  142. }
  143. })
  144. },
  145. };
  146. $('.demoTable .layui-btn').on('click', function () {
  147. var type = $(this).data('type');
  148. active[type] ? active[type].call(this) : '';
  149. });
  150. //日期
  151. laydate.render({
  152. elem: '#date1'
  153. });
  154. laydate.render({
  155. elem: '#date2'
  156. });
  157. //选项卡切换
  158. $('.layui-tab-title .site-demo-active').on('click', function () {
  159. $(this).addClass('layui-this').siblings().removeClass('layui-this');
  160. var lay_id = $(this).attr('lay-id');
  161. $('.layui-tab-item').removeClass('layui-show')
  162. $('.layui-tab-content #' + lay_id).addClass('layui-show')
  163. });
  164. //监听指定开关
  165. form.on('switch(switchTest)', function (data) {
  166. var house = data.elem.attributes.house.value;
  167. layer.open({
  168. title: '修改<span style="color:red" >[' + house + ']</span>状态',
  169. type: 2,
  170. area: ['50%', '80%'],
  171. maxmin: true,
  172. content: "/house/openstate?hid=" + data.value + "&name=" + house,
  173. end: function () {
  174. table.reload('tablerReload');
  175. }
  176. })
  177. });
  178. form.on('submit(del_alls_house)', function (data) {
  179. var checkStatus = table.checkStatus('tablerReload');
  180. var index = layer.msg('数据提交中,请稍候', {icon: 16, time: false, shade: 0.8}); //数据提交提示
  181. if (typeof checkStatus.data[0] == 'object') {
  182. layer.confirm('您确定要删除吗?', {btn: ['确认', '取消']}, function () {
  183. var formdat = new FormData();
  184. $.each(checkStatus.data, function (key, val) {
  185. formdat.append('hid[]', val.id);
  186. })
  187. $.ajax({
  188. cache: true,
  189. type: "post",
  190. url: "/house/housedel",
  191. data: formdat, // 你的formid
  192. // async : false, //async 默认为true异步,修改为false为同步
  193. contentType: false, //jax 中 contentType 设置为 false 是为了避免 JQuery 对其操作,从而失去分界符,而使服务器不能正常解析文件
  194. processData: false, //当设置为true的时候,jquery ajax 提交的时候不会序列化 data,而是直接使用data
  195. error: function (request) {
  196. layer.close(index); //关闭数据提交信息
  197. layer.alert("网络超时");
  198. },
  199. success: function (data) {
  200. if (data.code == 200) {
  201. layer.msg(data.msg);
  202. reloadTable(reloadId);
  203. } else {
  204. layer.msg(data.msg);
  205. }
  206. }
  207. });
  208. })
  209. return false;
  210. }
  211. layer.msg('请选择需要删除的楼盘', {icon: 5});
  212. return false;
  213. })
  214. //检测关键词
  215. form.on('submit(check_words)',function (data) {
  216. var content=UE.getEditor('editor').getContentTxt();
  217. var centhtml = UE.getEditor('editor').getContent();
  218. $.ajax({
  219. //cache : false,
  220. type : "post",
  221. url : "/sensitivewords/checkword",
  222. data:{content:content}, // 你的formid
  223. //contentType: false, //jax 中 contentType 设置为 false 是为了避免 JQuery 对其操作,从而失去分界符,而使服务器不能正常解析文件
  224. //processData: false, //当设置为true的时候,jquery ajax 提交的时候不会序列化 data,而是直接使用data
  225. error : function(request) {
  226. layer.close(index);
  227. layer.alert("网络超时");
  228. },
  229. success : function(data) {
  230. if(data.data!=null){
  231. var index=layer.open({
  232. type: 1,
  233. // skin: 'layui-layer-rim', //加上边框
  234. title:'违禁词信息',
  235. area: ['420px', '240px'], //宽高
  236. content: '<div style="color:red;">'+data.data+'</div>'
  237. });
  238. for(var i=0;i<data.data.length;i++){
  239. centhtml = centhtml.replace(data.data[i],"<span style='color: rgb(255, 0, 0);'>"+data.data[i]+"</span>");
  240. }
  241. UE.getEditor('editor_content').setContent(centhtml);
  242. layer.msg(data.msg)
  243. }else{
  244. layer.msg(data.msg)
  245. }
  246. }
  247. });
  248. return false;
  249. })
  250. /* 列表操作 edit 修改后执行 */
  251. table.on('edit(' + tableIds + ')', function (obj) {
  252. var data = obj.data;
  253. $.post('/house/housesortedit', {id: data.id, sort: data.sort}, function (data) {
  254. if (data.code == 200) {
  255. layer.msg(data.msg);
  256. } else if (data.code == 300) {
  257. layer.msg(data.msg);
  258. }
  259. })
  260. })
  261. /* 列表操作 tool 点击执行 */
  262. table.on('tool(' + tableIds + ')', function (obj) {
  263. var data = obj.data;
  264. if (obj.event === 'edit') {
  265. var index = layui.layer.open({
  266. title: '<span style="color:red" >[' + data.name + ']</span>修改楼盘信息',
  267. type: 2,
  268. area: ['', '100%'],
  269. maxmin: true,
  270. content: "/house/edit?id=" + data.id,
  271. end: function () {
  272. layui.table.reload('tablerReload');
  273. }
  274. })
  275. layui.layer.full(index);
  276. // // //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
  277. $(window).on("resize", function () {
  278. layui.layer.full(index);
  279. })
  280. } else if (obj.event === 'del') {
  281. layer.confirm('您确认要删除吗?', {btn: ['确认', '取消']}, function () {
  282. $.post('/house/housedel', {id: data.id}, function (data) {
  283. if (data.code == 200) {
  284. layer.msg(data.msg);
  285. // parent.layui.
  286. table.reload('tablerReload');
  287. // TableClose();
  288. } else {
  289. layer.msg(data.msg);
  290. }
  291. })
  292. })
  293. }else if(obj.event === 'housesNews'){
  294. var index =layui.layer.open({
  295. title :'<span style="color:red" >['+data.name+']</span>楼盘资讯',
  296. type : 2,
  297. area:['','100%'],
  298. maxmin: true,
  299. content : "/house/newslist?id="+data.id+"&name="+data.name,
  300. end:function () {
  301. table.reload('tablerReload');
  302. }
  303. })
  304. layui.layer.full(index);
  305. //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
  306. $(window).on("resize",function(){
  307. layui.layer.full(index);
  308. })
  309. } else if (obj.event === 'housesPhoto') {
  310. var index = layui.layer.open({
  311. title: '<span style="color:red" >[' + data.name + ']</span>楼盘相册',
  312. type: 2,
  313. area: ['', '100%'],
  314. maxmin: true,
  315. content: "/house/album?id=" + data.id + "&name=" + data.name,
  316. end: function () {
  317. table.reload('tablerReload');
  318. }
  319. })
  320. layui.layer.full(index);
  321. //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
  322. $(window).on("resize", function () {
  323. layui.layer.full(index);
  324. })
  325. } else if (obj.event === 'housesType') {
  326. var index = layui.layer.open({
  327. title: '<span style="color:red" >[' + data.name + ']</span>楼盘户型',
  328. type: 2,
  329. area: ['', '100%'],
  330. maxmin: true,
  331. content: "/house/housetype?id=" + data.id + "&name=" + data.name,
  332. end: function () {
  333. table.reload('tablerReload');
  334. }
  335. })
  336. layui.layer.full(index);
  337. //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
  338. $(window).on("resize", function () {
  339. layui.layer.full(index);
  340. })
  341. } else if (obj.event === 'house_price') {
  342. var index = layui.layer.open({
  343. title: '<span style="color:red" >[' + data.name + ']</span>楼盘历史价格',
  344. type: 2,
  345. area: ['', '100%'],
  346. maxmin: true,
  347. content: "/house/priceview?id=" + data.id + "&name=" + data.name + '&price=' + data.sale_price,
  348. end: function () {
  349. table.reload('tablerReload');
  350. }
  351. })
  352. layui.layer.full(index);
  353. //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
  354. $(window).on("resize", function () {
  355. layui.layer.full(index);
  356. })
  357. } else if (obj.event === 'houseFacilities') {
  358. var index = layui.layer.open({
  359. title: '<span style="color:red" >[' + data.name + ']</span>楼盘周边配套',
  360. type: 2,
  361. area: ['', '100%'],
  362. maxmin: true,
  363. content: "/house/peitao?id=" + data.id + "&name=" + data.name,
  364. end: function () {
  365. table.reload('tablerReload');
  366. }
  367. })
  368. layui.layer.full(index);
  369. //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
  370. $(window).on("resize", function () {
  371. layui.layer.full(index);
  372. })
  373. } else if (obj.event === 'house_presell') {
  374. var index = layui.layer.open({
  375. title: '<span style="color:red" >[' + data.name + ']</span>预售许可证',
  376. type: 2,
  377. area: ['', '100%'],
  378. maxmin: true,
  379. content: "/house/presell?id=" + data.id + "&name=" + data.name,
  380. end: function () {
  381. table.reload('tablerReload');
  382. }
  383. })
  384. layui.layer.full(index);
  385. //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
  386. $(window).on("resize", function () {
  387. layui.layer.full(index);
  388. })
  389. }
  390. });
  391. //楼盘名称,区域, 注释装修情况
  392. //添加图片上传
  393. upload.render({
  394. elem: '#test1'
  395. , url: '/house/createimg'
  396. , data: {token: csrfToken}
  397. , field: 'img'
  398. , size: 1000 //限制上传图片的大小,单位为KB
  399. , exts: 'png|jpg|jpeg' //只允许上传压缩文件
  400. , auto: false
  401. , bindAction: '#addcity'
  402. , choose: function (obj) {
  403. obj.preview(function (index, file, result) {
  404. $('#demo1').attr('src', result); //图片链接(base64)
  405. });
  406. }
  407. });
  408. // 点击放大图片
  409. $('#demo1').on('click', function () {
  410. var _src = $(this).attr('src');
  411. layui.layer.open({
  412. type: 1,
  413. title: false, //是否显示标题
  414. area: ['60%', '80%'],
  415. shade: 0.6, //透明度
  416. closeBtn: 1, //按钮 1有,0无
  417. shadeClose: true,
  418. content: '<img style="width:100%;height:100%" src="' + _src + '">',
  419. });
  420. });
  421. //判断是否需要编辑,需要才加载
  422. var verdict = $('#editor').html();
  423. if (typeof verdict == "string") {
  424. var ue = UE.getEditor('editor'); //编辑器
  425. }
  426. //重载表格
  427. function reloadTable(obj) {
  428. table.reload(obj);
  429. }
  430. //编辑楼盘
  431. form.on('submit(edit)', function (data) {
  432. var index = layer.msg('数据提交中,请稍候', {icon: 16, time: false, shade: 0.8}); //数据提交提示
  433. var formData = new FormData($('#house_edit_form')[0]);
  434. $.ajax({
  435. cache: true,
  436. type: "post",
  437. url: "/house/editfrom",
  438. data: formData, // 你的formid
  439. // async : false, //async 默认为true异步,修改为false为同步
  440. contentType: false, //jax 中 contentType 设置为 false 是为了避免 JQuery 对其操作,从而失去分界符,而使服务器不能正常解析文件
  441. processData: false, //当设置为true的时候,jquery ajax 提交的时候不会序列化 data,而是直接使用data
  442. error: function (request) {
  443. layer.close(index); //关闭数据提交信息
  444. layer.alert("请联系管理员");
  445. },
  446. success: function (data) {
  447. if (data.code == 200) {
  448. layer.msg(data.msg);
  449. } else if (data.code == 300) {
  450. layer.msg(data.msg);
  451. layer.msg(ReturnInfo(data.data), {icon: 5});
  452. }
  453. }
  454. });
  455. return false;
  456. });
  457. //楼盘上架下架操作
  458. form.on('submit(openstate)', function (data) {
  459. var index = layer.msg('数据提交中,请稍候', {icon: 16, time: false, shade: 0.8}); //数据提交提示
  460. $.ajax({
  461. cache: true,
  462. type: "post",
  463. url: "/house/openstateform",
  464. data: data.field, // 你的formid
  465. // async : false, //async 默认为true异步,修改为false为同步
  466. // contentType: false, //jax 中 contentType 设置为 false 是为了避免 JQuery 对其操作,从而失去分界符,而使服务器不能正常解析文件
  467. // processData: false, //当设置为true的时候,jquery ajax 提交的时候不会序列化 data,而是直接使用data
  468. error: function (request) {
  469. layer.close(index); //关闭数据提交信息
  470. layer.alert("请联系管理员");
  471. },
  472. success: function (data) {
  473. if (data.data != null) {
  474. layer.msg(ReturnInfo(data.data), {icon: 5});
  475. return;
  476. }
  477. layer.msg(data.msg);
  478. }
  479. });
  480. return false;
  481. });
  482. //加载省数据
  483. function loadProvince(data) {
  484. $.ajax({
  485. url: '/categorycity/citypid',
  486. type: 'post',
  487. async: false,//使用同步的方式,true为异步方式
  488. data: {'pid': 0},//这里使用json对象
  489. success: function (data) {
  490. // console.log(data);
  491. var areaData = data.data;
  492. var proHtml = '';
  493. for (var i = 0; i < areaData.length; i++) {
  494. proHtml += '<option value="' + areaData[i].id + '">' + areaData[i].city_name + '</option>';
  495. }
  496. //初始化省数据
  497. $('select[name=province]').append(proHtml);
  498. form.render();
  499. },
  500. fail: function () {
  501. }
  502. });
  503. }
  504. loadProvince();
  505. form.on('select(province)', function (data) {
  506. $.post('/categorycity/citypid', {'pid': data.value}, function (data) {
  507. var areaData = data.data;
  508. var proHtml = '';
  509. $('select[name=city]').html('');
  510. proHtml = '<option value="">请选择市/区/县</option>';
  511. for (var i = 0; i < areaData.length; i++) {
  512. proHtml += '<option value="' + areaData[i].id + '">' + areaData[i].city_name + '</option>';
  513. }
  514. //初始化省数据
  515. $('select[name=city]').append(proHtml);
  516. form.render();
  517. })
  518. })
  519. // 添加楼盘评测
  520. var leng = 50;
  521. $('.layui_w_addbtn').on('click', function () {
  522. datumInsert(leng)
  523. $('body').append('<script id="ue' + leng + '">UE.getEditor("evaluating' + leng + '")</script>') //编辑器
  524. var ue = UE.getEditor("evaluating" + leng);
  525. ue.ready(function () {
  526. // ue.setContent('<p>编辑器1的内容</p>', true);
  527. });
  528. leng++;
  529. })
  530. //展示数据删除按钮
  531. $('.layui_w_licence table.layui-table tbody.mai').on('click', '.del', function () {
  532. var _this = $(this)
  533. var oid = _this.parents('.otr').attr('id');
  534. var index = layer.confirm('确定要删除吗?', {btn: ['确定', '取消']}, function () {
  535. // layer.close(index)
  536. _this.parents('#' + oid).remove();
  537. $('body script#' + oid).remove();
  538. layer.msg('已成功删除!');
  539. })
  540. })
  541. })
  542. $(function () {
  543. $('.editmai tr.otr').each(function () {
  544. var _ind = $(this).attr('data-id');
  545. UE.getEditor("evaluating" + _ind);
  546. // console.log(_ind)
  547. })
  548. //选项卡切换
  549. $('.layui-tab-title .site-demo-active').on('click', function () {
  550. $(this).addClass('layui-this').siblings().removeClass('layui-this');
  551. var lay_id = $(this).attr('lay-id');
  552. $('.layui-tab-item').removeClass('layui-show')
  553. $('.layui-tab-content #' + lay_id).addClass('layui-show')
  554. });
  555. // 转换拼音
  556. $('.layui_w_name').on('keyup ', function () {
  557. var _txt = $(this).val();
  558. var _convert = pinyinUtil.getPinyin(_txt, ' ', false).replace(/\s/g, "");
  559. $('.layui_w_spell').val(_convert)
  560. })
  561. // 动态添加批量删除按钮
  562. var _btn = '<div class="layui-inline " style="float:left;position:relative;left:10px;bottom:35px">'
  563. + '<a class="layui-btn layui-btn-danger search_btn layui_w_btn" style="height:30px;line-height:30px;font-size:14px;" lay-submit="" lay-filter="del_alls_house">批量删除</a>'
  564. + '</div>'
  565. $('.layui-form').append(_btn)
  566. // 修改楼盘编辑高度问题
  567. var i = 0;
  568. $('li[lay-id="assign_4"]').on('click', function () {
  569. var _text = UE.getEditor('editor').getContent()
  570. if (_text != '') {
  571. if (i < 1) {
  572. var editorHeight = UE.getEditor('editor').iframe.clientHeight;
  573. if (editorHeight > 400) {
  574. var _setHeight = parseInt(UE.getEditor('editor').iframe.clientHeight / 7.5);
  575. $('#assign_4').find('#edui1_iframeholder').css('height', _setHeight);
  576. }
  577. i++;
  578. }
  579. }
  580. })
  581. })
  582. //楼盘评测 添加
  583. function datumInsert(leng) {
  584. // var leng = $(".layui_w_licence table.layui-table tbody tr").length;
  585. // console.log(leng)
  586. var tr = '<tr class="otr" id="ue' + leng + '">'
  587. + '<td lay-event="del">'
  588. + '<div class="layui-table-cell del" lay-oid=""><i class="layui-icon" style="font-size: 30px; color: #1E9FFF;cursor: pointer">&#xe640;</i></div>'
  589. + '</td>'
  590. + '<td data-field="matingName" align="center" data-content="">'
  591. + '<div class="editor_box layui-form-item" style="width:99%;height:400">'
  592. + '<textarea name="evaluating[]" id="evaluating' + leng + '" cols="20" rows="10" style="width:100%;float:left;"></textarea>'
  593. + '</div>'
  594. + '</td>'
  595. + '</tr>';
  596. $(".layui_w_licence table.layui-table tbody.mai").append(tr);
  597. }