|
@@ -9,7 +9,8 @@ let labourCoeView = {
|
|
|
|
|
|
buildSheet: function (){
|
|
|
let me = this;
|
|
|
- me.datas = calcLabourCoes;
|
|
|
+
|
|
|
+ me.datas = projectObj.project.LabourCoe.datas !== null ? projectObj.project.LabourCoe.datas.coes : [];
|
|
|
|
|
|
if (me.spread) {
|
|
|
me.spread.destroy();
|
|
@@ -73,8 +74,29 @@ let labourCoeView = {
|
|
|
};
|
|
|
},
|
|
|
|
|
|
+ init(){
|
|
|
+ let me = this;
|
|
|
+
|
|
|
+ function getStdLabourCoeFilesHtml(stdLabourCoeLibs) {
|
|
|
+ let result = '<option value="">请选择人工系数标准库</option>';
|
|
|
+ if (stdLabourCoeLibs.length <= 0) {
|
|
|
+ return result;
|
|
|
+ };
|
|
|
+
|
|
|
+ for (let lib of stdLabourCoeLibs){
|
|
|
+ result += '<option value="'+ lib.id +'">'+ lib.name +'</option>';
|
|
|
+ };
|
|
|
+
|
|
|
+ return result;
|
|
|
+ };
|
|
|
+
|
|
|
+ let stdLCHtml = getStdLabourCoeFilesHtml(projectInfoObj.projectInfo.engineeringInfo.artificial_lib);
|
|
|
+ $("#std_labour_coe_files").html(stdLCHtml);
|
|
|
+ },
|
|
|
+
|
|
|
showData(){
|
|
|
let me = this;
|
|
|
+ me.init();
|
|
|
me.buildSheet();
|
|
|
me.loadData();
|
|
|
}
|