|
@@ -100,6 +100,13 @@
|
|
|
:disabled="from.id == ''"
|
|
|
>关联WBS并创建元素</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
+ @click="addtoElement()"
|
|
|
+ :disabled="from.id == ''"
|
|
|
+ >添加到元素库</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div
|
|
|
class="el-icon-plus"
|
|
@@ -610,6 +617,52 @@
|
|
|
>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <!-- 添加到元素库 -->
|
|
|
+ <el-dialog
|
|
|
+ title="保存元素表"
|
|
|
+ class="excelBox"
|
|
|
+ :visible.sync="eleDialog"
|
|
|
+ modal-append-to-body
|
|
|
+ append-to-body
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <div>
|
|
|
+ <div class="flexBetween martop20">
|
|
|
+ <el-input
|
|
|
+ v-model="eleForm.nodeName"
|
|
|
+ placeholder="请输入表名"
|
|
|
+ ></el-input>
|
|
|
+ <el-select
|
|
|
+ class="marleft10"
|
|
|
+ v-model="eleForm.tableType"
|
|
|
+ placeholder="请选择表类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in exceltypeData"
|
|
|
+ :key="index"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ class="martop20"
|
|
|
+ v-model="eleForm.tableOwner"
|
|
|
+ placeholder="请选择所属方"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in ownerTypeList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictKey"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="eleDialog = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitEleDialog">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -726,6 +779,8 @@ export default {
|
|
|
nodeIds:[],
|
|
|
nodeIds1:[],
|
|
|
selectNodeIds:[],
|
|
|
+ eleDialog:false,//保存到元素库弹窗
|
|
|
+ eleForm:{}
|
|
|
|
|
|
};
|
|
|
},
|
|
@@ -805,11 +860,11 @@ export default {
|
|
|
this.selectNodeIds=this.uniqueArr(this.nodeIds,this.nodeIds1 )
|
|
|
this.$refs.treeall1.setCheckedKeys(this.selectNodeIds)
|
|
|
console.log(this.selectNodeIds,'this.selectNodeIds');
|
|
|
- this.GLExcelFromtag1 = true;
|
|
|
- this.GLExcelFromtag = false;
|
|
|
- this.treeloading1 = true;
|
|
|
- console.log(this.selectedId, "selectedId");
|
|
|
- console.log(this.GLExcelFrom.name, "this.GLExcelFrom.name");
|
|
|
+ this.GLExcelFromtag1 = true;
|
|
|
+ this.GLExcelFromtag = false;
|
|
|
+ this.treeloading1 = true;
|
|
|
+ console.log(this.selectedId, "selectedId");
|
|
|
+ console.log(this.GLExcelFrom.name, "this.GLExcelFrom.name");
|
|
|
// tabLazytreeAll({
|
|
|
// modeId: this.GLExcelFrom.name,
|
|
|
// name: "",
|
|
@@ -846,10 +901,13 @@ export default {
|
|
|
}
|
|
|
this.addElement = false;
|
|
|
this.addElementForm.nodeName = data.name;
|
|
|
+ this.eleForm.nodeName=data.name
|
|
|
if (data.tabType > 0 && data.tabType < 100) {
|
|
|
this.addElementForm.tableType = data.tabType + "";
|
|
|
+ this.eleForm.tableType= data.tabType + ""
|
|
|
} else {
|
|
|
this.addElementForm.tableType = "";
|
|
|
+ this.eleForm.tableType = "";
|
|
|
}
|
|
|
|
|
|
this.from.id = data.id;
|
|
@@ -986,8 +1044,42 @@ export default {
|
|
|
|
|
|
this.addTableData = [];
|
|
|
},
|
|
|
+ addtoElement(){
|
|
|
+ console.log('添加到元素库');
|
|
|
+ console.log(this.tableData,'this.tableData');
|
|
|
+ this.eleDialog=true;
|
|
|
+
|
|
|
+ },
|
|
|
+ submitEleDialog(){
|
|
|
+ console.log(this.eleForm,'addElementForm');
|
|
|
+
|
|
|
+ if (
|
|
|
+ this.eleForm.nodeName &&
|
|
|
+ this.eleForm.tableType &&
|
|
|
+ this.eleForm.tableOwner
|
|
|
+ ) {
|
|
|
+
|
|
|
+
|
|
|
+ this.submitExcelRelationWbsTreeAndElement({
|
|
|
+ nodeName: this.eleForm.nodeName,
|
|
|
+ tableType: this.eleForm.tableType,
|
|
|
+ tableOwner: this.eleForm.tableOwner,
|
|
|
+ elementList: this.tableData,
|
|
|
+ excelTabId: this.from.id,
|
|
|
+ submitStatus: 3,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "请填写和选择新增的表名,表类型,表所属方",
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ this.eleDialog=false
|
|
|
+ },
|
|
|
AssociatedPublicClose() {
|
|
|
console.log("AssociatedPublicClose");
|
|
|
+
|
|
|
//关联公共WBS模板关闭事件
|
|
|
// this.addElementForm = {
|
|
|
// id: "",
|