Merge branch 'fix_foton_20240430' into 'master'

Fix foton 20240430

See merge request laws-foton-slrs/foton-laws-system-front!187
This commit is contained in:
王晓勇
2024-05-28 09:42:12 +00:00
2 changed files with 173 additions and 17 deletions
@@ -13,7 +13,7 @@
placeholder="请输入代替标准号"
clearable
/>
<i class="el-icon-circle-close closeIcon" v-if="!disabled" v-show="form.DTQBBHBUSS" @click="clearInput('DTQBBHBUSS')"></i>
<i class="el-icon-circle-close closeIcon" v-if="!disabled && form.standStatus !=='2'" v-show="form.DTQBBHBUSS" @click="clearInput('DTQBBHBUSS')"></i>
<el-button
:disabled="disabled"
type="primary"
@@ -47,7 +47,7 @@
placeholder="请输入被代替企标编号"
clearable
/>
<i class="el-icon-circle-close closeIcon" v-if="!disabled" v-show="form.BDTQBBHBUSS" @click="clearInput('BDTQBBHBUSS')"></i>
<i class="el-icon-circle-close closeIcon" v-if="!disabled && form.standStatus !=='2'" v-show="form.BDTQBBHBUSS" @click="clearInput('BDTQBBHBUSS')"></i>
<el-button
:disabled="disabled"
type="primary"
@@ -2116,6 +2116,8 @@ export default {
props: {},
data () {
return {
rootNode: '', // 左侧树当前选中的数据的根节点(企业标准,技术体系)
systemCategoryId: [], // 表格选中数据的体系标准Id
opinionsStand: [
{ value: 'buss1_1', label: '技术标准-制定中' },
{ value: 'buss1_2', label: '技术标准-修订中' },
@@ -2926,6 +2928,18 @@ export default {
},
},
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) {
if(data) {
if(data.indexOf('buss1_') !== -1) {
@@ -3443,14 +3457,22 @@ export default {
// 查询二级菜单
selectMenuListNew1 () {
return new Promise((resolve, reject) => {
this.$http.get('sarResource/ts-resource/getListStandLimitData', {
sorDivide: 'BUSINESS_STAND',
userId: this.$store.getters.userInfo.userId
}, {
_this: this
}, res => {
this.treeList1 = res.data
})
if (this.rootNode === '技术体系'){
this.$http.get('lawss/sarMenuStandard/getListStand', { dicId: '9m4qqqaansxmox5e82zm' }, {
_this: this
}, 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 () {
@@ -3711,7 +3733,7 @@ export default {
this.mobileModal = false
},
// 移动标准提交
mobileStandardBt () {
mobileStandardBtOfBusinessStand () {
const checkedObj = []
const search = {}
// 取最外层目录id
@@ -3730,7 +3752,11 @@ export default {
this.$http.putData('lawss/sarBussStandMenu/moveStandInfo', search, {
_this: this
}, res => {
// this.$Message.success('取消配置成功!')
if(res.ok){
this.$message.success(res.message)
}else {
this.$message.warning(res.message)
}
this.$nextTick(() => {
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.data)
}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) {
this.shareStandardSelect = []
@@ -3967,8 +4031,7 @@ export default {
})
}
},
// 提交配置搜索项
saveConfigStand () {
saveConfigStandOfBusinessStand () {
const search = {}
search.menuId = this.selectSarMenu.id
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) {
if (sortObj.column.order !== 'normal') {
@@ -4867,8 +4968,7 @@ export default {
}
})
},
// 表对应标准移除分类到-----用的这个方法
deleteEnterStandFromKind (flag, item) {
deleteEnterStandFromKindOfBusinessStand (){
this.getMenu().then(boolean => {
if (boolean) {
if (this.selectSarMenu.parentId == null || this.selectSarMenu.parentId === '') {
@@ -4881,7 +4981,6 @@ export default {
const search = {}
// 取最外层目录id
search.menuId = this.selectSarMenu.id
console.log(this.selectSarMenu)
search.treeType = this.selectSarMenu.treeType
// search.menuId = this.removeOneId
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.data)
}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) {
window.open('/api/lawss/sarBussionessStand/exportTemplate')
@@ -5024,6 +5177,7 @@ export default {
return data.menuName.indexOf(value) !== -1;
},
treeClick (treeNode) {
this.rootNode = this.findRootNode(treeNode)
this.selectSarMenu = treeNode // 记录当前选中的二级菜单
this.sarBussionessSearch.menuId = treeNode.id
this.sarBussionessSearch.menuId = treeNode.id // 将当前二级菜单的id传回后台做标准的条件查询
@@ -5380,8 +5534,10 @@ export default {
standSelectChange (data) {
this.ocrList = data
this.selectedList = []
this.systemCategoryId = []
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
this.systemCategoryId.push(data[i].txlbId)
}
},
// 点击表格行--跳转详情页