|
@@ -272,7 +272,7 @@
|
|
|
@click.stop="() => viewConfig(data)">
|
|
|
查看配置
|
|
|
</el-button>
|
|
|
-
|
|
|
+ <el-link @click.stop="removeArchive(data)" type="danger" :underline="false" class="marleft10"><i class="el-icon-delete"></i></el-link>
|
|
|
</span>
|
|
|
</div>
|
|
|
</el-tree>
|
|
@@ -625,7 +625,9 @@
|
|
|
append-to-body
|
|
|
>
|
|
|
<el-checkbox-group v-model="checkList">
|
|
|
- <el-checkbox :label="node.id" v-for="node in nodesList" :key="node.id" style="margin-bottom:10px">{{node.pathName}}</el-checkbox><br/>
|
|
|
+ <div v-for="node in nodesList" :key="node.id">
|
|
|
+ <el-checkbox :label="node.id" style="margin-bottom:10px">{{node.pathName}}</el-checkbox>
|
|
|
+ </div>
|
|
|
</el-checkbox-group>
|
|
|
<span
|
|
|
slot="footer"
|
|
@@ -674,12 +676,20 @@
|
|
|
append-to-body
|
|
|
>
|
|
|
<div v-if="configInfo && configInfo.type">
|
|
|
- <div>
|
|
|
+ <div class="config-type-name">
|
|
|
<span>配置类别:</span>
|
|
|
<span v-if="configInfo.type == 1">最高并卷层级</span>
|
|
|
<span v-if="configInfo.type == 2">分类并卷</span>
|
|
|
<span v-if="configInfo.type == 3">独立组卷</span>
|
|
|
</div>
|
|
|
+ <template v-if="configInfo.type !== 2">
|
|
|
+ <div class="config-allname">
|
|
|
+ {{configInfo.data.allName}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-tree :data="configInfo.data.tree" :props="{label: 'nodeName'}" show-checkbox :check-strictly="true" :default-checked-keys="checkedKeys" :default-expanded-keys="checkedKeys" node-key="id" ref="configtree" class="config-allname"></el-tree>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<div style="text-align: center;font-size: 22px;" v-else>
|
|
|
该节点尚未配置
|
|
@@ -689,11 +699,11 @@
|
|
|
slot="footer"
|
|
|
class="dialog-footer"
|
|
|
>
|
|
|
- <el-button @click="configVisible=false">取 消</el-button>
|
|
|
- <el-button
|
|
|
+ <el-button @click="configVisible=false">取消查看</el-button>
|
|
|
+ <el-button v-if="configInfo && configInfo.type == 2"
|
|
|
type="primary"
|
|
|
- @click="editSort()"
|
|
|
- >确 定</el-button>
|
|
|
+ @click="changeConfig"
|
|
|
+ >确认修改配置</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -702,7 +712,7 @@
|
|
|
|
|
|
<script>
|
|
|
import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
|
-import { archiveTreeInit, lazyTree, dictionary, remove, archiveTreeSave, archiveTreeUpdate, archiveTreeDetail, archiveTreetree, submitDisplayConfigTree, getSameGradeNode, submitArchiveTreeSort,saveArchiveAutoRule,getArchiveAutoRule } from "@/api/manager/archivetree";
|
|
|
+import { archiveTreeInit, lazyTree, dictionary, remove, archiveTreeSave, archiveTreeUpdate, archiveTreeDetail, archiveTreetree, submitDisplayConfigTree, getSameGradeNode, submitArchiveTreeSort,saveArchiveAutoRule,getArchiveAutoRule,updateArchiveAutoRule,removeArchiveAutoRule} from "@/api/manager/archivetree";
|
|
|
import {getWbsList} from "@/api/manager/wbsinfo";
|
|
|
import { getToken } from '@/util/auth';
|
|
|
import { roletree } from "@/api/system/role.js";
|
|
@@ -969,6 +979,7 @@ export default {
|
|
|
nodesList:[],
|
|
|
|
|
|
configInfo:null,
|
|
|
+ checkedKeys:[],//分类并卷 回显 勾选数组
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -1040,11 +1051,14 @@ export default {
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ let ids = [];
|
|
|
nodes.forEach((element)=>{
|
|
|
element.pathName = this.getTreeNodePath(element,'settree')
|
|
|
+ ids.push(element.id);
|
|
|
})
|
|
|
//console.log(nodes)
|
|
|
- this.checkList = [];
|
|
|
+ this.checkList = ids;
|
|
|
this.nodesList = nodes;
|
|
|
this.highVisible=true;
|
|
|
return true;
|
|
@@ -1067,6 +1081,7 @@ export default {
|
|
|
type:2,
|
|
|
data:res.data
|
|
|
}
|
|
|
+ this.checkedKeys = res.data.selectNodeIds.split(',');
|
|
|
}
|
|
|
this.configVisible=true
|
|
|
}
|
|
@@ -1630,6 +1645,46 @@ export default {
|
|
|
})
|
|
|
this.highVisible = false;
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ //立卷规则修改
|
|
|
+ async changeConfig(){
|
|
|
+ let keys = this.$refs.configtree.getCheckedKeys(true);
|
|
|
+ const { data: res } = await updateArchiveAutoRule({
|
|
|
+ archiveAutoType:2,//最高1 分类2 独立3
|
|
|
+ archiveAutoGroupId:this.configInfo.data.archiveAutoGroupId,
|
|
|
+ selectNodeIds:keys.join(','),//鼠标选择的节点ID(只要鼠标选择的节点,选择节点的下级子节点那种不要),逗号拼接
|
|
|
+ iswbsNode:false,//是否是wbs节点 flase 不是 true 是 (先false,具体怎么区分后面再看)
|
|
|
+ })
|
|
|
+
|
|
|
+ if (res.code == 200 && res.msg == "操作成功") {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '修改成功'
|
|
|
+ })
|
|
|
+ this.configVisible = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ async removeArchive(data){
|
|
|
+ this.$confirm('此操作将永久删除配置, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ removeArchiveAutoRule({
|
|
|
+ nodeId:data.id,
|
|
|
+ iswbsNode:false,//是否是wbs节点 flase 不是 true 是 (先false,具体怎么区分后面再看)
|
|
|
+ }).then((res)=>{
|
|
|
+ //console.log(res)
|
|
|
+ if (res.data.code == 200 && res.data.msg == "操作成功") {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '修改成功'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -1677,5 +1732,10 @@ export default {
|
|
|
overflow: visible!important;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+.config-type-name{
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+.config-allname{
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
</style>
|