diff --git a/src/components/roleTree/index.vue b/src/components/roleTree/index.vue
index 64c8f8a1e..c21e09c28 100644
--- a/src/components/roleTree/index.vue
+++ b/src/components/roleTree/index.vue
@@ -143,26 +143,33 @@
}
}),
checkChange2 (row, type, c) {
- if (type) {
- this.nodeList.push(row.id)
+ if (this.checkBox) {
} else {
- for (let a = 0; a < this.nodeList.length; a ++) {
- if (row.id === this.nodeList[a]) {
- this.nodeList.splice(a, 1)
+ if (type) {
+ this.nodeList.push(row.id)
+ } else {
+ for (let a = 0; a < this.nodeList.length; a ++) {
+ if (row.id === this.nodeList[a]) {
+ this.nodeList.splice(a, 1)
+ }
}
}
}
},
checkChange (row, type, c) {
- if (type) {
- this.nodeList.push(row.id)
+ if (this.checkBox) {
} else {
- for (let a = 0; a < this.nodeList.length; a ++) {
- if (row.id === this.nodeList[a]) {
- this.nodeList.splice(a, 1)
+ if (type) {
+ this.nodeList.push(row.id)
+ } else {
+ for (let a = 0; a < this.nodeList.length; a ++) {
+ if (row.id === this.nodeList[a]) {
+ this.nodeList.splice(a, 1)
+ }
}
}
}
+
},
handleTreeDrawerCancel () {
this.filterText = ''
@@ -200,17 +207,27 @@
this.open1 = true
},
drawerCheck (data) {
- if (this.checkBox) {
+ if (this.checkBox) { // 单选
// 单选判断
- var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
- if(getlist.length == 1) {
- this.roleRow = getlist[0]
- } else {
- this.$refs.tree.setCheckedKeys([data.id]);
- this.roleRow = this.$refs.tree.getCheckedNodes()[0]
+ let getlist = this.$refs.tree.getCheckedNodes()
+ if (getlist.length > 1) {
+ this.$refs.tree.setCheckedKeys([])
+ this.$refs.tree.setCheckedKeys([data.id])
+ this.roleList = [data]
+ } else if (getlist.length === 0) {
+ this.roleList = [{}]
+ } else if (getlist.length === 1) {
+ this.roleList = [data]
}
- this.roleList = [this.roleRow]
- } else {
+ // var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
+ // if(getlist.length == 1) {
+ // this.roleRow = getlist[0]
+ // } else {
+ // this.$refs.tree.setCheckedKeys([data.id])
+ // this.roleRow = this.$refs.tree.getCheckedNodes()[0]
+ // }
+ // this.roleList = [this.roleRow]
+ } else { // 多选
this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes())
}
},
diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue
index 0558a4442..39bb29fce 100644
--- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue
+++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue
@@ -217,8 +217,8 @@
width="150"
label="新车型实施日期">
- {{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}
- {{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.xcxssrqgj }}
+ {{ scope.row.putTime }}
- {{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.zccssrqgj }}
-
- {{ scope.row.ssrq ? $moment(scope.row.ssrq).format('YYYY-MM-DD') : '' }}
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}
- {{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.xcxssrqgj }}
+ {{ scope.row.putTime }}
- {{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.zccssrqgj }}
-
- {{ scope.row.ssrq ? $moment(scope.row.ssrq).format('YYYY-MM-DD') : '' }}
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}
- {{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.xcxssrqgj }}
+ {{ scope.row.putTime }}
- {{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.zccssrqgj }}
-
- {{ scope.row.ssrq ? $moment(scope.row.ssrq).format('YYYY-MM-DD') : '' }}
-
-
-
-
-
-
-
-
-
-
-
-
+ 查看
+
@@ -113,7 +114,7 @@