indoor.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416
  1. <template>
  2. <scroll-view>
  3. <view class="background">
  4. <!-- <view class="uni-list">
  5. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  6. <view>
  7. 工程周期
  8. </view>
  9. <view v-if="this.isEmpty(this.projectValue.dictValue)" @click="pickerShow('gczq')">
  10. <view>
  11. <span style="color: darkgray;">请选择工程周期
  12. </span>
  13. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  14. </view>
  15. </view>
  16. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gczq')">
  17. <span style="color: black;">{{projectValue.dictLabel}}
  18. </span>
  19. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  20. </view>
  21. </view>
  22. </view> -->
  23. <view class="uni-list">
  24. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  25. <view>
  26. 行政区
  27. </view>
  28. <view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
  29. @click="pickerShow('xzq')">
  30. <span style="color: darkgray;">请选择行政区</span>
  31. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  32. </view>
  33. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
  34. <span style="color: black;">{{XZQValue.dictLabel}}</span>
  35. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="uni-list">
  40. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  41. <view>
  42. 小区
  43. </view>
  44. <view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  45. @click="pickerShow('xq')">
  46. <span style="color: darkgray;">请选择小区</span>
  47. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  48. </view>
  49. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
  50. <span style="color: black;">{{XQValue.name}}</span>
  51. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="uni-list">
  56. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  57. <view class="uni-list-cell-left">
  58. 楼栋
  59. </view>
  60. <view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  61. @click="pickerShow('ld')">
  62. <span style="color: darkgray;">请选择楼栋</span>
  63. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  64. </view>
  65. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
  66. <span style="color: black;">{{LDValue.name}}</span>
  67. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="uni-list" style="margin-top: 10;">
  72. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  73. <view class="uni-list-cell-left">
  74. 单元
  75. </view>
  76. <view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  77. @click="pickerShow('dy')">
  78. <span style="color: darkgray;">请选择单元</span>
  79. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  80. </view>
  81. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
  82. <span style="color: black;">{{DYValue.name}}</span>
  83. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="uni-list">
  88. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  89. <view class="uni-list-cell-left">
  90. 房间
  91. </view>
  92. <view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  93. @click="pickerShow('fj')">
  94. <span style="color: darkgray;">请选择房间</span>
  95. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  96. </view>
  97. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
  98. <span style="color: black;">{{FJValue.name}}</span>
  99. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  100. </view>
  101. </view>
  102. </view>
  103. <!-- <view class="container" style="">
  104. <view class="title">是否按照施工图纸施工</view>
  105. <span style="color: black;">{{this.form}}</span>
  106. <switch style="transform: scale(0.6,0.6);" @change="switchChange" checked="isChick" />
  107. </view> -->
  108. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  109. subtitleKey="id" v-model="name"></SelectPicker>
  110. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
  111. titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  112. </view>
  113. <!--报警器切断阀-->
  114. <view class="background">
  115. <view v-if="objValue.enginClassValue=='报警器切断阀'">
  116. <view class="uni-list">
  117. <view
  118. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  119. 报警器切断阀
  120. <span
  121. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  122. @click="history">历史</span>
  123. </view>
  124. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  125. <text>厂 家</text>
  126. <view v-if="this.isEmpty(this.brandValue.dictValue)" style="margin-top: 10;"
  127. @click="pickerShow('brand')">
  128. <span style="color: darkgray;">请选择厂家</span>
  129. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  130. </view>
  131. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
  132. <span style="color: black;">{{brandValue.dictLabel}}</span>
  133. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <!--拆旧管-->
  139. <view v-if="objValue.enginClassValue=='拆旧管'">
  140. <view class="uni-list">
  141. <view
  142. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  143. 拆旧管
  144. <span
  145. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  146. @click="history">历史</span>
  147. </view>
  148. <view class="container" style="margin-bottom: 20PX;border-bottom: 1px solid #f8f8f8;">
  149. <view>
  150. 腐蚀等级
  151. </view>
  152. <view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
  153. @click="pickerShow('fsdj')">
  154. <span style="color: darkgray;">请选择腐蚀等级</span>
  155. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  156. </view>
  157. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fsdj')">
  158. <span style="color: black;">{{LevelValue.dictLabel}}</span>
  159. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. <view v-if="objValue.enginClassValue=='打孔'">
  165. <view class="uni-list">
  166. <view
  167. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  168. 打孔
  169. <span
  170. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  171. @click="history">历史</span>
  172. </view>
  173. <view class="container" style="margin-bottom: 20PX;border-bottom: 1px solid #f8f8f8;">
  174. <view>
  175. 孔距
  176. </view>
  177. <view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
  178. @click="pickerShow('kj')">
  179. <span style="color: darkgray;">请选择孔距</span>
  180. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  181. </view>
  182. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('kj')">
  183. <span style="color: black;">{{LevelValue.dictLabel}}</span>
  184. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  185. </view>
  186. </view>
  187. </view>
  188. </view>
  189. <!--立杠-->
  190. <view v-else-if="objValue.enginClassValue=='立杠'">
  191. <view class="uni-list" style="margin-bottom: 20px;">
  192. <view
  193. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  194. 立杠
  195. <span
  196. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  197. @click="history">历史</span>
  198. </view>
  199. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  200. <view>
  201. 材 质
  202. </view>
  203. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  204. @click="pickerShow('cz')">
  205. <span style="color: darkgray;">请选择材质</span>
  206. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  207. </view>
  208. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  209. <span style="color: black;">{{materialValue.name}}</span>
  210. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  211. </view>
  212. </view>
  213. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  214. <view>
  215. 规 格
  216. </view>
  217. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  218. @click="pickerShow('gg')">
  219. <span style="color: darkgray;">请选择规格</span>
  220. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  221. </view>
  222. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  223. <span style="color: black;">{{specificationValue.name}}</span>
  224. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  225. </view>
  226. </view>
  227. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  228. <text>米 数</text>
  229. <!-- style="margin-left: 10px;text-align: right;" -->
  230. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6"
  231. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  232. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  233. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1"
  234. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  235. </view>
  236. </view>
  237. </view>
  238. <!--挂表-->
  239. <view v-else-if="objValue.enginClassValue=='挂表'">
  240. <view class="uni-list" style="margin-bottom: 20px;">
  241. <view
  242. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  243. 挂表
  244. <span
  245. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  246. @click="history">历史</span>
  247. </view>
  248. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  249. <view>
  250. 品 牌
  251. </view>
  252. <view v-if="this.isEmpty(this.brandValue.dictValue)" style="margin-top: 10;"
  253. @click="pickerShow('brand')">
  254. <span style="color: darkgray;">请选择品牌</span>
  255. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  256. </view>
  257. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
  258. <span style="color: black;">{{brandValue.dictLabel}}</span>
  259. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  260. </view>
  261. </view>
  262. </view>
  263. </view>
  264. <!--表后管-->
  265. <view v-else-if="objValue.enginClassValue=='表后管'">
  266. <view class="uni-list" style="margin-bottom: 20px;">
  267. <view
  268. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  269. 表后管
  270. <span
  271. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  272. @click="history">历史</span>
  273. </view>
  274. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  275. <view>
  276. 材 质
  277. </view>
  278. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  279. @click="pickerShow('cz')">
  280. <span style="color: darkgray;">请选择材质</span>
  281. </view>
  282. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  283. <span style="color: black;">{{materialValue.name}}</span>
  284. </view>
  285. </view>
  286. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  287. <view>
  288. 规 格
  289. </view>
  290. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  291. @click="pickerShow('gg')">
  292. <span style="color: darkgray;">请选择规格</span>
  293. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  294. </view>
  295. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  296. <span style="color: black;">{{specificationValue.name}}</span>
  297. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  298. </view>
  299. </view>
  300. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  301. <text>米 数</text>
  302. <!-- style="margin-left: 10px;text-align: right;" -->
  303. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6"
  304. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  305. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  306. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1"
  307. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  308. </view>
  309. </view>
  310. </view>
  311. <!--阀管-->
  312. <view v-else-if="objValue.enginClassValue=='阀管'">
  313. <view class="uni-list" style="margin-bottom: 20px;">
  314. <view
  315. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  316. 阀管
  317. <span
  318. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  319. @click="history">历史</span>
  320. </view>
  321. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  322. <view>
  323. 上门类型
  324. </view>
  325. <view v-if="this.isEmpty(this.doorValue.dictValue)" style="margin-top: 10;"
  326. @click="pickerShow('door')">
  327. <span style="color: darkgray;">请选择上门类型</span>
  328. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  329. </view>
  330. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('door')">
  331. <span style="color: black;">{{doorValue.dictLabel}}</span>
  332. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  333. </view>
  334. </view>
  335. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  336. <view>
  337. 自闭阀类型
  338. </view>
  339. <view v-if="this.isEmpty(this.SelfClosValve.dictValue)" style="margin-top: 10;"
  340. @click="pickerShow('zbf')">
  341. <span style="color: darkgray;">请选择自闭阀类型</span>
  342. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  343. </view>
  344. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('zbf')">
  345. <span style="color: black;">{{SelfClosValve.dictLabel}}</span>
  346. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  347. </view>
  348. </view>
  349. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  350. <view>
  351. 材 质
  352. </view>
  353. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  354. @click="pickerShow('cz')">
  355. <span style="color: darkgray;">请选择材质</span>
  356. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  357. </view>
  358. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  359. <span style="color: black;">{{materialValue.name}}</span>
  360. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  361. </view>
  362. </view>
  363. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  364. <view>
  365. 规 格
  366. </view>
  367. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  368. @click="pickerShow('gg')">
  369. <span style="color: darkgray;">请选择规格</span>
  370. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  371. </view>
  372. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  373. <span style="color: black;">{{specificationValue.name}}</span>
  374. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  375. </view>
  376. </view>
  377. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  378. <text>米 数</text>
  379. <!-- style="margin-left: 10px;text-align: right;" -->
  380. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6"
  381. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  382. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  383. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1"
  384. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  385. </view>
  386. </view>
  387. </view>
  388. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  389. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  390. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  391. <image :src="loadImgSrc('updateimg.png')" mode=""
  392. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"
  393. v-show="reviewStatus!='1'"></image>
  394. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  395. <view
  396. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  397. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  398. @click="showPhoto(index)">
  399. </image>
  400. </view>
  401. <view v-else>
  402. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  403. </view>
  404. <view @click="remove(index)"
  405. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  406. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  407. </image>
  408. </view>
  409. </view>
  410. </view>
  411. </view>
  412. </view>
  413. <view class="action-btn" v-show="reviewStatus!='1'">
  414. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  415. </view>
  416. <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
  417. </scroll-view>
  418. </template>
  419. <script>
  420. import SelectPicker from '../../../components/selectPicker/select_picker.vue'
  421. import bottomSheet from '../../../components/bottomSheet/bottomSheet.vue'
  422. import {
  423. getDicts
  424. } from "@/api/system/dict/data";
  425. import {
  426. getAreaList,
  427. getBuildingList,
  428. getUnitList,
  429. getHousesList,
  430. addTearOldPipe,
  431. getEnginMaterialQualityList,
  432. getEnginSpecificationsList,
  433. getRoomProjectList,
  434. getRoomProjectId,
  435. } from '@/api/common'
  436. import {
  437. getToken
  438. } from '../../../utils/auth';
  439. import {
  440. showConfirm
  441. } from '../../../utils/common';
  442. export default {
  443. components: {
  444. SelectPicker,
  445. bottomSheet
  446. },
  447. data() {
  448. return {
  449. headers: {
  450. Authorization: "Bearer " + getToken()
  451. },
  452. type: '',
  453. open: false,
  454. reviewStatus: '', //是否可以点击
  455. objValue: '', //上一页面传过来的值 新增接口用
  456. openDict: false,
  457. selectList: [],
  458. dictOptions: [],
  459. imgArr: [],
  460. XQValue: {},
  461. XZQValue: {},
  462. projectValue: {
  463. 'dictValue': '0'
  464. },
  465. LevelValue: {},
  466. LDValue: {},
  467. DYValue: {},
  468. FJValue: {},
  469. FSValue: {},
  470. specificationValue: {}, //规格
  471. materialValue: {}, //材质
  472. brandValue: {}, //品牌
  473. doorValue: {}, //上门类型
  474. SelfClosValve: {}, //自闭阀类型
  475. materialList: '', //材质list
  476. XQList: '',
  477. LDList: '',
  478. DYList: '',
  479. FJList: '',
  480. progress: 0, //上传图片进度百分比
  481. loading: false,
  482. isCheck: true, //是否按照施工图纸施工
  483. inputNumberValue: '',
  484. inputIntegerNumberValue: '',
  485. inputDecimalNumberValue: '',
  486. title: '',
  487. historyList: {} //历史数据
  488. }
  489. },
  490. created() {
  491. },
  492. onLoad(options) {
  493. if ('params' in options) {
  494. this.objValue = JSON.parse(decodeURIComponent(options.params));
  495. if (this.objValue.enginType == `old_renovation`) {
  496. this.title = '旧改工程-室内'
  497. } else if (this.objValue.enginType == `new_built`) {
  498. this.title = '新建工程-室内'
  499. }
  500. uni.setNavigationBarTitle({
  501. title: this.title
  502. })
  503. }
  504. },
  505. methods: {
  506. //判断是否选择
  507. isEmpty(str) {
  508. return (!str || 0 === str.length);
  509. },
  510. // 显示历史弹窗
  511. handleShowSheet() {
  512. this.shareState = true;
  513. },
  514. // 隐藏历史弹窗
  515. handleHiddenShare() {
  516. this.shareState = false;
  517. },
  518. showPhoto(index) {
  519. uni.previewImage({
  520. current: index,
  521. urls: this.imgArr,
  522. })
  523. },
  524. remove(index) {
  525. uni.showModal({
  526. title: '提示',
  527. content: '是否删除该图片或视频?',
  528. success: (res) => {
  529. if (res.confirm) {
  530. this.imgArr.splice(index, 1)
  531. if (this.imgArr.length <= 0) {
  532. this.photo = true;
  533. }
  534. }
  535. }
  536. })
  537. },
  538. choose() {
  539. let _this = this;
  540. uni.showActionSheet({
  541. title: '上传',
  542. itemList: ['图片', '视频'],
  543. success: (res) => {
  544. if (res.tapIndex == 0) {
  545. this.chooseimage()
  546. } else {
  547. this.choosevideo()
  548. }
  549. }
  550. })
  551. },
  552. chooseimage() {
  553. let _this = this;
  554. uni.chooseImage({
  555. sizeType: ['album', 'camera'],
  556. success(resp) {
  557. resp.tempFiles.forEach((item, index) => {
  558. const task = uni.uploadFile({
  559. url: _this.$HTTP + `/obs`,
  560. filePath: item.path,
  561. name: 'file',
  562. formData: {},
  563. header: _this.headers,
  564. success: res => {
  565. // 判断是否json字符串,将其转为json格式
  566. // let data = _this.$u.test.jsonString(res
  567. // .data) ? JSON.parse(res.data) : res.data;
  568. let data = JSON.parse(res.data);
  569. if (![200].includes(data.code)) {
  570. // this.uploadError(index, data);
  571. _this.$modal.msg(data.msg)
  572. } else {
  573. if (_this.progress === 100) {
  574. _this.imgArr.push(data.data.url)
  575. _this.$modal.msg('上传成功!')
  576. _this.photo = false;
  577. }
  578. }
  579. },
  580. fail: e => {
  581. _this.$modal.msg('上传失败!')
  582. //_this.uploadError(index, e);
  583. },
  584. complete: res => {
  585. uni.hideLoading();
  586. _this.uploading = false;
  587. }
  588. });
  589. task.onProgressUpdate(res => {
  590. _this.progress = res.progress;
  591. uni.showLoading({
  592. title: '上传中'
  593. })
  594. if (_this.progress != 100) {
  595. _this.loading = false
  596. } else {
  597. _this.loading = true
  598. }
  599. });
  600. })
  601. },
  602. })
  603. },
  604. choosevideo() {
  605. let _this = this;
  606. uni.chooseVideo({
  607. sourceType: ['album', 'camera'],
  608. maxDuration: 30,
  609. success(resp) {
  610. const task = uni.uploadFile({
  611. url: _this.$HTTP + `/obs`,
  612. filePath: resp.tempFilePath,
  613. name: 'file',
  614. formData: {},
  615. header: _this.headers,
  616. success: res => {
  617. // 判断是否json字符串,将其转为json格式
  618. let data = JSON.parse(res.data);
  619. if (![200].includes(res.statusCode)) {
  620. this.uploadError(index, data);
  621. } else {
  622. //上传成功
  623. if (_this.progress === 100) {
  624. _this.imgArr.push(data.data.url)
  625. _this.$modal.msg('上传成功!')
  626. _this.photo = false;
  627. }
  628. }
  629. },
  630. fail: e => {
  631. _this.$modal.msg('上传失败!')
  632. this.uploadError(index, e);
  633. },
  634. complete: res => {
  635. uni.hideLoading();
  636. _this.uploading = false;
  637. }
  638. });
  639. task.onProgressUpdate(res => {
  640. _this.progress = res.progress;
  641. uni.showLoading({
  642. title: '上传中'
  643. })
  644. if (_this.progress != 100) {
  645. _this.loading = false
  646. } else {
  647. _this.loading = true
  648. }
  649. });
  650. },
  651. })
  652. },
  653. pickerShow(e) {
  654. this.type = e; //赋值类型
  655. if (e == 'door') { //上门类型
  656. this.openDict = true;
  657. getDicts("visit_type").then(response => {
  658. this.dictOptions = response.data;
  659. });
  660. } else if (e == 'zbf') { //自闭阀类型
  661. this.openDict = true;
  662. getDicts("self_closing_valve_type").then(response => {
  663. this.dictOptions = response.data;
  664. });
  665. } else if (e == 'brand') { //品牌
  666. this.openDict = true;
  667. getDicts("brand").then(response => {
  668. this.dictOptions = response.data;
  669. });
  670. } else if (e == 'cz') { //材质
  671. this.open = true;
  672. getEnginMaterialQualityList("民用工程").then(response => {
  673. this.selectList = response.data;
  674. });
  675. } else if (e == 'gg') { //规格
  676. if (this.isEmpty(this.materialValue.id)) {
  677. this.$modal.msg('请选择材质')
  678. } else {
  679. this.open = true;
  680. this.selectList = this.materialList;
  681. }
  682. } else if (e == 'fsdj') {
  683. //腐蚀等级
  684. this.openDict = true;
  685. //腐蚀等级
  686. getDicts("corrosion_level").then(response => {
  687. this.dictOptions = response.data;
  688. });
  689. } else if (e == 'kj') {
  690. //孔距
  691. this.openDict = true;
  692. getDicts("perforated_pipe_diameter").then(response => {
  693. this.dictOptions = response.data;
  694. });
  695. } else if (e == 'gczq') { //工程周期
  696. this.openDict = true;
  697. getDicts("engin_cycle").then(response => {
  698. this.dictOptions = response.data;
  699. });
  700. } else if (e == 'xzq') { //行政区
  701. if (this.isEmpty(this.projectValue.dictValue)) {
  702. this.$modal.msg('请选择工程周期')
  703. } else {
  704. this.openDict = true;
  705. getDicts("district").then(response => {
  706. this.dictOptions = response.data;
  707. });
  708. }
  709. //this.selectList = this.dictOptions;
  710. } else if (e == 'xq') { //小区
  711. if (this.isEmpty(this.XZQValue.dictValue)) {
  712. this.$modal.msg('请选择行政区')
  713. } else {
  714. this.open = true;
  715. this.selectList = this.XQList;
  716. }
  717. } else if (e == 'ld') { //楼栋
  718. if (this.isEmpty(this.XQValue.id)) {
  719. this.$modal.msg('请选择小区')
  720. } else {
  721. this.open = true;
  722. this.selectList = this.LDList;
  723. }
  724. } else if (e == 'dy') { //单元
  725. if (this.isEmpty(this.LDValue.id)) {
  726. this.$modal.msg('请选择楼栋')
  727. } else {
  728. this.open = true;
  729. this.selectList = this.DYList;
  730. }
  731. } else if (e == 'fj') { //房间
  732. if (this.isEmpty(this.DYValue.id)) {
  733. this.$modal.msg('请选择单元')
  734. } else {
  735. this.open = true;
  736. this.selectList = this.FJList;
  737. }
  738. }
  739. },
  740. switchChange(e) {
  741. //'switch 发生 change 事件,携带值为', e.detail.value)
  742. this.isCheck = e.detail.value;
  743. },
  744. changeSelectDict(item, index) {
  745. this.openDict = false;
  746. if (this.type == 'door') {
  747. this.doorValue = item
  748. } else if (this.type == 'zbf') {
  749. this.SelfClosValve = item
  750. } else if (this.type == 'brand') {
  751. this.brandValue = item
  752. } else if (this.type == 'gczq') {
  753. this.projectValue = item
  754. if (!this.isEmpty(this.FJValue.id)) {
  755. //房间选完 判断 工程周期 工程周期切换
  756. this.getStatus();
  757. }
  758. } else if (this.type == 'xzq') {
  759. this.XZQValue = item;
  760. //根据行政区id获取小区数据
  761. this.XQValue = ''; //重置小区数据
  762. this.LDValue = ''; //重置楼栋数据
  763. this.DYValue = ''; //重置单元数据
  764. this.FJValue = ''; //重置房间数据
  765. getAreaList(item.dictValue).then(res => {
  766. this.XQList = res.data;
  767. })
  768. } else {
  769. this.LevelValue = item;
  770. }
  771. },
  772. changeSelect(item, index) {
  773. // this.index = index;
  774. // this.address = item.communityName;
  775. this.open = false;
  776. if (this.type == 'cz') {
  777. this.materialValue = item;
  778. this.specificationValue = ''; //重置规格
  779. //根据材质ID 获取规格数据
  780. getEnginSpecificationsList(item.id).then(res => {
  781. this.materialList = res.data
  782. })
  783. } else if (this.type == 'gg') {
  784. this.specificationValue = item;
  785. } else if (this.type == 'xq') {
  786. this.XQValue = item;
  787. //根据小区id 获取楼栋数据
  788. this.LDValue = ''; //重置楼栋数据
  789. this.DYValue = ''; //重置单元数据
  790. this.FJValue = ''; //重置房间数据
  791. getBuildingList(item.id).then(res => {
  792. this.LDList = res.data
  793. })
  794. } else if (this.type == 'ld') {
  795. this.LDValue = item;
  796. //根据楼栋ID 获取单元数据
  797. this.DYValue = ''; //重置单元数据
  798. this.FJValue = ''; //重置房间数据
  799. getUnitList(item.id).then(res => {
  800. this.DYList = res.data
  801. })
  802. } else if (this.type == 'dy') {
  803. this.DYValue = item;
  804. //根据单元数据 获取房间数据
  805. this.FJValue = ''; //重置房间数据
  806. getHousesList(item.id).then(res => {
  807. this.FJList = res.data
  808. })
  809. } else if (this.type == 'fj') {
  810. this.FJValue = item;
  811. if (!this.isEmpty(this.projectValue.dictValue)) {
  812. //房间选完 判断 工程周期
  813. this.getStatus();
  814. }
  815. }
  816. },
  817. //关闭弹窗
  818. close(e) {
  819. this.open = false
  820. },
  821. //关闭弹窗
  822. closeDict(e) {
  823. this.openDict = false
  824. },
  825. getStatus() {
  826. let param = {
  827. areaId: this.XQValue.id, // 小区id
  828. buildingId: this.LDValue.id, // 楼宇id
  829. unitId: this.DYValue.id, // 单元id
  830. houseId: this.FJValue.id, // 房间id
  831. enginCycle: this.projectValue.dictValue, // 工程周期
  832. enginType: this.objValue.enginType, //写死 上一页面传过来的
  833. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  834. }
  835. getRoomProjectId(param).then(res => {
  836. if (res.code == '200') {
  837. if (res.data != null && res.data.zEngineeringNodeBoList != null) {
  838. res.data.zEngineeringNodeBoList.forEach((item, index) => {
  839. if (this.objValue.enginClassValue == item.type) {
  840. this.reviewStatus = item.reviewStatus;
  841. if (item.reviewStatus == '1')
  842. this.$modal.msg('当前工程已结束')
  843. }
  844. })
  845. } else {
  846. this.reviewStatus = '' //置空
  847. }
  848. } else {
  849. this.$modal.msg(res.msg)
  850. this.reviewStatus = '' //置空
  851. }
  852. })
  853. },
  854. //提交数据
  855. submit() {
  856. if (this.isEmpty(this.projectValue.dictValue)) {
  857. this.$modal.msg("请选择工程周期")
  858. } else if (this.isEmpty(this.XZQValue.dictValue)) {
  859. this.$modal.msg("请选择行政区")
  860. } else if (this.isEmpty(this.XQValue.id)) {
  861. this.$modal.msg("请选择小区")
  862. } else if (this.isEmpty(this.LDValue.id)) {
  863. this.$modal.msg("请选择楼栋")
  864. } else if (this.isEmpty(this.DYValue.id)) {
  865. this.$modal.msg("请选择单元")
  866. } else if (this.isEmpty(this.FJValue.id)) {
  867. this.$modal.msg("请选择房间")
  868. } else if (this.objValue.enginClassValue == '报警器切断阀') {
  869. if (this.isEmpty(this.brandValue.dictValue)) {
  870. this.$modal.msg("请选择厂家")
  871. } else {
  872. this.onsubmit();
  873. }
  874. } else if (this.objValue.enginClassValue == '打孔') {
  875. if (this.isEmpty(this.LevelValue.dictValue)) {
  876. this.$modal.msg("请选择孔距") //打孔 判断孔距
  877. } else {
  878. this.onsubmit();
  879. }
  880. } else if (this.objValue.enginClassValue == '拆旧管') {
  881. if (this.isEmpty(this.LevelValue.dictValue)) {
  882. this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
  883. } else {
  884. this.onsubmit();
  885. }
  886. } else if (this.objValue.enginClassValue == '立杠') {
  887. //立杠 判断 材质 规格 米数
  888. if (this.isEmpty(this.materialValue.id)) {
  889. this.$modal.msg("请选择材质")
  890. } else if (this.isEmpty(this.specificationValue.id)) {
  891. this.$modal.msg("请选择规格")
  892. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  893. this.$modal.msg("请输入米数")
  894. } else {
  895. if (this.isEmpty(this.inputDecimalNumberValue)) {
  896. this.inputNumberValue = this.inputIntegerNumberValue;
  897. } else {
  898. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  899. }
  900. this.onsubmit();
  901. }
  902. } else if (this.objValue.enginClassValue == '挂表') {
  903. //挂表 判断 品牌
  904. if (this.isEmpty(this.brandValue.dictValue)) {
  905. this.$modal.msg("请选择品牌")
  906. } else {
  907. this.onsubmit();
  908. }
  909. } else if (this.objValue.enginClassValue == '表后管') {
  910. //表后管 判断 材质 规格 米数 (为必须有一张照片和一个视频)
  911. if (this.isEmpty(this.materialValue.id)) {
  912. this.$modal.msg("请选择材质")
  913. } else if (this.isEmpty(this.specificationValue.id)) {
  914. this.$modal.msg("请选择规格")
  915. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  916. this.$modal.msg("请输入米数")
  917. } else if (this.imgArr.length <= 0) {
  918. this.$modal.msg('请上传照片或视频')
  919. } else if (this.loading == false) {
  920. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  921. } else {
  922. const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
  923. '.png') || item
  924. .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
  925. .endsWith('.JPEG'));
  926. const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
  927. if (hasImage && hasVideo) {
  928. //表后管 特殊 提交
  929. if (this.isEmpty(this.inputDecimalNumberValue)) {
  930. this.inputNumberValue = this.inputIntegerNumberValue;
  931. } else {
  932. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  933. }
  934. let param = {
  935. district: this.XZQValue.dictValue,
  936. areaId: this.XQValue.id,
  937. buildingId: this.LDValue.id,
  938. unitId: this.DYValue.id,
  939. houseId: this.FJValue.id,
  940. enginType: this.objValue.enginType, //写死 上一页面传过来的
  941. enginClassification: this.objValue
  942. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  943. enginCycle: this.projectValue.dictValue, //工程周期
  944. zEngineeringNodeBo: {
  945. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  946. zEngineeringInfoBo: {
  947. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  948. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  949. zEngineeringMaterialBo: [{
  950. materialQuality: this.materialValue.id, //材质
  951. specifications: this.specificationValue.id, //规格
  952. number: this.inputNumberValue //米数
  953. }]
  954. }
  955. }
  956. }
  957. addTearOldPipe(param).then(res => {
  958. if (res.code == '200') {
  959. uni.showToast({
  960. title: res.msg,
  961. icon: 'none',
  962. //显示持续时间为 1秒
  963. duration: 1000
  964. });
  965. uni.navigateBack();
  966. }
  967. })
  968. } else {
  969. this.$modal.msg('请至少上传一张照片和一个视频')
  970. }
  971. }
  972. } else if (this.objValue.enginClassValue == '阀管') {
  973. //阀管 判断 材质 规格 米数
  974. if (this.isEmpty(this.doorValue.dictValue)) {
  975. this.$modal.msg("请选择上门类型")
  976. } else if (this.isEmpty(this.SelfClosValve.dictValue)) {
  977. this.$modal.msg("请选择自闭阀类型")
  978. } else if (this.isEmpty(this.materialValue.id)) {
  979. this.$modal.msg("请选择材质")
  980. } else if (this.isEmpty(this.specificationValue.id)) {
  981. this.$modal.msg("请选择规格")
  982. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  983. this.$modal.msg("请输入米数")
  984. } else {
  985. if (this.isEmpty(this.inputDecimalNumberValue)) {
  986. this.inputNumberValue = this.inputIntegerNumberValue;
  987. } else {
  988. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  989. }
  990. this.onsubmit();
  991. }
  992. }
  993. },
  994. onsubmit() {
  995. if (this.imgArr.length <= 0) {
  996. this.$modal.msg('请上传照片或视频')
  997. } else if (this.loading == false) {
  998. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  999. } else {
  1000. //提交
  1001. let param = ';'
  1002. if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue ==
  1003. '打孔') { //拆旧管 打孔
  1004. param = {
  1005. district: this.XZQValue.dictValue,
  1006. areaId: this.XQValue.id,
  1007. buildingId: this.LDValue.id,
  1008. unitId: this.DYValue.id,
  1009. houseId: this.FJValue.id,
  1010. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1011. enginClassification: this.objValue
  1012. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1013. enginCycle: this.projectValue.dictValue, //工程周期
  1014. zEngineeringNodeBo: {
  1015. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1016. zEngineeringInfoBo: {
  1017. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1018. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1019. zEngineeringMaterialBo: [{
  1020. corrosionLevel: this.LevelValue.dictValue //腐蚀等级 //孔距
  1021. }]
  1022. }
  1023. }
  1024. }
  1025. //this.onsubmit(param)
  1026. } else if (this.objValue.enginClassValue == '报警器切断阀') { //报警器切断阀
  1027. param = {
  1028. district: this.XZQValue.dictValue,
  1029. areaId: this.XQValue.id,
  1030. buildingId: this.LDValue.id,
  1031. unitId: this.DYValue.id,
  1032. houseId: this.FJValue.id,
  1033. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1034. enginClassification: this.objValue
  1035. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1036. enginCycle: this.projectValue.dictValue, //工程周期
  1037. zEngineeringNodeBo: {
  1038. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1039. zEngineeringInfoBo: {
  1040. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1041. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1042. zEngineeringMaterialBo: [{
  1043. brand: this.brandValue.dictValue, //品牌
  1044. // number: this.inputNumberValue //米数
  1045. }]
  1046. }
  1047. }
  1048. }
  1049. } else if (this.objValue.enginClassValue == '立杠') { //立杠
  1050. param = {
  1051. district: this.XZQValue.dictValue,
  1052. areaId: this.XQValue.id,
  1053. buildingId: this.LDValue.id,
  1054. unitId: this.DYValue.id,
  1055. houseId: this.FJValue.id,
  1056. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1057. enginClassification: this.objValue
  1058. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1059. enginCycle: this.projectValue.dictValue, //工程周期
  1060. zEngineeringNodeBo: {
  1061. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1062. zEngineeringInfoBo: {
  1063. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1064. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1065. zEngineeringMaterialBo: [{
  1066. materialQuality: this.materialValue.id, //材质
  1067. specifications: this.specificationValue.id, //规格
  1068. number: this.inputNumberValue //米数
  1069. }]
  1070. }
  1071. }
  1072. }
  1073. } else if (this.objValue.enginClassValue == '挂表') { //挂表
  1074. param = {
  1075. district: this.XZQValue.dictValue,
  1076. areaId: this.XQValue.id,
  1077. buildingId: this.LDValue.id,
  1078. unitId: this.DYValue.id,
  1079. houseId: this.FJValue.id,
  1080. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1081. enginClassification: this.objValue
  1082. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1083. enginCycle: this.projectValue.dictValue, //工程周期
  1084. zEngineeringNodeBo: {
  1085. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1086. zEngineeringInfoBo: {
  1087. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1088. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1089. zEngineeringMaterialBo: [{
  1090. brand: this.brandValue.dictValue, //品牌
  1091. //number: this.inputNumberValue //米数
  1092. }]
  1093. }
  1094. }
  1095. }
  1096. } else if (this.objValue.enginClassValue == '阀管') { //自闭阀
  1097. param = {
  1098. district: this.XZQValue.dictValue,
  1099. areaId: this.XQValue.id,
  1100. buildingId: this.LDValue.id,
  1101. unitId: this.DYValue.id,
  1102. houseId: this.FJValue.id,
  1103. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1104. enginClassification: this.objValue
  1105. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1106. enginCycle: this.projectValue.dictValue, //工程周期
  1107. zEngineeringNodeBo: {
  1108. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1109. zEngineeringInfoBo: {
  1110. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1111. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1112. zEngineeringMaterialBo: [{
  1113. visitType: this.doorValue.dictValue, //上门类型
  1114. selfClosingValveType: this.SelfClosValve.dictValue, //自闭阀类型
  1115. materialQuality: this.materialValue.id, //材质
  1116. specifications: this.specificationValue.id, //规格
  1117. number: this.inputNumberValue //米数
  1118. }]
  1119. }
  1120. }
  1121. }
  1122. }
  1123. addTearOldPipe(param).then(res => {
  1124. if (res.code == '200') {
  1125. uni.showToast({
  1126. title: res.msg,
  1127. icon: 'none',
  1128. //显示持续时间为 3秒
  1129. duration: 2000
  1130. });
  1131. setTimeout(function() {
  1132. uni.navigateBack();
  1133. }, 1000)
  1134. }
  1135. })
  1136. }
  1137. },
  1138. history() {
  1139. if (this.isEmpty(this.projectValue.dictValue)) {
  1140. this.$modal.msg("请选择工程周期")
  1141. return
  1142. }
  1143. if (this.isEmpty(this.XZQValue.dictValue)) {
  1144. this.$modal.msg("请选择行政区")
  1145. return
  1146. }
  1147. if (this.isEmpty(this.XQValue.id)) {
  1148. this.$modal.msg("请选择小区")
  1149. return
  1150. }
  1151. if (this.isEmpty(this.LDValue.id)) {
  1152. this.$modal.msg("请选择楼栋")
  1153. return
  1154. }
  1155. if (this.isEmpty(this.DYValue.id)) {
  1156. this.$modal.msg("请选择单元")
  1157. return
  1158. }
  1159. if (this.isEmpty(this.FJValue.id)) {
  1160. this.$modal.msg("请选择房间")
  1161. return
  1162. }
  1163. let param = {
  1164. areaId: this.XQValue.id, // 小区id
  1165. buildingId: this.LDValue.id, // 楼宇id
  1166. unitId: this.DYValue.id, // 单元id
  1167. houseId: this.FJValue.id, // 房间id
  1168. enginCycle: this.projectValue.dictValue, // 工程周期
  1169. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1170. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1171. }
  1172. getRoomProjectId(param).then(res => {
  1173. if (res.code == '200') {
  1174. if (res.data != null) {
  1175. getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(res => {
  1176. this.historyList = res.data
  1177. if (res.data.zEngineeringNodeBo != null) {
  1178. this.showHistoryList();
  1179. } else {
  1180. this.$modal.msg("暂无历史信息")
  1181. }
  1182. })
  1183. } else {
  1184. this.$modal.msg("暂无工程信息")
  1185. }
  1186. } else {
  1187. this.$modal.msg(res.msg)
  1188. }
  1189. })
  1190. },
  1191. showHistoryList() {
  1192. this.$refs.refShare.handleShowShare();
  1193. }
  1194. }
  1195. }
  1196. </script>
  1197. <style lang="scss">
  1198. .container {
  1199. display: flex;
  1200. align-items: center;
  1201. justify-content: space-between;
  1202. padding: 10px;
  1203. position: relative;
  1204. }
  1205. .uni-list {
  1206. border: 1xp solid #eee;
  1207. }
  1208. .to-right-icon {
  1209. width: 15px;
  1210. height: 15px;
  1211. position: absolute;
  1212. top: 50%;
  1213. transform: translateY(-50%);
  1214. }
  1215. .text {
  1216. font-size: 16px;
  1217. color: #333;
  1218. }
  1219. .background {
  1220. // border: 15px solid hsla(0, 0%, 100%, .5);
  1221. background: white;
  1222. background-clip: padding-box;
  1223. padding: 20rpx;
  1224. border-radius: 20rpx;
  1225. margin: 20rpx;
  1226. /*从padding开始往外面裁剪背景*/
  1227. }
  1228. .btn {
  1229. width: 715rpx;
  1230. height: 69rpx;
  1231. background: #79A4F0;
  1232. border-radius: 6rpx;
  1233. font-size: 25rpx;
  1234. font-family: Microsoft YaHei;
  1235. font-weight: 400;
  1236. color: #FFFFFF;
  1237. line-height: 69rpx;
  1238. margin-top: 40rpx;
  1239. margin-bottom: 100rpx;
  1240. }
  1241. .number {
  1242. display: flex;
  1243. /* 水平居中显示子元素 */
  1244. align-items: flex-start;
  1245. /* 垂直居中显示子元素 */
  1246. justify-content: space-between;
  1247. /* 左右间距等于间距大小 */
  1248. padding: 10px;
  1249. /* 设置padding以提高视觉效果 */
  1250. }
  1251. .textarea {
  1252. margin-top: 10upx;
  1253. width: 100%;
  1254. border: 1rpx solid red;
  1255. min-height: 100upx;
  1256. line-height: 20px;
  1257. }
  1258. </style>