Explorar el Código

应用环境和版本api

zhangjie hace 2 años
padre
commit
704ae7ad12

+ 7 - 0
src/assets/styles/base.scss

@@ -369,15 +369,22 @@ body {
       color: mix(#000, $--color-danger, 20%) !important;
     }
   }
+  &.is-disabled {
+    background-color: transparent !important;
+  }
 }
 .btn-primary {
   &.el-button--text:not(.is-disabled) {
     color: $--color-primary !important;
+
     &:hover {
       font-weight: 600;
       color: mix(#000, $--color-primary, 20%) !important;
     }
   }
+  &.is-disabled {
+    background-color: transparent !important;
+  }
 }
 
 .btn-white {

+ 1 - 1
src/assets/styles/element-ui-costom.scss

@@ -231,7 +231,7 @@
   }
   &.is-disabled {
     color: $--color-text-gray-3 !important;
-    background: $--color-background !important;
+    background: $--color-background;
     border: 1px solid $--color-border !important;
   }
 }

+ 1 - 1
src/modules/admin/api.js

@@ -82,7 +82,7 @@ export const appEnvList = datas => {
   return $postParam("/api/admin/env/list", datas);
 };
 export const appEnvTypes = () => {
-  return $postParam("/api/admin/app/types", {});
+  return $postParam("/api/admin/env/types", {});
 };
 export const appEnvInsertOrUpdate = datas => {
   if (datas.id) {

+ 3 - 3
src/modules/admin/components/AppEnvManage.vue

@@ -19,7 +19,7 @@
           inline
         >
           <el-form-item label-width="0px">
-            <el-button type="primary" icon="ios-search" @click="toPage(1)"
+            <el-button type="primary" icon="ios-search" @click="getList"
               >查询</el-button
             >
             <el-button type="success" icon="md-add" @click="toAdd"
@@ -102,8 +102,8 @@ export default {
   },
   methods: {
     async visibleChange() {
-      // await this.getEnvTypes();
-      // this.getList();
+      await this.getEnvTypes();
+      this.getList();
     },
     cancel() {
       this.modalIsShow = false;

+ 17 - 15
src/modules/admin/components/AppVersionManage.vue

@@ -27,7 +27,7 @@
               <el-option
                 v-for="(val, key) in ARCHIVED_TYPE"
                 :key="key"
-                :value="val"
+                :value="key * 1"
                 :label="val"
               ></el-option>
             </el-select>
@@ -47,22 +47,24 @@
         <el-table ref="TableList" :data="dataList">
           <el-table-column prop="id" label="ID" width="80"></el-table-column>
           <el-table-column prop="name" label="名称"> </el-table-column>
-          <el-table-column prop="archived" label="是否为主干版本" width="80">
+          <el-table-column prop="archived" label="是否为主干版本" width="124">
             <template slot-scope="scope">
               <span
                 :class="{
                   'color-success': scope.row.id === curMasterVersionId
                 }"
-              ></span>
-              {{ scope.row.id === curMasterVersionId ? "主干版本" : "" }}
+              >
+                {{ scope.row.id === curMasterVersionId ? "主干版本" : "" }}
+              </span>
             </template>
           </el-table-column>
           <el-table-column prop="archived" label="状态" width="80">
             <template slot-scope="scope">
               <span
                 :class="scope.row.archived ? 'color-success' : 'color-info'"
-              ></span>
-              {{ scope.row.archived | archivedTypeFilter }}
+              >
+                {{ scope.row.archived | archivedTypeFilter }}</span
+              >
             </template>
           </el-table-column>
           <el-table-column prop="createTime" label="创建时间" width="170">
@@ -75,7 +77,7 @@
               scope.row.updateTime | timestampFilter
             }}</span>
           </el-table-column>
-          <el-table-column label="操作" width="100" class-name="action-column">
+          <el-table-column label="操作" width="120" class-name="action-column">
             <template slot-scope="scope">
               <el-button
                 class="btn-primary"
@@ -83,6 +85,12 @@
                 @click="toEdit(scope.row)"
                 >编辑</el-button
               >
+              <el-button
+                :class="scope.row.archived ? 'btn-danger' : 'btn-primary'"
+                type="text"
+                @click="toArchived(scope.row)"
+                >{{ scope.row.archived ? "取消归档" : "归档" }}</el-button
+              >
               <el-button
                 class="btn-primary"
                 type="text"
@@ -90,12 +98,6 @@
                 @click="toSetMaster(scope.row)"
                 >设置为主干版本</el-button
               >
-              <el-button
-                :class="scope.row.archived ? 'btn-danger' : 'btn-primary'"
-                type="text"
-                @click="toArchived(scope.row)"
-                >{{ scope.row.archived ? "取消归档" : "归档" }}</el-button
-              >
             </template>
           </el-table-column>
         </el-table>
@@ -159,8 +161,8 @@ export default {
   },
   methods: {
     visibleChange() {
-      this.curMasterVersionId = this.app.masterVertionId;
-      // this.toPage(1);
+      this.curMasterVersionId = this.app.masterVersionId;
+      this.toPage(1);
     },
     cancel() {
       this.modalIsShow = false;