|
@@ -38,7 +38,11 @@ function detailHtml(data) {
|
|
|
var html = ''
|
|
|
html += '<ul>'
|
|
|
html += '<li>上传人电话:' + data.uploaderPhone + '</li>'
|
|
|
- html += '<li>上传时间:' + data.uploadTime + '</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>'
|
|
@@ -55,7 +59,7 @@ function detailHtml(data) {
|
|
|
var layerHtml = '';
|
|
|
|
|
|
function editHtml(data) {
|
|
|
- var selectHtml = `<select name="pictureTypeSelect" lay-verify="">
|
|
|
+ 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>
|
|
@@ -70,7 +74,7 @@ function editHtml(data) {
|
|
|
, content: selectHtml
|
|
|
, btn: ['通过', '不通过', '返回']
|
|
|
, yes: function (index, layero) {
|
|
|
- data.pictureType=$("[name='pictureTypeSelect']").val()
|
|
|
+ data.pictureType = $("[name='pictureTypeSelect']").val()
|
|
|
updateYxnn(2, data)
|
|
|
}
|
|
|
, btn2: function (index, layero) {
|
|
@@ -87,7 +91,7 @@ function editHtml(data) {
|
|
|
function updateYxnn(obj, data) {
|
|
|
data.examineState = obj
|
|
|
$.ajax({
|
|
|
- url: PATH+"/yxnn/updateDocument"
|
|
|
+ url: PATH + "/yxnn/updateDocument"
|
|
|
, type: 'post'
|
|
|
, data: data
|
|
|
, success: function (data) {
|
|
@@ -102,7 +106,7 @@ function updateYxnn(obj, data) {
|
|
|
function deleteHtml(data) {
|
|
|
layer.confirm('确认要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
|
|
$.ajax({
|
|
|
- url: PATH+"/yxnn/deleteDocumentById/" + data.id
|
|
|
+ url: PATH + "/yxnn/deleteDocumentById/" + data.id
|
|
|
, type: 'post'
|
|
|
, success: function (data) {
|
|
|
if (data.result) {
|
|
@@ -303,23 +307,22 @@ var count = 0
|
|
|
|
|
|
function initTables(datas) {
|
|
|
$.ajax({
|
|
|
- url: PATH+'/yxnn/getDocumentPage',
|
|
|
+ url: PATH + '/yxnn/getDocumentPage',
|
|
|
type: 'get',
|
|
|
data: datas,
|
|
|
success: function (data) {
|
|
|
- console.log(data.data.data)
|
|
|
if (data.data) {
|
|
|
layui.table.render({
|
|
|
elem: '#yxnnTable'
|
|
|
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,
|
|
|
, cols: [[
|
|
|
{ field: 'id', width: 80, title: 'ID', }
|
|
|
- , { field: 'uploaderPhone', title: '电话' }
|
|
|
- , { field: 'updateTime', title: '时间', sort: true }
|
|
|
- , { field: 'pictureDescription', title: '描述内容', minWidth: 100 }
|
|
|
+ , { field: 'uploaderPhone', title: '电话', width: 150, }
|
|
|
+ , { field: 'uploadTime', title: '上传时间', sort: true, templet: uploadTimeemplet }
|
|
|
+ , { field: 'pictureDescription', title: '描述内容', width: '30%' }
|
|
|
, { field: 'pictureType', title: '图片', templet: pictureTypetemplet }
|
|
|
, { field: 'examineState', title: '状态', templet: examineStatetemplet }
|
|
|
- , { title: '操作', width: '30%', toolbar: '#barDemo' }
|
|
|
+ , { title: '操作', width: 300, toolbar: '#barDemo' }
|
|
|
]]
|
|
|
, data: data.data.data
|
|
|
|
|
@@ -330,6 +333,14 @@ function initTables(datas) {
|
|
|
|
|
|
|
|
|
}
|
|
|
+function uploadTimeemplet(value) {
|
|
|
+ if (value.uploadTime) {
|
|
|
+ var time = value.uploadTime.split('T')
|
|
|
+ return time[0] + ' ' + time[1].split('.')[0]
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
function examineStatetemplet(d) {
|
|
|
if (d.examineState == 0) {
|
|
@@ -341,14 +352,14 @@ function examineStatetemplet(d) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function pictureTypetemplet(d){
|
|
|
+function pictureTypetemplet(d) {
|
|
|
if (d.pictureType == 0) {
|
|
|
return '解放前'
|
|
|
} else if (d.pictureType == 1) {
|
|
|
return '解放后-80年代'
|
|
|
} else if (d.pictureType == 2) {
|
|
|
return '80年代-新世纪'
|
|
|
- }else if (d.pictureType == 3) {
|
|
|
+ } else if (d.pictureType == 3) {
|
|
|
return '千禧年-新世纪'
|
|
|
}
|
|
|
}
|