zhaozhipeng 4 years ago
parent
commit
682238556b

BIN
dist.zip


+ 6 - 2
src/App.vue

@@ -3,10 +3,15 @@
     <router-view/>
   </div>
 </template>
-
+http://81.70.84.72:30043/front
 <script>
+import { setStore } from '@/utils/store'
 export default {
     name: "App",
+    created() {
+      let token = this.$route.query.token
+      setStore({'name':'token', 'content': token, 'type':''})
+    }
 }
 </script>
 
@@ -24,7 +29,6 @@ body {
     -webkit-font-smoothing: antialiased;
     -moz-osx-font-smoothing: grayscale;
     color: #2c3e50;
-    widows: 100%;
     height: 100%;
 }
 </style>

+ 2 - 0
src/api/common.js

@@ -24,3 +24,5 @@ export const getTemplateByDeptId = (object) => { return request({ url: "/common/
 // 根据区域id获取工位
 export const getStationByDeptId = (object) => { return request({ url: "/common/getStationByDeptId", data: object})}
 
+// 获取当前登录用户详情
+export const getLoginUserInfo = (object) => { return request({ url: "/common/getLoginUserInfo", data: object})}

+ 3 - 0
src/api/standingManage.js

@@ -2,3 +2,6 @@ import request from '@/utils/request'
 
 // 查询点检记录列表
 export const selectPage = (object) => { return request({ url: "/checkRecordManager/selectPage", data: object})}
+
+// 批量导出
+export const exportAll = (object) => { return request({ url: "/checkRecordManager/exportAll", data: object})}

+ 0 - 12
src/components/leftnav.vue

@@ -63,18 +63,6 @@ export default {
               menus: null
             }
           ]
-        },
-        {
-          menu_id: 2,
-          icon: 'el-icon-tickets',
-          menu_name: '计划管理',
-          url: null,
-        },
-        {
-         menu_id: 3,
-         icon: 'el-icon-tickets',
-         menu_name: '问题管理',
-         url: null,
         }
       ],
       msg: 'success'

+ 21 - 21
src/components/navcon.vue

@@ -8,7 +8,7 @@
 <!--    </el-button>-->
     <div class="submenu">
       <div style="margin-right: 20px">点检班组:&emsp;{{ userName }}</div>
-      <el-button size="small" type="primary" @click="exit">退出登录</el-button>
+<!--      <el-button size="small" type="primary" @click="exit">退出登录</el-button>-->
     </div>
   </el-menu>
 </template>
@@ -32,27 +32,27 @@ export default {
     }
   },
   methods: {
-    // 退出登录
-    exit() {
-      this.$confirm('退出登录, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-            this.$store.commit('logout')
-            this.$router.push({ path: '/login' })
-            this.$message({type: 'success', message: '已退出登录!'})
-        })
-        .catch(() => {
-          this.$message({ type: 'info', message: '已取消'})
-        })
-    },
+    // // 退出登录
+    // exit() {
+    //   this.$confirm('退出登录, 是否继续?', '提示', {
+    //     confirmButtonText: '确定',
+    //     cancelButtonText: '取消',
+    //     type: 'warning'
+    //   })
+    //     .then(() => {
+    //         this.$store.commit('logout')
+    //         this.$router.push({ path: '/login' })
+    //         this.$message({type: 'success', message: '已退出登录!'})
+    //     })
+    //     .catch(() => {
+    //       this.$message({ type: 'info', message: '已取消'})
+    //     })
+    // },
     // 切换显示
-    toggle(val) {
-      this.collapsed = !val
-      this.$root.Bus.$emit('toggle', this.collapsed)
-    }
+    // toggle(val) {
+    //   this.collapsed = !val
+    //   this.$root.Bus.$emit('toggle', this.collapsed)
+    // }
   }
 }
 </script>

+ 1 - 1
src/main.js

@@ -18,7 +18,7 @@ Vue.prototype.$axios = axios;
 Vue.config.productionTip = false;
 
 // 文件上传域名
-Vue.prototype.$imgUrl = "http://blue.cn1.utools.club/api1/file/uploadOne"
+Vue.prototype.$imgUrl = "http://81.70.84.72:30045/file/uploadOne"
 
 // 使用element UI
 Vue.use(ElementUI);

+ 6 - 7
src/utils/request.js

@@ -10,8 +10,8 @@ import Router from '../router'
  */
 const request = axios.create({
   // baseURL: process.env.BASE_API,
-  baseURL: '/api',
-  // baseURL: 'http://blue.cn1.utools.club/api4/',
+  // baseURL: '/api',
+  baseURL: 'http://81.70.84.72:30048/',
   timeout: process.env.TIME_OUT,
   method: "post",
   type: "JSON"
@@ -25,14 +25,13 @@ request.interceptors.request.use(config => {
   //  显示加载
   // Spin.show()
   //  获取accessToken
-  // let accessToken = getStore({'name':'token','type':'','debug':''})
+  let accessToken = getStore({'name':'token','type':'','debug':''})
   //  添加请求头信息,处理安全性问题
-  // console.log(accessToken);
-  let accessToken = "jHi7Dl/bt40mdEZ1c/fKZGTJG07GB8gpc/aydZaHILo=";
-  if (accessToken !== undefined) {
+  if (!accessToken !== undefined) {
     config.headers.Authorization = accessToken
   } else {
-    config.headers.Authorization = 'Basic dnVlOnZ1ZQ=='
+    // config.headers.Authorization = 'Basic dnVlOnZ1ZQ=='
+    config.headers.Authorization = "jHi7Dl/bt40mdEZ1c/fKZGTJG07GB8gpc/aydZaHILo="
   }
 
   //  添加时间戳防止IE不刷新页面

+ 16 - 10
src/views/index.vue

@@ -17,6 +17,8 @@
 // 导入组件
 import navCon from '../components/navCon.vue'
 import leftNav from '../components/leftNav.vue'
+import { setStore } from '@/utils/store'
+import { getLoginUserInfo } from "@/api/common"
 
 export default {
   name: 'index',
@@ -33,20 +35,24 @@ export default {
   methods: {
   },
   created() {
-    // 监听
-    this.$root.Bus.$on('toggle', value => {
-      if (value) {
-        this.showclass = 'aside_show'
-      } else {
-        setTimeout(() => {
-          this.showclass = 'aside'
-        }, 300)
-      }
+    getLoginUserInfo().then(res=> {
+      console.log(res.data);
+      setStore({'name': 'user', 'content': res.data, 'type':''})
     })
+    // // 监听
+    // this.$root.Bus.$on('toggle', value => {
+    //   if (value) {
+    //     this.showclass = 'aside_show'
+    //   } else {
+    //     setTimeout(() => {
+    //       this.showclass = 'aside'
+    //     }, 300)
+    //   }
+    // })
   },
   destroyed() {
     // 关闭事件总线
-    this.$root.Bus.$off('toggle')
+    // this.$root.Bus.$off('toggle')
   }
 }
 </script>

+ 12 - 5
src/views/standingManage/index.vue

@@ -135,7 +135,7 @@
 <script>
   import Pagination from '@/components/Pagination'
   import { getArea,getTemplateByDeptId,getStationByDeptId } from '@/api/common'
-  import { selectPage } from '@/api/standingManage'
+  import { selectPage,exportAll } from '@/api/standingManage'
   // 一页数据量
   const pageSize = 8
   export default {
@@ -154,7 +154,7 @@
           "startDate": "",
           "endDate": "",
           "page": 1,
-          "size":pageSize
+          "size": pageSize
         },
         "areas": [],
         "template": [],
@@ -183,7 +183,8 @@
     methods: {
       // 获取点检列表
       get_list() {
-        selectPage().then(res => {
+        let data = this.searchData
+        selectPage(data).then(res => {
           console.log(res.data);
           this.standingManageList = res.data.row
           this.pageInfo.total = parseInt(res.data.total)
@@ -207,7 +208,12 @@
       },
       // 检索
       search() {
-        console.log(this.searchData);
+        let data = this.searchData
+        selectPage(data).then(res => {
+          console.log(res.data);
+          this.standingManageList = res.data.row
+          this.pageInfo.total = parseInt(res.data.total)
+        })
       },
       // 重置
       reset(formName) {
@@ -216,7 +222,8 @@
       },
       // 批量导出
       batchExport() {
-        console.log("批量导出");
+        let data = this.searchData
+        exportAll()
       },
       // 下载
       download() {

+ 2 - 1
src/views/task/addTask.vue

@@ -1100,7 +1100,8 @@
       },
       // 新增
       add_transactional() {
-        Object.assign(this.$data.transactionalFrom, this.$options.data().transactionalFrom)
+        this.transactionalFrom = { "name": "" }
+        // Object.assign(this.$data.transactionalFrom, this.$options.data().transactionalFrom)
         this.transactionalStatus = true
       },
       // 执行新增

+ 8 - 0
src/views/template/addTemplate.vue

@@ -610,6 +610,8 @@
             if(parseInt(res.status) === 20000) {
               this.templateID = res.data
               this.$message.success('保存成功')
+            } else {
+              this.$message.error(res.message)
             }
           })
         } else {
@@ -618,6 +620,8 @@
             if(parseInt(res.status) === 20000) {
               this.templateID = res.data
               this.$message.success('保存成功')
+            } else {
+              this.$message.error(res.message)
             }
           })
         }
@@ -631,6 +635,8 @@
             if(parseInt(res.status) === 20000) {
               this.$message.success('发布成功')
               this.$router.back()
+            } else {
+              this.$message.error(res.message)
             }
           })
         //  直接发布
@@ -642,6 +648,8 @@
               this.templateID = res.data
               this.$message.success('发布成功')
               this.$router.back()
+            } else {
+              this.$message.error(res.message)
             }
           })
         }

+ 0 - 1
src/views/template/template.vue

@@ -81,7 +81,6 @@
 
 <script>
   import Pagination from '@/components/Pagination'
-
   import { getArea,getDept } from "@/api/common"
   import { selectPage,deleteById,publishById } from "@/api/template"
   // 一页数据量