Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c117fe75a3
|
@ -121,7 +121,7 @@
|
||||||
align: 'center',
|
align: 'center',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
|
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
|
||||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
|
||||||
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
|
@ -129,6 +129,24 @@
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
|
$("#bootstrap-table").on('click','.openUpload',function () {
|
||||||
|
let _id = $(this)[0].dataset.id;
|
||||||
|
layer.open({
|
||||||
|
title:'上传附件',
|
||||||
|
area:['80%','80%'],
|
||||||
|
type:2,
|
||||||
|
content:'/base/affairs/upload',
|
||||||
|
success(res,index){
|
||||||
|
//传值
|
||||||
|
parent.a_upload_id = _id;
|
||||||
|
parent.a_upload_index = index;
|
||||||
|
parent.a_upload_type = "2";
|
||||||
|
},
|
||||||
|
end(){
|
||||||
|
$.table.search()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
align: 'center',
|
align: 'center',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
|
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
|
||||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
|
||||||
|
|
||||||
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
@ -115,6 +115,24 @@
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
|
$("#bootstrap-table").on('click','.openUpload',function () {
|
||||||
|
let _id = $(this)[0].dataset.id;
|
||||||
|
layer.open({
|
||||||
|
title:'上传附件',
|
||||||
|
area:['80%','80%'],
|
||||||
|
type:2,
|
||||||
|
content:'/base/affairs/upload',
|
||||||
|
success(res,index){
|
||||||
|
//传值
|
||||||
|
parent.a_upload_id = _id;
|
||||||
|
parent.a_upload_index = index;
|
||||||
|
parent.a_upload_type = "2";
|
||||||
|
},
|
||||||
|
end(){
|
||||||
|
$.table.search()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -196,8 +196,9 @@
|
||||||
content:'/base/affairs/upload',
|
content:'/base/affairs/upload',
|
||||||
success(res,index){
|
success(res,index){
|
||||||
//传值
|
//传值
|
||||||
parent.closeIndex = index;
|
|
||||||
parent.a_upload_id = _id;
|
parent.a_upload_id = _id;
|
||||||
|
parent.a_upload_index = index;
|
||||||
|
parent.a_upload_type = "1";
|
||||||
},
|
},
|
||||||
end(){
|
end(){
|
||||||
$.table.search()
|
$.table.search()
|
||||||
|
|
|
@ -204,8 +204,9 @@
|
||||||
content:'/base/affairs/upload',
|
content:'/base/affairs/upload',
|
||||||
success(res,index){
|
success(res,index){
|
||||||
//传值
|
//传值
|
||||||
parent.closeIndex = index;
|
|
||||||
parent.a_upload_id = _id;
|
parent.a_upload_id = _id;
|
||||||
|
parent.a_upload_index = index;
|
||||||
|
parent.a_upload_type = "1";
|
||||||
},
|
},
|
||||||
end(){
|
end(){
|
||||||
$.table.search()
|
$.table.search()
|
||||||
|
|
|
@ -196,8 +196,9 @@
|
||||||
content:'/base/affairs/upload',
|
content:'/base/affairs/upload',
|
||||||
success(res,index){
|
success(res,index){
|
||||||
//传值
|
//传值
|
||||||
parent.closeIndex = index;
|
|
||||||
parent.a_upload_id = _id;
|
parent.a_upload_id = _id;
|
||||||
|
parent.a_upload_index = index;
|
||||||
|
parent.a_upload_type = "1";
|
||||||
},
|
},
|
||||||
end(){
|
end(){
|
||||||
$.table.search()
|
$.table.search()
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
<th:block th:include="include :: footer"/>
|
<th:block th:include="include :: footer"/>
|
||||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
let _fileArr = [];
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// 多图上传
|
// 多图上传
|
||||||
$("#multipleFile").fileinput({
|
$("#multipleFile").fileinput({
|
||||||
|
@ -35,20 +33,33 @@
|
||||||
actionUpload:''
|
actionUpload:''
|
||||||
}
|
}
|
||||||
}).on('filebatchuploadsuccess', function (event, data, previewId, index) {
|
}).on('filebatchuploadsuccess', function (event, data, previewId, index) {
|
||||||
|
let _type = parent.parent.a_upload_type;
|
||||||
|
let _url = _type === '1'?'/base/affairs/edit':'/base/advancedparty/edit';
|
||||||
|
let _id = parent.parent.a_upload_id;
|
||||||
|
let _index = parent.parent.a_upload_index;
|
||||||
|
let _data = null;
|
||||||
let _fileNames = data.response.fileNames;
|
let _fileNames = data.response.fileNames;
|
||||||
|
if(_type === '1'){
|
||||||
|
_data = {
|
||||||
|
id:_id,
|
||||||
|
files:_fileNames
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
_data = {
|
||||||
|
id:_id,
|
||||||
|
events:_fileNames
|
||||||
|
}
|
||||||
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:'/base/affairs/edit',
|
url:_url,
|
||||||
type:'post',
|
type:'post',
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
data:{
|
data:_data,
|
||||||
id:parent.parent.a_upload_id,
|
|
||||||
files:_fileNames
|
|
||||||
},
|
|
||||||
success(res){
|
success(res){
|
||||||
if(res.code === 0){
|
if(res.code === 0){
|
||||||
layer.msg('上传成功', {icon: 1});
|
layer.msg('上传成功', {icon: 1});
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
parent.layer.close(parent.parent.closeIndex);
|
parent.layer.close(_index);
|
||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,11 +67,6 @@
|
||||||
}).on('fileremoved', function (event, id, index) {
|
}).on('fileremoved', function (event, id, index) {
|
||||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
});
|
});
|
||||||
|
|
||||||
//保存数据
|
|
||||||
$("#submitUploadData0825").click(function () {
|
|
||||||
console.log(parent.parent.a_upload_id,'ddd');
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -180,8 +180,9 @@
|
||||||
content:'/base/affairs/upload',
|
content:'/base/affairs/upload',
|
||||||
success(res,index){
|
success(res,index){
|
||||||
//传值
|
//传值
|
||||||
parent.closeIndex = index;
|
|
||||||
parent.a_upload_id = _id;
|
parent.a_upload_id = _id;
|
||||||
|
parent.a_upload_index = index;
|
||||||
|
parent.a_upload_type = "1";
|
||||||
},
|
},
|
||||||
end(){
|
end(){
|
||||||
$.table.search()
|
$.table.search()
|
||||||
|
|
Loading…
Reference in New Issue