|
@@ -57,6 +57,12 @@
|
|
style="fontSize:18px;"
|
|
style="fontSize:18px;"
|
|
v-if="node.level!=1"
|
|
v-if="node.level!=1"
|
|
></i>
|
|
></i>
|
|
|
|
+ <i
|
|
|
|
+ @click.stop='paixuMD(data)'
|
|
|
|
+ class="el-icon-sort marleft5"
|
|
|
|
+ style="fontSize:18px;"
|
|
|
|
+ v-if="node.level!=1"
|
|
|
|
+ ></i>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</el-tree>
|
|
</el-tree>
|
|
@@ -100,6 +106,12 @@
|
|
style="fontSize:18px;"
|
|
style="fontSize:18px;"
|
|
v-if="node.level!=1"
|
|
v-if="node.level!=1"
|
|
></i>
|
|
></i>
|
|
|
|
+ <i
|
|
|
|
+ @click.stop='paixuMD(data)'
|
|
|
|
+ class="el-icon-sort marleft5"
|
|
|
|
+ style="fontSize:18px;"
|
|
|
|
+ v-if="node.level!=1"
|
|
|
|
+ ></i>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</el-tree>
|
|
</el-tree>
|
|
@@ -357,14 +369,43 @@
|
|
>确 定</el-button>
|
|
>确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+
|
|
|
|
+ <!-- wbs树排序弹框 -->
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="调整排序"
|
|
|
|
+ :visible="sortTag"
|
|
|
|
+ width="50%"
|
|
|
|
+ append-to-body
|
|
|
|
+ >
|
|
|
|
+ <ManualSorting
|
|
|
|
+ v-if="sortTag2"
|
|
|
|
+ @bianhua='bianhua()'
|
|
|
|
+ :sort='sort'
|
|
|
|
+ />
|
|
|
|
+ <span
|
|
|
|
+ slot="footer"
|
|
|
|
+ class="dialog-footer"
|
|
|
|
+ >
|
|
|
|
+ <el-button @click="sortTag=false,sortTag2=false">取 消</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="editSort()"
|
|
|
|
+ >确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
</basic-container>
|
|
</basic-container>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { archiveTreeInit, lazyTree, dictionary, remove, archiveTreeSave, archiveTreeUpdate, archiveTreeDetail, archiveTreetree, submitDisplayConfigTree } from "@/api/manager/archivetree";
|
|
|
|
|
|
+import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
|
|
+import { archiveTreeInit, lazyTree, dictionary, remove, archiveTreeSave, archiveTreeUpdate, archiveTreeDetail, archiveTreetree, submitDisplayConfigTree, getSameGradeNode, submitArchiveTreeSort } from "@/api/manager/archivetree";
|
|
import { getToken } from '@/util/auth';
|
|
import { getToken } from '@/util/auth';
|
|
import { roletree } from "@/api/system/role.js";
|
|
import { roletree } from "@/api/system/role.js";
|
|
export default {
|
|
export default {
|
|
|
|
+ components: {
|
|
|
|
+ ManualSorting,
|
|
|
|
+ },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
//#region 左侧树
|
|
//#region 左侧树
|
|
@@ -485,9 +526,52 @@ export default {
|
|
checkXuan: [],
|
|
checkXuan: [],
|
|
//#endregion
|
|
//#endregion
|
|
heights: '',
|
|
heights: '',
|
|
|
|
+
|
|
|
|
+ sortTag2: false,
|
|
|
|
+ sortTag: false,
|
|
|
|
+ sort: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ paixuMD (data) {
|
|
|
|
+ this.sortTag = true
|
|
|
|
+ this.sortTag2 = true
|
|
|
|
+ this.curTreeData = data;
|
|
|
|
+ this.findWbsTreeSameLevel(data.id)
|
|
|
|
+ },
|
|
|
|
+ async findWbsTreeSameLevel (parentId) {//查询当前节点的同级节点
|
|
|
|
+ const { data: res } = await getSameGradeNode({ id: parentId })
|
|
|
|
+ //console.log(res);
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.sort = res.data
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ bianhua () {
|
|
|
|
+ this.sortTag2 = false
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.sortTag2 = true
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ editSort () {//修改排序
|
|
|
|
+ let sortArr = this.sort, newArr = []
|
|
|
|
+ for (let i = 0; i < sortArr.length; i++) {
|
|
|
|
+ newArr.push({
|
|
|
|
+ id: sortArr[i].id,
|
|
|
|
+ deptName: sortArr[i].nodeName
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ this.wbsTreeSort(newArr)
|
|
|
|
+ },
|
|
|
|
+ async wbsTreeSort (newArr) {//修改排序
|
|
|
|
+ const { data: res } = await submitArchiveTreeSort(newArr)
|
|
|
|
+ //console.log(res);
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.sortTag = false
|
|
|
|
+ this.sortTag2 = false
|
|
|
|
+ //刷新页面
|
|
|
|
+ window.location.reload()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//#region 左侧树方法
|
|
//#region 左侧树方法
|
|
async loadNode (node, resolve) {
|
|
async loadNode (node, resolve) {
|
|
console.log(node);
|
|
console.log(node);
|
|
@@ -588,7 +672,7 @@ export default {
|
|
}).catch(()=>{
|
|
}).catch(()=>{
|
|
|
|
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
|
|
|
@@ -686,7 +770,7 @@ export default {
|
|
id: this.form.id,
|
|
id: this.form.id,
|
|
parentId: this.form.parentId, //上级节点id
|
|
parentId: this.form.parentId, //上级节点id
|
|
nodeName: this.form.nodeName, //节点名称
|
|
nodeName: this.form.nodeName, //节点名称
|
|
- nodeType: this.form.nodeType, // 节点类型
|
|
|
|
|
|
+ nodeType: this.form.nodeType, // 节点类型
|
|
postType: this.form.postType, //岗位类型
|
|
postType: this.form.postType, //岗位类型
|
|
isStorageNode: this.form.isStorageNode, //是否为存储节点
|
|
isStorageNode: this.form.isStorageNode, //是否为存储节点
|
|
isBuiltDrawing: this.form.isBuiltDrawing, //竣工图
|
|
isBuiltDrawing: this.form.isBuiltDrawing, //竣工图
|
|
@@ -698,7 +782,7 @@ export default {
|
|
id: this.form.id,
|
|
id: this.form.id,
|
|
parentId: this.form.parentId, //上级节点id
|
|
parentId: this.form.parentId, //上级节点id
|
|
nodeName: this.form.nodeName, //节点名称
|
|
nodeName: this.form.nodeName, //节点名称
|
|
- nodeType: this.form.nodeType, // 节点类型
|
|
|
|
|
|
+ nodeType: this.form.nodeType, // 节点类型
|
|
postType: this.form.postType, //岗位类型
|
|
postType: this.form.postType, //岗位类型
|
|
isStorageNode: this.form.isStorageNode, //是否为存储节点
|
|
isStorageNode: this.form.isStorageNode, //是否为存储节点
|
|
isBuiltDrawing: this.form.isBuiltDrawing, //竣工图
|
|
isBuiltDrawing: this.form.isBuiltDrawing, //竣工图
|
|
@@ -710,7 +794,7 @@ export default {
|
|
id: this.form.id,
|
|
id: this.form.id,
|
|
parentId: this.form.parentId, //上级节点id
|
|
parentId: this.form.parentId, //上级节点id
|
|
nodeName: this.form.nodeName, //节点名称
|
|
nodeName: this.form.nodeName, //节点名称
|
|
- nodeType: this.form.nodeType, // 节点类型
|
|
|
|
|
|
+ nodeType: this.form.nodeType, // 节点类型
|
|
postType: this.form.postType, //岗位类型
|
|
postType: this.form.postType, //岗位类型
|
|
isStorageNode: this.form.isStorageNode, //是否为存储节点
|
|
isStorageNode: this.form.isStorageNode, //是否为存储节点
|
|
})
|
|
})
|
|
@@ -721,7 +805,7 @@ export default {
|
|
id: this.form.id,
|
|
id: this.form.id,
|
|
parentId: this.form.parentId, //上级节点id
|
|
parentId: this.form.parentId, //上级节点id
|
|
nodeName: this.form.nodeName, //节点名称
|
|
nodeName: this.form.nodeName, //节点名称
|
|
- nodeType: this.form.nodeType, // 节点类型
|
|
|
|
|
|
+ nodeType: this.form.nodeType, // 节点类型
|
|
associationType: this.form.associationType, //关联类型
|
|
associationType: this.form.associationType, //关联类型
|
|
majorDataType: this.form.majorDataType, //内业资料类型
|
|
majorDataType: this.form.majorDataType, //内业资料类型
|
|
displayHierarchy: this.form.displayHierarchy, //显示层级
|
|
displayHierarchy: this.form.displayHierarchy, //显示层级
|
|
@@ -731,7 +815,7 @@ export default {
|
|
id: this.form.id,
|
|
id: this.form.id,
|
|
parentId: this.form.parentId, //上级节点id
|
|
parentId: this.form.parentId, //上级节点id
|
|
nodeName: this.form.nodeName, //节点名称
|
|
nodeName: this.form.nodeName, //节点名称
|
|
- nodeType: this.form.nodeType, // 节点类型
|
|
|
|
|
|
+ nodeType: this.form.nodeType, // 节点类型
|
|
associationType: this.form.associationType, //关联类型
|
|
associationType: this.form.associationType, //关联类型
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -908,4 +992,4 @@ export default {
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
padding: 15px 10px;
|
|
padding: 15px 10px;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|