Răsfoiți Sursa

更新中心

reedliuqing_i 6 ani în urmă
părinte
comite
097710e157

+ 2 - 2
src/router/index.js

@@ -170,13 +170,13 @@ export const constantRoutes = [
     redirect: '/data/item',
     name: '数据中心',
     hidden: true,
-    meta: { title: '数据中心', icon: 'env_platform' },
+    meta: { title: '数据中心', icon: 'examlpe' },
     children: [
       {
         path: 'item',
         name: '动态数据',
         component: () => import('@/views/data/index.vue'),
-        meta: { title: '数据中心', icon: 'env' }
+        meta: { title: '动态数据', icon: 'examlpe' }
       }
     ]
   },

+ 0 - 76
src/views/cure/menu1/Homes.vue

@@ -1,76 +0,0 @@
-<template>
-  <div>
-    <el-radio-group v-model="labelPosition" size="small" />
-    <div style="margin: 20px;" />
-    <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign" style="margin-left:80px;">
-      <el-form-item label="手机号" style="width:95%;">
-        <el-input v-model="CellPhoneNumber" style="margin-left:20px;" />
-      </el-form-item>
-      <el-form-item label="高底线切换" label-width="82px">
-        <el-select v-model="showHighBottomLine" style="margin-left:20px;" placeholder="请选择">
-          <el-option v-for="item in highOption" :key="item.value" :label="item.displayName" :value="item.value" />
-        </el-select>
-      </el-form-item>
-    </el-form>
-    <el-button style="margin-left:180px;" type="primary" @click="onSubmit">提交</el-button>
-  </div>
-</template>
-
-<script>
-import { getGlobalInterface, getHighBottomLine } from '@/api/actionHome'
-
-export default {
-  name: 'HighBottomLine',
-  data() {
-    return {
-      data1: '',
-      showKey: '',
-      getEvevtKey: '',
-      currentMenu: {},
-      highOption: '',
-      showHighBottomLine: '',
-      CellPhoneNumber: '',
-      labelPosition: 'right',
-      formLabelAlign: {
-        name: ''
-      }
-    }
-  },
-  created() {
-    this.getEnvironmentalScience()
-  },
-  methods: {
-    getEnvironmentalScience() {
-      getGlobalInterface().then(response => {
-        this.highOption = response.data[1].subMenus[0].widgets[1].options
-      })
-    },
-    onSubmit() {
-      // this.data1 = JSON.parse(localStorage.getItem('key'))
-      this.luok = { mob: this.CellPhoneNumber, grade: this.showHighBottomLine }
-      // localStorage.setItem('mob', JSON.stringify(this.luok))
-      // this.showKey = Object.assign(this.data1, this.luok)
-      getHighBottomLine(this.luok).then(response => {
-        if (response.success === false) {
-          this.open(response.result)
-        }
-      })
-    },
-    open(e) {
-      this.$alert(e, '', {
-        confirmButtonText: '确定',
-        callback: action => {
-          // this.$message({
-          //   type: 'info'
-          //   // message: `action: ${{ action }}`
-          // })
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 100
src/views/cure/menu1/action.vue

@@ -1,100 +0,0 @@
-<template>
-  <el-form label-width="80px">
-    <el-form-item>
-      key值
-      <el-input v-model="getUserInput" style="width:90%; margin-top:50px; margin-left: 30px;" />
-    </el-form-item>
-    <el-form-item>
-      <el-button style="margin-left:70px;" type="primary" @click="onSubmit">提交</el-button>
-    </el-form-item>
-  </el-form>
-</template>
-
-<script>
-import { getGlobalInterface, getRedis } from '@/api/actionHome'
-
-export default {
-  name: 'Redis',
-  data() {
-    return {
-      formData: {},
-      showexplain: false,
-      dataoption: '',
-      transForMation: '',
-      getUserInput: '',
-      WidgetMap: {
-        INPUT: 'el-input',
-        RADIO: '',
-        CHECKBOX: '',
-        TEXTAREA: '',
-        RESET: '',
-        SELECT: ''
-      },
-      Queryoptin: {
-        defaultValue: null,
-        label: '',
-        maxLength: 0,
-        name: '',
-        options: null,
-        pattern: null,
-        placeHolder: '',
-        required: false,
-        text: null,
-        title: null,
-        widgetType: ''
-      }
-    }
-  },
-  created() {
-    this.getList()
-  },
-  methods: {
-    getList() {
-      getGlobalInterface().then(response => {
-        this.dataoption = response.data
-        this.menuName = this.dataoption[0].menuName
-        this.transForMation = this.dataoption[1].subMenus[0].widgets
-        // for (var val of this.transForMation) {
-        //   this.Queryoptin.defaultValue = val.defaultValue
-        //   this.Queryoptin.label = val.label
-        //   this.Queryoptin.maxLength = val.maxLength
-        //   this.Queryoptin.name = val.name
-        //   this.Queryoptin.options = val.options
-        //   this.Queryoptin.pattern = val.pattern
-        //   this.Queryoptin.placeHolder = val.placeHolder
-        //   this.Queryoptin.required = val.required
-        //   this.Queryoptin.text = val.text
-        //   this.Queryoptin.title = val.title
-        //   this.Queryoptin.widgetType = val.widgetType
-        // }
-        // console.log(this.Queryoptin)
-      })
-    },
-    onSubmit() {
-      // this.data2 = JSON.parse(localStorage.getItem('mob'))
-      const luok = { key: this.getUserInput }
-      // this.showKey = Object.assign(this.data2, luok)
-      // localStorage.setItem('key', JSON.stringify(luok))
-      getRedis(luok).then(response => {
-        this.open(response.result)
-      })
-    },
-    open(e) {
-      this.$alert(e, '', {
-        confirmButtonText: '确定',
-        callback: action => {
-          // this.$message({
-          //   type: 'info'
-          //   // message: `action: ${{ action }}`
-          // })
-        }
-      })
-    }
-  }
-}
-
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 3
src/views/cure/menu1/index.vue

@@ -1,3 +0,0 @@
-<template>
-  <router-view />
-</template>

+ 7 - 1
src/views/home/index.vue

@@ -241,6 +241,7 @@ img.img-arrow {
 
 <script>
 import FloatMenu from './floatMenu'
+import { getGlobalInterface } from '@/api/data.js'
 
 export default {
   components: {
@@ -271,6 +272,11 @@ export default {
         }
       })()
     }
+    getGlobalInterface()
+      .then(res => {
+        this.$store.dispatch('data/setMenu', res.data)
+        this.$store.dispatch('data/setSubMenu', res.data[0].subMenus[0])
+      })
   },
   methods: {
     handleSelect(key, keyPath) {
@@ -282,7 +288,7 @@ export default {
           this.$router.push({ name: 'Mock' })
           break
         case '3' :
-          this.$router.push({ name: 'cure' })
+          this.$router.push({ name: '动态数据' })
       }
     },
     handleScroll() {