浏览代码

Merge branch 'master' of http://47.100.37.243:10080/wutt/lsappBms

5 年之前
父节点
当前提交
518de0715b
共有 57 个文件被更改,包括 2021 次插入14039 次删除
  1. 5 0
      lss_vue/package-lock.json
  2. 1 0
      lss_vue/package.json
  3. 20 5
      lss_vue/src/App.vue
  4. 二进制
      lss_vue/src/assets/bg1.jpg
  5. 二进制
      lss_vue/src/assets/image/add.png
  6. 二进制
      lss_vue/src/assets/image/camera.png
  7. 二进制
      lss_vue/src/assets/image/loadMore.png
  8. 二进制
      lss_vue/src/assets/image/my_assets.png
  9. 二进制
      lss_vue/src/assets/image/my_com.png
  10. 二进制
      lss_vue/src/assets/image/my_message.png
  11. 二进制
      lss_vue/src/assets/image/my_score.png
  12. 二进制
      lss_vue/src/assets/image/my_sug.png
  13. 二进制
      lss_vue/src/assets/image/my_sys.png
  14. 二进制
      lss_vue/src/assets/image/noList.png
  15. 二进制
      lss_vue/src/assets/image/on_1.png
  16. 二进制
      lss_vue/src/assets/image/on_2.png
  17. 二进制
      lss_vue/src/assets/image/pull_down.png
  18. 二进制
      lss_vue/src/assets/image/userHead.jpg
  19. 二进制
      lss_vue/src/assets/logo.png
  20. 二进制
      lss_vue/src/assets/logo4.png
  21. 0 16
      lss_vue/src/http.js
  22. 4 43
      lss_vue/src/main.js
  23. 10 0
      lss_vue/src/port.js
  24. 16 130
      lss_vue/src/routes.js
  25. 0 1
      lss_vue/src/styles/vars.scss
  26. 37 325
      lss_vue/src/views/Home.vue
  27. 10 4
      lss_vue/src/views/Login.vue
  28. 0 841
      lss_vue/src/views/agency/agencyDetail.vue
  29. 0 142
      lss_vue/src/views/agency/agencyList.vue
  30. 549 0
      lss_vue/src/views/assets/assets.vue
  31. 282 0
      lss_vue/src/views/assets/assetsDetail.vue
  32. 425 0
      lss_vue/src/views/assets/assetsRegister.vue
  33. 0 639
      lss_vue/src/views/base/allocation.vue
  34. 0 476
      lss_vue/src/views/base/comp.vue
  35. 0 601
      lss_vue/src/views/base/factory.vue
  36. 0 1185
      lss_vue/src/views/book/bookDetail.vue
  37. 0 341
      lss_vue/src/views/book/bookList.vue
  38. 524 0
      lss_vue/src/views/data/data.vue
  39. 0 173
      lss_vue/src/views/detection/detection.vue
  40. 0 726
      lss_vue/src/views/detection/maintenance.vue
  41. 0 151
      lss_vue/src/views/invite.vue
  42. 0 344
      lss_vue/src/views/map/map.vue
  43. 0 264
      lss_vue/src/views/message.vue
  44. 0 1776
      lss_vue/src/views/mold/moldDetail.vue
  45. 0 250
      lss_vue/src/views/mold/moldDownload.vue
  46. 0 459
      lss_vue/src/views/mold/moldList.vue
  47. 138 0
      lss_vue/src/views/my/my.vue
  48. 0 296
      lss_vue/src/views/project/competence.vue
  49. 0 354
      lss_vue/src/views/project/project.vue
  50. 0 1139
      lss_vue/src/views/project/projectDetail.vue
  51. 0 547
      lss_vue/src/views/project/staff.vue
  52. 0 639
      lss_vue/src/views/system/allocation.vue
  53. 0 601
      lss_vue/src/views/system/manage.vue
  54. 0 476
      lss_vue/src/views/system/vip.vue
  55. 0 547
      lss_vue/src/views/user/reserve.vue
  56. 0 547
      lss_vue/src/views/user/user.vue
  57. 0 1
      pcbms/pom.xml

+ 5 - 0
lss_vue/package-lock.json

@@ -4985,6 +4985,11 @@
       "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
       "dev": true
     },
+    "jquery": {
+      "version": "3.4.1",
+      "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz",
+      "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw=="
+    },
     "js-base64": {
       "version": "2.5.1",
       "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz",

+ 1 - 0
lss_vue/package.json

@@ -14,6 +14,7 @@
     "echarts": "^3.8.5",
     "element-ui": "^2.10.1",
     "font-awesome": "^4.7.0",
+    "jquery": "^3.4.1",
     "mint-ui": "^2.2.13",
     "nprogress": "^0.2.0",
     "vue": "^2.6.10",

+ 20 - 5
lss_vue/src/App.vue

@@ -1,16 +1,31 @@
 <template>
 	<div id="app">
-		<!-- <transition name="fade" mode="out-in"> -->
-            <!-- <mt-header fixed title="fixed top"></mt-header> -->
-			<router-view></router-view>
-		<!-- </transition> -->
+        <router-view v-if="isRouterAlive"></router-view>
 	</div>
 </template>
 
 <script>
     export default {
         name: 'app',
-        components: {}
+        components: {},
+        provide (){
+            return {
+                reload: this.reload
+            }
+        },
+        data (){
+            return {
+                isRouterAlive: true
+            }
+        },
+        methods: {
+            reload () {
+                this.isRouterAlive = false;
+                this.$nextTick(function(){
+                    this.isRouterAlive = true;
+                })
+            }
+        },
     }
 </script>
 

二进制
lss_vue/src/assets/bg1.jpg


二进制
lss_vue/src/assets/image/add.png


二进制
lss_vue/src/assets/image/camera.png


二进制
lss_vue/src/assets/image/loadMore.png


二进制
lss_vue/src/assets/image/my_assets.png


二进制
lss_vue/src/assets/image/my_com.png


二进制
lss_vue/src/assets/image/my_message.png


二进制
lss_vue/src/assets/image/my_score.png


二进制
lss_vue/src/assets/image/my_sug.png


二进制
lss_vue/src/assets/image/my_sys.png


二进制
lss_vue/src/assets/image/noList.png


二进制
lss_vue/src/assets/image/on_1.png


二进制
lss_vue/src/assets/image/on_2.png


二进制
lss_vue/src/assets/image/pull_down.png


二进制
lss_vue/src/assets/image/userHead.jpg


二进制
lss_vue/src/assets/logo.png


二进制
lss_vue/src/assets/logo4.png


+ 0 - 16
lss_vue/src/http.js

@@ -1,6 +1,5 @@
 import axios from 'axios'
 import qs from 'qs'
-import { Indicator } from 'mint-ui';
 
 const TIME_OUT_MS = 60 * 1000 // 默认请求超时时间
 
@@ -37,7 +36,6 @@ export default {
      * @param exception 异常的回调函数
      */
     post (url, data, response, exception) {
-        Indicator.open();
         axios({
             method: 'post',
             url: handleUrl(url),
@@ -49,12 +47,10 @@ export default {
             }
         }).then(
             (result) => {
-                Indicator.close();
                 response(handleResults(result))
             }
         ).catch(
             (error) => {
-                Indicator.close();
                 if (exception) {
                     exception(error)
                 } else {
@@ -70,7 +66,6 @@ export default {
      * @param exception 异常的回调函数
      */
     get (url , response, exception) {
-        Indicator.open();
         axios({
             method: 'get',
             url: handleUrl(url),
@@ -79,12 +74,10 @@ export default {
             }
         }).then(
             (result) => {
-                Indicator.close();
                 response(handleResults(result))
             }
         ).catch(
             (error) => {
-                Indicator.close();
                 if (exception) {
                     exception(error)
                 } else {
@@ -101,7 +94,6 @@ export default {
      * @param exception 异常的回调函数
      */
     uploadFile (url, data, response, exception) {
-        Indicator.open();
         axios({
             method: 'post',
             url: handleUrl(url),
@@ -111,12 +103,10 @@ export default {
             contentType: false
         }).then(
             (result) => {
-                Indicator.close();
                 response(handleResults(result, data))
             }
         ).catch(
             (error) => {
-                Indicator.close();
                 if (exception) {
                     exception(error)
                 } else {
@@ -133,7 +123,6 @@ export default {
      * @param exception 异常的回调函数
      */
     downloadFile (url, data, fileName, exception) {
-        Indicator.open();
         axios({
             method: 'post',
             url: handleUrl(url),
@@ -141,7 +130,6 @@ export default {
             responseType: 'blob'
         }).then(
             (result) => {
-                Indicator.close();
                 const excelBlob = result.data
                 if ('msSaveOrOpenBlob' in navigator) {
                     window.navigator.msSaveOrOpenBlob(excelBlob, fileName)
@@ -158,7 +146,6 @@ export default {
             }
         ).catch(
             (error) => {
-                Indicator.close();
                 if (exception) {
                     exception(error)
                 } else {
@@ -168,7 +155,6 @@ export default {
         )
     },
     uploadFileFormData (url, data, response, exception) {
-        Indicator.open();
         axios({
             method: 'post',
             url: handleUrl(url),
@@ -179,12 +165,10 @@ export default {
             }
         }).then(
             (result) => {
-                Indicator.close();
                 response(handleResults(result))
             }
         ).catch(
             (error) => {
-                Indicator.close();
                 if (exception) {
                     exception(error)
                 } else {

+ 4 - 43
lss_vue/src/main.js

@@ -49,49 +49,10 @@ router.beforeEach((to, from, next) => {
     if (!user && to.path != '/login') {
         next({ path: '/login' })
     } else {
-        if(user){
-            for(var i in routes){
-                if(routes[i].name == "基础管理" && user.parentId != 0){
-                    routes[i].hidden = true
-                } else if(routes[i].name == "基础管理"){
-                    routes[i].hidden = false
-                }
-                
-                if(routes[i].name == "项目管理" && user.parentId > 1){
-                    var children = routes[i].children;
-                    for(var j in children){
-
-                        if(children[j].name == "人员管理"){
-                            if(user.isManager == 0){
-                                children[j].hidden = true
-                            } else {
-                                children[j].hidden = false
-                            }
-                        }
-
-                        if(children[j].name == "权限管理"){
-                            if(user.isManager == 0){
-                                children[j].hidden = true
-                            } else {
-                                children[j].hidden = false
-                            }
-                        }
-                    }
-                } else if(routes[i].name == "项目管理") {
-                    var children = routes[i].children;
-                    for(var j in children){
-                        if(children[j].name != "项目详情"){
-                            children[j].hidden = false
-                        }
-                        
-                        if(children[j].name == "权限管理"){
-                            if((user.parentId == 0 || user.parentId == 1) && user.isManager == 0){
-                                children[j].hidden = true
-                            }
-                        }
-                    }
-                }
-            }
+        if(to.path == '/assets' || to.path == '/data' || to.path == '/my') {
+            $(".tabber").show();
+        } else {
+            $(".tabber").hide();
         }
         next()
     }

+ 10 - 0
lss_vue/src/port.js

@@ -6,6 +6,16 @@ export default {
     pwd: {
         resetPwd: '/system/updatePwd' // 重置密码
     },
+    label: {
+        list: '/goodstags/list',
+        add: '/goodstags/addOrUpdate',
+    },
+    assets: {
+        list: '/goods/list',
+        detail: '/goods/detail',
+        add: '/goods/add',
+        update: '/goods/update',
+    },
     agency: {
         list: '/institutional/list',
         detail: '/institutional/detail',

+ 16 - 130
lss_vue/src/routes.js

@@ -1,38 +1,18 @@
 import Login from './views/Login.vue'
 import NotFound from './views/404.vue'
 import Home from './views/Home.vue'
-import message from './views/message.vue'
-import invite from './views/invite.vue'
 
-import map from './views/map/map.vue'
+// 资产
+import assets from './views/assets/assets.vue'
+import assetsDetail from './views/assets/assetsDetail.vue'
+import assetsRegister from './views/assets/assetsRegister.vue'
 
-import detection from './views/detection/detection.vue'
-import maintenance from './views/detection/maintenance.vue'
+// 数据
+import data from './views/data/data.vue'
 
-import project from './views/project/project.vue'
-import projectDetail from './views/project/projectDetail.vue'
-import staff from './views/project/staff.vue'
-import competence from './views/project/competence.vue'
+// 我的
+import my from './views/my/my.vue'
 
-import moldList from './views/mold/moldList.vue'
-import moldDetail from './views/mold/moldDetail.vue'
-import moldDownload from './views/mold/moldDownload.vue'
-
-import comp from './views/base/comp.vue'
-import factory from './views/base/factory.vue'
-import allocation from './views/base/allocation.vue'
-
-import agency from './views/agency/agencyList.vue'
-import agencyDetail from './views/agency/agencyDetail.vue'
-
-import book from './views/book/bookList.vue'
-import bookDetail from './views/book/bookDetail.vue'
-
-import user from './views/user/user.vue'
-import reserve from './views/user/reserve.vue'
-
-import manage from './views/system/manage.vue'
-import vip from './views/system/vip.vue'
 
 let routes = [
     {
@@ -41,132 +21,38 @@ let routes = [
         name: '',
         hidden: true
     },
-    //培训机构
-    {
-        path: '/',
-        component: Home,
-        name: '',
-        iconCls: 'iconfont iconpeixunjigou',
-        leaf: true,//只有一个节点
-        children: [
-            { path: '/agency', component: agency, name: '培训机构' },
-            { path: '/agency/:id', component: agencyDetail, name: '机构详情', hidden: true }
-        ]
-    },
-    //课程管理
+    // 资产
     {
         path: '/',
         component: Home,
         name: '',
-        iconCls: 'iconfont iconkecheng',
         leaf: true,//只有一个节点
         children: [
-            { path: '/book', component: book, name: '课程管理' },
-            { path: '/book/:id', component: bookDetail, name: '课程详情', hidden: true }
-        ]
-    },
-    //图书管理
-    {
-        path: '/',
-        component: Home,
-        name: '',
-        iconCls: 'iconfont iconic_local_library_px',
-        leaf: true,//只有一个节点
-        children: [
-            { path: '/book', component: book, name: '图书管理' },
-            { path: '/book/:id', component: bookDetail, name: '图书详情', hidden: true }
-        ]
-    },
-    //用户管理
-    {
-        path: '/',
-        component: Home,
-        name: '用户管理',
-        iconCls: 'iconfont iconyonghu',
-        children: [
-            { path: '/user', component: user, name: '用户列表' },
-            { path: '/reserve', component: reserve, name: '预约用户' }
+            { path: '/assets', component: assets, name: '资产', meta: {keepAlive: true, parentPath:'/tab_assets'} },
+            { path: '/assets/:id', component: assetsDetail, name: '资产详情', meta: {keepAlive: true, parentPath:'/tab_assets'} },
+            { path: '/assetsRegister', component: assetsRegister, name: '登记资产', meta: {keepAlive: true, parentPath:'/tab_assets'} },
         ]
     },
-    //系统管理
-    {
-        path: '/',
-        component: Home,
-        name: '系统管理',
-        iconCls: 'iconfont iconsetting-fill',
-        children: [
-            { path: '/manage', component: manage, name: '机构管理' },
-            { path: '/vip', component: vip, name: '会员设置' }
-        ]
-    },
-    //地图概览
+    // 数据
     {
         path: '/',
         component: Home,
         name: '',
-        iconCls: 'iconfont icon-ditu',
         leaf: true,//只有一个节点
         children: [
-            { path: '/map', component: map, name: '地图概览' },
-            { path: '/message', component: message, name: '消息中心', hidden: true }
+            { path: '/data', component: data, name: '数据', meta: {keepAlive: true, parentPath:'/tab_data'} }
         ]
     },
-    //运行监测
+    // 我的
     {
         path: '/',
         component: Home,
         name: '',
-        iconCls: 'iconfont icon-jiance',
         leaf: true,//只有一个节点
         children: [
-            { path: '/detection', component: detection, name: '运行检测' },
-            { path: '/detection/:id', component: maintenance, name: '运行检测详情', hidden: true }
-        ]
-    },
-    //项目管理
-    {
-        path: '/',
-        component: Home,
-        name: '项目管理',
-        iconCls: 'iconfont icon-ic_dashboard',
-        children: [
-            { path: '/project', component: project, name: '项目列表' },
-            { path: '/project/:id', component: projectDetail, name: '项目详情', hidden: true },
-            { path: '/staff', component: staff, name: '人员管理' },
-            { path: '/competence', component: competence, name: '权限管理' }
+            { path: '/my', component: my, name: '我的', meta: {keepAlive: true, parentPath:'/tab_my'} }
         ]
     },
-    //模具管理
-    {
-        path: '/',
-        component: Home,
-        name: '模具管理',
-        iconCls: 'iconfont icon-moxing',
-        children: [
-            { path: '/moldList', component: moldList, name: '模具列表' },
-            { path: '/moldList/:id/:type', component: moldDetail, name: '模具详情', hidden: true },
-            { path: '/moldDownload', component: moldDownload, name: '文档下载' }
-        ]
-    },
-    //基础管理
-    {
-        path: '/',
-        component: Home,
-        name: '基础管理',
-        iconCls: 'iconfont icon-setting-fill',
-        children: [
-            { path: '/comp', component: comp, name: '资产方管理' },
-            { path: '/factory', component: factory, name: '生产方管理' },
-            { path: '/allocation', component: allocation, name: '云模盒管理' }
-        ]
-    },
-    //邀请
-    {
-        path: '/invite/:inviteeId/:projectId/:operatorId',
-        component: invite,
-        name: '邀请',
-        hidden: true
-    },
     {
         path: '/404',
         component: NotFound,

+ 0 - 1
lss_vue/src/styles/vars.scss

@@ -1 +0,0 @@
-$color-primary: #20a0ff;//#18c79c

+ 37 - 325
lss_vue/src/views/Home.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="context">
         <router-view class="context_router"></router-view>
-        <mt-tabbar v-model="selected" fixed>
+        <mt-tabbar v-model="selected" fixed class="tabber" style="display:none">
             <mt-tab-item id="tab1" @click.native="changeTab(1)">
                 <img v-if="selected == 'tab1'" slot="icon" src="../assets/image/tab_ass_choose.png">
                 <img v-else slot="icon" src="../assets/image/tab_ass.png">
@@ -23,170 +23,57 @@
 
 <script>
     export default {
+        inject: ['reload'],
         data() {
             return {
                 selected: 'tab1',
                 user: sessionStorage.getItem("user"),
-                sysName: "小海豚后台管理系统",
-                collapsed: false,
-                sysUserName: "",
-
-                editInformation: false,
-                editPassWord: false,
-                editLoading: false,
-                editLoading2: false,
-                addForm: {
-                    id: "",
-                    password: ""
-                },
-                editInfoForm: {
-                    id: "",
-                    username: "",
-                    mobile: "",
-                    companyName: ""
-                },
-                passRule: {
-                    password: [
-                    { required: true, message: "请输入新密码", trigger: "blur" }
-                    ],
-                    username: [{ required: true, message: "请输入姓名", trigger: "blur" }]
-                },
-                //消息数据
-                popoverData: ["", "", ""],
-                unreadCount: [],
-                activePage: 0,
-
-                //时间
-                activeDate: new Date()
+                showTab: true,
             };
         },
         methods: {
             changeTab(type) {
-                console.log(type)
-            },
-
-            //退出登录
-            logout: function() {
-                var _this = this;
-                this.$confirm("确认退出吗?", "提示", {
-                    type: 'warning'
-                }).then(() => {
-                    sessionStorage.removeItem("user");
-                    _this.$router.push("/login");
-                });
-            },
-
-            //折叠导航栏
-            collapse: function() {
-                this.collapsed = !this.collapsed;
-            },
-
-            showMenu(i, status) {
-                this.$refs.menuCollapsed.getElementsByClassName(
-                    "submenu-hook-" + i
-                )[0].style.display = status ? "block" : "none";
-            },
-
-            //打开编辑信息界面
-            editInfoOpen() {
-                this.editInformation = true;
-                this.editInfoForm.id = JSON.parse(sessionStorage.getItem("user")).id;
-                this.editInfoForm.username = JSON.parse(
-                    sessionStorage.getItem("user")
-                ).username;
-                this.editInfoForm.mobile = JSON.parse(
-                    sessionStorage.getItem("user")
-                ).account;
-                this.editInfoForm.companyName = JSON.parse(
-                    sessionStorage.getItem("user")
-                ).companyName;
-            },
-
-            //编辑信息
-            editInfo() {
-                this.$refs.editInfoForm.validate(valid => {
-                    if (valid) {
-                        this.editLoading2 = true;
-                        this.http.post( this.port.pwd.resetPwd,{ 
-                            id: this.editInfoForm.id, 
-                            username: this.editInfoForm.username 
-                        },
-                        res => {
-                            this.editLoading2 = false;
-                            this.editInformation = false;
-                            if (res.code == "ok") {
-                                this.$message({
-                                    message: "修改成功",
-                                    type: "success"
-                                });
-                                //读取并覆盖session storage
-                                var userObject = JSON.parse(sessionStorage.getItem("user"));
-                                userObject.username = this.editInfoForm.username;
-                                sessionStorage.setItem("user", JSON.stringify(userObject));
-                                this.sysUserName = this.editInfoForm.username;
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: "error"
-                                });
-                            }
-                        },
-                        error => {
-                            this.editLoading2 = false;
-                            this.editInformation = false;
-                            this.$message({
-                                message: error,
-                                type: "error"
-                            });
-                        });
+                if(type == 1) {
+                    if(this.$router.history.current.fullPath == '/assets') {
+                        this.reload();
+                    } else {
+                        this.$router.push({ path: '/assets' });
                     }
-                });
-            },
-
-            reset() {
-                this.editPassWord = true;
-                this.addForm.id = JSON.parse(sessionStorage.getItem("user")).id;
-                this.addForm.account = JSON.parse(sessionStorage.getItem("user")).account;
-            },
-
-            resetPwd() {
-                this.$refs.addForm.validate(valid => {
-                    if (valid) {
-                        this.editLoading = true;
-                        this.http.post( this.port.pwd.resetPwd, this.addForm,
-                        res => {
-                            this.editLoading = false;
-                            this.editPassWord = false;
-                            if (res.code == "ok") {
-                                this.$message({
-                                    message: "修改成功,请重新登录",
-                                    type: "success"
-                                });
-                                this.$router.push("/login");
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: "error"
-                                });
-                            }
-                        },
-                        error => {
-                            this.editLoading = false;
-                            this.editPassWord = false;
-                            this.$message({
-                                message: error,
-                                type: "error"
-                            });
-                        });
+                } else if(type == 2) {
+                    if(this.$router.history.current.fullPath == '/data') {
+                        this.reload();
+                    } else {
+                        this.$router.push({ path: '/data' });
+                    }
+                } else if(type == 3) {
+                    if(this.$router.history.current.fullPath == '/my') {
+                        this.reload();
+                    } else {
+                        this.$router.push({ path: '/my' });
                     }
-                });
+                }
             },
         },
+        created() {
+            if(this.$router.history.current.meta.parentPath == "/tab_assets") {
+                this.selected = "tab1"
+            } else if(this.$router.history.current.meta.parentPath == "/tab_data") {
+                this.selected = "tab2"
+            } else if(this.$router.history.current.meta.parentPath == "/tab_my") {
+                this.selected = "tab3"
+            }
+        },
         mounted() {
+             if( this.$router.history.current.fullPath == '/assets' || 
+                this.$router.history.current.fullPath == '/data' || 
+                this.$router.history.current.fullPath == '/my') {
+                $(".tabber").show();
+            } else {
+                $(".tabber").hide();
+            }
             if (this.user) {
                 var user = JSON.parse(this.user);
                 this.user = user;
-                this.sysUserName = user.roleName || "";
             } else {
                 this.$router.push("/login");
             }
@@ -195,187 +82,12 @@
 </script>
 
 <style scoped lang="scss">
-    @import "~scss_vars";
-
     .context {
         height: 100%;
+        background: #EFEFEF;
     }
 
     .context_router {
         height: calc(100% - 55px);
     }
-
-    .el-menu-vertical-demo i {
-        margin-right: 10px;
-    }
-
-    .container .header .logo img.headImg {
-        margin: 0;
-        width: 40px;
-        height: 40px;
-        margin: 10px 0 0 10px;
-    }
-
-    .itemNew {
-        height: 25px;
-        margin-right: 25px;
-        i {
-            vertical-align: top;
-        }
-    }
-
-    .container {
-        position: absolute;
-        top: 0px;
-        bottom: 0px;
-        width: 100%;
-        .header {
-            height: 60px;
-            line-height: 60px;
-            background: $color-primary;
-            color: #fff;
-            .userinfo {
-                text-align: right;
-                padding-right: 35px;
-                float: right;
-
-                .userinfo-inner {
-                    cursor: pointer;
-                    color: #fff;
-                    img {
-                        width: 40px;
-                        height: 40px;
-                        border-radius: 20px;
-                        margin: 10px 10px 10px 10px;
-                        float: left;
-                    }
-                }
-            }
-            .logo {
-                height: 60px;
-                font-size: 21px;
-                padding-left: 20px;
-                padding-right: 20px;
-                border-color: rgba(238, 241, 146, 0.3);
-                border-right-width: 1px;
-                border-right-style: solid;
-                img {
-                    width: 40px;
-                    float: left;
-                    margin: 10px 10px 10px 18px;
-                }
-                .txt {
-                    color: #fff;
-                }
-            }
-
-            .logo-width {
-                width: 230px;
-            }
-
-            .logo-collapse-width {
-                width: 60px;
-            }
-
-            .tools {
-                padding: 0px 23px;
-                width: 14px;
-                height: 60px;
-                line-height: 60px;
-                cursor: pointer;
-            }
-        }
-        .main {
-            display: flex;
-            position: absolute;
-            top: 60px;
-            bottom: 0px;
-            overflow: hidden;
-            aside {
-                flex: 0 0 230px;
-                width: 230px;
-                .el-menu {
-                    height: 100%;
-                }
-                .collapsed {
-                    width: 60px;
-                    .item {
-                        position: relative;
-                    }
-                    .submenu {
-                        position: absolute;
-                        top: 0px;
-                        left: 60px;
-                        z-index: 99999;
-                        height: auto;
-                        display: none;
-                    }
-                }
-            }
-
-            .menu-collapsed {
-                flex: 0 0 60px;
-                width: 60px;
-            }
-
-            .menu-expanded {
-                flex: 0 0 230px;
-                width: 230px;
-            }
-
-            .content-container {
-                flex: 1;
-                width: 80%;
-                padding: 20px;
-                background-color: #efefef;
-                .breadcrumb-container {
-                    .title {
-                        width: 200px;
-                        float: left;
-                        color: #475669;
-                    }
-                    .breadcrumb-inner {
-                        float: right;
-                    }
-                }
-                .content-wrapper {
-                    background-color: #fff;
-                    box-sizing: border-box;
-                    padding: 0 20px;
-                }
-            }
-        }
-    }
-
-    .popover-item {
-        padding: 10px;
-        border-bottom: 1px #eee solid;
-    }
-
-    .popover-item > div > p {
-        margin: 0;
-        line-height: 18px;
-    }
-
-    .popover-title {
-        color: #409eff;
-        padding-bottom: 8px;
-    }
-
-    .popover-type {
-        color: #aaa;
-        font-size: 8px;
-        float: right;
-    }
-
-    .popover-button {
-        font-weight: 900;
-        padding: 10px;
-        text-align: center;
-        cursor: pointer;
-    }
-
-    .isRead {
-        color: #999 !important;
-    }
 </style>

+ 10 - 4
lss_vue/src/views/Login.vue

@@ -6,7 +6,7 @@
             </div>
             <mt-navbar v-model="selected">
                 <mt-tab-item id="login"><div class="login_tab">登录</div></mt-tab-item>
-                <mt-tab-item id="registered"><div class="login_tab">注册</div></mt-tab-item>
+                <!-- <mt-tab-item id="registered"><div class="login_tab"></div></mt-tab-item> -->
             </mt-navbar>
         </div>
         <mt-tab-container v-model="selected" class="login_box">
@@ -100,13 +100,15 @@
                     });
                     return false;
                 } else {
+                    this.$indicator.open();
                     this.http.post(this.port.manage.login, {
                         "phone": this.ruleForm.account,
                         "password": this.ruleForm.password,
                     } , res => {
+                        this.$indicator.close();
                         if (res.code == "ok") {
                             sessionStorage.setItem('user', JSON.stringify(res.data));
-                            this.$router.push({ path: '/agency' });
+                            this.$router.push({ path: '/assets' });
                         } else {
                             this.$toast({
                                 message: res.msg,
@@ -114,8 +116,9 @@
                             });
                         }
                     }, error => {
+                        this.$indicator.close();
                         this.$toast({
-                            message: res.msg,
+                            message: error,
                             duration: 2000
                         });
                     })
@@ -186,12 +189,14 @@
                     });
                     return false;
                 } else {
+                    Indicator.open();
                     this.http.post(this.port.manage.regist, {
                         "name": this.ruleForm.regName,
                         "code": this.ruleForm.regAccount,
                         "phone": this.ruleForm.regPhone,
                         "password": this.ruleForm.regPassWord,
                     } , res => {
+                        Indicator.close();
                         this.ruleForm = {
                             account: '',
                             password: '',
@@ -213,6 +218,7 @@
                             });
                         }
                     }, error => {
+                        Indicator.close();
                         this.ruleForm = {
                             account: '',
                             password: '',
@@ -223,7 +229,7 @@
                             regPassWord1: '',
                         }
                         this.$toast({
-                            message: res.msg,
+                            message: error,
                             duration: 2000
                         });
                     })

+ 0 - 841
lss_vue/src/views/agency/agencyDetail.vue

@@ -1,841 +0,0 @@
-<template>
-    <section>
-        <!-- 机构信息 -->
-        <el-col :span="24" class="agencyHead">
-            <el-container>
-                <el-container>
-                    <el-aside width="335px;">
-                        <div class="agencyHead_img">
-                            <el-image class="agencyHead_imgbox" src="../../assets/image/userHead.png">
-                                <img src="../../assets/image/userHead.png">
-                            </el-image>
-                        </div>
-                    </el-aside>
-                    <el-container>
-                        <el-header height="90px;">
-                            {{detail.name}}
-                            <el-button type="text" @click="editDetail(0)" icon="el-icon-edit" class="agencyHead_edit"></el-button>
-                            <el-button type="text" @click="backToList" class="agencyHead_back"><i class="iconfont iconfanhui1"></i></el-button>
-                        </el-header>
-                        <el-footer>{{detail.headIntroduction}}</el-footer>
-                    </el-container>
-                </el-container>
-            </el-container>
-        </el-col>
-        
-        <el-col :span="24" :style="allDetail">
-            <!-- 轮播图 -->
-            <el-col :span="24" class="agencyBody_title">轮播图</el-col>
-            <el-col :span="24" class="agencyBody_main">
-                <!-- <el-upload ref="upload" action="customize" :http-request="uploadFile" list-type="picture-card" :auto-upload="true"> -->
-                <el-upload action="/api/projectfile/uploadFile/" accept="image/*" multiple :limit="5" :data="uploadMsg" list-type="picture-card" 
-                    :on-preview="handlePictureCardPreview" 
-                    :on-remove="handleRemove">
-                    <i slot="default" class="el-icon-plus"></i>
-                    <div slot="file" slot-scope="{file}">
-                        <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
-                        <span class="el-upload-list__item-actions">
-                            <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
-                                <i class="el-icon-zoom-in"></i>
-                            </span>
-                            <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
-                                <i class="el-icon-download"></i>
-                            </span>
-                            <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
-                                <i class="el-icon-delete"></i>
-                            </span>
-                        </span>
-                    </div>
-                </el-upload>
-                <el-dialog :visible.sync="dialogVisible">
-                    <img width="100%" :src="dialogImageUrl" alt="">
-                </el-dialog>
-            </el-col>
-
-            <!-- 基本信息 -->
-            <el-col :span="24" class="agencyBody_title">
-                基本信息
-                <el-button type="text" @click="editDetail(1)" icon="el-icon-edit" class="agencyHead_edit"></el-button>
-            </el-col>
-            <el-col :span="24" class="agencyBody_main">
-                <el-col :span="24" class="agencyBody_detail">
-                    上课时间:
-                    <span class="info" v-if="detail.amTime != null || detail.pmTime != null">{{detail.amTime}} - {{detail.pmTime}}</span>
-                    <span class="info" v-else>暂无</span>
-                </el-col>
-                <el-col :span="24" class="agencyBody_detail">
-                    收费标准:
-                    <span class="info">{{detail.chargingStandard==null?'暂无':detail.chargingStandard}}</span>
-                </el-col>
-                <el-col :span="24" class="agencyBody_detail">
-                    机构位置:
-                    <span class="info">{{detail.address==null?'暂无':detail.address}}</span>
-                </el-col>
-                <el-col :span="24" class="agencyBody_detail">
-                    联系电话:
-                    <span class="info">{{detail.projectNo==null?'暂无':detail.address}}</span>
-                </el-col>
-            </el-col>
-
-            <!-- 机构简介 -->
-            <el-col :span="24" class="agencyBody_title">
-                机构简介
-                <el-button type="text" @click="editDetail(2)" icon="el-icon-edit" class="agencyHead_edit"></el-button>
-            </el-col>
-            <el-col :span="24" class="agencyBody_main">
-                <el-col :span="24" class="agencyBody_detail">
-                    <span class="info">{{detail.briefIntroduction==null?'暂无':detail.briefIntroduction}}</span>
-                </el-col>
-            </el-col>
-
-            <!-- 课程特色 -->
-            <el-col :span="24" class="agencyBody_title">
-                课程特色
-                <el-button type="text" @click="editDetail(3)" icon="el-icon-edit" class="agencyHead_edit"></el-button>
-            </el-col>
-            <el-col :span="24" class="agencyBody_main">
-                <el-col :span="24" class="agencyBody_detail">
-                    <span class="info">{{detail.classAdvantages==null?'暂无':detail.classAdvantages}}</span>
-                </el-col>
-            </el-col>
-        </el-col>
-
-        <!--编辑界面-->
-		<el-dialog title="编辑培训机构" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="120px" :rules="formRules" ref="editForm">
-                <el-col :span="24">
-                    <el-form-item label="机构名称" prop="projectName">
-                        <el-input v-model="editForm.projectName" autocomplete="off" placeholder="请输入项目名称" style="width:510px"></el-input>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="24">
-                    <el-form-item label="机构简介">
-                        <el-input type="textarea" :rows="5" placeholder="请输入机构简介" v-model="editForm.modelIds"></el-input>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="24">
-                    <el-form-item label="机构图片">
-                        <el-upload class="avatar-uploader" accept="image/*" :limit="1" action="action" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
-                            <i slot="default" class="el-icon-plus"></i>
-                        </el-upload>
-                        <el-dialog :visible.sync="dialogVisible">
-                            <img width="100%" :src="dialogImageUrl" alt="">
-                        </el-dialog>
-                    </el-form-item>
-                </el-col>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="addSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-    </section>
-</template>
-
-<script>
-    import util from "../../common/js/util";
-
-    export default {
-        data() {
-            return {
-                //基础信息
-                detailId: this.$route.params.id,
-                user: JSON.parse(sessionStorage.getItem('user')),
-                detail: {},
-
-
-                dialogImageUrl: '',
-                dialogVisible: false,
-                disabled: false,
-
-                uploadMsg: {
-                    "projectId": this.$route.params.id,
-                    "token": JSON.parse(sessionStorage.getItem('user')).headImgurl
-                },
-                
-                //临时数据
-                proDetail: {},
-                files: [],
-                opers: [],
-
-                allDetail: {
-                    overflow: 'auto',
-                    padding: '0px 5px',
-                    height: 0
-                },
-
-                listLoading: false,
-                modelsLoading: false,
-                upLoading: false,
-                oplistLoading: false,
-                activePage: 0,
-
-                update: 0,
-                download: 0,
-                view: 0,
-                approve: 0,
-
-                company: [],
-
-                staffComp: [],
-                allUser: [],
-                assets: [],
-                produce: [],
-                charger: [],
-                general: [],
-
-                formRules: {
-					projectName: [
-						{ required: true, message: '请输入项目名称', trigger: 'blur' }
-                    ],
-                    customerCompany: [
-                        { required: true, message: '请选择客户公司', trigger: 'blur' }
-                    ],
-                    modelIds: [
-                        { required: true, message: '请选择项目模具', trigger: ['blur','change'] }
-                    ],
-                    managerId: [
-                        { required: true, message: '请选择项目经理', trigger: ['blur','change'] }
-                    ],
-                    ownerApproverId: [
-                        { required: true, message: '请选择资产方审批人', trigger: ['blur','change'] }
-                    ],
-                    customerApproverId: [
-                        { required: true, message: '请选择生产方审批人', trigger: ['blur','change'] }
-                    ],
-                    // 新建人员
-                    username: [
-						{ required: true, message: '请输入姓名', trigger: 'blur' }
-                    ],
-                    teamName: [
-						{ required: true, message: '请选择人员类型', trigger: ["blur",'change'] }
-					],
-                    companyId: [
-						{ required: true, message: '请选择所属公司', trigger: ["blur",'change'] }
-					],
-                },
-                
-                editFormVisible: false,//编辑界面是否显示
-				editLoading: false,
-				//编辑界面数据
-				editForm: {
-					projectName: '',
-                    customerCompany: [],
-                    managerId: '',
-                    ownerApproverId: '',
-                    customerApproverId: '',
-                    modelIds: [],
-                    users: []
-                },
-                editType: 0,
-            };
-        },
-        methods: {
-            //返回
-            backToList() {
-                this.$router.go(-1);
-            },
-
-            //获取详情
-            getDetail() {
-                this.modelsLoading = true;
-                this.http.post(this.port.agency.detail, {
-                    id: this.detailId
-                }, res => {
-                    this.modelsLoading = false;
-                    if (res.code == "ok") {
-                        this.detail = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.modelsLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            getFileList() {
-                this.listLoading = true;
-                // 获取文档列表
-                this.http.post(this.port.project.fileList, {
-                    projectId: this.detailId
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.files = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            getOperList() {
-                this.oplistLoading = true;
-                // 获取文档列表
-                this.http.post(this.port.project.operList, {
-                    projectId: this.detailId
-                }, res => {
-                    this.oplistLoading = false;
-                    if (res.code == "ok") {
-                        this.opers = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.oplistLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //获取信息
-            getMsg() {
-                // 获取公司
-                this.http.post(this.port.base.addCompanyListToProject, {
-                    parentId: this.user.parentId,
-                    id: this.user.id
-                }, res => {
-                    if (res.code == "ok") {
-                        var list = res.data , array = [];
-                        for(var i in list){
-                            if(list[i].id != this.proDetail.ownerCompany){
-                                array.push(list[i])
-                            }
-                        }
-                        this.company = array;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-
-                // 获取模具
-                this.http.post(this.port.mold.chooseModelList, {
-                    projectId: this.detailId
-                }, res => {
-                    if (res.code == "ok") {
-                        this.molds = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-
-                this.http.post(this.port.base.getProduceCompany, {
-                    projectId: this.detailId
-                }, res => {
-                    if (res.code == "ok") {
-                        this.staffComp = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            doSomething(e){
-                e.stopPropagation();
-            },
-
-            //切换人员
-            changeStaff(i) {
-                if(i == 0){
-                    var list = this.allUser , array = [];
-                    for(var i in list){ 
-                        if(list[i].id != this.editForm.customerApproverId && list[i].id != this.editForm.managerId.id && list[i].id != this.editForm.ownerApproverId){
-                            array.push(list[i])
-                        }
-                    }
-                    
-                    this.general = array;
-                } else if(i == 1) {
-                    var list = this.allUser , str = this.editForm.users.toString() , array = [] , assets = [] , produce = [];
-                    for(var i in list) {
-                        if(str.indexOf(list[i].id) == -1) {
-                            array.push(list[i]);
-                        }
-                    }
-
-                    for(var i in list) {
-                        if(str.indexOf(list[i].id) == -1) {
-                            if(list[i].subordinateType == 0){
-                                assets.push(list[i])
-                            } else {
-                                produce.push(list[i])
-                            }
-                        }
-                    }
-
-                    this.charger = array;
-                    this.assets = assets;
-                    this.produce = produce;
-                }
-            },
-
-            //选择公司切换人员
-            companyChange() {
-                var param = {} ,
-                    str = this.proDetail.ownerCompany;
-                for(var i in this.editForm.modelIds){
-                    str += "," + this.editForm.modelIds[i].produceCompanyId;
-                }
-                param.companyIds = str;
-                param.id = this.user.id;
-                param.projectId = this.detailId;
-                this.http.post(this.port.project.getUserById, param , res => {
-                    if (res.code == "ok") {
-                        var list = res.data , assets = [] , produce = [];
-                        var allUserId = [];
-                        for(var i in list) {
-                            allUserId.push(list[i].id); 
-                            if(list[i].companyId == this.proDetail.ownerCompany){
-                                if(list[i].id != this.user.id){
-                                    if(list[i].id != this.proDetail.managerId){
-                                        assets.push(list[i])
-                                    }
-                                }
-                            } else {
-                                produce.push(list[i])
-                            }
-                        }
-
-                        var manager = allUserId.indexOf(this.editForm.managerId.id),
-                            customerApprover = allUserId.indexOf(this.editForm.customerApproverId),
-                            array = res.data , newAssets = [] , newProduce = [],newCharger = [];
-
-                        this.allUser = res.data;
-
-                        if(manager == -1) {
-                            this.editForm.managerId = "";
-                            this.charger = res.data;
-                        } else {
-                            for(var i in list) {
-                                newCharger.push(list[i]);
-                            }
-                            this.charger = newCharger;
-                        }
-
-                        if(customerApprover == -1) {
-                            this.editForm.customerApproverId = "";
-                        } else {
-                            for(var i in list) {
-                                if(str.indexOf(list[i].id) == -1) {
-                                    if(list[i].subordinateType == 0){
-                                        newAssets.push(list[i])
-                                    } else {
-                                        newProduce.push(list[i])
-                                    }
-                                }
-                            }
-                            this.assets = newAssets;
-                            this.produce = newAssets;
-                        }
-
-                        var oldUsers = [] , backUsers = this.proDetail.participateUsers;
-                        for(var i in backUsers) {
-                            oldUsers.push(backUsers[i]);
-                        }
-                        for(var i in oldUsers) {
-                            var num = allUserId.indexOf(oldUsers[i].id);
-                            if(num == -1) {
-                                oldUsers.splice(num - 1, 1);
-                            } else {
-                                for(var j in list){
-                                    if(oldUsers[i].id == list[j].id) {
-                                        if(list[j].id == this.editForm.customerApproverId || list[j].id == this.editForm.managerId.id || list[j].id == this.editForm.ownerApproverId){
-                                            array.splice(j,1)
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                        var editUser = [];
-                        for(var i in oldUsers) {
-                            for(var j in this.editForm.users) {
-                                if(this.editForm.users[j] == oldUsers[i].id) {
-                                    editUser.push(oldUsers[i].id)
-                                }
-                            }
-                        }
-                        this.editForm.users = editUser;
-                        this.general = array;
-                        this.setMember();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //打开编辑页面
-            edit() {
-            },
-
-            //提交
-            addSubmit() {
-                this.$refs.editForm.validate((valid) => {
-					if (valid) {
-                        var cId = "",
-                            cName = "",
-                            modelIds = "",
-                            userIds = "";
-                        for(var i in this.editForm.modelIds){
-                            if(cId.indexOf(this.editForm.modelIds[i].produceCompanyId) == -1){
-                                cId += this.editForm.modelIds[i].produceCompanyId + ",";
-                                cName += this.editForm.modelIds[i].produceCompanyName + ",";
-                            }
-                            modelIds += this.editForm.modelIds[i].id + ","
-                        }
-                        cId = cId.substring(0,cId.length-1);
-                        cName = cName.substring(0,cName.length-1);
-                        modelIds = modelIds.substring(0,modelIds.length-1);
-
-                        for(var i in this.editForm.users) {
-                            if(i == this.editForm.users.length -1){
-                                userIds += this.editForm.users[i]
-                            } else {
-                                userIds += this.editForm.users[i] + ","
-                            }
-                        }
-
-                        this.editLoading = true;
-                        this.http.post(this.port.project.addProject, {
-                            id: this.editForm.id,
-                            projectName: this.editForm.projectName,
-                            customerCompanyIds: cId,
-                            customerCompanyNames: cName,
-                            manager: this.editForm.managerId.username,
-                            managerId: this.editForm.managerId.id,
-                            ownerApproverId: this.editForm.ownerApproverId,
-                            customerApproverId: this.editForm.customerApproverId,
-                            modelIds: modelIds,
-                            userIds: userIds,
-                            flag: 1
-                        } , res => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            if (res.code == "ok") {
-                                this.$message({
-                                    message: '修改成功',
-                                    type: 'success'
-                                });
-                                this.getDetail();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-
-            //上传
-            uploadFile(params) {
-                this.upLoading = true;
-                var fileObj = params.file;
-                var form = new FormData();
-                form.append("projectId", this.proDetail.id);
-                form.append("file", fileObj);
-                this.http.uploadFile(this.port.project.uploadFile, form , res => {
-                    this.upLoading = false;
-                    this.$refs.upload.clearFiles();
-                    if (res.code == "ok") {
-                        this.$message({
-                            message: '上传成功',
-                            type: 'success'
-                        });
-                        this.getFileList();
-                        this.getOperList();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.upLoading = false;
-                    this.$refs.upload.clearFiles();
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //删除上传文件
-			fileDel(id) {
-                this.$confirm('确认删除该文档吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.project.delFile, {
-                        id: id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getFileList();
-                            this.getOperList();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-
-            // 在线预览
-            viewFile(row) {
-                this.http.post(this.port.file.view, {
-                    fileId: row.id,
-                    type: 1
-                }, res => {
-                    if (res.code == "ok") {
-                        this.openWin(res.data);
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            openWin(url) {
-                var el = document.createElement("a");
-                document.body.appendChild(el);
-                el.href = encodeURI(url); 
-                el.target = '_blank'; 
-                el.click();
-                document.body.removeChild(el);
-            },
-
-            handleRemove(file) {
-                console.log(file);
-            },
-
-            handlePictureCardPreview(file) {
-                this.dialogImageUrl = file.url;
-                this.dialogVisible = true;
-            },
-
-            handleDownload(file) {
-                console.log(file);
-            },
-
-            editDetail(type) {
-                this.editType = type;
-                this.editFormVisible = true;
-            }
-        },
-
-        created() {
-            let height = window.innerHeight;
-            this.allDetail.height = height - 140 + "px";
-            const that = this;
-            window.onresize = function temp() {
-                that.allDetail.height = window.innerHeight - 160;    
-            };
-        },
-
-        mounted() {
-            this.getDetail();
-            this.getFileList();
-            this.getOperList();
-        }
-    };
-</script>
-
-<style scoped lang="scss">
-    .container .main .content-container {
-        overflow: auto!important;
-    }
-
-    a {
-        text-decoration:none;
-        color: #333;
-    }
-
-    .el-header {
-        font-size: 18px;
-        font-weight: 600;
-        color: #333;
-        line-height: 40px;
-    }
-
-    .el-footer {
-        font-size: 16px;
-        color: #333;
-        line-height: 30px;
-    }
-
-    .el-container.is-vertical {
-        overflow: hidden;
-    }
-
-    .agencyHead {
-        margin: 20px 0 0 0;
-        padding: 0 20px;
-    }
-
-    .agencyHead_img {
-        width:335px;
-        height:160px;
-        overflow:hidden;
-        .agencyHead_imgbox {
-            width:335px;
-            height:160px;
-        }
-    }
-
-    .agencyHead_edit {
-        font-size:16px;
-        margin: 0 0 0 15px;
-        padding: 0;
-    }
-    
-    .agencyHead_back {
-        float: right;
-        margin: 0;
-        position: relative;
-        .iconfont {
-            font-size: 25px;
-            position: absolute;
-            right: -10px;
-            top: 0px;
-        }
-    }
-
-    .allDetail {
-        overflow-y: auto;
-    }
-
-    .agencyBody_title {
-        padding-left: 10px;
-        padding-bottom: 0px;
-        margin: 20px 0;
-        font-size: 16px;
-        line-height: 20px;
-        border-left: 1px #20a0ff solid;
-        position: relative;
-    }
-    
-    .agencyBody_main {
-        padding-left: 40px;
-    }
-
-    .agencyBody_detail {
-        margin-bottom: 20px;
-    }
-
-    .toolbar .el-form-item {
-        font-size: 14px;
-        vertical-align: middle;
-    }
-
-    .divLine {
-        width: 2px;
-        background: #c3c3c3;
-        height: 100%;
-    }
-
-    .projectTitle {
-        font-size: 18px;
-        color: #333;
-    }
-
-    .upload-demo {
-        position: absolute;
-        right: 0;
-        top: -5px;
-    }
-
-    .editDetail {
-        margin-left: 10px;
-        color:#20a0ff;
-        cursor: pointer;
-    }
-
-    .info {
-        color: grey;
-    }
-
-    .model {
-        cursor: pointer;
-        color:#20a0ff;
-    }
-
-    .el-collapse {
-        border: none;
-    }
-</style>

+ 0 - 142
lss_vue/src/views/agency/agencyList.vue

@@ -1,142 +0,0 @@
-<template>
-	<div>
-        <div class="head">
-            <mt-header title="资产"></mt-header>
-            <!-- <mt-search v-model="value" cancel-text="取消" placeholder="搜索"></mt-search> -->
-        </div>
-        <div class="body">
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            <br>
-            中间区域
-            中间区域
-            <br>
-        </div>
-    </div>
-</template>
-
-<script>
-    import Vue from 'vue';
-    import util from '../../common/js/util'
-    
-	export default {
-		data() {
-			return {
-                value: "",
-			}
-		},
-		methods: {
-			handleClose() {
-
-            }
-        },
-        created() {
-            let height = window;
-            console.log(height)
-        },
-        watch: {
-            
-        },
-		mounted() {
-			
-		}
-	}
-
-</script>
-
-<style scoped>
-    .head {
-        position: fixed;
-        width: 100%;
-        height: 0.4rem;
-    }
-
-    .head header.mint-header {
-        height: 100%;
-    }
-
-    .body {
-        -webkit-box-flex: 1;
-        -webkit-flex: 1;
-        -ms-flex: 1;
-        flex: 1;
-        width: 100%;
-        padding-top: 0.42rem;
-        height: calc(100% - 0.4rem);
-        overflow-y: auto;
-    }
-</style>

+ 549 - 0
lss_vue/src/views/assets/assets.vue

@@ -0,0 +1,549 @@
+<template>
+	<div>
+        <div class="head">
+            <div class="searchbox">
+                <img src="../../assets/image/search.png" class="searchbox_img">
+                <input type="text" v-model="keyWord" class="searchbox_text" />
+                <button v-on:click="searchKeyword()" class="searchbox_button">搜索</button>
+            </div>
+            <div class="btn_body">
+                <img v-on:click="showList()" class="btn_img" src="../../assets/image/add.png">
+                <div class="btn_list" v-show="popupVisible">
+                    <div v-on:click="register()"><img src="../../assets/image/register.png">登记资产</div>
+                    <div v-on:click="exportExcel()"><img src="../../assets/image/export.png">导出报表</div>
+                </div>
+            </div>
+            <div class="searchkey">
+                <div class="searchkey_word">
+                    <a v-for="(item,index) in labels" :id="item.id" v-bind:class="{'active':index==0}" v-on:click="chooseTag(item.id,1)">{{item.name}}</a>
+                </div>
+                <div class="searchkey_btn">
+                    <img v-on:click="showFilter()" src="../../assets/image/pull_down.png">
+                </div>
+            </div>
+        </div>
+        <section class="_sorting-address">
+            <ul class="address_first">
+                <li v-for="(item,index) in labels" :id="'btn'+item.id" v-bind:class="{'active':index==0}" v-on:click="chooseTag(item.id,0)">{{item.name}}</li>
+            </ul>
+        </section>
+        <div class="body">
+            <div class="noList" v-if="list.length==0">
+                <img src="../../assets/image/noList.png">
+            </div>
+            <ul v-else v-infinite-scroll="loadMore" infinite-scroll-disabled="loading" infinite-scroll-distance="10">
+                <li v-for="item in list" v-on:click="jumpTo(item.id)">
+                    <div class="item_img"><img src="../../assets/image/userHead.jpg"></div>
+                    <div class="text item_name">{{item.name}}</div>
+                    <div class="text item_int">{{item.modelNumber}}</div>
+                    <div class="text item_num">{{item.goodsNos.length}}台</div>
+                </li>
+                <div class="order" v-if="haveMore">
+                    <span class="line"></span>
+                    <span class="txt">没有更多了</span>
+                    <span class="line"></span>
+                </div>
+            </ul>
+        </div>
+    </div>
+</template>
+
+<script>
+    import util from '../../common/js/util'
+    
+	export default {
+		data() {
+			return {
+                keyWord: "",
+                list: [],
+                labels: [],
+                pageNum: 1,
+                total: 1,
+                tagId: 0,
+                popupVisible: false,
+                loading: false,
+                haveMore: false,
+			}
+		},
+		methods: {
+            // 资产列表
+            getList() {
+                this.$indicator.open();
+                this.http.post(this.port.assets.list, {
+                    'keyName': this.keyWord,
+                    'tagId': this.tagId,
+                    'pageNum': this.pageNum
+                } , 
+                res => {
+                    this.$indicator.close();
+                    if (res.code == "ok") {
+                        this.list = res.data.list;
+                        this.total = res.data.total==0?1:res.data.total;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$indicator.close();
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            loadMore() {
+                if(this.pageNum == this.total) {
+                    this.haveMore = true;
+                } else if(this.pageNum < this.total) {
+                    this.loading = true;
+                    this.http.post(this.port.assets.list, {
+                        'keyName': this.keyWord,
+                        'tagId': this.tagId,
+                        'pageNum': this.pageNum ++
+                    } , 
+                    res => {
+                        this.loading = false;
+                        if (res.code == "ok") {
+                            this.total = res.data.total==0?1:res.data.total;
+                            if(res.data.list.length != 0) {
+                                for(var i in res.data.list) {
+                                    this.list.push(res.data.list[i]);
+                                }
+                            }
+                        } else {
+                            this.$toast({
+                                message: res.msg,
+                                duration: 2000
+                            });
+                        }
+                    }, error => {
+                        this.loading = false;
+                        this.$toast({
+                            message: error,
+                            duration: 2000
+                        });
+                    })
+                }
+            },
+
+            // 标签列表
+			getLabels() {
+                this.http.post(this.port.label.list, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        this.tagId = res.data[0].id;
+                        this.getList();
+                        this.labels = res.data;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            // 关键词搜索
+            searchKeyword() {
+                this.getList();
+            },
+
+            // 右上角按钮
+            showList() {
+                this.popupVisible = !this.popupVisible;
+            },
+
+            // 标签筛选
+            showFilter() {
+                $("._sorting-medical").removeClass("fixed-top");
+                if($("._sorting-address").hasClass("fixed-top")){
+                    $(".searchkey_btn img").removeClass("rotate")
+                    $(".searchkey_btn img").addClass("rotate1")
+                    $(this).removeClass("current");
+                    $("._sorting-address").removeClass("fixed-top");
+                    $('._navbar').attr('style','position: fixed;top:0;');
+                }else{
+                    $(".searchkey_btn img").removeClass("rotate1")
+                    $(".searchkey_btn img").addClass("rotate")
+                    $("._sorting-address").addClass("fixed-top");
+                    $(this).addClass("current");
+                    $("._current-medical").removeClass("current");
+                    $('._navbar').attr('style','position: fixed;top:0;');
+                }
+            },
+
+            // 标签选择
+            chooseTag(id,type) {
+                $("#"+id).addClass("active").siblings("a").removeClass("active");
+                $("#btn"+id).addClass("active").siblings().removeClass("active");
+                if(type == 0) {
+                    var width = $("#"+id).offset().left;
+                    $(".searchkey_word").animate({scrollLeft:(width - 0.05) + "rem"}, 200);
+                }   
+                $("._sorting-medical").removeClass("fixed-top");
+                $(".searchkey_btn img").removeClass("rotate")
+                $(".searchkey_btn img").addClass("rotate1")
+                $(this).removeClass("current");
+                $("._sorting-address").removeClass("fixed-top");
+                $('._navbar').attr('style','position: fixed;top:0;');
+                this.pageNum = 1;
+                this.total = 1;
+                this.tagId = id;
+                this.getList();
+            },
+
+            jumpTo(id) {
+                this.$router.push("/assets/" + id);
+            },
+            
+            register() {
+                this.$router.push("/assetsRegister");
+            },
+
+            exportExcel() {
+                console.log('导出')
+            },
+        },
+        created() {
+            this.getLabels();
+        },
+		mounted() {
+		}
+	}
+
+</script>
+
+<style scoped>
+    /* 头部搜索框、筛选栏 START */
+    .head {
+        position: fixed;
+        width: 100%;
+        box-sizing:border-box;
+        padding: 0.07rem 0.15rem 0 0.15rem;
+        background: #ffffff;
+        border-bottom: 1px solid #dfdfdf;
+        z-index: 105;
+    }
+
+    .searchbox {
+        display: inline-block;
+        /* width: 75%; */
+        width: 88%;
+        position: relative;
+        vertical-align: middle;
+    }
+
+    .searchbox img.searchbox_img {
+        width:0.3rem;
+        height: 0.3rem;
+        position: absolute;
+        left: 0.04rem;
+        /* top: 0.02rem; */
+    }
+
+    .searchbox input.searchbox_text {
+        font-size: 0.16rem;
+        height: 0.3rem;
+        border-style:none;
+        border: 1px solid #2680EB;
+        border-radius: 50px;
+        box-sizing:border-box;
+        width: 100%;
+        padding: 0 0.45rem 0 0.33rem;
+    }
+
+    input.searchbox_text:focus{
+        outline: none;
+    }
+
+    .searchbox button.searchbox_button {
+        border: 0;
+        background-color: transparent;
+        outline: none;
+        height: 0.3rem;
+        font-size: 0.15rem;
+        background: #2680EB;
+        color: #fff;
+        border-radius: 50px;
+        padding: 0 0.12rem;
+        position: absolute;
+        right: -0.01rem;
+        top: 0;
+    }
+    
+    .btn_body {
+        display: inline-block;
+        float: right;
+        position: relative;
+    }
+
+    .btn_img {
+        float: right;
+        width: 0.3rem;
+        vertical-align: middle;
+    }
+    
+    .btn_list {
+        position: absolute;
+        right: 0;
+        top: 0.37rem;
+        border:#aaa;
+        background: #fcfcfc;
+        box-shadow: 5px 5px 10px #ccc;
+        z-index: 105;
+    }
+
+    .btn_list:before {
+        display: inline-block;
+        width: 0;
+        height: 0;
+        border: solid transparent;
+        border-width: 10px;
+        border-bottom-color: #fcfcfc;
+        content: "";
+        position: absolute;
+        top: -20px;
+        right: 0.06rem;
+    }
+
+    .btn_list > div {
+        width: 0.8rem;
+        font-size: 0.15rem;
+        padding: 0.1rem 0.15rem;
+        border-bottom: 1px solid #efefef;
+        text-align: center;
+    }
+
+    .btn_list > div img {
+        width: 0.14rem;
+        height: 0.14rem;
+        vertical-align: middle;
+        margin-right: 0.05rem;
+    }
+
+    .btn_list > div span {
+        height: 0.15rem;
+        line-height: 0.15rem;
+        vertical-align: middle;
+    }
+
+    .searchkey {
+        height: 0.35rem;
+        line-height: 0.35rem;
+        margin-top: 0.08rem;
+    }
+
+    .searchkey .searchkey_word {
+        width: 90%;
+        display: inline-block;
+        overflow-x: auto;
+        white-space: nowrap;
+        vertical-align: middle;
+    }
+
+    .searchkey .searchkey_word::-webkit-scrollbar {
+        display:none
+    }
+
+    .searchkey .searchkey_word a {
+        font-size: 0.15rem;
+        padding: 0 0.05rem;
+        color: #333;
+        text-decoration:none;
+    }
+
+    .searchkey .searchkey_word a.active {
+        color: #2680EB;
+    }
+
+    .searchkey .searchkey_btn {
+        display: inline-block;
+        width: 10%;
+        height: 100%;
+        float: right;
+    }
+
+    .searchkey .searchkey_btn img {
+        width: 0.36rem;
+        height: 0.3rem;
+        vertical-align: middle;
+    }
+
+    .address_first .current{
+        background:#eee;
+        color: #6f83ff;
+        border-left: 2px solid #6f83ff;
+    }
+    
+    ._sorting-address {
+        position:fixed;
+        top: -50%;
+        width: 100%;
+        height: 50%;
+        z-index: 1;
+        -webkit-transition-duration: 0.4s;
+        background: #fff;
+    }
+
+    ._sorting-address>ul {
+        margin: 0;
+        padding: 0;
+        overflow: auto;
+        height: 100%;
+        width: 100%;
+        -webkit-transition-duration: 0.4s;
+        box-sizing:border-box;
+        padding: 0.08rem 0.1rem;
+    }
+
+    ._sorting-address>ul>li {
+        display: inline-block;
+        height: 0.2rem;
+        line-height: 0.2rem;
+        font-size: 0.14rem;
+        color: #ccc;
+        padding: 0 0.12rem;
+        margin: 0.03rem 0.03rem;
+        border: 1px solid #ccc;
+        border-radius: 50px;
+    }
+    
+    ._sorting-address>ul>li.active {
+        border: 1px solid #2680EB;
+        color: #2680EB;
+    }
+
+    ._sorting-address>ul.address_first {
+        background: #fff;
+        position: absolute;
+        z-index: 1;
+    }
+
+    .fixed-top{
+        top: 0.81rem;
+    }
+
+    .fixed-top::after{
+        content: "";
+        width: 100%;
+        height: 100%;
+        display: block;
+        background:rgba(0,0,0,0.2);
+    }
+
+    .rotate {
+        transform-origin: center center;
+        transform: rotate(180deg);
+        -webkit-transform: rotate(180deg);
+        -moz-transform: rotate(180deg);
+        -ms-transform: rotate(180deg);
+        -o-transform: rotate(180deg);
+        transition: transform 0.2s;
+        -moz-transition: -moz-transform 0.2s;
+        -moz-transition: -moz-transform 0.2s;
+        -o-transition: -o-transform 0.2s;
+        -ms-transition: -ms-transform 0.2s;
+    }
+
+    .rotate1 {
+        transform-origin: center center;
+        transform: rotate(0deg);
+        -webkit-transform: rotate(0deg);
+        -moz-transform: rotate(0deg);
+        -ms-transform: rotate(0deg);
+        -o-transform: rotate(0deg);
+        transition: transform 0.2s;
+        -moz-transition: -moz-transform 0.2s;
+        -moz-transition: -moz-transform 0.2s;
+        -o-transition: -o-transform 0.2s;
+        -ms-transition: -ms-transform 0.2s;
+    }
+    /* 头部搜索框、筛选栏 END */
+
+    /* 列表页 START */
+    .body {
+        -webkit-box-flex: 1;
+        -webkit-flex: 1;
+        -ms-flex: 1;
+        flex: 1;
+        width: 100%;
+        padding: 0.81rem 0 0 0;
+        /* height: calc(100% - 0.4rem); */
+        height: calc(100% - 0.6rem);
+        overflow-y: auto;
+        background: #EFEFEF;
+    }
+
+    .body > ul {
+        padding: 0 0.12rem;
+        margin-top: 0;
+    }
+    
+    .body > ul li {
+        display: inline-block;
+        width: 1.5rem;
+        padding: 0.08rem 0.05rem;
+        background: #fff;
+        margin: 0.06rem 0.04rem;
+        border-radius: 10px; 
+    }
+
+    .body > ul li .item_img img {
+        width: 1.5rem;
+        height: 1.5rem;
+    }
+
+    .body > ul li .text {
+        height: 0.23rem;
+        line-height: 0.23rem;
+        margin: 0.02rem  0 0 0;
+    }
+
+    .body > ul li .item_int {
+        color: #B5B5B5;
+        font-size: 0.12rem;
+    }
+
+    .body > ul li .item_num {
+        color: #448DE4;
+        font-weight: 600;
+    }
+
+    .noList {
+        text-align: center;
+        padding: 1.5rem 0;
+    }
+
+    .noList img {
+        width: 1.2rem;
+        height: 1.2rem;
+    }
+
+    .order {
+        height: 0.6rem;
+        line-height: 0.6rem;
+        text-align: center;
+    }
+
+    .order .line {
+        display: inline-block;
+        width: 1.2rem;
+        border-top: 1px solid #ccc ;
+        vertical-align: middle;
+    }
+
+    .order .txt {
+        color: #ccc;
+        font-size: 0.13rem;
+        vertical-align: middle;
+    }
+    /* 列表页 END */
+</style>

+ 282 - 0
lss_vue/src/views/assets/assetsDetail.vue

@@ -0,0 +1,282 @@
+<template>
+	<div class="detail">
+        <mt-header class="detail_head" fixed title="资产详情">
+            <router-link to="" slot="left">
+                <mt-button icon="back" v-on:click="jumpBack()"></mt-button>
+            </router-link>
+            <mt-button slot="right">操作记录</mt-button>
+        </mt-header>
+        <div class="detail_body">
+            <div class="detailBox userInfo" v-on:click="jumpTo(0)">
+                <div class="left">
+                    <img src="../../assets/image/userHead.jpg">
+                </div>
+                <div class="right">
+                    <div>
+                        <span class="name">{{detail.name}}</span>
+                    </div>
+                    <div class="department">
+                        {{detail.modelNumber}}
+                    </div>
+                    <div>
+                        <span class="num">{{detail.goodsNos!=null?detail.goodsNos.length:0}}{{detail.unit}}</span>
+                        <span class="arrow"><img src="../../assets/image/on_1.png"></span>
+                    </div>
+                </div>
+            </div>
+            <div class="detailBox">
+                <mt-cell title="维护资产" is-link v-on:click.native="jumpTo(1)"></mt-cell>
+                <mt-cell title="资产编号" is-link v-on:click.native="jumpTo(2)"></mt-cell>
+            </div>
+            <div class="detailBox">
+                <div class="assDel assDel_Head">
+                    资产详情列表
+                </div>
+                <div class="assDel assDel_Status">
+                    <span class="active" v-on:click="changeState(-1)">全部 {{delList.length}}</span>
+                    <span v-on:click="changeState(0)">在用 {{useList.length}}</span>
+                    <span v-on:click="changeState(1)">维护 {{serList.length}}</span>
+                    <span v-on:click="changeState(2)">报废 {{scrList.length}}</span>
+                    <span v-on:click="changeState(3)">未用 {{unuList.length}}</span>
+                </div>
+                <div class="assDel assDel_List">
+                    <div class="one_assDel" v-for="item in delList" v-if="state == -1 || item.state == state">
+                        <div class="one_assDel_head">
+                            <span class="canJump">{{item.modelNo}}</span>
+                            <span v-if="item.state == 0">在用</span>
+                            <span v-if="item.state == 1">维护</span>
+                            <span v-if="item.state == 2">报废</span>
+                            <span v-if="item.state == 3">未用</span>
+                        </div>
+                        <div class="one_assDel_body">
+                            <span>张旭也 18255585207</span>
+                            <img src="../../assets/image/loadMore.png">
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+                id: this.$route.params.id,
+                detail: "",
+                delList: [],
+                useList: [],
+                serList: [],
+                scrList: [],
+                unuList: [],
+                state: -1,
+			}
+		},
+		methods: {
+            getDetail() {
+                this.$indicator.open();
+                this.http.post(this.port.assets.detail, {
+                    'id': this.id
+                } , 
+                res => {
+                    this.$indicator.close();
+                    if (res.code == "ok") {
+                        this.detail = res.data;
+                        this.delList = res.data.goodsNos;
+                        var list = res.data.goodsNos,
+                            useList = [],
+                            serList = [],
+                            scrList = [],
+                            unuList = [];
+                        for(var i in list) {
+                            if(list[i].state == 0) {
+                                useList.push(list[i])
+                            } else if(list[i].state == 1) {
+                                serList.push(list[i])
+                            } else if(list[i].state == 2) {
+                                scrList.push(list[i])
+                            } else if(list[i].state == 3) {
+                                unuList.push(list[i])
+                            }
+                        }
+                        this.useList = useList;
+                        this.serList = serList;
+                        this.scrList = scrList;
+                        this.unuList = unuList;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$indicator.close();
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            changeState(type) {
+                $(".assDel_Status span:eq("+ (type + 1) +")").addClass("active").siblings().removeClass("active");
+                this.state = type;
+            },
+
+            jumpBack() {
+                this.$router.go(-1);
+            }
+        },
+        created() {
+            this.getDetail();
+        },
+		mounted() {
+            
+		}
+	}
+
+</script>
+
+<style scoped>
+    .detail_head {
+        background: #fff;
+        color: #333;
+        height: 0.4rem;
+    }
+
+    .detail_body {
+        margin-top: 0.4rem;
+    }
+
+    .detail {
+        background: #EFEFEF;
+    }
+
+    .detailBox {
+        background: #fff;
+        margin-bottom: 0.15rem;
+    }
+
+    .userInfo {
+        padding: 0.22rem 0.1rem;
+    }
+
+    .left{
+        float:left;
+        margin-right: 0.15rem;
+    }
+
+    .left img {
+        width: 0.6rem;
+        height: 0.6rem;
+    }
+
+    .right div{
+        line-height: 0.21rem;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+
+    span.name {
+        font-size: 0.16rem;
+        font-weight: 600;
+        margin: 0 0.15rem 0 0;
+        width: 100%;
+        overflow: hidden;
+        white-space: nowrap;
+    }
+    
+    span.num {
+        font-size: 0.14rem;
+        color: #26a2ff;
+    }
+
+    div.department {
+        font-size: 0.13rem;
+        color: #9E9E9E;
+    }
+
+    span.arrow {
+        float: right;
+    }
+
+    span.arrow img {
+        transform: rotate(-90deg);
+        -ms-transform: rotate(-90deg); /* IE 9 */
+        -moz-transform: rotate(-90deg); /* Firefox */
+        -webkit-transform: rotate(-90deg); /* Safari and Chrome */
+        -o-transform: rotate(-90deg); /* Opera */
+    }
+
+    .assDel {
+        padding: 0.12rem 0.1rem;
+    }
+
+    .assDel_Status span {
+        display: inline-block;
+        text-align: center;
+        width: 18%;
+        color: #aaa;
+        font-size: 0.15rem;
+    }
+
+    .assDel_Status span.active {
+        color: #26a2ff;
+    }   
+
+    .one_assDel {
+        padding: 0 0.1rem;
+    }
+
+    .one_assDel_head span {
+        display:inline-block;
+        vertical-align: middle;
+        color: #666;
+        line-height: 0.4rem;
+    }
+
+    .one_assDel_head span:nth-child(1){
+        width: 85%;
+        font-size: 0.15rem;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
+
+    .one_assDel_head span:nth-child(1).canJump {
+        color: #26a2ff;
+    }
+
+    .one_assDel_head span:nth-child(2){
+        float: right;
+    }
+
+    .one_assDel_body span {
+        display:inline-block;
+        color: #aaa;
+        vertical-align: middle;
+    }
+
+    .one_assDel_body img {
+        float: right;
+        width: 0.25rem;
+        height: 0.25rem;
+        vertical-align: middle;
+    }
+</style>
+<style>
+    .detail_head .mint-header-title {
+        font-weight: 600;
+        font-size: 0.15rem;
+    }
+
+    .detail_head .mint-button-text {
+        color: #26a2ff;
+    }
+
+    .detailBox .mint-cell {
+        padding: 0 0 0 0.02rem;
+    }
+</style>

+ 425 - 0
lss_vue/src/views/assets/assetsRegister.vue

@@ -0,0 +1,425 @@
+<template>
+	<div class="detail">
+        <mt-header class="detail_head" fixed title="资产登记">
+            <router-link to="" slot="left">
+                <mt-button icon="back" v-on:click="jumpBack()"></mt-button>
+            </router-link>
+        </mt-header>
+        <div class="detail_body">
+            <div class="detailBox">
+                <mt-field label="物品名称" placeholder="请输入物品名称" v-model="assetsForm.name"></mt-field>
+                <mt-field label="型号" placeholder="请输入物品型号" v-model="assetsForm.modelNumber"></mt-field>
+                <mt-field label="数量" placeholder="请输入数量" type="number" v-model="assetsForm.number"></mt-field>
+                <mt-field label="单位" placeholder="请输入单位" v-model="assetsForm.unit"></mt-field>
+                <div class="upload">
+                    <div class="left">物品图片</div>
+                    <div class="right upload_add" v-on:click="choosePic()">
+                        <div class="upload_add_image" align="center">
+                            <img src="../../assets/image/camera.png" class="camera">
+                            <p class="font13">添加图片</p>
+                        </div>
+                    </div>
+                    <input @change="fileChange($event)" type="file" accept="image/*" id="upload_file" style="display: none"/>
+                </div>
+                <mt-field label="地址" placeholder="请输入地址" v-model="assetsForm.address"></mt-field>
+            </div>
+            <div class="detailBox">
+                <mt-field label="生产厂家" placeholder="请输入生产厂家" v-model="assetsForm.factory"></mt-field>
+                <mt-field label="服务期限" placeholder="请输入服务期限" v-model="assetsForm.serviceLife"></mt-field>
+                <mt-field label="下次维护日期" placeholder="请选择下次维护日期" type="date" v-model="assetsForm.nextIndate"></mt-field>
+            </div>
+            <div class="detailBox">
+                <div class="left">所属分类</div>
+                <div class="right">
+                    <ul class="address_first">
+                        <li v-for="(item,index) in labels" :id="'btn'+item.id" v-bind:class="{'active':index==0}" v-on:click="chooseTag(item.id)">{{item.name}}</li>
+                        <li v-on:click="addNewTag()" class="add">+</li>
+                    </ul>
+                </div>
+            </div>
+            <div class="btn">
+                <mt-button size="large" type="primary" v-on:click.native="toNext()">下一步</mt-button>
+            </div>
+        </div>
+        <mt-popup v-model="popupVisible" position="right" class="allocation">
+            <mt-header class="detail_head" fixed title="分配资产">
+                <router-link to="" slot="left">
+                    <mt-button icon="back" v-on:click="toPrev()"></mt-button>
+                </router-link>
+            </mt-header>
+            <div class="detailBox textColor">
+                资产编号构成:字母前缀 + 四位数字,请填写字母编号(最多四位)数字编号由系统排序生成
+            </div>
+            <div class="detailBox">
+                <mt-field label="部门编号" placeholder="请输入部门编号" v-model="assetsForm.deptStr"></mt-field>
+                <mt-field label="字母前缀" placeholder="请输入字母前缀" v-model="assetsForm.goodStr"></mt-field>
+            </div>
+            <div class="example">示例:Lishui-LXDN0001、Lishui-LXDN0002</div>
+            <mt-button class="allBtn" size="large" type="primary" v-on:click.native="submit()">确定</mt-button>
+            <mt-button class="allBtn" size="large" v-on:click.native="jumpBack()">取消</mt-button>
+        </mt-popup>
+    </div>
+</template>
+
+<script>
+    import { MessageBox } from 'mint-ui';
+	export default {
+		data() {
+			return {
+                user: JSON.parse(sessionStorage.getItem("user")),
+                assetsForm: {
+                    userId: JSON.parse(sessionStorage.getItem("user")).id,
+                    name: '',
+                    modelNumber: '',
+                    number: '',
+                    unit: '',
+                    address: '',
+                    factory: '',
+                    serviceLife: '',
+                    nextIndate: '',
+                    file: '',
+                    deptStr: '',
+                    goodStr: '',
+                },
+                popupVisible: false,
+                labels: [],
+                tagId: 0,
+                img: '',
+                size: 0,
+                limit: 1,
+                imgList: [],
+			}
+		},
+		methods: {
+            // 标签列表
+			getLabels() {
+                this.http.post(this.port.label.list, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        this.tagId = res.data[0].id;
+                        this.labels = res.data;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            addNewTag() {
+                MessageBox({
+                    $type:'prompt',
+                    title:'',
+                    message:'请输入资产类型名称',
+                    closeOnClickModal:false,
+                    showCancelButton:true,
+                    inputValidator:function(v){
+                        if (v === null) {
+                           return true;
+                        }
+                        if (v != ""){
+                            return true
+                        } else {
+                            return false
+                        }
+                    },
+                    inputErrorMessage:'请输入资产类型名称',
+                    showInput:true
+                }).then(({ value, action }) => {
+                    if(value == null) {
+                        this.$toast({
+                            message: '创建失败',
+                            duration: 2000
+                        });
+                        return false;
+                    } else {
+                        this.$indicator.open();
+                        this.http.post(this.port.label.add, {
+                            'name': value,
+                        } , 
+                        res => {
+                            this.$indicator.close();
+                            if (res.code == "ok") {
+                                this.getLabels();
+                            } else {
+                                this.$toast({
+                                    message: res.msg,
+                                    duration: 2000
+                                });
+                            }
+                        }, error => {
+                            this.$indicator.close();
+                            this.$toast({
+                                message: error,
+                                duration: 2000
+                            });
+                        })
+                    }
+                }).catch(() => {
+                });
+            },
+
+            chooseTag(id) {
+                $("#btn"+id).addClass("active").siblings().removeClass("active");
+                this.tagId = id;
+            },
+
+            // 图片上传
+            choosePic() {
+                document.getElementById('upload_file').click();
+            },
+
+            fileChange(el) {
+                if (!el.target.files[0].size) return;
+                this.fileAdd(el.target.files[0]);
+                el.target.value = ''
+            },
+
+            fileAdd(file) {
+                if (this.limit !== undefined) this.limit--;
+                if (this.limit !== undefined && this.limit < 0) return;
+
+                //总大小
+                this.size = this.size + file.size;
+                //判断是否为图片文件
+                if (file.type.indexOf('image') == -1) {
+                    this.$toast({
+                        message: '请选择图片文件',
+                        duration: 2000
+                    });
+                } else {
+                    let reader = new FileReader();
+                    let image = new Image();
+                    let _this = this;
+                    reader.readAsDataURL(file);
+                    reader.onload = function () {
+                        file.src = this.result;
+                        image.onload = function(){
+                            let width = image.width;
+                            let height = image.height;
+                            file.width = width;
+                            file.height = height;
+                            _this.imgList.push({
+                                file
+                            });
+                        };
+                        image.src= file.src;
+                    }
+                    _this.assetsForm.file = reader;
+                }
+            },
+
+            // 创建
+            submit() {
+                // var fileObj = params.file;
+                var form = new FormData();
+                // form.append("file", fileObj);
+                form.append("userId", JSON.parse(sessionStorage.getItem("user")).id);
+                form.append("name", this.assetsForm.name);
+                form.append("modelNumber", this.assetsForm.modelNumber);
+                form.append("number", this.assetsForm.number);
+                form.append("unit", this.assetsForm.unit);
+                form.append("address", this.assetsForm.address);
+                form.append("factory", this.assetsForm.factory);
+                form.append("serviceLife", this.assetsForm.serviceLife);
+                form.append("nextIndate", this.assetsForm.nextIndate);
+                form.append("deptStr", this.assetsForm.deptStr);
+                form.append("goodStr", this.assetsForm.goodStr);
+                this.$indicator.open();
+                this.http.uploadFile( this.port.assets.add, form,
+                res => {
+                    this.$indicator.close();
+                    if (res.code == "ok") {
+                        this.$toast({
+                            message: '创建成功',
+                            duration: 2000
+                        });
+                        this.$router.push({ path: '/assets' });
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                },
+                error => {
+                    this.$indicator.close();
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                });
+            },
+
+            toNext() {
+                this.popupVisible = true;
+            },
+
+            toPrev() {
+                this.popupVisible = false;
+            },
+
+            jumpBack() {
+                this.$router.go(-1);
+            }
+        },
+        created() {
+            this.getLabels();
+        },
+		mounted() {
+            
+		}
+	}
+
+</script>
+
+<style scoped>
+    .detail_head {
+        background: #fff;
+        color: #333;
+        height: 0.4rem;
+    }
+
+    .detail_body {
+        margin-top: 0.4rem;
+    }
+
+    .detail {
+        background: #EFEFEF;
+    }
+
+    .detailBox {
+        background: #fff;
+        margin-bottom: 0.15rem;
+    }
+
+    .left{
+        float:left;
+        margin: 0.15rem;
+    }
+
+    .upload .left {
+        margin: 0.1rem 0.14rem;
+    }
+
+    .right div{
+        line-height: 0.21rem;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+
+    .btn {
+        width: 80%;
+        margin: 0.2rem auto 80px;
+    }
+
+    .allocation {
+        width: 100%;
+        height: 100%;
+    }
+
+    .address_first .current{
+        background:#eee;
+        color: #6f83ff;
+        border-left: 2px solid #6f83ff;
+    }
+
+    .right > ul {
+        margin: 0;
+        padding: 0;
+        overflow: auto;
+        -webkit-transition-duration: 0.4s;
+        box-sizing:border-box;
+        padding: 0.08rem 0.1rem;
+    }
+
+    .right > ul > li {
+        display: inline-block;
+        height: 0.2rem;
+        line-height: 0.2rem;
+        font-size: 0.14rem;
+        color: #ccc;
+        padding: 0 0.12rem;
+        margin: 0.06rem 0.03rem;
+        border: 1px solid #ccc;
+        border-radius: 50px;
+        min-width: 0.3rem;
+        text-align: center;
+    }
+
+    .right > ul > li.add {
+        border: 1px solid #777;
+        color: #777;
+    }
+    
+    .right > ul > li.active {
+        border: 1px solid #2680EB;
+        color: #2680EB;
+    }
+
+    .upload_add {
+        display: inline-block;
+        margin-bottom: 0.2rem;
+    }
+
+    .upload_add_image {
+        padding-top: 0.08rem;
+        margin-left: 0.1rem;
+        width: 1rem;
+        height: 0.9rem;
+        border: 1px dashed rgba(0, 0, 0, .2);
+    }
+
+    .upload_add-image .camera {
+        font-size: 24px;
+    }
+
+    .upload_add_image p {
+        padding: 0;
+        margin: 0;
+        color: #8e8e8e;
+    }
+
+    .textColor {
+        margin-top: 0.4rem;
+        color: #8e8e8e;
+        padding: 0.12rem;
+        font-size: 0.12rem;
+    }
+
+    .example {
+        color: #8e8e8e;
+        padding: 0.02rem 0.12rem;
+        font-size: 0.12rem;
+    }
+
+    .allBtn {
+        width: 80%;
+        margin: 0.18rem auto;
+    }
+</style>
+<style>
+    .detail_head .mint-header-title {
+        font-weight: 600;
+        font-size: 0.15rem;
+    }
+
+    .detail_head .mint-button-text {
+        color: #26a2ff;
+    }
+
+    .detailBox .mint-cell {
+        padding: 0 0 0 0.02rem;
+    }
+    
+    .mint-popup.allocation  {
+        background: #efefef;
+    }
+</style>

+ 0 - 639
lss_vue/src/views/base/allocation.vue

@@ -1,639 +0,0 @@
-<template>
-    <section>
-        <!--工具条-->
-        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-            <el-form :inline="true" :model="filters">
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
-                            <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入关键字进行搜索"></el-input>
-                </el-form-item>
-                <el-form-item>
-                    <el-button type="primary" @click="getMoulds">查询</el-button>
-                </el-form-item>
-                <el-form-item style="float: right;">
-                    <a class="download" href="/upload/云模盒批量导入模板.xlsx" download="云模盒批量导入模板.xlsx">
-                        <el-button type="primary">
-                            下载模板
-                        </el-button>
-                    </a>
-                </el-form-item>
-                <el-form-item style="float: right;">
-                    <el-upload ref="upload" action="customize" :show-file-list="false" :http-request="uploadFile" :limit="1">
-                        <el-button type="primary" :loading="uploading">批量导入</el-button>
-                    </el-upload>
-                </el-form-item>
-                <el-form-item style="float: right;">
-                    <el-button type="primary" @click="showAllocation">新建</el-button>
-                </el-form-item>
-                <!-- <el-form-item style="float: right;">
-                    <el-button type="primary" @click="issued">下发</el-button>
-                </el-form-item> -->
-            </el-form>
-        </el-col>
-
-        <!--列表-->
-        <el-table :data="allocations" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
-            <!-- <el-table-column type="selection" width="50"></el-table-column> -->
-            <el-table-column type="index" width="60"></el-table-column>
-            <el-table-column prop="equipmentNo" label="云模盒编号" width="180" sortable></el-table-column>
-            <el-table-column prop="sim" label="SIM卡号" width="120" sortable></el-table-column>
-            <el-table-column prop="hillNumber" label="电量" width="80" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.hillNumber}}<span v-if="scope.row.hillNumber">%</span></template>
-            </el-table-column>
-            <el-table-column prop="alarmBattery" label="报警电池电量" width="130" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.alarmBattery}}<span v-if="scope.row.alarmBattery">%</span></template>
-            </el-table-column>
-            <el-table-column prop="alarmDegree" label="热报警度数" width="120" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.alarmDegree}}<span v-if="scope.row.alarmDegree">℃</span></template>
-            </el-table-column>
-            <el-table-column prop="useLife" label="使用年限" width="100" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.useLife}}年</template>
-            </el-table-column>
-            <el-table-column prop="diffTime" label="倒计时" width="100" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.diffTime}}</template>
-            </el-table-column>
-            <el-table-column prop="modelName" label="模具名称" width="130" sortable></el-table-column>
-            <el-table-column prop="modelNo" label="模具编号" width="120" align="center" sortable></el-table-column>
-            <el-table-column prop="companyName" label="公司名称" width="180" sortable></el-table-column>
-            <el-table-column prop="agent" label="代理商" width="120" sortable></el-table-column>
-            <el-table-column label="云模盒状态" align="center" width="120" sortable>
-                <template slot-scope="scope">
-                    <span v-if="scope.row.isUse == 0">未启用</span>
-                    <span v-else>已启用</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="160">
-                <template slot-scope="scope">
-                    <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 0" type="primary" @click="openEnable(scope.$index)">启用</el-button>
-                    <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 1" type="danger" @click="disableEquipment(scope.$index)">停用</el-button>
-                    <!--  :disabled="scope.row.isUse == 1" -->
-                    <el-button size="small" :style="scope.row.modelNo != null?'':'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">修改</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
-
-        <!--工具条-->
-        <el-col :span="24" class="toolbar">
-        <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :page-sizes="[20 , 50 , 80 , 100]"
-            :page-size="20"
-            layout="total, sizes, prev, pager, next"
-            :total="total"
-            style="float:right;"
-        ></el-pagination>
-        </el-col>
-
-        <!--新增界面-->
-        <el-dialog title="新建云模盒" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth">
-            <el-form :model="newAllocation" label-width="100px" :rules="formRules" ref="newAllocation" :inline="true" class="demo-form-inline">
-                <el-form-item label="云模盒编号" prop="equipmentNo">
-                    <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请输入云模盒编号"></el-input>
-                </el-form-item>
-                <el-form-item label="所属公司" prop="belongCompanyId">
-                    <el-select v-model="newAllocation.belongCompanyId" filterable clearable placeholder="请选择所属公司" style="width: 202px">
-                        <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="使用年限" prop="useLife">
-                    <el-input v-model.number="newAllocation.useLife" type="age" autocomplete="off" placeholder="请输入使用年限"></el-input>
-                </el-form-item>
-                <el-form-item label="代理商" prop="agent">
-                    <el-input v-model="newAllocation.agent" autocomplete="off" placeholder="请输入代理商" style="width: 202px"></el-input>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click.native="addFormVisible = false">取消</el-button>
-                <el-button type="primary" @click="addMould()">提交</el-button>
-            </div>
-        </el-dialog>
-
-        <!--修改界面-->
-        <el-dialog title="修改云模盒" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass="customWidth">
-            <el-form :model="newAllocation" label-width="100px" :rules="formRules" ref="newAllocation" :inline="true" class="demo-form-inline">
-                <el-form-item label="云模盒编号" prop="equipmentNo">
-                    <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请输入云模盒编号"></el-input>
-                </el-form-item>
-                <el-form-item label="所属公司" prop="belongCompanyId">
-                    <el-select v-model="newAllocation.belongCompanyId" filterable clearable placeholder="请选择所属公司" style="width: 202px" :disabled="newAllocation.usage">
-                        <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="使用年限" prop="useLife">
-                    <el-input v-model.number="newAllocation.useLife" type="age" autocomplete="off" placeholder="请输入使用年限"></el-input>
-                </el-form-item>
-                <el-form-item label="代理商" prop="agent">
-                    <el-input v-model="newAllocation.agent" autocomplete="off" placeholder="请输入代理商" style="width: 202px"></el-input>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click.native="editFormVisible = false">取消</el-button>
-                <el-button type="primary" @click="editMould(newAllocation.id)">提交</el-button>
-            </div>
-        </el-dialog>
-
-        <!-- 启用弹窗 -->
-        <el-dialog title="启用" :visible.sync="operateDialogVisible" width="450px">
-            <!-- <el-form label-width="100px" :rules="formRules" :inline="true" class="demo-form-inline">
-                <el-form-item label="某个参数">
-                    <el-input autocomplete="off" placeholder="填了也不会发生什么"></el-input>
-                </el-form-item>
-            </el-form>
-            <span slot="footer" class="dialog-footer">
-                <el-button @click="operateDialogVisible = false">取消</el-button>
-                <el-button type="primary" @click="enable">启用</el-button>
-            </span> -->
-            <el-form :model="issuedVal" label-width="130px" :rules="formRules" ref="issuedVal" :inline="true" class="demo-form-inline">
-                <el-form-item label="报警电池电量" prop="alarmBattery">
-                    <el-input v-model.number="issuedVal.alarmBattery" type="age" autocomplete="off" placeholder="请输入报警电池电量" style="width:250px;"></el-input>
-                    %
-                </el-form-item>
-                <el-form-item label="热报警度数" prop="alarmDegree">
-                    <el-input v-model.number="issuedVal.alarmDegree" type="age" autocomplete="off" placeholder="请输入热报警度数" style="width:250px;"></el-input>
-                    ℃
-                </el-form-item>
-            </el-form>
-            <span slot="footer" class="dialog-footer">
-                <el-button @click="operateDialogVisible = false">取消</el-button>
-                <el-button type="primary" @click="enable">启用</el-button>
-            </span>
-        </el-dialog>
-
-        <!-- 下发弹窗 -->
-        <el-dialog title="下发" :visible.sync="issuedVisible" width="450px">
-            <el-form :model="issuedVal" label-width="130px" :rules="formRules" ref="issuedVal" :inline="true" class="demo-form-inline">
-                <el-form-item label="报警电池电量" prop="alarmBattery">
-                    <el-input v-model.number="issuedVal.alarmBattery" type="age" autocomplete="off" placeholder="请输入报警电池电量" style="width:250px;"></el-input>
-                    %
-                </el-form-item>
-                <el-form-item label="热报警度数" prop="alarmDegree">
-                    <el-input v-model.number="issuedVal.alarmDegree" type="age" autocomplete="off" placeholder="请输入热报警度数" style="width:250px;"></el-input>
-                    ℃
-                </el-form-item>
-            </el-form>
-            <span slot="footer" class="dialog-footer">
-                <el-button @click="issuedVisible = false">取消</el-button>
-                <el-button type="primary" @click="saveIssued">下发</el-button>
-            </span>
-        </el-dialog>
-    </section>
-</template>
-
-<script>
-    import util from "../../common/js/util";
-    export default {
-        data() {
-            return {
-                allocations: [],
-                companies: {},
-                newAllocation: {
-                    equipmentNo: "", //设备编号
-                    useLife: "", //使用年限
-                    equipmentName: "", //设备名称
-                    id: "", //设备id
-                    belongCompanyId: "", //所属公司ID
-                    agent: "", //代理商
-                    usage: true //是否可以修改公司
-                },
-                filters: {
-                    keyName: "",
-                    companyId: ""
-                },
-                formRules: {
-                    equipmentNo: [
-                        { required: true, message: "请输入云模盒编号", trigger: "blur" }
-                    ],
-                    useLife: [
-                        { required: true, message: '请输入使用年限'},
-                        { type: 'number', message: '使用年限必须为数字值'}
-                    ],
-                    belongCompanyId: [
-                        { required: true, message: "请选择所属公司", trigger: ["blur", "change"] }
-                    ],
-                    agent: [
-                        { required: true, message: "请输入代理商", trigger: "blur" }
-                    ],
-                    alarmBattery: [
-                        { required: true, message: '请输入报警电池电量'},
-                        { type: 'number', message: '报警电池电量必须为数字值'}
-                    ],
-                    alarmDegree: [
-                        { required: true, message: '请输入热报警度数'},
-                        { type: 'number', message: '热报警度数必须为数字值'}
-                    ],
-                },
-
-                listLoading: false,
-                addLoading: false,
-                editLoading: false,
-                uploading: false,
-
-                total: 0,
-                page: 1,
-                size: 20,
-                tableHeight: 0,
-
-                addFormVisible: false,
-                editFormVisible: false,
-                operateDialogVisible: false,
-                activeIndex: 0,
-
-                issuedVal: {
-                    alarmBattery: 30,
-                    alarmDegree: 80,
-                },
-                issuedVisible: false,
-                multipleSelection: [],
-            };
-        },
-        methods: {
-            getMsg() {
-                //获取公司下拉列表
-                this.http.post( this.port.base.getCompanys, {},
-                res => {
-                    if (res.code == "ok") {
-                        this.companies = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //分页
-            handleCurrentChange(val) {
-                this.page = val;
-                this.getMoulds();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-                this.getMoulds();
-            },
-
-            //读取云模盒信息
-            getMoulds() {
-                this.listLoading = true;
-                this.http.post(this.port.base.mouldeList,{
-                    pageNum: this.page,
-                    pageSize: this.size,
-                    keyName: this.filters.keyName,
-                    companyId: this.filters.companyId
-                },
-                res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        var list = res.data.list
-                        for(var i in list){
-                            if(list[i].endTime == null){
-                                list[i].diffTime = "";
-                            } else {
-                                list[i].diffTime = util.formatDate.dateDiff(
-                                    //util.formatDate.format(new Date(list[i].endTime), 'yyyy-MM-dd'), 
-                                    list[i].endTime,
-                                    util.formatDate.format(new Date(new Date()), 'yyyy-MM-dd')
-                                );
-                            }
-                        }
-                        this.allocations = list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                        message: res.msg,
-                        type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //添加界面
-            showAllocation() {
-                this.addFormVisible = true;
-                this.newAllocation = {
-                    id: "",
-                    useLife: "",
-                    equipmentNo: "",
-                    belongCompanyId: "",
-                    agent: ""
-                };
-            },
-           
-            //添加模具
-            addMould() {
-                this.$refs.newAllocation.validate(valid => {
-                    if (valid) {
-                    this.addLoading = true;
-                    this.http.post(
-                        this.port.base.editMould,
-                        {
-                            equipmentNo: this.newAllocation.equipmentNo,
-                            belongCompanyId: this.newAllocation.belongCompanyId,
-                            useLife: this.newAllocation.useLife,
-                            agent: this.newAllocation.agent
-                        },
-                        res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: "添加成功",
-                                    type: "success"
-                                });
-                                this.getMoulds();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: "error"
-                                });
-                            }
-                        },
-                        error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: "error"
-                            });
-                        }
-                    );
-                    }
-                });
-            },
-
-             //修改界面
-            showEdit(index, row, usageBoolean) {
-                this.editFormVisible = true;
-                this.newAllocation = {
-                    id: row.id,
-                    useLife: row.useLife,
-                    equipmentNo: row.equipmentNo,
-                    belongCompanyId: row.belongCompanyId,
-                    agent: row.agent,
-                    usage: usageBoolean
-                };
-            },
-
-            //编辑模具
-            editMould() {
-                this.$refs.newAllocation.validate(valid => {
-                    if (valid) {
-                        this.editLoading = true;
-                        this.http.post( this.port.base.editMould, {
-                            id: this.newAllocation.id,
-                            equipmentNo: this.newAllocation.equipmentNo,
-                            equipmentName: this.newAllocation.equipmentName,
-                            belongCompanyId: this.newAllocation.belongCompanyId,
-                            useLife: this.newAllocation.useLife,
-                            agent: this.newAllocation.agent
-                        },
-                        res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: "修改成功",
-                                    type: "success"
-                                });
-                                this.getMoulds();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: "error"
-                                });
-                            }
-                        },
-                        error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: "error"
-                            });
-                        });
-                    }
-                });
-            },
-
-            //打开启用窗口
-            openEnable(index) {
-                this.operateDialogVisible = true;
-                this.issuedVal.alarmBattery = this.allocations[this.activeIndex].alarmBattery;
-                this.issuedVal.alarmDegree = parseInt(this.allocations[this.activeIndex].alarmDegree);
-                this.activeIndex = index;
-            },
-
-            //启用设备
-            enable() {
-                // if(this.allocations[this.activeIndex].belongCompanyId == null){
-                //     this.$message({
-                //         message: "输入所属公司后才能启用模具",
-                //         type: "error"
-                //     });
-                // }else{
-                this.allocations[this.activeIndex].isUse = 1;
-                this.operateDialogVisible = false;
-                // this.http.post( this.port.base.enableMould, {
-                //     id: this.allocations[this.activeIndex].id,
-                //     isUse: 1
-                // },
-                var str = this.allocations[this.activeIndex].equipmentNo;
-                this.http.post( this.port.base.setPacket, {
-                    lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
-                    hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
-                    isUse: 1,
-                    equipmentNo: str
-                },
-                res => {
-                    if (res.code == "ok") {
-                        this.$message({
-                            message: "设备已启用",
-                            type: "success"
-                        });
-                        this.getMoulds();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //停用云模盒
-            disableEquipment(index) {
-                // if(this.allocations[index].belongCompanyId == null){
-                //     this.$message({
-                //         message: "输入所属公司后才能启用模具",
-                //         type: "error"
-                //     });
-                // }else{
-                this.allocations[index].isUse = 0;
-                // this.http.post( this.port.base.enableMould, {
-                //     id: this.allocations[index].id,
-                //     isUse: 0
-                // },
-                var str = this.allocations[this.activeIndex].equipmentNo;
-                this.http.post( this.port.base.setPacket, {
-                    lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
-                    hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
-                    isUse: 0,
-                    equipmentNo: str
-                },
-                res => {
-                    if (res.code == "ok") {
-                        this.$message({
-                            message: "设备已停用",
-                            type: "success"
-                        });
-                        this.getMoulds();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //导入云模盒
-            uploadFile(params) {
-                var fileObj = params.file;
-                var form = new FormData();
-                form.append("file", fileObj);
-                this.uploading = true;
-                this.http.uploadFile( this.port.base.importMouldEquipmentExcel,  form,
-                res => {
-                    this.uploading = false;
-                    this.$refs.upload.clearFiles();
-                    if (res.code == "ok") {
-                        this.$message({
-                            message: "上传成功",
-                            type: "success"
-                        });
-                        this.getMoulds();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.uploading = false;
-                    this.$refs.upload.clearFiles();
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //列表选择
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-
-            //下发云模盒
-            issued() {
-                this.issuedVisible = true;
-            },
-
-            saveIssued() {
-                if(this.multipleSelection.length == 0) {
-                    this.$message({
-                        message: "请选择要下发的云模盒",
-                        type: "error"
-                    });
-                } else {
-                    var str = '';
-                    for(var i in this.multipleSelection) {
-                        str += this.multipleSelection[i].equipmentNo + ',';
-                    }
-                    str = str.substring(0,str.length-1)
-                    this.http.post( this.port.base.setPacket, {
-                        lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
-                        hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
-                        equipmentNo: str
-                    },
-                    res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: "下发成功",
-                                type: "success"
-                            });
-                            this.issuedVisible = false;
-                            this.getMoulds();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: "error"
-                            });
-                        }
-                    },
-                    error => {
-                        this.$message({
-                            message: error,
-                            type: "error"
-                        });
-                    });
-                }
-            }
-
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-        mounted() {
-            this.getMsg();
-            //获取模具列表
-            this.getMoulds();
-        }
-    };
-</script>
-
-<style scoped>
-    .download {
-        color: #fff;
-        text-decoration: none;
-    }
-</style>

+ 0 - 476
lss_vue/src/views/base/comp.vue

@@ -1,476 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-                <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入资产方名称进行搜索" clearable></el-input>
-                </el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click.native="getComp">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;">
-					<el-button type="primary" @click.native="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
-            <el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="companyName" label="资产方名称" width="250" sortable>
-            </el-table-column>
-            <el-table-column prop="administrator" label="资产方管理员" width="150" sortable>
-                <template slot-scope="scope">
-                    <router-link to="/staff" tag="span" style="cursor: pointer; color: #409eff;">{{scope.row.administrator}}</router-link>
-                </template>
-            </el-table-column>
-            <el-table-column prop="relateCompanyList" label="关联生产方" width="400" sortable>
-                <template slot-scope="scope">
-                    <span class="info" v-for="(item, index) in scope.row.relateCompanyList">
-                        {{item.companyName}}
-                        <span v-if="index != scope.row.relateCompanyList.length-1">、</span>
-                    </span>
-                </template>
-            </el-table-column>
-            <el-table-column prop="companyAddress" label="资产方地址" sortable></el-table-column>
-			<el-table-column label="操作" width="150">
-				<template slot-scope="scope">
-					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">编辑</el-button>
-					<el-button type="danger" size="small" @click.native.native="handleDel(scope.$index, scope.row)">删除</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog :title="addTitle" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm">
-				<el-form-item label="资产方名称" prop="companyName" v-show="addState">
-					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入资产方地址"></el-input>
-				</el-form-item>
-                <el-form-item label="关联生产方" v-show="addState">
-                    <el-select v-model="addForm.companyIds" clearable multiple filterable placeholder="请选择生产方" style="width:533px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="资产方地址" prop="companyAddress" v-show="addState">
-					<el-input v-model="addForm.companyAddress" autocomplete="off" placeholder="请输入资产方地址"></el-input>
-				</el-form-item>
-                <el-form-item label="姓名" prop="username" v-show="!addState">
-					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account" v-show="!addState">
-					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号"></el-input>
-				</el-form-item>
-                <el-form-item label="角色" v-show="!addState">
-                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入角色名称"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                <span v-if="!addState" style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-                <el-button v-if="addState" type="primary" @click.native="toNext(0)">下一步</el-button>
-                <el-button v-if="!addState" type="primary" @click.native="toPart(0)">上一步</el-button>
-				<el-button v-if="!addState" type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-		<!--编辑界面-->
-		<el-dialog title="编辑资产方" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm">
-				<el-form-item label="资产方名称" prop="companyName">
-					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入资产方地址"></el-input>
-				</el-form-item>
-                <el-form-item label="关联生产方">
-                    <el-select v-model="editForm.companyIds" clearable multiple filterable placeholder="请选择生产方" style="width:533px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="资产方地址" prop="companyAddress">
-					<el-input v-model="editForm.companyAddress" autocomplete="off" placeholder="请输入资产方地址"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-	import util from '../../common/js/util'
-
-	export default {
-		data() {
-            var checkPhone = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入联系方式'));
-                } else {
-                    const reg = /^1[0-9]\d{9}$/
-                    if (reg.test(value)) {
-                        callback();
-                    } else {
-                        return callback(new Error('请输入正确的联系方式'));
-                    }
-                }
-            };
-			return {
-				filters: {
-                    keyName: ''
-                },
-
-                user: JSON.parse(sessionStorage.getItem('user')),
-                companys:[],
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-                
-                formRules: {
-					companyName: [
-						{ required: true, message: '请输入资产方名称', trigger: 'blur' }
-                    ],
-                    companyAddress: [
-                        { required: true, message: '请输入资产方地址', trigger: 'blur' }
-                    ],
-                    username: [
-						{ required: true, message: '请输入姓名', trigger: 'blur' }
-                    ],
-                    account: [
-                        { required: true, validator: checkPhone, trigger: 'blur'}
-                    ]
-                },
-
-                team: [{label:'资产方',value:0},{label:'生产方',value:1}],
-
-                // 新增界面
-				addFormVisible: false,
-                addLoading: false,
-                addState: true,
-                addTitle: '新增资产方',
-				addForm: {
-                    companyName: '',
-                    companyAddress: '',
-                    companyIds: [],
-                    username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: "系统管理员",
-                    flag: 0
-				},
-                
-                // 编辑界面
-				editFormVisible: false,
-                editLoading: false,
-				editForm: {
-					id: 0,
-                    companyName: '',
-                    companyType: 0,
-                    companyAddress: '',
-                    companyIds: [],
-                    flag: 1
-				}
-			}
-		},
-		methods: {
-            //  分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getComp();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getComp();
-            },
-
-            //获取基础数据
-            getMsg() {
-                this.http.post(this.port.base.relationList, {
-                    companyType: 1
-                }, res => {
-                    if (res.code == "ok") {
-                        this.companys = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-			//获取资产方列表
-			getComp() {
-				this.listLoading = true;
-                this.http.post(this.port.base.companyList, {
-                    keyName: this.filters.keyName,
-                    pageNum: this.page,
-                    pageSize: this.size,
-                    companyType: 0
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.list = res.data.list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            }, 
-
-            toNext(i) {
-                if(i == 0) {
-                    this.addState = false;
-                     this.addTitle = '新增资产方管理员';
-                }
-            },
-
-            toPart(i) {
-                if(i == 0) {
-                    this.addState = true;
-                    this.addTitle = '新增资产方';
-                }
-            },
-
-            //显示新增界面
-			handleAdd() {
-                this.addFormVisible = true;
-                this.addState = true;
-                this.addTitle = '新增资产方';
-				this.addForm = {
-                    companyName: '',
-                    companyAddress: '',
-                    companyIds: [],
-                    username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: "系统管理员",
-                    flag: 0
-				};
-            },
-            
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        this.addLoading = true;
-                        var str = "";
-                        for(var i in this.addForm.companyIds){
-                            if(i == this.addForm.companyIds.length-1){
-                                str += this.addForm.companyIds
-                            } else {
-                                str += this.addForm.companyIds + ","
-                            }
-                        }
-                        this.http.post(this.port.base.addCompany, {
-                            companyName: this.addForm.companyName,
-                            companyType: 0,
-                            companyAddress: this.addForm.companyAddress,
-                            companyIds: str,
-                            flag: 0
-                        } , res => {
-                            if (res.code == "ok") {
-                                this.addPeo(res.data.id);
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-
-            //添加人员
-            addPeo(companyId) {
-                this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        this.http.post(this.port.project.addUser, {
-                            username: this.addForm.username,
-                            account: this.addForm.account,
-                            companyId: companyId,
-                            roleName: this.addForm.roleName,
-                            parentId: this.user.id,
-                            addType: 0,
-                            flag: 0
-                        } , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getComp();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-            
-			//删除
-			handleDel(index, row) {
-				this.$confirm('确认删除该资产方吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.base.delCompany, {
-                        id: row.id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getComp();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-            
-			//显示编辑界面
-			handleEdit(index, row) {
-                this.editFormVisible = true;
-                var array = [];
-                for(var i in row.relateCompanyList) {
-                    array.push(row.relateCompanyList[i].id)
-                }
-                this.editForm = {
-                    id: row.id,
-                    companyName: row.companyName,
-                    companyType: 0,
-                    companyAddress: row.companyAddress,
-                    companyIds: array,
-                    flag: 1
-				};
-            },
-            
-			//编辑
-			editSubmit() {
-				this.$refs.editForm.validate((valid) => {
-					if (valid) {
-                        this.editLoading = true;
-                        var str = "";
-                        for(var i in this.editForm.companyIds){
-                            if(i == this.editForm.companyIds.length-1){
-                                str += this.editForm.companyIds
-                            } else {
-                                str += this.editForm.companyIds + ","
-                            }
-                        }
-                        this.http.post(this.port.base.addCompany, {
-                            id: this.editForm.id,
-                            companyName: this.editForm.companyName,
-                            companyType: 0,
-                            companyAddress: this.editForm.companyAddress,
-                            companyIds: str,
-                            flag: 1
-                        } , res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: '修改成功',
-                                    type: 'success'
-                                });
-                                this.getComp();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            }
-        },
-
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-
-		mounted() {
-            this.getMsg();
-			this.getComp();
-        }
-	}
-</script>
-
-<style scoped>
-    
-</style>

+ 0 - 601
lss_vue/src/views/base/factory.vue

@@ -1,601 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-                <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入生产方名称进行搜索" clearable></el-input>
-                </el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click.native="getFactory">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;">
-					<el-button type="primary" @click.native="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
-            <el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="companyName" label="生产方名称" width="250" sortable></el-table-column>
-            <el-table-column prop="administrator" label="生产方管理员" width="150" sortable>
-            </el-table-column>
-            <el-table-column prop="relateCompanyList" label="关联资产方" width="400" sortable>
-                <template slot-scope="scope">
-                    <span class="info" v-for="(item, index) in scope.row.relateCompanyList">
-                        {{item.companyName}}
-                        <span v-if="index != scope.row.relateCompanyList.length-1">、</span>
-                    </span>
-                </template>
-            </el-table-column>
-            <el-table-column prop="companyAddress" label="生产方地址" sortable></el-table-column>
-			<el-table-column label="操作" width="150">
-				<template slot-scope="scope">
-					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">编辑</el-button>
-					<el-button type="danger" size="small" @click.native.native="handleDel(scope.$index, scope.row)">删除</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog :title="addTitle" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm">
-				<el-form-item label="生产方名称" prop="companyName" v-show="addState">
-					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
-				</el-form-item>
-                <el-form-item label="关联资产方" v-show="addState">
-                    <el-select v-model="addForm.companyIds" clearable multiple filterable placeholder="请选择资产方" style="width:533px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="生产方地址" prop="companyAddress" v-show="addState">
-					<el-input v-model.lazy="addForm.companyAddress" autocomplete="off" @change="changeFactoryArea('addContainer')" placeholder="请输入生产方地址"></el-input>
-				</el-form-item>
-                <div id="addContainer" class="formMap" v-show="addState"></div>
-                <el-form-item label="姓名" prop="username" v-show="!addState">
-					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account" v-show="!addState">
-					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号"></el-input>
-				</el-form-item>
-                <el-form-item label="角色" v-show="!addState">
-                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入角色名称"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                 <span v-if="!addState" style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-                <el-button v-if="addState" type="primary" @click.native="toNext(0)">下一步</el-button>
-                <el-button v-if="!addState" type="primary" @click.native="toPart(0)">上一步</el-button>
-				<el-button v-if="!addState" type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-		<!--编辑界面-->
-		<el-dialog title="编辑生产方" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm">
-				<el-form-item label="生产方名称" prop="companyName">
-					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
-				</el-form-item>
-                <el-form-item label="关联资产方">
-                    <el-select v-model="editForm.companyIds" clearable multiple filterable placeholder="请选择资产方" style="width:533px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="生产方地址" prop="companyAddress">
-					<el-input v-model="editForm.companyAddress" autocomplete="off" :change="changeFactoryArea('editContainer')" placeholder="请输入生产方地址"></el-input>
-				</el-form-item>
-                <div id="editContainer" class="formMap"></div>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-    import Vue from 'vue';
-	import util from '../../common/js/util'
-
-	export default {
-		data() {
-            var checkPhone = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入联系方式'));
-                } else {
-                    const reg = /^1[0-9]\d{9}$/
-                    if (reg.test(value)) {
-                        callback();
-                    } else {
-                        return callback(new Error('请输入正确的联系方式'));
-                    }
-                }
-            };
-			return {
-				filters: {
-                    keyName: ''
-                },
-
-                user: JSON.parse(sessionStorage.getItem('user')),
-                companys:[],
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-                
-                formRules: {
-					companyName: [
-						{ required: true, message: '请输入生产方名称', trigger: 'blur' }
-                    ],
-                    companyAddress: [
-                        { required: true, message: '请输入生产方地址', trigger: 'blur' }
-                    ],
-                    username: [
-						{ required: true, message: '请输入姓名', trigger: 'blur' }
-                    ],
-                    account: [
-                        { required: true, validator: checkPhone, trigger: 'blur'}
-                    ]
-                },
-
-                // 地图
-                map: '',
-                marker: '',
-
-                // 新增界面
-				addFormVisible: false,
-                addLoading: false,
-                addState: true,
-                addTitle: '新增生产方',
-				addForm: {
-                    companyName: '',
-                    companyType: 1,
-                    companyAddress: '',
-                    yLng: 116.397511,
-                    xLat: 39.907545,
-                    companyIds: [],
-                    username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: "系统管理员",
-                    flag: 0
-				},
-                
-                // 编辑界面
-				editFormVisible: false,
-				editLoading: false,
-				editForm: {
-					id: 0,
-					companyName: '',
-                    companyType: 1,
-                    companyAddress: '',
-                    yLng: 0,
-                    xLat: 0,
-                    companyIds: [],
-                    flag: 1
-				}
-			}
-		},
-		methods: {
-            //  分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getFactory();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getFactory();
-            },
-
-            //获取基础数据
-            getMsg() {
-                this.http.post(this.port.base.relationList, {
-                    companyType: 0
-                }, res => {
-                    if (res.code == "ok") {
-                        this.companys = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-			//获取列表
-			getFactory() {
-				this.listLoading = true;
-                this.http.post(this.port.base.companyList, {
-                    keyName: this.filters.keyName,
-                    pageNum: this.page,
-                    pageSize: this.size,
-                    companyType: 1
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.list = res.data.list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-            
-            //地址输入切换
-            changeFactoryArea(mapId) {
-                if(mapId == "addContainer"){
-                    this.markLocation(this.addForm.companyAddress, mapId);
-                } else {
-                    this.markLocation(this.editForm.companyAddress, mapId);
-                }
-                
-            },
-
-            toNext(i) {
-                if(i == 0) {
-                    this.addState = false;
-                     this.addTitle = '新增生产方管理员';
-                }
-            },
-
-            toPart(i) {
-                if(i == 0) {
-                    this.addState = true;
-                    this.addTitle = '新增生产方';
-                }
-                var _this = this
-                setTimeout(function(){ _this.setMap('addContainer'); }, 100);
-            },
-
-            //显示新增界面
-			handleAdd() {
-                this.addFormVisible = true;
-                this.addState = true;
-                this.addTitle = '新增生产方';
-				this.addForm = {
-                    companyName: '',
-                    companyAddress: '',
-                    yLng: 116.397511,
-                    xLat: 39.907545,
-                    companyIds: [],
-                    username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: "系统管理员",
-                    flag: 0
-                };
-            },
-
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        this.addLoading = true;
-                        var str = "";
-                        for(var i in this.addForm.companyIds){
-                            if(i == this.addForm.companyIds.length-1){
-                                str += this.addForm.companyIds
-                            } else {
-                                str += this.addForm.companyIds + ","
-                            }
-                        }
-                        this.http.post(this.port.base.addCompany, {
-                            companyName: this.addForm.companyName,
-                            companyType: 1,
-                            companyAddress: this.addForm.companyAddress,
-                            yLng: this.addForm.yLng,
-                            xLat: this.addForm.xLat,
-                            companyIds: str,
-                            flag: 0
-                        } , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addPeo(res.data.id);
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-
-            //添加人员
-            addPeo(companyId) {
-                this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        this.http.post(this.port.project.addUser, {
-                            username: this.addForm.username,
-                            account: this.addForm.account,
-                            companyId: companyId,
-                            roleName: this.addForm.roleName,
-                            parentId: this.user.id,
-                            addType: 0,
-                            flag: 0
-                        } , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getFactory();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-            
-			//删除
-			handleDel(index, row) {
-				this.$confirm('确认删除该生产方吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.base.delCompany, {
-                        id: row.id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getFactory();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-            
-			//显示编辑界面
-			handleEdit(index, row) {
-                this.editFormVisible = true;
-                var array = [];
-                for(var i in row.relateCompanyList){
-                    array.push(row.relateCompanyList[i].id)
-                }
-                this.editForm = {
-                    id: row.id,
-                    companyName: row.companyName,
-                    companyType: 1,
-                    companyAddress: row.companyAddress,
-                    yLng: row.ylng,
-                    xLat: row.xlat,
-                    companyIds: array,
-                    flag: 1
-                };
-            },
-            
-			//编辑
-			editSubmit() {
-				this.$refs.editForm.validate((valid) => {
-					if (valid) {
-                        this.editLoading = true;
-                        var str = "";
-                        for(var i in this.editForm.companyIds){
-                            if(i == this.editForm.companyIds.length-1){
-                                str += this.editForm.companyIds[i]
-                            } else {
-                                str += this.editForm.companyIds[i] + ","
-                            }
-                        }
-                        this.http.post(this.port.base.addCompany, {
-                            id: this.editForm.id,
-                            companyName: this.editForm.companyName,
-                            companyType: 1,
-                            companyAddress: this.editForm.companyAddress,
-                            yLng: this.editForm.yLng,
-                            xLat: this.editForm.xLat,
-                            companyIds: str,
-                            flag: 1
-                        } , res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: '修改成功',
-                                    type: 'success'
-                                });
-                                this.getFactory();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-
-            //获取地图
-            setMap(mapId) {
-                if(mapId == 'addContainer') {
-                    this.map = new AMap.Map('addContainer', {
-                        resizeEnable: true, // 允许缩放
-                        center:[ this.addForm.yLng , this.addForm.xLat ],
-                        zoom:10
-                    })
-
-                    this.marker = new AMap.Marker({
-                        map: this.map,
-                        position: new AMap.LngLat(this.addForm.yLng , this.addForm.xLat),   // 经纬度
-                    });
-                } else {
-                    this.map = new AMap.Map('editContainer', {
-                        resizeEnable: true, // 允许缩放
-                        center:[this.editForm.yLng , this.editForm.xLat],
-                        zoom:10
-                    })
-
-                    this.marker = new AMap.Marker({
-                        map: this.map,
-                        position: new AMap.LngLat(this.editForm.yLng , this.editForm.xLat),   // 经纬度
-                    });
-                }
-                
-                var _this = this;
-                this.map.on('click', function(e) {
-                    if(_this.map){
-                        _this.map.remove(_this.marker);
-                    }
-                    var Lng = e.lnglat.getLng(),
-                    Lat = e.lnglat.getLat();
-                    if(mapId == 'addContainer') {
-                        _this.addForm.yLng = Lng;
-                        _this.addForm.xLat = Lat;
-                    } else {
-                        _this.editForm.yLng = Lng;
-                        _this.editForm.xLat = Lat;
-                    }
-                    _this.marker = new AMap.Marker({
-                        map: _this.map,
-                        position: new AMap.LngLat(Lng , Lat),   // 经纬度
-                    });
-                });
-            },
-
-            // 获取经纬度
-            markLocation(address,mapId) {
-                var _this = this;
-                AMap.plugin('AMap.Geocoder', function() {
-                    var geocoder = new AMap.Geocoder();            
-                    geocoder.getLocation(address, function(status, result) {
-                        if (status === 'complete' && result.info === 'OK') {
-                            // 经纬度                      
-                            var lng = result.geocodes[0].location.lng;
-                            var lat = result.geocodes[0].location.lat;
-                            
-                            _this.noSub = false;
-                            if(mapId == "addContainer") {
-                                _this.addForm.yLng = lng;
-                                _this.addForm.xLat = lat;
-                            } else {
-                                _this.editForm.yLng = lng;
-                                _this.editForm.xLat = lat;
-                            }
-                            
-                            // 添加标记
-                            if(_this.map){
-                                _this.map.remove(_this.marker);
-                                _this.map.setZoomAndCenter(10, [lng, lat]);
-                                _this.marker = new AMap.Marker({
-                                    map: _this.map,
-                                    position: new AMap.LngLat(lng, lat),   // 经纬度
-                                });
-                            }
-
-                        } else {
-                            //console.log('定位失败!');
-                        }
-                    });
-                });
-            }
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-        watch: {
-            addFormVisible(val) {
-                if(val){
-                    var _this = this
-                    setTimeout(function(){ _this.setMap('addContainer'); }, 300);
-                }
-            },
-            editFormVisible(val) {
-                if(val){
-                    var _this = this
-                    setTimeout(function(){ _this.setMap('editContainer'); }, 300);
-                }
-            }
-        },
-		mounted() {
-            this.getMsg();
-			this.getFactory();
-        }
-	}
-</script>
-
-<style scoped>
-    .formMap {
-        height: 400px;
-    }
-</style>

文件差异内容过多而无法显示
+ 0 - 1185
lss_vue/src/views/book/bookDetail.vue


+ 0 - 341
lss_vue/src/views/book/bookList.vue

@@ -1,341 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-				<el-form-item>
-					<el-input v-model="filters.keyName" size="small" placeholder="请输入机构名称"></el-input>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" size="small" v-on:click="getProject">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;">
-                    <!--  v-if="user.parentId == 1 && user.subordinateType == 0" -->
-					<el-button type="primary" size="small" @click="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
-			<el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="projectName" label="机构名称" width="350" sortable></el-table-column>
-            <el-table-column prop="ownerCompanyName" label="机构位置" sortable></el-table-column>
-			<el-table-column label="操作" width="160" align="center">
-				<template slot-scope="scope">
-                    <el-button type="primary" size="small" @click="toDetail(scope.row)">详情</el-button>
-					<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-			<el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog title="新增项目" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="120px" :rules="formRules" ref="addForm">
-                <el-col :span="24">
-                    <el-form-item label="项目名称" prop="projectName">
-                        <el-input v-model="addForm.projectName" autocomplete="off" placeholder="请输入项目名称" style="width:510px"></el-input>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="24">
-                    <el-form-item label="项目模具" prop="mold">
-                        <el-select v-model="addForm.mold" @change="companyChange" clearable filterable multiple placeholder="请选择项目模具" value-key='id' style="width:510px">
-                            <el-option v-for="item in molds" :key="item.id" :label="item.modelName" :value="item">
-                                <span style="float: left">{{ item.modelName }}</span>
-                                <span style="float: right; color: #8492a6; font-size: 6px;margin-right:17px;">{{ item.produceCompany }}</span>
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="24">
-                    <el-form-item label="项目经理" prop="managerId">
-                        <el-select v-model="addForm.managerId" clearable filterable placeholder="请选择项目经理" value-key='id' style="width:510px">
-                            <!-- <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
-                            </el-option> -->
-                            <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
-                                <span style="float: left">{{ item.username }}</span>
-                                <span style="float: right; color: #8492a6; font-size: 13px;">{{ item.companyName }}</span>
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-	import util from '../../common/js/util'
-	export default {
-		data() {
-			return {
-				filters: {
-					keyName: ''
-                },
-                user: JSON.parse(sessionStorage.getItem('user')),
-                charger: [],
-                molds: [],
-
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-
-                formRules: {
-					projectName: [
-						{ required: true, message: '请输入项目名称', trigger: 'blur' }
-                    ],
-                    mold: [
-                        { required: true, message: '请选择项目模具', trigger: ['blur','change'] }
-                    ],
-                    managerId: [
-                        { required: true, message: '请选择项目经理', trigger: ['blur','change'] }
-                    ]
-                },
-                
-                addFormVisible: false, //新增界面是否显示
-				addLoading: false,
-				//新增界面数据
-				addForm: {
-					projectName: '',
-                    mold: [],
-                    managerId: ''
-				}
-
-			}
-		},
-		methods: {
-            //获取基础数据
-            getMsg(){
-                this.http.post(this.port.project.getUserById, {
-                    companyIds: this.user.companyId,
-                    id: this.user.id
-                } , res => {
-                    if (res.code == "ok") {
-                        this.charger = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-
-                //获取模具
-                this.getMoulds();
-            },
-
-            //获取模具
-            getMoulds(){
-                this.http.post(this.port.mold.modelList, {
-                    parentId: this.user.parentId,
-                    id: this.user.id
-                }, res => {
-                    if (res.code == "ok") {
-                        this.molds = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-			//分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getProject();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getProject();
-            },
-            
-			//获取项目列表
-			getProject() {
-				this.listLoading = true;
-				this.http.post(this.port.project.projectList, {
-                    keyName: this.filters.keyName,
-                    pageNum: this.page,
-                    pageSize: this.size,
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        var list = res.data.list;
-                        for(var i in list){
-                            var customCompaniesStr = "";
-                            for(var j in list[i].customCompanies){
-                                if(j == list[i].customCompanies.length -1){
-                                    customCompaniesStr += list[i].customCompanies[j].companyName;
-                                } else {
-                                    customCompaniesStr += list[i].customCompanies[j].companyName + "、";
-                                }
-                            }
-                            list[i].customCompaniesStr = customCompaniesStr;
-                        }
-                        this.list = list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //详情
-            toDetail(row) {
-                this.$router.push('/agency/' + row.id);
-            },
-
-            //选择公司切换人员
-            companyChange() {
-                var param = {} ,
-                    str = this.user.companyId;
-                for(var i in this.addForm.mold){
-                    str += "," + this.addForm.mold[i].produceCompanyId;
-                }
-                param.companyIds = str;
-                param.id = this.user.id
-                this.http.post(this.port.project.getUserById, param , res => {
-                    if (res.code == "ok") {
-                        this.charger = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //显示新增界面
-			handleAdd() {
-                //重新获取一下模具
-                this.getMoulds();
-				this.addFormVisible = true;
-				this.addForm = {
-					projectName: '',
-                    mold: [],
-                    managerId: ''
-				};
-            },
-
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        var cId = "",
-                            cName = "",
-                            mId = "";
-
-                        for(var i in this.addForm.mold){
-                            if(cId.indexOf(this.addForm.mold[i].produceCompanyId) == -1){
-                                cId += this.addForm.mold[i].produceCompanyId + ",";
-                                cName += this.addForm.mold[i].produceCompanyName + ",";
-                            }
-                            mId += this.addForm.mold[i].id + ","
-                        }
-
-                        cId = cId.substring(0,cId.length-1);
-                        cName = cName.substring(0,cName.length-1);
-                        mId = mId.substring(0,mId.length-1);
-
-                        this.addLoading = true;
-                        this.http.post(this.port.project.addProject, {
-                            projectName: this.addForm.projectName,
-                            customerCompanyIds: cId,
-                            customerCompanyNames: cName,
-                            manager: this.addForm.managerId.username,
-                            managerId: this.addForm.managerId.id,
-                            modelIds: mId,
-                            flag: 0
-                        } , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getProject();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-			},
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-		mounted() {
-            this.getMsg();
-			this.getProject();
-		}
-	}
-
-</script>
-
-<style scoped>
-
-</style>

+ 524 - 0
lss_vue/src/views/data/data.vue

@@ -0,0 +1,524 @@
+<template>
+	<div class="data">
+        <mt-navbar v-model="selected" class="tab_head" v-on:click.native="changeTab">
+            <mt-tab-item id="tab1">数据存储监控</mt-tab-item>
+            <mt-tab-item id="tab2">云平台监控</mt-tab-item>
+            <mt-tab-item id="tab3">数据交换</mt-tab-item>
+        </mt-navbar>
+        <mt-tab-container v-model="selected">
+            <mt-tab-container-item id="tab1">
+                <div class="headMsg">
+                    <div>中心数据库总量:{{tab1_head1}}</div>
+                    <div>五大数据库总量:{{tab1_head2}}</div>
+                </div>
+                <div id="tab1_chart1" class="echarts"></div>
+                <div class="echartsBox">
+                    <table class="tab1_table">
+                        <thead><tr><td>库名</td><td>数据量(GB)</td><td>占比(%)</td></tr></thead>
+                        <tbody>
+                            <tr><td>入口库</td><td>335</td><td>13.08%</td></tr>
+                            <tr><td>信用库</td><td>310</td><td>20.1%</td></tr>
+                            <tr><td>地理库</td><td>234</td><td>9.13%</td></tr>
+                            <tr><td>法人库</td><td>135</td><td>5.27%</td></tr>
+                            <tr><td>电子证据</td><td>1548</td><td>60.42%</td></tr>
+                        </tbody>
+                    </table>
+                </div>
+                <div id="tab1_chart2" class="echarts echartsBox"></div>
+                <div id="tab1_chart3" class="echarts echartsBox bottom"></div>
+            </mt-tab-container-item>
+            <mt-tab-container-item id="tab2">
+                <div class="headMsg">
+                    <div>总用户数:{{tab2_head1}}</div>
+                    <div>在线用户数:{{tab2_head1}}</div>
+                    <div>上云系统总数量:{{tab2_head1}}</div>
+                </div>
+                <div id="tab2_chart1" class="echarts echartsBox"></div>
+                <div id="tab2_chart2" class="echarts echartsBox"></div>
+                <div id="tab2_chart3" class="echarts echartsBox"></div>
+                <div class="echartsBox bottom">
+                    <table class="tab1_table">
+                        <thead><tr><td>各委办局</td><td>接入效率</td><td>交换效率</td></tr></thead>
+                        <tbody>
+                            <tr><td>交通</td><td>335</td><td>13.08%</td></tr>
+                            <tr><td>公安</td><td>310</td><td>20.1%</td></tr>
+                            <tr><td>卫计</td><td>234</td><td>9.13%</td></tr>
+                            <tr><td>国土</td><td>135</td><td>5.27%</td></tr>
+                            <tr><td>城管</td><td>1548</td><td>60.42%</td></tr>
+                            <tr><td>安监</td><td>1548</td><td>60.42%</td></tr>
+                            <tr><td>房产局</td><td>1548</td><td>60.42%</td></tr>
+                            <tr><td>旅游</td><td>1548</td><td>60.42%</td></tr>
+                            <tr><td>水务</td><td>1548</td><td>60.42%</td></tr>
+                            <tr><td>法院</td><td>1548</td><td>60.42%</td></tr>
+                            <tr><td>环保</td><td>1548</td><td>60.42%</td></tr>
+                            <tr><td>财政</td><td>1548</td><td>60.42%</td></tr>
+                        </tbody>
+                    </table>
+                </div>
+            </mt-tab-container-item>
+            <mt-tab-container-item id="tab3">
+                <div class="headMsg">
+                    <div>当日数据交换量:{{tab3_head1}}</div>
+                    <div>数据交换次数:{{tab3_head2}}</div>
+                </div>
+            </mt-tab-container-item>
+        </mt-tab-container>
+    </div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+                selected: "tab1",
+                tab1_head1: "423GB",
+                tab1_head2: "1168GB",
+                tab2_head1: "1523638",
+                tab2_head2: "35216",
+                tab2_head3: "102",
+                tab3_head1: "114388",
+                tab3_head2: "35216",
+                list: [],
+                labels: [],
+                pageNum: 1,
+                tagId: 0,
+                popupVisible: false,
+                department: ['交通', '公安', '卫计', '国土', '城管', '安监', '房产局', '教育', '旅游', '水务', '法院', '环保', '财政'],
+			}
+		},
+		methods: {
+            // 数据存储监控
+            set_tab1_chart1(){
+                var myChart = this.echarts.init(document.getElementById('tab1_chart1'));
+                var option = {
+                    backgroundColor: '#fff',
+                    title : {
+                        text: '五大库数据储存量',
+                        x:'left'
+                    },
+                    tooltip: {
+                        trigger: 'item',
+                        formatter: "{a} <br/>{b}: {c} ({d}%)",
+                        color:'#000',
+                        textStyle:{
+                            color:"#fff",
+                        }
+                    },
+                    legend: {
+                        orient: 'vertical',
+                        x: 'right',
+                        data:['入口库','信用库','地理库','法人库','电子证据'],
+                        textStyle:{
+                            color:'#888',
+                            fontSize:12
+                        }
+                    },
+                    series: [
+                        {
+                            name:'数据储存量',
+                            type:'pie',
+                            radius: ['35%', '55%'],
+                            avoidLabelOverlap: false,
+                            color:['#F68077','#66B1FD','#0BC3FF','#FCF255','#90FB4C'],
+                            label: {
+                                normal: {  //正常的样式
+                                    show: true,
+                                    position: 'left'
+                                },
+                                emphasis: { //选中时候的样式
+                                    show: true,
+                                    textStyle: {
+                                        fontSize: '20',
+                                        fontWeight: 'bold'
+                                    }
+                                }
+                            },  //提示文字
+                            labelLine: {
+                                normal: {
+                                    show: false
+                                }
+                            },
+                            data:[
+                                {value:335, name:'入口库'},
+                                {value:310, name:'信用库'},
+                                {value:234, name:'地理库'},
+                                {value:135, name:'法人库'},
+                                {value:1548, name:'电子证据'}
+                            ]
+                        }
+                    ]
+                };
+                myChart.setOption(option);
+            },
+
+            set_tab1_chart2(){
+                var myChart = this.echarts.init(document.getElementById('tab1_chart2'));
+                var option = {
+                    backgroundColor: '#fff',
+                    title : {
+                        text: '五大库使用情况',
+                        x:'left',
+                    },
+                    tooltip: {
+                        trigger: 'axis',
+                        axisPointer: {
+                            type: 'cross',
+                            crossStyle: {
+                                color: '#999'
+                            }
+                        }
+                    },
+                    xAxis: {
+                        axisTick:{
+                            show:false
+                        },
+                        axisLine: {
+                            show: false,
+                        },
+                        axisLabel: {  
+                            interval:0,  
+                            rotate:40  
+                        },
+                        type: 'category',
+                        data: ['交通', '公安', '卫计', '国土', '城管', '安监', '房产局', '教育', '旅游', '水务', '法院', '环保', '财政']
+                    },
+                    yAxis: {
+                        axisTick:{
+                            show:false
+                        },
+                        axisLine: {
+                            show: false,
+                        },
+                        type: 'value',
+                        name: '单位:%',
+                    },
+                    series: [{
+                        data: [12, 20, 15, 80, 70, 11, 30, 80, 30, 80, 20, 50, 60],
+                        type: 'bar',
+                        barWidth : 10,
+                        itemStyle:{
+                            normal:{
+                                color: '#FF5B29',
+                            }
+                        },
+                    }]
+                };
+                myChart.setOption(option);
+            },
+
+            set_tab1_chart3(){
+                var myChart = this.echarts.init(document.getElementById('tab1_chart3'));
+                var option = {
+                    backgroundColor: '#fff',
+                    title : {
+                        text: '中心库数据存储情况',
+                        x:'left',
+                    },
+                    tooltip: {
+                        trigger: 'axis',
+                        axisPointer: {
+                            type: 'cross',
+                            crossStyle: {
+                                color: '#999'
+                            }
+                        }
+                    },
+                    xAxis: {
+                        axisTick:{
+                            show:false
+                        },
+                        axisLine: {
+                            show: false,
+                        },
+                        axisLabel: {  
+                            interval:0,  
+                            rotate:40  
+                        },
+                        type: 'category',
+                        data: ['交通', '公安', '卫计', '国土', '城管', '安监', '房产局', '教育', '旅游', '水务', '法院', '环保', '财政']
+                    },
+                    yAxis: {
+                        axisTick:{
+                            show:false
+                        },
+                        axisLine: {
+                            show: false,
+                        },
+                        type: 'value',
+                        name: '单位:%',
+                    },
+                    series: [{
+                        data: [12, 20, 15, 80, 70, 11, 30, 80, 30, 80, 20, 50, 60],
+                        type: 'bar',
+                        barWidth : 10,
+                        itemStyle:{
+                            normal:{
+                                color: '#FF5B29',
+                            }
+                        },
+                    }]
+                };
+                myChart.setOption(option);
+            },
+
+            // 云平台监控
+            set_tab2_chart1(){
+                var myChart = this.echarts.init(document.getElementById('tab2_chart1'));
+                var option = {
+                    backgroundColor: '#fff',
+                    title : {
+                        text: '上云系统数量分析',
+                        x:'left',
+                    },
+                    tooltip: {
+                        trigger: 'axis',
+                        axisPointer: {
+                            type: 'cross',
+                            crossStyle: {
+                                color: '#999'
+                            }
+                        }
+                    },
+                    xAxis: {
+                        axisTick:{
+                            show:false
+                        },
+                        axisLine: {
+                            show: false,
+                        },
+                        axisLabel: {  
+                            interval:0,  
+                            rotate:40  
+                        },
+                        type: 'category',
+                        data: ['交通', '公安', '卫计', '国土', '城管', '安监', '房产局', '教育', '旅游', '水务', '法院', '环保', '财政']
+                    },
+                    yAxis: {
+                        axisTick:{
+                            show:false
+                        },
+                        axisLine: {
+                            show: false,
+                        },
+                        type: 'value',
+                        name: '单位:%',
+                    },
+                    series: [{
+                        data: [12, 20, 15, 80, 70, 11, 30, 80, 30, 80, 20, 50, 60],
+                        type: 'bar',
+                        barWidth : 10,
+                        itemStyle:{
+                            normal:{
+                                color: '#FF5B29',
+                            }
+                        },
+                    }]
+                };
+                myChart.setOption(option);
+            },
+
+            set_tab2_chart2(){
+                var myChart = this.echarts.init(document.getElementById('tab2_chart2')) , 
+                    _this = this;
+                var option = {
+                    backgroundColor: '#fff',
+                    title : {
+                        text: '数据接入效率',
+                        x:'left',
+                    },
+                    tooltip: {
+                        trigger: 'axis',
+                        axisPointer: {
+                            type: 'cross',
+                            crossStyle: {
+                                color: '#999'
+                            }
+                        }
+                    },
+                    radar: [{
+                        indicator: (function (){
+                            var res = [];
+                            for(var i in _this.department) {
+                                res.push({text: _this.department[i] , max:100});
+                            }
+                            console.log(res)
+                            return res;
+                        })(),
+                        radius: 80
+                    }],
+                    series: [{
+                        type: 'radar',
+                        itemStyle: {normal: {areaStyle: {type: 'default'}}},
+                        data: [
+                            {
+                                name: '接入效率',
+                                value: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 75.6, 82.2, 48.7, 18.8, 6.0, 2.3],
+                                itemStyle: {
+                                    normal: {
+                                        color: 'rgba(84,196,168,0.7)',
+                                        lineStyle: {
+                                            color: '#fff',
+                                        },
+                                    },
+                                },
+                            }
+                        ]
+                    }]
+                };
+                myChart.setOption(option);
+            },
+
+            set_tab2_chart3(){
+                var myChart = this.echarts.init(document.getElementById('tab2_chart3')) , 
+                    _this = this;
+                var option = {
+                    backgroundColor: '#fff',
+                    title : {
+                        text: '数据交换效率',
+                        x:'left',
+                    },
+                    tooltip: {
+                        trigger: 'axis',
+                        axisPointer: {
+                            type: 'cross',
+                            crossStyle: {
+                                color: '#999'
+                            }
+                        }
+                    },
+                    radar: [{
+                        indicator: (function (){
+                            var res = [];
+                            for(var i in _this.department) {
+                                res.push({text: _this.department[i] , max:100});
+                            }
+                            console.log(res)
+                            return res;
+                        })(),
+                        radius: 80
+                    }],
+                    series: [{
+                        type: 'radar',
+                        itemStyle: {normal: {areaStyle: {type: 'default'}}},
+                        data: [
+                            {
+                                name:'交换效率',
+                                value:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 35.6, 62.2, 32.6, 20.0, 6.4, 3.3],
+                                itemStyle: {
+                                    normal: {
+                                        color: 'rgba(252,202,94,0.7)',
+                                        lineStyle: {
+                                            color: '#fff',
+                                        },
+                                    },
+                                },
+                            }
+                        ]
+                    }]
+                };
+                myChart.setOption(option);
+            },
+
+            changeTab() {
+                if(this.selected == 'tab1') {
+                    this.set_tab1_chart1();
+                    this.set_tab1_chart2();
+                    this.set_tab1_chart3();
+                } else if(this.selected == 'tab2') {
+                    this.set_tab2_chart1();
+                    this.set_tab2_chart2();
+                    this.set_tab2_chart3();
+                } else if(this.selected == 'tab3') {
+                    
+                }
+            }
+        },
+        created() {
+        },
+		mounted() {
+            // 数据存储监控
+            this.set_tab1_chart1();
+            this.set_tab1_chart2();
+            this.set_tab1_chart3();
+		}
+	}
+
+</script>
+
+<style scoped>
+    .tab_head {
+        position: fixed;
+        z-index: 105;
+        width: 100%;
+        top: 0;
+        
+    }
+
+    .mint-tab-container {
+        /* height: calc(100% - 46px); */
+        margin-top: 46px!important;
+        margin-bottom: 0.45rem;
+        overflow-y: auto;
+        background: #efefef;
+    }
+
+    .data {
+        background: #EFEFEF;
+    }
+
+    .headMsg {
+        background: #fff;
+        margin: 0.02rem 0 0.05rem 0;
+        padding: 0.1rem 0.2rem;
+        font-size: 0.15rem;
+    }
+
+    .headMsg {
+        line-height: 0.25rem;
+    }
+
+    .echarts {
+        width: 100%;
+        height: 3rem;
+        background: #fff;
+        padding: 0.05rem;
+        box-sizing:border-box;
+    }
+
+    .echartsBox {
+        margin-bottom: 0.15rem;
+    }
+
+    .tab1_table {
+        width: 100%;
+        border-collapse:collapse;
+        border-spacing:1;
+        border-spacing:0;
+    }
+
+    .tab1_table thead {
+        background: #F8F8F8;
+    }
+
+    .tab1_table tbody {
+        background: #fff;
+    }
+
+    .tab1_table tr td {
+        line-height: 0.4rem;
+        padding: 0 0.15rem;
+    }
+
+    .tab1_table tr td:nth-child(1) {
+        width: 30%;
+    }
+
+    .bottom {
+        margin-bottom: 0.5rem;
+    }
+</style>
+<style>
+    .tab_head .mint-tab-item-label {
+        font-size: 0.14rem;
+    }
+</style>

+ 0 - 173
lss_vue/src/views/detection/detection.vue

@@ -1,173 +0,0 @@
-<template>
-    <section>
-        <!--工具条-->
-        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-            <el-form :inline="true" :model="filters">
-                <el-col :span="2">
-                    <el-form-item>
-                        <el-select v-model="filters.value" placeholder="请选择查询条件">
-                        <el-option label="编号" value="0"></el-option>
-                        <el-option label="名称" value="1"></el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-form-item>
-                    <el-input v-model="filters.name" placeholder="请输入关键字进行搜索" style="width: 300px;" clearable></el-input>
-                </el-form-item>
-                <el-form-item>
-                    <el-button type="primary" @click="getMoulds(filters.name)">查询</el-button>
-                </el-form-item>
-            </el-form>
-        </el-col>
-
-        <!--列表-->
-        <el-table :data="moulds" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
-            <el-table-column type="index" width="60"></el-table-column>
-            <el-table-column prop="modelNo" label="模具编号" width="100" sortable></el-table-column>
-            <el-table-column label="模具名称" width="200" sortable>
-                <template slot-scope="scope">
-                    <a style="color: #409EFF; cursor: pointer" @click="toMould(scope.row.id)">{{scope.row.modelName}}</a>
-                </template>
-            </el-table-column>
-            <el-table-column prop="equipmentNo" label="云模盒编号" width="180" sortable></el-table-column>
-            <el-table-column prop="projectName" label="所属项目" width="200" sortable></el-table-column>
-            <el-table-column prop="factoryName" label="制造工厂" width="200" sortable></el-table-column>
-            <el-table-column prop="area" label="位置" width="200" sortable></el-table-column>
-            <el-table-column prop="runTimes" label="运行次数" align="center" width="100" sortable></el-table-column>
-            <el-table-column prop="ocCycle" label="每模平均周期" align="center" width="140" sortable></el-table-column>
-            <el-table-column prop="hillNumber" label="电量" align="center" width="80" sortable></el-table-column>
-            <el-table-column prop="lastOpenTime" label="最后开模时间" align="center" width="150" sortable></el-table-column>
-            <el-table-column label="模具状态" align="center" width="100" sortable>
-                <template slot-scope="scope">
-                    <span v-if="scope.row.state == 0">静止</span>
-                    <span v-else-if="scope.row.state == 1">运行</span>
-                    <span v-else-if="scope.row.state == 2">告警</span>
-                    <span v-else-if="scope.row.state == 3">待报废</span>
-                    <span v-else-if="scope.row.state == 4">已报废</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="云模盒报警" align="center" width="160">
-                <template slot-scope="scope">
-                    <span v-if="scope.row.stage == 0">正常</span>
-                    <span v-else-if="scope.row.stage == 1">温度过高</span>
-                    <span v-else-if="scope.row.stage == 2">电量过低</span>
-                    <span v-else-if="scope.row.stage == 3">安装被拆</span>
-                    <span v-else>不明</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="模具保养" align="center" width="100">
-                <template slot-scope="scope">
-                    <span v-if="scope.row.isMaintain == 1">需要</span>
-                    <span v-else>正常</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="处理" align="center" width="85">
-                <template slot-scope="scope">
-                    <el-button size="small" type="primary" @click="toMaintenance(scope.row.id)">详情</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
-
-        <!--工具条-->
-        <el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100 , 200]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;"
-            ></el-pagination>
-        </el-col>
-    </section>
-</template>
-
-<script>
-import util from "../../common/js/util";
-export default {
-  data() {
-    return {
-      moulds: [],
-      filters: {
-        name: "",
-        value: "0"
-      },
-      listLoading: false,
-      total: 0,
-      tableHeight: 0,
-      page: 1,
-      size: 20
-    };
-  },
-  methods: {
-    //分页
-    handleCurrentChange(val) {
-      this.page = val;
-      this.getMoulds();
-    },
-    handleSizeChange(val) {
-      this.size = val;
-      this.getMoulds();
-    },
-    //跳转到运行监测详情
-    toMaintenance(id) {
-      this.$router.push("/detection/" + id);
-    },
-    //跳转到模具详情
-    toMould(id) {
-      this.$router.push("/moldList/" + id + "/0");
-    },
-    //获取模具信息
-    getMoulds(keyWord) {
-      this.listLoading = true;
-      if (keyWord == null) {
-        var type = 0;
-      } else {
-        var type = this.filters.value;
-      }
-      var params = {
-        pageNum: this.page,
-        pageSize: this.size,
-        projectId: -1,
-        searchType: type,
-        keyName: keyWord,
-        type: 0
-      };
-      this.http.post(
-        this.port.mold.molds,
-        params,
-        res => {
-          this.listLoading = false;
-          if (res.code == "ok") {
-            this.moulds = res.data.list;
-            this.total = res.data.total;
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
-        },
-        error => {
-          this.listLoading = false;
-          this.$message({
-            message: error,
-            type: "error"
-          });
-        }
-      );
-    }
-  },
-  created() {
-    let height = window.innerHeight;
-    this.tableHeight = height - 210;
-  },
-  mounted() {
-    this.getMoulds();
-  }
-};
-</script>
-
-<style scoped>
-</style>

+ 0 - 726
lss_vue/src/views/detection/maintenance.vue

@@ -1,726 +0,0 @@
-<template>
-    <section>
-        <!--工具条-->
-        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-            <el-form :inline="true">
-                <el-form-item>
-                    <el-button type="text" @click="backToDetection" icon="el-icon-back" class="back">返回</el-button>
-                </el-form-item>
-                <el-form-item class="divLine"></el-form-item>
-                <el-form-item>{{mouldName}}</el-form-item>
-                <el-form-item class="state" style="float: right;">当前状态:
-                    <span v-if="mouldState == 0">静止</span>
-                    <span v-else-if="mouldState == 1">运动</span>
-                    <span v-else-if="mouldState == 2">告警</span>
-                    <span v-else-if="mouldState == 3">待报废</span>
-                    <span v-else-if="mouldState == 4">已报废</span>
-                </el-form-item>
-            </el-form>
-        </el-col>
-        
-        <el-col :span="24" :style="allDetail">
-            <!-- 模具处理 -->
-            <el-col :span="24" class="title">模具处理</el-col>
-            <el-col :span="6" style="line-height: 32px; border-right: #c3c3c3 1px solid;">
-                当前保养状态:
-                <span v-if="requirement" style="color: #ff4949;">需要</span>
-                <span v-else style="color: black;">正常</span>
-                <el-button size="small" type="primary" @click="showMaintenance" style="margin-left: 16px;"
-                    v-if="!(user.parentId == 1 && user.subordinateType == 1) && requirement">立即处理
-                </el-button>
-            </el-col>
-            <el-col :span="8" :offset="2" style="line-height: 32px;">
-                云模盒告警:{{warningInfo}}
-                <el-button size="small" type="primary" @click="warningFormVisible = true" style="margin-left: 16px;"
-                    v-if="!(user.parentId == 1 && user.subordinateType == 1) && stage != 0">立即处理
-                </el-button>
-            </el-col>
-
-            <!-- 开合周期 -->
-            <el-col :span="24" class="title">开合周期</el-col>
-            <el-col :span="24">
-                <el-col :span="11">
-                    <div style="padding:0 20px">
-                        <b style="font-size:20px;text-align:center;margin-bottom:20px;">开合次数表</b>
-                        <el-date-picker v-model="openNum" style="float:right;width:125px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change='changeOpen(1)' size="mini" :clearable="false" type="date" placeholder="选择日期"></el-date-picker>
-                    </div>
-                    <div id="myChart1" :style="{ height: '300px'}"></div>
-                </el-col>
-                <el-col :span="11" :offset="2">
-                    <div style="padding:0 20px">
-                        <b style="font-size:20px;text-align:center;margin-bottom:20px;">开合周期表</b>
-                        <el-date-picker v-model="openCycle" style="float:right;width:210px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change='changeOpen(2)' size="mini" :clearable="false" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
-                    </div>
-                    <div id="myChart2" :style="{ height: '300px'}"></div>
-                </el-col>
-            </el-col>
-
-            <!-- 操作记录 -->
-            <el-col :span="24" class="title">处理记录</el-col>
-            <!-- 列表 -->
-            <el-table :data="records" highlight-current-row v-loading="listLoading" style="width: 100%;" :height="tableHeight">
-                <el-table-column type="index" width="60"></el-table-column>
-                <el-table-column prop="maintainUserName" label="保养人" width="100" sortable></el-table-column>
-                <el-table-column prop="maintainType" label="保养方案" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.maintainType == 0">喷漆</span>
-                        <span v-else-if="scope.row.maintainType == 1">检查</span>
-                        <span v-else="scope.row.maintainType == 2">易损件</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="fileName" label="保养照片" width="200" sortable>
-                    <template slot-scope="scope" v-if="scope.row.fileUrl != null">
-                        <!-- <a style="color: #409EFF; cursor: pointer; text-decoration: none;"
-                            :href="scope.row.fileUrl" :download="scope.row.fileName"> -->
-                            <!-- 大图加载 -->
-                            <div class="demo-image__preview">
-                                <el-image style="width: 100px; height: 100px"
-                                    :src="scope.row.fileUrl" :preview-src-list="scope.row.fileUrl"></el-image>
-                            </div>
-                        <!-- </a> -->
-                    </template>
-                </el-table-column>
-                <el-table-column prop="indate" label="关闭时间" width="200" sortable></el-table-column>
-            </el-table>
-
-            <!--工具条-->
-            <el-col :span="24" class="toolbar">
-                <el-pagination
-                    @size-change="handleSizeChange"
-                    @current-change="handleCurrentChange"
-                    :page-sizes="[20 , 50 , 80 , 100 , 200]"
-                    :page-size="20"
-                    layout="total, sizes, prev, pager, next"
-                    :total="total"
-                    style="float:right;"
-                ></el-pagination>
-            </el-col>
-        </el-col>
-
-        <!--新增界面-->
-        <el-dialog title="处理保养" v-if="maintenanceFormVisible" :visible.sync="maintenanceFormVisible" :close-on-click-modal="false" customClass="customWidth">
-            <el-form :model="maintenanceForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
-                <el-form-item label="保养类型" prop="type">
-                    <!-- 保养类型选择 -->
-                    <el-select v-model="type.value" filterable placeholder="请选择保养类型" style="width:202px">
-                        <el-option v-for="item in type" :key="item.value" :label="item.label" :value="item.value"></el-option>
-                    </el-select>
-                </el-form-item>
-
-                <!-- 保养类型为1时 选择易损件ID -->
-                <el-form-item v-if="type.value == 1" label="易损件" prop="vulnerable">
-                    <el-select v-model="vulnerable.value" clearable filterable placeholder="请选择易损件" style="width:202px">
-                        <el-option v-for="item in vulnerable" :key="item.value" :label="item.label" :value="item.value"></el-option>
-                    </el-select>
-                </el-form-item>
-
-                <!-- 保养类型为0时 选择保养动作 -->
-                <el-form-item v-else label="动作" prop="action">
-                    <el-select v-model="action.value" filterable placeholder="请选择动作" style="width:202px">
-                        <el-option v-for="item in action" :key="item.value" :label="item.label" :value="item.value"></el-option>
-                    </el-select>
-                </el-form-item>
-
-                <el-form-item label="保养照片">
-                    <el-upload ref="upload" action="customize" :http-request="maintain" :limit="1" :auto-upload="false" :before-upload="beforeUpload">
-                        <el-button size="small" type="primary">上传</el-button>
-                    </el-upload>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click.native="maintenanceFormVisible = false">取消</el-button>
-                <el-button type="primary" @click.native="maintainConfirm" :loading="maintenanceLoading">立即处理</el-button>
-            </div>
-        </el-dialog>
-
-        <!--告警处理界面-->
-        <el-dialog title="告警处理" v-if="warningFormVisible" :visible.sync="warningFormVisible" :close-on-click-modal="false" customClass="customWidth">
-            <el-form :model="warningForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
-                <el-form-item label="告警类型">
-                    <el-input placeholder="请选择告警类型" v-model="warningInfo" :disabled="true"></el-input>
-                </el-form-item>
-                <el-form-item label="云模盒设置" prop="action">
-                    <el-select v-model="warningForm.equipmentId" filterable placeholder="请选择云模盒" style="width:202px">
-                        <el-option v-for="item in equipments" :key="item.value" :label="item.label" :value="item.value"></el-option>
-                    </el-select>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click.native="warningFormVisible = false">取消</el-button>
-                <el-button type="primary" @click.native="warningArrangement" :loading="warningLoading">立即处理</el-button>
-            </div>
-        </el-dialog>
-    </section>
-</template>
-
-<script>
-    import util from "../../common/js/util";
-    export default {
-        data() {
-            return {
-                user: JSON.parse(sessionStorage.getItem("user")),
-                detail: '',
-                //本页模具ID
-                mouldId: null,
-                //模具名字
-                mouldName: null,
-                //模具状态
-                mouldState: 0,
-                //记录
-                records: [],
-                //警告信息
-                warningInfo: "",
-                stage: 0,
-                //告警时需要更换的设备的列表
-                equipments: [],
-                //标题栏过滤器
-                filters: {
-                    name: "",
-                    value: ""
-                },
-                listLoading: false,
-                page: 1,
-                size: 20,
-                total: 0,
-                tableHeight: 0,
-                //活跃页面
-                activePage: 0,
-                formRules: {},
-                //保养界面 种类
-                type: [{ label: "动作", value: 0 }, { label: "易损件", value: 1 }],
-                //保养界面 动作
-                action: [{ label: "喷漆", value: 0 }, { label: "检查", value: 1 }],
-                //易损件 假数据
-                vulnerable: [],
-                //是否需要保养 提示
-                requirement: false,
-                prompt: true,
-                //保养详情界面显示
-                maintenanceFormVisible: false,
-                maintenanceLoading: false,
-                //告警详情界面显示
-                warningFormVisible: false,
-                warningLoading: false,
-                //保养详情界面数据
-                maintenanceForm: {
-                    username: "",
-                    account: "",
-                    mobile: "",
-                    teamName: "",
-                    companyId: "",
-                    roleType: "",
-                    flag: 0
-                },
-                //告警处理截面数据
-                warningForm: {
-                    mouldId: null,
-                    equipmentId: null
-                },
-                imageUrl: "",
-                openNum: util.formatDate.format(new Date(), 'yyyy-MM-dd'),
-                openCycle: [util.formatDate.format(new Date(), 'yyyy-MM-dd') , util.formatDate.format(new Date(), 'yyyy-MM-dd')],
-                allDetail: {
-                    overflow: 'auto',
-                    padding: '0px 5px',
-                    height: 0
-                },
-                echarts1: {},
-                echarts2: {},
-            };
-        },
-        methods: {
-            //分页
-            handleCurrentChange(val) {
-                this.page = val;
-                this.getList();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-                this.getList();
-            },
-
-            //标签页面切换时
-            handleClick(tab, event) {
-                this.activeTab = tab.name;
-                //应该是取得对应的消息 目前还没写
-            },
-
-            selsChange: function(sels) {
-                this.sels = sels;
-            },
-
-            backToDetection() {
-                this.$router.go(-1);
-            },
-
-            //上传格式和大小限制
-            beforeUpload(file) {
-                const isJPG = file.type === "image/jpg";
-                const isJPEG = file.type === "image/jpeg";
-                const isPNG = file.type === "image/png";
-                var rightType = isJPG || isPNG || isJPEG;
-                const isLt5M = file.size / 1024 / 1024 < 5;
-                if (!rightType) {
-                    this.$message.error("上传的图片只能是 JPG 或 PNG 格式!");
-                }
-                if (!isLt5M) {
-                    this.$message.error("上传的图片大小不能超过 5MB!");
-                }
-                return rightType && isLt5M;
-            },
-
-            //显示保养界面
-            showMaintenance: function() {
-                this.maintenanceFormVisible = true;
-            },
-
-            //获取记录
-            getList() {
-                this.listLoading = true;
-                this.http.post( this.port.mold.moldMaintainList, { 
-                    mouldId: this.mouldId, 
-                    pageSize: this.size, 
-                    pageNum: this.page 
-                },
-                res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.records = res.data.list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                        message: res.msg,
-                        type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //模具详情 获取模具名字用的
-            getDetail() {
-                this.http.post( this.port.mold.moldDetail, {
-                    id: this.mouldId
-                },
-                res => {
-                    if (res.code == "ok") {
-                        this.detail = res.data.vo;
-                        this.getEcharts1();
-                        this.getEcharts2();
-                        this.mouldName = res.data.vo.modelName;
-                        this.mouldState = res.data.vo.state;
-                        this.requirement = res.data.vo.isMaintain == 1;
-                        this.stage = res.data.vo.stage;
-                        if(this.stage == 0){
-                            this.warningInfo = "正常";
-                        }else if(this.stage == 1){
-                            this.warningInfo = "温度过高";
-                        }else if(this.stage == 2){
-                            this.warningInfo = "电量过低";
-                        }else if(this.stage == 3){
-                            this.warningInfo = "温度过高、电量过低";
-                        }else{
-                            this.warningInfo = "状况不明";
-                        }
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //模具保养的按钮按下之后(关闭之后也要清理文件但是还没写)
-            maintainConfirm() {
-                if (this.$refs.upload.uploadFiles.length == 1) {
-                    this.$refs.upload.submit();
-                } else {
-                    this.$message({
-                    message: "必须上传照片",
-                    type: "error"
-                    });
-                }
-            },
-
-            //模具保养
-            maintain(params) {
-                if (this.type.value != null) {
-                    var fileObj = params.file;
-                    var form = new FormData();
-                    form.append("file", fileObj);
-                    form.append("mouldId", this.mouldId);
-                    form.append("maintainType", this.type.value);
-                    if (this.type.value == 0) {
-                        if (this.action.value == null) {
-                            return;
-                        }
-                        form.append("ways", this.action.value);
-                    } else {
-                        if (this.vulnerable.value == null) {
-                            return;
-                        }
-                        form.append("ways", this.vulnerable.value); //后面应该换成易损件的ID
-                    }
-                    this.http.uploadFile( this.port.mold.moldMaintain, form,
-                    res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: "保养完成",
-                                type: "success"
-                            });
-                            this.maintenanceFormVisible = false;
-                            this.requirement = false;
-                            this.$refs.upload.clearFiles();
-                            this.getList();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: "error"
-                            });
-                        }
-                    },
-                    error => {
-                        this.listLoading = false;
-                        this.$message({
-                            message: error,
-                            type: "error"
-                        });
-                    });
-                }
-            },
-
-            //获取告警时可以更换的设备列表
-            getAlternativeEquipment() {
-                this.http.post( this.port.mold.moldChangeRequirement, {
-                    mouldId: this.mouldId
-                },
-                res => {
-                    if (res.code == "ok") {
-                        this.equipments = [];
-                        res.data.forEach(item => {
-                            this.equipments.push({ label: item.equipmentNo, value: item.id });
-                        });
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //告警处理
-            warningArrangement() {
-                if (this.warningForm.equipmentId == null) {
-                    this.$message({
-                    message: "请选择云模盒",
-                    type: "error"
-                    });
-                } else {
-                    this.http.post( this.port.mold.moldChange, this.warningForm,
-                    res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: "告警处理完毕",
-                                type: "success"
-                            });
-                            this.warningFormVisible = false;
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: "error"
-                            });
-                        }
-                    },
-                    error => {
-                        this.$message({
-                            message: error,
-                            type: "error"
-                        });
-                    });
-                }
-            },
-
-            // 绘制折线图
-            getEcharts1() {
-                this.http.post( this.port.base.openingAndClosingTimesChart, {
-                    equipmentNo: this.detail.equipmentNo,//"898602B5191730002945",
-                    time: this.openNum
-                },
-                res => {
-                    if (res.code == "ok") {
-                        var option = {
-                            tooltip: {
-                                trigger: 'axis'
-                            },
-                            // grid: {
-                            //     left: '3%',
-                            //     right: '4%',
-                            //     bottom: '6%',
-                            //     containLabel: true
-                            // },
-                            xAxis: {
-                                type: 'category',
-                                boundaryGap: false,
-                                data: []
-                            },
-                            yAxis: {
-                                name: '次数(‰)',
-                                type: 'value'
-                            },
-                            dataZoom: [{
-                                type: 'inside',
-                                start: 0,
-                                end: 10
-                            }, {
-                                start: 0,
-                                end: 10,
-                                handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
-                                handleSize: '80%',
-                                handleStyle: {
-                                    color: '#fff',
-                                    shadowBlur: 3,
-                                    shadowColor: 'rgba(0, 0, 0, 0.6)',
-                                    shadowOffsetX: 2,
-                                    shadowOffsetY: 2
-                                }
-                            }],
-                            series: [
-                                {
-                                    name:'开合次数',
-                                    type:'line',
-                                    data:[],
-                                    itemStyle : { 
-                                        normal : { 
-                                            color: "#009ad6", //改变折线点的颜色
-                                            lineStyle:{ 
-                                                color: "#009ad6" //改变折线颜色
-                                            } 
-                                        } 
-                                    }
-                                }
-                            ]
-                        },
-                        list = res.data, 
-                        xData = [], 
-                        sData = [];
-
-                        for(var i in list) {
-                            xData.push(i);
-                            sData.push(list[i])
-                        }
-                        option.xAxis.data = xData;
-                        option.series[0].data = sData;
-
-                        this.drawEchart(1,JSON.stringify(option))
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-            
-            getEcharts2() {
-                this.http.post( this.port.base.openingAndClosingTimesChartCycle, {
-                    equipmentNo: this.detail.equipmentNo,//"898602B5191730002945",
-                    startTime: this.openCycle[0],
-                    endTime: this.openCycle[1]
-                },
-                res => {
-                    if (res.code == "ok") {
-                        var option = {
-                            tooltip: {
-                                trigger: 'axis'
-                            },
-                            grid: {
-                                left: '3%',
-                                right: '4%',
-                                bottom: '3%',
-                                containLabel: true
-                            },
-                            xAxis: {
-                                type: 'category',
-                                boundaryGap: false,
-                                data: []
-                            },
-                            yAxis: {
-                                name: '秒(s)',
-                                type: 'value'
-                            },
-                            series: [{
-                                name:'最大开盒周期',
-                                type:'line',
-                                stack: '开盒周期',
-                                data:[],
-                                itemStyle : { 
-                                    normal : { 
-                                        color: "#d93a49", //改变折线点的颜色
-                                        lineStyle:{ 
-                                            color: "#d93a49" //改变折线颜色
-                                        } 
-                                    } 
-                                }
-                            },
-                            {
-                                name:'最小开盒周期',
-                                type:'line',
-                                stack: '开盒周期',
-                                data:[],
-                                itemStyle : { 
-                                    normal : { 
-                                        color: "#009ad6", //改变折线点的颜色
-                                        lineStyle:{ 
-                                            color: "#009ad6" //改变折线颜色
-                                        } 
-                                    } 
-                                }
-                            },
-                            {
-                                name:'平均开盒周期',
-                                type:'line',
-                                stack: '开盒周期',
-                                data:[],
-                                itemStyle : { 
-                                    normal : { 
-                                        color: "#7fb80e", //改变折线点的颜色
-                                        lineStyle:{ 
-                                            color: "#7fb80e" //改变折线颜色
-                                        } 
-                                    } 
-                                }
-                            }]
-                        },
-                        list = res.data, 
-                        xData = [], 
-                        avg = [] , max = [] , min = [];
-
-                        for(var i in list) {
-                            xData.push(list[i].time);
-                            max.push(list[i].maxCycle/1000);
-                            min.push(list[i].minCycle/1000);
-                            avg.push(list[i].avgCycle/1000);
-                        }
-                        option.xAxis.data = xData;
-                        option.series[0].data = max;
-                        option.series[1].data = min;
-                        option.series[2].data = avg;
-
-            
-                        this.drawEchart(2,JSON.stringify(option));
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-            
-
-            drawEchart(type,option) {
-                let myChart = this.echarts.init(document.getElementById("myChart" + type));
-                if(type == 1) {
-                    this.echarts1 = myChart;
-                } else {
-                    this.echarts2 = myChart;
-                }
-                myChart.setOption(JSON.parse(option));
-            },
-
-            changeOpen(type) {
-                if(type == 1) {
-                    this.getEcharts1();
-                } else if(type == 2) {
-                    this.getEcharts2();
-                }
-            },
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 370;
-            this.allDetail.height = height - 170 + "px";
-            const that = this;
-            window.onresize = function temp() {
-                that.allDetail.height = window.innerHeight - 170;
-            };
-        },
-        mounted() {
-            this.mouldId = this.$route.params.id; //传到当前页面的模具编号
-            this.warningForm.mouldId = this.mouldId; //顺便把相关的告警中的模具ID赋值一下
-            this.getList();
-            this.getDetail();
-            this.getAlternativeEquipment();
-
-            const that = this
-            window.onresize = function temp() {
-                that.echarts1.resize();
-                that.echarts2.resize();
-            };
-        }
-    };
-</script>
-
-<style scoped>
-    .title {
-        padding-left: 10px;
-        padding-bottom: 0px;
-        margin: 20px 0;
-        font-size: 16px;
-        line-height: 24px;
-        border-left: 1px #20a0ff solid;
-    }
-
-    .toolbar .el-form-item {
-        font-size: 14px;
-        vertical-align: middle;
-    }
-
-    .back {
-        font-size: 16px;
-    }
-
-    .divLine {
-        width: 2px;
-        background: #c3c3c3;
-        height: 100%;
-    }
-
-    .projectTitle {
-        font-size: 18px;
-        color: #333;
-    }
-</style>

+ 0 - 151
lss_vue/src/views/invite.vue

@@ -1,151 +0,0 @@
-<template>
-    <div class="main">
-        <div class="title">云模管理平台</div>
-        <p class="hello">{{detail.invitee}}您好!</p>
-        <p class="invite">
-            {{detail.operator}} 邀您参与
-            <span class="impoortant">{{detail.companyName}}</span>的
-            <span class="impoortant">{{detail.projectName}}</span>项目
-        </p>
-        <div class="info">
-            <p class="info1">您的账户信息</p>
-            <p class="info2">
-                手机号
-                <span>{{detail.account}}</span>
-            </p>
-            <p class="info3">
-                初始密码
-                <span>000000</span>
-            </p>
-        </div>
-        <button @click="join">立即加入</button>
-    </div>
-</template>
-
-<script>
-    import util from "../common/js/util";
-    export default {
-        data() {
-            return {
-                inviteeId: "",
-                projectId: "",
-                operatorId: "",
-                detail: ""
-            };
-        },
-        methods: {
-            join() {
-                this.$router.push("/login");
-            }
-        },
-        created() {},
-        mounted() {
-            //获取传入的值
-            this.inviteeId = this.$route.params.inviteeId;
-            this.projectId = this.$route.params.projectId;
-            this.operatorId = this.$route.params.operatorId;
-
-            this.http.post(this.port.project.inviteUser, {
-                inviteeId: this.inviteeId,
-                projectId: this.projectId,
-                operatorId: this.operatorId
-            } , res => {
-                if (res.code == "ok") {
-                    this.detail = res.data;
-                } else {
-                    this.$message({
-                        message: res.msg,
-                        type: 'error'
-                    });
-                }
-            }, error => {
-                this.$message({
-                    message: error,
-                    type: 'error'
-                });
-            })
-        }
-    };
-</script>
-
-<style scoped>
-    * {
-        margin: 0;
-        padding: 0;
-    }
-
-    .main {
-        margin: 80px auto;
-        width: 360px;
-        color: #555;
-    }
-
-    .title {
-        text-align: center;
-        font-size: 20px;
-        color: #999;
-        line-height: 50px;
-        border-bottom: #ddd 1px solid;
-        margin-bottom: 5px;
-        padding: 0 10px;
-    }
-
-    .impoortant {
-        color: #1e72ff;
-    }
-
-    .hello {
-        line-height: 40px;
-        padding: 0 10px;
-    }
-
-    .invite {
-        line-height: 22px;
-        padding: 0 10px;
-    }
-
-    .info {
-        background-color: #eee;
-        margin: 20px 0;
-        padding: 10px;
-        border-radius: 3px;
-    }
-
-    .info1 {
-        padding-left: 10px;
-        border-left: #1e72ff 1px solid;
-        line-height: 18px;
-    }
-
-
-    .info2 {
-        line-height: 20px;
-        padding: 10px 0;
-    }
-
-    .info3 {
-        line-height: 20px;
-    }
-
-    .info2 span {
-        position: relative;
-        left: 40px;
-        color: #999;
-    }
-
-    .info3 span {
-        position: relative;
-        left: 25px;
-        color: #999;
-    }
-
-    button {
-        background-color: #1e72ff;
-        border: 0;
-        color: white;
-        border-radius: 5px;
-        width: 100%;
-        height: 40px;
-        cursor: pointer;
-    }
-</style>

+ 0 - 344
lss_vue/src/views/map/map.vue

@@ -1,344 +0,0 @@
-<template>
-	<div id="container"></div> 
-</template>
-
-<script>
-    import Vue from 'vue';
-
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-            getMap() {
-                var _this = this
-                this.http.post( this.port.map.mapList, {},
-                res => {
-                    if (res.code == "ok") {
-                        var list = res.data;
-
-                        if(list != null && list.length > 0){
-                            var map = new AMap.Map('container', {
-                                resizeEnable: true,   
-                                zoom: 5
-                            });
-                            map.clearMap();  
-                            var markers = [] , 
-                                infoWindow , 
-                                data = list;
-
-                            var marker;
-                            for(var i in data){
-                                var jfong=[ data[i].ylng , data[i].xlat];
-                                marker = new AMap.Marker({
-                                    position: jfong,
-                                    zIndex: 101,
-                                    map:map
-                                });	
-                                marker.setMap(map);	
-                                marker.msg = data[i];
-                                marker.on('click', function(data){
-                                    var str = "<div class='window'>" +
-                                        "<div class='info-top'><div>"+ data.target.msg.companyName +"</div><i class='el-icon-close' @click='closeInfoWindow()'></i></div>" +
-                                        "<div class='info-middle'>";
-                                        for(var i in data.target.msg.list){
-                                            str += "<div class='info-item'><a @click='jumpToMold("+ data.target.msg.list[i].id +")'>" + data.target.msg.list[i].modelName + "(" + data.target.msg.list[i].modelNo + ")</a>"
-                                                if(data.target.msg.list[i].state=='0'){
-                                                    str += "<span class='info-state'><span class='info-ball' style='background:#999999;'></span>静止</span>"
-                                                } else {
-                                                    str += "<span class='info-state'><span class='info-ball' style='background:#00CD66;'></span>运行</span>"
-                                                }
-                                            str += "</div>"
-                                        }
-                                        str += "</div>" +
-                                    "</div>"
-
-                                    var MyComponent = Vue.extend({
-                                        template: str ,
-                                        methods:{
-                                            closeInfoWindow:function() {
-                                                map.clearInfoWindow();
-                                            },
-                                            jumpToMold:function(id) {
-                                                _this.$router.push("/moldList/" + id + "/0");
-                                            }
-                                        }
-                                    });
-                                    var component= new MyComponent().$mount();
-                                    infoWindow.setContent(component.$el);
-                                    infoWindow.open(map, data.lnglat);
-                                });
-                            }
-
-                            infoWindow = new AMap.InfoWindow({
-                                isCustom:	true,
-                                draggable: true,  //是否可拖动
-                                showShadow: true,
-                                autoMove: true,
-                                offset: new AMap.Pixel(0, -31),
-                                content:""
-                            });
-
-                            marker.setMap(map);
-                        }
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-        },
-        mounted() {
-            //this.getMap();
-
-            this.$el.style.height = (window.innerHeight - 100) + "px";
-            const that = this;
-            window.onresize = function temp() {
-                that.$el.style.height = (window.innerHeight - 100) + "px";
-            };
-
-            //新地图
-            var map = new AMap.Map('container', {
-                zoom: 4,
-                //mapStyle: "amap://styles/grey",
-                mapStyle: "amap://styles/8016abec658e1132508723183f848f14",
-                features: ['bg']
-            });
-
-            var _this = this;
-            //加载相关组件
-            AMapUI.load(['ui/geo/DistrictCluster', 'ui/misc/PointSimplifier', 'lib/$' ,  'lib/utils'], function(DistrictCluster, PointSimplifier , $ , utils) {
-
-                window.DistrictCluster = DistrictCluster;
-
-                //启动页面
-                var pointSimplifierIns = new PointSimplifier({
-                    map: map, //所属的地图实例
-                    autoSetFitView: false, //禁止自动更新地图视野
-                    zIndex: 110,
-                    getPosition: function(item) {
-                        if (!item) {
-                            return null;
-                        }
-                        //var parts = item.split(',');
-                        //返回经纬度
-                        //return [parseFloat(parts[0]), parseFloat(parts[1])];
-                        return [parseFloat(item.lng), parseFloat(item.lat)];
-                    },
-                    getHoverTitle: function(dataItem, idx) {
-                        var state = "";
-                        if(dataItem.state == '0'){
-                            state = "静止"
-                        } else if(dataItem.state == '1'){
-                            state = "运动"
-                        } else if(dataItem.state == '2'){
-                            state = "告警"
-                        } else if(dataItem.state == '3'){
-                            state = "报废"
-                        }
-                        return dataItem.modelName + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + state;
-                    },
-                    renderOptions: {
-                        //点的样式
-                        pointStyle: {
-                            width: 6,
-                            height: 6,
-                            fillStyle:'rgba(0, 236, 252, 0.9)'
-                        },
-                        //鼠标hover时的title信息
-                        hoverTitleStyle: {
-                            position: 'top'
-                        }
-                    }
-                });
-
-                function MyRender(distClusterIns, opts) {
-                    //直接调用父类的构造函数
-                    MyRender.__super__.constructor.apply(this, arguments);
-                }
-
-                //继承默认引擎
-                utils.inherit(MyRender, DistrictCluster.Render.Default);
-
-                utils.extend(MyRender.prototype, {
-                    drawFeaturePolygons: function(ctx, polygons, styleOptions, feature, dataItems) {
-                        //调用父类方法
-                        MyRender.__super__.drawFeaturePolygons.apply(this, arguments);
-
-                        //直接绘制聚合信息
-                        this.drawMyLabel(feature, dataItems);
-                    },
-                    _initContainter: function() {
-                        //调用父类方法
-                        MyRender.__super__._initContainter.apply(this, arguments);
-
-                        //创建一个新的canvas
-                        this._createCanvas('mylabel', this._container);
-                    },
-                    /**
-                     * 绘制一个蓝底白字的label替代聚合标注
-                     */
-                    drawMyLabel: function(feature, dataItems) {
-                        //if(dataItems.length != 0){
-                            var pixelRatio = this.getPixelRatio(); //高清下存在比例放大
-
-                            var containerPos = map.lngLatToContainer(feature.properties.centroid || feature.properties.center);
-
-                            var labelCtx = this._getCanvasCxt('mylabel');
-
-                            //文字的中心点
-                            var centerX = containerPos.getX() * pixelRatio,
-                                centerY = containerPos.getY() * pixelRatio;
-
-                            labelCtx.save();
-
-                            labelCtx.font = 12 * pixelRatio + 'px 微软雅黑';
-                            
-                            var name = feature.properties.name;
-                            if(feature.properties.level == "province") {
-                                if(name == "黑龙江省" || name == "内蒙古自治区"){
-                                    name = name.substring(0,3)
-                                } else {
-                                    name = name.substring(0,2)
-                                }
-                            }
-                            var text = name;//feature.properties.name ;//+ '\n' + dataItems.length;
-                            var textMetrics = labelCtx.measureText(text);
-                            var halfTxtWidth = textMetrics.width / 2;
-
-                            var num = dataItems.length;
-                            var numMetrics = labelCtx.measureText(num);
-                            var halfNumWidth = numMetrics.width / 2;
-
-                            // labelCtx.fillStyle = 'rgba(3 , 94 , 255 , 0.5)';//'#3366cc';
-                            
-                            labelCtx.beginPath();
-                            labelCtx.fillStyle = 'rgba(12 , 239 , 231 , 0.8)';//'#3366cc';
-
-                            //绘制一个蓝色背景
-                            labelCtx.strokeStyle= "rgba(12 , 239 , 231 , 0.65)"
-                            labelCtx.fillStyle = 'rgba(12 , 239 , 231 , 0.65)';
-                            
-                            var radius = 0;
-                            if(textMetrics.width > numMetrics.width) {
-                                radius = (textMetrics.width + 6 * pixelRatio) / 2;
-                            } else {
-                                radius = (numMetrics.width + 6 * pixelRatio) / 2;
-                            }
-
-                            labelCtx.arc(centerX , centerY, radius + 6,
-                                0*Math.PI, 2*Math.PI, false);
-
-                            labelCtx.closePath();
-                            labelCtx.fill();
-                            // labelCtx.fillRect(centerX - halfTxtWidth - 3 * pixelRatio,
-                            //     centerY - 11 * pixelRatio,
-                            //     textMetrics.width + 6 * pixelRatio,
-                            //     22 * pixelRatio);
-
-                            labelCtx.fillStyle = '#ffffff';
-                            labelCtx.textBaseline = 'middle';
-                            //labelCtx.stroke();
-
-                            labelCtx.fillText(text, centerX - halfTxtWidth, centerY - 5);
-                            labelCtx.fillText(num , centerX - halfNumWidth, centerY + 12);
-
-                            labelCtx.stroke();
-                            labelCtx.restore();
-                        //}
-                    }
-                });
-
-                var distCluster = new DistrictCluster({
-                    zIndex: 100,
-                    map: map, //所属的地图实例
-                    getPosition: function(item) {
-                        if (!item) {
-                            return null;
-                        }
-                        // var parts = item.split(',');
-                        //返回经纬度
-                        //return [parseFloat(parts[0]), parseFloat(parts[1])];
-                        return [parseFloat(item.lng), parseFloat(item.lat)];
-                    },
-                    renderConstructor: MyRender,
-                    //特定区划级别的默认样式
-                    renderOptions: {
-                        getClusterMarker: null,
-                        featureClickToShowSub: true,
-                        featureStyle: {
-                            lineWidth: 2, //描边线宽
-                            // strokeStyle: 'rgba(0, 119, 180, 0.5)', //描边色
-                            strokeStyle: 'rgba(75, 143, 239, 0.5)', //描边色
-                            //鼠标Hover后的样式
-                            hoverOptions: {
-                                fillStyle: 'rgba(255,255,255,0.2)'
-                            }
-                        },
-                        getFeatureStyle: function(feature, dataItems) {
-                            return {
-                                fillStyle: ''
-                            };
-                        }
-                    },
-                });
-
-                window.distCluster = distCluster;
-
-                map.on('zoomend', function() {
-                    var zoom = map.getZoom();
-                    //获取 pointStyle
-                    var pointStyle = pointSimplifierIns.getRenderOptions().pointStyle;
-                    //根据当前zoom调整点的尺寸
-                    pointStyle.width = pointStyle.height = 2 * Math.pow(1.2, map.getZoom() - 3);
-                });
-
-                var zoom = map.getZoom();
-                //获取 pointStyle
-                var pointStyle = pointSimplifierIns.getRenderOptions().pointStyle;
-                //根据当前zoom调整点的尺寸
-                pointStyle.width = pointStyle.height = 2 * Math.pow(1.2, map.getZoom() - 3);
-
-                $('<div id="loadingTip">加载数据,请稍候...</div>').appendTo(document.body);
-                // $.get('https://a.amap.com/amap-ui/static/data/10w.txt', function(csv) {
-                
-                //     $('#loadingTip').remove();
-                //     var data = csv.split('\n');
-                //     distCluster.setData(data);
-                //     pointSimplifierIns.setData(data);
-                // });
-                _this.http.post( _this.port.map.newMap, {},
-                res => {
-                    $('#loadingTip').remove();
-                    var data = res.data;
-                    distCluster.setData(data);
-                    pointSimplifierIns.setData(data);
-                },
-                error => {
-                    _this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                })
-            });
-        }
-	}
-
-</script>
-
-<style scoped lang="scss">
-    #container {
-        width: 100%; 
-        margin-top: 10px;
-    }  
-</style>

+ 0 - 264
lss_vue/src/views/message.vue

@@ -1,264 +0,0 @@
-<template>
-  <section>
-    <!--工具条-->
-    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-      <el-form :inline="true">
-        <el-col :span="2">
-          <el-form-item>消息中心</el-form-item>
-        </el-col>
-      </el-form>
-    </el-col>
-
-    <!--选项卡-->
-    <el-col :span="24">
-      <el-tabs v-model="activePage" @tab-click="handleClick" type="card">
-        <el-tab-pane name="0" label="审批">
-          <div :style="heightString">
-            <span v-if="messages[0].length == 0">目前暂无消息</span>
-            <div
-              class="message-div"
-              v-for="item in messages[0]"
-              @click="locationHerf(item.id, item.refId, item.noticeType, item.belongType)"
-            >
-              <p>
-                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
-                <span class="message-title" v-else>{{item.projectName}}</span>
-                <span class="message-time">{{item.indate}}</span>
-              </p>
-              <p class="message-article">{{item.content}}</p>
-            </div>
-          </div>
-          <!--分页1-->
-          <el-col :span="24" class="toolbar">
-            <el-pagination
-              @size-change="handleSizeChange0"
-              @current-change="handleCurrentChange0"
-              :page-sizes="[20 , 50 , 80 , 100 , 200]"
-              :page-size="20"
-              layout="total, sizes, prev, pager, next"
-              :total="total[0]"
-              style="float:right;"
-            ></el-pagination>
-          </el-col>
-        </el-tab-pane>
-        <el-tab-pane name="1" label="警告">
-          <div :style="heightString">
-            <span v-if="messages[1].length == 0">目前暂无消息</span>
-            <div
-              class="message-div"
-              v-for="item in messages[1]"
-              @click="locationHerf(item.id, item.refId, item.noticeType, null)"
-            >
-              <p>
-                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
-                <span class="message-title" v-else>{{item.projectName}}</span>
-                <span class="message-time">{{item.indate}}</span>
-              </p>
-              <p class="message-article">{{item.content}}</p>
-            </div>
-          </div>
-          <!--分页2-->
-          <el-col :span="24" class="toolbar">
-            <el-pagination
-              @size-change="handleSizeChange1"
-              @current-change="handleCurrentChange1"
-              :page-sizes="[20 , 50 , 80 , 100 , 200]"
-              :page-size="20"
-              layout="total, sizes, prev, pager, next"
-              :total="total[1]"
-              style="float:right;"
-            ></el-pagination>
-          </el-col>
-        </el-tab-pane>
-        <el-tab-pane name="2" label="保养">
-          <div :style="heightString">
-            <span v-if="messages[2].length == 0">目前暂无消息</span>
-            <div
-              class="message-div"
-              v-for="item in messages[2]"
-              @click="locationHerf(item.id, item.refId, item.noticeType, null)"
-            >
-              <p>
-                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
-                <span class="message-title" v-else>{{item.projectName}}</span>
-                <span class="message-time">{{item.indate}}</span>
-              </p>
-              <p class="message-article">{{item.content}}</p>
-            </div>
-          </div>
-          <!--分页3-->
-          <el-col :span="24" class="toolbar">
-            <el-pagination
-              @size-change="handleSizeChange2"
-              @current-change="handleCurrentChange2"
-              :page-sizes="[20 , 50 , 80 , 100 , 200]"
-              :page-size="20"
-              layout="total, sizes, prev, pager, next"
-              :total="total[2]"
-              style="float:right;"
-            ></el-pagination>
-          </el-col>
-        </el-tab-pane>
-      </el-tabs>
-    </el-col>
-  </section>
-</template>
-
-<script>
-import util from "../common/js/util";
-export default {
-  data() {
-    return {
-      messages: [[], [], []],
-      page0: 1,
-      page1: 1,
-      page2: 1,
-      size: 20,
-      total: [0, 0, 0],
-      tableHeight: 0,
-      activePage: 0,
-      heightString: ""
-    };
-  },
-  methods: {
-    //分页1
-    handleCurrentChange0(val) {
-      this.page0 = val;
-      this.loadNotice();
-    },
-    handleSizeChange0(val) {
-      this.size1 = val;
-      this.loadNotice();
-    },
-    //分页2
-    handleCurrentChange1(val) {
-      this.page2 = val;
-      this.loadNotice();
-    },
-    handleSizeChange1(val) {
-      this.size = val;
-      this.loadNotice();
-    },
-    //分页3
-    handleCurrentChange2(val) {
-      this.page = val;
-      this.loadNotice();
-    },
-    handleSizeChange2(val) {
-      this.size = val;
-      this.loadNotice();
-    },
-    //标签页面切换时
-    handleClick(tab, event) {
-      this.activeTab = tab.name;
-    },
-    //读取消息提示
-    loadNotice() {
-      this.http.post(
-        this.port.notice.list,
-        {
-          pageNum: this.page,
-          pageSize: this.size
-        },
-        res => {
-          if (res.code == "ok") {
-            this.messages = [];
-            this.messages.push(res.data[0].approvelList.list);
-            this.messages.push(res.data[1].matainList.list);
-            this.messages.push(res.data[2].emergencyList.list);
-            this.total[0] = res.data[0].approvelList.total;
-            this.total[1] = res.data[1].matainList.total;
-            this.total[2] = res.data[2].emergencyList.total;
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
-        },
-        error => {
-          this.$message({
-            message: error,
-            type: "error"
-          });
-        }
-      );
-    },
-    //点击消息的跳转
-    locationHerf(id, refid, type, approval) {
-      this.http.post(
-        this.port.notice.read,
-        {
-          id: id
-        },
-        res => {
-          if (res.code == "ok") {
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
-        },
-        error => {
-          this.$message({
-            message: error,
-            type: "error"
-          });
-        }
-      );
-      if (type == 0) {
-        //审批 跳转到模具详情
-        this.$router.push("/moldList/" + refid + "/" + approval);
-      } else if (type == 1) {
-        //警告 跳转到运行监测
-        this.$router.push("/detection");
-      } else if (type == 2) {
-        //保养 跳转到运行监测详情
-        this.$router.push("/detection/" + refid);
-      }
-    }
-  },
-  created() {
-    let height = window.innerHeight;
-    this.tableHeight = height - 260;
-    this.heightString = "height: " + this.tableHeight + "px";
-  },
-  mounted() {
-    this.loadNotice();
-  }
-};
-</script>
-
-<style scoped>
-.message-div {
-  cursor: pointer;
-  padding: 5px 0;
-}
-
-.message-div > p {
-  line-height: 25px;
-  margin: 0;
-}
-
-.message-type {
-  font-weight: 700;
-}
-
-.message-time {
-  padding-left: 30px;
-  color: #777;
-}
-
-.message-title {
-  color: #409eff;
-}
-
-.message-article {
-  color: #555;
-}
-
-.isRead {
-  color: #999 !important;
-}
-</style>

文件差异内容过多而无法显示
+ 0 - 1776
lss_vue/src/views/mold/moldDetail.vue


+ 0 - 250
lss_vue/src/views/mold/moldDownload.vue

@@ -1,250 +0,0 @@
-<template slot-scope="scope">
-  <section>
-    <!--工具条-->
-    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-      <el-form :inline="true" :model="filters">
-        <el-form-item>
-          <el-input v-model="filters.name" placeholder="请输入模具名称进行搜索"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="getFileList(filters.name)">查询</el-button>
-        </el-form-item>
-        <el-form-item style="float: right;">
-          <el-dropdown>
-            <el-button type="primary">
-              下载
-              <i class="el-icon-arrow-down el-icon--right"></i>
-            </el-button>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item @click.native="download(0)">全部下载</el-dropdown-item>
-              <el-dropdown-item @click.native="download(1)" divided>模具3D图档</el-dropdown-item>
-              <el-dropdown-item @click.native="download(2)">模具2D图档</el-dropdown-item>
-              <el-dropdown-item @click.native="download(3)">零件3D图档</el-dropdown-item>
-              <el-dropdown-item @click.native="download(4)">零件2D图档</el-dropdown-item>
-              <el-dropdown-item @click.native="download(5)">保养方案</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </el-form-item>
-      </el-form>
-    </el-col>
-
-    <!--列表-->
-    <el-table :data="documents" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;" @selection-change="selectionChanged">
-        <el-table-column type="selection" width="50"></el-table-column>
-        <el-table-column type="index" width="60"></el-table-column>
-        <el-table-column label="模具名称">
-            <template slot-scope="scope">
-                <router-link :to="'/moldList/' + scope.row.id + '/0'" tag="span" style="color: #409eff;cursor: pointer;">{{scope.row.modelName}}</router-link>
-            </template>
-        </el-table-column>
-        <el-table-column width="250" label="模具3D图档">
-            <template slot-scope="scope">
-            <span v-if="scope.row.mould3DFiles.length == 0">未上传</span>
-            <span v-else-if="scope.row.mould3DFilesState">已通过</span>
-            <span v-else>未通过</span>
-            </template>
-        </el-table-column>
-        <el-table-column width="250" label="模具2D图档">
-            <template slot-scope="scope">
-            <span v-if="scope.row.mould2DFiles.length == 0">未上传</span>
-            <span v-else-if="scope.row.mould2DFilesState">已通过</span>
-            <span v-else>未通过</span>
-            </template>
-        </el-table-column>
-        <el-table-column width="250" label="零件3D图档">
-            <template slot-scope="scope">
-            <span v-if="scope.row.sparepart3DFiles.length == 0">未上传</span>
-            <span v-else-if="scope.row.sparepart3DFilesState">已通过</span>
-            <span v-else>未通过</span>
-            </template>
-        </el-table-column>
-        <el-table-column width="250" label="零件2D图档">
-            <template slot-scope="scope">
-            <span v-if="scope.row.sparepart2DFiles.length == 0">未上传</span>
-            <span v-else-if="scope.row.sparepart2DFilesState">已通过</span>
-            <span v-else>未通过</span>
-            </template>
-        </el-table-column>
-        <el-table-column width="250" label="保养方案">
-            <template slot-scope="scope">
-            <span v-if="scope.row.maintainFiles.length == 0">未上传</span>
-            <span v-else-if="scope.row.maintainFilesState">已通过</span>
-            <span v-else>未通过</span>
-            </template>
-        </el-table-column>
-    </el-table>
-
-    <!--工具条-->
-    <el-col :span="24" class="toolbar">
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :page-sizes="[20 , 50 , 80 , 100 , 200]"
-        :page-size="20"
-        layout="total, sizes, prev, pager, next"
-        :total="total"
-        style="float:right;"
-      ></el-pagination>
-    </el-col>
-  </section>
-</template>
-
-<script>
-import util from "../../common/js/util";
-export default {
-  data() {
-    return {
-      documents: [],
-      filters: {
-        name: "",
-        value: ""
-      },
-      listLoading: false,
-      page: 1,
-      size: 20,
-      total: 0,
-      tableHeight: 0,
-      selectedArray: []
-    };
-  },
-  methods: {
-    //分页
-    handleCurrentChange(val) {
-      this.page = val;
-      this.getFileList();
-    },
-    handleSizeChange(val) {
-      this.size = val;
-      this.getFileList();
-    },
-    //获取列表
-    getFileList(keyword) {
-      this.http.post(
-        this.port.mold.moldFileDowloadList,
-        {
-          keyName: keyword,
-          pageSize: this.size,
-          pageNum: this.page
-        },
-        res => {
-          if (res.code == "ok") {
-            this.documents = res.data.list;
-            this.total = res.data.total;
-            //对于拿到的所有数据
-            this.documents.forEach(file => {
-              var mould2DFilesState = true;
-              var mould3DFilesState = true;
-              var sparepart2DFilesState = true;
-              var sparepart3DFilesState = true;
-              var maintainFilesState = true;
-              //看看每种文档中的所有文件
-              file.mould2DFiles.forEach(item => {
-                if (item.state != 3) {
-                  mould2DFilesState = false;
-                }
-              });
-              file.mould3DFiles.forEach(item => {
-                if (item.state != 3) {
-                  mould3DFilesState = false;
-                }
-              });
-              file.sparepart2DFiles.forEach(item => {
-                if (item.state != 3) {
-                  sparepart2DFilesState = false;
-                }
-              });
-              file.sparepart3DFiles.forEach(item => {
-                if (item.state != 3) {
-                  sparepart3DFilesState = false;
-                }
-              });
-              file.maintainFiles.forEach(item => {
-                if (item.state != 3) {
-                  maintainFilesState = false;
-                }
-              });
-              //把计算好的状态装进这个模具对象中
-              file.mould2DFilesState = mould2DFilesState;
-              file.mould3DFilesState = mould3DFilesState;
-              file.sparepart2DFilesState = sparepart2DFilesState;
-              file.sparepart3DFilesState = sparepart3DFilesState;
-              file.maintainFilesState = maintainFilesState;
-            });
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
-        },
-        error => {
-          this.$message({
-            message: error,
-            type: "error"
-          });
-        }
-      );
-    },
-    //点击复选时
-    selectionChanged(row) {
-      this.selectedArray = [];
-      row.forEach(item => {
-        this.selectedArray.push(item.id);
-      });
-    },
-    //下载
-    download(type) {
-      if (this.selectedArray.length == 0) {
-        this.$message("请选择要下载的文档");
-      } else {
-        this.downloadPost(type);
-      }
-    },
-    //具体的下载
-    downloadPost(type) {
-        var user = sessionStorage.getItem('user') , token = "";
-        if(user != null){
-            token = JSON.parse(user).headImgurl
-        }
-        this.http.get(
-            this.port.mold.moldFileDowloadFile + 
-                "?ids="+ this.selectedArray.join(",") + 
-                "&dwgType=" + type +
-                "&token=" + token
-            ,
-            res => {
-                this.listLoading = false;
-                if (res.code == "ok") {
-                    let a = document.createElement('a')
-                    a.setAttribute('download', res.data.split("/")[2]);
-                    a.setAttribute("href", res.data);
-                    a.click();
-                } else {
-                    this.$message({
-                        message: res.msg,
-                        type: "error"
-                    });
-                }
-            },
-            error => {
-            this.listLoading = false;
-            this.$message({
-                message: error,
-                type: "error"
-            });
-            }
-        );
-    }
-  },
-  created() {
-    let height = window.innerHeight;
-    this.tableHeight = height - 210;
-  },
-  mounted() {
-    this.getFileList();
-  }
-};
-</script>
-
-<style scoped>
-</style>

+ 0 - 459
lss_vue/src/views/mold/moldList.vue

@@ -1,459 +0,0 @@
-<template>
-    <section>
-        <!--工具条-->
-        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-            <el-form :inline="true" :model="filters">
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.projectId" clearable placeholder="请选择项目">
-                        <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="2">
-                    <el-form-item>
-                        <el-select v-model="filters.searchType" placeholder="请选择查询条件">
-                        <el-option label="编号" value="0"></el-option>
-                        <el-option label="名称" value="1"></el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入编号或名称进行搜索"></el-input>
-                </el-form-item>
-                <el-form-item>
-                    <el-button type="primary" @click="getMoldList">查询</el-button>
-                </el-form-item>
-                <el-form-item style="float: right" v-if="user.parentId == 1 && user.subordinateType == 0">
-                    <el-button type="primary" @click="showAdd">新建</el-button>
-                </el-form-item>
-            </el-form>
-        </el-col>
-
-        <!--列表-->
-        <el-table :data="molds" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
-            <el-table-column type="index" width="40"></el-table-column>
-            <el-table-column prop="modelName" label="模具名称" width="140" sortable>
-                <template slot-scope="scope">
-                    <el-link :underline="false" type="primary" @click="toDetail(scope.row)">{{scope.row.modelName}}</el-link>
-                </template>
-            </el-table-column>
-            <el-table-column prop="modelNo" label="模具编号" width="120" sortable></el-table-column>
-            <el-table-column prop="equipmentNo" label="云模盒编号" width="120" sortable></el-table-column>
-            <el-table-column prop="hillNumber" label="电量" align="center" width="100" sortable></el-table-column>
-            <el-table-column prop="diffTime" label="倒计时" align="center" width="100" sortable></el-table-column>
-            <el-table-column prop="projectName" label="所属项目" width="140" sortable></el-table-column>
-            <el-table-column prop="companyName" label="所属资产方" width="300" sortable></el-table-column>
-            <el-table-column prop="produceCompany" label="所属生产方" width="200" sortable></el-table-column>
-            <el-table-column prop="initialModulus" label="初始模次" width="100" align="center" sortable></el-table-column>
-            <el-table-column prop="settingLife" label="模次寿命" width="100" align="center" sortable></el-table-column>
-            <el-table-column prop="holes" label="穴数" width="100" align="center" sortable></el-table-column>
-            <el-table-column prop="rfid" label="对应RFID码" width="120" align="center" sortable></el-table-column>
-            <el-table-column label="状态" width="100" align="center" sortable>
-                <template slot-scope="scope">
-                    <span v-if="scope.row.state == 1" style="color:#00CD66;">运行</span>
-                    <span v-else style="color:#999999;">静止</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="操作" width="150" align="center" sortable v-if="user.parentId == 1 && user.subordinateType == 0">
-                <template slot-scope="scope">
-                    <el-button size="small" type="danger" @click="handleDel(scope.row)">删除</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
-
-        <!--工具条-->
-        <el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;"
-            ></el-pagination>
-        </el-col>
-
-        <!--新增界面-->
-        <el-dialog title="新建模具" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth">
-            <el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
-                <el-form-item label="模具名称" prop="modelName">
-                    <el-input v-model="addForm.modelName" autocomplete="off" placeholder="请输入模具名称" style="width:202px"></el-input>
-                </el-form-item>
-                <el-form-item label="模具编号" prop="modelNo">
-                    <el-input v-model="addForm.modelNo" autocomplete="off" placeholder="请输入模具编号" style="width:202px"></el-input>
-                </el-form-item>
-                <el-form-item label="云模盒编号" prop="equipmentId">
-                    <el-select v-model="addForm.equipmentId" clearable filterable placeholder="请选择云模盒编号" style="width:202px">
-                        <el-option v-for="item in boxes" :key="item.id" :label="item.equipmentNo" :value="item.id"></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="初始模次" prop="initialModulus">
-                    <el-input v-model="addForm.initialModulus" autocomplete="off" placeholder="请输入初始模次" style="width:202px"></el-input>
-                </el-form-item>
-                <el-form-item label="模次寿命" prop="settingLife">
-                    <el-input v-model="addForm.settingLife" autocomplete="off" placeholder="请输入模次寿命" style="width:202px"></el-input>
-                </el-form-item>
-                <el-form-item label="RIFD码" prop="rfid">
-                    <el-input v-model="addForm.rfid" autocomplete="off" placeholder="请输入RIFD码" style="width:202px"></el-input>
-                </el-form-item>
-                <el-form-item label="穴数" prop="holes">
-                    <el-input v-model="addForm.holes" autocomplete="off" placeholder="请输入穴数" style="width:202px"></el-input>
-                </el-form-item>
-                <el-form-item label="所属生产方" prop="produceCompanyId">
-                    <el-select v-model="addForm.produceCompanyId" clearable filterable placeholder="请选择所属生产方" style="width:202px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="保养次数" prop="maintainCount">
-                    <el-select v-model="addForm.maintainCount" clearable multiple allow-create filterable default-first-option placeholder="请选择保养次数" style="width:515px">
-                        <el-option v-for="item in maintainCount" :key="item" :label="item" :value="item"></el-option>
-                    </el-select>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click.native="addFormVisible = false">取消</el-button>
-                <el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-            </div>
-        </el-dialog>
-    </section>
-</template>
-
-<script>
-    import util from "../../common/js/util";
-    export default {
-        data() {
-            const checkInitialModulus = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入初始模次'));
-                } else {
-                    if((/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/).test(value) == false){
-                        callback(new Error("请填写大于0的数字"));
-                    }else{
-                        if (value > 100000000) {
-                            callback(new Error("请填写小于等于1亿的数字"));
-                        }else{
-                            callback();
-                        }
-                    }
-                }
-            };
-            const checkSettingLife = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入模次寿命'));
-                } else {
-                    if((/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/).test(value) == false){
-                        callback(new Error("请填写大于0的数字"));
-                    }else{
-                        if (value > 100000000) {
-                            callback(new Error("请填写小于等于1亿的数字"));
-                        }else{
-                            callback();
-                        }
-                    }
-                }
-            };
-            return {
-                user: JSON.parse(sessionStorage.getItem("user")),
-                molds: [],
-                filters: {
-                    keyName: "",
-                    searchType: "编号",
-                    projectId: ""
-                },
-                team: [{label:'资产方',value:0},{label:'生产方',value:1}],
-
-                formRules: {
-                    modelNo: [
-                        { required: true, message: "请输入模具编号", trigger: "blur" }
-                    ],
-                    modelName: [
-                        { required: true, message: "请输入模具名称", trigger: "blur" }
-                    ],
-                    equipmentId: [
-                        { required: true, message: "请选择云模盒编号", trigger: ["blur", "change"] }
-                    ],
-                    initialModulus: [
-                        // { required: true, message: "请输入初始模次", trigger: "blur" }
-                        { required: true, validator: checkInitialModulus, trigger: 'blur'}
-                    ],
-                    settingLife: [
-                        // { required: true, message: "请输入模次寿命", trigger: "blur" }
-                        { required: true, validator: checkSettingLife, trigger: 'blur'}
-                    ],
-                    rfid: [
-                        { required: true, message: "请输入RIFD码", trigger: "blur" }
-                    ],
-                    holes: [
-                        { required: true, message: "请输入穴数", trigger: "blur" }
-                    ],
-                    produceCompanyId: [
-                        { required: true, message: "请选择所属生产方", trigger: ["blur", "change"] }
-                    ],
-                    maintainCount: [
-                        { required: true, message: "请输入保养次数", trigger: ["blur", "change"] }
-                    ]
-                },
-                listLoading: false,
-                total: 0,
-                size: 20,
-                tableHeight: 0,
-
-                boxes: [],
-                companys: [],
-                projects: [],
-
-                maintainCount: [5000,10000,15000,20000,25000],
-
-                addLoading: false,
-                addFormVisible: false,
-                addForm: {
-                    modelNo: "",
-                    modelName: "",
-                    equipmentId: "",
-                    initialModulus: "",
-                    settingLife: "",
-                    maintainCount: [],
-                    rfid: "",
-                    holes: "",
-                    produceCompanyId: ""
-                }
-            };
-        },
-        methods: {
-            //获取模具
-            getMoulds(){
-                this.http.post( this.port.base.moulds, {
-                    belongCompanyId: this.user.companyId
-                },
-                res => {
-                    if (res.code == "ok") {
-                        this.boxes = res.data;
-                    } else {
-                        this.$message({
-                        message: res.msg,
-                        type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-            getMsg() {
-                //获取模具
-                this.getMoulds();
-                //新版获取公司
-                this.http.post(this.port.base.relationList, {
-                    companyType: 1
-                }, res => {
-                    if (res.code == "ok") {
-                        this.companys = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                });
-                
-            },
-            getPro() {
-                //获取项目
-                this.http.post( this.port.project.projects, {},
-                res => {
-                    if (res.code == "ok") {
-                        this.projects = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-            //分页
-            handleCurrentChange(val) {
-                this.page = val;
-                this.getMoldList();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-                this.getMoldList();
-            },
-
-            //获取模具列表
-            getMoldList() {
-                this.listLoading = true;
-                this.http.post( this.port.mold.molds, {
-                    keyName: this.filters.keyName,
-                    pageNum: this.page,
-                    pageSize: this.size,
-                    projectId: this.filters.projectId == "" ? -1 : this.filters.projectId,
-                    searchType: this.filters.searchType == "编号"? 0:1
-                },
-                res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        var list = res.data.list
-                        for(var i in list){
-                            if(list[i].endTime == null){
-                                list[i].diffTime = "";
-                            } else {
-                                list[i].diffTime = util.formatDate.dateDiff(
-                                    // util.formatDate.format(new Date(list[i].endTime), 'yyyy-MM-dd'), 
-                                    list[i].endTime,
-                                    util.formatDate.format(new Date(new Date()), 'yyyy-MM-dd')
-                                );
-                            }
-                        }
-                        this.molds = list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //详情
-            toDetail(row) {
-                this.$router.push("/moldList/" + row.id + "/0");
-            },
-
-            //删除
-			handleDel: function (row) {
-                this.$confirm('确认删除该模具吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.mold.delMold, {
-                        id: row.id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getMoldList();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-
-            //添加界面
-            showAdd() {
-                this.getMoulds();
-                this.addFormVisible = true;
-                this.addForm = {
-                    modelNo: "",
-                    modelName: "",
-                    equipmentId: "",
-                    initialModulus: "",
-                    settingLife: "",
-                    maintainCount: [],
-                    rfid: "",
-                    holes: "",
-                    produceCompanyId: ""
-                };
-            },
-
-            addSubmit() {
-                this.$refs.addForm.validate(valid => {
-                    if (valid) {
-                        this.addLoading = true;
-                        var maintainCount = this.addForm.maintainCount , str = "";
-                        for(var i in maintainCount) {
-                            if(i == maintainCount.length-1){
-                                str += maintainCount[i]
-                            } else {
-                                str += maintainCount[i] + ","
-                            }
-                        }
-                        this.addForm.maintainCount = str;
-                        this.http.post( this.port.mold.addMold, this.addForm,
-                        res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: "创建成功",
-                                    type: "success"
-                                });
-                                this.getMoldList();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: "error"
-                                });
-                            }
-                        },
-                        error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: "error"
-                            });
-                        });
-                    }
-                });
-            },
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;
-            };
-        },
-        mounted() {
-            var user = JSON.parse(sessionStorage.getItem("user"));
-            if(user.parentId == 1 && user.subordinateType == 0){
-                this.getMsg();
-            }
-            this.getPro()
-            this.getMoldList();
-        }
-    };
-</script>
-
-<style scoped>
-</style>

+ 138 - 0
lss_vue/src/views/my/my.vue

@@ -0,0 +1,138 @@
+<template>
+	<div class="my">
+        <div class="mybox userInfo" v-on:click="jumpTo(0)">
+            <div class="left">
+                <img src="../../assets/image/userHead.jpg">
+            </div>
+            <div class="right">
+                <div>
+                    <span class="name">张学</span>
+                    <span class="phone">18255585207</span>
+                </div>
+                <div class="department">
+                    ****公司****部门****组
+                    <span class="arrow"><img src="../../assets/image/on_1.png"></span>
+                </div>
+            </div>
+        </div>
+        <div class="mybox">
+            <mt-cell title="我的消息" is-link v-on:click.native="jumpTo(1)"><img slot="icon" src="../../assets/image/my_message.png" width="24" height="24"></mt-cell>
+            <mt-cell title="我的资产" is-link v-on:click.native="jumpTo(2)"><img slot="icon" src="../../assets/image/my_assets.png" width="24" height="24"></mt-cell>
+            <mt-cell title="我的评分" is-link v-on:click.native="jumpTo(3)"><img slot="icon" src="../../assets/image/my_score.png" width="24" height="24"></mt-cell>
+            <mt-cell title="我的建议" is-link v-on:click.native="jumpTo(4)"><img slot="icon" src="../../assets/image/my_sug.png" width="24" height="24"></mt-cell>
+        </div>
+        <div class="mybox">
+            <mt-cell title="通讯录" is-link v-on:click.native="jumpTo(5)"><img slot="icon" src="../../assets/image/my_com.png" width="24" height="24"></mt-cell>
+            <mt-cell title="管理制度" is-link v-on:click.native="jumpTo(6)"><img slot="icon" src="../../assets/image/my_sys.png" width="24" height="24"></mt-cell>
+        </div>
+    </div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+                keyWord: "",
+                list: [],
+                labels: [],
+                pageNum: 1,
+                tagId: 0,
+                popupVisible: false,
+			}
+		},
+		methods: {
+            jumpTo(type) {
+                switch(type){
+                    case 0:
+                        console.log(1111)
+                        break;
+                    case 1:
+                        console.log(1111)
+                        break;
+                    case 2:
+                        console.log(1111)
+                        break;
+                    case 3:
+                        console.log(1111)
+                        break;
+                    case 4:
+                        console.log(1111)
+                        break;
+                    case 5:
+                        console.log(1111)
+                        break;
+                    case 6:
+                        console.log(1111)
+                        break;
+                    default:
+                        return false
+                        break;
+                }
+            }
+        },
+        created() {
+        },
+		mounted() {
+            
+		}
+	}
+
+</script>
+
+<style scoped>
+    .my {
+        background: #EFEFEF;
+    }
+
+    .mybox {
+        background: #fff;
+        margin-bottom: 0.15rem;
+    }
+
+    .userInfo {
+        padding: 0.22rem 0.2rem;
+    }
+
+    .left{
+        float:left;
+        margin-right: 0.15rem;
+    }
+
+    .left img {
+        width: 0.6rem;
+        height: 0.6rem;
+        border-radius: 50%;
+    }
+
+    .right div{
+        line-height: 0.3rem;
+    }
+
+    span.name {
+        font-size: 0.16rem;
+        font-weight: 600;
+        margin: 0 0.15rem 0 0;
+    }
+    
+    span.phone {
+        font-size: 0.13rem;
+        color: #9E9E9E;
+    }
+
+    div.department {
+        font-size: 0.13rem;
+        color: #9E9E9E;
+    }
+
+    span.arrow {
+        float: right;
+    }
+
+    span.arrow img {
+        transform: rotate(-90deg);
+        -ms-transform: rotate(-90deg); /* IE 9 */
+        -moz-transform: rotate(-90deg); /* Firefox */
+        -webkit-transform: rotate(-90deg); /* Safari and Chrome */
+        -o-transform: rotate(-90deg); /* Opera */
+    }
+</style>

+ 0 - 296
lss_vue/src/views/project/competence.vue

@@ -1,296 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.projectId" clearable filterable placeholder="请选择项目">
-                            <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-				<el-form-item>
-					<el-input v-model="filters.keyName" placeholder="请输入姓名进行搜索"></el-input>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="getPowerList">查询</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
-			<el-table-column type="index" width="60">
-			</el-table-column>
-			<el-table-column prop="username" label="姓名" width="150" sortable>
-			</el-table-column>
-			<el-table-column prop="companyName" label="所属公司" sortable>
-			</el-table-column>
-			<el-table-column prop="projectName" label="项目名称" width="220" sortable>
-			</el-table-column>
-			<el-table-column prop="addr" label="上传" align="center" width="150">
-                <template slot-scope="scope">
-                    <el-checkbox :value="scope.row.update==1?true:false"></el-checkbox>
-                </template>
-			</el-table-column>
-            <el-table-column prop="addr" label="下载" align="center" width="150">
-                <template slot-scope="scope">
-                    <el-checkbox :value="scope.row.download==1?true:false"></el-checkbox>
-                </template>
-			</el-table-column>
-            <el-table-column prop="addr" label="浏览" align="center" width="150">
-                <template slot-scope="scope">
-                    <el-checkbox :value="scope.row.view==1?true:false"></el-checkbox>
-                </template>
-			</el-table-column>
-            <el-table-column prop="addr" label="审批" align="center" width="150">
-                <template slot-scope="scope">
-                    <el-checkbox :value="scope.row.approve==1?true:false"></el-checkbox>
-                </template>
-			</el-table-column>
-			<el-table-column label="操作" width="150" align="center">
-				<template slot-scope="scope">
-					<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-		<!--编辑界面-->
-		<el-dialog title="编辑权限" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="80px" ref="editForm">
-				<el-col :span="24">
-                    <el-form-item label="权限配置">
-                        <el-row>
-                            <el-col :span="6" v-for="(item,index) in roleList" :key="item.val" style="text-align:center;">
-                                <el-checkbox v-model="editForm[item.label]" :disabled="index==3?true:false" :checked="editForm[item.label]">{{item.name}}</el-checkbox>
-                            </el-col>
-                        </el-row>
-                    </el-form-item>
-                </el-col>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-	import util from '../../common/js/util'
-	export default {
-		data() {
-			return {
-				filters: {
-                    keyName: '',
-                    projectId: '',
-                },
-                user: JSON.parse(sessionStorage.getItem('user')),
-
-                projects: [],
-
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-
-				editFormVisible: false,//编辑界面是否显示
-                editLoading: false,
-                roleList: [
-                    {name:'上传',val:0,label:'uploadPower',uploadPower:false},
-                    {name:'下载',val:1,label:'dowloadPower',dowloadPower:false},
-                    {name:'浏览',val:2,label:'viewPower',viewPower:false},
-                    {name:'审批',val:3,label:'approvalPower',approvalPower:false}
-                ],
-				//编辑界面数据
-				editForm: {
-                    id: 0,
-                    projectId: 0,
-                    uploadPower: false,
-                    dowloadPower:false,
-                    viewPower:false,
-                    approvalPower:false,
-				}
-			}
-		},
-		methods: {
-            getMsg() {
-                this.http.post(this.port.project.projects, {}, res => {
-                    if (res.code == "ok") {
-                        this.projects = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getPowerList();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getPowerList();
-            },
-
-			//获取权限列表
-			getPowerList() {
-				this.listLoading = true;
-                this.http.post(this.port.project.powerList, {
-                    projectId: this.filters.projectId,
-                    keyName: this.filters.keyName,
-                    pageNum: this.page,
-                    pageSize: this.size
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        var list = res.data.list;
-                        for(var i in list){
-                            list[i].update = 0;
-                            list[i].download = 0;
-                            list[i].view = 0;
-                            list[i].approve = 0;
-
-                            var powers = list[i].powers;
-                            for(var j in powers){
-                                if(powers[j].powerType == 0){
-                                    list[i].update = 1;
-                                } else if(powers[j].powerType == 1){
-                                    list[i].download = 1;
-                                } else if(powers[j].powerType == 2){
-                                    list[i].view = 1;
-                                } else if(powers[j].powerType == 3){
-                                    list[i].approve = 1;
-                                }
-                            }
-                        }
-                        this.list = list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-            
-			//显示编辑界面
-			handleEdit: function (index, row) {
-				this.editFormVisible = true;
-				this.editForm = {
-                    id: row.userId,
-                    projectId: row.projectId,
-                    uploadPower: row.update==1?true:false,
-                    dowloadPower: row.download==1?true:false,
-                    viewPower: row.view==1?true:false,
-                    approvalPower: row.approve==1?true:false
-                };
-			},
-			//编辑
-			editSubmit: function () {
-                var str = "";
-
-                if(this.editForm.uploadPower) {
-                    str += "0,"
-                }
-                if(this.editForm.dowloadPower) {
-                    str += "1,"
-                }
-                if(this.editForm.viewPower) {
-                    str += "2,"
-                }
-                if(this.editForm.approvalPower) {
-                    str += "3,"
-                }
-
-                str = str.substring(0,str.length-1)
-
-				this.editLoading = true;
-                this.http.post(this.port.project.powerUpdate, {
-                    id: this.editForm.id,
-                    projectId: this.editForm.projectId,
-                    powers: str
-                }, res => {
-                    this.editLoading = false;
-                    this.editFormVisible = false;
-                    if (res.code == "ok") {
-                        this.$message({
-                            message: '修改成功',
-                            type: 'success'
-                        });
-                        this.getPowerList();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.editLoading = false;
-                    this.editFormVisible = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-			}
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-		mounted() {
-            this.getMsg();
-			this.getPowerList();
-		}
-	}
-
-</script>
-
-<style>
-    .el-table__row .el-checkbox__inner:hover {
-        border-color: #DCDFE6;
-    }
-
-    .el-table__row .el-checkbox , .el-table__row .el-checkbox__input {
-        cursor: inherit;
-    }
-</style>

+ 0 - 354
lss_vue/src/views/project/project.vue

@@ -1,354 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-				<el-form-item>
-					<el-input v-model="filters.keyName" placeholder="请输入项目名称"></el-input>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" v-on:click="getProject">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;" v-if="user.parentId == 1 && user.subordinateType == 0">
-					<el-button type="primary" @click="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
-			<el-table-column type="index" width="60">
-			</el-table-column>
-			<el-table-column prop="projectName" label="项目名称" width="250" sortable>
-                <template slot-scope="scope">
-                    <el-link :underline="false" type="primary" @click="toDetail(scope.row)">{{scope.row.projectName}}</el-link>
-				</template>
-			</el-table-column>
-            <el-table-column prop="ownerCompanyName" label="资产方公司" sortable>
-			</el-table-column>
-            <el-table-column prop="customCompaniesStr" label="生产方公司" width="450">
-			</el-table-column>
-            <el-table-column prop="manager" label="项目经理" width="100" align="center" sortable>
-			</el-table-column>
-			<el-table-column prop="indate" label="创建时间" width="250" align="center" sortable>
-			</el-table-column>
-			<!-- <el-table-column label="操作" width="250" align="center">
-				<template slot-scope="scope">
-                    <el-button size="small" type="primary" @click="toDetail(scope.row.id)">详情</el-button>
-					<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
-					<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
-				</template>
-			</el-table-column> -->
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-			<el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog title="新增项目" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="120px" :rules="formRules" ref="addForm">
-                <el-col :span="24">
-                    <el-form-item label="项目名称" prop="projectName">
-                        <el-input v-model="addForm.projectName" autocomplete="off" placeholder="请输入项目名称" style="width:510px"></el-input>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="24">
-                    <el-form-item label="项目模具" prop="mold">
-                        <el-select v-model="addForm.mold" @change="companyChange" clearable filterable multiple placeholder="请选择项目模具" value-key='id' style="width:510px">
-                            <el-option v-for="item in molds" :key="item.id" :label="item.modelName" :value="item">
-                                <span style="float: left">{{ item.modelName }}</span>
-                                <span style="float: right; color: #8492a6; font-size: 6px;margin-right:17px;">{{ item.produceCompany }}</span>
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="24">
-                    <el-form-item label="项目经理" prop="managerId">
-                        <el-select v-model="addForm.managerId" clearable filterable placeholder="请选择项目经理" value-key='id' style="width:510px">
-                            <!-- <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
-                            </el-option> -->
-                            <el-option v-for="item in charger" :key="item.id" :label="item.username" :value="item">
-                                <span style="float: left">{{ item.username }}</span>
-                                <span style="float: right; color: #8492a6; font-size: 13px;">{{ item.companyName }}</span>
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-	import util from '../../common/js/util'
-
-	export default {
-		data() {
-			return {
-				filters: {
-					keyName: ''
-                },
-                user: JSON.parse(sessionStorage.getItem('user')),
-                charger: [],
-                molds: [],
-
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-
-                formRules: {
-					projectName: [
-						{ required: true, message: '请输入项目名称', trigger: 'blur' }
-                    ],
-                    mold: [
-                        { required: true, message: '请选择项目模具', trigger: ['blur','change'] }
-                    ],
-                    managerId: [
-                        { required: true, message: '请选择项目经理', trigger: ['blur','change'] }
-                    ]
-                },
-                
-                addFormVisible: false, //新增界面是否显示
-				addLoading: false,
-				//新增界面数据
-				addForm: {
-					projectName: '',
-                    mold: [],
-                    managerId: ''
-				}
-
-			}
-		},
-		methods: {
-            //获取基础数据
-            getMsg(){
-                this.http.post(this.port.project.getUserById, {
-                    companyIds: this.user.companyId,
-                    id: this.user.id
-                } , res => {
-                    if (res.code == "ok") {
-                        this.charger = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-
-                //获取模具
-                this.getMoulds();
-            },
-
-            //获取模具
-            getMoulds(){
-                this.http.post(this.port.mold.modelList, {
-                    parentId: this.user.parentId,
-                    id: this.user.id
-                }, res => {
-                    if (res.code == "ok") {
-                        this.molds = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-			//分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getProject();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getProject();
-            },
-            
-			//获取项目列表
-			getProject() {
-				this.listLoading = true;
-				this.http.post(this.port.project.projectList, {
-                    keyName: this.filters.keyName,
-                    pageNum: this.page,
-                    pageSize: this.size,
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        var list = res.data.list;
-                        for(var i in list){
-                            var customCompaniesStr = "";
-                            for(var j in list[i].customCompanies){
-                                if(j == list[i].customCompanies.length -1){
-                                    customCompaniesStr += list[i].customCompanies[j].companyName;
-                                } else {
-                                    customCompaniesStr += list[i].customCompanies[j].companyName + "、";
-                                }
-                            }
-                            list[i].customCompaniesStr = customCompaniesStr;
-                        }
-                        this.list = list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //详情
-            toDetail(row) {
-                this.$router.push('/project/' + row.id);
-            },
-
-            //选择公司切换人员
-            companyChange() {
-                var param = {} ,
-                    str = this.user.companyId;
-                for(var i in this.addForm.mold){
-                    str += "," + this.addForm.mold[i].produceCompanyId;
-                }
-                param.companyIds = str;
-                param.id = this.user.id
-                this.http.post(this.port.project.getUserById, param , res => {
-                    if (res.code == "ok") {
-                        this.charger = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //显示新增界面
-			handleAdd() {
-                //重新获取一下模具
-                this.getMoulds();
-				this.addFormVisible = true;
-				this.addForm = {
-					projectName: '',
-                    mold: [],
-                    managerId: ''
-				};
-            },
-
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        var cId = "",
-                            cName = "",
-                            mId = "";
-
-                        for(var i in this.addForm.mold){
-                            if(cId.indexOf(this.addForm.mold[i].produceCompanyId) == -1){
-                                cId += this.addForm.mold[i].produceCompanyId + ",";
-                                cName += this.addForm.mold[i].produceCompanyName + ",";
-                            }
-                            mId += this.addForm.mold[i].id + ","
-                        }
-
-                        cId = cId.substring(0,cId.length-1);
-                        cName = cName.substring(0,cName.length-1);
-                        mId = mId.substring(0,mId.length-1);
-
-                        this.addLoading = true;
-                        this.http.post(this.port.project.addProject, {
-                            projectName: this.addForm.projectName,
-                            customerCompanyIds: cId,
-                            customerCompanyNames: cName,
-                            manager: this.addForm.managerId.username,
-                            managerId: this.addForm.managerId.id,
-                            modelIds: mId,
-                            flag: 0
-                        } , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getProject();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-			},
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-		mounted() {
-            this.getMsg();
-			this.getProject();
-		}
-	}
-
-</script>
-
-<style scoped>
-
-</style>

文件差异内容过多而无法显示
+ 0 - 1139
lss_vue/src/views/project/projectDetail.vue


+ 0 - 547
lss_vue/src/views/project/staff.vue

@@ -1,547 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
-                            <el-option v-for="item in allCompanies" :key="item.id" :label="item.companyName" :value="item.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.flag" placeholder="请选择查询条件">
-                            <el-option label="姓名" value="0"></el-option>
-                            <el-option label="手机号" value="1"></el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-form-item>
-                    <el-input v-model="filters.keyName" clearable placeholder="请输入姓名或手机号进行搜索" style="width:250px;"></el-input>
-                </el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="getUsers">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;" v-if="user.subordinateType == 0 || user.isManager == 1">
-					<el-button type="primary" @click="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
-			<el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="username" label="姓名" width="120" sortable></el-table-column>
-			<el-table-column prop="account" label="手机号" width="180" sortable></el-table-column>
-			<!-- <el-table-column prop="mobile" label="联系方式" width="150" sortable></el-table-column> -->
-            <el-table-column prop="projects" label="参与项目" sortable>
-                <template slot-scope="scope">
-                    <span class="info" v-for="(item, index) in scope.row.projects">
-                        {{item.projectName}}
-                        <span v-if="scope.row.projects != null && index != scope.row.projects.length-1">、</span>
-                    </span>
-                </template>
-			</el-table-column>
-            <el-table-column prop="roleName" label="备注" width="180" sortable></el-table-column>
-            <el-table-column prop="teamName" label="类型" width="120" align="center" sortable></el-table-column>
-			<el-table-column prop="companyName" label="所属公司" sortable></el-table-column>
-			<el-table-column label="操作" align="left" width="230">
-				<template slot-scope="scope" v-if="user.id == scope.row.parentId || user.isManager == 1 || (user.parentId == 1 && user.subordinateType == 0)">
-					<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
-					<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
-                    <el-button type="primary" size="small" @click="invite(scope.$index, scope.row)" v-if="user.id != 1 && scope.row.projects != null && scope.row.projects.length == 1">邀请</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog title="新增人员" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
-				<el-form-item label="姓名" prop="username">
-					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account">
-					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
-				</el-form-item>
-                <el-form-item v-if="!(user.parentId == 1 && user.subordinateType == 0)" label="参与项目" prop="projectIds">
-					<el-select v-model="addForm.projectIds" @change="choseProject" clearable filterable placeholder="请选择参与项目" style="width:202px">
-                        <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="公司" prop="companyId">
-					<el-select v-model="addForm.companyId" clearable filterable placeholder="请选择所属公司" style="width:202px">
-                        <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="备注">
-                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入备注"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                <span style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-		<!--编辑界面-->
-		<el-dialog title="编辑人员" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="80px" :rules="formRules" ref="editForm" :inline="true" class="demo-form-inline">
-				<el-form-item label="姓名" prop="username">
-					<el-input v-model="editForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account">
-					<el-input v-model="editForm.account" disabled autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
-				</el-form-item>
-                <el-form-item label="公司" prop="companyId">
-                    <el-input v-model="editForm.companyId" disabled autocomplete="off" placeholder="请选择所属公司"></el-input>
-				</el-form-item>
-                <el-form-item label="备注">
-                    <el-input v-model="editForm.roleName" autocomplete="off" placeholder="请输入备注"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                 <span style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-        <!--邀请界面-->
-		<el-dialog title="邀请" v-if="inviteVisible" :visible.sync="inviteVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-input placeholder="请复制邀请链接" v-model="inviteLink" class="input-with-select">
-                <el-button slot="append" v-clipboard:copy="inviteLink" v-clipboard:success="copyLink" v-clipboard:error="onError" type="primary" icon="el-icon-share">复制链接</el-button>
-            </el-input>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-	import util from '../../common/js/util'
-
-	export default {
-		data() {
-            var checkPhone = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入联系方式'));
-                } else {
-                    const reg = /^1[0-9]\d{9}$/
-                    if (reg.test(value)) {
-                        callback();
-                    } else {
-                        return callback(new Error('请输入正确的联系方式'));
-                    }
-                }
-            };
-			return {
-				filters: {
-                    keyName: '',
-                    roleName: '',
-                    flag: '姓名',
-                    companyId: ''
-                },
-                
-                user: JSON.parse(sessionStorage.getItem('user')),
-                company: [],
-                projects: [],
-                //搜索用 涉及到的所有公司
-                allCompanies: [],
-
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-
-                formRules: {
-                    username: [
-						{ required: true, message: '请输入姓名', trigger: 'blur' }
-                    ],
-                    account: [
-                        { required: true, validator: checkPhone, trigger: 'blur'}
-                    ],
-                    teamName: [
-						{ required: true, message: '请选择人员类型', trigger: ["blur",'change'] }
-                    ],
-                    projectIds: [
-						{ required: true, message: '请选择参与项目', trigger: ["blur",'change'] }
-					],
-                    companyId: [
-						{ required: true, message: '请选择所属公司', trigger: ["blur",'change'] }
-					]
-                },
-
-                //新增界面是否显示
-                addFormVisible: false,
-				addLoading: false,
-				//新增界面数据
-				addForm: {
-					username: '',
-                    account: '',
-                    projectIds: '',
-                    companyId: '',
-                    roleName: '',
-                    flag: 0
-				},
-
-                //编辑界面是否显示
-				editFormVisible: false,
-				editLoading: false,
-				//编辑界面数据
-				editForm: {
-					id: 0,
-					username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: '',
-                    flag: 1
-                },
-                
-                //邀请
-                inviteVisible: false,
-                inviteLink: ''
-			}
-		},
-		methods: {
-            //获取基础数据
-            getMsg(){
-                if(this.user.parentId == 1 && this.user.subordinateType == 0) {
-                    this.company = [];
-                    this.allCompanies = [];
-                    this.http.post(this.port.base.getCompanyList, {
-                        id: this.user.id,
-                        parentId: this.user.parentId
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.company = res.data;
-                            this.allCompanies = res.data;
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-                } else if(this.user.parentId > 1 && this.user.isManager == 1) {
-                    this.http.post(this.port.project.projectByUser, {}, 
-                    res => {
-                        if (res.code == "ok") {
-                            this.projects = res.data;
-                            //再获取一下公司列表
-                            this.getAllCompanies();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    });
-                }
-            },  
-
-            //新版获取所有公司
-            getAllCompanies(){
-                this.allCompanies = [];
-                this.http.post(this.port.base.getInfo, {}, res => {
-                    if (res.code == "ok") {
-                        this.allCompanies = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                });
-            },
-
-            //分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getUsers();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getUsers();
-            },
-
-			//获取用户列表
-			getUsers() {
-				this.listLoading = true;
-                this.http.post(this.port.project.userList, {
-                    keyName: this.filters.keyName,
-                    currentPage: this.page,
-                    pageSize: this.size,
-                    companyId: this.filters.companyId==''?-1:this.filters.companyId,
-                    flag: this.filters.flag=='姓名'?0:this.filters.flag
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.list = res.data.list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-            
-            //显示新增界面
-			handleAdd() {
-                this.addFormVisible = true;
-				this.addForm = {
-                    parentId: this.user.id,
-					username: '',
-                    account: '',
-                    mobile: '',
-                    projectIds: '',
-					companyId: '',
-                    roleName: '',
-                    flag: 0
-				};
-            },
-
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-						this.addLoading = true;
-                        this.http.post(this.port.project.addUser, this.addForm , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getUsers();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-			},
-
-			//删除
-			handleDel(index, row) {
-                this.$confirm('确认删除该人员吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.project.delUser, {
-                        id: row.id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getUsers();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-            
-			//显示编辑界面
-			handleEdit(index, row) {
-                this.editFormVisible = true;
-				this.editForm = {
-                    id: row.id,
-                    parentId: this.user.id,
-					username: row.username,
-                    account: row.account,
-					companyId: row.companyName,
-                    roleName: row.roleName,
-                    flag: 1
-                };
-            },
-            
-			//编辑
-			editSubmit() {
-				this.$refs.editForm.validate((valid) => {
-					if (valid) {
-                        this.editLoading = true;
-                        this.http.post(this.port.project.addUser, {
-                            id: this.editForm.id,
-                            parentId: this.editForm.parentId,
-                            username: this.editForm.username,
-                            roleName: this.editForm.roleName,
-                            flag: 1
-                        } , res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: '修改成功',
-                                    type: 'success'
-                                });
-                                this.getUsers();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-            
-            //修改
-            choseProject() {
-                if(this.addForm.projectIds == ""){
-                    this.company = [];
-                    this.addForm.companyId = null;
-                }else{
-                    this.http.post(this.port.base.getProduceCompany, {
-                        projectId: this.addForm.projectIds
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.company = res.data;
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-                }
-            },
-
-            //邀请
-            invite(index, row) {
-                this.http.post(this.port.project.inviteUser, {
-                    inviteeId: row.id,
-                    projectId: row.projects[0].id,
-                    operatorId: this.user.id
-                } , res => {
-                    if (res.code == "ok") {
-                        this.inviteVisible = true;
-                        this.inviteLink = res.data.addressUrl;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //复制链接
-            copyLink() {
-                //this.inviteVisible = false;
-                this.$message({
-                    message: "复制成功!",
-                    type: 'success'
-                });
-            },
-
-            onError(e) {
-                //this.inviteVisible = false;
-                this.$message({
-                    message: "复制失败!",
-                    type: 'error'
-                });
-            }
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-		mounted() {
-            this.getMsg();
-			this.getUsers();
-        }
-	}
-</script>
-
-<style scoped>
-    .el-input-group__append button.el-button {
-        background-color: #409EFF;
-        border-color: #409EFF;
-        color: #fff;
-    }
-</style>

+ 0 - 639
lss_vue/src/views/system/allocation.vue

@@ -1,639 +0,0 @@
-<template>
-    <section>
-        <!--工具条-->
-        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-            <el-form :inline="true" :model="filters">
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
-                            <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入关键字进行搜索"></el-input>
-                </el-form-item>
-                <el-form-item>
-                    <el-button type="primary" @click="getMoulds">查询</el-button>
-                </el-form-item>
-                <el-form-item style="float: right;">
-                    <a class="download" href="/upload/云模盒批量导入模板.xlsx" download="云模盒批量导入模板.xlsx">
-                        <el-button type="primary">
-                            下载模板
-                        </el-button>
-                    </a>
-                </el-form-item>
-                <el-form-item style="float: right;">
-                    <el-upload ref="upload" action="customize" :show-file-list="false" :http-request="uploadFile" :limit="1">
-                        <el-button type="primary" :loading="uploading">批量导入</el-button>
-                    </el-upload>
-                </el-form-item>
-                <el-form-item style="float: right;">
-                    <el-button type="primary" @click="showAllocation">新建</el-button>
-                </el-form-item>
-                <!-- <el-form-item style="float: right;">
-                    <el-button type="primary" @click="issued">下发</el-button>
-                </el-form-item> -->
-            </el-form>
-        </el-col>
-
-        <!--列表-->
-        <el-table :data="allocations" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
-            <!-- <el-table-column type="selection" width="50"></el-table-column> -->
-            <el-table-column type="index" width="60"></el-table-column>
-            <el-table-column prop="equipmentNo" label="云模盒编号" width="180" sortable></el-table-column>
-            <el-table-column prop="sim" label="SIM卡号" width="120" sortable></el-table-column>
-            <el-table-column prop="hillNumber" label="电量" width="80" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.hillNumber}}<span v-if="scope.row.hillNumber">%</span></template>
-            </el-table-column>
-            <el-table-column prop="alarmBattery" label="报警电池电量" width="130" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.alarmBattery}}<span v-if="scope.row.alarmBattery">%</span></template>
-            </el-table-column>
-            <el-table-column prop="alarmDegree" label="热报警度数" width="120" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.alarmDegree}}<span v-if="scope.row.alarmDegree">℃</span></template>
-            </el-table-column>
-            <el-table-column prop="useLife" label="使用年限" width="100" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.useLife}}年</template>
-            </el-table-column>
-            <el-table-column prop="diffTime" label="倒计时" width="100" align="center" sortable>
-                <template slot-scope="scope">{{scope.row.diffTime}}</template>
-            </el-table-column>
-            <el-table-column prop="modelName" label="模具名称" width="130" sortable></el-table-column>
-            <el-table-column prop="modelNo" label="模具编号" width="120" align="center" sortable></el-table-column>
-            <el-table-column prop="companyName" label="公司名称" width="180" sortable></el-table-column>
-            <el-table-column prop="agent" label="代理商" width="120" sortable></el-table-column>
-            <el-table-column label="云模盒状态" align="center" width="120" sortable>
-                <template slot-scope="scope">
-                    <span v-if="scope.row.isUse == 0">未启用</span>
-                    <span v-else>已启用</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="160">
-                <template slot-scope="scope">
-                    <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 0" type="primary" @click="openEnable(scope.$index)">启用</el-button>
-                    <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 1" type="danger" @click="disableEquipment(scope.$index)">停用</el-button>
-                    <!--  :disabled="scope.row.isUse == 1" -->
-                    <el-button size="small" :style="scope.row.modelNo != null?'':'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">修改</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
-
-        <!--工具条-->
-        <el-col :span="24" class="toolbar">
-        <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :page-sizes="[20 , 50 , 80 , 100]"
-            :page-size="20"
-            layout="total, sizes, prev, pager, next"
-            :total="total"
-            style="float:right;"
-        ></el-pagination>
-        </el-col>
-
-        <!--新增界面-->
-        <el-dialog title="新建云模盒" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth">
-            <el-form :model="newAllocation" label-width="100px" :rules="formRules" ref="newAllocation" :inline="true" class="demo-form-inline">
-                <el-form-item label="云模盒编号" prop="equipmentNo">
-                    <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请输入云模盒编号"></el-input>
-                </el-form-item>
-                <el-form-item label="所属公司" prop="belongCompanyId">
-                    <el-select v-model="newAllocation.belongCompanyId" filterable clearable placeholder="请选择所属公司" style="width: 202px">
-                        <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="使用年限" prop="useLife">
-                    <el-input v-model.number="newAllocation.useLife" type="age" autocomplete="off" placeholder="请输入使用年限"></el-input>
-                </el-form-item>
-                <el-form-item label="代理商" prop="agent">
-                    <el-input v-model="newAllocation.agent" autocomplete="off" placeholder="请输入代理商" style="width: 202px"></el-input>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click.native="addFormVisible = false">取消</el-button>
-                <el-button type="primary" @click="addMould()">提交</el-button>
-            </div>
-        </el-dialog>
-
-        <!--修改界面-->
-        <el-dialog title="修改云模盒" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass="customWidth">
-            <el-form :model="newAllocation" label-width="100px" :rules="formRules" ref="newAllocation" :inline="true" class="demo-form-inline">
-                <el-form-item label="云模盒编号" prop="equipmentNo">
-                    <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请输入云模盒编号"></el-input>
-                </el-form-item>
-                <el-form-item label="所属公司" prop="belongCompanyId">
-                    <el-select v-model="newAllocation.belongCompanyId" filterable clearable placeholder="请选择所属公司" style="width: 202px" :disabled="newAllocation.usage">
-                        <el-option v-for="item in companies" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="使用年限" prop="useLife">
-                    <el-input v-model.number="newAllocation.useLife" type="age" autocomplete="off" placeholder="请输入使用年限"></el-input>
-                </el-form-item>
-                <el-form-item label="代理商" prop="agent">
-                    <el-input v-model="newAllocation.agent" autocomplete="off" placeholder="请输入代理商" style="width: 202px"></el-input>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click.native="editFormVisible = false">取消</el-button>
-                <el-button type="primary" @click="editMould(newAllocation.id)">提交</el-button>
-            </div>
-        </el-dialog>
-
-        <!-- 启用弹窗 -->
-        <el-dialog title="启用" :visible.sync="operateDialogVisible" width="450px">
-            <!-- <el-form label-width="100px" :rules="formRules" :inline="true" class="demo-form-inline">
-                <el-form-item label="某个参数">
-                    <el-input autocomplete="off" placeholder="填了也不会发生什么"></el-input>
-                </el-form-item>
-            </el-form>
-            <span slot="footer" class="dialog-footer">
-                <el-button @click="operateDialogVisible = false">取消</el-button>
-                <el-button type="primary" @click="enable">启用</el-button>
-            </span> -->
-            <el-form :model="issuedVal" label-width="130px" :rules="formRules" ref="issuedVal" :inline="true" class="demo-form-inline">
-                <el-form-item label="报警电池电量" prop="alarmBattery">
-                    <el-input v-model.number="issuedVal.alarmBattery" type="age" autocomplete="off" placeholder="请输入报警电池电量" style="width:250px;"></el-input>
-                    %
-                </el-form-item>
-                <el-form-item label="热报警度数" prop="alarmDegree">
-                    <el-input v-model.number="issuedVal.alarmDegree" type="age" autocomplete="off" placeholder="请输入热报警度数" style="width:250px;"></el-input>
-                    ℃
-                </el-form-item>
-            </el-form>
-            <span slot="footer" class="dialog-footer">
-                <el-button @click="operateDialogVisible = false">取消</el-button>
-                <el-button type="primary" @click="enable">启用</el-button>
-            </span>
-        </el-dialog>
-
-        <!-- 下发弹窗 -->
-        <el-dialog title="下发" :visible.sync="issuedVisible" width="450px">
-            <el-form :model="issuedVal" label-width="130px" :rules="formRules" ref="issuedVal" :inline="true" class="demo-form-inline">
-                <el-form-item label="报警电池电量" prop="alarmBattery">
-                    <el-input v-model.number="issuedVal.alarmBattery" type="age" autocomplete="off" placeholder="请输入报警电池电量" style="width:250px;"></el-input>
-                    %
-                </el-form-item>
-                <el-form-item label="热报警度数" prop="alarmDegree">
-                    <el-input v-model.number="issuedVal.alarmDegree" type="age" autocomplete="off" placeholder="请输入热报警度数" style="width:250px;"></el-input>
-                    ℃
-                </el-form-item>
-            </el-form>
-            <span slot="footer" class="dialog-footer">
-                <el-button @click="issuedVisible = false">取消</el-button>
-                <el-button type="primary" @click="saveIssued">下发</el-button>
-            </span>
-        </el-dialog>
-    </section>
-</template>
-
-<script>
-    import util from "../../common/js/util";
-    export default {
-        data() {
-            return {
-                allocations: [],
-                companies: {},
-                newAllocation: {
-                    equipmentNo: "", //设备编号
-                    useLife: "", //使用年限
-                    equipmentName: "", //设备名称
-                    id: "", //设备id
-                    belongCompanyId: "", //所属公司ID
-                    agent: "", //代理商
-                    usage: true //是否可以修改公司
-                },
-                filters: {
-                    keyName: "",
-                    companyId: ""
-                },
-                formRules: {
-                    equipmentNo: [
-                        { required: true, message: "请输入云模盒编号", trigger: "blur" }
-                    ],
-                    useLife: [
-                        { required: true, message: '请输入使用年限'},
-                        { type: 'number', message: '使用年限必须为数字值'}
-                    ],
-                    belongCompanyId: [
-                        { required: true, message: "请选择所属公司", trigger: ["blur", "change"] }
-                    ],
-                    agent: [
-                        { required: true, message: "请输入代理商", trigger: "blur" }
-                    ],
-                    alarmBattery: [
-                        { required: true, message: '请输入报警电池电量'},
-                        { type: 'number', message: '报警电池电量必须为数字值'}
-                    ],
-                    alarmDegree: [
-                        { required: true, message: '请输入热报警度数'},
-                        { type: 'number', message: '热报警度数必须为数字值'}
-                    ],
-                },
-
-                listLoading: false,
-                addLoading: false,
-                editLoading: false,
-                uploading: false,
-
-                total: 0,
-                page: 1,
-                size: 20,
-                tableHeight: 0,
-
-                addFormVisible: false,
-                editFormVisible: false,
-                operateDialogVisible: false,
-                activeIndex: 0,
-
-                issuedVal: {
-                    alarmBattery: 30,
-                    alarmDegree: 80,
-                },
-                issuedVisible: false,
-                multipleSelection: [],
-            };
-        },
-        methods: {
-            getMsg() {
-                //获取公司下拉列表
-                this.http.post( this.port.base.getCompanys, {},
-                res => {
-                    if (res.code == "ok") {
-                        this.companies = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //分页
-            handleCurrentChange(val) {
-                this.page = val;
-                this.getMoulds();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-                this.getMoulds();
-            },
-
-            //读取云模盒信息
-            getMoulds() {
-                this.listLoading = true;
-                this.http.post(this.port.base.mouldeList,{
-                    pageNum: this.page,
-                    pageSize: this.size,
-                    keyName: this.filters.keyName,
-                    companyId: this.filters.companyId
-                },
-                res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        var list = res.data.list
-                        for(var i in list){
-                            if(list[i].endTime == null){
-                                list[i].diffTime = "";
-                            } else {
-                                list[i].diffTime = util.formatDate.dateDiff(
-                                    //util.formatDate.format(new Date(list[i].endTime), 'yyyy-MM-dd'), 
-                                    list[i].endTime,
-                                    util.formatDate.format(new Date(new Date()), 'yyyy-MM-dd')
-                                );
-                            }
-                        }
-                        this.allocations = list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                        message: res.msg,
-                        type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //添加界面
-            showAllocation() {
-                this.addFormVisible = true;
-                this.newAllocation = {
-                    id: "",
-                    useLife: "",
-                    equipmentNo: "",
-                    belongCompanyId: "",
-                    agent: ""
-                };
-            },
-           
-            //添加模具
-            addMould() {
-                this.$refs.newAllocation.validate(valid => {
-                    if (valid) {
-                    this.addLoading = true;
-                    this.http.post(
-                        this.port.base.editMould,
-                        {
-                            equipmentNo: this.newAllocation.equipmentNo,
-                            belongCompanyId: this.newAllocation.belongCompanyId,
-                            useLife: this.newAllocation.useLife,
-                            agent: this.newAllocation.agent
-                        },
-                        res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: "添加成功",
-                                    type: "success"
-                                });
-                                this.getMoulds();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: "error"
-                                });
-                            }
-                        },
-                        error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: "error"
-                            });
-                        }
-                    );
-                    }
-                });
-            },
-
-             //修改界面
-            showEdit(index, row, usageBoolean) {
-                this.editFormVisible = true;
-                this.newAllocation = {
-                    id: row.id,
-                    useLife: row.useLife,
-                    equipmentNo: row.equipmentNo,
-                    belongCompanyId: row.belongCompanyId,
-                    agent: row.agent,
-                    usage: usageBoolean
-                };
-            },
-
-            //编辑模具
-            editMould() {
-                this.$refs.newAllocation.validate(valid => {
-                    if (valid) {
-                        this.editLoading = true;
-                        this.http.post( this.port.base.editMould, {
-                            id: this.newAllocation.id,
-                            equipmentNo: this.newAllocation.equipmentNo,
-                            equipmentName: this.newAllocation.equipmentName,
-                            belongCompanyId: this.newAllocation.belongCompanyId,
-                            useLife: this.newAllocation.useLife,
-                            agent: this.newAllocation.agent
-                        },
-                        res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: "修改成功",
-                                    type: "success"
-                                });
-                                this.getMoulds();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: "error"
-                                });
-                            }
-                        },
-                        error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: "error"
-                            });
-                        });
-                    }
-                });
-            },
-
-            //打开启用窗口
-            openEnable(index) {
-                this.operateDialogVisible = true;
-                this.issuedVal.alarmBattery = this.allocations[this.activeIndex].alarmBattery;
-                this.issuedVal.alarmDegree = parseInt(this.allocations[this.activeIndex].alarmDegree);
-                this.activeIndex = index;
-            },
-
-            //启用设备
-            enable() {
-                // if(this.allocations[this.activeIndex].belongCompanyId == null){
-                //     this.$message({
-                //         message: "输入所属公司后才能启用模具",
-                //         type: "error"
-                //     });
-                // }else{
-                this.allocations[this.activeIndex].isUse = 1;
-                this.operateDialogVisible = false;
-                // this.http.post( this.port.base.enableMould, {
-                //     id: this.allocations[this.activeIndex].id,
-                //     isUse: 1
-                // },
-                var str = this.allocations[this.activeIndex].equipmentNo;
-                this.http.post( this.port.base.setPacket, {
-                    lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
-                    hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
-                    isUse: 1,
-                    equipmentNo: str
-                },
-                res => {
-                    if (res.code == "ok") {
-                        this.$message({
-                            message: "设备已启用",
-                            type: "success"
-                        });
-                        this.getMoulds();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //停用云模盒
-            disableEquipment(index) {
-                // if(this.allocations[index].belongCompanyId == null){
-                //     this.$message({
-                //         message: "输入所属公司后才能启用模具",
-                //         type: "error"
-                //     });
-                // }else{
-                this.allocations[index].isUse = 0;
-                // this.http.post( this.port.base.enableMould, {
-                //     id: this.allocations[index].id,
-                //     isUse: 0
-                // },
-                var str = this.allocations[this.activeIndex].equipmentNo;
-                this.http.post( this.port.base.setPacket, {
-                    lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
-                    hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
-                    isUse: 0,
-                    equipmentNo: str
-                },
-                res => {
-                    if (res.code == "ok") {
-                        this.$message({
-                            message: "设备已停用",
-                            type: "success"
-                        });
-                        this.getMoulds();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //导入云模盒
-            uploadFile(params) {
-                var fileObj = params.file;
-                var form = new FormData();
-                form.append("file", fileObj);
-                this.uploading = true;
-                this.http.uploadFile( this.port.base.importMouldEquipmentExcel,  form,
-                res => {
-                    this.uploading = false;
-                    this.$refs.upload.clearFiles();
-                    if (res.code == "ok") {
-                        this.$message({
-                            message: "上传成功",
-                            type: "success"
-                        });
-                        this.getMoulds();
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.uploading = false;
-                    this.$refs.upload.clearFiles();
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
-
-            //列表选择
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-
-            //下发云模盒
-            issued() {
-                this.issuedVisible = true;
-            },
-
-            saveIssued() {
-                if(this.multipleSelection.length == 0) {
-                    this.$message({
-                        message: "请选择要下发的云模盒",
-                        type: "error"
-                    });
-                } else {
-                    var str = '';
-                    for(var i in this.multipleSelection) {
-                        str += this.multipleSelection[i].equipmentNo + ',';
-                    }
-                    str = str.substring(0,str.length-1)
-                    this.http.post( this.port.base.setPacket, {
-                        lowPowerLimit: this.issuedVal.alarmBattery,//.toString(16),
-                        hotAlarmLimit: this.issuedVal.alarmDegree,//.toString(16),
-                        equipmentNo: str
-                    },
-                    res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: "下发成功",
-                                type: "success"
-                            });
-                            this.issuedVisible = false;
-                            this.getMoulds();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: "error"
-                            });
-                        }
-                    },
-                    error => {
-                        this.$message({
-                            message: error,
-                            type: "error"
-                        });
-                    });
-                }
-            }
-
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-        mounted() {
-            this.getMsg();
-            //获取模具列表
-            this.getMoulds();
-        }
-    };
-</script>
-
-<style scoped>
-    .download {
-        color: #fff;
-        text-decoration: none;
-    }
-</style>

+ 0 - 601
lss_vue/src/views/system/manage.vue

@@ -1,601 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-                <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入生产方名称进行搜索" clearable></el-input>
-                </el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click.native="getFactory">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;">
-					<el-button type="primary" @click.native="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
-            <el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="companyName" label="生产方名称" width="250" sortable></el-table-column>
-            <el-table-column prop="administrator" label="生产方管理员" width="150" sortable>
-            </el-table-column>
-            <el-table-column prop="relateCompanyList" label="关联资产方" width="400" sortable>
-                <template slot-scope="scope">
-                    <span class="info" v-for="(item, index) in scope.row.relateCompanyList">
-                        {{item.companyName}}
-                        <span v-if="index != scope.row.relateCompanyList.length-1">、</span>
-                    </span>
-                </template>
-            </el-table-column>
-            <el-table-column prop="companyAddress" label="生产方地址" sortable></el-table-column>
-			<el-table-column label="操作" width="150">
-				<template slot-scope="scope">
-					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">编辑</el-button>
-					<el-button type="danger" size="small" @click.native.native="handleDel(scope.$index, scope.row)">删除</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog :title="addTitle" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm">
-				<el-form-item label="生产方名称" prop="companyName" v-show="addState">
-					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
-				</el-form-item>
-                <el-form-item label="关联资产方" v-show="addState">
-                    <el-select v-model="addForm.companyIds" clearable multiple filterable placeholder="请选择资产方" style="width:533px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="生产方地址" prop="companyAddress" v-show="addState">
-					<el-input v-model.lazy="addForm.companyAddress" autocomplete="off" @change="changeFactoryArea('addContainer')" placeholder="请输入生产方地址"></el-input>
-				</el-form-item>
-                <div id="addContainer" class="formMap" v-show="addState"></div>
-                <el-form-item label="姓名" prop="username" v-show="!addState">
-					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account" v-show="!addState">
-					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号"></el-input>
-				</el-form-item>
-                <el-form-item label="角色" v-show="!addState">
-                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入角色名称"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                 <span v-if="!addState" style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-                <el-button v-if="addState" type="primary" @click.native="toNext(0)">下一步</el-button>
-                <el-button v-if="!addState" type="primary" @click.native="toPart(0)">上一步</el-button>
-				<el-button v-if="!addState" type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-		<!--编辑界面-->
-		<el-dialog title="编辑生产方" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm">
-				<el-form-item label="生产方名称" prop="companyName">
-					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
-				</el-form-item>
-                <el-form-item label="关联资产方">
-                    <el-select v-model="editForm.companyIds" clearable multiple filterable placeholder="请选择资产方" style="width:533px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="生产方地址" prop="companyAddress">
-					<el-input v-model="editForm.companyAddress" autocomplete="off" :change="changeFactoryArea('editContainer')" placeholder="请输入生产方地址"></el-input>
-				</el-form-item>
-                <div id="editContainer" class="formMap"></div>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-    import Vue from 'vue';
-	import util from '../../common/js/util'
-
-	export default {
-		data() {
-            var checkPhone = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入联系方式'));
-                } else {
-                    const reg = /^1[0-9]\d{9}$/
-                    if (reg.test(value)) {
-                        callback();
-                    } else {
-                        return callback(new Error('请输入正确的联系方式'));
-                    }
-                }
-            };
-			return {
-				filters: {
-                    keyName: ''
-                },
-
-                user: JSON.parse(sessionStorage.getItem('user')),
-                companys:[],
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-                
-                formRules: {
-					companyName: [
-						{ required: true, message: '请输入生产方名称', trigger: 'blur' }
-                    ],
-                    companyAddress: [
-                        { required: true, message: '请输入生产方地址', trigger: 'blur' }
-                    ],
-                    username: [
-						{ required: true, message: '请输入姓名', trigger: 'blur' }
-                    ],
-                    account: [
-                        { required: true, validator: checkPhone, trigger: 'blur'}
-                    ]
-                },
-
-                // 地图
-                map: '',
-                marker: '',
-
-                // 新增界面
-				addFormVisible: false,
-                addLoading: false,
-                addState: true,
-                addTitle: '新增生产方',
-				addForm: {
-                    companyName: '',
-                    companyType: 1,
-                    companyAddress: '',
-                    yLng: 116.397511,
-                    xLat: 39.907545,
-                    companyIds: [],
-                    username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: "系统管理员",
-                    flag: 0
-				},
-                
-                // 编辑界面
-				editFormVisible: false,
-				editLoading: false,
-				editForm: {
-					id: 0,
-					companyName: '',
-                    companyType: 1,
-                    companyAddress: '',
-                    yLng: 0,
-                    xLat: 0,
-                    companyIds: [],
-                    flag: 1
-				}
-			}
-		},
-		methods: {
-            //  分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getFactory();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getFactory();
-            },
-
-            //获取基础数据
-            getMsg() {
-                this.http.post(this.port.base.relationList, {
-                    companyType: 0
-                }, res => {
-                    if (res.code == "ok") {
-                        this.companys = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-			//获取列表
-			getFactory() {
-				this.listLoading = true;
-                this.http.post(this.port.base.companyList, {
-                    keyName: this.filters.keyName,
-                    pageNum: this.page,
-                    pageSize: this.size,
-                    companyType: 1
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.list = res.data.list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-            
-            //地址输入切换
-            changeFactoryArea(mapId) {
-                if(mapId == "addContainer"){
-                    this.markLocation(this.addForm.companyAddress, mapId);
-                } else {
-                    this.markLocation(this.editForm.companyAddress, mapId);
-                }
-                
-            },
-
-            toNext(i) {
-                if(i == 0) {
-                    this.addState = false;
-                     this.addTitle = '新增生产方管理员';
-                }
-            },
-
-            toPart(i) {
-                if(i == 0) {
-                    this.addState = true;
-                    this.addTitle = '新增生产方';
-                }
-                var _this = this
-                setTimeout(function(){ _this.setMap('addContainer'); }, 100);
-            },
-
-            //显示新增界面
-			handleAdd() {
-                this.addFormVisible = true;
-                this.addState = true;
-                this.addTitle = '新增生产方';
-				this.addForm = {
-                    companyName: '',
-                    companyAddress: '',
-                    yLng: 116.397511,
-                    xLat: 39.907545,
-                    companyIds: [],
-                    username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: "系统管理员",
-                    flag: 0
-                };
-            },
-
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        this.addLoading = true;
-                        var str = "";
-                        for(var i in this.addForm.companyIds){
-                            if(i == this.addForm.companyIds.length-1){
-                                str += this.addForm.companyIds
-                            } else {
-                                str += this.addForm.companyIds + ","
-                            }
-                        }
-                        this.http.post(this.port.base.addCompany, {
-                            companyName: this.addForm.companyName,
-                            companyType: 1,
-                            companyAddress: this.addForm.companyAddress,
-                            yLng: this.addForm.yLng,
-                            xLat: this.addForm.xLat,
-                            companyIds: str,
-                            flag: 0
-                        } , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addPeo(res.data.id);
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-
-            //添加人员
-            addPeo(companyId) {
-                this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        this.http.post(this.port.project.addUser, {
-                            username: this.addForm.username,
-                            account: this.addForm.account,
-                            companyId: companyId,
-                            roleName: this.addForm.roleName,
-                            parentId: this.user.id,
-                            addType: 0,
-                            flag: 0
-                        } , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getFactory();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-            
-			//删除
-			handleDel(index, row) {
-				this.$confirm('确认删除该生产方吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.base.delCompany, {
-                        id: row.id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getFactory();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-            
-			//显示编辑界面
-			handleEdit(index, row) {
-                this.editFormVisible = true;
-                var array = [];
-                for(var i in row.relateCompanyList){
-                    array.push(row.relateCompanyList[i].id)
-                }
-                this.editForm = {
-                    id: row.id,
-                    companyName: row.companyName,
-                    companyType: 1,
-                    companyAddress: row.companyAddress,
-                    yLng: row.ylng,
-                    xLat: row.xlat,
-                    companyIds: array,
-                    flag: 1
-                };
-            },
-            
-			//编辑
-			editSubmit() {
-				this.$refs.editForm.validate((valid) => {
-					if (valid) {
-                        this.editLoading = true;
-                        var str = "";
-                        for(var i in this.editForm.companyIds){
-                            if(i == this.editForm.companyIds.length-1){
-                                str += this.editForm.companyIds[i]
-                            } else {
-                                str += this.editForm.companyIds[i] + ","
-                            }
-                        }
-                        this.http.post(this.port.base.addCompany, {
-                            id: this.editForm.id,
-                            companyName: this.editForm.companyName,
-                            companyType: 1,
-                            companyAddress: this.editForm.companyAddress,
-                            yLng: this.editForm.yLng,
-                            xLat: this.editForm.xLat,
-                            companyIds: str,
-                            flag: 1
-                        } , res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: '修改成功',
-                                    type: 'success'
-                                });
-                                this.getFactory();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-
-            //获取地图
-            setMap(mapId) {
-                if(mapId == 'addContainer') {
-                    this.map = new AMap.Map('addContainer', {
-                        resizeEnable: true, // 允许缩放
-                        center:[ this.addForm.yLng , this.addForm.xLat ],
-                        zoom:10
-                    })
-
-                    this.marker = new AMap.Marker({
-                        map: this.map,
-                        position: new AMap.LngLat(this.addForm.yLng , this.addForm.xLat),   // 经纬度
-                    });
-                } else {
-                    this.map = new AMap.Map('editContainer', {
-                        resizeEnable: true, // 允许缩放
-                        center:[this.editForm.yLng , this.editForm.xLat],
-                        zoom:10
-                    })
-
-                    this.marker = new AMap.Marker({
-                        map: this.map,
-                        position: new AMap.LngLat(this.editForm.yLng , this.editForm.xLat),   // 经纬度
-                    });
-                }
-                
-                var _this = this;
-                this.map.on('click', function(e) {
-                    if(_this.map){
-                        _this.map.remove(_this.marker);
-                    }
-                    var Lng = e.lnglat.getLng(),
-                    Lat = e.lnglat.getLat();
-                    if(mapId == 'addContainer') {
-                        _this.addForm.yLng = Lng;
-                        _this.addForm.xLat = Lat;
-                    } else {
-                        _this.editForm.yLng = Lng;
-                        _this.editForm.xLat = Lat;
-                    }
-                    _this.marker = new AMap.Marker({
-                        map: _this.map,
-                        position: new AMap.LngLat(Lng , Lat),   // 经纬度
-                    });
-                });
-            },
-
-            // 获取经纬度
-            markLocation(address,mapId) {
-                var _this = this;
-                AMap.plugin('AMap.Geocoder', function() {
-                    var geocoder = new AMap.Geocoder();            
-                    geocoder.getLocation(address, function(status, result) {
-                        if (status === 'complete' && result.info === 'OK') {
-                            // 经纬度                      
-                            var lng = result.geocodes[0].location.lng;
-                            var lat = result.geocodes[0].location.lat;
-                            
-                            _this.noSub = false;
-                            if(mapId == "addContainer") {
-                                _this.addForm.yLng = lng;
-                                _this.addForm.xLat = lat;
-                            } else {
-                                _this.editForm.yLng = lng;
-                                _this.editForm.xLat = lat;
-                            }
-                            
-                            // 添加标记
-                            if(_this.map){
-                                _this.map.remove(_this.marker);
-                                _this.map.setZoomAndCenter(10, [lng, lat]);
-                                _this.marker = new AMap.Marker({
-                                    map: _this.map,
-                                    position: new AMap.LngLat(lng, lat),   // 经纬度
-                                });
-                            }
-
-                        } else {
-                            //console.log('定位失败!');
-                        }
-                    });
-                });
-            }
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-        watch: {
-            addFormVisible(val) {
-                if(val){
-                    var _this = this
-                    setTimeout(function(){ _this.setMap('addContainer'); }, 300);
-                }
-            },
-            editFormVisible(val) {
-                if(val){
-                    var _this = this
-                    setTimeout(function(){ _this.setMap('editContainer'); }, 300);
-                }
-            }
-        },
-		mounted() {
-            this.getMsg();
-			this.getFactory();
-        }
-	}
-</script>
-
-<style scoped>
-    .formMap {
-        height: 400px;
-    }
-</style>

+ 0 - 476
lss_vue/src/views/system/vip.vue

@@ -1,476 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-                <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入资产方名称进行搜索" clearable></el-input>
-                </el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click.native="getComp">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;">
-					<el-button type="primary" @click.native="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
-            <el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="companyName" label="资产方名称" width="250" sortable>
-            </el-table-column>
-            <el-table-column prop="administrator" label="资产方管理员" width="150" sortable>
-                <template slot-scope="scope">
-                    <router-link to="/staff" tag="span" style="cursor: pointer; color: #409eff;">{{scope.row.administrator}}</router-link>
-                </template>
-            </el-table-column>
-            <el-table-column prop="relateCompanyList" label="关联生产方" width="400" sortable>
-                <template slot-scope="scope">
-                    <span class="info" v-for="(item, index) in scope.row.relateCompanyList">
-                        {{item.companyName}}
-                        <span v-if="index != scope.row.relateCompanyList.length-1">、</span>
-                    </span>
-                </template>
-            </el-table-column>
-            <el-table-column prop="companyAddress" label="资产方地址" sortable></el-table-column>
-			<el-table-column label="操作" width="150">
-				<template slot-scope="scope">
-					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">编辑</el-button>
-					<el-button type="danger" size="small" @click.native.native="handleDel(scope.$index, scope.row)">删除</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog :title="addTitle" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm">
-				<el-form-item label="资产方名称" prop="companyName" v-show="addState">
-					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入资产方地址"></el-input>
-				</el-form-item>
-                <el-form-item label="关联生产方" v-show="addState">
-                    <el-select v-model="addForm.companyIds" clearable multiple filterable placeholder="请选择生产方" style="width:533px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="资产方地址" prop="companyAddress" v-show="addState">
-					<el-input v-model="addForm.companyAddress" autocomplete="off" placeholder="请输入资产方地址"></el-input>
-				</el-form-item>
-                <el-form-item label="姓名" prop="username" v-show="!addState">
-					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account" v-show="!addState">
-					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号"></el-input>
-				</el-form-item>
-                <el-form-item label="角色" v-show="!addState">
-                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入角色名称"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                <span v-if="!addState" style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-                <el-button v-if="addState" type="primary" @click.native="toNext(0)">下一步</el-button>
-                <el-button v-if="!addState" type="primary" @click.native="toPart(0)">上一步</el-button>
-				<el-button v-if="!addState" type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-		<!--编辑界面-->
-		<el-dialog title="编辑资产方" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm">
-				<el-form-item label="资产方名称" prop="companyName">
-					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入资产方地址"></el-input>
-				</el-form-item>
-                <el-form-item label="关联生产方">
-                    <el-select v-model="editForm.companyIds" clearable multiple filterable placeholder="请选择生产方" style="width:533px">
-                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="资产方地址" prop="companyAddress">
-					<el-input v-model="editForm.companyAddress" autocomplete="off" placeholder="请输入资产方地址"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-	import util from '../../common/js/util'
-
-	export default {
-		data() {
-            var checkPhone = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入联系方式'));
-                } else {
-                    const reg = /^1[0-9]\d{9}$/
-                    if (reg.test(value)) {
-                        callback();
-                    } else {
-                        return callback(new Error('请输入正确的联系方式'));
-                    }
-                }
-            };
-			return {
-				filters: {
-                    keyName: ''
-                },
-
-                user: JSON.parse(sessionStorage.getItem('user')),
-                companys:[],
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-                
-                formRules: {
-					companyName: [
-						{ required: true, message: '请输入资产方名称', trigger: 'blur' }
-                    ],
-                    companyAddress: [
-                        { required: true, message: '请输入资产方地址', trigger: 'blur' }
-                    ],
-                    username: [
-						{ required: true, message: '请输入姓名', trigger: 'blur' }
-                    ],
-                    account: [
-                        { required: true, validator: checkPhone, trigger: 'blur'}
-                    ]
-                },
-
-                team: [{label:'资产方',value:0},{label:'生产方',value:1}],
-
-                // 新增界面
-				addFormVisible: false,
-                addLoading: false,
-                addState: true,
-                addTitle: '新增资产方',
-				addForm: {
-                    companyName: '',
-                    companyAddress: '',
-                    companyIds: [],
-                    username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: "系统管理员",
-                    flag: 0
-				},
-                
-                // 编辑界面
-				editFormVisible: false,
-                editLoading: false,
-				editForm: {
-					id: 0,
-                    companyName: '',
-                    companyType: 0,
-                    companyAddress: '',
-                    companyIds: [],
-                    flag: 1
-				}
-			}
-		},
-		methods: {
-            //  分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getComp();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getComp();
-            },
-
-            //获取基础数据
-            getMsg() {
-                this.http.post(this.port.base.relationList, {
-                    companyType: 1
-                }, res => {
-                    if (res.code == "ok") {
-                        this.companys = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-			//获取资产方列表
-			getComp() {
-				this.listLoading = true;
-                this.http.post(this.port.base.companyList, {
-                    keyName: this.filters.keyName,
-                    pageNum: this.page,
-                    pageSize: this.size,
-                    companyType: 0
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.list = res.data.list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            }, 
-
-            toNext(i) {
-                if(i == 0) {
-                    this.addState = false;
-                     this.addTitle = '新增资产方管理员';
-                }
-            },
-
-            toPart(i) {
-                if(i == 0) {
-                    this.addState = true;
-                    this.addTitle = '新增资产方';
-                }
-            },
-
-            //显示新增界面
-			handleAdd() {
-                this.addFormVisible = true;
-                this.addState = true;
-                this.addTitle = '新增资产方';
-				this.addForm = {
-                    companyName: '',
-                    companyAddress: '',
-                    companyIds: [],
-                    username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: "系统管理员",
-                    flag: 0
-				};
-            },
-            
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        this.addLoading = true;
-                        var str = "";
-                        for(var i in this.addForm.companyIds){
-                            if(i == this.addForm.companyIds.length-1){
-                                str += this.addForm.companyIds
-                            } else {
-                                str += this.addForm.companyIds + ","
-                            }
-                        }
-                        this.http.post(this.port.base.addCompany, {
-                            companyName: this.addForm.companyName,
-                            companyType: 0,
-                            companyAddress: this.addForm.companyAddress,
-                            companyIds: str,
-                            flag: 0
-                        } , res => {
-                            if (res.code == "ok") {
-                                this.addPeo(res.data.id);
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-
-            //添加人员
-            addPeo(companyId) {
-                this.$refs.addForm.validate((valid) => {
-					if (valid) {
-                        this.http.post(this.port.project.addUser, {
-                            username: this.addForm.username,
-                            account: this.addForm.account,
-                            companyId: companyId,
-                            roleName: this.addForm.roleName,
-                            parentId: this.user.id,
-                            addType: 0,
-                            flag: 0
-                        } , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getComp();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-            
-			//删除
-			handleDel(index, row) {
-				this.$confirm('确认删除该资产方吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.base.delCompany, {
-                        id: row.id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getComp();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-            
-			//显示编辑界面
-			handleEdit(index, row) {
-                this.editFormVisible = true;
-                var array = [];
-                for(var i in row.relateCompanyList) {
-                    array.push(row.relateCompanyList[i].id)
-                }
-                this.editForm = {
-                    id: row.id,
-                    companyName: row.companyName,
-                    companyType: 0,
-                    companyAddress: row.companyAddress,
-                    companyIds: array,
-                    flag: 1
-				};
-            },
-            
-			//编辑
-			editSubmit() {
-				this.$refs.editForm.validate((valid) => {
-					if (valid) {
-                        this.editLoading = true;
-                        var str = "";
-                        for(var i in this.editForm.companyIds){
-                            if(i == this.editForm.companyIds.length-1){
-                                str += this.editForm.companyIds
-                            } else {
-                                str += this.editForm.companyIds + ","
-                            }
-                        }
-                        this.http.post(this.port.base.addCompany, {
-                            id: this.editForm.id,
-                            companyName: this.editForm.companyName,
-                            companyType: 0,
-                            companyAddress: this.editForm.companyAddress,
-                            companyIds: str,
-                            flag: 1
-                        } , res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: '修改成功',
-                                    type: 'success'
-                                });
-                                this.getComp();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            }
-        },
-
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-
-		mounted() {
-            this.getMsg();
-			this.getComp();
-        }
-	}
-</script>
-
-<style scoped>
-    
-</style>

+ 0 - 547
lss_vue/src/views/user/reserve.vue

@@ -1,547 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
-                            <el-option v-for="item in allCompanies" :key="item.id" :label="item.companyName" :value="item.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.flag" placeholder="请选择查询条件">
-                            <el-option label="姓名" value="0"></el-option>
-                            <el-option label="手机号" value="1"></el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-form-item>
-                    <el-input v-model="filters.keyName" clearable placeholder="请输入姓名或手机号进行搜索" style="width:250px;"></el-input>
-                </el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="getUsers">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;" v-if="user.subordinateType == 0 || user.isManager == 1">
-					<el-button type="primary" @click="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
-			<el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="username" label="姓名" width="120" sortable></el-table-column>
-			<el-table-column prop="account" label="手机号" width="180" sortable></el-table-column>
-			<!-- <el-table-column prop="mobile" label="联系方式" width="150" sortable></el-table-column> -->
-            <el-table-column prop="projects" label="参与项目" sortable>
-                <template slot-scope="scope">
-                    <span class="info" v-for="(item, index) in scope.row.projects">
-                        {{item.projectName}}
-                        <span v-if="scope.row.projects != null && index != scope.row.projects.length-1">、</span>
-                    </span>
-                </template>
-			</el-table-column>
-            <el-table-column prop="roleName" label="备注" width="180" sortable></el-table-column>
-            <el-table-column prop="teamName" label="类型" width="120" align="center" sortable></el-table-column>
-			<el-table-column prop="companyName" label="所属公司" sortable></el-table-column>
-			<el-table-column label="操作" align="left" width="230">
-				<template slot-scope="scope" v-if="user.id == scope.row.parentId || user.isManager == 1 || (user.parentId == 1 && user.subordinateType == 0)">
-					<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
-					<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
-                    <el-button type="primary" size="small" @click="invite(scope.$index, scope.row)" v-if="user.id != 1 && scope.row.projects != null && scope.row.projects.length == 1">邀请</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog title="新增人员" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
-				<el-form-item label="姓名" prop="username">
-					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account">
-					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
-				</el-form-item>
-                <el-form-item v-if="!(user.parentId == 1 && user.subordinateType == 0)" label="参与项目" prop="projectIds">
-					<el-select v-model="addForm.projectIds" @change="choseProject" clearable filterable placeholder="请选择参与项目" style="width:202px">
-                        <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="公司" prop="companyId">
-					<el-select v-model="addForm.companyId" clearable filterable placeholder="请选择所属公司" style="width:202px">
-                        <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="备注">
-                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入备注"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                <span style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-		<!--编辑界面-->
-		<el-dialog title="编辑人员" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="80px" :rules="formRules" ref="editForm" :inline="true" class="demo-form-inline">
-				<el-form-item label="姓名" prop="username">
-					<el-input v-model="editForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account">
-					<el-input v-model="editForm.account" disabled autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
-				</el-form-item>
-                <el-form-item label="公司" prop="companyId">
-                    <el-input v-model="editForm.companyId" disabled autocomplete="off" placeholder="请选择所属公司"></el-input>
-				</el-form-item>
-                <el-form-item label="备注">
-                    <el-input v-model="editForm.roleName" autocomplete="off" placeholder="请输入备注"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                 <span style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-        <!--邀请界面-->
-		<el-dialog title="邀请" v-if="inviteVisible" :visible.sync="inviteVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-input placeholder="请复制邀请链接" v-model="inviteLink" class="input-with-select">
-                <el-button slot="append" v-clipboard:copy="inviteLink" v-clipboard:success="copyLink" v-clipboard:error="onError" type="primary" icon="el-icon-share">复制链接</el-button>
-            </el-input>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-	import util from '../../common/js/util'
-
-	export default {
-		data() {
-            var checkPhone = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入联系方式'));
-                } else {
-                    const reg = /^1[0-9]\d{9}$/
-                    if (reg.test(value)) {
-                        callback();
-                    } else {
-                        return callback(new Error('请输入正确的联系方式'));
-                    }
-                }
-            };
-			return {
-				filters: {
-                    keyName: '',
-                    roleName: '',
-                    flag: '姓名',
-                    companyId: ''
-                },
-                
-                user: JSON.parse(sessionStorage.getItem('user')),
-                company: [],
-                projects: [],
-                //搜索用 涉及到的所有公司
-                allCompanies: [],
-
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-
-                formRules: {
-                    username: [
-						{ required: true, message: '请输入姓名', trigger: 'blur' }
-                    ],
-                    account: [
-                        { required: true, validator: checkPhone, trigger: 'blur'}
-                    ],
-                    teamName: [
-						{ required: true, message: '请选择人员类型', trigger: ["blur",'change'] }
-                    ],
-                    projectIds: [
-						{ required: true, message: '请选择参与项目', trigger: ["blur",'change'] }
-					],
-                    companyId: [
-						{ required: true, message: '请选择所属公司', trigger: ["blur",'change'] }
-					]
-                },
-
-                //新增界面是否显示
-                addFormVisible: false,
-				addLoading: false,
-				//新增界面数据
-				addForm: {
-					username: '',
-                    account: '',
-                    projectIds: '',
-                    companyId: '',
-                    roleName: '',
-                    flag: 0
-				},
-
-                //编辑界面是否显示
-				editFormVisible: false,
-				editLoading: false,
-				//编辑界面数据
-				editForm: {
-					id: 0,
-					username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: '',
-                    flag: 1
-                },
-                
-                //邀请
-                inviteVisible: false,
-                inviteLink: ''
-			}
-		},
-		methods: {
-            //获取基础数据
-            getMsg(){
-                if(this.user.parentId == 1 && this.user.subordinateType == 0) {
-                    this.company = [];
-                    this.allCompanies = [];
-                    this.http.post(this.port.base.getCompanyList, {
-                        id: this.user.id,
-                        parentId: this.user.parentId
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.company = res.data;
-                            this.allCompanies = res.data;
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-                } else if(this.user.parentId > 1 && this.user.isManager == 1) {
-                    this.http.post(this.port.project.projectByUser, {}, 
-                    res => {
-                        if (res.code == "ok") {
-                            this.projects = res.data;
-                            //再获取一下公司列表
-                            this.getAllCompanies();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    });
-                }
-            },  
-
-            //新版获取所有公司
-            getAllCompanies(){
-                this.allCompanies = [];
-                this.http.post(this.port.base.getInfo, {}, res => {
-                    if (res.code == "ok") {
-                        this.allCompanies = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                });
-            },
-
-            //分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getUsers();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getUsers();
-            },
-
-			//获取用户列表
-			getUsers() {
-				this.listLoading = true;
-                this.http.post(this.port.project.userList, {
-                    keyName: this.filters.keyName,
-                    currentPage: this.page,
-                    pageSize: this.size,
-                    companyId: this.filters.companyId==''?-1:this.filters.companyId,
-                    flag: this.filters.flag=='姓名'?0:this.filters.flag
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.list = res.data.list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-            
-            //显示新增界面
-			handleAdd() {
-                this.addFormVisible = true;
-				this.addForm = {
-                    parentId: this.user.id,
-					username: '',
-                    account: '',
-                    mobile: '',
-                    projectIds: '',
-					companyId: '',
-                    roleName: '',
-                    flag: 0
-				};
-            },
-
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-						this.addLoading = true;
-                        this.http.post(this.port.project.addUser, this.addForm , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getUsers();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-			},
-
-			//删除
-			handleDel(index, row) {
-                this.$confirm('确认删除该人员吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.project.delUser, {
-                        id: row.id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getUsers();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-            
-			//显示编辑界面
-			handleEdit(index, row) {
-                this.editFormVisible = true;
-				this.editForm = {
-                    id: row.id,
-                    parentId: this.user.id,
-					username: row.username,
-                    account: row.account,
-					companyId: row.companyName,
-                    roleName: row.roleName,
-                    flag: 1
-                };
-            },
-            
-			//编辑
-			editSubmit() {
-				this.$refs.editForm.validate((valid) => {
-					if (valid) {
-                        this.editLoading = true;
-                        this.http.post(this.port.project.addUser, {
-                            id: this.editForm.id,
-                            parentId: this.editForm.parentId,
-                            username: this.editForm.username,
-                            roleName: this.editForm.roleName,
-                            flag: 1
-                        } , res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: '修改成功',
-                                    type: 'success'
-                                });
-                                this.getUsers();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-            
-            //修改
-            choseProject() {
-                if(this.addForm.projectIds == ""){
-                    this.company = [];
-                    this.addForm.companyId = null;
-                }else{
-                    this.http.post(this.port.base.getProduceCompany, {
-                        projectId: this.addForm.projectIds
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.company = res.data;
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-                }
-            },
-
-            //邀请
-            invite(index, row) {
-                this.http.post(this.port.project.inviteUser, {
-                    inviteeId: row.id,
-                    projectId: row.projects[0].id,
-                    operatorId: this.user.id
-                } , res => {
-                    if (res.code == "ok") {
-                        this.inviteVisible = true;
-                        this.inviteLink = res.data.addressUrl;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //复制链接
-            copyLink() {
-                //this.inviteVisible = false;
-                this.$message({
-                    message: "复制成功!",
-                    type: 'success'
-                });
-            },
-
-            onError(e) {
-                //this.inviteVisible = false;
-                this.$message({
-                    message: "复制失败!",
-                    type: 'error'
-                });
-            }
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-		mounted() {
-            this.getMsg();
-			this.getUsers();
-        }
-	}
-</script>
-
-<style scoped>
-    .el-input-group__append button.el-button {
-        background-color: #409EFF;
-        border-color: #409EFF;
-        color: #fff;
-    }
-</style>

+ 0 - 547
lss_vue/src/views/user/user.vue

@@ -1,547 +0,0 @@
-<template>
-	<section>
-		<!--工具条-->
-		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-			<el-form :inline="true" :model="filters">
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
-                            <el-option v-for="item in allCompanies" :key="item.id" :label="item.companyName" :value="item.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="3">
-                    <el-form-item>
-                        <el-select v-model="filters.flag" placeholder="请选择查询条件">
-                            <el-option label="姓名" value="0"></el-option>
-                            <el-option label="手机号" value="1"></el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-form-item>
-                    <el-input v-model="filters.keyName" clearable placeholder="请输入姓名或手机号进行搜索" style="width:250px;"></el-input>
-                </el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="getUsers">查询</el-button>
-				</el-form-item>
-				<el-form-item style="float:right;" v-if="user.subordinateType == 0 || user.isManager == 1">
-					<el-button type="primary" @click="handleAdd">新增</el-button>
-				</el-form-item>
-			</el-form>
-		</el-col>
-
-		<!--列表-->
-		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
-			<el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="username" label="姓名" width="120" sortable></el-table-column>
-			<el-table-column prop="account" label="手机号" width="180" sortable></el-table-column>
-			<!-- <el-table-column prop="mobile" label="联系方式" width="150" sortable></el-table-column> -->
-            <el-table-column prop="projects" label="参与项目" sortable>
-                <template slot-scope="scope">
-                    <span class="info" v-for="(item, index) in scope.row.projects">
-                        {{item.projectName}}
-                        <span v-if="scope.row.projects != null && index != scope.row.projects.length-1">、</span>
-                    </span>
-                </template>
-			</el-table-column>
-            <el-table-column prop="roleName" label="备注" width="180" sortable></el-table-column>
-            <el-table-column prop="teamName" label="类型" width="120" align="center" sortable></el-table-column>
-			<el-table-column prop="companyName" label="所属公司" sortable></el-table-column>
-			<el-table-column label="操作" align="left" width="230">
-				<template slot-scope="scope" v-if="user.id == scope.row.parentId || user.isManager == 1 || (user.parentId == 1 && user.subordinateType == 0)">
-					<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
-					<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
-                    <el-button type="primary" size="small" @click="invite(scope.$index, scope.row)" v-if="user.id != 1 && scope.row.projects != null && scope.row.projects.length == 1">邀请</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-
-		<!--工具条-->
-		<el-col :span="24" class="toolbar">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next"
-                :total="total"
-                style="float:right;">
-            </el-pagination>
-		</el-col>
-
-        <!--新增界面-->
-		<el-dialog title="新增人员" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
-				<el-form-item label="姓名" prop="username">
-					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account">
-					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
-				</el-form-item>
-                <el-form-item v-if="!(user.parentId == 1 && user.subordinateType == 0)" label="参与项目" prop="projectIds">
-					<el-select v-model="addForm.projectIds" @change="choseProject" clearable filterable placeholder="请选择参与项目" style="width:202px">
-                        <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="公司" prop="companyId">
-					<el-select v-model="addForm.companyId" clearable filterable placeholder="请选择所属公司" style="width:202px">
-                        <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
-				</el-form-item>
-                <el-form-item label="备注">
-                    <el-input v-model="addForm.roleName" autocomplete="off" placeholder="请输入备注"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                <span style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="addFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-		<!--编辑界面-->
-		<el-dialog title="编辑人员" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="80px" :rules="formRules" ref="editForm" :inline="true" class="demo-form-inline">
-				<el-form-item label="姓名" prop="username">
-					<el-input v-model="editForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
-				</el-form-item>
-				<el-form-item label="手机号" prop="account">
-					<el-input v-model="editForm.account" disabled autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
-				</el-form-item>
-                <el-form-item label="公司" prop="companyId">
-                    <el-input v-model="editForm.companyId" disabled autocomplete="off" placeholder="请选择所属公司"></el-input>
-				</el-form-item>
-                <el-form-item label="备注">
-                    <el-input v-model="editForm.roleName" autocomplete="off" placeholder="请输入备注"></el-input>
-				</el-form-item>
-			</el-form>
-			<div slot="footer" class="dialog-footer">
-                 <span style="color:#f00;float:left;margin-left:60px;">初始密码:000000</span>
-				<el-button @click.native="editFormVisible = false">取消</el-button>
-				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
-			</div>
-		</el-dialog>
-
-        <!--邀请界面-->
-		<el-dialog title="邀请" v-if="inviteVisible" :visible.sync="inviteVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-input placeholder="请复制邀请链接" v-model="inviteLink" class="input-with-select">
-                <el-button slot="append" v-clipboard:copy="inviteLink" v-clipboard:success="copyLink" v-clipboard:error="onError" type="primary" icon="el-icon-share">复制链接</el-button>
-            </el-input>
-		</el-dialog>
-	</section>
-</template>
-
-<script>
-	import util from '../../common/js/util'
-
-	export default {
-		data() {
-            var checkPhone = (rule, value, callback) => {
-                if (!value) {
-                    return callback(new Error('请输入联系方式'));
-                } else {
-                    const reg = /^1[0-9]\d{9}$/
-                    if (reg.test(value)) {
-                        callback();
-                    } else {
-                        return callback(new Error('请输入正确的联系方式'));
-                    }
-                }
-            };
-			return {
-				filters: {
-                    keyName: '',
-                    roleName: '',
-                    flag: '姓名',
-                    companyId: ''
-                },
-                
-                user: JSON.parse(sessionStorage.getItem('user')),
-                company: [],
-                projects: [],
-                //搜索用 涉及到的所有公司
-                allCompanies: [],
-
-				list: [],
-				total: 0,
-                page: 1,
-                size: 20,
-                listLoading: false,
-                tableHeight: 0,
-
-                formRules: {
-                    username: [
-						{ required: true, message: '请输入姓名', trigger: 'blur' }
-                    ],
-                    account: [
-                        { required: true, validator: checkPhone, trigger: 'blur'}
-                    ],
-                    teamName: [
-						{ required: true, message: '请选择人员类型', trigger: ["blur",'change'] }
-                    ],
-                    projectIds: [
-						{ required: true, message: '请选择参与项目', trigger: ["blur",'change'] }
-					],
-                    companyId: [
-						{ required: true, message: '请选择所属公司', trigger: ["blur",'change'] }
-					]
-                },
-
-                //新增界面是否显示
-                addFormVisible: false,
-				addLoading: false,
-				//新增界面数据
-				addForm: {
-					username: '',
-                    account: '',
-                    projectIds: '',
-                    companyId: '',
-                    roleName: '',
-                    flag: 0
-				},
-
-                //编辑界面是否显示
-				editFormVisible: false,
-				editLoading: false,
-				//编辑界面数据
-				editForm: {
-					id: 0,
-					username: '',
-                    account: '',
-                    companyId: '',
-                    roleName: '',
-                    flag: 1
-                },
-                
-                //邀请
-                inviteVisible: false,
-                inviteLink: ''
-			}
-		},
-		methods: {
-            //获取基础数据
-            getMsg(){
-                if(this.user.parentId == 1 && this.user.subordinateType == 0) {
-                    this.company = [];
-                    this.allCompanies = [];
-                    this.http.post(this.port.base.getCompanyList, {
-                        id: this.user.id,
-                        parentId: this.user.parentId
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.company = res.data;
-                            this.allCompanies = res.data;
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-                } else if(this.user.parentId > 1 && this.user.isManager == 1) {
-                    this.http.post(this.port.project.projectByUser, {}, 
-                    res => {
-                        if (res.code == "ok") {
-                            this.projects = res.data;
-                            //再获取一下公司列表
-                            this.getAllCompanies();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    });
-                }
-            },  
-
-            //新版获取所有公司
-            getAllCompanies(){
-                this.allCompanies = [];
-                this.http.post(this.port.base.getInfo, {}, res => {
-                    if (res.code == "ok") {
-                        this.allCompanies = res.data;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                });
-            },
-
-            //分页
-			handleCurrentChange(val) {
-				this.page = val;
-				this.getUsers();
-            },
-
-            handleSizeChange(val) {
-                this.size = val;
-				this.getUsers();
-            },
-
-			//获取用户列表
-			getUsers() {
-				this.listLoading = true;
-                this.http.post(this.port.project.userList, {
-                    keyName: this.filters.keyName,
-                    currentPage: this.page,
-                    pageSize: this.size,
-                    companyId: this.filters.companyId==''?-1:this.filters.companyId,
-                    flag: this.filters.flag=='姓名'?0:this.filters.flag
-                }, res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        this.list = res.data.list;
-                        this.total = res.data.total;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-            
-            //显示新增界面
-			handleAdd() {
-                this.addFormVisible = true;
-				this.addForm = {
-                    parentId: this.user.id,
-					username: '',
-                    account: '',
-                    mobile: '',
-                    projectIds: '',
-					companyId: '',
-                    roleName: '',
-                    flag: 0
-				};
-            },
-
-            //新增
-			addSubmit() {
-				this.$refs.addForm.validate((valid) => {
-					if (valid) {
-						this.addLoading = true;
-                        this.http.post(this.port.project.addUser, this.addForm , res => {
-                            this.addLoading = false;
-                            if (res.code == "ok") {
-                                this.addFormVisible = false;
-                                this.$message({
-                                    message: '创建成功',
-                                    type: 'success'
-                                });
-                                this.getUsers();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.addLoading = false;
-                            this.addFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-			},
-
-			//删除
-			handleDel(index, row) {
-                this.$confirm('确认删除该人员吗?', '提示', {
-					type: 'warning'
-				}).then(() => {
-                    this.http.post(this.port.project.delUser, {
-                        id: row.id
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.$message({
-                                message: '删除成功',
-                                type: 'success'
-                            });
-                            this.getUsers();
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-				});
-            },
-            
-			//显示编辑界面
-			handleEdit(index, row) {
-                this.editFormVisible = true;
-				this.editForm = {
-                    id: row.id,
-                    parentId: this.user.id,
-					username: row.username,
-                    account: row.account,
-					companyId: row.companyName,
-                    roleName: row.roleName,
-                    flag: 1
-                };
-            },
-            
-			//编辑
-			editSubmit() {
-				this.$refs.editForm.validate((valid) => {
-					if (valid) {
-                        this.editLoading = true;
-                        this.http.post(this.port.project.addUser, {
-                            id: this.editForm.id,
-                            parentId: this.editForm.parentId,
-                            username: this.editForm.username,
-                            roleName: this.editForm.roleName,
-                            flag: 1
-                        } , res => {
-                            this.editLoading = false;
-                            if (res.code == "ok") {
-                                this.editFormVisible = false;
-                                this.$message({
-                                    message: '修改成功',
-                                    type: 'success'
-                                });
-                                this.getUsers();
-                            } else {
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                });
-                            }
-                        }, error => {
-                            this.editLoading = false;
-                            this.editFormVisible = false;
-                            this.$message({
-                                message: error,
-                                type: 'error'
-                            });
-                        })
-					}
-				});
-            },
-            
-            //修改
-            choseProject() {
-                if(this.addForm.projectIds == ""){
-                    this.company = [];
-                    this.addForm.companyId = null;
-                }else{
-                    this.http.post(this.port.base.getProduceCompany, {
-                        projectId: this.addForm.projectIds
-                    }, res => {
-                        if (res.code == "ok") {
-                            this.company = res.data;
-                        } else {
-                            this.$message({
-                                message: res.msg,
-                                type: 'error'
-                            });
-                        }
-                    }, error => {
-                        this.$message({
-                            message: error,
-                            type: 'error'
-                        });
-                    })
-                }
-            },
-
-            //邀请
-            invite(index, row) {
-                this.http.post(this.port.project.inviteUser, {
-                    inviteeId: row.id,
-                    projectId: row.projects[0].id,
-                    operatorId: this.user.id
-                } , res => {
-                    if (res.code == "ok") {
-                        this.inviteVisible = true;
-                        this.inviteLink = res.data.addressUrl;
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: 'error'
-                        });
-                    }
-                }, error => {
-                    this.$message({
-                        message: error,
-                        type: 'error'
-                    });
-                })
-            },
-
-            //复制链接
-            copyLink() {
-                //this.inviteVisible = false;
-                this.$message({
-                    message: "复制成功!",
-                    type: 'success'
-                });
-            },
-
-            onError(e) {
-                //this.inviteVisible = false;
-                this.$message({
-                    message: "复制失败!",
-                    type: 'error'
-                });
-            }
-        },
-        created() {
-            let height = window.innerHeight;
-            this.tableHeight = height - 210;
-            const that = this;
-            window.onresize = function temp() {
-                that.tableHeight = window.innerHeight - 210;    
-            };
-        },
-		mounted() {
-            this.getMsg();
-			this.getUsers();
-        }
-	}
-</script>
-
-<style scoped>
-    .el-input-group__append button.el-button {
-        background-color: #409EFF;
-        border-color: #409EFF;
-        color: #fff;
-    }
-</style>

+ 0 - 1
pcbms/pom.xml

@@ -156,7 +156,6 @@
             <artifactId>swagger-annotations</artifactId>
             <version>1.5.15</version>
         </dependency>
-
     </dependencies>
 
     <build>