eoss-mobiles 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +28 -0
  3. package/lib/action-sheet.js +313 -0
  4. package/lib/button-group.js +421 -0
  5. package/lib/button.js +278 -0
  6. package/lib/calendar.js +301 -0
  7. package/lib/cascader.js +336 -0
  8. package/lib/cell.js +366 -0
  9. package/lib/checkbox.js +2170 -0
  10. package/lib/circle.js +299 -0
  11. package/lib/config/api.js +31 -0
  12. package/lib/count-down.js +299 -0
  13. package/lib/date.js +956 -0
  14. package/lib/empty.js +274 -0
  15. package/lib/eoss-mobile.common.js +15072 -0
  16. package/lib/field.js +440 -0
  17. package/lib/flow.js +5664 -0
  18. package/lib/form.js +714 -0
  19. package/lib/grid-item.js +274 -0
  20. package/lib/grid.js +317 -0
  21. package/lib/image-preview.js +325 -0
  22. package/lib/index.js +1 -0
  23. package/lib/list.js +315 -0
  24. package/lib/loading.js +279 -0
  25. package/lib/nav-bar.js +283 -0
  26. package/lib/pagination.js +323 -0
  27. package/lib/picker.js +2714 -0
  28. package/lib/popover.js +306 -0
  29. package/lib/popup.js +297 -0
  30. package/lib/radio.js +2137 -0
  31. package/lib/rate.js +300 -0
  32. package/lib/search.js +316 -0
  33. package/lib/selector.js +3496 -0
  34. package/lib/skeleton.js +277 -0
  35. package/lib/stepper.js +300 -0
  36. package/lib/switch.js +304 -0
  37. package/lib/tab.js +274 -0
  38. package/lib/table-column.js +2991 -0
  39. package/lib/table.js +2652 -0
  40. package/lib/tabs.js +315 -0
  41. package/lib/tag.js +281 -0
  42. package/lib/theme-chalk/action-sheet.css +0 -0
  43. package/lib/theme-chalk/base.css +1 -0
  44. package/lib/theme-chalk/button-group.css +1 -0
  45. package/lib/theme-chalk/button.css +1 -0
  46. package/lib/theme-chalk/calendar.css +1 -0
  47. package/lib/theme-chalk/cascader.css +1 -0
  48. package/lib/theme-chalk/cell.css +1 -0
  49. package/lib/theme-chalk/checkbox.css +1 -0
  50. package/lib/theme-chalk/circle.css +1 -0
  51. package/lib/theme-chalk/count-down.css +0 -0
  52. package/lib/theme-chalk/date.css +0 -0
  53. package/lib/theme-chalk/empty.css +0 -0
  54. package/lib/theme-chalk/field.css +1 -0
  55. package/lib/theme-chalk/flow.css +1 -0
  56. package/lib/theme-chalk/fonts/iconfont.scss +530 -0
  57. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  58. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  59. package/lib/theme-chalk/form.css +0 -0
  60. package/lib/theme-chalk/grid-item.css +1 -0
  61. package/lib/theme-chalk/grid.css +0 -0
  62. package/lib/theme-chalk/icon.css +1 -0
  63. package/lib/theme-chalk/image-preview.css +0 -0
  64. package/lib/theme-chalk/index.css +1 -0
  65. package/lib/theme-chalk/list.css +0 -0
  66. package/lib/theme-chalk/loading.css +0 -0
  67. package/lib/theme-chalk/nav-bar.css +0 -0
  68. package/lib/theme-chalk/navbar.css +1 -0
  69. package/lib/theme-chalk/pagination.css +1 -0
  70. package/lib/theme-chalk/picker.css +1 -0
  71. package/lib/theme-chalk/popover.css +0 -0
  72. package/lib/theme-chalk/popup.css +0 -0
  73. package/lib/theme-chalk/radio.css +1 -0
  74. package/lib/theme-chalk/rate.css +0 -0
  75. package/lib/theme-chalk/search.css +0 -0
  76. package/lib/theme-chalk/selector.css +1 -0
  77. package/lib/theme-chalk/skeleton.css +0 -0
  78. package/lib/theme-chalk/stepper.css +1 -0
  79. package/lib/theme-chalk/switch.css +1 -0
  80. package/lib/theme-chalk/tab.css +0 -0
  81. package/lib/theme-chalk/table-column.css +0 -0
  82. package/lib/theme-chalk/table.css +1 -0
  83. package/lib/theme-chalk/tabs.css +1 -0
  84. package/lib/theme-chalk/tag.css +1 -0
  85. package/lib/theme-chalk/theme.css +0 -0
  86. package/lib/theme-chalk/tree.css +1 -0
  87. package/lib/theme-chalk/uploader.css +0 -0
  88. package/lib/uploader.js +307 -0
  89. package/lib/utils/axios.js +199 -0
  90. package/lib/utils/date-util.js +320 -0
  91. package/lib/utils/http.js +74 -0
  92. package/lib/utils/rules.js +21 -0
  93. package/lib/utils/store.js +24 -0
  94. package/lib/utils/util.js +1315 -0
  95. package/package.json +153 -0
  96. package/packages/action-sheet/index.js +5 -0
  97. package/packages/action-sheet/src/main.vue +32 -0
  98. package/packages/button/index.js +5 -0
  99. package/packages/button/src/main.vue +15 -0
  100. package/packages/button-group/index.js +5 -0
  101. package/packages/button-group/src/main.vue +80 -0
  102. package/packages/calendar/index.js +5 -0
  103. package/packages/calendar/src/main.vue +34 -0
  104. package/packages/cascader/index.js +5 -0
  105. package/packages/cascader/src/main.vue +40 -0
  106. package/packages/cell/index.js +5 -0
  107. package/packages/cell/src/main.vue +72 -0
  108. package/packages/checkbox/index.js +5 -0
  109. package/packages/checkbox/src/main.vue +149 -0
  110. package/packages/circle/index.js +5 -0
  111. package/packages/circle/src/main.vue +27 -0
  112. package/packages/count-down/index.js +5 -0
  113. package/packages/count-down/src/main.vue +27 -0
  114. package/packages/date/index.js +5 -0
  115. package/packages/date/src/date-time.vue +290 -0
  116. package/packages/date/src/main.vue +319 -0
  117. package/packages/empty/index.js +5 -0
  118. package/packages/empty/src/main.vue +16 -0
  119. package/packages/field/index.js +5 -0
  120. package/packages/field/src/main.vue +130 -0
  121. package/packages/flow/index.js +5 -0
  122. package/packages/flow/src/components/Handle.vue +1031 -0
  123. package/packages/flow/src/components/Message.vue +96 -0
  124. package/packages/flow/src/components/Opinion.vue +112 -0
  125. package/packages/flow/src/components/Reject.vue +202 -0
  126. package/packages/flow/src/components/StartFlow.vue +440 -0
  127. package/packages/flow/src/components/TaskRead.vue +237 -0
  128. package/packages/flow/src/main.vue +43 -0
  129. package/packages/form/index.js +5 -0
  130. package/packages/form/src/main.vue +158 -0
  131. package/packages/grid/index.js +5 -0
  132. package/packages/grid/src/main.vue +28 -0
  133. package/packages/grid-item/index.js +5 -0
  134. package/packages/grid-item/src/main.vue +16 -0
  135. package/packages/image-preview/index.js +5 -0
  136. package/packages/image-preview/src/main.vue +34 -0
  137. package/packages/list/index.js +5 -0
  138. package/packages/list/src/main.vue +32 -0
  139. package/packages/loading/index.js +5 -0
  140. package/packages/loading/src/main.vue +20 -0
  141. package/packages/nav-bar/index.js +5 -0
  142. package/packages/nav-bar/src/main.vue +16 -0
  143. package/packages/pagination/index.js +5 -0
  144. package/packages/pagination/src/main.vue +29 -0
  145. package/packages/picker/index.js +5 -0
  146. package/packages/picker/src/main.vue +500 -0
  147. package/packages/popover/index.js +5 -0
  148. package/packages/popover/src/main.vue +32 -0
  149. package/packages/popup/index.js +5 -0
  150. package/packages/popup/src/main.vue +27 -0
  151. package/packages/radio/index.js +5 -0
  152. package/packages/radio/src/main.vue +147 -0
  153. package/packages/rate/index.js +5 -0
  154. package/packages/rate/src/main.vue +27 -0
  155. package/packages/search/index.js +5 -0
  156. package/packages/search/src/main.vue +39 -0
  157. package/packages/selector/index.js +5 -0
  158. package/packages/selector/src/main.vue +77 -0
  159. package/packages/selector/src/selector-field.vue +225 -0
  160. package/packages/selector/src/selector-tree.vue +472 -0
  161. package/packages/selector/src/tree.vue +179 -0
  162. package/packages/skeleton/index.js +5 -0
  163. package/packages/skeleton/src/main.vue +17 -0
  164. package/packages/stepper/index.js +5 -0
  165. package/packages/stepper/src/main.vue +25 -0
  166. package/packages/switch/index.js +5 -0
  167. package/packages/switch/src/main.vue +29 -0
  168. package/packages/tab/index.js +5 -0
  169. package/packages/tab/src/main.vue +16 -0
  170. package/packages/table/index.js +5 -0
  171. package/packages/table/src/main.vue +830 -0
  172. package/packages/table-column/index.js +5 -0
  173. package/packages/table-column/src/main.vue +742 -0
  174. package/packages/table-column/src/mixins/table.js +12 -0
  175. package/packages/tabs/index.js +5 -0
  176. package/packages/tabs/src/main.vue +34 -0
  177. package/packages/tag/index.js +5 -0
  178. package/packages/tag/src/main.vue +16 -0
  179. package/packages/theme-chalk/README.md +33 -0
  180. package/packages/theme-chalk/lib/action-sheet.css +0 -0
  181. package/packages/theme-chalk/lib/base.css +1 -0
  182. package/packages/theme-chalk/lib/button-group.css +1 -0
  183. package/packages/theme-chalk/lib/button.css +1 -0
  184. package/packages/theme-chalk/lib/calendar.css +1 -0
  185. package/packages/theme-chalk/lib/cascader.css +1 -0
  186. package/packages/theme-chalk/lib/cell.css +1 -0
  187. package/packages/theme-chalk/lib/checkbox.css +1 -0
  188. package/packages/theme-chalk/lib/circle.css +1 -0
  189. package/packages/theme-chalk/lib/count-down.css +0 -0
  190. package/packages/theme-chalk/lib/date.css +0 -0
  191. package/packages/theme-chalk/lib/empty.css +0 -0
  192. package/packages/theme-chalk/lib/field.css +1 -0
  193. package/packages/theme-chalk/lib/flow.css +1 -0
  194. package/packages/theme-chalk/lib/fonts/iconfont.scss +530 -0
  195. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  196. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  197. package/packages/theme-chalk/lib/form.css +0 -0
  198. package/packages/theme-chalk/lib/grid-item.css +1 -0
  199. package/packages/theme-chalk/lib/grid.css +0 -0
  200. package/packages/theme-chalk/lib/icon.css +1 -0
  201. package/packages/theme-chalk/lib/image-preview.css +0 -0
  202. package/packages/theme-chalk/lib/index.css +1 -0
  203. package/packages/theme-chalk/lib/list.css +0 -0
  204. package/packages/theme-chalk/lib/loading.css +0 -0
  205. package/packages/theme-chalk/lib/nav-bar.css +0 -0
  206. package/packages/theme-chalk/lib/navbar.css +1 -0
  207. package/packages/theme-chalk/lib/pagination.css +1 -0
  208. package/packages/theme-chalk/lib/picker.css +1 -0
  209. package/packages/theme-chalk/lib/popover.css +0 -0
  210. package/packages/theme-chalk/lib/popup.css +0 -0
  211. package/packages/theme-chalk/lib/radio.css +1 -0
  212. package/packages/theme-chalk/lib/rate.css +0 -0
  213. package/packages/theme-chalk/lib/search.css +0 -0
  214. package/packages/theme-chalk/lib/selector.css +1 -0
  215. package/packages/theme-chalk/lib/skeleton.css +0 -0
  216. package/packages/theme-chalk/lib/stepper.css +1 -0
  217. package/packages/theme-chalk/lib/switch.css +1 -0
  218. package/packages/theme-chalk/lib/tab.css +0 -0
  219. package/packages/theme-chalk/lib/table-column.css +0 -0
  220. package/packages/theme-chalk/lib/table.css +1 -0
  221. package/packages/theme-chalk/lib/tabs.css +1 -0
  222. package/packages/theme-chalk/lib/tag.css +1 -0
  223. package/packages/theme-chalk/lib/theme.css +0 -0
  224. package/packages/theme-chalk/lib/tree.css +1 -0
  225. package/packages/theme-chalk/lib/uploader.css +0 -0
  226. package/packages/theme-chalk/package.json +35 -0
  227. package/packages/theme-chalk/src/action-sheet.scss +0 -0
  228. package/packages/theme-chalk/src/base.scss +182 -0
  229. package/packages/theme-chalk/src/button-group.scss +26 -0
  230. package/packages/theme-chalk/src/button.scss +3 -0
  231. package/packages/theme-chalk/src/calendar.scss +12 -0
  232. package/packages/theme-chalk/src/cascader.scss +12 -0
  233. package/packages/theme-chalk/src/cell.scss +14 -0
  234. package/packages/theme-chalk/src/checkbox.scss +10 -0
  235. package/packages/theme-chalk/src/circle.scss +7 -0
  236. package/packages/theme-chalk/src/common/var.scss +1525 -0
  237. package/packages/theme-chalk/src/count-down.scss +0 -0
  238. package/packages/theme-chalk/src/date.scss +0 -0
  239. package/packages/theme-chalk/src/empty.scss +0 -0
  240. package/packages/theme-chalk/src/field.scss +28 -0
  241. package/packages/theme-chalk/src/flow.scss +542 -0
  242. package/packages/theme-chalk/src/fonts/iconfont.scss +530 -0
  243. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  244. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  245. package/packages/theme-chalk/src/form.scss +15 -0
  246. package/packages/theme-chalk/src/grid-item.scss +8 -0
  247. package/packages/theme-chalk/src/grid.scss +0 -0
  248. package/packages/theme-chalk/src/icon.scss +1661 -0
  249. package/packages/theme-chalk/src/image-preview.scss +0 -0
  250. package/packages/theme-chalk/src/index.scss +38 -0
  251. package/packages/theme-chalk/src/list.scss +0 -0
  252. package/packages/theme-chalk/src/loading.scss +0 -0
  253. package/packages/theme-chalk/src/mixins/color.scss +117 -0
  254. package/packages/theme-chalk/src/mixins/mixins.scss +25 -0
  255. package/packages/theme-chalk/src/nav-bar.scss +0 -0
  256. package/packages/theme-chalk/src/navbar.scss +6 -0
  257. package/packages/theme-chalk/src/pagination.scss +10 -0
  258. package/packages/theme-chalk/src/picker.scss +27 -0
  259. package/packages/theme-chalk/src/popover.scss +0 -0
  260. package/packages/theme-chalk/src/popup.scss +0 -0
  261. package/packages/theme-chalk/src/radio.scss +7 -0
  262. package/packages/theme-chalk/src/rate.scss +0 -0
  263. package/packages/theme-chalk/src/search.scss +0 -0
  264. package/packages/theme-chalk/src/selector.scss +218 -0
  265. package/packages/theme-chalk/src/skeleton.scss +0 -0
  266. package/packages/theme-chalk/src/stepper.scss +10 -0
  267. package/packages/theme-chalk/src/switch.scss +6 -0
  268. package/packages/theme-chalk/src/tab.scss +0 -0
  269. package/packages/theme-chalk/src/table-column.scss +0 -0
  270. package/packages/theme-chalk/src/table.scss +42 -0
  271. package/packages/theme-chalk/src/tabs.scss +21 -0
  272. package/packages/theme-chalk/src/tag.scss +13 -0
  273. package/packages/theme-chalk/src/theme.scss +2 -0
  274. package/packages/theme-chalk/src/tree.scss +115 -0
  275. package/packages/theme-chalk/src/uploader.scss +0 -0
  276. package/packages/uploader/index.js +5 -0
  277. package/packages/uploader/src/main.vue +31 -0
  278. package/src/config/api.js +29 -0
  279. package/src/index.js +130 -0
  280. package/src/utils/axios.js +198 -0
  281. package/src/utils/date-util.js +312 -0
  282. package/src/utils/http.js +66 -0
  283. package/src/utils/rules.js +18 -0
  284. package/src/utils/store.js +21 -0
  285. package/src/utils/util.js +1346 -0
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <div class="flow-message">
3
+ <em-input :label="label" readonly :required="required">
4
+ <template slot="input">
5
+ <div class="template-input-two" style="width: 100%">
6
+ <em-checkbox-group
7
+ v-model="form.notificationType"
8
+ direction="horizontal"
9
+ :sysAppCode="code"
10
+ @change="onInput"
11
+ />
12
+ <div
13
+ class="msg"
14
+ v-show="
15
+ showMsg &&
16
+ form.notificationType &&
17
+ form.notificationType.length > 0
18
+ "
19
+ >
20
+ <!-- :disabled="type != 'reject'" -->
21
+ <em-input
22
+ v-model="form.notificationMsg"
23
+ rows="3"
24
+ @input="onInput"
25
+ autosize
26
+ type="textarea"
27
+ placeholder="请输入留言"
28
+ />
29
+ </div>
30
+ </div>
31
+ </template>
32
+ </em-input>
33
+ </div>
34
+ </template>
35
+ <script>
36
+ export default {
37
+ name:'Message',
38
+ inheritAttrs:false,
39
+ props: {
40
+ type:String,
41
+ code: {
42
+ type: String,
43
+ default: "notification_type", // 代码表默认参数
44
+ },
45
+ defaultNotificationMsg: String, //通知消息默认值
46
+ defaultNotificationType: {
47
+ type: [String,Array],
48
+ default: undefined, // 代码表默认参数
49
+ }, //通知消息默认值
50
+ label: {
51
+ type: String,
52
+ default: "通知方式", // 代码表默认参数
53
+ },
54
+ required: {
55
+ type: Boolean,
56
+ default: false, // 代码表默认参数
57
+ },
58
+ showMsg: {
59
+ // 控制默认消息内容
60
+ type: Boolean,
61
+ default: true,
62
+ },
63
+ },
64
+ data() {
65
+ return {
66
+ form: {
67
+ notificationType: [], //选中消息数组
68
+ notificationMsg: undefined, //系统消息
69
+ },
70
+ defaultType: undefined, // 默认值
71
+ newList: [], //消息通知列表
72
+ };
73
+ },
74
+ watch: {
75
+ // 监听默认消息内容
76
+ defaultNotificationMsg:{
77
+ handler(val) {
78
+ this.form.notificationMsg = val;
79
+ },
80
+ deep:true,
81
+ immediate:true
82
+ },
83
+ // 监听默认消息类型
84
+ defaultNotificationType(val) {
85
+ if(val){
86
+ this.form.notificationType = val
87
+ }
88
+ },
89
+ },
90
+ methods: {
91
+ onInput() {
92
+ this.$emit("onInputMsg", this.form);
93
+ },
94
+ },
95
+ };
96
+ </script>
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <div class="opinton-content">
3
+ <div class="input-box" :type="isFile ? 'haveFile' : 'noHaveFile'">
4
+ <div class="item">
5
+ <em-input
6
+ :label="label"
7
+ :placeholder="placeholder"
8
+ v-model="opinion"
9
+ type="textarea"
10
+ rows="3"
11
+ @input="onInput"
12
+ :disabled="disabled"
13
+ :required="isOpinionRequired == 1 ? true : false"
14
+ />
15
+ </div>
16
+ <div class="item" v-if="opinionList.length > 0 && isHiddenOftenOpinion">
17
+ <em-input label-width="100%" label="请选择常用语">
18
+ <template slot="input">
19
+ <em-radio-group
20
+ v-model="opinion"
21
+ :disabled="disabled"
22
+ :data="opinionList"
23
+ value-key="content"
24
+ label-key="content"
25
+ direction="horizontal"
26
+ @change="onInput"
27
+ />
28
+ </template>
29
+ </em-input>
30
+ </div>
31
+ </div>
32
+ <div class="input-box input-box-file" v-if="isFile">
33
+ <div class="item item-file">
34
+ <!-- <FileList
35
+ :code="code"
36
+ :ownId="ownId"
37
+ label="意见附件"
38
+ type="file"
39
+ ></FileList> -->
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </template>
44
+ <script>
45
+ import { commonOpion } from "../../../../src/config/api";
46
+ import request from '../../../../src/utils/http.js';
47
+ // import FileList from "@/components/public/FileList.vue";
48
+ export default {
49
+ name:'Opinion',
50
+ props: {
51
+ code: String, //附件code
52
+ ownId: String, //附件id
53
+ baseUrl:String,
54
+ label: {
55
+ type: String,
56
+ default: "填写意见", // 显示标题
57
+ },
58
+ placeholder: {
59
+ type: String,
60
+ default: "请填写审核意见", //显示文本框的默认提示字
61
+ },
62
+ isFile: {
63
+ type: Boolean,
64
+ default: false, // 是否显示意见附件
65
+ },
66
+ isHiddenOftenOpinion: {
67
+ type: Boolean, // 是否显示常用语
68
+ default: true,
69
+ },
70
+ isOpinionRequired: {
71
+ type: Number,
72
+ default: () => {
73
+ isOpinionRequired: 1;
74
+ }, // 意见是否必填
75
+ },
76
+ disabled:{
77
+ type:Boolean,
78
+ default:false
79
+ }
80
+ },
81
+ // components: {
82
+ // FileList,
83
+ // },
84
+ data() {
85
+ return {
86
+ opinion: undefined,
87
+ opinionList: [], //意见列表
88
+ };
89
+ },
90
+ created() {
91
+ this.getOpinionList();
92
+ },
93
+ methods: {
94
+ // 获取常用意见列表
95
+ getOpinionList() {
96
+ const _that = this
97
+ request({
98
+ url:_that.baseUrl ? _that.baseUrl + commonOpion: commonOpion,
99
+ params: {},
100
+ }).then((res) => {
101
+ if (res.rCode == 0) {
102
+ this.opinionList = res.results;
103
+ }
104
+ });
105
+ },
106
+ // 将input的值传递到父组件
107
+ onInput(val) {
108
+ this.$emit("onInputOpintion", val);
109
+ },
110
+ },
111
+ };
112
+ </script>
@@ -0,0 +1,202 @@
1
+ <template>
2
+ <div class="process-reject">
3
+ <div class="reject-content">
4
+ <div class="present-node">
5
+ <div class="label">当前节点:</div>
6
+ <div>{{ processObj.taskExamine.nodeName }}</div>
7
+ </div>
8
+ <Opinion
9
+ :code="processObj.attachedCode"
10
+ :ownId="$route.query.pendingId"
11
+ @onInputOpintion="onInputOpintion"
12
+ :isOpinionRequired="isBanInputOpinion"
13
+ :disabled="isBanInputOpinion != 0"
14
+ :isHiddenOftenOpinion="isHiddenOftenOpinion == 1 ? false : true"
15
+ ></Opinion>
16
+ <div class="input-box">
17
+ <div class="item">
18
+ <em-input label="驳回对象">
19
+ <template slot="input">
20
+ <em-radio-group v-model="form.nextNodeId" :data="rejectObj" />
21
+ </template>
22
+ </em-input>
23
+ </div>
24
+ <Message
25
+ ref="message"
26
+ :code="'notification_type'"
27
+ :defaultNotificationType="defaultNotificationType"
28
+ :defaultNotificationMsg="form.notificationMsg"
29
+ @onInputMsg="onInputMsg"
30
+ :type="type"
31
+ ></Message>
32
+ </div>
33
+ </div>
34
+ <div class="btn-list">
35
+ <div class="btn" @click="goBack">取消</div>
36
+ <div class="btn" @click="onSubmit()">确定</div>
37
+ </div>
38
+ </div>
39
+ </template>
40
+ <script>
41
+ import { taskRejectHtml, toTaskRejectHtml } from '../../../../src/config/api';
42
+ import request from '../../../../src/utils/http.js';
43
+ import Opinion from './Opinion.vue';
44
+ import Message from './Message.vue';
45
+ export default {
46
+ name: 'Reject',
47
+ props: {
48
+ appid: String,
49
+ type: String,
50
+ pendingId: String,
51
+ userId: String,
52
+ beforeSubmit: Function,
53
+ baseUrl: String
54
+ },
55
+ data() {
56
+ return {
57
+ showMsg: false, // 判断是否显示系统消息
58
+ showOpinion: false, // 常用意见弹框
59
+ form: {
60
+ opinion: undefined, // 审批意见
61
+ notificationMsg: undefined, //系统消息
62
+ nextNodeId: undefined
63
+ },
64
+ processObj: {
65
+ taskExamine: { nodeName: undefined },
66
+ nodeInfoMap: { nextUserList: [] }
67
+ },
68
+ rejectObj: [], //
69
+ isHiddenOftenOpinion: undefined, //是否隐藏常用意见
70
+ nodeDefaultRejectOpinion: undefined, //默认提交意见
71
+ checked: true, // 系统消息是否选中
72
+ defaultNotificationType: undefined, ///默认选中通知类型
73
+ isBanInputOpinion: 0 //是否禁用意见
74
+ };
75
+ },
76
+ components: { Opinion, Message },
77
+ created() {
78
+ this.style = {
79
+ 'padding-top': sessionStorage.getItem('pt')
80
+ ? sessionStorage.getItem('pt') + 'px'
81
+ : '30px'
82
+ };
83
+ this.getProcessObj();
84
+ },
85
+ methods: {
86
+ // 通知消息回调
87
+ onInputMsg(obj) {
88
+ this.form.notificationType = obj.notificationType.join(',');
89
+ this.form.notificationMsg = obj.notificationMsg;
90
+ },
91
+ // 意见回调
92
+ onInputOpintion(val) {
93
+ this.form.opinion = val;
94
+ },
95
+ goBack() {
96
+ this.$parent.$emit('close');
97
+ },
98
+ // 提交流程
99
+ onSubmit() {
100
+ if (!this.form.opinion && this.isBanInputOpinion == 0) {
101
+ this.$toast('请选择输入审批意见');
102
+ return;
103
+ }
104
+ let str = '';
105
+ if (this.form.opinion) {
106
+ str = this.form.opinion.replace(/\s+/g, '');
107
+ }
108
+ if ((!this.form.opinion || str === '') && this.nodeDefaultRejectOpinion) {
109
+ this.form.opinion = this.nodeDefaultRejectOpinion;
110
+ }
111
+ if (this.beforeSubmit) {
112
+ this.beforeSubmit({ pendingId: this.pendingId, ...this.form });
113
+ return;
114
+ }
115
+ this.$toast.loading({
116
+ message: '加载中...',
117
+ forbidClick: true,
118
+ loadingType: 'spinner',
119
+ overlay: true,
120
+ duration: 0
121
+ });
122
+ const _that = this
123
+ request({
124
+ url: _that.baseUrl ? _that.baseUrl + taskRejectHtml : taskRejectHtml,
125
+ params: {
126
+ pendingId: _that.pendingId,
127
+ // nextNodeId: this.dataJson.taskExamine.nodeId,
128
+ ...this.form
129
+ }
130
+ }).then(res => {
131
+ if (res.rCode == 0) {
132
+ this.$toast('操作成功');
133
+ this.$parent.$emit('success');
134
+ } else {
135
+ this.$toast(res.msg);
136
+ }
137
+ });
138
+ },
139
+ // 确认常用意见
140
+ onConfirmOpinion(val) {
141
+ this.form.opinion = val.content;
142
+ this.showOpinion = false;
143
+ },
144
+ // 获取驳回信息
145
+ getProcessObj() {
146
+ const _that = this
147
+ this.$toast.loading({
148
+ message: '加载中...',
149
+ forbidClick: true,
150
+ loadingType: 'spinner',
151
+ overlay: true,
152
+ duration: 0
153
+ });
154
+ request({
155
+ url: _that.baseUrl ? _that.baseUrl + toTaskRejectHtml : toTaskRejectHtml,
156
+ params: {
157
+ appid: this.appid,
158
+ pendingId: this.pendingId,
159
+ identityIds: this.userId
160
+ }
161
+ }).then(res => {
162
+ if (res.rCode == 0) {
163
+ this.$toast.clear();
164
+ this.isHiddenOftenOpinion =
165
+ res.results.nodeInfoMap.nodeExtAttr.isHiddenOftenOpinion;
166
+ this.nodeDefaultRejectOpinion =
167
+ res.results.nodeInfoMap.nodeExtAttr.nodeDefaultRejectOpinion;
168
+ this.isBanInputOpinion =
169
+ res.results.nodeInfoMap.nodeExtAttr.isBanInputOpinion;
170
+ if (!this.isBanInputOpinion) {
171
+ this.isBanInputOpinion = 0;
172
+ }
173
+ this.processObj = res.results;
174
+ this.form.notificationMsg = res.results.defaultNotificationMessage;
175
+ this.defaultNotificationType = res.results.defaultNotificationType.split(
176
+ ','
177
+ );
178
+ let list = [];
179
+ if (res.results.rejectTaskNodes) {
180
+ for (let i in res.results.rejectTaskNodes) {
181
+ let obj = {
182
+ id: i,
183
+ name: res.results.rejectTaskNodes[i]
184
+ };
185
+ list.push(obj);
186
+ }
187
+ this.rejectObj = list;
188
+ if (this.rejectObj.length > 0) {
189
+ this.form.nextNodeId = this.rejectObj[0].id;
190
+ this.rejectObj.map(item => {
191
+ item.value = item.id;
192
+ });
193
+ }
194
+ }
195
+ } else {
196
+ this.$toast(res.message);
197
+ }
198
+ });
199
+ }
200
+ }
201
+ };
202
+ </script>