|
|
@@ -16,6 +16,7 @@
|
|
|
|
|
|
<script>
|
|
|
// import mixin from "../../minins/mixin";
|
|
|
+import { mapState } from "vuex";
|
|
|
export default {
|
|
|
name: "FormRow",
|
|
|
// mixins: [mixin],
|
|
|
@@ -30,16 +31,22 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState("setting", ["userInfo"]),
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.getMechanismTree();
|
|
|
},
|
|
|
methods: {
|
|
|
getMechanismTree() {
|
|
|
- this.$API.mechanism.getMechanismTree({ type: 0, id: 9 }).then((res) => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.treeData = res.data.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ // console.log(this.userInfo);
|
|
|
+ this.$API.mechanism
|
|
|
+ .getMechanismTree({ deptId: this.userInfo.deptId })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.treeData = res.data.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
onSelect(keys) {
|