解决包名冲突问题

This commit is contained in:
cuibaocheng 2021-06-10 10:55:41 +08:00
parent d3da3a76ce
commit 48ddd9fad4
4 changed files with 143 additions and 133 deletions

View File

@ -1,6 +1,6 @@
layui.define(function (exports) { layui.define(function (exports) {
var obj = { var obj = {
url : 'http://192.168.0.115:8090/businesscard', url : 'http://192.168.0.5:8090/businesscard',
sourceUrl: '/files/images/20210202/', sourceUrl: '/files/images/20210202/',
token: 'T3hrM2Y1eFB5eERaNXQ2bDdxZ3Y4elZVQnl6U3FWdlNBT3dGUENFNlNObjA5MWpTMW1CMG1iaSsvZmxGcERlMzV5RWw5TnplZjVIbmVQRTQ5SkVnWFF3YjdvWnVaRHhrL2l5TUNGWmFZcnJZVzI5UEhJdFVzdG55b3RLOTdKTzhmeFZvZ1hTd29qbnlYeWVSMURiTmpNNGJDOTFVbDVsMk5Ed3FiREh2QnpDcmNJV2J2am51TW1id3dmK2kwZnorUnJoN2cyakEzM2RGK0paNk5lUHdaS1M0WFBXamZMamxsSlFBUW9XaDYwcUhpWnhXYXdXeGNybk9kQ2kwTzdPcjF2STdrc0I3SFlwY0k5Q3FmbnlrMkxqUW1OL3NTVmZDT1hGcmlhbXcyMk1nZXV2dHRUck5seHJadXdGTjZlVnlKUjVKWlNGVm5UOVA1ckx6Vnl0Ky85WDVtVERzelcxSkVVdnFOOHdueXhGUTNzVTNJUERQelhrdnBVS1JrSm5vdlV2ajhQMXFTR1k4VGNtK2M3K1ZIcW80WHNHM0pFQk5yaGRxeEVGSEpEZDZ3VE9GWVgvY3JjQ1YvclM3TXVOckRmTDBMcnU0ZTBQRzI0eFlnYXI3ek1GOGJrelpKVVVXdm10QXV3K1EzY21LWDd3cGkwY3hySS9jbzdNT0tvMzc5SUpKUE1sZnJCbHNTbEJhRUJKVHZ0WU1mYUphRmZLZHhlNU9yaDd0SFo0PQ' token: 'T3hrM2Y1eFB5eERaNXQ2bDdxZ3Y4elZVQnl6U3FWdlNBT3dGUENFNlNObjA5MWpTMW1CMG1iaSsvZmxGcERlMzV5RWw5TnplZjVIbmVQRTQ5SkVnWFF3YjdvWnVaRHhrL2l5TUNGWmFZcnJZVzI5UEhJdFVzdG55b3RLOTdKTzhmeFZvZ1hTd29qbnlYeWVSMURiTmpNNGJDOTFVbDVsMk5Ed3FiREh2QnpDcmNJV2J2am51TW1id3dmK2kwZnorUnJoN2cyakEzM2RGK0paNk5lUHdaS1M0WFBXamZMamxsSlFBUW9XaDYwcUhpWnhXYXdXeGNybk9kQ2kwTzdPcjF2STdrc0I3SFlwY0k5Q3FmbnlrMkxqUW1OL3NTVmZDT1hGcmlhbXcyMk1nZXV2dHRUck5seHJadXdGTjZlVnlKUjVKWlNGVm5UOVA1ckx6Vnl0Ky85WDVtVERzelcxSkVVdnFOOHdueXhGUTNzVTNJUERQelhrdnBVS1JrSm5vdlV2ajhQMXFTR1k4VGNtK2M3K1ZIcW80WHNHM0pFQk5yaGRxeEVGSEpEZDZ3VE9GWVgvY3JjQ1YvclM3TXVOckRmTDBMcnU0ZTBQRzI0eFlnYXI3ek1GOGJrelpKVVVXdm10QXV3K1EzY21LWDd3cGkwY3hySS9jbzdNT0tvMzc5SUpKUE1sZnJCbHNTbEJhRUJKVHZ0WU1mYUphRmZLZHhlNU9yaDd0SFo0PQ'
} }

View File

@ -166,7 +166,7 @@
} else { } else {
var imgPath = '' var imgPath = ''
if (imgUrl) { if (imgUrl) {
imgPath = requestUrl.url + '/route/file/download/true/' +imgUrl imgPath = 'route/file/download/true/' +imgUrl
} else { } else {
imgPath = imgSrc imgPath = imgSrc
} }
@ -190,7 +190,7 @@
//创建右键菜单 //创建右键菜单
context.context().attach('.box[rel='+curNum+']', [ context.context().attach('.box[rel='+curNum+']', [
{header: '操作'}, {header: '操作'},
{text: '编辑区域说明', action: function(e){ {text: '编辑区域', action: function(e){
e.preventDefault(); e.preventDefault();
var curRemark = $('.box[rel='+curNum+']').attr('data-remark') var curRemark = $('.box[rel='+curNum+']').attr('data-remark')
var curData = $('.box[rel='+curNum+']').attr('data-keyData') var curData = $('.box[rel='+curNum+']').attr('data-keyData')
@ -231,7 +231,7 @@
cardTemplateId: id, cardTemplateId: id,
cardTemplateAreaId: $('.box[rel='+curNum+']').attr('dataarea') cardTemplateAreaId: $('.box[rel='+curNum+']').attr('dataarea')
} }
top.restAjax.delete(requestUrl.url + '/app/cardtemplatearea/removecardtemplatearea/' + obj.cardTemplateAreaId, obj, { top.restAjax.delete('app/cardtemplatearea/removecardtemplatearea/' + obj.cardTemplateAreaId, obj, {
headers: { headers: {
token: token token: token
} }
@ -247,7 +247,7 @@
type: 1, type: 1,
title: '字体', title: '字体',
skin: 'layui-layer-rim', //加上边框 skin: 'layui-layer-rim', //加上边框
area: ['350px', '230px'], //宽高 area: ['30%', '80%'], //宽高
content: boxHtml, content: boxHtml,
btn: ['确定','取消'], btn: ['确定','取消'],
yes: function () { yes: function () {
@ -263,7 +263,7 @@
}); });
form.render() form.render()
form.on('select(card-color)', function (d) { form.on('select(card-color)', function (d) {
top.restAjax.get(requestUrl.url + '/app/datadictionary/getdictionarybyid/' + d.value, {}, { top.restAjax.get('app/datadictionary/getdictionarybyid/' + d.value, {}, {
headers: { headers: {
token: token token: token
} }
@ -294,7 +294,7 @@
} }
} }
}, },
{text: '<font color="blue">蓝色</font>', action: function(e){ /* {text: '<font color="blue">蓝色</font>', action: function(e){
e.preventDefault(); e.preventDefault();
$('.box[rel='+curNum+'] .transparent').css('opacity', '0.5'); $('.box[rel='+curNum+'] .transparent').css('opacity', '0.5');
$('.box[rel='+curNum+'] .bg').css('background-color', 'rgba(0,0,255,0.5)'); $('.box[rel='+curNum+'] .bg').css('background-color', 'rgba(0,0,255,0.5)');
@ -338,7 +338,7 @@
$('.box[rel='+curNum+']').addClass('change') $('.box[rel='+curNum+']').addClass('change')
} }
} }
}, },*/
{text: '<font color="black">透明</font>', action: function(e){ {text: '<font color="black">透明</font>', action: function(e){
e.preventDefault(); e.preventDefault();
$('.box[rel='+curNum+'] .bg').css('background-color', 'rgba(255,255,255,0)'); $('.box[rel='+curNum+'] .bg').css('background-color', 'rgba(255,255,255,0)');
@ -362,7 +362,7 @@
closeBtn: false, closeBtn: false,
area: ['500px','350px'], area: ['500px','350px'],
btn: ['确认','取消'], btn: ['确认','取消'],
content: '<div class="create-info"><h3>内容</h3><input type="text" id="remark" class="remark" name="remark" value=""><input type="text" id="data" class="data" name="data" value=""><h3>别名</h3><input type="text" id="title" class="title" name="title" value=""></div>', content: '<div class="create-info"><h3>示例内容 名字 : | 张三</h3><input type="text" id="remark" class="remark" name="remark" value=""><input type="text" id="data" class="data" name="data" value=""><h3>表单名称</h3><input type="text" id="title" class="title" name="title" value=""></div>',
yes: function (index) { yes: function (index) {
var title = $('#title').val() var title = $('#title').val()
var data = $('#data').val() var data = $('#data').val()
@ -404,7 +404,7 @@
formdata.append('image', file) formdata.append('image', file)
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: requestUrl.url + '/app/file/uploadimage', url: 'app/file/uploadimage',
headers: { headers: {
token: token token: token
}, },
@ -436,7 +436,7 @@
$('.box .coor').hide(); $('.box .coor').hide();
html2canvas(document.querySelector("#canvas"),{allowTaint: true,useCORS: true}).then(canvas => { html2canvas(document.querySelector("#canvas"),{allowTaint: true,useCORS: true}).then(canvas => {
$.ajax({ $.ajax({
url: requestUrl.url + '/app/cardtemplate/updatecardtemplateimagerelease/' + id, url: 'app/cardtemplate/updatecardtemplateimagerelease/' + id,
data: { data: {
templatePreviewPhoto: canvas.toDataURL() templatePreviewPhoto: canvas.toDataURL()
}, },
@ -513,23 +513,27 @@
obj['templateAreaType']=box_arr[i].type, obj['templateAreaType']=box_arr[i].type,
obj['cardTemplateAreaId'] = box_arr[i].templateAreaId obj['cardTemplateAreaId'] = box_arr[i].templateAreaId
if (box_arr[i].isNew) { if (box_arr[i].isNew) {
top.restAjax.post(requestUrl.url + '/app/cardtemplatearea/savecardtemplatearea', obj, { top.restAjax.post('app/cardtemplatearea/savecardtemplatearea', obj, {
headers: { headers: {
token: token token: token
} }
}, function (res, data) { }, function (res, data) {
layer.msg('保存成功') top.layer.msg('保存成功')
$('.new').removeClass('new') $('.new').removeClass('new')
}, function (res, data) {
top.layer.msg('保存失败')
}) })
} }
if (box_arr[i].change) { if (box_arr[i].change) {
top.restAjax.put(requestUrl.url + '/app/cardtemplatearea/updatecardtemplatearea/' + box_arr[i].templateAreaId, obj, { top.restAjax.put('app/cardtemplatearea/updatecardtemplatearea/' + box_arr[i].templateAreaId, obj, {
headers: { headers: {
token: token token: token
} }
}, function (res, data) { }, function (res, data) {
layer.msg('保存成功') top.layer.msg('保存成功')
$('.change').removeClass('change') $('.change').removeClass('change')
}, function (res, data) {
top.layer.msg('保存失败')
}) })
} }
@ -585,7 +589,7 @@
}); });
function getCard(){ function getCard(){
top.restAjax.get(requestUrl.url + '/app/cardtemplate/getcardtemplatebyid/' + id, {}, { top.restAjax.get('app/cardtemplate/getcardtemplatebyid/' + id, {}, {
headers: { headers: {
token: token token: token
} }
@ -597,19 +601,19 @@
$('#style').append('.box .content{font-family: ' + fontList[i].name + '}') $('#style').append('.box .content{font-family: ' + fontList[i].name + '}')
} }
} }
var bgImg = '<img src="' + requestUrl.url + '/route/file/download/true/' + data.templatePhoto +'" style="position:absolute;top:0;left:0;width:100%;height:100%;z-index: -1">' var bgImg = '<img src="' + 'route/file/download/true/' + data.templatePhoto +'" style="position:absolute;top:0;left:0;width:100%;height:100%;z-index: -1">'
// var bgImg = '<img src="http://www.wgink.ink/twoduty/assets/web/images/mid-img4.png" crossorigin="anonymous" style="position:absolute;top:0;left:0;width:100%;height:100%;z-index: -1">' // var bgImg = '<img src="http://www.wgink.ink/twoduty/assets/web/images/mid-img4.png" crossorigin="anonymous" style="position:absolute;top:0;left:0;width:100%;height:100%;z-index: -1">'
$('#canvas').append(bgImg) $('#canvas').append(bgImg)
// getBgImg(data.templatePhoto) // getBgImg(data.templatePhoto)
}) })
} }
function getBgImg(id){ function getBgImg(id){
top.restAjax.get(requestUrl.url + '/app/file/get/' + id, {}, { top.restAjax.get( 'app/file/get/' + id, {}, {
headers: { headers: {
token: token token: token
} }
}, function (res, data) { }, function (res, data) {
var path = requestUrl.url + '/' + data.data var path = data.data
var bgImg = '<img src="' + path +'" style="position:absolute;top:0;left:0;width:100%;height:100%;z-index: -1">' var bgImg = '<img src="' + path +'" style="position:absolute;top:0;left:0;width:100%;height:100%;z-index: -1">'
$('#canvas').append(bgImg) $('#canvas').append(bgImg)
}) })
@ -617,7 +621,7 @@
// getCard() // getCard()
function getFont() { function getFont() {
top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=327e3c97-5f02-4840-9569-73f5d2499e48', {}, { top.restAjax.get('app/datadictionary/listztreedictionary?id=327e3c97-5f02-4840-9569-73f5d2499e48', {}, {
headers: { headers: {
token: token token: token
} }
@ -629,7 +633,7 @@
getFont() getFont()
function getFontSize() { function getFontSize() {
top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=006c84b3-74e2-40ec-aae2-c1a9cfc2760c', {}, { top.restAjax.get( 'app/datadictionary/listztreedictionary?id=006c84b3-74e2-40ec-aae2-c1a9cfc2760c', {}, {
headers: { headers: {
token: token token: token
} }
@ -647,7 +651,7 @@
getFontSize() getFontSize()
function getColor(){ function getColor(){
top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=f15819fa-bc81-4553-8b81-59741d02f2bf', {}, { top.restAjax.get('app/datadictionary/listztreedictionary?id=f15819fa-bc81-4553-8b81-59741d02f2bf', {}, {
headers: { headers: {
token: token token: token
} }
@ -686,7 +690,7 @@
} }
function getArea(){ function getArea(){
top.restAjax.get(requestUrl.url + '/app/cardtemplatearea/listcardtemplateareabytemplateid/' + id, {}, { top.restAjax.get('app/cardtemplatearea/listcardtemplateareabytemplateid/' + id, {}, {
headers: { headers: {
token: token token: token
} }

View File

@ -77,7 +77,7 @@
height: $win.height() - 60, height: $win.height() - 60,
limit: 20, limit: 20,
limits: [20, 40, 60, 80, 100, 200], limits: [20, 40, 60, 80, 100, 200],
url: requestUrl.url + '/app/cardtemplate/listpagecardtemplate', url: 'app/cardtemplate/listpagecardtemplate',
headers: { headers: {
token: token token: token
}, },
@ -119,7 +119,7 @@
}, },
{ {
field: 'templateStatus', field: 'templateStatus',
title: '是否收费', title: '开关',
width: '80', width: '80',
sort: false, sort: false,
templet: function (data) { templet: function (data) {
@ -166,18 +166,18 @@
return value; return value;
} }
}, },
{ // {
field: 'templateWidth', // field: 'templateWidth',
title: '名片宽度', // title: '名片宽度',
width: '150', // width: '150',
sort: false, // sort: false,
}, // },
{ // {
field: 'templateHeight', // field: 'templateHeight',
title: '名片高度', // title: '名片高度',
width: '150', // width: '150',
sort: false, // sort: false,
}, // },
{ {
field: 'cardTemplateId', field: 'cardTemplateId',
fixed: 'right', fixed: 'right',
@ -197,12 +197,12 @@
} }
}) })
function getImg(id) { function getImg(id) {
top.restAjax.get(requestUrl.url + '/app/file/get/' + id, {}, { top.restAjax.get('app/file/get/' + id, {}, {
headers: { headers: {
token: token token: token
} }
}, function (res, data) { }, function (res, data) {
var url = requestUrl.url + '/' + data.data.fileUrl var url = data.data.fileUrl
$('.img' + id).attr('src', url) $('.img' + id).attr('src', url)
}) })
} }
@ -214,9 +214,12 @@
if (layEvent == 'save') { if (layEvent == 'save') {
layer.open({ layer.open({
type: 1, type: 1,
closeBtn: false,
shadeClose: true,
skin: 'layui-layer-rim', //加上边框 skin: 'layui-layer-rim', //加上边框
area: ['550px', '650px'], //宽高 area: ['550px', '650px'], //宽高
content: html content: html,
title: '新增名片'
}); });
$('#uploadBg').on('change', function () { $('#uploadBg').on('change', function () {
var file = $(this)[0].files[0] var file = $(this)[0].files[0]
@ -229,7 +232,7 @@
} }
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: requestUrl.url + '/app/file/uploadimage', url: 'app/file/uploadimage',
data: formdata, data: formdata,
async: false, async: false,
contentType: false, contentType: false,
@ -299,7 +302,7 @@
templateMode: '1', templateMode: '1',
templateStatus: templateStatus templateStatus: templateStatus
} }
top.restAjax.post(requestUrl.url + '/app/cardtemplate/savecardtemplate', obj, { top.restAjax.post('app/cardtemplate/savecardtemplate', obj, {
headers: { headers: {
token: token token: token
} }
@ -325,7 +328,7 @@
} }
ids += checkStatus.data[i].cardTemplateId ids += checkStatus.data[i].cardTemplateId
} }
top.restAjax.delete(requestUrl.url + '/app/cardtemplate/removecardtemplate/' + ids, {}, { top.restAjax.delete('app/cardtemplate/removecardtemplate/' + ids, {}, {
headers: { headers: {
token: token token: token
} }
@ -347,7 +350,10 @@
type: 1, type: 1,
skin: 'layui-layer-rim', //加上边框 skin: 'layui-layer-rim', //加上边框
area: ['550px', '650px'], //宽高 area: ['550px', '650px'], //宽高
title: '编辑名片',
content: updateHtml, content: updateHtml,
closeBtn: 1,
shadeClose: true,
end: function () { end: function () {
initTable() initTable()
innerCount = 0 innerCount = 0
@ -356,12 +362,12 @@
getIndustry('update',checkDatas[0].cardTemplateId) getIndustry('update',checkDatas[0].cardTemplateId)
getFont('update',checkDatas[0].cardTemplateId) getFont('update',checkDatas[0].cardTemplateId)
top.restAjax.get(requestUrl.url + '/app/file/get/' + checkDatas[0].templatePhoto, {}, { top.restAjax.get('app/file/get/' + checkDatas[0].templatePhoto, {}, {
headers: { headers: {
token: token token: token
} }
}, function (res, data) { }, function (res, data) {
var url = requestUrl.url + '/' + data.data.fileUrl var url = data.data.fileUrl
$('.bg-img').attr('src', url) $('.bg-img').attr('src', url)
}) })
$('.update').click(function () { $('.update').click(function () {
@ -415,7 +421,7 @@
templateMode: '1', templateMode: '1',
templateStatus: templateStatus templateStatus: templateStatus
} }
top.restAjax.put(requestUrl.url + '/app/cardtemplate/updatecardtemplate/' + checkDatas[0].cardTemplateId, obj, { top.restAjax.put('app/cardtemplate/updatecardtemplate/' + checkDatas[0].cardTemplateId, obj, {
headers: { headers: {
token: token token: token
} }
@ -439,7 +445,7 @@
} }
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: requestUrl.url + '/app/file/uploadimage', url: 'app/file/uploadimage',
data: formdata, data: formdata,
async: false, async: false,
contentType: false, contentType: false,
@ -460,11 +466,11 @@
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent == 'edit') { if (layEvent == 'edit') {
layer.open({ top.layer.open({
type: 2, type: 2,
title: false, title: false,
closeBtn: true, closeBtn: true,
area: ['800px', '500px'], area: ['80%', '80%'],
shadeClose: true, shadeClose: true,
anim: 2, anim: 2,
content: top.restAjax.path('route/namecard/namecard.html?id=' + obj.data.cardTemplateId, []), content: top.restAjax.path('route/namecard/namecard.html?id=' + obj.data.cardTemplateId, []),
@ -478,7 +484,7 @@
// initTable() // initTable()
function getIndustry(type,id) { function getIndustry(type,id) {
top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=567bb081-fa00-4af3-87cf-aa53e2e24010', {}, { top.restAjax.get('app/datadictionary/listztreedictionary?id=567bb081-fa00-4af3-87cf-aa53e2e24010', {}, {
headers: { headers: {
token: token token: token
} }
@ -509,7 +515,7 @@
getIndustry() getIndustry()
function getFont(type,id) { function getFont(type,id) {
top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=327e3c97-5f02-4840-9569-73f5d2499e48', {}, { top.restAjax.get('app/datadictionary/listztreedictionary?id=327e3c97-5f02-4840-9569-73f5d2499e48', {}, {
headers: { headers: {
token: token token: token
} }
@ -605,13 +611,13 @@
} }
function getNameCard (id) { function getNameCard (id) {
top.restAjax.get(requestUrl.url + '/app/cardtemplate/getcardtemplatebyid/' + id, {}, { top.restAjax.get('app/cardtemplate/getcardtemplatebyid/' + id, {}, {
headers: { headers: {
token: token token: token
} }
}, function (res, data) { }, function (res, data) {
cardInfo = data cardInfo = data
$('.bg-img').attr('src',requestUrl.url + '/route/file/download/true/' + data.templatePhoto) $('.bg-img').attr('src', 'route/file/download/true/' + data.templatePhoto)
$('.card-name').val(data.templateTitle) $('.card-name').val(data.templateTitle)
$('.card-intro').val(data.templateDescription) $('.card-intro').val(data.templateDescription)
$('#card-size').val(data.templateWidth) $('#card-size').val(data.templateWidth)

View File

@ -37,9 +37,9 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent"> <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增 <i class="fa fa-lg fa-plus"></i> 新增
</button> </button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent"> <!-- <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">-->
<i class="fa fa-lg fa-edit"></i> 编辑 <!-- <i class="fa fa-lg fa-edit"></i> 编辑-->
</button> <!-- </button>-->
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent"> <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除 <i class="fa fa-lg fa-trash"></i> 删除
</button> </button>
@ -86,24 +86,24 @@
[ [
{type:'checkbox', fixed: 'left'}, {type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'templateDefaultId', width: 180, title: '主键UUID', align:'center', // {field: 'templateDefaultId', width: 180, title: '主键UUID', align:'center',
templet: function(row) { // templet: function(row) {
var rowData = row[this.field]; // var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-'; // return '-';
} // }
return rowData; // return rowData;
} // }
}, // },
{field: 'templateId', width: 180, title: '名片模板ID', align:'center', // {field: 'templateId', width: 180, title: '名片模板ID', align:'center',
templet: function(row) { // templet: function(row) {
var rowData = row[this.field]; // var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-'; // return '-';
} // }
return rowData; // return rowData;
} // }
}, // },
{field: 'cardWidth', width: 180, title: '名片模板宽度', align:'center', {field: 'cardWidth', width: 180, title: '名片模板宽度', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
@ -122,61 +122,7 @@
return rowData; return rowData;
} }
}, },
{field: 'cardName', width: 180, title: '名片名', align:'center', {field: 'cardName', width: 180, title: '名片名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'backgroundId', width: 180, title: '名片背景图片ID', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'creator', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'gmtCreate', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'modifier', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'gmtModified', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isDelete', width: 180, title: '', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -185,6 +131,60 @@
return rowData; return rowData;
} }
}, },
// {field: 'backgroundId', width: 180, title: '名片背景图片ID', align:'center',
// templet: function(row) {
// var rowData = row[this.field];
// if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
// return '-';
// }
// return rowData;
// }
// },
// {field: 'creator', width: 180, title: '', align:'center',
// templet: function(row) {
// var rowData = row[this.field];
// if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
// return '-';
// }
// return rowData;
// }
// },
// {field: 'gmtCreate', width: 180, title: '', align:'center',
// templet: function(row) {
// var rowData = row[this.field];
// if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
// return '-';
// }
// return rowData;
// }
// },
// {field: 'modifier', width: 180, title: '', align:'center',
// templet: function(row) {
// var rowData = row[this.field];
// if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
// return '-';
// }
// return rowData;
// }
// },
// {field: 'gmtModified', width: 180, title: '', align:'center',
// templet: function(row) {
// var rowData = row[this.field];
// if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
// return '-';
// }
// return rowData;
// }
// },
// {field: 'isDelete', width: 180, title: '', align:'center',
// templet: function(row) {
// var rowData = row[this.field];
// if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
// return '-';
// }
// return rowData;
// }
// },
{field:'cz', width:220, title: '操作', align:'center', fixed: 'right', {field:'cz', width:220, title: '操作', align:'center', fixed: 'right',
templet: function(row) { templet: function(row) {
var rowData = '<div class="layui-btn-group">' + var rowData = '<div class="layui-btn-group">' +
@ -275,11 +275,11 @@
var checkStatus = table.checkStatus('dataTable'); var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data; var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') { if(layEvent === 'saveEvent') {
layer.open({ top.layer.open({
type: 2, type: 2,
title: false, title: "默认名片",
closeBtn: 0, closeBtn: 1,
area: ['100%', '100%'], area: ['80%', '90%'],
shadeClose: true, shadeClose: true,
anim: 2, anim: 2,
content: top.restAjax.path('route/templatedefault/template-list.html', []), content: top.restAjax.path('route/templatedefault/template-list.html', []),