Ver código fonte

新增组件及页面

liuqiwen 4 anos atrás
pai
commit
12973ee3e5

+ 1 - 1
dgtis-ui/src/router/index.js

@@ -60,7 +60,7 @@ export const constantRoutes = [
       {
         path: 'index',
         component: (resolve) => require(['@/views/index'], resolve),
-        name: '首页',
+        name: 'Index',
         meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
       }
     ]

+ 4 - 4
dgtis-ui/src/views/index.vue

@@ -112,7 +112,7 @@
                 <el-form-item class="formItem" label="核心客户号:" size="mini">
                   <el-input v-model="conditionData.SCustID"></el-input>
                 </el-form-item>
-                <el-form-item :class="{'formItemFull education':isFull,'formItem':!isActive}" label="客户等级:" size="mini">
+                <el-form-item :class="{'formItemFull2 education':isFull,'formItem':!isFull}" label="客户等级:" size="mini">
                   <el-select v-model="conditionData.custclass">
                     <el-option label="钻石" value="1"></el-option>
                     <el-option label="白金" value="2"></el-option>
@@ -121,12 +121,12 @@
                     <el-option label="无" value="0"></el-option>
                   </el-select>
                 </el-form-item>
-                <el-form-item :class="{'formItemFull education':isFull,'formItem':!isActive}" label="学历:" size="mini">
+                <el-form-item :class="{'formItemFull2 education':isFull,'formItem':!isFull}" label="学历:" size="mini">
                   <el-select v-model="conditionData.education" multiple collapse-tags>
                     <el-option v-for="(item,index) in educationArr" :key="index" :label="item.label" :value="item.value"></el-option>
                   </el-select>
                 </el-form-item>
-                <el-form-item class="formItemFull labelM dateQj" label="参与方进入时间:" size="mini" style="margin-top: 5px;">
+                <el-form-item class="formItemFull2 labelM dateQj" label="参与方进入时间:" size="mini" style="margin-top: 5px;">
                   <el-date-picker
                     v-model="conditionData.participantsDateS"
                     type="date"
@@ -227,7 +227,7 @@
   import PieChart from './dashboard/PieChart2'
   import { ageSexDis, riskcode, bdNumDis } from "@/api/index";
   export default {
-    name: "UserInfoDetails",
+    name: "Index",
     components: {
       BarTwoWayChart,
       BarChart,

+ 9 - 9
dgtis-ui/src/views/system/user/index.vue

@@ -98,15 +98,15 @@
                   v-hasPermi="['system:user:add']"
                 >新增</el-button>
               </el-col>
-              <el-col :span="1.5">
-                <el-button
-                  icon="el-icon-edit"
-                  size="mini"
-                  :disabled="single"
-                  @click="handleUpdate"
-                  v-hasPermi="['system:user:edit']"
-                >修改</el-button>
-              </el-col>
+<!--              <el-col :span="1.5">-->
+<!--                <el-button-->
+<!--                  icon="el-icon-edit"-->
+<!--                  size="mini"-->
+<!--                  :disabled="single"-->
+<!--                  @click="handleUpdate"-->
+<!--                  v-hasPermi="['system:user:edit']"-->
+<!--                >修改</el-button>-->
+<!--              </el-col>-->
               <el-col :span="1.5">
                 <el-button
                   type="danger"

+ 1 - 1
dgtis-ui/src/views/system/userInfo/index.vue

@@ -136,7 +136,7 @@ import touched from './components/touched'
 import tags from './components/tags'
 import nodata from './components/nodata'
 export default {
-  name: "UserInfo",
+  name: "UserInfoDetails",
   components: {
     habit,
     health,

+ 1 - 1
dgtis-ui/src/views/system/userInfoDetails/index.vue

@@ -180,7 +180,7 @@
   import LineBarChart from '../../dashboard/LineBarChart'
   import PieChartHalf from '../../dashboard/PieChartHalf'
 export default {
-  name: "UserInfoDetails",
+  name: "UserInfoOverview",
   components: {
     WordCloudChart,
     LineBarChart,

+ 26 - 3
dgtis-ui/src/views/system/userInfoList/index.vue

@@ -97,7 +97,7 @@
   import { listCustomer } from "@/api/customerInformation/customerInformation.js";
   import axios from 'axios'
   export default {
-  name: "CustomerList",
+  name: "UserInfoList",
   data() {
     return {
       // 遮罩层
@@ -117,8 +117,31 @@
       cellWidthB:'260',
     };
   },
-  watch: {
-
+  // watch: {
+  //   $route: {
+  //     handler: function(val, oldVal){
+  //       console.log(val);
+  //     },
+  //     // 深度观察监听
+  //     deep: true
+  //   }
+  // },
+  beforeRouteEnter(to, from, next) {
+    console.log(from)
+    if (from.name === 'Index') {
+      next(vm => {
+        vm.getList();
+      })
+    } else if (!from.name) { // 处理刷新页面时,获取动态表单方法未执行,导致表单无法加载
+      next(vm => {
+        vm.getList();
+      })
+    } else {
+      // 详情返回时只更新列表数据,因为如果在详情页面做了操作,列表数据状态会改变,其他使用缓存
+      next(vm => {
+        vm.getList();
+      })
+    }
   },
   created() {
     this.getList();