|
@@ -6,125 +6,129 @@
|
|
|
|
|
|
<script>
|
|
|
import { getLogin } from "@/api/ajax";
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
export default {
|
|
|
name: "App",
|
|
|
data() {
|
|
|
- return {
|
|
|
- };
|
|
|
+ return {};
|
|
|
},
|
|
|
created() {
|
|
|
- this.fn()
|
|
|
+ this.fn();
|
|
|
+ document.addEventListener("contextmenu", (event) => event.preventDefault());
|
|
|
},
|
|
|
- methods:{
|
|
|
+ methods: {
|
|
|
async fn() {
|
|
|
- let userInfor = getToken();
|
|
|
- if (userInfor) {
|
|
|
- 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)
|
|
|
- let searchStatusList = [{
|
|
|
- status:-1,
|
|
|
- status_name:'全部'
|
|
|
- }]
|
|
|
- await getLogin('/OrgServer/DictManager/GetSysUserStatusList', {})
|
|
|
- .then((res) => {
|
|
|
- if(res.status===1){
|
|
|
- searchStatusList = searchStatusList.concat(res.status_list)
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.loading = false
|
|
|
- });
|
|
|
- this.$store.commit('setSearchStatusList',searchStatusList)
|
|
|
- }
|
|
|
-
|
|
|
- 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 provinceCityListAll = [{
|
|
|
- label: '全部',
|
|
|
- value: '0',
|
|
|
- leaf: true
|
|
|
- }]
|
|
|
- let provinceCityList = []
|
|
|
- await getLogin('/OrgServer/DictManager/GetAllProvinceCityList', {})
|
|
|
- .then((res) => {
|
|
|
- if (res.status === 1) {
|
|
|
- res.province_list.forEach(item => {
|
|
|
- let obj = {
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- children: []
|
|
|
- }
|
|
|
- item.city_list.forEach(items=>{
|
|
|
- let objs = {
|
|
|
- label: items.name,
|
|
|
- value: items.id,
|
|
|
- leaf: true
|
|
|
- }
|
|
|
- obj.children.push(objs)
|
|
|
- })
|
|
|
- provinceCityList.push(obj)
|
|
|
- provinceCityListAll.push(obj)
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
+ let userInfor = getToken();
|
|
|
+ if (userInfor) {
|
|
|
+ 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);
|
|
|
+ let searchStatusList = [
|
|
|
+ {
|
|
|
+ status: -1,
|
|
|
+ status_name: "全部",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ await getLogin("/OrgServer/DictManager/GetSysUserStatusList", {})
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ searchStatusList = searchStatusList.concat(res.status_list);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ this.$store.commit("setSearchStatusList", searchStatusList);
|
|
|
+ }
|
|
|
|
|
|
+ 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 provinceCityListAll = [
|
|
|
+ {
|
|
|
+ label: "全部",
|
|
|
+ value: "0",
|
|
|
+ leaf: true,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ let provinceCityList = [];
|
|
|
+ await getLogin("/OrgServer/DictManager/GetAllProvinceCityList", {})
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ res.province_list.forEach((item) => {
|
|
|
+ let obj = {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ children: [],
|
|
|
+ };
|
|
|
+ item.city_list.forEach((items) => {
|
|
|
+ let objs = {
|
|
|
+ label: items.name,
|
|
|
+ value: items.id,
|
|
|
+ leaf: true,
|
|
|
+ };
|
|
|
+ obj.children.push(objs);
|
|
|
+ });
|
|
|
+ provinceCityList.push(obj);
|
|
|
+ provinceCityListAll.push(obj);
|
|
|
});
|
|
|
- this.$store.commit('setProviceCity',provinceCityList)
|
|
|
- this.$store.commit('setProviceCityAll',provinceCityListAll)
|
|
|
- await getLogin('/OrgServer/Client/SysConfigQuery/GetSysConfig_Preview', {})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ this.$store.commit("setProviceCity", provinceCityList);
|
|
|
+ this.$store.commit("setProviceCityAll", provinceCityListAll);
|
|
|
+ await getLogin(
|
|
|
+ "/OrgServer/Client/SysConfigQuery/GetSysConfig_Preview",
|
|
|
+ {}
|
|
|
+ )
|
|
|
.then((res) => {
|
|
|
- if(res.status===1){
|
|
|
- this.$store.commit('setPreviewUrl',res.preview_server_url)
|
|
|
- }
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.$store.commit("setPreviewUrl", res.preview_server_url);
|
|
|
+ }
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- this.loading = false
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
- }
|
|
|
- },
|
|
|
- mounted(){
|
|
|
+ },
|
|
|
},
|
|
|
+ mounted() {},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-#app{
|
|
|
- background: #F2F3F5;
|
|
|
- min-width: 1440px;
|
|
|
- min-height: 100%;
|
|
|
- padding-top: 64px;
|
|
|
+#app {
|
|
|
+ background: #f2f3f5;
|
|
|
+ min-width: 1440px;
|
|
|
+ min-height: 100%;
|
|
|
+ padding-top: 64px;
|
|
|
}
|
|
|
</style>
|