From 3485a9a8b0dc8d9af092635c247fbc96d9e175da Mon Sep 17 00:00:00 2001
From: super_liu <396572590@qq.com>
Date: Tue, 19 Apr 2022 16:44:14 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20There=20is=20no=20way=20the,=20?=
=?UTF-8?q?=E6=96=B0=E9=9C=80=E6=B1=82=20#52633?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../domesticStandardsAndRegulations/index.vue | 63 +++++++------
.../components/EnterpriseStandardDatabase.vue | 92 ++++++++++++-------
.../foreignRegulationsDatabase/index.vue | 23 +++--
.../foreignStandardsAndRegulations/index.vue | 61 ++++++------
4 files changed, 142 insertions(+), 97 deletions(-)
diff --git a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
index 2738ed61f..79a117562 100644
--- a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
+++ b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
@@ -26,30 +26,33 @@
{{ node.label }}
-
-
+
+ append(data)">
+ 新增
+
+ update(data)">
+ 编辑
+
+ remove(node, data)">
+ 删除
+
+
+
@@ -2282,7 +2285,6 @@ export default {
parentIds: null,
parentIdsName: "",
displaySeq: "",
- validFlag: "",
creationTime: "",
modifyTime: "",
remarks: "",
@@ -3614,11 +3616,16 @@ export default {
if (row.parentIds.indexOf(res.data.id) != -1) {
this.productModelAdd.parentIds = row.parentIds
} else {
- this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id
- idsName = row.parentIdsName + ',' + res.data.menuName
+ if(row.parentIds && row.parentIds.substr(-1,1) === ','){
+ this.productModelAdd.parentIds = row.parentIds + res.data.id+','
+ idsName = row.parentIdsName + ',' + res.data.menuName
+ }else {
+ this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id+','
+ idsName = row.parentIdsName + ',' + res.data.menuName
+ }
}
} else {
- this.productModelAdd.parentIds = res.data.id
+ this.productModelAdd.parentIds = ','+res.data.id+','
idsName = res.data.menuName;
}
this.productModelAdd.parentId = res.data.id
diff --git a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
index 4720b184e..e4a63f07e 100644
--- a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
+++ b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
@@ -25,29 +25,32 @@
{{ node.label }}
-
+
+ append(data)">
+ 新增
+
+ update(data)">
+ 编辑
+
+ remove(node, data)">
+ 删除
+
+
@@ -1756,13 +1759,12 @@ export default {
},
productModelAdd: {
id: "",
- sorDivide: "INLAND_STAND",
+ sorDivide: "BUSINESS_STAND",
menuName: "",
parentId: null,
parentIds: null,
parentIdsName: "",
displaySeq: "",
- validFlag: "",
creationTime: "",
modifyTime: "",
remarks: "",
@@ -2797,7 +2799,7 @@ export default {
_this: this
}, res => {
if (res.ok) {
- this.selectMenuList()
+ this.selectMenuListNew()
this.productModal = false
this.productModelAdd = {
// 模态框信息
@@ -2817,7 +2819,7 @@ export default {
this.$http.putData('sarResource/ts-resource', this.productModelAdd, {
_this: this
}, res => {
- this.selectMenuList()
+ this.selectMenuListNew()
this.productModal = false
this.productModelAdd = {
// 模态框信息
@@ -2851,6 +2853,18 @@ export default {
this.productModal = false
},
// 查询二级菜单
+ selectMenuListNew() {
+ 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.treeList = res.data
+ })
+ })
+ },
selectMenuList() {
return new Promise((resolve, reject) => {
this.$http.get('sarResource/ts-resource/getListStandLimitData', {
@@ -2886,11 +2900,16 @@ export default {
if (row.parentIds.indexOf(res.data.id) != -1) {
this.productModelAdd.parentIds = row.parentIds
} else {
- this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id
- idsName = row.parentIdsName + ',' + res.data.menuName
+ if(row.parentIds && row.parentIds.substr(-1,1) === ','){
+ this.productModelAdd.parentIds = row.parentIds + res.data.id+','
+ idsName = row.parentIdsName + ',' + res.data.menuName
+ }else {
+ this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id+','
+ idsName = row.parentIdsName + ',' + res.data.menuName
+ }
}
} else {
- this.productModelAdd.parentIds = res.data.id
+ this.productModelAdd.parentIds = ','+res.data.id+','
idsName = res.data.menuName;
}
this.productModelAdd.parentId = res.data.id
@@ -2945,7 +2964,7 @@ export default {
message: "删除成功"
})
this.getBussionStandTable()
- this.selectMenuList()
+ this.selectMenuListNew()
} else {
this.$message({
type: 'warning',
@@ -2967,9 +2986,14 @@ export default {
},
// 树节点鼠标移入移出
mouseenter(data) {
- this.$set(data, 'show', true)
- if (data.parentId !== null) {
- this.$set(data, 'showDel', true)
+ if(data && data.treeType && data.treeType === 'sarMs'){
+ this.$set(data, 'show', false)
+ this.$set(data, 'showDel', false)
+ }else {
+ this.$set(data, 'show', true)
+ if (data.parentId !== null) {
+ this.$set(data, 'showDel', true)
+ }
}
},
mouseleave(data) {
diff --git a/src/pages/regulatoryRepository/foreignRegulationsDatabase/index.vue b/src/pages/regulatoryRepository/foreignRegulationsDatabase/index.vue
index 2d5f01f0b..b1c7c7bbc 100644
--- a/src/pages/regulatoryRepository/foreignRegulationsDatabase/index.vue
+++ b/src/pages/regulatoryRepository/foreignRegulationsDatabase/index.vue
@@ -30,6 +30,7 @@
type="text"
size="mini"
v-show="data.show"
+ v-btn-permission="'a3109949cc30dae1ef523c037b2651b8'"
@click="() => append(data)">
新增
@@ -37,6 +38,7 @@
type="text"
size="mini"
v-show="data.show"
+ v-btn-permission="'61a33c05ed689934f7d4a0de4220c9ce'"
@click="() => update(data)">
编辑
@@ -44,6 +46,7 @@
type="text"
size="mini"
v-show="data.showDel"
+ v-btn-permission="'b123231eb8c42b2a61e3dc5f59654f79'"
@click="() => remove(node, data)">
删除
@@ -1434,7 +1437,6 @@
parentIds : null,
parentIdsName : "",
displaySeq : "",
- validFlag : "0",
creationTime : "",
modifyTime : "",
remarks : "",
@@ -2360,15 +2362,20 @@
if (res.ok) {
if(this.modalType === 1){
let idsName = ""
- if(row.parentIds !== null){
- if(row.parentIds.indexOf(res.data.id) != -1){
+ if (row.parentIds !== null) {
+ if (row.parentIds.indexOf(res.data.id) != -1) {
this.productModelAdd.parentIds = row.parentIds
- }else {
- this.productModelAdd.parentIds = row.parentIds + res.data.id+','
- idsName = row.parentIdsName + ',' + res.data.menuName
+ } else {
+ if(row.parentIds && row.parentIds.substr(-1,1) === ','){
+ this.productModelAdd.parentIds = row.parentIds + res.data.id+','
+ idsName = row.parentIdsName + ',' + res.data.menuName
+ }else {
+ this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id+','
+ idsName = row.parentIdsName + ',' + res.data.menuName
+ }
}
- }else {
- this.productModelAdd.parentIds = +','+res.data.id+','
+ } else {
+ this.productModelAdd.parentIds = ','+res.data.id+','
idsName = res.data.menuName;
}
this.productModelAdd.parentId = res.data.id
diff --git a/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue
index 7f2d602f4..2d4393cee 100644
--- a/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue
+++ b/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue
@@ -24,29 +24,32 @@
{{ node.label }}
-
+
+ append(data)">
+ 新增
+
+ update(data)">
+ 编辑
+
+ remove(node, data)">
+ 删除
+
+
@@ -2272,7 +2275,6 @@ export default {
parentIds: null,
parentIdsName: "",
displaySeq: "",
- validFlag: "",
creationTime: "",
modifyTime: "",
remarks: "",
@@ -3041,11 +3043,16 @@ export default {
if (row.parentIds.indexOf(res.data.id) != -1) {
this.productModelAdd.parentIds = row.parentIds
} else {
- this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id
- idsName = row.parentIdsName + ',' + res.data.menuName
+ if(row.parentIds && row.parentIds.substr(-1,1) === ','){
+ this.productModelAdd.parentIds = row.parentIds + res.data.id+','
+ idsName = row.parentIdsName + ',' + res.data.menuName
+ }else {
+ this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id+','
+ idsName = row.parentIdsName + ',' + res.data.menuName
+ }
}
} else {
- this.productModelAdd.parentIds = res.data.id
+ this.productModelAdd.parentIds = ','+res.data.id+','
idsName = res.data.menuName;
}
this.productModelAdd.parentId = res.data.id