修复页面异常缩短问题
This commit is contained in:
@@ -34,3 +34,11 @@ export default {
|
||||
computed: {},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.modal-open{
|
||||
overflow-y: scroll;
|
||||
}
|
||||
body{
|
||||
padding-right:0 !important;
|
||||
}
|
||||
</style>
|
||||
|
@@ -8,32 +8,74 @@
|
||||
</section>
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
<div id="toolbar" style="height: auto;">
|
||||
<form id="searchForm" class="col-sm-pull-12" action="/admin/dynamic/verify/export" method="post"
|
||||
target="_blank">
|
||||
<div id="toolbar" style="height: auto">
|
||||
<form
|
||||
id="searchForm"
|
||||
class="col-sm-pull-12"
|
||||
action="/admin/dynamic/verify/export"
|
||||
method="post"
|
||||
target="_blank"
|
||||
>
|
||||
<div class="col-sm-12">
|
||||
<label for="erbanNo" class="col-sm-1 control-label">平台号:</label>
|
||||
<div class="col-sm-2"><input type="text" class="form-control" name="erbanNo" id="erbanNo"></div>
|
||||
<label for="erbanNo" class="col-sm-1 control-label"
|
||||
>平台号:</label
|
||||
>
|
||||
<div class="col-sm-2">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="erbanNo"
|
||||
id="erbanNo"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<label for="nick" class="col-sm-1 control-label">昵称:</label>
|
||||
<div class="col-sm-2"><input type="text" class="form-control" name="nick" id="nick"></div>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="nick" id="nick" />
|
||||
</div>
|
||||
|
||||
<label for="status" class="col-sm-1 control-label">状态:</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="status" id="status" data-btn-class="btn-warning" class="form-control">
|
||||
<select
|
||||
name="status"
|
||||
id="status"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control"
|
||||
>
|
||||
<option value="" selected="selected">全部</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<label class="col-sm-1 control-label">发布时间:</label>
|
||||
<div class="col-sm-2"><input type="text" class="form-control" name="beginDate" id="beginDate">
|
||||
</div><span class="col-sm-1">至</span>
|
||||
<div class="col-sm-2"><input type="text" class="form-control" name="endDate" id="endDate"></div>
|
||||
|
||||
<label for="wolrdId" class="col-sm-1 control-label">话题名称:</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="wolrdId" id="wolrdId" data-btn-class="btn-warning" class="form-control">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="beginDate"
|
||||
id="beginDate"
|
||||
/>
|
||||
</div>
|
||||
<span class="col-sm-1">至</span>
|
||||
<div class="col-sm-2">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="endDate"
|
||||
id="endDate"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<label for="wolrdId" class="col-sm-1 control-label"
|
||||
>话题名称:</label
|
||||
>
|
||||
<div class="col-sm-2">
|
||||
<select
|
||||
name="wolrdId"
|
||||
id="wolrdId"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control"
|
||||
>
|
||||
<option value="" selected="selected">全部</option>
|
||||
<option value="-1">动态广场</option>
|
||||
</select>
|
||||
@@ -56,33 +98,57 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="modal fade" id="showModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
||||
<div
|
||||
class="modal fade"
|
||||
id="showModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content" style="width: 500px;">
|
||||
<div class="modal-content" style="width: 500px">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">查看</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="dynamicId" />
|
||||
<div class="show" style="margin-left: 60px">
|
||||
|
||||
<div class="show" style="margin-left: 60px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="imgMask"><img src="" alt=""></div>
|
||||
<div id="imgMask"><img src="" alt="" /></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
关闭
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="notPassModal" tabindex="-1" role="dialog" aria-labelledby="modalLabe2">
|
||||
<div
|
||||
class="modal fade"
|
||||
id="notPassModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabe2"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content" style="width: 600px;">
|
||||
<div class="modal-content" style="width: 600px">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabe2">请选择原因</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -91,13 +157,21 @@
|
||||
<input type="hidden" name="status" id="status1" />
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<select id="quick_reason" class="form-control" data-btn-class="btn-warning"
|
||||
onchange="setReason()">
|
||||
<option value="0">動態可能包含抽煙、喝酒、辱罵、攻擊他人等不文明內容</option>
|
||||
<select
|
||||
id="quick_reason"
|
||||
class="form-control"
|
||||
data-btn-class="btn-warning"
|
||||
onchange="setReason()"
|
||||
>
|
||||
<option value="0">
|
||||
動態可能包含抽煙、喝酒、辱罵、攻擊他人等不文明內容
|
||||
</option>
|
||||
<option value="1">動態涉及色情、暴力、病毒等違規內容</option>
|
||||
<option value="2">動態包含政治敏感信息</option>
|
||||
<option value="3">動態包含廣告、營銷內容</option>
|
||||
<option value="4">動態可能包含個人隱私信息或涉及他人營私信息</option>
|
||||
<option value="4">
|
||||
動態可能包含個人隱私信息或涉及他人營私信息
|
||||
</option>
|
||||
<option value="5">動態可能涉及線下交易</option>
|
||||
<option value="6">動態內容無意義</option>
|
||||
<option value="7">動態內容與世界主題無關</option>
|
||||
@@ -109,32 +183,54 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<textarea name="reason" id="reason" class="form-control" rows="3"></textarea>
|
||||
<textarea
|
||||
name="reason"
|
||||
id="reason"
|
||||
class="form-control"
|
||||
rows="3"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" id="not-pass-save">保存</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="not-pass-save">
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="showContentModal" tabindex="-1" role="dialog" aria-labelledby="modalLabe3">
|
||||
<div
|
||||
class="modal fade"
|
||||
id="showContentModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabe3"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content" style="width: 500px;">
|
||||
<div class="modal-content" style="width: 500px">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabe3">查看动态内容详情</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span id="dynamic-content"></span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
关闭
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -142,68 +238,76 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
import { showLoading, hideLoading } from '@/utils/maintainer';
|
||||
|
||||
import TableHelper from "@/utils/bootstrap-table-helper";
|
||||
import { showLoading, hideLoading } from "@/utils/maintainer";
|
||||
|
||||
var picker1 = $("#beginDate").datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
format: "yyyy-mm-dd hh:ii:00",
|
||||
autoclose: true,
|
||||
todayBtn: true
|
||||
todayBtn: true,
|
||||
});
|
||||
var picker2 = $("#endDate").datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
format: "yyyy-mm-dd hh:ii:00",
|
||||
autoclose: true,
|
||||
todayBtn: true
|
||||
todayBtn: true,
|
||||
});
|
||||
picker1.on('changeDate', function () {
|
||||
var date = $('#beginDate').datetimepicker('getDate');
|
||||
picker2.datetimepicker('setStartDate', date);
|
||||
picker1.on("changeDate", function () {
|
||||
var date = $("#beginDate").datetimepicker("getDate");
|
||||
picker2.datetimepicker("setStartDate", date);
|
||||
});
|
||||
picker2.on('changeDate', function () {
|
||||
var date = $('#endDate').datetimepicker('getDate');
|
||||
picker1.datetimepicker('setEndDate', date);
|
||||
picker2.on("changeDate", function () {
|
||||
var date = $("#endDate").datetimepicker("getDate");
|
||||
picker1.datetimepicker("setEndDate", date);
|
||||
});
|
||||
export default {
|
||||
name: "DynamicVerifyView",
|
||||
setup() {
|
||||
|
||||
function setReason() {
|
||||
if ($("#quick_reason option:selected").val() != 9) {
|
||||
$("#reason").val($("#quick_reason option:selected").text());
|
||||
} else {
|
||||
$("#reason").val('');
|
||||
$("#reason").val("");
|
||||
}
|
||||
}
|
||||
|
||||
function showContent(note) {
|
||||
var content = $(note).parent().find('input').val();
|
||||
$('#dynamic-content').text(content);
|
||||
$('#showContentModal').modal('show');
|
||||
var content = $(note).parent().find("input").val();
|
||||
$("#dynamic-content").text(content);
|
||||
$("#showContentModal").modal("show");
|
||||
}
|
||||
|
||||
function showPic(resUrl, id) {
|
||||
var html = '<div style="width: 320px;">';
|
||||
console.log(resUrl);
|
||||
if (resUrl != null && resUrl != '' && resUrl != undefined) {
|
||||
if (resUrl != null && resUrl != "" && resUrl != undefined) {
|
||||
var resUrls = resUrl.split(",");
|
||||
for (var i = 0; i < resUrls.length; i++) {
|
||||
if (resUrls[i] != null && resUrls[i] != undefined && resUrls[i] != "") {
|
||||
html += '<img id="imgs" src="' + resUrls[i] + '" style="width: 100px;height: 100px;">';
|
||||
if (
|
||||
resUrls[i] != null &&
|
||||
resUrls[i] != undefined &&
|
||||
resUrls[i] != ""
|
||||
) {
|
||||
html +=
|
||||
'<img id="imgs" src="' +
|
||||
resUrls[i] +
|
||||
'" style="width: 100px;height: 100px;">';
|
||||
}
|
||||
}
|
||||
}
|
||||
html += '</div>';
|
||||
html += "</div>";
|
||||
// 打开编辑弹窗
|
||||
$("#showModal").modal('show');
|
||||
$("#showModal").modal("show");
|
||||
$("#dynamicId").val(id);
|
||||
$(".show").html(html);
|
||||
}
|
||||
|
||||
function showVideo(resUrl, id) {
|
||||
var html = '<video width="320" height="240" controls autoplay><source src="' + resUrl + '" type="video/mp4"></video>';
|
||||
var html =
|
||||
'<video width="320" height="240" controls autoplay><source src="' +
|
||||
resUrl +
|
||||
'" type="video/mp4"></video>';
|
||||
// 打开编辑弹窗
|
||||
$("#showModal").modal('show');
|
||||
$("#showModal").modal("show");
|
||||
$("#dynamicId").val(id);
|
||||
$(".show").html(html);
|
||||
}
|
||||
@@ -215,7 +319,7 @@ export default {
|
||||
setReason,
|
||||
showContent,
|
||||
showPic,
|
||||
showVideo
|
||||
showVideo,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -225,103 +329,157 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
|
||||
$(function () {
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$("#table").bootstrapTable("destroy");
|
||||
setStatusSelectOption();
|
||||
setTypeSelectOption();
|
||||
$('#table').bootstrapTable({
|
||||
$("#table").bootstrapTable({
|
||||
columns: [
|
||||
//{field: 'id', title: 'id', align: 'center', width: '5%'},
|
||||
{ field: 'tmp', title: 'id', align: 'center', checkbox: true, width: '5%' },
|
||||
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
|
||||
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
|
||||
{ field: 'gender', title: '性别', align: 'center', width: '5%' },
|
||||
{ field: 'worldName', title: '话题', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'content',
|
||||
title: '动态内容',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
field: "tmp",
|
||||
title: "id",
|
||||
align: "center",
|
||||
checkbox: true,
|
||||
width: "5%",
|
||||
},
|
||||
{ field: "erbanNo", title: "平台号", align: "center", width: "5%" },
|
||||
{ field: "nick", title: "昵称", align: "center", width: "5%" },
|
||||
{ field: "gender", title: "性别", align: "center", width: "5%" },
|
||||
{ field: "worldName", title: "话题", align: "center", width: "5%" },
|
||||
{
|
||||
field: "content",
|
||||
title: "动态内容",
|
||||
align: "center",
|
||||
width: "5%",
|
||||
formatter: function (val, row, index) {
|
||||
if (isEmpty(val)) {
|
||||
return "-";
|
||||
} else {
|
||||
if (val.length > 50) {
|
||||
var content = "<input type='hidden' id='input-content' value='" + val + "'>";
|
||||
return val.substring(0, 50) + "..." + content + "<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showContent(this) style='margin-left: 10px;'>查看更多</a>";
|
||||
var content =
|
||||
"<input type='hidden' id='input-content' value='" +
|
||||
val +
|
||||
"'>";
|
||||
return (
|
||||
val.substring(0, 50) +
|
||||
"..." +
|
||||
content +
|
||||
"<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showContent(this) style='margin-left: 10px;'>查看更多</a>"
|
||||
);
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'resUrl',
|
||||
title: '图片/视频/语音',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
field: "resUrl",
|
||||
title: "图片/视频/语音",
|
||||
align: "center",
|
||||
width: "5%",
|
||||
formatter: function (val, row, index) {
|
||||
if (row.type == 1) {
|
||||
return '<audio controls="controls"><source src="' + val + '" type="audio/mpeg"></audio>';
|
||||
return (
|
||||
'<audio controls="controls"><source src="' +
|
||||
val +
|
||||
'" type="audio/mpeg"></audio>'
|
||||
);
|
||||
} else if (row.type == 2) {
|
||||
return "<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showPic('" + row.resUrl + "'," + row.id + ")>查看图片</button>";
|
||||
return (
|
||||
"<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showPic('" +
|
||||
row.resUrl +
|
||||
"'," +
|
||||
row.id +
|
||||
")>查看图片</button>"
|
||||
);
|
||||
} else if (row.type == 3) {
|
||||
return "<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showVideo('" + row.resUrl + "'," + row.id + ")>查看视频</button>";
|
||||
}
|
||||
return (
|
||||
"<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showVideo('" +
|
||||
row.resUrl +
|
||||
"'," +
|
||||
row.id +
|
||||
")>查看视频</button>"
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '发布时间',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
valign: 'middle',
|
||||
field: "createTime",
|
||||
title: "发布时间",
|
||||
align: "center",
|
||||
width: "5%",
|
||||
valign: "middle",
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
var date = new Date(val);
|
||||
return date.format("yyyy-MM-dd hh:mm:00");
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
},
|
||||
{ field: 'statusStr', title: '状态', align: 'center', width: '5%' },
|
||||
{ field: 'updateBy', title: '操作人', align: 'center', width: '5%' },
|
||||
},
|
||||
{ field: "statusStr", title: "状态", align: "center", width: "5%" },
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '操作时间',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
valign: 'middle',
|
||||
field: "updateBy",
|
||||
title: "操作人",
|
||||
align: "center",
|
||||
width: "5%",
|
||||
},
|
||||
{
|
||||
field: "updateTime",
|
||||
title: "操作时间",
|
||||
align: "center",
|
||||
width: "5%",
|
||||
valign: "middle",
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
var date = new Date(val);
|
||||
return date.format("yyyy-MM-dd hh:mm:00");
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
field: "id",
|
||||
title: "操作",
|
||||
align: "center",
|
||||
width: "5%",
|
||||
formatter: function (val, row, index) {
|
||||
var pass = '<button class="btn btn-sm btn-primary opt-pass" data-id=' + val + ' data-status=1>通 过</button>';
|
||||
var noPass = '<button class="btn btn-sm btn-danger opt-not-pass" data-id=' + val + ' data-status=2>不通过</button>';
|
||||
var shelve = '<button class="btn btn-sm btn-primary opt-pass" data-id=' + val + ' data-status=4>上 架</button>';
|
||||
var unshelve = '<button class="btn btn-sm btn-danger opt-not-pass" data-id=' + val + ' data-status=5>下 架</button>';
|
||||
var pass =
|
||||
'<button class="btn btn-sm btn-primary opt-pass" data-id=' +
|
||||
val +
|
||||
" data-status=1>通 过</button>";
|
||||
var noPass =
|
||||
'<button class="btn btn-sm btn-danger opt-not-pass" data-id=' +
|
||||
val +
|
||||
" data-status=2>不通过</button>";
|
||||
var shelve =
|
||||
'<button class="btn btn-sm btn-primary opt-pass" data-id=' +
|
||||
val +
|
||||
" data-status=4>上 架</button>";
|
||||
var unshelve =
|
||||
'<button class="btn btn-sm btn-danger opt-not-pass" data-id=' +
|
||||
val +
|
||||
" data-status=5>下 架</button>";
|
||||
if (row.status == 0) {
|
||||
return pass + '</br>' + noPass;
|
||||
} else if (row.status == 1 || row.status == 6 || row.status == 4) {
|
||||
return pass + "</br>" + noPass;
|
||||
} else if (
|
||||
row.status == 1 ||
|
||||
row.status == 6 ||
|
||||
row.status == 4
|
||||
) {
|
||||
return unshelve;
|
||||
} else if (row.status == 2 || row.status == 5 || row.status == 7) {
|
||||
} else if (
|
||||
row.status == 2 ||
|
||||
row.status == 5 ||
|
||||
row.status == 7
|
||||
) {
|
||||
return shelve;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
@@ -334,63 +492,65 @@ export default {
|
||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||
//设置为limit可以获取limit, offset, search, sort, order
|
||||
queryParamsType: "-",
|
||||
queryParams: function queryParams(params) { //设置查询参数
|
||||
queryParams: function queryParams(params) {
|
||||
//设置查询参数
|
||||
var param = {
|
||||
pageNumber: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
erbanNo: $('#erbanNo').val(),
|
||||
nick: $('#nick').val(),
|
||||
status: $('#status').val(),
|
||||
beginDate: $('#beginDate').val(),
|
||||
endDate: $('#endDate').val(),
|
||||
wolrdId: $('#wolrdId').val(),
|
||||
erbanNo: $("#erbanNo").val(),
|
||||
nick: $("#nick").val(),
|
||||
status: $("#status").val(),
|
||||
beginDate: $("#beginDate").val(),
|
||||
endDate: $("#endDate").val(),
|
||||
wolrdId: $("#wolrdId").val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
url: '/admin/dynamic/verify/list',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
toolbar: "#toolbar",
|
||||
url: "/admin/dynamic/verify/list",
|
||||
onLoadSuccess: function () {
|
||||
//加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
onLoadError: function () {
|
||||
//加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
$("#btnSearch").on("click", function () {
|
||||
TableHelper.doRefresh("#table");
|
||||
});
|
||||
|
||||
//重置
|
||||
$('#btnReset').on('click', function () {
|
||||
$('#erbanNo').val("");
|
||||
$('#nick').val("");
|
||||
$('#status').val("");
|
||||
$('#beginDate').val("");
|
||||
$('#endDate').val("");
|
||||
$('#wolrdId').val("");
|
||||
$("#btnReset").on("click", function () {
|
||||
$("#erbanNo").val("");
|
||||
$("#nick").val("");
|
||||
$("#status").val("");
|
||||
$("#beginDate").val("");
|
||||
$("#endDate").val("");
|
||||
$("#wolrdId").val("");
|
||||
});
|
||||
|
||||
//审核不通过/下架弹框
|
||||
$("#table").on("click", '.opt-not-pass', function () {
|
||||
|
||||
$("#table").on("click", ".opt-not-pass", function () {
|
||||
var id = $(this).attr("data-id");
|
||||
var status = $(this).attr("data-status");
|
||||
if (id == 'undefined') {
|
||||
if (id == "undefined") {
|
||||
$("#tipMsg").text("id参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
if (status == 'undefined') {
|
||||
if (status == "undefined") {
|
||||
$("#tipMsg").text("状态参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
$("#dynamicId1").val(id);
|
||||
$("#status1").val(status);
|
||||
// 打开编辑弹窗
|
||||
$("#notPassModal").modal('show');
|
||||
$("#notPassModal").modal("show");
|
||||
$("#modalLabe2").text("请选择不通过的原因");
|
||||
status = 5;
|
||||
if (status) {
|
||||
@@ -401,15 +561,15 @@ export default {
|
||||
//审核不通过/下架弹窗
|
||||
$("#not-pass-save").click(function () {
|
||||
var id = $("#dynamicId1").val();
|
||||
if (id == 'undefined') {
|
||||
if (id == "undefined") {
|
||||
$("#tipMsg").text("id参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
var status = $("#status1").val();
|
||||
if (status == 'undefined') {
|
||||
if (status == "undefined") {
|
||||
$("#tipMsg").text("状态参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
var reason = $("#reason").val();
|
||||
@@ -424,18 +584,17 @@ export default {
|
||||
verify(text, id, status, reason);
|
||||
});
|
||||
|
||||
$("#table").on("click", '.opt-pass', function () {
|
||||
|
||||
$("#table").on("click", ".opt-pass", function () {
|
||||
var id = $(this).attr("data-id");
|
||||
var status = $(this).attr("data-status");
|
||||
if (id == 'undefined') {
|
||||
if (id == "undefined") {
|
||||
$("#tipMsg").text("id参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
if (status == 'undefined') {
|
||||
if (status == "undefined") {
|
||||
$("#tipMsg").text("状态参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
var text = "通过";
|
||||
@@ -445,40 +604,45 @@ export default {
|
||||
verify(text, id, status, "");
|
||||
});
|
||||
//导出
|
||||
$('#btnExport').on('click', function () {
|
||||
var erbanNo = $('#erbanNo').val();
|
||||
var nick = $('#nick').val();
|
||||
var status = $('#status').val();
|
||||
var beginDate = $('#beginDate').val();
|
||||
var endDate = $('#endDate').val();
|
||||
var wolrdId = $('#wolrdId').val();
|
||||
if (isEmpty(erbanNo) && isEmpty(nick) && isEmpty(status) && isEmpty(beginDate) && isEmpty(endDate) && isEmpty(wolrdId)) {
|
||||
$("#btnExport").on("click", function () {
|
||||
var erbanNo = $("#erbanNo").val();
|
||||
var nick = $("#nick").val();
|
||||
var status = $("#status").val();
|
||||
var beginDate = $("#beginDate").val();
|
||||
var endDate = $("#endDate").val();
|
||||
var wolrdId = $("#wolrdId").val();
|
||||
if (
|
||||
isEmpty(erbanNo) &&
|
||||
isEmpty(nick) &&
|
||||
isEmpty(status) &&
|
||||
isEmpty(beginDate) &&
|
||||
isEmpty(endDate) &&
|
||||
isEmpty(wolrdId)
|
||||
) {
|
||||
$("#tipMsg").text("请输入导出条件!");
|
||||
$("#tipModal").modal('show');
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
$('#searchForm').submit();
|
||||
$("#searchForm").submit();
|
||||
});
|
||||
//图片放大
|
||||
$('#showModal').on('mouseenter', '#imgs', function (e) {
|
||||
var src = $(this).attr('src');
|
||||
$('#imgMask img').attr('src', src);
|
||||
$('#imgMask').show();
|
||||
$('#imgMask').css({
|
||||
$("#showModal").on("mouseenter", "#imgs", function (e) {
|
||||
var src = $(this).attr("src");
|
||||
$("#imgMask img").attr("src", src);
|
||||
$("#imgMask").show();
|
||||
$("#imgMask").css({
|
||||
top: e.clientY + 20,
|
||||
})
|
||||
})
|
||||
$('#showModal').on('mouseleave', '#imgs', function (e) {
|
||||
console.log('移出');
|
||||
$('#imgMask').hide();
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#showModal").on("mouseleave", "#imgs", function (e) {
|
||||
console.log("移出");
|
||||
$("#imgMask").hide();
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
||||
//判断空值
|
||||
function isEmpty(data) {
|
||||
if (data == null || data == undefined || data == "") {
|
||||
@@ -491,40 +655,40 @@ function verify(text, id, status, reason) {
|
||||
//if (confirm("你确认【"+ text + "】该动态吗?")) {
|
||||
showLoading();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
type: "post",
|
||||
url: "/admin/dynamic/verify/changeStatus",
|
||||
data: {
|
||||
dynamicId: id,
|
||||
status: status,
|
||||
reason: reason
|
||||
reason: reason,
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
hideLoading();
|
||||
if (status == 2 || status == 5) {
|
||||
$("#notPassModal").modal('hide');
|
||||
$("#notPassModal").modal("hide");
|
||||
}
|
||||
if (json.success == 'true') {
|
||||
if (json.success == "true") {
|
||||
$("#tipMsg").text("操作成功");
|
||||
$("#tipModal").modal('show');
|
||||
$("#tipModal").modal("show");
|
||||
TableHelper.doRefresh("#table");
|
||||
} else {
|
||||
$("#tipMsg").text("操作失败");
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
$("#tipModal").modal("show");
|
||||
}
|
||||
},
|
||||
});
|
||||
//}
|
||||
}
|
||||
|
||||
function setTypeSelectOption() {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
type: "get",
|
||||
url: "/admin/world/list",
|
||||
data: {
|
||||
status: 1,
|
||||
pageNumber: 1,
|
||||
pageSize: 1000
|
||||
pageSize: 1000,
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
@@ -533,28 +697,32 @@ function setTypeSelectOption() {
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
let item = rows[i];
|
||||
let name = item.name;
|
||||
if (name.startsWith('{') && name.endsWith('}')) {
|
||||
if (name.startsWith("{") && name.endsWith("}")) {
|
||||
name = JSON.parse(name).zh;
|
||||
}
|
||||
$('#wolrdId').append('<option value="' + rows[i].id + '">' + name + '</option>');
|
||||
}
|
||||
$("#wolrdId").append(
|
||||
'<option value="' + rows[i].id + '">' + name + "</option>"
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function setStatusSelectOption() {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
type: "get",
|
||||
url: "/admin/dynamic/verify/getStatus",
|
||||
success: function (json) {
|
||||
if (json != null && json != undefined) {
|
||||
var rows = json;
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
$('#status').append('<option value="' + rows[i].value + '">' + rows[i].key + '</option>');
|
||||
}
|
||||
$("#status").append(
|
||||
'<option value="' + rows[i].value + '">' + rows[i].key + "</option>"
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user