修改 企业标准 技术体系树的配置标准/移除标准/移动标准
This commit is contained in:
+171
-15
@@ -2116,6 +2116,8 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
rootNode: '', // 左侧树当前选中的数据的根节点(企业标准,技术体系)
|
||||||
|
systemCategoryId: [], // 表格选中数据的体系标准Id
|
||||||
opinionsStand: [
|
opinionsStand: [
|
||||||
{ value: 'buss1_1', label: '技术标准-制定中' },
|
{ value: 'buss1_1', label: '技术标准-制定中' },
|
||||||
{ value: 'buss1_2', label: '技术标准-修订中' },
|
{ value: 'buss1_2', label: '技术标准-修订中' },
|
||||||
@@ -2926,6 +2928,18 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 递归判断左侧树当前选中节点的根节点
|
||||||
|
findRootNode (node) {
|
||||||
|
const parentNode = this.$refs.tree.getNode(node)?.parent.data
|
||||||
|
if (!parentNode || Array.isArray(parentNode)) {
|
||||||
|
return node.menuName
|
||||||
|
}
|
||||||
|
if (parentNode.menuName === '企业标准' || parentNode.menuName === '技术体系') {
|
||||||
|
return parentNode.menuName
|
||||||
|
}else {
|
||||||
|
return this.findRootNode(parentNode)
|
||||||
|
}
|
||||||
|
},
|
||||||
filterReviseStatus (data) {
|
filterReviseStatus (data) {
|
||||||
if(data) {
|
if(data) {
|
||||||
if(data.indexOf('buss1_') !== -1) {
|
if(data.indexOf('buss1_') !== -1) {
|
||||||
@@ -3443,14 +3457,22 @@ export default {
|
|||||||
// 查询二级菜单
|
// 查询二级菜单
|
||||||
selectMenuListNew1 () {
|
selectMenuListNew1 () {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.$http.get('sarResource/ts-resource/getListStandLimitData', {
|
if (this.rootNode === '技术体系'){
|
||||||
sorDivide: 'BUSINESS_STAND',
|
this.$http.get('lawss/sarMenuStandard/getListStand', { dicId: '9m4qqqaansxmox5e82zm' }, {
|
||||||
userId: this.$store.getters.userInfo.userId
|
_this: this
|
||||||
}, {
|
}, res => {
|
||||||
_this: this
|
this.treeList1 = res.data
|
||||||
}, res => {
|
})
|
||||||
this.treeList1 = res.data
|
}else {
|
||||||
})
|
this.$http.get('sarResource/ts-resource/getListStandLimitData', {
|
||||||
|
sorDivide: 'BUSINESS_STAND',
|
||||||
|
userId: this.$store.getters.userInfo.userId
|
||||||
|
}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
this.treeList1 = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectMenuList () {
|
selectMenuList () {
|
||||||
@@ -3711,7 +3733,7 @@ export default {
|
|||||||
this.mobileModal = false
|
this.mobileModal = false
|
||||||
},
|
},
|
||||||
// 移动标准提交
|
// 移动标准提交
|
||||||
mobileStandardBt () {
|
mobileStandardBtOfBusinessStand () {
|
||||||
const checkedObj = []
|
const checkedObj = []
|
||||||
const search = {}
|
const search = {}
|
||||||
// 取最外层目录id
|
// 取最外层目录id
|
||||||
@@ -3730,7 +3752,11 @@ export default {
|
|||||||
this.$http.putData('lawss/sarBussStandMenu/moveStandInfo', search, {
|
this.$http.putData('lawss/sarBussStandMenu/moveStandInfo', search, {
|
||||||
_this: this
|
_this: this
|
||||||
}, res => {
|
}, res => {
|
||||||
// this.$Message.success('取消配置成功!')
|
if(res.ok){
|
||||||
|
this.$message.success(res.message)
|
||||||
|
}else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.menuTree.setCheckedKeys(checkedObj);
|
this.$refs.menuTree.setCheckedKeys(checkedObj);
|
||||||
})
|
})
|
||||||
@@ -3741,6 +3767,44 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mobileStandardBtOfTechnicalSystem () {
|
||||||
|
const checkedObj = []
|
||||||
|
const search = {}
|
||||||
|
// 取最外层目录id
|
||||||
|
search.newStandCategoryId = this.editCheckd
|
||||||
|
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) {
|
||||||
|
this.$message.error('请至少选择一个节点')
|
||||||
|
}else{
|
||||||
|
search.standIds = search.standIds.join(',')
|
||||||
|
this.$http.get('lawss/sarBussionessStand/moveStandCategory', search, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
if(res.ok){
|
||||||
|
this.$message.success(res.message)
|
||||||
|
}else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.menuTree.setCheckedKeys(checkedObj);
|
||||||
|
})
|
||||||
|
this.editCheckd = ''
|
||||||
|
this.mobileModal = false
|
||||||
|
this.getBussionStandTable()
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mobileStandardBt () {
|
||||||
|
if (this.rootNode === '企业标准') {
|
||||||
|
this.mobileStandardBtOfBusinessStand()
|
||||||
|
}else {
|
||||||
|
this.mobileStandardBtOfTechnicalSystem()
|
||||||
|
}
|
||||||
|
},
|
||||||
// 树点击
|
// 树点击
|
||||||
isTreeOk (checkedList) {
|
isTreeOk (checkedList) {
|
||||||
this.shareStandardSelect = []
|
this.shareStandardSelect = []
|
||||||
@@ -3967,8 +4031,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 提交配置搜索项
|
saveConfigStandOfBusinessStand () {
|
||||||
saveConfigStand () {
|
|
||||||
const search = {}
|
const search = {}
|
||||||
search.menuId = this.selectSarMenu.id
|
search.menuId = this.selectSarMenu.id
|
||||||
search.menuName = this.selectSarMenu.menuName
|
search.menuName = this.selectSarMenu.menuName
|
||||||
@@ -3999,6 +4062,44 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
saveConfigStandOfTechnicalSystem () {
|
||||||
|
const search = {}
|
||||||
|
search.standCategoryId = this.sarBussionessSearch.menuId
|
||||||
|
if (this.selectConfigStandList.length === 0) {
|
||||||
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: '请至少选择一条标准',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
search.standIds = []
|
||||||
|
for (let i = 0; i < this.selectConfigStandList.length; i++) {
|
||||||
|
search.standIds.push(this.selectConfigStandList[i].id)
|
||||||
|
}
|
||||||
|
search.standIds = search.standIds.join(',')
|
||||||
|
this.$http.get('lawss/sarBussionessStand/configurationStandCategory', search, {
|
||||||
|
_this: this,
|
||||||
|
loading: 'isSubmit'
|
||||||
|
}, res => {
|
||||||
|
if (res.ok) {
|
||||||
|
this.$message.success('配置成功')
|
||||||
|
this.configStandFlag = false
|
||||||
|
this.getBussionStandTable(this.tableFlag)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 提交配置搜索项
|
||||||
|
saveConfigStand () {
|
||||||
|
if (this.rootNode === '企业标准') {
|
||||||
|
this.saveConfigStandOfBusinessStand()
|
||||||
|
}else {
|
||||||
|
this.saveConfigStandOfTechnicalSystem()
|
||||||
|
}
|
||||||
|
},
|
||||||
// 配置标准-表格排序
|
// 配置标准-表格排序
|
||||||
sortChangeConfig (sortObj) {
|
sortChangeConfig (sortObj) {
|
||||||
if (sortObj.column.order !== 'normal') {
|
if (sortObj.column.order !== 'normal') {
|
||||||
@@ -4867,8 +4968,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 表对应标准移除分类到-----用的这个方法
|
deleteEnterStandFromKindOfBusinessStand (){
|
||||||
deleteEnterStandFromKind (flag, item) {
|
|
||||||
this.getMenu().then(boolean => {
|
this.getMenu().then(boolean => {
|
||||||
if (boolean) {
|
if (boolean) {
|
||||||
if (this.selectSarMenu.parentId == null || this.selectSarMenu.parentId === '') {
|
if (this.selectSarMenu.parentId == null || this.selectSarMenu.parentId === '') {
|
||||||
@@ -4881,7 +4981,6 @@ export default {
|
|||||||
const search = {}
|
const search = {}
|
||||||
// 取最外层目录id
|
// 取最外层目录id
|
||||||
search.menuId = this.selectSarMenu.id
|
search.menuId = this.selectSarMenu.id
|
||||||
console.log(this.selectSarMenu)
|
|
||||||
search.treeType = this.selectSarMenu.treeType
|
search.treeType = this.selectSarMenu.treeType
|
||||||
// search.menuId = this.removeOneId
|
// search.menuId = this.removeOneId
|
||||||
search.idlist = []
|
search.idlist = []
|
||||||
@@ -4917,6 +5016,60 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
deleteEnterStandFromKindOfTechnicalSystem (){
|
||||||
|
this.getMenu().then(boolean => {
|
||||||
|
if (boolean) {
|
||||||
|
if (this.selectSarMenu.parentId == null || this.selectSarMenu.parentId === '') {
|
||||||
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: '请选择二级及以下目录',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const search = {}
|
||||||
|
search.searchCategoryId = this.sarBussionessSearch.menuId
|
||||||
|
search.standIds = []
|
||||||
|
if (this.selectedList.length === 0) {
|
||||||
|
this.$message.error('请先选择要移除的数据!')
|
||||||
|
} else {
|
||||||
|
this.$confirm('确认移除选中数据?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
confirmButtonClass: 'common-button-primary',
|
||||||
|
roundButton: true
|
||||||
|
}).then(() => {
|
||||||
|
search.standIds = []
|
||||||
|
for (let i = 0; i < this.selectedList.length; i++) {
|
||||||
|
search.standIds.push(this.selectedList[i])
|
||||||
|
}
|
||||||
|
search.standIds = search.standIds.join(',')
|
||||||
|
this.$http.get('lawss/sarBussionessStand/removeStandCategory', search, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
if(res.ok){
|
||||||
|
this.$message.success(res.message)
|
||||||
|
}else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
this.getBussionStandTable(this.tableFlag)
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表对应标准移除分类到-----用的这个方法
|
||||||
|
deleteEnterStandFromKind (flag, item) {
|
||||||
|
if(this.rootNode === '企业标准') {
|
||||||
|
this.deleteEnterStandFromKindOfBusinessStand()
|
||||||
|
}else {
|
||||||
|
this.deleteEnterStandFromKindOfTechnicalSystem()
|
||||||
|
}
|
||||||
|
},
|
||||||
// 模板下载
|
// 模板下载
|
||||||
uploadImportModal (flag) {
|
uploadImportModal (flag) {
|
||||||
window.open('/api/lawss/sarBussionessStand/exportTemplate')
|
window.open('/api/lawss/sarBussionessStand/exportTemplate')
|
||||||
@@ -5024,6 +5177,7 @@ export default {
|
|||||||
return data.menuName.indexOf(value) !== -1;
|
return data.menuName.indexOf(value) !== -1;
|
||||||
},
|
},
|
||||||
treeClick (treeNode) {
|
treeClick (treeNode) {
|
||||||
|
this.rootNode = this.findRootNode(treeNode)
|
||||||
this.selectSarMenu = treeNode // 记录当前选中的二级菜单
|
this.selectSarMenu = treeNode // 记录当前选中的二级菜单
|
||||||
this.sarBussionessSearch.menuId = treeNode.id
|
this.sarBussionessSearch.menuId = treeNode.id
|
||||||
this.sarBussionessSearch.menuId = treeNode.id // 将当前二级菜单的id传回后台做标准的条件查询
|
this.sarBussionessSearch.menuId = treeNode.id // 将当前二级菜单的id传回后台做标准的条件查询
|
||||||
@@ -5380,8 +5534,10 @@ export default {
|
|||||||
standSelectChange (data) {
|
standSelectChange (data) {
|
||||||
this.ocrList = data
|
this.ocrList = data
|
||||||
this.selectedList = []
|
this.selectedList = []
|
||||||
|
this.systemCategoryId = []
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
this.selectedList.push(data[i].id)
|
this.selectedList.push(data[i].id)
|
||||||
|
this.systemCategoryId.push(data[i].txlbId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 点击表格行--跳转详情页
|
// 点击表格行--跳转详情页
|
||||||
|
|||||||
Reference in New Issue
Block a user