Authored by 鲁尚清

weblogic资源列表增加扩展字段T3和IOP

... ... @@ -17,6 +17,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
var curBizResType = '';//当前业务所在的资源类型
var sortKey = '';
var fieldExpandArr=[];//获取扩展的表格字段
function autoHeight(el) {
... ... @@ -402,6 +403,36 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
resTypeList.push(v.value);
busId=v.pid;
});
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
//获取配置的列
common.getTableCols({
domId: 'bizListTable',
... ... @@ -467,7 +498,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
}
});
});
},300)
}
//获取业务下的资源类型健康统计
function renderBizResTypeCard(bizId) {
... ... @@ -500,6 +531,36 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
renderBizSerach(resType, busId, true);
form.render(null, 'biz-list-form');
var cols = commonCols.resTypeCls[resType];
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
//获取配置的列
common.getTableCols({
domId: 'bizParentList',
... ... @@ -569,6 +630,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
}
});
});
},300)
}
//资源列表
function renderList(busId, resType) {
... ... @@ -582,6 +644,36 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
form.render(null, 'biz-list-form');
var cols = commonCols.resTypeCls[resType];
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
//获取配置的列
common.getTableCols({
domId: 'bizListTable',
... ... @@ -650,6 +742,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
}
});
});
},300)
}
//树表格
... ... @@ -676,7 +769,36 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
}
var cols = commonCols.resTypeCls[resType];
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
admin.req({
url: common.domainName + "/api-web/home/virtual-res-list/" + resType
, data: {
... ... @@ -810,6 +932,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
}).error(function () {
layer.closeAll();
});
},300)
}
//获取资源统计
... ...
... ... @@ -9,7 +9,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
var common = layui.common;
var commonCols = layui.commonCols;
var sortKey = '';
var fieldExpandArr=[];//获取扩展的表格字段
//用树表格展示的资源类型
var treeTableResTypes = [
... ... @@ -102,6 +102,36 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
renderSearchCondition(resType, bizId);
var cols = commonCols.resTypeCls[resType];
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
//获取配置的列
common.getTableCols({
domId: 'bizResListTable',
... ... @@ -166,7 +196,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
}
});
})
},300)
}
... ... @@ -206,7 +236,36 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
layer.load(2); //加载层。
var cols = commonCols.resTypeCls[resType];
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
//获取配置的列
common.getTableCols({
domId: 'bizResTreeTable',
... ... @@ -345,6 +404,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
layer.closeAll();
});
})
},300)
}
//获取资源统计
... ...
... ... @@ -2978,7 +2978,113 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
}, function () {
layer.close(subtips);
});
//lsq T3和IOP点击修改删除 2022-08-04
$('.edit-delete-tpl').unbind('click').on('click',function (){
var $T3Dom = $(this);
//判断是字段类型T3/IOP
let tplType=$T3Dom.data('tpltype');
//获取资源id
var resId = $T3Dom.data('resid');
//获取旧数据
let old_T3Dom=$T3Dom.text();
//获取扩展字段id
let expandId=$T3Dom.data('expandid');
//获取字段为输入框或者下拉选择 0 输入框 1下拉选择
let fieldSourceType=$T3Dom.data('fieldsourcetype');
//获取下拉选择值
let fieldList=$T3Dom.data('list');
let url='/api-web/resource/expand/saveOrUpdate';
//判断类型是输入框还是下拉列表
let titleName='';
let promptHtml='';
if(fieldSourceType == '0'){
titleName='请输入';
promptHtml=`<input type="text" id="promptInput" name="promptInput" autocomplete="off" class="layui-input">`
}else if(fieldSourceType== '1'){
titleName='请选择';
promptHtml=`<select id="promptInput" style="width:80%;cursor:pointer;" class="layui-select" lay-filter="promptInput">`
if(fieldList){
let fieldListArr=fieldList.split(",")
fieldListArr.map(item=>{
promptHtml+=`<option value="`+item+`">`+item+`</option>`;
})
}
promptHtml+=`</select>`;
}else{
promptHtml=``
}
let html_tpl=`<div class="T3-IOP-prompt">`+promptHtml+`</div>`;
layer.open({
title: [titleName+tplType, 'font-size:14px;'],
type: 1,
area: ['280px','170px'],
content: html_tpl,
success: function () {
$('#promptInput').val(old_T3Dom)
}
, id: 'lay_T3_IOP' //设定一个id,防止重复弹出
, btn: ['清空', '保存']
, yes: function (index, layero) {
layer.confirm('确认要删除吗?', {icon: 3, title: '提示'}, function (index1) {
layer.load(2);
admin.req({
//删除T3值
url: common.domainName + url,
data: {
resId:resId,
fieldValue:'',
expandId:expandId,//扩展字段id
},
}).done(function (response) {
layer.closeAll('loading');
if (response.success) {
layer.msg('删除成功!', {icon: 1, time: 3000});
$T3Dom.text('');
} else {
layer.msg('删除失败!', {icon: 2, time: 3000});
}
layer.close(index);
});
})
}
, btn2:function(index, layero){
var value = $('#promptInput').val();
if (value !== old_T3Dom) {
layer.load(2);
admin.req({
//修改扩展字段T3/IOp值
url: common.domainName + url,
data: {
resId:resId,
fieldValue:value,
expandId:expandId,//扩展字段id
},
success: function (response) {
layer.closeAll('loading');
if (response && response.success) {
layer.msg('修改成功', {icon: 1});
$T3Dom.text(value);
} else {
layer.msg('修改失败', {icon: 2});
}
layer.close(index);
},
error: function (err) {
layer.closeAll('loading');
layer.msg('修改失败', {icon: 2});
}
});
} else {
layer.close(index);
}
},
});
})
//end lsq T3和IOP点击修改/删除 2022-08-04
function showTips(id, message, state) {
subtips = layer.tips(state + "失败原因:" + message,
'#' + id, {tips: 1});
... ...
//资源视图
layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', 'table', 'treeTable', 'sessions', "commonDetail", 'tasklist', 'view', 'reslist'], function (exports) {
layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', 'table', 'treeTable', 'sessions', "common", 'tasklist', 'view', 'reslist'], function (exports) {
var $ = layui.$;
var common = layui.common;
var table = layui.table;
... ... @@ -809,6 +809,37 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
return htm;
}
});
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: this.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
//lsq 资源管理增加扩展字段 待验证 2022-08-12
// if(this.fieldExpandArr.indexOf(resType)!=-1){
// }else{
// this.fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
// }
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
//渲染表格
table.render({
elem: '#resManageTable'
... ... @@ -1100,9 +1131,117 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
commonDetail.openDetail(resId,resType,name)
});
resTopo();
//lsq T3和IOP点击修改删除 2022-08-04
$('.edit-delete-tpl').unbind('click').on('click',function (){
var $T3Dom = $(this);
//判断是字段类型T3/IOP
let tplType=$T3Dom.data('tpltype');
//获取资源id
var resId = $T3Dom.data('resid');
//获取旧数据
let old_T3Dom=$T3Dom.text();
//获取扩展字段id
let expandId=$T3Dom.data('expandid');
//获取字段为输入框或者下拉选择 0 输入框 1下拉选择
let fieldSourceType=$T3Dom.data('fieldsourcetype');
//获取下拉选择值
let fieldList=$T3Dom.data('list');
let url='/api-web/resource/expand/saveOrUpdate';
//判断类型是输入框还是下拉列表
let titleName='';
let promptHtml='';
if(fieldSourceType == '0'){
titleName='请输入';
promptHtml=`<input type="text" id="promptInput" name="promptInput" autocomplete="off" class="layui-input">`
}else if(fieldSourceType== '1'){
titleName='请选择';
promptHtml=`<select id="promptInput" style="width:80%;cursor:pointer;" class="layui-select" lay-filter="promptInput">`
if(fieldList){
let fieldListArr=fieldList.split(",")
fieldListArr.map(item=>{
promptHtml+=`<option value="`+item+`">`+item+`</option>`;
})
}
promptHtml+=`</select>`;
}else{
promptHtml=``
}
let html_tpl=`<div class="T3-IOP-prompt">`+promptHtml+`</div>`;
layer.open({
title: [titleName+tplType, 'font-size:14px;'],
type: 1,
area: ['280px','170px'],
content: html_tpl,
success: function () {
$('#promptInput').val(old_T3Dom)
}
, id: 'lay_T3_IOP' //设定一个id,防止重复弹出
, btn: ['清空', '保存']
, yes: function (index, layero) {
layer.confirm('确认要删除吗?', {icon: 3, title: '提示'}, function (index1) {
layer.load(2);
admin.req({
//删除T3值
url: common.domainName + url,
data: {
resId:resId,
fieldValue:'',
expandId:expandId,//扩展字段id
},
}).done(function (response) {
layer.closeAll('loading');
if (response.success) {
layer.msg('删除成功!', {icon: 1, time: 3000});
$T3Dom.text('');
} else {
layer.msg('删除失败!', {icon: 2, time: 3000});
}
layer.close(index);
});
})
}
, btn2:function(index, layero){
var value = $('#promptInput').val();
if (value !== old_T3Dom) {
layer.load(2);
admin.req({
//修改扩展字段T3/IOp值
url: common.domainName + url,
data: {
resId:resId,
fieldValue:value,
expandId:expandId,//扩展字段id
},
success: function (response) {
layer.closeAll('loading');
if (response && response.success) {
layer.msg('修改成功', {icon: 1});
$T3Dom.text(value);
} else {
layer.msg('修改失败', {icon: 2});
}
layer.close(index);
},
error: function (err) {
layer.closeAll('loading');
layer.msg('修改失败', {icon: 2});
}
});
} else {
layer.close(index);
}
},
});
})
//end lsq T3和IOP点击修改/删除 2022-08-04
}
});
},300)
}
//处理表头和内容不能对齐的问题
... ...
... ... @@ -4,6 +4,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
var $ = layui.$;
var common = layui.common;
var table = layui.table;
var fieldExpandArr=[];//获取扩展的表格字段
//对外暴露的接口
exports('resindex', function (data) {
... ... @@ -169,6 +170,36 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
} else {
cols = commonCols.resTypeCls[resType];
}
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
resTableList = table.render({
elem: '#resindexList'
, id: 'resindexList'
... ... @@ -209,6 +240,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
});
}
});
},300)
});
}
//左侧树
... ... @@ -752,6 +784,36 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
var index = layer.load(2); //加载层
var cols = commonCols.resTypeCls[resType];
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
admin.req({
url: common.domainName + "/api-web/home/virtual-res-list/" + resType
, type: "get"
... ... @@ -894,6 +956,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
}).error(function () {
layer.close(index);
});
},300)
}
... ... @@ -995,6 +1058,36 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
}
//渲染表格
var cols = commonCols.resTypeCls[resType];
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
//获取配置的列
common.getTableCols({
domId: 'parentResListTable',
... ... @@ -1105,6 +1198,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
}
});
});
},300)
}
//资源列表
... ... @@ -1132,6 +1227,36 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
$('#power_state_div').show();
}
var cols = commonCols.resTypeCls[resType];
//start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05
admin.req({
url: common.domainName + "/api-web/resource/expand/list?resType=" + resType
, done: function (res) {
if (res && res.data ) {
let arr=res.data;
if(fieldExpandArr.indexOf(resType)!=-1){
}else{
fieldExpandArr.push(resType);
if(arr.length>0){
arr.map(item=>{
let listStr='';
if(item.list && item.list.length>0){
listStr=item.list.join(',')
}
cols.splice(item.fieldSort,0,{field: item.field, title: item.fieldName, align: 'center', width: 100, sort: true,
templet:` <div>
<div class="edit-delete-tpl T-edit-delete-tpl" lay-tips="点击修改/删除" data-fieldsourcetype="`+item.fieldSourceType+`"
data-expandid="`+item.id+`" data-list="`+listStr+`" data-tpltype="`+item.field+`" data-resid="{{d.resId}}">
{{d.`+item.field+` ? d.`+item.field+` : ''}}
</div></div>`})
})
}
}
} else {
console.log(res.msg);
}
}
});
setTimeout(function (){
//获取配置的列
common.getTableCols({
domId: 'resListTable',
... ... @@ -1211,6 +1336,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
}
});
});
},300)
}
... ...
... ... @@ -8127,3 +8127,16 @@ form[lay-filter="activewarning-form"] .layui-inline {
color: #fff;
cursor: pointer;
}
/*lsq T3和IOP 2022-08-04*/
.edit-delete-tpl{
width: 100%;
height: 100%;
cursor: pointer;
}
.T3-IOP-prompt{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
padding: 0 20px;
}
... ...