瀏覽代碼

loading的优化

panxiandiao_i 5 年之前
父節點
當前提交
ef5d31d950

+ 28 - 4
src/router/index.js

@@ -86,10 +86,34 @@ export const constantRoutes = [
         meta: { title: '我的工作台' }
       },
       {
-        path: 'projectPage',
-        name: 'projectPage',
-        component: () => import('@/views/Platform/projectPage'),
-        meta: { title: '项目管理' }
+        path: '/Platform/projectManage',
+        name: '项目管理',
+        component: () => import('@/views/Platform/presentation/testa'),
+        redirect: '/Platform/projectManage/projectList',
+        meta: { title: '项目管理' },
+        children: [
+          {
+            path: 'projectList',
+            name: '项目列表',
+            component: () => import('@/views/projectManage/projectList/projectListIndex'),
+            meta: { title: '项目列表' },
+            children: [
+              {
+                path: 'projectCreate',
+                hidden: true,
+                name: '项目创建',
+                component: () => import('@/views/projectManage/projectList/projectCreate'),
+                meta: { title: '项目创建' }
+              }
+            ]
+          },
+          {
+            path: 'taskList',
+            name: '任务列表',
+            component: () => import('@/views/projectManage/taskList/taskListIndex'),
+            meta: { title: '任务列表' }
+          }
+        ]
       },
       {
         path: 'useCasePage',

+ 0 - 0
src/views/projectManage/projectList/projectCreate.vue


+ 158 - 0
src/views/projectManage/projectList/projectListIndex.vue

@@ -0,0 +1,158 @@
+<template>
+  <div id="init-window" style="position:relative">
+    <router-view />
+    <div style="position: absolute;width: 100%;">
+      <div class="set-background">
+        <div class="block">
+          <el-form :model="queryCode">
+            <div class="set-between">
+              <el-form-item label="创建时间" label-width="70px"><el-date-picker v-model="form.dateQuery" align="left" size="medium" type="datetime" style="width:76%;" placeholder="选择日期" :picker-options="pickerOptions" /></el-form-item>
+              <el-form-item label="项目名称" label-width="70px"><el-input v-model="form.creator" placeholder="请选择项目" autocomplete="off" size="medium" style="width:76%;" /></el-form-item>
+              <el-form-item label="状态" label-width="40px">
+                <el-select v-model="form.statusString" size="medium" style="width:50%;" clearable placeholder="状态">
+                  <el-option v-for="item in statusOptions" :key="item.value" :label="item.name" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </div>
+            <div class="set-between">
+              <el-button type="primary" plain size="medium" @click="dataQuery(queryCode)">查询</el-button>
+              <el-button type="primary" plain size="medium" @click="createdCode()">新增</el-button>
+            </div>
+          </el-form>
+          <div class="set-locate">
+            <el-table
+              :data="tableData"
+              border
+              style="width: 100%"
+              size="mini"
+            >
+              <el-table-column
+                prop="id"
+                label="ID"
+                align="center"
+                width="80"
+              />
+              <el-table-column
+                prop="vehicleId"
+                label="项目名称"
+                align="center"
+                width="200"
+              />
+              <el-table-column
+                prop="vehicleVersion"
+                label="状态"
+                align="center"
+                width="130"
+              />
+              <el-table-column
+                prop="ecuId"
+                label="创建时间"
+                align="center"
+              />
+              <el-table-column
+                label="操作"
+                align="center"
+                width="300"
+              >
+                <template>
+                  <div>
+                    <el-button size="mini" type="primary" plain>编辑</el-button>
+                    <el-button size="mini" type="danger" plain>删除</el-button>
+                  </div>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-pagination background style="margin-top:30px;" align="center" :current-page="curIndex" :page-size="pageSize" layout="prev, pager, next" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+
+export default {
+  data() {
+    return {
+      tableData: [{ name: 'hah' }],
+      form: {},
+      queryCode: {},
+      curIndex: 1,
+      pageSize: 20,
+      total: 0,
+      statusOptions: [],
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()
+        },
+        shortcuts: [
+          {
+            text: '最近一周',
+            onClick(picker) {
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', start)
+            }
+          }, {
+            text: '最近一个月',
+            onClick(picker) {
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', start)
+            }
+          }
+        ]
+      }
+    }
+  },
+  methods: {
+    createdCode() {
+      this.$router.push({ name: '项目创建', params: { formData: this.form }, query: { id: this.form.id }})
+    },
+    handleSizeChange(size) {
+      this.pageSize = size
+    },
+    handleCurrentChange(curIndex) {
+      this.curIndex = curIndex
+    },
+    successFun(successText) {
+      this.$notify({ title: 'Success', message: `${successText} Successfully`, type: 'success', duration: 2000 })
+    },
+    errorFun(errorText) {
+      this.$notify({ title: 'Failed', message: `${errorText} Failed`, type: 'error', duration: 2000 })
+    }
+  }
+}
+</script>
+
+<style lang="stylus" scoped>
+  .set-background
+    background-color #F2F3F6
+    display flex
+    justify-content center
+    min-width 1000px
+    .block
+      background-color rgba(255,255,255,1)
+      box-shadow 0px 0px 11px 0px rgba(238,240,245,1)
+      border-radius 7px
+      width 96%
+      margin 25px 0
+      padding 20px
+      min-height calc(100vh - 100px)
+    .block >>> .el-form
+      display flex
+      justify-content space-between
+      margin-top 10px
+    .block >>> .el-form-item__content
+      margin-left 0 !important
+    .set-between
+      display flex
+    .set-between >>> .el-button
+      height 36px
+    .set-between >>> .el-form-item
+      display flex
+      margin-right -35px
+    .set-locate
+      margin-top 15px
+</style>

+ 13 - 0
src/views/projectManage/taskList/taskListIndex.vue

@@ -0,0 +1,13 @@
+<template>
+  <div>
+    13233333333333333
+  </div>
+</template>
+
+<script>
+
+</script>
+
+<style lang="stylus" scoped>
+
+</style>

+ 1 - 1
src/views/quality/qualityMeasurement.vue

@@ -1,6 +1,6 @@
 
 <template>
-  <el-container v-loading.fullscreen.lock="loadingOnlineProcess" element-loading-background="rgba(0, 0, 0, 0.7)" element-loading-text="拼命加载中" class="set-background">
+  <el-container v-loading="loadingOnlineProcess" element-loading-background="rgba(0, 0, 0, 0.7)" element-loading-text="拼命加载中" class="set-background">
     <el-header class="header">
       <el-menu :default-active="activeIndex" active-text-color="#409EFF" mode="horizontal" @select="handleSelect">
         <el-menu-item index="0">业务线数据</el-menu-item>