Selaa lähdekoodia

项目初始化

seimin 3 vuotta sitten
vanhempi
commit
afd175c006
100 muutettua tiedostoa jossa 8122 lisäystä ja 12089 poistoa
  1. 20 1
      README.md
  2. 0 4
      build/webpack.base.conf.js
  3. 2 7
      build/webpack.prod.conf.js
  4. 17 17
      config/index.js
  5. 1 1
      config/prod.env.js
  6. 1 1
      index.html
  7. 2932 4607
      package-lock.json
  8. 2 7
      package.json
  9. 19 141
      src/App.vue
  10. 1 1
      src/common/stylus/reset.styl
  11. 0 45
      src/components/category-cascade-picker.vue
  12. 1 1
      src/components/form/form.vue
  13. 0 45
      src/components/place-cascade-picker.vue
  14. 0 46
      src/components/requester-cascade-picker.vue
  15. 42 0
      src/http/index.js
  16. 4 59
      src/main.js
  17. 0 75
      src/request/api.js
  18. 0 3
      src/request/host.js
  19. 0 4
      src/request/http.js
  20. 80 94
      src/router/index.js
  21. 121 0
      src/service/http.js
  22. 0 27
      src/store/store.js
  23. 0 6
      src/store/types.js
  24. 0 1
      src/views/App.vue
  25. 165 28
      src/views/Login.vue
  26. 8 8
      src/views/Main.vue
  27. 101 0
      src/views/commonProblem.vue
  28. 383 0
      src/views/evaluate.vue
  29. 55 327
      src/views/guide.vue
  30. 0 92
      src/views/guideDetail.vue
  31. 0 470
      src/views/incidentDetail.vue
  32. 661 0
      src/views/incidentDetails.vue
  33. 364 418
      src/views/incidentList.vue
  34. 432 330
      src/views/indes.vue
  35. 231 0
      src/views/knowDetails.vue
  36. 394 0
      src/views/knowList.vue
  37. 1 2
      src/views/loading.vue
  38. 74 0
      src/views/maintenance.vue
  39. 443 0
      src/views/my.vue
  40. 116 0
      src/views/myModify.vue
  41. 0 1308
      src/views/newIncident.vue
  42. 87 0
      src/views/noticeDetails.vue
  43. 367 0
      src/views/noticeList.vue
  44. 0 631
      src/views/recordList.vue
  45. 670 0
      src/views/repair.vue
  46. 0 492
      src/views/wxChartDetail.vue
  47. 0 543
      src/views/wxChartList.vue
  48. 250 1722
      static/css/demo_index.html
  49. 54 310
      static/css/iconfont.css
  50. BIN
      static/css/iconfont.eot
  51. 1 1
      static/css/iconfont.js
  52. 22 214
      static/css/iconfont.svg
  53. BIN
      static/css/iconfont.ttf
  54. BIN
      static/css/iconfont.woff
  55. BIN
      static/css/iconfont.woff2
  56. BIN
      static/images/NSH-PW.png
  57. BIN
      static/images/NSH-USER.png
  58. BIN
      static/images/africa-17344_640.jpg
  59. BIN
      static/images/avatar-1-big.jpg
  60. BIN
      static/images/avatar-1-small.jpg
  61. BIN
      static/images/avatar-1-xl.jpg
  62. BIN
      static/images/avatar-1.jpg
  63. BIN
      static/images/avatar-10.jpg
  64. BIN
      static/images/avatar-2-small.jpg
  65. BIN
      static/images/avatar-2.jpg
  66. BIN
      static/images/avatar-3-small.jpg
  67. BIN
      static/images/avatar-3.jpg
  68. BIN
      static/images/avatar-4-small.jpg
  69. BIN
      static/images/avatar-4.jpg
  70. BIN
      static/images/avatar-5-small.jpg
  71. BIN
      static/images/avatar-5.jpg
  72. BIN
      static/images/avatar-6.jpg
  73. BIN
      static/images/avatar-7.jpg
  74. BIN
      static/images/avatar-8.jpg
  75. BIN
      static/images/avatar-9.jpg
  76. BIN
      static/images/bg-top.png
  77. BIN
      static/images/bg_01.png
  78. BIN
      static/images/city.jpg
  79. BIN
      static/images/drop-color.png
  80. BIN
      static/images/fj.gif
  81. BIN
      static/images/form-title.png
  82. BIN
      static/images/genganzhonghe.png
  83. BIN
      static/images/gengban.png
  84. BIN
      static/images/gengbanputong.png
  85. BIN
      static/images/headimage.png
  86. BIN
      static/images/huake-32x32.png
  87. BIN
      static/images/lion-403764_640.jpg
  88. BIN
      static/images/lion-565818_640.jpg
  89. BIN
      static/images/lion-565820_640.jpg
  90. BIN
      static/images/login2.png
  91. BIN
      static/images/logo2.png
  92. BIN
      static/images/m10.png
  93. BIN
      static/images/m11.png
  94. BIN
      static/images/m21.png
  95. BIN
      static/images/m22.png
  96. BIN
      static/images/m3.png
  97. BIN
      static/images/m7.png
  98. BIN
      static/images/page-title-prefix.png
  99. BIN
      static/images/photodune-4043508-3d-modern-office-room-l.jpg
  100. 0 0
      static/images/pig.jpg

+ 20 - 1
README.md

@@ -1,2 +1,21 @@
1
-# ITSM3-service-wechat
1
+# jry
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).

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

@@ -64,10 +64,6 @@ 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"
71 67
       }
72 68
     ]
73 69
   },

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

@@ -35,10 +35,7 @@ const webpackConfig = merge(baseWebpackConfig, {
35 35
     new UglifyJsPlugin({
36 36
       uglifyOptions: {
37 37
         compress: {
38
-          warnings: false,
39
-            // 以下两行配置,关闭 debug 和 console
40
-          drop_debugger: true,
41
-          drop_console: true
38
+          warnings: false
42 39
         }
43 40
       },
44 41
       sourceMap: config.build.productionSourceMap,
@@ -127,9 +124,7 @@ if (config.build.productionGzip) {
127 124
 
128 125
   webpackConfig.plugins.push(
129 126
     new CompressionWebpackPlugin({
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
-     
127
+      asset: '[path].gz[query]',
133 128
       algorithm: 'gzip',
134 129
       test: new RegExp(
135 130
         '\\.(' +

+ 17 - 17
config/index.js

@@ -2,9 +2,8 @@
2 2
 // Template version: 1.3.1
3 3
 // see http://vuejs-templates.github.io/webpack for documentation.
4 4
 
5
-
6 5
 const path = require('path')
7
-const host=require('../src/request/host')
6
+
8 7
 module.exports = {
9 8
   dev: {
10 9
     // 新加的一行
@@ -13,22 +12,23 @@ module.exports = {
13 12
     assetsSubDirectory: 'static',
14 13
     assetsPublicPath: '/',
15 14
     proxyTable: {
16
-      '/service': { //自定义名字,代表的是以下target中的内容
17
-        target: host.host+'/service/', //微信
18
-        // target: 'http://weixintest.ngser.dashitech.com/service/',//微信
19
-
20
-        // target: 'http://192.168.3.100:8080/service/',//微信
21
-        // target: 'http://localhost/service/',//微信
22
-        changeOrigin: true, //是否允许跨域
23
-        pathRewrite: {
24
-          '^/service': ''
25
-        }
26
-      }
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
+      // }
27 26
     },
28 27
 
29 28
     // Various Dev Server settings
30 29
     host: 'localhost', // can be overwritten by process.env.HOST
31
-    // host: '192.168.3.170', // 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
32 32
     // host: '192.168.31.32', // can be overwritten by process.env.HOST
33 33
     // host: '192.168.31.32', // can be overwritten by process.env.HOST
34 34
     // host: '0.0.0.0', // can be overwritten by process.env.HOST
@@ -39,7 +39,7 @@ module.exports = {
39 39
     // notifyOnErrors: true,
40 40
     // poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
41 41
 
42
-
42
+    
43 43
     /**
44 44
      * Source Maps
45 45
      */
@@ -70,7 +70,7 @@ module.exports = {
70 70
      * Source Maps
71 71
      */
72 72
 
73
-    productionSourceMap: false, // 把该项的配置修改为 false,关闭 source map
73
+    productionSourceMap: true,
74 74
     // https://webpack.js.org/configuration/devtool/#production
75 75
     devtool: '#source-map',
76 76
 
@@ -78,7 +78,7 @@ module.exports = {
78 78
     // Surge or Netlify already gzip all static assets for you.
79 79
     // Before setting to `true`, make sure to:
80 80
     // npm install --save-dev compression-webpack-plugin
81
-    productionGzip: true, // 开启 gzip 功能, 开启 GZIP 压缩,进一步压缩 js 和 css 文件的体积
81
+    productionGzip: false,
82 82
     productionGzipExtensions: ['js', 'css'],
83 83
 
84 84
     // Run the build command with an extra argument to

+ 1 - 1
config/prod.env.js

@@ -1,4 +1,4 @@
1 1
 'use strict'
2 2
 module.exports = {
3
-  NODE_ENV: '"production"',
3
+  NODE_ENV: '"production"'
4 4
 }

+ 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;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2932 - 4607
package-lock.json


+ 2 - 7
package.json

@@ -12,20 +12,16 @@
12 12
   "dependencies": {
13 13
     "axios": "^0.18.0",
14 14
     "cube-ui": "^1.12.10",
15
-    "less": "^3.9.0",
16
-    "less-loader": "^4.1.0",
17 15
     "lib-flexible": "^0.3.2",
18 16
     "vue": "^2.5.2",
19 17
     "vue-axios": "^2.1.4",
20
-    "vue-router": "^3.0.1",
21
-    "vuex": "^3.1.1"
18
+    "vue-router": "^3.0.1"
22 19
   },
23 20
   "compileDependencies": [
24 21
     "cube-ui"
25 22
   ],
26 23
   "devDependencies": {
27 24
     "autoprefixer": "^7.1.2",
28
-    "babel-cli": "^6.26.0",
29 25
     "babel-core": "^6.22.1",
30 26
     "babel-helper-vue-jsx-merge-props": "^2.0.3",
31 27
     "babel-loader": "^7.1.1",
@@ -33,10 +29,9 @@
33 29
     "babel-plugin-transform-modules": "^0.0.2",
34 30
     "babel-plugin-transform-runtime": "^6.22.0",
35 31
     "babel-plugin-transform-vue-jsx": "^3.5.0",
36
-    "babel-preset-env": "^1.7.0",
32
+    "babel-preset-env": "^1.3.2",
37 33
     "babel-preset-stage-2": "^6.22.0",
38 34
     "chalk": "^2.0.1",
39
-    "compression-webpack-plugin": "^1.1.12",
40 35
     "copy-webpack-plugin": "^4.0.1",
41 36
     "css-loader": "^0.28.0",
42 37
     "extract-text-webpack-plugin": "^3.0.0",

+ 19 - 141
src/App.vue

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

+ 1 - 1
src/common/stylus/reset.styl

@@ -44,7 +44,7 @@ table
44 44
 /* custom */
45 45
 
46 46
 a
47
-  color: #999
47
+  color: #7e8c8d
48 48
   text-decoration: none
49 49
 
50 50
 li

+ 0 - 45
src/components/category-cascade-picker.vue

@@ -1,45 +0,0 @@
1
-<template>
2
-  <cube-cascade-picker ref="casPicker" :data="data" :selectedIndex="selectedIndex" @select="select"></cube-cascade-picker>
3
-</template>
4
-
5
-<script>
6
-const COMPONENT_NAME = "category-picker";
7
-const EVENT_SELECT = "select";
8
-const EVENT_CANCEL = "cancel";
9
-
10
-export default {
11
-  name: COMPONENT_NAME,
12
-  props: {
13
-    data: {
14
-      type: Array,
15
-      default() {
16
-        return [];
17
-      }
18
-    },
19
-    selectedIndex: {
20
-      type: Array,
21
-      default() {
22
-        return [0, 0, 0];
23
-      }
24
-    }
25
-  },
26
-  data() {
27
-    return {};
28
-  },
29
-  computed: {},
30
-  methods: {
31
-    show() {
32
-      this.$refs.casPicker.show();
33
-    },
34
-    hide() {
35
-      this.$refs.cascadePicker.hide();
36
-    },
37
-    select(selectedVal, selectedIndex, selectedText) {
38
-      this.$emit(EVENT_SELECT, selectedVal, selectedIndex, selectedText);
39
-    },
40
-    cancel() {
41
-      this.$emit(EVENT_CANCEL);
42
-    }
43
-  }
44
-};
45
-</script>

+ 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: 95px
345
+      width: 100px
346 346
       padding-right: 10px
347 347
     .cube-checkbox-group, .cube-radio-group
348 348
       &::before, &::after

+ 0 - 45
src/components/place-cascade-picker.vue

@@ -1,45 +0,0 @@
1
-<template>
2
-  <cube-cascade-picker ref="placePicker" :data="data" :selectedIndex="selectedIndex" @select="select"></cube-cascade-picker>
3
-</template>
4
-
5
-<script>
6
-const COMPONENT_NAME = "place-picker";
7
-const EVENT_SELECT = "select";
8
-const EVENT_CANCEL = "cancel";
9
-
10
-export default {
11
-  name: COMPONENT_NAME,
12
-  props: {
13
-    data: {
14
-      type: Array,
15
-      default() {
16
-        return [];
17
-      }
18
-    },
19
-    selectedIndex: {
20
-      type: Array,
21
-      default() {
22
-        return [0, 0];
23
-      }
24
-    }
25
-  },
26
-  data() {
27
-    return {};
28
-  },
29
-  computed: {},
30
-  methods: {
31
-    show() {
32
-      this.$refs.placePicker.show();
33
-    },
34
-    hide() {
35
-      this.$refs.placePicker.hide();
36
-    },
37
-    select(selectedVal, selectedIndex, selectedText) {
38
-      this.$emit(EVENT_SELECT, selectedVal, selectedIndex, selectedText);
39
-    },
40
-    cancel() {
41
-      this.$emit(EVENT_CANCEL);
42
-    }
43
-  }
44
-};
45
-</script>

+ 0 - 46
src/components/requester-cascade-picker.vue

@@ -1,46 +0,0 @@
1
-<template>
2
-  <cube-cascade-picker ref="requesterPicker" :data="data" :selectedIndex="selectedIndex" @select="select" 
3
-    @cancel="cancel"></cube-cascade-picker>
4
-</template>
5
-
6
-<script>
7
-const COMPONENT_NAME = "requester-picker";
8
-const EVENT_SELECT = "select";
9
-const EVENT_CANCEL = "cancel";
10
-
11
-export default {
12
-  name: COMPONENT_NAME,
13
-  props: {
14
-    data: {
15
-      type: Array,
16
-      default() {
17
-        return [];
18
-      }
19
-    },
20
-    selectedIndex: {
21
-      type: Array,
22
-      default() {
23
-        return [0, 0, 0];
24
-      }
25
-    }
26
-  },
27
-  data() {
28
-    return {};
29
-  },
30
-  computed: {},
31
-  methods: {
32
-    show() {
33
-      this.$refs.requesterPicker.show();
34
-    },
35
-    hide() {
36
-      this.$refs.requesterPicker.hide();
37
-    },
38
-    select(selectedVal, selectedIndex, selectedText) {
39
-      this.$emit(EVENT_SELECT, selectedVal, selectedIndex, selectedText);
40
-    },
41
-    cancel() {
42
-      this.$emit(EVENT_CANCEL);
43
-    }
44
-  }
45
-};
46
-</script>

+ 42 - 0
src/http/index.js

@@ -0,0 +1,42 @@
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
+}

+ 4 - 59
src/main.js

@@ -3,73 +3,18 @@
3 3
 import Vue from 'vue'
4 4
 import App from './App'
5 5
 import router from './router'
6
-import axios from 'axios'
7 6
 import Cube from './index'
8
-import Store from './store/store'
9
-import http from '../src/request/http'
10 7
 import 'lib-flexible'
8
+// import {get,post} from './service/http'
9
+import './http'
11 10
 Vue.use(Cube)
12
-// 设置默认请求接口(删掉地址栏中的后缀)
13
-// axios.defaults.baseURL = http.host;
14
-// axios.defaults.timeout = 5000;
15
-axios.defaults.headers['Content-Type'] = 'application/json;charset=UTF-8';
16 11
 
17
-
18
-Vue.prototype.$http = axios
19 12
 Vue.config.productionTip = false
20
-// http request拦截器 添加一个请求拦截器
21
-axios.interceptors.request.use(function (config) {
22
-  document.cookie = "JSESSIONID=A835F24A945D3E045DEE5FA5C3AD40AB";
23
-  let token = window.localStorage.getItem("token")
24
-  if (token) {
25
-    config.headers['access-token'] = token; //将token放到请求头发送给服务器
26
-  }
27
-  return config;
28
-}, function (error) {
29
-  return Promise.reject(error);
30
-});
31
-
32 13
 
33
-let count=0;
34
-// http response 拦截器
35
-axios.interceptors.response.use(
36
-  response => {
37
-    if(response.data.state==433&&count<1){
38
-      count++;
39
-      alert(response.data.error+',请重新登录!')
40
-      router.push({ path: "/login" });
41
-      window.location.reload();
42
-    }
43
-    return response
44
-  },
45
-  // error => {
46
-  //   if (error.response) {
47
-  //       alert(error.response.status)
48
-  //     switch (error.response.status) {
49
-  //       case 401:
50
-  //         // 401 清除token信息并跳转到登录页面
51
-  //         // 只有在当前路由不是登录页面才跳转
52
-  //         // router.currentRoute.path !== 'login' &&
53
-  //           // router.replace({
54
-  //           //   path: '/login',
55
-  //           //   // query: {
56
-  //           //   //   redirect: router.currentRoute.path
57
-  //           //   // },
58
-  //           // })
59
-  //           router.push({ path: "/login" });
60
-  //     }
61
-  //   }
62
-  //   // console.log(JSON.stringify(error));//console : Error: Request failed with status code 402
63
-  //   return Promise.reject(response.data.error)
64
-  // },
65
-)
66 14
 /* eslint-disable no-new */
67 15
 new Vue({
68 16
   el: '#app',
69 17
   router,
70
-  components: {
71
-    App
72
-  },
73
-  template: '<App/>',
74
-  store:Store
18
+  components: { App },
19
+  template: '<App/>'
75 20
 })

+ 0 - 75
src/request/api.js

@@ -1,75 +0,0 @@
1
-import axios from 'axios';
2
-import Host from './host'
3
-
4
-// 域名
5
-export const host = Host.host
6
-
7
-// 登录
8
-export const login = () => {
9
-  return axios.post('/service/api/login', {
10
-    username: "dsadmin",
11
-    password: "1"
12
-  });
13
-}
14
-
15
-// fetchDataList接口-bpm
16
-export const bpmFetchDataList = (name, params) => {
17
-  return axios.post('/service/api/bpm/data/fetchDataList/' + name, params);
18
-}
19
-// fetchDataList接口-user
20
-export const userFetchDataList = (name, params) => {
21
-  return axios.post('/service/api/user/data/fetchDataList/' + name, params);
22
-}
23
-// getDictionary接口
24
-export const getDictionary = (type, key) => {
25
-  return axios.post('/service/api/common/common/getDictionary', {
26
-    type,
27
-    key
28
-  });
29
-}
30
-
31
-// 获取事件
32
-export const getIncident = params => {
33
-  return axios.post('/service/api/bpm/bpm/fetchTask/bpm_incident', params);
34
-}
35
-
36
-// 获取事件详情
37
-export const getIncidentDetail = (processInstanceId) => {
38
-  return axios.get('/service/api/config/form/renderForm/incident_back/' + processInstanceId + '/00000');
39
-}
40
-// 获取事件详情处理进度
41
-export const getIncidentProgressInfo = (processInstanceId) => {
42
-  return axios.post('/service/api/bpm/bpm/flowTracing/' + processInstanceId, {});
43
-}
44
-// 播放事件描述录音
45
-export const getIncidentDesAudio = (callID) => {
46
-  return axios.get('/recording/recording?callID=' + callID, {});
47
-}
48
-// 获取事件详情图片
49
-export const getIncidentImgs = (processInstanceId, params) => {
50
-  return axios.post('/service/api/bpm/bpm/getAttachmentList/' + processInstanceId, params);
51
-}
52
-
53
-// 留言列表点击无效
54
-export const recordChangeValid = params => {
55
-  return axios.post('/service/api/bpm/data/updData/hjzxRecord', params);
56
-}
57
-
58
-// 微信/WEB报障提交不受理原因
59
-export const submitWebRemark = (id,params) => {
60
-  return axios.post('/service/api/apply/bpm/wxIncidentReject/'+id, params);
61
-}
62
-
63
-// 新建事件:
64
-// 获取微信/web报障图片
65
-export const getIncidentWebImgs = (failureId) => {
66
-  return axios.get('/service/api/common/common/listAttachment/webRequesterIncident/' + failureId, {});
67
-}
68
-// 获取事件单号
69
-export const getSjNum = () => {
70
-  return axios.get('/service/api/bpm/bpm/restful/sj', {});
71
-}
72
-// 事件提交
73
-export const submitIncident = params => {
74
-  return axios.post('/service/api/bpm/bpm/start/bpm_incident', params);
75
-}

+ 0 - 3
src/request/host.js

@@ -1,3 +0,0 @@
1
-module.exports={
2
-    host:"http://itservice.hust.edu.cn"
3
-}

+ 0 - 4
src/request/http.js

@@ -1,4 +0,0 @@
1
-import * as api from './api'
2
-
3
-export default api
4
-

+ 80 - 94
src/router/index.js

@@ -2,19 +2,25 @@ import Vue from 'vue'
2 2
 import Router from 'vue-router'
3 3
 import Login from './../views/Login.vue'
4 4
 import Main from './../views/Main.vue'
5
-import Indes from './../views/indes.vue' //首页
6
-import WxChartList from './../views/wxChartList.vue' //微信/WEB报障
7
-import IncidentList from './../views/incidentList.vue' //事件列表
8
-import RecordList from './../views/RecordList.vue' //留言列表
9
-import NewIncident from './../views/newIncident.vue' //新建事件
10
-import Guide from './../views/guide.vue' //公告公示
11
-import GuideDetail from './../views/guideDetail.vue' //公告详情
12
-import IncidentDetail from './../views/incidentDetail.vue' //事件详情
13
-import WxChartDetail from './../views/wxChartDetail.vue' //微信/WEB报障详情
5
+import Indes from './../views/indes.vue'//首页
6
+import Repair from './../views/repair.vue'//我的报修
7
+import My from './../views/my.vue'//设置
8
+import IncidentList from './../views/incidentList.vue'//事件列表
9
+import MyModify from './../views/myModify.vue'//个人信息修改
10
+import NoticeDetails from './../views/noticeDetails.vue'//公告详情
11
+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 19
 Vue.use(Router)
15 20
 
16
-const router= new Router({
17
-  routes: [{
21
+export default new Router({
22
+  routes: [
23
+    {
18 24
       path: '/login',
19 25
       component: Login,
20 26
       name: '',
@@ -25,113 +31,93 @@ const router= new Router({
25 31
       component: Main,
26 32
       name: '',
27 33
       hidden: true,
28
-      children: [{
29
-          path: '/',
30
-          redirect: '/main/indes'
31
-        },
34
+      children: [
35
+        { path: '/', redirect: '/main/indes' },
32 36
         {
33 37
           path: '/main/indes',
34 38
           component: Indes,
35
-          meta: {
36
-            allowBack: false
37
-          },
38
-        },
39
-        {
40
-          path: '/main/wxChartList',
41
-          name: 'WxChartList',
42
-          component: WxChartList,
43
-          meta: {
44
-            allowBack: false
45
-          },
46
-          children: []
39
+          meta: { allowBack: false },
47 40
         },
48 41
         {
49 42
           path: '/main/incidentList',
50
-          name: 'IncidentList',
43
+          name:'IncidentList',
51 44
           component: IncidentList,
52
-          meta: {
53
-            allowBack: false
54
-          },
55
-          children: []
45
+          meta: { allowBack: false },
56 46
         },
57 47
         {
58
-          path: '/main/recordList',
59
-          name: 'RecordList',
60
-          component: RecordList,
61
-          meta: {
62
-            allowBack: false
63
-          },
64
-          children: []
48
+          path: '/main/my',
49
+          component: My,
50
+          meta: { allowBack: false },
65 51
         },
66 52
       ]
67 53
     },
68 54
     {
69
-      path: '/incidentDetail',
70
-      name: 'IncidentDetail',
71
-      component: IncidentDetail,
72
-      meta: {
73
-        allowBack: false
74
-      },
75
-    },{
76
-      path: '/wxChartDetail',
77
-      name: 'WxChartDetail',
78
-      component: WxChartDetail,
79
-      meta: {
80
-        allowBack: false
81
-      },
55
+      path: '/repair',
56
+      component: Repair,
57
+      meta: { allowBack: false },
58
+    },
59
+    {
60
+      path: '/myModify/:data',
61
+      name:'MyModify',
62
+      component: MyModify,
63
+      meta: { allowBack: false },
64
+    },
65
+    {
66
+      path: '/noticeDetails/:data',
67
+      name:'NoticeDetails',
68
+      component: NoticeDetails,
69
+      meta: { allowBack: false },
70
+    },
71
+    {
72
+      path: '/noticeList',
73
+      component: NoticeList,
74
+      meta: { allowBack: false },
75
+    },
76
+    {
77
+      path: '/knowList',
78
+      name:'KnowList',
79
+      component: KnowList,
80
+      meta: { allowBack: false },
82 81
     },
83 82
     {
84
-      path: '/newIncident',
85
-      name: 'NewIncident',
86
-      component: NewIncident,
87
-      meta: {
88
-        allowBack: false
89
-      },
83
+      path: '/knowDetails/:data',
84
+      name:'KnowDetails',
85
+      component: KnowDetails,
86
+      meta: { allowBack: false },
90 87
     },
91 88
     {
92 89
       path: '/guide',
93 90
       component: Guide,
94
-      meta: {
95
-        allowBack: false
96
-      },
91
+      meta: { allowBack: false },
92
+    },
93
+    {
94
+      path: '/incidentDetails/:data',
95
+      name:'IncidentDetails',
96
+      component: IncidentDetails,
97
+      meta: { allowBack: false },
97 98
     },
98 99
     {
99
-      path: '/guideDetail',
100
-      name: 'GuideDetail',
101
-      component: GuideDetail,
102
-      meta: {
103
-        allowBack: false
104
-      },
100
+      path: '/commonProblem/:data',
101
+      name:'CommonProblem',
102
+      component: CommonProblem,
103
+      meta: { allowBack: false },
104
+    },
105
+    {
106
+      path: '/evaluate/:data',
107
+      component: Evaluate,
108
+      name:'Evaluate',
109
+      meta: { allowBack: false },
110
+    },
111
+    {
112
+      path: '/maintenance',
113
+      name:'Maintenance',
114
+      component: Maintenance,
115
+      meta: { allowBack: false },
105 116
     },
106
-    // {
107
-    //   path: '/',
108
-    //   redirect: '/login'
109
-    // },
110 117
     {
111 118
       path: '*',
112 119
       hidden: true,
113
-      redirect: {
114
-        path: '/login'
115
-      }
120
+      redirect: { path: '/login' }
116 121
     }
117 122
   ]
118
-});
119
-
120
-
121
-
122
-// 导航守卫
123
-// 使用 router.beforeEach 注册一个全局前置守卫,判断用户是否登陆
124
-router.beforeEach((to, from, next) => {
125
-  if (to.path === '/login') {
126
-    next();
127
-  } else {
128
-    let token = localStorage.getItem('token');
129
-    if (token === 'null' || token === '') {
130
-      next('/login');
131
-    } else {
132
-      next();
133
-    }
134
-  }
135
-});
136
- 
137
-export default router;
123
+})

+ 121 - 0
src/service/http.js

@@ -0,0 +1,121 @@
1
+import axios from 'axios'; // 引入axios
2
+import QS from 'qs'; // 引入qs模块,用来序列化post类型的数据,后面会提到
3
+// vant的toast提示框组件,大家可根据自己的ui组件更改。
4
+
5
+axios.defaults.timeout = 5000;
6
+axios.defaults.baseURL ='http://localhost:8080/service/';
7
+
8
+
9
+//http request 拦截器
10
+axios.interceptors.request.use(
11
+  config => {
12
+    // const token = getCookie('名称');注意使用的时候需要引入cookie方法,推荐js-cookie
13
+    config.data = JSON.stringify(config.data);
14
+    config.headers = {
15
+      'Content-Type': 'application/json;charset=UTF-8',
16
+      'access-token':'123456',
17
+      'Accept-Language':'zh-CN,zh;q=0.9'
18
+    }
19
+    // if(token){
20
+    //   config.params = {'token':token}
21
+    // }
22
+    return config;
23
+  },
24
+  error => {
25
+    return Promise.reject(err);
26
+  }
27
+);
28
+
29
+
30
+//http response 拦截器
31
+axios.interceptors.response.use(
32
+  response => {
33
+    if(response.data.errCode ==2){
34
+      router.push({
35
+        path:"/login",
36
+        querry:{redirect:router.currentRoute.fullPath}//从哪个页面跳转
37
+      })
38
+    }
39
+    return response;
40
+  },
41
+  error => {
42
+    return Promise.reject(error)
43
+  }
44
+)
45
+
46
+
47
+/**
48
+ * 封装get方法
49
+ * @param url
50
+ * @param data
51
+ * @returns {Promise}
52
+ */
53
+
54
+export function fetch(url,params={}){
55
+  return new Promise((resolve,reject) => {
56
+    axios.get(url,{
57
+      params:params
58
+    })
59
+    .then(response => {
60
+      resolve(response.data);
61
+    })
62
+    .catch(err => {
63
+      reject(err)
64
+    })
65
+  })
66
+}
67
+
68
+
69
+/**
70
+ * 封装post请求
71
+ * @param url
72
+ * @param data
73
+ * @returns {Promise}
74
+ */
75
+
76
+ export function post(url,data = {}){
77
+   return new Promise((resolve,reject) => {
78
+     axios.post(url,data)
79
+          .then(response => {
80
+            resolve(response.data);
81
+          },err => {
82
+            reject(err)
83
+          })
84
+   })
85
+ }
86
+
87
+ /**
88
+ * 封装patch请求
89
+ * @param url
90
+ * @param data
91
+ * @returns {Promise}
92
+ */
93
+
94
+export function patch(url,data = {}){
95
+  return new Promise((resolve,reject) => {
96
+    axios.patch(url,data)
97
+         .then(response => {
98
+           resolve(response.data);
99
+         },err => {
100
+           reject(err)
101
+         })
102
+  })
103
+}
104
+
105
+ /**
106
+ * 封装put请求
107
+ * @param url
108
+ * @param data
109
+ * @returns {Promise}
110
+ */
111
+
112
+export function put(url,data = {}){
113
+  return new Promise((resolve,reject) => {
114
+    axios.put(url,data)
115
+         .then(response => {
116
+           resolve(response.data);
117
+         },err => {
118
+           reject(err)
119
+         })
120
+  })
121
+}

+ 0 - 27
src/store/store.js

@@ -1,27 +0,0 @@
1
-import Vue from 'vue';
2
-import Vuex from 'vuex';
3
-import * as types from './types'
4
-Vue.use(Vuex);
5
- 
6
-const store = new Vuex.Store({
7
- 
8
-  state: {
9
-    // 存储token
10
-    token: localStorage.getItem('token') ? localStorage.getItem('token') : '',
11
-
12
-    // token: null,
13
-  },
14
-  mutations: {
15
-    // 修改token,并将token存入localStorage
16
-    setToken (state,token) {
17
-        state.token =token;
18
-        localStorage.setItem("token",token.token);     //存储token
19
-    }, 
20
-    // [types.LOGIN]: (state, data) => {
21
-    //     localStorage.token = data;
22
-    //     state.token = data;
23
-    // },
24
-  }
25
-});
26
- 
27
-export default store;

+ 0 - 6
src/store/types.js

@@ -1,6 +0,0 @@
1
-/**
2
- * Created by superman on 17/2/16.
3
- * vuex types
4
- */
5
-
6
-export const LOGIN = 'login';

+ 0 - 1
src/views/App.vue

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

+ 165 - 28
src/views/Login.vue

@@ -1,51 +1,192 @@
1 1
 <template>
2 2
   <div class="fle bgColor">
3
-    <load-ing></load-ing>
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>
4 26
   </div>
5 27
 </template>
6 28
 
7 29
 <script>
8
-// 注意事项:个人微信需要关注微工作台,否则会导致没有userId(userId为openID)登录失败
9
-
10 30
 import LoadIng from "./../views/loading.vue";
11
-import http from "../request/http";
12 31
 export default {
13 32
   data() {
14 33
     return {
15
-      token: ""
34
+      zhanghao: "",
35
+      mima: "",
36
+      requesterLgoinType: "",
16 37
     };
17 38
   },
18 39
   components: {
19
-    LoadIng
40
+    LoadIng,
20 41
   },
21 42
   methods: {
22
-    // 登录
43
+    // 登
23 44
     login() {
24 45
       var that = this;
25
-      http
26
-        .login()
27
-        .then(function(res) {
28
-          that.loading = false;
29
-          if (res.data && res.data.state == 201) {
30
-            localStorage.setItem("token", res.headers["access-token"]);
46
+      that.$http.post("service/auth/reqwechatlogin", {}).then((res) => {
47
+        if (res.data.url) {
48
+          window.location.href = res.data.url;
49
+        } else {
50
+          if (res.data.user) {
31 51
             localStorage.setItem(
32 52
               "loginUser",
33
-              JSON.stringify(res.data.data.user)
53
+              JSON.stringify(res.data.user.requester)
54
+            );
55
+            this.loginNext();
56
+          }
57
+        }
58
+      });
59
+    },
60
+    // 获取code
61
+    getCode() {
62
+      var that = this;
63
+      var url = window.location.href.split("?");
64
+      if (!url[1]) {
65
+        that.login();
66
+      } else {
67
+        var code = {
68
+          code: url[1],
69
+          name: "微信报修",
70
+        };
71
+        that.$http.post("service/auth/reqwechatlogin2", code).then((res) => {
72
+          if (res.data.state == 200) {
73
+            if (res.data.user) {
74
+              localStorage.setItem(
75
+                "loginUser",
76
+                JSON.stringify(res.data.user.requester)
77
+              );
78
+              this.loginNext();
79
+            }
80
+          } else if (res.data.state == 501) {
81
+            that
82
+              .$createDialog({
83
+                type: "alert",
84
+                title: "您的账号被删除,请联系管理员",
85
+                icon: "cubeic-alert",
86
+              })
87
+              .show();
88
+          } else {
89
+            that
90
+              .$createDialog({
91
+                type: "alert",
92
+                title: res.data.remarks,
93
+                icon: "cubeic-alert",
94
+              })
95
+              .show();
96
+          }
97
+        });
98
+      }
99
+    },
100
+    loginNext() {
101
+      // seimin
102
+      // 获取报修主体
103
+      this.$http
104
+        .post("service/sysinfo/data/fetchDataList/systemConfiguration", {
105
+          idx: 0,
106
+          sum: 1000,
107
+          systemConfiguration: { keyconfig: "repairMain" },
108
+        })
109
+        .then((result) => {
110
+          if (result.data.status == 200) {
111
+            var repairMain = result.data.list[0];
112
+            window.localStorage.setItem(
113
+              "repairMain",
114
+              JSON.stringify(repairMain)
34 115
             );
35
-            // that.setToken({token: res.headers['access-token']});
36
-            // that.$store.commit(types.LOGIN, this.token)
37
-            that.$router.push({ path: "/main" });
116
+            // 获取是否自动建单
117
+            this.$http
118
+              .post("service/sysinfo/data/fetchDataList/systemConfiguration", {
119
+                idx: 0,
120
+                sum: 1000,
121
+                systemConfiguration: { keyconfig: "ifCreate" },
122
+              })
123
+              .then((result) => {
124
+                if (result.data.status == 200) {
125
+                  var ifCreate = result.data.list[0];
126
+                  window.localStorage.setItem(
127
+                    "ifCreate",
128
+                    JSON.stringify(ifCreate)
129
+                  );
130
+                  this.$router.push({ path: "/main" });
131
+                }
132
+              });
133
+          }
134
+        });
135
+      // seimin
136
+    },
137
+    // 获取报修人登录方式
138
+    getLoginType() {
139
+      this.$http.post("service/wechat/getLoginType", {}).then((result) => {
140
+        if (result.data.status == 200) {
141
+          this.requesterLgoinType = result.data.data;
142
+          window.localStorage.setItem(
143
+            "requesterLgoinType",
144
+            this.requesterLgoinType
145
+          );
146
+          if (this.requesterLgoinType == "wechat") {
147
+            this.getCode();
148
+          } else if (this.requesterLgoinType == "web") {
149
+            // this.$router.push({ path: "/login" });
38 150
           }
151
+        }
152
+      });
153
+    },
154
+    // 账号密码登录
155
+    zlogin() {
156
+      console.log(this);
157
+      var that = this;
158
+      this.$http
159
+        .post("service/auth/reqlogin", {
160
+          username: this.zhanghao,
161
+          password: this.mima,
39 162
         })
40
-        .catch(error => {
41
-          // alert('账号或密码错误');
42
-          console.log(error);
163
+        .then((res) => {
164
+          that.loading = false;
165
+          if (res.data && res.data.state == 200) {
166
+            var loginUserStr = JSON.stringify(res.data.data.requester);
167
+            localStorage.setItem("loginUser", loginUserStr);
168
+            localStorage.setItem(
169
+              "loginConfig",
170
+              JSON.stringify({ username: this.zhanghao, password: this.mima })
171
+            );
172
+            this.loginNext();
173
+          } else {
174
+            that
175
+              .$createDialog({
176
+                type: "alert",
177
+                title: "系统错误",
178
+                content: "请稍后再试",
179
+                icon: "cubeic-wrong",
180
+                color: "red",
181
+              })
182
+              .show();
183
+          }
43 184
         });
44
-    }
185
+    },
45 186
   },
46 187
   created() {
47
-    this.login();
48
-  }
188
+    this.getLoginType();
189
+  },
49 190
 };
50 191
 </script>
51 192
 
@@ -60,7 +201,7 @@ export default {
60 201
   justify-content: center;
61 202
   align-items: center;
62 203
   flex-direction: column;
63
-  /* background: url(./../../static/images/weChartBackImage.jpg); */
204
+  background: url(./../../static/images/weChartBackImage.jpg);
64 205
   background-size: cover;
65 206
 }
66 207
 /* .bgColor{
@@ -92,7 +233,3 @@ input:focus {
92 233
   border-radius: 10px;
93 234
 }
94 235
 </style>
95
-
96
-
97
-
98
-

+ 8 - 8
src/views/Main.vue

@@ -5,16 +5,16 @@
5 5
         </transition>
6 6
         <div class="section2">
7 7
             <router-link to="/main/indes" class="link" active-class="active">
8
-                <i class="iconfont dsit-ziyuan-zhuye"></i>
8
+                <i class="iconfont icon-shouyexian"></i>
9 9
                 <span>首页</span>
10 10
             </router-link>
11
-             <router-link to="/NewIncident" class="link" active-class="active">
12
-                <i class="iconfont dsit-ziyuan-baoxiu"></i>
13
-                <span>新建事件</span>
14
-            </router-link>
15 11
             <router-link to="/main/incidentList" class="link" active-class="active">
16
-                <i class="iconfont dsit-shijianliebiao_ruisong1"></i>
17
-                <span>事件列表</span>
12
+                <i class="iconfont icon-baoxiuxian"></i>
13
+                <span>我的报修</span>
14
+            </router-link>
15
+            <router-link to="/main/my" class="link" active-class="active">
16
+                <i class="iconfont icon-wodexian"></i>
17
+                <span>设置</span>
18 18
             </router-link>
19 19
         </div>
20 20
     </div>
@@ -80,4 +80,4 @@ export default {
80 80
 .fade-leave-active{
81 81
     opacity: 0;
82 82
 }
83
-</style>
83
+</style>

+ 101 - 0
src/views/commonProblem.vue

@@ -0,0 +1,101 @@
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>

+ 383 - 0
src/views/evaluate.vue

@@ -0,0 +1,383 @@
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>

+ 55 - 327
src/views/guide.vue

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

+ 0 - 92
src/views/guideDetail.vue

@@ -1,92 +0,0 @@
1
-<template>
2
-  <div>
3
-    <!-- <div class="header">公告详情</div> -->
4
-    <div class="title">
5
-      <div class="tit">{{data.title}}</div>
6
-      <div class="info">
7
-        <span class="fl">{{data.placeDTO.place}}</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
-    }
29
-  },
30
-  created() {
31
-    this.getData();
32
-  },
33
-  mounted() {}
34
-};
35
-</script>
36
-<style scoped lang='less'>
37
-// .header {
38
-//   width: 100%;
39
-//   height: 0.88rem;
40
-//   line-height: 0.88rem;
41
-//   text-align: center;
42
-//   color: #fff;
43
-//   font-size: 0.37rem;
44
-//   background: linear-gradient(#2e2f32, #414246);
45
-//   position: fixed;
46
-//   top: 0;
47
-//   z-index: 6;
48
-// }
49
-
50
-.title {
51
-  padding: 0 0.24rem;
52
-  //   height: 0.88rem;
53
-  font-size: 0.36rem;
54
-  // margin-top: .88rem;
55
-  .tit{
56
-    text-align: center;
57
-  }
58
-  div {
59
-    width: 100%;
60
-    line-height: 0.88rem;
61
-    &.info {
62
-      overflow: hidden;
63
-      line-height: 0.45rem;
64
-      border-bottom: 0.01rem rgb(223, 222, 222) solid;
65
-      span {
66
-        color: #999;
67
-        font-size: 0.24rem;
68
-      }
69
-    }
70
-  }
71
-}
72
-
73
-.content {
74
-  color: #333;
75
-  font-size: 0.32rem;
76
-  padding: 0.32rem;
77
-  line-height: 0.45rem;
78
-  text-indent: 0.7rem;
79
-  margin-bottom: 0.32rem;
80
-  overflow: hidden;
81
-  .table{
82
-    width: 100% !important;
83
-  }
84
-}
85
-.txtRight {
86
-  color: #333;
87
-  font-size: 0.32rem;
88
-  text-align: right;
89
-  padding-right: 0.32rem;
90
-  line-height: 0.45rem;
91
-}
92
-</style>

+ 0 - 470
src/views/incidentDetail.vue

@@ -1,470 +0,0 @@
1
-<template>
2
-  <div class="incidentDetail">
3
-    <div class="conentBox">
4
-      <div class="conent">
5
-        <!-- <div class="header">处理方案</div> -->
6
-        <div v-if="model.incident">
7
-          <div class="label headtop" id="info">报修信息</div>
8
-          <div class="info">
9
-              <p>
10
-                <span>事件单号:</span> 
11
-                <span>{{model.incident.incidentsign}}</span>
12
-                <span :class="{ 'fr':true,'btn':true, 'chulizhong':model.incident.state.code=='handler', 'yijiejue':model.incident.state.code=='resolved',  'daipingjia':model.incident.state.code=='close', 'chongxinzhipai':model.incident.state.code=='reassign','daishenhe':model.incident.state.code=='examine', 'daijiedan':(model.incident.state.code=='pending'&&!model.incident.candidateGroups), 'daiqiangdan':(model.incident.state.code=='pending'&&model.incident.candidateGroups)}"
13
-                >{{model.incident.state.code=='pending'?(!model.incident.candidateGroups?'待接单':'待抢单'):model.incident.state.name}}</span>
14
-              </p>
15
-            <p>
16
-              <span>报修人:</span>
17
-              <span>{{model.incident.contacts}}</span>
18
-            </p>
19
-            <p>
20
-              <span>人员编号:</span>
21
-              <span>{{model.incident.requester.account}}</span>
22
-            </p>
23
-            <p class="relative">
24
-              <span>报修电话:</span>
25
-              <span>{{model.incident.contactsInformation}}</span>
26
-              <a class="tel" :href="'tel:'+model.incident.contactsInformation"><i class="iconfont dsit-shouji"></i></a>
27
-            </p>
28
-            <p>
29
-              <span>区域地点:</span>
30
-              <span>{{model.incident.area?model.incident.area.area:''}} {{model.incident.place?model.incident.place.place:''}} {{model.incident.houseNumber||''}}</span>
31
-            </p>
32
-            <p>
33
-              <span>事件主题:</span>
34
-              <span>{{model.incident.title}}</span>
35
-            </p>
36
-            <p>
37
-              <span>事件分类:</span>
38
-              <span>{{model.incident.category.category}}</span>
39
-            </p>
40
-            <p class="desc relative">
41
-              <span>事件描述:</span>
42
-              <span class="grayFont" v-html="model.incident.description"></span>
43
-              <a class="audio tel" href="javascript:;" v-if="model.incident.callID" @click="showAudio(model.incident.callID)">
44
-                <i class="iconfont dsit-luyin"></i>
45
-              </a>
46
-            </p>
47
-            <div class="imgs-container" v-if="imgs.length">
48
-              <div class="imgs-cont">
49
-                <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">
50
-                <p v-else>
51
-                  <a :href='[img.previewUrl]'>{{img.name}}</a>
52
-                </p>
53
-              </div>
54
-            </div>
55
-
56
-            <p v-if="model.incident.handleResult">
57
-              <span>处理结果:</span>
58
-              <span>{{model.incident.handleResult}}</span>
59
-            </p>
60
-            <p v-if="model.incident.handleDescription">
61
-              <span>处理方案:</span>
62
-              <span>{{model.incident.handleDescription}}</span>
63
-            </p>
64
-            <p v-if="model.incident.closecode">
65
-              <span>结果类型:</span>
66
-              <span>{{model.incident.closecode.reason}}</span>
67
-            </p>
68
-            <p v-if="model.isupreason">
69
-              <span>升级原因:</span>
70
-              <span>{{model.isupreason}}</span>
71
-            </p>
72
-            <p v-if="model.resignComment">
73
-              <span>退回原因:</span>
74
-              <span>{{model.resignComment}}</span>
75
-            </p>
76
-
77
-            <div class="label" id="progress">处理进度</div>
78
-            <div class="progress">
79
-              <div class="progress_info" v-for="item in progressInfo">
80
-                <div class="progress_info_L">{{item.activityName}}</div>
81
-                <div class="progress_info_R">
82
-                  <div class="time">
83
-                    <i
84
-                      :class="{'iconfont':true, 'dsit-icon_liucheng':item.endTime!='','dsit-icon_zhengzaijinx':item.endTime=='' }"
85
-                    ></i>
86
-                    <span class="text1">{{item.startTime}}</span>
87
-                  </div>
88
-                  <div :class="{'cont':true,'blue':item.endTime!='' }">
89
-                    <p class="text2" v-if="item.activityName">【{{item.user?item.user.name:''}}】{{item.activityName}}</p>
90
-                  </div>
91
-                </div>
92
-              </div>
93
-            </div>
94
-          </div>
95
-        </div>
96
-        <load-ing v-if="!model.incident"></load-ing>
97
-        <div class="mask" v-if="audioMask" @click="hideAudio()">
98
-          <audio controls autoplay="autoplay" id="bgMusic">
99
-            <source :src="audioSrc" type="audio/mpeg">
100
-          </audio>
101
-        </div>
102
-      </div>
103
-    </div>
104
-  </div>
105
-</template>
106
-<script>
107
-import LoadIng from "./../views/loading.vue";
108
-import http from '../request/http';
109
-export default {
110
-  data() {
111
-    return {
112
-      loginUser: JSON.parse(localStorage.getItem("loginUser")),
113
-      selected: 1,
114
-      id: "",
115
-      formKey:'',
116
-      options: [
117
-        {
118
-          label: "接单",
119
-          value: 1
120
-        },
121
-        {
122
-          label: "重新指派",
123
-          value: 2
124
-        }
125
-      ],
126
-      promptingConent: "",
127
-      promptingStatus: "",
128
-      resignComment: "", //重新指派原因
129
-      item_hides: false,
130
-      actives: "info",
131
-      processInstanceId: "",
132
-      progressInfo: [], //处理进度
133
-      imgs: [], //图片
134
-      model: {}, //提交数据
135
-      audioSrc:'',//音频路径
136
-      audioMask:false,
137
-    };
138
-  },
139
-  components: {
140
-    LoadIng
141
-  },
142
-  methods: {
143
-    // 放录音
144
-    showAudio(){
145
-      var that=this;
146
-      if(that.model.incident.callID){
147
-        http.getIncidentDesAudio(that.model.incident.callID)
148
-        .then(function(res){
149
-          that.audioMask=true;
150
-          that.audioSrc=http.host+'/vox'+res.data.rrpath.substring(18,res.data.rrpath.length);
151
-        })
152
-      }
153
-    },
154
-    hideAudio(){
155
-      this.audioMask=false;
156
-    },
157
-    //   获取事件数据
158
-    getParamsData() {
159
-      var that = this;
160
-      http.getIncidentDetail(that.processInstanceId)
161
-        .then(function(res) {
162
-          console.log(res.data);
163
-          that.model = res.data.model;
164
-        });
165
-    },
166
-    // 获取图片
167
-    getImgs() {
168
-      var that = this;
169
-      http.getIncidentImgs(that.processInstanceId, {idx:0,sum:3})
170
-        .then(function(res) {
171
-          that.imgs =res.data;
172
-        });
173
-    },
174
-    // 获取处理进度
175
-    getProgressInfo() {
176
-      var that = this;
177
-        http.getIncidentProgressInfo(that.processInstanceId)
178
-        .then(function(res) {
179
-          that.progressInfo = res.data.data;
180
-          that.progressInfo.reverse();
181
-        });
182
-    },
183
-  },
184
-  created() {
185
-    this.processInstanceId = this.$route.params.data.processInstanceId;
186
-    this.id = this.$route.params.data.id;
187
-    // this.formKey=this.$route.params.data.formKey?this.$route.params.data.formKey:'incident_back';
188
-    this.getParamsData();
189
-    this.getProgressInfo();
190
-    this.getImgs();
191
-  }
192
-};
193
-</script>
194
-<style lang="less" scoped>
195
-.mask{
196
-  width: 100%;
197
-  height: 100%;
198
-  position: fixed;
199
-  top: 0;
200
-  background: rgba(0,0,0,.5);
201
-  z-index: 999;
202
-  display: flex;
203
-  align-items: center;
204
-  justify-content: center;
205
-}
206
-i.iconfont.blue {
207
-  color: #005395;
208
-  // &::after {
209
-  //   content: "";
210
-  //   width: 0.01rem;
211
-  //   height: 0.4rem;
212
-  //   background: #005395;
213
-  //   position: relative;
214
-  //   display: block;
215
-  //   left: 0.14rem;
216
-  // }
217
-}
218
-.incidentDetail {
219
-  // padding-top: .88rem;
220
-  box-sizing: border-box;
221
-  // .header {
222
-  //   width: 100%;
223
-  //   height: 0.88rem;
224
-  //   line-height: 0.88rem;
225
-  //   text-align: center;
226
-  //   color: #fff;
227
-  //   font-size: 0.37rem;
228
-  //   background: linear-gradient(#2e2f32, #414246);
229
-  //   position: fixed;
230
-  //   top: 0;
231
-  //   z-index: 6;
232
-  // }
233
-  .navBar {
234
-    width: 100%;
235
-    height: 0.96rem;
236
-    line-height: 0.96rem;
237
-    background-color: #fafafa;
238
-    font-size: 0.28rem;
239
-    position: fixed;
240
-    top: 0.88rem;
241
-
242
-    div {
243
-      width: 33.33%;
244
-      text-align: center;
245
-      &.p50 {
246
-        width: 49.99%;
247
-      }
248
-      a {
249
-        display: inline-block;
250
-        height: 0.9rem;
251
-        width: 1.7rem;
252
-        padding: 0 0.1rem;
253
-        &.active {
254
-          color: #005395;
255
-          border-bottom: 0.06rem solid #005395;
256
-        }
257
-      }
258
-    }
259
-  }
260
-
261
-  .label {
262
-    background-color: #eeeeee;
263
-    height: 0.6rem;
264
-    line-height: 0.58rem;
265
-    padding-left: 0.2rem;
266
-    font-size: 0.28rem;
267
-    color: #666666;
268
-    span {
269
-      font-size: 0.2rem;
270
-      display: inline-block;
271
-      margin-left: 0.08rem;
272
-      color: #999999;
273
-    }
274
-    &.formLabel {
275
-      background-color: #fff;
276
-    }
277
-  }
278
-  .conentBox {
279
-    width: 100%;
280
-    .conent {
281
-      font-size: 0.32rem;
282
-      font-weight: 400;
283
-      line-height: 0.45rem;
284
-      // border-bottom: 0.16rem solid #e5e5e5;
285
-
286
-      .shows {
287
-        display: none;
288
-      }
289
-      .boeder_B {
290
-        border-bottom: 0.01rem solid #ccc;
291
-      }
292
-      p {
293
-        &.desc {
294
-          overflow: hidden;
295
-        }
296
-        .grayFont {
297
-          width: 75%;
298
-          text-align: right;
299
-          overflow-x: scroll;
300
-        }
301
-      }
302
-      .bottom {
303
-        overflow: hidden;
304
-        line-height: 0.86rem;
305
-        border-bottom: 0.01rem solid #e6e6e6;
306
-        font-size: 0.24rem;
307
-        color: #999;
308
-        padding: 0 0.24rem 0 0.48rem;
309
-      }
310
-      .info {
311
-        color: #999;
312
-        font-size: 0.32rem;
313
-        overflow: hidden;
314
-        .head {
315
-          color: #333;
316
-          border-bottom: 0.01rem solid #e6e6e6;
317
-          >p {
318
-            padding: 0.24rem 0.3rem;
319
-            i {
320
-              color: #00559d;
321
-            }
322
-          }
323
-        }
324
-        >p {
325
-          line-height: 0.86rem;
326
-          padding: 0rem 0.24rem;
327
-          overflow: hidden;
328
-          border-bottom: 0.01rem solid #e6e6e6;
329
-          &.relative{
330
-            position: relative;
331
-            padding-right: 1rem;
332
-          }
333
-          .overflowEllipsis2 {
334
-            margin-left: 1.96rem;
335
-          }
336
-          span:nth-child(1){
337
-            display: inline-block;
338
-            width: 1.6rem;
339
-            color: #333;
340
-          }
341
-
342
-          span:nth-child(2){
343
-            color: #666;
344
-            
345
-          }
346
-          span:nth-child(3){
347
-            margin: .23rem 0;
348
-          }
349
-          .tel{
350
-            position: absolute;
351
-            right: .35rem;
352
-            top: 0;
353
-            .iconfont{
354
-              font-size: .44rem;
355
-              color: #005395;
356
-            }
357
-          }
358
-          
359
-        }
360
-        .info_hide {
361
-          padding: 0.2rem 0.24rem;
362
-          border-bottom: 0.01rem solid #e6e6e6;
363
-          .hide {
364
-            color: #00559d;
365
-          }
366
-        }
367
-        .imgs-container {
368
-          a {
369
-            color: #03c !important;
370
-            &:visited {
371
-              color: #551a8b !important;
372
-            }
373
-          }
374
-          img {
375
-            width: 1.5rem;
376
-            height: 1.5rem;
377
-            margin-right: 0.7rem;
378
-            &:nth-child(1) {
379
-              margin-left: 0.75rem;
380
-            }
381
-          }
382
-        }
383
-        .progress {
384
-          padding: 0.2rem 0.2rem;
385
-          overflow: hidden;
386
-          margin-bottom: 0.7rem;
387
-          .progress_info {
388
-            overflow: hidden;
389
-            margin-bottom: 0.1rem;
390
-            &:nth-last-child(1) {
391
-              .cont {
392
-                border: none !important;
393
-              }
394
-            }
395
-            .progress_info_L {
396
-              float: left;
397
-              color: #333;
398
-              max-width: 20%;
399
-            }
400
-            .progress_info_R {
401
-              float: right;
402
-              margin-left: 0.09rem;
403
-              width: 75%;
404
-              font-size: 0.25rem;
405
-              .time {
406
-                i {
407
-                  margin-left: -0.15rem;
408
-                  &.dsit-icon_liucheng {
409
-                    color: #005495;
410
-                  }
411
-                  &.dsit-icon_zhengzaijinx {
412
-                    color: #48a843;
413
-                    font-size: 0.37rem;
414
-                  }
415
-                }
416
-                span {
417
-                  margin-left: 0.15rem;
418
-                }
419
-              }
420
-              .cont {
421
-                border-left: 1px solid #999;
422
-                padding-left: 0.4rem;
423
-                min-height: 0.4rem;
424
-                &.blue {
425
-                  border-left: 1px solid #005395;
426
-                }
427
-              }
428
-
429
-              .text1 {
430
-                font-size: 0.15rem;
431
-              }
432
-              .text2 {
433
-                color: #666;
434
-              }
435
-              p {
436
-                padding: 0;
437
-              }
438
-            }
439
-          }
440
-        }
441
-      }
442
-      .txtLabel {
443
-        width: 100%;
444
-        overflow: hidden;
445
-        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
446
-        .txt {
447
-          width: 30%;
448
-          color: #666;
449
-        }
450
-        .cube-textarea-wrapper {
451
-          width: 62%;
452
-        }
453
-      }
454
-      .sub {
455
-        background: #ececec;
456
-        .cube-btn {
457
-          background-color: #005395 !important;
458
-          width: 90%;
459
-          margin: 0.2rem auto;
460
-          border-radius: 8px;
461
-        }
462
-      }
463
-    }
464
-  }
465
-  .showwrap {
466
-    width: 75%;
467
-    text-align: right;
468
-  }
469
-}
470
-</style>

+ 661 - 0
src/views/incidentDetails.vue

@@ -0,0 +1,661 @@
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>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 364 - 418
src/views/incidentList.vue


+ 432 - 330
src/views/indes.vue

@@ -1,358 +1,460 @@
1 1
 <template>
2
-  <div class="fle bgColor">
3
-    <!-- 头部导航栏 -->
4
-    <div class="tav">
5
-      <router-link to="/main/wxChartList">
6
-        <i class="iconfont dsit-wodebaoxiu"></i>
7
-        <span>微信/web报障</span>
8
-      </router-link>
9
-      <router-link to="/main/recordList">
10
-        <i class="iconfont dsit-dianhualiuyan"></i>
11
-        <span>留言列表</span>
12
-      </router-link>
13
-      <a href="https://m.hust.edu.cn/elecFee/help/help.html">
14
-        <i class="iconfont dsit-changjianwenti2"></i>
15
-        <span>常见问题</span>
16
-      </a>
17
-    </div>
18
-    <div class="bigBody">
19
-      <!-- 最新报修 -->
20
-      <div class="newRepair">
21
-        <div class="titHead">
22
-          <span class="tit">
23
-            <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
24
-            <span>微信/WEB待办报障</span>
25
-          </span>
26
-          <span class="link" @click="toRecordList()">
27
-            更多
28
-            <i class="iconfont dsit-xiangyou"></i>
29
-          </span>
30
-        </div>
31
-        <div
32
-          class="conentBox"
33
-          v-for="item in dataList"
34
-          @click="toIncidentDetails(item)"
35
-          v-if="!!dataList.length"
36
-        >
37
-          <div class="conent">
38
-            <div class="center">
39
-              <div>
40
-                <span class="fl">{{item.requester.name}}</span>
41
-                <span class="fr">{{item.createTime}}</span>
42
-              </div>
43
-              <p class="desc">
44
-                <span class="grayFont overflowEllipsis2" v-html="item.incidentDescription"></span>
45
-              </p>
2
+    <div class="fle bgColor">
3
+        <!-- 头部导航栏 -->
4
+        <div class="tav">
5
+            <div @click="toRapir()">
6
+                <i class="iconfont icon-xinjian"></i>
7
+                <span>快速报修</span>
8
+            </div>
9
+            <div @click="toKnowList()">
10
+                <i class="iconfont icon-message"></i>
11
+                <span>常见问题</span>
12
+            </div>
13
+            <div @click="toGuide()">
14
+                <i class="iconfont icon-fuwuzhinan"></i>
15
+                <span>服务指南</span>
46 16
             </div>
47
-          </div>
48
-        </div>
49
-        <!-- 无数据 -->
50
-        <div class="wushuju" v-if="!dataList.length&&!newRapirLoading">
51
-          <div>
52
-            <img src="./../../static/images/quesheng.png" alt />
53
-            <p>暂无待办报障</p>
54
-          </div>
55
-        </div>
56
-        <!-- loading -->
57
-        <div class="loading" v-if="newRapirLoading">
58
-          <cube-loading :size="30"></cube-loading>
59
-        </div>
60
-      </div>
61
-      <!-- 最新公告 -->
62
-      <div class="newNotice">
63
-        <div class="titHead">
64
-          <span class="tit">
65
-            <i class="iconfont icon-message newNoticeico"></i>
66
-            <span>最新公告</span>
67
-          </span>
68
-          <span class="link" @click="toGuide()">
69
-            更多
70
-            <i class="iconfont dsit-xiangyou"></i>
71
-          </span>
72
-        </div>
73
-        <div class="conentBox" v-if="!newNoticeNoData&&!newNoticeLoading">
74
-          <div class="conent" v-for="v in noticeData" @click="toGuideDetail(v)">
75
-            <div class="head overflowEllipsis2">{{v.title}}</div>
76
-            <div class="cot">{{v.createTime}}</div>
77
-            <!-- <div class="cot">{{v.createTime.substring(0,v.createTime.length-5)}}</div> -->
78
-          </div>
79
-        </div>
80
-        <!-- 无数据 -->
81
-        <div class="wushuju" v-if="newNoticeNoData">
82
-          <div>
83
-            <img src="./../../static/images/quesheng.png" alt />
84
-            <p>暂无公告</p>
85
-          </div>
86 17
         </div>
87
-        <!-- loading -->
88
-        <div class="loading" v-if="newNoticeLoading">
89
-          <cube-loading :size="30"></cube-loading>
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>
90 107
         </div>
91
-      </div>
92 108
     </div>
93
-  </div>
94 109
 </template>
95 110
 <script>
96
-import { formatDate } from "./../components/js/date.js";
97
-import http from "../request/http";
98
-
111
+import {formatDate} from './../components/js/date.js';
99 112
 export default {
100
-  data() {
101
-    return {
102
-      loginUser: JSON.parse(localStorage.getItem("loginUser")),
103
-      noticeData: "", //公告列表
104
-      dataList: "", //最新报修
105
-      state: "", //流程状态
106
-      newRapirNoData: false, //最新报修无数据
107
-      newNoticeNoData: false,
108
-      newRapirLoading: true, //最新报修loading
109
-      newNoticeLoading: true, //最新公告loading
110
-      candidateGroups: ""
111
-    };
112
-  },
113
-  methods: {
114
-    // 获取公告列表数据
115
-    getNoticData() {
116
-      // alert('公告列表')
117
-      var that = this;
118
-      http.bpmFetchDataList('notice',{
119
-          idx: 0,
120
-          sum: 4
121
-        })
122
-        .then(function(res) {
123
-          // alert(JSON.stringify(res.data))
124
-          that.newNoticeLoading = false;
125
-          if (res.data.list&&res.data.list.length > 0) {
126
-            that.newNoticeNoData = false;
127
-            that.noticeData = res.data.list;
128
-          } else {
129
-            that.newNoticeNoData = true;
130
-          }
131
-        });
132
-    },
133
-    // 获取最新报修
134
-    getNewRapir() {
135
-      var that = this;
136
-      http.bpmFetchDataList('wxincident',{
137
-          wxincident: { state: "未转换" },
138
-          idx: 0,
139
-          sum: 2
140
-        })
141
-        .then(function(res) {
142
-          that.newRapirLoading = false;
143
-          if (res.data.list.length > 0) {
144
-            that.newRapirNoData = false;
145
-            that.dataList = res.data.list;
146
-          } else {
147
-            that.newRapirNoData = true;
148
-          }
149
-        });
150
-    },
151
-    toRecordList() {
152
-      this.$router.push({
153
-        name: "WxChartList"
154
-      });
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
+        }
155 124
     },
156
-    // toKnowList() {
157
-    //   this.$router.push({ path: "/knowList" });
158
-    // },
159
-    toGuide() {
160
-      this.$router.push({ path: "/guide" });
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
+        },
161 224
     },
162
-    toGuideDetail(v) {
163
-      this.$router.push({ name: "GuideDetail", params: { data: v } });
225
+    created(){
226
+        this.getNoticData(),
227
+        this.getNewRapir()
164 228
     },
165
-    // 微信/WEB报障详情
166
-    toIncidentDetails(data) {
167
-      this.$router.push({
168
-        name: "WxChartDetail",
169
-        params: {
170
-          data: data
171
-        }
172
-      });
229
+    mounted(){
173 230
     }
174
-  },
175
-  created() {
176
-    var that = this;
177
-    that.loginUser.group.forEach(element => {
178
-      that.candidateGroups += element.id + ",";
179
-    });
180
-    that.candidateGroups = that.candidateGroups.substring(
181
-      0,
182
-      that.candidateGroups.length - 1
183
-    );
184
-    // localStorage.removeItem("category");
185
-    // localStorage.removeItem("model");
186
-    // localStorage.removeItem("modelData");
187
-    // localStorage.removeItem("place");
188
-    // localStorage.removeItem("referenceInfo");
189
-    // localStorage.removeItem("solution");
190
-    // localStorage.removeItem("order");
191
-    this.getNoticData();
192
-    this.getNewRapir();
193
-  },
194
-  mounted() {}
195
-};
231
+}
196 232
 </script>
197
-<style scoped lang="less">
198
-.fl {
199
-  float: left;
233
+<style scoped>
234
+.bgColor{
235
+    background-color: white
200 236
 }
201
-.fr {
202
-  float: right;
237
+.fle{
238
+    display: flex;
239
+    flex-direction:column;
240
+    background-color: white
203 241
 }
204
-.bgColor {
205
-  background-color: white;
242
+.bigBody{
243
+    display: flex;
244
+    flex-direction:column;
245
+    height: 100%;
246
+    width: 100%
206 247
 }
207
-.fle {
208
-  display: flex;
209
-  flex-direction: column;
210
-  background-color: white;
248
+/* 头部导航栏 */
249
+.tav{
250
+    height: 2rem;
251
+    background: linear-gradient(#005395, #226CA8,#003057);
252
+    display: flex;
253
+    width: 100%
211 254
 }
212
-.grayFont {
213
-  color: #666;
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
214 262
 }
215
-.bigBody {
216
-  display: flex;
217
-  flex-direction: column;
218
-  height: 100%;
219
-  width: 100%;
263
+.tav div i{
264
+    font-size: .6rem;
265
+    color: white
220 266
 }
221
-/* 头部导航栏 */
222
-.tav {
223
-  background: url(../../static/images/bg-top.png) no-repeat;
224
-  display: flex;
225
-  width: 100%;
226
-  background-size: cover;
227
-}
228
-.tav a {
229
-  height: 2.28rem;
230
-  flex: 1;
231
-  text-align: center;
232
-  display: flex;
233
-  flex-direction: column;
234
-  align-items: center;
235
-  justify-content: center;
236
-}
237
-.tav a i {
238
-  font-size: 0.6rem;
239
-  color: white;
240
-}
241
-.tav a span {
242
-  font-size: 0.32rem;
243
-  color: white;
244
-  display: inline-block;
245
-  margin-top: 0.16rem;
267
+.tav div span{
268
+    font-size: .32rem;
269
+    color: white;
270
+    display: inline-block;
271
+    margin-top: .16rem
246 272
 }
247 273
 /* .bigBody{
248 274
     height: auto;
249 275
 } */
250 276
 /* tit导航 */
251
-.titHead {
252
-  display: flex;
253
-  justify-content: space-between;
254
-  padding: 0 0.24rem;
255
-  height: 0.88rem;
256
-  line-height: 0.88rem;
257
-  border-bottom: 0.01rem rgb(238, 238, 238) solid;
258
-}
259
-.titHead1 {
260
-  height: 0.88rem;
261
-}
262
-.titHead .tit .newPapir {
263
-  font-size: 0.36rem;
264
-  color: #a37200;
265
-}
266
-.titHead .tit .newNoticeico {
267
-  font-size: 0.36rem;
268
-  color: #005395;
269
-}
270
-.titHead .tit span {
271
-  display: inline-block;
272
-  margin-left: 0.08rem;
273
-  font-size: 0.36rem;
274
-}
275
-.titHead .link {
276
-  font-size: 0.24rem;
277
-  color: #999999;
278
-}
279
-.titHead .link i {
280
-  font-size: 0.24rem;
281
-  color: #999999;
282
-  display: inline-block;
283
-  margin-left: 0.08rem;
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 284
 }
285
-
286
-.newRepair {
287
-  border-top: 0.16rem rgb(238, 238, 238) solid;
288
-  .conentBox {
289
-    .conent {
290
-      font-size: 0.28rem;
291
-      font-weight: 400;
292
-      line-height: 0.45rem;
293
-      .center {
294
-        color: #333333;
295
-        border-bottom: 0.01rem solid #e6e6e6;
296
-        padding: 0.24rem 0.48rem;
297
-        div {
298
-          display: inline-block;
299
-          width: 100%;
300
-          .fl {
301
-            font-size: 0.3rem;
302
-          }
303
-          .fr {
304
-            color: #999;
305
-          }
306
-        }
307
-        p {
308
-          &.desc {
309
-            overflow: hidden;
310
-            max-height: 0.88rem;
311
-          }
312
-          .grayFont {
313
-            overflow-x: scroll;
314
-            color: #666;
315
-          }
316
-        }
317
-      }
318
-    }
319
-  }
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;
318
+}
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
320 411
 }
321 412
 /* 最新公告 */
322
-.newNotice {
323
-  border-top: 0.16rem rgb(238, 238, 238) solid;
324
-  .conentBox {
325
-    .conent {
326
-      padding: 0.24rem 0.64rem;
327
-      border-bottom: 0.01rem solid #eee;
328
-      .head {
329
-        font-size: 0.28rem;
330
-        line-height: 0.45rem;
331
-      }
332
-      .cot {
333
-        font-size: 0.24rem;
334
-        color: #999;
335
-        line-height: 0.34rem;
336
-      }
337
-    }
338
-  }
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
339 419
 }
340
-
341
-.wushuju {
342
-  text-align: center;
343
-  color: #999;
344
-  min-height: 5rem;
345
-  display: flex;
346
-  align-items: center;
347
-  justify-content: center;
348
-}
349
-.wushuju img {
350
-  height: 1.68rem;
351
-}
352
-.loading {
353
-  height: 2rem;
354
-  display: flex;
355
-  justify-content: center;
356
-  align-items: center;
357
-}
358
-</style>
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
446
+}
447
+.wushuju{
448
+    text-align: center;
449
+}
450
+.wushuju img{
451
+    width: 5.12rem;
452
+    height: 2.84rem;
453
+}
454
+.loading{
455
+    height: 2rem;
456
+    display: flex;
457
+    justify-content:center;
458
+    align-items:center
459
+}
460
+</style>

+ 231 - 0
src/views/knowDetails.vue

@@ -0,0 +1,231 @@
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>
35
+    </div>
36
+</template>
37
+<script>
38
+export default {
39
+    data(){
40
+        return{
41
+            loginUser:JSON.parse(localStorage.getItem("loginUser")),
42
+            data:"",
43
+            starIf:"",
44
+            files:[]
45
+        }
46
+    },
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
+        },
111
+    },
112
+    created(){
113
+        this.getParamsData();
114
+        this.getStarIf();
115
+        this.getKeyWords();
116
+        this.getFiles()
117
+    },
118
+    mounted(){
119
+    }
120
+}
121
+</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)
230
+}
231
+</style>

+ 394 - 0
src/views/knowList.vue

@@ -0,0 +1,394 @@
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>
50
+                </div>
51
+            </div>
52
+        </div>
53
+        <load-ing v-show="loadShow"></load-ing>
54
+    </div>
55
+</template>
56
+<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'
63
+export default {
64
+    data() {
65
+    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: {
92
+    options() {
93
+        return {
94
+        pullDownRefresh: this.pullDownRefreshObj,
95
+        pullUpLoad: this.pullUpLoadObj,
96
+        scrollbar: true
97
+        }
98
+    },
99
+    pullDownRefreshObj: function() {
100
+        return this.pullDownRefresh ? {
101
+        threshold: parseInt(this.pullDownRefreshThreshold),
102
+        txt: this.pullDownRefreshTxt
103
+        } : false
104
+    },
105
+    pullUpLoadObj: function() {
106
+        return this.pullUpLoad ? {
107
+        threshold: parseInt(this.pullUpLoadThreshold),
108
+        txt: {
109
+            more: this.pullUpLoadMoreTxt,
110
+            noMore: this.pullUpLoadNoMoreTxt
111
+        }
112
+        } : false
113
+    }
114
+    },
115
+    methods: {
116
+    getParams(){
117
+        if(this.$route.params.keword){
118
+            this.search=this.$route.params.keword
119
+        }
120
+    },
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=[]
140
+        }
141
+        that.loadShow=false
142
+    })
143
+    },
144
+    toKnowDetails(data){
145
+        // this.$router.push({path:'/knowDetails'})
146
+        this.$router.push({
147
+            name:'KnowDetails',
148
+            params:{
149
+                data:JSON.stringify(data)
150
+            }
151
+        })
152
+    },
153
+    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
+        })
196
+    },
197
+    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
+        })
217
+    },
218
+    updatePullDownRefresh(val) {
219
+        this.pullDownRefresh = val
220
+    },
221
+    updatePullDownRefreshThreshold(val) {
222
+        this.pullDownRefreshThreshold = val
223
+    },
224
+    updatePullDownRefreshTxt(val) {
225
+        this.pullDownRefreshTxt = val
226
+    },
227
+    updatePullUpLoad(val) {
228
+        this.pullUpLoad = val
229
+    },
230
+    updatePullUpLoadThreshold(val) {
231
+        this.pullUpLoadThreshold = val
232
+    },
233
+    updatePullUpLoadMoreTxt(val) {
234
+        this.pullUpLoadMoreTxt = val
235
+    },
236
+    updatePullUpLoadNoMoreTxt(val) {
237
+        this.pullUpLoadNoMoreTxt = val
238
+    },
239
+    updateCustomPullDown(val) {
240
+        this.customPullDown = val
241
+    },
242
+    rebuildScroll() {
243
+        Vue.nextTick(() => {
244
+        this.$refs.scroll.destroy()
245
+        this.$refs.scroll.initScroll()
246
+        })
247
+    }
248
+    },
249
+    created(){
250
+        this.getParams();
251
+        this.getData(this.idx,this.sum)
252
+    }
253
+}
254
+</script>
255
+    <style lang="stylus" rel="stylesheet/stylus" scoped>
256
+    .scroll-list-wrap
257
+      /* height: 350px */
258
+      height:100vh
259
+      /* border: 1px solid rgba(0, 0, 0, 0.1) */
260
+      border-radius: 5px
261
+      transform: rotate(0deg) // fix 子元素超出边框圆角部分不隐藏的问题
262
+      overflow: hidden
263
+
264
+    .foods-wrapper
265
+      .food-item
266
+        display: flex
267
+        /* min-width: 0 */
268
+        /* padding: 18px
269
+        border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
270
+
271
+        &:last-child
272
+          border-none()
273
+          margin-bottom: 0
274
+
275
+        .food-content
276
+          flex: 1
277
+          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)
294
+              }
295
+          }
296
+        }
297
+        .after-trigger{
298
+          .refresh-text{
299
+            color: grey
300
+          }
301
+        }
302
+     }
303
+    }
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{
316
+    width: 100%;
317
+    height: .56rem;
318
+    border-radius: 4px;
319
+    text-align: center;
320
+    font-size: .28rem
321
+}
322
+.search:focus{
323
+    outline:none
324
+}
325
+.food-item{
326
+  border-top: .16rem rgb(238,238,238) solid;
327
+}
328
+.food-content{
329
+  border-top: .01rem rgb(223, 222, 222) solid;
330
+  border-bottom: .01rem rgb(223, 222, 222) solid;
331
+}
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;
338
+}
339
+.title div:nth-child(1){
340
+    width: 6%;
341
+}
342
+.title div:nth-child(1) i{
343
+    font-size: .32rem;
344
+    color: #005395;
345
+    line-height: .49rem
346
+}
347
+.title div:nth-child(2){
348
+    width: 94%;
349
+    font-size: .32rem;
350
+    overflow: hidden;
351
+    white-space: nowrap;
352
+    text-overflow: ellipsis;
353
+}
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;
366
+}
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
373
+}
374
+.timeBox .time{
375
+    color:#999999;
376
+    font-size: .24rem
377
+}
378
+.timeBox .good i{
379
+    font-size: .3rem;
380
+    color: #A37200
381
+}
382
+.timeBox .good span{
383
+    color: #A37200;
384
+    font-size: .24rem
385
+}
386
+.wushuju{
387
+    margin-top: 2.4rem;
388
+    text-align: center;
389
+}
390
+.wushuju img{
391
+    width: 5.12rem;
392
+    height: 2.84rem;
393
+}
394
+</style>

+ 1 - 2
src/views/loading.vue

@@ -30,8 +30,7 @@ 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;
34
-    z-index: 9;
33
+    align-items:center
35 34
 }
36 35
 </style>
37 36
 <style scoped>

+ 74 - 0
src/views/maintenance.vue

@@ -0,0 +1,74 @@
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>

+ 443 - 0
src/views/my.vue

@@ -0,0 +1,443 @@
1
+<template>
2
+  <div class="bgColor">
3
+    <div class="head">
4
+      <div class="img"></div>
5
+      <div class="name">{{loginUser.name}}</div>
6
+    </div>
7
+    <div class="myMessage">
8
+      <div class="label">个人信息</div>
9
+      <ul>
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
+          <div>工号</div>
20
+          <div>{{loginUser.account}}</div>
21
+        </li>
22
+        <li>
23
+          <div>联系电话</div>
24
+          <div>{{repairMain.valueconfig ==1?loginUser.mphone:loginUser.dept?loginUser.dept.phone:'暂无'}}</div>
25
+        </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>
34
+        </li>
35
+        <li>
36
+          <div>详细地址</div>
37
+          <div class="factionAdd" @click="toModify()">
38
+            <span>{{loginUser.houseNumber||"暂无"}}</span>
39
+            <i class="iconfont icon-moren"></i>
40
+          </div>
41
+        </li>
42
+      </ul>
43
+    </div>
44
+    <div class="myRapir">
45
+      <div class="label">我的报修</div>
46
+      <div class="tit">
47
+        <div>我的报修</div>
48
+        <div @click="toIncidentList( )">{{incidentStateData.resultCount}}条&nbsp;&nbsp;&nbsp;></div>
49
+      </div>
50
+      <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)">
63
+          <div>
64
+            <svg class="icon" aria-hidden="true">
65
+              <use xlink:href="#icon-bushouli" />
66
+            </svg>
67
+          </div>
68
+          <div>
69
+            <span>不受理</span>
70
+            <span>{{incidentStateData.noAcc>99?99:incidentStateData.noAcc}}</span>
71
+          </div>
72
+        </div>
73
+        <div class="status" @click="toIncidentList(1594)">
74
+          <div>
75
+            <svg class="icon" aria-hidden="true">
76
+              <use xlink:href="#icon-chulizhong" />
77
+            </svg>
78
+          </div>
79
+          <div>
80
+            <span>处理中</span>
81
+            <span>{{incidentStateData.processing>99?99:incidentStateData.processing}}</span>
82
+          </div>
83
+        </div>
84
+        <div class="status" @click="toIncidentList(1595)">
85
+          <div>
86
+            <svg class="icon" aria-hidden="true">
87
+              <use xlink:href="#icon-daipingjia" />
88
+            </svg>
89
+          </div>
90
+          <div>
91
+            <span>待评价</span>
92
+            <span>{{incidentStateData.evaluated>99?99:incidentStateData.evaluated}}</span>
93
+          </div>
94
+        </div>
95
+        <div class="status" @click="toIncidentList(1596)">
96
+          <div>
97
+            <svg class="icon" aria-hidden="true">
98
+              <use xlink:href="#icon-yijiejue" />
99
+            </svg>
100
+          </div>
101
+          <div>
102
+            <span>已解决</span>
103
+            <span>{{incidentStateData.solve>99?99:incidentStateData.solve}}</span>
104
+          </div>
105
+        </div>
106
+        <div class="status" @click="toIncidentList(1597)">
107
+          <div>
108
+            <svg class="icon" aria-hidden="true">
109
+              <use xlink:href="#icon-yichehui" />
110
+            </svg>
111
+          </div>
112
+          <div>
113
+            <span>已撤回</span>
114
+            <span>{{incidentStateData.retract>99?99:incidentStateData.retract}}</span>
115
+          </div>
116
+        </div>
117
+      </div>
118
+    </div>
119
+    <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
120
+  </div>
121
+</template>
122
+<script>
123
+import "./../../static/css/iconfont.js";
124
+import PrompTing from "./../views/prompting.vue";
125
+export default {
126
+  data() {
127
+    return {
128
+      repairMain: null,
129
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
130
+      incidentStateData: "",
131
+      treeData: [],
132
+      areaData: "",
133
+      promptingConent: "",
134
+      promptingStatus: ""
135
+    };
136
+  },
137
+  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;
150
+      }
151
+    },
152
+    toIncidentList(res) {
153
+      this.$router.push({
154
+        name: "IncidentList",
155
+        params: {
156
+          state: res
157
+        }
158
+      });
159
+    },
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
+        });
192
+    },
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
+          }
202
+        })
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
+    },
264
+    cancelHandle() {}
265
+  },
266
+  created() {
267
+    this.getUserAreaData();
268
+    this.getAreaData();
269
+    this.getPlaceData();
270
+    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
+  }
286
+};
287
+</script>
288
+<style scoped>
289
+.bgColor {
290
+  background-color: white;
291
+}
292
+.icon {
293
+  width: 1em;
294
+  height: 1em;
295
+  vertical-align: -0.15em;
296
+  fill: currentColor;
297
+  overflow: hidden;
298
+}
299
+.label {
300
+  background-color: rgb(238, 238, 238);
301
+  height: 0.6rem;
302
+  line-height: 0.6rem;
303
+  padding-left: 0.2rem;
304
+  font-size: 0.24rem;
305
+  color: #666666;
306
+  border-top: 0.01rem rgb(223, 222, 222) solid;
307
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
308
+}
309
+/* 头像 */
310
+
311
+.head {
312
+  height: 2.4rem;
313
+  background: linear-gradient(#005395, #226ca8);
314
+  padding-top: 0.3rem;
315
+}
316
+
317
+.head .img {
318
+  width: 1.36rem;
319
+  height: 1.36rem;
320
+  border-radius: 50%;
321
+  margin: 0 auto;
322
+  overflow: hidden;
323
+  background: url(./../../static/images/avatar-1-big.jpg);
324
+  background-size: contain;
325
+}
326
+
327
+.head .name {
328
+  font-size: 0.32rem;
329
+  text-align: center;
330
+  margin-top: 0.2rem;
331
+  color: #ffffff;
332
+}
333
+
334
+/* 个人信息 */
335
+
336
+/* .myMessage { */
337
+/* background-color: rgb(242, 242, 242); */
338
+/* margin-top: .2rem */
339
+/* } */
340
+
341
+.myMessage li {
342
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
343
+  display: flex;
344
+  justify-content: space-between;
345
+  align-items: center;
346
+  /* padding: .2rem .28rem */
347
+  /* height: .88rem; */
348
+  /* line-height: .88rem; */
349
+  line-height: 0.4rem;
350
+  padding: 0.24rem 0.24rem;
351
+}
352
+
353
+.myMessage li div:nth-child(1) {
354
+  width: 35%;
355
+  font-size: 0.32rem;
356
+}
357
+
358
+.myMessage li div:nth-child(2) {
359
+  width: 55%;
360
+  display: flex;
361
+  justify-content: flex-end;
362
+  font-size: 0.32rem;
363
+  /* line-height: .3rem */
364
+}
365
+.factionAdd {
366
+  display: flex;
367
+  justify-content: space-between;
368
+  align-items: center;
369
+}
370
+.factionAdd span {
371
+  display: inline-block;
372
+  width: 90%;
373
+  text-align: right;
374
+}
375
+.factionAdd i {
376
+  display: inline-block;
377
+  font-size: 0.34rem;
378
+  width: 12%;
379
+}
380
+/* 我的报修 */
381
+
382
+/* .myRapir {
383
+    margin-top: .2rem
384
+} */
385
+
386
+.myRapir .tit {
387
+  /* background-color: rgb(242, 242, 242); */
388
+  height: 0.88rem;
389
+  line-height: 0.88rem;
390
+  display: flex;
391
+  padding: 0 0.24rem;
392
+  font-size: 0.32rem;
393
+  justify-content: space-between;
394
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
395
+}
396
+
397
+.rapirMessage {
398
+  display: flex;
399
+  height: 1.4rem;
400
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
401
+}
402
+.rapirMessage .status {
403
+  width: 16.5%;
404
+  border-left: 0.01rem rgb(223, 222, 222) solid;
405
+  display: flex;
406
+  align-items: center;
407
+  justify-content: center;
408
+  flex-direction: column;
409
+}
410
+.rapirMessage .status div:nth-child(1) {
411
+  width: 100%;
412
+  text-align: center;
413
+}
414
+.rapirMessage .status div:nth-child(1) svg {
415
+  width: 0.48rem;
416
+  height: 0.48rem;
417
+}
418
+.rapirMessage .status div:nth-child(2) {
419
+  margin-top: 0.2rem;
420
+  display: flex;
421
+  align-items: center;
422
+}
423
+.rapirMessage .status div:nth-child(2) span:nth-child(1) {
424
+  font-size: 0.24rem;
425
+  color: #333333;
426
+}
427
+.rapirMessage .status div:nth-child(2) span:nth-child(2) {
428
+  display: inline-block;
429
+  margin-left: 0.08rem;
430
+  font-size: 0.32rem;
431
+}
432
+</style>
433
+<style>
434
+.myArea .cube-btn {
435
+  padding: 0 !important;
436
+  background-color: white !important;
437
+  color: #333333 !important;
438
+  text-align: right !important;
439
+  overflow: hidden;
440
+  white-space: nowrap;
441
+  text-overflow: ellipsis;
442
+}
443
+</style>

+ 116 - 0
src/views/myModify.vue

@@ -0,0 +1,116 @@
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>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1308
src/views/newIncident.vue


+ 87 - 0
src/views/noticeDetails.vue

@@ -0,0 +1,87 @@
1
+<template>
2
+    <div class="main bgColor">
3
+        <div class="title">
4
+            {{data.title||"暂无"}}
5
+        </div>
6
+        <div class="subheading">
7
+            <span>{{data.dept?data.dept.dept:""}}</span>
8
+            <span>{{data.createTime.substring(0,data.createTime.length-5)||"暂无"}}</span>
9
+        </div>
10
+        <div class="contants" v-html="data.content">
11
+            <!-- {{data.content||"暂无"}} -->
12
+        </div>
13
+        <div class="release">
14
+            {{data.dept?data.dept.dept:""}}
15
+        </div>
16
+        <div class="time">
17
+            {{data.createTime.substring(0,data.createTime.length-5)||"暂无"}}
18
+        </div>
19
+    </div>
20
+</template>
21
+<script>
22
+export default {
23
+    data(){
24
+        return{
25
+            data:""
26
+        }
27
+    },
28
+    methods:{
29
+        getParamsData(){
30
+            this.data=JSON.parse(this.$route.params.data);
31
+        }
32
+    },
33
+    created(){
34
+        this.getParamsData()
35
+    },
36
+    mounted(){
37
+        
38
+    }
39
+}
40
+</script>
41
+<style scoped>
42
+.bgColor{
43
+    background-color: white
44
+}
45
+.main{
46
+    padding: 0 .24rem
47
+}
48
+.title{
49
+    font-size: .32rem;
50
+    padding: .24rem .24rem 0 .24rem;
51
+    font-weight: bold;
52
+    line-height: .45rem
53
+}
54
+.subheading{
55
+    padding: .16rem 0;
56
+    display: flex;
57
+    justify-content:space-between
58
+}
59
+.subheading span{
60
+    font-size: .24rem;
61
+    color: #999999
62
+}
63
+.contants{
64
+    font-size: .28rem;
65
+    padding-top: .24rem;
66
+    border-top: .01rem rgb(223, 222, 222) solid;
67
+    text-indent:2em;
68
+    line-height: .39rem;
69
+    padding-bottom: .48rem;
70
+    color: #666666
71
+}
72
+.release{
73
+    display: flex;
74
+    justify-content:flex-end;
75
+    font-size: .28rem;
76
+    line-height: .39rem;
77
+    color: #666666
78
+}
79
+.time{
80
+    display: flex;
81
+    justify-content:flex-end;
82
+    font-size: .28rem;
83
+    line-height: .39rem;
84
+    color: #666666;
85
+    margin-top: .08rem
86
+}
87
+</style>

+ 367 - 0
src/views/noticeList.vue

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

+ 0 - 631
src/views/recordList.vue

@@ -1,631 +0,0 @@
1
-<template>
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="scroll-list-wrap">
13
-          <cube-scroll
14
-            ref="scroll"
15
-            :data="items"
16
-            :options="options"
17
-            @pulling-down="onPullingDown"
18
-            @pulling-up="onPullingUp"
19
-          >
20
-            <div class="conentBox">
21
-              <div class="conent" v-for="item in items">
22
-                <div class="top" @click="operation(item)">
23
-                  <div class="head">
24
-                    <p>
25
-                      <i class="iconfont dsit-icon-test2 newPapir"></i>
26
-                      来源:{{item.uud}}
27
-                      <span :class="{'btn':true,'isValid':item.isValid==0,'noValid':item.isValid==1}">{{item.isValid==0?'有效':'无效'}}</span>
28
-                    </p>
29
-                  </div>
30
-                  <div class="center">
31
-                    <p class="desc">
32
-                      <span class="fl">留言电话:</span>
33
-                      <span class="grayFont">{{item.ano}}</span>
34
-                    </p>
35
-                  </div>
36
-                  <div class="bottom">
37
-                    <span class="fl">处理状态: {{item.isExcute==0?'未处理':'已处理'}}</span>
38
-                    <span class="fr">留言时间:{{item.recTime}}</span>
39
-                  </div>
40
-                </div>
41
-                <div class="oper" v-show="operShow&&operId==item.id">
42
-                    <a class="operItem" href="javascript:;" v-if="item.isExcute==0" @click="toNewIncident(item.ano,item.id)">
43
-                        <i class="iconfont dsit-bianji2"></i>
44
-                        <span>新建事件</span>
45
-                    </a>
46
-                    <a class="operItem" href="javascript:;" v-if="item.isExcute==0" @click="changeValid(item)">
47
-                        <i class="iconfont dsit-false-circle"></i>
48
-                        <span>无效</span>
49
-                    </a>
50
-                    <a class="operItem" href="javascript:;" @click="showAudio(item.recFileName)">
51
-                        <i class="iconfont dsit-huifang"></i>
52
-                        <span>回放</span>
53
-                    </a>
54
-                    <a class="operItem" :href="'tel:'+item.ano">
55
-                        <i class="iconfont dsit-huibo"></i>
56
-                        <span>回拨</span>
57
-                    </a>
58
-                </div>
59
-              </div>
60
-              <div class="wushuju" v-show="wushuju">
61
-                <img src="./../../static/images/quesheng.png" alt>
62
-                <p>暂无留言</p>
63
-              </div>
64
-            </div>
65
-            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
66
-              <div
67
-                v-if="props.pullDownRefresh"
68
-                class="cube-pulldown-wrapper"
69
-                :style="props.pullDownStyle"
70
-              >
71
-                <div
72
-                  v-show="props.beforePullDown"
73
-                  class="before-trigger"
74
-                  :style="{paddingTop: props.bubbleY + 'px'}"
75
-                >
76
-                  <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 80}">↓</span>
77
-                </div>
78
-                <div class="after-trigger" v-show="!props.beforePullDown">
79
-                  <div v-show="props.isPullingDown" class="loading">
80
-                    <cube-loading></cube-loading>
81
-                  </div>
82
-                  <div v-show="!props.isPullingDown" class="text">
83
-                    <span class="refresh-text">更新成功</span>
84
-                  </div>
85
-                </div>
86
-              </div>
87
-            </template>
88
-          </cube-scroll>
89
-        </div>
90
-      </div>
91
-    </div>
92
-    <load-ing v-show="!items.length&&!wushuju"></load-ing>
93
-    <div class="mask" v-if="audioMask" @click="hideAudio()">
94
-      <audio controls autoplay="autoplay" id="bgMusic">
95
-        <source :src="audioSrc" type="audio/mpeg">
96
-      </audio>
97
-    </div>
98
-  </div>
99
-</template>
100
-<script>
101
-import Vue from "vue";
102
-import CubePage from "../components/cube-page.vue";
103
-import SwitchOption from "../components/switch-option";
104
-import InputOption from "../components/input-option";
105
-import SelectOption from "../components/select-option";
106
-import { formatDate } from "./../components/js/date.js";
107
-import LoadIng from "./../views/loading.vue";
108
-import http from "../request/http"
109
-export default {
110
-  data() {
111
-    return {
112
-      loginUser: JSON.parse(localStorage.getItem("loginUser")),
113
-      items: [],
114
-      pullDownRefresh: true,
115
-      pullDownRefreshThreshold: 60,
116
-      pullDownRefreshStop: 40,
117
-      pullDownRefreshTxt: "Refresh success",
118
-      pullUpLoad: true,
119
-      pullUpLoadThreshold: 0,
120
-      pullUpLoadMoreTxt: "加载更多",
121
-      pullUpLoadNoMoreTxt: "没有更多数据",
122
-      customPullDown: true,
123
-      wushuju: false,
124
-      audioSrc:'',//音频路径
125
-      audioMask:false,//音频
126
-      searchsType: [
127
-        {
128
-          text: "全部",
129
-          value: "全部"
130
-        },
131
-        {
132
-          text: "主校区",
133
-          value: "主校区"
134
-        },
135
-        {
136
-          text: "同济校区",
137
-          value: "同济校区"
138
-        },
139
-        {
140
-          text: "校园卡",
141
-          value: "校园卡"
142
-        }
143
-      ],
144
-      searchType: "全部",
145
-      sum: 10,
146
-      idx: 0,
147
-      loadShow: true,
148
-      operShow:false,//是否展示操作区域
149
-      operId:'',//当前点击操作区域的id
150
-    };
151
-  },
152
-  components: {
153
-    CubePage,
154
-    SwitchOption,
155
-    InputOption,
156
-    SelectOption,
157
-    LoadIng
158
-  },
159
-  computed: {
160
-    options() {
161
-      return {
162
-        pullDownRefresh: this.pullDownRefreshObj,
163
-        pullUpLoad: this.pullUpLoadObj,
164
-        scrollbar: true
165
-      };
166
-    },
167
-    pullDownRefreshObj: function() {
168
-      return this.pullDownRefresh
169
-        ? {
170
-            threshold: parseInt(this.pullDownRefreshThreshold),
171
-            txt: this.pullDownRefreshTxt
172
-          }
173
-        : false;
174
-    },
175
-    pullUpLoadObj: function() {
176
-      return this.pullUpLoad
177
-        ? {
178
-            threshold: parseInt(this.pullUpLoadThreshold),
179
-            txt: {
180
-              more: this.pullUpLoadMoreTxt,
181
-              noMore: this.pullUpLoadNoMoreTxt
182
-            }
183
-          }
184
-        : false;
185
-    }
186
-  },
187
-  methods: {
188
-    // 筛选
189
-    stateChange() {
190
-      var that = this;
191
-      this.loadShow = true;
192
-      that.items = [];
193
-      that.idx = 0;
194
-      that.sum = 10;
195
-      that.getData();
196
-    },
197
-    // 获取列表数据
198
-    getData() {
199
-      var that = this;
200
-      var postData=that.searchType=='全部'?{idx: that.idx,
201
-          sum: that.sum,
202
-          hjzxRecord:{}}:{idx: that.idx,
203
-          sum: that.sum,
204
-          hjzxRecord:{uud:that.searchType}};
205
-      http.bpmFetchDataList('hjzxRecord',postData)
206
-        .then(function(res) {
207
-          if (res.data.list.length > 0) {
208
-            that.wushuju = false;
209
-            for (var i = 0; i < res.data.list.length; i++) {
210
-              res.data.list[i].recTime = formatDate(
211
-                new Date(res.data.list[i].recTime),
212
-                "yyyy-MM-dd hh:mm"
213
-              );
214
-            }
215
-            that.items = that.items.concat(res.data.list);
216
-          } else if(res.data.list.length <= 0) {
217
-            that.wushuju = true;
218
-          }
219
-          that.loadShow = false;
220
-        });
221
-    },
222
-    // 展开操作区域
223
-    operation(data) {
224
-      if(data.id==this.operId){
225
-        this.operShow=!this.operShow;
226
-      }else{
227
-        this.operShow=true;
228
-      }
229
-      this.operId=data.id;
230
-    },
231
-    // 新建事件
232
-    toNewIncident(tel,id){
233
-      this.$router.push({name:'NewIncident',params:{
234
-        tel:tel,
235
-        recordId:id
236
-      }})
237
-    },
238
-    // 点击无效
239
-    changeValid(data){
240
-      var that=this;
241
-      http.recordChangeValid({id:data.id,isValid:1,isExcute:1,field1:1})
242
-      .then(function(res){
243
-        if(res.data.status==200){
244
-          that.dialog = that
245
-            .$createDialog({
246
-              type: "alert",
247
-              title: "该信息状态更改为无效",
248
-              content: "",
249
-              onConfirm: (e, promptValue) => {
250
-                that.$router.go(0)
251
-              }
252
-            }).show();
253
-        }
254
-      })
255
-    },
256
-    // 播放音频
257
-    showAudio(src){
258
-      this.audioMask=true;
259
-      this.audioSrc=http.host+src.substring(11,src.length);
260
-    },
261
-    // 隐藏音频组件
262
-    hideAudio(){
263
-      this.audioMask=false;
264
-    },
265
-    onPullingDown() {
266
-      var that = this;
267
-      that.idx = 0;
268
-      that.sum = 10;
269
-      that.items = [];
270
-      setTimeout(() => {
271
-        that.getData();
272
-      }, 1000);
273
-    },
274
-    onPullingUp() {
275
-      var that = this;
276
-      that.idx = that.idx + 1;
277
-      that.getData();
278
-    },
279
-    updatePullDownRefresh(val) {
280
-      this.pullDownRefresh = val;
281
-    },
282
-    updatePullDownRefreshThreshold(val) {
283
-      this.pullDownRefreshThreshold = val;
284
-    },
285
-    updatePullDownRefreshTxt(val) {
286
-      this.pullDownRefreshTxt = val;
287
-    },
288
-    updatePullUpLoad(val) {
289
-      this.pullUpLoad = val;
290
-    },
291
-    updatePullUpLoadThreshold(val) {
292
-      this.pullUpLoadThreshold = val;
293
-    },
294
-    updatePullUpLoadMoreTxt(val) {
295
-      this.pullUpLoadMoreTxt = val;
296
-    },
297
-    updatePullUpLoadNoMoreTxt(val) {
298
-      this.pullUpLoadNoMoreTxt = val;
299
-    },
300
-    updateCustomPullDown(val) {
301
-      this.customPullDown = val;
302
-    },
303
-    rebuildScroll() {
304
-      Vue.nextTick(() => {
305
-        this.$refs.scroll.destroy();
306
-        this.$refs.scroll.initScroll();
307
-      });
308
-    }
309
-  },
310
-  created() {
311
-    var that = this;
312
-    // this.getParamsState();
313
-    this.getData();
314
-  }
315
-};
316
-</script>
317
-<style lang="stylus" rel="stylesheet/stylus" scoped>
318
-.scroll-list-wrap {
319
-  /* height: 350px */
320
-  height: 87vh;
321
-  /* border: 1px solid rgba(0, 0, 0, 0.1) */
322
-  border-radius: 5px;
323
-  transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
324
-  overflow: hidden;
325
-  padding-top: .88rem;
326
-}
327
-
328
-.foods-wrapper {
329
-  .food-item {
330
-    display: flex;
331
-
332
-    /* padding: 18px */
333
-    /* border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
334
-    /* border-top: 1px solid rgba(7, 17, 27, 0.1)!important */
335
-    &:last-child {
336
-      border-none();
337
-      margin-bottom: 0;
338
-    }
339
-
340
-    .icon {
341
-      flex: 0 0 57px;
342
-      margin-right: 10px;
343
-    }
344
-
345
-    .food-content {
346
-      flex: 1;
347
-
348
-      .name {
349
-        margin: 2px 0 8px 0;
350
-        height: 14px;
351
-        line-height: 14px;
352
-        font-size: 14px;
353
-        color: rgb(7, 17, 27);
354
-      }
355
-
356
-      .description, .extra {
357
-        line-height: 10px;
358
-        font-size: 10px;
359
-        color: rgb(147, 153, 159);
360
-      }
361
-
362
-      .description {
363
-        line-height: 12px;
364
-        margin-bottom: 8px;
365
-      }
366
-
367
-      .extra {
368
-        .count {
369
-          margin-right: 12px;
370
-        }
371
-      }
372
-
373
-      .price {
374
-        font-weight: 700;
375
-        line-height: 24px;
376
-
377
-        .now {
378
-          margin-right: 8px;
379
-          font-size: 14px;
380
-          color: rgb(240, 20, 20);
381
-        }
382
-
383
-        .old {
384
-          text-decoration: line-through;
385
-          font-size: 10px;
386
-          color: rgb(147, 153, 159);
387
-        }
388
-      }
389
-
390
-      .cartcontrol-wrapper {
391
-        position: absolute;
392
-        right: 0;
393
-        bottom: 12px;
394
-
395
-        .scroll-wrapper {
396
-          .cube-pulldown-wrapper {
397
-            .before-trigger {
398
-              font-size: 30px;
399
-              line-height: 30px;
400
-              align-self: flex-end;
401
-
402
-              span {
403
-                display: inline-block;
404
-                transition: all 0.3s;
405
-                color: #666;
406
-
407
-                &.rotate {
408
-                  transform: rotate(180deg);
409
-                }
410
-              }
411
-            }
412
-
413
-            .after-trigger {
414
-              .refresh-text {
415
-                color: grey;
416
-              }
417
-            }
418
-          }
419
-        }
420
-      }
421
-    }
422
-  }
423
-}
424
-</style>
425
-<style lang='less' scoped>
426
-.cont {
427
-  margin-top: 1.86rem;
428
-}
429
-.scroll-list-wrap {
430
-  // padding-top: .88rem;
431
-}
432
-// .header {
433
-//   width: 100%;
434
-//   height: 0.88rem;
435
-//   line-height: 0.88rem;
436
-//   text-align: center;
437
-//   color: #fff;
438
-//   font-size: 0.37rem;
439
-//   background: linear-gradient(#2e2f32, #414246);
440
-//   position: fixed;
441
-//   top: 0;
442
-//   z-index: 6;
443
-// }
444
-
445
-.mask{
446
-  width: 100%;
447
-  height: 100%;
448
-  position: fixed;
449
-  top: 0;
450
-  background: rgba(0,0,0,.5);
451
-  z-index: 999;
452
-  display: flex;
453
-  align-items: center;
454
-  justify-content: center;
455
-}
456
-.stateSearch {
457
-  width: 100%;
458
-  position: fixed;
459
-  // top: 0.88rem;
460
-  z-index: 6;
461
-}
462
-.bgColor {
463
-  background-color: white;
464
-}
465
-.food-item {
466
-  border-top: 0.16rem rgb(238, 238, 238) solid;
467
-}
468
-.food-content {
469
-  border-top: 0.01rem rgb(223, 222, 222) solid;
470
-  border-bottom: 0.01rem rgb(223, 222, 222) solid;
471
-}
472
-.cube-select {
473
-  height: 0.88rem;
474
-  line-height: 0.88rem;
475
-  padding: 0 0.24rem;
476
-  font-size: 0.36rem;
477
-  color: #333333;
478
-  border-bottom: 0.08rem solid #e5e5e5;
479
-}
480
-.title {
481
-  display: flex;
482
-  justify-content: space-between;
483
-  height: 0.7rem;
484
-  line-height: 0.7rem;
485
-  border-top: 0.01rem rgb(223, 222, 222) solid;
486
-  padding: 0 0.24rem;
487
-  border-bottom: 0.01rem rgb(223, 222, 222) solid;
488
-}
489
-.title i {
490
-  font-size: 0.32rem;
491
-  color: #005395;
492
-}
493
-.title div:nth-child(1) {
494
-  font-size: 0.32rem;
495
-}
496
-.title div:nth-child(1) span {
497
-  display: inline-block;
498
-  margin-left: 0.08rem;
499
-}
500
-.title div:nth-child(2) {
501
-  padding: 0.05rem 0.3rem;
502
-  /* border: 0.01rem rgb(0,0,255) solid; */
503
-  border-radius: 16px;
504
-  /* color: rgb(0,0,255); */
505
-  height: 0.25rem;
506
-  line-height: 0.25rem;
507
-  margin-top: 0.15rem;
508
-  font-size: 0.24rem;
509
-}
510
-.weishouli {
511
-  color: #991f00;
512
-  border: 0.01rem #991f00 solid;
513
-  background-color: #f4e8e5;
514
-}
515
-.bushouli {
516
-  color: #666666;
517
-  background-color: #eeeeee;
518
-  border: 0.01rem #666666 solid;
519
-}
520
-.chulizhong {
521
-  color: #003057;
522
-  background-color: #e5eaee;
523
-  border: 0.01rem #003057 solid;
524
-}
525
-.daipingjia {
526
-  color: #825b00;
527
-  background-color: #f2eee5;
528
-  border: 0.01rem #825b00 solid;
529
-}
530
-.yijiejue {
531
-  color: #40a19c;
532
-  background-color: #ebf5f5;
533
-  border: 0.01rem #40a19c solid;
534
-}
535
-.yichehui {
536
-  color: #48a843;
537
-  background-color: #ecf6ec;
538
-  border: 0.01rem #48a843 solid;
539
-}
540
-// .conent {
541
-//   font-size: 0.28rem;
542
-//   line-height: 0.39rem;
543
-//   overflow: hidden;
544
-//   display: -webkit-box;
545
-//   -webkit-line-clamp: 2;
546
-//   -webkit-box-orient: vertical;
547
-//   word-break: break-all;
548
-//   padding: 0 0.64rem;
549
-//   margin: 0.24rem 0;
550
-// }
551
-.timeBox {
552
-  display: flex;
553
-  justify-content: space-between;
554
-  font-size: 0.24rem;
555
-  color: #999999;
556
-  border-top: 0.01rem rgb(223, 222, 222) solid;
557
-  height: 0.7rem;
558
-  line-height: 0.7rem;
559
-  padding: 0 0.24rem 0 0.64rem;
560
-}
561
-.wushuju {
562
-  margin-top: 2.4rem;
563
-  text-align: center;
564
-  color: #999;
565
-}
566
-.wushuju img {
567
-  height: 1.68re;
568
-}
569
-.conentBox {
570
-  width: 100%;
571
-  height: 100%;
572
-  .conent {
573
-    font-size: 0.32rem;
574
-    font-weight: 400;
575
-    line-height: 0.45rem;
576
-    border-bottom: 0.16rem solid #e5e5e5;
577
-    .head {
578
-      border-bottom: 0.01rem solid #e6e6e6;
579
-      p {
580
-        padding: 0.24rem 0.48rem;
581
-        i {
582
-          color: #00559d;
583
-        }
584
-        .btn {
585
-          float: right;
586
-        }
587
-      }
588
-    }
589
-    .center {
590
-      color: #333333;
591
-      border-bottom: 0.01rem solid #e6e6e6;
592
-      padding: 0.24rem 0.48rem;
593
-      p {
594
-        &.desc{
595
-        overflow: hidden;
596
-        max-height: .88rem;
597
-        }
598
-        .grayFont {
599
-          overflow-x: scroll;
600
-          color: #666;
601
-        }
602
-      }
603
-    }
604
-    .bottom {
605
-      overflow: hidden;
606
-      line-height: 0.86rem;
607
-      border-bottom: 0.01rem solid #e6e6e6;
608
-      font-size: 0.24rem;
609
-      color: #999;
610
-      padding: 0 0.24rem 0 0.48rem;
611
-    }
612
-    .oper{
613
-        width: 100%;
614
-        height: 1.56rem;
615
-        display: flex;
616
-        justify-content: space-around;
617
-        align-items: center;
618
-        .operItem{
619
-            text-align: center;
620
-            color: #01559d;
621
-            .iconfont{
622
-              font-size: .5rem;
623
-            }
624
-            span{
625
-                display: block;
626
-            }
627
-        }
628
-    }
629
-  }
630
-}
631
-</style>

+ 670 - 0
src/views/repair.vue

@@ -0,0 +1,670 @@
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>

+ 0 - 492
src/views/wxChartDetail.vue

@@ -1,492 +0,0 @@
1
-<template>
2
-  <div class="order">
3
-    <div class="conentBox">
4
-      <div class="conent">
5
-        <!-- <div class="header">处理方案</div> -->
6
-        <div class="inf" v-if="model">
7
-          <div class="label headtop" id="info">报修信息</div>
8
-          <div class="info">
9
-              <p>
10
-                <span>报修人:</span> 
11
-                <span>{{model.requester.name}}</span>
12
-                <span :class="{'btn':true,'fr':true,'bushouli':model.state=='不受理','yizhuanhuan':model.state=='已转换','weizhuanhuan':model.state=='未转换','yijiejue':model.state=='已解决','chulizhong':model.state=='处理中','daipingjia':model.state=='待评价'}">{{model.state}}</span>
13
-            </p>
14
-            <p class="relative">
15
-              <span>报修电话:</span>
16
-              <span>{{model.requester.mphone}}</span>
17
-              <a class="tel" :href="'tel:'+model.requester.mphone"><i class="iconfont dsit-shouji"></i></a>
18
-            </p>
19
-            <p>
20
-              <span>报修地址:</span>
21
-              <span>{{model.area.area||''}} {{model.place.place||''}} {{model.houseNumber||''}}</span>
22
-            </p>
23
-            <p class="desc">
24
-              <span>报修描述:</span>
25
-              <span class="grayFont" v-html="model.incidentDescription"></span>
26
-            </p>
27
-            <div class="label" v-if="imgs.length">报修图片</div>
28
-            <div class="imgs-container" v-if="imgs.length">
29
-              <div class="imgs-cont">
30
-                <img v-if='img.suffix=="jpeg"||img.suffix=="jpg"||img.suffix=="gif"||img.suffix=="png"||img.suffix=="svg"||img.suffix=="pdf"' :src='baseURL+"/service/api/common/common/downloadAttachment/"+img.token' v-for="(img, index) in imgs" class="imgs">
31
-                <p v-else>
32
-                  <a :href='baseURL+"/service/api/common/common/downloadAttachment/"+img.token'>{{img.name}}</a>
33
-                </p>
34
-              </div>
35
-            </div>
36
-            <p class="lastP" v-if="model.state=='不受理'">
37
-              <span>不受理原因:</span>
38
-              <span>{{model.rejectRemark||''}}</span>
39
-            </p>
40
-          </div>
41
-        </div>
42
-          <div v-if="model.state=='未转换'" class="btnBox">
43
-            <cube-button @click="showPicker()">操作</cube-button>
44
-          </div>
45
-        <load-ing v-if="!model"></load-ing>
46
-      </div>
47
-    </div>
48
-    <div class="dialog" v-if="dialog&&model.state=='未转换'" >
49
-        <div class="header">报障详情</div>
50
-        <div class="conent">
51
-            <div class="label">不受理原因</div>
52
-            <div class="textarea">
53
-                <div  class="textareacon" ref="textCon" placeholder="请填写不受理原因" @input="cons()" contenteditable="true"></div>
54
-            </div>
55
-            <div class="bottom">
56
-                <cube-button @click="submit()">确定</cube-button>
57
-                <cube-button @click="dialog=false;">取消</cube-button>
58
-            </div>
59
-        </div>
60
-    </div>
61
-  </div>
62
-</template>
63
-<script>
64
-import LoadIng from "./../views/loading.vue";
65
-import http from "../request/http"
66
-export default {
67
-  data() {
68
-    return {
69
-      loginUser: JSON.parse(localStorage.getItem("loginUser")),
70
-      promptingConent: "",
71
-      promptingStatus: "",
72
-      baseURL:http.host,
73
-      imgs: [], //图片
74
-      model: {} ,//报障数据
75
-      rejectRemark:'',//不受理原因
76
-      dialog:false,
77
-      column1: [
78
-            { text: '生成事件', value: '0'},
79
-            { text: '不受理', value: '1' },
80
-        ]
81
-    };
82
-  },
83
-  components: {
84
-    LoadIng
85
-  },
86
-  methods: {
87
-    // 获取图片
88
-    getImgs() {
89
-      var that = this;
90
-      http.getIncidentWebImgs(that.model.id)
91
-        .then(function(res) {
92
-          that.imgs =res.data.data.length? res.data.data.splice(0, 3):[];
93
-        });
94
-    },
95
-    showPicker() {
96
-      if (!this.picker) {
97
-        this.picker = this.$createPicker({
98
-          title: '',
99
-          data: [this.column1],
100
-          onSelect: this.selectHandle,
101
-          onCancel: this.cancelHandle
102
-        })
103
-      }
104
-      this.picker.show()
105
-    },
106
-    selectHandle(selectedVal, selectedIndex, selectedText) {
107
-      if(selectedVal==0){
108
-        //   生成事件
109
-        this.$router.push({
110
-            name:'NewIncident',
111
-            params:{
112
-                data:this.model,
113
-                id:this.model.id
114
-            }
115
-        })
116
-      }else if(selectedVal==1){
117
-        //   不受理
118
-          this.dialog=true;
119
-      }
120
-    },
121
-    cancelHandle() {},
122
-    // 输入不受理原因
123
-    cons(){
124
-        this.rejectRemark=this.$refs.textCon.innerHTML;
125
-    },
126
-    // 提交不受理原因
127
-    submit(){
128
-      var that=this;
129
-      http.submitWebRemark(that.model.id,{rejectRemark:that.rejectRemark})
130
-      .then(function(res) {
131
-        if(res.data.state==200){
132
-            that.dialog = that
133
-            .$createDialog({
134
-              type: "alert",
135
-              title: "提交成功",
136
-              content: "点击返回首页",
137
-              icon: "cubeic-right",
138
-              onConfirm: (e, promptValue) => {
139
-                that.$router.push({ path: "/main" });
140
-              }
141
-            })
142
-            .show();
143
-        }
144
-      });
145
-    }
146
-  },
147
-  created() {
148
-    this.model=this.$route.params.data;
149
-    this.getImgs();
150
-  }
151
-};
152
-</script>
153
-<style lang="less" scoped>
154
-i.iconfont.blue {
155
-  color: #005395;
156
-  // &::after {
157
-  //   content: "";
158
-  //   width: 0.01rem;
159
-  //   height: 0.4rem;
160
-  //   background: #005395;
161
-  //   position: relative;
162
-  //   display: block;
163
-  //   left: 0.14rem;
164
-  // }
165
-}
166
-.order {
167
-  height: 100%;
168
-  background-color: #eee;
169
-  // .header {
170
-  //   width: 100%;
171
-  //   height: 0.88rem;
172
-  //   line-height: 0.88rem;
173
-  //   text-align: center;
174
-  //   color: #fff;
175
-  //   font-size: 0.37rem;
176
-  //   background: linear-gradient(#2e2f32, #414246);
177
-  //   position: fixed;
178
-  //   top: 0;
179
-  //   z-index: 6;
180
-  // }
181
-  .navBar {
182
-    width: 100%;
183
-    height: 0.96rem;
184
-    line-height: 0.96rem;
185
-    background-color: #fafafa;
186
-    font-size: 0.28rem;
187
-    position: fixed;
188
-    // top: 0.88rem;
189
-
190
-    div {
191
-      width: 33.33%;
192
-      text-align: center;
193
-      &.p50 {
194
-        width: 49.99%;
195
-      }
196
-      a {
197
-        display: inline-block;
198
-        height: 0.9rem;
199
-        width: 1.7rem;
200
-        padding: 0 0.1rem;
201
-        &.active {
202
-          color: #005395;
203
-          border-bottom: 0.06rem solid #005395;
204
-        }
205
-      }
206
-    }
207
-  }
208
-
209
-  .label {
210
-    background-color: #eeeeee;
211
-    height: 0.6rem;
212
-    line-height: 0.58rem;
213
-    padding-left: 0.2rem;
214
-    font-size: 0.28rem;
215
-    color: #666666;
216
-    span {
217
-      font-size: 0.2rem;
218
-      display: inline-block;
219
-      margin-left: 0.08rem;
220
-      color: #999999;
221
-    }
222
-    &.formLabel {
223
-      background-color: #fff;
224
-    }
225
-  }
226
-  .conentBox {
227
-    width: 100%;
228
-    height: 100%;
229
-    // padding-top: .88rem;
230
-    box-sizing: border-box;
231
-    .conent {
232
-      height: 100%;
233
-      font-size: 0.32rem;
234
-      font-weight: 400;
235
-      line-height: 0.45rem;
236
-      // border-bottom: 0.16rem solid #e5e5e5;
237
-      .inf{
238
-        min-height: 11rem;
239
-      }
240
-      .shows {
241
-        display: none;
242
-      }
243
-      .boeder_B {
244
-        border-bottom: 0.01rem solid #ccc;
245
-      }
246
-      p {
247
-        &.desc {
248
-          overflow: hidden;
249
-        }
250
-        .grayFont {
251
-          width: 75%;
252
-          text-align: right;
253
-          overflow-x: scroll;
254
-        }
255
-      }
256
-      .bottom {
257
-        overflow: hidden;
258
-        line-height: 0.86rem;
259
-        border-bottom: 0.01rem solid #e6e6e6;
260
-        font-size: 0.24rem;
261
-        color: #999;
262
-        padding: 0 0.24rem 0 0.48rem;
263
-      }
264
-      .info {
265
-        color: #999;
266
-        font-size: 0.32rem;
267
-        overflow: hidden;
268
-        background: #fff;
269
-        .head {
270
-          color: #333;
271
-          border-bottom: 0.01rem solid #e6e6e6;
272
-          >p {
273
-            padding: 0.24rem 0.3rem;
274
-            i {
275
-              color: #00559d;
276
-            }
277
-            
278
-          }
279
-         
280
-        }
281
-        >p {
282
-          line-height: 0.68rem;
283
-          padding: 0.1rem 0.24rem;
284
-          overflow: hidden;
285
-          border-bottom: 0.01rem solid #e6e6e6;
286
-          &.lastP{
287
-            border-bottom: none;
288
-            display: inline-block;
289
-            width: 100%;
290
-            min-height: 2rem;
291
-            box-sizing: border-box;
292
-          }
293
-          &.relative{
294
-            position: relative;
295
-            padding-right: 1rem;
296
-          }
297
-          .overflowEllipsis2 {
298
-            margin-left: 1.96rem;
299
-          }
300
-          span:nth-child(1){
301
-            display: inline-block;
302
-            width: 1.7rem;
303
-            color: #333;
304
-          }
305
-
306
-          span:nth-child(2){
307
-            color: #666;
308
-            
309
-          }
310
-          span:nth-child(3){
311
-            margin: .13rem 0;
312
-          }
313
-          .tel{
314
-            position: absolute;
315
-            right: .35rem;
316
-            top: 0;
317
-            .iconfont{
318
-              font-size: .44rem;
319
-              color: #005395;
320
-            }
321
-          }
322
-          
323
-        }
324
-        .imgs-container {
325
-            padding: .24rem 0;
326
-            border-bottom: 0.01rem solid #e6e6e6;
327
-          a {
328
-            color: #03c !important;
329
-            &:visited {
330
-              color: #551a8b !important;
331
-            }
332
-          }
333
-          img {
334
-            width: 1.5rem;
335
-            height: 1.5rem;
336
-            margin-right: 0.7rem;
337
-            &:nth-child(1) {
338
-              margin-left: 0.75rem;
339
-            }
340
-          }
341
-        }
342
-        .progress {
343
-          padding: 0.2rem 0.2rem;
344
-          overflow: hidden;
345
-          margin-bottom: 0.7rem;
346
-          .progress_info {
347
-            overflow: hidden;
348
-            margin-bottom: 0.1rem;
349
-            &:nth-last-child(1) {
350
-              .cont {
351
-                border: none !important;
352
-              }
353
-            }
354
-            .progress_info_L {
355
-              float: left;
356
-              color: #333;
357
-              max-width: 18%;
358
-            }
359
-            .progress_info_R {
360
-              float: right;
361
-              margin-left: 0.09rem;
362
-              width: 80%;
363
-              font-size: 0.25rem;
364
-              .time {
365
-                i {
366
-                  margin-left: -0.15rem;
367
-                  &.dsit-icon_liucheng {
368
-                    color: #005495;
369
-                  }
370
-                  &.dsit-icon_zhengzaijinx {
371
-                    color: #48a843;
372
-                    font-size: 0.37rem;
373
-                  }
374
-                }
375
-                span {
376
-                  margin-left: 0.15rem;
377
-                }
378
-              }
379
-              .cont {
380
-                border-left: 1px solid #999;
381
-                padding-left: 0.4rem;
382
-                min-height: 0.4rem;
383
-                &.blue {
384
-                  border-left: 1px solid #005395;
385
-                }
386
-              }
387
-
388
-              .text1 {
389
-                font-size: 0.15rem;
390
-              }
391
-              .text2 {
392
-                color: #666;
393
-              }
394
-              p {
395
-                padding: 0;
396
-              }
397
-            }
398
-          }
399
-        }
400
-      }
401
-      .btnBox{
402
-            width: 100%;
403
-            padding: .24rem;
404
-            box-sizing: border-box;
405
-            background: #eee;
406
-        .cube-btn{
407
-            width: 100%;
408
-            height: 100%;
409
-            border-radius: .1rem;
410
-            background: #01559d;
411
-        } 
412
-      } 
413
-      .txtLabel {
414
-        width: 100%;
415
-        overflow: hidden;
416
-        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
417
-        .txt {
418
-          width: 30%;
419
-          color: #666;
420
-        }
421
-        .cube-textarea-wrapper {
422
-          width: 62%;
423
-        }
424
-      }
425
-      .sub {
426
-        background: #ececec;
427
-        .cube-btn {
428
-          background-color: #005395 !important;
429
-          width: 90%;
430
-          margin: 0.2rem auto;
431
-          border-radius: 8px;
432
-        }
433
-      }
434
-    }
435
-    .showwrap {
436
-        width: 75%;
437
-        text-align: right;
438
-    }
439
-  }
440
-  .dialog{
441
-        width: 100%;
442
-        height: 100%;
443
-        position: fixed;
444
-        top: 0;
445
-        background: #eee;
446
-        z-index: 9;
447
-        .conent{
448
-            padding-top: .88rem;
449
-            .textarea{
450
-                width: 100%;
451
-                min-height: 3.15rem;
452
-                .textareacon{
453
-                    background: #fff;
454
-                    min-height: 3.15rem;
455
-                    padding: .24rem;
456
-                    box-sizing: border-box;
457
-                    font-size: .32rem;
458
-                    color: #666;
459
-                }
460
-                .textareacon:empty:before{
461
-                    content: attr(placeholder);
462
-                    color:#bbb;
463
-                }
464
-                .textareacon:focus{
465
-                    outline: none;
466
-                }
467
-                .textareacon:focus:before{
468
-                    content:none;
469
-                }
470
-            }
471
-            .bottom{
472
-                width: 100%;
473
-                padding: .24rem;
474
-                box-sizing: border-box;
475
-                display: flex;
476
-                button{
477
-                    margin: .1rem;
478
-                    &:nth-child(1){
479
-                        background-color: #01559d;
480
-                    }
481
-                    &:nth-child(2){
482
-                        background-color: #fff;
483
-                        border: 1px solid #ccc;
484
-                        color: #333;
485
-                    }
486
-                }
487
-            }
488
-        }
489
-  }
490
-  
491
-}
492
-</style>

+ 0 - 543
src/views/wxChartList.vue

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

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 250 - 1722
static/css/demo_index.html


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 54 - 310
static/css/iconfont.css


BIN
static/css/iconfont.eot


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
static/css/iconfont.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 22 - 214
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-top.png


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


+ 0 - 0
static/images/pig.jpg


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä