This commit is contained in:
dong_bo0602 2021-04-14 17:16:45 +08:00
parent 6523c02f4d
commit 0b154d6057
4 changed files with 369 additions and 6 deletions

View File

@ -0,0 +1,47 @@
(function() {
window.dataMessage = {
loading: '加载中...',
commit: '确定提交?',
committing: '正在提交,请稍后...',
commitSuccess: '提交成功,继续操作?',
update: '确定更新?',
updating: '正在更新,请稍后...',
updated: '更新成功',
updateSuccess: '更新成功,继续操作?',
delete: '确定删除?',
deleting: '删除中...',
deleted: '删除成功',
deleteSuccess: '删除成功',
deleteUserConfirm: '请选择要删除的用户',
deleteGroupConfirm: '请选择要删除的组',
uploading: '正在上传...',
bind: '确认绑定?',
binding: '正在绑定...',
bindSuccess: '绑定成功',
unBindSuccess: '解绑成功',
button: {
yes: '确定',
no: '取消',
},
dialog: {
save: '新增',
update: '修改'
},
tree: {
rootName: '根节点'
},
table: {
loading: '拼命加载中...',
selectDelete: '请选择要删除的数据',
selectEdit: '请选择要编辑的数据',
selectOneEdit: '只能同时编辑一条数据',
selectUnbind: '请选择要解除绑定的数据',
selectBind: '请选择要执行绑定的数据',
selectOn: '请选择要启用数据',
selectOff: '请选择要停用数据',
selectConfig: '请选择要配置数据',
selectOneConfig: '请选择要配置一条数据',
selectExamine: '请选择要审核数据',
}
}
})();

View File

@ -0,0 +1,313 @@
(function() {
window.dialog = {
dialogArray: [],
dialogData: {},
dialogTreeData: {
apiUri: null,
method: null,
primaryKey: null,
autoParams: null,
otherParams: null,
defaultParams: null,
resultType: null,
dataFilter: null,
rootNode: null,
data: null,
check: null,
selectedNodes: []
},
maxFileCount: null,
close: function (index) {
layer.close(index);
},
msg: function (msg, args, callback) {
return layer.msg(msg, args, callback);
},
confirm: function (msg, callback) {
var self = this;
return top.layer.msg(msg, {
time: 0,
btn: ['确定', '取消'],
shade: 0.3,
yes: function (index) {
callback(index);
},
btn1: function () {
self.closeBox();
}
});
},
choiceConfirm: function (msg, yesCallback, noCallback) {
var self = this;
return top.layer.msg(msg, {
time: 0,
btn: ['是', '否', '取消'],
shade: 0.3,
btn1: function (index) {
yesCallback(index);
},
btn2: function (index) {
noCallback(index);
},
btn3: function () {
self.closeBox();
}
});
},
open: function (opt) {
var self = this;
var index = top.layer.open({
type: 2,
icon: 1,
title: opt.title,
shadeClose: false,
maxmin: false,
resize: false,
shade: 0.3,
area: [opt.width, opt.height],
content: opt.url,
cancel: function (index) {
self.closeBox();
},
end: opt.onClose
});
this.dialogArray.push(index);
return index;
},
user: function (opt) {
var self = this;
var single = true;
if (opt.single || (opt.single != true && opt.single != false)) {
single = false;
} else {
single = opt.single;
}
var selectedUserIds = '';
if (opt.selectedUserIds) {
selectedUserIds = opt.selectedUserIds;
}
var index = top.layer.open({
type: 2,
icon: 1,
title: opt.title,
shadeClose: false,
maxmin: false,
closeBtn: 0,
shade: 0.3,
area: [opt.width, opt.height],
content: 'route/user/departmentuser?single=' + single + '&selectedUserIds=' + selectedUserIds,
cancel: function (index) {
self.closeBox();
},
end: opt.onClose
});
this.dialogArray.push(index);
return index;
},
tree: function (opt) {
var self = this;
self.dialogTreeData.apiUri = opt.apiUri;
if (opt.method) {
self.dialogTreeData.method = opt.method;
} else {
self.dialogTreeData.method = 'get';
}
if (opt.primaryKey) {
self.dialogTreeData.primaryKey = opt.primaryKey;
} else {
self.dialogTreeData.primaryKey = 'id';
}
if (opt.autoParams) {
self.dialogTreeData.autoParams = opt.autoParams;
} else {
self.dialogTreeData.autoParams = ['id'];
}
if (opt.otherParams) {
self.dialogTreeData.otherParams = opt.otherParams;
} else {
self.dialogTreeData.otherParams = {};
}
if (opt.resultType) {
self.dialogTreeData.resultType = opt.resultType;
} else {
self.dialogTreeData.resultType = 'justList';
}
if (opt.dataFilter) {
self.dialogTreeData.dataFilter = opt.dataFilter;
} else {
self.dialogTreeData.dataFilter = function (treeId, parentNode, childNodes) {
return childNodes;
};
}
if (opt.rootNode) {
self.dialogTreeData.rootNode = opt.rootNode;
} else {
self.dialogTreeData.rootNode = null;
}
if (opt.data) {
self.dialogTreeData.data = {};
if (opt.data.checked) {
self.dialogTreeData.data.checked = opt.data.checked;
} else {
self.dialogTreeData.data.checked = 'checked';
}
if (opt.data.children) {
self.dialogTreeData.data.children = opt.data.children;
} else {
self.dialogTreeData.data.children = 'children'
}
if (opt.data.isParent) {
self.dialogTreeData.data.isParent = opt.data.isParent;
} else {
self.dialogTreeData.data.isParent = 'isParent';
}
if (opt.data.name) {
self.dialogTreeData.data.name = opt.data.name;
} else {
self.dialogTreeData.data.name = 'name';
}
if (opt.data.title) {
self.dialogTreeData.data.title = opt.data.title;
} else {
self.dialogTreeData.data.title = 'title';
}
} else {
self.dialogTreeData.data = {
checked: 'checked',
children: 'children',
isParent: 'isParent',
name: 'name',
title: 'title'
}
}
if (opt.defaultParams) {
self.dialogTreeData.defaultParams = opt.defaultParams;
} else {
self.dialogTreeData.defaultParams = null;
}
if (opt.check) {
self.dialogTreeData.check = {};
if (opt.check.enable) {
self.dialogTreeData.check.enable = opt.check.enable;
} else {
self.dialogTreeData.check.enable = false;
}
if (opt.check.selectType) {
self.dialogTreeData.check.chkStyle = opt.check.selectType;
} else {
self.dialogTreeData.check.chkStyle = 'checkbox';
}
if (opt.check.checkboxType) {
self.dialogTreeData.check.chkboxType = opt.check.checkboxType;
} else {
self.dialogTreeData.check.chkboxType = {Y: 'ps', N: 'ps'};
}
if (opt.check.radioType) {
self.dialogTreeData.check.radioType = opt.check.radioType;
} else {
self.dialogTreeData.check.radioType = 'level';
}
} else {
self.dialogTreeData.check = {
enable: false,
chkStyle: 'checkbox',
chkboxType: {Y: 'ps', N: 'ps'},
radioType: 'level',
}
}
if (opt.selectedNodes) {
self.dialogTreeData.selectedNodes = opt.selectedNodes;
} else {
self.dialogTreeData.selectedNodes = [];
}
var index = top.layer.open({
type: 2,
icon: 1,
title: opt.title,
shadeClose: false,
maxmin: false,
shade: 0.3,
area: [opt.width, opt.height],
content: top.restAjax.path('route/tree/tree', []),
cancel: function (index) {
self.closeBox();
},
end: opt.onClose
});
this.dialogArray.push(index);
return index;
},
// 文件上传
file: function (opt) {
var self = this;
var fileType = opt.type;
var customType = opt.customType;
var url = 'route/file/uploadfile/';
if (fileType == 'image') {
url += '2';
} else if (fileType == 'video') {
url += '3';
} else if (fileType == 'audio') {
url += '4';
} else {
url += '1';
}
if(customType) {
url += '?customType='+ customType;
}
if (opt.maxFileCount) {
self.maxFileCount = opt.maxFileCount;
} else {
self.maxFileCount = null;
}
self.dialogData.uploadFileArray = [];
var index = top.layer.open({
type: 2,
icon: 1,
title: opt.title,
shadeClose: false,
maxmin: false,
shade: 0.3,
area: [opt.width, opt.height],
content: top.restAjax.path(url, []),
cancel: function (index) {
self.closeBox();
},
end: opt.onClose
});
this.dialogArray.push(index);
return index;
},
// 显示文件,图片和视频(MP4)
showFile: function (opt) {
var self = this;
var showType = opt.type;
var url = 'route/file/showfile/';
if (showType == 'image') {
url += 'image';
} else if (showType == 'video') {
url += 'video';
}
url += '/' + opt.fileId;
var index = top.layer.open({
type: 2,
icon: 1,
title: opt.title,
shadeClose: false,
maxmin: true,
shade: 0.3,
area: [opt.width, opt.height],
content: top.restAjax.path(url, []),
cancel: function (index) {
self.closeBox();
},
});
this.dialogArray.push(index);
return index;
},
closeBox: function () {
top.layer.close(this.dialogArray[this.dialogArray.length - 1]);
this.dialogArray.pop();
}
};
})();

View File

@ -97,7 +97,7 @@
.count-box span{font-size:26px;color:#fff;font-weight:700} .count-box span{font-size:26px;color:#fff;font-weight:700}
.count-box p{font-size:16px;color:#fff} .count-box p{font-size:16px;color:#fff}
.assessment-main{width:1530px;margin:0 auto 30px} .assessment-main{width:1530px;margin:0 auto 30px}
.left-nav{float:left;background:#fff;width:280px;box-shadow:0 0 10px #eee;padding:15px;box-sizing:border-box;height:100%;border-radius:5px} .left-nav{float:left;background:#fff;width:280px;box-shadow:0 0 10px #eee;padding:15px;box-sizing:border-box;height:100%;border-radius:5px;min-height: 300px;}
.nav-title{padding-bottom:10px;border-bottom:1px solid #ddd} .nav-title{padding-bottom:10px;border-bottom:1px solid #ddd}
.nav-title span{display:inline-block;padding-left:10px;border-left:5px solid #3d41b7;font-size:16px;color:#333;font-weight:400} .nav-title span{display:inline-block;padding-left:10px;border-left:5px solid #3d41b7;font-size:16px;color:#333;font-weight:400}
.nav-tab{border-bottom:1px dashed #ddd;padding:0 10px} .nav-tab{border-bottom:1px dashed #ddd;padding:0 10px}
@ -118,7 +118,7 @@
.assessment-search-box{float:left;margin-right:10px;font-size:0} .assessment-search-box{float:left;margin-right:10px;font-size:0}
.search-title{display:inline-block;vertical-align:top;padding:0 10px;height:35px;line-height:35px;background:#f5f5f5;font-size:14px;color:#333} .search-title{display:inline-block;vertical-align:top;padding:0 10px;height:35px;line-height:35px;background:#f5f5f5;font-size:14px;color:#333}
.assessment-search-box input,.assessment-search-box select{width:200px;height:35px;border:1px solid #f5f5f5;box-sizing:border-box;padding:0 10px;font-size:14px} .assessment-search-box input,.assessment-search-box select{width:200px;height:35px;border:1px solid #f5f5f5;box-sizing:border-box;padding:0 10px;font-size:14px}
.assessment-search-container button{width:110px;height:35px;border:none;background:#1f9fff;cursor:pointer;border-radius:20px;display:block;float:left;color:#fff} .assessment-search-container button{width:110px;height:35px;border:none;background:#1f9fff;cursor:pointer;border-radius:20px;display:block;float:left;color:#fff;outline: none}
.main-list{margin-top:10px;min-height: 400px} .main-list{margin-top:10px;min-height: 400px}
.main-list ul li{background:#fff;padding:20px;box-shadow:0 0 10px #eee;border-radius:5px;margin-bottom:10px} .main-list ul li{background:#fff;padding:20px;box-shadow:0 0 10px #eee;border-radius:5px;margin-bottom:10px}
.main-list ul li .line{margin-bottom:10px;font-size:14px;color:#333} .main-list ul li .line{margin-bottom:10px;font-size:14px;color:#333}

View File

@ -159,7 +159,7 @@
<!-- <option value="1">2021</option>--> <!-- <option value="1">2021</option>-->
<!-- </select>--> <!-- </select>-->
<!-- </div>--> <!-- </div>-->
<button @click="">搜索</button> <button @click="getMainList(curId)">搜索</button>
</div> </div>
</div> </div>
<div class="main-list"> <div class="main-list">
@ -177,6 +177,7 @@
<div class="line"> <div class="line">
<span>操作:</span> <span>操作:</span>
<a href="javascript: void(0);" class="operation-btn operation-examine" @click="doReport(list.indexTemplateSavePath, list.indexLibId)">上报</a> <a href="javascript: void(0);" class="operation-btn operation-examine" @click="doReport(list.indexTemplateSavePath, list.indexLibId)">上报</a>
<a href="javascript: void(0);" class="operation-btn operation-examine" @click="doReport(list.indexTemplateListPath, list.indexLibId)">查看列表</a>
<!-- <a href="javascript: void(0);" class="operation-btn operation-pass">已通过(0)</a>--> <!-- <a href="javascript: void(0);" class="operation-btn operation-pass">已通过(0)</a>-->
<!-- <a href="javascript: void(0);" class="operation-btn operation-not-pass">未通过(0)</a>--> <!-- <a href="javascript: void(0);" class="operation-btn operation-not-pass">未通过(0)</a>-->
<!-- <a href="javascript: void(0);" class="operation-btn operation-score">得分</a>--> <!-- <a href="javascript: void(0);" class="operation-btn operation-score">得分</a>-->
@ -226,8 +227,8 @@
<script src="assets/web/js/vue.js"></script> <script src="assets/web/js/vue.js"></script>
<script src="assets/web/js/echarts.js"></script> <script src="assets/web/js/echarts.js"></script>
<script src="assets/js/restajax.js"></script> <script src="assets/js/restajax.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script> <script src="assets/js/dialog.js"></script>
<script src="assets/layuiadmin/modules/dialog.js"></script> <script src="assets/js/datamessage.js"></script>
<script src="assets/web/layer-v3.3.0/layer/layer.js"></script> <script src="assets/web/layer-v3.3.0/layer/layer.js"></script>
<script> <script>
var vue = new Vue({ var vue = new Vue({
@ -313,8 +314,10 @@
}, },
// 获取默认加载项 // 获取默认加载项
getDefault: function (item) { getDefault: function (item) {
this.page.keywords = ''
$('#item' + item.id).addClass('active') $('#item' + item.id).addClass('active')
if (item.childrens.length == 0) { if (item.childrens.length == 0) {
this.curId = item.id
this.getMainList(item.id) this.getMainList(item.id)
} else { } else {
$('#item' + item.id).next().show() $('#item' + item.id).next().show()
@ -394,7 +397,7 @@
}, },
// 上报 // 上报
doReport: function (path, id) { doReport: function (path, id) {
console.log(path) var self = this
layer.open({ layer.open({
type: 2, type: 2,
title: false, title: false,