修改 企业标准多选

This commit is contained in:
baoyu
2024-05-29 17:55:46 +08:00
parent 7b836df855
commit c7b88750ea
@@ -1994,7 +1994,7 @@
</el-drawer>
<!-- 组件树-->
<tree-select-new
:multiple="false"
:multiple="true"
:lazy="false"
:modalShowFlag="modalShowFlag1"
:drawerTitle="drawerTitle1"
@@ -2116,6 +2116,7 @@ export default {
props: {},
data () {
return {
editCheckd:[],
rootNode: '', // 左侧树当前选中的数据的根节点(企业标准,技术体系)
systemCategoryId: [], // 表格选中数据的体系标准Id
opinionsStand: [
@@ -3700,15 +3701,14 @@ export default {
// 节点选中状态发生变化时的回调,当选中另一个后,当前的的节点状态变化也会触发这个事件
handleCheckChange (item, checked, self) {
if(checked) {
console.log(item)
this.editCheckd = item.id
this.editCheckd.push(item.id)
this.NewTreeType = item.treeType
this.$refs.menuTree.setCheckedKeys([ item.id ]);
// this.$refs.menuTree.setCheckedKeys([ item.id ]);
// this.nodeClick(item)
}else{
if(this.editCheckd === item.id) {
this.$refs.menuTree.setCheckedKeys([ item.id ]);
}
// if(this.editCheckd === item.id) {
// this.$refs.menuTree.setCheckedKeys([ item.id ]);
// }
}
},
// 移动标准
@@ -3729,7 +3729,7 @@ export default {
this.$nextTick(() => {
this.$refs.menuTree.setCheckedKeys(checkedObj);
})
this.editCheckd = ''
this.editCheckd = []
this.mobileModal = false
},
// 移动标准提交
@@ -3738,7 +3738,7 @@ export default {
const search = {}
// 取最外层目录id
search.oldMenuId = this.selectSarMenu.id
search.menuId = this.editCheckd
search.menuId = this.editCheckd.join(',')
search.treeType = this.selectSarMenu.treeType
// search.oldTreeType = this.selectSarMenu.treeType
// search.NewTreeType = this.NewTreeType
@@ -3760,7 +3760,7 @@ export default {
this.$nextTick(() => {
this.$refs.menuTree.setCheckedKeys(checkedObj);
})
this.editCheckd = ''
this.editCheckd = []
this.mobileModal = false
this.getBussionStandTable()
}, e => {
@@ -3771,12 +3771,12 @@ export default {
const checkedObj = []
const search = {}
// 取最外层目录id
search.newStandCategoryId = this.editCheckd
search.newStandCategoryId = this.editCheckd.join(',')
search.standIds = []
for (let i = 0; i < this.selectedList.length; i++) {
search.standIds.push(this.selectedList[i])
}
if(search.newStandCategoryId == '' || search.newStandCategoryId == null || search.newStandCategoryId == undefined) {
if(search.newStandCategoryId == '' || search.newStandCategoryId == null || search.newStandCategoryId == undefined || search.newStandCategoryId == []) {
this.$message.error('请至少选择一个节点')
}else{
search.standIds = search.standIds.join(',')