瀏覽代碼

页面优化

chenrui 3 年之前
父節點
當前提交
377fcc43ca
共有 2 個文件被更改,包括 33 次插入26 次删除
  1. 31 24
      src/views/power/menuMould/setModal.vue
  2. 2 2
      vue.config.js

+ 31 - 24
src/views/power/menuMould/setModal.vue

@@ -8,31 +8,33 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="customerTypeEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-tree
-          checkable
-          @check="onCheck"
-          @expand="onExpand"
-          :expandedKeys="expandedKeys"
-          :autoExpandParent="autoExpandParent"
-          v-model="checkedKeys"
-          :treeData="treeData"
-        />
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="customer-type-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="customer-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="customerTypeEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-tree
+            checkable
+            @check="onCheck"
+            @expand="onExpand"
+            :expandedKeys="expandedKeys"
+            :autoExpandParent="autoExpandParent"
+            v-model="checkedKeys"
+            :treeData="treeData"
+          />
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="customer-type-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="customer-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -61,6 +63,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       detailData: null, //  数据
       formItemLayout: {
@@ -108,6 +111,7 @@ export default {
     },
     // 详情
     getDetail () {
+      this.spinning = true
       findMouldMenuDetail({ id: this.itemId, appType: 2 }).then(res => {
         if (res.status == 200) {
           this.treeData = res.data.menuList
@@ -117,6 +121,9 @@ export default {
             // 找出叶子节点
             this.findLeaf(this.treeData, arr)
           }
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },

+ 2 - 2
vue.config.js

@@ -108,8 +108,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.16.103:8501/qpls-it',
-        // target: 'http://qpls-it.360arrow.com.cn/qpls-it',
+        // target: 'http://192.168.16.103:8501/qpls-it',
+        target: 'http://qpls-it.360arrow.com.cn/qpls-it',
         // target: 'https://it.test.qiubcar.com/zyit',
         ws: false,
         changeOrigin: true,