|
@@ -31,97 +31,8 @@ layui.use(['element', 'table', 'form', 'upload',], function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-function detailHtml(data) {
|
|
|
- $('#details').show();
|
|
|
- $('#yxnnTable~div').hide();
|
|
|
- $('#yxpage').hide();
|
|
|
- var html = ''
|
|
|
- html += '<ul>'
|
|
|
- html += '<li>上传人电话:' + data.uploaderPhone + '</li>'
|
|
|
- if(data.uploadTime){
|
|
|
- html += '<li>上传时间:' + data.uploadTime + '</li>'
|
|
|
- }else if(data.updateTime){
|
|
|
- html += '<li>处理时间:' + data.updateTime + '</li>'
|
|
|
- }
|
|
|
- html += '<li>内容描述:' + data.pictureDescription + '</li>'
|
|
|
- html += '<li>上传照片: <div><img src="' + PATH + data.urlAddress + '" alt=""></div></li>'
|
|
|
- html += '<li></li>'
|
|
|
- html += '</ul>'
|
|
|
- html += '<div class="getBack">返回</div>'
|
|
|
- $('#details').empty().append(html);
|
|
|
- $('.getBack').click(function () {
|
|
|
- $('#details').hide();
|
|
|
- $('#yxnnTable~div').show();
|
|
|
- $('#yxpage').show();
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-var layerHtml = '';
|
|
|
-
|
|
|
-function editHtml(data) {
|
|
|
- var selectHtml = `<div style="margin:10px">选择内容类型:</div> <select name="pictureTypeSelect" lay-verify="">
|
|
|
- <option value="0">解放前</option>
|
|
|
- <option value="1">解放后-80年代</option>
|
|
|
- <option value="2">80年代-新世纪</option>
|
|
|
- <option value="3">千禧年-新世纪</option>
|
|
|
- </select> `;
|
|
|
- layerHtml = layer.open({
|
|
|
- type: 1 //此处以iframe举例
|
|
|
- , title: '审核'
|
|
|
- , area: ['390px', '260px']
|
|
|
- , shade: 0
|
|
|
- , maxmin: true
|
|
|
- , content: selectHtml
|
|
|
- , btn: ['通过', '不通过', '返回']
|
|
|
- , yes: function (index, layero) {
|
|
|
- data.pictureType = $("[name='pictureTypeSelect']").val()
|
|
|
- updateYxnn(2, data)
|
|
|
- }
|
|
|
- , btn2: function (index, layero) {
|
|
|
- updateYxnn(1, data)
|
|
|
- }
|
|
|
- , btn3: function (index, layero) {
|
|
|
- layer.close()
|
|
|
- }
|
|
|
- , cancel: function () {
|
|
|
- layer.close()
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
-function updateYxnn(obj, data) {
|
|
|
- data.examineState = obj
|
|
|
- $.ajax({
|
|
|
- url: PATH + "/yxnn/updateDocument"
|
|
|
- , type: 'post'
|
|
|
- , data: data
|
|
|
- , success: function (data) {
|
|
|
- if (data.result) {
|
|
|
- initTables(datas)
|
|
|
- layui.layer.close(layerHtml)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
|
|
|
-function deleteHtml(data) {
|
|
|
- layer.confirm('确认要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
|
|
- $.ajax({
|
|
|
- url: PATH + "/yxnn/deleteDocumentById/" + data.id
|
|
|
- , type: 'post'
|
|
|
- , success: function (data) {
|
|
|
- if (data.result) {
|
|
|
- initTables(datas)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- layer.close(index);
|
|
|
- });
|
|
|
-
|
|
|
-}
|
|
|
|
|
|
-$(function () {
|
|
|
-
|
|
|
-})
|
|
|
// 初始化点击事件
|
|
|
function initClick(table, form, upload) {
|
|
|
// 菜单切换
|
|
@@ -333,10 +244,96 @@ function initTables(datas) {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+}
|
|
|
+function detailHtml(data) {
|
|
|
+ $('#details').show();
|
|
|
+ $('#yxnnTable~div').hide();
|
|
|
+ $('#yxpage').hide();
|
|
|
+ var html = ''
|
|
|
+ html += '<ul>'
|
|
|
+ html += '<li>上传人电话:' + data.uploaderPhone + '</li>'
|
|
|
+ if(data.uploadTime){
|
|
|
+ html += '<li>上传时间:' + data.uploadTime + '</li>'
|
|
|
+ }else if(data.updateTime){
|
|
|
+ html += '<li>处理时间:' + data.updateTime + '</li>'
|
|
|
+ }
|
|
|
+ html += '<li>作者:' + data.pictureAuthor + '</li>'
|
|
|
+ html += '<li>图片题目:' + data.pictureTitle + '</li>'
|
|
|
+ html += '<li>内容描述:' + data.pictureDescription + '</li>'
|
|
|
+ html += '<li>上传照片: <div><img src="' + PATH + data.urlAddress + '" alt=""></div></li>'
|
|
|
+ html += '<li></li>'
|
|
|
+ html += '</ul>'
|
|
|
+ html += '<div class="getBack">返回</div>'
|
|
|
+ $('#details').empty().append(html);
|
|
|
+ $('.getBack').click(function () {
|
|
|
+ $('#details').hide();
|
|
|
+ $('#yxnnTable~div').show();
|
|
|
+ $('#yxpage').show();
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
+var layerHtml = '';
|
|
|
|
|
|
+function editHtml(data) {
|
|
|
+ var selectHtml = `<div style="margin:10px">选择内容类型:</div> <select name="pictureTypeSelect" lay-verify="">
|
|
|
+ <option value="0">解放前</option>
|
|
|
+ <option value="1">解放后-80年代</option>
|
|
|
+ <option value="2">80年代-新世纪</option>
|
|
|
+ <option value="3">千禧年-新世纪</option>
|
|
|
+ </select> `;
|
|
|
+ layerHtml = layer.open({
|
|
|
+ type: 1 //此处以iframe举例
|
|
|
+ , title: '审核'
|
|
|
+ , area: ['390px', '260px']
|
|
|
+ , shade: 0
|
|
|
+ , maxmin: true
|
|
|
+ , content: selectHtml
|
|
|
+ , btn: ['通过', '不通过', '返回']
|
|
|
+ , yes: function (index, layero) {
|
|
|
+ data.pictureType = $("[name='pictureTypeSelect']").val()
|
|
|
+ updateYxnn(2, data)
|
|
|
+ }
|
|
|
+ , btn2: function (index, layero) {
|
|
|
+ updateYxnn(1, data)
|
|
|
+ }
|
|
|
+ , btn3: function (index, layero) {
|
|
|
+ layer.close()
|
|
|
+ }
|
|
|
+ , cancel: function () {
|
|
|
+ layer.close()
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+function updateYxnn(obj, data) {
|
|
|
+ data.examineState = obj
|
|
|
+ $.ajax({
|
|
|
+ url: PATH + "/yxnn/updateDocument"
|
|
|
+ , type: 'post'
|
|
|
+ , data: data
|
|
|
+ , success: function (data) {
|
|
|
+ if (data.result) {
|
|
|
+ initTables(datas)
|
|
|
+ layui.layer.close(layerHtml)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
+function deleteHtml(data) {
|
|
|
+ layer.confirm('确认要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
|
|
+ $.ajax({
|
|
|
+ url: PATH + "/yxnn/deleteDocumentById/" + data.id
|
|
|
+ , type: 'post'
|
|
|
+ , success: function (data) {
|
|
|
+ if (data.result) {
|
|
|
+ initTables(datas)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ layer.close(index);
|
|
|
+ });
|
|
|
+
|
|
|
+}
|
|
|
function examineStatetemplet(d) {
|
|
|
if (d.examineState == 0) {
|
|
|
return '未审核'
|