Ver Fonte

BUG修改+合并

rui.jiang há 11 meses atrás
pai
commit
1c7f149125

+ 0 - 5
src/components/HeaderCom.vue

@@ -18,11 +18,6 @@
             <p>账号:{{ $store.state.auth.userInfo.userInfo.loginName }}</p>
           </div>
           <el-divider></el-divider>
-          <!-- <div class="cursor-pointer boxmini">
-            <p>岗位:{{ $store.state.auth.userInfo.userInfo.loginName }}</p>
-          </div> 
-          
-          <el-divider></el-divider> -->
           <div class="cursor-pointer boxmini">
             <p>角色:{{ $store.state.auth.userInfo.role.roleDescription }}</p>
           </div>

+ 0 - 2
src/main.js

@@ -74,8 +74,6 @@ new Vue({
   methods: {
     async applyTheme(theme, oldTheme) {
       const themeFile = theme || this.$store.state.themes.theme;
-      // console.log(theme, oldTheme, "themeFile");
-
       // 动态加载新的主题样式
       try {
         // 动态导入 SCSS 文件

+ 24 - 27
src/views/admin/cockpitManage/Index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="map-ditu">
+  <div class="map-ditu" v-loading="loading">
     <Tmap ref="map" :maplist="maplist" @feature-click="featureClick"></Tmap>
     <div class="ledata">
       <selecttree
@@ -84,28 +84,13 @@ export default {
   },
   data() {
     return {
+      loading: false,
       ShowRi: true,
       treeval: "",
       value1: true,
       treeval: "", // 绑定的输入框值
       showTree: false, // 控制树列表显示
-      treeData: [
-        // // 树列表数据,根据实际需求自行替换
-        // {
-        //   id: 1,
-        //   label: "Node 1",
-        //   children: [
-        //     {
-        //       id: 2,
-        //       label: "Node 1-1",
-        //     },
-        //   ],
-        // },
-        // {
-        //   id: 3,
-        //   label: "Node 2",
-        // },
-      ],
+      treeData: [], // 树列表数据,根据实际需求自行替换
       maplist: [],
       maplistArr: {},
       totalList: [],
@@ -136,19 +121,31 @@ export default {
   methods: {
     // 获取总数
     GETtotal() {
-      getCompanyFieldNumberVo().then((res) => {
-        this.totalList = res.data;
-      });
+      this.loading = true;
+      getCompanyFieldNumberVo()
+        .then((res) => {
+          this.totalList = res.data;
+          this.loading = false;
+        })
+        .catch((err) => {
+          console.error(err, "err");
+          this.loading = false;
+        });
     },
     // 获取企业数
     async GETtree() {
-      const res = await getSysOrganizationAuthTreeByRoleId();
-      const treedata = res.data;
-      const processedData = this.processTreeData(treedata);
-      this.parentOpt = processedData;
-      this.defaultdata = res.data[0];
+      this.loading = true;
+      try {
+        const res = await getSysOrganizationAuthTreeByRoleId();
+        const treedata = res.data;
+        const processedData = this.processTreeData(treedata);
+        this.parentOpt = processedData;
+        this.defaultdata = res.data[0];
+        this.loading = false;
+      } catch (err) {
+        this.loading = false;
+      }
     },
-
     //过滤数据
     processTreeData(treeData) {
       const processedData = [];

+ 5 - 4
src/views/home/components/Menu.vue

@@ -140,7 +140,11 @@ export default {
     };
   },
   created() {
-    console.log(this.defaultActive, "defaultActive", this.$route);
+    console.log(
+      this.defaultActive,
+      Vue.prototype.$backgroundColor,
+      "defaultActive"
+    );
     this.routerList = [
       ...this.routerList,
       ...this.$store.state.auth.dynamicRouter,
@@ -236,8 +240,6 @@ export default {
   font-size: 20px;
 }
 
-
-
 .asideBox {
   position: relative;
   padding-bottom: 40px;
@@ -356,7 +358,6 @@ export default {
   display: flex;
   align-items: center !important;
   justify-content: center !important;
- 
 }
 
 .foldBox {

+ 34 - 19
src/views/ledger/anemometer.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="global-variable">
+  <div class="global-variable" v-loading="loading">
     <div class="condition">
       <el-form :inline="true" :model="formInline" class="demo-form-inline">
         <el-form-item label="测风塔名称:">
@@ -218,6 +218,7 @@ import {
 export default {
   data() {
     return {
+      loading: false,
       tableData: [],
       formInline: {
         anemometerName: "",
@@ -299,10 +300,16 @@ export default {
         pageNum: this.formInline.pageNum || 1,
         pageSize: this.formInline.pageSize,
       };
-      getAnemometerTowerPage(paramsData).then((res) => {
-        this.tableData = res.data.list;
-        this.formInline.totalSize = res.data.totalSize;
-      });
+      this.loading = true;
+      getAnemometerTowerPage(paramsData)
+        .then((res) => {
+          this.tableData = res.data.list;
+          this.formInline.totalSize = res.data.totalSize;
+          this.loading = false;
+        })
+        .catch((err) => {
+          console.error(err);
+        });
     },
     // 重置
     reset() {
@@ -388,20 +395,28 @@ export default {
 
     // 编辑
     compile(row) {
-  this.title = "编辑";
-  this.isEdit = true;
-  this.nuedialog = true; 
-  getAnemometerTower({ anemometerCode: row.anemometerCode }).then((res) => {
-    this.hightower = res.data;
-    this.cftList = res.data.list;
-    const item = JSON.parse(JSON.stringify(res.data));
-    this.detail = item;
-    this.$set(this.dynamicValidateForm, 'anemometerName', item.anemometerName);
-    this.$set(this.dynamicValidateForm, 'latitude', item.latitude);
-    this.$set(this.dynamicValidateForm, 'longitude', item.longitude);
-    this.$set(this.dynamicValidateForm, 'anemometerTowerHeightDtoList', this.cftList);
-  });
-},
+      this.title = "编辑";
+      this.isEdit = true;
+      this.nuedialog = true;
+      getAnemometerTower({ anemometerCode: row.anemometerCode }).then((res) => {
+        this.hightower = res.data;
+        this.cftList = res.data.list;
+        const item = JSON.parse(JSON.stringify(res.data));
+        this.detail = item;
+        this.$set(
+          this.dynamicValidateForm,
+          "anemometerName",
+          item.anemometerName
+        );
+        this.$set(this.dynamicValidateForm, "latitude", item.latitude);
+        this.$set(this.dynamicValidateForm, "longitude", item.longitude);
+        this.$set(
+          this.dynamicValidateForm,
+          "anemometerTowerHeightDtoList",
+          this.cftList
+        );
+      });
+    },
 
     //分页数据切换
     handleCurrentChange(val) {

+ 20 - 8
src/views/ledger/draught.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="global-variable">
+  <div class="global-variable" v-loading="loading">
     <div class="condition">
       <el-form :inline="true" :model="formInline" class="demo-form-inline">
         <el-form-item label="风机名称:">
@@ -100,7 +100,12 @@
             {{ row.state == 1 ? "启用" : "停用" }}
           </template>
         </el-table-column>
-        <el-table-column prop="createTime" align="center" label="创建时间" width="140">
+        <el-table-column
+          prop="createTime"
+          align="center"
+          label="创建时间"
+          width="140"
+        >
         </el-table-column>
 
         <el-table-column
@@ -415,6 +420,7 @@ import {
 export default {
   data() {
     return {
+      loading: false,
       formInline: {
         fieldCode: "",
         timeQuantum: [],
@@ -588,10 +594,16 @@ export default {
         pageNum: this.formInline.pageNum || 1,
         pageSize: 10,
       };
-      windEngineGrouPage(paramsData).then((res) => {
-        this.tableData = res.data.list;
-        this.formInline.totalSize = res.data.totalSize;
-      });
+      this.loading = true;
+      windEngineGrouPage(paramsData)
+        .then((res) => {
+          this.tableData = res.data.list;
+          this.formInline.totalSize = res.data.totalSize;
+          this.loading = false;
+        })
+        .catch((error) => {
+          console.error(error);
+        });
     },
 
     // 停用
@@ -724,7 +736,7 @@ export default {
                 type: "success",
               });
               this.onSubmit();
-              this.handleClose()
+              this.handleClose();
             }
           })
           .catch((error) => {});
@@ -929,4 +941,4 @@ export default {
   height: 40px;
   font-size: 14px;
 }
-</style>
+</style>

+ 12 - 5
src/views/ledger/enterprise.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="global-variable">
+  <div class="global-variable" v-loading="loading">
     <div class="condition">
       <el-form :inline="true" :model="formInline" class="demo-form-inline">
         <el-form-item label="单位名称:">
@@ -253,6 +253,7 @@ import {
 export default {
   data() {
     return {
+      loading: false,
       // 查询
       formInline: {
         companyName: "",
@@ -335,10 +336,16 @@ export default {
           state: this.formInline.state,
         };
       }
-
-      getAllWindCompany(objectval).then((res) => {
-        this.tableData = res.data;
-      });
+      this.loading = true;
+      getAllWindCompany(objectval)
+        .then((res) => {
+          this.tableData = res.data;
+          this.loading = false;
+        })
+        .catch((error) => {
+          console.error(error, "error");
+          this.loading = false;
+        });
     },
 
     // 重置

+ 16 - 8
src/views/ledger/milltype.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="global-variable">
+  <div class="global-variable" v-loading="loading">
     <div class="condition">
       <el-form :inline="true" :model="formInline" class="demo-form-inline">
         <el-form-item label="收资机型型号:">
@@ -348,6 +348,7 @@ import {
 export default {
   data() {
     return {
+      loading: false,
       tableData: [],
       formInline: {
         machineTypeCode: "",
@@ -446,10 +447,17 @@ export default {
         pageNum: this.formInline.pageNum || 1,
         pageSize: 10,
       };
-      windEngineMillPage(paramsData).then((res) => {
-        this.tableData = res.data.list;
-        this.formInline.totalSize = res.data.totalSize;
-      });
+      this.loading = true;
+      windEngineMillPage(paramsData)
+        .then((res) => {
+          this.tableData = res.data.list;
+          this.formInline.totalSize = res.data.totalSize;
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+          console.error(error);
+        });
     },
     // 停用
     start(row, type) {
@@ -588,8 +596,8 @@ export default {
 
     // 重置
     reset() {
-      this.formInline.machineTypeCode=""
-      this.formInline.timeQuantum=""
+      this.formInline.machineTypeCode = "";
+      this.formInline.timeQuantum = "";
       this.onSubmit();
     },
 
@@ -831,4 +839,4 @@ export default {
   display: flex;
   justify-content: center;
 }
-</style>
+</style>

+ 13 - 5
src/views/ledger/windsite.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="global-variable">
+  <div class="global-variable" v-loading="loading">
     <div class="condition">
       <el-form :inline="true" :model="formInline" class="demo-form-inline">
         <el-form-item label="风场名称:">
@@ -368,6 +368,7 @@ export default {
   },
   data() {
     return {
+      loading: false,
       treeval: "",
       tableData: [],
       formInline: {
@@ -555,10 +556,17 @@ export default {
         pageNum: this.formInline.pageNum || 1,
         pageSize: 10,
       };
-      WindFieldListPage(paramsData).then((res) => {
-        this.tableData = res.data.list;
-        this.formInline.totalSize = res.data.totalSize;
-      });
+      this.loading = true;
+      WindFieldListPage(paramsData)
+        .then((res) => {
+          this.tableData = res.data.list;
+          this.formInline.totalSize = res.data.totalSize;
+          this.loading = false;
+        })
+        .catch((error) => {
+          this.loading = false;
+          console.error(error);
+        });
     },
     //分页数据切换
     handleCurrentChange(val) {