|
@@ -0,0 +1,552 @@
|
|
|
|
+/*
|
|
|
|
+ *description : 单人评分拓展类
|
|
|
|
+ *author :coyle
|
|
|
|
+ *date :20241210
|
|
|
|
+*/
|
|
|
|
+shr.defineClass("shr.perfweb.perfscoreNewEx", shr.perfweb.perfscoreNew, {
|
|
|
|
+
|
|
|
|
+ initalizeDOM: function () {
|
|
|
|
+ // 初始化JS环境
|
|
|
|
+ it = this;
|
|
|
|
+ that = this;
|
|
|
|
+ shr.perfweb.perfscoreNewEx.superClass.initalizeDOM.call(this);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ _getGridParams: function(tabIndex,msgdata){
|
|
|
|
+ var area = globalIndicatorData.rows.evaAreaList;
|
|
|
|
+ var myModel = [];
|
|
|
|
+ var myName = [];
|
|
|
|
+ var indicator = area[tabIndex].evaIndicatorList || area[tabIndex].evaRecordList;
|
|
|
|
+ var areaNeedScore = area[tabIndex].needScore;
|
|
|
|
+ var fieldList = area[tabIndex].fieldList;
|
|
|
|
+ var tabData = [];
|
|
|
|
+ var isExistComment = 0;
|
|
|
|
+ var thisIsRejection = that.judgeIsRejection(indicator); // 该区域指标是否含有否决项
|
|
|
|
+ var thisAllIsRejection = that.judgeAllIsRejection(indicator); // 该区域指标是否都是否决项
|
|
|
|
+ var scoreOrRate = globalIndicatorData.scoreOrRate; // 0:打分,1:打等级
|
|
|
|
+ //var curScoreMsg = indicator.length > 0 ? it.getCurrentAndPrevScoreMsg(indicator[0].FID) : []; // 当前节点打分信息
|
|
|
|
+ var curScoreMsg = that._getCurrentScoreLevel();
|
|
|
|
+ // 指标评语是否必填
|
|
|
|
+ var isTargetComment = that.judgeCommentIsRequired(msgdata, area, tabIndex);
|
|
|
|
+ var scoreTipsText = '';
|
|
|
|
+
|
|
|
|
+ that.getGradeOption(curScoreMsg);
|
|
|
|
+ // 打分字段单独处理
|
|
|
|
+ var myScoreName='';
|
|
|
|
+ var myScoreModel={};
|
|
|
|
+ for (var i = 0; i < fieldList.length; i++) {
|
|
|
|
+ var fieldName = fieldList[i].colName;
|
|
|
|
+ var fieldMaintenanceShow = fieldList[i].fieldMaintenanceShow;
|
|
|
|
+ var fieldShowLocation = fieldList[i].fieldShowLocation;
|
|
|
|
+ var fieldType = fieldList[i].fieldType;
|
|
|
|
+ var canEditField = canEditTable && fieldList[i].fieldMaintenanceStage !== '100';
|
|
|
|
+ var isHidden = fieldShowLocation === '10' ? false : true;
|
|
|
|
+ var fillOverwrite = '';
|
|
|
|
+ var required = fieldList[i].required && canEditField;
|
|
|
|
+ var classes = '';
|
|
|
|
+ if(fieldName === 'FCOMMENT'){
|
|
|
|
+ required = canEditField && isTargetComment === '1';
|
|
|
|
+ }else if(fieldName === 'FSCORE'){
|
|
|
|
+ required = canEditField && area[tabIndex].needScore === '2';
|
|
|
|
+ }
|
|
|
|
+ if(fieldName.indexOf('FEXTEND') > -1){ // 扩展字段匹配可维护流程级数
|
|
|
|
+ canEditField = canEditTable && (fieldMaintenanceShow === '0' || fieldMaintenanceShow === '1');
|
|
|
|
+ isHidden = fieldMaintenanceShow === '3';
|
|
|
|
+ fillOverwrite = fieldList[i].fillOverwrite;
|
|
|
|
+ required = canEditField && fieldMaintenanceShow === '1';
|
|
|
|
+ }
|
|
|
|
+ if(canEditTable && !canEditField){
|
|
|
|
+ classes = 'disabled';
|
|
|
|
+ }else if(required){
|
|
|
|
+ classes = 'required';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 分数
|
|
|
|
+ if(fieldName == "FSCORE"){
|
|
|
|
+ if(!thisAllIsRejection){
|
|
|
|
+ // 打分、选是否存在混合字段列
|
|
|
|
+ if((scoreOrRate == 0 || (scoreOrRate == 1 && area[tabIndex].subAreaType == '1')) && thisIsRejection){
|
|
|
|
+ //myName.push('评分/是否存在');
|
|
|
|
+ myName.push(jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_05);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: 'scoreORrejection',
|
|
|
|
+ index: 'scoreORrejection',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditField,
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ hidden:entryType === 'viewEvaForm' ? true :false
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ //参数控制打分字段隐藏显示
|
|
|
|
+ if (hideUnselfScore=='false' && pageSource == 'PERSONHISTORY'){
|
|
|
|
+ myScoreName=fieldList[i].showName;
|
|
|
|
+ myScoreModel={
|
|
|
|
+ name: fieldName,
|
|
|
|
+ index: fieldName,
|
|
|
|
+ width: 70,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditField,
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ // formatter: 'numberField'
|
|
|
|
+ hidden: false, // 已评分默认显示评分列
|
|
|
|
+ }
|
|
|
|
+ }else if (scoreOrRate == 0 || (scoreOrRate == 1 && area[tabIndex].subAreaType == '1')){
|
|
|
|
+ myName.push(fieldList[i].showName+'\<span\ class="score-tips">\<\/span\>');
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: fieldName,
|
|
|
|
+ index: fieldName,
|
|
|
|
+ width: 70,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditField,
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ // formatter: 'numberField'
|
|
|
|
+ hidden: entryType === 'viewEvaForm' ? true : (thisIsRejection ? true : false), // 既有打分又有否决项指标的区域,隐藏打分列,显示混合字段列
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 组装表格字段名称属性
|
|
|
|
+ if(scoreOrRate == 1 && !thisAllIsRejection && thisIsRejection && area[tabIndex].subAreaType !== '1'){ // 打等级、选是否存在混合字段列
|
|
|
|
+ //myName.push('等级/是否存在');
|
|
|
|
+ myName.push(jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_06);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: 'gradeORrejection',
|
|
|
|
+ index: 'gradeORrejection',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditTable,
|
|
|
|
+ hidden:entryType === 'viewEvaForm' ? true :false
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if(scoreOrRate == 1 && !thisAllIsRejection && area[tabIndex].subAreaType !== '1'){ // 既有打等级又有否决项指标的区域,隐藏等级列,显示混合字段列
|
|
|
|
+ //myName.push('等级');
|
|
|
|
+ myName.push(jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_07);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: 'nodeGrade',
|
|
|
|
+ index: 'nodeGrade',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditTable,
|
|
|
|
+ edittype: 'shrselect',
|
|
|
|
+ editoptions: {
|
|
|
|
+ selectJson: {
|
|
|
|
+ data: gradeOption
|
|
|
|
+ },
|
|
|
|
+ enumSource: {
|
|
|
|
+ data: gradeOption
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ formatter: 'shrtext',
|
|
|
|
+ hidden: entryType === 'viewEvaForm' ? true : (thisIsRejection|| areaNeedScore=='0' ? true : false)
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 定性/定量、可见性、否决项
|
|
|
|
+ else if(fieldName == "FQUALIORRATION" || fieldName == 'FISVISIBLE' || fieldName == 'FREJECTION'){
|
|
|
|
+ myName.push(fieldList[i].showName);
|
|
|
|
+ myModel.push({name:fieldName, index:fieldName, width:10, hidden:true});
|
|
|
|
+ if(fieldName == "FREJECTION" && thisIsRejection){ // 否决项
|
|
|
|
+ myName.push(
|
|
|
|
+ //'是否存在'
|
|
|
|
+ jsBizMultLan.perfweb_perfscoreNew_zw20210105_i18n_01
|
|
|
|
+ );
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: 'isRejection',
|
|
|
|
+ index: 'isRejection',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditField,
|
|
|
|
+ edittype: 'shrselect',
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ editoptions: {
|
|
|
|
+ selectJson: {
|
|
|
|
+ //data: [{value:"0",alias:"否",isenum:false},{value:"1",alias:"是",isenum:false}],
|
|
|
|
+ data: [{value:"0",alias:jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_09,isenum:false},{value:"1",alias:jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_10,isenum:false}],
|
|
|
|
+ onChange: function(){
|
|
|
|
+ var $this = $(this);
|
|
|
|
+ if($this.shrSelect('getValue').value == '1'){
|
|
|
|
+ //shr.showConfirm('若存在否决项,将直接影响最终得分,确定要选择吗?', function () {
|
|
|
|
+ shr.showConfirm(jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_08, function () {
|
|
|
|
+ calcTotoalScore(gradeTaskNode);
|
|
|
|
+ },function(){
|
|
|
|
+ $this.shrSelect('setValue','0');
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ calcTotoalScore(gradeTaskNode);
|
|
|
|
+ },100)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ enumSource: {
|
|
|
|
+ //data: [{value:"0",alias:"否",isenum:false},{value:"1",alias:"是",isenum:false}]
|
|
|
|
+ data: [{value:"0",alias:jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_09,isenum:false},{value:"1",alias:jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_10,isenum:false}]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ formatter: 'shrselect',
|
|
|
|
+ hidden: entryType === 'viewEvaForm' ? true : (thisAllIsRejection ? false : true),// 既有打等级或评分又有否决项指标的区域,隐藏否决项列,显示混合字段列
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if(fieldShowLocation === '10' && fieldName !== 'FREJECTION'){
|
|
|
|
+ myName.push(fieldList[i].showName);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: fieldName+'Text',
|
|
|
|
+ index: fieldName+'Text',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ classes: canEditTable ? 'disabled': '',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 评分公式,用于判断定量指标是否有评分公式
|
|
|
|
+ else if(fieldName == "FSCORINGFORMULA"){
|
|
|
|
+ myName.push(fieldList[i].showName);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: fieldName,
|
|
|
|
+ index: fieldName,
|
|
|
|
+ width: 120,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: false,
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ hidden: fieldShowLocation === '10' ? false : true
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 字段类型为是否、选择项
|
|
|
|
+ else if(fieldShowLocation === '10' && (fieldType == 'Boolean' || fieldType == 'Select')){
|
|
|
|
+ var fieldOptions = [];
|
|
|
|
+ if(fieldType == 'Boolean'){
|
|
|
|
+ // [{value:"0",alias:"否",isenum:false},{value:"1",alias:"是",isenum:false}]
|
|
|
|
+ fieldOptions = [{value:"0",alias:jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_09,isenum:false},{value:"1",alias:jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_10,isenum:false}];
|
|
|
|
+ }else{
|
|
|
|
+ var options = fieldList[i].options;
|
|
|
|
+ $.each(options,function(i,item){
|
|
|
|
+ fieldOptions.push({
|
|
|
|
+ value: item.key,
|
|
|
|
+ alias: item.value
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ myName.push(fieldList[i].showName);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: fieldName,
|
|
|
|
+ index: fieldName,
|
|
|
|
+ width: 100,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditField,
|
|
|
|
+ edittype: 'shrselect',
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ editoptions: {
|
|
|
|
+ selectJson: {
|
|
|
|
+ data: fieldOptions,
|
|
|
|
+ onChange: function(){
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ enumSource: {
|
|
|
|
+ data: fieldOptions
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ formatter: 'shrselect',
|
|
|
|
+ hidden: isHidden ,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 字段类型为长文本 + 实际完成值、目标值
|
|
|
|
+ else if(fieldShowLocation === '10' && (fieldType == 'LongText' || fieldName == 'FACTUALCOMPLEVALUE' || fieldName == 'FTARGETVALUE')){
|
|
|
|
+ isExistComment = fieldName == "FCOMMENT" ? 1 : 0;
|
|
|
|
+ var fw = 400;
|
|
|
|
+ if(fieldName == 'FNAME' || fieldName == 'FKEYITEM'){
|
|
|
|
+ fw = 150;
|
|
|
|
+ }
|
|
|
|
+ myName.push(fieldList[i].showName);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: fieldName,
|
|
|
|
+ index: fieldName,
|
|
|
|
+ width: fw,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditField,
|
|
|
|
+ edittype: 'wafTextArea',
|
|
|
|
+ fillOverwrite: fillOverwrite,
|
|
|
|
+ hidden: (entryType === 'viewEvaForm' && fieldName == "FCOMMENT") || isHidden ? true : false,
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ formatter: function(val,msg){
|
|
|
|
+ return '<div class="cell-height scrollbarthin">'+(val?val:'')+'</div>';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 字段类型为短文本、数字
|
|
|
|
+ else if(fieldShowLocation === '10' && (fieldType == 'Text' || fieldType == 'Number')){
|
|
|
|
+ myName.push(fieldList[i].showName+(fieldName == "FWEIGHT" ? '(%)' : ''));
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: fieldName,
|
|
|
|
+ index: fieldName,
|
|
|
|
+ width: fieldList[i].fieldType === 'Text' ? 120 : 90,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditField,
|
|
|
|
+ hidden: isHidden,
|
|
|
|
+ fieldType: fieldType,
|
|
|
|
+ fillOverwrite: fillOverwrite,
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ formatter: function(val,msg){
|
|
|
|
+ var text = val;
|
|
|
|
+ var fieldType = msg.colModel.fieldType;
|
|
|
|
+ if(fieldType === 'Text'){
|
|
|
|
+ text = '<div class="cell-height scrollbarthin">'+val+'</div>';
|
|
|
|
+ }
|
|
|
|
+ return text;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 字段类型为日期
|
|
|
|
+ else if(fieldShowLocation === '10' && (fieldType == 'Date' || fieldType == 'Time' || fieldType == 'TimeStamp')){
|
|
|
|
+ if(fieldShowLocation === '10'){
|
|
|
|
+ myName.push(fieldList[i].showName);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: fieldName,
|
|
|
|
+ index: fieldName,
|
|
|
|
+ width: 100,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ editable: canEditField,
|
|
|
|
+ edittype: 'shrDateTimePicker',
|
|
|
|
+ hidden : isHidden,
|
|
|
|
+ fieldType: fieldType,
|
|
|
|
+ required: required,
|
|
|
|
+ classes: classes,
|
|
|
|
+ editoptions: {
|
|
|
|
+ datepickerjson: {
|
|
|
|
+ ctrlType: fieldType
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ formatter: function(val,msg){
|
|
|
|
+ return window.dateTimePickerService.transformUTCDate(val,true,'',{ctrlType: msg.colModel.fieldType})
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 其他默认显示在列表的字段
|
|
|
|
+ else if(fieldShowLocation === '10'){
|
|
|
|
+ var fw = 120;
|
|
|
|
+ if(fieldList[i].fieldType === 'LongText'){
|
|
|
|
+ fw = 300;
|
|
|
|
+ }
|
|
|
|
+ myName.push(fieldList[i].showName);
|
|
|
|
+ myModel.push({
|
|
|
|
+ name: fieldName,
|
|
|
|
+ index: fieldName,
|
|
|
|
+ width:fw,
|
|
|
|
+ align: "left",
|
|
|
|
+ sortable: true,
|
|
|
|
+ hidden: isHidden,
|
|
|
|
+ fieldType: fieldType,
|
|
|
|
+ classes: canEditTable ? 'disabled': '',
|
|
|
|
+ formatter: function(val,msg){
|
|
|
|
+ var text = val;
|
|
|
|
+ var fieldType = msg.colModel.fieldType;
|
|
|
|
+ if(typeof val === "object"){
|
|
|
|
+ text = val.name;
|
|
|
|
+ }else if(fieldType === 'Text' || fieldType === 'LongText' || fieldType === 'Unknown'){
|
|
|
|
+ text = '<div class="cell-height scrollbarthin">'+val+'</div>';
|
|
|
|
+ }else if(fieldType == 'Boolean'){
|
|
|
|
+ text = val === '0' ? jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_09 : jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_10;
|
|
|
|
+ }else if(fieldType == 'Date' || fieldType == 'Time' || fieldType == 'TimeStamp'){
|
|
|
|
+ text = window.dateTimePickerService.transformUTCDate(val,true,'',{ctrlType: msg.colModel.fieldType});
|
|
|
|
+ }
|
|
|
|
+ return text;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 扩展字段加上是否覆盖填写字段值
|
|
|
|
+ if(fieldName.indexOf('FEXTEND') > -1 && fieldShowLocation === '10'){
|
|
|
|
+ myName.push('fillOverwrite');
|
|
|
|
+ myModel.push({name:'fillOverwrite_'+fieldName, index:'fillOverwrite_'+fieldName, width:10, hidden:true});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //打分字段后置,放在操作前面
|
|
|
|
+ if (hideUnselfScore=='false' && pageSource == 'PERSONHISTORY' && !thisAllIsRejection){
|
|
|
|
+ myName.push(myScoreName);
|
|
|
|
+ myModel.push(myScoreModel);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var otherFieldName = jsBizMultLan.perfweb_perfscore_1637291044_i18n_01 ;
|
|
|
|
+ //当前页面类型:评分页面:'1',查看考核历史页面:'2',专业应用查看评估表:'3'
|
|
|
|
+ if(pageSource !=undefined && pageSource=="PERSONHISTORY"){
|
|
|
|
+ otherFieldName = jsBizMultLan.perfweb_perfscore_1637291044_i18n_02 ;
|
|
|
|
+ }
|
|
|
|
+ else if(pageSource == undefined && viewMode ==undefined){
|
|
|
|
+ otherFieldName = jsBizMultLan.perfweb_perfscore_1637291044_i18n_01 ;
|
|
|
|
+ }
|
|
|
|
+ else if(pageSource !=undefined && (viewMode == 'viewEvaReport' || viewMode == 'viewAllEffective')){
|
|
|
|
+ otherFieldName = jsBizMultLan.perfweb_perfscore_1637291044_i18n_02 ;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ myName.push('FID','canEdit','canNegative','canVeto','gradeTaskNode','canOverSumRange','lowLimit','uperLimit','overRange',
|
|
|
|
+ //'操作'
|
|
|
|
+ /*jsBizMultLan.perf_perfscoreNewJuicer_1586255741045_i18n_2,*/otherFieldName,jsBizMultLan.perfweb_perfscore_1637291044_i18n_01,'subAreaType','areaAddSub','areaAddSubDown','areaAddSubUp','targetAddSub','targetAddSubDown','targetAddSubUp'
|
|
|
|
+ );
|
|
|
|
+ myModel.push(
|
|
|
|
+ {name:'id', index:'id', width:10, hidden:true},
|
|
|
|
+ {name:'canEdit', index:'canEdit', width:10, hidden:true},
|
|
|
|
+ {name:'canNegative', index:'canNegative', width:10, hidden:true},
|
|
|
|
+ {name:'canVeto', index:'canVeto', width:10, hidden:true}, // 判断是否可以打否决项canVeto = 2时可以
|
|
|
|
+ // {name:'otherScoreList', index:'otherScoreList', width:10, hidden:true},
|
|
|
|
+ {name:'gradeTaskNode', index:'gradeTaskNode', width:10, hidden:true},
|
|
|
|
+ {name:'canOverSumRange', index:'canOverSumRange', width:10, hidden:true},
|
|
|
|
+ {name:'lowLimit', index:'lowLimit', width:10, hidden:true},
|
|
|
|
+ {name:'uperLimit', index:'uperLimit', width:10, hidden:true},
|
|
|
|
+ {name:'overRange', index:'overRange', width:10, hidden:true},
|
|
|
|
+ // {name: 'operation', index: 'operation', width: 60, align: "center", sortable: false, formatter: function(){
|
|
|
|
+ // //var btntext = '查看其他人评分';
|
|
|
|
+ // var btntext = jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_11;
|
|
|
|
+ // if(entryType === 'viewEvaForm'){
|
|
|
|
+ // //btntext = '查看评分详情';
|
|
|
|
+ // btntext = jsBizMultLan.perfweb_perfscoreNew_zw20201229_i18n_12;
|
|
|
|
+ // }
|
|
|
|
+ // return '<a class="view_other_btn" href="javascript:;">'+btntext+'</a>'
|
|
|
|
+ // },},
|
|
|
|
+ {name:'preNodeScoreList', index:'preNodeScoreList', width:100, hidden:true},
|
|
|
|
+ //按项目需求隐藏其他人评分
|
|
|
|
+ {name:'nodeInfoList', index:'nodeInfoList', width:180, hidden: true,classes: canEditTable ? 'disabled': '',formatter: function(value,mmodel,rowData){
|
|
|
|
+ // hideUnselfScoring === 'true' ? true : false
|
|
|
|
+ var nodeInfoList = rowData.nodeInfoList ? JSON.parse(rowData.nodeInfoList) : [];
|
|
|
|
+ var flag = false;
|
|
|
|
+ $.each(nodeInfoList, function(i, data){
|
|
|
|
+ if(hideUnselfScoring === "false" || (hideUnselfScoring === "true" && data.nodeHandlerId === personId)){
|
|
|
|
+ if(data.comment){
|
|
|
|
+ flag = true;
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ var temp = [
|
|
|
|
+ '<div class="expend-td-box cell-height scrollbarthin">',
|
|
|
|
+ '<ul class="other-msg">',
|
|
|
|
+ '{@each rows as item,i}',
|
|
|
|
+ // BT-00650981 绩效工作台—组织/员工目标评分——列表页面:其他评分人信息 打等级的就显示等级,后面多一个“分”字
|
|
|
|
+ // 判断是打等级还是打分,不同展示 jianyu_zhang 2022.02.10
|
|
|
|
+ '{@if hideUnselfScoring === "false" || (hideUnselfScoring === "true" && item.nodeHandlerId === personId)}',
|
|
|
|
+ '<li class="node-name">',
|
|
|
|
+ '{@if item.nodeName}(${item.nodeName}){@/if}${item.handlerName}:',
|
|
|
|
+ '{@if isRejection == 1 }',
|
|
|
|
+ '${item.isRejection.alias} ',
|
|
|
|
+ '{@else}',
|
|
|
|
+ '{@if item.needScore != "0"}',// 增加评分展示控制,不评分的不展示分数(包括定量指标)
|
|
|
|
+ '{@if item.score != undefined && item.score != null && item.score != ""}',
|
|
|
|
+ //分
|
|
|
|
+ '${item.score}'+ jsBizMultLan.perfweb_perfscoreNew_ht_20220419_20,
|
|
|
|
+ '{@else if item.gradeRank != undefined && item.gradeRank != null && item.gradeRank != ""}',
|
|
|
|
+ '${item.gradeRank}',
|
|
|
|
+ '{@/if}',
|
|
|
|
+ '{@/if}',
|
|
|
|
+ '{@/if}',
|
|
|
|
+ '</li>',
|
|
|
|
+ '{@/if}',
|
|
|
|
+ //指标评语
|
|
|
|
+ '{@if item.comment}',
|
|
|
|
+ '<li>',
|
|
|
|
+ '<span class="expend-td-comment-field" title="${item.comment}">'+jsBizMultLan.perfweb_perfscoreNew_ht_20220414_36+':</span>',
|
|
|
|
+ '</li>',
|
|
|
|
+ '<li class="expend-td-comment"><pre class="textOverflow3">${item.comment}</pre></li>',
|
|
|
|
+ '{@/if}',
|
|
|
|
+ '{@each fieldList as it,j}',
|
|
|
|
+ '{@if it.colName.indexOf("FEXTEND") > -1 && it.fieldMaintenanceShow !== "3" && it.fillOverwrite === "0"}',
|
|
|
|
+ '<li field-type="${it.fieldType}">',
|
|
|
|
+ '<span class="" title="${it.showName}">${it.showName}:</span>',
|
|
|
|
+ '{@if item[it.colName]}',
|
|
|
|
+ '<pre class="textOverflow3">${item[it.colName]}</pre>',
|
|
|
|
+ '{@/if}',
|
|
|
|
+ '</li>',
|
|
|
|
+ '{@/if}',
|
|
|
|
+ '{@/each}',
|
|
|
|
+
|
|
|
|
+ '{@/each}',
|
|
|
|
+ '</ul>',
|
|
|
|
+ '</div>',
|
|
|
|
+ flag ? '<div class="expend-btn"></div>': ''
|
|
|
|
+ ].join('');
|
|
|
|
+ var tempDom = juicer(temp,{rows: nodeInfoList,isRejection: rowData.FREJECTION,hideUnselfScoring: pageSource === 'PERSONHISTORY'? 'false': hideUnselfScoring,personId: personId,fieldList: rowData.currIndiDetail.fieldList});
|
|
|
|
+ return tempDom;
|
|
|
|
+ }},
|
|
|
|
+ {name:'subAreaType', index:'subAreaType', width:10, hidden:true},
|
|
|
|
+ {name:'areaAddSub', index:'areaAddSub', width:10, hidden:true},
|
|
|
|
+ {name:'areaAddSubDown', index:'areaAddSubDown', width:10, hidden:true},
|
|
|
|
+ {name:'areaAddSubUp', index:'areaAddSubUp', width:10, hidden:true},
|
|
|
|
+ {name:'targetAddSub', index:'targetAddSub', width:10, hidden:true},
|
|
|
|
+ {name:'targetAddSubDown', index:'targetAddSubDown', width:10, hidden:true},
|
|
|
|
+ {name:'targetAddSubUp', index:'targetAddSubUp', width:10, hidden:true}
|
|
|
|
+ );
|
|
|
|
+ if(isExistComment == 1){
|
|
|
|
+ myName.push('commentName'); // 存储指标评语名称字段
|
|
|
|
+ myModel.push({name:'commentName', index:'commentName', width:10, hidden:true});
|
|
|
|
+ }
|
|
|
|
+ // 组装数据
|
|
|
|
+ var myData = that._getMyData(indicator,scoreOrRate,area,tabIndex,msgdata,fieldList,areaNeedScore);
|
|
|
|
+ tabData = myData.tabData;
|
|
|
|
+ scoreTipsText = myData.scoreTipsText;
|
|
|
|
+
|
|
|
|
+ // var showFieldWidth = 0;
|
|
|
|
+ // myModel.forEach(function(item){
|
|
|
|
+ // if(!item.hidden){
|
|
|
|
+ // showFieldWidth += item.width;
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // var shrinkToFit = showFieldWidth < $('.scoretabwrap').eq(0).width() ? true : false;
|
|
|
|
+
|
|
|
|
+ var showFieldWidth = 0;
|
|
|
|
+ var show_count = 0,text_count = 0;
|
|
|
|
+ var tabwidth = $('.scoretabwrap').eq(0).width();
|
|
|
|
+ myModel.forEach(function(item){
|
|
|
|
+ if(!item.hidden){
|
|
|
|
+ showFieldWidth += item.width;
|
|
|
|
+ show_count ++; // 默认显示字段个数
|
|
|
|
+ if(item.edittype == "wafTextArea" || (item.edittype == "shrtext" && item.fieldType == 'Text')){
|
|
|
|
+ text_count ++ ; // 文本类型字段个数
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ var shrinkToFit = showFieldWidth < tabwidth ? true : false;
|
|
|
|
+ if(shrinkToFit){
|
|
|
|
+ var w1 = tabwidth - showFieldWidth - 34 - show_count * 6; // 可按比例分配宽度 34:复选框列 6:单元格左右内边距
|
|
|
|
+ var w2 = (w1/text_count).toFixed(2) - 6; // 每个长文本可分配的宽度
|
|
|
|
+ if(w1 != 0){
|
|
|
|
+ myModel.forEach(function(item, i){
|
|
|
|
+ if(!item.hidden && item.name != 'nodeInfoList' && (item.edittype == "wafTextArea" || (item.edittype == "shrtext" && item.fieldType == 'Text'))){
|
|
|
|
+ myModel[i].width = myModel[i].width + Number(w2); // 新列宽
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return {
|
|
|
|
+ tabData: tabData,
|
|
|
|
+ myName: myName,
|
|
|
|
+ myModel: myModel,
|
|
|
|
+ shrinkToFit: that.getShrinkToFit(shrinkToFit),
|
|
|
|
+ scoreTipsText: scoreTipsText
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+});
|