Authored by 鲁尚清

【无】资源池增加别名列字段

... ... @@ -5144,6 +5144,46 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
}, function () {
layer.close(subtips);
});
// 别名列点击事件
$('.res-list-short-name').unbind('click').on('click', function () {
var $shortNameDom = $(this);
var resId = $shortNameDom.data('resid');
var oldShortName = $shortNameDom.text();
layer.prompt({
formType: 0, // 输入框类型,支持0(文本)默认1(密码)2(多行文本)
value: oldShortName, // 初始化值
title: '请输入别名',
yes: function (index, layero) {
var value = layero.find(".layui-layer-input").val();
if (value !== oldShortName) {
layer.load(2);
admin.req({
url: common.domainName + '/api-web/bResource/changeShortName',
data: {
resId: resId,
shortName: value
},
success: function (response) {
layer.closeAll('loading');
if (response && response.success) {
layer.msg('修改成功', {icon: 1});
$shortNameDom.text(value);
layer.close(index);
} else {
layer.msg('修改失败', {icon: 2});
}
},
error: function (err) {
layer.closeAll('loading');
layer.msg('修改失败', {icon: 2});
}
});
} else {
layer.close(index);
}
}
});
});
//lsq T3和IOP点击修改删除 2022-08-04
$('.edit-delete-tpl').unbind('click').on('click',function (){
var $T3Dom = $(this);
... ... @@ -5276,6 +5316,10 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
}
};
//lsq 列表增加别名列 2022-08-25
for(let key in obj.resTypeCls){
obj.resTypeCls[key].splice( 2,0,{field: 'shortName', title: '别名', width: 100, align: 'center', sort: true, templet:`<div><div class="res-list-short-name" lay-tips="点击修改别名" data-resid="{{d.resId}}">{{d.shortName ? d.shortName : ''}}</div></div>`})
}
//对外暴露的接口
exports('commonCols', obj);
});
... ...
... ... @@ -8626,3 +8626,9 @@ form.layui-card-header.layuiadmin-card-header-auto {
height: 100%;
padding: 0 20px;
}
/*别名样式*/
.res-list-short-name {
width: 100%;
height: 100%;
cursor: pointer;
}
\ No newline at end of file
... ...