|
@@ -553,7 +553,7 @@
|
|
|
>
|
|
|
<div class="flex">
|
|
|
<el-input v-model="nodeDetail.nodeName"></el-input>
|
|
|
- <!-- <el-button class="mg-l-10" type="primary">添加别名</el-button> -->
|
|
|
+ <el-button class="mg-l-10" type="primary" @click="aliasShow">添加别名</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="上级节点">
|
|
@@ -1557,6 +1557,36 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog
|
|
|
+ title="别名"
|
|
|
+ :visible.sync="aliasVisible"
|
|
|
+ width="600px"
|
|
|
+ append-to-body
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div class="flex">
|
|
|
+ <el-input v-model="aliasInput" placeholder="请输入内容"></el-input>
|
|
|
+ <el-button class="mg-l-20" type="primary" @click="addAlias">添加</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="flex" style="flex-wrap:wrap">
|
|
|
+ <div class="mg-t-10" v-for="(tag,index) in aliasArr" :key="index">
|
|
|
+ <el-tag closable @close="delAlias(index)">
|
|
|
+ {{tag}}
|
|
|
+ </el-tag>
|
|
|
+ <span v-if="index != aliasArr.length-1">、</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span
|
|
|
+ slot="footer"
|
|
|
+ class="dialog-footer"
|
|
|
+ >
|
|
|
+ <el-button @click="aliasVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="saveAliasHandle">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
@@ -1565,7 +1595,7 @@ import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
|
import {
|
|
|
getLazytree, getDetail, update, selectByNodeTable, getAlltree,
|
|
|
saveFormAndElement, selectFormElements, removeTableById, findWbsTreeSameLevel, wbsTreeSort, findWbsTreeTableSameLevel, wbsTreeTableSort, parameters, saveOrUpdateBatch, keymap, importwbsTreeFormBatch, exportBatchTemplate, updateBatchNodeTableInfo,
|
|
|
- importWbsTree, exportTemplate, remove as removeTreeNode
|
|
|
+ importWbsTree, exportTemplate, remove as removeTreeNode,submitFullName
|
|
|
} from "@/api/manager/wbstree";
|
|
|
import {
|
|
|
saveElement, remove as removeElement, updateBatchElements, getTemplate,
|
|
@@ -1709,6 +1739,10 @@ export default {
|
|
|
|
|
|
defaultExpandedKeys:[],
|
|
|
expandName:this.$route.fullPath,
|
|
|
+
|
|
|
+ aliasVisible:false,//别名
|
|
|
+ aliasInput:'',
|
|
|
+ aliasArr:[],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -2817,7 +2851,47 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.setLeftType(4,this.curTreeData,this.curTreeNode);
|
|
|
+ },
|
|
|
+
|
|
|
+ //显示别名弹窗
|
|
|
+ aliasShow(){
|
|
|
+ this.aliasVisible = true;
|
|
|
+ if(this.nodeDetail.fullName){
|
|
|
+ this.aliasArr = this.nodeDetail.fullName.split(',');
|
|
|
+ }
|
|
|
+ this.aliasInput = '';
|
|
|
+ },
|
|
|
+
|
|
|
+ addAlias(){
|
|
|
+ if(this.aliasInput){
|
|
|
+ this.aliasArr.push(this.aliasInput);
|
|
|
+ this.aliasInput = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ delAlias(index){
|
|
|
+ this.aliasArr.splice(index,1);
|
|
|
+ },
|
|
|
+
|
|
|
+ saveAliasHandle(){
|
|
|
+ this.nodeDetail.fullName = this.aliasArr.join(',');
|
|
|
+ if (this.editType == 1) {
|
|
|
+ //新增
|
|
|
+ this.aliasVisible = false;
|
|
|
+ } else if (this.editType == 2) {
|
|
|
+ //编辑 公有
|
|
|
+ submitFullName(
|
|
|
+ this.nodeDetail.id,this.nodeDetail.fullName
|
|
|
+ ).then(()=>{
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '保存成功',
|
|
|
+ })
|
|
|
+ this.aliasVisible = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
components: {
|
|
|
ManualSorting,
|