|
@@ -5,6 +5,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getLogin } from "@/api/ajax";
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
export default {
|
|
|
name: "App",
|
|
|
data() {
|
|
@@ -12,8 +14,50 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ this.fn()
|
|
|
},
|
|
|
methods:{
|
|
|
+ async fn() {
|
|
|
+ let userInfor = getToken();
|
|
|
+ if (userInfor) {
|
|
|
+ let MethodName = "/OrgServer/DictManager/GetStudyPhaseList";
|
|
|
+ let typeListAll = [{
|
|
|
+ study_phase: -1,
|
|
|
+ study_phase_name: '全部'
|
|
|
+ }]
|
|
|
+ let typeList = []
|
|
|
+ await getLogin(MethodName, {})
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ typeListAll = typeListAll.concat(res.study_phase_list)
|
|
|
+ typeList = res.study_phase_list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
+ this.$store.commit('setStudyTypeAll',typeListAll)
|
|
|
+ this.$store.commit('setStudyType',typeList)
|
|
|
+ let MethodNames = "/OrgServer/DictManager/GetOrgTypeList";
|
|
|
+ let typeListAlls = [{
|
|
|
+ type: -1,
|
|
|
+ type_name: '全部'
|
|
|
+ }]
|
|
|
+ let typeLists = []
|
|
|
+ await getLogin(MethodNames, {})
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ typeListAlls = typeListAlls.concat(res.type_list)
|
|
|
+ typeLists = res.type_list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
+ this.$store.commit('setOrgTypeAll',typeListAlls)
|
|
|
+ this.$store.commit('setOrgType',typeLists)
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
mounted(){
|
|
|
},
|