seimin преди 3 години
родител
ревизия
43f464a2d2
променени са 100 файла, в които са добавени 12349 реда и са изтрити 4636 реда
  1. 1 20
      README.md
  2. 4 0
      build/webpack.base.conf.js
  3. 7 2
      build/webpack.prod.conf.js
  4. 12 17
      config/index.js
  5. 1 1
      index.html
  6. 1006 727
      package-lock.json
  7. 3 1
      package.json
  8. 118 20
      src/App.vue
  9. 1 1
      src/components/form/form.vue
  10. 0 42
      src/http/index.js
  11. 9 1
      src/main.js
  12. 5 0
      src/request/host.js
  13. 153 52
      src/router/index.js
  14. 1 0
      src/views/App.vue
  15. 618 0
      src/views/Inspection.vue
  16. 273 0
      src/views/InspectionDetail.vue
  17. 86 147
      src/views/Login.vue
  18. 7 3
      src/views/Main.vue
  19. 629 0
      src/views/againAssign.vue
  20. 567 0
      src/views/closed.vue
  21. 0 101
      src/views/commonProblem.vue
  22. 0 383
      src/views/evaluate.vue
  23. 545 0
      src/views/grabSheet.vue
  24. 342 54
      src/views/guide.vue
  25. 90 0
      src/views/guideDetail.vue
  26. 0 661
      src/views/incidentDetails.vue
  27. 468 363
      src/views/incidentList.vue
  28. 398 427
      src/views/indes.vue
  29. 281 0
      src/views/inspectionDoneDetail.vue
  30. 239 218
      src/views/knowDetails.vue
  31. 330 318
      src/views/knowList.vue
  32. 2 1
      src/views/loading.vue
  33. 0 74
      src/views/maintenance.vue
  34. 27 0
      src/views/mb.vue
  35. 82 203
      src/views/my.vue
  36. 0 116
      src/views/myModify.vue
  37. 1683 0
      src/views/newIncident.vue
  38. 1 1
      src/views/noticeDetails.vue
  39. 6 5
      src/views/noticeList.vue
  40. 592 0
      src/views/order.vue
  41. 1673 0
      src/views/processing.vue
  42. 264 0
      src/views/referenceDetail.vue
  43. 395 0
      src/views/referenceList.vue
  44. 0 670
      src/views/repair.vue
  45. 704 0
      src/views/solved.vue
  46. 509 0
      src/views/waitConfirm.vue
  47. 161 0
      static/css/demo_index.html
  48. 34 6
      static/css/iconfont.css
  49. BIN
      static/css/iconfont.eot
  50. 1 1
      static/css/iconfont.js
  51. 21 0
      static/css/iconfont.svg
  52. BIN
      static/css/iconfont.ttf
  53. BIN
      static/css/iconfont.woff
  54. BIN
      static/css/iconfont.woff2
  55. BIN
      static/images/NSH-PW.png
  56. BIN
      static/images/NSH-USER.png
  57. BIN
      static/images/africa-17344_640.jpg
  58. BIN
      static/images/avatar-1-big.jpg
  59. BIN
      static/images/avatar-1-small.jpg
  60. BIN
      static/images/avatar-1-xl.jpg
  61. BIN
      static/images/avatar-1.jpg
  62. BIN
      static/images/avatar-10.jpg
  63. BIN
      static/images/avatar-2-small.jpg
  64. BIN
      static/images/avatar-2.jpg
  65. BIN
      static/images/avatar-3-small.jpg
  66. BIN
      static/images/avatar-3.jpg
  67. BIN
      static/images/avatar-4-small.jpg
  68. BIN
      static/images/avatar-4.jpg
  69. BIN
      static/images/avatar-5-small.jpg
  70. BIN
      static/images/avatar-5.jpg
  71. BIN
      static/images/avatar-6.jpg
  72. BIN
      static/images/avatar-7.jpg
  73. BIN
      static/images/avatar-8.jpg
  74. BIN
      static/images/avatar-9.jpg
  75. BIN
      static/images/bg_01.png
  76. BIN
      static/images/city.jpg
  77. BIN
      static/images/drop-color.png
  78. BIN
      static/images/fj.gif
  79. BIN
      static/images/form-title.png
  80. BIN
      static/images/genganzhonghe.png
  81. BIN
      static/images/gengban.png
  82. BIN
      static/images/gengbanputong.png
  83. BIN
      static/images/headimage.png
  84. BIN
      static/images/huake-32x32.png
  85. BIN
      static/images/lion-403764_640.jpg
  86. BIN
      static/images/lion-565818_640.jpg
  87. BIN
      static/images/lion-565820_640.jpg
  88. BIN
      static/images/login2.png
  89. BIN
      static/images/logo2.png
  90. BIN
      static/images/m10.png
  91. BIN
      static/images/m11.png
  92. BIN
      static/images/m21.png
  93. BIN
      static/images/m22.png
  94. BIN
      static/images/m3.png
  95. BIN
      static/images/m7.png
  96. BIN
      static/images/page-title-prefix.png
  97. BIN
      static/images/photodune-4043508-3d-modern-office-room-l.jpg
  98. BIN
      static/images/pig.jpg
  99. BIN
      static/images/water/texture-bg.png
  100. 0 0
      static/images/water/texture-fg.png

+ 1 - 20
README.md

@@ -1,21 +1,2 @@
1
-# jry
1
+# ITSM3-handle-wechat
2 2
 
3
-> jryVue
4
-
5
-## Build Setup
6
-
7
-``` bash
8
-# install dependencies
9
-npm install
10
-
11
-# serve with hot reload at localhost:8080
12
-npm run dev
13
-
14
-# build for production with minification
15
-npm run build
16
-
17
-# build for production and view the bundle analyzer report
18
-npm run build --report
19
-```
20
-
21
-For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

+ 4 - 0
build/webpack.base.conf.js

@@ -64,6 +64,10 @@ module.exports = {
64 64
           limit: 90000,
65 65
           name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
66 66
         }
67
+      },
68
+      {
69
+        test: /\.less$/,
70
+        loader: "style-loader!css-loader!less-loader"
67 71
       }
68 72
     ]
69 73
   },

+ 7 - 2
build/webpack.prod.conf.js

@@ -35,7 +35,10 @@ const webpackConfig = merge(baseWebpackConfig, {
35 35
     new UglifyJsPlugin({
36 36
       uglifyOptions: {
37 37
         compress: {
38
-          warnings: false
38
+          warnings: false,
39
+            // 以下两行配置,关闭 debug 和 console
40
+          drop_debugger: true,
41
+          drop_console: true
39 42
         }
40 43
       },
41 44
       sourceMap: config.build.productionSourceMap,
@@ -124,7 +127,9 @@ if (config.build.productionGzip) {
124 127
 
125 128
   webpackConfig.plugins.push(
126 129
     new CompressionWebpackPlugin({
127
-      asset: '[path].gz[query]',
130
+     asset: '[path].gz[query]',// 原配置报错:ValidationError: Compression Plugin Invalid Options
131
+    //  filename: '[path].gz[query]', // 将asset 修改为 filename 后又报错:TypeError: Cannot read property 'emit' of undefined,执行以下操作:npm install --save-dev compression-webpack-plugin@1.1.12
132
+     
128 133
       algorithm: 'gzip',
129 134
       test: new RegExp(
130 135
         '\\.(' +

+ 12 - 17
config/index.js

@@ -3,7 +3,7 @@
3 3
 // see http://vuejs-templates.github.io/webpack for documentation.
4 4
 
5 5
 const path = require('path')
6
-
6
+const host=require('../src/request/host')
7 7
 module.exports = {
8 8
   dev: {
9 9
     // 新加的一行
@@ -12,27 +12,22 @@ module.exports = {
12 12
     assetsSubDirectory: 'static',
13 13
     assetsPublicPath: '/',
14 14
     proxyTable: {
15
-      // '/service': {//自定义名字,代表的是以下target中的内容
16
-      //   target: 'http://192.168.3.100:8080/service/',//微信
17
-      //   // target: 'http://weixintest5.ngser.dashitech.com/service/',//微信
18
-      //   // target: 'http://localhost:8080/service/',//微信
19
-      //   // target: 'http://192.168.199.165:8080/service/',//黄伟
20
-      //   // target: 'http://192.168.3.100:8080/service/',//100
21
-      //   changeOrigin: true,//是否允许跨域
22
-      //   pathRewrite: {
23
-      //     '^/service': ''
24
-      //   }
25
-      // }
15
+      '/service': {//自定义名字,代表的是以下target中的内容
16
+        target: host.host+'/service/',//微信
17
+        changeOrigin: false,//是否允许跨域
18
+        pathRewrite: {
19
+          '^/service': ''
20
+        }
21
+      }
26 22
     },
27 23
 
28 24
     // Various Dev Server settings
29 25
     host: 'localhost', // can be overwritten by process.env.HOST
30
-    // host: '127.0.0.1', // can be overwritten by process.env.HOST
31
-    // host: '192.168.199.177', // can be overwritten by process.env.HOST
26
+    // host: '192.168.3.170', // can be overwritten by process.env.HOST
32 27
     // host: '192.168.31.32', // can be overwritten by process.env.HOST
33 28
     // host: '192.168.31.32', // can be overwritten by process.env.HOST
34 29
     // host: '0.0.0.0', // can be overwritten by process.env.HOST
35
-    port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
30
+    port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
36 31
     // 住了的4行
37 32
     autoOpenBrowser: true,
38 33
     // errorOverlay: true,
@@ -70,7 +65,7 @@ module.exports = {
70 65
      * Source Maps
71 66
      */
72 67
 
73
-    productionSourceMap: true,
68
+    productionSourceMap: false,// 把该项的配置修改为 false,关闭 source map
74 69
     // https://webpack.js.org/configuration/devtool/#production
75 70
     devtool: '#source-map',
76 71
 
@@ -78,7 +73,7 @@ module.exports = {
78 73
     // Surge or Netlify already gzip all static assets for you.
79 74
     // Before setting to `true`, make sure to:
80 75
     // npm install --save-dev compression-webpack-plugin
81
-    productionGzip: false,
76
+    productionGzip: true,// 开启 gzip 功能, 开启 GZIP 压缩,进一步压缩 js 和 css 文件的体积
82 77
     productionGzipExtensions: ['js', 'css'],
83 78
 
84 79
     // Run the build command with an extra argument to

+ 1 - 1
index.html

@@ -8,7 +8,7 @@
8 8
         content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover">
9 9
     <!-- <meta name="viewport" content="width=device-width,intial-scale=1,user-
10 10
         scalable=no"> -->
11
-    <title>微信报修</title>
11
+    <title>微信运维</title> 
12 12
     <style>
13 13
       html{
14 14
         background-color: white;

Файловите разлики са ограничени, защото са твърде много
+ 1006 - 727
package-lock.json


+ 3 - 1
package.json

@@ -12,7 +12,8 @@
12 12
   "dependencies": {
13 13
     "axios": "^0.18.0",
14 14
     "cube-ui": "^1.12.10",
15
-    "js-base64": "^3.6.1",
15
+    "less": "^3.9.0",
16
+    "less-loader": "^4.1.0",
16 17
     "lib-flexible": "^0.3.2",
17 18
     "vue": "^2.5.2",
18 19
     "vue-axios": "^2.1.4",
@@ -33,6 +34,7 @@
33 34
     "babel-preset-env": "^1.3.2",
34 35
     "babel-preset-stage-2": "^6.22.0",
35 36
     "chalk": "^2.0.1",
37
+    "compression-webpack-plugin": "^1.1.12",
36 38
     "copy-webpack-plugin": "^4.0.1",
37 39
     "css-loader": "^0.28.0",
38 40
     "extract-text-webpack-plugin": "^3.0.0",

+ 118 - 20
src/App.vue

@@ -1,30 +1,128 @@
1 1
 <template>
2
-	<div id="app">
3
-		<router-view></router-view>
4
-	</div>
2
+  <div id="app">
3
+    <router-view></router-view>
4
+  </div>
5 5
 </template>
6 6
 
7 7
 <script>
8 8
 export default {
9
-	name: 'app',
10
-	components: {
11
-		
12
-	},
13
-	methods:{
9
+  name: "app",
10
+  components: {},
11
+  methods: {}
12
+};
13
+</script>
14 14
 
15
-	},
15
+<style lang='less'>
16
+* {
17
+  font-family: "微软雅黑";
18
+}
19
+.fl {
20
+  float: left;
21
+}
22
+.fr {
23
+  float: right;
24
+}
25
+.overflowEllipsis2 {
26
+  overflow: hidden;
27
+  text-overflow: ellipsis;
28
+  display: -webkit-box;
29
+  -webkit-line-clamp: 2;
30
+  -webkit-box-orient: vertical !important;
31
+  text-overflow: -o-ellipsis-lastline;
32
+}
33
+.btn {
34
+  display: inline-block;
35
+  height: 0.36rem;
36
+  line-height: 0.36rem;
37
+  font-size: 0.24rem;
38
+  text-align: center;
39
+  border-radius: 0.3rem;
40
+  border-width: 0.01rem;
41
+  border-style: solid;
42
+  padding: 0 0.16rem;
43
+  &.daipingjia {
44
+    border-color: #e0872c;
45
+    color: #e0872c;
46
+    background: #fbf3e9;
47
+  }
48
+  &.daiqiangdan {
49
+    border-color: #991f00;
50
+    color: #991f00;
51
+    background: #f4e8e5;
52
+  }
53
+  &.yiguanbi {
54
+    border-color: #333;
55
+    color: #333;
56
+    background: #eee;
57
+  }
58
+  &.daishenhe {
59
+    border-color: #825b00;
60
+    color: #825b00;
61
+    background: #f2eee5;
62
+  }
63
+  &.chulizhong {
64
+    border-color: #003057;
65
+    color: #003057;
66
+    background: #e5eaee;
67
+  }
68
+  &.yijiejue {
69
+    border-color: #40a19c;
70
+    color: #40a19c;
71
+    background: #ebf5f5;
72
+  }
73
+  &.chongxinzhipai {
74
+    border-color: #48a843;
75
+    color: #48a843;
76
+    background: #ecf6ec;
77
+  }
78
+  &.daijiedan {
79
+    border-color: #c2654e;
80
+    color: #c2654e;
81
+    background: #faf4f2;
82
+  }
83
+  &.zhixingzhong {
84
+    border-color: #005395;
85
+    color: #005395;
86
+    background: #e5edf4;
87
+  }
88
+  &.yiwancheng {
89
+    border-color: #056b00;
90
+    color: #056b00;
91
+    background: #e6f0e5;
92
+  }
16 93
 }
17 94
 
18
-</script>
19
-
20
-<style>
21
-*{
22
-	font-family: "微软雅黑"
95
+// 巡检详情按钮
96
+.inspedtionDetail {
97
+  .cube-switch-ui::before {
98
+    border-color: #ccc !important;
99
+    background-color: green !important;
100
+  }
101
+  .abnormal {
102
+    .cube-switch-ui{
103
+      border-color: #ccc !important;
104
+      background-color: red !important;
105
+    }
106
+  }
23 107
 }
24
-.noDataFont{
25
-	height: .5rem;
26
-	line-height: .5rem;
27
-	color: #666666;
28
-	text-align: center
108
+// 新建事件按钮
109
+.newIncident {
110
+  .cube-btn.cube-btn_active,
111
+  .cube-btn:active {
112
+    background-color: #fff !important;
113
+  }
114
+}
115
+
116
+// font-color 字体颜色
117
+i.iconfont {
118
+  &.icon-yiyuqi {
119
+    color: #991f00;
120
+  }
121
+  &.icon-jijiang {
122
+    color: #a37200;
123
+  }
124
+  &.icon-zhengchang {
125
+    color: #056a00;
126
+  }
29 127
 }
30
-</style>
128
+</style>

+ 1 - 1
src/components/form/form.vue

@@ -342,7 +342,7 @@
342 342
           -webkit-text-stroke-width: 0.2px
343 343
           -moz-osx-font-smoothing: grayscale
344 344
     .cube-form-label
345
-      width: 100px
345
+      width: 125px
346 346
       padding-right: 10px
347 347
     .cube-checkbox-group, .cube-radio-group
348 348
       &::before, &::after

+ 0 - 42
src/http/index.js

@@ -1,42 +0,0 @@
1
-import axios from 'axios'
2
-import Vue from 'vue'
3
-let domainName = document.domain;//域名
4
-let protocolName = document.location.protocol;//http协议
5
-// axios.defaults.baseURL='http://localhost';
6
-// axios.defaults.timeout = 5000;
7
-axios.defaults.baseURL = protocolName + '//' + domainName;
8
-// axios.defaults.baseURL='http://itil.hnu.edu.cn';
9
-// axios.defaults.baseURL='http://itsmpoc.dashitech.com';
10
-Vue.prototype.$http = axios
11
-Vue.prototype.$host = protocolName + '//' + domainName
12
-//http response 拦截器
13
-axios.interceptors.response.use(
14
-  response => {
15
-    return response;
16
-  },
17
-  async (error) => {
18
-    let err = error.response;
19
-    console.log(err);
20
-    if (404 === error.response.status && err.request.responseURL.includes('index.html')) {
21
-      let res1 = await getLoginType();
22
-      let loginConfig = localStorage.getItem('loginConfig');
23
-      if (res1.status == 200 && res1.data.status == 200 && res1.data.data == 'web' && loginConfig) {
24
-        let { username, password } = JSON.parse(loginConfig);
25
-        let res2 = await zlogin({ username, password });
26
-        if (res2.status == 200 && res2.data.state == 200) {
27
-          location.reload();
28
-        }
29
-      }
30
-    } else {
31
-      return Promise.reject(error);
32
-    }
33
-  }
34
-);
35
-// 获取报修人登录方式
36
-function getLoginType() {
37
-  return axios.post("service/wechat/getLoginType", {});
38
-}
39
-// 账号密码登录
40
-function zlogin(obj) {
41
-  return axios.post("service/auth/reqlogin", obj);
42
-}

+ 9 - 1
src/main.js

@@ -3,13 +3,21 @@
3 3
 import Vue from 'vue'
4 4
 import App from './App'
5 5
 import router from './router'
6
+import axios from 'axios'
6 7
 import Cube from './index'
7 8
 import 'lib-flexible'
9
+// import host from '../src/request/host'
8 10
 // import {get,post} from './service/http'
9
-import './http'
10 11
 Vue.use(Cube)
12
+// 修改请求接口(删掉地址栏中的app2)
13
+let domainName = document.domain;//域名
14
+let protocolName = document.location.protocol;//http协议
15
+axios.defaults.baseURL=protocolName + '//' + domainName;
11 16
 
17
+// axios.defaults.timeout = 5000;
18
+Vue.prototype.$http= axios
12 19
 Vue.config.productionTip = false
20
+Vue.prototype.$host = protocolName + '//' + domainName;
13 21
 
14 22
 /* eslint-disable no-new */
15 23
 new Vue({

+ 5 - 0
src/request/host.js

@@ -0,0 +1,5 @@
1
+// let domainName = document.domain;//域名
2
+// let protocolName = document.location.protocol;//http协议
3
+// module.exports = {
4
+//   host: protocolName + '//' + domainName
5
+// }

+ 153 - 52
src/router/index.js

@@ -3,24 +3,31 @@ import Router from 'vue-router'
3 3
 import Login from './../views/Login.vue'
4 4
 import Main from './../views/Main.vue'
5 5
 import Indes from './../views/indes.vue'//首页
6
-import Repair from './../views/repair.vue'//我的报修
7
-import My from './../views/my.vue'//设置
6
+import My from './../views/my.vue'//我的
8 7
 import IncidentList from './../views/incidentList.vue'//事件列表
9
-import MyModify from './../views/myModify.vue'//个人信息修改
8
+import NewIncident from './../views/newIncident.vue'//新建事件
9
+import Inspection from './../views/inspection.vue'//巡检列表
10
+import InspectionDetail from './../views/inspectionDetail.vue'//巡检详情
11
+import InspectionDoneDetail from './../views/inspectionDoneDetail.vue'//已完成巡检详情
10 12
 import NoticeDetails from './../views/noticeDetails.vue'//公告详情
11 13
 import NoticeList from './../views/noticeList.vue'//公告列表
12
-import KnowList from './../views/knowList.vue'//知识库列表
13
-import KnowDetails from './../views/knowDetails.vue'//知识库详情
14
-import Guide from './../views/guide.vue'//服务指南
15
-import IncidentDetails from './../views/incidentDetails.vue'//事件详情
16
-import CommonProblem from './../views/commonProblem.vue'//常见问题
17
-import Maintenance from './../views/maintenance.vue'//维修范围
18
-import Evaluate from './../views/evaluate.vue'//评价页面
14
+import KnowList from './../views/knowList.vue'//知识库列表(点赞)
15
+import KnowDetails from './../views/knowDetails.vue'//知识库详情(点赞)
16
+import ReferenceList from './../views/referenceList.vue'//知识库列表(引用)
17
+import ReferenceDetail from './../views/referenceDetail.vue'//知识库详情(引用)
18
+import Guide from './../views/guide.vue'//公告公示
19
+import GuideDetail from './../views/guideDetail.vue'//常见问题
20
+import Order from './../views/order.vue' //接单页面
21
+import GrabSheet from './../views/grabSheet.vue' //抢单页面
22
+import AgainAssign from './../views/againAssign.vue' //重新指派页面
23
+import Processing from './../views/processing.vue' //处理中页面
24
+import Solved from './../views/solved.vue' //已解决页面
25
+import Closed from './../views/closed.vue' //已关闭页面
26
+import WaitConfirm from './../views/waitConfirm.vue' //待审核页面
19 27
 Vue.use(Router)
20 28
 
21 29
 export default new Router({
22
-  routes: [
23
-    {
30
+  routes: [{
24 31
       path: '/login',
25 32
       component: Login,
26 33
       name: '',
@@ -31,93 +38,187 @@ export default new Router({
31 38
       component: Main,
32 39
       name: '',
33 40
       hidden: true,
34
-      children: [
35
-        { path: '/', redirect: '/main/indes' },
41
+      children: [{
42
+          path: '/',
43
+          redirect: '/main/indes'
44
+        },
36 45
         {
37 46
           path: '/main/indes',
38 47
           component: Indes,
39
-          meta: { allowBack: false },
48
+          meta: {
49
+            allowBack: false
50
+          },
40 51
         },
41 52
         {
42 53
           path: '/main/incidentList',
43
-          name:'IncidentList',
54
+          name: 'IncidentList',
44 55
           component: IncidentList,
45
-          meta: { allowBack: false },
56
+          meta: {
57
+            allowBack: false
58
+          },
59
+          children: []
60
+        },
61
+        {
62
+          path: '/main/inspection',
63
+          name: 'Inspection',
64
+          component: Inspection,
65
+          meta: {
66
+            allowBack: false
67
+          },
68
+        },
69
+        {
70
+          path: '/main/inspectionDoneDetail',
71
+          name: 'InspectionDoneDetail',
72
+          component: InspectionDoneDetail,
73
+          meta: {
74
+            allowBack: false
75
+          },
76
+        },
77
+        {
78
+          path: '/main/inspectionDetail',
79
+          name: 'InspectionDetail',
80
+          component: InspectionDetail,
81
+          meta: {
82
+            allowBack: false
83
+          },
46 84
         },
47 85
         {
48 86
           path: '/main/my',
49 87
           component: My,
50
-          meta: { allowBack: false },
88
+          meta: {
89
+            allowBack: false
90
+          },
51 91
         },
52 92
       ]
53 93
     },
54 94
     {
55
-      path: '/repair',
56
-      component: Repair,
57
-      meta: { allowBack: false },
95
+      path: '/order',
96
+      name: 'Order',
97
+      component: Order,
98
+      meta: {
99
+        allowBack: false
100
+      },
101
+    }, {
102
+      path: '/grabSheet',
103
+      name: 'GrabSheet',
104
+      component: GrabSheet,
105
+      meta: {
106
+        allowBack: false
107
+      },
58 108
     },
59 109
     {
60
-      path: '/myModify/:data',
61
-      name:'MyModify',
62
-      component: MyModify,
63
-      meta: { allowBack: false },
110
+      path: '/againAssign',
111
+      name: 'AgainAssign',
112
+      component: AgainAssign,
113
+      meta: {
114
+        allowBack: false
115
+      },
116
+    },
117
+    {
118
+      path: '/processing',
119
+      name: 'Processing',
120
+      component: Processing,
121
+      meta: {
122
+        allowBack: false
123
+      },
124
+    },
125
+    {
126
+      path: '/solved',
127
+      name: 'Solved',
128
+      component: Solved,
129
+      meta: {
130
+        allowBack: false
131
+      },
132
+    },
133
+    {
134
+      path: '/closed',
135
+      name: 'Closed',
136
+      component: Closed,
137
+      meta: {
138
+        allowBack: false
139
+      },
140
+    },
141
+    {
142
+      path: '/waitConfirm',
143
+      name: 'WaitConfirm',
144
+      component: WaitConfirm,
145
+      meta: {
146
+        allowBack: false
147
+      },
148
+    },
149
+    {
150
+      path: '/newIncident',
151
+      name: 'NewIncident',
152
+      component: NewIncident,
153
+      meta: {
154
+        allowBack: false
155
+      },
64 156
     },
65 157
     {
66 158
       path: '/noticeDetails/:data',
67
-      name:'NoticeDetails',
159
+      name: 'NoticeDetails',
68 160
       component: NoticeDetails,
69
-      meta: { allowBack: false },
161
+      meta: {
162
+        allowBack: false
163
+      },
70 164
     },
71 165
     {
72 166
       path: '/noticeList',
73 167
       component: NoticeList,
74
-      meta: { allowBack: false },
168
+      meta: {
169
+        allowBack: false
170
+      },
75 171
     },
76 172
     {
77 173
       path: '/knowList',
78
-      name:'KnowList',
174
+      name: 'KnowList',
79 175
       component: KnowList,
80
-      meta: { allowBack: false },
176
+      meta: {
177
+        allowBack: false
178
+      },
81 179
     },
82 180
     {
83 181
       path: '/knowDetails/:data',
84
-      name:'KnowDetails',
182
+      name: 'KnowDetails',
85 183
       component: KnowDetails,
86
-      meta: { allowBack: false },
87
-    },
88
-    {
89
-      path: '/guide',
90
-      component: Guide,
91
-      meta: { allowBack: false },
184
+      meta: {
185
+        allowBack: false
186
+      },
92 187
     },
93 188
     {
94
-      path: '/incidentDetails/:data',
95
-      name:'IncidentDetails',
96
-      component: IncidentDetails,
189
+      path: '/referenceList',
190
+      name: 'ReferenceList',
191
+      component: ReferenceList,
97 192
       meta: { allowBack: false },
98 193
     },
99 194
     {
100
-      path: '/commonProblem/:data',
101
-      name:'CommonProblem',
102
-      component: CommonProblem,
195
+      path: '/referenceDetail/:data',
196
+      name: 'ReferenceDetail',
197
+      component: ReferenceDetail,
103 198
       meta: { allowBack: false },
104 199
     },
200
+    
105 201
     {
106
-      path: '/evaluate/:data',
107
-      component: Evaluate,
108
-      name:'Evaluate',
109
-      meta: { allowBack: false },
202
+      path: '/guide',
203
+      component: Guide,
204
+      meta: {
205
+        allowBack: false
206
+      },
110 207
     },
111 208
     {
112
-      path: '/maintenance',
113
-      name:'Maintenance',
114
-      component: Maintenance,
115
-      meta: { allowBack: false },
209
+      path: '/guideDetail',
210
+      name:'GuideDetail',
211
+      component: GuideDetail,
212
+      meta: {
213
+        allowBack: false
214
+      },
116 215
     },
117 216
     {
118 217
       path: '*',
119 218
       hidden: true,
120
-      redirect: { path: '/login' }
219
+      redirect: {
220
+        path: '/login'
221
+      }
121 222
     }
122 223
   ]
123 224
 })

+ 1 - 0
src/views/App.vue

@@ -22,4 +22,5 @@ export default {
22 22
 .bgColor{
23 23
       background-color: white
24 24
   }
25
+  
25 26
 </style>

+ 618 - 0
src/views/Inspection.vue

@@ -0,0 +1,618 @@
1
+<template>
2
+  <div class="bgColor">
3
+    <div slot="content" class="scroll-wrapper">
4
+      <div class="demo">
5
+        <div class="header">巡检列表</div>
6
+        <div class="seatchHeader">
7
+          <div class="search fl">
8
+            <input
9
+              class="searchInp"
10
+              type="text"
11
+              v-model="title"
12
+              placeholder="搜索"
13
+              @input="searchData()"
14
+            >
15
+          </div>
16
+          <button class="selectBtn fr" @click="showPicker">筛选</button>
17
+        </div>
18
+        <div class="scroll-list-wrap">
19
+          <cube-scroll
20
+            ref="scroll"
21
+            :data="items"
22
+            :options="options"
23
+            @pulling-down="onPullingDown"
24
+            @pulling-up="onPullingUp"
25
+          >
26
+            <!-- <cube-select
27
+              class="fr"
28
+              v-model="stateValue"
29
+              :options="stateData"
30
+              @change="stateChange()"
31
+            ></cube-select>-->
32
+            <div class="conentBox">
33
+              <div class="conent" v-for="item in items" @click="toDetail(item)">
34
+                <div class="head">
35
+                  <p>
36
+                    <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
37
+                    巡检单号:{{item.sign}}
38
+                    <span
39
+                      :class="{'btn':true, 'zhixingzhong':item.state==0,'yiwancheng':item.state==1}"
40
+                    >{{item.stateName}}</span>
41
+                  </p>
42
+                </div>
43
+                <div class="center">
44
+                  <p>
45
+                    <span class="fl">巡检主题:</span>
46
+                    <span class="grayFont overflowEllipsis2">{{item.inspection.title}}</span>
47
+                  </p>
48
+                </div>
49
+                <div class="bottom">
50
+                  <i
51
+                    :class="{'iconfont':true ,'icon-yiyuqi':item.overdueType==0 ,'icon-zhengchang':item.overdueType==1,'icon-jijiang':item.overdueType==2,'newPapir':true}"
52
+                  ></i>
53
+                  <span>逾期时间:{{item.overdueTime}}</span>
54
+                </div>
55
+              </div>
56
+              <div class="wushuju" v-show="wushuju">
57
+                <img src="./../../static/images/wushuju.svg" alt>
58
+                <p>暂无巡检</p>
59
+              </div>
60
+            </div>
61
+            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
62
+              <div
63
+                v-if="props.pullDownRefresh"
64
+                class="cube-pulldown-wrapper"
65
+                :style="props.pullDownStyle"
66
+              >
67
+                <div
68
+                  v-show="props.beforePullDown"
69
+                  class="before-trigger"
70
+                  :style="{paddingTop: props.bubbleY + 'px'}"
71
+                >
72
+                  <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 40}">↓</span>
73
+                </div>
74
+                <div class="after-trigger" v-show="!props.beforePullDown">
75
+                  <div v-show="props.isPullingDown" class="loading">
76
+                    <cube-loading></cube-loading>
77
+                  </div>
78
+                  <div v-show="!props.isPullingDown" class="text">
79
+                    <span class="refresh-text">更新成功</span>
80
+                  </div>
81
+                </div>
82
+              </div>
83
+            </template>
84
+          </cube-scroll>
85
+        </div>
86
+      </div>
87
+    </div>
88
+    <load-ing v-if="!items.length&&!wushuju"></load-ing>
89
+  </div>
90
+</template>
91
+<script>
92
+import Vue from "vue";
93
+import CubePage from "../components/cube-page.vue";
94
+import SwitchOption from "../components/switch-option";
95
+import InputOption from "../components/input-option";
96
+import SelectOption from "../components/select-option";
97
+import { formatDate } from "./../components/js/date.js";
98
+import LoadIng from "./../views/loading.vue";
99
+export default {
100
+  data() {
101
+    return {
102
+      //   items: _foods,
103
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
104
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
105
+      items: [],
106
+      pullDownRefresh: true,
107
+      pullDownRefreshThreshold: 60,
108
+      pullDownRefreshStop: 40,
109
+      pullDownRefreshTxt: "Refresh success",
110
+      pullUpLoad: true,
111
+      pullUpLoadThreshold: 0,
112
+      pullUpLoadMoreTxt: "加载更多",
113
+      pullUpLoadNoMoreTxt: "没有更多数据",
114
+      customPullDown: true,
115
+      wushuju: false,
116
+      title: "", //搜索内容
117
+      stateData: [
118
+        {
119
+          text: "全部",
120
+          value: "all"
121
+        },
122
+        {
123
+          text: "待处理",
124
+          value: "todo"
125
+        },
126
+        {
127
+          text: "处理过",
128
+          value: "done"
129
+        }
130
+      ],
131
+      stateValue: "all",
132
+      sum: 10,
133
+      idx: 0,
134
+      stateClass: "",
135
+      loadShow: true,
136
+      searching:false,
137
+    };
138
+  },
139
+  components: {
140
+    CubePage,
141
+    SwitchOption,
142
+    InputOption,
143
+    SelectOption,
144
+    LoadIng
145
+  },
146
+  computed: {
147
+    options() {
148
+      return {
149
+        pullDownRefresh: this.pullDownRefreshObj,
150
+        pullUpLoad: this.pullUpLoadObj,
151
+        scrollbar: true
152
+      };
153
+    },
154
+    pullDownRefreshObj: function() {
155
+      return this.pullDownRefresh
156
+        ? {
157
+            threshold: parseInt(this.pullDownRefreshThreshold),
158
+            txt: this.pullDownRefreshTxt
159
+          }
160
+        : false;
161
+    },
162
+    pullUpLoadObj: function() {
163
+      return this.pullUpLoad
164
+        ? {
165
+            threshold: parseInt(this.pullUpLoadThreshold),
166
+            txt: {
167
+              more: this.pullUpLoadMoreTxt,
168
+              noMore: this.pullUpLoadNoMoreTxt
169
+            }
170
+          }
171
+        : false;
172
+    }
173
+  },
174
+  methods: {
175
+    // 查看详情
176
+    toDetail(item) {
177
+      console.log(item);
178
+      // return;2020年4月27日23:44:23
179
+      var bxr = JSON.parse(localStorage.getItem("login_requester"));//bababa
180
+      item.processUser.name = bxr.name;
181
+      item.processUser.phone = bxr.mphone;
182
+
183
+      if (item.state == 1) {
184
+        this.$router.push({
185
+          name: "InspectionDoneDetail",
186
+          params: {
187
+            data: item
188
+          }
189
+        });
190
+      } else {
191
+        this.$router.push({
192
+          name: "InspectionDetail",
193
+          params: {
194
+            data: item
195
+          }
196
+        });
197
+      }
198
+      window.localStorage.setItem("insDetailInfo", JSON.stringify(item));
199
+    },
200
+    getParamsState() {
201
+      if (this.$route.params.state) {
202
+        console.log(this.$route.params.state);
203
+        this.stateValue = this.$route.params.state;
204
+      }
205
+    },
206
+    showPicker() {
207
+      if (!this.picker) {
208
+        this.picker = this.$createPicker({
209
+          title: "",
210
+          data: [this.stateData],
211
+          selectedIndex: this.$route.params.state ? [1] : [0],
212
+          onSelect: this.selectHandle,
213
+          onCancel: this.cancelHandle
214
+        });
215
+      }
216
+      this.picker.show();
217
+    },
218
+    selectHandle(selectedVal, selectedIndex, selectedText) {
219
+      console.log(selectedVal, selectedIndex, selectedText);
220
+
221
+      this.stateValue = selectedVal[0];
222
+      this.items = [];
223
+      this.getData();
224
+    },
225
+    cancelHandle() {},
226
+    // 搜索
227
+    searchData() {
228
+      this.items = [];
229
+      this.searching=true;
230
+      this.getData();
231
+    },
232
+    // 获取列表
233
+    getData() {
234
+      var that = this;
235
+      // that.items.length=0;
236
+      this.$http
237
+        .post("service/bpm/InspectionProcessActual/fetchServiceTasks/ALL", {
238
+          assignee: that.loginUser.id,
239
+          idx: that.idx,
240
+          sum: that.sum,
241
+          inspectionProcessActual: {
242
+            // inspection: {
243
+            //   title: that.title,
244
+            //   executeUser: { id: that.loginUser.id }
245
+            // }
246
+            processUser:{
247
+              id:that.loginUser.id
248
+            }
249
+          },
250
+          searchType: that.stateValue
251
+        })
252
+        .then(function(res) {
253
+          if (res.data.data.length > 0) {
254
+            that.wushuju = false;
255
+            for (var i = 0; i < res.data.data.length; i++) {
256
+              if (res.data.data[i].createTime) {
257
+                res.data.data[i].createTime = formatDate(
258
+                  new Date(res.data.data[i].createTime),
259
+                  "yyyy-MM-dd hh:mm"
260
+                );
261
+              }
262
+            }
263
+            if(that.searching){
264
+              that.items =res.data.data;
265
+            }else{
266
+              that.items = that.items.concat(res.data.data);
267
+            }
268
+          } else {
269
+            that.wushuju = true;
270
+          }
271
+          that.loadShow = false;
272
+        });
273
+    },
274
+    onPullingDown() {
275
+      // 模拟更新数据
276
+      var that = this;
277
+      that.items = [];
278
+      that.idx = 0;
279
+      that.searching=false;
280
+      setTimeout(() => {
281
+        that.getData();
282
+      }, 1000);
283
+    },
284
+    onPullingUp() {
285
+      var that = this;
286
+      that.idx = that.idx + 1;
287
+      that.searching=false;
288
+      that.getData();
289
+    },
290
+    updatePullDownRefresh(val) {
291
+      this.pullDownRefresh = val;
292
+    },
293
+    updatePullDownRefreshThreshold(val) {
294
+      this.pullDownRefreshThreshold = val;
295
+    },
296
+    updatePullDownRefreshTxt(val) {
297
+      this.pullDownRefreshTxt = val;
298
+    },
299
+    updatePullUpLoad(val) {
300
+      this.pullUpLoad = val;
301
+    },
302
+    updatePullUpLoadThreshold(val) {
303
+      this.pullUpLoadThreshold = val;
304
+    },
305
+    updatePullUpLoadMoreTxt(val) {
306
+      this.pullUpLoadMoreTxt = val;
307
+    },
308
+    updatePullUpLoadNoMoreTxt(val) {
309
+      this.pullUpLoadNoMoreTxt = val;
310
+    },
311
+    updateCustomPullDown(val) {
312
+      this.customPullDown = val;
313
+    },
314
+    rebuildScroll() {
315
+      Vue.nextTick(() => {
316
+        this.$refs.scroll.destroy();
317
+        this.$refs.scroll.initScroll();
318
+      });
319
+    }
320
+  },
321
+  created() {
322
+    this.getParamsState();
323
+    this.getData(this.idx, this.sum);
324
+  }
325
+};
326
+</script>
327
+<style lang="stylus" rel="stylesheet/stylus" scoped>
328
+.scroll-list-wrap {
329
+  /* height: 350px */
330
+  height: 90vh;
331
+  /* border: 1px solid rgba(0, 0, 0, 0.1) */
332
+  border-radius: 5px;
333
+  transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
334
+  // overflow: hidden;
335
+  padding-top: 1.76rem;
336
+}
337
+
338
+.foods-wrapper {
339
+  .food-item {
340
+    display: flex;
341
+
342
+    /* padding: 18px */
343
+    /* border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
344
+    /* border-top: 1px solid rgba(7, 17, 27, 0.1)!important */
345
+    &:last-child {
346
+      border-none();
347
+      margin-bottom: 0;
348
+    }
349
+
350
+    .icon {
351
+      flex: 0 0 57px;
352
+      margin-right: 10px;
353
+    }
354
+
355
+    .food-content {
356
+      flex: 1;
357
+
358
+      .name {
359
+        margin: 2px 0 8px 0;
360
+        height: 14px;
361
+        line-height: 14px;
362
+        font-size: 14px;
363
+        color: rgb(7, 17, 27);
364
+      }
365
+
366
+      .description, .extra {
367
+        line-height: 10px;
368
+        font-size: 10px;
369
+        color: rgb(147, 153, 159);
370
+      }
371
+
372
+      .description {
373
+        line-height: 12px;
374
+        margin-bottom: 8px;
375
+      }
376
+
377
+      .extra {
378
+        .count {
379
+          margin-right: 12px;
380
+        }
381
+      }
382
+
383
+      .price {
384
+        font-weight: 700;
385
+        line-height: 24px;
386
+
387
+        .now {
388
+          margin-right: 8px;
389
+          font-size: 14px;
390
+          color: rgb(240, 20, 20);
391
+        }
392
+
393
+        .old {
394
+          text-decoration: line-through;
395
+          font-size: 10px;
396
+          color: rgb(147, 153, 159);
397
+        }
398
+      }
399
+
400
+      .cartcontrol-wrapper {
401
+        position: absolute;
402
+        right: 0;
403
+        bottom: 12px;
404
+
405
+        .scroll-wrapper {
406
+          .cube-pulldown-wrapper {
407
+            .before-trigger {
408
+              font-size: 30px;
409
+              line-height: 30px;
410
+              align-self: flex-end;
411
+
412
+              span {
413
+                display: inline-block;
414
+                transition: all 0.3s;
415
+                color: #666;
416
+
417
+                &.rotate {
418
+                  transform: rotate(180deg);
419
+                }
420
+              }
421
+            }
422
+
423
+            .after-trigger {
424
+              .refresh-text {
425
+                color: grey;
426
+              }
427
+            }
428
+          }
429
+        }
430
+      }
431
+    }
432
+  }
433
+}
434
+</style>
435
+<style lang='less' scoped>
436
+.bgColor {
437
+  background-color: white;
438
+}
439
+.food-item {
440
+  border-top: 0.16rem rgb(238, 238, 238) solid;
441
+}
442
+.food-content {
443
+  border-top: 0.01rem rgb(223, 222, 222) solid;
444
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
445
+}
446
+.title {
447
+  display: flex;
448
+  justify-content: space-between;
449
+  height: 0.7rem;
450
+  line-height: 0.7rem;
451
+  border-top: 0.01rem rgb(223, 222, 222) solid;
452
+  padding: 0 0.24rem;
453
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
454
+}
455
+.title i {
456
+  font-size: 0.32rem;
457
+  color: #005395;
458
+}
459
+.title div:nth-child(1) {
460
+  font-size: 0.32rem;
461
+}
462
+.title div:nth-child(1) span {
463
+  display: inline-block;
464
+  margin-left: 0.08rem;
465
+}
466
+.title div:nth-child(2) {
467
+  padding: 0.05rem 0.3rem;
468
+  /* border: 0.01rem rgb(0,0,255) solid; */
469
+  border-radius: 16px;
470
+  /* color: rgb(0,0,255); */
471
+  height: 0.25rem;
472
+  line-height: 0.25rem;
473
+  margin-top: 0.15rem;
474
+  font-size: 0.24rem;
475
+}
476
+.weishouli {
477
+  color: #991f00;
478
+  border: 0.01rem #991f00 solid;
479
+  background-color: #f4e8e5;
480
+}
481
+.bushouli {
482
+  color: #666666;
483
+  background-color: #eeeeee;
484
+  border: 0.01rem #666666 solid;
485
+}
486
+.chulizhong {
487
+  color: #003057;
488
+  background-color: #e5eaee;
489
+  border: 0.01rem #003057 solid;
490
+}
491
+.daipingjia {
492
+  color: #825b00;
493
+  background-color: #f2eee5;
494
+  border: 0.01rem #825b00 solid;
495
+}
496
+.yijiejue {
497
+  color: #40a19c;
498
+  background-color: #ebf5f5;
499
+  border: 0.01rem #40a19c solid;
500
+}
501
+.yichehui {
502
+  color: #48a843;
503
+  background-color: #ecf6ec;
504
+  border: 0.01rem #48a843 solid;
505
+}
506
+.timeBox {
507
+  display: flex;
508
+  justify-content: space-between;
509
+  font-size: 0.24rem;
510
+  color: #999999;
511
+  border-top: 0.01rem rgb(223, 222, 222) solid;
512
+  height: 0.7rem;
513
+  line-height: 0.7rem;
514
+  padding: 0 0.24rem 0 0.64rem;
515
+}
516
+.wushuju {
517
+  margin-top: 2.4rem;
518
+  text-align: center;
519
+  color: #999;
520
+}
521
+.wushuju img {
522
+  width: 5.12rem;
523
+  height: 2.84rem;
524
+}
525
+.demo {
526
+  .header {
527
+    width: 100%;
528
+    height: 0.88rem;
529
+    line-height: 0.88rem;
530
+    text-align: center;
531
+    color: #fff;
532
+    font-size: 0.37rem;
533
+    background: linear-gradient(#2e2f32, #414246);
534
+    position: fixed;
535
+    top: 0;
536
+    z-index: 6;
537
+  }
538
+  .seatchHeader {
539
+    width: 100%;
540
+    background-color: #eee;
541
+    padding: 0.16rem;
542
+    overflow: hidden;
543
+    position: fixed;
544
+    top: 0.88rem;
545
+    z-index: 6;
546
+    box-sizing: border-box;
547
+    .search {
548
+      width: 5.74rem;
549
+      height: 0.56rem;
550
+      font-size: 0.26rem;
551
+      color: #b2b2b2;
552
+      box-sizing: border-box;
553
+      .searchInp {
554
+        text-align: center;
555
+        background-color: #fff;
556
+        width: 100%;
557
+        height: 100%;
558
+        border-radius: 0.09rem;
559
+        border: none;
560
+        &:focus {
561
+          outline: none;
562
+        }
563
+      }
564
+    }
565
+    .selectBtn {
566
+      width: 1.2rem;
567
+      height: 0.56rem;
568
+      font-size: 0.32rem;
569
+      color: #005395;
570
+      border-color: #005395;
571
+      background-color: #fff;
572
+      border-radius: 0.09rem;
573
+      &:focus {
574
+        outline: none;
575
+      }
576
+    }
577
+  }
578
+}
579
+.conentBox {
580
+  width: 100%;
581
+  .conent {
582
+    font-size: 0.32rem;
583
+    font-weight: 400;
584
+    line-height: 0.45rem;
585
+    border-bottom: 0.16rem solid #e5e5e5;
586
+    .head {
587
+      border-bottom: 0.01rem solid #e6e6e6;
588
+      p {
589
+        padding: 0.24rem 0.48rem;
590
+        i {
591
+          color: #00559d;
592
+        }
593
+        .btn {
594
+          float: right;
595
+        }
596
+      }
597
+    }
598
+    .center {
599
+      color: #333333;
600
+      border-bottom: 0.01rem solid #e6e6e6;
601
+      padding: 0.24rem 0.48rem;
602
+      p {
603
+        .grayFont {
604
+          color: #666;
605
+        }
606
+      }
607
+    }
608
+    .bottom {
609
+      overflow: hidden;
610
+      line-height: 0.86rem;
611
+      border-bottom: 0.01rem solid #e6e6e6;
612
+      font-size: 0.24rem;
613
+      color: #999;
614
+      padding: 0 0.24rem 0 0.48rem;
615
+    }
616
+  }
617
+}
618
+</style>

+ 273 - 0
src/views/InspectionDetail.vue

@@ -0,0 +1,273 @@
1
+<template>
2
+  <div class="inspedtionDetail">
3
+    <div class="label">巡检信息</div>
4
+    <div class="head">
5
+      <p>
6
+        <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
7
+        巡检单号
8
+        <span class="num">{{baseInfo.sign}}</span>
9
+        <span class="btn zhixingzhong">{{baseInfo.stateName}}</span>
10
+      </p>
11
+    </div>
12
+    <div class="info">
13
+      <p>
14
+        <span class="fl">巡检类型</span>
15
+        <span class="fr">{{baseInfo.inspectionType.type}}</span>
16
+      </p>
17
+      <p>
18
+        <span class="fl">计划主题</span>
19
+        <span class="fr">{{baseInfo.inspection.title}}</span>
20
+      </p>
21
+      <p>
22
+        <span class="fl">计划内容</span>
23
+        <span class="fr showwrap">{{baseInfo.inspection.content}}</span>
24
+      </p>
25
+      <p>
26
+        <span class="fl">巡检状态</span>
27
+        <span class="fr">{{baseInfo.stateName}}</span>
28
+      </p>
29
+      <p>
30
+        <span class="fl">巡检策略</span>
31
+        <span class="fr">{{baseInfo.inspection.planStrategy.name}}</span>
32
+      </p>
33
+      <p>
34
+        <span class="fl">执行时长</span>
35
+        <span class="fr">{{baseInfo.inspection.executionTime}}分钟</span>
36
+      </p>
37
+      <p>
38
+        <span class="fl">开始时间</span>
39
+        <span class="fr">{{baseInfo.inspection.planStartTime.slice(0,baseInfo.inspection.planStartTime.length-2)}}</span>
40
+      </p>
41
+      <p>
42
+        <span class="fl">逾期时间</span>
43
+        <span class="fr">{{baseInfo.overdueTime}}</span>
44
+      </p>
45
+    </div>
46
+    <div class="label">巡检结果</div>
47
+    <div class="form">
48
+      <p v-for="(item,index) in forms" >
49
+        <span v-if="index%2==0">{{item.templateOptions.placeholder}}</span>
50
+        <cube-switch v-if="index%2==1" v-model="param[item.key]" :class="{'abnormal':param[item.key]}" :data-label="forms[index-1].templateOptions.placeholder" ></cube-switch>
51
+      </p>
52
+    </div>
53
+    <div class="btns">
54
+      <div class="btn" @click="createIncident()">生成事件</div>
55
+      <div class="btn submit" @click="submit()">提交</div>
56
+      <div class="btn cancel" @click="cancle()">取消</div>
57
+    </div>
58
+  </div>
59
+</template>
60
+<script>
61
+export default {
62
+  data() {
63
+    return {
64
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
65
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
66
+      baseInfo: {}, //巡检基础信息
67
+      items: [], //巡检项目
68
+      labels: [], //巡检项目label
69
+      status: [], //巡检项目的状态
70
+      forms: [], //巡检结果
71
+      abnormal:'',//异常项
72
+      param: {
73
+        inspectionProcessActual: {}
74
+      },
75
+      model: {}
76
+    };
77
+  },
78
+  methods: {
79
+    // 获取项目异常状态
80
+    getItems() {
81
+      var that = this;
82
+      that.$http
83
+        .get(
84
+          "/service/form/renderForm/inspection_confirm/" +
85
+            that.baseInfo.processInstanceId +
86
+            "/" +
87
+            that.loginUser.id+'/'+that.baseInfo.id,
88
+          {}
89
+        )
90
+        .then(function(res) {
91
+          console.log(res.data);
92
+          that.model = res.data.model;
93
+          var fields = res.data.fields;
94
+          console.log(fields);
95
+          fields.forEach(v => {
96
+            if (v.templateOptions.label == "检查项目") {
97
+              that.labels.push(v);
98
+            }
99
+            if (v.templateOptions.label == "状态") {
100
+              that.status.push(v);
101
+            }
102
+          });
103
+          // console.log(that.labels);
104
+          // console.log(that.status);
105
+          let labels = that.labels;
106
+          let status = that.status;
107
+          let j = 0,
108
+            newArr = new Array();
109
+          for (let i = 0; i < that.labels.length; i++) {
110
+            j = i * 2;
111
+            newArr[j] = that.labels[i];
112
+            newArr[j + 1] = that.status[i];
113
+          }
114
+          console.log(newArr);
115
+          that.forms = newArr;
116
+          window.localStorage.setItem('forms',JSON.stringify(that.forms));
117
+        });
118
+    },
119
+    // 提交
120
+    submit() {
121
+      this.param.loginUser = this.loginUser;
122
+      this.param.save = this.model.save;
123
+      this.param.close = this.model.close;
124
+      this.param.submit = this.model.submit;
125
+      this.param.toIncident = this.model.toIncident;
126
+      this.param.handler_code = "resolve";
127
+      this.param.inspectionProcessActual = this.baseInfo;
128
+      console.log(this.param);
129
+      var that = this;
130
+      that.$http
131
+        .post(
132
+          "/service/bpm/bpm/completeTask/" +
133
+            that.baseInfo.processInstanceId +
134
+            "/" +
135
+            that.loginUser.id,
136
+          that.param
137
+        )
138
+        .then(function(res) {
139
+          console.log(res.data);
140
+          if (res.data.status == 200) {
141
+            $("#fade").fadeIn();
142
+            that.promptingConent = "恭喜您,提交成功!";
143
+            that.promptingStatus = true;
144
+            that.dialog = that
145
+              .$createDialog({
146
+                type: "alert",
147
+                title: "提交成功",
148
+                content: "点击返回列表",
149
+                icon: "cubeic-right",
150
+                onConfirm: (e, promptValue) => {
151
+                  that.$router.push({ path: "/main/inspection" });
152
+                }
153
+              })
154
+              .show();
155
+            setTimeout(function() {
156
+              $("#fade").fadeOut();
157
+            }, 2000);
158
+          }
159
+        });
160
+    },
161
+    // 取消
162
+    cancle() {
163
+      var that=this;
164
+      that.$router.go(-1);
165
+    },
166
+    // 生成事件
167
+    createIncident(){
168
+      for(var i =0;i<$('.cube-switch.abnormal').length;i++){
169
+        this.abnormal+=$('.cube-switch.abnormal')[i].dataset.label+','
170
+      }
171
+      this.$router.push({name:'NewIncident',params:{data:this.baseInfo,abnormal:this.abnormal}});
172
+    }
173
+  },
174
+  created() {
175
+    this.baseInfo = this.$route.params.data||JSON.parse(window.localStorage.getItem('insDetailInfo'));
176
+    this.forms=JSON.parse( window.localStorage.getItem('forms'))||[];
177
+    this.title = this.baseInfo.inspectionType.type;
178
+    this.getItems();
179
+  }
180
+};
181
+</script>
182
+<style lang="less" scoped>
183
+.inspedtionDetail {
184
+  .label {
185
+    background-color: #eee;
186
+    height: 0.6rem;
187
+    line-height: 0.6rem;
188
+    padding-left: 0.2rem;
189
+    font-size: 0.24rem;
190
+    color: #666;
191
+  }
192
+
193
+  .head {
194
+    font-size: 0.34rem;
195
+    line-height: 0.45rem;
196
+    border-bottom: 0.01rem solid #e6e6e6;
197
+    p {
198
+      padding: 0.24rem 0.48rem;
199
+      i {
200
+        color: #00559d;
201
+      }
202
+      .num {
203
+        margin-left: 1rem;
204
+      }
205
+      .btn {
206
+        float: right;
207
+      }
208
+    }
209
+  }
210
+
211
+  .info {
212
+    color: #999;
213
+    font-size: 0.28rem;
214
+    overflow: hidden;
215
+    p {
216
+      line-height: 0.4rem;
217
+      padding: 0.1rem 0.24rem;
218
+      overflow: hidden;
219
+      .overflowEllipsis2 {
220
+        margin-left: 1.96rem;
221
+      }
222
+    }
223
+  }
224
+
225
+  .form {
226
+    font-size: 0.32rem;
227
+    color: #333;
228
+    line-height: 0.86rem;
229
+    overflow: hidden;
230
+    display: flex;
231
+    justify-content: space-between;
232
+    align-items: center;
233
+    flex-wrap: wrap;
234
+    p {
235
+      line-height: 0.4rem;
236
+      padding: 0.2rem 0.24rem;
237
+      // border-bottom: 0.01rem solid #ccc;
238
+      width: 35%;
239
+    }
240
+  }
241
+
242
+  .btns {
243
+    font-size: 0.32px;
244
+    display: flex;
245
+    justify-content: space-between;
246
+    align-items: center;
247
+    padding: 0.24rem;
248
+    .btn {
249
+      border: 0.01rem solid #005395;
250
+      color: #005395;
251
+      background-color: #fff;
252
+      width: 1.8rem;
253
+      height: 0.88rem;
254
+      line-height: 0.88rem;
255
+      text-align: center;
256
+      border-radius: 0.1rem;
257
+      &.submit {
258
+        width: 3.06rem;
259
+        background-color: #005395;
260
+        color: #fff;
261
+      }
262
+      &.cancel {
263
+        border-color: #ccc;
264
+        color: #333;
265
+      }
266
+    }
267
+  }
268
+  .showwrap {
269
+    width: 75%;
270
+    text-align: right;
271
+  }
272
+}
273
+</style>

+ 86 - 147
src/views/Login.vue

@@ -1,42 +1,17 @@
1 1
 <template>
2
-  <div class="fle bgColor" v-if="!isSSo">
3
-    <load-ing v-show="requesterLgoinType == 'wechat'"></load-ing>
4
-    <h2
5
-      v-if="requesterLgoinType == 'web'"
6
-      style="font-size: 0.36rem; margin-bottom: 0.36rem; font-weight: 700"
7
-    >
8
-      网络与信息运维报修平台
9
-    </h2>
10
-    <div v-if="requesterLgoinType == 'web'" style="width: 5rem">
11
-      <cube-input
12
-        v-model="zhanghao"
13
-        placeholder="您的账号为工号或学号"
14
-      ></cube-input>
15
-      <br />
16
-      <cube-input
17
-        v-model="mima"
18
-        type="password"
19
-        placeholder="您的初始密码为学号或工号后四位"
20
-      ></cube-input>
21
-      <br />
22
-      <cube-button @click="zlogin()" style="background: #005395"
23
-        >登录</cube-button
24
-      >
25
-    </div>
2
+  <div class="fle bgColor">
3
+    <!-- <div class="login">登录中</div> -->
4
+    <load-ing></load-ing>
26 5
   </div>
27 6
 </template>
28 7
 
29 8
 <script>
30
-import { decode } from "js-base64";
9
+// 注意事项:个人微信需要关注微工作台,否则会导致没有userId(userId为openID)登录失败
10
+
31 11
 import LoadIng from "./../views/loading.vue";
32 12
 export default {
33 13
   data() {
34
-    return {
35
-      zhanghao: "",
36
-      mima: "",
37
-      requesterLgoinType: "",
38
-      isSSo: true // 是否单点登录
39
-    };
14
+    return {};
40 15
   },
41 16
   components: {
42 17
     LoadIng
@@ -45,16 +20,25 @@ export default {
45 20
     // 登陆
46 21
     login() {
47 22
       var that = this;
48
-      that.$http.post("service/auth/reqwechatlogin", {}).then(res => {
23
+      that.$http.post("service/auth/wechatlogin", {}).then(function(res) {
24
+        // alert(1);
25
+        // alert(JSON.stringify(res.data));
49 26
         if (res.data.url) {
27
+          // alert("拿到了url(code)");
50 28
           window.location.href = res.data.url;
51 29
         } else {
30
+          // alert("登录成功,即将跳转");
52 31
           if (res.data.user) {
32
+            that.getConfig();
53 33
             localStorage.setItem(
54 34
               "loginUser",
35
+              JSON.stringify(res.data.user.user)
36
+            );
37
+            localStorage.setItem(
38
+              "login_requester",
55 39
               JSON.stringify(res.data.user.requester)
56 40
             );
57
-            this.loginNext();
41
+            that.$router.push({ path: "/main" });
58 42
           }
59 43
         }
60 44
       });
@@ -63,148 +47,99 @@ export default {
63 47
     getCode() {
64 48
       var that = this;
65 49
       var url = window.location.href.split("?");
50
+      // alert("window.location.href----:");
51
+      // alert(JSON.stringify(window.location.href));
66 52
       if (!url[1]) {
67 53
         that.login();
68 54
       } else {
69 55
         var code = {
70 56
           code: url[1],
71
-          name: "微信报修"
57
+          name: "微信处理人"
72 58
         };
73
-        that.$http.post("service/auth/reqwechatlogin2", code).then(res => {
74
-          if (res.data.state == 200) {
59
+        // alert("2--传code参数:");
60
+        // alert(JSON.stringify(code));
61
+        that.$http.post("service/auth/wechatlogin2", code).then(function(res) {
62
+          if (res.data.state==200) {
63
+            // alert(3);
64
+            // alert(JSON.stringify(res.data));
75 65
             if (res.data.user) {
66
+              that.getConfig();
76 67
               localStorage.setItem(
77 68
                 "loginUser",
69
+                JSON.stringify(res.data.user.user)
70
+              );
71
+              localStorage.setItem(
72
+                "login_requester",
78 73
                 JSON.stringify(res.data.user.requester)
79 74
               );
80
-              this.loginNext();
75
+              that.$router.push({ path: "/main" });
81 76
             }
82
-          } else if (res.data.state == 501) {
83
-            that
84
-              .$createDialog({
85
-                type: "alert",
86
-                title: "您的账号被删除,请联系管理员",
87
-                icon: "cubeic-alert"
88
-              })
89
-              .show();
90
-          } else {
91
-            that
92
-              .$createDialog({
93
-                type: "alert",
94
-                title: res.data.remarks,
95
-                icon: "cubeic-alert"
96
-              })
97
-              .show();
77
+          }else if(res.data.state == 501){
78
+            that.$createDialog({
79
+              type: 'alert',
80
+              title: '您的账号被删除,请联系管理员',
81
+              icon: 'cubeic-alert'
82
+            }).show()
83
+          }else{
84
+            that.$createDialog({
85
+              type: 'alert',
86
+              title: res.data.remarks,
87
+              icon: 'cubeic-alert'
88
+            }).show()
98 89
           }
99 90
         });
100 91
       }
101 92
     },
102
-    loginNext() {
103
-      // seimin
104
-      // 获取报修主体
93
+    // 假登录
94
+    login2() {
95
+      var that = this;
105 96
       this.$http
106
-        .post("service/sysinfo/data/fetchDataList/systemConfiguration", {
107
-          idx: 0,
108
-          sum: 1000,
109
-          systemConfiguration: { keyconfig: "repairMain" }
97
+        .post("service/auth/loginEncrypt", {
98
+          // username: "DingDanDan",
99
+          username: "admin",
100
+          password: "20200326"
110 101
         })
111
-        .then(result => {
112
-          if (result.data.status == 200) {
113
-            var repairMain = result.data.list[0];
114
-            window.localStorage.setItem(
115
-              "repairMain",
116
-              JSON.stringify(repairMain)
102
+        .then(function(res) {
103
+          that.loading = false;
104
+          if (res.data && res.data.state == 200) {
105
+            that.getConfig();
106
+            localStorage.setItem(
107
+              "loginUser",
108
+              JSON.stringify(res.data.data.user)
109
+            );
110
+            localStorage.setItem(
111
+              "login_requester",
112
+              JSON.stringify(res.data.data.requester)
117 113
             );
118
-            // 获取是否自动建单
119
-            this.$http
120
-              .post("service/sysinfo/data/fetchDataList/systemConfiguration", {
121
-                idx: 0,
122
-                sum: 1000,
123
-                systemConfiguration: { keyconfig: "ifCreate" }
124
-              })
125
-              .then(result => {
126
-                if (result.data.status == 200) {
127
-                  var ifCreate = result.data.list[0];
128
-                  window.localStorage.setItem(
129
-                    "ifCreate",
130
-                    JSON.stringify(ifCreate)
131
-                  );
132
-                  if (this.isSSo) {
133
-                    location.href =
134
-                      "http://" + location.host + "/req/#/main/indes";
135
-                  } else {
136
-                    this.$router.push({ path: "/main" });
137
-                  }
138
-                }
139
-              });
114
+            that.$router.push({ path: "/main" });
140 115
           }
141 116
         });
142
-      // seimin
143 117
     },
144
-    // 获取报修人登录方式
145
-    getLoginType() {
146
-      this.$http.post("service/wechat/getLoginType", {}).then(result => {
147
-        if (result.data.status == 200) {
148
-          this.requesterLgoinType = result.data.data;
149
-          window.localStorage.setItem(
150
-            "requesterLgoinType",
151
-            this.requesterLgoinType
152
-          );
153
-          if (this.requesterLgoinType == "wechat") {
154
-            this.getCode();
155
-          } else if (this.requesterLgoinType == "web") {
156
-            // this.$router.push({ path: "/login" });
157
-          }
158
-        }
159
-      });
160
-    },
161
-    // 账号密码登录
162
-    zlogin() {
163
-      console.log(this);
118
+    // 获取版本配置(报修主题:报修人/报修科室)
119
+    getConfig() {
164 120
       var that = this;
165
-      var ssoStr = "";
166
-      var ssoJson;
167
-      if (this.isSSo) {
168
-        ssoStr = location.search
169
-          .replace("?", "")
170
-          .split("&")[0]
171
-          .split("=")[1];
172
-        ssoStr = decode(decodeURIComponent(ssoStr));
173
-        ssoJson = JSON.parse(ssoStr);
174
-      }
175
-      var postData = this.isSSo
176
-        ? { username: ssoJson.a, password: ssoJson.r, t: false }
177
-        : { username: this.zhanghao, password: this.mima };
178
-      this.$http.post("service/auth/reqlogin", postData).then(res => {
179
-        that.loading = false;
180
-        if (res.data && res.data.state == 200) {
181
-          var loginUserStr = JSON.stringify(res.data.data.requester);
182
-          localStorage.setItem("loginUser", loginUserStr);
121
+      this.$http
122
+        .post("service/sysinfo/data/fetchDataList/systemConfiguration", {
123
+          idx: 0,
124
+          sum: 1000,
125
+          systemConfiguration: { keyconfig: "repairMain" }
126
+        })
127
+        .then(function(res) {
128
+          console.log(res);
129
+          // if (res.data && res.data.state == 200) {
183 130
           localStorage.setItem(
184
-            "loginConfig",
185
-            JSON.stringify({ username: this.zhanghao, password: this.mima })
131
+            "valConfig",
132
+            JSON.stringify(res.data.list[0].valueconfig)
186 133
           );
187
-          this.loginNext();
188
-        } else {
189
-          that
190
-            .$createDialog({
191
-              type: "alert",
192
-              title: "系统错误",
193
-              content: "请稍后再试",
194
-              icon: "cubeic-wrong",
195
-              color: "red"
196
-            })
197
-            .show();
198
-        }
199
-      });
134
+          // localStorage.setItem("valConfig", 2);
135
+          //   that.$router.push({ path: "/main" });
136
+          // }
137
+        });
200 138
     }
201 139
   },
202 140
   created() {
203
-    this.isSSo = location.search.length > 0;
204
-    if (this.isSSo) {
205
-      this.zlogin();
206
-    }
207
-    this.getLoginType();
141
+    this.getCode();
142
+    // this.login2();
208 143
   }
209 144
 };
210 145
 </script>
@@ -252,3 +187,7 @@ input:focus {
252 187
   border-radius: 10px;
253 188
 }
254 189
 </style>
190
+
191
+
192
+
193
+

+ 7 - 3
src/views/Main.vue

@@ -10,11 +10,15 @@
10 10
             </router-link>
11 11
             <router-link to="/main/incidentList" class="link" active-class="active">
12 12
                 <i class="iconfont icon-baoxiuxian"></i>
13
-                <span>我的报修</span>
13
+                <span>事件</span>
14
+            </router-link>
15
+             <router-link to="/main/inspection" class="link" active-class="active">
16
+                <i class="iconfont icon-shouyexian"></i>
17
+                <span>巡检</span>
14 18
             </router-link>
15 19
             <router-link to="/main/my" class="link" active-class="active">
16 20
                 <i class="iconfont icon-wodexian"></i>
17
-                <span>设置</span>
21
+                <span>我的</span>
18 22
             </router-link>
19 23
         </div>
20 24
     </div>
@@ -80,4 +84,4 @@ export default {
80 84
 .fade-leave-active{
81 85
     opacity: 0;
82 86
 }
83
-</style>
87
+</style>

+ 629 - 0
src/views/againAssign.vue

@@ -0,0 +1,629 @@
1
+<template>
2
+  <div class="againAssign">
3
+    <div class="conentBox">
4
+      <div class="header">处理方案</div>
5
+      <div v-if="model.incident" class="conent">
6
+        <div class="navBar">
7
+          <div class="fl">
8
+            <a :class="{active:actives=='info'}" href="javascript:;" @click="toInfo('info')">事件信息</a>
9
+          </div>
10
+          <div class="fl">
11
+            <a
12
+              :class="{active:actives=='assignee'}"
13
+              href="javascript:;"
14
+              @click="toInfo('assignee')"
15
+            >重新指派</a>
16
+          </div>
17
+          <div class="fl">
18
+            <a
19
+              :class="{active:actives=='progress'}"
20
+              href="javascript:;"
21
+              @click="toInfo('progress')"
22
+            >处理进度</a>
23
+          </div>
24
+        </div>
25
+        <div class="label headtop" id="info">事件信息</div>
26
+
27
+        <div class="info">
28
+          <div class="head">
29
+            <p>
30
+              <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
31
+              事件编号:{{model.incident.incidentsign}}
32
+              <span class="fr btn chongxinzhipai">{{model.incident.state.name}}</span>
33
+            </p>
34
+          </div>
35
+          <p>
36
+            <span class="fl">事件分类</span>
37
+            <span class="fr">{{model.incident.category.category}}</span>
38
+          </p>
39
+          <!-- <p>
40
+            <span class="fl">事件主题</span>
41
+            <span class="fr">{{model.incident.title}}</span>
42
+          </p> -->
43
+          <p class="desc">
44
+            <span class="fl">事件描述</span>
45
+            <span class="fr grayFont" v-html="model.incident.description"></span>
46
+          </p>
47
+          <div class="shows" id="shows">
48
+            <p v-if="valConfig==2">
49
+              <span class="fl">报修科室</span>
50
+              <span class="fr">{{model.incident.department?model.incident.department.dept:''}}</span>
51
+            </p>
52
+            <p v-if="valConfig==1">
53
+              <span class="fl">报修人</span>
54
+              <span class="fr">{{model.incident.requester.name}}</span>
55
+            </p>
56
+            <p v-if="valConfig==2">
57
+              <span class="fl">联系人</span>
58
+              <span class="fr">{{model.incident.contacts}}</span>
59
+            </p>
60
+            <p>
61
+              <span class="fl">联系电话</span>
62
+              <span class="fr">{{model.incident.contactsInformation}}</span>
63
+            </p>
64
+            <p>
65
+              <span class="fl">联系地址</span>
66
+              <span class="fr">{{model.incident.houseNumber||''}}</span>
67
+            </p>
68
+            <p class="boeder_B">
69
+              <span class="fl">事件来源</span>
70
+              <span class="fr">{{model.incident.source.name}}</span>
71
+            </p>
72
+            <!-- <p>
73
+              <span class="fl">影响度</span>
74
+              <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
75
+            </p>
76
+            <p>
77
+              <span class="fl">紧急度</span>
78
+              <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
79
+            </p> -->
80
+            <p>
81
+              <span class="fl">优先级</span>
82
+              <span class="fr">{{model.incident.priority?model.incident.priority.name:''}}</span>
83
+            </p>
84
+            <p>
85
+              <span class="fl">逾期响应时间</span>
86
+              <span class="fr">{{model.incident.overdueResponseDate}}</span>
87
+            </p>
88
+            <p>
89
+              <span class="fl">逾期解决时间</span>
90
+              <span class="fr">{{model.incident.overdueTime}}</span>
91
+            </p>
92
+          </div>
93
+          <p class="info_hide">
94
+            <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
95
+            <span class="fl hide" @click="hides()" v-if="item_hides">隐藏详情<<</span>
96
+          </p>
97
+          <div class="imgs-container" v-if="imgs.length">
98
+            <div class="imgs-cont">
99
+              <img v-if='img.suffix=="jpeg"||img.suffix=="jpg"||img.suffix=="gif"||img.suffix=="png"||img.suffix=="svg"||img.suffix=="pdf"' :src="img.previewUrl" v-for="(img, index) in imgs" class="imgs">
100
+              <p v-else>
101
+                <a :href='[img.previewUrl]'>{{img.name}}</a>
102
+              </p>
103
+            </div>
104
+          </div>
105
+          <div class="label" id="assignee">重新指派</div>
106
+          <div class="info">
107
+            <p>
108
+              <span class="fl">重新指派原因:</span>
109
+              <span class="fr">{{model.resignComment}}</span>
110
+            </p>
111
+          </div>
112
+
113
+          <div class="label" id="progress">处理进度</div>
114
+          <div :class="{'progress':true,'progressHide':!pro_hides}" id="progressBox">
115
+            <div class="progress_info" v-for="item in progressInfo">
116
+              <div class="progress_info_L">{{item.activityName}}</div>
117
+              <div class="progress_info_R">
118
+                <div class="time">
119
+                  <i
120
+                    :class="{'iconfont':true, 'icon-icon_weizuo':item.endTime!='','icon-icon_zhengzaijinx':item.endTime=='' }"
121
+                  ></i>
122
+                  <span class="text1">{{item.startTime}}</span>
123
+                </div>
124
+                <div
125
+                  :class="{'cont':true,'blue':item.endTime!='' }"
126
+                >
127
+                  <p class="text2" v-if="item.desc">{{item.desc}}</p>
128
+                </div>
129
+              </div>
130
+            </div>
131
+          </div>
132
+          <p class="info_hide">
133
+            <span class="fl hide" @click="proHides()">{{pro_hides?'隐藏详情 <<':'展开详情 >>'}}</span>
134
+          </p>
135
+          <div v-if="model.incident.handlerUser.id==loginUser.id">
136
+            <div class="label">指派</div>
137
+            <div class="form">
138
+              <div class="txtLabel">
139
+                <div class="txt fl handler">
140
+                  <span style="color:red;">*</span>是否选择处理人:
141
+                </div>
142
+                <cube-switch v-model="handleUserOrGroup"></cube-switch>
143
+              </div>
144
+              <div class="txtLabel" v-if="handleUserOrGroup">
145
+                <div class="txt fl">
146
+                  <span style="color:red;">*</span> 处理人:
147
+                </div>
148
+                <cube-select
149
+                  class="selectGroup fl"
150
+                  v-model="handlerUser"
151
+                  :title="'请选择处理人'"
152
+                  :options="handlerUserArr"
153
+                  :placeholder="'请选择处理人'"
154
+                ></cube-select>
155
+              </div>
156
+              <div class="txtLabel" v-if="!handleUserOrGroup">
157
+                <div class="txt fl">
158
+                  <span style="color:red;">*</span> 处理组:
159
+                </div>
160
+                <cube-select
161
+                  class="selectGroup fl"
162
+                  v-model="handlerGroup"
163
+                  :title="'请选择处理组'"
164
+                  :options="candidateGroupsArr"
165
+                  :placeholder="'请选择处理组'"
166
+                ></cube-select>
167
+              </div>
168
+              <cube-form-group class="sub">
169
+                <cube-button type="submit" @click="subVali()">提交</cube-button>
170
+              </cube-form-group>
171
+            </div>
172
+          </div>
173
+        </div>
174
+      </div>
175
+      <load-ing v-if="!model.incident"></load-ing>
176
+      <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
177
+    </div>
178
+  </div>
179
+</template>
180
+<script>
181
+import LoadIng from "./../views/loading.vue";
182
+import PrompTing from "./../views/prompting.vue";
183
+export default {
184
+  data() {
185
+    return {
186
+      id:'',
187
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
188
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
189
+      promptingConent: "",
190
+      promptingStatus: "",
191
+      item_hides: false,
192
+      actives: "info",
193
+      processInstanceId: "",
194
+      progressInfo: [], //处理进度
195
+      imgs: [], //图片
196
+      model: {}, //提交数据
197
+      handleUserOrGroup: false, //处理人/处理组
198
+      handlerUserArr: [], //处理人
199
+      candidateGroupsArr: [], //处理组
200
+      handlerUser: "", //处理人
201
+      handlerGroup: "", //处理组
202
+      pro_hides:false,//展开/收起处理进度
203
+    };
204
+  },
205
+  components: {
206
+    LoadIng,
207
+    PrompTing
208
+  },
209
+  methods: {
210
+    //   获取事件数据
211
+    getParamsData() {
212
+      var that = this;
213
+      that.$http
214
+        .get(
215
+          "/service/form/renderForm/receiveform/" +
216
+            that.processInstanceId +
217
+            "/" +
218
+            that.loginUser.id+'/'+that.id,
219
+          {}
220
+        )
221
+        .then(function(res) {
222
+          console.log(res.data);
223
+          that.model = res.data.model;
224
+        });
225
+    },
226
+    // 获取图片
227
+    getImgs() {
228
+      var that = this;
229
+      that.$http
230
+        .get(
231
+          "service/common/common/listAttachment/incident/" +
232
+            that.processInstanceId,
233
+          {}
234
+        )
235
+        .then(function(res) {
236
+          console.log(res.data);
237
+          that.imgs = res.data.data.splice(0, 3);
238
+          console.log(that.imgs);
239
+        });
240
+    },
241
+    // 获取处理进度
242
+    getProgressInfo() {
243
+      var that = this;
244
+      that.$http
245
+        .post(
246
+          "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
247
+          {}
248
+        )
249
+        .then(function(res) {
250
+          console.log(res.data);
251
+          that.progressInfo = res.data.data;
252
+          that.progressInfo.reverse();
253
+        });
254
+    },
255
+    //隐藏显示详情
256
+    hides() {
257
+      this.item_hides = !this.item_hides;
258
+      $("#shows").slideToggle();
259
+    },
260
+    // 处理进度隐藏/展开
261
+    proHides(){
262
+      if(!this.pro_hides){
263
+        $('#progressBox').animate({'height':$('#progressBox')[0].scrollHeight})
264
+      }else{
265
+        $('#progressBox').animate({'height':'1.7rem'})
266
+      }
267
+      this.pro_hides=!this.pro_hides;
268
+    },
269
+    // 快速定位
270
+    toInfo(id) {
271
+      this.actives = id;
272
+      $("body,html").animate(
273
+        {
274
+          scrollTop:
275
+            $("#" + id).offset().top -
276
+            $(".header")[0].offsetHeight -
277
+            $(".navBar")[0].offsetHeight
278
+        },
279
+        260
280
+      );
281
+    },
282
+    // 获取处理人
283
+    getHandlerUser() {
284
+      var that = this;
285
+      this.$http
286
+        .post("service/user/data/fetchDataList/user", {
287
+          idx: 0,
288
+          sum: 1000,
289
+          user: {
290
+            roledata: { rolecode: "first-line support" },
291
+            selectType: "1"
292
+          }
293
+        })
294
+        .then(function(res) {
295
+          res.data.list.forEach(function(v, i) {
296
+            that.handlerUserArr.push({
297
+              text: v.name,
298
+              value: v.id
299
+            });
300
+          });
301
+        });
302
+    },
303
+    // 获取处理组
304
+    getCandidateGroups() {
305
+      var that = this;
306
+      this.$http
307
+        .post("service/user/data/fetchDataList/group", {
308
+          idx: 0,
309
+          sum: 1000,
310
+          group: { selectType: "nouser" }
311
+        })
312
+        .then(function(res) {
313
+          res.data.list.forEach(function(v, i) {
314
+            that.candidateGroupsArr.push({
315
+              text: v.groupName,
316
+              value: v.id
317
+            });
318
+          });
319
+          console.log(that.candidateGroupsArr);
320
+        });
321
+    },
322
+    subVali() {
323
+      var that = this;
324
+
325
+      if (
326
+        (!that.handleUserOrGroup && !that.handlerGroup) ||
327
+        (that.handleUserOrGroup && !that.handlerUser)
328
+      ) {
329
+        $("#fade").fadeIn();
330
+        that.promptingConent = "提交失败,请填写必填信息!";
331
+        that.promptingStatus = false;
332
+        setTimeout(function() {
333
+          $("#fade").fadeOut();
334
+        }, 2000);
335
+      }
336
+
337
+      that.model.handler_code = "resolve";
338
+      delete that.model.receive_code;
339
+      if (that.handleUserOrGroup) {
340
+        delete that.model.candidateGroups;
341
+        that.model.assignee = that.handlerUser;
342
+      } else {
343
+        delete that.model.assignee;
344
+        delete that.model.incident.assignee;
345
+        that.model.candidateGroups = that.handlerGroup;
346
+      }
347
+      that.$http
348
+        .post(
349
+          "service/bpm/bpm/completeTask/" +
350
+            that.model.incident.taskId +
351
+            "/" +
352
+            that.loginUser.id,
353
+          that.model
354
+        )
355
+        .then(function(res) {
356
+          if (res.data.status == 200) {
357
+            $("#fade").fadeIn();
358
+            that.promptingConent = "恭喜您,提交成功!";
359
+            that.promptingStatus = true;
360
+            that.dialog = that
361
+              .$createDialog({
362
+                type: "alert",
363
+                title: "提交成功",
364
+                content: "点击返回首页",
365
+                icon: "cubeic-right",
366
+                onConfirm: (e, promptValue) => {
367
+                  that.$router.push({ path: "/main" });
368
+                }
369
+              })
370
+              .show();
371
+            setTimeout(function() {
372
+              $("#fade").fadeOut();
373
+            }, 2000);
374
+          }
375
+        });
376
+    }
377
+  },
378
+  created() {
379
+    this.processInstanceId = this.$route.params.data.processInstanceId;
380
+    this.id = this.$route.params.data.id;
381
+    this.getParamsData();
382
+    this.getProgressInfo();
383
+    this.getImgs();
384
+    this.getHandlerUser();
385
+    this.getCandidateGroups();
386
+  }
387
+};
388
+</script>
389
+<style lang="less" scoped>
390
+i.iconfont.blue {
391
+  color: #005395;
392
+  // &::after {
393
+  //   content: "";
394
+  //   width: 0.01rem;
395
+  //   height: 0.4rem;
396
+  //   background: #005395;
397
+  //   position: relative;
398
+  //   display: block;
399
+  //   left: 0.14rem;
400
+  // }
401
+}
402
+.againAssign {
403
+  .header {
404
+    width: 100%;
405
+    height: 0.88rem;
406
+    line-height: 0.88rem;
407
+    text-align: center;
408
+    color: #fff;
409
+    font-size: 0.37rem;
410
+    background: linear-gradient(#2e2f32, #414246);
411
+    position: fixed;
412
+    top: 0;
413
+    z-index: 6;
414
+  }
415
+  .navBar {
416
+    width: 100%;
417
+    height: 0.96rem;
418
+    line-height: 0.96rem;
419
+    background-color: #fafafa;
420
+    font-size: 0.28rem;
421
+    position: fixed;
422
+    top: 0.88rem;
423
+    div {
424
+      width: 33.33%;
425
+      text-align: center;
426
+      a {
427
+        display: inline-block;
428
+        height: 0.9rem;
429
+        width: 1.7rem;
430
+        padding: 0 0.1rem;
431
+        &.active {
432
+          color: #005395;
433
+          border-bottom: 0.06rem solid #005395;
434
+        }
435
+      }
436
+    }
437
+  }
438
+
439
+  .headtop {
440
+    margin-top: 1.84rem;
441
+  }
442
+  .label {
443
+    background-color: #eeeeee;
444
+    height: 0.6rem;
445
+    line-height: 0.58rem;
446
+    padding-left: 0.2rem;
447
+    font-size: 0.24rem;
448
+    color: #666666;
449
+    span {
450
+      font-size: 0.2rem;
451
+      display: inline-block;
452
+      margin-left: 0.08rem;
453
+      color: #999999;
454
+    }
455
+    &.formLabel {
456
+      background-color: #fff;
457
+    }
458
+  }
459
+  .conentBox {
460
+    width: 100%;
461
+    .conent {
462
+      font-size: 0.32rem;
463
+      font-weight: 400;
464
+      line-height: 0.45rem;
465
+      // border-bottom: 0.16rem solid #e5e5e5;
466
+
467
+      .shows {
468
+        display: none;
469
+      }
470
+      .boeder_B {
471
+        border-bottom: 0.01rem solid #ccc;
472
+      }
473
+       p {
474
+          &.desc{
475
+            overflow: hidden;
476
+          }
477
+          .grayFont {
478
+            width: 75%;
479
+            text-align: right;
480
+            overflow-x: scroll;
481
+          }
482
+      }
483
+      .bottom {
484
+        overflow: hidden;
485
+        line-height: 0.86rem;
486
+        border-bottom: 0.01rem solid #e6e6e6;
487
+        font-size: 0.24rem;
488
+        color: #999;
489
+        padding: 0 0.24rem 0 0.48rem;
490
+      }
491
+      .info {
492
+        color: #999;
493
+        font-size: 0.28rem;
494
+        overflow: hidden;
495
+        .head {
496
+          border-bottom: 0.01rem solid #e6e6e6;
497
+          p {
498
+            padding: 0.24rem 0.3rem;
499
+            i {
500
+              color: #00559d;
501
+            }
502
+          }
503
+        }
504
+        p {
505
+          line-height: 0.4rem;
506
+          padding: 0.1rem 0.24rem;
507
+          overflow: hidden;
508
+          .overflowEllipsis2 {
509
+            margin-left: 1.96rem;
510
+          }
511
+        }
512
+        .info_hide {
513
+          padding: 0.2rem 0.24rem;
514
+          border-bottom: 0.01rem solid #e6e6e6;
515
+          .hide {
516
+            color: #00559d;
517
+          }
518
+        }
519
+        .imgs-container{
520
+          a{
521
+            color:#03c !important;
522
+            &:visited{
523
+              color: #551a8b !important;
524
+            }
525
+          }
526
+           img {
527
+            width: 1.5rem;
528
+            height: 1.5rem;
529
+            margin-right: 0.7rem;
530
+            &:nth-child(1) {
531
+              margin-left: 0.75rem;
532
+            }
533
+          }
534
+        }
535
+        .progress {
536
+          padding: 0.2rem 0.2rem;
537
+          overflow: hidden;
538
+          transition-duration: .2s;
539
+          transition-timing-function: linear;
540
+          &.progressHide{
541
+            height: 1.7rem;
542
+          }
543
+          .progress_info {
544
+            overflow: hidden;
545
+            margin-bottom: 0.1rem;
546
+            &:nth-last-child(1){
547
+              .cont{
548
+                border:none !important;
549
+              }
550
+            }
551
+            .progress_info_L {
552
+              float: left;
553
+              color: #333;
554
+              max-width: 18%;
555
+            }
556
+            .progress_info_R {
557
+              float: right;
558
+              margin-left: 0.09rem;
559
+              width: 80%;
560
+              font-size: 0.25rem;
561
+              .time {
562
+                i {
563
+                  margin-left: -0.15rem;
564
+                  &.icon-icon_weizuo {
565
+                    color: #005495;
566
+                  }
567
+                  &.icon-icon_zhengzaijinx {
568
+                    color: #48a843;
569
+                    font-size: 0.37rem;
570
+                  }
571
+                }
572
+                span {
573
+                  margin-left: 0.15rem;
574
+                }
575
+              }
576
+              .cont {
577
+                border-left: 1px solid #999;
578
+                padding-left: 0.4rem;
579
+                min-height: 0.4rem;
580
+                &.blue {
581
+                  border-left: 1px solid #005395;
582
+                }
583
+              }
584
+
585
+              .text1 {
586
+                font-size: 0.15rem;
587
+              }
588
+              .text2 {
589
+                color: #666;
590
+              }
591
+              p {
592
+                padding: 0;
593
+              }
594
+            }
595
+          }
596
+        }
597
+      }
598
+      .txtLabel {
599
+        width: 100%;
600
+        overflow: hidden;
601
+        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
602
+        .txt {
603
+          width: 25%;
604
+          color: #666;
605
+          &.handler {
606
+            width: 40%;
607
+          }
608
+        }
609
+        .selectGroup {
610
+          width: 62%;
611
+        }
612
+      }
613
+      .sub {
614
+        background: #ececec;
615
+        .cube-btn {
616
+          background-color: #005395 !important;
617
+          width: 90%;
618
+          margin: 0.2rem auto;
619
+          border-radius: 8px;
620
+        }
621
+      }
622
+    }
623
+  }
624
+  .showwrap {
625
+    width: 75%;
626
+    text-align: right;
627
+  }
628
+}
629
+</style>

+ 567 - 0
src/views/closed.vue

@@ -0,0 +1,567 @@
1
+<template>
2
+  <div class="closed">
3
+    <div class="conentBox">
4
+      <div class="header">处理方案</div>
5
+      <div v-if="model.incident" class="conent">
6
+        <div class="navBar">
7
+          <div class="fl">
8
+            <a :class="{active:actives=='info'}" href="javascript:;" @click="toInfo('info')">事件信息</a>
9
+          </div>
10
+          <div class="fl">
11
+            <a
12
+              :class="{active:actives=='handlerInfo'}"
13
+              href="javascript:;"
14
+              @click="toInfo('handlerInfo')"
15
+            >处理信息</a>
16
+          </div>
17
+          <div class="fl">
18
+            <a
19
+              :class="{active:actives=='closeInfo'}"
20
+              href="javascript:;"
21
+              @click="toInfo('closeInfo')"
22
+            >关单信息</a>
23
+          </div>
24
+          <div class="fl">
25
+            <a
26
+              :class="{active:actives=='progress'}"
27
+              href="javascript:;"
28
+              @click="toInfo('progress')"
29
+            >处理进度</a>
30
+          </div>
31
+        </div>
32
+
33
+        <div class="info">
34
+          <div class="label headtop" id="info">事件信息</div>
35
+          <div class="head">
36
+            <p>
37
+              <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
38
+              事件编号:{{model.incident.incidentsign}}
39
+              <span class="fr btn yiguanbi">{{model.incident.state.name}}</span>
40
+            </p>
41
+          </div>
42
+          <p>
43
+            <span class="fl">事件分类</span>
44
+            <span class="fr">{{model.incident.category.category}}</span>
45
+          </p>
46
+          <!-- <p>
47
+            <span class="fl">事件主题</span>
48
+            <span class="fr">{{model.incident.title}}</span>
49
+          </p> -->
50
+          <p class="desc">
51
+            <span class="fl">事件描述</span>
52
+            <span class="fr grayFont" v-html="model.incident.description"></span>
53
+          </p>
54
+          <div class="shows" id="shows">
55
+            <p v-if="valConfig==2">
56
+              <span class="fl">报修科室</span>
57
+              <span class="fr">{{model.incident.department?model.incident.department.dept:''}}</span>
58
+            </p>
59
+            <p v-if="valConfig==1">
60
+              <span class="fl">报修人</span>
61
+              <span class="fr">{{model.incident.requester.name}}</span>
62
+            </p>
63
+            <p v-if="valConfig==2">
64
+              <span class="fl">联系人</span>
65
+              <span class="fr">{{model.incident.contacts}}</span>
66
+            </p>
67
+            <p>
68
+              <span class="fl">联系电话</span>
69
+              <span class="fr">{{model.incident.contactsInformation}}</span>
70
+            </p>
71
+            <p>
72
+              <span class="fl">联系地址</span>
73
+              <span class="fr">{{model.incident.houseNumber||''}}</span>
74
+            </p>
75
+            <p class="boeder_B">
76
+              <span class="fl">事件来源</span>
77
+              <span class="fr">{{model.incident.source.name}}</span>
78
+            </p>
79
+            <!-- <p>
80
+              <span class="fl">影响度</span>
81
+              <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
82
+            </p>
83
+            <p>
84
+              <span class="fl">紧急度</span>
85
+              <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
86
+            </p> -->
87
+            <p>
88
+              <span class="fl">优先级</span>
89
+              <span class="fr">{{model.incident.priority?model.incident.priority.name:''}}</span>
90
+            </p>
91
+            <p>
92
+              <span class="fl">逾期响应时间</span>
93
+              <span class="fr">{{model.incident.overdueResponseDate}}</span>
94
+            </p>
95
+            <p>
96
+              <span class="fl">逾期解决时间</span>
97
+              <span class="fr">{{model.incident.overdueTime}}</span>
98
+            </p>
99
+          </div>
100
+          <p class="info_hide">
101
+            <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
102
+            <span class="fl hide" @click="hides()" v-if="item_hides">隐藏详情<<</span>
103
+          </p>
104
+          <div class="imgs-container" v-if="imgs.length">
105
+            <div class="imgs-cont">
106
+              <img v-if='img.suffix=="jpeg"||img.suffix=="jpg"||img.suffix=="gif"||img.suffix=="png"||img.suffix=="svg"||img.suffix=="pdf"' :src="img.previewUrl" v-for="(img, index) in imgs" class="imgs">
107
+              <p v-else>
108
+                <a :href='[img.previewUrl]'>{{img.name}}</a>
109
+              </p>
110
+            </div>
111
+          </div>
112
+
113
+          <div class="label" id="handlerInfo">处理信息</div>
114
+          <!-- <p>
115
+            <span class="fl">升级对象</span>
116
+            <span class="fr">{{model.isupreason?model.handlerUser.name:''}}</span>
117
+          </p>
118
+          <p>
119
+            <span class="fl">升级原因</span>
120
+            <span class="fr">{{model.isupreason?model.isupreason:''}}</span>
121
+          </p> -->
122
+          <p>
123
+            <span class="fl">处理方式</span>
124
+            <span
125
+              class="fr showwrap"
126
+            >{{model.incident.handleCategory?model.incident.handleCategory.name:''}}</span>
127
+          </p>
128
+          <div class="shows1" id="shows1">
129
+            <p>
130
+              <span class="fl">确认事件分类</span>
131
+              <span class="fr">{{model.incident.category.category}}</span>
132
+            </p>
133
+            <p>
134
+              <span class="fl">关闭代码</span>
135
+              <span class="fr">{{model.incident.closecode?model.incident.closecode.name:''}}</span>
136
+            </p>
137
+            <p class="desc">
138
+              <span class="fl">处理方案</span>
139
+              <span class="fr grayFont" v-html="model.incident.handleDescription"></span>
140
+            </p>
141
+          </div>
142
+          <p class="info_hide">
143
+            <span class="fl hide" @click="hides1()" v-if="!item_hides1">展开详情 >></span>
144
+            <span class="fl hide" @click="hides1()" v-if="item_hides1">隐藏详情<<</span>
145
+          </p>
146
+
147
+          <div class="label" id="closeInfo">关单信息</div>
148
+          <p>
149
+            <span class="fl">是否已解决</span>
150
+            <span class="fr">{{model.isclose=='close'?'已解决':'未解决'}}</span>
151
+          </p>
152
+          <p>
153
+            <span class="fl">结果类型</span>
154
+            <span class="fr">{{model.incident.handleResult?model.incident.handleResult.name:''}}</span>
155
+          </p>
156
+          <p>
157
+            <span class="fl">满意度评价</span>
158
+            <span class="fr">{{model.incident.degree?model.incident.degree.name:''}}</span>
159
+          </p>
160
+          <p>
161
+            <span class="fl">回访备注</span>
162
+            <span class="fr">{{model.incident.visitRemarks||''}}</span>
163
+          </p>
164
+
165
+          <div class="label" id="progress">处理进度</div>
166
+          <div :class="{'progress':true,'progressHide':!pro_hides}" id="progressBox">
167
+            <div class="progress_info" v-for="item in progressInfo">
168
+              <div class="progress_info_L">{{item.activityName}}</div>
169
+              <div class="progress_info_R">
170
+                <div class="time">
171
+                  <i
172
+                    :class="{'iconfont':true, 'icon-icon_weizuo':item.endTime!='','icon-icon_zhengzaijinx':item.endTime=='' }"
173
+                  ></i>
174
+                  <span class="text1">{{item.startTime}}</span>
175
+                </div>
176
+                <div
177
+                  :class="{'cont':true,'blue':item.endTime!='' }"
178
+                >
179
+                  <p class="text2" v-if="item.desc">{{item.desc}}</p>
180
+                </div>
181
+              </div>
182
+            </div>
183
+          </div>
184
+          <p class="info_hide">
185
+            <span class="fl hide" @click="proHides()">{{pro_hides?'隐藏详情 <<':'展开详情 >>'}}</span>
186
+          </p>
187
+        </div>
188
+      </div>
189
+      <load-ing v-if="!model.incident"></load-ing>
190
+    </div>
191
+  </div>
192
+</template>
193
+<script>
194
+import LoadIng from "./../views/loading.vue";
195
+export default {
196
+  data() {
197
+    return {
198
+      id:'',
199
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
200
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
201
+      selected: 1,
202
+      options: [
203
+        {
204
+          label: "接单",
205
+          value: 1
206
+        },
207
+        {
208
+          label: "关单信息",
209
+          value: 2
210
+        }
211
+      ],
212
+      resignComment: "", //重新指派原因
213
+      item_hides: false,
214
+      item_hides1: false,
215
+      actives: "info",
216
+      processInstanceId: "",
217
+      progressInfo: [], //处理进度
218
+      imgs: [], //图片
219
+      model: {}, //提交数据
220
+      pro_hides:false,//展开/收起处理进度
221
+    };
222
+  },
223
+  components: {
224
+    LoadIng
225
+  },
226
+  methods: {
227
+    //   获取事件数据
228
+    getParamsData() {
229
+      var that = this;
230
+      that.$http
231
+        .get(
232
+          "/service/form/renderForm/receiveform/" +
233
+            that.processInstanceId +
234
+            "/" +
235
+            that.loginUser.id+'/'+that.id,
236
+          {}
237
+        )
238
+        .then(function(res) {
239
+          console.log(res.data);
240
+          that.model = res.data.model;
241
+          //seimin
242
+          localStorage.setItem('modelData',JSON.stringify(that.model))
243
+        });
244
+    },
245
+    // 获取图片
246
+    getImgs() {
247
+      var that = this;
248
+      that.$http
249
+        .get(
250
+          "service/common/common/listAttachment/incident/" +
251
+            that.processInstanceId,
252
+          {}
253
+        )
254
+        .then(function(res) {
255
+          console.log(res.data);
256
+          that.imgs = res.data.data.splice(0, 3);
257
+          console.log(that.imgs);
258
+        });
259
+    },
260
+    // 获取处理进度
261
+    getProgressInfo() {
262
+      var that = this;
263
+      that.$http
264
+        .post(
265
+          "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
266
+          {}
267
+        )
268
+        .then(function(res) {
269
+          console.log(res.data);
270
+          that.progressInfo = res.data.data;
271
+          that.progressInfo.reverse();
272
+        });
273
+    },
274
+    //隐藏显示详情
275
+    hides() {
276
+      this.item_hides = !this.item_hides;
277
+      $("#shows").slideToggle();
278
+    },
279
+
280
+    // 处理进度隐藏/展开
281
+    proHides(){
282
+      if(!this.pro_hides){
283
+        $('#progressBox').animate({'height':$('#progressBox')[0].scrollHeight})
284
+      }else{
285
+        $('#progressBox').animate({'height':'1.7rem'})
286
+      }
287
+      this.pro_hides=!this.pro_hides;
288
+    },
289
+    //隐藏显示详情
290
+    hides1() {
291
+      this.item_hides1 = !this.item_hides1;
292
+      $("#shows1").slideToggle();
293
+    },
294
+    // 快速定位
295
+    toInfo(id) {
296
+      this.actives = id;
297
+      $("body,html").animate(
298
+        {
299
+          scrollTop:
300
+            $("#" + id).offset().top -
301
+            $(".header")[0].offsetHeight -
302
+            $(".navBar")[0].offsetHeight
303
+        },
304
+        260
305
+      );
306
+    }
307
+  },
308
+  created() {
309
+    // seimin
310
+    this.processInstanceId = this.$route.params.data
311
+      ? this.$route.params.data.processInstanceId
312
+      : JSON.parse(localStorage.getItem("modelData")).incident
313
+          .processInstanceId;
314
+          this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
315
+    this.getParamsData();
316
+    this.getProgressInfo();
317
+    this.getImgs();
318
+  }
319
+};
320
+</script>
321
+<style lang="less" scoped>
322
+i.iconfont {
323
+  &.blue {
324
+    color: #005395;
325
+    // &::after {
326
+    //   content: "";
327
+    //   width: 0.01rem;
328
+    //   height: 0.4rem;
329
+    //   background: #005395;
330
+    //   position: relative;
331
+    //   display: block;
332
+    //   left: 0.14rem;
333
+    // }
334
+  }
335
+  &.blue1 {
336
+    color: #005395;
337
+  }
338
+}
339
+.closed {
340
+  .header {
341
+    width: 100%;
342
+    height: 0.88rem;
343
+    line-height: 0.88rem;
344
+    text-align: center;
345
+    color: #fff;
346
+    font-size: 0.37rem;
347
+    background: linear-gradient(#2e2f32, #414246);
348
+    position: fixed;
349
+    top: 0;
350
+    z-index: 6;
351
+  }
352
+  .navBar {
353
+    width: 100%;
354
+    height: 0.96rem;
355
+    line-height: 0.96rem;
356
+    background-color: #fafafa;
357
+    font-size: 0.28rem;
358
+    position: fixed;
359
+    top: 0.88rem;
360
+    div {
361
+      width: 25%;
362
+      text-align: center;
363
+      a {
364
+        display: inline-block;
365
+        height: 0.9rem;
366
+        width: 1.7rem;
367
+        padding: 0 0.1rem;
368
+        &.active {
369
+          color: #005395;
370
+          border-bottom: 0.06rem solid #005395;
371
+        }
372
+      }
373
+    }
374
+  }
375
+
376
+  .headtop {
377
+    margin-top: 1.84rem;
378
+  }
379
+  .label {
380
+    background-color: #eeeeee;
381
+    height: 0.6rem;
382
+    line-height: 0.58rem;
383
+    padding-left: 0.2rem;
384
+    font-size: 0.24rem;
385
+    color: #666666;
386
+    span {
387
+      font-size: 0.2rem;
388
+      display: inline-block;
389
+      margin-left: 0.08rem;
390
+      color: #999999;
391
+    }
392
+    &.formLabel {
393
+      background-color: #fff;
394
+    }
395
+  }
396
+  .conentBox {
397
+    width: 100%;
398
+    .conent {
399
+      font-size: 0.32rem;
400
+      font-weight: 400;
401
+      line-height: 0.45rem;
402
+      // border-bottom: 0.16rem solid #e5e5e5;
403
+
404
+      .shows {
405
+        display: none;
406
+      }
407
+
408
+      .shows1 {
409
+        display: none;
410
+      }
411
+      .boeder_B {
412
+        border-bottom: 0.01rem solid #ccc;
413
+      }
414
+         p {
415
+          &.desc{
416
+            overflow: hidden;
417
+          }
418
+          .grayFont {
419
+            width: 75%;
420
+            text-align: right;
421
+            overflow-x: scroll;
422
+          }
423
+      }
424
+      .bottom {
425
+        overflow: hidden;
426
+        line-height: 0.86rem;
427
+        border-bottom: 0.01rem solid #e6e6e6;
428
+        font-size: 0.24rem;
429
+        color: #999;
430
+        padding: 0 0.24rem 0 0.48rem;
431
+      }
432
+      .info {
433
+        color: #999;
434
+        font-size: 0.28rem;
435
+        overflow: hidden;
436
+        .head {
437
+          border-bottom: 0.01rem solid #e6e6e6;
438
+          p {
439
+            padding: 0.24rem 0.3rem;
440
+            i {
441
+              color: #00559d;
442
+            }
443
+          }
444
+        }
445
+        p {
446
+          line-height: 0.4rem;
447
+          padding: 0.1rem 0.24rem;
448
+          overflow: hidden;
449
+          .overflowEllipsis2 {
450
+            margin-left: 1.96rem;
451
+          }
452
+        }
453
+        .info_hide {
454
+          padding: 0.2rem 0.24rem;
455
+          border-bottom: 0.01rem solid #e6e6e6;
456
+          .hide {
457
+            color: #00559d;
458
+          }
459
+        }
460
+        .imgs-container{
461
+          a{
462
+            color:#03c !important;
463
+            &:visited{
464
+              color: #551a8b !important;
465
+            }
466
+          }
467
+           img {
468
+            width: 1.5rem;
469
+            height: 1.5rem;
470
+            margin-right: 0.7rem;
471
+            &:nth-child(1) {
472
+              margin-left: 0.75rem;
473
+            }
474
+          }
475
+        }
476
+        .progress {
477
+          padding: 0.2rem 0.2rem;
478
+          overflow: hidden;
479
+          transition-duration: .2s;
480
+          transition-timing-function: linear;
481
+          &.progressHide{
482
+            height: 1.7rem;
483
+          }
484
+          .progress_info {
485
+            overflow: hidden;
486
+            margin-bottom: 0.1rem;
487
+            &:nth-last-child(1){
488
+              .cont{
489
+                border:none !important;
490
+              }
491
+            }
492
+            .progress_info_L {
493
+              float: left;
494
+              color: #333;
495
+              max-width: 18%;
496
+            }
497
+            .progress_info_R {
498
+              float: right;
499
+              margin-left: 0.09rem;
500
+              width: 80%;
501
+              font-size: 0.25rem;
502
+              .time {
503
+                i {
504
+                  margin-left: -0.15rem;
505
+                  &.icon-icon_weizuo {
506
+                    color: #005495;
507
+                  }
508
+                  &.icon-icon_zhengzaijinx {
509
+                    color: #48a843;
510
+                    font-size: 0.37rem;
511
+                  }
512
+                }
513
+                span {
514
+                  margin-left: 0.15rem;
515
+                }
516
+              }
517
+              .cont {
518
+                border-left: 1px solid #999;
519
+                padding-left: 0.4rem;
520
+                min-height: 0.4rem;
521
+                &.blue {
522
+                  border-left: 1px solid #005395;
523
+                }
524
+              }
525
+
526
+              .text1 {
527
+                font-size: 0.15rem;
528
+              }
529
+              .text2 {
530
+                color: #666;
531
+              }
532
+              p {
533
+                padding: 0;
534
+              }
535
+            }
536
+          }
537
+        }
538
+      }
539
+      .txtLabel {
540
+        width: 100%;
541
+        overflow: hidden;
542
+        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
543
+        .txt {
544
+          width: 30%;
545
+          color: #666;
546
+        }
547
+        .cube-textarea-wrapper {
548
+          width: 62%;
549
+        }
550
+      }
551
+      .sub {
552
+        background: #ececec;
553
+        .cube-btn {
554
+          background-color: #005395 !important;
555
+          width: 90%;
556
+          margin: 0.2rem auto;
557
+          border-radius: 8px;
558
+        }
559
+      }
560
+    }
561
+  }
562
+  .showwrap {
563
+    width: 75%;
564
+    text-align: right;
565
+  }
566
+}
567
+</style>

+ 0 - 101
src/views/commonProblem.vue

@@ -1,101 +0,0 @@
1
-<template>
2
-    <div>
3
-        <div class="label">
4
-            常见问题</div>
5
-        <div v-for="(v,index) in items">
6
-            <div class="title" @click="titClick(index)">
7
-                <span>{{v.title}}</span>
8
-                <i class="iconfont icon-moren ico"></i>
9
-            </div>
10
-            <div class="conent">
11
-                <div v-html="v.content"></div>
12
-            </div>
13
-        </div>
14
-    </div>
15
-</template>
16
-<script>
17
-export default {
18
-    data(){
19
-        return{
20
-            items:[
21
-                
22
-            ],
23
-            dictionaryId:"",
24
-            data:[]
25
-        }
26
-    },
27
-    methods:{
28
-        getParamsData(){
29
-            this.data=JSON.parse(this.$route.params.data)
30
-        },
31
-        titClick(res){
32
-            if($(".conent").eq(res).css("height")=="0px"){
33
-                $(".conent").eq(res).animate({"height":"100%"},0);
34
-                $(".ico").eq(res).css({"transform":"rotate(90deg)"})
35
-            }else{
36
-                $(".conent").eq(res).animate({"height":"0"},0);
37
-                $(".ico").eq(res).css({"transform":"rotate(0deg)"})
38
-            }
39
-        },
40
-        getDictionaryId(){
41
-            var that=this;
42
-            that.$http.post('service/solution/fetchDataList/serviceGuide',{
43
-                "idx": 0, 
44
-                "sum": 10,
45
-                "serviceGuide":{
46
-                    "serviceType":{"id":that.data.id},
47
-                    "status":1
48
-                }
49
-            }).then(function(res1){
50
-                that.items=res1.data.list
51
-            }) 
52
-        }
53
-    },
54
-    created(){
55
-        this.getParamsData();
56
-        this.getDictionaryId();
57
-    },
58
-    mounted(){
59
-    }
60
-}
61
-</script>
62
-<style scoped>
63
-.label {
64
-    background-color: rgb(238, 238, 238);
65
-    height: .6rem;
66
-    line-height: .6rem;
67
-    padding-left: .2rem;
68
-    font-size: .24rem;
69
-    color:#666666;
70
-    border-top: .01rem rgb(223, 222, 222) solid;
71
-    border-bottom: .01rem rgb(223, 222, 222) solid;
72
-}
73
-.title{
74
-    padding: 0 .24rem;
75
-    height: .88rem;
76
-    display: flex;
77
-    justify-content:space-between;
78
-    align-items:center;
79
-    border-bottom: .01rem rgb(223, 222, 222) solid;
80
-}
81
-.title span{
82
-    font-size: .32rem
83
-}
84
-.title i{
85
-    font-size: .32rem
86
-}
87
-.conent{
88
-    /* padding: .24rem; */
89
-    border-bottom: .01rem rgb(223, 222, 222) solid;
90
-    height: 0;
91
-    overflow: hidden;
92
-}
93
-.conent div{
94
-    padding: .24rem;
95
-    font-size: .28rem;
96
-    line-height: .39rem;
97
-    color: #666666;
98
-    overflow: hidden;
99
-    overflow-x: scroll
100
-}
101
-</style>

+ 0 - 383
src/views/evaluate.vue

@@ -1,383 +0,0 @@
1
-<template>
2
-    <div class="bgColor">
3
-        <div class="rapirMessage">
4
-            <div class="label">
5
-                报修信息
6
-            </div>
7
-            <div class="state">
8
-                <div>报修编号:&nbsp;{{data.incident.incidentsign}}</div>
9
-                <div :class="stateClassFn(data.state.name)">{{data.state.name}}</div>
10
-            </div>
11
-            <div class="description">
12
-                <div>
13
-                    报修内容:
14
-                </div>
15
-                <div>
16
-                    {{data.description||"暂无"}}
17
-                </div>
18
-            </div>
19
-            <div class="ipt">
20
-                <div>
21
-                    报修图片:
22
-                </div>
23
-                <div class="imgs-container">
24
-                    <img :src="img" v-for="(img, index) in imgs" @click="handleImgsClick(index)" v-if="imgs.length">
25
-                    <span v-if="!imgs.length">暂无</span>
26
-                </div>
27
-            </div>
28
-            <div class="faultLocation">
29
-                <div>
30
-                    报修地址:
31
-                </div>
32
-                <div>
33
-                    {{data.address}}
34
-                </div>
35
-            </div>
36
-        </div>
37
-        <div class="label">
38
-            报修评价
39
-        </div>
40
-        <div class="rate">
41
-            <span class="pj">评价:</span><cube-rate v-model="rate"></cube-rate>
42
-        </div>
43
-        <div class="rateText">
44
-            <cube-textarea v-model="rateText" placeholder="您可以从响应速度、解决情况、服务态度等方面,给我们作出相应的评价"></cube-textarea>
45
-        </div>
46
-        <div class="chehuiBox">
47
-
48
-        </div>
49
-        <div class="chehui">
50
-            <div class="btn" @click="evaluate()">提&nbsp;交&nbsp;评&nbsp;价</div>
51
-        </div>
52
-        <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
53
-    </div>
54
-</template>
55
-<script>
56
-import PrompTing from './../views/prompting.vue'
57
-export default {
58
-    data(){
59
-        return{
60
-            data:"",
61
-            imgs:[],
62
-            rate:0,
63
-            rateText:"",
64
-            rateData:1603,
65
-            promptingConent:"",
66
-            promptingStatus:"",
67
-            degreeDictionary:[]
68
-        }
69
-    },
70
-    methods:{
71
-        evaluate(){
72
-            if(this.rateData==1603){
73
-                this.$createDialog({
74
-                    type: 'alert',
75
-                    title: '评分未选',
76
-                    content: '请选择评分',
77
-                    icon: 'cubeic-wrong'
78
-                }).show()
79
-            }else if(this.rateText==""){
80
-                this.$createDialog({
81
-                    type: 'alert',
82
-                    title: '评价未填',
83
-                    content: '请作出您的评价',
84
-                    icon: 'cubeic-wrong'
85
-                }).show()
86
-            }else{
87
-                var that=this;
88
-                this.$http.post('service/apply/bpm/degree',{
89
-                    "id":that.data.id,
90
-                    "degree":this.rateData,
91
-                    "degreeRemark":this.rateText
92
-                }).then(function(res){
93
-                    if(res.status==200){
94
-                        that.promptingConent="恭喜您,评价成功!";
95
-                        that.promptingStatus=true;
96
-                        $("#fade").fadeIn();
97
-                        setTimeout(function(){
98
-                            $("#fade").fadeOut();
99
-                        },2000);
100
-                        that.dialog = that.$createDialog({
101
-                            type: 'alert',
102
-                            title: '恭喜您,提交评价成功!',
103
-                            content: '点击返回事件列表',
104
-                            icon: 'cubeic-right',
105
-                            onConfirm: (e, promptValue) => {
106
-                                that.$router.push({path:'/main/incidentList'})
107
-                            }
108
-                        }).show()
109
-                    }else{
110
-                        that.promptingConent="对不起,评价失败,请稍后再试!";
111
-                        that.promptingStatus=false;
112
-                        $("#fade").fadeIn();
113
-                        setTimeout(function(){
114
-                            $("#fade").fadeOut();
115
-                        },2000);
116
-                    }
117
-                })
118
-            }
119
-        },
120
-        getDeggreDictionart(){
121
-            var that=this;
122
-            this.$http.post('service/common/common/getDictionary',{
123
-                key: "incident_degree",
124
-                type: "list"
125
-            }).then(function(res){
126
-                that.degreeDictionary=res.data
127
-            })
128
-        },
129
-        getParams(){
130
-            this.data=JSON.parse(this.$route.params.data)
131
-        },
132
-        stateClassFn(data){
133
-            if(data=="未受理"){
134
-                return "weishouli"
135
-            }else if(data=="不受理"){
136
-                return "bushouli"
137
-            }else if(data=="处理中"){
138
-                return "chulizhong"
139
-            }else if(data=="待评价"){
140
-                return "daipingjia"
141
-            }else if(data=="已解决"){
142
-                return "yijiejue"
143
-            }else if(data=="已撤回"){
144
-                return "yichehui"
145
-            }else{
146
-                return "yichehui"
147
-            }
148
-        },
149
-        getImgsData(){
150
-            var that=this;
151
-            this.$http.get('service/common/common/listAttachment/wechatRequesterIncident/'+this.data.id,{
152
-            // this.$http.get('service/common/common/listAttachment/wechatRequesterIncident/'+this.data.bxcode,{
153
-            }).then(function(res){
154
-                for(var i=0;i<res.data.data.length;i++){
155
-                    // that.imgs.push("http://localhost/service/common/common/downloadAttachment/"+res.data.data[i].token)
156
-                    // that.imgs.push("http://weixintest.ngser.dashitech.com/service/common/common/downloadAttachment/"+res.data.data[i].token)
157
-                    that.imgs.push("http://itsmpoc.dashitech.com/service/common/common/downloadAttachment/"+res.data.data[i].token)
158
-                    // that.imgs.push("http://192.168.3.95/service/common/common/downloadAttachment/"+res.data.data[i].token)
159
-                }
160
-            })
161
-        },
162
-        handleImgsClick(index) {
163
-            this.initialIndex = index
164
-            const params = {
165
-            $props: {
166
-                imgs: this.imgs,
167
-                initialIndex: 'initialIndex',
168
-                loop: false
169
-            },
170
-            $events: {
171
-                change: (i) => {
172
-                this.initialIndex = i
173
-                }
174
-            }
175
-            }
176
-            this.$createImagePreview({ ...params }).show()
177
-        },
178
-    },
179
-    created(){
180
-        this.getParams(),
181
-        this.getImgsData(),
182
-        this.getDeggreDictionart()
183
-    },
184
-    mounted(){
185
-    },
186
-    components: {
187
-        PrompTing
188
-    },
189
-    watch:{
190
-        rate:{
191
-            handler:function(val){
192
-                console.log(this.degreeDictionary);
193
-                if(val==0){
194
-                    this.rateData=this.degreeDictionary[4].id
195
-                }else if(val==1){
196
-                    this.rateData=this.degreeDictionary[4].id
197
-                }else if(val==2){
198
-                    this.rateData=this.degreeDictionary[3].id
199
-                }else if(val==3){
200
-                    this.rateData=this.degreeDictionary[2].id
201
-                }else if(val==4){
202
-                    this.rateData=this.degreeDictionary[1].id
203
-                }else if(val==5){
204
-                    this.rateData=this.degreeDictionary[0].id
205
-                }
206
-            },
207
-            deep:true
208
-        }
209
-    }
210
-}
211
-</script>
212
-<style scoped>
213
-.bgColor{
214
-    background-color: white
215
-}
216
-.label{
217
-    background-color: rgb(238, 238, 238);
218
-    height: .6rem;
219
-    line-height: .6rem;
220
-    padding-left: .24rem;
221
-    font-size: .24rem;
222
-    color: #666666
223
-}
224
-.state{
225
-  display: flex;
226
-  justify-content:space-between;
227
-  align-items:center;
228
-  padding: 0 .24rem;
229
-  height: .88rem;
230
-  border-top: .01rem rgb(223, 222, 222) solid;
231
-  border-bottom: .01rem rgb(223, 222, 222) solid;
232
-}
233
-.state div:nth-child(1){
234
-  font-size: .32rem;
235
-  line-height: .45rem;
236
-  color:#333333
237
-}
238
-.state div:nth-child(2){
239
-  padding: .05rem .3rem;
240
-  /* border: 0.01rem rgb(0,0,255) solid; */
241
-  border-radius: 16px ;
242
-  /* color: rgb(0,0,255) */
243
-}
244
-.description{
245
-    display: flex;
246
-    justify-content:space-between;
247
-    padding: .24rem;
248
-    border-bottom: .01rem rgb(223, 222, 222) solid;
249
-}
250
-.description div:nth-child(1){
251
-    width: 20%;
252
-    font-size: .32rem;
253
-    color: #333333;
254
-    line-height: .45rem
255
-}
256
-.description div:nth-child(2){
257
-    width: 80%;
258
-    font-size: .32rem;
259
-    line-height: .45rem;
260
-    color: #333333
261
-}
262
-.ipt{
263
-    display: flex;
264
-    justify-content:space-between;
265
-    padding: .24rem;
266
-    border-bottom: .01rem rgb(223, 222, 222) solid;
267
-}
268
-.ipt div:nth-child(1){
269
-    width: 20%;
270
-    font-size: .32rem;
271
-    line-height: .45rem;
272
-    color: #333333
273
-}
274
-.ipt div:nth-child(2){
275
-    width: 80%;
276
-}
277
-.faultLocation{
278
-    display: flex;
279
-    justify-content:space-between;
280
-    padding: .24rem;
281
-    border-bottom: .01rem rgb(223, 222, 222) solid;
282
-}
283
-.faultLocation div:nth-child(1){
284
-    width: 20%;
285
-    font-size: .32rem;
286
-    line-height: .45rem;
287
-    color: #333333
288
-}
289
-.faultLocation div:nth-child(2){
290
-    width: 80%;
291
-    font-size: .32rem;
292
-    line-height: .45rem;
293
-    color: #333333
294
-}
295
-.imgs-container img{
296
-    width: 1.5rem;
297
-    height: 1.5rem;
298
-    margin-left: .2rem
299
-}
300
-.imgs-container img:nth-child(1){
301
-    margin-left: 0
302
-}
303
-.imgs-container span{
304
-    font-size: .32rem;
305
-    line-height: .45rem
306
-}
307
-.weishouli{
308
-  color:#991f00;
309
-  border: 0.01rem #991f00 solid;
310
-  background-color: #f4e8e5
311
-}
312
-.bushouli{
313
-  color:#666666;
314
-  background-color: #eeeeee;
315
-  border: 0.01rem #666666 solid;
316
-}
317
-.chulizhong{
318
-  color:#003057;
319
-  background-color: #e5eaee;
320
-  border: 0.01rem #003057 solid;
321
-}
322
-.daipingjia{
323
-  color:#825b00;
324
-  background-color: #f2eee5;
325
-  border: 0.01rem #825b00 solid;
326
-}
327
-.yijiejue{
328
-  color:#40a19c;
329
-  background-color: #ebf5f5;
330
-  border: 0.01rem #40a19c solid;
331
-}
332
-.yichehui{
333
-  color:#48a843;
334
-  background-color: #ecf6ec;
335
-  border: 0.01rem #48a843 solid;
336
-}
337
-.rate{
338
-    height: .88rem;
339
-    display: flex;
340
-    align-items:center;
341
-    padding: 0 .24rem;
342
-    border-bottom: .01rem rgb(223, 222, 222) solid;
343
-}
344
-.rate .pj{
345
-    font-size: .32rem;
346
-    display: inline-block;
347
-    margin-right: .2rem
348
-}
349
-.rateText{
350
-    padding: .24rem
351
-}
352
-.chehuiBox{
353
-    width: 100%;
354
-    height: 1.3rem;
355
-}
356
-.chehui{
357
-    height: 1.3rem;
358
-    width: 100%;
359
-    border-top: .01rem rgb(223, 222, 222) solid;
360
-    background-color: rgb(248,248,248);
361
-    position: fixed;
362
-    left: 0;
363
-    bottom: 0;
364
-    display: flex;
365
-    align-items:center;
366
-    justify-content:center
367
-}
368
-.chehui .btn{
369
-    width: 90%;
370
-    height: 1rem;
371
-    background-color: #005395;
372
-    border-radius: 10px;
373
-    line-height: 1rem;
374
-    color: white;
375
-    font-size: .36rem;
376
-    text-align: center
377
-}
378
-</style>
379
-<style>
380
-   .cube-textarea-wrapper{
381
-       height: 60px!important;
382
-   }
383
-</style>

+ 545 - 0
src/views/grabSheet.vue

@@ -0,0 +1,545 @@
1
+<template>
2
+  <div class="grabSheet">
3
+    <div class="conentBox">
4
+      <div class="conent" >
5
+        <div class="header">处理方案</div>
6
+        <div class="box" v-if="model.incident">
7
+          <div class="navBar">
8
+            <div class="fl">
9
+              <a :class="{active:actives=='info'}" href="javascript:;" @click="toInfo('info')">事件信息</a>
10
+            </div>
11
+            <div class="fl">
12
+              <a
13
+                :class="{active:actives=='progress'}"
14
+                href="javascript:;"
15
+                @click="toInfo('progress')"
16
+              >处理进度</a>
17
+            </div>
18
+          </div>
19
+          <div class="label headtop" id="info">事件信息</div>
20
+
21
+          <div class="info">
22
+            <div class="head">
23
+              <p>
24
+                <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
25
+                事件编号:{{model.incident?model.incident.incidentsign:''}}
26
+                <span
27
+                  class="fr btn daiqiangdan"
28
+                >待抢单</span>
29
+              </p>
30
+            </div>
31
+            <p>
32
+              <span class="fl">事件分类</span>
33
+              <span class="fr">{{model.incident.category.category||''}}</span>
34
+            </p>
35
+            <!-- <p>
36
+              <span class="fl">事件主题</span>
37
+              <span class="fr">{{model.incident.title||''}}</span>
38
+            </p> -->
39
+            <p class="desc">
40
+              <span class="fl">事件描述</span>
41
+              <span class="fr grayFont" v-html="model.incident.description"></span>
42
+            </p>
43
+            <div class="shows" id="shows">
44
+               <p v-if="valConfig==2">
45
+                <span class="fl">报修科室</span>
46
+                <span class="fr">{{model.incident.department?model.incident.department.dept:''}}</span>
47
+              </p>
48
+            <p v-if="valConfig==1">
49
+              <span class="fl">报修人</span>
50
+              <span class="fr">{{model.incident.requester.name}}</span>
51
+            </p>
52
+            <p v-if="valConfig==2">
53
+              <span class="fl">联系人</span>
54
+              <span class="fr">{{model.incident.contacts}}</span>
55
+            </p>
56
+              <p>
57
+                <span class="fl">联系电话</span>
58
+                <span class="fr">{{model.incident.contactsInformation||''}}</span>
59
+              </p>
60
+              <p>
61
+                <span class="fl">联系地址</span>
62
+                <span class="fr">{{model.incident.houseNumber||''||''}}</span>
63
+              </p>
64
+              <p class="boeder_B">
65
+                <span class="fl">事件来源</span>
66
+                <span class="fr">{{model.incident.source.name||''}}</span>
67
+              </p>
68
+              <!-- <p>
69
+                <span class="fl">影响度</span>
70
+                <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
71
+              </p>
72
+              <p>
73
+                <span class="fl">紧急度</span>
74
+                <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
75
+              </p> -->
76
+              <p>
77
+                <span class="fl">优先级</span>
78
+                <span class="fr">{{model.incident.priority?model.incident.priority.name:''}}</span>
79
+              </p>
80
+              <p>
81
+                <span class="fl">逾期响应时间</span>
82
+                <span class="fr">{{model.incident.overdueResponseDate||''}}</span>
83
+              </p>
84
+              <p>
85
+                <span class="fl">逾期解决时间</span>
86
+                <span class="fr">{{model.incident.overdueTime||''}}</span>
87
+              </p>
88
+            </div>
89
+            <p class="info_hide">
90
+              <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
91
+              <span class="fl hide" @click="hides()" v-if="item_hides">隐藏详情<<</span>
92
+            </p>
93
+            <div class="imgs-container" v-if="imgs.length">
94
+              <div class="imgs-cont">
95
+                <img v-if='img.suffix=="jpeg"||img.suffix=="jpg"||img.suffix=="gif"||img.suffix=="png"||img.suffix=="svg"||img.suffix=="pdf"' :src="img.previewUrl" v-for="(img, index) in imgs" class="imgs">
96
+                <p v-else>
97
+                  <a :href='[img.previewUrl]'>{{img.name}}</a>
98
+                </p>
99
+              </div>
100
+            </div>
101
+
102
+            <div class="label" id="progress">处理进度</div>
103
+            <div :class="{'progress':true,'progressHide':!pro_hides}" id="progressBox">
104
+              <div class="progress_info" v-for="item in progressInfo">
105
+                <div class="progress_info_L">{{item.activityName}}</div>
106
+                <div class="progress_info_R">
107
+                  <div class="time">
108
+                    <i
109
+                      :class="{'iconfont':true, 'icon-icon_weizuo':item.endTime!='','icon-icon_zhengzaijinx':item.endTime=='' }"
110
+                    ></i>
111
+                    <span class="text1">{{item.startTime}}</span>
112
+                  </div>
113
+                  <div
114
+                    :class="{'cont':true,'blue':item.endTime!='' }"
115
+                  >
116
+                    <p class="text2" v-if="item.desc">{{item.desc}}</p>
117
+                  </div>
118
+                </div>
119
+              </div>
120
+            </div>
121
+            <p class="info_hide">
122
+              <span class="fl hide" @click="proHides()">{{pro_hides?'隐藏详情 <<':'展开详情 >>'}}</span>
123
+            </p>
124
+          </div>
125
+          <cube-form-group class="sub">
126
+            <cube-button type="submit" @click="subVali()">抢单</cube-button>
127
+          </cube-form-group>
128
+        </div>
129
+      </div>
130
+
131
+        <load-ing v-if="!model.incident"></load-ing>
132
+    </div>
133
+  </div>
134
+</template>
135
+<script>
136
+import LoadIng from "./../views/loading.vue";
137
+export default {
138
+  data() {
139
+    return {
140
+      id:'',
141
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
142
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
143
+      selected: 1,
144
+      options: [
145
+        {
146
+          label: "接单",
147
+          value: 1
148
+        },
149
+        {
150
+          label: "重新指派",
151
+          value: 2
152
+        }
153
+      ],
154
+      resignComment: "", //重新指派原因
155
+      item_hides: false,
156
+      actives: "info",
157
+      processInstanceId: "",
158
+      progressInfo: [], //处理进度
159
+      imgs: [], //图片
160
+      model: {}, //提交数据
161
+      jurisdiction:false,//是否有抢单权限
162
+      pro_hides:false,//展开/收起处理进度
163
+    };
164
+  },
165
+  methods: {
166
+    //   获取事件数据
167
+    getParamsData() {
168
+      var that = this;
169
+      var groups=[];
170
+      that.loginUser.group.forEach(element => {
171
+        groups.push(element.id);
172
+      });
173
+      console.log(groups)
174
+      that.$http
175
+        .get(
176
+          "/service/form/renderForm/receiveform/" +
177
+            that.processInstanceId +
178
+            "/" +
179
+            that.loginUser.id+'/'+that.id,
180
+          {}
181
+        )
182
+        .then(function(res) {
183
+          console.log(res.data);
184
+          that.model = res.data.model;
185
+          for(var i =0;i<groups.length;i++){
186
+            if(groups[i]==that.model.incident.candidateGroups){
187
+              that.jurisdiction=true;
188
+            }
189
+          }
190
+          //seimin
191
+          localStorage.setItem('modelData',JSON.stringify(that.model))
192
+        });
193
+    },
194
+    // 获取图片
195
+    getImgs() {
196
+      var that = this;
197
+      that.$http
198
+        .get(
199
+          "service/common/common/listAttachment/incident/" +
200
+            that.processInstanceId,
201
+          {}
202
+        )
203
+        .then(function(res) {
204
+          console.log(res.data);
205
+          that.imgs = res.data.data.splice(0, 3);
206
+          console.log(that.imgs);
207
+        });
208
+    },
209
+    // 获取处理进度
210
+    getProgressInfo() {
211
+      var that = this;
212
+      that.$http
213
+        .post(
214
+          "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
215
+          {}
216
+        )
217
+        .then(function(res) {
218
+          console.log(res.data);
219
+          that.progressInfo = res.data.data;
220
+          that.progressInfo.reverse();
221
+        });
222
+    },
223
+    //隐藏显示详情
224
+    hides() {
225
+      this.item_hides = !this.item_hides;
226
+      $("#shows").slideToggle();
227
+    },
228
+    // 处理进度隐藏/展开
229
+    proHides(){
230
+      if(!this.pro_hides){
231
+        $('#progressBox').animate({'height':$('#progressBox')[0].scrollHeight})
232
+      }else{
233
+        $('#progressBox').animate({'height':'1.7rem'})
234
+      }
235
+      this.pro_hides=!this.pro_hides;
236
+    },
237
+    subVali() {
238
+      //数据提交
239
+      var that = this;
240
+      that.$http
241
+        .post(
242
+          "service/bpm/bpm/claimAndCompletedTask/" + that.model.incident.taskId,
243
+          { receive_code: "handler", userId: that.loginUser.id }
244
+        )
245
+        .then(function(res) {
246
+          console.log(res.data);
247
+          if (res.data.status == 200) {
248
+            $("#fade").fadeIn();
249
+            that.promptingConent = "恭喜您,抢单成功!";
250
+            that.promptingStatus = true;
251
+            that.dialog = that
252
+              .$createDialog({
253
+                type: "alert",
254
+                title: "抢单成功",
255
+                content: "点击返回首页",
256
+                icon: "cubeic-right",
257
+                onConfirm: (e, promptValue) => {
258
+                  that.$router.push({ path: "/main" });
259
+                }
260
+              })
261
+              .show();
262
+            setTimeout(function() {
263
+              $("#fade").fadeOut();
264
+            }, 2000);
265
+          }
266
+        });
267
+    },
268
+    // 快速定位
269
+    toInfo(id) {
270
+      this.actives = id;
271
+      $("body,html").animate(
272
+        {
273
+          scrollTop:
274
+            $("#" + id).offset().top -
275
+            $(".header")[0].offsetHeight -
276
+            $(".navBar")[0].offsetHeight
277
+        },
278
+        260
279
+      );
280
+    }
281
+  },
282
+  components: {
283
+    LoadIng,
284
+
285
+  },
286
+  created() {
287
+    // seimin
288
+    this.processInstanceId = this.$route.params.data
289
+      ? this.$route.params.data.processInstanceId
290
+      : JSON.parse(localStorage.getItem("modelData")).incident
291
+          .processInstanceId;
292
+          this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
293
+    this.getParamsData();
294
+    this.getProgressInfo();
295
+    this.getImgs();
296
+  }
297
+};
298
+</script>
299
+<style lang="less" scoped>
300
+// i.iconfont.green {
301
+//   color: #48a843;
302
+// &::after {
303
+//   content: "";
304
+//   width: 0.01rem;
305
+//   height: 0.4rem;
306
+//   background: #005395;
307
+//   position: relative;
308
+//   display: block;
309
+//   left: 0.14rem;
310
+// }
311
+// }
312
+.grabSheet {
313
+  .header {
314
+    width: 100%;
315
+    height: 0.88rem;
316
+    line-height: 0.88rem;
317
+    text-align: center;
318
+    color: #fff;
319
+    font-size: 0.37rem;
320
+    background: linear-gradient(#2e2f32, #414246);
321
+    position: fixed;
322
+    top: 0;
323
+    z-index: 6;
324
+  }
325
+  .box{
326
+    min-height: 9.7rem;
327
+    position: relative;
328
+
329
+  }
330
+  .navBar {
331
+    width: 100%;
332
+    height: 0.96rem;
333
+    line-height: 0.96rem;
334
+    background-color: #fafafa;
335
+    font-size: 0.28rem;
336
+    position: fixed;
337
+    top: 0.88rem;
338
+    div {
339
+      width: 49.99%;
340
+      text-align: center;
341
+      a {
342
+        display: inline-block;
343
+        height: 0.9rem;
344
+        width: 1.7rem;
345
+        padding: 0 0.1rem;
346
+        &.active {
347
+          color: #005395;
348
+          border-bottom: 0.06rem solid #005395;
349
+        }
350
+      }
351
+    }
352
+  }
353
+
354
+  .headtop {
355
+    margin-top: 1.84rem;
356
+  }
357
+  .label {
358
+    background-color: #eeeeee;
359
+    height: 0.6rem;
360
+    line-height: 0.58rem;
361
+    padding-left: 0.2rem;
362
+    font-size: 0.24rem;
363
+    color: #666666;
364
+    span {
365
+      font-size: 0.2rem;
366
+      display: inline-block;
367
+      margin-left: 0.08rem;
368
+      color: #999999;
369
+    }
370
+    &.formLabel {
371
+      background-color: #fff;
372
+    }
373
+  }
374
+  .conentBox {
375
+    width: 100%;
376
+    .conent {
377
+      font-size: 0.32rem;
378
+      font-weight: 400;
379
+      line-height: 0.45rem;
380
+      // border-bottom: 0.16rem solid #e5e5e5;
381
+
382
+      .shows {
383
+        display: none;
384
+      }
385
+      .boeder_B {
386
+        border-bottom: 0.01rem solid #ccc;
387
+      }
388
+      p {
389
+          &.desc{
390
+            overflow: hidden;
391
+          }
392
+          .grayFont {
393
+            width: 75%;
394
+            text-align: right;
395
+            overflow-x: scroll;
396
+          }
397
+      }
398
+      .bottom {
399
+        overflow: hidden;
400
+        line-height: 0.86rem;
401
+        border-bottom: 0.01rem solid #e6e6e6;
402
+        font-size: 0.24rem;
403
+        color: #999;
404
+        padding: 0 0.24rem 0 0.48rem;
405
+      }
406
+      .info {
407
+        color: #999;
408
+        font-size: 0.28rem;
409
+        overflow: hidden;
410
+        padding-bottom: 1.3rem;
411
+        .head {
412
+          border-bottom: 0.01rem solid #e6e6e6;
413
+          p {
414
+            padding: 0.24rem 0.3rem;
415
+            i {
416
+              color: #00559d;
417
+            }
418
+          }
419
+        }
420
+        p {
421
+          line-height: 0.4rem;
422
+          padding: 0.1rem 0.24rem;
423
+          overflow: hidden;
424
+          .overflowEllipsis2 {
425
+            margin-left: 1.96rem;
426
+          }
427
+        }
428
+        .info_hide {
429
+          padding: 0.2rem 0.24rem;
430
+          border-bottom: 0.01rem solid #e6e6e6;
431
+          .hide {
432
+            color: #00559d;
433
+          }
434
+        }
435
+        .imgs-container{
436
+          a{
437
+            color:#03c !important;
438
+            &:visited{
439
+              color: #551a8b !important;
440
+            }
441
+          }
442
+           img {
443
+            width: 1.5rem;
444
+            height: 1.5rem;
445
+            margin-right: 0.7rem;
446
+            &:nth-child(1) {
447
+              margin-left: 0.75rem;
448
+            }
449
+          }
450
+        }
451
+        .progress {
452
+          padding: 0.2rem 0.2rem;
453
+          overflow: hidden;
454
+          transition-duration: .2s;
455
+          transition-timing-function: linear;
456
+          &.progressHide{
457
+            height: 1.7rem;
458
+          }
459
+          .progress_info {
460
+            overflow: hidden;
461
+            margin-bottom: 0.1rem;
462
+            &:nth-last-child(1){
463
+              .cont{
464
+                border:none !important;
465
+              }
466
+            }
467
+            .progress_info_L {
468
+              float: left;
469
+              color: #333;
470
+              max-width: 18%;
471
+            }
472
+            .progress_info_R {
473
+              float: right;
474
+              margin-left: 0.09rem;
475
+              width: 80%;
476
+              font-size: 0.25rem;
477
+              .time {
478
+                i {
479
+                  margin-left: -0.15rem;
480
+                  &.icon-icon_weizuo {
481
+                    color: #005495;
482
+                  }
483
+                  &.icon-icon_zhengzaijinx {
484
+                    color: #48a843;
485
+                    font-size: 0.37rem;
486
+                  }
487
+                }
488
+                span {
489
+                  margin-left: 0.15rem;
490
+                }
491
+              }
492
+              .cont {
493
+                border-left: 1px solid #999;
494
+                padding-left: 0.4rem;
495
+                min-height: 0.4rem;
496
+                &.blue {
497
+                  border-left: 1px solid #005395;
498
+                }
499
+              }
500
+
501
+              .text1 {
502
+                font-size: 0.15rem;
503
+              }
504
+              .text2 {
505
+                color: #666;
506
+              }
507
+              p {
508
+                padding: 0;
509
+              }
510
+            }
511
+          }
512
+        }
513
+      }
514
+      .txtLabel {
515
+        width: 100%;
516
+        overflow: hidden;
517
+        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
518
+        .txt {
519
+          width: 30%;
520
+          color: #666;
521
+        }
522
+        .cube-textarea-wrapper {
523
+          width: 62%;
524
+        }
525
+      }
526
+      .sub {
527
+        background: #ececec;
528
+        position: absolute;
529
+        bottom: 0;
530
+        width: 100%;
531
+        .cube-btn {
532
+          background-color: #005395 !important;
533
+          width: 90%;
534
+          margin: 0.2rem auto;
535
+          border-radius: 8px;
536
+        }
537
+      }
538
+    }
539
+  }
540
+  .showwrap {
541
+    width: 75%;
542
+    text-align: right;
543
+  }
544
+}
545
+</style>

+ 342 - 54
src/views/guide.vue

@@ -1,71 +1,359 @@
1 1
 <template>
2
-    <div class="bgColor">
3
-        <div class="label">
4
-            服务指南</div>
5
-        <ul>
6
-            <li @click="toCommonProblem(v)" v-for="v in listData">
7
-                <span>{{v.name}}</span>
2
+  <div class="bgColor">
3
+    <div class="header">公告列表</div>
4
+    <div class="search">
5
+      <input type="text" placeholder="搜索" v-model="search" @input="searchData()">
6
+    </div>
7
+    <div slot="content" class="scroll-wrapper nav">
8
+      <div class="demo">
9
+        <div class="scroll-list-wrap">
10
+          <cube-scroll
11
+            ref="scroll"
12
+            :data="items"
13
+            :options="options"
14
+            @pulling-down="onPullingDown"
15
+            @pulling-up="onPullingUp"
16
+          >
17
+            <div class="list">
18
+              <div class="item" v-for="item in items" @click="toDetail(item)">
19
+                <div
20
+                  class="title overflowEllipsis2"
21
+                  style="-webkit-box-orient: vertical !important;"
22
+                >{{item.title}}</div>
8 23
                 <i class="iconfont icon-moren"></i>
9
-            </li>
10
-        </ul>
24
+                <p class="time">{{item.createTime}}</p>
25
+              </div>
26
+            </div>
27
+            <div class="wushuju" v-show="items.length==0&&wushuju&&!loadShow">
28
+              <img src="./../../static/images/wushuju.svg" alt>
29
+              <p>暂无公告</p>
30
+            </div>
31
+            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
32
+              <div
33
+                v-if="props.pullDownRefresh"
34
+                class="cube-pulldown-wrapper"
35
+                :style="props.pullDownStyle"
36
+              >
37
+                <div
38
+                  v-show="props.beforePullDown"
39
+                  class="before-trigger"
40
+                  :style="{paddingTop: props.bubbleY + 'px'}"
41
+                >
42
+                  <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 40}">↓</span>
43
+                </div>
44
+                <div class="after-trigger" v-show="!props.beforePullDown">
45
+                  <div v-show="props.isPullingDown" class="loading">
46
+                    <cube-loading></cube-loading>
47
+                  </div>
48
+                  <div v-show="!props.isPullingDown" class="text">
49
+                    <!-- <span class="refresh-text">更新成功</span> -->
50
+                    <span class="refresh-text"></span>
51
+                  </div>
52
+                </div>
53
+              </div>
54
+            </template>
55
+          </cube-scroll>
56
+        </div>
57
+      </div>
11 58
     </div>
59
+    <load-ing v-show="loadShow&&!items.length"></load-ing>
60
+  </div>
12 61
 </template>
13 62
 <script>
63
+import Vue from "vue";
64
+import LoadIng from "./../views/loading.vue";
14 65
 export default {
15
-    data(){
16
-        return{
17
-            listData:[]
18
-        }
66
+  data() {
67
+    return {
68
+      pullDownRefresh: true,
69
+      pullDownRefreshThreshold: 60,
70
+      pullDownRefreshStop: 40,
71
+      pullDownRefreshTxt: "Refresh success",
72
+      pullUpLoad: true,
73
+      pullUpLoadThreshold: 0,
74
+      pullUpLoadMoreTxt: "加载更多",
75
+      pullUpLoadNoMoreTxt: "没有更多数据",
76
+      wushuju: false,
77
+      customPullDown: true,
78
+      loadShow: true,
79
+      noMore: false,
80
+      sum: 10,
81
+      idx: 0,
82
+      search: "",
83
+      items: [],
84
+      searching:false
85
+    };
86
+  },
87
+  computed: {
88
+    options() {
89
+      return {
90
+        pullDownRefresh: this.pullDownRefreshObj,
91
+        pullUpLoad: this.pullUpLoadObj,
92
+        scrollbar: true
93
+      };
19 94
     },
20
-    methods:{
21
-        toCommonProblem(data){
22
-            this.$router.push({
23
-                name:"CommonProblem",
24
-                params:{
25
-                    data:JSON.stringify(data)
26
-                }
27
-            })
28
-        },
29
-        getDictionary(){
30
-            var that=this;
31
-            this.$http.post('service/common/common/getDictionary',{"key":"service_type","type":"list"}).then(function(res){
32
-                that.listData=res.data;
33
-            })
34
-        }
95
+    pullDownRefreshObj: function() {
96
+      return this.pullDownRefresh
97
+        ? {
98
+            threshold: parseInt(this.pullDownRefreshThreshold),
99
+            txt: this.pullDownRefreshTxt
100
+          }
101
+        : false;
102
+    },
103
+    pullUpLoadObj: function() {
104
+      return this.pullUpLoad
105
+        ? {
106
+            threshold: parseInt(this.pullUpLoadThreshold),
107
+            txt: {
108
+              more: this.pullUpLoadMoreTxt,
109
+              noMore: this.pullUpLoadNoMoreTxt
110
+            }
111
+          }
112
+        : false;
113
+    }
114
+  },
115
+  components: {
116
+    LoadIng
117
+  },
118
+  methods: {
119
+    // 搜索
120
+    searchData() {
121
+      var that = this;
122
+      that.idx = 0;
123
+      that.items = [];
124
+      that.searching=true;
125
+      that.getData();
126
+    },
127
+    // 获取数据
128
+    getData() {
129
+      var that = this;
130
+      that.loadShow = true;
131
+      that.$http
132
+        .post("service/user/data/fetchDataList/notice", {
133
+          idx: that.idx,
134
+          sum: that.sum,
135
+          notice: { title: that.search, status: 1 }
136
+        })
137
+        .then(function(res) {
138
+          if (res.data.list.length > 0) {
139
+            if (that.searching) {
140
+              that.items = res.data.list;
141
+            } else {
142
+              that.items = that.items.concat(res.data.list);
143
+            }
144
+            that.wushuju = false;
145
+          } else {
146
+            that.wushuju = true;
147
+            that.$refs.scroll.forceUpdate();
148
+          }
149
+          that.loadShow = false;
150
+        });
151
+    },
152
+    // 查看详情
153
+    toDetail(item) {
154
+      this.$router.push({ name: "GuideDetail", params: { data: item } });
155
+    },
156
+    onPullingDown() {
157
+      var that = this;
158
+      that.idx = 0;
159
+      that.sum = 10;
160
+      that.items = [];
161
+      that.loadShow = true;
162
+      setTimeout(() => {
163
+        that.getData();
164
+      }, 500);
165
+    },
166
+    onPullingUp() {
167
+      var that = this;
168
+      that.idx += 1;
169
+      that.searching=false;
170
+      that.loadShow = true;
171
+      that.getData();
172
+    },
173
+    updatePullDownRefresh(val) {
174
+      this.pullDownRefresh = val;
175
+    },
176
+    updatePullDownRefreshThreshold(val) {
177
+      this.pullDownRefreshThreshold = val;
178
+    },
179
+    updatePullDownRefreshTxt(val) {
180
+      this.pullDownRefreshTxt = val;
181
+    },
182
+    updatePullUpLoad(val) {
183
+      this.pullUpLoad = val;
184
+    },
185
+    updatePullUpLoadThreshold(val) {
186
+      this.pullUpLoadThreshold = val;
187
+    },
188
+    updatePullUpLoadMoreTxt(val) {
189
+      this.pullUpLoadMoreTxt = val;
35 190
     },
36
-    mounted(){
191
+    updatePullUpLoadNoMoreTxt(val) {
192
+      this.pullUpLoadNoMoreTxt = val;
37 193
     },
38
-    created(){
39
-        this.getDictionary()
194
+    updateCustomPullDown(val) {
195
+      this.customPullDown = val;
196
+    },
197
+    rebuildScroll() {
198
+      Vue.nextTick(() => {
199
+        this.$refs.scroll.destroy();
200
+        this.$refs.scroll.initScroll();
201
+      });
40 202
     }
41
-}
203
+  },
204
+  mounted() {},
205
+  created() {
206
+    this.getData();
207
+  }
208
+};
42 209
 </script>
43
-<style scoped>
44
-.bgColor{
45
-    background-color: white
210
+<style lang="stylus" rel="stylesheet/stylus" scoped>
211
+.scroll-list-wrap {
212
+  /* height: 350px */
213
+  height: 87vh;
214
+  /* border: 1px solid rgba(0, 0, 0, 0.1) */
215
+  border-radius: 5px;
216
+  transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
217
+  overflow: hidden;
218
+  padding-top: 14vh;
46 219
 }
47
-.label {
48
-    background-color: rgb(238, 238, 238);
49
-    height: .6rem;
50
-    line-height: .6rem;
51
-    padding-left: .2rem;
52
-    font-size: .24rem;
53
-    color:#666666;
54
-    border-top: .01rem rgb(223, 222, 222) solid;
55
-    border-bottom: .01rem rgb(223, 222, 222) solid;
56
-}
57
-li{
58
-    height: .88rem;
59
-    padding: 0 .24rem;
220
+
221
+.foods-wrapper {
222
+  .food-item {
60 223
     display: flex;
61
-    align-items:center;
62
-    justify-content:space-between;
63
-    border-bottom: .01rem rgb(223, 222, 222) solid;
224
+
225
+    /* min-width: 0 */
226
+    /* padding: 18px
227
+    border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
228
+    &:last-child {
229
+      border-none();
230
+      margin-bottom: 0;
231
+    }
232
+
233
+    .food-content {
234
+      flex: 1;
235
+      min-width: 0;
236
+
237
+      .cartcontrol-wrapper {
238
+        position: absolute;
239
+        right: 0;
240
+        bottom: 12px;
241
+
242
+        .scroll-wrapper {
243
+          .cube-pulldown-wrapper {
244
+            .before-trigger {
245
+              font-size: 30px;
246
+              line-height: 30px;
247
+              align-self: flex-end;
248
+
249
+              span {
250
+                display: inline-block;
251
+                transition: all 0.3s;
252
+                color: #666;
253
+
254
+                &.rotate {
255
+                  transform: rotate(180deg);
256
+                }
257
+              }
258
+            }
259
+
260
+            .after-trigger {
261
+              .refresh-text {
262
+                color: grey;
263
+              }
264
+            }
265
+          }
266
+        }
267
+      }
268
+    }
269
+  }
270
+}
271
+</style>
272
+<style scoped lang='less'>
273
+.bgColor {
274
+  background-color: white;
275
+}
276
+.header {
277
+  width: 100%;
278
+  height: 0.88rem;
279
+  line-height: 0.88rem;
280
+  text-align: center;
281
+  color: #fff;
282
+  font-size: 0.37rem;
283
+  background: linear-gradient(#2e2f32, #414246);
284
+  position: fixed;
285
+  top: 0;
286
+  z-index: 6;
287
+}
288
+.search {
289
+  padding: 0.16rem 0.24rem;
290
+  box-sizing: border-box;
291
+  width: 100%;
292
+  background-color: #eeeeee;
293
+  border-bottom: 0.01rem #b7b7b7 solid;
294
+  position: fixed;
295
+  top: 0.88rem;
296
+  z-index: 6;
297
+  input {
298
+    width: 100%;
299
+    height: 0.56rem;
300
+    border-radius: 4px;
301
+    text-align: center;
302
+    font-size: 0.28rem;
303
+    &:focus {
304
+      outline: none;
305
+    }
306
+  }
307
+}
308
+.list {
309
+  .item {
310
+    padding-left: 0.24rem;
311
+    border-bottom: 0.01rem solid #e3e3e3;
312
+    position: relative;
313
+    padding-right: 0.9rem;
314
+    .iconfont {
315
+      position: absolute;
316
+      right: 0.24rem;
317
+      top: 40%;
318
+      color: #999;
319
+    }
320
+    .title {
321
+      font-size: 0.32rem;
322
+      color: #333;
323
+      line-height: 0.45rem;
324
+      // padding-right: 0.96rem;
325
+      padding-top: 0.24rem;
326
+      position: relative;
327
+      max-height: 0.9rem;
328
+      // max-width: 88%;
329
+      i {
330
+        position: absolute;
331
+        right: 0.24rem;
332
+        top: 56%;
333
+        color: #999;
334
+        font-size: 0.34rem;
335
+      }
336
+    }
337
+    .time {
338
+      font-size: 0.24rem;
339
+      color: #999;
340
+      line-height: 0.6rem;
341
+    }
342
+  }
343
+}
344
+.loading {
345
+  height: 2rem;
346
+  display: flex;
347
+  justify-content: center;
348
+  align-items: center;
64 349
 }
65
-li span{
66
-    font-size: .32rem
350
+.wushuju {
351
+  margin-top: 2.4rem;
352
+  text-align: center;
353
+  color: #999;
67 354
 }
68
-li i{
69
-    font-size: .32rem
355
+.wushuju img {
356
+  width: 5.12rem;
357
+  height: 2.84rem;
70 358
 }
71 359
 </style>

+ 90 - 0
src/views/guideDetail.vue

@@ -0,0 +1,90 @@
1
+<template>
2
+  <div>
3
+    <div class="header">公告详情</div>
4
+    <div class="title">
5
+      <div>{{data.title}}</div>
6
+      <div class="info">
7
+        <span class="fl">{{data.dept.dept}}</span>
8
+        <span class="fr">{{data.createTime}}</span>
9
+      </div>
10
+    </div>
11
+    <div class="content" v-html="data.content"></div>
12
+    <!-- <div class="txtRight">后勤部</div>
13
+    <div class="txtRight">2018-08-19</div>-->
14
+  </div>
15
+</template>
16
+<script>
17
+export default {
18
+  data() {
19
+    return {
20
+      items: [],
21
+      data: {}
22
+    };
23
+  },
24
+  methods: {
25
+    getData() {
26
+      var that = this;
27
+      that.data =that.$route.params.data;
28
+      console.log(that.data)
29
+    }
30
+  },
31
+  created() {
32
+    this.getData();
33
+  },
34
+  mounted() {}
35
+};
36
+</script>
37
+<style scoped lang='less'>
38
+.header {
39
+  width: 100%;
40
+  height: 0.88rem;
41
+  line-height: 0.88rem;
42
+  text-align: center;
43
+  color: #fff;
44
+  font-size: 0.37rem;
45
+  background: linear-gradient(#2e2f32, #414246);
46
+  position: fixed;
47
+  top: 0;
48
+  z-index: 6;
49
+}
50
+
51
+.title {
52
+  padding: 0 0.24rem;
53
+  //   height: 0.88rem;
54
+  font-size: 0.36rem;
55
+  margin-top: .88rem;
56
+  div {
57
+    width: 100%;
58
+    line-height: 0.88rem;
59
+    &.info {
60
+      overflow: hidden;
61
+      line-height: 0.45rem;
62
+      border-bottom: 0.01rem rgb(223, 222, 222) solid;
63
+      span {
64
+        color: #999;
65
+        font-size: 0.24rem;
66
+      }
67
+    }
68
+  }
69
+}
70
+
71
+.content {
72
+  color: #333;
73
+  font-size: 0.32rem;
74
+  padding: 0.32rem;
75
+  line-height: 0.45rem;
76
+  text-indent: 0.7rem;
77
+  margin-bottom: 0.32rem;
78
+  overflow: hidden;
79
+  .table{
80
+    width: 100% !important;
81
+  }
82
+}
83
+.txtRight {
84
+  color: #333;
85
+  font-size: 0.32rem;
86
+  text-align: right;
87
+  padding-right: 0.32rem;
88
+  line-height: 0.45rem;
89
+}
90
+</style>

+ 0 - 661
src/views/incidentDetails.vue

@@ -1,661 +0,0 @@
1
-<template>
2
-    <div class="bgColor">
3
-        <div class="rapirMessage">
4
-            <div class="label">
5
-                报修信息
6
-            </div>
7
-            <div class="state">
8
-                <div>报修编号:&nbsp;{{data.bxcode}}</div>
9
-                <div :class="stateClassFn(data.state.name)">{{data.state.name}}</div>
10
-            </div>
11
-            <div class="description">
12
-                <div>
13
-                    报修内容:
14
-                </div>
15
-                <div>
16
-                    {{data.description||"暂无"}}
17
-                </div>
18
-            </div>
19
-            <div class="ipt">
20
-                <div>
21
-                    报修图片:
22
-                </div>
23
-                <div class="imgs-container">
24
-                    <img :src="img" v-for="(img, index) in imgs" @click="handleImgsClick(index)" v-if="imgs.length">
25
-                    <span v-if="!imgs.length">暂无</span>
26
-                </div>
27
-            </div>
28
-            <div class="faultLocation">
29
-                <div>
30
-                    报修地址:
31
-                </div>
32
-                <div>
33
-                    {{data.address}}
34
-                </div>
35
-            </div>
36
-        </div>
37
-        <div class="repairProgress">
38
-            <div class="label">
39
-                报修进度
40
-            </div>
41
-            <div class="handleUser">
42
-                <div>维修人:&nbsp;&nbsp;{{data.incident.handlingPersonnelUser&&data.incident.handlingPersonnelUser.name?data.incident.handlingPersonnelUser.name:"暂无"}}</div>
43
-                <div>电话:&nbsp;&nbsp;<span>{{data.incident.handlingPersonnelUser&&data.incident.handlingPersonnelUser.phone?data.incident.handlingPersonnelUser.phone:"暂无"}}</span></div>
44
-                <!-- <a href="tel:13429850125"><i class="iconfont icon-shouji"></i></a> -->
45
-                <a :href="getPhoneNum(data.incident.handlingPersonnelUser)"><i class="iconfont icon-shouji"></i></a>
46
-            </div>
47
-        </div>
48
-        <!-- 流程图 -->
49
-        <div class="processBox">
50
-            <div class="process" v-if="processData=='不受理'||processData=='结束'||processData=='已撤回'||processData=='重复事件'">
51
-                <div class="status">
52
-                    {{processMessage[4]?processMessage[4].name:""}}
53
-                </div>
54
-                <div class="ico">
55
-                    <i class="iconfont icon-icon_weizuo last"></i>
56
-                </div>
57
-                <div class="time">
58
-                    {{processTime[4]?processTime[4].startTime:""}}
59
-                </div>
60
-            </div>
61
-            <div class="processCont" v-if="processData=='不受理'||processData=='结束'||processData=='已撤回'||processData=='重复事件'">
62
-                <div class="status">
63
-                </div>
64
-                <div class="conents">
65
-                    {{processMessage[4]?processMessage[4].desc:""}}
66
-                </div>
67
-            </div>
68
-            <div class="process" v-if="processData=='评价'||processData=='结束'&&processData!='重复事件'">
69
-                <div class="status">
70
-                    {{processMessage[3]?processMessage[3].name:""}}
71
-                </div>
72
-                <div class="ico">
73
-                    <i class="iconfont icon-icon_zhengzaijinx now" v-if="processData=='评价'"></i>
74
-                    <i class="iconfont icon-icon_weizuo last" v-if="processData!='评价'"></i>
75
-                </div>
76
-                <div class="time">
77
-                    {{processTime[3]?processTime[3].startTime:""}}
78
-                </div>
79
-            </div>
80
-            <div class="processCont" v-if="processData=='评价'||processData=='结束'&&processData!='重复事件'">
81
-                <div class="status">
82
-                </div>
83
-                <div class="conents">
84
-                    {{processMessage[3]?processMessage[3].desc:""}}
85
-                </div>
86
-            </div>
87
-            <div class="process" v-if="processData=='处理'||processData=='评价'||processData=='结束'&&processData!='重复事件'">
88
-                <div class="status">
89
-                    {{processMessage[2]?processMessage[2].name:""}}
90
-                </div>
91
-                <div class="ico">
92
-                    <i class="iconfont icon-icon_zhengzaijinx now" v-if="processData=='处理'"></i>
93
-                    <i class="iconfont icon-icon_weizuo last" v-if="processData!='处理'"></i>
94
-                </div>
95
-                <div class="time">
96
-                    {{processTime[2]?processTime[2].startTime:""}}
97
-                </div>
98
-            </div>
99
-            <div class="processCont" v-if="processData=='处理'||processData=='评价'||processData=='结束'&&processData!='重复事件'">
100
-                <div class="status">
101
-                </div>
102
-                <div class="conents">
103
-                    {{processMessage[2]?processMessage[2].desc:""}}
104
-                </div>
105
-            </div>
106
-            <div class="process" v-if="processData=='受理'||processData=='处理'||processData=='评价'||processData=='结束'&&processData!='重复事件'">
107
-                <div class="status">
108
-                    {{processMessage[1]?processMessage[1].name:""}}
109
-                </div>
110
-                <div class="ico">
111
-                    <i class="iconfont icon-icon_zhengzaijinx now" v-if="processData=='受理'"></i>
112
-                    <i class="iconfont icon-icon_weizuo last" v-if="processData!='受理'"></i>
113
-                </div>
114
-                <div class="time">
115
-                    {{processTime[1]?processTime[1].startTime:""}}
116
-                </div>
117
-            </div>
118
-            <div class="processCont" v-if="processData=='受理'||processData=='处理'||processData=='评价'||processData=='结束'&&processData!='重复事件'">
119
-                <div class="status">
120
-                </div>
121
-                <div class="conents">
122
-                    {{processMessage[1]?processMessage[1].desc:""}}
123
-                </div>
124
-            </div>
125
-            <div class="process">
126
-                <div class="status">
127
-                    {{processMessage[0]?processMessage[0].name:""}}
128
-                </div>
129
-                <div class="ico">
130
-                    <i class="iconfont icon-icon_zhengzaijinx now" v-if="processData=='申请'"></i>
131
-                    <i class="iconfont icon-icon_weizuo last" v-if="processData!='申请'"></i>
132
-                </div>
133
-                <div class="time">
134
-                    {{data.createTime}}
135
-                </div>
136
-            </div>
137
-            <div class="processCont">
138
-                <div class="status">
139
-                </div>
140
-                <div class="conents lastConents">
141
-                    {{processMessage[0]?processMessage[0].desc:""}}
142
-                </div>
143
-            </div>
144
-        </div>
145
-        <!-- 撤回原因 -->
146
-        <div class="label" v-if="processData=='已撤回'">
147
-            撤回原因
148
-        </div>
149
-        <div class="faultLocation" v-if="processData=='已撤回'">
150
-            <div>
151
-                撤回原因:
152
-            </div>
153
-            <div>
154
-                {{data.retractReason||"暂无"}}
155
-            </div>
156
-        </div>
157
-        <!-- 不受理原因 -->
158
-        <div class="label" v-if="processData=='不受理'">
159
-            不受理原因
160
-        </div>
161
-        <div class="faultLocation2" v-if="processData=='不受理'">
162
-            <div>
163
-                不受理原因:
164
-            </div>
165
-            <div>
166
-                {{data.rejectRemark||"暂无"}}
167
-            </div>
168
-        </div>
169
-        <div class="chehui" v-if="processData=='申请'">
170
-            <div class="btn" @click="cehui()">撤&nbsp;回</div>
171
-        </div>
172
-        <div class="chehui" v-if="processData=='评价'">
173
-            <div class="btn" @click="evaluate()">评&nbsp;价</div>
174
-        </div>
175
-        <div class="fot"></div>
176
-        <load-ing v-show="loadShow"></load-ing>
177
-        <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
178
-    </div>
179
-</template>
180
-<script>
181
-import PrompTing from './../views/prompting.vue'
182
-import LoadIng from './../views/loading.vue'
183
-export default {
184
-    data(){
185
-        return{
186
-            data:"",
187
-            initialIndex: 0,
188
-            imgs: [
189
-
190
-            ],
191
-            processData:"",
192
-            loadShow:false,
193
-            promptingConent:"",
194
-            promptingStatus:"",
195
-            processTime:[],
196
-            processMessage:[],
197
-            shenqing:"",
198
-            shouli:"",
199
-            chuli:"",
200
-            pingjia:"",
201
-            jieshu:""
202
-        }
203
-    },
204
-    methods:{
205
-        getPhoneNum(res){
206
-            if(res){
207
-                return "tel:"+res.phone
208
-            }else{
209
-                return "tel:"+""
210
-            }
211
-        },
212
-        evaluate(){
213
-            var that=this;
214
-            this.$router.push({
215
-                name:'Evaluate',
216
-                params:{
217
-                    data:JSON.stringify(that.data)
218
-                }
219
-            })
220
-        },
221
-        cehui(){
222
-            var that=this;
223
-            this.dialog = this.$createDialog({
224
-                type: 'prompt',
225
-                title: '请填写撤回原因',
226
-                prompt: {
227
-                value: '',
228
-                placeholder: '请输入撤回原因'
229
-                },
230
-                onConfirm: (e, promptValue) => {
231
-                    if(!promptValue){
232
-                        this.$createDialog({
233
-                            type: 'alert',
234
-                            title: '撤回原因不能为空',
235
-                            content: '请重新填写',
236
-                            icon: 'cubeic-wrong'
237
-                        }).show()
238
-                    }else{
239
-                        // that.loadShow=true;
240
-                        that.$http.post('service/apply/bpm/retract',{
241
-                            "id":that.data.id,
242
-                            "retractReason":promptValue
243
-                        }).then(function(res){
244
-                            // that.loadShow=false;
245
-                            if(res.status==200){
246
-                                that.promptingConent="恭喜您,撤回成功!";
247
-                                that.promptingStatus=true;
248
-                                $("#fade").fadeIn();
249
-                                setTimeout(function(){
250
-                                    $("#fade").fadeOut();
251
-                                },2000);
252
-                                that.dialog = that.$createDialog({
253
-                                    type: 'alert',
254
-                                    title: '撤回成功',
255
-                                    icon: 'cubeic-right',
256
-                                    onConfirm: (e, promptValue) => {
257
-                                        that.$router.push({path:'/main/incidentList'})
258
-                                    }
259
-                                }).show()
260
-                            }else{
261
-                                that.promptingConent="撤回失败,请稍后再试!";
262
-                                that.promptingStatus=false;
263
-                                $("#fade").fadeIn();
264
-                                setTimeout(function(){
265
-                                    $("#fade").fadeOut();
266
-                                },2000);
267
-                                that.dialog = that.$createDialog({
268
-                                    type: 'alert',
269
-                                    title: '撤回失败',
270
-                                    icon: 'cubeic-wrong',
271
-                                    onConfirm: (e, promptValue) => {
272
-
273
-                                    }
274
-                                }).show()
275
-                            }
276
-                        })
277
-                    }
278
-                }
279
-            }).show()
280
-        },
281
-        handleImgsClick(index) {
282
-            this.initialIndex = index
283
-            const params = {
284
-            $props: {
285
-                imgs: this.imgs,
286
-                initialIndex: 'initialIndex',
287
-                loop: false
288
-            },
289
-            $events: {
290
-                change: (i) => {
291
-                this.initialIndex = i
292
-                }
293
-            }
294
-            }
295
-            this.$createImagePreview({ ...params }).show()
296
-        },
297
-        getParamsData(){
298
-            this.data=JSON.parse(this.$route.params.data);
299
-            if(this.data.incident.repeat){
300
-                this.processData="重复事件"
301
-            }else if(this.data.state.name=="不受理"){
302
-                this.processData="不受理"
303
-            }else if(this.data.state.name=="未受理"){
304
-                this.processData="申请"
305
-            }else if(this.data.state.name=="处理中"){
306
-                this.processData="处理"
307
-            }else if(this.data.state.name=="待评价"){
308
-                this.processData="评价"
309
-            }else if(this.data.state.name=="已解决"){
310
-                this.processData="结束"
311
-            }else if(this.data.state.name=="已撤回"){
312
-                this.processData="已撤回"
313
-            }
314
-            console.log(this.processData)
315
-        },
316
-        getProcessTime(){
317
-            var that=this;
318
-            if(this.data.incident.processInstanceId){
319
-                this.$http.post('service/bpm/bpm/flowTracing/'+this.data.incident.processInstanceId,{
320
-
321
-                }).then(function(res){
322
-                    that.processTime=res.data.data
323
-                })
324
-            }
325
-        },
326
-        getImgsData(){
327
-            var that=this;
328
-            this.$http.get('service/common/common/listAttachment/wechatRequesterIncident/'+this.data.id,{
329
-            // this.$http.get('service/common/common/listAttachment/wechatRequesterIncident/'+this.data.bxcode,{
330
-            }).then(function(res){
331
-                for(var i=0;i<res.data.data.length;i++){
332
-                    // that.imgs.push("http://localhost/service/common/common/downloadAttachment/"+res.data.data[i].token)
333
-                    // that.imgs.push("http://weixintest.ngser.dashitech.com/service/common/common/downloadAttachment/"+res.data.data[i].token)
334
-                    that.imgs.push(res.data.data[i].previewUrl)
335
-                    // that.imgs.push("http://192.168.3.95/service/common/common/downloadAttachment/"+res.data.data[i].token)
336
-                }
337
-            })
338
-        },
339
-        stateClassFn(data){
340
-            if(data=="未受理"){
341
-                return "weishouli"
342
-            }else if(data=="不受理"){
343
-                return "bushouli"
344
-            }else if(data=="处理中"){
345
-                return "chulizhong"
346
-            }else if(data=="待评价"){
347
-                return "daipingjia"
348
-            }else if(data=="已解决"){
349
-                return "yijiejue"
350
-            }else if(data=="已撤回"){
351
-                return "yichehui"
352
-            }else{
353
-                return "yichehui"
354
-            }
355
-        },
356
-        getProcessData(){
357
-            var that=this;
358
-            this.$http.post('service/bpm/bpm/flowTracing/'+this.data.incident.processInstanceId,{
359
-
360
-            }).then(function(res){
361
-                var data=res.data.data;
362
-                // if(data.length==0&&that.data.state.name=="已解决"){
363
-                //     that.processData="不受理"
364
-                // }else if(data.length==0&&that.data.state.name=="未受理"){
365
-                //     that.processData="申请"
366
-                // }else if(data.length>0&&data[data.length-1].activityName=="接单"){
367
-                //     that.processData="处理"
368
-                // }else if(data.length>0&&data[data.length-1].activityName=="事件处理"){
369
-                //     that.processData="处理"
370
-                // }else if(data.length>0&&data[data.length-1].activityName=="事件关闭"){
371
-                //     that.processData="评价"
372
-                // }else if(data.length>0&&data[data.length-1].activityName=="结束"){
373
-                //     that.processData="结束"
374
-                // }else{
375
-                //     that.processData="已撤回"
376
-                // }
377
-            });
378
-        },
379
-        getProcessMessageData(){
380
-            var that=this;
381
-            this.$http.post('service/sysinfo/data/fetchDataList/dictionary',{
382
-                "idx":0,
383
-                "sum":10,
384
-                "dictionary":{
385
-                    "key":"wxincident_task_default"
386
-                }
387
-            }).then(function(res){
388
-                that.processMessage=res.data.list;
389
-                console.log(that.processMessage)
390
-                // that.shenqing=that.processMessage[0].desc;
391
-                // that.shouli=that.processMessage[1].desc;
392
-                // that.chuli=that.processMessage[2].desc;
393
-                // that.pingjia=that.processMessage[3].desc;
394
-                // that.jieshu=that.processMessage[4].desc;
395
-            })
396
-        }
397
-    },
398
-    mounted(){
399
-    },
400
-    components: {
401
-        LoadIng,
402
-        PrompTing
403
-    },
404
-    created(){
405
-        this.getParamsData();
406
-        this.getImgsData();
407
-        this.getProcessData();
408
-        this.getProcessMessageData();
409
-        this.getProcessTime()
410
-    }
411
-}
412
-</script>
413
-<style scoped>
414
-.bgColor{
415
-    background-color: white
416
-}
417
-.fot{
418
-    height: 1.3rem;
419
-}
420
-.chehui{
421
-    height: 1.3rem;
422
-    width: 100%;
423
-    border-top: .01rem rgb(223, 222, 222) solid;
424
-    background-color: rgb(248,248,248);
425
-    position: fixed;
426
-    left: 0;
427
-    bottom: 0;
428
-    display: flex;
429
-    align-items:center;
430
-    justify-content:center
431
-}
432
-.chehui .btn{
433
-    width: 90%;
434
-    height: 1rem;
435
-    background-color: #005395;
436
-    border-radius: 10px;
437
-    line-height: 1rem;
438
-    color: white;
439
-    font-size: .36rem;
440
-    text-align: center
441
-}
442
-.label{
443
-    background-color: rgb(238, 238, 238);
444
-    height: .6rem;
445
-    line-height: .6rem;
446
-    padding-left: .24rem;
447
-    font-size: .24rem;
448
-    color: #666666
449
-}
450
-.state{
451
-  display: flex;
452
-  justify-content:space-between;
453
-  align-items:center;
454
-  padding: 0 .24rem;
455
-  height: .88rem;
456
-  border-top: .01rem rgb(223, 222, 222) solid;
457
-  border-bottom: .01rem rgb(223, 222, 222) solid;
458
-}
459
-.state div:nth-child(1){
460
-  font-size: .32rem;
461
-  line-height: .45rem;
462
-  color:#333333
463
-}
464
-.state div:nth-child(2){
465
-  padding: .05rem .3rem;
466
-  /* border: 0.01rem rgb(0,0,255) solid; */
467
-  border-radius: 16px ;
468
-  /* color: rgb(0,0,255) */
469
-}
470
-.weishouli{
471
-  color:#991f00;
472
-  border: 0.01rem #991f00 solid;
473
-  background-color: #f4e8e5
474
-}
475
-.bushouli{
476
-  color:#666666;
477
-  background-color: #eeeeee;
478
-  border: 0.01rem #666666 solid;
479
-}
480
-.chulizhong{
481
-  color:#003057;
482
-  background-color: #e5eaee;
483
-  border: 0.01rem #003057 solid;
484
-}
485
-.daipingjia{
486
-  color:#825b00;
487
-  background-color: #f2eee5;
488
-  border: 0.01rem #825b00 solid;
489
-}
490
-.yijiejue{
491
-  color:#40a19c;
492
-  background-color: #ebf5f5;
493
-  border: 0.01rem #40a19c solid;
494
-}
495
-.yichehui{
496
-  color:#48a843;
497
-  background-color: #ecf6ec;
498
-  border: 0.01rem #48a843 solid;
499
-}
500
-.description{
501
-    display: flex;
502
-    justify-content:space-between;
503
-    padding: .24rem;
504
-    border-bottom: .01rem rgb(223, 222, 222) solid;
505
-}
506
-.description div:nth-child(1){
507
-    width: 20%;
508
-    font-size: .32rem;
509
-    color: #333333;
510
-    line-height: .45rem
511
-}
512
-.description div:nth-child(2){
513
-    width: 80%;
514
-    font-size: .32rem;
515
-    line-height: .45rem;
516
-    color: #333333
517
-}
518
-.ipt{
519
-    display: flex;
520
-    justify-content:space-between;
521
-    padding: .24rem;
522
-    border-bottom: .01rem rgb(223, 222, 222) solid;
523
-}
524
-.ipt div:nth-child(1){
525
-    width: 20%;
526
-    font-size: .32rem;
527
-    line-height: .45rem;
528
-    color: #333333
529
-}
530
-.ipt div:nth-child(2){
531
-    width: 80%;
532
-}
533
-.faultLocation{
534
-    display: flex;
535
-    justify-content:space-between;
536
-    padding: .24rem;
537
-    border-bottom: .01rem rgb(223, 222, 222) solid;
538
-}
539
-.faultLocation div:nth-child(1){
540
-    width: 20%;
541
-    font-size: .32rem;
542
-    line-height: .45rem;
543
-    color: #333333
544
-}
545
-.faultLocation div:nth-child(2){
546
-    width: 80%;
547
-    font-size: .32rem;
548
-    line-height: .45rem;
549
-    color: #333333
550
-}
551
-.faultLocation2{
552
-    display: flex;
553
-    justify-content:space-between;
554
-    padding: .24rem;
555
-    border-bottom: .01rem rgb(223, 222, 222) solid;
556
-}
557
-.faultLocation2 div:nth-child(1){
558
-    width: 27%;
559
-    font-size: .32rem;
560
-    line-height: .45rem;
561
-    color: #333333
562
-}
563
-.faultLocation2 div:nth-child(2){
564
-    width: 73%;
565
-    font-size: .32rem;
566
-    line-height: .45rem;
567
-    color: #333333
568
-}
569
-.imgs-container img{
570
-    width: 1.5rem;
571
-    height: 1.5rem;
572
-    margin-left: .2rem
573
-}
574
-.imgs-container img:nth-child(1){
575
-    margin-left: 0
576
-}
577
-.imgs-container span{
578
-    font-size: .32rem;
579
-    line-height: .45rem
580
-}
581
-.handleUser{
582
-    display: flex;
583
-    justify-content:space-between;
584
-    align-items:center;
585
-    height: .88rem;
586
-    line-height: .88rem;
587
-    border-top: .01rem rgb(223, 222, 222) solid;
588
-    border-bottom: .01rem rgb(223, 222, 222) solid;
589
-    padding: 0 .24rem
590
-}
591
-.handleUser div:nth-child(1){
592
-    width: 49%;
593
-    border-right: .01rem rgb(223, 222, 222) solid;
594
-    /* padding-left: .24rem; */
595
-    font-size: .32rem;
596
-}
597
-.handleUser div:nth-child(2){
598
-    width: 50%;
599
-    padding-left: .24rem;
600
-    font-size: .32rem;
601
-}
602
-.handleUser div:nth-child(2) span{
603
-    color: #005395
604
-}
605
-.handleUser i{
606
-    font-size: .44rem;
607
-    color: #005395
608
-}
609
-.processBox{
610
-    margin-top: .24rem
611
-}
612
-.process{
613
-    padding: 0 .24rem;
614
-    display: flex
615
-}
616
-.process .status{
617
-    width: 12%;
618
-    font-size: .28rem;
619
-    text-align: center
620
-}
621
-.process .ico{
622
-    width: 6%;
623
-    text-align: center
624
-}
625
-.process .ico i{
626
-    font-size: .28rem
627
-}
628
-.process .last{
629
-    color: #005359
630
-}
631
-.process .now{
632
-    color:#48a843
633
-}
634
-.process .time{
635
-    width: 80%;
636
-    font-size: .25rem;
637
-    color:#999999;
638
-    padding-left: 2%
639
-}
640
-.processCont{
641
-    padding: 0 .24rem;
642
-    display: flex;
643
-    margin: .07rem 0;
644
-}
645
-.processCont .status{
646
-    width: 12%;
647
-}
648
-.processCont .conents{
649
-    width: 80%;
650
-    margin-left: 3%;
651
-    font-size: .25rem;
652
-    color: #666666;
653
-    padding: .07rem 0;
654
-    padding-left: 5%;
655
-    border-left: .01rem #999999 solid;
656
-    line-height: .3rem
657
-}
658
-.processCont .lastConents{
659
-    border-left: 0ch
660
-}
661
-</style>

+ 468 - 363
src/views/incidentList.vue

@@ -1,115 +1,134 @@
1 1
 <template>
2
-    <div class="bgColor">
3
-        <div slot="content" class="scroll-wrapper">
4
-            <div class="demo">
5
-                <div class="scroll-list-wrap">
6
-                    <cube-scroll ref="scroll" :data="items" :options="options" @pulling-down="onPullingDown" @pulling-up="onPullingUp">
7
-                        <cube-select
8
-                          v-model="stateValue"
9
-                          :options="stateData"
10
-                          @change="stateChange()">
11
-                        </cube-select>
12
-                        <ul class="foods-wrapper">
13
-                            <li v-for="data in items" class="food-item border-1px" @click="toIncidentDetails(data)">
14
-                                <div class="food-content">
15
-                                    <div class="title">
16
-                                      <div><i class="iconfont icon-baoxiuliebiao"></i><span>报修编号:&nbsp;{{data.bxcode||"暂无"}}</span></div>
17
-                                      <div :class="stateClassFn(data.state.name)">{{data.state.name}}</div>
18
-                                    </div>
19
-                                    <div class="conent">
20
-                                      {{data.description}}
21
-                                    </div>
22
-                                    <div class="timeBox">
23
-                                      <div>
24
-                                        维修人:&nbsp;{{data.incident.handlingPersonnelUser?data.incident.handlingPersonnelUser.name:"暂无"}}
25
-                                      </div>
26
-                                      <div>
27
-                                        报修时间:&nbsp;{{data.createTime}}
28
-                                      </div>
29
-                                    </div>
30
-                                </div>
31
-                            </li>
32
-                            <div class="wushuju" v-show="wushuju">
33
-                              <img src="./../../static/images/wushuju.svg" alt="">
34
-                              <div class="noDataFont">暂无数据</div>
35
-                          </div>
36
-                        </ul>
37
-                        <template v-if="customPullDown" slot="pulldown" slot-scope="props">
38
-                            <div v-if="props.pullDownRefresh" class="cube-pulldown-wrapper" :style="props.pullDownStyle">
39
-                                <div v-show="props.beforePullDown" class="before-trigger" :style="{paddingTop: props.bubbleY + 'px'}">
40
-                                    <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 40}">↓</span>
41
-                                </div>
42
-                                <div class="after-trigger" v-show="!props.beforePullDown">
43
-                                    <div v-show="props.isPullingDown" class="loading">
44
-                                        <cube-loading></cube-loading>
45
-                                    </div>
46
-                                    <div v-show="!props.isPullingDown" class="text">
47
-                                        <span class="refresh-text">更新成功</span>
48
-                                    </div>
49
-                                </div>
50
-                            </div>
51
-                        </template>
52
-                    </cube-scroll>
2
+  <div class="bgColor">
3
+    <div slot="content" class="scroll-wrapper">
4
+      <div class="demo">
5
+        <div class="header">事件列表</div>
6
+        <cube-select
7
+          class="stateSearch"
8
+          v-model="searchType"
9
+          :options="searchsType"
10
+          @change="stateChange()"
11
+        ></cube-select>
12
+        <!-- <div class="cont"> -->
13
+        <div class="scroll-list-wrap">
14
+          <cube-scroll
15
+            ref="scroll"
16
+            :data="items"
17
+            :options="options"
18
+            @pulling-down="onPullingDown"
19
+            @pulling-up="onPullingUp"
20
+          >
21
+            <div class="conentBox">
22
+              <div class="conent" v-for="item in items" @click="toIncidentDetails(item)">
23
+                <div class="head">
24
+                  <p>
25
+                    <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
26
+                    事件编号:{{item.incidentsign}}
27
+                    <span
28
+                      :class="{'btn':true, 'daipingjia':item.state.name=='待评价', 'daijiedan':(item.state.name=='待接单'&&item.handlerUser&&!item.candidateGroups), 'daiqiangdan':(item.state.name=='待接单'&&!item.handlerUser&&item.candidateGroups), 'chulizhong':item.state.name=='处理中', 'yijiejue':item.state.name=='已解决', 'yiguanbi':item.state.name=='已关闭', 'chongxinzhipai':item.state.name=='重新指派'}"
29
+                    >{{item.state.name=='待接单'?((item.handlerUser&&!item.candidateGroups)?'待接单':'待抢单'):item.state.name}}</span>
30
+                  </p>
53 31
                 </div>
32
+                <div class="center">
33
+                  <p class="desc">
34
+                    <span class="fl">事件描述:</span>
35
+                    <span class="grayFont overflowEllipsis2" v-html="item.description"></span>
36
+                  </p>
37
+                  <p>
38
+                    报修<span>{{valConfig==1?'人':'科室'}}</span> :
39
+                    <span class="grayFont">{{item.contacts}}</span>
40
+                  </p>
41
+                </div>
42
+                <div class="bottom">
43
+                  <span class="fl"><span>{{valConfig==1?'联系电话':'科室电话'}}</span>:{{item.contactsInformation}}</span>
44
+                  <span class="fr">报修时间:{{item.acceptDate}}</span>
45
+                </div>
46
+              </div>
47
+              <div class="wushuju" v-show="wushuju">
48
+                <img src="./../../static/images/wushuju.svg" alt>
49
+                <p>暂无事件</p>
50
+              </div>
54 51
             </div>
52
+            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
53
+              <div
54
+                v-if="props.pullDownRefresh"
55
+                class="cube-pulldown-wrapper"
56
+                :style="props.pullDownStyle"
57
+              >
58
+                <div
59
+                  v-show="props.beforePullDown"
60
+                  class="before-trigger"
61
+                  :style="{paddingTop: props.bubbleY + 'px'}"
62
+                >
63
+                  <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 80}">↓</span>
64
+                </div>
65
+                <div class="after-trigger" v-show="!props.beforePullDown">
66
+                  <div v-show="props.isPullingDown" class="loading">
67
+                    <cube-loading></cube-loading>
68
+                  </div>
69
+                  <div v-show="!props.isPullingDown" class="text">
70
+                    <span class="refresh-text">更新成功</span>
71
+                  </div>
72
+                </div>
73
+              </div>
74
+            </template>
75
+          </cube-scroll>
55 76
         </div>
56
-        <load-ing v-show="loadShow"></load-ing>
77
+      </div>
57 78
     </div>
79
+    <load-ing v-show="!items.length&&!wushuju"></load-ing>
80
+  </div>
58 81
 </template>
59 82
 <script>
60
-import Vue from 'vue'
61
-import CubePage from '../components/cube-page.vue'
62
-import SwitchOption from '../components/switch-option'
63
-import InputOption from '../components/input-option'
64
-import SelectOption from '../components/select-option'
65
-import {formatDate} from './../components/js/date.js';
66
-import LoadIng from './../views/loading.vue'
83
+import Vue from "vue";
84
+import CubePage from "../components/cube-page.vue";
85
+import SwitchOption from "../components/switch-option";
86
+import InputOption from "../components/input-option";
87
+import SelectOption from "../components/select-option";
88
+import { formatDate } from "./../components/js/date.js";
89
+import LoadIng from "./../views/loading.vue";
67 90
 export default {
68 91
   data() {
69 92
     return {
70
-    //   items: _foods,
71
-    loginUser:JSON.parse(localStorage.getItem("loginUser")),
72
-        items:[],
93
+      //   items: _foods,
94
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
95
+      valConfig: JSON.parse(localStorage.getItem("valConfig"))-0,//报修主体
96
+      items: [],
73 97
       pullDownRefresh: true,
74 98
       pullDownRefreshThreshold: 60,
75 99
       pullDownRefreshStop: 40,
76
-      pullDownRefreshTxt: 'Refresh success',
100
+      pullDownRefreshTxt: "Refresh success",
77 101
       pullUpLoad: true,
78 102
       pullUpLoadThreshold: 0,
79
-      pullUpLoadMoreTxt: 'Load more',
80
-      pullUpLoadNoMoreTxt: '没有更多数据',
103
+      pullUpLoadMoreTxt: "加载更多",
104
+      pullUpLoadNoMoreTxt: "没有更多数据",
81 105
       customPullDown: true,
82
-      wushuju:false,
83
-      stateData:[
106
+      wushuju: false,
107
+      candidateGroups: "",
108
+      searchsType: [
109
+        {
110
+          text: "全部",
111
+          value: "userAll"
112
+        },
113
+        {
114
+          text: "待处理",
115
+          value: "todo"
116
+        },
84 117
         {
85
-          text:"全部",
86
-          value:0
87
-        },{
88
-          text:"未受理",
89
-          value:1592
90
-        },{
91
-          text:"不受理",
92
-          value:1593
93
-        },{
94
-          text:"处理中",
95
-          value:1594
96
-        },{
97
-          text:"待评价",
98
-          value:1595
99
-        },{
100
-          text:"已解决",
101
-          value:1596
102
-        },{
103
-          text:"已撤回",
104
-          value:1597
118
+          text: "处理过",
119
+          value: "done"
120
+        },
121
+        {
122
+          text: "我创建",
123
+          value: "create"
105 124
         }
106 125
       ],
107
-      stateValue:0,
108
-      sum:10,
109
-      idx:0,
110
-      stateClass:"",
111
-      loadShow:true
112
-    }
126
+      searchType: "userAll",
127
+      sum: 10,
128
+      idx: 0,
129
+      stateClass: "",
130
+      loadShow: true
131
+    };
113 132
   },
114 133
   components: {
115 134
     CubePage,
@@ -124,364 +143,450 @@ export default {
124 143
         pullDownRefresh: this.pullDownRefreshObj,
125 144
         pullUpLoad: this.pullUpLoadObj,
126 145
         scrollbar: true
127
-      }
146
+      };
128 147
     },
129 148
     pullDownRefreshObj: function() {
130
-      return this.pullDownRefresh ? {
131
-        threshold: parseInt(this.pullDownRefreshThreshold),
132
-        txt: this.pullDownRefreshTxt
133
-      } : false
149
+      return this.pullDownRefresh
150
+        ? {
151
+            threshold: parseInt(this.pullDownRefreshThreshold),
152
+            txt: this.pullDownRefreshTxt
153
+          }
154
+        : false;
134 155
     },
135 156
     pullUpLoadObj: function() {
136
-      return this.pullUpLoad ? {
137
-        threshold: parseInt(this.pullUpLoadThreshold),
138
-        txt: {
139
-          more: this.pullUpLoadMoreTxt,
140
-          noMore: this.pullUpLoadNoMoreTxt
141
-        }
142
-      } : false
157
+      return this.pullUpLoad
158
+        ? {
159
+            threshold: parseInt(this.pullUpLoadThreshold),
160
+            txt: {
161
+              more: this.pullUpLoadMoreTxt,
162
+              noMore: this.pullUpLoadNoMoreTxt
163
+            }
164
+          }
165
+        : false;
143 166
     }
144 167
   },
145 168
   methods: {
146
-    getParamsState(){
147
-      if(this.$route.params.state){
148
-        this.stateValue=this.$route.params.state
169
+    getParamsState() {
170
+      if (this.$route.params.searchType) {
171
+        this.searchType = this.$route.params.searchType;
149 172
       }
150 173
     },
151
-    stateClassFn(data){
152
-      if(data=="未受理"){
153
-        return "weishouli"
154
-      }else if(data=="不受理"){
155
-        return "bushouli"
156
-      }else if(data=="处理中"){
157
-        return "chulizhong"
158
-      }else if(data=="待评价"){
159
-        return "daipingjia"
160
-      }else if(data=="已解决"){
161
-        return "yijiejue"
162
-      }else if(data=="已撤回"){
163
-        return "yichehui"
164
-      }else{
165
-        return "yichehui"
174
+    stateChange() {
175
+      var that = this;
176
+      this.loadShow = true;
177
+      that.items = [];
178
+      that.idx = 0;
179
+      that.sum = 10;
180
+      that.getData();
181
+    },
182
+    toIncidentDetails(data) {
183
+      console.log(1111111);
184
+      console.log(data);
185
+      var name = "";
186
+      if (data.state.value == 'pending') {
187
+        if (data.handlerUser && !data.candidateGroups) {
188
+          // 指派给人 接单
189
+          name = "Order";
190
+        } else if (data.candidateGroups && !data.handlerUser) {
191
+          // 指派给组 抢单
192
+          name = "GrabSheet";
193
+        }
194
+      } else if (data.state.value == "reassign") {
195
+        name = "AgainAssign";
196
+      } else if (data.state.value == 'handler') {
197
+        name = "Processing";
198
+      } else if (data.state.value == 'resolved') {
199
+        name = "Solved";
200
+      } else if (data.state.value == 'close') {
201
+        name = "Closed";
166 202
       }
203
+      this.$router.push({
204
+        name: name,
205
+        params: {
206
+          data: data,
207
+        }
208
+      });
167 209
     },
168
-    stateChange(){
169
-      var that=this;
170
-      this.loadShow=true;
171
-      that.items=[];
172
-      this.$http.post('service/apply/bpm/fetchServiceTasks',{
173
-          'assignee':that.loginUser.id,
174
-          'state':that.stateValue,
175
-          'idx':0,
176
-          'sum':10
177
-          }).then(function(res){
178
-            if(res.data.data.length>0){
179
-              for(var i=0;i<res.data.data.length;i++){
180
-                res.data.data[i].createTime=formatDate(new Date(res.data.data[i].createTime), 'yyyy-MM-dd hh:mm');
181
-              }
182
-              that.items=res.data.data;
183
-              that.wushuju=false
184
-            }else{
185
-              that.wushuju=true
186
-            }           
187
-            that.loadShow=false
210
+
211
+    getData() {
212
+      var that = this;
213
+
214
+      that.$http
215
+        .post("service/bpm/bpm/fetchTask/bpm_incident", {
216
+          assignee: that.loginUser.id,
217
+          candidateGroups: that.candidateGroups,
218
+          searchType: that.searchType,
219
+          idx: that.idx,
220
+          sum: that.sum,
221
+          incident: {temporary:true}
188 222
         })
189
-    },
190
-    toIncidentDetails(data){
191
-      this.$router.push({
192
-          name:'IncidentDetails',
193
-          params:{
194
-              data:JSON.stringify(data)
223
+        .then(function(res) {
224
+          if (res.data.data.length > 0) {
225
+            that.wushuju = false;
226
+            for (var i = 0; i < res.data.data.length; i++) {
227
+              res.data.data[i].createTime = formatDate(
228
+                new Date(res.data.data[i].createTime),
229
+                "yyyy-MM-dd hh:mm"
230
+              );
231
+            }
232
+            that.items = that.items.concat(res.data.data);
233
+          } else if(res.data.data.length <= 0) {
234
+            that.wushuju = true;
195 235
           }
196
-      })
236
+          that.loadShow = false;
237
+        });
197 238
     },
198 239
     onPullingDown() {
199
-      // 模拟更新数据
200
-      this.idx=0;
240
+      var that = this;
241
+      that.idx = 0;
242
+      that.sum = 10;
243
+      that.items = [];
201 244
       setTimeout(() => {
202
-        var that=this;
203
-        // that.items=[];
204
-        this.$http.post('service/apply/bpm/fetchServiceTasks',{
205
-          'assignee':that.loginUser.id,
206
-          'state':that.stateValue,
207
-          'idx':0,
208
-          'sum':10
209
-          }).then(function(res){
210
-            if(res.data.data.length>0){
211
-                that.wushuju=false;
212
-                for(var i=0;i<res.data.data.length;i++){
213
-                  res.data.data[i].createTime=formatDate(new Date(res.data.data[i].createTime), 'yyyy-MM-dd hh:mm');
214
-                }
215
-                that.items=res.data.data;
216
-            }else{
217
-                that.wushuju=true;
218
-                that.$refs.scroll.forceUpdate()
219
-            }
220
-        })
221
-      }, 1000)
222
-    },
223
-    getData(idx,sum){
224
-        var that=this;
225
-        this.$http.post('service/apply/bpm/fetchServiceTasks',{
226
-            'assignee':that.loginUser.id,
227
-            'state':that.stateValue,
228
-            'idx':idx,
229
-            'sum':sum
230
-        }).then(function(res){
231
-            if(res.data.data.length>0){
232
-              that.wushuju=false;
233
-              for(var i=0;i<res.data.data.length;i++){
234
-                res.data.data[i].createTime=formatDate(new Date(res.data.data[i].createTime), 'yyyy-MM-dd hh:mm');
235
-              }
236
-              that.items=res.data.data;
237
-            }else{
238
-              that.wushuju=true
239
-            }
240
-            that.loadShow=false
241
-        })
245
+        that.getData();
246
+      }, 1000);
242 247
     },
243 248
     onPullingUp() {
244
-      var that=this;
245
-      that.idx=that.idx+1;
246
-        this.$http.post('service/apply/bpm/fetchServiceTasks',{
247
-          'assignee':that.loginUser.id,
248
-          'state':that.stateValue,
249
-          'idx':that.idx,
250
-          'sum':that.sum,         
251
-          }).then(function(res){
252
-            for(var i=0;i<res.data.data.length;i++){
253
-              res.data.data[i].createTime=formatDate(new Date(res.data.data[i].createTime), 'yyyy-MM-dd hh:mm');
254
-            }       
255
-            setTimeout(() => {
256
-                if(res.data.data.length>0){
257
-                    that.items=that.items.concat(res.data.data);
258
-                }else{
259
-                    that.$refs.scroll.forceUpdate()
260
-                }
261
-            }, 1000)
262
-        })
249
+      var that = this;
250
+      that.idx = that.idx + 1;
251
+      that.getData();
263 252
     },
264 253
     updatePullDownRefresh(val) {
265
-      this.pullDownRefresh = val
254
+      this.pullDownRefresh = val;
266 255
     },
267 256
     updatePullDownRefreshThreshold(val) {
268
-      this.pullDownRefreshThreshold = val
257
+      this.pullDownRefreshThreshold = val;
269 258
     },
270 259
     updatePullDownRefreshTxt(val) {
271
-      this.pullDownRefreshTxt = val
260
+      this.pullDownRefreshTxt = val;
272 261
     },
273 262
     updatePullUpLoad(val) {
274
-      this.pullUpLoad = val
263
+      this.pullUpLoad = val;
275 264
     },
276 265
     updatePullUpLoadThreshold(val) {
277
-      this.pullUpLoadThreshold = val
266
+      this.pullUpLoadThreshold = val;
278 267
     },
279 268
     updatePullUpLoadMoreTxt(val) {
280
-      this.pullUpLoadMoreTxt = val
269
+      this.pullUpLoadMoreTxt = val;
281 270
     },
282 271
     updatePullUpLoadNoMoreTxt(val) {
283
-      this.pullUpLoadNoMoreTxt = val
272
+      this.pullUpLoadNoMoreTxt = val;
284 273
     },
285 274
     updateCustomPullDown(val) {
286
-      this.customPullDown = val
275
+      this.customPullDown = val;
287 276
     },
288 277
     rebuildScroll() {
289 278
       Vue.nextTick(() => {
290
-        this.$refs.scroll.destroy()
291
-        this.$refs.scroll.initScroll()
292
-      })
279
+        this.$refs.scroll.destroy();
280
+        this.$refs.scroll.initScroll();
281
+      });
293 282
     }
294 283
   },
295
-  created(){
296
-      this.getParamsState();
297
-      this.getData(this.idx,this.sum);
284
+  created() {
285
+    var that = this;
286
+    that.loginUser.group.forEach(element => {
287
+      that.candidateGroups += element.id + ",";
288
+    });
289
+    that.candidateGroups = that.candidateGroups.substring(
290
+      0,
291
+      that.candidateGroups.length - 1
292
+    );
293
+    this.getParamsState();
294
+    this.getData();
295
+
296
+    localStorage.removeItem("modelData");
297
+    localStorage.removeItem("category");
298
+    localStorage.removeItem("categoryVal");
299
+    localStorage.removeItem("referenceInfo");
300
+    localStorage.removeItem("order");
301
+    localStorage.removeItem("model");
302
+    localStorage.removeItem("selectedCategoryTxt");
298 303
   }
299
-}
304
+};
300 305
 </script>
301 306
 <style lang="stylus" rel="stylesheet/stylus" scoped>
302
-.scroll-list-wrap 
307
+.scroll-list-wrap {
303 308
   /* height: 350px */
304
-  height:95vh
309
+  height: 85vh;
305 310
   /* border: 1px solid rgba(0, 0, 0, 0.1) */
306
-  border-radius: 5px
307
-  transform: rotate(0deg) // fix 子元素超出边框圆角部分不隐藏的问题
308
-  overflow: hidden
311
+  border-radius: 5px;
312
+  transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
313
+  overflow: hidden;
314
+  padding-top: 1.76rem;
315
+}
316
+
317
+.foods-wrapper {
318
+  .food-item {
319
+    display: flex;
309 320
 
310
-.foods-wrapper 
311
-  .food-item 
312
-    display: flex
313 321
     /* padding: 18px */
314 322
     /* border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
315 323
     /* border-top: 1px solid rgba(7, 17, 27, 0.1)!important */
324
+    &:last-child {
325
+      border-none();
326
+      margin-bottom: 0;
327
+    }
328
+
329
+    .icon {
330
+      flex: 0 0 57px;
331
+      margin-right: 10px;
332
+    }
333
+
334
+    .food-content {
335
+      flex: 1;
336
+
337
+      .name {
338
+        margin: 2px 0 8px 0;
339
+        height: 14px;
340
+        line-height: 14px;
341
+        font-size: 14px;
342
+        color: rgb(7, 17, 27);
343
+      }
344
+
345
+      .description, .extra {
346
+        line-height: 10px;
347
+        font-size: 10px;
348
+        color: rgb(147, 153, 159);
349
+      }
316 350
 
317
-    &:last-child 
318
-      border-none()
319
-      margin-bottom: 0
320
-    .icon 
321
-      flex: 0 0 57px
322
-      margin-right: 10px
351
+      .description {
352
+        line-height: 12px;
353
+        margin-bottom: 8px;
354
+      }
323 355
 
324
-    .food-content 
325
-      flex: 1
326
-      .name 
327
-        margin: 2px 0 8px 0
328
-        height: 14px
329
-        line-height: 14px
330
-        font-size: 14px
331
-        color: rgb(7, 17, 27)
332
-      .description, .extra 
333
-        line-height: 10px
334
-        font-size: 10px
335
-        color: rgb(147, 153, 159)
336
-      .description 
337
-        line-height: 12px
338
-        margin-bottom: 8px
339
-      .extra 
340
-        .count 
341
-          margin-right: 12px
342
-      .price 
343
-        font-weight: 700
344
-        line-height: 24px
345
-        .now 
346
-          margin-right: 8px
347
-          font-size: 14px
348
-          color: rgb(240, 20, 20)
349
-        .old 
350
-          text-decoration: line-through
351
-          font-size: 10px
352
-          color: rgb(147, 153, 159)
353
-      .cartcontrol-wrapper 
354
-        position: absolute
355
-        right: 0
356
-        bottom: 12px
357
-        .scroll-wrapper{
358
-  .cube-pulldown-wrapper{
359
-    .before-trigger{
360
-      font-size: 30px;
361
-      line-height: 30px;
362
-      align-self: flex-end;
363
-      span{
364
-        display: inline-block;
365
-        transition: all 0.3s;
366
-        color: #666;
367
-        &.rotate{
368
-            transform: rotate(180deg)
356
+      .extra {
357
+        .count {
358
+          margin-right: 12px;
359
+        }
360
+      }
361
+
362
+      .price {
363
+        font-weight: 700;
364
+        line-height: 24px;
365
+
366
+        .now {
367
+          margin-right: 8px;
368
+          font-size: 14px;
369
+          color: rgb(240, 20, 20);
370
+        }
371
+
372
+        .old {
373
+          text-decoration: line-through;
374
+          font-size: 10px;
375
+          color: rgb(147, 153, 159);
376
+        }
377
+      }
378
+
379
+      .cartcontrol-wrapper {
380
+        position: absolute;
381
+        right: 0;
382
+        bottom: 12px;
383
+
384
+        .scroll-wrapper {
385
+          .cube-pulldown-wrapper {
386
+            .before-trigger {
387
+              font-size: 30px;
388
+              line-height: 30px;
389
+              align-self: flex-end;
390
+
391
+              span {
392
+                display: inline-block;
393
+                transition: all 0.3s;
394
+                color: #666;
395
+
396
+                &.rotate {
397
+                  transform: rotate(180deg);
398
+                }
399
+              }
400
+            }
401
+
402
+            .after-trigger {
403
+              .refresh-text {
404
+                color: grey;
405
+              }
406
+            }
369 407
           }
370
-      } 
371
-    }
372
-    .after-trigger{
373
-      .refresh-text{
374
-        color: grey
408
+        }
375 409
       }
376 410
     }
377
- }
411
+  }
378 412
 }
379 413
 </style>
380
-<style scoped>
381
-.bgColor{
382
-    background-color: white
414
+<style lang='less' scoped>
415
+.cont {
416
+  margin-top: 1.86rem;
417
+}
418
+.scroll-list-wrap {
419
+  padding-top: 1.76rem;
420
+}
421
+.header {
422
+  width: 100%;
423
+  height: 0.88rem;
424
+  line-height: 0.88rem;
425
+  text-align: center;
426
+  color: #fff;
427
+  font-size: 0.37rem;
428
+  background: linear-gradient(#2e2f32, #414246);
429
+  position: fixed;
430
+  top: 0;
431
+  z-index: 6;
383 432
 }
384
-.food-item{
385
-  border-top: .16rem rgb(238,238,238) solid;
433
+.stateSearch {
434
+  width: 100%;
435
+  position: fixed;
436
+  top: 0.88rem;
437
+  z-index: 6;
386 438
 }
387
-.food-content{
388
-  border-top: .01rem rgb(223, 222, 222) solid;
389
-  border-bottom: .01rem rgb(223, 222, 222) solid;
439
+.bgColor {
440
+  background-color: white;
390 441
 }
391
-.cube-select{
392
-  height: .88rem;
393
-  line-height: .88rem;
394
-  padding: 0 .24rem;
395
-  font-size: .36rem;
396
-  color:#333333
442
+.food-item {
443
+  border-top: 0.16rem rgb(238, 238, 238) solid;
397 444
 }
398
-.title{
445
+.food-content {
446
+  border-top: 0.01rem rgb(223, 222, 222) solid;
447
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
448
+}
449
+.cube-select {
450
+  height: 0.88rem;
451
+  line-height: 0.88rem;
452
+  padding: 0 0.24rem;
453
+  font-size: 0.36rem;
454
+  color: #333333;
455
+  border-bottom: 0.08rem solid #e5e5e5;
456
+}
457
+.title {
399 458
   display: flex;
400
-  justify-content:space-between;
401
-  height: .7rem;
402
-  line-height: .7rem;
403
-  border-top: .01rem rgb(223, 222, 222) solid;
404
-  padding: 0 .24rem;
405
-  border-bottom: .01rem rgb(223, 222, 222) solid;
459
+  justify-content: space-between;
460
+  height: 0.7rem;
461
+  line-height: 0.7rem;
462
+  border-top: 0.01rem rgb(223, 222, 222) solid;
463
+  padding: 0 0.24rem;
464
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
406 465
 }
407
-.title i{
408
-  font-size: .32rem;
409
-  color: #005395
466
+.title i {
467
+  font-size: 0.32rem;
468
+  color: #005395;
410 469
 }
411
-.title div:nth-child(1){
412
-  font-size: .32rem;
470
+.title div:nth-child(1) {
471
+  font-size: 0.32rem;
413 472
 }
414
-.title div:nth-child(1) span{
473
+.title div:nth-child(1) span {
415 474
   display: inline-block;
416
-  margin-left: .08rem
475
+  margin-left: 0.08rem;
417 476
 }
418
-.title div:nth-child(2){
419
-  padding: .05rem .3rem;
477
+.title div:nth-child(2) {
478
+  padding: 0.05rem 0.3rem;
420 479
   /* border: 0.01rem rgb(0,0,255) solid; */
421
-  border-radius: 16px ;
480
+  border-radius: 16px;
422 481
   /* color: rgb(0,0,255); */
423
-  height: .25rem;
424
-  line-height: .25rem;
425
-  margin-top: .15rem;
426
-  font-size: .24rem
482
+  height: 0.25rem;
483
+  line-height: 0.25rem;
484
+  margin-top: 0.15rem;
485
+  font-size: 0.24rem;
427 486
 }
428
-.weishouli{
429
-  color:#991f00;
487
+.weishouli {
488
+  color: #991f00;
430 489
   border: 0.01rem #991f00 solid;
431
-  background-color: #f4e8e5
490
+  background-color: #f4e8e5;
432 491
 }
433
-.bushouli{
434
-  color:#666666;
492
+.bushouli {
493
+  color: #666666;
435 494
   background-color: #eeeeee;
436 495
   border: 0.01rem #666666 solid;
437 496
 }
438
-.chulizhong{
439
-  color:#003057;
497
+.chulizhong {
498
+  color: #003057;
440 499
   background-color: #e5eaee;
441 500
   border: 0.01rem #003057 solid;
442 501
 }
443
-.daipingjia{
444
-  color:#825b00;
502
+.daipingjia {
503
+  color: #825b00;
445 504
   background-color: #f2eee5;
446 505
   border: 0.01rem #825b00 solid;
447 506
 }
448
-.yijiejue{
449
-  color:#40a19c;
507
+.yijiejue {
508
+  color: #40a19c;
450 509
   background-color: #ebf5f5;
451 510
   border: 0.01rem #40a19c solid;
452 511
 }
453
-.yichehui{
454
-  color:#48a843;
512
+.yichehui {
513
+  color: #48a843;
455 514
   background-color: #ecf6ec;
456 515
   border: 0.01rem #48a843 solid;
457 516
 }
458
-.conent{
459
-  font-size: .28rem;
460
-  line-height: .39rem;
461
-  overflow: hidden;
462
-  display: -webkit-box;
463
-  -webkit-line-clamp: 2;
464
-  -webkit-box-orient: vertical;
465
-  word-break: break-all;
466
-  padding: 0 .64rem;
467
-  margin: .24rem 0
468
-}
469
-.timeBox{
517
+// .conent {
518
+//   font-size: 0.28rem;
519
+//   line-height: 0.39rem;
520
+//   overflow: hidden;
521
+//   display: -webkit-box;
522
+//   -webkit-line-clamp: 2;
523
+//   -webkit-box-orient: vertical;
524
+//   word-break: break-all;
525
+//   padding: 0 0.64rem;
526
+//   margin: 0.24rem 0;
527
+// }
528
+.timeBox {
470 529
   display: flex;
471
-  justify-content:space-between;
472
-  font-size: .24rem;
530
+  justify-content: space-between;
531
+  font-size: 0.24rem;
473 532
   color: #999999;
474
-  border-top: .01rem rgb(223, 222, 222) solid;
475
-  height: .7rem;
476
-  line-height: .7rem;
477
-  padding: 0 .24rem 0 .64rem
533
+  border-top: 0.01rem rgb(223, 222, 222) solid;
534
+  height: 0.7rem;
535
+  line-height: 0.7rem;
536
+  padding: 0 0.24rem 0 0.64rem;
537
+}
538
+.wushuju {
539
+  margin-top: 2.4rem;
540
+  text-align: center;
541
+  color: #999;
478 542
 }
479
-.wushuju{
480
-    margin-top: 2.4rem;
481
-    text-align: center;
543
+.wushuju img {
544
+  width: 5.12rem;
545
+  height: 2.84rem;
482 546
 }
483
-.wushuju img{
484
-    width: 5.12rem;
485
-    height: 2.84rem;
547
+.conentBox {
548
+  width: 100%;
549
+  height: 100%;
550
+  .conent {
551
+    font-size: 0.32rem;
552
+    font-weight: 400;
553
+    line-height: 0.45rem;
554
+    border-bottom: 0.16rem solid #e5e5e5;
555
+    .head {
556
+      border-bottom: 0.01rem solid #e6e6e6;
557
+      p {
558
+        padding: 0.24rem 0.48rem;
559
+        i {
560
+          color: #00559d;
561
+        }
562
+        .btn {
563
+          float: right;
564
+        }
565
+      }
566
+    }
567
+    .center {
568
+      color: #333333;
569
+      border-bottom: 0.01rem solid #e6e6e6;
570
+      padding: 0.24rem 0.48rem;
571
+      p {
572
+        &.desc{
573
+        overflow: hidden;
574
+        max-height: .88rem;
575
+        }
576
+        .grayFont {
577
+          overflow-x: scroll;
578
+          color: #666;
579
+        }
580
+      }
581
+    }
582
+    .bottom {
583
+      overflow: hidden;
584
+      line-height: 0.86rem;
585
+      border-bottom: 0.01rem solid #e6e6e6;
586
+      font-size: 0.24rem;
587
+      color: #999;
588
+      padding: 0 0.24rem 0 0.48rem;
589
+    }
590
+  }
486 591
 }
487 592
 </style>

+ 398 - 427
src/views/indes.vue

@@ -1,460 +1,431 @@
1 1
 <template>
2
-    <div class="fle bgColor">
3
-        <!-- 头部导航栏 -->
4
-        <div class="tav">
5
-            <div @click="toRapir()">
6
-                <i class="iconfont icon-xinjian"></i>
7
-                <span>快速报修</span>
2
+  <div class="fle bgColor">
3
+    <!-- 头部导航栏 -->
4
+    <div class="tav">
5
+      <router-link to="/NewIncident">
6
+        <i class="iconfont icon-xinjian"></i>
7
+        <span>新建事件</span>
8
+      </router-link>
9
+      <!-- <div @click="toNewIncident()">
10
+        <i class="iconfont icon-xinjian"></i>
11
+        <span>新建事件</span>
12
+      </div>-->
13
+      <router-link to="/knowList">
14
+        <i class="iconfont icon-message"></i>
15
+        <span>常见问题</span>
16
+      </router-link>
17
+      <router-link to="/guide">
18
+        <i class="iconfont icon-fuwuzhinan"></i>
19
+        <span>公告公示</span>
20
+      </router-link>
21
+      <!-- <div @click="toKnowList()">
22
+        <i class="iconfont icon-message"></i>
23
+        <span>常见问题</span>
24
+      </div>
25
+      <div @click="toGuide()">
26
+        <i class="iconfont icon-fuwuzhinan"></i>
27
+        <span>公告公示</span>
28
+      </div>-->
29
+    </div>
30
+    <div class="bigBody">
31
+      <!-- 最新报修 -->
32
+      <div class="newRepair">
33
+        <div class="titHead">
34
+          <span class="tit">
35
+            <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
36
+            <span>待办事项</span>
37
+          </span>
38
+          <span class="link" @click="toIncidentList('todo')">
39
+            更多
40
+            <i class="iconfont icon-moren"></i>
41
+          </span>
42
+        </div>
43
+        <div
44
+          class="conentBox"
45
+          v-for="item in dataList"
46
+          @click="toIncidentDetails(item)"
47
+          v-if="!!dataList.length"
48
+        >
49
+          <!-- <div class="conentBox" v-for="v in dataList" @click="toIncidentDetails(v)" v-if="!newRapirNoData&&!newRapirLoading"> -->
50
+          <div class="conent">
51
+            <div class="head">
52
+              <p>
53
+                事件单号:{{item.incidentsign}}
54
+                <span
55
+                  :class="{'btn':true, 'daipingjia':item.state.name=='待评价', 'daijiedan':(item.state.name=='待接单'&&item.state.name=='待接单'&&item.handlerUser&&!item.candidateGroups), 'daiqiangdan':(item.state.name=='待接单'&&item.state.name=='待接单'&&!item.handlerUser&&item.candidateGroups), 'chulizhong':item.state.name=='处理中', 'yijiejue':item.state.name=='已解决', 'yiguanbi':item.state.name=='已关闭', 'chongxinzhipai':item.state.name=='重新指派'}"
56
+                >{{item.state.name=='待接单'?((item.handlerUser&&!item.candidateGroups)?'待接单':'待抢单'):item.state.name}}</span>
57
+              </p>
8 58
             </div>
9
-            <div @click="toKnowList()">
10
-                <i class="iconfont icon-message"></i>
11
-                <span>常见问题</span>
59
+            <div class="center">
60
+              <p class="desc">
61
+                <span class="fl">事件描述:</span>
62
+                <span class="grayFont overflowEllipsis2" v-html="item.description"></span>
63
+              </p>
64
+              <p v-if='valConfig==1'>
65
+                报修人:
66
+                <span class="grayFont">{{item.requester.name}}</span>
67
+              </p>
68
+              <p v-if='valConfig==2'>
69
+                报修科室 :
70
+                <span class="grayFont">{{item.department?item.department.dept:''}}</span>
71
+              </p>
12 72
             </div>
13
-            <div @click="toGuide()">
14
-                <i class="iconfont icon-fuwuzhinan"></i>
15
-                <span>服务指南</span>
73
+            <div class="bottom">
74
+              <span class="fl">联系电话:{{item.contactsInformation}}</span>
75
+              <span class="fr">报修时间:{{item.acceptDate}}</span>
16 76
             </div>
77
+          </div>
17 78
         </div>
18
-        <div class="bigBody">
19
-            <!-- 最新报修 -->
20
-            <div class="newRepair">
21
-                <div class="titHead">
22
-                    <span class="tit"><i class="iconfont icon-zuixinbaoxiu newPapir"></i><span>最新报修</span></span>
23
-                    <span class="link" @click="toIncidentList()">更多<i class="iconfont icon-moren"></i></span>
24
-                </div>
25
-                <div class="conentBox" v-for="v in newRapirData" @click="toIncidentDetails(v)" v-if="!newRapirNoData&&!newRapirLoading">
26
-                    <div class="conent">
27
-                        <div class="head">
28
-                            <!-- <span>{{v.requester.name}}</span> -->
29
-                            <span>报修编号:{{v.bxcode}}</span>
30
-                            <span>{{v.createTime}}</span>
31
-                        </div>
32
-                        <div class="cot">
33
-                            {{v.description}}
34
-                        </div>
35
-                    </div>
36
-                    <div class="flowChart">
37
-                        <div class="pits">
38
-                            <div :class="state!=1?'yesLine':''"></div>
39
-                            <div :class="state!=1&&state!=2?'yesLine':''"></div>
40
-                            <div :class="state!=1&&state!=2&&state!=3?'yesLine':''"></div>
41
-                            <div :class="state!=1&&state!=2&&state!=3&&state!=4?'yesLine':''"></div>
42
-
43
-                            <i class="iconfont icon-icon_weizuo shenqing no" v-if="false"></i>
44
-                            <i class="iconfont icon-icon_weizuo shouli no" v-if="state==1"></i>
45
-                            <i class="iconfont icon-icon_weizuo chuli no" v-if="state==2||state==1"></i>
46
-                            <i class="iconfont icon-icon_weizuo pingjia no" v-if="state==3||state==2||state==1"></i>
47
-                            <i class="iconfont icon-icon_weizuo wancheng no" v-if="state==4||state==3||state==2||state==1"></i>
48
-
49
-                            <i class="iconfont icon-icon_weizuo shenqing yes" v-if="state!=1"></i>
50
-                            <i class="iconfont icon-icon_weizuo shouli yes" v-if="state!=1&&state!=2"></i>
51
-                            <i class="iconfont icon-icon_weizuo chuli yes" v-if="state!=1&&state!=2&&state!=3"></i>
52
-                            <i class="iconfont icon-icon_weizuo pingjia yes" v-if="state!=1&&state!=2&&state!=3&&state!=4"></i>
53
-                            <i class="iconfont icon-icon_weizuo wancheng yes" v-if="false"></i>
54
-
55
-                            <i class="iconfont icon-icon_zhengzaijinx shenqing now" v-if="state==1"></i>
56
-                            <i class="iconfont icon-icon_zhengzaijinx shouli now" v-if="state==2"></i>
57
-                            <i class="iconfont icon-icon_zhengzaijinx chuli now" v-if="state==3"></i>
58
-                            <i class="iconfont icon-icon_zhengzaijinx pingjia now" v-if="state==4"></i>
59
-                            <i class="iconfont icon-icon_zhengzaijinx wancheng now" v-if="state==5"></i>
60
-                        </div>
61
-                        <div class="words">
62
-                            <div>申请</div>
63
-                            <div>受理</div>
64
-                            <div>处理</div>
65
-                            <div>评价</div>
66
-                            <div>完成</div>
67
-                        </div>
68
-                    </div>
69
-                </div>
70
-                <!-- 无数据 -->
71
-                <div class="wushuju" v-if="newRapirNoData">
72
-                    <img src="./../../static/images/wushuju.svg" alt="">
73
-                    <div class="noDataFont">暂无数据</div>
74
-                </div>
75
-                <!-- loading -->
76
-                <div class="loading" v-if="newRapirLoading">
77
-                    <cube-loading :size="30"></cube-loading>
78
-                </div>
79
-            </div>
80
-            <!-- 最新公告 -->
81
-            <div class="newNotice">
82
-                <div class="titHead titHead1">
83
-                    <span class="tit"><i class="iconfont icon-message newNoticeico"></i><span>最新公告</span></span>
84
-                    <span class="link" @click="toNoticeList()">更多<i class="iconfont icon-moren"></i></span>
85
-                </div>
86
-                <div class="conentBox" v-if="!newNoticeNoData&&!newNoticeLoading">
87
-                    <div class="conent" v-for="v in noticeData" @click="toNoticeDetails(v)">
88
-                        <div class="head">
89
-                            <!-- <span>{{v.title}}</span> -->
90
-                            {{v.title}}
91
-                        </div>
92
-                        <div class="cot">
93
-                                {{v.createTime.substring(0,v.createTime.length-5)}}
94
-                        </div>
95
-                    </div>
96
-                </div>
97
-                <!-- 无数据 -->
98
-                <div class="wushuju" v-if="newNoticeNoData">
99
-                    <img src="./../../static/images/wugonggao.svg" alt="">
100
-                    <div class="noDataFont">暂无数据</div>
101
-                </div>
102
-                <!-- loading -->
103
-                <div class="loading" v-if="newNoticeLoading">
104
-                    <cube-loading :size="30"></cube-loading>
105
-                </div>
106
-            </div>
79
+        <!-- 无数据 -->
80
+        <div class="wushuju" v-if="!dataList.length&&!newRapirLoading">
81
+          <img src="./../../static/images/wushuju.svg" alt />
82
+          <p>暂无待办事项</p>
83
+        </div>
84
+        <!-- loading -->
85
+        <div class="loading" v-if="newRapirLoading">
86
+          <cube-loading :size="30"></cube-loading>
107 87
         </div>
88
+      </div>
89
+      <!-- 最新公告 -->
90
+      <div class="newNotice">
91
+        <div class="titHead">
92
+          <span class="tit">
93
+            <i class="iconfont icon-message newNoticeico"></i>
94
+            <span>最新公告</span>
95
+          </span>
96
+          <span class="link" @click="toGuide()">
97
+            更多
98
+            <i class="iconfont icon-moren"></i>
99
+          </span>
100
+        </div>
101
+        <div class="conentBox" v-if="!newNoticeNoData&&!newNoticeLoading">
102
+          <div class="conent" v-for="v in noticeData" @click="toGuideDetail(v)">
103
+            <div class="head overflowEllipsis2">{{v.title}}</div>
104
+            <div class="cot">{{v.createTime.substring(0,v.createTime.length-5)}}</div>
105
+          </div>
106
+        </div>
107
+        <!-- 无数据 -->
108
+        <div class="wushuju" v-if="newNoticeNoData">
109
+          <img src="./../../static/images/wugonggao.svg" alt />
110
+          <p>暂无最新公告</p>
111
+        </div>
112
+        <!-- loading -->
113
+        <div class="loading" v-if="newNoticeLoading">
114
+          <cube-loading :size="30"></cube-loading>
115
+        </div>
116
+      </div>
108 117
     </div>
118
+  </div>
109 119
 </template>
110 120
 <script>
111
-import {formatDate} from './../components/js/date.js';
121
+import { formatDate } from "./../components/js/date.js";
112 122
 export default {
113
-    data(){
114
-        return{
115
-            loginUser:JSON.parse(localStorage.getItem("loginUser")),
116
-            noticeData:"",//公告列表
117
-            newRapirData:"",//最新报修
118
-            state:"",//流程状态
119
-            newRapirNoData:false,//最新报修无数据
120
-            newNoticeNoData:false,
121
-            newRapirLoading:true,//最新报修loading
122
-            newNoticeLoading:true//最新公告loading
123
+  data() {
124
+    return {
125
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
126
+      noticeData: "", //公告列表
127
+      dataList: "", //最新报修
128
+      state: "", //流程状态
129
+      newRapirNoData: false, //最新报修无数据
130
+      newNoticeNoData: false,
131
+      newRapirLoading: true, //最新报修loading
132
+      newNoticeLoading: true, //最新公告loading
133
+      candidateGroups: "",
134
+      valConfig: JSON.parse(localStorage.getItem("valConfig"))-0,//报修主体
135
+    };
136
+  },
137
+  methods: {
138
+    // 获取公告列表数据
139
+    getNoticData() {
140
+      console.log(this.valConfig)
141
+      // alert('公告列表')
142
+      var that = this;
143
+      this.$http
144
+        .post("service/user/data/fetchDataList/notice", {
145
+          idx: 0,
146
+          sum: 3,
147
+          notice: { status: 1 }
148
+        })
149
+        .then(function(res) {
150
+          // alert(JSON.stringify(res.data))
151
+          that.newNoticeLoading = false;
152
+          if (res.data.list.length > 0) {
153
+            that.newNoticeNoData = false;
154
+            that.noticeData = res.data.list;
155
+          } else {
156
+            that.newNoticeNoData = true;
157
+          }
158
+        });
159
+    },
160
+    // 获取最新报修
161
+    getNewRapir() {
162
+      var that = this;
163
+      this.$http
164
+        .post("service/bpm/bpm/fetchTask/bpm_incident", {
165
+          assignee: that.loginUser.id,
166
+          candidateGroups: that.candidateGroups,
167
+          searchType: "todo",
168
+          idx: 0,
169
+          sum: 2,
170
+          incident: { temporary: true }
171
+        })
172
+        .then(function(res) {
173
+          that.newRapirLoading = false;
174
+          if (res.data.data.length > 0) {
175
+            that.newRapirNoData = false;
176
+            that.dataList = res.data.data;
177
+            that.dataList[0].createTime = formatDate(
178
+              new Date(that.dataList[0].createTime),
179
+              "MM-dd hh:mm"
180
+            );
181
+          } else {
182
+            that.newRapirNoData = true;
183
+          }
184
+        });
185
+    },
186
+    // toNewIncident() {
187
+    //   this.$router.push({ path: "/newIncident" });
188
+    // },
189
+    toNoticeDetails(data) {
190
+      this.$router.push({
191
+        name: "NoticeDetails",
192
+        params: {
193
+          data: JSON.stringify(data)
194
+        }
195
+      });
196
+    },
197
+    toNoticeList() {
198
+      this.$router.push({ path: "/noticeList" });
199
+    },
200
+    toIncidentList(searchType) {
201
+      this.$router.push({
202
+        name: "IncidentList",
203
+        params: {
204
+          searchType: searchType
123 205
         }
206
+      });
124 207
     },
125
-    methods:{
126
-        ceshi(){
127
-            alert($('html').css("font-size"));
128
-        },
129
-        // 获取公告列表数据
130
-        getNoticData(){
131
-            var that=this;
132
-            this.$http.post('service/user/data/fetchDataList/notice',{
133
-                idx: 0,
134
-                sum: 3,
135
-                notice:{
136
-                    status:1
137
-                }
138
-            }).then(function(res){
139
-                that.newNoticeLoading=false;
140
-                if(res.data.list.length>0){
141
-                    that.newNoticeNoData=false;
142
-                    that.noticeData=res.data.list;
143
-                }else{
144
-                    that.newNoticeNoData=true
145
-                }
146
-            })
147
-        },
148
-        // 获取最新报修
149
-        getNewRapir(){
150
-            var that=this;
151
-            this.$http.post('service/apply/bpm/fetchServiceTasks',{
152
-                assignee:that.loginUser.id,
153
-                idx: 0,
154
-                sum: 1
155
-            }).then(function(res){
156
-                that.newRapirLoading=false;
157
-                if(res.data.data.length>0){
158
-                    that.newRapirNoData=false;
159
-                    that.newRapirData=res.data.data;
160
-                    that.newRapirData[0].createTime=formatDate(new Date(that.newRapirData[0].createTime), 'MM-dd hh:mm');
161
-                    if(that.newRapirData[0].state.name=="未受理"){
162
-                        that.state=1
163
-                    }else if(that.newRapirData[0].state.name=="已转换"){
164
-                        that.state=2
165
-                    }else if(that.newRapirData[0].state.name=="处理中"){
166
-                        that.state=3
167
-                    }else if(that.newRapirData[0].state.name=="待评价"){
168
-                        that.state=4
169
-                    }else if(that.newRapirData[0].state.name=="已解决"){
170
-                        that.state=5
171
-                    }else{
172
-                        that.state=5
173
-                    }
174
-                    if(that.newRapirData[0].incident.state&&that.newRapirData[0].incident.state.name){
175
-                        if(that.newRapirData[0].incident.state.name=="待接单"){
176
-                            that.state=3
177
-                        }else if(that.newRapirData[0].incident.state.name=="处理中"){
178
-                            that.state=3
179
-                        }
180
-                    }
181
-                    console.log(that.state)
182
-                }else{
183
-                    that.newRapirNoData=true
184
-                }
185
-            })
186
-        },
187
-        toRapir(){
188
-            this.$router.push({path:'/repair'})
189
-        },
190
-        toNoticeDetails(data){
191
-            this.$router.push({
192
-                name:'NoticeDetails',
193
-                params:{
194
-                    data:JSON.stringify(data)
195
-                }
196
-            })
197
-            // this.$router.push({
198
-            //     name:'NoticeDetails',
199
-            //     params:{
200
-            //         data:data
201
-            //     }
202
-            // })
203
-        },
204
-        toNoticeList(){
205
-            this.$router.push({path:'/noticeList'})
206
-        },
207
-        toIncidentList(){
208
-            this.$router.push({path:'/main/incidentList'})
209
-        },
210
-        toKnowList(){
211
-            this.$router.push({path:'/knowList'})
212
-        },
213
-        toGuide(){
214
-            this.$router.push({path:'/guide'})
215
-        },
216
-        toIncidentDetails(data){
217
-            this.$router.push({
218
-                name:'IncidentDetails',
219
-                params:{
220
-                    data:JSON.stringify(data)
221
-                }
222
-            })
223
-        },
208
+    // toKnowList() {
209
+    //   this.$router.push({ path: "/knowList" });
210
+    // },
211
+    toGuide() {
212
+      this.$router.push({ path: "/guide" });
224 213
     },
225
-    created(){
226
-        this.getNoticData(),
227
-        this.getNewRapir()
214
+    toGuideDetail(v) {
215
+      this.$router.push({ name: "GuideDetail", params: { data: v } });
228 216
     },
229
-    mounted(){
217
+    toIncidentDetails(data) {
218
+      var name = "";
219
+      if (data.state.value == "pending") {
220
+        if (data.handlerUser && !data.candidateGroups) {
221
+          // 指派给人 接单
222
+          name = "Order";
223
+        } else if (data.candidateGroups && !data.handlerUser) {
224
+          // 指派给组 抢单
225
+          name = "GrabSheet";
226
+        }
227
+      } else if (data.state.value == "reassign") {
228
+        name = "AgainAssign";
229
+      } else if (data.state.value == "handler") {
230
+        name = "Processing";
231
+      } else if (data.state.value == "resolved") {
232
+        name = "Solved";
233
+      } else if (data.state.value == "close") {
234
+        name = "Closed";
235
+      }
236
+      this.$router.push({
237
+        name: name,
238
+        params: {
239
+          data: data
240
+        }
241
+      });
230 242
     }
231
-}
243
+  },
244
+  created() {
245
+    var that = this;
246
+    that.valConfig=JSON.parse(localStorage.getItem("valConfig"))-0
247
+    that.loginUser.group.forEach(element => {
248
+      that.candidateGroups += element.id + ",";
249
+    });
250
+    that.candidateGroups = that.candidateGroups.substring(
251
+      0,
252
+      that.candidateGroups.length - 1
253
+    );
254
+    localStorage.removeItem("category");
255
+    localStorage.removeItem("categoryVal");
256
+    localStorage.removeItem("selectedCategoryTxt");
257
+    localStorage.removeItem("model");
258
+    localStorage.removeItem("modelData");
259
+    localStorage.removeItem("place");
260
+    localStorage.removeItem("referenceInfo");
261
+    localStorage.removeItem("solution");
262
+    localStorage.removeItem("order");
263
+    this.getNoticData();
264
+    this.getNewRapir();
265
+  },
266
+  mounted() {}
267
+};
232 268
 </script>
233
-<style scoped>
234
-.bgColor{
235
-    background-color: white
269
+<style scoped lang="less">
270
+.fl {
271
+  float: left;
236 272
 }
237
-.fle{
238
-    display: flex;
239
-    flex-direction:column;
240
-    background-color: white
273
+.fr {
274
+  float: right;
241 275
 }
242
-.bigBody{
243
-    display: flex;
244
-    flex-direction:column;
245
-    height: 100%;
246
-    width: 100%
276
+.bgColor {
277
+  background-color: white;
247 278
 }
248
-/* 头部导航栏 */
249
-.tav{
250
-    height: 2rem;
251
-    background: linear-gradient(#005395, #226CA8,#003057);
252
-    display: flex;
253
-    width: 100%
254
-}
255
-.tav div{
256
-    flex: 1;
257
-    text-align: center;
258
-    display: flex;
259
-    flex-direction:column;
260
-    align-items:center;
261
-    justify-content:center
279
+.fle {
280
+  display: flex;
281
+  flex-direction: column;
282
+  background-color: white;
262 283
 }
263
-.tav div i{
264
-    font-size: .6rem;
265
-    color: white
284
+.bigBody {
285
+  display: flex;
286
+  flex-direction: column;
287
+  height: 100%;
288
+  width: 100%;
266 289
 }
267
-.tav div span{
268
-    font-size: .32rem;
269
-    color: white;
270
-    display: inline-block;
271
-    margin-top: .16rem
290
+/* 头部导航栏 */
291
+.tav {
292
+  height: 2rem;
293
+  background: linear-gradient(#005395, #226ca8, #003057);
294
+  display: flex;
295
+  width: 100%;
296
+}
297
+.tav a {
298
+  flex: 1;
299
+  text-align: center;
300
+  display: flex;
301
+  flex-direction: column;
302
+  align-items: center;
303
+  justify-content: center;
304
+}
305
+.tav a i {
306
+  font-size: 0.6rem;
307
+  color: white;
308
+}
309
+.tav a span {
310
+  font-size: 0.32rem;
311
+  color: white;
312
+  display: inline-block;
313
+  margin-top: 0.16rem;
272 314
 }
273 315
 /* .bigBody{
274 316
     height: auto;
275 317
 } */
276 318
 /* tit导航 */
277
-.titHead{
278
-    display: flex;
279
-    justify-content:space-between;
280
-    padding: 0 .24rem;
281
-    height: .88rem;
282
-    line-height: .88rem;
283
-    border-bottom: .01rem rgb(238,238,238) solid
284
-}
285
-.titHead1{
286
-    height: 1rem;
287
-}
288
-.titHead .tit .newPapir{
289
-    font-size: .36rem;
290
-    color: #A37200
291
-}
292
-.titHead .tit .newNoticeico{
293
-    font-size: .36rem;
294
-    color: #005395
295
-}
296
-.titHead .tit span{
297
-    display: inline-block;
298
-    margin-left: .08rem;
299
-    font-size: .36rem
300
-}
301
-.titHead .link{
302
-    font-size: .24rem;
303
-    color: #999999
304
-}
305
-.titHead .link i{
306
-    font-size: .24rem;
307
-    color: #999999;
308
-    display: inline-block;
309
-    margin-left: .08rem
310
-}
311
-/* 最新报修 */
312
-.newRepair{
313
-    border-top: .16rem rgb(238,238,238) solid;
314
-}
315
-.newRepair .conentBox{
316
-    padding: 0 .16rem;
317
-    height: auto;
319
+.titHead {
320
+  display: flex;
321
+  justify-content: space-between;
322
+  padding: 0 0.24rem;
323
+  height: 0.88rem;
324
+  line-height: 0.88rem;
325
+  border-bottom: 0.01rem rgb(238, 238, 238) solid;
326
+}
327
+.titHead1 {
328
+  height: 0.88rem;
329
+}
330
+.titHead .tit .newPapir {
331
+  font-size: 0.36rem;
332
+  color: #a37200;
333
+}
334
+.titHead .tit .newNoticeico {
335
+  font-size: 0.36rem;
336
+  color: #005395;
337
+}
338
+.titHead .tit span {
339
+  display: inline-block;
340
+  margin-left: 0.08rem;
341
+  font-size: 0.36rem;
342
+}
343
+.titHead .link {
344
+  font-size: 0.24rem;
345
+  color: #999999;
346
+}
347
+.titHead .link i {
348
+  font-size: 0.24rem;
349
+  color: #999999;
350
+  display: inline-block;
351
+  margin-left: 0.08rem;
318 352
 }
319
-.newRepair .conentBox .conent{
320
-    padding: .24rem .48rem
321
-}
322
-.newRepair .conentBox .conent .head{
323
-    height: .45rem;
324
-    line-height: .45rem
325
-}
326
-.newRepair .conentBox .conent .head span:nth-child(1){
327
-    float: left;
328
-    font-size: .32rem;
329
-    font-weight: 400;
330
-    color: #333333
331
-}
332
-.newRepair .conentBox .conent .head span:nth-child(2){
333
-    float: right;
334
-    font-size: .23rem;
335
-    color: #999999
336
-}
337
-.newRepair .conentBox .conent .cot{
338
-    font-size: .28rem;
339
-    color: #666666;
340
-    line-height: .39rem;
341
-    margin-top: .08rem;
342
-    display: -webkit-box;
343
-    -webkit-line-clamp: 2;
344
-    -webkit-box-orient: vertical;
345
-    word-break: break-all;
346
-    overflow: hidden;
347
-}
348
-.newRepair .conentBox .flowChart{
349
-    border-top: .01rem rgb(238,238,238) solid;
350
-    padding: .24rem 0
351
-}
352
-.newRepair .conentBox .flowChart .pits{
353
-    display: flex;
354
-    margin-top: .24rem;
355
-    padding: 0 10%;
356
-    position: relative
357
-}
358
-.newRepair .conentBox .flowChart .pits i{
359
-    font-size: .3rem
360
-}
361
-.newRepair .conentBox .flowChart .pits div{
362
-    border-top: .03rem rgb(224, 222, 222) solid;
363
-    flex: 1
364
-}
365
-.newRepair .conentBox .flowChart .pits .yesLine{
366
-    border-top: .03rem rgb(1,85,157) solid;
367
-}
368
-.newRepair .conentBox .flowChart .pits .no{
369
-    color:#cccccc
370
-}
371
-.newRepair .conentBox .flowChart .pits .yes{
372
-    color:#005359
373
-}
374
-.newRepair .conentBox .flowChart .pits .now{
375
-    color:#48a843
376
-}
377
-.newRepair .conentBox .flowChart .pits .shenqing{
378
-    position: absolute;
379
-    left: 8%;
380
-    top:-.12rem
381
-}
382
-.newRepair .conentBox .flowChart .pits .shouli{
383
-    position: absolute;
384
-    left: 28%;
385
-    top:-.12rem
386
-}
387
-.newRepair .conentBox .flowChart .pits .chuli{
388
-    position: absolute;
389
-    left: 48%;
390
-    top:-.12rem
391
-}
392
-.newRepair .conentBox .flowChart .pits .pingjia{
393
-    position: absolute;
394
-    left: 68%;
395
-    top:-.12rem
396
-}
397
-.newRepair .conentBox .flowChart .pits .wancheng{
398
-    position: absolute;
399
-    left: 88%;
400
-    top:-.12rem
401
-}
402
-.newRepair .conentBox .flowChart .words{
403
-    display: flex;
404
-    margin-top: .3rem
405
-}
406
-.newRepair .conentBox .flowChart .words div{
407
-    flex: 1;
408
-    font-size: .32rem;
409
-    text-align: center;
410
-    color:#333333
353
+
354
+.newRepair {
355
+  border-top: 0.16rem rgb(238, 238, 238) solid;
356
+  .conentBox {
357
+    .conent {
358
+      font-size: 0.32rem;
359
+      font-weight: 400;
360
+      line-height: 0.45rem;
361
+      .head {
362
+        border-bottom: 0.01rem solid #e6e6e6;
363
+        p {
364
+          padding: 0.24rem 0.48rem;
365
+          .btn {
366
+            float: right;
367
+          }
368
+        }
369
+      }
370
+      .center {
371
+        color: #333333;
372
+        border-bottom: 0.01rem solid #e6e6e6;
373
+        padding: 0.24rem 0.48rem;
374
+        p {
375
+          &.desc {
376
+            overflow: hidden;
377
+            max-height: 0.88rem;
378
+          }
379
+          .grayFont {
380
+            overflow-x: scroll;
381
+            color: #666;
382
+          }
383
+        }
384
+      }
385
+      .bottom {
386
+        overflow: hidden;
387
+        line-height: 0.86rem;
388
+        border-bottom: 0.01rem solid #e6e6e6;
389
+        font-size: 0.24rem;
390
+        color: #999;
391
+        padding: 0 0.24rem 0 0.48rem;
392
+      }
393
+    }
394
+  }
411 395
 }
396
+
412 397
 /* 最新公告 */
413
-.newNotice{
414
-    border-top: .16rem rgb(238,238,238) solid;
415
-    height: 100%;
416
-    display: flex;
417
-    flex-direction:column;
418
-    min-height: 0
419
-}
420
-.newNotice .conentBox{
421
-    height: 100%;
422
-    overflow: hidden;
423
-    overflow-y: scroll
424
-}
425
-.newNotice .conentBox .conent{
426
-    padding: .24rem .64rem;
427
-    border-bottom: .01rem rgb(238,238,238) solid
428
-}
429
-.newNotice .conentBox .conent .head{
430
-    line-height: .45rem;
431
-    display: -webkit-box;
432
-    -webkit-line-clamp: 2;
433
-    -webkit-box-orient: vertical;
434
-    word-break: break-all;
435
-    overflow: hidden;
436
-    font-size: .32rem;
437
-}
438
-/* .newNotice .conentBox .conent .head span{
439
-    font-size: .32rem;
440
-} */
441
-.newNotice .conentBox .conent .cot{
442
-    font-size: .24rem;
443
-    color: #999999;
444
-    line-height: .34rem;
445
-    margin-top: .08rem
398
+.newNotice {
399
+  border-top: 0.16rem rgb(238, 238, 238) solid;
400
+  .conentBox {
401
+    .conent {
402
+      padding: 0.24rem 0.64rem;
403
+      border-bottom: 0.01rem solid #eee;
404
+      .head {
405
+        font-size: 0.32rem;
406
+        line-height: 0.45rem;
407
+      }
408
+      .cot {
409
+        font-size: 0.24rem;
410
+        color: #999;
411
+        line-height: 0.34rem;
412
+      }
413
+    }
414
+  }
446 415
 }
447
-.wushuju{
448
-    text-align: center;
416
+
417
+.wushuju {
418
+  text-align: center;
419
+  color: #999;
449 420
 }
450
-.wushuju img{
451
-    width: 5.12rem;
452
-    height: 2.84rem;
421
+.wushuju img {
422
+  width: 5.12rem;
423
+  height: 2.84rem;
453 424
 }
454
-.loading{
455
-    height: 2rem;
456
-    display: flex;
457
-    justify-content:center;
458
-    align-items:center
425
+.loading {
426
+  height: 2rem;
427
+  display: flex;
428
+  justify-content: center;
429
+  align-items: center;
459 430
 }
460
-</style>
431
+</style>

+ 281 - 0
src/views/inspectionDoneDetail.vue

@@ -0,0 +1,281 @@
1
+<template>
2
+  <div class="inspedtionDetail">
3
+    <div class="label">巡检信息</div>
4
+    <div class="head">
5
+      <p>
6
+        <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
7
+        巡检单号
8
+        <span class="num">{{baseInfo.sign}}</span>
9
+        <span class="btn zhixingzhong">{{baseInfo.stateName}}</span>
10
+      </p>
11
+    </div>
12
+    <div class="info">
13
+      <p>
14
+        <span class="fl">巡检类型</span>
15
+        <span class="fr">{{baseInfo.inspectionType.type}}</span>
16
+      </p>
17
+      <p>
18
+        <span class="fl">计划主题</span>
19
+        <span class="fr">{{baseInfo.inspection.title}}</span>
20
+      </p>
21
+      <p>
22
+        <span class="fl">计划内容</span>
23
+        <span class="fr showwrap">{{baseInfo.inspection.content}}</span>
24
+      </p>
25
+      <p>
26
+        <span class="fl">巡检状态</span>
27
+        <span class="fr">{{baseInfo.stateName}}</span>
28
+      </p>
29
+      <p>
30
+        <span class="fl">巡检策略</span>
31
+        <span class="fr">{{baseInfo.inspection.planStrategy.name}}</span>
32
+      </p>
33
+      <p>
34
+        <span class="fl">执行时长</span>
35
+        <span class="fr">{{baseInfo.inspection.executionTime}}分钟</span>
36
+      </p>
37
+      <p>
38
+        <span class="fl">开始时间</span>
39
+        <span
40
+          class="fr"
41
+        >{{baseInfo.inspection.planStartTime.slice(0,baseInfo.inspection.planStartTime.length-2)}}</span>
42
+      </p>
43
+      <p>
44
+        <span class="fl">逾期时间</span>
45
+        <span class="fr">{{baseInfo.overdueTime}}</span>
46
+      </p>
47
+    </div>
48
+    <div class="label">巡检结果</div>
49
+    <div class="form">
50
+      <p v-for="(item,index) in forms">
51
+        <span v-if="index%2==0">{{item.templateOptions.placeholder}}</span>
52
+        <span v-if="index%2==1" class="colorGray">{{param[item.key]?'不正常':'正常'}}</span>
53
+      </p>
54
+    </div>
55
+  </div>
56
+</template>
57
+<script>
58
+export default {
59
+  data() {
60
+    return {
61
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
62
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
63
+      baseInfo: {}, //巡检基础信息
64
+      items: [], //巡检项目
65
+      labels: [], //巡检项目label
66
+      status: [], //巡检项目的状态
67
+      forms: [], //巡检结果
68
+      abnormal: "", //异常项
69
+      param: {
70
+        inspectionProcessActual: {}
71
+      },
72
+      model: {}
73
+    };
74
+  },
75
+  methods: {
76
+    // 获取项目异常状态
77
+    getItems() {
78
+      var that = this;
79
+      that.$http
80
+        .get(
81
+          "/service/form/renderForm/inspection_confirm/" +
82
+            that.baseInfo.processInstanceId +
83
+            "/" +
84
+            that.loginUser.id,
85
+          {}
86
+        )
87
+        .then(function(res) {
88
+          console.log(res.data);
89
+          that.model = res.data.model;
90
+          var fields = res.data.fields;
91
+          console.log(fields);
92
+          fields.forEach(v => {
93
+            if (v.templateOptions.label == "检查项目") {
94
+              that.labels.push(v);
95
+            }
96
+            if (v.templateOptions.label == "状态") {
97
+              that.status.push(v);
98
+            }
99
+          });
100
+          console.log(that.labels);
101
+          console.log(that.status);
102
+          let labels = that.labels;
103
+          let status = that.status;
104
+          let j = 0,
105
+            newArr = new Array();
106
+          for (let i = 0; i < that.labels.length; i++) {
107
+            j = i * 2;
108
+            newArr[j] = that.labels[i];
109
+            newArr[j + 1] = that.status[i];
110
+          }
111
+          console.log(newArr);
112
+          that.forms = newArr;
113
+          window.localStorage.setItem("forms", JSON.stringify(that.forms));
114
+        });
115
+    },
116
+    // 提交
117
+    submit() {
118
+      this.param.loginUser = this.loginUser;
119
+      this.param.save = this.model.save;
120
+      this.param.close = this.model.close;
121
+      this.param.submit = this.model.submit;
122
+      this.param.toIncident = this.model.toIncident;
123
+      this.param.handler_code = "resolve";
124
+      this.param.inspectionProcessActual = this.baseInfo;
125
+      console.log(this.param);
126
+      var that = this;
127
+      that.$http
128
+        .post(
129
+          "/service/bpm/bpm/completeTask/" +
130
+            that.baseInfo.processInstanceId +
131
+            "/" +
132
+            that.loginUser.id+'/'+that.baseInfo.id,
133
+          that.param
134
+        )
135
+        .then(function(res) {
136
+          console.log(res.data);
137
+          if (res.data.status == 200) {
138
+            $("#fade").fadeIn();
139
+            that.promptingConent = "恭喜您,提交成功!";
140
+            that.promptingStatus = true;
141
+            that.dialog = that
142
+              .$createDialog({
143
+                type: "alert",
144
+                title: "提交成功",
145
+                content: "点击返回列表",
146
+                icon: "cubeic-right",
147
+                onConfirm: (e, promptValue) => {
148
+                  that.$router.push({ path: "/main/inspection" });
149
+                }
150
+              })
151
+              .show();
152
+            setTimeout(function() {
153
+              $("#fade").fadeOut();
154
+            }, 2000);
155
+          }
156
+        });
157
+    },
158
+    // 取消
159
+    cancle() {
160
+      var that = this;
161
+      that.$router.go(-1);
162
+    },
163
+    // 生成事件
164
+    createIncident() {
165
+      for (var i = 0; i < $(".cube-switch.abnormal").length; i++) {
166
+        this.abnormal += $(".cube-switch.abnormal")[i].dataset.label + ",";
167
+      }
168
+      this.$router.push({
169
+        name: "NewIncident",
170
+        params: { data: this.baseInfo, abnormal: this.abnormal }
171
+      });
172
+    }
173
+  },
174
+  created() {
175
+    this.baseInfo =
176
+      this.$route.params.data ||
177
+      JSON.parse(window.localStorage.getItem("insDetailInfo"));
178
+    this.forms = JSON.parse(window.localStorage.getItem("forms")) || [];
179
+    this.title = this.baseInfo.inspectionType.type;
180
+    this.getItems();
181
+  }
182
+};
183
+</script>
184
+<style lang="less" scoped>
185
+.inspedtionDetail {
186
+    .colorGray{
187
+        color: #999;
188
+    }
189
+  .label {
190
+    background-color: #eee;
191
+    height: 0.6rem;
192
+    line-height: 0.6rem;
193
+    padding-left: 0.2rem;
194
+    font-size: 0.24rem;
195
+    color: #666;
196
+  }
197
+
198
+  .head {
199
+    font-size: 0.34rem;
200
+    line-height: 0.45rem;
201
+    border-bottom: 0.01rem solid #e6e6e6;
202
+    p {
203
+      padding: 0.24rem 0.48rem;
204
+      i {
205
+        color: #00559d;
206
+      }
207
+      .num {
208
+        margin-left: 1rem;
209
+      }
210
+      .btn {
211
+        float: right;
212
+      }
213
+    }
214
+  }
215
+
216
+  .info {
217
+    color: #999;
218
+    font-size: 0.28rem;
219
+    overflow: hidden;
220
+    p {
221
+      line-height: 0.4rem;
222
+      padding: 0.1rem 0.24rem;
223
+      overflow: hidden;
224
+      .overflowEllipsis2 {
225
+        margin-left: 1.96rem;
226
+      }
227
+    }
228
+  }
229
+
230
+  .form {
231
+    font-size: 0.32rem;
232
+    color: #333;
233
+    line-height: 0.86rem;
234
+    overflow: hidden;
235
+    display: flex;
236
+    justify-content: space-between;
237
+    align-items: center;
238
+    flex-wrap: wrap;
239
+    p {
240
+      line-height: 0.4rem;
241
+      padding: 0.2rem 0.24rem;
242
+      // border-bottom: 0.01rem solid #ccc;
243
+      width: 35%;
244
+      &:nth-child(2n){
245
+          text-align: right;
246
+      }
247
+    }
248
+  }
249
+
250
+  .btns {
251
+    font-size: 0.32px;
252
+    display: flex;
253
+    justify-content: space-between;
254
+    align-items: center;
255
+    padding: 0.24rem;
256
+    .btn {
257
+      border: 0.01rem solid #005395;
258
+      color: #005395;
259
+      background-color: #fff;
260
+      width: 1.8rem;
261
+      height: 0.88rem;
262
+      line-height: 0.88rem;
263
+      text-align: center;
264
+      border-radius: 0.1rem;
265
+      &.submit {
266
+        width: 3.06rem;
267
+        background-color: #005395;
268
+        color: #fff;
269
+      }
270
+      &.cancel {
271
+        border-color: #ccc;
272
+        color: #333;
273
+      }
274
+    }
275
+  }
276
+  .showwrap {
277
+    width: 75%;
278
+    text-align: right;
279
+  }
280
+}
281
+</style>

+ 239 - 218
src/views/knowDetails.vue

@@ -1,231 +1,252 @@
1 1
 <template>
2
-    <div class="body bgColor">
3
-        <div class="title">
4
-            <!-- <div>主题:</div> -->
5
-            {{data.title}}
6
-        </div>
7
-        <div class="timeBox">
8
-            <div>{{data.createUser.dept?data.createUser.dept.dept:"暂无"}}</div>
9
-            <div>{{data.createtime.substring(0,data.createtime.length-3)}}</div>
10
-        </div>
11
-        <div class="conents" v-html="data.content">
12
-            {{data.content}}
13
-        </div>
14
-        <div class="release">
15
-            {{data.createUser.dept?data.createUser.dept.dept:"暂无"}}
16
-        </div>
17
-        <div class="time">
18
-            {{data.createtime.substring(0,data.createtime.length-3)||"暂无"}}
19
-        </div>
20
-        <div class="files" v-if="files.length">
21
-            <!-- <div @click="downFile(v.token,v.name)" v-for="(v,index) in files">{{v.name}}</div> -->
22
-            <a :href="getFileUrl(v.previewUrl)" v-for="(v,index) in files" target="_blank" :download="getDownload(v.name)">{{v.name}}</a>
23
-        </div>
24
-        <div class="keyword" v-if="data.label">
25
-            <span v-for="v in data.label" @click="toKnowList(v)">{{v}}</span>
26
-        </div>
27
-        <div class="good" @click="starClick()" v-show="starIf">
28
-            <i class="iconfont icon-dianzan"></i>
29
-            <span>{{data.star||0}}</span>
30
-        </div>
31
-        <div class="goodClick" v-show="!starIf">
32
-            <i class="iconfont icon-dianzan"></i>
33
-            <span>{{data.star||0}}</span>
34
-        </div>
2
+  <div class="body">
3
+    <div class="header">常见问题</div>
4
+    <div class="bgColor">
5
+      <div class="title">
6
+        <!-- <div>主题:</div> -->
7
+        {{data.title}}
8
+      </div>
9
+      <div class="timeBox">
10
+        <div>{{data.createUser.dept?data.createUser.dept.dept:"暂无"}}</div>
11
+        <div>{{data.createtime.substring(0,data.createtime.length-3)}}</div>
12
+      </div>
13
+      <div class="conents" v-html="data.content">{{data.content}}</div>
14
+      <!-- <div class="release">{{data.createUser.dept?data.createUser.dept.dept:"暂无"}}</div>
15
+      <div class="time">{{data.createtime.substring(0,data.createtime.length-3)||"暂无"}}</div> -->
16
+      <div class="files" v-if="files.length">
17
+        <!-- <div @click="downFile(v.token,v.name)" v-for="(v,index) in files">{{v.name}}</div> -->
18
+        <a
19
+          :href="getFileUrl(v.previewUrl)"
20
+          v-for="(v,index) in files"
21
+          target="_blank"
22
+          :download="getDownload(v.name)"
23
+        >{{v.name}}</a>
24
+      </div>
25
+      <div class="keyword" v-if="data.label">
26
+        <span v-for="v in data.label" @click="toKnowList(v)">{{v}}</span>
27
+      </div>
28
+      <div class="good" @click="starClick()" v-show="starIf">
29
+        <i class="iconfont icon-dianzan"></i>
30
+        <span>{{data.star||0}}</span>
31
+      </div>
32
+      <div class="goodClick" v-show="!starIf">
33
+        <i class="iconfont icon-dianzan"></i>
34
+        <span>{{data.star||0}}</span>
35
+      </div>
35 36
     </div>
37
+  </div>
36 38
 </template>
37 39
 <script>
38 40
 export default {
39
-    data(){
40
-        return{
41
-            loginUser:JSON.parse(localStorage.getItem("loginUser")),
42
-            data:"",
43
-            starIf:"",
44
-            files:[]
41
+  data() {
42
+    return {
43
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
44
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
45
+      data: "",
46
+      starIf: "",
47
+      files: []
48
+    };
49
+  },
50
+  methods: {
51
+    getFileUrl(res) {
52
+      return res;
53
+    },
54
+    getDownload(res) {
55
+      return res;
56
+    },
57
+    downFile(token, fileName) {
58
+      this.$http
59
+        .get("service/common/common/downloadAttachment/" + token, {
60
+          headers: {
61
+            Accept: "*/*"
62
+          },
63
+          responseType: "arraybuffer"
64
+        })
65
+        .then(function(res) {
66
+          var file = new Blob([res.data], {
67
+            type: "application/octet-stream"
68
+          });
69
+          var fileURL = URL.createObjectURL(file);
70
+          var a = document.createElement("a");
71
+          a.href = fileURL;
72
+          a.target = "_blank";
73
+          a.download = fileName;
74
+          document.body.appendChild(a);
75
+          a.click();
76
+        });
77
+    },
78
+    getFiles() {
79
+      var that = this;
80
+      this.$http
81
+        .get(
82
+          "service/common/common/listAttachment/solution/" + this.data.id,
83
+          {}
84
+        )
85
+        .then(function(res) {
86
+          that.files = res.data.data;
87
+        });
88
+    },
89
+    toKnowList(res) {
90
+      this.$router.push({
91
+        name: "KnowList",
92
+        params: {
93
+          keword: res
45 94
         }
95
+      });
96
+    },
97
+    getParamsData() {
98
+      this.data = JSON.parse(this.$route.params.data);
46 99
     },
47
-    methods:{
48
-        getFileUrl(res){
49
-            return res
50
-        },
51
-        getDownload(res){
52
-            return res
53
-        },
54
-        downFile(token,fileName){
55
-            this.$http.get('service/common/common/downloadAttachment/'+token,{
56
-                headers:{
57
-                    'Accept': '*/*'
58
-                },
59
-                responseType: 'arraybuffer'
60
-            }).then(function(res){
61
-                var file = new Blob([res.data], {
62
-                    type: 'application/octet-stream'
63
-                });
64
-                var fileURL = URL.createObjectURL(file);
65
-                var a = document.createElement('a');
66
-                a.href = fileURL;
67
-                a.target = '_blank';
68
-                a.download = fileName;
69
-                document.body.appendChild(a);
70
-                a.click();
71
-            })
72
-        },
73
-        getFiles(){
74
-            var that=this;
75
-            this.$http.get('service/common/common/listAttachment/solution/'+this.data.id,{}).then(function(res){
76
-                that.files=res.data.data;
77
-            })
78
-        },
79
-        toKnowList(res){
80
-            this.$router.push({
81
-                name:"KnowList",
82
-                params:{
83
-                    keword:res
84
-                }
85
-            })
86
-        },
87
-        getParamsData(){
88
-            this.data=JSON.parse(this.$route.params.data);
89
-        },
90
-        // 关键字查询
91
-        getKeyWords(){
92
-            if(this.data.label){
93
-                this.data.label=this.data.label.split("/");
94
-            }
95
-        },
96
-        // 获取是否点过赞
97
-        getStarIf(){
98
-            var that=this;
99
-            this.$http.get('service/solution/canStar/requester/'+this.data.id+"/"+this.loginUser.id,{}).then(function(res){
100
-                that.starIf=res.data.result;
101
-            })
102
-        },
103
-        // 点赞
104
-        starClick(){
105
-            var that=this;
106
-            that.starIf=false;
107
-            that.data.star=Number(that.data.star)+1;
108
-            this.$http.get('service/solution/star/requester/'+this.data.id+"/"+this.loginUser.id,{}).then(function(res){
109
-            })
110
-        },
100
+    // 关键字查询
101
+    getKeyWords() {
102
+      if (this.data.label) {
103
+        this.data.label = this.data.label.split("/");
104
+      }
111 105
     },
112
-    created(){
113
-        this.getParamsData();
114
-        this.getStarIf();
115
-        this.getKeyWords();
116
-        this.getFiles()
106
+    // 获取是否点过赞
107
+    getStarIf() {
108
+      var that = this;
109
+      this.$http
110
+        .get(
111
+          "service/solution/canStar/requester/" +
112
+            this.data.id +
113
+            "/" +
114
+            this.loginUser.id,
115
+          {}
116
+        )
117
+        .then(function(res) {
118
+          that.starIf = res.data.result;
119
+        });
117 120
     },
118
-    mounted(){
121
+    // 点赞
122
+    starClick() {
123
+      var that = this;
124
+      that.starIf = false;
125
+      that.data.star = Number(that.data.star) + 1;
126
+      this.$http
127
+        .get(
128
+          "service/solution/star/requester/" +
129
+            this.data.id +
130
+            "/" +
131
+            this.loginUser.id,
132
+          {}
133
+        )
134
+        .then(function(res) {});
119 135
     }
120
-}
136
+  },
137
+  created() {
138
+    this.getParamsData();
139
+    this.getStarIf();
140
+    this.getKeyWords();
141
+    this.getFiles();
142
+  },
143
+  mounted() {}
144
+};
121 145
 </script>
122
-<style scoped>
123
-.bgColor{
124
-    background-color: white
125
-}
126
-.body{
127
-    padding: 0 .24rem
128
-}
129
-.title{
130
-    font-size: .32rem;
131
-    line-height: .45rem;
132
-    padding: .24rem .24rem 0 .24rem;
133
-    color: #333333;
134
-    font-weight: bold
135
-}
136
-.timeBox{
137
-    display: flex;
138
-    justify-content:space-between;
139
-    font-size: .24rem;
140
-    color:#999999;
141
-    padding: .16rem 0;
142
-    line-height: .33rem
143
-}
144
-.conents{
145
-    font-size: .28rem;
146
-    padding-top: .24rem;
147
-    border-top: .01rem rgb(223, 222, 222) solid;
148
-    text-indent:2em;
149
-    line-height: .39rem;
150
-    padding-bottom: .48rem;
151
-    color: #666666;
152
-    overflow: hidden;
153
-    width: 100%;
154
-    overflow-x: scroll
155
-}
156
-.release{
157
-    display: flex;
158
-    justify-content:flex-end;
159
-    font-size: .28rem;
160
-    line-height: .39rem;
161
-    color: #666666
162
-}
163
-.time{
164
-    display: flex;
165
-    justify-content:flex-end;
166
-    font-size: .28rem;
167
-    line-height: .39rem;
168
-    color: #666666;
169
-    margin-top: .08rem;
170
-    padding-bottom: .24rem;
171
-    border-bottom: .01rem rgb(223, 222, 222) solid;
172
-}
173
-.files{
174
-    font-size: .28rem;
175
-    /* color: #005395; */
176
-    line-height: .4rem;
177
-    padding: .24rem 0;
178
-    border-bottom: .01rem rgb(223, 222, 222) solid;
179
-}
180
-.files a{
181
-    display: block;
182
-    color: #005395;
183
-    margin-top: .1rem
184
-}
185
-.keyword{
186
-    padding: .24rem 0;
187
-    border-bottom: .01rem rgb(223, 222, 222) solid;
188
-}
189
-.keyword span{
190
-    display: inline-block;
191
-    color: rgb(0,0,255);
192
-    margin-left: .2rem;
193
-    text-decoration: underline;
194
-    font-size: .28rem;
195
-    line-height: .35rem
196
-}
197
-.good{
198
-    text-align: center;
199
-    margin: .24rem auto;
200
-    width: 2rem;
201
-    height: .88rem;
202
-    line-height: .75rem;
203
-    background-color: rgb(235,221,188);
204
-    border-radius: 20px
205
-}
206
-.good i{
207
-    font-size: .4rem;
208
-    color: rgb(163,114,0)
209
-}
210
-.good span{
211
-    font-size: .3rem;
212
-    color: rgb(163,114,0)
213
-}
214
-.goodClick{
215
-    text-align: center;
216
-    margin: .24rem auto;
217
-    width: 2rem;
218
-    height: .88rem;
219
-    line-height: .75rem;
220
-    background-color: rgb(235,221,188);
221
-    border-radius: 20px
222
-}
223
-.goodClick i{
224
-    font-size: .4rem;
225
-    color: rgb(226,38,77)
226
-}
227
-.goodClick span{
228
-    font-size: .3rem;
229
-    color: rgb(226,38,77)
146
+<style scoped lang='less'>
147
+.header {
148
+  height: 0.88rem;
149
+  line-height: 0.88rem;
150
+  text-align: center;
151
+  color: #fff;
152
+  font-size: 0.37rem;
153
+  background: linear-gradient(#2e2f32, #414246);
154
+  padding: 0;
155
+}
156
+.bgColor {
157
+  background-color: white;
158
+  padding: 0 0.24rem;
159
+}
160
+.title {
161
+  font-size: 0.32rem;
162
+  line-height: 0.45rem;
163
+  padding: 0.24rem 0.24rem 0 0.24rem;
164
+  color: #333333;
165
+  font-weight: bold;
166
+}
167
+.timeBox {
168
+  display: flex;
169
+  justify-content: space-between;
170
+  font-size: 0.24rem;
171
+  color: #999999;
172
+  padding: 0.16rem 0;
173
+  line-height: 0.33rem;
174
+}
175
+.conents {
176
+  font-size: 0.28rem;
177
+  padding-top: 0.24rem;
178
+  border-top: 0.01rem rgb(223, 222, 222) solid;
179
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
180
+  text-indent: 2em;
181
+  line-height: 0.39rem;
182
+  padding-bottom: 0.48rem;
183
+  color: #666666;
184
+  overflow: hidden;
185
+  width: 100%;
186
+  overflow-x: scroll;
187
+}
188
+.release {
189
+  display: flex;
190
+  justify-content: flex-end;
191
+  font-size: 0.28rem;
192
+  line-height: 0.39rem;
193
+  color: #666666;
194
+}
195
+.time {
196
+  display: flex;
197
+  justify-content: flex-end;
198
+  font-size: 0.28rem;
199
+  line-height: 0.39rem;
200
+  color: #666666;
201
+  margin-top: 0.08rem;
202
+  padding-bottom: 0.24rem;
203
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
204
+}
205
+.files {
206
+  font-size: 0.28rem;
207
+  /* color: #005395; */
208
+  line-height: 0.4rem;
209
+  padding: 0.24rem 0;
210
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
211
+}
212
+.files a {
213
+  display: block;
214
+  color: #005395;
215
+  margin-top: 0.1rem;
216
+}
217
+.keyword {
218
+  padding: 0.24rem 0;
219
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
220
+}
221
+.keyword span {
222
+  display: inline-block;
223
+  color: rgb(0, 0, 255);
224
+  margin-left: 0.2rem;
225
+  text-decoration: underline;
226
+  font-size: 0.28rem;
227
+  line-height: 0.35rem;
228
+}
229
+.good {
230
+  text-align: center;
231
+  margin: 0.24rem auto;
232
+  width: 2rem;
233
+  height: 0.88rem;
234
+  line-height: 0.88rem;
235
+  background-color: #b8d1e6;
236
+  border-radius: 20px;
237
+  font-size: 0.4rem;
238
+  color: #005395;
239
+}
240
+
241
+.goodClick {
242
+  text-align: center;
243
+  margin: 0.24rem auto;
244
+  width: 2rem;
245
+  height: 0.88rem;
246
+  line-height: 0.88rem;
247
+  background-color: #b8d1e6;
248
+  border-radius: 20px;
249
+  font-size: 0.4rem;
250
+  color: #005395;
230 251
 }
231 252
 </style>

+ 330 - 318
src/views/knowList.vue

@@ -1,394 +1,406 @@
1 1
 <template>
2
-    <div class="bgColor">
3
-        <div slot="content" class="scroll-wrapper">
4
-            <div class="demo">
5
-                <div class="scroll-list-wrap">
6
-                    <cube-scroll ref="scroll" :data="items" :options="options" @pulling-down="onPullingDown" @pulling-up="onPullingUp">
7
-                        <div class="search">
8
-                            <input type="text" placeholder="搜索" v-model="search" @input="searchFn()">
9
-                        </div>
10
-                        <ul class="foods-wrapper">
11
-                            <li v-for="data in items" class="food-item border-1px" @click="toKnowDetails(data)">
12
-                                <div class="food-content">
13
-                                    <div class="title">
14
-                                        <div>
15
-                                            <i class="iconfont icon-changjianwenti1"></i>
16
-                                        </div>
17
-                                        <div>主题:{{data.title}}</div>
18
-                                    </div>
19
-                                    <div class="content" v-html="data.content">
20
-                                    </div>
21
-                                    <div class="timeBox">
22
-                                        <div class="time">{{data.createtime.substring(0,data.createtime.length-3)}}</div>
23
-                                        <div class="good">
24
-                                            <i class="iconfont icon-dianzan"></i>&nbsp;&nbsp;<span>{{data.star}}</span>
25
-                                        </div>
26
-                                    </div>
27
-                                </div>
28
-                            </li>
29
-                            <div class="wushuju" v-show="wushuju">
30
-                                <img src="./../../static/images/wushuju.svg" alt="">
31
-                                <div class="noDataFont">暂无数据</div>
32
-                            </div>
33
-                        </ul>
34
-                        <template v-if="customPullDown" slot="pulldown" slot-scope="props">
35
-                            <div v-if="props.pullDownRefresh" class="cube-pulldown-wrapper" :style="props.pullDownStyle">
36
-                                <div v-show="props.beforePullDown" class="before-trigger" :style="{paddingTop: props.bubbleY + 'px'}">
37
-                                    <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 40}">↓</span>
38
-                                </div>
39
-                                <div class="after-trigger" v-show="!props.beforePullDown">
40
-                                    <div v-show="props.isPullingDown" class="loading">
41
-                                        <cube-loading></cube-loading>
42
-                                    </div>
43
-                                    <div v-show="!props.isPullingDown" class="text">
44
-                                        <span class="refresh-text">更新成功</span>
45
-                                    </div>
46
-                                </div>
47
-                            </div>
48
-                        </template>
49
-                    </cube-scroll>
2
+  <div class="bgColor">
3
+    <div class="header">常见问题</div>
4
+    <div class="search">
5
+      <input type="text" placeholder="搜索" v-model="search" @input="searchFn()">
6
+    </div>
7
+    <div slot="content" class="scroll-wrapper nav">
8
+      <div class="demo">
9
+        <div class="scroll-list-wrap">
10
+          <cube-scroll
11
+            ref="scroll"
12
+            :data="items"
13
+            :options="options"
14
+            @pulling-down="onPullingDown"
15
+            @pulling-up="onPullingUp"
16
+          >
17
+            <ul class="foods-wrapper">
18
+              <li v-for="data in items" class="food-item border-1px" @click="toKnowDetails(data)">
19
+                <div class="food-content">
20
+                  <div class="title">
21
+                    <div>
22
+                      <i class="iconfont icon-changjianwenti1"></i>
23
+                    </div>
24
+                    <div>主题:{{data.title}}</div>
25
+                  </div>
26
+                  <div
27
+                    class="content"
28
+                    v-html="data.content"
29
+                    style="-webkit-box-orient: vertical !important;"
30
+                  ></div>
31
+                  <div class="timeBox">
32
+                    <div class="time">{{data.createtime.substring(0,data.createtime.length-3)}}</div>
33
+                    <div class="good">
34
+                      <i class="iconfont icon-dianzan"></i>&nbsp;&nbsp;
35
+                      <span>{{data.star}}</span>
36
+                      点赞
37
+                    </div>
38
+                  </div>
39
+                </div>
40
+              </li>
41
+              <div class="wushuju" v-show="wushuju">
42
+                <img src="./../../static/images/wushuju.svg" alt>
43
+                <p>暂无常见问题</p>
44
+              </div>
45
+            </ul>
46
+            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
47
+              <div
48
+                v-if="props.pullDownRefresh"
49
+                class="cube-pulldown-wrapper"
50
+                :style="props.pullDownStyle"
51
+              >
52
+                <div
53
+                  v-show="props.beforePullDown"
54
+                  class="before-trigger"
55
+                  :style="{paddingTop: props.bubbleY + 'px'}"
56
+                >
57
+                  <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 40}">↓</span>
50 58
                 </div>
51
-            </div>
59
+                <div class="after-trigger" v-show="!props.beforePullDown">
60
+                  <div v-show="props.isPullingDown" class="loading">
61
+                    <cube-loading></cube-loading>
62
+                  </div>
63
+                  <div v-show="!props.isPullingDown" class="text">
64
+                    <span class="refresh-text">更新成功</span>
65
+                  </div>
66
+                </div>
67
+              </div>
68
+            </template>
69
+          </cube-scroll>
52 70
         </div>
53
-        <load-ing v-show="loadShow"></load-ing>
71
+      </div>
54 72
     </div>
73
+    <load-ing v-show="!items.length&&!wushuju"></load-ing>
74
+  </div>
55 75
 </template>
56 76
 <script>
57
-import Vue from 'vue'
58
-import CubePage from '../components/cube-page.vue'
59
-import SwitchOption from '../components/switch-option'
60
-import InputOption from '../components/input-option'
61
-import SelectOption from '../components/select-option'
62
-import LoadIng from './../views/loading.vue'
77
+import Vue from "vue";
78
+import LoadIng from "./../views/loading.vue";
63 79
 export default {
64
-    data() {
80
+  data() {
65 81
     return {
66
-    //   items: _foods,
67
-        items:[],
68
-        pullDownRefresh: true,
69
-        pullDownRefreshThreshold: 60,
70
-        pullDownRefreshStop: 40,
71
-        pullDownRefreshTxt: 'Refresh success',
72
-        pullUpLoad: true,
73
-        pullUpLoadThreshold: 0,
74
-        pullUpLoadMoreTxt: 'Load more',
75
-        pullUpLoadNoMoreTxt: '没有更多数据',
76
-        wushuju:false,
77
-        customPullDown: true,
78
-        search:"",
79
-        sum:10,
80
-        idx:0,
81
-        loadShow:true
82
-    }
83
-    },
84
-    components: {
85
-        CubePage,
86
-        SwitchOption,
87
-        InputOption,
88
-        SelectOption,
89
-        LoadIng
90
-    },
91
-    computed: {
82
+      //   items: _foods,
83
+      items: [],
84
+      pullDownRefresh: true,
85
+      pullDownRefreshThreshold: 60,
86
+      pullDownRefreshStop: 40,
87
+      pullDownRefreshTxt: "Refresh success",
88
+      pullUpLoad: true,
89
+      pullUpLoadThreshold: 0,
90
+      pullUpLoadMoreTxt: "加载更多",
91
+      pullUpLoadNoMoreTxt: "没有更多数据",
92
+      wushuju: false,
93
+      customPullDown: true,
94
+      search: "",
95
+      sum: 10,
96
+      idx: 0,
97
+      loadShow: true
98
+    };
99
+  },
100
+  components: {
101
+    // CubePage,
102
+    // SwitchOption,
103
+    // InputOption,
104
+    // SelectOption,
105
+    LoadIng
106
+  },
107
+  computed: {
92 108
     options() {
93
-        return {
109
+      return {
94 110
         pullDownRefresh: this.pullDownRefreshObj,
95 111
         pullUpLoad: this.pullUpLoadObj,
96 112
         scrollbar: true
97
-        }
113
+      };
98 114
     },
99 115
     pullDownRefreshObj: function() {
100
-        return this.pullDownRefresh ? {
101
-        threshold: parseInt(this.pullDownRefreshThreshold),
102
-        txt: this.pullDownRefreshTxt
103
-        } : false
116
+      return this.pullDownRefresh
117
+        ? {
118
+            threshold: parseInt(this.pullDownRefreshThreshold),
119
+            txt: this.pullDownRefreshTxt
120
+          }
121
+        : false;
104 122
     },
105 123
     pullUpLoadObj: function() {
106
-        return this.pullUpLoad ? {
107
-        threshold: parseInt(this.pullUpLoadThreshold),
108
-        txt: {
109
-            more: this.pullUpLoadMoreTxt,
110
-            noMore: this.pullUpLoadNoMoreTxt
111
-        }
112
-        } : false
124
+      return this.pullUpLoad
125
+        ? {
126
+            threshold: parseInt(this.pullUpLoadThreshold),
127
+            txt: {
128
+              more: this.pullUpLoadMoreTxt,
129
+              noMore: this.pullUpLoadNoMoreTxt
130
+            }
131
+          }
132
+        : false;
113 133
     }
134
+  },
135
+  methods: {
136
+    getParams() {
137
+      if (this.$route.params.keword) {
138
+        this.search = this.$route.params.keword;
139
+      }
114 140
     },
115
-    methods: {
116
-    getParams(){
117
-        if(this.$route.params.keword){
118
-            this.search=this.$route.params.keword
119
-        }
141
+    searchFn() {
142
+      var that = this;
143
+      that.loadShow = true;
144
+      var that = this;
145
+      that.idx = 0;
146
+      that.sum = 10;
147
+      that.items=[];
148
+      that.getData();
120 149
     },
121
-    searchFn(){
122
-      var that=this;
123
-      that.loadShow=true;
124
-      this.idx=0;
125
-      this.$http.post('service/solution/fetchDataList/solution',{
126
-        'idx':0,
127
-        'sum':10,
128
-        'solution':{
129
-            'title':that.search,
130
-            'status':{'id':72},
131
-            'solutionRange':1
132
-        }
133
-    }).then(function(res){
134
-        if(res.data.list.length>0){
135
-            that.items=res.data.list;
136
-            that.wushuju=false
137
-        }else{
138
-            that.wushuju=true;
139
-            that.items=[]
150
+    toKnowDetails(data) {
151
+      // this.$router.push({path:'/knowDetails'})
152
+      this.$router.push({
153
+        name: "KnowDetails",
154
+        params: {
155
+          data: JSON.stringify(data)
140 156
         }
141
-        that.loadShow=false
142
-    })
157
+      });
143 158
     },
144
-    toKnowDetails(data){
145
-        // this.$router.push({path:'/knowDetails'})
146
-        this.$router.push({
147
-            name:'KnowDetails',
148
-            params:{
149
-                data:JSON.stringify(data)
150
-            }
159
+    getData() {
160
+      var that = this;
161
+      this.$http
162
+        .post("service/solution/fetchDataList/solution", {
163
+          idx: that.idx,
164
+          solution: {
165
+            keywords: that.search,
166
+            solutionType: { id: "" },
167
+            status: { id: 72 },
168
+            createUser: { name: "" }
169
+          },
170
+          sum: that.sum
151 171
         })
172
+        .then(function(res) {
173
+          if (res.data.list.length > 0) {
174
+            // that.items = res.data.list;
175
+            that.items = that.items.concat(res.data.list);
176
+            that.wushuju = false;
177
+          } else {
178
+            that.wushuju = true;
179
+            that.$refs.scroll.forceUpdate()
180
+          }
181
+          that.loadShow = false;
182
+        });
152 183
     },
153 184
     onPullingDown() {
154
-        // 模拟更新数据
155
-        this.idx=0;
156
-        setTimeout(() => {
157
-        var that=this;
158
-        this.$http.post('service/solution/fetchDataList/solution',{
159
-            'idx':0,
160
-            'sum':10,
161
-            'solution':{
162
-                'title':that.search,
163
-                'status':{'id':72},
164
-                'solutionRange':1
165
-            }
166
-        }).then(function(res){
167
-            if(res.data.list.length>0){
168
-                that.items=res.data.list;
169
-                that.wushuju=false
170
-            }else{
171
-                that.$refs.scroll.forceUpdate();
172
-                that.wushuju=true
173
-            }
174
-        })
175
-        }, 1000)
176
-    },
177
-    getData(idx,sum){
178
-        var that=this;
179
-        this.$http.post('service/solution/fetchDataList/solution',{
180
-            'idx':idx,
181
-            'sum':sum,
182
-            'solution':{
183
-                'title':that.search,
184
-                'status':{'id':72},
185
-                'solutionRange':1
186
-            }
187
-        }).then(function(res){
188
-            if(res.data.list.length>0){
189
-                that.items=res.data.list;
190
-                that.wushuju=false
191
-            }else{
192
-                that.wushuju=true
193
-            }
194
-            that.loadShow=false
195
-        })
185
+      var that = this;
186
+      that.idx = 0;
187
+      that.sum = 10;
188
+      that.items = [];
189
+      setTimeout(() => {
190
+        that.getData();
191
+      }, 1000);
196 192
     },
197 193
     onPullingUp() {
198
-        var that=this;
199
-        that.idx=that.idx+1;
200
-        this.$http.post('service/solution/fetchDataList/solution',{
201
-            'idx':that.idx,
202
-            'sum':that.sum,
203
-            'solution':{
204
-                'title':that.search,
205
-                'status':{'id':72},
206
-                'solutionRange':1
207
-            }
208
-        }).then(function(res){
209
-            setTimeout(() => {
210
-                if(res.data.list.length>0){
211
-                    that.items=that.items.concat(res.data.list);
212
-                }else{
213
-                    that.$refs.scroll.forceUpdate()
214
-                }
215
-            }, 1000)
216
-        })
194
+      var that = this;
195
+      that.idx += 1;
196
+      that.getData();
217 197
     },
218 198
     updatePullDownRefresh(val) {
219
-        this.pullDownRefresh = val
199
+      this.pullDownRefresh = val;
220 200
     },
221 201
     updatePullDownRefreshThreshold(val) {
222
-        this.pullDownRefreshThreshold = val
202
+      this.pullDownRefreshThreshold = val;
223 203
     },
224 204
     updatePullDownRefreshTxt(val) {
225
-        this.pullDownRefreshTxt = val
205
+      this.pullDownRefreshTxt = val;
226 206
     },
227 207
     updatePullUpLoad(val) {
228
-        this.pullUpLoad = val
208
+      this.pullUpLoad = val;
229 209
     },
230 210
     updatePullUpLoadThreshold(val) {
231
-        this.pullUpLoadThreshold = val
211
+      this.pullUpLoadThreshold = val;
232 212
     },
233 213
     updatePullUpLoadMoreTxt(val) {
234
-        this.pullUpLoadMoreTxt = val
214
+      this.pullUpLoadMoreTxt = val;
235 215
     },
236 216
     updatePullUpLoadNoMoreTxt(val) {
237
-        this.pullUpLoadNoMoreTxt = val
217
+      this.pullUpLoadNoMoreTxt = val;
238 218
     },
239 219
     updateCustomPullDown(val) {
240
-        this.customPullDown = val
220
+      this.customPullDown = val;
241 221
     },
242 222
     rebuildScroll() {
243
-        Vue.nextTick(() => {
244
-        this.$refs.scroll.destroy()
245
-        this.$refs.scroll.initScroll()
246
-        })
223
+      Vue.nextTick(() => {
224
+        this.$refs.scroll.destroy();
225
+        this.$refs.scroll.initScroll();
226
+      });
247 227
     }
248
-    },
249
-    created(){
250
-        this.getParams();
251
-        this.getData(this.idx,this.sum)
252
-    }
253
-}
228
+  },
229
+  created() {
230
+    this.getParams();
231
+    this.getData();
232
+  }
233
+};
254 234
 </script>
255 235
     <style lang="stylus" rel="stylesheet/stylus" scoped>
256
-    .scroll-list-wrap
236
+    .scroll-list-wrap {
257 237
       /* height: 350px */
258
-      height:100vh
238
+      height: 90vh;
259 239
       /* border: 1px solid rgba(0, 0, 0, 0.1) */
260
-      border-radius: 5px
261
-      transform: rotate(0deg) // fix 子元素超出边框圆角部分不隐藏的问题
262
-      overflow: hidden
240
+      border-radius: 5px;
241
+      transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
242
+      overflow: hidden;
243
+    }
244
+
245
+    .foods-wrapper {
246
+      .food-item {
247
+        display: flex;
263 248
 
264
-    .foods-wrapper
265
-      .food-item
266
-        display: flex
267 249
         /* min-width: 0 */
268 250
         /* padding: 18px
269 251
         border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
252
+        &:last-child {
253
+          border-none();
254
+          margin-bottom: 0;
255
+        }
270 256
 
271
-        &:last-child
272
-          border-none()
273
-          margin-bottom: 0
274
-
275
-        .food-content
276
-          flex: 1
257
+        .food-content {
258
+          flex: 1;
277 259
           min-width: 0;
278
-          .cartcontrol-wrapper
279
-            position: absolute
280
-            right: 0
281
-            bottom: 12px
282
-            .scroll-wrapper{
283
-      .cube-pulldown-wrapper{
284
-        .before-trigger{
285
-          font-size: 30px;
286
-          line-height: 30px;
287
-          align-self: flex-end;
288
-          span{
289
-            display: inline-block;
290
-            transition: all 0.3s;
291
-            color: #666;
292
-            &.rotate{
293
-                transform: rotate(180deg)
260
+
261
+          .cartcontrol-wrapper {
262
+            position: absolute;
263
+            right: 0;
264
+            bottom: 12px;
265
+
266
+            .scroll-wrapper {
267
+              .cube-pulldown-wrapper {
268
+                .before-trigger {
269
+                  font-size: 30px;
270
+                  line-height: 30px;
271
+                  align-self: flex-end;
272
+
273
+                  span {
274
+                    display: inline-block;
275
+                    transition: all 0.3s;
276
+                    color: #666;
277
+
278
+                    &.rotate {
279
+                      transform: rotate(180deg);
280
+                    }
281
+                  }
282
+                }
283
+
284
+                .after-trigger {
285
+                  .refresh-text {
286
+                    color: grey;
287
+                  }
288
+                }
294 289
               }
290
+            }
295 291
           }
296 292
         }
297
-        .after-trigger{
298
-          .refresh-text{
299
-            color: grey
300
-          }
301
-        }
302
-     }
293
+      }
303 294
     }
304
-    </style>
305
-<style scoped>
306
-.bgColor{
307
-    background-color: white
308
-}
309
-.search{
310
-    padding: .16rem .24rem;
311
-    height: .6rem;
312
-    background-color: #eeeeee;
313
-    border-bottom: .01rem #999999 solid
314
-}
315
-.search input{
295
+</style>
296
+<style scoped lang='less'>
297
+.bgColor {
298
+  background-color: white;
299
+  .header {
316 300
     width: 100%;
317
-    height: .56rem;
318
-    border-radius: 4px;
301
+    height: 0.88rem;
302
+    line-height: 0.88rem;
319 303
     text-align: center;
320
-    font-size: .28rem
304
+    color: #fff;
305
+    font-size: 0.37rem;
306
+    background: linear-gradient(#2e2f32, #414246);
307
+    position: fixed;
308
+    top: 0;
309
+    z-index: 6;
310
+  }
311
+  .search {
312
+    width: 100%;
313
+    padding: 0.16rem 0.24rem;
314
+    box-sizing: border-box;
315
+    background-color: #eeeeee;
316
+    border-bottom: 0.01rem #b7b7b7 solid;
317
+    position: fixed;
318
+    top: 0.88rem;
319
+    z-index: 6;
320
+    input {
321
+      width: 100%;
322
+      height: 0.56rem;
323
+      border-radius: 4px;
324
+      text-align: center;
325
+      font-size: 0.28rem;
326
+    }
327
+    &:focus {
328
+      outline: none;
329
+    }
330
+  }
321 331
 }
322
-.search:focus{
323
-    outline:none
332
+.nav {
333
+  margin-top: 1.76rem;
324 334
 }
325
-.food-item{
326
-  border-top: .16rem rgb(238,238,238) solid;
335
+.food-item {
336
+  border-top: 0.16rem rgb(238, 238, 238) solid;
327 337
 }
328
-.food-content{
329
-  border-top: .01rem rgb(223, 222, 222) solid;
330
-  border-bottom: .01rem rgb(223, 222, 222) solid;
338
+.food-content {
339
+  border-top: 0.01rem rgb(223, 222, 222) solid;
340
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
331 341
 }
332
-.title{
333
-    display: flex;
334
-    min-width: 0;
335
-    padding: .2rem .24rem;
336
-    line-height: .45rem;
337
-    border-bottom: .01rem rgb(223, 222, 222) solid;
342
+.title {
343
+  display: flex;
344
+  min-width: 0;
345
+  padding: 0.2rem 0.24rem;
346
+  line-height: 0.45rem;
347
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
338 348
 }
339
-.title div:nth-child(1){
340
-    width: 6%;
349
+.title div:nth-child(1) {
350
+  width: 6%;
341 351
 }
342
-.title div:nth-child(1) i{
343
-    font-size: .32rem;
344
-    color: #005395;
345
-    line-height: .49rem
352
+.title div:nth-child(1) i {
353
+  font-size: 0.32rem;
354
+  color: #005395;
355
+  line-height: 0.49rem;
346 356
 }
347
-.title div:nth-child(2){
348
-    width: 94%;
349
-    font-size: .32rem;
350
-    overflow: hidden;
351
-    white-space: nowrap;
352
-    text-overflow: ellipsis;
357
+.title div:nth-child(2) {
358
+  width: 94%;
359
+  font-size: 0.32rem;
360
+  overflow: hidden;
361
+  white-space: nowrap;
362
+  text-overflow: ellipsis;
353 363
 }
354
-.content{
355
-    font-size: .28rem;
356
-    /* margin-top: .3rem; */
357
-    line-height: .39rem;
358
-    overflow: hidden;
359
-    display: -webkit-box;
360
-    -webkit-line-clamp: 2;
361
-    -webkit-box-orient: vertical;
362
-    word-break: break-all;
363
-    padding: 0 .64rem;
364
-    margin: .24rem 0;
365
-    max-height:0.78rem;
364
+.content {
365
+  font-size: 0.28rem;
366
+  /* margin-top: .3rem; */
367
+  line-height: 0.39rem;
368
+  overflow: hidden;
369
+  display: -webkit-box;
370
+  -webkit-line-clamp: 2;
371
+  -webkit-box-orient: vertical;
372
+  word-break: break-all;
373
+  padding: 0 0.64rem;
374
+  width: 83%;
375
+  margin: 0.24rem 0;
376
+  max-height: 0.8rem;
366 377
 }
367
-.timeBox{
368
-    display: flex;
369
-    justify-content:space-between;
370
-    /* margin-top: .3rem; */
371
-    border-top: .01rem rgb(223, 222, 222) solid;
372
-    padding: .2rem .64rem
378
+.timeBox {
379
+  display: flex;
380
+  justify-content: space-between;
381
+  /* margin-top: .3rem; */
382
+  border-top: 0.01rem rgb(223, 222, 222) solid;
383
+  padding: 0.2rem 0.64rem;
373 384
 }
374
-.timeBox .time{
375
-    color:#999999;
376
-    font-size: .24rem
385
+.timeBox .time {
386
+  color: #999999;
387
+  font-size: 0.24rem;
377 388
 }
378
-.timeBox .good i{
379
-    font-size: .3rem;
380
-    color: #A37200
389
+.timeBox .good {
390
+  font-size: 0.3rem;
391
+  color: #999;
381 392
 }
382
-.timeBox .good span{
383
-    color: #A37200;
384
-    font-size: .24rem
393
+.timeBox .good span {
394
+  color: #a37200;
395
+  font-size: 0.24rem;
385 396
 }
386
-.wushuju{
387
-    margin-top: 2.4rem;
388
-    text-align: center;
397
+.wushuju {
398
+  margin-top: 2.4rem;
399
+  text-align: center;
400
+  color: #999;
389 401
 }
390
-.wushuju img{
391
-    width: 5.12rem;
392
-    height: 2.84rem;
402
+.wushuju img {
403
+  width: 5.12rem;
404
+  height: 2.84rem;
393 405
 }
394
-</style>
406
+</style>

+ 2 - 1
src/views/loading.vue

@@ -30,7 +30,8 @@ export default {
30 30
     background-color: rgba(0,0,0,0.5)!important;
31 31
     display: flex;
32 32
     justify-content:center;
33
-    align-items:center
33
+    align-items:center;
34
+    z-index: 9;
34 35
 }
35 36
 </style>
36 37
 <style scoped>

+ 0 - 74
src/views/maintenance.vue

@@ -1,74 +0,0 @@
1
-<template>
2
-    <div>
3
-        <div class="label">
4
-            {{tit}}</div>
5
-        <div class="contents" v-for="v in items" v-html="v.content">
6
-            <!-- {{}} -->
7
-        </div>
8
-    </div>
9
-</template>
10
-<script>
11
-export default {
12
-    data(){
13
-        return{
14
-            state:"",
15
-            tit:"",
16
-            items:[],
17
-            getId:""
18
-        }
19
-    },
20
-    methods:{
21
-        getDictionaryId(){
22
-            var that=this;
23
-            this.$http.post('service/common/common/getDictionary',{
24
-                key: "service_type",
25
-                type: "list"
26
-            }).then(function(res){
27
-                that.state=that.$route.params.state;
28
-                if(that.state==2){
29
-                    that.tit="维修范围划分";
30
-                    that.getId=res.data[1].id
31
-                }else if(that.state==3){
32
-                    that.tit="不属于维修范围划分";
33
-                    that.getId=res.data[2].id
34
-                };
35
-                that.$http.post('service/solution/fetchDataList/serviceGuide',{
36
-                    "idx": 0, 
37
-                    "sum": 10,
38
-                    "serviceGuide":{
39
-                        "serviceType":{"id":that.getId},
40
-                        "status":1
41
-                    }
42
-                }).then(function(res1){
43
-                    that.items=res1.data.list
44
-                }) 
45
-            })
46
-        }
47
-    },
48
-    created(){
49
-        this.getDictionaryId();
50
-    },
51
-    mounted(){
52
-    }
53
-}
54
-</script>
55
-<style scoped>
56
-.label {
57
-    background-color: rgb(238, 238, 238);
58
-    height: .6rem;
59
-    line-height: .6rem;
60
-    padding-left: .2rem;
61
-    font-size: .24rem;
62
-    color:#666666;
63
-    border-top: .01rem rgb(223, 222, 222) solid;
64
-    border-bottom: .01rem rgb(223, 222, 222) solid;
65
-}
66
-.contents{
67
-    padding: .24rem;
68
-    font-size: .28rem;
69
-    line-height: .39rem;
70
-    color: #666666;
71
-    overflow: hidden;
72
-    overflow-x: scroll
73
-}
74
-</style>

+ 27 - 0
src/views/mb.vue

@@ -0,0 +1,27 @@
1
+<template>
2
+  <div class="mb">
3
+
4
+  </div>
5
+</template>
6
+<script>
7
+export default {
8
+  data(){
9
+      return{
10
+
11
+      }
12
+  },
13
+  methods: {
14
+
15
+  },
16
+  created(){
17
+
18
+  }
19
+}
20
+</script>
21
+<style lang="less" scoped>
22
+    .mb{
23
+        
24
+    }
25
+</style>
26
+
27
+

+ 82 - 203
src/views/my.vue

@@ -8,280 +8,157 @@
8 8
       <div class="label">个人信息</div>
9 9
       <ul>
10 10
         <li>
11
-          <div>姓名</div>
12
-          <div>{{loginUser.name}}</div>
13
-        </li>
14
-        <li v-if="repairMain.valueconfig == 2">
15
-          <div>科室名称</div>
16
-          <div>{{loginUser.dept?loginUser.dept.dept:'暂无'}}</div>
17
-        </li>
18
-        <li>
19 11
           <div>工号</div>
20 12
           <div>{{loginUser.account}}</div>
21 13
         </li>
22 14
         <li>
23
-          <div>联系电话</div>
24
-          <div>{{repairMain.valueconfig ==1?loginUser.mphone:loginUser.dept?loginUser.dept.phone:'暂无'}}</div>
15
+          <div>手机号</div>
16
+          <div>{{loginUser.phone}}</div>
25 17
         </li>
26
-        <li class="myArea">
27
-          <div>区域地点</div>
28
-          <div>
29
-            <cube-button @click="showCascadePicker">
30
-              {{areaData||"暂无"}}
31
-              <i class="iconfont icon-moren"></i>
32
-            </cube-button>
33
-          </div>
18
+        <li>
19
+          <div>部门</div>
20
+          <div>{{loginUser.dept?loginUser.dept.dept:''}}</div>
34 21
         </li>
35 22
         <li>
36
-          <div>详细地址</div>
37
-          <div class="factionAdd" @click="toModify()">
38
-            <span>{{loginUser.houseNumber||"暂无"}}</span>
39
-            <i class="iconfont icon-moren"></i>
40
-          </div>
23
+          <div>工作组</div>
24
+          <div>{{groups}}</div>
41 25
         </li>
42 26
       </ul>
43 27
     </div>
44 28
     <div class="myRapir">
45
-      <div class="label">我的报修</div>
29
+      <div class="label">我的事件工单</div>
46 30
       <div class="tit">
47
-        <div>我的报修</div>
48
-        <div @click="toIncidentList( )">{{incidentStateData.resultCount}}条&nbsp;&nbsp;&nbsp;></div>
31
+        <div>全部</div>
32
+        <div @click="toIncidentList('all')">{{incidentCount.incidentAll||0}}条&nbsp;&nbsp;&nbsp;></div>
49 33
       </div>
50 34
       <div class="rapirMessage">
51
-        <div class="status" @click="toIncidentList(1592)">
52
-          <div>
53
-            <svg class="icon" aria-hidden="true">
54
-              <use xlink:href="#icon-daishouli" />
55
-            </svg>
56
-          </div>
57
-          <div>
58
-            <span>未受理</span>
59
-            <span>{{incidentStateData.notAcc>99?99:incidentStateData.notAcc}}</span>
60
-          </div>
61
-        </div>
62
-        <div class="status" @click="toIncidentList(1593)">
35
+        <div class="status" @click="toIncidentList('todo')">
63 36
           <div>
64 37
             <svg class="icon" aria-hidden="true">
65
-              <use xlink:href="#icon-bushouli" />
38
+              <use xlink:href="#icon-daishouli"></use>
66 39
             </svg>
67 40
           </div>
68 41
           <div>
69
-            <span>不受理</span>
70
-            <span>{{incidentStateData.noAcc>99?99:incidentStateData.noAcc}}</span>
42
+            <span>待处理</span>
43
+            <span>{{incidentCount.incidentTodo||0}}</span>
71 44
           </div>
72 45
         </div>
73
-        <div class="status" @click="toIncidentList(1594)">
46
+        <div class="status" @click="toIncidentList('done')">
74 47
           <div>
75 48
             <svg class="icon" aria-hidden="true">
76
-              <use xlink:href="#icon-chulizhong" />
49
+              <use xlink:href="#icon-yijiejue"></use>
77 50
             </svg>
78 51
           </div>
79 52
           <div>
80
-            <span>处理</span>
81
-            <span>{{incidentStateData.processing>99?99:incidentStateData.processing}}</span>
53
+            <span>处理</span>
54
+            <span>{{incidentCount.incidentDone||0}}</span>
82 55
           </div>
83 56
         </div>
84
-        <div class="status" @click="toIncidentList(1595)">
57
+        <div class="status" @click="toIncidentList('create')">
85 58
           <div>
86 59
             <svg class="icon" aria-hidden="true">
87
-              <use xlink:href="#icon-daipingjia" />
60
+              <use xlink:href="#icon-daipingjia"></use>
88 61
             </svg>
89 62
           </div>
90 63
           <div>
91
-            <span>待评价</span>
92
-            <span>{{incidentStateData.evaluated>99?99:incidentStateData.evaluated}}</span>
64
+            <span>我创建</span>
65
+            <span>{{incidentCount.incidentCreate||0}}</span>
93 66
           </div>
94 67
         </div>
95
-        <div class="status" @click="toIncidentList(1596)">
68
+      </div>
69
+    </div>
70
+    <div class="myRapir">
71
+      <div class="label">我的巡检</div>
72
+      <div class="tit">
73
+        <div>全部</div>
74
+        <div @click="toinspectionList()">{{(incidentCount.inspectionTodo+incidentCount.inspectionDone)||0}}条&nbsp;&nbsp;&nbsp;></div>
75
+      </div>
76
+      <div class="rapirMessage">
77
+        <div class="status">
78
+          <!-- <div class="status" @click="toIncidentList(1594)"> -->
96 79
           <div>
97 80
             <svg class="icon" aria-hidden="true">
98
-              <use xlink:href="#icon-yijiejue" />
81
+              <use xlink:href="#icon-chulizhong"></use>
99 82
             </svg>
100 83
           </div>
101
-          <div>
102
-            <span>已解决</span>
103
-            <span>{{incidentStateData.solve>99?99:incidentStateData.solve}}</span>
84
+          <div @click="toinspectionList('todo')">
85
+            <span>待处理</span>
86
+            <span>{{incidentCount.inspectionTodo||0}}</span>
104 87
           </div>
105 88
         </div>
106
-        <div class="status" @click="toIncidentList(1597)">
89
+        <div @click="toinspectionList('done')" class="status">
107 90
           <div>
108 91
             <svg class="icon" aria-hidden="true">
109
-              <use xlink:href="#icon-yichehui" />
92
+              <use xlink:href="#icon-yijiejue"></use>
110 93
             </svg>
111 94
           </div>
112 95
           <div>
113
-            <span>已撤回</span>
114
-            <span>{{incidentStateData.retract>99?99:incidentStateData.retract}}</span>
96
+            <span>处理过</span>
97
+            <span>{{incidentCount.inspectionDone||0}}</span>
115 98
           </div>
116 99
         </div>
117 100
       </div>
118 101
     </div>
119
-    <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
120 102
   </div>
121 103
 </template>
122 104
 <script>
123 105
 import "./../../static/css/iconfont.js";
124
-import PrompTing from "./../views/prompting.vue";
125 106
 export default {
126 107
   data() {
127 108
     return {
128
-      repairMain: null,
129 109
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
130
-      incidentStateData: "",
131
-      treeData: [],
132
-      areaData: "",
110
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
111
+      incidentCount: "",
133 112
       promptingConent: "",
134
-      promptingStatus: ""
113
+      promptingStatus: "",
114
+      groups: "", //工作组
115
+      candidateGroups:''
135 116
     };
136 117
   },
137 118
   methods: {
138
-    toModify(res) {
139
-      this.$router.push({
140
-        name: "MyModify",
141
-        params: {
142
-          data: this.loginUser.houseNumber
143
-        }
144
-      });
145
-    },
146
-    getUserAreaData() {
147
-      if (this.loginUser.place) {
148
-        this.areaData =
149
-          this.loginUser.place.area.area + " " + this.loginUser.place.place;
119
+    // 工作组
120
+    getGroups() {
121
+      var that = this;
122
+      if (that.loginUser.group) {
123
+        that.loginUser.group.forEach(element => {
124
+          that.groups += element.groupName + "/";
125
+          that.candidateGroups+=element.id+','
126
+        });
150 127
       }
128
+      that.candidateGroups=that.candidateGroups.slice(0,that.candidateGroups.length-1)
151 129
     },
152
-    toIncidentList(res) {
130
+    // 跳转到事件列表
131
+    toIncidentList(searchType) {
153 132
       this.$router.push({
154 133
         name: "IncidentList",
155 134
         params: {
156
-          state: res
135
+          searchType: searchType
157 136
         }
158 137
       });
159 138
     },
160
-    getIncidentData() {
161
-      var that = this;
162
-      this.$http
163
-        .post("service/apply/bpm/fetchServiceTasks", {
164
-          assignee: that.loginUser.id,
165
-          idx: 0,
166
-          sum: 9999
167
-        })
168
-        .then(function(res) {
169
-          that.incidentStateData = res.data;
170
-        });
171
-    },
172
-    getAreaData() {
173
-      var that = this;
174
-      this.$http
175
-        .post("service/user/data/fetchDataList/area", {
176
-          idx: 0,
177
-          sum: 1000,
178
-          area: {
179
-            wechatArea: true
180
-          }
181
-        })
182
-        .then(function(res) {
183
-          var data = res.data.list;
184
-          for (var i = 0; i < data.length; i++) {
185
-            that.treeData.push({
186
-              text: data[i].area,
187
-              value: data[i].id,
188
-              children: []
189
-            });
190
-          }
191
-        });
139
+    // 巡检列表
140
+    toinspectionList(state) {
141
+      this.$router.push({
142
+        name: "Inspection",
143
+        params:{
144
+          state:state
145
+        }
146
+      });
192 147
     },
193
-    getPlaceData() {
194
-      var that = this;
195
-      this.$http
196
-        .post("service/user/data/fetchDataList/place", {
197
-          idx: 0,
198
-          sum: 1000,
199
-          area: {
200
-            wechatAreaId: ""
201
-          }
148
+    // 事件数量
149
+    getIncidentData(){
150
+        var that=this;
151
+        this.$http.post('service/bpm/data/getIncidentCount',{
152
+            assignee:that.loginUser.id,
153
+            candidateGroups:that.candidateGroups
154
+        }).then(function(res){
155
+            that.incidentCount=res.data;
202 156
         })
203
-        .then(function(res) {
204
-          var data = res.data.list;
205
-          for (var i = 0; i < data.length; i++) {
206
-            for (var j = 0; j < that.treeData.length; j++) {
207
-              if (data[i].area.id == that.treeData[j].value) {
208
-                that.treeData[j].children.push({
209
-                  text: data[i].place,
210
-                  value: data[i].id
211
-                });
212
-              }
213
-            }
214
-          }
215
-          that.cascadePicker = that.$createCascadePicker({
216
-            title: "请选择区域地点",
217
-            data: that.treeData,
218
-            selectedIndex: [0, 0],
219
-            onSelect: that.selectHandle,
220
-            onCancel: that.cancelHandle
221
-          });
222
-        });
223
-    },
224
-    showCascadePicker() {
225
-      this.cascadePicker.show();
226
-    },
227
-    selectHandle(selectedVal, selectedIndex, selectedText) {
228
-      var that = this;
229
-      this.$http
230
-        .get(
231
-          "service/user/updPlace/" + this.loginUser.id + "/" + selectedVal[1],
232
-          {}
233
-        )
234
-        .then(function(res) {
235
-          if (res.status == 200) {
236
-            that.promptingConent = "恭喜您,修改区域地点成功!";
237
-            that.promptingStatus = true;
238
-            $("#fade").fadeIn();
239
-            setTimeout(function() {
240
-              $("#fade").fadeOut();
241
-            }, 2000);
242
-            if (!that.loginUser.place) {
243
-              that.loginUser.place = {
244
-                area:{}
245
-              };
246
-            }
247
-            that.loginUser.place.id = selectedVal[1];
248
-            that.loginUser.place.area.id = selectedVal[0];
249
-            that.loginUser.place.place = selectedText[1];
250
-            that.loginUser.place.area.area = selectedText[0];
251
-            var loginUserStr = JSON.stringify(that.loginUser);
252
-            localStorage.setItem("loginUser", loginUserStr);
253
-            that.areaData = selectedText[0] + " " + selectedText[1];
254
-          } else {
255
-            that.promptingConent = "对不起,修改失败,请稍后再试!";
256
-            that.promptingStatus = false;
257
-            $("#fade").fadeIn();
258
-            setTimeout(function() {
259
-              $("#fade").fadeOut();
260
-            }, 2000);
261
-          }
262
-        });
263 157
     },
264
-    cancelHandle() {}
265 158
   },
266 159
   created() {
267
-    this.getUserAreaData();
268
-    this.getAreaData();
269
-    this.getPlaceData();
160
+    this.getGroups();
270 161
     this.getIncidentData();
271
-    // 获取报修主体
272
-    this.repairMain = JSON.parse(localStorage.getItem("repairMain"));
273
-  },
274
-  mounted() {
275
-    // this.cascadePicker = this.$createCascadePicker({
276
-    //     title: '请选择区域地点',
277
-    //     data: this.treeData,
278
-    //     selectedIndex: [0,0],
279
-    //     onSelect: this.selectHandle,
280
-    //     onCancel: this.cancelHandle
281
-    // })
282
-  },
283
-  components: {
284
-    PrompTing
285 162
   }
286 163
 };
287 164
 </script>
@@ -320,7 +197,7 @@ export default {
320 197
   border-radius: 50%;
321 198
   margin: 0 auto;
322 199
   overflow: hidden;
323
-  background: url(./../../static/images/avatar-1-big.jpg);
200
+  background: url(./../../static/images/pig.jpg);
324 201
   background-size: contain;
325 202
 }
326 203
 
@@ -362,6 +239,8 @@ export default {
362 239
   font-size: 0.32rem;
363 240
   /* line-height: .3rem */
364 241
 }
242
+.myArea {
243
+}
365 244
 .factionAdd {
366 245
   display: flex;
367 246
   justify-content: space-between;
@@ -396,12 +275,12 @@ export default {
396 275
 
397 276
 .rapirMessage {
398 277
   display: flex;
399
-  height: 1.4rem;
278
+  height: 1.8rem;
400 279
   border-bottom: 0.01rem rgb(223, 222, 222) solid;
401 280
 }
402 281
 .rapirMessage .status {
403
-  width: 16.5%;
404
-  border-left: 0.01rem rgb(223, 222, 222) solid;
282
+  width: 25%;
283
+  border-right: 0.01rem rgb(223, 222, 222) solid;
405 284
   display: flex;
406 285
   align-items: center;
407 286
   justify-content: center;
@@ -440,4 +319,4 @@ export default {
440 319
   white-space: nowrap;
441 320
   text-overflow: ellipsis;
442 321
 }
443
-</style>
322
+</style>

+ 0 - 116
src/views/myModify.vue

@@ -1,116 +0,0 @@
1
-<template>
2
-    <div>
3
-        <div class="label">
4
-            详细地址
5
-        </div>
6
-        <cube-textarea v-model="value" placeholder="请输入你的详细地址"></cube-textarea>
7
-        <div class="chehui">
8
-            <div class="btn" @click="sub()">保&nbsp;存</div>
9
-        </div>
10
-        <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
11
-    </div>
12
-</template>
13
-<script>
14
-    import PrompTing from './../views/prompting.vue'
15
-    export default {
16
-        data() {
17
-            return {
18
-                loginUser:JSON.parse(localStorage.getItem("loginUser")),
19
-                data:"",
20
-                value:"",
21
-                promptingConent:"",
22
-                promptingStatus:""
23
-            }
24
-        },
25
-        methods: {
26
-            getAddData(){
27
-                this.value=this.$route.params.data
28
-            },
29
-            sub(){
30
-                if(this.value==""){
31
-                    this.$createDialog({
32
-                        type: 'alert',
33
-                        title: '保存失败',
34
-                        content: '详细地址不能为空',
35
-                        icon: 'cubeic-wrong'
36
-                    }).show()
37
-                }else{
38
-                    var that=this;
39
-                    this.$http.post('service/user/updHouseNum',{
40
-                        "reqId":that.loginUser.id,
41
-                        "houseNum":that.value
42
-                    }).then(function(res){
43
-                        if(res.status==200){
44
-                            that.promptingConent="恭喜您,修改地址成功!";
45
-                            that.promptingStatus=true;
46
-                            $("#fade").fadeIn();
47
-                            setTimeout(function(){
48
-                                $("#fade").fadeOut();
49
-                            },2000);
50
-                            that.loginUser.houseNumber=that.value;
51
-                            var loginUserStr=JSON.stringify(that.loginUser);
52
-                            localStorage.setItem('loginUser',loginUserStr);
53
-                            that.dialog = that.$createDialog({
54
-                                type: 'alert',
55
-                                title: '修改成功',
56
-                                content: '点击确定返回我的信息',
57
-                                icon: 'cubeic-right',
58
-                                onConfirm: (e, promptValue) => {
59
-                                    that.$router.push({path:"/main/my"})
60
-                                }
61
-                            }).show()
62
-                        }else{
63
-                            that.promptingConent="修改失败,请稍后再试!";
64
-                            that.promptingStatus=false;
65
-                            $("#fade").fadeIn();
66
-                            setTimeout(function(){
67
-                                $("#fade").fadeOut();
68
-                            },2000);
69
-                        }
70
-                    })
71
-                }
72
-            }
73
-        },
74
-        created(){
75
-            this.getAddData()
76
-        },
77
-        mounted() {
78
-            
79
-        },
80
-        components: {
81
-            PrompTing
82
-        },
83
-    }
84
-</script>
85
-<style scoped>
86
- .label{
87
-    background-color: rgb(238, 238, 238);
88
-    height: .6rem;
89
-    line-height: .6rem;
90
-    padding-left: .24rem;
91
-    font-size: .24rem;
92
-    color: #666666
93
-}   
94
-.chehui{
95
-    height: 1.3rem;
96
-    width: 100%;
97
-    border-top: .01rem rgb(223, 222, 222) solid;
98
-    background-color: rgb(248,248,248);
99
-    position: fixed;
100
-    left: 0;
101
-    bottom: 0;
102
-    display: flex;
103
-    align-items:center;
104
-    justify-content:center
105
-}
106
-.chehui .btn{
107
-    width: 90%;
108
-    height: 1rem;
109
-    background-color: #005395;
110
-    border-radius: 10px;
111
-    line-height: 1rem;
112
-    color: white;
113
-    font-size: .36rem;
114
-    text-align: center
115
-}
116
-</style>

Файловите разлики са ограничени, защото са твърде много
+ 1683 - 0
src/views/newIncident.vue


+ 1 - 1
src/views/noticeDetails.vue

@@ -27,7 +27,7 @@ export default {
27 27
     },
28 28
     methods:{
29 29
         getParamsData(){
30
-            this.data=JSON.parse(this.$route.params.data);
30
+            this.data=this.$route.params.data;
31 31
         }
32 32
     },
33 33
     created(){

+ 6 - 5
src/views/noticeList.vue

@@ -20,8 +20,8 @@
20 20
                                 </div>
21 21
                             </li>
22 22
                             <div class="wushuju" v-show="wushuju">
23
-                                <img src="./../../static/images/wugonggao.svg" alt="">
24
-                                <div class="noDataFont">暂无数据</div>
23
+                                <img src="./../../static/images/wushuju.svg" alt="">
24
+                                <p>暂无公告列表</p>
25 25
                             </div>
26 26
                         </ul>
27 27
                         <template v-if="customPullDown" slot="pulldown" slot-scope="props">
@@ -64,7 +64,7 @@ export default {
64 64
       pullDownRefreshTxt: 'Refresh success',
65 65
       pullUpLoad: true,
66 66
       pullUpLoadThreshold: 0,
67
-      pullUpLoadMoreTxt: 'Load more',
67
+      pullUpLoadMoreTxt: '加载更多',
68 68
       pullUpLoadNoMoreTxt: '没有更多数据',
69 69
       wushuju:false,
70 70
       search:"",
@@ -108,7 +108,6 @@ export default {
108 108
   methods: {
109 109
     searchFn(){
110 110
       var that=this;
111
-      this.idx=0;
112 111
       that.loadShow=true;
113 112
       this.$http.post('service/user/data/fetchDataList/notice',{
114 113
         'idx':0,
@@ -133,7 +132,7 @@ export default {
133 132
       this.$router.push({
134 133
           name:'NoticeDetails',
135 134
           params:{
136
-              data:JSON.stringify(data)
135
+              data
137 136
           }
138 137
       })
139 138
     },
@@ -318,6 +317,7 @@ export default {
318 317
 }
319 318
 </style>
320 319
 <style scoped>
320
+
321 321
 .search{
322 322
     padding: .16rem .24rem;
323 323
     height: .6rem;
@@ -359,6 +359,7 @@ export default {
359 359
 .wushuju{
360 360
     margin-top: 2.4rem;
361 361
     text-align: center;
362
+    color: #999;
362 363
 }
363 364
 .wushuju img{
364 365
     width: 5.12rem;

+ 592 - 0
src/views/order.vue

@@ -0,0 +1,592 @@
1
+<template>
2
+  <div class="order">
3
+    <div class="conentBox">
4
+      <div class="conent">
5
+        <div class="header">处理方案</div>
6
+        <div v-if="model.incident">
7
+          <div class="navBar">
8
+            <div class="fl" :class="{'p50':model.incident.handlerUser.id!=loginUser.id}">
9
+              <a :class="{active:actives=='info'}" href="javascript:;" @click="toInfo('info')">事件信息</a>
10
+            </div>
11
+            <div class="fl" :class="{'p50':model.incident.handlerUser.id!=loginUser.id}">
12
+              <a
13
+                :class="{active:actives=='progress'}"
14
+                href="javascript:;"
15
+                @click="toInfo('progress')"
16
+              >处理进度</a>
17
+            </div>
18
+            <div class="fl" v-if="model.incident.handlerUser.id==loginUser.id">
19
+              <a :class="{active:actives=='jd'}" href="javascript:;" @click="toInfo('jd')">接单</a>
20
+            </div>
21
+          </div>
22
+          <div class="label headtop" id="info">事件信息</div>
23
+
24
+          <div class="info">
25
+            <div class="head">
26
+              <p>
27
+                <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
28
+                事件单号:{{model.incident.incidentsign}}
29
+                <span
30
+                  :class="{ 'fr':true,'btn':true, 'daijiedan':(model.incident.state.value=='pending'&&model.incident.handlerUser&&!model.incident.candidateGroups), 'daiqiangdan':(model.incident.state.value=='pending'&&!model.incident.handlerUser&&model.incident.candidateGroups)}"
31
+                >{{model.incident.state.value=='pending'?(model.incident.handlerUser&&!model.incident.candidateGroups?'待接单':'待抢单'):model.incident.state.name}}</span>
32
+              </p>
33
+            </div>
34
+            <p>
35
+              <span class="fl">事件分类</span>
36
+              <span class="fr">{{model.incident.category.category}}</span>
37
+            </p>
38
+            <!-- <p>
39
+              <span class="fl">事件主题</span>
40
+              <span class="fr">{{model.incident.title}}</span>
41
+            </p> -->
42
+            <p class="desc">
43
+              <span class="fl">事件描述</span>
44
+              <span class="grayFont fr" v-html="model.incident.description"></span>
45
+            </p>
46
+            <div class="shows" id="shows">
47
+              <p v-if="valConfig==2">
48
+                <span class="fl">报修科室</span>
49
+                <span class="fr">{{model.incident.department?model.incident.department.dept:''}}</span>
50
+              </p>
51
+            <p v-if="valConfig==1">
52
+              <span class="fl">报修人</span>
53
+              <span class="fr">{{model.incident.requester.name}}</span>
54
+            </p>
55
+            <p v-if="valConfig==2">
56
+              <span class="fl">联系人</span>
57
+              <span class="fr">{{model.incident.contacts}}</span>
58
+            </p>
59
+              <p>
60
+                <span class="fl">联系电话</span>
61
+                <span class="fr">{{model.incident.contactsInformation}}</span>
62
+              </p>
63
+              <p>
64
+                <span class="fl">联系地址</span>
65
+                <span class="fr">{{model.incident.houseNumber||''}}</span>
66
+              </p>
67
+              <p class="boeder_B">
68
+                <span class="fl">事件来源</span>
69
+                <span class="fr">{{model.incident.source.name}}</span>
70
+              </p>
71
+              <!-- <p>
72
+                <span class="fl">影响度</span>
73
+                <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
74
+              </p>
75
+              <p>
76
+                <span class="fl">紧急度</span>
77
+                <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
78
+              </p> -->
79
+              <p>
80
+                <span class="fl">优先级</span>
81
+                <span class="fr">{{model.incident.priority?model.incident.priority.name:''}}</span>
82
+              </p>
83
+              <p>
84
+                <span class="fl">逾期响应时间</span>
85
+                <span class="fr">{{model.incident.overdueResponseDate}}</span>
86
+              </p>
87
+              <p>
88
+                <span class="fl">逾期解决时间</span>
89
+                <span class="fr">{{model.incident.overdueTime}}</span>
90
+              </p>
91
+              <p>
92
+                <span class="fl">区域</span>
93
+                <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
94
+              </p>
95
+              <p>
96
+                <span class="fl">地点</span>
97
+                <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
98
+              </p>
99
+              <!-- <p v-if="model.incident.synergeticReason">
100
+                <span class="fl" >协同原因</span>
101
+                <span class="fr">{{model.incident.synergeticReason}}</span>
102
+              </p>
103
+              <p v-if="model.isupreason">
104
+                <span class="fl">升级原因</span>
105
+                <span class="fr">{{model.isupreason}}</span>
106
+              </p>
107
+              <p v-if="model.transferReason">
108
+                <span class="fl">转派原因</span>
109
+                <span class="fr" >{{model.transferReason}}</span>
110
+              </p> -->
111
+            </div>
112
+            <p class="info_hide">
113
+              <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
114
+              <span class="fl hide" @click="hides()" v-if="item_hides">隐藏详情 <<</span>
115
+            </p>
116
+            <div class="imgs-container" v-if="imgs.length">
117
+              <div class="imgs-cont">
118
+                <img v-if='img.suffix=="jpeg"||img.suffix=="jpg"||img.suffix=="gif"||img.suffix=="png"||img.suffix=="svg"||img.suffix=="pdf"' :src="img.previewUrl" v-for="(img, index) in imgs" class="imgs">
119
+                <p v-else>
120
+                  <a :href='[img.previewUrl]'>{{img.name}}</a>
121
+                </p>
122
+              </div>
123
+            </div>
124
+
125
+            <div class="label" id="progress">处理进度</div>
126
+            <div :class="{'progress':true,'progressHide':!pro_hides}" id="progressBox">
127
+              <div class="progress_info" v-for="item in progressInfo">
128
+                <div class="progress_info_L">{{item.activityName}}</div>
129
+                <div class="progress_info_R">
130
+                  <div class="time">
131
+                    <i
132
+                      :class="{'iconfont':true, 'icon-icon_weizuo':item.endTime!='','icon-icon_zhengzaijinx':item.endTime=='' }"
133
+                    ></i>
134
+                    <span class="text1">{{item.startTime}}</span>
135
+                  </div>
136
+                  <div :class="{'cont':true,'blue':item.endTime!='' }">
137
+                    <p class="text2" v-if="item.desc">{{item.desc}}</p>
138
+                  </div>
139
+                </div>
140
+              </div>
141
+            </div>
142
+            <p class="info_hide">
143
+              <span class="fl hide" @click="proHides()">{{pro_hides?'隐藏详情 <<':'展开详情 >>'}}</span>
144
+            </p>
145
+            <div v-if="model.incident.handlerUser.id==loginUser.id">
146
+              <div class="label" id="jd">接单</div>
147
+              <cube-radio-group
148
+                v-model="selected"
149
+                :options="options"
150
+                position="right"
151
+                :hollow-style="true"
152
+              />
153
+
154
+              <div class="txtLabel" v-if="selected==2">
155
+                <div class="txt fl">
156
+                  <span style="color:red;">*</span> 重新指派理由:
157
+                </div>
158
+                <cube-textarea class="fl" v-model="resignComment" placeholder="重新指派理由"></cube-textarea>
159
+              </div>
160
+              <cube-form-group class="sub">
161
+                <cube-button type="submit" @click="subVali()">{{selected==1?'接单':'重新指派'}}</cube-button>
162
+              </cube-form-group>
163
+            </div>
164
+          </div>
165
+        </div>
166
+        <load-ing v-if="!model.incident"></load-ing>
167
+        <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
168
+      </div>
169
+    </div>
170
+  </div>
171
+</template>
172
+<script>
173
+import LoadIng from "./../views/loading.vue";
174
+import PrompTing from "./../views/prompting.vue";
175
+export default {
176
+  data() {
177
+    return {
178
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
179
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
180
+      selected: 1,
181
+      id:'',
182
+      options: [
183
+        {
184
+          label: "接单",
185
+          value: 1
186
+        },
187
+        {
188
+          label: "重新指派",
189
+          value: 2
190
+        }
191
+      ],
192
+      promptingConent: "",
193
+      promptingStatus: "",
194
+      resignComment: "", //重新指派原因
195
+      item_hides: false,
196
+      actives: "info",
197
+      processInstanceId: "",
198
+      progressInfo: [], //处理进度
199
+      imgs: [], //图片
200
+      model: {}, //提交数据
201
+      pro_hides:false,//展开/收起处理进度
202
+    };
203
+  },
204
+  components: {
205
+    LoadIng,
206
+    PrompTing
207
+  },
208
+  methods: {
209
+    //   获取事件数据
210
+    getParamsData() {
211
+      var that = this;
212
+      that.$http
213
+        .get(
214
+          "/service/form/renderForm/receiveform/" +
215
+            that.processInstanceId +
216
+            "/" +
217
+            that.loginUser.id+'/'+that.id,
218
+          {}
219
+        )
220
+        .then(function(res) {
221
+          console.log(res.data);
222
+          that.model = res.data.model;
223
+          //seimin
224
+          localStorage.setItem('modelData',JSON.stringify(that.model))
225
+        });
226
+    },
227
+    // 获取图片
228
+    getImgs() {
229
+      var that = this;
230
+      that.$http
231
+        .get(
232
+          "service/common/common/listAttachment/incident/" +
233
+            that.processInstanceId,
234
+          {}
235
+        )
236
+        .then(function(res) {
237
+          console.log(res.data);
238
+          that.imgs = res.data.data.splice(0, 3);
239
+          console.log(that.imgs);
240
+        });
241
+    },
242
+    // 获取处理进度
243
+    getProgressInfo() {
244
+      var that = this;
245
+      that.$http
246
+        .post(
247
+          "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
248
+          {}
249
+        )
250
+        .then(function(res) {
251
+          console.log(res.data);
252
+          that.progressInfo = res.data.data;
253
+          that.progressInfo.reverse();
254
+        });
255
+    },
256
+    //隐藏显示详情
257
+    hides() {
258
+      this.item_hides = !this.item_hides;
259
+      $("#shows").slideToggle();
260
+    },
261
+    // 处理进度隐藏/展开
262
+    proHides(){
263
+      if(!this.pro_hides){
264
+        $('#progressBox').animate({'height':$('#progressBox')[0].scrollHeight})
265
+      }else{
266
+        $('#progressBox').animate({'height':'1.7rem'})
267
+      }
268
+      this.pro_hides=!this.pro_hides;
269
+    },
270
+    //数据提交
271
+    subVali() {
272
+      var that = this;
273
+      delete that.model.handlerCode;
274
+      that.model.handler_code = "resolve";
275
+      that.model.incident.assignee = that.loginUser.id;
276
+      if (that.selected == 1) {
277
+        that.model.receive_code = "handler";
278
+        that.model.loginUser = that.loginUser;
279
+      } else if (that.selected == 2) {
280
+        that.model.receive_code = "transferment";
281
+        that.model.resignComment = that.resignComment;
282
+        if (!that.resignComment) {
283
+          $("#fade").fadeIn();
284
+          that.promptingConent = "提交失败,请填写必填信息!";
285
+          that.promptingStatus = false;
286
+          setTimeout(function() {
287
+            $("#fade").fadeOut();
288
+          }, 2000);
289
+          return;
290
+        }
291
+      }
292
+      console.log(that.model);
293
+      that.$http
294
+        .post(
295
+          "service/bpm/bpm/completeTask/" +
296
+            that.model.incident.taskId +
297
+            "/" +
298
+            that.loginUser.id,
299
+          that.model
300
+        )
301
+        .then(function(res) {
302
+          console.log(res.data);
303
+          if (res.data) {
304
+            $("#fade").fadeIn();
305
+            that.promptingConent = that.selected==1?"恭喜您,接单成功!":"恭喜您,重新指派成功!";
306
+            that.promptingStatus = true;
307
+            that.dialog = that
308
+              .$createDialog({
309
+                type: "alert",
310
+                title: that.selected==1?"接单成功":"重新指派成功",
311
+                content: "点击返回首页",
312
+                icon: "cubeic-right",
313
+                onConfirm: (e, promptValue) => {
314
+                  that.$router.push({ path: "/main" });
315
+                }
316
+              })
317
+              .show();
318
+            setTimeout(function() {
319
+              $("#fade").fadeOut();
320
+            }, 2000);
321
+          }
322
+        });
323
+    },
324
+    // 快速定位
325
+    toInfo(id) {
326
+      this.actives = id;
327
+      $("body,html").animate(
328
+        {
329
+          scrollTop:
330
+            $("#" + id).offset().top -
331
+            $(".header")[0].offsetHeight -
332
+            $(".navBar")[0].offsetHeight
333
+        },
334
+        260
335
+      );
336
+    }
337
+  },
338
+  created() {
339
+    // seimin
340
+    this.processInstanceId = this.$route.params.data
341
+      ? this.$route.params.data.processInstanceId
342
+      : JSON.parse(localStorage.getItem("modelData")).incident
343
+          .processInstanceId;
344
+          this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
345
+    this.getParamsData();
346
+    this.getProgressInfo();
347
+    this.getImgs();
348
+  }
349
+};
350
+</script>
351
+<style lang="less" scoped>
352
+i.iconfont.blue {
353
+  color: #005395;
354
+  // &::after {
355
+  //   content: "";
356
+  //   width: 0.01rem;
357
+  //   height: 0.4rem;
358
+  //   background: #005395;
359
+  //   position: relative;
360
+  //   display: block;
361
+  //   left: 0.14rem;
362
+  // }
363
+}
364
+.order {
365
+  .header {
366
+    width: 100%;
367
+    height: 0.88rem;
368
+    line-height: 0.88rem;
369
+    text-align: center;
370
+    color: #fff;
371
+    font-size: 0.37rem;
372
+    background: linear-gradient(#2e2f32, #414246);
373
+    position: fixed;
374
+    top: 0;
375
+    z-index: 6;
376
+  }
377
+  .navBar {
378
+    width: 100%;
379
+    height: 0.96rem;
380
+    line-height: 0.96rem;
381
+    background-color: #fafafa;
382
+    font-size: 0.28rem;
383
+    position: fixed;
384
+    top: 0.88rem;
385
+
386
+    div {
387
+      width: 33.33%;
388
+      text-align: center;
389
+      &.p50{
390
+        width: 49.99% ;
391
+    }
392
+      a {
393
+        display: inline-block;
394
+        height: 0.9rem;
395
+        width: 1.7rem;
396
+        padding: 0 0.1rem;
397
+        &.active {
398
+          color: #005395;
399
+          border-bottom: 0.06rem solid #005395;
400
+        }
401
+      }
402
+    }
403
+  }
404
+
405
+  .headtop {
406
+    margin-top: 1.84rem;
407
+  }
408
+  .label {
409
+    background-color: #eeeeee;
410
+    height: 0.6rem;
411
+    line-height: 0.58rem;
412
+    padding-left: 0.2rem;
413
+    font-size: 0.24rem;
414
+    color: #666666;
415
+    span {
416
+      font-size: 0.2rem;
417
+      display: inline-block;
418
+      margin-left: 0.08rem;
419
+      color: #999999;
420
+    }
421
+    &.formLabel {
422
+      background-color: #fff;
423
+    }
424
+  }
425
+  .conentBox {
426
+    width: 100%;
427
+    .conent {
428
+      font-size: 0.32rem;
429
+      font-weight: 400;
430
+      line-height: 0.45rem;
431
+      // border-bottom: 0.16rem solid #e5e5e5;
432
+
433
+      .shows {
434
+        display: none;
435
+      }
436
+      .boeder_B {
437
+        border-bottom: 0.01rem solid #ccc;
438
+      }
439
+        p {
440
+          &.desc{
441
+            overflow: hidden;
442
+          }
443
+          .grayFont {
444
+            width: 75%;
445
+            text-align: right;
446
+            overflow-x: scroll;
447
+          }
448
+      }
449
+      .bottom {
450
+        overflow: hidden;
451
+        line-height: 0.86rem;
452
+        border-bottom: 0.01rem solid #e6e6e6;
453
+        font-size: 0.24rem;
454
+        color: #999;
455
+        padding: 0 0.24rem 0 0.48rem;
456
+      }
457
+      .info {
458
+        color: #999;
459
+        font-size: 0.28rem;
460
+        overflow: hidden;
461
+        .head {
462
+          border-bottom: 0.01rem solid #e6e6e6;
463
+          p {
464
+            padding: 0.24rem 0.3rem;
465
+            i {
466
+              color: #00559d;
467
+            }
468
+          }
469
+        }
470
+        p {
471
+          line-height: 0.4rem;
472
+          padding: 0.1rem 0.24rem;
473
+          overflow: hidden;
474
+          .overflowEllipsis2 {
475
+            margin-left: 1.96rem;
476
+          }
477
+        }
478
+        .info_hide {
479
+          padding: 0.2rem 0.24rem;
480
+          border-bottom: 0.01rem solid #e6e6e6;
481
+          .hide {
482
+            color: #00559d;
483
+          }
484
+        }
485
+        .imgs-container{
486
+          a{
487
+            color:#03c !important;
488
+            &:visited{
489
+              color: #551a8b !important;
490
+            }
491
+          }
492
+           img {
493
+            width: 1.5rem;
494
+            height: 1.5rem;
495
+            margin-right: 0.7rem;
496
+            &:nth-child(1) {
497
+              margin-left: 0.75rem;
498
+            }
499
+          }
500
+        }
501
+        .progress {
502
+          padding: 0.2rem 0.2rem;
503
+          overflow: hidden;
504
+          transition-duration: .2s;
505
+          transition-timing-function: linear;
506
+          &.progressHide{
507
+            height: 1.7rem;
508
+          }
509
+          .progress_info {
510
+            overflow: hidden;
511
+            margin-bottom: 0.1rem;
512
+            &:nth-last-child(1) {
513
+              .cont {
514
+                border: none !important;
515
+              }
516
+            }
517
+            .progress_info_L {
518
+              float: left;
519
+              color: #333;
520
+              max-width: 18%;
521
+            }
522
+            .progress_info_R {
523
+              float: right;
524
+              margin-left: 0.09rem;
525
+              width: 80%;
526
+              font-size: 0.25rem;
527
+              .time {
528
+                i {
529
+                  margin-left: -0.15rem;
530
+                  &.icon-icon_weizuo {
531
+                    color: #005495;
532
+                  }
533
+                  &.icon-icon_zhengzaijinx {
534
+                    color: #48a843;
535
+                    font-size: 0.37rem;
536
+                  }
537
+                }
538
+                span {
539
+                  margin-left: 0.15rem;
540
+                }
541
+              }
542
+              .cont {
543
+                border-left: 1px solid #999;
544
+                padding-left: 0.4rem;
545
+                min-height: 0.4rem;
546
+                &.blue {
547
+                  border-left: 1px solid #005395;
548
+                }
549
+              }
550
+
551
+              .text1 {
552
+                font-size: 0.15rem;
553
+              }
554
+              .text2 {
555
+                color: #666;
556
+              }
557
+              p {
558
+                padding: 0;
559
+              }
560
+            }
561
+          }
562
+        }
563
+      }
564
+      .txtLabel {
565
+        width: 100%;
566
+        overflow: hidden;
567
+        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
568
+        .txt {
569
+          width: 30%;
570
+          color: #666;
571
+        }
572
+        .cube-textarea-wrapper {
573
+          width: 62%;
574
+        }
575
+      }
576
+      .sub {
577
+        background: #ececec;
578
+        .cube-btn {
579
+          background-color: #005395 !important;
580
+          width: 90%;
581
+          margin: 0.2rem auto;
582
+          border-radius: 8px;
583
+        }
584
+      }
585
+    }
586
+  }
587
+  .showwrap {
588
+    width: 75%;
589
+    text-align: right;
590
+  }
591
+}
592
+</style>

Файловите разлики са ограничени, защото са твърде много
+ 1673 - 0
src/views/processing.vue


+ 264 - 0
src/views/referenceDetail.vue

@@ -0,0 +1,264 @@
1
+<template>
2
+  <div class="body">
3
+    <div class="header">常见问题</div>
4
+    <div class="bgColor">
5
+      <div class="title">
6
+        <!-- <div>主题:</div> -->
7
+        {{data.title}}
8
+      </div>
9
+      <div class="timeBox">
10
+        <div>{{data.createUser.dept?data.createUser.dept.dept:"暂无"}}</div>
11
+        <div>{{data.createtime.substring(0,data.createtime.length-3)}}</div>
12
+      </div>
13
+      <div class="conents" v-html="data.content">{{data.content}}</div>
14
+      <!-- <div class="release">{{data.createUser.dept?data.createUser.dept.dept:"暂无"}}</div>
15
+      <div class="time">{{data.createtime.substring(0,data.createtime.length-3)||"暂无"}}</div>-->
16
+      <div class="files" v-if="files.length">
17
+        <!-- <div @click="downFile(v.token,v.name)" v-for="(v,index) in files">{{v.name}}</div> -->
18
+        <a
19
+          :href="getFileUrl(v.previewUrl)"
20
+          v-for="(v,index) in files"
21
+          target="_blank"
22
+          :download="getDownload(v.name)"
23
+        >{{v.name}}</a>
24
+      </div>
25
+      <div class="keyword" v-if="data.label">
26
+        <span v-for="v in data.label" @click="toKnowList(v)">{{v}}</span>
27
+      </div>
28
+      <!-- <div class="good" @click="referClick()" v-show="starIf">
29
+        <i class="iconfont icon-yinyong"></i>
30
+        <span>{{data.solutionQuote||0}}</span>
31
+      </div> -->
32
+      <div class="goodClick" @click="referClick()">
33
+        <i class="iconfont icon-yinyong"></i>
34
+        <span>{{data.solutionQuote||0}}</span>
35
+      </div>
36
+    </div>
37
+    <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
38
+  </div>
39
+</template>
40
+<script>
41
+import PrompTing from "./../views/prompting.vue";
42
+export default {
43
+  data() {
44
+    return {
45
+      promptingConent: "",
46
+      promptingStatus: "",
47
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
48
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
49
+      data: "",
50
+      // starIf: "",
51
+      files: []
52
+    };
53
+  },
54
+  components:{
55
+    PrompTing
56
+  },
57
+  methods: {
58
+    getFileUrl(res) {
59
+      return res;
60
+    },
61
+    getDownload(res) {
62
+      return res;
63
+    },
64
+    downFile(token, fileName) {
65
+      this.$http
66
+        .get("service/common/common/downloadAttachment/" + token, {
67
+          headers: {
68
+            Accept: "*/*"
69
+          },
70
+          responseType: "arraybuffer"
71
+        })
72
+        .then(function(res) {
73
+          var file = new Blob([res.data], {
74
+            type: "application/octet-stream"
75
+          });
76
+          var fileURL = URL.createObjectURL(file);
77
+          var a = document.createElement("a");
78
+          a.href = fileURL;
79
+          a.target = "_blank";
80
+          a.download = fileName;
81
+          document.body.appendChild(a);
82
+          a.click();
83
+        });
84
+    },
85
+    getFiles() {
86
+      var that = this;
87
+      this.$http
88
+        .get(
89
+          "service/common/common/listAttachment/solution/" + this.data.id,
90
+          {}
91
+        )
92
+        .then(function(res) {
93
+          that.files = res.data.data;
94
+        });
95
+    },
96
+    toKnowList(res) {
97
+      this.$router.push({
98
+        name: "KnowList",
99
+        params: {
100
+          keword: res
101
+        }
102
+      });
103
+    },
104
+    getParamsData() {
105
+      this.data = JSON.parse(this.$route.params.data);
106
+    },
107
+    // 关键字查询
108
+    getKeyWords() {
109
+      if (this.data.label) {
110
+        this.data.label = this.data.label.split("/");
111
+      }
112
+    },
113
+    // 获取是否点过赞
114
+    // getStarIf() {
115
+    //   var that = this;
116
+    //   this.$http
117
+    //     .get(
118
+    //       "service/solution/canStar/requester/" +
119
+    //         this.data.id +
120
+    //         "/" +
121
+    //         this.loginUser.id,
122
+    //       {}
123
+    //     )
124
+    //     .then(function(res) {
125
+    //       that.starIf = res.data.result;
126
+    //     });
127
+    // },
128
+    // 引用
129
+    referClick() {
130
+      var that = this;
131
+      localStorage.setItem("referenceInfo", that.$route.params.data);
132
+      that.data.solutionQuote++;
133
+      that.$http
134
+        .get(
135
+          "service/solution/solutionQuote/" +that.data.id,
136
+          {}
137
+        )
138
+        .then(function(res) {
139
+          $("#fade").fadeIn();
140
+            that.promptingConent = "恭喜您,引用成功!";
141
+            that.promptingStatus = true;
142
+            setTimeout(function() {
143
+              $("#fade").fadeOut();
144
+              that.$router.go(-2);
145
+            }, 2000);
146
+        });
147
+    }
148
+  },
149
+  created() {
150
+    this.getParamsData();
151
+    // this.getStarIf();
152
+    this.getKeyWords();
153
+    this.getFiles();
154
+  },
155
+  mounted() {}
156
+};
157
+</script>
158
+<style scoped lang='less'>
159
+.header {
160
+  height: 0.88rem;
161
+  line-height: 0.88rem;
162
+  text-align: center;
163
+  color: #fff;
164
+  font-size: 0.37rem;
165
+  background: linear-gradient(#2e2f32, #414246);
166
+  padding: 0;
167
+}
168
+.bgColor {
169
+  background-color: white;
170
+  padding: 0 0.24rem;
171
+}
172
+.title {
173
+  font-size: 0.32rem;
174
+  line-height: 0.45rem;
175
+  padding: 0.24rem 0.24rem 0 0.24rem;
176
+  color: #333333;
177
+  font-weight: bold;
178
+}
179
+.timeBox {
180
+  display: flex;
181
+  justify-content: space-between;
182
+  font-size: 0.24rem;
183
+  color: #999999;
184
+  padding: 0.16rem 0;
185
+  line-height: 0.33rem;
186
+}
187
+.conents {
188
+  font-size: 0.28rem;
189
+  padding-top: 0.24rem;
190
+  border-top: 0.01rem rgb(223, 222, 222) solid;
191
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
192
+  text-indent: 2em;
193
+  line-height: 0.39rem;
194
+  padding-bottom: 0.48rem;
195
+  color: #666666;
196
+  overflow: hidden;
197
+  width: 100%;
198
+  overflow-x: scroll;
199
+}
200
+.release {
201
+  display: flex;
202
+  justify-content: flex-end;
203
+  font-size: 0.28rem;
204
+  line-height: 0.39rem;
205
+  color: #666666;
206
+}
207
+.time {
208
+  display: flex;
209
+  justify-content: flex-end;
210
+  font-size: 0.28rem;
211
+  line-height: 0.39rem;
212
+  color: #666666;
213
+  margin-top: 0.08rem;
214
+  padding-bottom: 0.24rem;
215
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
216
+}
217
+.files {
218
+  font-size: 0.28rem;
219
+  /* color: #005395; */
220
+  line-height: 0.4rem;
221
+  padding: 0.24rem 0;
222
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
223
+}
224
+.files a {
225
+  display: block;
226
+  color: #005395;
227
+  margin-top: 0.1rem;
228
+}
229
+.keyword {
230
+  padding: 0.24rem 0;
231
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
232
+}
233
+.keyword span {
234
+  display: inline-block;
235
+  color: rgb(0, 0, 255);
236
+  margin-left: 0.2rem;
237
+  text-decoration: underline;
238
+  font-size: 0.28rem;
239
+  line-height: 0.35rem;
240
+}
241
+.good {
242
+  text-align: center;
243
+  margin: 0.24rem auto;
244
+  width: 2rem;
245
+  height: 0.88rem;
246
+  line-height: 0.88rem;
247
+  background-color: #b8d1e6;
248
+  border-radius: 20px;
249
+  font-size: 0.4rem;
250
+  color: #005395;
251
+}
252
+
253
+.goodClick {
254
+  text-align: center;
255
+  margin: 0.24rem auto;
256
+  width: 2rem;
257
+  height: 0.88rem;
258
+  line-height: 0.88rem;
259
+  background-color: #b8d1e6;
260
+  border-radius: 20px;
261
+  font-size: 0.4rem;
262
+  color: #005395;
263
+}
264
+</style>

+ 395 - 0
src/views/referenceList.vue

@@ -0,0 +1,395 @@
1
+<template>
2
+  <div class="bgColor">
3
+    <div class="header">常见问题</div>
4
+    <div slot="content" class="scroll-wrapper">
5
+      <div class="demo">
6
+        <div class="scroll-list-wrap">
7
+          <cube-scroll
8
+            ref="scroll"
9
+            :data="items"
10
+            :options="options"
11
+            @pulling-down="onPullingDown"
12
+            @pulling-up="onPullingUp"
13
+          >
14
+            <div class="search">
15
+              <input type="text" placeholder="搜索" v-model="search" @input="searchFn()">
16
+            </div>
17
+            <ul class="foods-wrapper">
18
+              <li v-for="data in items" class="food-item border-1px" @click="toKnowDetails(data)">
19
+                <div class="food-content">
20
+                  <div class="title">
21
+                    <div>
22
+                      <i class="iconfont icon-changjianwenti1"></i>
23
+                    </div>
24
+                    <div>主题:{{data.title}}</div>
25
+                  </div>
26
+                  <div class="content" v-html="data.content" style="-webkit-box-orient: vertical !important;"></div>
27
+                  <div class="timeBox">
28
+                    <div class="time">{{data.createtime.substring(0,data.createtime.length-3)}}</div>
29
+                    <div class="good">
30
+                      <i class="iconfont icon-yinyong"></i>&nbsp;&nbsp;
31
+                      <span>{{data.solutionQuote}}</span>
32
+                      引用
33
+                    </div>
34
+                  </div>
35
+                </div>
36
+              </li>
37
+              <div class="wushuju" v-show="items.length==0&&wushuju">
38
+                <img src="./../../static/images/wushuju.svg" alt>
39
+                <p>暂无常见问题</p>
40
+              </div>
41
+            </ul>
42
+            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
43
+              <div
44
+                v-if="props.pullDownRefresh"
45
+                class="cube-pulldown-wrapper"
46
+                :style="props.pullDownStyle"
47
+              >
48
+                <div
49
+                  v-show="props.beforePullDown"
50
+                  class="before-trigger"
51
+                  :style="{paddingTop: props.bubbleY + 'px'}"
52
+                >
53
+                  <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 40}">↓</span>
54
+                </div>
55
+                <div class="after-trigger" v-show="!props.beforePullDown">
56
+                  <div v-show="props.isPullingDown" class="loading">
57
+                    <cube-loading></cube-loading>
58
+                  </div>
59
+                  <div v-show="!props.isPullingDown" class="text">
60
+                    <span class="refresh-text">更新成功</span>
61
+                  </div>
62
+                </div>
63
+              </div>
64
+            </template>
65
+          </cube-scroll>
66
+        </div>
67
+      </div>
68
+    </div>
69
+    <load-ing v-show="!items.length&&!wushuju"></load-ing>
70
+  </div>
71
+</template>
72
+<script>
73
+import Vue from "vue";
74
+import CubePage from "../components/cube-page.vue";
75
+import SwitchOption from "../components/switch-option";
76
+import InputOption from "../components/input-option";
77
+import SelectOption from "../components/select-option";
78
+import LoadIng from "./../views/loading.vue";
79
+export default {
80
+  data() {
81
+    return {
82
+      //   items: _foods,
83
+      items: [],
84
+      pullDownRefresh: true,
85
+      pullDownRefreshThreshold: 60,
86
+      pullDownRefreshStop: 40,
87
+      pullDownRefreshTxt: "Refresh success",
88
+      pullUpLoad: true,
89
+      pullUpLoadThreshold: 0,
90
+      pullUpLoadMoreTxt: "加载更多",
91
+      pullUpLoadNoMoreTxt: "没有更多数据",
92
+      wushuju: false,
93
+      customPullDown: true,
94
+      search: "",
95
+      sum: 10,
96
+      idx: 0,
97
+      loadShow: true
98
+    };
99
+  },
100
+  components: {
101
+    CubePage,
102
+    SwitchOption,
103
+    InputOption,
104
+    SelectOption,
105
+    LoadIng
106
+  },
107
+  computed: {
108
+    options() {
109
+      return {
110
+        pullDownRefresh: this.pullDownRefreshObj,
111
+        pullUpLoad: this.pullUpLoadObj,
112
+        scrollbar: true
113
+      };
114
+    },
115
+    pullDownRefreshObj: function() {
116
+      return this.pullDownRefresh
117
+        ? {
118
+            threshold: parseInt(this.pullDownRefreshThreshold),
119
+            txt: this.pullDownRefreshTxt
120
+          }
121
+        : false;
122
+    },
123
+    pullUpLoadObj: function() {
124
+      return this.pullUpLoad
125
+        ? {
126
+            threshold: parseInt(this.pullUpLoadThreshold),
127
+            txt: {
128
+              more: this.pullUpLoadMoreTxt,
129
+              noMore: this.pullUpLoadNoMoreTxt
130
+            }
131
+          }
132
+        : false;
133
+    }
134
+  },
135
+  methods: {
136
+    getParams() {
137
+      if (this.$route.params.keword) {
138
+        this.search = this.$route.params.keword;
139
+      }
140
+    },
141
+    searchFn() {
142
+      var that = this;
143
+      that.loadShow = true;
144
+      that.items=[]
145
+      that.getData()
146
+    },
147
+    toKnowDetails(data) {
148
+      // this.$router.push({path:'/knowDetails'})
149
+      this.$router.push({
150
+        name: "ReferenceDetail",
151
+        params: {
152
+          data: JSON.stringify(data)
153
+        }
154
+      });
155
+    },
156
+    
157
+    getData() {
158
+      var that = this;
159
+      this.$http
160
+        .post("service/solution/fetchDataList/solution", {
161
+          idx: that.idx,
162
+          solution: {
163
+            searchWord: that.search,
164
+            // solutionType: { id: "" },
165
+            // status: { id: 72 },
166
+            // createUser: { name: "" }
167
+          },
168
+          sum: that.sum
169
+        })
170
+        .then(function(res) {
171
+          if (res.data.list.length > 0) {
172
+            that.items=that.items.concat(res.data.list);
173
+            that.wushuju = false;
174
+          } else {
175
+            that.wushuju = true;
176
+            that.$refs.scroll.forceUpdate()
177
+          }
178
+          that.loadShow = false;
179
+        });
180
+    },
181
+    onPullingDown() {
182
+     var that = this;
183
+      // 模拟更新数据
184
+      that.idx = 0;
185
+      that.sum = 10;
186
+        that.items=[];
187
+      setTimeout(() => {
188
+        that.getData();
189
+      }, 1000);
190
+    },
191
+    onPullingUp() {var that = this;
192
+      that.idx += 1;
193
+      that.getData();
194
+    },
195
+    updatePullDownRefresh(val) {
196
+      this.pullDownRefresh = val;
197
+    },
198
+    updatePullDownRefreshThreshold(val) {
199
+      this.pullDownRefreshThreshold = val;
200
+    },
201
+    updatePullDownRefreshTxt(val) {
202
+      this.pullDownRefreshTxt = val;
203
+    },
204
+    updatePullUpLoad(val) {
205
+      this.pullUpLoad = val;
206
+    },
207
+    updatePullUpLoadThreshold(val) {
208
+      this.pullUpLoadThreshold = val;
209
+    },
210
+    updatePullUpLoadMoreTxt(val) {
211
+      this.pullUpLoadMoreTxt = val;
212
+    },
213
+    updatePullUpLoadNoMoreTxt(val) {
214
+      this.pullUpLoadNoMoreTxt = val;
215
+    },
216
+    updateCustomPullDown(val) {
217
+      this.customPullDown = val;
218
+    },
219
+    rebuildScroll() {
220
+      Vue.nextTick(() => {
221
+        this.$refs.scroll.destroy();
222
+        this.$refs.scroll.initScroll();
223
+      });
224
+    }
225
+  },
226
+  created() {
227
+    this.search=this.$route.params.data||'';
228
+    this.getParams();
229
+    this.getData(this.idx, this.sum);
230
+
231
+  }
232
+};
233
+</script>
234
+    <style lang="stylus" rel="stylesheet/stylus" scoped>
235
+    .scroll-list-wrap {
236
+      /* height: 350px */
237
+      height: 100vh;
238
+      /* border: 1px solid rgba(0, 0, 0, 0.1) */
239
+      border-radius: 5px;
240
+      transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
241
+      overflow: hidden;
242
+    }
243
+
244
+    .foods-wrapper {
245
+      .food-item {
246
+        display: flex;
247
+
248
+        /* min-width: 0 */
249
+        /* padding: 18px
250
+        border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
251
+        &:last-child {
252
+          border-none();
253
+          margin-bottom: 0;
254
+        }
255
+
256
+        .food-content {
257
+          flex: 1;
258
+          min-width: 0;
259
+
260
+          .cartcontrol-wrapper {
261
+            position: absolute;
262
+            right: 0;
263
+            bottom: 12px;
264
+
265
+            .scroll-wrapper {
266
+              .cube-pulldown-wrapper {
267
+                .before-trigger {
268
+                  font-size: 30px;
269
+                  line-height: 30px;
270
+                  align-self: flex-end;
271
+
272
+                  span {
273
+                    display: inline-block;
274
+                    transition: all 0.3s;
275
+                    color: #666;
276
+
277
+                    &.rotate {
278
+                      transform: rotate(180deg);
279
+                    }
280
+                  }
281
+                }
282
+
283
+                .after-trigger {
284
+                  .refresh-text {
285
+                    color: grey;
286
+                  }
287
+                }
288
+              }
289
+            }
290
+          }
291
+        }
292
+      }
293
+    }
294
+</style>
295
+<style scoped lang='less'>
296
+
297
+.bgColor {
298
+  background-color: white;
299
+  .header {
300
+    height: 0.88rem;
301
+    line-height: 0.88rem;
302
+    text-align: center;
303
+    color: #fff;
304
+    font-size: 0.37rem;
305
+    background: linear-gradient(#2e2f32, #414246);
306
+  }
307
+}
308
+.search {
309
+  padding: 0.16rem 0.24rem;
310
+  height: 0.6rem;
311
+  background-color: #eeeeee;
312
+  border-bottom: 0.01rem #b7b7b7 solid;
313
+}
314
+.search input {
315
+  width: 100%;
316
+  height: 0.56rem;
317
+  border-radius: 4px;
318
+  text-align: center;
319
+  font-size: 0.28rem;
320
+}
321
+.search:focus {
322
+  outline: none;
323
+}
324
+.food-item {
325
+  border-top: 0.16rem rgb(238, 238, 238) solid;
326
+}
327
+.food-content {
328
+  border-top: 0.01rem rgb(223, 222, 222) solid;
329
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
330
+}
331
+.title {
332
+  display: flex;
333
+  min-width: 0;
334
+  padding: 0.2rem 0.24rem;
335
+  line-height: 0.45rem;
336
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
337
+}
338
+.title div:nth-child(1) {
339
+  width: 6%;
340
+}
341
+.title div:nth-child(1) i {
342
+  font-size: 0.32rem;
343
+  color: #005395;
344
+  line-height: 0.49rem;
345
+}
346
+.title div:nth-child(2) {
347
+  width: 94%;
348
+  font-size: 0.32rem;
349
+  overflow: hidden;
350
+  white-space: nowrap;
351
+  text-overflow: ellipsis;
352
+}
353
+.content {
354
+  font-size: 0.28rem;
355
+  /* margin-top: .3rem; */
356
+  line-height: 0.39rem;
357
+  overflow: hidden;
358
+  display: -webkit-box;
359
+  -webkit-line-clamp: 2;
360
+  -webkit-box-orient: vertical;
361
+  word-break: break-all;
362
+  padding: 0 0.64rem;
363
+  margin: 0.24rem 0;
364
+  max-height: .8rem;
365
+  width: 83%;
366
+}
367
+.timeBox {
368
+  display: flex;
369
+  justify-content: space-between;
370
+  /* margin-top: .3rem; */
371
+  border-top: 0.01rem rgb(223, 222, 222) solid;
372
+  padding: 0.2rem 0.64rem;
373
+}
374
+.timeBox .time {
375
+  color: #999999;
376
+  font-size: 0.24rem;
377
+}
378
+.timeBox .good {
379
+  font-size: 0.3rem;
380
+  color: #999;
381
+}
382
+.timeBox .good span {
383
+  color: #a37200;
384
+  font-size: 0.24rem;
385
+}
386
+.wushuju {
387
+  margin-top: 2.4rem;
388
+  text-align: center;
389
+  color: #999;
390
+}
391
+.wushuju img {
392
+  width: 5.12rem;
393
+  height: 2.84rem;
394
+}
395
+</style>

+ 0 - 670
src/views/repair.vue

@@ -1,670 +0,0 @@
1
-<template>
2
-  <div slot="content" class="bgColor">
3
-    <cube-form :model="model" @validate="validateHandler" @submit="submitHandler">
4
-      <cube-form-group>
5
-        <!-- <div class="label">
6
-                    报修联系人</div>
7
-                <div class="zhidu">
8
-                    <div>联系人:</div>
9
-                    <div>{{name}}</div>
10
-        </div>-->
11
-        <cube-form-item :field="fields[5]" v-if="repairMain.valueconfig == 2">
12
-          <cube-input
13
-            @input="showDeptId(model.deptId)"
14
-            @blur="model.deptId = deptIdText"
15
-            v-model="model.deptId"
16
-          >{{model.deptId || '请输入报修科室'}}</cube-input>
17
-        </cube-form-item>
18
-
19
-        <cube-form-item :field="fields[0]"></cube-form-item>
20
-        <cube-form-item :field="fields[1]"></cube-form-item>
21
-        <!-- <cube-form-item :field="fields[2]" class="btn_plcaeholde"></cube-form-item> -->
22
-        <cube-form-item :field="fields[3]">
23
-          <cube-input
24
-            @input="showAddress(model.address)"
25
-            v-model="model.address"
26
-          >{{model.address || '请输入故障地点'}}</cube-input>
27
-        </cube-form-item>
28
-        <cube-form-item :field="fields[6]" v-if="ifCreate.valueconfig == 1"></cube-form-item>
29
-        <div class="label">报修信息</div>
30
-        <cube-form-item :field="fields[4]"></cube-form-item>
31
-        <div class="label">
32
-          报修图片
33
-          <span>(最多可上传3张JPG或PNG,每张不能超过10M)</span>
34
-        </div>
35
-        <div class="uplod">
36
-          <!-- <div>报修图片:</div> -->
37
-          <cube-upload
38
-            ref="upload"
39
-            :max="3"
40
-            :action="action"
41
-            :simultaneous-uploads="3"
42
-            @files-added="filesAdded"
43
-            @file-submitted="fileSubmitted"
44
-          />
45
-        </div>
46
-      </cube-form-group>
47
-      <cube-form-group class="sub">
48
-        <cube-button type="submit" @click="subVali()">提交报修</cube-button>
49
-      </cube-form-group>
50
-    </cube-form>
51
-    <load-ing v-show="loadShow"></load-ing>
52
-    <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
53
-  </div>
54
-</template>
55
-<script>
56
-import CubePage from "./../components/cube-page.vue";
57
-import CubeButtonGroup from "./../components/cube-button-group.vue";
58
-import DatePicker from "./../components/date-picker.vue";
59
-import CubeExtendPopup from "./../components/extend-popup.vue";
60
-import LoadIng from "./../views/loading.vue";
61
-import PrompTing from "./../views/prompting.vue";
62
-// const PCA = {
63
-//   props: {
64
-//     value: {
65
-//       default() {
66
-//         return [];
67
-//       }
68
-//     }
69
-//   },
70
-//   data() {
71
-//     return {
72
-//       selected: [],
73
-//       selectData: []
74
-//     };
75
-//   },
76
-//   render(createElement) {
77
-//     return createElement(
78
-//       "cube-input",
79
-//       {
80
-//         on: {
81
-//           click: this.showPicker
82
-//         }
83
-//       },
84
-//       this.selected.length ? this.selected.join(" ") : "请选择区域地点"
85
-//     );
86
-//   },
87
-//   mounted() {},
88
-//   methods: {
89
-//     showPicker() {
90
-//       this.picker.show();
91
-//     },
92
-//     selectHandler(selectedVal, selectedIndex, selectedTxt) {
93
-//       this.selected = selectedTxt;
94
-//       this.$emit("input", selectedVal);
95
-//     },
96
-//     getAreaData() {
97
-//       var that = this;
98
-//       this.$http
99
-//         .post("service/user/data/fetchDataList/area", {
100
-//           idx: 0,
101
-//           sum: 1000,
102
-//           area: {
103
-//             wechatArea: true
104
-//           }
105
-//         })
106
-//         .then(function(res) {
107
-//           var data = res.data.list;
108
-//           for (var i = 0; i < data.length; i++) {
109
-//             that.selectData.push({
110
-//               text: data[i].area,
111
-//               value: data[i].id,
112
-//               children: []
113
-//             });
114
-//           }
115
-//         });
116
-//     },
117
-//     getPlaceData() {
118
-//       var that = this;
119
-//       this.$http
120
-//         .post("service/user/data/fetchDataList/place", {
121
-//           idx: 0,
122
-//           sum: 1000,
123
-//           area: {
124
-//             wechatAreaId: ""
125
-//           }
126
-//         })
127
-//         .then(function(res) {
128
-//           var data = res.data.list;
129
-//           for (var i = 0; i < data.length; i++) {
130
-//             for (var j = 0; j < that.selectData.length; j++) {
131
-//               if (data[i].area.id == that.selectData[j].value) {
132
-//                 that.selectData[j].children.push({
133
-//                   text: data[i].place,
134
-//                   value: data[i].id
135
-//                 });
136
-//               }
137
-//             }
138
-//           }
139
-//           that.picker = that.$createCascadePicker({
140
-//             title: "区域地点选择",
141
-//             data: that.selectData,
142
-//             selectedIndex: [0, 0],
143
-//             onSelect: that.selectHandler
144
-//           });
145
-//         });
146
-//     },
147
-//     getParamsPlace() {
148
-//       var data = JSON.parse(localStorage.getItem("loginUser"));
149
-//       this.selected[0] = data.place.area.area;
150
-//       this.selected[1] = data.place.place;
151
-//     }
152
-//   },
153
-//   created() {
154
-//     this.getAreaData();
155
-//     this.getPlaceData();
156
-//     this.getParamsPlace();
157
-//   }
158
-// };
159
-const delay = (function() {
160
-  let timer = 0;
161
-  return function(callback, ms) {
162
-    clearTimeout(timer);
163
-    timer = setTimeout(callback, ms);
164
-  };
165
-})();
166
-export default {
167
-  data() {
168
-    return {
169
-      loginUser: null,
170
-      // 故障地点下拉数据
171
-      addressData: [],
172
-      // 故障地点选中文本
173
-      addressText: "",
174
-      // 报修科室下拉数据
175
-      deptIdData: [],
176
-      // 报修科室选中文本
177
-      deptIdText: "",
178
-      // 报修科室选中id
179
-      deptIdNum: -1,
180
-      // 报修主体
181
-      repairMain: null,
182
-      // 自动创建
183
-      ifCreate: null,
184
-      validity: {},
185
-      valid: undefined,
186
-      // action: 'http://localhost:8080/service/common/common/uploadAttachment/wechatRequesterIncident/',
187
-      // action: 'http://192.168.199.164:8080/service/common/common/uploadAttachment/wechatRequesterIncident/',
188
-      action: {
189
-        // "target":'http://192.168.3.100:8080/service/common/common/uploadAttachment/wechatRequesterIncident/',
190
-        // "fileName":"upload",
191
-        // "target":'http://localhost/service/common/common/uploadAttachment/wechatRequesterIncident/',
192
-        // "target":'http://weixintest.ngser.dashitech.com/service/common/common/uploadAttachment/wechatRequesterIncident/',
193
-        target:this.$host+"/service/common/common/uploadAttachment/wechatRequesterIncident/",
194
-        data: {}
195
-      },
196
-      isUploading: false,
197
-      loadShow: false,
198
-      name: "",
199
-      phone: "",
200
-      model: {
201
-        contactsInformation: "",
202
-        // pcaValue: [],
203
-        address: "",
204
-        description: "",
205
-        bxcode: "",
206
-        deptId: "",
207
-        contacts: ""
208
-      },
209
-      // showPrompting:false,
210
-      promptingConent: "",
211
-      promptingStatus: "",
212
-      vali: false,
213
-      fields: [
214
-        {
215
-          type: "input",
216
-          modelKey: "contacts",
217
-          label: "联系人:",
218
-          props: {
219
-            placeholder: "请输入联系人"
220
-          },
221
-          rules: {
222
-            // required: this.repairMain.valueconfig == 1
223
-            required: true
224
-          }
225
-        },
226
-        {
227
-          type: "input",
228
-          modelKey: "contactsInformation",
229
-          label: "联系电话:",
230
-          props: {
231
-            placeholder: "请输入联系电话"
232
-          },
233
-          rules: {
234
-            required: true
235
-          }
236
-        },
237
-        {
238
-          component: "input",
239
-          modelKey: "pcaValue",
240
-          label: "区域地点:",
241
-          rules: {
242
-            required: true
243
-          },
244
-          messages: {
245
-            required: "请选择区域地点"
246
-          }
247
-        },
248
-        {
249
-          type: "input",
250
-          modelKey: "address",
251
-          label: "故障地点:",
252
-          props: {
253
-            placeholder: "请输入故障地点"
254
-          },
255
-          rules: {
256
-            required: true
257
-          }
258
-        },
259
-        {
260
-          type: "textarea",
261
-          modelKey: "description",
262
-          label: "报修内容:",
263
-          props: {
264
-            placeholder: "请输入报修内容"
265
-          },
266
-          rules: {
267
-            required: true
268
-          },
269
-          debounce: 100
270
-        },
271
-        {
272
-          type: "input",
273
-          modelKey: "deptId",
274
-          label: "报修科室:",
275
-          props: {
276
-            placeholder: "请选择报修科室"
277
-          },
278
-          rules: {
279
-            required: true
280
-          }
281
-        },
282
-        {
283
-          type: "select",
284
-          modelKey: "categoryId",
285
-          label: "故障类型:",
286
-          props: {
287
-            placeholder: "请选择故障类型",
288
-            options: []
289
-          },
290
-          rules: {
291
-            required: true
292
-          }
293
-        }
294
-      ]
295
-    };
296
-  },
297
-  methods: {
298
-    // -----------故障地点-----
299
-    showAddressPicker() {
300
-      if (!this.picker) {
301
-        this.picker = this.$createPicker({
302
-          title: "故障地点",
303
-          data: [this.addressData],
304
-          onSelect: this.selectAddressHandle
305
-        });
306
-      }
307
-      this.picker.show();
308
-    },
309
-    selectAddressHandle(selectedVal, selectedIndex, selectedText) {
310
-      this.model.address = selectedText[0];
311
-      this.addressText = selectedText[0];
312
-    },
313
-    // ----------------
314
-    // -----------报修科室-----
315
-    showDeptIdPicker() {
316
-      if (!this.picker1) {
317
-        this.picker1 = this.$createPicker({
318
-          title: "报修科室",
319
-          data: [this.deptIdData],
320
-          onSelect: this.selectDeptIdHandle
321
-        });
322
-      }
323
-      this.picker1.show();
324
-    },
325
-    selectDeptIdHandle(selectedVal, selectedIndex, selectedText) {
326
-      this.model.deptId = selectedText[0];
327
-      this.deptIdText = selectedText[0];
328
-      this.deptIdNum = selectedVal[0];
329
-      this.deptIdList.forEach(item => {
330
-        if (item.id == this.deptIdNum) {
331
-          this.model.contactsInformation = item.phone;
332
-          this.model.address = item.place
333
-            ? item.place.place
334
-              ? item.place.area.area + item.place.place
335
-              : item.place.area
336
-            : ""; //seimin
337
-        }
338
-      });
339
-    },
340
-    // ----------------
341
-    subVali() {
342
-      this.vali = true;
343
-    },
344
-    getbxcode() {
345
-      var that = this;
346
-      this.$http.get("service/bpm/bpm/restful/wxbx", {}).then(function(res) {
347
-        that.model.bxcode = res.data.data;
348
-      });
349
-    },
350
-    submitHandler() {
351
-      // if (this.model.pcaValue.length == 2) {
352
-      //   this.model.areaId = this.model.pcaValue[this.model.pcaValue.length - 2];
353
-      //   this.model.placeId = this.model.pcaValue[
354
-      //     this.model.pcaValue.length - 1
355
-      //   ];
356
-      // } else if (this.model.pcaValue.length == 1) {
357
-      //   this.model.areaId = this.model.pcaValue[this.model.pcaValue.length - 1];
358
-      //   this.model.placeId = "";
359
-      // }
360
-
361
-      this.model["requester"] = this.loginUser;
362
-      // delete this.model.pcaValue;
363
-      this.model.fileUrl = "url";
364
-      this.model.sourceType = "wechatRequesterIncident";
365
-      var that = this;
366
-      this.loadShow = true;
367
-      var reqData = {
368
-        verification: "true",
369
-        loginUser: {
370
-          id: that.loginUser.id
371
-        },
372
-        incident: JSON.parse(JSON.stringify(this.model))
373
-      };
374
-    //  报修主体是报修科室的时候,不传科室id艺洛
375
-      if(this.repairMain.valueconfig == 2){
376
-        reqData.incident.deptId = this.deptIdNum;
377
-      }else{
378
-        delete reqData.incident.deptId;
379
-      }
380
-      this.$http
381
-        .post("service/apply/bpm/addWxIncident", reqData)
382
-        .then(function(res) {
383
-          if (res.data.state == 200) {
384
-            that.action.target = that.action.target + res.data.incident.id;
385
-            // that.action.target=that.action.target+res.data.incident.bxcode;
386
-            setTimeout(function() {
387
-              that.$refs.upload.start();
388
-            }, 100);
389
-            $("#fade").fadeIn();
390
-            that.promptingConent = "恭喜您,新建报修成功!";
391
-            that.promptingStatus = true;
392
-            that.dialog = that
393
-              .$createDialog({
394
-                type: "alert",
395
-                title: "报修成功",
396
-                content: "点击返回首页",
397
-                icon: "cubeic-right",
398
-                onConfirm: (e, promptValue) => {
399
-                  that.$router.push({ path: "/main" });
400
-                }
401
-              })
402
-              .show();
403
-            setTimeout(function() {
404
-              $("#fade").fadeOut();
405
-            }, 2000);
406
-          } else {
407
-            $("#fade").fadeIn();
408
-            that.promptingConent = "系统错误,请稍后再试!";
409
-            that.promptingStatus = false;
410
-            that.loadShow = false;
411
-            that.dialog = that
412
-              .$createDialog({
413
-                type: "alert",
414
-                title: "系统错误,请稍后再试!",
415
-                content: "点击返回首页",
416
-                icon: "cubeic-wrong",
417
-                onConfirm: (e, promptValue) => {
418
-                  that.$router.push({ path: "/main" });
419
-                }
420
-              })
421
-              .show();
422
-            setTimeout(function() {
423
-              $("#fade").fadeOut();
424
-            }, 2000);
425
-          }
426
-        });
427
-      event.preventDefault();
428
-    },
429
-    validateHandler(result) {
430
-      this.validity = result.validity;
431
-      this.valid = result.valid;
432
-      if (this.valid == false) {
433
-        $("#fade").fadeIn();
434
-        this.promptingConent = "提交失败,请填写必填信息!";
435
-        this.promptingStatus = false;
436
-        setTimeout(function() {
437
-          $("#fade").fadeOut();
438
-        }, 2000);
439
-      }
440
-      this.valid = false;
441
-    },
442
-    // 展示故障地点搜索下拉
443
-    showAddress(data) {
444
-      if (this.addressText !== this.model.address) {
445
-        delay(() => {
446
-          this.$http
447
-            .post("service/apply/bpm/searchFaultLocation", {
448
-              searchKey: data
449
-            })
450
-            .then(result => {
451
-              if (result.data.state == 200) {
452
-                if (result.data.result.length > 0) {
453
-                  this.addressData.length = 0;
454
-                  result.data.result.forEach(item => {
455
-                    this.addressData.push({
456
-                      text: item.place
457
-                        ? item.area.area + item.place
458
-                        : item.area,
459
-                      value: item.place
460
-                        ? item.area.area + item.place
461
-                        : item.area
462
-                    });
463
-                  });
464
-                  // 显示
465
-                  this.showAddressPicker();
466
-                }
467
-              }
468
-            });
469
-        }, 500);
470
-      }
471
-    },
472
-    // 展示报修科室搜索下拉
473
-    showDeptId(data) {
474
-      if (this.deptIdText !== this.model.deptId) {
475
-        delay(() => {
476
-          this.$http
477
-            .post("service/user/data/fetchDataList/department", {
478
-              idx: 0,
479
-              sum: 50,
480
-              department: { dept: data }
481
-            })
482
-            .then(result => {
483
-              if (result.data.status == 200) {
484
-                if (result.data.list.length > 0) {
485
-                  this.deptIdData.length = 0;
486
-                  this.deptIdList = result.data.list;
487
-                  result.data.list.forEach(item => {
488
-                    this.deptIdData.push({
489
-                      text: item.dept,
490
-                      value: item.id
491
-                    });
492
-                  });
493
-                  // 显示
494
-                  this.showDeptIdPicker();
495
-                }
496
-              }
497
-            });
498
-        }, 500);
499
-      }
500
-    },
501
-    filesAdded(files) {
502
-      let hasIgnore = false;
503
-      const maxSize = 1000 * 1024 * 1024; // 1M
504
-      for (let k in files) {
505
-        const file = files[k];
506
-        if (file.size > maxSize) {
507
-          file.ignore = true;
508
-          hasIgnore = true;
509
-        }
510
-      }
511
-      hasIgnore &&
512
-        this.$createToast({
513
-          type: "warn",
514
-          time: 1000,
515
-          txt: "不能上传超过100M的文件"
516
-        }).show();
517
-    },
518
-    fileSubmitted(files) {
519
-      files.base64Value = files.file.base64;
520
-      this.action.data = { fileName: files.name };
521
-      console.log("ok");
522
-    },
523
-    fileSuccess() {
524
-      console.log("上传成功");
525
-    },
526
-    getMessage() {
527
-      this.name = this.loginUser.name;
528
-      this.model.contactsInformation =
529
-        this.repairMain.valueconfig == 1
530
-          ? this.loginUser.mphone
531
-          : this.loginUser.dept
532
-          ? this.loginUser.dept.phone
533
-          : "";
534
-      this.model.contacts = this.loginUser.name;
535
-      this.model.address = this.loginUser.place
536
-        ? this.loginUser.place.area.area + this.loginUser.place.place
537
-        : "";
538
-      this.model.deptId = this.loginUser.dept ? this.loginUser.dept.dept : "";
539
-    }
540
-  },
541
-  created() {
542
-    this.repairMain = JSON.parse(localStorage.getItem("repairMain"));
543
-    this.ifCreate = JSON.parse(localStorage.getItem("ifCreate"));
544
-
545
-    this.fields.forEach(item => {
546
-      // 联系人在报修人主体下必填,报修科室主体下非必填
547
-      if (item.modelKey == "contacts") {
548
-        item.rules.required = this.repairMain.valueconfig == 1;
549
-      }
550
-    });
551
-    // 获取故障类型
552
-    this.$http
553
-      .post("service/bpm/data/fetchDataList/incidentcategory", {
554
-        idx: 0,
555
-        sum: 100,
556
-        incidentcategory: { selectType: "one" }
557
-      })
558
-      .then(result => {
559
-        if(result.data.status ==200){
560
-          let arr = [];
561
-          result.data.list.forEach(item=>{
562
-            arr.push({value:item.id,text:item.category})
563
-          })
564
-          this.fields.forEach(item => {
565
-          // 初始化故障类型下拉框列表
566
-          if (item.modelKey == "categoryId") {
567
-            item.props.options = arr;
568
-          }
569
-        });
570
-        }
571
-      });
572
-  },
573
-  mounted() {
574
-    this.loginUser = JSON.parse(localStorage.getItem("loginUser"));
575
-    this.getMessage();
576
-    this.getbxcode();
577
-    // 获取报修主体
578
-    this.deptIdNum = this.loginUser.dept ? this.loginUser.dept.id : "";
579
-    this.deptIdText = this.loginUser.dept ? this.loginUser.dept.dept : "";
580
-    this.addressText = this.loginUser.place
581
-      ? this.loginUser.place.place
582
-        ? this.loginUser.place.area.area + this.loginUser.place.place
583
-        : this.loginUser.place.area
584
-      : "";
585
-    this.$refs.upload.pause();
586
-  },
587
-  components: {
588
-    CubePage,
589
-    CubeButtonGroup,
590
-    DatePicker,
591
-    // JsonView
592
-    CubeExtendPopup,
593
-    LoadIng,
594
-    PrompTing
595
-  }
596
-};
597
-</script>
598
-<style lang="stylus" rel="stylesheet/stylus" scoped>
599
-.form-custom {
600
-  .cube-form-item {
601
-    .cube-btn {
602
-      padding-left: 0;
603
-      padding-right: 0;
604
-      text-align: left;
605
-      color: inherit;
606
-      background: none;
607
-      border: none;
608
-    }
609
-  }
610
-}
611
-
612
-.label {
613
-  background-color: rgb(238, 238, 238);
614
-  height: 0.6rem;
615
-  line-height: 0.5rem;
616
-  padding-left: 0.2rem;
617
-  font-size: 0.24rem;
618
-  color: #666666;
619
-}
620
-
621
-.label span {
622
-  font-size: 0.2rem;
623
-  display: inline-block;
624
-  margin-left: 0.08rem;
625
-  color: #999999;
626
-}
627
-
628
-.zhidu {
629
-  display: flex;
630
-  height: 0.7rem;
631
-  line-height: 0.7rem;
632
-  border-bottom: 0.02rem rgb(245, 245, 245) solid;
633
-}
634
-
635
-.bgColor {
636
-  background-color: white;
637
-}
638
-
639
-.zhidu div:nth-child(1) {
640
-  width: 27.5%;
641
-  padding-left: 6%;
642
-}
643
-
644
-.uplod {
645
-  padding: 0 0.24rem;
646
-}
647
-</style>
648
-<style>
649
-.btn_plcaeholde .cube-btn {
650
-  padding-left: 0;
651
-  padding-right: 0;
652
-  text-align: left;
653
-  color: inherit;
654
-  background: none;
655
-  border: none;
656
-}
657
-.cube-form_standard .cube-upload-def .cube-upload-btn,
658
-.cube-form_standard .cube-upload-def .cube-upload-file {
659
-  margin-left: 3% !important;
660
-}
661
-.sub .cube-btn {
662
-  background-color: #005395 !important;
663
-  width: 90%;
664
-  margin: 0 auto;
665
-  border-radius: 8px;
666
-}
667
-.cube-picker-wheel-item {
668
-  text-overflow: ellipsis;
669
-}
670
-</style>

+ 704 - 0
src/views/solved.vue

@@ -0,0 +1,704 @@
1
+<template>
2
+  <div class="solved">
3
+    <div class="conentBox">
4
+      <div class="header">处理方案</div>
5
+      <div v-if="model.incident" class="conent">
6
+        <div class="navBar">
7
+          <div class="fl">
8
+            <a :class="{active:actives=='info'}" href="javascript:;" @click="toInfo('info')">事件信息</a>
9
+          </div>
10
+          <div class="fl">
11
+            <a
12
+              :class="{active:actives=='handlerInfo'}"
13
+              href="javascript:;"
14
+              @click="toInfo('handlerInfo')"
15
+            >处理信息</a>
16
+          </div>
17
+          <div class="fl">
18
+            <a
19
+              :class="{active:actives=='progress'}"
20
+              href="javascript:;"
21
+              @click="toInfo('progress')"
22
+            >处理进度</a>
23
+          </div>
24
+        </div>
25
+
26
+        <div class="info">
27
+          <div class="label headtop" id="info">事件信息</div>
28
+          <div class="head">
29
+            <p>
30
+              <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
31
+              事件编号:{{model.incident.incidentsign}}
32
+              <span class="fr btn yijiejue">{{model.incident.state.name}}</span>
33
+            </p>
34
+          </div>
35
+          <p>
36
+            <span class="fl">事件分类</span>
37
+            <span class="fr">{{model.incident.category.category}}</span>
38
+          </p>
39
+          <!-- <p>
40
+            <span class="fl">事件主题</span>
41
+            <span class="fr">{{model.incident.title}}</span>
42
+          </p> -->
43
+          <p class="desc">
44
+            <span class="fl">事件描述</span>
45
+            <span class="grayFont fr " v-html="model.incident.description"></span>
46
+          </p>
47
+          <div class="shows" id="shows">
48
+              <p v-if="valConfig==2">
49
+                <span class="fl">报修科室</span>
50
+                <span class="fr">{{model.incident.department?model.incident.department.dept:''}}</span>
51
+              </p>
52
+            <p v-if="valConfig==1">
53
+              <span class="fl">报修人</span>
54
+              <span class="fr">{{model.incident.requester.name}}</span>
55
+            </p>
56
+            <p v-if="valConfig==2">
57
+              <span class="fl">联系人</span>
58
+              <span class="fr">{{model.incident.contacts}}</span>
59
+            </p>
60
+            <p>
61
+              <span class="fl">联系电话</span>
62
+              <span class="fr">{{model.incident.contactsInformation}}</span>
63
+            </p>
64
+            <p>
65
+              <span class="fl">联系地址</span>
66
+              <span class="fr">{{model.incident.houseNumber||''}}</span>
67
+            </p>
68
+            <p class="boeder_B">
69
+              <span class="fl">事件来源</span>
70
+              <span class="fr">{{model.incident.source.name}}</span>
71
+            </p>
72
+            <!-- <p>
73
+              <span class="fl">影响度</span>
74
+              <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
75
+            </p>
76
+            <p>
77
+              <span class="fl">紧急度</span>
78
+              <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
79
+            </p> -->
80
+            <p>
81
+              <span class="fl">优先级</span>
82
+              <span class="fr">{{model.incident.priority?model.incident.priority.name:''}}</span>
83
+            </p>
84
+            <p>
85
+              <span class="fl">逾期响应时间</span>
86
+              <span class="fr">{{model.incident.overdueResponseDate}}</span>
87
+            </p>
88
+            <p>
89
+              <span class="fl">逾期解决时间</span>
90
+              <span class="fr">{{model.incident.overdueTime}}</span>
91
+            </p>
92
+            <p>
93
+              <span class="fl">区域</span>
94
+              <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
95
+            </p>
96
+            <p>
97
+              <span class="fl">地点</span>
98
+              <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
99
+            </p>
100
+          </div>
101
+          <p class="info_hide">
102
+            <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
103
+            <span class="fl hide" @click="hides()" v-if="item_hides">隐藏详情<<</span>
104
+          </p>
105
+          <div class="imgs-container" v-if="imgs.length">
106
+            <div class="imgs-cont">
107
+              <img v-if='img.suffix=="jpeg"||img.suffix=="jpg"||img.suffix=="gif"||img.suffix=="png"||img.suffix=="svg"||img.suffix=="pdf"' :src="img.previewUrl" v-for="(img, index) in imgs" class="imgs">
108
+              <p v-else>
109
+                <a :href='[img.previewUrl]'>{{img.name}}</a>
110
+              </p>
111
+            </div>
112
+          </div>
113
+
114
+          <div class="label" id="handlerInfo">处理信息</div>
115
+          <p>
116
+            <span class="fl">处理人</span>
117
+            <span class="fr">{{model.incident.acceptUser?model.incident.acceptUser.name:''}}</span>
118
+          </p>
119
+          <p>
120
+            <span class="fl">联系电话</span>
121
+            <span class="fr">{{model.incident.contactsInformation}}</span>
122
+          </p>
123
+          <p>
124
+            <span class="fl">处理方式</span>
125
+            <span
126
+              class="fr showwrap"
127
+            >{{model.incident.handleCategory?model.incident.handleCategory.name:''}}</span>
128
+          </p>
129
+          <p>
130
+            <span class="fl">关闭代码</span>
131
+            <span class="fr">{{model.incident.closecode?model.incident.closecode.name:''}}</span>
132
+          </p>
133
+          <p class="desc">
134
+            <span class="fl">处理方案</span>
135
+            <span class="fr grayFont" v-html="model.incident.handleDescription"></span>
136
+          </p>
137
+          <!-- <p>
138
+            <span class="fl" v-if="model.incident.synergeticReason">协同对象</span>
139
+            <span class="fl" v-else-if="model.isupreason">升级对象</span>
140
+            <span class="fl" v-else-if="model.transferReason">转派对象</span>
141
+            <span class="fr">{{model.incident.handlerUser?model.incident.handlerUser.name:''}}</span>
142
+          </p>
143
+              <p v-if="model.incident.synergeticReason">
144
+                <span class="fl" >协同原因</span>
145
+                <span class="fr">{{model.incident.synergeticReason}}</span>
146
+              </p>
147
+              <p v-if="model.isupreason">
148
+                <span class="fl">升级原因</span>
149
+                <span class="fr">{{model.isupreason}}</span>
150
+              </p>
151
+              <p v-if="model.transferReason">
152
+                <span class="fl">转派原因</span>
153
+                <span class="fr" >{{model.transferReason}}</span>
154
+              </p> -->
155
+
156
+          <div class="label" id="progress">处理进度</div>
157
+          <div :class="{'progress':true,'progressHide':!pro_hides}" id="progressBox">
158
+            <div class="progress_info" v-for="item in progressInfo">
159
+              <div class="progress_info_L">{{item.activityName}}</div>
160
+              <div class="progress_info_R">
161
+                <div class="time">
162
+                  <i
163
+                    :class="{'iconfont':true, 'icon-icon_weizuo':item.endTime!='','icon-icon_zhengzaijinx':item.endTime=='' }"
164
+                  ></i>
165
+                  <span class="text1">{{item.startTime}}</span>
166
+                </div>
167
+                <div
168
+                  :class="{'cont':true,'blue':item.endTime!='' }"
169
+                >
170
+                  <p class="text2" v-if="item.desc">{{item.desc}}</p>
171
+                </div>
172
+              </div>
173
+            </div>
174
+          </div>
175
+
176
+          <p class="info_hide">
177
+            <span class="fl hide" @click="proHides()">{{pro_hides?'隐藏详情 <<':'展开详情 >>'}}</span>
178
+          </p>
179
+
180
+          <div class="form"  v-if="model.incident.handlerUser.id==loginUser.id">
181
+            <div class="txtLabel">
182
+              <div class="txt fl handler">
183
+                <span style="color:red;">*</span>是否已解决:
184
+              </div>
185
+              <cube-select class="selectGroup fl" v-model="isclose" :options="iscloseArr"></cube-select>
186
+            </div>
187
+            <div class="txtLabel">
188
+              <div class="txt fl">
189
+                <span style="color:red;">*</span> 结果类型:
190
+              </div>
191
+              <cube-select class="selectGroup fl" v-model="handleResult" :options="handleResultArr"></cube-select>
192
+            </div>
193
+            <div class="txtLabel">
194
+              <div class="txt fl">满意度评价:</div>
195
+              <cube-select class="selectGroup fl" v-model="degree" :options="degreeArr"></cube-select>
196
+            </div>
197
+            <div class="txtLabel">
198
+              <div class="txt fl">回访备注:</div>
199
+              <cube-input v-model="model.incident.visitRemarks"></cube-input>
200
+            </div>
201
+            <cube-form-group class="sub">
202
+              <cube-button type="submit" @click="subVali()">提交</cube-button>
203
+            </cube-form-group>
204
+          </div>
205
+        </div>
206
+      </div>
207
+      <load-ing v-if="!model.incident"></load-ing>
208
+    </div>
209
+  </div>
210
+</template>
211
+<script>
212
+import LoadIng from "./../views/loading.vue";
213
+export default {
214
+  data() {
215
+    return {
216
+      id:'',
217
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
218
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
219
+      selected: 1,
220
+      isclose: "close", //是否已解决
221
+      iscloseArr: [
222
+        {
223
+          text: "已解决",
224
+          value: "close"
225
+        },
226
+        {
227
+          text: "未解决",
228
+          value: "notsolved"
229
+        }
230
+      ],
231
+      handleResult: "", //结果类型
232
+      handleResultArr: [], //结果类型
233
+      degree: "",
234
+      degreeArr: [],
235
+      visitRemarks: "", //回访备注
236
+      item_hides: false,
237
+      item_hides1: false,
238
+      pro_hides:false,//展开/收起处理进度
239
+      actives: "info",
240
+      processInstanceId: "",
241
+      progressInfo: [], //处理进度
242
+      imgs: [], //图片
243
+      model: {} //提交数据
244
+    };
245
+  },
246
+  components: {
247
+    LoadIng
248
+  },
249
+  methods: {
250
+    //   获取事件数据
251
+    getParamsData() {
252
+      var that = this;
253
+      that.$http
254
+        .get(
255
+          "/service/form/renderForm/closeform/" +
256
+            that.processInstanceId +
257
+            "/" +
258
+            that.loginUser.id+'/'+that.id,
259
+          {}
260
+        )
261
+        .then(function(res) {
262
+          console.log(res.data);
263
+          that.model = res.data.model;
264
+          that.model.msgflag = '已解决';
265
+          //seimin
266
+          localStorage.setItem('modelData',JSON.stringify(that.model))
267
+        });
268
+    },
269
+    // 获取图片
270
+    getImgs() {
271
+      var that = this;
272
+      that.$http
273
+        .get(
274
+          "service/common/common/listAttachment/incident/" +
275
+            that.processInstanceId,
276
+          {}
277
+        )
278
+        .then(function(res) {
279
+          console.log(res.data);
280
+          that.imgs = res.data.data.splice(0, 3);
281
+          console.log(that.imgs);
282
+        });
283
+    },
284
+    // 获取处理进度
285
+    getProgressInfo() {
286
+      var that = this;
287
+      that.$http
288
+        .post(
289
+          "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
290
+          {}
291
+        )
292
+        .then(function(res) {
293
+          console.log(res.data);
294
+          that.progressInfo = res.data.data;
295
+          that.progressInfo.reverse();
296
+        });
297
+    },
298
+    // 获取结果类型
299
+    getHandlerRes() {
300
+      var that = this;
301
+      that.$http
302
+        .post("/service/common/common/getDictionary", {
303
+          type: "list",
304
+          key: "incident_handleresult"
305
+        })
306
+        .then(function(res) {
307
+          console.log(res.data);
308
+          // that.handleResultArr = res.data;
309
+          res.data.forEach(function(v, i) {
310
+            that.handleResultArr.push({
311
+              text: v.name,
312
+              value: v.id
313
+            });
314
+          });
315
+        });
316
+    },
317
+    // 获取满意度评价
318
+    getDegree() {
319
+      var that = this;
320
+      that.$http
321
+        .post("/service/common/common/getDictionary", {
322
+          type: "list",
323
+          key: "incident_degree"
324
+        })
325
+        .then(function(res) {
326
+          console.log(res.data);
327
+          // that.degreeArr = res.data;
328
+          res.data.forEach(function(v, i) {
329
+            that.degreeArr.push({
330
+              text: v.name,
331
+              value: v.id
332
+            });
333
+          });
334
+        });
335
+    },
336
+    //隐藏显示详情
337
+    hides() {
338
+      this.item_hides = !this.item_hides;
339
+      $("#shows").slideToggle();
340
+    },
341
+    //隐藏显示详情
342
+    hides1() {
343
+      this.item_hides1 = !this.item_hides1;
344
+      $("#shows1").slideToggle();
345
+    },
346
+    // 处理进度隐藏/展开
347
+    proHides(){
348
+      if(!this.pro_hides){
349
+        $('#progressBox').animate({'height':$('#progressBox')[0].scrollHeight})
350
+      }else{
351
+        $('#progressBox').animate({'height':'1.7rem'})
352
+      }
353
+      this.pro_hides=!this.pro_hides;
354
+    },
355
+    // 快速定位
356
+    toInfo(id) {
357
+      this.actives = id;
358
+      $("body,html").animate(
359
+        {
360
+          scrollTop:
361
+            $("#" + id).offset().top -
362
+            $(".header")[0].offsetHeight -
363
+            $(".navBar")[0].offsetHeight
364
+        },
365
+        260
366
+      );
367
+    },
368
+    // 提交
369
+    subVali() {
370
+      var that = this;
371
+      delete that.model.handlerCode;
372
+      that.model.handler_code = "resolve";
373
+      that.model.isclose = that.isclose;
374
+      if(that.model.isclose=='close'){
375
+        delete that.model.receive_code;
376
+      }
377
+      that.model.incident.handleResult = { id: that.handleResult };
378
+      that.model.loginUser = that.loginUser;
379
+      if (that.degree) {
380
+        that.model.incident.degree = { id: that.degree };
381
+      }
382
+
383
+      console.log(that.model);
384
+      if (!that.model.incident.handleResult) {
385
+        $("#fade").fadeIn();
386
+        that.promptingConent = "提交失败,请填写必填信息!";
387
+        that.promptingStatus = false;
388
+        setTimeout(function() {
389
+          $("#fade").fadeOut();
390
+        }, 2000);
391
+      }
392
+
393
+      that.$http
394
+        .post(
395
+          "service/bpm/bpm/completeTask/" +
396
+            that.model.incident.taskId +
397
+            "/" +
398
+            that.loginUser.id,
399
+          that.model
400
+        )
401
+        .then(function(res) {
402
+          if (res.data.status == 200) {
403
+            $("#fade").fadeIn();
404
+            that.promptingConent = "恭喜您,提交成功!";
405
+            that.promptingStatus = true;
406
+            that.dialog = that
407
+              .$createDialog({
408
+                type: "alert",
409
+                title: "提交成功",
410
+                content: "点击返回首页",
411
+                icon: "cubeic-right",
412
+                onConfirm: (e, promptValue) => {
413
+                  that.$router.push({ path: "/main" });
414
+                }
415
+              })
416
+              .show();
417
+            setTimeout(function() {
418
+              $("#fade").fadeOut();
419
+            }, 2000);
420
+          }
421
+        });
422
+    }
423
+  },
424
+  created() {
425
+    // seimin
426
+    this.processInstanceId = this.$route.params.data
427
+      ? this.$route.params.data.processInstanceId
428
+      : JSON.parse(localStorage.getItem("modelData")).incident
429
+          .processInstanceId;
430
+          this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
431
+    this.getParamsData();
432
+    this.getProgressInfo();
433
+    this.getImgs();
434
+    this.getHandlerRes();
435
+    this.getDegree();
436
+  }
437
+};
438
+</script>
439
+<style lang="less" scoped>
440
+i.iconfont {
441
+  &.blue {
442
+    color: #005395;
443
+    // &::after {
444
+    //   content: "";
445
+    //   width: 0.01rem;
446
+    //   height: 0.4rem;
447
+    //   background: #005395;
448
+    //   position: relative;
449
+    //   display: block;
450
+    //   left: 0.14rem;
451
+    // }
452
+  }
453
+  &.blue1 {
454
+    color: #005395;
455
+  }
456
+}
457
+.solved {
458
+  .header {
459
+    width: 100%;
460
+    height: 0.88rem;
461
+    line-height: 0.88rem;
462
+    text-align: center;
463
+    color: #fff;
464
+    font-size: 0.37rem;
465
+    background: linear-gradient(#2e2f32, #414246);
466
+    position: fixed;
467
+    top: 0;
468
+    z-index: 6;
469
+  }
470
+  .navBar {
471
+    width: 100%;
472
+    height: 0.96rem;
473
+    line-height: 0.96rem;
474
+    background-color: #fafafa;
475
+    font-size: 0.28rem;
476
+    position: fixed;
477
+    top: 0.88rem;
478
+    div {
479
+      width: 33.33%;
480
+      text-align: center;
481
+      a {
482
+        display: inline-block;
483
+        height: 0.9rem;
484
+        width: 1.7rem;
485
+        padding: 0 0.1rem;
486
+        &.active {
487
+          color: #005395;
488
+          border-bottom: 0.06rem solid #005395;
489
+        }
490
+      }
491
+    }
492
+  }
493
+
494
+  .headtop {
495
+    margin-top: 1.84rem;
496
+  }
497
+  .label {
498
+    background-color: #eeeeee;
499
+    height: 0.6rem;
500
+    line-height: 0.58rem;
501
+    padding-left: 0.2rem;
502
+    font-size: 0.24rem;
503
+    color: #666666;
504
+    span {
505
+      font-size: 0.2rem;
506
+      display: inline-block;
507
+      margin-left: 0.08rem;
508
+      color: #999999;
509
+    }
510
+    &.formLabel {
511
+      background-color: #fff;
512
+    }
513
+  }
514
+  .txtLabel {
515
+    width: 100%;
516
+    overflow: hidden;
517
+    padding: 0.32rem 0.24rem 0.32rem 0.32rem;
518
+    .txt {
519
+      width: 25%;
520
+      color: #666;
521
+      &.handler {
522
+        width: 40%;
523
+      }
524
+    }
525
+    .selectGroup {
526
+      width: 62%;
527
+    }
528
+    .cube-input {
529
+      width: 62%;
530
+    }
531
+  }
532
+  .conentBox {
533
+    width: 100%;
534
+    .conent {
535
+      font-size: 0.32rem;
536
+      font-weight: 400;
537
+      line-height: 0.45rem;
538
+      // border-bottom: 0.16rem solid #e5e5e5;
539
+
540
+      .shows {
541
+        display: none;
542
+      }
543
+
544
+      .shows1 {
545
+        display: none;
546
+      }
547
+      .boeder_B {
548
+        border-bottom: 0.01rem solid #ccc;
549
+      }
550
+        p {
551
+          &.desc{
552
+            overflow: hidden;
553
+          }
554
+          .grayFont {
555
+            width: 75%;
556
+            text-align: right;
557
+            overflow-x: scroll;
558
+          }
559
+      }
560
+      .bottom {
561
+        overflow: hidden;
562
+        line-height: 0.86rem;
563
+        border-bottom: 0.01rem solid #e6e6e6;
564
+        font-size: 0.24rem;
565
+        color: #999;
566
+        padding: 0 0.24rem 0 0.48rem;
567
+      }
568
+      .info {
569
+        color: #999;
570
+        font-size: 0.28rem;
571
+        overflow: hidden;
572
+        .head {
573
+          border-bottom: 0.01rem solid #e6e6e6;
574
+          p {
575
+            padding: 0.24rem 0.3rem;
576
+            i {
577
+              color: #00559d;
578
+            }
579
+          }
580
+        }
581
+        p {
582
+          line-height: 0.4rem;
583
+          padding: 0.1rem 0.24rem;
584
+          overflow: hidden;
585
+          .overflowEllipsis2 {
586
+            margin-left: 1.96rem;
587
+          }
588
+        }
589
+        .info_hide {
590
+          padding: 0.2rem 0.24rem;
591
+          border-bottom: 0.01rem solid #e6e6e6;
592
+          .hide {
593
+            color: #00559d;
594
+          }
595
+        }
596
+        .imgs-container{
597
+          a{
598
+            color:#03c !important;
599
+            &:visited{
600
+              color: #551a8b !important;
601
+            }
602
+          }
603
+           img {
604
+            width: 1.5rem;
605
+            height: 1.5rem;
606
+            margin-right: 0.7rem;
607
+            &:nth-child(1) {
608
+              margin-left: 0.75rem;
609
+            }
610
+          }
611
+        }
612
+
613
+        .progress {
614
+          padding: 0.2rem 0.2rem;
615
+          overflow: hidden;
616
+          transition-duration: .2s;
617
+          transition-timing-function: linear;
618
+          &.progressHide{
619
+            height: 1.7rem;
620
+          }
621
+          .progress_info {
622
+            overflow: hidden;
623
+            margin-bottom: 0.1rem;
624
+            &:nth-last-child(1){
625
+              .cont{
626
+                border:none !important;
627
+              }
628
+            }
629
+            .progress_info_L {
630
+              float: left;
631
+              color: #333;
632
+              max-width: 18%;
633
+            }
634
+            .progress_info_R {
635
+              float: right;
636
+              margin-left: 0.09rem;
637
+              width: 80%;
638
+              font-size: 0.25rem;
639
+              .time {
640
+                i {
641
+                  margin-left: -0.15rem;
642
+                  &.icon-icon_weizuo {
643
+                    color: #005495;
644
+                  }
645
+                  &.icon-icon_zhengzaijinx {
646
+                    color: #48a843;
647
+                    font-size: 0.37rem;
648
+                  }
649
+                }
650
+                span {
651
+                  margin-left: 0.15rem;
652
+                }
653
+              }
654
+              .cont {
655
+                border-left: 1px solid #999;
656
+                padding-left: 0.4rem;
657
+                min-height: 0.4rem;
658
+                &.blue {
659
+                  border-left: 1px solid #005395;
660
+                }
661
+              }
662
+
663
+              .text1 {
664
+                font-size: 0.15rem;
665
+              }
666
+              .text2 {
667
+                color: #666;
668
+              }
669
+              p {
670
+                padding: 0;
671
+              }
672
+            }
673
+          }
674
+        }
675
+      }
676
+      .txtLabel {
677
+        width: 100%;
678
+        overflow: hidden;
679
+        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
680
+        .txt {
681
+          width: 30%;
682
+          color: #666;
683
+        }
684
+        .cube-textarea-wrapper {
685
+          width: 62%;
686
+        }
687
+      }
688
+      .sub {
689
+        background: #ececec;
690
+        .cube-btn {
691
+          background-color: #005395 !important;
692
+          width: 90%;
693
+          margin: 0.2rem auto;
694
+          border-radius: 8px;
695
+        }
696
+      }
697
+    }
698
+  }
699
+  .showwrap {
700
+    width: 75%;
701
+    text-align: right;
702
+  }
703
+}
704
+</style>

+ 509 - 0
src/views/waitConfirm.vue

@@ -0,0 +1,509 @@
1
+<template>
2
+  <div class="waitConfirm">
3
+    <div class="conentBox">
4
+      <div class="conent">
5
+        <div class="header">处理方案</div>
6
+        <div class="navBar">
7
+          <div class="fl">
8
+            <a :class="{active:actives=='info'}" href="javascript:;" @click="toInfo('info')">事件信息</a>
9
+          </div>
10
+          <div class="fl">
11
+            <a
12
+              :class="{active:actives=='handlerInfo'}"
13
+              href="javascript:;"
14
+              @click="toInfo('handlerInfo')"
15
+            >处理信息</a>
16
+          </div>
17
+          <div class="fl">
18
+            <a
19
+              :class="{active:actives=='progress'}"
20
+              href="javascript:;"
21
+              @click="toInfo('progress')"
22
+            >处理进度</a>
23
+          </div>
24
+        </div>
25
+
26
+        <div class="info">
27
+          <div class="label headtop" id="info">事件信息</div>
28
+          <div class="head">
29
+            <p>
30
+              <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
31
+              事件编号:{{model.incident.incidentsign}}
32
+              <span
33
+                :class="{ 'fr':true,'btn':true, 'daipingjia':model.incident.state.name=='待评价', 'daijiedan':(model.incident.state.name=='待接单'&&model.incident.handlerUser&&!model.incident.candidateGroups), 'daiqiangdan':(model.incident.state.name=='待接单'&&!model.incident.handlerUser&&model.incident.candidateGroups), 'chulizhong':model.incident.state.name=='处理中', 'yijiejue':model.incident.state.name=='已解决', 'yiguanbi':model.incident.state.name=='已关闭'}"
34
+              >{{model.incident.state.name=='待接单'?(model.incident.handlerUser&&!model.incident.candidateGroups?'待接单':'待抢单'):model.incident.state.name}}</span>
35
+            </p>
36
+          </div>
37
+          <p>
38
+            <span class="fl">事件分类</span>
39
+            <span class="fr">{{model.incident.category.category}}</span>
40
+          </p>
41
+          <!-- <p>
42
+            <span class="fl">事件主题</span>
43
+            <span class="fr">{{model.incident.title}}</span>
44
+          </p> -->
45
+          <p>
46
+            <span class="fl">事件描述</span>
47
+            <span class="fr showwrap">{{model.incident.description}}</span>
48
+          </p>
49
+          <div class="shows" id="shows">
50
+              <p v-if="valConfig==2">
51
+                <span class="fl">报修科室</span>
52
+                <span class="fr">{{model.incident.department?model.incident.department.dept:''}}</span>
53
+              </p>
54
+            <p v-if="valConfig==1">
55
+              <span class="fl">报修人</span>
56
+              <span class="fr">{{model.incident.requester.name}}</span>
57
+            </p>
58
+            <p v-if="valConfig==2">
59
+              <span class="fl">联系人</span>
60
+              <span class="fr">{{model.incident.contacts}}</span>
61
+            </p>
62
+            <p>
63
+              <span class="fl">联系电话</span>
64
+              <span class="fr">{{model.incident.contactsInformation}}</span>
65
+            </p>
66
+            <p>
67
+              <span class="fl">联系地址</span>
68
+              <span class="fr">{{model.incident.houseNumber||''}}</span>
69
+            </p>
70
+            <p class="boeder_B">
71
+              <span class="fl">事件来源</span>
72
+              <span class="fr">{{model.incident.source.name}}</span>
73
+            </p>
74
+            <!-- <p>
75
+              <span class="fl">影响度</span>
76
+              <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
77
+            </p>
78
+            <p>
79
+              <span class="fl">紧急度</span>
80
+              <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
81
+            </p> -->
82
+            <p>
83
+              <span class="fl">优先级</span>
84
+              <span class="fr">{{model.incident.priority?model.incident.priority.name:''}}</span>
85
+            </p>
86
+            <p>
87
+              <span class="fl">逾期响应时间</span>
88
+              <span class="fr">{{model.incident.overdueResponseDate}}</span>
89
+            </p>
90
+            <p>
91
+              <span class="fl">逾期解决时间</span>
92
+              <span class="fr">{{model.incident.overdueTime}}</span>
93
+            </p>
94
+          </div>
95
+          <p class="info_hide">
96
+            <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
97
+            <span class="fl hide" @click="hides()" v-if="item_hides">隐藏详情<<</span>
98
+          </p>
99
+          <div class="imgs-container" v-if="imgs.length">
100
+            <div class="imgs-cont">
101
+              <img v-if='img.suffix=="jpeg"||img.suffix=="jpg"||img.suffix=="gif"||img.suffix=="png"||img.suffix=="svg"||img.suffix=="pdf"' :src="img.previewUrl" v-for="(img, index) in imgs" class="imgs">
102
+              <p v-else>
103
+                <a :href='[img.previewUrl]'>{{img.name}}</a>
104
+              </p>
105
+            </div>
106
+          </div>
107
+
108
+          <div class="label" id="handlerInfo">处理信息</div>
109
+          <p>
110
+            <span class="fl">处理人</span>
111
+            <span class="fr">{{model.incident.acceptUser?model.incident.acceptUser.name:''}}</span>
112
+          </p>
113
+          <p>
114
+            <span class="fl">联系电话</span>
115
+            <span class="fr">{{model.incident.contactsInformation}}</span>
116
+          </p>
117
+          <p>
118
+            <span class="fl">处理方式</span>
119
+            <span class="fr showwrap">{{model.incident.handleCategory}}</span>
120
+          </p>
121
+          <p>
122
+            <span class="fl">关闭代码</span>
123
+            <span class="fr">{{model.incident.closecode?model.incident.closecode.name:''}}</span>
124
+          </p>
125
+          <p>
126
+            <span class="fl">处理方案</span>
127
+            <span class="fr">{{model.incident.handleDescription||''}}</span>
128
+          </p>
129
+          <p>
130
+            <span class="fl">升级对象</span>
131
+            <span class="fr">{{model.incident.handlerUser?model.incident.handlerUser.name:''}}</span>
132
+          </p>
133
+          <!-- <p>
134
+            <span class="fl">升级原因</span>
135
+            <span class="fr">升级原因</span>
136
+          </p> -->
137
+
138
+          <div class="label" id="progress">处理进度</div>
139
+          <div class="progress">
140
+            <div class="progress_info" v-for="item in progressInfo">
141
+              <div class="progress_info_L">{{item.activityName}}</div>
142
+              <div class="progress_info_R">
143
+                <div class="time">
144
+                  <i
145
+                    :class="{'iconfont':true, 'icon-icon_weizuo':item.endTime!='','icon-icon_zhengzaijinx':item.endTime=='' }"
146
+                  ></i>
147
+                  <span class="text1">{{item.startTime}}</span>
148
+                </div>
149
+                <div
150
+                  :class="{'cont':true,'blue':item.endTime!='' }"
151
+                >
152
+                  <p class="text2" v-if="item.desc">{{item.desc}}</p>
153
+                </div>
154
+              </div>
155
+            </div>
156
+          </div>
157
+        </div>
158
+      </div>
159
+    </div>
160
+  </div>
161
+</template>
162
+<script>
163
+export default {
164
+  data() {
165
+    return {
166
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
167
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
168
+      selected: 1,
169
+      options: [
170
+        {
171
+          label: "接单",
172
+          value: 1
173
+        },
174
+        {
175
+          label: "关单信息",
176
+          value: 2
177
+        }
178
+      ],
179
+      resignComment: "", //重新指派原因
180
+      item_hides: false,
181
+      item_hides1: false,
182
+      actives: "info",
183
+      processInstanceId: "",
184
+      progressInfo: [], //处理进度
185
+      imgs: [], //图片
186
+      model: {} //提交数据
187
+    };
188
+  },
189
+  methods: {
190
+    //   获取事件数据
191
+    getParamsData() {
192
+      var that = this;
193
+      that.$http
194
+        .get(
195
+          "/service/form/renderForm/receiveform/" +
196
+            that.processInstanceId +
197
+            "/" +
198
+            that.loginUser.id,
199
+          {}
200
+        )
201
+        .then(function(res) {
202
+          console.log(res.data);
203
+          that.model = res.data.model;
204
+        });
205
+    },
206
+    // 获取图片
207
+    getImgs() {
208
+      var that = this;
209
+      that.$http
210
+        .get(
211
+          "service/common/common/listAttachment/incident/" +
212
+            that.processInstanceId,
213
+          {}
214
+        )
215
+        .then(function(res) {
216
+          console.log(res.data);
217
+          that.imgs = res.data.data.splice(0, 3);
218
+          console.log(that.imgs);
219
+        });
220
+    },
221
+    // 获取处理进度
222
+    getHandlerInfo() {
223
+      var that = this;
224
+      that.$http
225
+        .post(
226
+          "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
227
+          {}
228
+        )
229
+        .then(function(res) {
230
+          console.log(res.data);
231
+          that.progressInfo = res.data.data;
232
+          that.progressInfo.reverse();
233
+        });
234
+    },
235
+    //隐藏显示详情
236
+    hides() {
237
+      this.item_hides = !this.item_hides;
238
+      $("#shows").slideToggle();
239
+    },
240
+    //隐藏显示详情
241
+    hides1() {
242
+      this.item_hides1 = !this.item_hides1;
243
+      $("#shows1").slideToggle();
244
+    },
245
+    // 快速定位
246
+    toInfo(id) {
247
+      this.actives = id;
248
+      $("body,html").animate(
249
+        {
250
+          scrollTop:
251
+            $("#" + id).offset().top -
252
+            $(".header")[0].offsetHeight -
253
+            $(".navBar")[0].offsetHeight
254
+        },
255
+        260
256
+      );
257
+    }
258
+  },
259
+  created() {
260
+    this.processInstanceId = this.$route.params.data.processInstanceId;
261
+    this.getParamsData();
262
+    this.getHandlerInfo();
263
+    this.getImgs();
264
+  }
265
+};
266
+</script>
267
+<style lang="less" scoped>
268
+i.iconfont {
269
+  &.blue {
270
+    color: #005395;
271
+    // &::after {
272
+    //   content: "";
273
+    //   width: 0.01rem;
274
+    //   height: 0.4rem;
275
+    //   background: #005395;
276
+    //   position: relative;
277
+    //   display: block;
278
+    //   left: 0.14rem;
279
+    // }
280
+  }
281
+  &.blue1 {
282
+    color: #005395;
283
+  }
284
+}
285
+.waitConfirm {
286
+  .header {
287
+    width: 100%;
288
+    height: 0.88rem;
289
+    line-height: 0.88rem;
290
+    text-align: center;
291
+    color: #fff;
292
+    font-size: 0.37rem;
293
+    background: linear-gradient(#2e2f32, #414246);
294
+    position: fixed;
295
+    top: 0;
296
+    z-index: 6;
297
+  }
298
+  .navBar {
299
+    width: 100%;
300
+    height: 0.96rem;
301
+    line-height: 0.96rem;
302
+    background-color: #fafafa;
303
+    font-size: 0.28rem;
304
+    position: fixed;
305
+    top: 0.88rem;
306
+    div {
307
+      width: 33.33%;
308
+      text-align: center;
309
+      a {
310
+        display: inline-block;
311
+        height: 0.9rem;
312
+        width: 1.7rem;
313
+        padding: 0 0.1rem;
314
+        &.active {
315
+          color: #005395;
316
+          border-bottom: 0.06rem solid #005395;
317
+        }
318
+      }
319
+    }
320
+  }
321
+
322
+  .headtop {
323
+    margin-top: 1.84rem;
324
+  }
325
+  .label {
326
+    background-color: #eeeeee;
327
+    height: 0.6rem;
328
+    line-height: 0.58rem;
329
+    padding-left: 0.2rem;
330
+    font-size: 0.24rem;
331
+    color: #666666;
332
+    span {
333
+      font-size: 0.2rem;
334
+      display: inline-block;
335
+      margin-left: 0.08rem;
336
+      color: #999999;
337
+    }
338
+    &.formLabel {
339
+      background-color: #fff;
340
+    }
341
+  }
342
+  .conentBox {
343
+    width: 100%;
344
+    .conent {
345
+      font-size: 0.32rem;
346
+      font-weight: 400;
347
+      line-height: 0.45rem;
348
+      // border-bottom: 0.16rem solid #e5e5e5;
349
+
350
+      .shows {
351
+        display: none;
352
+      }
353
+
354
+      .shows1 {
355
+        display: none;
356
+      }
357
+      .boeder_B {
358
+        border-bottom: 0.01rem solid #ccc;
359
+      }
360
+      .center {
361
+        color: #333333;
362
+        border-bottom: 0.01rem solid #e6e6e6;
363
+        padding: 0.24rem 0.48rem;
364
+        p {
365
+          .grayFont {
366
+            color: #666;
367
+          }
368
+        }
369
+      }
370
+      .bottom {
371
+        overflow: hidden;
372
+        line-height: 0.86rem;
373
+        border-bottom: 0.01rem solid #e6e6e6;
374
+        font-size: 0.24rem;
375
+        color: #999;
376
+        padding: 0 0.24rem 0 0.48rem;
377
+      }
378
+      .info {
379
+        color: #999;
380
+        font-size: 0.28rem;
381
+        overflow: hidden;
382
+        .head {
383
+          border-bottom: 0.01rem solid #e6e6e6;
384
+          p {
385
+            padding: 0.24rem 0.3rem;
386
+            i {
387
+              color: #00559d;
388
+            }
389
+          }
390
+        }
391
+        p {
392
+          line-height: 0.4rem;
393
+          padding: 0.1rem 0.24rem;
394
+          overflow: hidden;
395
+          .overflowEllipsis2 {
396
+            margin-left: 1.96rem;
397
+          }
398
+        }
399
+        .info_hide {
400
+          padding: 0.2rem 0.24rem;
401
+          border-bottom: 0.01rem solid #e6e6e6;
402
+          .hide {
403
+            color: #00559d;
404
+          }
405
+        }
406
+        .imgs-container{
407
+          a{
408
+            color:#03c !important;
409
+            &:visited{
410
+              color: #551a8b !important;
411
+            }
412
+          }
413
+           img {
414
+            width: 1.5rem;
415
+            height: 1.5rem;
416
+            margin-right: 0.7rem;
417
+            &:nth-child(1) {
418
+              margin-left: 0.75rem;
419
+            }
420
+          }
421
+        }
422
+        .progress {
423
+          padding: 0.2rem 0.2rem;
424
+          overflow: hidden;
425
+          margin-bottom: 0.7rem;
426
+          .progress_info {
427
+            overflow: hidden;
428
+            margin-bottom: 0.1rem;
429
+            &:nth-last-child(1){
430
+              .cont{
431
+                border:none !important;
432
+              }
433
+            }
434
+            .progress_info_L {
435
+              float: left;
436
+              color: #333;
437
+              max-width: 18%;
438
+            }
439
+            .progress_info_R {
440
+              float: right;
441
+              margin-left: 0.09rem;
442
+              width: 80%;
443
+              font-size: 0.25rem;
444
+              .time {
445
+                i {
446
+                  margin-left: -0.15rem;
447
+                  &.icon-icon_weizuo {
448
+                    color: #005495;
449
+                  }
450
+                  &.icon-icon_zhengzaijinx {
451
+                    color: #48a843;
452
+                    font-size: 0.37rem;
453
+                  }
454
+                }
455
+                span {
456
+                  margin-left: 0.15rem;
457
+                }
458
+              }
459
+              .cont {
460
+                border-left: 1px solid #999;
461
+                padding-left: 0.4rem;
462
+                min-height: 0.4rem;
463
+                &.blue {
464
+                  border-left: 1px solid #005395;
465
+                }
466
+              }
467
+
468
+              .text1 {
469
+                font-size: 0.15rem;
470
+              }
471
+              .text2 {
472
+                color: #666;
473
+              }
474
+              p {
475
+                padding: 0;
476
+              }
477
+            }
478
+          }
479
+        }
480
+      }
481
+      .txtLabel {
482
+        width: 100%;
483
+        overflow: hidden;
484
+        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
485
+        .txt {
486
+          width: 30%;
487
+          color: #666;
488
+        }
489
+        .cube-textarea-wrapper {
490
+          width: 62%;
491
+        }
492
+      }
493
+      .sub {
494
+        background: #ececec;
495
+        .cube-btn {
496
+          background-color: #005395 !important;
497
+          width: 90%;
498
+          margin: 0.2rem auto;
499
+          border-radius: 8px;
500
+        }
501
+      }
502
+    }
503
+  }
504
+  .showwrap {
505
+    width: 75%;
506
+    text-align: right;
507
+  }
508
+}
509
+</style>

+ 161 - 0
static/css/demo_index.html

@@ -31,6 +31,18 @@
31 31
           <ul class="icon_lists dib-box">
32 32
           
33 33
             <li class="dib">
34
+              <span class="icon iconfont">&#xe6cc;</span>
35
+                <div class="name">正常</div>
36
+                <div class="code-name">&amp;#xe6cc;</div>
37
+              </li>
38
+          
39
+            <li class="dib">
40
+              <span class="icon iconfont">&#xe6a9;</span>
41
+                <div class="name">已逾期</div>
42
+                <div class="code-name">&amp;#xe6a9;</div>
43
+              </li>
44
+          
45
+            <li class="dib">
34 46
               <span class="icon iconfont">&#xe65c;</span>
35 47
                 <div class="name">错误</div>
36 48
                 <div class="code-name">&amp;#xe65c;</div>
@@ -67,6 +79,12 @@
67 79
               </li>
68 80
           
69 81
             <li class="dib">
82
+              <span class="icon iconfont">&#xe687;</span>
83
+                <div class="name">即将</div>
84
+                <div class="code-name">&amp;#xe687;</div>
85
+              </li>
86
+          
87
+            <li class="dib">
70 88
               <span class="icon iconfont">&#xe68f;</span>
71 89
                 <div class="name">默认</div>
72 90
                 <div class="code-name">&amp;#xe68f;</div>
@@ -192,6 +210,30 @@
192 210
                 <div class="code-name">&amp;#xe684;</div>
193 211
               </li>
194 212
           
213
+            <li class="dib">
214
+              <span class="icon iconfont">&#xe685;</span>
215
+                <div class="name">巡检</div>
216
+                <div class="code-name">&amp;#xe685;</div>
217
+              </li>
218
+          
219
+            <li class="dib">
220
+              <span class="icon iconfont">&#xe686;</span>
221
+                <div class="name">巡检2</div>
222
+                <div class="code-name">&amp;#xe686;</div>
223
+              </li>
224
+          
225
+            <li class="dib">
226
+              <span class="icon iconfont">&#xe688;</span>
227
+                <div class="name">巡检</div>
228
+                <div class="code-name">&amp;#xe688;</div>
229
+              </li>
230
+          
231
+            <li class="dib">
232
+              <span class="icon iconfont">&#xe689;</span>
233
+                <div class="name">引用</div>
234
+                <div class="code-name">&amp;#xe689;</div>
235
+              </li>
236
+          
195 237
           </ul>
196 238
           <div class="article markdown">
197 239
           <h2 id="unicode-">Unicode 引用</h2>
@@ -243,6 +285,24 @@
243 285
         <ul class="icon_lists dib-box">
244 286
           
245 287
           <li class="dib">
288
+            <span class="icon iconfont icon-zhengchang"></span>
289
+            <div class="name">
290
+              正常
291
+            </div>
292
+            <div class="code-name">.icon-zhengchang
293
+            </div>
294
+          </li>
295
+          
296
+          <li class="dib">
297
+            <span class="icon iconfont icon-yiyuqi"></span>
298
+            <div class="name">
299
+              已逾期
300
+            </div>
301
+            <div class="code-name">.icon-yiyuqi
302
+            </div>
303
+          </li>
304
+          
305
+          <li class="dib">
246 306
             <span class="icon iconfont icon-cuowu"></span>
247 307
             <div class="name">
248 308
               错误
@@ -297,6 +357,15 @@
297 357
           </li>
298 358
           
299 359
           <li class="dib">
360
+            <span class="icon iconfont icon-jijiang"></span>
361
+            <div class="name">
362
+              即将
363
+            </div>
364
+            <div class="code-name">.icon-jijiang
365
+            </div>
366
+          </li>
367
+          
368
+          <li class="dib">
300 369
             <span class="icon iconfont icon-moren"></span>
301 370
             <div class="name">
302 371
               默认
@@ -485,6 +554,42 @@
485 554
             </div>
486 555
           </li>
487 556
           
557
+          <li class="dib">
558
+            <span class="icon iconfont icon-xunjian"></span>
559
+            <div class="name">
560
+              巡检
561
+            </div>
562
+            <div class="code-name">.icon-xunjian
563
+            </div>
564
+          </li>
565
+          
566
+          <li class="dib">
567
+            <span class="icon iconfont icon-xunjian1"></span>
568
+            <div class="name">
569
+              巡检2
570
+            </div>
571
+            <div class="code-name">.icon-xunjian1
572
+            </div>
573
+          </li>
574
+          
575
+          <li class="dib">
576
+            <span class="icon iconfont icon-xunjian2"></span>
577
+            <div class="name">
578
+              巡检
579
+            </div>
580
+            <div class="code-name">.icon-xunjian2
581
+            </div>
582
+          </li>
583
+          
584
+          <li class="dib">
585
+            <span class="icon iconfont icon-yinyong"></span>
586
+            <div class="name">
587
+              引用
588
+            </div>
589
+            <div class="code-name">.icon-yinyong
590
+            </div>
591
+          </li>
592
+          
488 593
         </ul>
489 594
         <div class="article markdown">
490 595
         <h2 id="font-class-">font-class 引用</h2>
@@ -516,6 +621,22 @@
516 621
           
517 622
             <li class="dib">
518 623
                 <svg class="icon svg-icon" aria-hidden="true">
624
+                  <use xlink:href="#icon-zhengchang"></use>
625
+                </svg>
626
+                <div class="name">正常</div>
627
+                <div class="code-name">#icon-zhengchang</div>
628
+            </li>
629
+          
630
+            <li class="dib">
631
+                <svg class="icon svg-icon" aria-hidden="true">
632
+                  <use xlink:href="#icon-yiyuqi"></use>
633
+                </svg>
634
+                <div class="name">已逾期</div>
635
+                <div class="code-name">#icon-yiyuqi</div>
636
+            </li>
637
+          
638
+            <li class="dib">
639
+                <svg class="icon svg-icon" aria-hidden="true">
519 640
                   <use xlink:href="#icon-cuowu"></use>
520 641
                 </svg>
521 642
                 <div class="name">错误</div>
@@ -564,6 +685,14 @@
564 685
           
565 686
             <li class="dib">
566 687
                 <svg class="icon svg-icon" aria-hidden="true">
688
+                  <use xlink:href="#icon-jijiang"></use>
689
+                </svg>
690
+                <div class="name">即将</div>
691
+                <div class="code-name">#icon-jijiang</div>
692
+            </li>
693
+          
694
+            <li class="dib">
695
+                <svg class="icon svg-icon" aria-hidden="true">
567 696
                   <use xlink:href="#icon-moren"></use>
568 697
                 </svg>
569 698
                 <div class="name">默认</div>
@@ -730,6 +859,38 @@
730 859
                 <div class="code-name">#icon-yijiejue</div>
731 860
             </li>
732 861
           
862
+            <li class="dib">
863
+                <svg class="icon svg-icon" aria-hidden="true">
864
+                  <use xlink:href="#icon-xunjian"></use>
865
+                </svg>
866
+                <div class="name">巡检</div>
867
+                <div class="code-name">#icon-xunjian</div>
868
+            </li>
869
+          
870
+            <li class="dib">
871
+                <svg class="icon svg-icon" aria-hidden="true">
872
+                  <use xlink:href="#icon-xunjian1"></use>
873
+                </svg>
874
+                <div class="name">巡检2</div>
875
+                <div class="code-name">#icon-xunjian1</div>
876
+            </li>
877
+          
878
+            <li class="dib">
879
+                <svg class="icon svg-icon" aria-hidden="true">
880
+                  <use xlink:href="#icon-xunjian2"></use>
881
+                </svg>
882
+                <div class="name">巡检</div>
883
+                <div class="code-name">#icon-xunjian2</div>
884
+            </li>
885
+          
886
+            <li class="dib">
887
+                <svg class="icon svg-icon" aria-hidden="true">
888
+                  <use xlink:href="#icon-yinyong"></use>
889
+                </svg>
890
+                <div class="name">引用</div>
891
+                <div class="code-name">#icon-yinyong</div>
892
+            </li>
893
+          
733 894
           </ul>
734 895
           <div class="article markdown">
735 896
           <h2 id="symbol-">Symbol 引用</h2>

Файловите разлики са ограничени, защото са твърде много
+ 34 - 6
static/css/iconfont.css


BIN
static/css/iconfont.eot


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
static/css/iconfont.js


Файловите разлики са ограничени, защото са твърде много
+ 21 - 0
static/css/iconfont.svg


BIN
static/css/iconfont.ttf


BIN
static/css/iconfont.woff


BIN
static/css/iconfont.woff2


BIN
static/images/NSH-PW.png


BIN
static/images/NSH-USER.png


BIN
static/images/africa-17344_640.jpg


BIN
static/images/avatar-1-big.jpg


BIN
static/images/avatar-1-small.jpg


BIN
static/images/avatar-1-xl.jpg


BIN
static/images/avatar-1.jpg


BIN
static/images/avatar-10.jpg


BIN
static/images/avatar-2-small.jpg


BIN
static/images/avatar-2.jpg


BIN
static/images/avatar-3-small.jpg


BIN
static/images/avatar-3.jpg


BIN
static/images/avatar-4-small.jpg


BIN
static/images/avatar-4.jpg


BIN
static/images/avatar-5-small.jpg


BIN
static/images/avatar-5.jpg


BIN
static/images/avatar-6.jpg


BIN
static/images/avatar-7.jpg


BIN
static/images/avatar-8.jpg


BIN
static/images/avatar-9.jpg


BIN
static/images/bg_01.png


BIN
static/images/city.jpg


BIN
static/images/drop-color.png


BIN
static/images/fj.gif


BIN
static/images/form-title.png


BIN
static/images/genganzhonghe.png


BIN
static/images/gengban.png


BIN
static/images/gengbanputong.png


BIN
static/images/headimage.png


BIN
static/images/huake-32x32.png


BIN
static/images/lion-403764_640.jpg


BIN
static/images/lion-565818_640.jpg


BIN
static/images/lion-565820_640.jpg


BIN
static/images/login2.png


BIN
static/images/logo2.png


BIN
static/images/m10.png


BIN
static/images/m11.png


BIN
static/images/m21.png


BIN
static/images/m22.png


BIN
static/images/m3.png


BIN
static/images/m7.png


BIN
static/images/page-title-prefix.png


BIN
static/images/photodune-4043508-3d-modern-office-room-l.jpg


BIN
static/images/pig.jpg


BIN
static/images/water/texture-bg.png


+ 0 - 0
static/images/water/texture-fg.png


Някои файлове не бяха показани, защото твърде много файлове са промени