方案图文件预览问题,js提交
This commit is contained in:
parent
6de16e6618
commit
2733e2ae0e
@ -433,6 +433,7 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
|
||||
}
|
||||
}
|
||||
|
||||
// table表格
|
||||
function openDialog(obj) {
|
||||
const { name: tableName, table: dialogTable } = obj;
|
||||
const columns = dialogTable[0];
|
||||
@ -1674,7 +1675,7 @@ function ProcessManual(obj) {
|
||||
}else if(methodId=="control.kpi"){
|
||||
manualName="流程绩效文件 :";
|
||||
}else if(methodId=="process.scheme"){
|
||||
manualName="流程绩效文件 :";
|
||||
manualName="方案文件 :";
|
||||
}else if(methodId=="engineering.standard"){
|
||||
manualName="工程技术标准文件 :";
|
||||
}
|
||||
@ -1817,7 +1818,7 @@ function initUpfileData(obj) {
|
||||
var t = '';
|
||||
var splitId='';
|
||||
var processFile = upfileData['file'];
|
||||
|
||||
|
||||
if(processFile.length > 0) {
|
||||
/*t += '<table name="file" class="awsui-table">';
|
||||
t += '<tr><td>';
|
||||
@ -1856,7 +1857,7 @@ function initUpfileData(obj) {
|
||||
splitId+=obj.id+',';
|
||||
|
||||
var spiltName=obj.name;
|
||||
|
||||
|
||||
if(spiltName.substring(0,spiltName.lastIndexOf("."))==fileName && appendFlag==true){
|
||||
appendFlag=false;
|
||||
var s='';
|
||||
@ -1879,16 +1880,16 @@ function initUpfileData(obj) {
|
||||
|
||||
var countindex=0;
|
||||
var elements = Model.define.elements;
|
||||
console.log('elements',elements)
|
||||
if(methodId=="data.form"){
|
||||
var sortModelByName = sortModelByName1();;
|
||||
for(var sortIndex = 0; sortIndex < sortModelByName.length; sortIndex++) {
|
||||
var temp = sortModelByName[sortIndex];
|
||||
var shape = elements[temp.id];
|
||||
if(shape.name == 'linker') {
|
||||
continue;
|
||||
}
|
||||
var processShape = upfileData[temp.id];
|
||||
console.log('elements',elements)
|
||||
if(methodId=="data.form"){
|
||||
var sortModelByName = sortModelByName1();;
|
||||
for(var sortIndex = 0; sortIndex < sortModelByName.length; sortIndex++) {
|
||||
var temp = sortModelByName[sortIndex];
|
||||
var shape = elements[temp.id];
|
||||
if(shape.name == 'linker') {
|
||||
continue;
|
||||
}
|
||||
var processShape = upfileData[temp.id];
|
||||
if(processShape != null && processShape.length > 0) {
|
||||
var fileTile="表单/模板:";
|
||||
t += '<div>';
|
||||
@ -1911,21 +1912,53 @@ function initUpfileData(obj) {
|
||||
|
||||
}
|
||||
t += '</div>';
|
||||
}
|
||||
|
||||
}else{
|
||||
for(var e in elements) {
|
||||
var ele = elements[e];
|
||||
if(ele.name == 'linker') {
|
||||
continue;
|
||||
}
|
||||
|
||||
var processShape = upfileData[ele.id];
|
||||
if(methodId=="control.policy"){
|
||||
//暂时去掉制度节点附件显示 20221208 lihongyu
|
||||
if(false){
|
||||
//if(countindex!=0){
|
||||
}else{
|
||||
for(var e in elements) {
|
||||
var ele = elements[e];
|
||||
if(ele.name == 'linker') {
|
||||
continue;
|
||||
}
|
||||
|
||||
var processShape = upfileData[ele.id];
|
||||
if(methodId=="control.policy" || methodId=="engineering.standard" || methodId=="process.scheme"){
|
||||
//暂时去掉制度节点附件显示 20221208 lihongyu
|
||||
if(false){
|
||||
//if(countindex!=0){
|
||||
if(processShape != null && processShape.length > 0) {
|
||||
var fileTile="";
|
||||
if(ele.category=="data_form"){
|
||||
fileTile="表单/模板:";
|
||||
}else{
|
||||
fileTile="节点附件:";
|
||||
}
|
||||
t += '<div>';
|
||||
t +='<strong>'+fileTile+'</strong>'+ele.text;
|
||||
for(var i = 0; i < processShape.length; i++) {
|
||||
t += '<table name="' + ele.id + '" class="awsui-table">';
|
||||
t +='<tbody>';
|
||||
t += '<tr>';
|
||||
t += '<td>';
|
||||
var obj = processShape[i];
|
||||
t += '<div class="tablefileContent"><a href="javascript:void(0);" title="'+obj.name+'" onclick="readFile(\''+ obj.id +'\')">'+ obj.name +'</a>';
|
||||
t +='</div>';
|
||||
t += '</td>';
|
||||
t += '</tr>';
|
||||
t +='</tbody>';
|
||||
t += '</table>';
|
||||
splitId+=obj.id+',';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
t += '</div>';
|
||||
}
|
||||
|
||||
countindex++;
|
||||
}else{
|
||||
if(processShape != null && processShape.length > 0) {
|
||||
|
||||
var fileTile="";
|
||||
if(ele.category=="data_form"){
|
||||
fileTile="表单/模板:";
|
||||
@ -1934,6 +1967,7 @@ function initUpfileData(obj) {
|
||||
}
|
||||
t += '<div>';
|
||||
t +='<strong>'+fileTile+'</strong>'+ele.text;
|
||||
|
||||
for(var i = 0; i < processShape.length; i++) {
|
||||
t += '<table name="' + ele.id + '" class="awsui-table">';
|
||||
t +='<tbody>';
|
||||
@ -1954,48 +1988,15 @@ function initUpfileData(obj) {
|
||||
t += '</div>';
|
||||
}
|
||||
|
||||
countindex++;
|
||||
}else{
|
||||
if(processShape != null && processShape.length > 0) {
|
||||
|
||||
var fileTile="";
|
||||
if(ele.category=="data_form"){
|
||||
fileTile="表单/模板:";
|
||||
}else{
|
||||
fileTile="节点附件:";
|
||||
}
|
||||
t += '<div>';
|
||||
t +='<strong>'+fileTile+'</strong>'+ele.text;
|
||||
|
||||
for(var i = 0; i < processShape.length; i++) {
|
||||
t += '<table name="' + ele.id + '" class="awsui-table">';
|
||||
t +='<tbody>';
|
||||
t += '<tr>';
|
||||
t += '<td>';
|
||||
var obj = processShape[i];
|
||||
t += '<div class="tablefileContent"><a href="javascript:void(0);" title="'+obj.name+'" onclick="readFile(\''+ obj.id +'\')">'+ obj.name +'</a>';
|
||||
t +='</div>';
|
||||
t += '</td>';
|
||||
t += '</tr>';
|
||||
t +='</tbody>';
|
||||
t += '</table>';
|
||||
splitId+=obj.id+',';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
t += '</div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
t += '<div id="dabao" style=" margin-top: -25px;"></div>';
|
||||
|
||||
@ -2035,42 +2036,42 @@ function initUpfileData(obj) {
|
||||
|
||||
//根据节点名称排序
|
||||
function sortModelByName1() {
|
||||
var num = 0;
|
||||
var num = 0;
|
||||
var recordId = [];
|
||||
var hasNumArr = [];
|
||||
/*******************************排序方法重构***by zhaolei**********************************************/
|
||||
for (var shapeId in Model.define.elements) {
|
||||
var shape = Model.define.elements[shapeId];
|
||||
var attr = shape.text;
|
||||
var category = shape.category;
|
||||
console.log('节点名称',category);
|
||||
//根据活动名称排序
|
||||
if (attr != null) {
|
||||
if(category=="data_form"){
|
||||
|
||||
if(attr.substr(0,2)=='附件') {
|
||||
var obj = {};
|
||||
obj.text = shape.text;
|
||||
obj.id = shapeId;
|
||||
obj.orderIndex = attr.substr(2, 1);
|
||||
hasNumArr.push(obj);
|
||||
recordId.push(shapeId);
|
||||
|
||||
}else{
|
||||
var obj = {};
|
||||
obj.text = shape.text;
|
||||
obj.id = shapeId;
|
||||
obj.orderIndex = num;
|
||||
hasNumArr.push(obj);
|
||||
recordId.push(shapeId);
|
||||
num++;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var attr = shape.text;
|
||||
var category = shape.category;
|
||||
console.log('节点名称',category);
|
||||
//根据活动名称排序
|
||||
if (attr != null) {
|
||||
if(category=="data_form"){
|
||||
|
||||
if(attr.substr(0,2)=='附件') {
|
||||
var obj = {};
|
||||
obj.text = shape.text;
|
||||
obj.id = shapeId;
|
||||
obj.orderIndex = attr.substr(2, 1);
|
||||
hasNumArr.push(obj);
|
||||
recordId.push(shapeId);
|
||||
|
||||
}else{
|
||||
var obj = {};
|
||||
obj.text = shape.text;
|
||||
obj.id = shapeId;
|
||||
obj.orderIndex = num;
|
||||
hasNumArr.push(obj);
|
||||
recordId.push(shapeId);
|
||||
num++;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 按名称升序排序
|
||||
|
||||
Loading…
Reference in New Issue
Block a user