|
@@ -138,8 +138,10 @@ let subObj = {
|
|
|
this.initItemWidth();
|
|
|
},
|
|
|
//初始化清单精灵和项目特征文本两个区域的宽度,改变窗口大小时调用此方法,实时刷新
|
|
|
- initTZItemWidth:function (eleID){
|
|
|
- let tabID = eleID == "linkQDZY"?"qdzy":"qdjl";
|
|
|
+ initTZItemWidth:function (){
|
|
|
+ let tabID = "";
|
|
|
+ if($('#qdzy').is(':visible')) tabID = "qdzy";
|
|
|
+ if($('#qdjl').is(':visible')) tabID = "qdjl";
|
|
|
//总宽度
|
|
|
let totalWidth = $('#subItems').width();
|
|
|
//人材机和项目特征文本比例
|
|
@@ -181,18 +183,17 @@ let subObj = {
|
|
|
};
|
|
|
return jl_sideResizeEles;
|
|
|
},
|
|
|
- initQDSubTab:function (eleID) {
|
|
|
- if(!($('#'+eleID).hasClass('active'))){
|
|
|
- return;
|
|
|
- }
|
|
|
- if(this.showQDSubTab == true){
|
|
|
- $("#tzSubDiv").show();
|
|
|
- $("#tzrgResize").show();
|
|
|
- } else {
|
|
|
- $("#tzSubDiv").hide();
|
|
|
- $("#tzrgResize").hide();
|
|
|
- }
|
|
|
- this.initTZItemWidth(eleID);
|
|
|
+ initQDSubTab:function () {
|
|
|
+
|
|
|
+ if(!($('#linkQDJL').hasClass('active') || $('#linkQDZY').hasClass('active'))) return;
|
|
|
+ if(this.showQDSubTab == true){
|
|
|
+ $("#tzSubDiv").show();
|
|
|
+ $("#tzrgResize").show();
|
|
|
+ } else {
|
|
|
+ $("#tzSubDiv").hide();
|
|
|
+ $("#tzrgResize").hide();
|
|
|
+ }
|
|
|
+ this.initTZItemWidth();
|
|
|
},
|
|
|
showGljSubTabData:function () {
|
|
|
this.initGljSubTab();
|
|
@@ -205,8 +206,8 @@ let subObj = {
|
|
|
this.firstOpen = false;
|
|
|
}
|
|
|
},
|
|
|
- showQDSubTabData:function (eleID) {
|
|
|
- this.initQDSubTab(eleID);
|
|
|
+ showQDSubTabData:function () {
|
|
|
+ this.initQDSubTab();
|
|
|
MaterialController.showItemCharacterText(null,"tzCharacterText");
|
|
|
if (gljOprObj.activeTab !== gljOprObj.preActiveTab) { //提供焦点变换性能 2019年4月12日
|
|
|
refreshSubSpread();
|
|
@@ -803,7 +804,7 @@ $('#linkGLJ').on('shown.bs.tab', function () {
|
|
|
});
|
|
|
|
|
|
$('.linkQDJL').on('shown.bs.tab', function () {
|
|
|
- subObj.showQDSubTabData(this.id);
|
|
|
+ subObj.showQDSubTabData();
|
|
|
if(!subObj.inited) {
|
|
|
$("#tz_toogle").click();
|
|
|
subObj.inited = true;
|
|
@@ -906,6 +907,25 @@ $('.gljSubTab ul li a').on('shown.bs.tab', function () {
|
|
|
zmhs_obj.showDatas();
|
|
|
});
|
|
|
|
|
|
+//显示格式
|
|
|
+$('#tzCharacterText').blur(async function () {
|
|
|
+ let billID = $("#xmtz_billID").val();
|
|
|
+ let htmlString = $(this).html();
|
|
|
+ let value = htmlString.replace(/<br>/g,"\n");
|
|
|
+ value = value.replace(/ /g," ");
|
|
|
+ let billNode = projectObj.project.mainTree.getNodeByID(billID);
|
|
|
+ if(billNode && value == billNode.data.itemCharacterText) return;
|
|
|
+ let datas = [{
|
|
|
+ type:'bills',
|
|
|
+ data:{
|
|
|
+ ID:billID,
|
|
|
+ itemCharacterText:value
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ await projectObj.project.syncUpdateNodesAndRefresh(datas);
|
|
|
+
|
|
|
+});
|
|
|
+
|
|
|
function closeTab(elem) {
|
|
|
setTimeout(function () {
|
|
|
$(elem).removeClass("show");
|