Commit 1f7ec1e4 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents e13e48a9 b6b4e114
......@@ -106,6 +106,7 @@
<script src="${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"></script>
<script src="${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"></script>
<script src="${ctx}/common/js/public.js"></script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script>
<script src="${ctx}/common/js/httpVueLoader.js"></script>
......@@ -558,6 +559,49 @@
flex-wrap: wrap;
padding-left: 1vw;
}
.page-content-main .el-table, .el-table__expanded-cell{
background-color: transparent!important;
}
.page-content-main .el-table__cell .cell{
font-size: 10px;
padding: 0;
}
.page-content-main .el-table tr{
background-color: transparent!important;
}
.page-content-main .el-table--border, .el-table--group{
/*border-color: #4295f7;*/
border-color: transparent!important;
}
.page-content-main .el-table td.el-table__cell, .el-table th.el-table__cell{
background-color: transparent!important;
border-color: transparent!important;
}
.page-content-main .el-table--border .el-table__cell .cell{
padding-left: 0;
}
.page-content-main .el-table th.el-table__cell > .cell {
padding-right: 0;
}
.page-content-main .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
color: #ffffff;
border-color: transparent!important;
font-size: 0.8vw;
}
.page-content-main .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf .cell{
font-size: 0.68vw;
}
.page-content-main .el-table--border th.el-table__cell.gutter:last-of-type{
border-color: transparent!important;
}
.page-content-main .el-table--border::after, .el-table--group::after, .el-table::before{
/*background-color: #4295f7!important;*/
background-color: transparent!important;
}
.page-content-main tr{
border-bottom:1px solid #4295f7!important;
}
</style>
</body>
</html>
......@@ -540,7 +540,7 @@
},
series: [
{
data: [0, 0, 0, 0, 0, 0, 0],
data: [350, 240, 460, 245, 467, 234, 562],
type: 'line',
smooth: true,
itemStyle: {
......@@ -591,7 +591,7 @@
},
series: [
{
data: [24, 24, 24, 24, 24, 24, 24],
data: [30, 45, 50, 23, 24, 18, 80],
type: 'line',
smooth: true,
itemStyle: {
......
......@@ -8,21 +8,44 @@
</div>
<div class="page-content-main">
<div class="page-title-project">
<div v-for="(item,index) in dataList"
:key="index" class="project-title-font"
>
{{ item }}
</div>
</div>
<div v-for="(temp,index) in getByProjCodewtWtList" :key="index" class="page-title-project"
style="margin-top: 0.8vh;height: 5vh;border: 1px solid #0097FF ;">
<div v-for="(item,index) in getByProjCodewtWtArray"
:key="index" class="project-title-font" style="opacity: 0.5;"
<!-- <div class="page-title-project">-->
<!-- <div v-for="(item,index) in dataList"-->
<!-- :key="index" class="project-title-font"-->
<!-- >-->
<!-- {{ item }}-->
<!-- </div>-->
<!-- </div>-->
<!-- <div v-for="(temp,index) in getByProjCodewtWtList" :key="index" class="page-title-project"-->
<!-- style="margin-top: 0.8vh;height: 5vh;border: 1px solid #0097FF ;">-->
<!-- <div v-for="(item,index) in getByProjCodewtWtArray"-->
<!-- :key="index" class="project-title-font" style="opacity: 0.5;"-->
<!-- >-->
<!-- {{ temp[item] }}-->
<!-- </div>-->
<!-- </div>-->
<el-table
:data="getByProjCodewtWtList"
border
height="68vh"
id="tableId1"
:highlight-current-row="true"
style="width: 100%">
<el-table-column
v-for="(colVal,i) in columns"
:prop="colVal.value"
:align="colVal.align"
:label="colVal.label"
:width="colVal.width"
>
{{ temp[item] }}
</div>
</div>
<template slot-scope="scope">
<span class="project-title-font">{{scope.row[colVal.value] | resetData}}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
......@@ -43,8 +66,52 @@ module.exports = {
getByProjCodewtWtList:[],
dataList:['项目名称','计划完成时间','计划产量','实际产量','进度'],
getByProjCodewtWtArray:['projName','completeDate','totalWeight','finishWeight','schedule'],
columns:[
{
label: '项目名称',
align: 'center',
value: 'projName',
width:''
},
{
label: '计划完成时间',
align: 'center',
value: 'completeDate',
width:''
},
{
label: '计划产量',
align: 'center',
value: 'totalWeight',
width:'60'
},
{
label: '实际产量',
align: 'center',
value: 'finishWeight',
width:'60'
},
{
label: '进度(%)',
align: 'center',
value: 'schedule',
width:'40'
}
]
};
},
filters: {
resetData(d) {
if (d === '' || d === undefined) {
return '-'
} else if (d === 0) {
return 0
} else if (typeof d === 'number') {
return d.toFixed(2)
}
return d
}
},
watch:{
factory(newVal) {
this.getByProjCodewt();
......@@ -64,7 +131,188 @@ module.exports = {
inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProjCodeWt', inInfo, {
onSuccess: function (res) {
_this.getByProjCodewtWtList = res.extAttr.result
let list = [
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称项目名称项目名称项目名称项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
},
{
projName:'项目名称',
completeDate:'2024-04-20',
totalWeight:'2000',
finishWeight:'2300',
schedule:'120',
}
]
_this.getByProjCodewtWtList = res.extAttr.result&& res.extAttr.result.length? res.extAttr.result: list;
_this.$nextTick(() => {
tableContentScroll('tableId1')
})
},
onFail: function (err) {
......@@ -148,15 +396,9 @@ module.exports = {
display: flex;
}
.project-title-font{
width: 25%;
height: 100%;
display: flex;
font-size: 0.7vw;
justify-content: center;
align-items: center;
color: #fff;
color: #f4f4f4;
overflow: hidden;
flex-wrap: wrap;
font-size: 0.65vw;
}
</style>
......@@ -875,32 +875,40 @@ let showAuthButton = function () {
let parentId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId;
let leafLevel = IPLATUI.EFTree.categoryTree.selectTreeNode.leafLevel;
let isAuth = IPLATUI.EFTree.categoryTree.selectTreeNode.isAuth;
let changeRecord = $("#CHANGE_RECORD").hide();
if (!isBlank(leafLevel) && leafLevel == 0){
changeRecord.show();
$("#COPY_PROT_FILE").show();
}
// C:目录
if (isBlank(leafType) || leafType != "C") {
$("#RELEASE").hide();
$("#UPLOAD_FILE").hide();
$("#COPY_FILE").hide();
//$("#COPY_PROT_FILE").hide();
$("#PREVIEW").hide();
$("#BATCH_DOWNLOAD").hide();
return
}
// 隐藏变更记录按钮
if (!isBlank(leafLevel) && leafLevel === 0) {
CommonUtils.showButton("CHANGE_RECORD");
CommonUtils.showButton("COPY_PROT_FILE");
} else {
CommonUtils.hideButton("CHANGE_RECORD");
}
// C:目录
if (isBlank(leafType) || leafType !== "C") {
CommonUtils.hideButton("RELEASE");
CommonUtils.hideButton("UPLOAD_FILE");
CommonUtils.hideButton("COPY_FILE");
CommonUtils.hideButton("PREVIEW");
CommonUtils.hideButton("BATCH_DOWNLOAD");
return
}
// 0:不授权
if (isAuth == 0) {
$("#RELEASE").show();
$("#UPLOAD_FILE").show();
$("#COPY_FILE").show();
$("#COPY_PROT_FILE").show();
$("#PREVIEW").show();
$("#BATCH_DOWNLOAD").show();
return;
if (isAuth === 0) {
notAuthShowButton();
} else {
isProjectManager(parentId);
}
isProjectManager(parentId);
}
/**
* 不授权显示按钮
*/
function notAuthShowButton() {
CommonUtils.showButton("RELEASE");
CommonUtils.showButton("UPLOAD_FILE");
CommonUtils.showButton("COPY_FILE");
CommonUtils.showButton("COPY_PROT_FILE");
CommonUtils.showButton("PREVIEW");
CommonUtils.showButton("BATCH_DOWNLOAD");
}
/**
......@@ -1054,33 +1062,38 @@ let showPreview = function (docId, docType, docName) {
addRecordWindow(fileId, docId, docType, docName);
}
/**
* 项目管理人员
*
* @param parentId
*/
let isProjectManager = function (parentId) {
let inEiInfo = new EiInfo();
inEiInfo.set("inqu_status-0-fileId", parentId);
$("#COPY_PROT_FILE").show();
$("#BATCH_DOWNLOAD").show();
$("#RELEASE").show();
$("#UPLOAD_FILE").show();
$("#COPY_FILE").show();
$("#PREVIEW").show();
EiCommunicator.send("HGWD001", "queryProjectManager", inEiInfo, {
onSuccess(ei) {
if (ei.status != -1){
switch (ei.extAttr.isManager) {
case 1:
case 2:
break
case 3:
$("#RELEASE").hide();
break
default:
$("#RELEASE").hide();
$("#UPLOAD_FILE").hide();
$("#COPY_FILE").hide();
$("#PREVIEW").hide();
$("#COPY_PROT_FILE").hide();
}
if (ei.status < 0){
return;
}
let isManager = ei.extAttr.isManager;
if (isManager === 1 || isManager === 2 || isManager === 3) {
if (isManager === 1 || isManager === 2) {
CommonUtils.showButton("RELEASE");
} else {
CommonUtils.hideButton("RELEASE");
}
CommonUtils.showButton("COPY_PROT_FILE");
CommonUtils.showButton("BATCH_DOWNLOAD");
CommonUtils.showButton("UPLOAD_FILE");
CommonUtils.showButton("COPY_FILE");
CommonUtils.showButton("PREVIEW");
} else {
CommonUtils.showButton("RELEASE");
CommonUtils.showButton("UPLOAD_FILE");
CommonUtils.showButton("COPY_FILE");
CommonUtils.showButton("PREVIEW");
CommonUtils.showButton("COPY_PROT_FILE");
}
}
}, {async: false})
}
......
......@@ -2,24 +2,22 @@ $(function () {
IPLATUI.EFTree = {
"docTree": {
select: function (e) {
var nodeData = this.dataItem(e.node);
let value = nodeData.label;
let leafType = nodeData.leafType;
IPLATUI.EFTree.docTree.selectNode.treeId = value;
IPLATUI.EFTree.docTree.selectNode.leaf = nodeData.leaf;
IPLATUI.EFTree.docTree.selectNode.leafType = leafType;
// leafType=C:目录
if (leafType == 'C') {
$("#inqu_status-0-fileId").val(value);
$("#inqu_status-0-fileName").val(nodeData.text);
} else {
$("#inqu_status-0-fileId").val('');
$("#inqu_status-0-fileName").val('');
query: function (inInfo, model) {
if (model == null) {
return inInfo;
}
resultGrid.dataSource.page(1);
// 显示授权按钮
showAuthButton();
let label = model.label;
// 选中树节点
selectTreeId(label);
// 设置选中节点
treeSelectClick(model);
inInfo.set("inqu_status-0-projCode", model.projCode);
return inInfo;
},
select: function (e) {
let nodeData = this.dataItem(e.node);
// 设置选中节点
treeSelectClick(nodeData);
},
template: function (node) {
var item = node.item;
......@@ -294,3 +292,66 @@ let checkSelectMain = function () {
}
return true;
}
/**
* 选中树节点
*
* @param treeId
*/
let selectTreeId = function (treeId) {
// 刷新树节点
const tree = $("#docTree").data("kendoTreeView");
// 选中的节点
selectTreeNode(tree, treeId);
}
/**
* 选中树节点
*
* @param tree
* @param treeId
*/
let selectTreeNode = (tree, treeId) => {
if (!tree || treeId == null) {
return
}
setTimeout(() => {
let barDataItem = tree.dataSource.get(treeId);
if (barDataItem) {
let barElement = tree.findByUid(barDataItem.uid);
// 刷新完成后选中对应的树节点
tree.select(barElement);
} else {
selectTreeNode(tree, treeId)
}
}, 300)
}
/**
* 树点击事件
*
* @param nodeData
*/
let treeSelectClick = function (nodeData) {
// 设置选择的树节点信息
setTreeNodeValue(nodeData);
// 显示授权按钮
showAuthButton();
// 刷新列表
query();
}
/**
* 设置树节点的值
*
* @param nodeData
*/
let setTreeNodeValue = function (nodeData) {
IPLATUI.EFTree.docTree.selectNode.treeId = nodeData.label;
IPLATUI.EFTree.docTree.selectNode.leaf = nodeData.leaf;
IPLATUI.EFTree.docTree.selectNode.leafType = nodeData.leafType;
// leafType=C:目录
$("#inqu_status-0-fileId").val(nodeData.label);
$("#inqu_status-0-fileName").val(nodeData.text);
$("#inqu_status-0-projCode").val(nodeData.projCode);
}
\ No newline at end of file
......@@ -26,6 +26,7 @@
<div class="col-md-8">
<EF:EFRegion title="查询区" id="inqu">
<EF:EFInput cname="项目编码" ename="projCode" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="文件ID" ename="fileId" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="文件名称" ename="fileName" blockId="inqu_status" row="0" colWidth="3"
......
......@@ -740,13 +740,45 @@ function loadChange(grid,e,field) {
data === 'undefined' || data === 'unknown';
}
/**
* 隐藏按钮
*
* @param name
*/
function hideButton(name) {
let button = $("#" + name);
button.hide();
// 隐藏父级标签,防止按钮重叠
let parent = button.parent();
parent.css("display", "none");
}
/**
* 显示按钮
*
* @param name
*/
function showButton(name) {
let button = $("#" + name);
let parent = button.parent();
if (!CommonUtils.isBlank(button.attr("uuid"))) {
button.show();
parent.css("display", "");
} else {
// 隐藏父级标签,防止按钮重叠
parent.css("display", "none");
}
}
// export 到全局作用域 window对象
$.extend(window, {
CommonUtils: {
uploadFile: uploadFile,
downloadFile: downloadFile,
previewFile: previewFile,
isBlank: isBlank
isBlank: isBlank,
hideButton: hideButton,
showButton: showButton
}
});
})(window.jQuery);
let timer1 = {}
const tableContentScroll = (el) => {
if (timer1[el]) {
clearInterval(timer1[el])
timer1[el] = null;
}
setTimeout(()=>{
let i = $("#" + el + ' .el-table__body-wrapper table');
let i2 = $("#" + el + ' .el-table__body-wrapper');
let a = 0;
let boxHeight = i.height();
let height = i2.height();
let num = boxHeight - height;
// console.log(boxHeight, height, num,"高度数据")
let run = () => {
if (num > 0) {
timer1[el] = setInterval(() => {
a = a + 0.07;
if (a >= num) {
a = 0
}
i2.scrollTop(a);
}, 10)
}
}
run()
i.on('mouseenter', () => {
clearInterval(timer1[el])
timer1[el] = null
i2.on('scroll',()=>{
a = i2.scrollTop();
})
})
i.on("mouseleave",()=>{
i2.off("scroll");
if(!timer1[el]){
run()
}
})
},50)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment