|
@@ -130,7 +130,7 @@ $("#use-to-current").click(function() {
|
|
|
self.attr('disabled', 'disabled');
|
|
|
let selectedNode = projectObj.mainController.tree.selected;
|
|
|
// 获取原名称
|
|
|
- const name = selectedNode.data.name.split("\r\n");
|
|
|
+ const name = selectedNode.data.name.split("\n");
|
|
|
pageCCOprObj.nameCache = name[0] !== undefined ? name[0] : "";
|
|
|
// 操作内容
|
|
|
pageCCOprObj.setCharacterBySetting(selectedNode, setting);
|
|
@@ -148,35 +148,18 @@ $("#use-to-all").click(function() {
|
|
|
if (treeNode.items === undefined || treeNode.items.length <= 0) {
|
|
|
return false;
|
|
|
}
|
|
|
- // 获取所有标准清单
|
|
|
- const stdBillsLibID = $("#stdBillsLibSelect").is(":visible") ?
|
|
|
- $("#stdBillsLibSelect").val() : (projectInfoObj.projectInfo.engineeringInfo.bill_lib[0] !== undefined ? projectInfoObj.projectInfo.engineeringInfo.bill_lib[0].id : 0);
|
|
|
- if (stdBillsLibID <= 0) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- let stdBillData = {};
|
|
|
- CommonAjax.post('/stdBillsEditor/getBills', {userId: userID, billsLibId: stdBillsLibID}, function (data) {
|
|
|
- if (!data instanceof Array || data.length <= 0) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- // 整理数据
|
|
|
- for (const tmp of data) {
|
|
|
- stdBillData[tmp.code] = tmp;
|
|
|
- }
|
|
|
- // 处理结果
|
|
|
- for (const item of treeNode.items) {
|
|
|
- if (item.data.jobContent === undefined || item.data.jobContent.length <= 0 ||
|
|
|
- item.data.itemCharacter === undefined || item.data.itemCharacter.length <= 0 || item.data.code === undefined) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- const orgCode = item.data.code.substr(0, 9);
|
|
|
- if (stdBillData[orgCode] === undefined) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- pageCCOprObj.nameCache = stdBillData[orgCode].name;
|
|
|
- pageCCOprObj.setCharacterBySetting(item, setting);
|
|
|
+ // 处理结果
|
|
|
+ for (const item of treeNode.items) {
|
|
|
+ if (item.data.jobContent === undefined || item.data.jobContent.length <= 0 ||
|
|
|
+ item.data.itemCharacter === undefined || item.data.itemCharacter.length <= 0 || item.data.code === undefined) {
|
|
|
+ continue;
|
|
|
}
|
|
|
- });
|
|
|
+ // 获取原名称
|
|
|
+ const name = item.data.name.split("\n");
|
|
|
+ pageCCOprObj.nameCache = name[0] !== undefined ? name[0] : "";
|
|
|
+
|
|
|
+ pageCCOprObj.setCharacterBySetting(item, setting);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
// 添加位置选择
|