apply-clients 3.3.34 → 3.3.38

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 (331) hide show
  1. package/build/css-loaders.js +34 -0
  2. package/build/dev-android.js +101 -0
  3. package/build/dev-client.js +8 -0
  4. package/build/dev-server-app.js +76 -0
  5. package/build/dev-server.js +130 -0
  6. package/build/example-server.js +80 -0
  7. package/build/release.sh +28 -0
  8. package/build/utils.js +80 -0
  9. package/build/webpack.base.conf.js +84 -0
  10. package/build/webpack.baseandroid.conf.js +84 -0
  11. package/build/webpack.dev.conf.js +39 -0
  12. package/build/webpack.devandroid.conf.js +34 -0
  13. package/build/webpack.example.conf.js +49 -0
  14. package/build/webpack.prod.conf.js +60 -0
  15. package/build/webpack.prodandroid.conf.js +60 -0
  16. package/build/webpack.test.conf.js +31 -0
  17. package/index.html +33 -33
  18. package/package.json +1 -1
  19. package/src/AndroidApp.vue +30 -30
  20. package/src/android.js +21 -21
  21. package/src/apply.js +2 -8
  22. package/src/applyAndroid.js +1 -8
  23. package/src/components/android/AppOnetomany.vue +305 -305
  24. package/src/components/android/AppServiceView.vue +570 -570
  25. package/src/components/android/AppTakePic.vue +143 -143
  26. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
  27. package/src/components/android/Function/AppInstallFunction.vue +1 -1
  28. package/src/components/android/Process/AppExplorationUser.vue +1 -1
  29. package/src/components/android/Process/AppServiceControl.vue +756 -756
  30. package/src/components/android/Process/Processes/AppChargeManagement.vue +468 -468
  31. package/src/components/android/Process/Processes/AppDevicesManagement.vue +508 -508
  32. package/src/components/android/Process/Processes/AppInstallationDetails.vue +471 -471
  33. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +297 -297
  34. package/src/components/android/Supervisory/AppProcessSupervisory.vue +1 -1
  35. package/src/components/android/Supervisory/AppSupervisoryCart.vue +115 -115
  36. package/src/components/product/ApplyCharge/ApplyChargeList.vue +88 -21
  37. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +30 -30
  38. package/src/components/product/Function/InstallFunction.vue +10 -0
  39. package/src/components/product/Function/InstallInfoSelect.vue +4 -0
  40. package/src/components/product/Function/Service/FunctionServiceControl.vue +4 -4
  41. package/src/components/product/Install/InstallProject.vue +194 -0
  42. package/src/components/product/Material/MaterialDetailed.vue +13 -2
  43. package/src/components/product/OldApply/Handle/HandleApply.vue +11 -0
  44. package/src/components/product/OldApply/Monitor/MonitorApply.vue +62 -1
  45. package/src/components/product/OldApply/OldApply.vue +2 -2
  46. package/src/components/product/OldApply/OldApplyMessage.vue +411 -411
  47. package/src/components/product/Onetomany.vue +381 -381
  48. package/src/components/product/Order/OrderApply.vue +47 -47
  49. package/src/components/product/Order/OrderApplyList.vue +263 -263
  50. package/src/components/product/Order/OrderMessage.vue +237 -237
  51. package/src/components/product/Process/ExplorationSelect.vue +4 -0
  52. package/src/components/product/Process/ExplorationUser.vue +10 -0
  53. package/src/components/product/Process/Processes/InstallationDetails.vue +578 -578
  54. package/src/components/product/Process/Processes/Print/printBuildOrder.vue +8 -30
  55. package/src/components/product/Process/Processes/Print/printCharge.vue +142 -139
  56. package/src/components/product/Process/Processes/Print/printRefund.vue +16 -13
  57. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +186 -186
  58. package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
  59. package/src/components/product/Process/Processes/devicesManagement.vue +478 -478
  60. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  61. package/src/components/product/Process/Processes/selectUserinfo.vue +182 -182
  62. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  63. package/src/components/product/Process/Service/ServiceControl.vue +1 -1
  64. package/src/components/product/Process/ShowBackReason.vue +33 -33
  65. package/src/components/product/ServiceView.vue +637 -637
  66. package/src/components/product/Stop/StopApply.vue +101 -101
  67. package/src/components/product/Stop/StopApplyList.vue +271 -271
  68. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +804 -804
  69. package/src/components/product/Supervisory/SupervisoryControl.vue +10 -0
  70. package/src/components/product/Supervisory/SupervisoryList.vue +4 -0
  71. package/src/components/product/Supervisory/SupervisoryhCart.vue +124 -124
  72. package/src/components/product/VueUtils/ApplyUpload.vue +262 -262
  73. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -1090
  74. package/src/main.js +23 -23
  75. package/dist-android/index.html +0 -3
  76. package/dist-android/static/.gitkeep +0 -0
  77. package/dist-android/static/0.js +0 -2
  78. package/dist-android/static/0.js.map +0 -1
  79. package/dist-android/static/1.js +0 -2
  80. package/dist-android/static/1.js.map +0 -1
  81. package/dist-android/static/10.js +0 -2
  82. package/dist-android/static/10.js.map +0 -1
  83. package/dist-android/static/100.js +0 -2
  84. package/dist-android/static/100.js.map +0 -1
  85. package/dist-android/static/11.js +0 -2
  86. package/dist-android/static/11.js.map +0 -1
  87. package/dist-android/static/12.js +0 -2
  88. package/dist-android/static/12.js.map +0 -1
  89. package/dist-android/static/13.js +0 -2
  90. package/dist-android/static/13.js.map +0 -1
  91. package/dist-android/static/14.js +0 -2
  92. package/dist-android/static/14.js.map +0 -1
  93. package/dist-android/static/15.js +0 -2
  94. package/dist-android/static/15.js.map +0 -1
  95. package/dist-android/static/16.js +0 -2
  96. package/dist-android/static/16.js.map +0 -1
  97. package/dist-android/static/17.js +0 -2
  98. package/dist-android/static/17.js.map +0 -1
  99. package/dist-android/static/18.js +0 -2
  100. package/dist-android/static/18.js.map +0 -1
  101. package/dist-android/static/19.js +0 -2
  102. package/dist-android/static/19.js.map +0 -1
  103. package/dist-android/static/2.js +0 -2
  104. package/dist-android/static/2.js.map +0 -1
  105. package/dist-android/static/20.js +0 -2
  106. package/dist-android/static/20.js.map +0 -1
  107. package/dist-android/static/21.js +0 -2
  108. package/dist-android/static/21.js.map +0 -1
  109. package/dist-android/static/22.js +0 -2
  110. package/dist-android/static/22.js.map +0 -1
  111. package/dist-android/static/23.js +0 -2
  112. package/dist-android/static/23.js.map +0 -1
  113. package/dist-android/static/24.js +0 -2
  114. package/dist-android/static/24.js.map +0 -1
  115. package/dist-android/static/25.js +0 -2
  116. package/dist-android/static/25.js.map +0 -1
  117. package/dist-android/static/26.js +0 -2
  118. package/dist-android/static/26.js.map +0 -1
  119. package/dist-android/static/27.js +0 -2
  120. package/dist-android/static/27.js.map +0 -1
  121. package/dist-android/static/28.js +0 -2
  122. package/dist-android/static/28.js.map +0 -1
  123. package/dist-android/static/29.js +0 -2
  124. package/dist-android/static/29.js.map +0 -1
  125. package/dist-android/static/3.js +0 -2
  126. package/dist-android/static/3.js.map +0 -1
  127. package/dist-android/static/30.js +0 -2
  128. package/dist-android/static/30.js.map +0 -1
  129. package/dist-android/static/31.js +0 -2
  130. package/dist-android/static/31.js.map +0 -1
  131. package/dist-android/static/32.js +0 -2
  132. package/dist-android/static/32.js.map +0 -1
  133. package/dist-android/static/33.js +0 -2
  134. package/dist-android/static/33.js.map +0 -1
  135. package/dist-android/static/34.js +0 -2
  136. package/dist-android/static/34.js.map +0 -1
  137. package/dist-android/static/35.js +0 -2
  138. package/dist-android/static/35.js.map +0 -1
  139. package/dist-android/static/36.js +0 -2
  140. package/dist-android/static/36.js.map +0 -1
  141. package/dist-android/static/37.js +0 -2
  142. package/dist-android/static/37.js.map +0 -1
  143. package/dist-android/static/38.js +0 -2
  144. package/dist-android/static/38.js.map +0 -1
  145. package/dist-android/static/39.js +0 -2
  146. package/dist-android/static/39.js.map +0 -1
  147. package/dist-android/static/4.js +0 -2
  148. package/dist-android/static/4.js.map +0 -1
  149. package/dist-android/static/40.js +0 -2
  150. package/dist-android/static/40.js.map +0 -1
  151. package/dist-android/static/41.js +0 -2
  152. package/dist-android/static/41.js.map +0 -1
  153. package/dist-android/static/42.js +0 -2
  154. package/dist-android/static/42.js.map +0 -1
  155. package/dist-android/static/43.js +0 -2
  156. package/dist-android/static/43.js.map +0 -1
  157. package/dist-android/static/44.js +0 -2
  158. package/dist-android/static/44.js.map +0 -1
  159. package/dist-android/static/45.js +0 -2
  160. package/dist-android/static/45.js.map +0 -1
  161. package/dist-android/static/46.js +0 -2
  162. package/dist-android/static/46.js.map +0 -1
  163. package/dist-android/static/47.js +0 -2
  164. package/dist-android/static/47.js.map +0 -1
  165. package/dist-android/static/48.js +0 -2
  166. package/dist-android/static/48.js.map +0 -1
  167. package/dist-android/static/49.js +0 -2
  168. package/dist-android/static/49.js.map +0 -1
  169. package/dist-android/static/5.js +0 -2
  170. package/dist-android/static/5.js.map +0 -1
  171. package/dist-android/static/50.js +0 -2
  172. package/dist-android/static/50.js.map +0 -1
  173. package/dist-android/static/51.js +0 -2
  174. package/dist-android/static/51.js.map +0 -1
  175. package/dist-android/static/52.js +0 -2
  176. package/dist-android/static/52.js.map +0 -1
  177. package/dist-android/static/53.js +0 -2
  178. package/dist-android/static/53.js.map +0 -1
  179. package/dist-android/static/54.js +0 -2
  180. package/dist-android/static/54.js.map +0 -1
  181. package/dist-android/static/55.js +0 -2
  182. package/dist-android/static/55.js.map +0 -1
  183. package/dist-android/static/56.js +0 -2
  184. package/dist-android/static/56.js.map +0 -1
  185. package/dist-android/static/57.js +0 -2
  186. package/dist-android/static/57.js.map +0 -1
  187. package/dist-android/static/58.js +0 -2
  188. package/dist-android/static/58.js.map +0 -1
  189. package/dist-android/static/59.js +0 -2
  190. package/dist-android/static/59.js.map +0 -1
  191. package/dist-android/static/6.js +0 -2
  192. package/dist-android/static/6.js.map +0 -1
  193. package/dist-android/static/60.js +0 -2
  194. package/dist-android/static/60.js.map +0 -1
  195. package/dist-android/static/61.js +0 -2
  196. package/dist-android/static/61.js.map +0 -1
  197. package/dist-android/static/62.js +0 -2
  198. package/dist-android/static/62.js.map +0 -1
  199. package/dist-android/static/63.js +0 -2
  200. package/dist-android/static/63.js.map +0 -1
  201. package/dist-android/static/64.js +0 -2
  202. package/dist-android/static/64.js.map +0 -1
  203. package/dist-android/static/65.js +0 -2
  204. package/dist-android/static/65.js.map +0 -1
  205. package/dist-android/static/66.js +0 -2
  206. package/dist-android/static/66.js.map +0 -1
  207. package/dist-android/static/67.js +0 -2
  208. package/dist-android/static/67.js.map +0 -1
  209. package/dist-android/static/68.js +0 -2
  210. package/dist-android/static/68.js.map +0 -1
  211. package/dist-android/static/69.js +0 -2
  212. package/dist-android/static/69.js.map +0 -1
  213. package/dist-android/static/7.js +0 -6
  214. package/dist-android/static/7.js.map +0 -1
  215. package/dist-android/static/70.js +0 -2
  216. package/dist-android/static/70.js.map +0 -1
  217. package/dist-android/static/71.js +0 -2
  218. package/dist-android/static/71.js.map +0 -1
  219. package/dist-android/static/72.js +0 -2
  220. package/dist-android/static/72.js.map +0 -1
  221. package/dist-android/static/73.js +0 -2
  222. package/dist-android/static/73.js.map +0 -1
  223. package/dist-android/static/74.js +0 -2
  224. package/dist-android/static/74.js.map +0 -1
  225. package/dist-android/static/75.js +0 -2
  226. package/dist-android/static/75.js.map +0 -1
  227. package/dist-android/static/76.js +0 -2
  228. package/dist-android/static/76.js.map +0 -1
  229. package/dist-android/static/77.js +0 -2
  230. package/dist-android/static/77.js.map +0 -1
  231. package/dist-android/static/78.js +0 -2
  232. package/dist-android/static/78.js.map +0 -1
  233. package/dist-android/static/79.js +0 -2
  234. package/dist-android/static/79.js.map +0 -1
  235. package/dist-android/static/8.js +0 -2
  236. package/dist-android/static/8.js.map +0 -1
  237. package/dist-android/static/80.js +0 -2
  238. package/dist-android/static/80.js.map +0 -1
  239. package/dist-android/static/81.js +0 -2
  240. package/dist-android/static/81.js.map +0 -1
  241. package/dist-android/static/82.js +0 -2
  242. package/dist-android/static/82.js.map +0 -1
  243. package/dist-android/static/83.js +0 -2
  244. package/dist-android/static/83.js.map +0 -1
  245. package/dist-android/static/84.js +0 -2
  246. package/dist-android/static/84.js.map +0 -1
  247. package/dist-android/static/85.js +0 -2
  248. package/dist-android/static/85.js.map +0 -1
  249. package/dist-android/static/86.js +0 -2
  250. package/dist-android/static/86.js.map +0 -1
  251. package/dist-android/static/87.js +0 -2
  252. package/dist-android/static/87.js.map +0 -1
  253. package/dist-android/static/88.js +0 -2
  254. package/dist-android/static/88.js.map +0 -1
  255. package/dist-android/static/89.js +0 -2
  256. package/dist-android/static/89.js.map +0 -1
  257. package/dist-android/static/9.js +0 -3
  258. package/dist-android/static/9.js.map +0 -1
  259. package/dist-android/static/90.js +0 -2
  260. package/dist-android/static/90.js.map +0 -1
  261. package/dist-android/static/91.js +0 -2
  262. package/dist-android/static/91.js.map +0 -1
  263. package/dist-android/static/92.js +0 -2
  264. package/dist-android/static/92.js.map +0 -1
  265. package/dist-android/static/93.js +0 -2
  266. package/dist-android/static/93.js.map +0 -1
  267. package/dist-android/static/94.js +0 -2
  268. package/dist-android/static/94.js.map +0 -1
  269. package/dist-android/static/95.js +0 -2
  270. package/dist-android/static/95.js.map +0 -1
  271. package/dist-android/static/96.js +0 -2
  272. package/dist-android/static/96.js.map +0 -1
  273. package/dist-android/static/97.js +0 -2
  274. package/dist-android/static/97.js.map +0 -1
  275. package/dist-android/static/98.js +0 -2
  276. package/dist-android/static/98.js.map +0 -1
  277. package/dist-android/static/99.js +0 -2
  278. package/dist-android/static/99.js.map +0 -1
  279. package/dist-android/static/app.css +0 -2
  280. package/dist-android/static/app.css.map +0 -1
  281. package/dist-android/static/app.js +0 -80
  282. package/dist-android/static/app.js.map +0 -1
  283. package/dist-android/static/batchleft.png +0 -0
  284. package/dist-android/static/batchright.png +0 -0
  285. package/dist-android/static/bluemainbg.jpg +0 -0
  286. package/dist-android/static/config.json +0 -7
  287. package/dist-android/static/denglu.png +0 -0
  288. package/dist-android/static/glyphicons-halflings-regular.eot +0 -0
  289. package/dist-android/static/glyphicons-halflings-regular.svg +0 -288
  290. package/dist-android/static/glyphicons-halflings-regular.ttf +0 -0
  291. package/dist-android/static/glyphicons-halflings-regular.woff +0 -0
  292. package/dist-android/static/glyphicons-halflings-regular.woff2 +0 -0
  293. package/dist-android/static/huangtengbiaozhi.png +0 -0
  294. package/dist-android/static/jingyin.jpg +0 -0
  295. package/dist-android/static/login_bg.jpg +0 -0
  296. package/dist-android/static/login_title.png +0 -0
  297. package/dist-android/static/login_title1.png +0 -0
  298. package/dist-android/static/loginbg.jpg +0 -0
  299. package/dist-android/static/loginlogo.png +0 -0
  300. package/dist-android/static/main_logo.png +0 -0
  301. package/dist-android/static/mainbg.jpg +0 -0
  302. package/dist-android/static/menulogo.png +0 -0
  303. package/dist-android/static/newmainbg.jpg +0 -0
  304. package/dist-android/static/psicon.png +0 -0
  305. package/dist-android/static/singleleft.png +0 -0
  306. package/dist-android/static/singleright.png +0 -0
  307. package/dist-android/static/treeopen.png +0 -0
  308. package/dist-android/static/treeout.png +0 -0
  309. package/dist-android/static/treeset.png +0 -0
  310. package/dist-android/static/usericon.png +0 -0
  311. package/dist-android/static/workflow_apply.json +0 -766
  312. package/dist-android/static/xinxi.png +0 -0
  313. package/dist-android/static//344/277/256/346/224/271/345/257/206/347/240/201.png +0 -0
  314. package/dist-android/static//345/256/211/346/243/200/345/257/274/350/210/252/347/253/226/345/261/2173.png +0 -0
  315. package/dist-android/static//345/257/274/345/207/272/346/225/260/346/215/256.png +0 -0
  316. package/dist-android/static//346/270/205/347/251/272/346/225/260/346/215/256.png +0 -0
  317. package/src/filiale/wuan/android.js +0 -0
  318. package/src/filiale/wuan/pc.js +0 -4
  319. package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
  320. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +0 -414
  321. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +0 -456
  322. package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
  323. package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
  324. package/src/filiale/yuchuan/android.js +0 -8
  325. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +0 -517
  326. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +0 -343
  327. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +0 -356
  328. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +0 -131
  329. package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
  330. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +0 -517
  331. package/src/filiale/yuchuan/pc.js +0 -13
@@ -1,637 +1,637 @@
1
- <template>
2
-
3
- <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
4
- <form class="form-horizontal">
5
- <div class="form-group">
6
- <div v-for="(index,item) in data.fields">
7
- <!--input-->
8
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
9
- v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)"
10
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
11
- <label :style="item.label_style ? item.label_style : ''"
12
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
13
- <div :style="item.value_style ? item.value_style:''"
14
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
15
- <input class="form-control input_view" style=""
16
- :type="item.type"
17
- v-model="data.fields[index].value"
18
- :placeholder="item.placeholder"
19
- :value="data.fields[index].value"
20
- :readonly="item.readonly"
21
- :disabled="item.disabled"
22
- @change="onchange(index)"
23
- @blur="onblur(index)"
24
- @input="oninput(index)"
25
- />
26
- </div>
27
- </div>
28
-
29
- <!--时间datepicker-->
30
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
31
- v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)"
32
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
33
- <label
34
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
35
- <div :style="item.value_style ? item.value_style:''"
36
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
37
- <datepicker
38
- @change="onchange(index)"
39
- @blur="onblur(index)"
40
- :placeholder="item.placeholder"
41
- :value.sync="data.fields[index].value"
42
- :format="item.format ? item.format : 'yyyy-MM-dd'"
43
- v-model="data.fields[index].value"
44
- :readonly="item.readonly"
45
- :disabled="item.disabled"
46
- :show-reset-button="reset">
47
- </datepicker>
48
- </div>
49
- </div>
50
-
51
- <!--textarea-->
52
- <div :style="item.style ? item.style+';margin-bottom: 20px':'margin-bottom: 20px'"
53
- v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)"
54
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
55
- <label :style="item.label_style ? item.label_style : ''"
56
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
57
- <div :style="item.value_style ? item.value_style:''"
58
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
59
- <textarea
60
- :readonly="item.readonly"
61
- :disabled="item.disabled"
62
- class="form-control input_view"
63
- style="width: 100%;height: 100%"
64
- :rows="item.rows"
65
- v-model="data.fields[index].value"
66
- :value="data.fields[index].value"
67
- @change="onchange(index)"
68
- @blur="onblur(index)"
69
- @input="oninput(index)"
70
- >
71
- </textarea>
72
- </div>
73
- </div>
74
-
75
- <!--select-->
76
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
77
- v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)"
78
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
79
- <label
80
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
81
- <div :style="item.value_style ? item.value_style:''"
82
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
83
- <input-select
84
- class="select select_list"
85
- @blur="onblur(index)"
86
- @change="onchange(index)"
87
- @select-search="selectSearch($arguments,index)"
88
- :readonly="item.readonly"
89
- :disable="item.disabled"
90
- :value.sync="data.fields[index].value"
91
- v-model="data.fields[index].value"
92
- :options='data.fields[index].options'
93
- :valueSingle="true"></input-select>
94
- </div>
95
- </div>
96
-
97
- <!--checkbox-->
98
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
99
- v-if="item.type==='checkbox' && !item.hidden && (item.device === 'pc' || !item.device)"
100
- :class="[item.required && item.value.length === 0 ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
101
- <label v-if="item.label"
102
- :class="item.label_bootstraped?item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
103
- <div :style="item.value_style ? item.value_style:''"
104
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
105
- <label class="checkbox-inline" v-for="(index2,row) in item.options">
106
- <input type="checkbox" class=""
107
- :readonly="data.fields[index].readonly"
108
- :disabled="data.fields[index].disabled"
109
- v-model="data.fields[index].value"
110
- :value="data.fields[index].options[index2].value"
111
- @change="onchange(index)"
112
- @blur="onblur(index)">
113
- {{row.label}}
114
- </label>
115
- </div>
116
- </div>
117
- </div>
118
- </div>
119
-
120
- <!-- onetomany -->
121
- <div class="" v-for="(index,item) in data.onetomany">
122
- <onetomany :selectdata="data" :onetomany="item" :index="index" v-if="item.device === 'pc' || !item.device"></onetomany>
123
- </div>
124
-
125
- <div v-for="(i,item) in data.components">
126
- <component v-if="item.device === 'pc' || !item.device" :is="item.name" :selectdata="data" :mark="item.mark"></component>
127
- </div>
128
-
129
- <!--自定义组件-->
130
- <slot></slot>
131
- <!--公司等属性-->
132
- <div class="col-sm-12 form-group text-center" style="padding-top:8px">
133
- <div class="col-sm-3 form-group center-block">
134
- <label class="col-sm-5">所属公司:</label>
135
- <div class="col-sm-6" style="text-align: left">
136
- {{model.orgs}}
137
- </div>
138
- </div>
139
- <div class="col-sm-3 form-group center-block">
140
- <label class="col-sm-5">部门:</label>
141
- <div class="col-sm-6" style="text-align: left">
142
- {{model.parentname}}
143
- </div>
144
- </div>
145
- <div class="col-sm-3 form-group center-block">
146
- <label class="col-sm-5">操作人:</label>
147
- <div class="col-sm-6 " style="text-align: left">
148
- {{model.operator}}
149
- </div>
150
- </div>
151
- <div class="col-sm-3 form-group center-block">
152
- <label class="col-sm-5">操作日期:</label>
153
- <div class="col-sm-6" style="text-align: left">
154
- {{model.operate_date}}
155
- </div>
156
- </div>
157
- </div>
158
- <!-- 按钮组 -->
159
- <div class="from-group col-sm-12 text-center">
160
- <!-- 按钮组 -->
161
- <button v-for="(index,button) in data.buttons"
162
- :disabled="button.disabled && disable_button"
163
- style="min-width:100px"
164
- :class="button.disabled && disable_button ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
165
- v-if="!button.hidden"
166
- @click.prevent="click_but(button)"
167
- >
168
- {{button.button_name}}
169
- </button>
170
- </div>
171
-
172
- <!-- 按钮模态框 -->
173
- <modal v-if="showButModal" :show.sync="showButModal" backdrop="false" large>
174
- <header slot="modal-header" class="modal-header">
175
- <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
176
- <span class="modal-title"><font
177
- size="3">{{data.button.button_name}}</font></span>
178
- </header>
179
- <article slot="modal-body" class="modal-body clearfix">
180
- <div class="form-group" style="padding: 0 150px">
181
- <div v-for="(index,item) in data.button.button_fields">
182
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
183
- v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
184
- <label :style="item.label_style ? item.label_style : ''"
185
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
186
- <div :style="item.value_style ? item.value_style : ''"
187
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
188
- <input class="form-control input_view"
189
- :placeholder="item.placeholder"
190
- :type="item.type"
191
- v-model="item.value"
192
- :value="item.value"
193
- :readonly="item.readonly"
194
- :disabled="item.disabled"
195
- @change="onbutchange(index)"
196
- @blur="onbutblur(index)"
197
- @input="onbutinput(index)"
198
- />
199
- </div>
200
- </div>
201
-
202
- <!--时间datepicker-->
203
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
204
- v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
205
- <label :style="item.label_style ? item.label_style : ''"
206
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
207
- <div :style="item.value_style ? item.value_style : ''"
208
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
209
- <datepicker
210
- :placeholder="item.placeholder"
211
- :value.sync="item.value"
212
- v-model="item.value"
213
- :readonly="item.readonly"
214
- :disabled="item.disabled"
215
- :format="item.format ? item.format : 'yyyy-MM-dd'"
216
- :show-reset-button="true"
217
- @change="onbutchange(index)"
218
- @blur="onbutblur(index)"
219
- ></datepicker>
220
- </div>
221
- </div>
222
-
223
- <!--select-->
224
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
225
- v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
226
- <label :style="item.label_style ? item.label_style : ''"
227
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
228
- <div :style="item.value_style ? item.value_style : ''"
229
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
230
- <input-select
231
- class="select select_list"
232
- :value.sync="item.value"
233
- v-model="item.value"
234
- :options='item.options'
235
- :readonly="item.readonly"
236
- :disable="item.disabled"
237
- :valueSingle="true"
238
- @blur="onbutblur(index)"
239
- @change="onbutchange(index)"
240
- ></input-select>
241
- </div>
242
- </div>
243
-
244
- <!--textarea-->
245
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
246
- v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
247
- <label :style="item.label_style ? item.label_style : ''"
248
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
249
- <div :style="item.value_style ? item.value_style : ''"
250
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
251
- <textarea
252
- class="form-control input_view"
253
- style="width: 100%;height: 100%"
254
- v-model="item.value"
255
- :value="item.value"
256
- :rows="item.rows"
257
- :readonly="item.readonly"
258
- :disabled="item.disabled"
259
- @change="onbutchange(index)"
260
- @blur="onbutblur(index)"
261
- @input="onbutinput(index)"
262
- ></textarea>
263
- </div>
264
- </div>
265
- </div>
266
- </div>
267
- </article>
268
- <footer slot="modal-footer" class="modal-footer">
269
- <button :class="disable_modal_button ? 'btn btn-default':'btn btn-primary'"
270
- :disabled="disable_modal_button" type="button" @click="confirmModal()">
271
- 确认
272
- </button>
273
- </footer>
274
- </modal>
275
- </form>
276
- </div>
277
-
278
- </template>
279
- <script>
280
- import Vue from 'vue'
281
- import {isEmpty} from '../Util'
282
- // Date格式化
283
- Date.prototype.Format = function (fmt) {
284
- var o = {
285
- 'M+': this.getMonth() + 1, // 月份
286
- 'd+': this.getDate(), // 日
287
- 'H+': this.getHours(), // 小时
288
- 'm+': this.getMinutes(), // 分
289
- 's+': this.getSeconds(), // 秒
290
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
291
- 'S': this.getMilliseconds() // 毫秒
292
- }
293
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
294
- for (var k in o) {
295
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
296
- }
297
- return fmt
298
- }
299
-
300
- export default {
301
- title: '报建业务通用组件',
302
- props: {
303
- data: {
304
- type: Object
305
- }
306
- },
307
- data () {
308
- return {
309
- model: {}, // 公司等属性
310
- disable_button: true, // 控制按钮禁用
311
- disable_modal_button: true, // 控制按钮禁用
312
- showButModal: false
313
- }
314
- },
315
- watch: {
316
- deep: true
317
- },
318
- computed: {
319
-
320
- },
321
- created () {
322
- // 初始化数据
323
- this.initializtion()
324
- if (this.data.readyEvent) {
325
- this.$dispatch(this.data.readyEvent)
326
- }
327
- this.$dispatch('initializtionView')
328
- },
329
- methods: {
330
- // 初始化数据
331
- initializtion () {
332
- for (const item of this.data.fields) {
333
- this.data[item.field] = item.value
334
- }
335
-
336
- // 是否禁用按钮
337
- this.disableButton()
338
-
339
- // 公司等属性初始化
340
- if (this.data.orgs) {
341
- this.model.orgs = this.data.orgs
342
- } else {
343
- this.model.orgs = this.$login.f.orgs
344
- }
345
- if (this.data.parentname) {
346
- this.model.parentname = this.data.parentname
347
- } else {
348
- this.model.parentname = this.$login.f.f_department_name
349
- }
350
- if (this.data.operate_date) {
351
- this.model.operate_date = this.data.operate_date
352
- } else {
353
- this.model.operate_date = new Date().Format('yyyy-MM-dd')
354
- }
355
- if (this.data.operator) {
356
- this.model.operator = this.data.operator
357
- } else {
358
- this.model.operator = this.$login.f.name
359
- }
360
- },
361
- // 是否禁用按钮
362
- disableButton () {
363
- let flag = false
364
-
365
- for (const field of this.data.fields) {
366
- if (field.required && !field.value) {
367
- if (field.value === 0) {
368
- flag = false
369
- } else {
370
- flag = true
371
- }
372
- }
373
-
374
- // 任何选择框只要是否都不能提交
375
- if (field.type === 'select' && field.value === '否' && field.value_no_disable) {
376
- flag = true
377
- }
378
-
379
- if (field.type === 'checkbox' && field.required && field.value.length === 0) {
380
- flag = true
381
- }
382
- }
383
-
384
- this.disable_button = flag
385
- },
386
- // 失去焦点且值最终发生变化触发
387
- async onchange (index) {
388
- // 是否禁用按钮
389
- this.disableButton()
390
-
391
- if (!isEmpty(this.data.fields[index].value)) {
392
- // 前缀、后缀
393
- if (this.data.fields[index].prefix) {
394
- this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
395
- }
396
- if (this.data.fields[index].suffix) {
397
- this.data.fields[index].value = this.data.fields[index].value + this.data.fields[index].suffix
398
- }
399
- }
400
-
401
- // data赋值
402
- this.data[this.data.fields[index].field] = this.data.fields[index].value
403
-
404
- if (this.data.fields[index].type === 'datepicker') {
405
- this.check_datepicker(index)
406
- }
407
-
408
- if (this.data.fields[index].onchange) {
409
- this.$dispatch(this.data.fields[index].onchange, index)
410
- }
411
- this.$dispatch('onchange', index)
412
- },
413
- // 失去焦点触发,无论值是否发生变化
414
- onblur (index) {
415
- this.disableButton()
416
-
417
- if (this.data.fields[index].onblur) {
418
- this.$dispatch(this.data.fields[index].onblur, index)
419
- }
420
-
421
- this.$dispatch('onblur', index)
422
- },
423
- oninput (index) {
424
- // 是否禁用按钮
425
- this.disableButton()
426
-
427
- if (this.data.fields[index].oninput) {
428
- this.$dispatch(this.data.fields[index].oninput, index)
429
- }
430
- this.$dispatch('oninput', index)
431
- },
432
- selectSearch(event, index) {
433
- if (this.data.fields[index].selectSearch) {
434
- this.$dispatch(this.data.fields[index].selectSearch, event[0], index)
435
- }
436
- this.$dispatch('selectSearch', event[0], index)
437
- },
438
- // 点击按钮组按钮
439
- async click_but (button) {
440
- this.disable_button = true
441
-
442
- this.data.fields.forEach(item => {
443
- this.data[item.field] = item.value
444
- })
445
-
446
- this.data.button = button
447
-
448
- if (button.button_fields && button.button_fields.length > 0) {
449
- this.showButModal = true
450
- return
451
- }
452
-
453
- if (this.data.button.event) {
454
- this.$dispatch(this.data.button.event)
455
- } else {
456
- this.$dispatch('button')
457
- }
458
- },
459
- confirmModal () {
460
- this.closeModal()
461
-
462
- this.data.button.button_fields.forEach(item => {
463
- this.data.button[item.field] = item.value
464
- })
465
-
466
- if (this.data.button.event) {
467
- this.$dispatch(this.data.button.event)
468
- } else {
469
- this.$dispatch('button')
470
- }
471
- },
472
- // 关闭模态框
473
- closeModal () {
474
- this.showButModal = false
475
- this.disable_modal_button = false
476
- },
477
- onbutchange (index) {
478
- // 是否禁用按钮
479
- this.disableModalButton()
480
-
481
- if (this.data.button.button_fields[index].onchange) {
482
- this.$dispatch(this.data.button.button_fields[index].onchange, index)
483
- } else {
484
- this.$dispatch('onbutchange', index)
485
- }
486
-
487
- },
488
- onbutblur (index) {
489
- this.disableModalButton()
490
-
491
- if (this.data.button.button_fields[index].onblur) {
492
- this.$dispatch(this.data.button.button_fields[index].onblur, index)
493
- } else {
494
- this.$dispatch('onbutblur', index)
495
- }
496
- },
497
- onbutinput (index) {
498
- // 是否禁用按钮
499
- this.disableModalButton()
500
-
501
- if (this.data.button.button_fields[index].oninput) {
502
- this.$dispatch(this.data.button.button_fields[index].oninput, index)
503
- } else {
504
- this.$dispatch('onbutinput', index)
505
- }
506
- },
507
- disableModalButton () {
508
- let flag = false
509
-
510
-
511
- for (const item of this.data.button.button_fields) {
512
- if (item.required && !item.value) {
513
- if (item.value === 0) {
514
- flag = false
515
- } else {
516
- flag = true
517
- }
518
- }
519
- }
520
-
521
- this.disable_modal_button = flag
522
- },
523
- check_datepicker (index) {
524
- // 时间格式检测
525
- if (!isEmpty(this.data.fields[index].value)) {
526
-
527
- let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
528
- let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
529
- let datetimeReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
530
- if (this.data.fields[index].format) {
531
- if (this.data.fields[index].format === 'yyyy-MM-dd') {
532
- if (!dateReg.test(this.data.fields[index].value)) {
533
- this.data.fields[index].value = ''
534
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
535
- }
536
- }
537
- if (this.data.fields[index].format === 'HH:mm:ss') {
538
- if (!timeReg.test(this.data.fields[index].value)) {
539
- this.data.fields[index].value = ''
540
- this.$showAlert(this.data.fields[index].label + '格式错误如:00:00:00', 'warning', 2000)
541
- }
542
- }
543
- if (this.data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
544
- if (!datetimeReg.test(this.data.fields[index].value)) {
545
- this.data.fields[index].value = ''
546
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01 00:00:00', 'warning', 2000)
547
- }
548
- }
549
- } else {
550
- if (!dateReg.test(this.data.fields[index].value)) {
551
- this.data.fields[index].value = ''
552
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
553
- }
554
- }
555
- }
556
- }
557
- },
558
- events: {
559
-
560
- }
561
- }
562
- </script>
563
- <style>
564
- .datepicker{
565
- width: 100%!important;
566
- }
567
- .datepicker-input{
568
- background-color: #ffffff!important;
569
- width: 100%!important;
570
- }
571
- .datepicker-input:disabled{
572
- border: 1px solid #DDD!important;
573
- color: #ACA899!important;
574
- width: 100%!important;
575
- }
576
- </style>
577
- <style scoped>
578
- th{
579
- font-size: 15px !important;
580
- text-align: center !important;
581
- background-color: #dfedfb!important;
582
- color: #666666 !important;
583
- font-family: PINGFANG-BOLD !important;
584
- font-weight: normal!important;
585
- }
586
- /*清除model中的浮动*/
587
- .clearfix:after,.clearfix:before{
588
- display: table;
589
- }
590
- .clearfix:after{
591
- clear: both;
592
- }
593
-
594
- .input_view{
595
- padding: 8px;
596
- background-color: #ffffff;
597
- border-radius: 2px;
598
- border: solid 1px #c7c7c7!important;
599
- color: #333333!important;
600
- font-size: 15px!important;
601
- }
602
-
603
- .input_view[readonly]{
604
- border: 1px solid #DDD!important;
605
- color:#ACA899!important;
606
- }
607
- .input_view:disabled{
608
- border: 1px solid #DDD!important;
609
- color:#ACA899!important;
610
- }
611
-
612
- .control-label-justify {
613
- display: inline-block;
614
- vertical-align: top;
615
- width: 110px;
616
- text-align: justify;
617
- font-family: PingFang-SC-Bold;
618
- }
619
-
620
- .control-label-justify::after {
621
- content: "";
622
- display: inline-block;
623
- width: 100%;
624
- overflow: hidden;
625
- height: 0;
626
- }
627
-
628
- input::-webkit-outer-spin-button,
629
- input::-webkit-inner-spin-button {
630
- -webkit-appearance: none;
631
- }
632
-
633
- input[type="number"] {
634
- -moz-appearance: textfield;
635
- }
636
-
637
- </style>
1
+ <template>
2
+
3
+ <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
4
+ <form class="form-horizontal">
5
+ <div class="form-group">
6
+ <div v-for="(index,item) in data.fields">
7
+ <!--input-->
8
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
9
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)"
10
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
11
+ <label :style="item.label_style ? item.label_style : ''"
12
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
13
+ <div :style="item.value_style ? item.value_style:''"
14
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
15
+ <input class="form-control input_view" style=""
16
+ :type="item.type"
17
+ v-model="data.fields[index].value"
18
+ :placeholder="item.placeholder"
19
+ :value="data.fields[index].value"
20
+ :readonly="item.readonly"
21
+ :disabled="item.disabled"
22
+ @change="onchange(index)"
23
+ @blur="onblur(index)"
24
+ @input="oninput(index)"
25
+ />
26
+ </div>
27
+ </div>
28
+
29
+ <!--时间datepicker-->
30
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
31
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)"
32
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
33
+ <label
34
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
35
+ <div :style="item.value_style ? item.value_style:''"
36
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
37
+ <datepicker
38
+ @change="onchange(index)"
39
+ @blur="onblur(index)"
40
+ :placeholder="item.placeholder"
41
+ :value.sync="data.fields[index].value"
42
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
43
+ v-model="data.fields[index].value"
44
+ :readonly="item.readonly"
45
+ :disabled="item.disabled"
46
+ :show-reset-button="reset">
47
+ </datepicker>
48
+ </div>
49
+ </div>
50
+
51
+ <!--textarea-->
52
+ <div :style="item.style ? item.style+';margin-bottom: 20px':'margin-bottom: 20px'"
53
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)"
54
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
55
+ <label :style="item.label_style ? item.label_style : ''"
56
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
57
+ <div :style="item.value_style ? item.value_style:''"
58
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
59
+ <textarea
60
+ :readonly="item.readonly"
61
+ :disabled="item.disabled"
62
+ class="form-control input_view"
63
+ style="width: 100%;height: 100%"
64
+ :rows="item.rows"
65
+ v-model="data.fields[index].value"
66
+ :value="data.fields[index].value"
67
+ @change="onchange(index)"
68
+ @blur="onblur(index)"
69
+ @input="oninput(index)"
70
+ >
71
+ </textarea>
72
+ </div>
73
+ </div>
74
+
75
+ <!--select-->
76
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
77
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)"
78
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
79
+ <label
80
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
81
+ <div :style="item.value_style ? item.value_style:''"
82
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
83
+ <input-select
84
+ class="select select_list"
85
+ @blur="onblur(index)"
86
+ @change="onchange(index)"
87
+ @select-search="selectSearch($arguments,index)"
88
+ :readonly="item.readonly"
89
+ :disable="item.disabled"
90
+ :value.sync="data.fields[index].value"
91
+ v-model="data.fields[index].value"
92
+ :options='data.fields[index].options'
93
+ :valueSingle="true"></input-select>
94
+ </div>
95
+ </div>
96
+
97
+ <!--checkbox-->
98
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
99
+ v-if="item.type==='checkbox' && !item.hidden && (item.device === 'pc' || !item.device)"
100
+ :class="[item.required && item.value.length === 0 ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
101
+ <label v-if="item.label"
102
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
103
+ <div :style="item.value_style ? item.value_style:''"
104
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
105
+ <label class="checkbox-inline" v-for="(index2,row) in item.options">
106
+ <input type="checkbox" class=""
107
+ :readonly="data.fields[index].readonly"
108
+ :disabled="data.fields[index].disabled"
109
+ v-model="data.fields[index].value"
110
+ :value="data.fields[index].options[index2].value"
111
+ @change="onchange(index)"
112
+ @blur="onblur(index)">
113
+ {{row.label}}
114
+ </label>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ </div>
119
+
120
+ <!-- onetomany -->
121
+ <div class="" v-for="(index,item) in data.onetomany">
122
+ <onetomany :selectdata="data" :onetomany="item" :index="index" v-if="item.device === 'pc' || !item.device"></onetomany>
123
+ </div>
124
+
125
+ <div v-for="(i,item) in data.components">
126
+ <component v-if="item.device === 'pc' || !item.device" :is="item.name" :selectdata="data" :mark="item.mark"></component>
127
+ </div>
128
+
129
+ <!--自定义组件-->
130
+ <slot></slot>
131
+ <!--公司等属性-->
132
+ <div class="col-sm-12 form-group text-center" style="padding-top:8px">
133
+ <div class="col-sm-3 form-group center-block">
134
+ <label class="col-sm-5">所属公司:</label>
135
+ <div class="col-sm-6" style="text-align: left">
136
+ {{model.orgs}}
137
+ </div>
138
+ </div>
139
+ <div class="col-sm-3 form-group center-block">
140
+ <label class="col-sm-5">部门:</label>
141
+ <div class="col-sm-6" style="text-align: left">
142
+ {{model.parentname}}
143
+ </div>
144
+ </div>
145
+ <div class="col-sm-3 form-group center-block">
146
+ <label class="col-sm-5">操作人:</label>
147
+ <div class="col-sm-6 " style="text-align: left">
148
+ {{model.operator}}
149
+ </div>
150
+ </div>
151
+ <div class="col-sm-3 form-group center-block">
152
+ <label class="col-sm-5">操作日期:</label>
153
+ <div class="col-sm-6" style="text-align: left">
154
+ {{model.operate_date}}
155
+ </div>
156
+ </div>
157
+ </div>
158
+ <!-- 按钮组 -->
159
+ <div class="from-group col-sm-12 text-center">
160
+ <!-- 按钮组 -->
161
+ <button v-for="(index,button) in data.buttons"
162
+ :disabled="button.disabled && disable_button"
163
+ style="min-width:100px"
164
+ :class="button.disabled && disable_button ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
165
+ v-if="!button.hidden"
166
+ @click.prevent="click_but(button)"
167
+ >
168
+ {{button.button_name}}
169
+ </button>
170
+ </div>
171
+
172
+ <!-- 按钮模态框 -->
173
+ <modal v-if="showButModal" :show.sync="showButModal" backdrop="false" large>
174
+ <header slot="modal-header" class="modal-header">
175
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
176
+ <span class="modal-title"><font
177
+ size="3">{{data.button.button_name}}</font></span>
178
+ </header>
179
+ <article slot="modal-body" class="modal-body clearfix">
180
+ <div class="form-group" style="padding: 0 150px">
181
+ <div v-for="(index,item) in data.button.button_fields">
182
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
183
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
184
+ <label :style="item.label_style ? item.label_style : ''"
185
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
186
+ <div :style="item.value_style ? item.value_style : ''"
187
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
188
+ <input class="form-control input_view"
189
+ :placeholder="item.placeholder"
190
+ :type="item.type"
191
+ v-model="item.value"
192
+ :value="item.value"
193
+ :readonly="item.readonly"
194
+ :disabled="item.disabled"
195
+ @change="onbutchange(index)"
196
+ @blur="onbutblur(index)"
197
+ @input="onbutinput(index)"
198
+ />
199
+ </div>
200
+ </div>
201
+
202
+ <!--时间datepicker-->
203
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
204
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
205
+ <label :style="item.label_style ? item.label_style : ''"
206
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
207
+ <div :style="item.value_style ? item.value_style : ''"
208
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
209
+ <datepicker
210
+ :placeholder="item.placeholder"
211
+ :value.sync="item.value"
212
+ v-model="item.value"
213
+ :readonly="item.readonly"
214
+ :disabled="item.disabled"
215
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
216
+ :show-reset-button="true"
217
+ @change="onbutchange(index)"
218
+ @blur="onbutblur(index)"
219
+ ></datepicker>
220
+ </div>
221
+ </div>
222
+
223
+ <!--select-->
224
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
225
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
226
+ <label :style="item.label_style ? item.label_style : ''"
227
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
228
+ <div :style="item.value_style ? item.value_style : ''"
229
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
230
+ <input-select
231
+ class="select select_list"
232
+ :value.sync="item.value"
233
+ v-model="item.value"
234
+ :options='item.options'
235
+ :readonly="item.readonly"
236
+ :disable="item.disabled"
237
+ :valueSingle="true"
238
+ @blur="onbutblur(index)"
239
+ @change="onbutchange(index)"
240
+ ></input-select>
241
+ </div>
242
+ </div>
243
+
244
+ <!--textarea-->
245
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
246
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
247
+ <label :style="item.label_style ? item.label_style : ''"
248
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
249
+ <div :style="item.value_style ? item.value_style : ''"
250
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
251
+ <textarea
252
+ class="form-control input_view"
253
+ style="width: 100%;height: 100%"
254
+ v-model="item.value"
255
+ :value="item.value"
256
+ :rows="item.rows"
257
+ :readonly="item.readonly"
258
+ :disabled="item.disabled"
259
+ @change="onbutchange(index)"
260
+ @blur="onbutblur(index)"
261
+ @input="onbutinput(index)"
262
+ ></textarea>
263
+ </div>
264
+ </div>
265
+ </div>
266
+ </div>
267
+ </article>
268
+ <footer slot="modal-footer" class="modal-footer">
269
+ <button :class="disable_modal_button ? 'btn btn-default':'btn btn-primary'"
270
+ :disabled="disable_modal_button" type="button" @click="confirmModal()">
271
+ 确认
272
+ </button>
273
+ </footer>
274
+ </modal>
275
+ </form>
276
+ </div>
277
+
278
+ </template>
279
+ <script>
280
+ import Vue from 'vue'
281
+ import {isEmpty} from '../Util'
282
+ // Date格式化
283
+ Date.prototype.Format = function (fmt) {
284
+ var o = {
285
+ 'M+': this.getMonth() + 1, // 月份
286
+ 'd+': this.getDate(), // 日
287
+ 'H+': this.getHours(), // 小时
288
+ 'm+': this.getMinutes(), // 分
289
+ 's+': this.getSeconds(), // 秒
290
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
291
+ 'S': this.getMilliseconds() // 毫秒
292
+ }
293
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
294
+ for (var k in o) {
295
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
296
+ }
297
+ return fmt
298
+ }
299
+
300
+ export default {
301
+ title: '报建业务通用组件',
302
+ props: {
303
+ data: {
304
+ type: Object
305
+ }
306
+ },
307
+ data () {
308
+ return {
309
+ model: {}, // 公司等属性
310
+ disable_button: true, // 控制按钮禁用
311
+ disable_modal_button: true, // 控制按钮禁用
312
+ showButModal: false
313
+ }
314
+ },
315
+ watch: {
316
+ deep: true
317
+ },
318
+ computed: {
319
+
320
+ },
321
+ created () {
322
+ // 初始化数据
323
+ this.initializtion()
324
+ if (this.data.readyEvent) {
325
+ this.$dispatch(this.data.readyEvent)
326
+ }
327
+ this.$dispatch('initializtionView')
328
+ },
329
+ methods: {
330
+ // 初始化数据
331
+ initializtion () {
332
+ for (const item of this.data.fields) {
333
+ this.data[item.field] = item.value
334
+ }
335
+
336
+ // 是否禁用按钮
337
+ this.disableButton()
338
+
339
+ // 公司等属性初始化
340
+ if (this.data.orgs) {
341
+ this.model.orgs = this.data.orgs
342
+ } else {
343
+ this.model.orgs = this.$login.f.orgs
344
+ }
345
+ if (this.data.parentname) {
346
+ this.model.parentname = this.data.parentname
347
+ } else {
348
+ this.model.parentname = this.$login.f.f_department_name
349
+ }
350
+ if (this.data.operate_date) {
351
+ this.model.operate_date = this.data.operate_date
352
+ } else {
353
+ this.model.operate_date = new Date().Format('yyyy-MM-dd')
354
+ }
355
+ if (this.data.operator) {
356
+ this.model.operator = this.data.operator
357
+ } else {
358
+ this.model.operator = this.$login.f.name
359
+ }
360
+ },
361
+ // 是否禁用按钮
362
+ disableButton () {
363
+ let flag = false
364
+
365
+ for (const field of this.data.fields) {
366
+ if (field.required && !field.value) {
367
+ if (field.value === 0) {
368
+ flag = false
369
+ } else {
370
+ flag = true
371
+ }
372
+ }
373
+
374
+ // 任何选择框只要是否都不能提交
375
+ if (field.type === 'select' && field.value === '否' && field.value_no_disable) {
376
+ flag = true
377
+ }
378
+
379
+ if (field.type === 'checkbox' && field.required && field.value.length === 0) {
380
+ flag = true
381
+ }
382
+ }
383
+
384
+ this.disable_button = flag
385
+ },
386
+ // 失去焦点且值最终发生变化触发
387
+ async onchange (index) {
388
+ // 是否禁用按钮
389
+ this.disableButton()
390
+
391
+ if (!isEmpty(this.data.fields[index].value)) {
392
+ // 前缀、后缀
393
+ if (this.data.fields[index].prefix) {
394
+ this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
395
+ }
396
+ if (this.data.fields[index].suffix) {
397
+ this.data.fields[index].value = this.data.fields[index].value + this.data.fields[index].suffix
398
+ }
399
+ }
400
+
401
+ // data赋值
402
+ this.data[this.data.fields[index].field] = this.data.fields[index].value
403
+
404
+ if (this.data.fields[index].type === 'datepicker') {
405
+ this.check_datepicker(index)
406
+ }
407
+
408
+ if (this.data.fields[index].onchange) {
409
+ this.$dispatch(this.data.fields[index].onchange, index)
410
+ }
411
+ this.$dispatch('onchange', index)
412
+ },
413
+ // 失去焦点触发,无论值是否发生变化
414
+ onblur (index) {
415
+ this.disableButton()
416
+
417
+ if (this.data.fields[index].onblur) {
418
+ this.$dispatch(this.data.fields[index].onblur, index)
419
+ }
420
+
421
+ this.$dispatch('onblur', index)
422
+ },
423
+ oninput (index) {
424
+ // 是否禁用按钮
425
+ this.disableButton()
426
+
427
+ if (this.data.fields[index].oninput) {
428
+ this.$dispatch(this.data.fields[index].oninput, index)
429
+ }
430
+ this.$dispatch('oninput', index)
431
+ },
432
+ selectSearch(event, index) {
433
+ if (this.data.fields[index].selectSearch) {
434
+ this.$dispatch(this.data.fields[index].selectSearch, event[0], index)
435
+ }
436
+ this.$dispatch('selectSearch', event[0], index)
437
+ },
438
+ // 点击按钮组按钮
439
+ async click_but (button) {
440
+ this.disable_button = true
441
+
442
+ this.data.fields.forEach(item => {
443
+ this.data[item.field] = item.value
444
+ })
445
+
446
+ this.data.button = button
447
+
448
+ if (button.button_fields && button.button_fields.length > 0) {
449
+ this.showButModal = true
450
+ return
451
+ }
452
+
453
+ if (this.data.button.event) {
454
+ this.$dispatch(this.data.button.event)
455
+ } else {
456
+ this.$dispatch('button')
457
+ }
458
+ },
459
+ confirmModal () {
460
+ this.closeModal()
461
+
462
+ this.data.button.button_fields.forEach(item => {
463
+ this.data.button[item.field] = item.value
464
+ })
465
+
466
+ if (this.data.button.event) {
467
+ this.$dispatch(this.data.button.event)
468
+ } else {
469
+ this.$dispatch('button')
470
+ }
471
+ },
472
+ // 关闭模态框
473
+ closeModal () {
474
+ this.showButModal = false
475
+ this.disable_modal_button = false
476
+ },
477
+ onbutchange (index) {
478
+ // 是否禁用按钮
479
+ this.disableModalButton()
480
+
481
+ if (this.data.button.button_fields[index].onchange) {
482
+ this.$dispatch(this.data.button.button_fields[index].onchange, index)
483
+ } else {
484
+ this.$dispatch('onbutchange', index)
485
+ }
486
+
487
+ },
488
+ onbutblur (index) {
489
+ this.disableModalButton()
490
+
491
+ if (this.data.button.button_fields[index].onblur) {
492
+ this.$dispatch(this.data.button.button_fields[index].onblur, index)
493
+ } else {
494
+ this.$dispatch('onbutblur', index)
495
+ }
496
+ },
497
+ onbutinput (index) {
498
+ // 是否禁用按钮
499
+ this.disableModalButton()
500
+
501
+ if (this.data.button.button_fields[index].oninput) {
502
+ this.$dispatch(this.data.button.button_fields[index].oninput, index)
503
+ } else {
504
+ this.$dispatch('onbutinput', index)
505
+ }
506
+ },
507
+ disableModalButton () {
508
+ let flag = false
509
+
510
+
511
+ for (const item of this.data.button.button_fields) {
512
+ if (item.required && !item.value) {
513
+ if (item.value === 0) {
514
+ flag = false
515
+ } else {
516
+ flag = true
517
+ }
518
+ }
519
+ }
520
+
521
+ this.disable_modal_button = flag
522
+ },
523
+ check_datepicker (index) {
524
+ // 时间格式检测
525
+ if (!isEmpty(this.data.fields[index].value)) {
526
+
527
+ let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
528
+ let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
529
+ let datetimeReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
530
+ if (this.data.fields[index].format) {
531
+ if (this.data.fields[index].format === 'yyyy-MM-dd') {
532
+ if (!dateReg.test(this.data.fields[index].value)) {
533
+ this.data.fields[index].value = ''
534
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
535
+ }
536
+ }
537
+ if (this.data.fields[index].format === 'HH:mm:ss') {
538
+ if (!timeReg.test(this.data.fields[index].value)) {
539
+ this.data.fields[index].value = ''
540
+ this.$showAlert(this.data.fields[index].label + '格式错误如:00:00:00', 'warning', 2000)
541
+ }
542
+ }
543
+ if (this.data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
544
+ if (!datetimeReg.test(this.data.fields[index].value)) {
545
+ this.data.fields[index].value = ''
546
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01 00:00:00', 'warning', 2000)
547
+ }
548
+ }
549
+ } else {
550
+ if (!dateReg.test(this.data.fields[index].value)) {
551
+ this.data.fields[index].value = ''
552
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
553
+ }
554
+ }
555
+ }
556
+ }
557
+ },
558
+ events: {
559
+
560
+ }
561
+ }
562
+ </script>
563
+ <style>
564
+ .datepicker{
565
+ width: 100%!important;
566
+ }
567
+ .datepicker-input{
568
+ background-color: #ffffff!important;
569
+ width: 100%!important;
570
+ }
571
+ .datepicker-input:disabled{
572
+ border: 1px solid #DDD!important;
573
+ color: #ACA899!important;
574
+ width: 100%!important;
575
+ }
576
+ </style>
577
+ <style scoped>
578
+ th{
579
+ font-size: 15px !important;
580
+ text-align: center !important;
581
+ background-color: #dfedfb!important;
582
+ color: #666666 !important;
583
+ font-family: PINGFANG-BOLD !important;
584
+ font-weight: normal!important;
585
+ }
586
+ /*清除model中的浮动*/
587
+ .clearfix:after,.clearfix:before{
588
+ display: table;
589
+ }
590
+ .clearfix:after{
591
+ clear: both;
592
+ }
593
+
594
+ .input_view{
595
+ padding: 8px;
596
+ background-color: #ffffff;
597
+ border-radius: 2px;
598
+ border: solid 1px #c7c7c7!important;
599
+ color: #333333!important;
600
+ font-size: 15px!important;
601
+ }
602
+
603
+ .input_view[readonly]{
604
+ border: 1px solid #DDD!important;
605
+ color:#ACA899!important;
606
+ }
607
+ .input_view:disabled{
608
+ border: 1px solid #DDD!important;
609
+ color:#ACA899!important;
610
+ }
611
+
612
+ .control-label-justify {
613
+ display: inline-block;
614
+ vertical-align: top;
615
+ width: 110px;
616
+ text-align: justify;
617
+ font-family: PingFang-SC-Bold;
618
+ }
619
+
620
+ .control-label-justify::after {
621
+ content: "";
622
+ display: inline-block;
623
+ width: 100%;
624
+ overflow: hidden;
625
+ height: 0;
626
+ }
627
+
628
+ input::-webkit-outer-spin-button,
629
+ input::-webkit-inner-spin-button {
630
+ -webkit-appearance: none;
631
+ }
632
+
633
+ input[type="number"] {
634
+ -moz-appearance: textfield;
635
+ }
636
+
637
+ </style>