Authored by 王涛
@@ -374,7 +374,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -374,7 +374,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
374 }, 374 },
375 grid: [{ 375 grid: [{
376 top: 20, 376 top: 20,
377 - bottom: 35, 377 + bottom: 45,
378 left: 30, 378 left: 30,
379 right: 5 379 right: 5
380 }], 380 }],
@@ -385,7 +385,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -385,7 +385,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
385 color: '#333', 385 color: '#333',
386 show: true, 386 show: true,
387 interval:0, 387 interval:0,
388 - rotate:20 388 + rotate:15
389 }, 389 },
390 axisLine: { 390 axisLine: {
391 lineStyle: { 391 lineStyle: {
@@ -195,7 +195,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect @@ -195,7 +195,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
195 //获取属性值 195 //获取属性值
196 function addUserProperty() { 196 function addUserProperty() {
197 var arr = []; 197 var arr = [];
198 - var $inputs = $("#user_property_html_id").find("input"); 198 + var $inputs = $("#user_property_html_id").find(".input");
199 $.each($inputs, function (i, e) { 199 $.each($inputs, function (i, e) {
200 var obj = { 200 var obj = {
201 id: $(e).attr("data-id"), 201 id: $(e).attr("data-id"),
@@ -207,6 +207,33 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect @@ -207,6 +207,33 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
207 }; 207 };
208 arr.push(obj) 208 arr.push(obj)
209 }) 209 })
  210 + console.log("arr-$inputs",arr)
  211 + // Start 获取select的值 LSQ 2021/12/28 14:29 TODO
  212 + var $selects = $("#user_property_html_id").find(".select");
  213 + $.each($selects, function (i, e) {
  214 + var obj = {
  215 + id: $(e).attr("data-id"),
  216 + username: $(e).attr("data-username"),
  217 + property: $(e).attr("data-property"),
  218 + value: $(e).val(),
  219 + sort: $(e).attr("data-sort"),
  220 + remark: $(e).attr("data-remark")
  221 + };
  222 + arr.push(obj)
  223 + })
  224 + var $textareas = $("#user_property_html_id").find(".textarea");
  225 + $.each($textareas, function (i, e) {
  226 + var obj = {
  227 + id: $(e).attr("data-id"),
  228 + username: $(e).attr("data-username"),
  229 + property: $(e).attr("data-property"),
  230 + value: $(e).val(),
  231 + sort: $(e).attr("data-sort"),
  232 + remark: $(e).attr("data-remark")
  233 + };
  234 + arr.push(obj)
  235 + })
  236 + //End LSQ 2021/12/28 14:50 TODO
210 return arr; 237 return arr;
211 } 238 }
212 239
@@ -234,27 +261,83 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect @@ -234,27 +261,83 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
234 var rowTail = '</div>'; 261 var rowTail = '</div>';
235 var content = ''; 262 var content = '';
236 $.each(propertyList, function (i, v) { 263 $.each(propertyList, function (i, v) {
  264 + // Start 根据字典配置后缀展示输入框,单选框,文本框 LSQ 2021/12/28 16:34 TODO
  265 + var str='';
  266 + var dropStrIndex=v.ddicCode.indexOf('_drop_');
  267 + var textareaStrIndex=v.ddicCode.indexOf('_textarea_');
  268 + if(textareaStrIndex!=-1){
  269 + str='<textarea data-property="'+v.ddicCode+'" placeholder="'+v.ddicDesc+'" data-id="" data-username="" data-sort="" data-remark="" class="layui-textarea textarea" name="' + v.ddicCode + '"></textarea>'
  270 +
  271 + }else if(dropStrIndex!=-1){
  272 + var selectOption='';
  273 + var strArr=v.ddicCode.split('_drop_');
  274 + if(strArr && strArr.length>1){
  275 + var strArrEle=strArr[1].split('_');
  276 + if(strArrEle[0]=='yes'){
  277 + selectOption=' <option value="0">否</option>'+
  278 + ' <option value="1">是</option>';
  279 + }else if(strArrEle[0]=='long'){
  280 + selectOption=' <option value="0">长期</option>'+
  281 + ' <option value="1">短期</option>';
  282 + }else{
  283 + selectOption=' <option value="0">否</option>'+
  284 + ' <option value="1">是</option>';
  285 + }
  286 + }
  287 +
  288 + str='<select data-property="'+v.ddicCode+'" placeholder="'+v.ddicDesc+'" data-id="" data-username="" data-sort="" data-remark="" class="select layui-select select-input-my" name="' + v.ddicCode + '" autocomplete="off">'+
  289 + ' <option value="" style="display:none;"></option>'+ selectOption +
  290 + '</select>';
  291 + }else{
  292 + str='<input type="text" data-property="'+v.ddicCode+'" placeholder="'+v.ddicDesc+'" data-id="" data-username="" data-sort="" data-remark="" class="layui-input input" name="' + v.ddicCode + '" autocomplete="off">'
  293 + }
237 var property = ' <div class="layui-inline ">' + 294 var property = ' <div class="layui-inline ">' +
238 ' <label class="layui-form-label">' + v.ddicName + '</label>' + 295 ' <label class="layui-form-label">' + v.ddicName + '</label>' +
239 - ' <div class="layui-input-inline">' +  
240 - ' <input type="text" data-property="'+v.ddicCode+'" placeholder="'+v.ddicDesc+'" data-id="" data-username="" data-sort="" data-remark="" class="layui-input" name="' + v.ddicCode + '" autocomplete="off">' + 296 + ' <div class="layui-input-inline">' +str+
  297 + // ' <input type="text" data-property="'+v.ddicCode+'" placeholder="'+v.ddicDesc+'" data-id="" data-username="" data-sort="" data-remark="" class="layui-input" name="' + v.ddicCode + '" autocomplete="off">' +
241 ' </div>' + 298 ' </div>' +
242 ' </div>'; 299 ' </div>';
243 - if (i % 2 == 0 && i != 0) { 300 +
  301 + if(textareaStrIndex!=-1){
  302 + if (i % 1 == 0 ) {
  303 + content += rowTail;
  304 + }
  305 + if (i % 1 == 0) {//需要添加表头
  306 + content += rowHead + property;
  307 + } else {//
  308 + content += property;
  309 + }
  310 + }else{
  311 + if (i % 2 == 0 && i != 0) {
  312 + content += rowTail;
  313 + }
  314 +
  315 + if (i % 2 == 0) {//需要添加表头
  316 + content += rowHead + property;
  317 + } else {//
  318 + content += property;
  319 + }
  320 + }
  321 + //End LSQ 2021/12/28 16:35 TODO
  322 +
  323 + /* if (i % 2 == 0 && i != 0) {
244 content += rowTail; 324 content += rowTail;
245 } 325 }
  326 +
246 if (i % 2 == 0) {//需要添加表头 327 if (i % 2 == 0) {//需要添加表头
247 content += rowHead + property; 328 content += rowHead + property;
248 } else {// 329 } else {//
249 content += property; 330 content += property;
250 - } 331 + }*/
  332 +
  333 +
251 }); 334 });
252 $('#user_property_html_id').append(content); 335 $('#user_property_html_id').append(content);
253 } 336 }
254 337
255 //回显属性信息 338 //回显属性信息
256 function evaluation(list){ 339 function evaluation(list){
257 - var $inputs = $("#user_property_html_id").find("input"); 340 + var $inputs = $("#user_property_html_id").find(".input");
258 $.each($inputs, function (i, e) { 341 $.each($inputs, function (i, e) {
259 var $that=$(this); 342 var $that=$(this);
260 $.each(list, function (index,v) { 343 $.each(list, function (index,v) {
@@ -267,6 +350,34 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect @@ -267,6 +350,34 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
267 } 350 }
268 }); 351 });
269 }); 352 });
  353 + // Start 回显select的值 LSQ 2021/12/28 14:55 TODO
  354 + var $selects = $("#user_property_html_id").find(".select");
  355 + $.each($selects, function (i, e) {
  356 + var $that=$(this);
  357 + $.each(list, function (index,v) {
  358 + if($that.attr('data-property')== v.property){
  359 + $that.attr("data-id",v.id);
  360 + $that.attr("data-username",v.username);
  361 + $that.val(v.value);
  362 + $that.attr("data-sort",v.sort);
  363 + $that.attr("data-remark",v.remark);
  364 + }
  365 + });
  366 + });
  367 + var $textarea = $("#user_property_html_id").find(".textarea");
  368 + $.each($textarea, function (i, e) {
  369 + var $that=$(this);
  370 + $.each(list, function (index,v) {
  371 + if($that.attr('data-property')== v.property){
  372 + $that.attr("data-id",v.id);
  373 + $that.attr("data-username",v.username);
  374 + $that.val(v.value);
  375 + $that.attr("data-sort",v.sort);
  376 + $that.attr("data-remark",v.remark);
  377 + }
  378 + });
  379 + });
  380 + //End LSQ 2021/12/28 14:55 TODO
270 } 381 }
271 }) 382 })
272 }) 383 })
@@ -467,7 +467,11 @@ layui.extend({ @@ -467,7 +467,11 @@ layui.extend({
467 new msgTips({ 467 new msgTips({
468 dom: ".right-bottom-tips", 468 dom: ".right-bottom-tips",
469 title: title, 469 title: title,
470 - message: `<p style="line-height: 30px;background: url(${imgUrl}) no-repeat;background-size: 70%;height: 178px;padding: 10px;background-position-x: right;padding-left: 106px;padding-top: 96px;">${content}</p>`, 470 + message: `<p style="line-height: 24px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;padding: 10px;background-position-x: right;padding-left: 29px;padding-top: 145px;">
  471 + <span class="title closeFault" style="position: relative;top: -75px;left: 170px;">X</span>
  472 + <span style="position: relative;left: 35px;top: -21px; font-weight: bold;">${title}</span>
  473 + ${content}
  474 + </p>`,
471 duration: 10000, 475 duration: 10000,
472 space: 10, 476 space: 10,
473 firstSpace: 8, 477 firstSpace: 8,
@@ -485,6 +489,7 @@ layui.extend({ @@ -485,6 +489,7 @@ layui.extend({
485 //} 489 //}
486 } 490 }
487 }) 491 })
  492 +
488 }, delay); 493 }, delay);
489 }else{ 494 }else{
490 setTimeout(function () { 495 setTimeout(function () {
@@ -27,7 +27,7 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { @@ -27,7 +27,7 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
27 minus = ""; 27 minus = "";
28 } 28 }
29 29
30 - if ($('.ez_tips').size() == 0 || $('.ez_tips').size() < options.limit) { 30 + if (($('.ez_tips').size() == 0 || $('.ez_tips').size() < options.limit) && (options.toastType!='faultinfo' && options.toastType!='faultprogress' && options.toastType!='faultover')) {
31 31
32 var container = "<div class='ez_tips "+options.toastType+"' style="+firstDirection+":"+options.margin+"px;transform:translateX("+minus+"110%)></div>" 32 var container = "<div class='ez_tips "+options.toastType+"' style="+firstDirection+":"+options.margin+"px;transform:translateX("+minus+"110%)></div>"
33 33
@@ -97,13 +97,16 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { @@ -97,13 +97,16 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
97 },1); 97 },1);
98 $(options.dom).append(newContainer); 98 $(options.dom).append(newContainer);
99 } else if(options.toastType=='faultinfo'||options.toastType=='faultprogress'||options.toastType=='faultover'){ 99 } else if(options.toastType=='faultinfo'||options.toastType=='faultprogress'||options.toastType=='faultover'){
100 - var container = "<div class='fault_ez_tips "+options.toastType+"' style="+firstDirection+":"+options.margin+"px;bottom: 319px;transform:translateX("+minus+"110%);></div>"  
101 100
102 - var head = "<div class='faultTitle faultClearfix'><i class='faultTips_icon_l fl'></i><i class='FaultTips_icon_r close'></i></div>"; 101 + var container = "<div class='fault_ez_tips "+options.toastType+"' style="+firstDirection+":"+options.margin+"px;transform:translateX("+minus+"110%);width: 226px;bottom: 8px !important; ></div>"
  102 +
  103 + // var head = "<div class='faultTitle faultClearfix'><i class='faultTips_icon_l fl'></i><i class='FaultTips_icon_r close'></i></div>";
  104 + var head = "";
103 105
104 var content = "<div class='FaultTips-message' style='cursor: pointer; display: flex;justify-content: flex-end;'></div>" 106 var content = "<div class='FaultTips-message' style='cursor: pointer; display: flex;justify-content: flex-end;'></div>"
105 107
106 - var newHead = $(head).append(options.title); 108 + // var newHead = $(head).append(options.title);
  109 + var newHead = "";
107 110
108 var newContent = $(content).append(options.message) 111 var newContent = $(content).append(options.message)
109 112
@@ -122,7 +125,9 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { @@ -122,7 +125,9 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
122 var times = Date.now(); 125 var times = Date.now();
123 $(newContainer).css({ 126 $(newContainer).css({
124 'transition-timing-function':options.timingFun, 127 'transition-timing-function':options.timingFun,
125 - 'width':options.width, 128 + // 'width':options.width,
  129 + 'width':'226px',
  130 + 'bottom':'8px'
126 }); 131 });
127 var height = $(newContainer).outerHeight(true); 132 var height = $(newContainer).outerHeight(true);
128 var len = $('.fault_ez_tips').size(); 133 var len = $('.fault_ez_tips').size();
@@ -159,6 +164,13 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { @@ -159,6 +164,13 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
159 $(newContainer).remove(); 164 $(newContainer).remove();
160 },700) 165 },700)
161 }); 166 });
  167 + $(newContainer).find(".closeFault").click(function (event) {
  168 + event.stopPropagation();
  169 + $(newContainer).removeClass('active');
  170 + setTimeout(function () {
  171 + $(newContainer).remove();
  172 + },700)
  173 + })
162 if (options.action) { 174 if (options.action) {
163 $(newContent).css('cursor','pointer').on(options.type,options.action); 175 $(newContent).css('cursor','pointer').on(options.type,options.action);
164 } 176 }
@@ -7892,4 +7892,20 @@ form[lay-filter="activewarning-form"] .layui-inline { @@ -7892,4 +7892,20 @@ form[lay-filter="activewarning-form"] .layui-inline {
7892 } 7892 }
7893 .padding-left-10{ 7893 .padding-left-10{
7894 padding-left:10px; 7894 padding-left:10px;
7895 -}  
  7895 +}
  7896 +/* Start 自定义select的样式*/
  7897 +.select-input-my+.layui-form-select .layui-select-title .layui-input::-webkit-input-placeholder {
  7898 + color:#999;
  7899 +}
  7900 +.select-input-my+.layui-form-select .layui-select-title .layui-input::-moz-placeholder {
  7901 + color:#999;
  7902 +}
  7903 +.select-input-my+.layui-form-select .layui-select-title .layui-input::-ms-input-placeholder {
  7904 + color:#999;
  7905 +}
  7906 +
  7907 +.select-input-my+.layui-form-select dl dd.layui-this{
  7908 + color:#666666;
  7909 + background-color:rgb(242, 242, 242);
  7910 +}
  7911 +/* End 自定义select的样式*/
@@ -343,7 +343,15 @@ @@ -343,7 +343,15 @@
343 {{# }); }} 343 {{# }); }}
344 </div> 344 </div>
345 </div> 345 </div>
346 - <span class="index-banner-count">业务共 {{d.count}} </span> 346 +<!-- <span class="index-banner-count">业务共 {{d.count}} </span>-->
  347 + <!--业务统计数更改
  348 + LSQ 2021/12/28 11:25
  349 + -->
  350 + {{# if(d.data[0] && d.data[0].bizList ) { }}
  351 + <span class="index-banner-count">业务共 {{d.data[0].bizList.length}} </span>
  352 + {{# }else{ }}
  353 + <span class="index-banner-count">业务共 0 </span>
  354 + {{# } }}
347 </script> 355 </script>
348 356
349 <!--资源类型监控情况--> 357 <!--资源类型监控情况-->
@@ -42,7 +42,7 @@ export default { @@ -42,7 +42,7 @@ export default {
42 that.$global.showMsg("删除成功!"); 42 that.$global.showMsg("删除成功!");
43 that.diagnosisData.splice(index,1); 43 that.diagnosisData.splice(index,1);
44 }else{ 44 }else{
45 - that.$global.showMsg("删除失败!",'warning') 45 + that.$global.showMsg(res.msg,'warning')
46 } 46 }
47 47
48 }) 48 })