first commit
This commit is contained in:
@@ -0,0 +1,726 @@
|
||||
{extend name="../../base/view/common/base" /} {block name="body"}
|
||||
<div class="card-content">
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md8">
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<dl class="home-desc p-4" style="line-height: 70px;">
|
||||
<dt>
|
||||
<img src="{$params.thumb}" onerror="javascript:this.src='{__IMG__}/icon.png';this.onerror=null;" />
|
||||
</dt>
|
||||
<dd class="h5">
|
||||
Hi
|
||||
{$params.name},您的ID号是:{$params.uid},欢迎使用<strong>{:get_system_config('web','admin_title')}</strong>,是您工作中必不可少的伙伴!
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="table-title">最新企业公告</div>
|
||||
<div style="padding: 8px 12px 12px">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="80" />
|
||||
<col width="90" />
|
||||
<col />
|
||||
<col width="136" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">编号ID</th>
|
||||
<th style="text-align: center">公告分类</th>
|
||||
<th style="text-align: center">公告标题</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="layui-table-body">
|
||||
{empty name="note_list"}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="layui-none">无数据</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/empty} {volist name="note_list" id="vo"}
|
||||
<tr>
|
||||
<td align="center">N{$vo.id}</td>
|
||||
<td align="center">{$vo.cate_title}</td>
|
||||
<td>
|
||||
<a class="open-a" data-href="/home/index/note_detail/id/{$vo.id}">{$vo.title}</a>
|
||||
</td>
|
||||
<td align="center">{$vo.create_time}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="table-title">我参与的项目</div>
|
||||
<div style="padding: 8px 12px 12px">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="80" />
|
||||
<col width="70" />
|
||||
<col width="80" />
|
||||
<col />
|
||||
<col width="80" />
|
||||
<col width="60" />
|
||||
<col width="180" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">编号ID</th>
|
||||
<th style="text-align: center">状态</th>
|
||||
<th style="text-align: center">项目类型</th>
|
||||
<th style="text-align: center">项目主题</th>
|
||||
<th style="text-align: center">负责人</th>
|
||||
<th style="text-align: center">任务</th>
|
||||
<th style="text-align: center">计划工期</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="layui-table-body">
|
||||
{empty name="$project.list"}
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<div class="layui-none">无数据</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/empty} {volist name="$project.list" id="vo"}
|
||||
<tr>
|
||||
<td align="center">M{$vo.id}</td>
|
||||
<td align="center">
|
||||
<span class="layui-badge bg-status-{$vo.status}">{$vo.status_name}</span>
|
||||
</td>
|
||||
<td align="center">
|
||||
<span class="layui-xmlx bg-cate-{$vo.project_type}" style="color: white;">
|
||||
{if condition="$vo.project_type eq 1"}内部项目
|
||||
{elseif condition="$vo.project_type eq 2"}外部项目
|
||||
{elseif condition="$vo.project_type eq 3"}申报项目
|
||||
{/if}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<a class="link-a" data-href="/project/index/view/id/{$vo.id}">{$vo.name}</a>
|
||||
</td>
|
||||
<td align="center">{$vo.director_name}</td>
|
||||
<td align="center">{$vo.tasks}</td>
|
||||
<td align="center">{$vo.plan_time}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="table-title">我参与的任务</div>
|
||||
<div style="padding: 8px 12px 12px">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="80" />
|
||||
<col width="150" />
|
||||
<col />
|
||||
<col width="80" />
|
||||
<col width="80" />
|
||||
<col width="70" />
|
||||
<col width="80" />
|
||||
<col width="110" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">编号ID</th>
|
||||
<th style="text-align: center">所属项目</th>
|
||||
<th style="text-align: center">任务主题</th>
|
||||
<th style="text-align: center">类型</th>
|
||||
<th style="text-align: center">紧急程度</th>
|
||||
<th style="text-align: center">状态</th>
|
||||
<th style="text-align: center">预估工时</th>
|
||||
<th style="text-align: center">计划完成日期</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="layui-table-body">
|
||||
{empty name="$task.list"}
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<div class="layui-none">无数据</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/empty} {volist name="$task.list" id="vo"}
|
||||
<tr>
|
||||
<td align="center">T{$vo.id}</td>
|
||||
<td align="center">
|
||||
<a class="link-a" data-href="/project/index/view/id/{$vo.project_id}">{$vo.belong_project}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="open-a" data-href="/task/index/view/id/{$vo.id}">{$vo.title}</a>
|
||||
</td>
|
||||
<td align="center">{$vo.type_name}</td>
|
||||
<td align="center">
|
||||
<span class="layui-badge bg-priority-{$vo.priority}">{$vo.priority_name}</span>
|
||||
</td>
|
||||
<td align="center">
|
||||
<span class="layui-badge bg-flow-{$vo.flow_status}">{$vo.flow_name}</span>
|
||||
</td>
|
||||
<td align="center">{$vo.plan_hours}</td>
|
||||
<td align="center">{$vo.end_time}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="table-title">最新知识文档</div>
|
||||
<div style="padding: 8px 12px 12px">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="80" />
|
||||
<col width="90" />
|
||||
<col />
|
||||
<col width="60" />
|
||||
<col width="80" />
|
||||
<col width="136" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">编号ID</th>
|
||||
<th style="text-align: center">所属分类</th>
|
||||
<th style="text-align: center">知识主题</th>
|
||||
<th style="text-align: center">阅览数</th>
|
||||
<th style="text-align: center">创建员工</th>
|
||||
<th style="text-align: center">创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="layui-table-body">
|
||||
{empty name="knowledge_list"}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div class="layui-none">无数据</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/empty} {volist name="knowledge_list" id="vo"}
|
||||
<tr>
|
||||
<td align="center">K{$vo.id}</td>
|
||||
<td align="center">{$vo.cate_name}</td>
|
||||
<td>
|
||||
<a class="link-a" data-href="/knowledge/index/doc_detail/kid/{$vo.id}">{$vo.title}</a>
|
||||
</td>
|
||||
<td align="center">{$vo.views}</td>
|
||||
<td align="center">{$vo.admin_name}</td>
|
||||
<td align="center">{$vo.create_time}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div id="chartView" style="width: 100%; height: 300px"></div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div id="chartYear" style="width: 100%; height: 240px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-card dashboard-num">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="num-title">项目</div>
|
||||
<div class="num-num">{$count.projects}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">产品</div>
|
||||
<div class="num-num">{$count.product}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">任务</div>
|
||||
<div class="num-num">{$count.tasks}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">知识库</div>
|
||||
<div class="num-num">{$count.knowledges}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="table-title">系统信息</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table" lay-skin="" lay-size="sm">
|
||||
{if condition="($install == true)"}
|
||||
<tr>
|
||||
<td colspan="4" style="color: #e94335; background-color: #fafafa">
|
||||
提醒:发现app目录下的install文件夹没删除,为了系统的安全,请手动去删除。
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="info-td">服务器系统</td>
|
||||
<td>{:get_system_info('os')}</td>
|
||||
<td class="info-td">PHP版本</td>
|
||||
<td>{:get_system_info('php')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">上传附件限制</td>
|
||||
<td>{:get_system_info('upload_max_filesize')}</td>
|
||||
<td class="info-td">执行时间限制</td>
|
||||
<td>{:get_system_info('max_execution_time')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">ThinkPHP版本</td>
|
||||
<td>{$TP_VERSION}</td>
|
||||
<td class="info-td">系统版本</td>
|
||||
<td>{:SYS_VERSION}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card dashboard-total">
|
||||
<div class="table-title mb-3">我的工作情况</div>
|
||||
<div class="layui-card dashboard-num">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="num-title">参与项目</div>
|
||||
<div class="num-num">{$project.count}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">已完成</div>
|
||||
<div class="num-num">{$project.count_ok}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">未完成</div>
|
||||
<div class="num-num">{$project.count_no}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">完成率</div>
|
||||
<div class="num-num">{$project.count_lv}%</div>
|
||||
<div class="badge">
|
||||
<span class="layui-bg-blue">影响力</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="num-title">参与任务</div>
|
||||
<div class="num-num">{$task.count}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">已完成</div>
|
||||
<div class="num-num">{$task.count_ok}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">未完成</div>
|
||||
<div class="num-num">{$task.count_no}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">完成率</div>
|
||||
<div class="num-num">{$task.count_lv}%</div>
|
||||
<div class="badge">
|
||||
<span class="layui-bg-blue">拼效率</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="num-title">工作记录</div>
|
||||
<div class="num-num">{$work.count}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">总工时</div>
|
||||
<div class="num-num">{$work.hours}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">任务延期</div>
|
||||
<div class="num-num">{$task.delay}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="num-title">延期率</div>
|
||||
<div class="num-num">{$task.delay_lv}%</div>
|
||||
<div class="badge">
|
||||
<span class="layui-bg-blue">勤奋度</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="table-title">
|
||||
最活跃员工<span style="
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
margin-left: 5px;
|
||||
">最近30天前十的活跃度</span>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div id="logChart" style="width: 100%; height: 268px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="table-title">员工最新动态</div>
|
||||
<div class="layui-card-body dashboard-logs">
|
||||
<ul class="layui-timeline" id="logs"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script src="https://cdn.staticfile.org/echarts/5.3.0/echarts.min.js"></script>
|
||||
<script>
|
||||
const moduleInit = [
|
||||
"tool",
|
||||
"gouguEdit",
|
||||
"gouguComment",
|
||||
"gouguSchedule",
|
||||
"employeepicker",
|
||||
];
|
||||
function gouguInit() {
|
||||
get_logs();
|
||||
get_view_data();
|
||||
}
|
||||
|
||||
function setHour(num) {
|
||||
var str = num + ":00";
|
||||
if (num < 10) {
|
||||
str = "0" + num + ":00";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
var archiveCalendar = {};
|
||||
function getRange() {
|
||||
let today = new Date();
|
||||
let tYear = today.getFullYear();
|
||||
let tMonth = today.getMonth() + 1;
|
||||
let tDate = today.getDate();
|
||||
let dateFirst = tYear + "-" + tMonth + "-" + tDate;
|
||||
let datelast = tYear - 1 + "-" + tMonth + "-" + tDate;
|
||||
let dataRange = [];
|
||||
dataRange.push(dateFirst);
|
||||
dataRange.push(datelast);
|
||||
return dataRange;
|
||||
}
|
||||
|
||||
function getDay() {
|
||||
var today = new Date();
|
||||
var dayArray = [];
|
||||
for (var i = 0; i < 366; i++) {
|
||||
var targetday_milliseconds = today.getTime() - 1000 * 60 * 60 * 24 * i;
|
||||
var date = new Date(targetday_milliseconds);
|
||||
dayArray.push(retunDay(date));
|
||||
}
|
||||
return dayArray;
|
||||
}
|
||||
|
||||
function retunDay(day) {
|
||||
var tYear = day.getFullYear();
|
||||
var tMonth = day.getMonth();
|
||||
var tDate = day.getDate();
|
||||
tMonth = tMonth + 1;
|
||||
if (tMonth.toString().length == 1) {
|
||||
tMonth = "0" + tMonth;
|
||||
}
|
||||
if (tDate.toString().length == 1) {
|
||||
tDate = "0" + tDate;
|
||||
}
|
||||
var dateStr = tYear + "-" + tMonth + "-" + tDate;
|
||||
var dateArray = [];
|
||||
dateArray.push(dateStr);
|
||||
if (archiveCalendar[dateStr]) {
|
||||
dateArray.push(archiveCalendar[dateStr]);
|
||||
} else {
|
||||
dateArray.push(0);
|
||||
}
|
||||
return dateArray;
|
||||
}
|
||||
|
||||
var chartView = echarts.init(document.getElementById("chartView"));
|
||||
var chartYear = echarts.init(document.getElementById("chartYear"));
|
||||
var logChart = echarts.init(document.getElementById("logChart"));
|
||||
function get_view_data() {
|
||||
$.ajax({
|
||||
url: "/home/index/get_view_data",
|
||||
type: "get",
|
||||
data: {},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var data_first = e.data.data_first;
|
||||
var data_second = e.data.data_second;
|
||||
archiveCalendar = e.data.data_three;
|
||||
var data_logs = e.data.data_logs;
|
||||
var myDate = new Date();
|
||||
var nowHour = myDate.getHours(); //获取当前小时数(0-23)
|
||||
var xData = [];
|
||||
var yData1 = [];
|
||||
var yData2 = [];
|
||||
var logItem = [];
|
||||
$.each(data_first, function (key, value) {
|
||||
if (key <= nowHour) {
|
||||
yData1.push(value);
|
||||
}
|
||||
});
|
||||
|
||||
$.each(data_second, function (key, value) {
|
||||
xData.push(setHour(key));
|
||||
yData2.push(value);
|
||||
});
|
||||
|
||||
$.each(data_logs, function (key, value) {
|
||||
let item = {
|
||||
value: value.count,
|
||||
name: value.name,
|
||||
};
|
||||
logItem.push(item);
|
||||
});
|
||||
|
||||
let opsA = {
|
||||
title: {
|
||||
top: "12px",
|
||||
text: "今日与昨日员工活跃度",
|
||||
left: "8px",
|
||||
textStyle: {
|
||||
fontSize: "18",
|
||||
color: "#333",
|
||||
},
|
||||
},
|
||||
color: ["#1AAD19", "#1890FF"],
|
||||
grid: {
|
||||
left: "16px",
|
||||
right: "30px",
|
||||
bottom: "12px",
|
||||
top: "60px",
|
||||
containLabel: true,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "cross",
|
||||
crossStyle: {
|
||||
color: "#999",
|
||||
},
|
||||
},
|
||||
},
|
||||
toolbox: {
|
||||
show: true,
|
||||
},
|
||||
legend: {
|
||||
data: ["今日", "昨日"],
|
||||
top: "16px",
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: "category",
|
||||
boundaryGap: !1,
|
||||
data: xData,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: "#999999",
|
||||
width: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: "value",
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#999999",
|
||||
width: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: "今日",
|
||||
type: "line",
|
||||
smooth: !0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default",
|
||||
opacity: 0.2,
|
||||
},
|
||||
},
|
||||
},
|
||||
data: yData1,
|
||||
},
|
||||
{
|
||||
name: "昨日",
|
||||
type: "line",
|
||||
smooth: !0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default",
|
||||
opacity: 0.2,
|
||||
},
|
||||
},
|
||||
},
|
||||
data: yData2,
|
||||
},
|
||||
],
|
||||
};
|
||||
chartView.setOption(opsA);
|
||||
|
||||
let opsB = {
|
||||
title: {
|
||||
top: "12px",
|
||||
text: "近一年员工活跃度",
|
||||
left: "8px",
|
||||
textStyle: {
|
||||
fontSize: "18",
|
||||
color: "#333",
|
||||
},
|
||||
},
|
||||
tooltip: {
|
||||
padding: 6,
|
||||
formatter: function (obj) {
|
||||
var value = obj.value;
|
||||
return (
|
||||
'<div style="font-size: 12px;">' +
|
||||
value[0] +
|
||||
"员工活跃度:" +
|
||||
value[1] +
|
||||
"</div>"
|
||||
);
|
||||
},
|
||||
},
|
||||
visualMap: {
|
||||
min: 0,
|
||||
max: 300,
|
||||
show: false,
|
||||
inRange: {
|
||||
color: ["#fafafa", "#1AAD19"],
|
||||
},
|
||||
},
|
||||
calendar: {
|
||||
top: 72,
|
||||
left: 52,
|
||||
right: 20,
|
||||
range: getRange(),
|
||||
cellSize: ["auto", 21],
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: "#aaa",
|
||||
type: "dashed",
|
||||
},
|
||||
},
|
||||
itemStyle: {
|
||||
borderWidth: 0.5,
|
||||
},
|
||||
yearLabel: { show: false },
|
||||
monthLabel: {
|
||||
nameMap: "cn",
|
||||
fontSize: 12,
|
||||
},
|
||||
dayLabel: {
|
||||
show: true,
|
||||
formatter: "{start} 1st",
|
||||
fontWeight: "lighter",
|
||||
nameMap: [
|
||||
"周日",
|
||||
"周一",
|
||||
"周二",
|
||||
"周三",
|
||||
"周四",
|
||||
"周五",
|
||||
"周六",
|
||||
],
|
||||
fontSize: 12,
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: "heatmap",
|
||||
coordinateSystem: "calendar",
|
||||
calendarIndex: 0,
|
||||
data: getDay(),
|
||||
},
|
||||
],
|
||||
};
|
||||
chartYear.setOption(opsB);
|
||||
|
||||
let optC = {
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
formatter: "{a} <br/>{b} :{d}%",
|
||||
},
|
||||
legend: {
|
||||
top: "1%",
|
||||
left: "center",
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "活跃度",
|
||||
type: "pie",
|
||||
radius: "50%",
|
||||
center: ["50%", "60%"],
|
||||
data: logItem,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: "rgba(0, 0, 0, 0.5)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
logChart.setOption(optC);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
window.onresize = function () {
|
||||
chartView.resize();
|
||||
chartYear.resize();
|
||||
logChart.resize();
|
||||
};
|
||||
|
||||
//获取工作记录
|
||||
function get_logs() {
|
||||
$.ajax({
|
||||
url: "/home/index/log_list",
|
||||
type: "get",
|
||||
data: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
},
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
var html = "";
|
||||
$.each(e.data, function (key, value) {
|
||||
html += `<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title"><span title="${value.id}">${value.times}</span>,${value.content}</div>
|
||||
</div>
|
||||
</li>`;
|
||||
});
|
||||
$("#logs").html(html);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<!-- /脚本 -->
|
||||
{/block}
|
||||
</div>
|
||||
@@ -0,0 +1,60 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="style"}
|
||||
<style type="text/css">
|
||||
.latest-news{padding-top: 12px; padding-bottom:30px; padding-left: 20px; position: relative;}
|
||||
.latest-news .layui-timeline-title{padding-bottom:0; font-size: 14px;}
|
||||
.latest-news .layui-timeline-item{padding-bottom:5px;}
|
||||
.layui-timeline-title span{color:#999}
|
||||
.panel-more{width: 100%; height:48px; line-height: 48px; text-align: center; position: absolute; bottom: 0; left:0;}
|
||||
.panel-more a{color:#0088FF}
|
||||
</style>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="body-content" style="padding: 20px;">
|
||||
<div class="h3-title">员工动态</div>
|
||||
<div class="latest-news">
|
||||
<ul class="layui-timeline" id="logs"></ul>
|
||||
<div class="panel-more"><a href="javascript:getLogs();">查看更多动态</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
var page=1,limit=20;
|
||||
function getLogs() {
|
||||
$.ajax({
|
||||
url: "/api/index/log_list",
|
||||
type: 'get',
|
||||
data: {
|
||||
page:page,
|
||||
limit: limit
|
||||
},
|
||||
success: function(e) {
|
||||
if (e.code == 0) {
|
||||
var html = '';
|
||||
if(e.data.length>0){
|
||||
page++;
|
||||
$.each(e.data, function(key, value) {
|
||||
html += '<li class="layui-timeline-item">\
|
||||
<i class="layui-icon layui-timeline-axis"></i>\
|
||||
<div class="layui-timeline-content layui-text">\
|
||||
<div class="layui-timeline-title"><span title="'+value.id+'">'+value.times+'</span>,'+value.content+'</div>\
|
||||
</div>\
|
||||
</li>';
|
||||
});
|
||||
$('#logs').append(html);
|
||||
}else{
|
||||
$('.panel-more').remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
getLogs();
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
@@ -0,0 +1,36 @@
|
||||
<style>
|
||||
.text-detial-ops{line-height: 30px; color:#999; font-size: 12px; padding: 12px 0;}
|
||||
.text-detial-ops span{margin-right: 20px;}
|
||||
.text-detial-ops a{margin-right:10px;}
|
||||
.text-detial-content{padding: 8px 0; color:#333; word-break: break-all; border-top:1px solid #e8e8e8;font-size: 16px!important; line-height: 1.72!important;}
|
||||
.text-detial-content p{padding: 8px 0;}
|
||||
.text-detial-content img{max-width:98%!important; margin:0 auto; display:block; border: 1px solid #e6e6e6; -webkit-box-shadow: 0 2px 6px rgba(26,26,26,.08); box-shadow: 0 2px 6px rgba(26,26,26,.08); border-radius: 4px;}
|
||||
.text-detial-content h1,.text-detial-content h2,.text-detial-content h3,.text-detial-content h4,.text-detial-content h5{margin-top:10px;}
|
||||
.text-detial-content a{color:#186AF2; font-style:italic;}
|
||||
.text-detial-content a:hover{text-decoration:underline;}
|
||||
|
||||
.text-detial-content p code,.blog-detial-content pre{margin:0 3px;font-size: 14px; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; background: #f6f6f6; padding: 10px; border-radius: 2px;}
|
||||
.text-detial-content p code{border: 1px solid #eee;padding: 2px 4px;}
|
||||
.text-detial-content table {border-collapse: collapse; border-spacing: 0; display: block; width: 100%; overflow: auto; word-break: normal;word-break: keep-all; margin-top: 0;margin-bottom: 16px;}
|
||||
.text-detial-content table tr {background-color: #fff;border-top: 1px solid #ccc;}
|
||||
.text-detial-content table tr:nth-child(2n) {background-color: #f8f8f8;}
|
||||
.text-detial-content table td, .blog-detial-content table th { padding: 6px 12px;border: 1px solid #ddd; font-size:14px; }
|
||||
.text-detial-content table th {font-weight: 800;}
|
||||
.text-detial-content li {list-style: initial;margin-left: 20px;}
|
||||
:not(pre)>code[class*=language-], pre[class*=language-]{background:#fff!important;border:1px solid #e8e8e8!important; border-radius:3px;}
|
||||
</style>
|
||||
<div class="page-content p-4">
|
||||
<h1>{$note.title}</h1>
|
||||
<div class="text-detial-ops">
|
||||
<span>{$note.admin_name}发表于:{$note.create_time | date='Y-m-d H:i'}</span>
|
||||
<span>公告分类:
|
||||
{volist name=":set_recursion(get_note_cate())" id="v"}
|
||||
{eq name="$note.cate_id" value="$v.id" }{$v.title}{/eq}
|
||||
{/volist}</span>
|
||||
<span>展示期间:{$note.start_time | date='Y-m-d'} - {$note.end_time | date='Y-m-d'}</span>
|
||||
<span>阅览:{$note.read}</span>
|
||||
</div>
|
||||
<div class="text-detial-content">
|
||||
{$note.content|raw}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>404错误</title>
|
||||
<style>
|
||||
.box-404{padding: 50px 0; text-align: center;}
|
||||
.error-404{width:480px; margin: 0 auto; line-height: 2;}
|
||||
.title-404{font-size: 24px; color: #EA4335;}
|
||||
.text-404{font-size: 16px; color:#333;}
|
||||
.btn-404{padding-top: 20px;}
|
||||
.btn-404 a{padding: 3px 20px; font-size: 14px; display: inline-block; background-color: #EA4335; color: #fff; margin-right: 30px; border-radius: 4px; text-decoration: none;}
|
||||
.btn-404 a:hover{opacity: .9;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box-404">
|
||||
<div><img src="/static/home/images/404.gif" width="500" height="300" alt="404"></div>
|
||||
</div>
|
||||
<div class="error-404">
|
||||
<div class="title-404">出错啦!</div>
|
||||
<div class="text-404">对不起,您要访问的页面不见了...</div>
|
||||
<div class="btn-404"><a href="javascript:history.go(-1);">返回上一页</a><a href="/index">返回首页</a></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,199 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||||
<title>{:get_system_config('web','admin_title')}</title>
|
||||
<link rel="stylesheet" href="{__METE__}/layui/css/layui.css?v={:get_system_config('web','version')}" media="all" />
|
||||
<link rel="stylesheet" href="/static/assets/gougu/css/gougu.css">
|
||||
<style type="text/css">
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #eaf3ff;
|
||||
}
|
||||
|
||||
#container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
color: #ffffff;
|
||||
background: url({__IMG__}/bg2.png);
|
||||
/* background: url({__IMG__}/bg.jpg); */
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.login {
|
||||
height: 100vh;
|
||||
/* background-color: aqua; */
|
||||
}
|
||||
|
||||
.m20 {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.mb40 {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.fl {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.login_l,
|
||||
.login_r {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.login_l {
|
||||
.logo {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.login_r {
|
||||
background-color: #fff;
|
||||
opacity: .85;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 0 0 20px 20px rgba(17, 17, 17, 0.3); /* 外发光效果 */
|
||||
|
||||
.login_content {
|
||||
height: 500px;
|
||||
|
||||
.login_logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.login_main {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.captcha_img img {
|
||||
width: 142px;
|
||||
height: 38px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.login_footer {
|
||||
color: #252525;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 主体部分 -->
|
||||
<div>
|
||||
<div id="container">
|
||||
<div class="login">
|
||||
<div class="login_l fl">
|
||||
<div class="logo">
|
||||
<img src="{__IMG__}/logo-w.png" alt="" width="400">
|
||||
</div>
|
||||
</div>
|
||||
<div class="login_r fl">
|
||||
<div class="login_content">
|
||||
<div class="login_logo mb40">
|
||||
<h1>项目管理系统</h1>
|
||||
</div>
|
||||
<div class="login_main m20">
|
||||
<!-- <p>请输入您的登陆信息</p> -->
|
||||
<form class="layui-form" id="gougu-login">
|
||||
<div class="layui-form-item">
|
||||
<input type="text" name="username" lay-verify="required" value=""
|
||||
placeholder="请输入账户" lay-reqText="请输入账户" autocomplete="off"
|
||||
class="layui-input" />
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input type="password" name="password" lay-verify="required" value=""
|
||||
placeholder="请输入密码" lay-reqText="请输入密码" autocomplete="off"
|
||||
class="layui-input" />
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-inline" style="width: 158px">
|
||||
<input type="text" name="captcha" lay-verify="required" placeholder="验证码"
|
||||
lay-reqText="请输入验证码" autocomplete="off" class="layui-input" />
|
||||
</div>
|
||||
<div class="layui-input-inline captcha_img"
|
||||
style="width: 142px; height: 44px; margin-right: 0">
|
||||
{:captcha_img()}
|
||||
<input type="hidden" value="{:make_token()}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="login-submit" class="layui-btn layui-btn-fluid layui-bg-cyan" lay-submit
|
||||
lay-filter="login-submit">
|
||||
登入系统
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="login_footer m20">
|
||||
Copyright © 2022-2024 <a href="http://www.meteteme.com/" target='_blank'>江苏美天科技</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 脚本部分 -->
|
||||
<script src="{__METE__}/layui/layui.js?v={:get_system_config('web','version')}"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(["form"], function () {
|
||||
var form = layui.form,
|
||||
$ = layui.$;
|
||||
layer = layui.layer;
|
||||
// 登录过期的时候,跳出ifram框架
|
||||
if (top.location != self.location) top.location = self.location;
|
||||
form.on("submit(login-submit)", function (data) {
|
||||
$.ajax({
|
||||
url: "/home/login/login_submit",
|
||||
data: $("#gougu-login").serialize(),
|
||||
type: "post",
|
||||
async: false,
|
||||
success: function (res) {
|
||||
layer.msg(res.msg, { icon: 1, time: 1500, offset: "100px" });
|
||||
if (res.code === 0) {
|
||||
setTimeout(function () {
|
||||
// parent.document.location.reload();
|
||||
parent.document.location.href = "/";
|
||||
}, 1500);
|
||||
} else {
|
||||
$('[alt="captcha"]').click();
|
||||
}
|
||||
},
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,224 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1"
|
||||
/>
|
||||
<title>{:get_system_config('web','admin_title')}</title>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{__METE__}/layui/css/layui.css?v={:get_system_config('web','version')}"
|
||||
media="all"
|
||||
/>
|
||||
<style type="text/css">
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #eaf3ff;
|
||||
}
|
||||
input:-webkit-autofill {
|
||||
-webkit-box-shadow: 0 0 0px 1000px white inset;
|
||||
}
|
||||
#container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
color: #ffffff;
|
||||
background: url({__IMG__}/bg.png);
|
||||
background-size: cover;
|
||||
}
|
||||
.container h2 {
|
||||
font-size: 36px;
|
||||
padding: 36px 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
.login {
|
||||
width: 360px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -240px;
|
||||
margin-left: -180px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 6px rgba(92, 110, 136, 0.32);
|
||||
}
|
||||
.login .top {
|
||||
width: 360px;
|
||||
height: 117px;
|
||||
background-color: #fbbc05;
|
||||
border-radius: 12px 12px 0 0;
|
||||
line-height: 117px;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
-webkit-transform: rotate(0deg);
|
||||
-moz-transform: rotate(0deg);
|
||||
-ms-transform: rotate(0deg);
|
||||
-o-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
.login .top .bg1 {
|
||||
display: inline-block;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
background: #fff;
|
||||
opacity: 0.1;
|
||||
border-radius: 0 72px 0 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 42px;
|
||||
}
|
||||
.login .top .bg2 {
|
||||
display: inline-block;
|
||||
width: 92px;
|
||||
height: 92px;
|
||||
background: #fff;
|
||||
opacity: 0.1;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
right: -16px;
|
||||
top: -16px;
|
||||
}
|
||||
.login .bottom {
|
||||
background-color: #fff;
|
||||
padding: 26px 24px;
|
||||
border-radius: 0 0 12px 12px;
|
||||
}
|
||||
|
||||
.layui-input,
|
||||
.layui-textarea {
|
||||
height: 44px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.captcha_img img {
|
||||
width: 142px;
|
||||
height: 44px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.layui-btn {
|
||||
height: 45px;
|
||||
font-size: 16px;
|
||||
margin-top: 6px;
|
||||
background-color: #ff6347 !important;
|
||||
}
|
||||
.foot {
|
||||
position: absolute;
|
||||
font-size: 12px;
|
||||
bottom: 28px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
color: #458bf3;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div class="login">
|
||||
<div class="top">
|
||||
<img src="{__IMG__}/login_logo.png" height="60" width="200" />
|
||||
<span class="bg1"></span>
|
||||
<span class="bg2"></span>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<form class="layui-form" id="gougu-login">
|
||||
<div class="layui-form-item">
|
||||
<input
|
||||
type="text"
|
||||
name="username"
|
||||
lay-verify="required"
|
||||
value=""
|
||||
placeholder="请输入账户"
|
||||
lay-reqText="请输入账户"
|
||||
autocomplete="off"
|
||||
class="layui-input"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
lay-verify="required"
|
||||
value=""
|
||||
placeholder="请输入密码"
|
||||
lay-reqText="请输入密码"
|
||||
autocomplete="off"
|
||||
class="layui-input"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-inline" style="width: 158px">
|
||||
<input
|
||||
type="text"
|
||||
name="captcha"
|
||||
lay-verify="required"
|
||||
placeholder="验证码"
|
||||
lay-reqText="请输入验证码"
|
||||
autocomplete="off"
|
||||
class="layui-input"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="layui-input-inline captcha_img"
|
||||
style="width: 142px; height: 44px; margin-right: 0"
|
||||
>
|
||||
{:captcha_img()}
|
||||
<input type="hidden" value="{:make_token()}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
id="login-submit"
|
||||
class="layui-btn layui-btn-fluid layui-bg-cyan"
|
||||
lay-submit
|
||||
lay-filter="login-submit"
|
||||
>
|
||||
登入系统
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="foot">
|
||||
{:get_system_config('web','copyright')} 江苏美天科技 -
|
||||
v{:CMS_VERSION},Powered by METETEME
|
||||
</div>
|
||||
</div>
|
||||
<script src="{__METE__}/layui/layui.js?v={:get_system_config('web','version')}"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(["form"], function () {
|
||||
var form = layui.form,
|
||||
$ = layui.$;
|
||||
layer = layui.layer;
|
||||
// 登录过期的时候,跳出ifram框架
|
||||
if (top.location != self.location) top.location = self.location;
|
||||
form.on("submit(login-submit)", function (data) {
|
||||
$.ajax({
|
||||
url: "/home/login/login_submit",
|
||||
data: $("#gougu-login").serialize(),
|
||||
type: "post",
|
||||
async: false,
|
||||
success: function (res) {
|
||||
layer.msg(res.msg, { icon: 1, time: 1500, offset: "100px" });
|
||||
if (res.code === 0) {
|
||||
setTimeout(function () {
|
||||
// parent.document.location.reload();
|
||||
parent.document.location.href = "/";
|
||||
}, 1500);
|
||||
} else {
|
||||
$('[alt="captcha"]').click();
|
||||
}
|
||||
},
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,395 @@
|
||||
<form class="layui-form page-content p-4">
|
||||
<h3 class="h3-title">发送消息</h3>
|
||||
{if condition="$id eq 0"}
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">接收人类型</td>
|
||||
<td>
|
||||
<input type="radio" name="type" lay-filter="type" value="1" title="同事" checked>
|
||||
<input type="radio" name="type" lay-filter="type" value="2" title="部门">
|
||||
<input type="radio" name="type" lay-filter="type" value="3" title="岗位">
|
||||
<input type="radio" name="type" lay-filter="type" value="4" title="全部">
|
||||
</td>
|
||||
</tr>
|
||||
<tr id ="person">
|
||||
<td class="layui-td-gray">收件人<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="text" name="person_name" value="" lay-verify="required" lay-reqText="请选择收件人" placeholder="请选择收件人" readonly class="layui-input">
|
||||
<input type="hidden" name="uids" value="">
|
||||
<input type="hidden" name="dids" value="">
|
||||
<input type="hidden" name="pids" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">消息主题<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="text" name="title" value="" lay-verify="required" lay-reqText="请输入消息主题" placeholder="请输入消息主题" class="layui-input" lay-verify="required">
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="layui-td-gray">发送内容<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<textarea name="content" placeholder="请输入消息内容" class="layui-textarea" style="height: 200px;" lay-verify="required" lay-reqText="请输入消息内容"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top">消息附件</td>
|
||||
<td>
|
||||
<div class="layui-upload" style="max-width: 800px;">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="testList">选择文件并上传</button> <span style="color:#FF5722;margin-left: 10px;">最大只能上传{:get_system_info('upload_max_filesize')}的文件,超过{:get_system_info('upload_max_filesize')}请压缩成多个文件上传。</span>
|
||||
<div class="layui-upload-list" style="display:none;">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="60%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
<th width="20%" style="text-align:center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else/}
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray">接收人类型</td>
|
||||
<td>
|
||||
<input type="radio" name="type" lay-filter="type" value="1" title="同事" {eq name="$detail.type" value="1"}checked{/eq}>
|
||||
<input type="radio" name="type" lay-filter="type" value="2" title="部门" {eq name="$detail.type" value="2"}checked{/eq}>
|
||||
<input type="radio" name="type" lay-filter="type" value="3" title="岗位" {eq name="$detail.type" value="3"}checked{/eq}>
|
||||
<input type="radio" name="type" lay-filter="type" value="4" title="全部" {eq name="$detail.type" value="4"}checked{/eq}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id ="person" {eq name="$detail.type" value="3"}style="display:none;"{/eq}>
|
||||
<td class="layui-td-gray">收件人<span style="color: red">*</span></td>
|
||||
<td>
|
||||
{eq name="$detail.type" value="3"}
|
||||
<input type="text" name="person_name" value="0" lay-verify="required" lay-reqText="请选择收件人" placeholder="请选择收件人" readonly class="layui-input">
|
||||
{else/}
|
||||
<input type="text" name="person_name" value="{$detail.person_name}" lay-verify="required" lay-reqText="请选择收件人" placeholder="请选择收件人" readonly class="layui-input">
|
||||
{/eq}
|
||||
<input type="hidden" name="uids" value="{$detail.type_user}">
|
||||
<input type="hidden" name="dids" value="{$detail.type_user}">
|
||||
<input type="hidden" name="pids" value="{$detail.type_user}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">消息主题<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="text" name="title" value="{$detail.title}" lay-verify="required" lay-reqText="请输入消息主题" placeholder="请输入消息主题" class="layui-input" lay-verify="required">
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="layui-td-gray">发送内容<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<textarea name="content" placeholder="请输入消息内容" class="layui-textarea" style="height: 200px;" lay-verify="required" lay-reqText="请输入消息内容">{$detail.content}</textarea>
|
||||
{if condition="($detail.fid > 0)"}
|
||||
<table class="layui-table" style="margin-top:10px">
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">引用消息内容</td>
|
||||
<td>{$detail.from_content}</td>
|
||||
</tr>
|
||||
{notempty name="$detail.from_file_array"}
|
||||
<tr>
|
||||
<td class="layui-td-gray-2" style="vertical-align:top">引用消息附件</td>
|
||||
<td>
|
||||
<table class="layui-table" style="max-width: 680px;">
|
||||
<thead>
|
||||
<th width="70%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
<th width="10%" style="text-align:center">操作</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="$detail.from_file_array" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.name}</td>
|
||||
<td style="text-align: center;">{$vo.filesize/1048576|round=2}MB</td>
|
||||
<td style="text-align: center;"><a class="layui-btn layui-btn-xs layui-btn-normal" href="{$vo.filepath}" target="_blank">下载</a></td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top">消息附件</td>
|
||||
<td>
|
||||
<div class="layui-upload" style="max-width: 800px;">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="testList">选择文件并上传</button> <span style="color:#FF5722;margin-left: 10px;">最大只能上传{:get_system_info('upload_max_filesize')}的文件,超过{:get_system_info('upload_max_filesize')}请压缩成多个文件上传。</span>
|
||||
<div class="layui-upload-list" {empty name="$file_array"}style="display:none;"{/empty}>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="60%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
<th width="20%" style="text-align:center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList">
|
||||
{notempty name="$file_array"}
|
||||
{volist name="file_array" id="vo"}
|
||||
<tr data-id="{$vo.file_id}" id="tr_{$vo.id}">
|
||||
<td>{$vo.name}</td>
|
||||
<td style="text-align: center;">{$vo.filesize/1048576|round=2}MB</td>
|
||||
<td style="text-align: center;">
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger demo-delete" data-id="{$vo.id}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
<div class="layui-form-item" style="padding-top:10px;">
|
||||
<input type="hidden" value="{$id}" name="id">
|
||||
<input type="hidden" value="{$fid}" name="fid">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="draftform">存为草稿</button>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即发送</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
function openInit() {
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
,table = layui.table
|
||||
,dtree = layui.dtree
|
||||
,upload = layui.upload
|
||||
,tool = layui.tool
|
||||
,employeepicker = layui.employeepicker;
|
||||
|
||||
form.render();
|
||||
//监听保存到草稿并发送
|
||||
form.on('submit(webform)', function(data){
|
||||
var file_ids = [];
|
||||
var item_tr = $('#demoList').find('tr');
|
||||
item_tr.each(function(index,item) {
|
||||
var item_id = $(item).data('id');
|
||||
if (item_id && item_id != '') {
|
||||
file_ids.push(item_id);
|
||||
}
|
||||
});
|
||||
console.log(file_ids.join(','));
|
||||
data.field.file_ids = file_ids.join(',');
|
||||
let callback = function (e) {
|
||||
if(e.code==0){
|
||||
layer.msg('消息正在发送...');
|
||||
$.ajax({
|
||||
url: "/home/message/send",
|
||||
type:'post',
|
||||
data:{'id':e.data},
|
||||
success: function (e) {
|
||||
layer.msg(e.msg);
|
||||
tool.close(1000);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/save",data.field,callback);
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听保存到草稿
|
||||
form.on('submit(draftform)', function(data){
|
||||
var file_ids = [];
|
||||
var item_tr = $('#demoList').find('tr');
|
||||
item_tr.each(function(index,item) {
|
||||
var item_id = $(item).data('id');
|
||||
if (item_id && item_id != '') {
|
||||
file_ids.push(item_id);
|
||||
}
|
||||
});
|
||||
console.log(file_ids.join(','));
|
||||
data.field.file_ids = file_ids.join(',');
|
||||
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
tool.close(1000);
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/save",data.field,callback);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
upload.render({ //允许上传的文件后缀
|
||||
elem: '#testList'
|
||||
,url: '/api/index/upload' //此处配置你自己的上传接口即可
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'jpeg|jpg|png|gif|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件
|
||||
,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
|
||||
layer.msg('上传中...',{time: 3600000});
|
||||
}
|
||||
,done: function(res, index, upload){
|
||||
layer.msg('上传成功');
|
||||
var timestamp=new Date().getTime();
|
||||
var tr = '<tr data-id="'+res.data.id+'" id="tr_'+timestamp+'">\
|
||||
<td>'+ res.data.name +'</td>\
|
||||
<td align="center">'+ (res.data.filesize/(1024*1024)).toFixed(2) +'MB</td>\
|
||||
<td align="center">\
|
||||
<span class="layui-btn layui-btn-xs layui-btn-danger demo-delete" data-id="'+timestamp+'">删除</span>\
|
||||
</td>\
|
||||
</tr>';
|
||||
$('.layui-upload-list').show();
|
||||
$('#demoList').append(tr);
|
||||
}
|
||||
,error: function(index, upload){
|
||||
layer.msg('上传失败');
|
||||
}
|
||||
});
|
||||
|
||||
$('#demoList').on('click','.demo-delete',function(){
|
||||
let id = $(this).data('id');
|
||||
layer.confirm('确定要删除该附件吗?', {icon: 3, title:'提示'}, function(index){
|
||||
$('#tr_'+id).remove()
|
||||
layer.close(index);
|
||||
});
|
||||
})
|
||||
|
||||
//选择收件人类型
|
||||
form.on('radio(type)', function (data) {
|
||||
$('[name="person_name"]').val('');
|
||||
$('[name="dids"]').val('');
|
||||
$('[name="uids"]').val('');
|
||||
$('[name="auids"]').val('');
|
||||
if(data.value==4){
|
||||
$('#person').val('0').hide();
|
||||
}
|
||||
else{
|
||||
$('#person').val('').show();
|
||||
}
|
||||
});
|
||||
|
||||
//选择对应人
|
||||
$('[name="person_name"]').on('click',function(){
|
||||
type = $("input[name='type']:checked").val();
|
||||
if(type == 1){
|
||||
addEmployee();
|
||||
}else if(type == 2){
|
||||
selectDepartment();
|
||||
}else if(type == 3){
|
||||
selectAuditor();
|
||||
}
|
||||
});
|
||||
|
||||
//添加人员
|
||||
function addEmployee(){
|
||||
var ids=$('[name="uids"]').val(),names=$('[name="person_name"]').val(),idsArray=[],namesArray=[];
|
||||
if(ids!=''){
|
||||
idsArray=ids.split(',');
|
||||
namesArray=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
ids:idsArray,
|
||||
names:namesArray,
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
callback:function(ids,names){
|
||||
$('[name="uids"]').val(ids.join(',')),
|
||||
$('[name="person_name"]').val(names.join(','));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//选择部门
|
||||
function selectDepartment(){
|
||||
var tpl='<div style="width:382px; height:338px;overflow-y: auto;">\
|
||||
<div id="checkemployeetree" style="padding:10px 0;"></div>\
|
||||
</div>';
|
||||
layer.open({
|
||||
type:1,
|
||||
title:'选择部门',
|
||||
area:['400px','450px'],
|
||||
content:tpl,
|
||||
success:function(){
|
||||
$.ajax({
|
||||
url: "/api/index/get_department_tree",
|
||||
type:'get',
|
||||
success:function(res){
|
||||
dtree.render({
|
||||
elem: "#checkemployeetree",
|
||||
data: res.trees,
|
||||
icon: "2", //修改二级图标样式
|
||||
checkbarType: "no-all", // 默认就是all,其他的值为: no-all p-casc self only
|
||||
checkbar: true //开启复选框
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
btn: ['确定'],
|
||||
btnAlign:'c',
|
||||
yes: function(){
|
||||
var ids=[],names=[];
|
||||
var check=dtree.getCheckbarNodesParam("checkemployeetree");
|
||||
if(check.length==0){
|
||||
layer.msg('请选择部门');
|
||||
return;
|
||||
}
|
||||
for(var m=0; m<check.length; m++){
|
||||
ids.push(check[m].nodeId);
|
||||
names.push(check[m].context);
|
||||
}
|
||||
$('[name="person_name"]').val(names.join(','));
|
||||
$('[name="dids"]').val(ids.join(','));
|
||||
layer.closeAll();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//选择岗位
|
||||
function selectAuditor(){
|
||||
layer.open({
|
||||
title:'选择岗位',
|
||||
type:1,
|
||||
area:['360px','480px'],
|
||||
content:'<div style="padding:5px 12px"><div id="position"></div></div>',
|
||||
success:function(){
|
||||
tableid=table.render({
|
||||
elem: '#position'
|
||||
,url: "/api/index/get_position"
|
||||
,page: false //开启分页
|
||||
,cols: [[
|
||||
{type:'checkbox',title: '选择'}
|
||||
,{field:'id', width:80, title: '编号', align:'center'}
|
||||
,{field:'name',title: '岗位名称'}
|
||||
]]
|
||||
});
|
||||
},
|
||||
btn: ['确定'],
|
||||
btnAlign:'c',
|
||||
yes: function(){
|
||||
var checkStatus = table.checkStatus(tableid.config.id);
|
||||
var data = checkStatus.data,val = [],title=[];
|
||||
if(data.length>0){
|
||||
for ( var i = 0; i <data.length; i++){
|
||||
val.push(data[i].id);
|
||||
title.push(data[i].name);
|
||||
}
|
||||
$('[name="person_name"]').val(title.join(','));
|
||||
$('[name="pids"]').val(val.join(','));
|
||||
layer.closeAll();
|
||||
}else{
|
||||
layer.msg('请选择岗位');
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,142 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="breadcrumb"}
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="http://www.meteteme.com/" target="_blank">江苏美天科技</a>
|
||||
<a href="/home/index">工作台</a>
|
||||
<a><cite>草稿箱</cite></a>
|
||||
</span>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="main-content">
|
||||
{include file="../../base/view/common/msgmenu" /}
|
||||
<div class="main-page-content">
|
||||
<form class="layui-form layui-form-bar">
|
||||
<div class="layui-inline" style="width:240px">
|
||||
<input type="text" name="keywords" placeholder="关键字" class="layui-input" autocomplete="off"/>
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">提交搜索</button>
|
||||
</form>
|
||||
<table class="layui-hide" id="draft" lay-filter="draft"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="mail_type">
|
||||
<span class="layui-type{{d.mail_type}}">{{d.mail_type_title}}</span>
|
||||
</script>
|
||||
<script type="text/html" id="is_read">
|
||||
<span class="layui-type{{d.is_read}}">{{d.is_read_title}}</span>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon"></i>新建消息</button>
|
||||
<button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del"><i class="layui-icon"></i>批量删除</button>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group"><button class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit">编辑</button><button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button></div>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
function gouguInit() {
|
||||
var table = layui.table,form = layui.form,tool = layui.tool;
|
||||
|
||||
layui.pageTable = table.render({
|
||||
elem: '#draft',
|
||||
toolbar: '#toolbarDemo',
|
||||
title:'草稿箱',
|
||||
url: "/home/message/draft", //数据接口
|
||||
page: true ,//开启分页
|
||||
limit: 20,
|
||||
cellMinWidth: 200, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||
height: 'full-112',
|
||||
cols: [[ //表头
|
||||
{type:'checkbox',fixed:'left'},
|
||||
{field: 'type_title', title: '接收人类型',width:100,align:'center'},
|
||||
{field: 'title', title: '消息主题'},
|
||||
{field: 'create_time', title: '保存时间', align:'center',width:160},
|
||||
{field: 'files', title: '附件(个)',align:'center', width:80},
|
||||
{field: 'right', title: '操作',fixed:'right', toolbar: '#barDemo', width:100, align:'center'}
|
||||
]]
|
||||
});
|
||||
|
||||
//搜索提交
|
||||
form.on('submit(webform)', function(data){
|
||||
let f=data.field;
|
||||
layui.pageTable.reload({where:{keywords:f.keywords},page:{curr:1}});
|
||||
return false;
|
||||
});
|
||||
//行工具事件
|
||||
table.on('tool(draft)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: data.id,
|
||||
type:2,
|
||||
source:2
|
||||
},callback);
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
if(obj.event === 'edit'){
|
||||
tool.open('/home/message/add?id='+data.id);
|
||||
return;
|
||||
}
|
||||
});
|
||||
//表头工具栏事件
|
||||
table.on('toolbar(draft)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||
var data = checkStatus.data;
|
||||
if (obj.event === 'add') {
|
||||
tool.open("/home/message/add");
|
||||
return;
|
||||
}
|
||||
if(data.length==0){
|
||||
layer.msg('请选择要操作的消息');
|
||||
return false;
|
||||
}
|
||||
var idArray=[],msg='是否执行该操作?',type=0;
|
||||
for(var i=0;i<data.length;i++){
|
||||
idArray.push(data[i].id);
|
||||
}
|
||||
if (obj.event === 'del') {
|
||||
msg = '确定把选中的信息要放入垃圾箱吗?';
|
||||
type = 2;
|
||||
}
|
||||
|
||||
layer.confirm(msg, {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: idArray.join(','),
|
||||
type:type,
|
||||
source:2
|
||||
},callback);
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
@@ -0,0 +1,181 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="breadcrumb"}
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="http://www.meteteme.com/" target="_blank">江苏美天科技</a>
|
||||
<a href="/home/index">工作台</a>
|
||||
<a><cite>收件箱</cite></a>
|
||||
</span>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="main-content">
|
||||
{include file="../../base/view/common/msgmenu" /}
|
||||
<div class="main-page-content">
|
||||
<form class="layui-form layui-form-bar">
|
||||
<div class="layui-inline" style="width:200px">
|
||||
<input type="text" name="keywords" placeholder="关键字" class="layui-input" autocomplete="off"/>
|
||||
</div>
|
||||
<div class="layui-input-inline" style="width:120px">
|
||||
<select name="read">
|
||||
<option value="">消息状态</option>
|
||||
<option value="1">未读消息</option>
|
||||
<option value="2">已读消息</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline" style="width:120px">
|
||||
<select name="template">
|
||||
<option value="">消息类型</option>
|
||||
<option value="1">个人消息</option>
|
||||
<option value="2">系统消息</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">提交搜索</button>
|
||||
</form>
|
||||
<table class="layui-hide" id="inbox" lay-filter="inbox"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon"></i>新建消息</button>
|
||||
<button class="layui-btn layui-btn-warm layui-btn-sm" lay-event="read"><i class="layui-icon"></i>设为已读</button>
|
||||
<button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del"><i class="layui-icon"></i>批量删除</button>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group">
|
||||
{{# if(d.template == 0){ }}
|
||||
<button class="layui-btn layui-btn-xs" lay-event="reply">回复</button>
|
||||
<button class="layui-btn layui-btn-xs layui-btn-warm" lay-event="resend">转发</button>
|
||||
{{# } }}
|
||||
<button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button></div>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
function gouguInit() {
|
||||
var table = layui.table,form = layui.form,tool = layui.tool;
|
||||
|
||||
//请求信息
|
||||
layui.pageTable = table.render({
|
||||
elem: '#inbox',
|
||||
toolbar: '#toolbarDemo',
|
||||
title:'收件箱',
|
||||
url: "/home/message/inbox", //数据接口
|
||||
page: true ,//开启分页
|
||||
limit: 20,
|
||||
cellMinWidth: 200, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||
height: 'full-112',
|
||||
cols: [[ //表头
|
||||
{type:'checkbox',fixed:'left'},
|
||||
{field: 'msg_type', title: '类型',width:90,align:'center',templet:function(d){
|
||||
var html = '<span class="color-priority-'+d.type+'">'+d.msg_type+'</span>';
|
||||
return html;
|
||||
}},
|
||||
{field: 'from_name', title: '发件人', width:90,align:'center'},
|
||||
{field: 'title', title: '消息主题',templet:function(d){
|
||||
var html = '<a class="open-a" data-href="/home/message/read/id/'+d.id+'">'+d.title+'</a>';
|
||||
return html;
|
||||
}},
|
||||
{field: 'send_time', title: '发件时间', align:'center',width:160},
|
||||
{field: 'read_time', title: '是否已读',align:'center', width:80,templet:function(d){
|
||||
var html='<span style="color:#5FB878">已读</span>';
|
||||
if(d.read_time==0){
|
||||
html='<span style="color:#FF5722">未读</span>';
|
||||
}
|
||||
return html;
|
||||
}},
|
||||
{field: 'files', title: '附件(个)',align:'center', width:80},
|
||||
{field: 'right', title: '操作',fixed:'right', toolbar: '#barDemo', width:136, align:'center'}
|
||||
]]
|
||||
});
|
||||
|
||||
//监听搜索提交
|
||||
form.on('submit(webform)', function(data){
|
||||
let f=data.field;
|
||||
layui.pageTable.reload({where:{keywords:f.keywords,template:f.template,read:f.read},page:{curr:1}});
|
||||
return false;
|
||||
});
|
||||
|
||||
//表格行工具事件
|
||||
table.on('tool(inbox)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: data.id,
|
||||
type:2,
|
||||
source:3
|
||||
},callback);
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
if(obj.event === 'reply'){
|
||||
tool.open('/home/message/reply?id='+data.id+'&type=1');
|
||||
return;
|
||||
}
|
||||
if(obj.event === 'resend'){
|
||||
tool.open('/home/message/reply?id='+data.id+'&type=2');
|
||||
return;
|
||||
}
|
||||
});
|
||||
//表头工具栏事件
|
||||
table.on('toolbar(inbox)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||
var data = checkStatus.data;
|
||||
if (obj.event === 'add') {
|
||||
tool.open("/home/message/add");
|
||||
return;
|
||||
}
|
||||
if(data.length==0){
|
||||
layer.msg('请选择要操作的消息');
|
||||
return false;
|
||||
}
|
||||
var idArray=[],msg='是否执行该操作?',type=0;
|
||||
for(var i=0;i<data.length;i++){
|
||||
idArray.push(data[i].id);
|
||||
}
|
||||
switch(obj.event){
|
||||
case 'read':
|
||||
msg = '确定把选中的信息设为已读吗?';
|
||||
type = 1;
|
||||
break;
|
||||
case 'del':
|
||||
msg = '确定把选中的信息要放入垃圾箱吗?';
|
||||
type = 2;
|
||||
break;
|
||||
};
|
||||
|
||||
layer.confirm(msg, {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: idArray.join(','),
|
||||
type:type,
|
||||
source:3
|
||||
},callback);
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
@@ -0,0 +1,114 @@
|
||||
<form class="layui-form page-content p-4">
|
||||
<h3 class="h3-title">消息详情</h3>
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray">信息主题</td>
|
||||
<td colspan="5">{$detail.title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">发送人</td>
|
||||
<td>{$detail.person_name}</td>
|
||||
<td class="layui-td-gray-2">接收人类别</td>
|
||||
<td>
|
||||
{eq name="$detail.type" value="0"}-{/eq}
|
||||
{eq name="$detail.type" value="1"}同事{/eq}
|
||||
{eq name="$detail.type" value="2"}部门{/eq}
|
||||
{eq name="$detail.type" value="3"}岗位{/eq}
|
||||
{eq name="$detail.type" value="4"}全部{/eq}
|
||||
</td>
|
||||
<td class="layui-td-gray">发送时间</td>
|
||||
<td>{$detail.send_time}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">收件人</td>
|
||||
<td colspan="5">{$detail.users}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">消息内容</td>
|
||||
<td colspan="5">
|
||||
{$detail.content}
|
||||
{if condition="($detail.fid > 0)"}
|
||||
<table class="layui-table" style="margin-top:10px;">
|
||||
<tr>
|
||||
<td class="layui-td-gray">引用消息内容</td>
|
||||
<td style="color:#999">{$detail.from_content}</td>
|
||||
</tr>
|
||||
{notempty name="$detail.from_file_array"}
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top">引用消息附件</td>
|
||||
<td>
|
||||
<table class="layui-table" style="max-width: 680px;">
|
||||
<thead>
|
||||
<th width="70%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
<th width="10%" style="text-align:center">操作</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="$detail.from_file_array" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.name}</td>
|
||||
<td style="text-align: center;">{$vo.filesize/1048576|round=2}MB</td>
|
||||
<td style="text-align: center;"><a class="layui-btn layui-btn-xs layui-btn-normal" href="{$vo.filepath}" target="_blank">下载</a></td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{notempty name="$detail.file_array"}
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top">相关附件</td>
|
||||
<td colspan="5">
|
||||
<table class="layui-table" style="max-width: 800px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
<th width="10%" style="text-align:center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="detail.file_array" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.name}</td>
|
||||
<td style="text-align: center;">{$vo.filesize/1048576|round=2}MB</td>
|
||||
<td style="text-align: center;"><a class="layui-btn layui-btn-xs layui-btn-normal" href="{$vo.filepath}" target="_blank">下载</a></td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
{notempty name="$detail.read_users"}
|
||||
<tr>
|
||||
<td class="layui-td-gray-2" style="vertical-align:top">收件人已读回执</td>
|
||||
<td colspan="5">{$detail.read_users}</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
{if condition="($detail.template == 0) AND ($detail.pid != 0)"}
|
||||
<div class="layui-form-item pt-2" style=" padding-top:10px;">
|
||||
<span class="layui-btn reply-btn" data-id="{$detail.id}">回复</span>
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function openInit() {
|
||||
let tool = layui.tool;
|
||||
if(layui.pageTable){
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
$('.reply-btn').on('click',function(){
|
||||
let id=$(this).data('id');
|
||||
tool.load('/home/message/reply?id='+id+'&type=1');
|
||||
return;
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,345 @@
|
||||
<form class="layui-form page-content p-4">
|
||||
{if condition="$type eq 1"}
|
||||
<h3 class="h3-title">回复消息</h3>
|
||||
{else/}
|
||||
<h3 class="h3-title">转发消息</h3>
|
||||
{/if}
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">接收人类型</td>
|
||||
<td>
|
||||
<input type="radio" name="type" lay-filter="type" value="1" title="同事" checked>
|
||||
<input type="radio" name="type" lay-filter="type" value="2" title="部门">
|
||||
<input type="radio" name="type" lay-filter="type" value="3" title="岗位">
|
||||
<input type="radio" name="type" lay-filter="type" value="4" title="全部">
|
||||
</td>
|
||||
</tr>
|
||||
{if condition="$type eq 1"}
|
||||
<tr id ="person" {eq name="$detail.type" value="3"}style="display:none;"{/eq}>
|
||||
<td class="layui-td-gray">收件人<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="text" name="person_name" value="{$detail.person_name}" lay-verify="required" lay-reqText="请选择收件人" placeholder="请选择收件人" readonly class="layui-input">
|
||||
<input type="hidden" name="uids" value="{$detail.from_uid}">
|
||||
<input type="hidden" name="dids" value="">
|
||||
<input type="hidden" name="pids" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">消息主题<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="text" name="title" value="回复:{$detail.title}" lay-verify="required" lay-reqText="请输入消息主题" placeholder="请输入消息主题" class="layui-input" lay-verify="required">
|
||||
</td>
|
||||
</tr>
|
||||
{else/}
|
||||
<tr id ="person" {eq name="$detail.type" value="3"}style="display:none;"{/eq}>
|
||||
<td class="layui-td-gray">收件人<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="text" name="person_name" value="" lay-verify="required" lay-reqText="请选择收件人" placeholder="请选择收件人" readonly class="layui-input">
|
||||
<input type="hidden" name="uids" value="">
|
||||
<input type="hidden" name="dids" value="">
|
||||
<input type="hidden" name="pids" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">消息主题<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="text" name="title" value="转发:{$detail.title}" lay-verify="required" lay-reqText="请输入消息主题" placeholder="请输入消息主题" class="layui-input" lay-verify="required">
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top;">消息内容<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<textarea name="content" placeholder="请输入消息内容" class="layui-textarea" style="height: 200px;" lay-verify="required" lay-reqText="请输入消息内容"></textarea>
|
||||
|
||||
<table class="layui-table" style="margin-top:10px;">
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">原消息内容</td>
|
||||
<td>{$detail.content}
|
||||
</td>
|
||||
</tr>
|
||||
{notempty name="$file_array"}
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top">原消息附件</td>
|
||||
<td>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="80%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="file_array" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.name}</td>
|
||||
<td style="text-align: center;">{$vo.filesize/1048576|round=2}MB</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/notempty}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray" style="vertical-align:top">消息附件</td>
|
||||
<td>
|
||||
<div class="layui-upload" style="max-width: 800px;">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="testList">选择文件并上传</button> <span style="color:#FF5722;margin-left: 10px;">最大只能上传{:get_system_info('upload_max_filesize')}的文件,超过{:get_system_info('upload_max_filesize')}请压缩成多个文件上传。</span>
|
||||
<div class="layui-upload-list" style="display:none;">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="60%">文件名</th>
|
||||
<th width="20%" style="text-align:center">文件大小</th>
|
||||
<th width="20%" style="text-align:center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="layui-form-item" style="padding-top:10px;">
|
||||
<input type="hidden" value="0" name="id">
|
||||
<input type="hidden" value="{$fid}" name="fid">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="draftform">存为草稿</button>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即发送</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function openInit() {
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
,table = layui.table
|
||||
,dtree = layui.dtree
|
||||
,upload = layui.upload
|
||||
,tool = layui.tool
|
||||
,employeepicker = layui.employeepicker;
|
||||
|
||||
form.render();
|
||||
//监听保存到草稿并发送
|
||||
form.on('submit(webform)', function(data){
|
||||
var file_ids = [];
|
||||
var item_tr = $('#demoList').find('tr');
|
||||
item_tr.each(function(index,item) {
|
||||
var item_id = $(item).data('id');
|
||||
if (item_id && item_id != '') {
|
||||
file_ids.push(item_id);
|
||||
}
|
||||
});
|
||||
data.field.file_ids = file_ids.join(',');
|
||||
let callback = function (e) {
|
||||
if(e.code==0){
|
||||
layer.msg('消息正在发送中...');
|
||||
$.ajax({
|
||||
url: "/home/message/send",
|
||||
type:'post',
|
||||
data:{'id':e.data},
|
||||
success: function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
tool.close(1000);
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/save",data.field,callback);
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听保存到草稿
|
||||
form.on('submit(draftform)', function(data){
|
||||
var file_ids = [];
|
||||
var item_tr = $('#demoList').find('tr');
|
||||
item_tr.each(function(index,item) {
|
||||
var item_id = $(item).data('id');
|
||||
if (item_id && item_id != '') {
|
||||
file_ids.push(item_id);
|
||||
}
|
||||
});
|
||||
data.field.file_ids = file_ids.join(',');
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
tool.close(1000);
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/save",data.field,callback);
|
||||
return false;
|
||||
});
|
||||
|
||||
upload.render({ //允许上传的文件后缀
|
||||
elem: '#testList'
|
||||
,url: '/api/index/upload' //此处配置你自己的上传接口即可
|
||||
,accept: 'file' //普通文件
|
||||
,exts: 'jpeg|jpg|png|gif|doc|docx|ppt|pptx|xls|xlsx|pdf|zip|rar|7z' //只允许上传文件
|
||||
,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
|
||||
layer.msg('上传中...',{time: 3600000});
|
||||
}
|
||||
,done: function(res, index, upload){
|
||||
layer.msg('上传成功');
|
||||
var timestamp=new Date().getTime();
|
||||
var tr = '<tr data-id="'+res.data.id+'" id="tr_'+timestamp+'">\
|
||||
<td>'+ res.data.name +'</td>\
|
||||
<td align="center">'+ (res.data.filesize/(1024*1024)).toFixed(2) +'MB</td>\
|
||||
<td align="center">\
|
||||
<span class="layui-btn layui-btn-xs layui-btn-danger demo-delete" data-id="'+timestamp+'">删除</span>\
|
||||
</td>\
|
||||
</tr>';
|
||||
$('.layui-upload-list').show();
|
||||
$('#demoList').append(tr);
|
||||
}
|
||||
,error: function(index, upload){
|
||||
layer.msg('上传失败');
|
||||
}
|
||||
});
|
||||
|
||||
$('#demoList').on('click','.demo-delete',function(){
|
||||
let id = $(this).data('id');
|
||||
layer.confirm('确定要删除该附件吗?', {icon: 3, title:'提示'}, function(index){
|
||||
$('#tr_'+id).remove()
|
||||
layer.close(index);
|
||||
});
|
||||
})
|
||||
|
||||
//选择收件人类型
|
||||
form.on('radio(type)', function (data) {
|
||||
$('[name="person_name"]').val('');
|
||||
$('[name="dids"]').val('');
|
||||
$('[name="uids"]').val('');
|
||||
$('[name="pids"]').val('');
|
||||
if(data.value==4){
|
||||
$('#person').val('0').hide();
|
||||
}
|
||||
else{
|
||||
$('#person').val('').show();
|
||||
}
|
||||
});
|
||||
|
||||
//选择对应人
|
||||
$('[name="person_name"]').on('click',function(){
|
||||
type = $("input[name='type']:checked").val();
|
||||
if(type == 1){
|
||||
addEmployee();
|
||||
}else if(type == 2){
|
||||
selectDepartment();
|
||||
}else if(type == 3){
|
||||
selectAuditor();
|
||||
}
|
||||
});
|
||||
|
||||
//添加人员
|
||||
function addEmployee(){
|
||||
var ids=$('[name="uids"]').val(),names=$('[name="person_name"]').val(),idsArray=[],namesArray=[];
|
||||
if(ids!=''){
|
||||
idsArray=ids.split(',');
|
||||
namesArray=names.split(',');
|
||||
}
|
||||
employeepicker.init({
|
||||
department_url: "/api/index/get_department_tree",
|
||||
employee_url: "/api/index/get_employee",
|
||||
ids:idsArray,
|
||||
names:namesArray,
|
||||
callback:function(ids,names){
|
||||
$('[name="uids"]').val(ids.join(',')),
|
||||
$('[name="person_name"]').val(names.join(','));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//选择部门
|
||||
function selectDepartment(){
|
||||
var tpl='<div style="width:382px; height:338px;overflow-y: auto;">\
|
||||
<div id="checkemployeetree" style="padding:10px 0;"></div>\
|
||||
</div>';
|
||||
layer.open({
|
||||
type:1,
|
||||
title:'选择部门',
|
||||
area:['400px','450px'],
|
||||
content:tpl,
|
||||
success:function(){
|
||||
$.ajax({
|
||||
url: "/api/index/get_department_tree",
|
||||
type:'get',
|
||||
success:function(res){
|
||||
dtree.render({
|
||||
elem: "#checkemployeetree",
|
||||
data: res.trees,
|
||||
icon: "2", //修改二级图标样式
|
||||
checkbarType: "no-all", // 默认就是all,其他的值为: no-all p-casc self only
|
||||
checkbar: true //开启复选框
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
btn: ['确定'],
|
||||
btnAlign:'c',
|
||||
yes: function(){
|
||||
var ids=[],names=[];
|
||||
var check=dtree.getCheckbarNodesParam("checkemployeetree");
|
||||
if(check.length==0){
|
||||
layer.msg('请选择部门');
|
||||
return;
|
||||
}
|
||||
for(var m=0; m<check.length; m++){
|
||||
ids.push(check[m].nodeId);
|
||||
names.push(check[m].context);
|
||||
}
|
||||
$('[name="person_name"]').val(names.join(','));
|
||||
$('[name="dids"]').val(ids.join(','));
|
||||
layer.closeAll();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//选择岗位
|
||||
function selectAuditor(){
|
||||
layer.open({
|
||||
title:'选择岗位',
|
||||
type:1,
|
||||
area:['360px','480px'],
|
||||
content:'<div style="padding:5px 12px"><div id="position"></div></div>',
|
||||
success:function(){
|
||||
tableid=table.render({
|
||||
elem: '#position'
|
||||
,url: "/api/index/get_position"
|
||||
,page: false //开启分页
|
||||
,cols: [[
|
||||
{type:'checkbox',title: '选择'}
|
||||
,{field:'id', width:80, title: '编号', align:'center'}
|
||||
,{field:'name',title: '岗位名称'}
|
||||
]]
|
||||
});
|
||||
},
|
||||
btn: ['确定'],
|
||||
btnAlign:'c',
|
||||
yes: function(){
|
||||
var checkStatus = table.checkStatus(tableid.config.id);
|
||||
var data = checkStatus.data,val = [],title=[];
|
||||
if(data.length>0){
|
||||
for ( var i = 0; i <data.length; i++){
|
||||
val.push(data[i].id);
|
||||
title.push(data[i].name);
|
||||
}
|
||||
$('[name="person_name"]').val(title.join(','));
|
||||
$('[name="pids"]').val(val.join(','));
|
||||
layer.closeAll();
|
||||
}else{
|
||||
layer.msg('请选择岗位');
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,164 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="breadcrumb"}
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="http://www.meteteme.com/" target="_blank">江苏美天科技</a>
|
||||
<a href="/home/index">工作台</a>
|
||||
<a><cite>垃圾箱</cite></a>
|
||||
</span>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="main-content">
|
||||
{include file="../../base/view/common/msgmenu" /}
|
||||
<div class="main-page-content">
|
||||
<form class="layui-form layui-form-bar">
|
||||
<div class="layui-inline" style="width:240px">
|
||||
<input type="text" name="keywords" placeholder="关键字" class="layui-input" autocomplete="off"/>
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">提交搜索</button>
|
||||
</form>
|
||||
<table class="layui-hide" id="rubbish" lay-filter="rubbish"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="mail_type">
|
||||
<span class="color-priority-{{d.delete_source}}">{{d.delete_source_title}}</span>
|
||||
</script>
|
||||
<script type="text/html" id="is_read">
|
||||
<span class="color-priority-{{d.is_read}}">{{d.is_read_title}}</span>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon"></i>新建消息</button>
|
||||
<button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del"><i class="layui-icon"></i>彻底删除</button>
|
||||
<button class="layui-btn layui-btn-sm" lay-event="recover"><i class="layui-icon"></i>移出垃圾箱</button>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group"><button class="layui-btn layui-btn-xs" lay-event="recover">还原</button><button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">彻底删除</button></div>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
function gouguInit() {
|
||||
var table = layui.table,form = layui.form,gougu = layui.tool;
|
||||
|
||||
layui.pageTable = table.render({
|
||||
elem: '#rubbish',
|
||||
toolbar: '#toolbarDemo',
|
||||
title:'垃圾箱',
|
||||
url: "/home/message/rubbish", //数据接口
|
||||
page: true ,//开启分页
|
||||
limit: 20,
|
||||
cellMinWidth: 200, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||
height: 'full-112',
|
||||
cols: [[ //表头
|
||||
{type:'checkbox',fixed:'left'},
|
||||
{field: 'delete_source_title', title: '来源',toolbar: '#mail_type',width:90,align:'center'},
|
||||
{field: 'from_name', title: '发件人', width:110,align:'center'},
|
||||
{field: 'title', title: '消息主题',templet:function(d){
|
||||
var html = '<a class="open-a" data-href="/home/message/read/id/'+d.id+'">'+d.title+'</a>';
|
||||
return html;
|
||||
}},
|
||||
{field: 'send_time', title: '发送时间', align:'center',width:160},
|
||||
{field: 'files', title: '附件(个)',align:'center', width:80},
|
||||
{field: 'right', title: '操作',fixed:'right', toolbar: '#barDemo', width:120, align:'center'}
|
||||
]]
|
||||
});
|
||||
|
||||
//监听搜索提交
|
||||
form.on('submit(webform)', function(data){
|
||||
let f=data.field;
|
||||
layui.pageTable.reload({where:{keywords:f.keywords},page:{curr:1}});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听行工具事件
|
||||
table.on('tool(rubbish)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定把该信息彻底删除吗?', {icon: 3, title:'提示'}, function(index){
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: data.id,
|
||||
type:4
|
||||
},callback);
|
||||
layer.close(index);
|
||||
})
|
||||
}
|
||||
if(obj.event === 'recover'){
|
||||
layer.confirm('确定把该信息移出垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: data.id,
|
||||
type:3,
|
||||
},callback);
|
||||
layer.close(index);
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
//表头工具栏事件
|
||||
table.on('toolbar(rubbish)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||
var data = checkStatus.data;
|
||||
if (obj.event === 'add') {
|
||||
tool.open("/home/message/add");
|
||||
return;
|
||||
}
|
||||
if(data.length==0){
|
||||
layer.msg('请选择要操作的消息');
|
||||
return false;
|
||||
}
|
||||
var idArray=[],msg='是否执行该操作?',type=0;
|
||||
for(var i=0;i<data.length;i++){
|
||||
idArray.push(data[i].id);
|
||||
}
|
||||
switch(obj.event){
|
||||
case 'recover':
|
||||
msg = '确定把选中的信息移出垃圾箱吗?';
|
||||
type = 3;
|
||||
break;
|
||||
case 'del':
|
||||
msg = '确定把选中的信息彻底删除吗?';
|
||||
type = 4;
|
||||
break;
|
||||
};
|
||||
|
||||
layer.confirm(msg, {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: idArray.join(','),
|
||||
type:type
|
||||
},callback);
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
@@ -0,0 +1,148 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="breadcrumb"}
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="http://www.meteteme.com/" target="_blank">江苏美天科技</a>
|
||||
<a href="/home/index">工作台</a>
|
||||
<a><cite>发件箱</cite></a>
|
||||
</span>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="main-content">
|
||||
{include file="../../base/view/common/msgmenu" /}
|
||||
<div class="main-page-content">
|
||||
<form class="layui-form layui-form-bar">
|
||||
<div class="layui-inline" style="width:240px">
|
||||
<input type="text" name="keywords" placeholder="关键字" class="layui-input" autocomplete="off"/>
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">提交搜索</button>
|
||||
</form>
|
||||
<table class="layui-hide" id="sendbox" lay-filter="sendbox"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="mail_type">
|
||||
<span class="layui-type{{d.mail_type}}">{{d.mail_type_title}}</span>
|
||||
</script>
|
||||
<script type="text/html" id="is_read">
|
||||
<span class="layui-type{{d.is_read}}">{{d.is_read_title}}</span>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon"></i>新建消息</button>
|
||||
<button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del"><i class="layui-icon"></i>批量删除</button>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group"><span class="layui-btn layui-btn-xs layui-btn-warm" lay-event="resend">转发</span><button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button></div>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','employeepicker'];
|
||||
function gouguInit() {
|
||||
var table = layui.table,form = layui.form,tool = layui.tool;
|
||||
|
||||
layui.pageTable = table.render({
|
||||
elem: '#sendbox',
|
||||
toolbar: '#toolbarDemo',
|
||||
title:'发件箱',
|
||||
url: "/home/message/sendbox", //数据接口
|
||||
page: true ,//开启分页
|
||||
limit: 20,
|
||||
cellMinWidth: 200, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||
height: 'full-112',
|
||||
cols: [[ //表头
|
||||
{type:'checkbox',fixed:'left'},
|
||||
{field: 'type_title', title: '接收人类型',width:100,align:'center'},
|
||||
{field: 'title', title: '消息主题',templet:function(d){
|
||||
var html = '<a class="open-a" data-href="/home/message/read/id/'+d.id+'">'+d.title+'</a>';
|
||||
return html;
|
||||
}},
|
||||
{field: 'send_time', title: '发件时间', align:'center',width:160},
|
||||
{field: 'files', title: '附件(个)',align:'center', width:80},
|
||||
{field: 'right', title: '操作',fixed:'right', toolbar: '#barDemo', width:100, align:'center'}
|
||||
]]
|
||||
});
|
||||
|
||||
|
||||
//搜索提交
|
||||
form.on('submit(webform)', function(data){
|
||||
let f=data.field;
|
||||
layui.pageTable.reload({where:{keywords:f.keywords},page:{curr:1}});
|
||||
return false;
|
||||
});
|
||||
|
||||
//行工具事件
|
||||
table.on('tool(sendbox)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: data.id,
|
||||
type:2,
|
||||
source:1
|
||||
},callback);
|
||||
layer.close(index);
|
||||
})
|
||||
}
|
||||
if(obj.event === 'resend'){
|
||||
tool.open('/home/message/reply?id='+data.id+'&type=2');
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
//表头工具栏事件
|
||||
table.on('toolbar(sendbox)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||
var data = checkStatus.data;
|
||||
if (obj.event === 'add') {
|
||||
tool.open("/home/message/add");
|
||||
return;
|
||||
}
|
||||
if(data.length==0){
|
||||
layer.msg('请选择要操作的消息');
|
||||
return false;
|
||||
}
|
||||
var idArray=[],msg='是否执行该操作?',type=0;
|
||||
for(var i=0;i<data.length;i++){
|
||||
idArray.push(data[i].id);
|
||||
}
|
||||
if (obj.event === 'del') {
|
||||
msg = '确定把选中的信息要放入垃圾箱吗?';
|
||||
type = 2;
|
||||
}
|
||||
layer.confirm(msg, {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
layui.pageTable.reload();
|
||||
}
|
||||
}
|
||||
tool.post("/home/message/check",{
|
||||
ids: idArray.join(','),
|
||||
type:type,
|
||||
source:1
|
||||
},callback);
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
@@ -0,0 +1,82 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="breadcrumb"}
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="http://www.meteteme.com/" target="_blank">江苏美天科技</a>
|
||||
<a href="/home/user/setting">信息设置</a>
|
||||
<a><cite>修改登录密码</cite></a>
|
||||
</span>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="main-content">
|
||||
{include file="../../base/view/common/submenu" /}
|
||||
<div class="main-page-content">
|
||||
<form class="layui-form p-4">
|
||||
{notempty name="$admin.reg_pwd"}
|
||||
<div style="text-align:center; padding:20px 0; font-size:18px; color:#FF5722">初始化密码才能正常使用系统</div>
|
||||
{/notempty}
|
||||
<h3 class="h3-title">修改登录密码</h3>
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">旧密码<span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="password" lay-verify="required" name="old_pwd" placeholder="请输入旧密码" lay-reqText="请输入旧密码" autocomplete="off" class="layui-input">
|
||||
</td>
|
||||
<td class="layui-td-gray-2">用户名</td>
|
||||
<td>{$admin.username}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">新密码 <span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="password" lay-verify="required" name="pwd" placeholder="请输入新密码" lay-reqText="请输入新密码" autocomplete="off" class="layui-input">
|
||||
</td>
|
||||
<td class="layui-td-gray-2">确认新密码 <span style="color: red">*</span></td>
|
||||
<td>
|
||||
<input type="password" lay-verify="required" name="pwd_confirm" placeholder="请再次输入新密码" lay-reqText="请再次输入新密码" autocomplete="off" class="layui-input">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding: 10px 0">
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,layer = layui.layer,tool = layui.tool;
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
let callback = function (e) {
|
||||
if (e.code == 0) {
|
||||
layer.msg('修改密码成功,使用新密码登录');
|
||||
//注销
|
||||
$.ajax({
|
||||
url: "/home/login/login_out.html",
|
||||
success: function (e) {
|
||||
if (e.code == 0) {
|
||||
setTimeout(function () {
|
||||
parent.location.href = "/home/login/index.html"
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
}
|
||||
tool.delete("/home/user/edit_password",data.field,callback);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
@@ -0,0 +1,120 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="breadcrumb"}
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="http://www.meteteme.com/" target="_blank">江苏美天科技</a>
|
||||
<a href="/home/user/setting">信息设置</a>
|
||||
<a><cite>编辑个人信息</cite></a>
|
||||
</span>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="main-content">
|
||||
{include file="../../base/view/common/submenu" /}
|
||||
<div class="main-page-content">
|
||||
<form class="layui-form p-4">
|
||||
<h3 class="h3-title">编辑个人信息</h3>
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">用户名</td>
|
||||
<td>{$admin.username}</td>
|
||||
<td class="layui-td-gray">姓名</td>
|
||||
<td>{$admin.name}</td>
|
||||
<td class="layui-td-gray">性别</td>
|
||||
<td>
|
||||
<input type="radio" name="sex" value="1" title="男" {eq name="$admin.sex" value="1" }
|
||||
checked{/eq}>
|
||||
<input type="radio" name="sex" value="2" title="女" {eq name="$admin.sex" value="2" }
|
||||
checked{/eq}>
|
||||
</td>
|
||||
<td class="layui-td-gray" rowspan="3">头像</td>
|
||||
<td rowspan="3">
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="test1">上传头像</button>
|
||||
<div class="layui-upload-list" id="demo1">
|
||||
<img src="{$admin.thumb}" width="72" />
|
||||
<input type="hidden" name="thumb" value="{$admin.thumb}">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">手机号码</td>
|
||||
<td>{$admin.mobile}</td>
|
||||
<td class="layui-td-gray">电子邮箱</td>
|
||||
<td>{$admin.email}</td>
|
||||
<td class="layui-td-gray">入职日期</td>
|
||||
<td>
|
||||
{$admin.entry_time | date='Y-m-d'}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">所在部门</td>
|
||||
<td>{$admin.department}</td>
|
||||
<td class="layui-td-gray">岗位职称</td>
|
||||
<td>{$admin.position}</td>
|
||||
<td class="layui-td-gray">员工类型</td>
|
||||
<td>
|
||||
{eq name="$admin.type" value="3"}<span style="color:#5FB878">实 习 生</span>{/eq}
|
||||
{eq name="$admin.type" value="2"}<span style="color:#01AAED">试用员工</span>{/eq}
|
||||
{eq name="$admin.type" value="1"}<span style="color:#393D49">正式员工</span>{/eq}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">个人简介</td>
|
||||
<td colspan="7">
|
||||
<textarea name="desc" placeholder="请输入个人简介" class="layui-textarea">{$admin.desc|default=""}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding: 10px 0">
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
upload = layui.upload;
|
||||
|
||||
//头像上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#test1',
|
||||
url: "/api/index/upload",
|
||||
done: function (e) {
|
||||
//如果上传失败
|
||||
if (e.code == 1) {
|
||||
return layer.msg('上传失败');
|
||||
}
|
||||
else {
|
||||
//上传成功
|
||||
$('#demo1 input').attr('value', e.data.filepath);
|
||||
$('#demo1 img').attr('src', e.data.filepath);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
$.ajax({
|
||||
url: "/home/user/edit_personal",
|
||||
type: 'post',
|
||||
data: data.field,
|
||||
success: function (e) {
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
@@ -0,0 +1,192 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="breadcrumb"}
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="http://www.meteteme.com/" target="_blank">江苏美天科技</a>
|
||||
<a><cite>信息设置</cite></a>
|
||||
</span>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="main-content" style="min-height:100%; height:auto;">
|
||||
<div class="sub-menu" style="width: 200px;">
|
||||
{include file="../../base/view/common/submenu" /}
|
||||
<div class="menu-bar">
|
||||
<div class="menu-bar-content">
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-bg-content pb-4">
|
||||
<div class="layui-card">
|
||||
<div class="table-title">个人信息</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">用户名</td>
|
||||
<td>{$admin.username}</td>
|
||||
<td class="layui-td-gray">姓名</td>
|
||||
<td>{$admin.name}</td>
|
||||
<td class="layui-td-gray">性别</td>
|
||||
<td>
|
||||
{eq name="$admin.sex" value="1"}男{/eq}
|
||||
{eq name="$admin.sex" value="2"}女{/eq}
|
||||
</td>
|
||||
<td class="layui-td-gray" rowspan="3">头像</td>
|
||||
<td rowspan="3">
|
||||
<img src="{$admin.thumb}" width="90" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">手机号码</td>
|
||||
<td>{$admin.mobile}</td>
|
||||
<td class="layui-td-gray">电子邮箱</td>
|
||||
<td>{$admin.email}</td>
|
||||
<td class="layui-td-gray">入职日期</td>
|
||||
<td>
|
||||
{$admin.entry_time | date='Y-m-d'}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">所在部门</td>
|
||||
<td>{$admin.department}</td>
|
||||
<td class="layui-td-gray">岗位职称</td>
|
||||
<td>{$admin.position}</td>
|
||||
<td class="layui-td-gray">员工类型</td>
|
||||
<td>
|
||||
{eq name="$admin.type" value="3"}<span style="color:#5FB878">实 习 生</span>{/eq}
|
||||
{eq name="$admin.type" value="2"}<span style="color:#01AAED">试用员工</span>{/eq}
|
||||
{eq name="$admin.type" value="1"}<span style="color:#393D49">正式员工</span>{/eq}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">个人简介</td>
|
||||
<td colspan="7">
|
||||
{$admin.desc}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="table-title">系统信息</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table">
|
||||
<tr>
|
||||
<td class="layui-td-gray">系统名称</td>
|
||||
<td>
|
||||
{notempty name="$config.admin_title"}{$config.admin_title}{/notempty}
|
||||
</td>
|
||||
<td rowspan="3" class="layui-td-gray-2">LOGO</td>
|
||||
<td rowspan="3" style="width: 240px;">
|
||||
<div class="layui-upload" style="width: 240px;">
|
||||
<img src='{__IMG__}/icon.png'
|
||||
style="max-width: 100%; width: 100%;" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">网站域名</td>
|
||||
<td>
|
||||
{notempty name="$config.domain"}{$config.domain}{/notempty}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">网站名称</td>
|
||||
<td>
|
||||
{notempty name="$config.title"}{$config.title}{/notempty}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">ICP备案号</td>
|
||||
<td>
|
||||
{notempty name="$config.icp"}{$config.icp}{/notempty}
|
||||
</td>
|
||||
<td class="layui-td-gray">公安备案号</td>
|
||||
<td>
|
||||
{notempty name="$config.beian"}{$config.beian}{/notempty}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">版权信息</td>
|
||||
<td>
|
||||
{notempty name="$config.copyright"}{$config.copyright}{/notempty}
|
||||
</td>
|
||||
<td class="layui-td-gray">代码版本号
|
||||
</td>
|
||||
<td>
|
||||
{notempty name="$config.version"}{$config.version}{/notempty}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">系统简介</td>
|
||||
<td colspan="3">
|
||||
{notempty name="$config.desc"}{$config.desc} {/notempty}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="table-title">服务器信息</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table" lay-skin="" lay-size="sm">
|
||||
{if condition="($install == true)"}
|
||||
<tr>
|
||||
<td colspan="4" style="color: #E94335; background-color:#f5f5f5">
|
||||
提醒:发现app目录下的install文件夹没删除,为了系统的安全,请手动去删除。</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">服务器系统</td>
|
||||
<td>{:get_system_info('os')}</td>
|
||||
<td class="layui-td-gray-2">PHP版本</td>
|
||||
<td>{:get_system_info('php')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">上传限制</td>
|
||||
<td>{:get_system_info('upload_max_filesize')}</td>
|
||||
<td class="layui-td-gray-2">执行限制</td>
|
||||
<td>{:get_system_info('max_execution_time')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">ThinkPHP</td>
|
||||
<td>{$TP_VERSION}</td>
|
||||
<td class="layui-td-gray-2">Layui</td>
|
||||
<td>{:LAYUI_VERSION}</td>
|
||||
</tr>
|
||||
<!-- <tr>-->
|
||||
<!-- <td class="layui-td-gray-2">江苏美天科技</td>-->
|
||||
<!-- <td colspan="3">{:CMS_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:10px"-->
|
||||
<!-- href="https://blog.gougucms.com/home/book/detail/bid/7.html" target="_blank">江苏美天科技文档</a>-->
|
||||
<!-- </td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- <tr>-->
|
||||
<!-- <td class="layui-td-gray-2">合作联系微信号</td>-->
|
||||
<!-- <td colspan="3">hdm588,业务合作、功能定制请备注</td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- <tr>-->
|
||||
<!-- <td class="layui-td-gray-2">QQ交流群</td>-->
|
||||
<!-- <td colspan="3">搜Q群:24641076,或点击 <a href="https://jq.qq.com/?_wv=1027&k=pxshRv6I"-->
|
||||
<!-- target="_blank" rel="nofollow"><img border="0"-->
|
||||
<!-- src="//pub.idqqimg.com/wpa/images/group.png" alt="gougucms交流群" title="gougucms交流群"-->
|
||||
<!-- style="vertical-align:middle"></a></td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- <tr>-->
|
||||
<!-- <td class="layui-td-gray-2">同系开源软件</td>-->
|
||||
<!-- <td colspan="3"><a class="layui-badge layui-bg-blue" style="margin-right:16px"-->
|
||||
<!-- href="https://gitee.com/gougucms/gougucms" target="_blank">勾股CMS</a><a-->
|
||||
<!-- class="layui-badge layui-bg-blue" style="margin-right:16px"-->
|
||||
<!-- href="https://gitee.com/gougucms/blog" target="_blank">勾股BLOG</a><a-->
|
||||
<!-- class="layui-badge layui-bg-blue" style="margin-right:16px"-->
|
||||
<!-- href="https://gitee.com/gougucms/office" target="_blank">勾股OA</a><a-->
|
||||
<!-- class="layui-badge layui-bg-blue"-->
|
||||
<!-- href="https://gitee.com/gouguopen/guoguadmin" target="_blank">勾股ADMIN</a></td>-->
|
||||
<!-- </tr>-->
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user