TopPipeWork.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  1. <template>
  2. <view>
  3. <view class="background">
  4. <view class="uni-list">
  5. <view class="container">
  6. <view>
  7. 工程名称
  8. </view>
  9. <view v-if="this.isEmpty(this.projectName.id)" style="margin-top: 10;"
  10. @click="pickerShow('gcmc',0)">
  11. <span style="color: darkgray;">请选择工程名称</span>
  12. </view>
  13. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gcmc',0)">
  14. <span style="color: black;">{{projectName.name}}</span>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="uni-list">
  19. <view class="container">
  20. <text>工程地点</text>
  21. <input class="uni-input" type="text" v-model="gcddValue" disabled="true"
  22. style="margin-left: 10px;text-align: right;"></input>
  23. </view>
  24. </view>
  25. <view class="uni-list">
  26. <view class="container">
  27. <text>工程编码</text>
  28. <input class="uni-input" type="text" v-model="gcbmValue" disabled="true"
  29. style="margin-left: 10px;text-align: right;"></input>
  30. </view>
  31. </view>
  32. <view class="uni-list">
  33. <view class="container">
  34. <text>施工单位</text>
  35. <input class="uni-input" type="text" v-model="sgdwValue" disabled="true"
  36. style="margin-left: 10px;text-align: right;"></input>
  37. </view>
  38. </view>
  39. <view class="uni-list">
  40. <view class="container">
  41. <text>工程规模</text>
  42. <input class="uni-input" type="text" v-model="gcgmValue" disabled="true"
  43. style="margin-left: 10px;text-align: right;"></input>
  44. </view>
  45. </view>
  46. <view class="uni-list">
  47. <view class="container">
  48. <text>施工质量</text>
  49. <input class="uni-input" type="text" v-model="sgzlValue" disabled="true"
  50. style="margin-left: 10px;text-align: right;"></input>
  51. </view>
  52. </view>
  53. <view class="uni-list">
  54. <view class="container">
  55. <text>施工进度</text>
  56. <input class="uni-input" type="number" v-model="sgjdValue" disabled="true"
  57. style="margin-left: 10px;text-align: right;"></input>
  58. </view>
  59. </view>
  60. <view class="uni-list">
  61. <view class="align-items" style="margin-bottom: 20px;">
  62. <!-- <view class="container" style="color: gainsboro;">*请上传文件</view> -->
  63. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  64. <!-- <image src="/static/images/chooseimg.png" mode=""
  65. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="chooseFile()"></image> -->
  66. <view v-for="(item,index) in fileArr" :key="index" style="position: relative;">
  67. <view style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  68. @click="chooseModel(item.picUrl,item.fileName)">
  69. {{item.fileName}}
  70. <!-- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
  71. </image> -->
  72. </view>
  73. <!-- <view @click="removeFile(index)"
  74. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  75. <uni-icons type="close" color="darkgray" size="18"></uni-icons>
  76. </view> -->
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  82. subtitleKey="id" v-model="name"></SelectPicker>
  83. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
  84. titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  85. </view>
  86. <view class="background">
  87. <view>
  88. <view class="uni-list">
  89. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  90. {{objValue.value}}
  91. <span
  92. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;"
  93. @click="history">历史</span>
  94. </view>
  95. <view class="container">
  96. <view>
  97. 施工时间
  98. </view>
  99. <view style="margin-top: 10;" @click="openDatetimePicker()">
  100. <span style="color: black;">{{time}}</span>
  101. </view>
  102. </view>
  103. <view class="container">
  104. <view class="uni-common-mt" style="width: 100%;">
  105. <text class="uni-title uni-common-pl">描述</text>
  106. <view style="width: 100%;padding-right: 20rpx;box-sizing: border-box;">
  107. <textarea class="textarea" placeholder="请输入描述" maxlength="100"
  108. placeholder-style="padding: 10rpx;"
  109. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  110. auto-height v-model="projectContent"></textarea>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="uni-list">
  115. <view class="container">
  116. <view>
  117. 材 质
  118. </view>
  119. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  120. @click="pickerShow('cz')">
  121. <span style="color: darkgray;">请选择材质</span>
  122. </view>
  123. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  124. <span style="color: black;">{{materialValue.name}}</span>
  125. </view>
  126. </view>
  127. </view>
  128. <view class="uni-list">
  129. <view class="container">
  130. <view>
  131. 规 格
  132. </view>
  133. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  134. @click="pickerShow('gg')">
  135. <span style="color: darkgray;">请选择规格</span>
  136. </view>
  137. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  138. <span style="color: black;">{{specificationValue.name}}</span>
  139. </view>
  140. </view>
  141. </view>
  142. <view class="uni-list">
  143. <view class="container">
  144. <text>数 量</text>
  145. <input class="uni-input" type="number" v-model="inputNumberValue" placeholder="请填写数量"
  146. maxlength="11" style="margin-left: 10px;text-align: right;"></input>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  152. <view class="container" style="color: gainsboro;">*请上传照片</view>
  153. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  154. <image src="/static/images/chooseimg.png" mode=""
  155. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="choose()"></image>
  156. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  157. <view
  158. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ">
  159. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  160. @click="showPhoto(index)">
  161. </image>
  162. </view>
  163. <view v-else>
  164. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  165. </view>
  166. <view @click="remove(index)"
  167. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  168. <uni-icons type="close" color="darkgray" size="18"></uni-icons>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. <view class="action-btn">
  175. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  176. </view>
  177. <bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.value"></bottom-sheet>
  178. <yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
  179. :time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
  180. <!-- 下载提示页面 -->
  181. <mypopup :show="show_loding" :popupText="popupText" :titleText="titleText" :cancelText="cancelText"
  182. :confirmText="confirmText" @close="cancel_loding" @confirm="confirm_loding">
  183. </mypopup>
  184. </view>
  185. </template>
  186. <script>
  187. import SelectPicker from '../../components/selectPicker/select_picker.vue'
  188. import bottomSheet from '../../components/bottomSheet/bottomSheetMore.vue'
  189. import mypopup from '../../components/mypopup/mypopup.vue'
  190. import uniIcons from '../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  191. import {
  192. getDicts
  193. } from "@/api/system/dict/data";
  194. import {
  195. getToken
  196. } from '../../utils/auth';
  197. import {
  198. getEnginMaterialQualityList,
  199. getEnginSpecificationsList,
  200. getTopPipeWorkDetails,
  201. getTopPipeNameList,
  202. SubmitTopPipeWork,
  203. getTopPipeHistoryList
  204. } from '@/api/common'
  205. export default {
  206. components: {
  207. SelectPicker,
  208. uniIcons,
  209. bottomSheet,
  210. mypopup
  211. },
  212. data() {
  213. return {
  214. historyList: {}, //历史数据
  215. show_loding: false,
  216. popupText: '', //对话框内容
  217. titleText: '',
  218. cancelText: '',
  219. confirmText: '',
  220. objValue: '', //上一页面传过来的值 新增接口用
  221. headers: {
  222. Authorization: "Bearer " + getToken()
  223. },
  224. time: '', //施工时间
  225. open: false,
  226. objValue: '', //上一页面传过来的值 新增接口用
  227. openDict: false,
  228. selectList: [],
  229. dictOptions: [],
  230. imgArr: [],
  231. fileArr: [],
  232. projectName: '', //工程名称
  233. specificationValue: {}, //规格
  234. materialValue: {}, //材质
  235. inputNumberValue: '',
  236. gcddValue: '', //工程地点
  237. gcbmValue: '', //工程编码
  238. sgdwValue: '', //施工单位
  239. gcgmValue: '', //工程规模
  240. sgzlValue: '', //施工质量
  241. sgjdValue: '', //施工进度
  242. materialList: '', //材质list
  243. enginId: '', //其他工程id
  244. id: '', //工程id
  245. fileUrl: '', //点击的文件地址
  246. fileName: '', //点击的文件名称
  247. projectContent: '', //描述
  248. zEngineeringMaterialBo: [], //给后台传的值 用料列表
  249. }
  250. },
  251. created() {
  252. this.time = this.traversalTime(new Date().getTime()) //在data里定义变量-nowTime
  253. console.log(this.time)
  254. },
  255. onLoad(options) {
  256. if ('params' in options) {
  257. this.objValue = JSON.parse(decodeURIComponent(options.params));
  258. }
  259. },
  260. methods: {
  261. //判断是否选择
  262. isEmpty(str) {
  263. return (!str || 0 === str.length);
  264. },
  265. handleSubmit(e) {
  266. this.time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
  267. },
  268. //获取当前时间
  269. traversalTime(timestamp) {
  270. //timestamp(时间戳)是整数,否则要parseInt转换
  271. let time = new Date(timestamp);
  272. let y = time.getFullYear();
  273. let m = time.getMonth() + 1;
  274. let d = time.getDate();
  275. let h = time.getHours();
  276. let mm = time.getMinutes();
  277. let s = time.getSeconds();
  278. return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this
  279. .addTimes(
  280. mm) + ':' + this.addTimes(s);
  281. },
  282. addTimes(m) {
  283. return m < 10 ? '0' + m : m
  284. },
  285. // 打开picker
  286. openDatetimePicker() {
  287. this.$refs.myPicker.show();
  288. },
  289. // 关闭picker
  290. closeDatetimePicker() {
  291. this.$refs.myPicker.hide();
  292. },
  293. showPhoto(index) {
  294. uni.previewImage({
  295. current: index,
  296. urls: this.imgArr,
  297. })
  298. },
  299. remove(index) {
  300. uni.showModal({
  301. title: '提示',
  302. content: '是否删除该图片或视频?',
  303. success: (res) => {
  304. if (res.confirm) {
  305. this.imgArr.splice(index, 1)
  306. console.log('this.imgarr', this.imgArr)
  307. if (this.imgArr.length <= 0) {
  308. this.photo = true;
  309. }
  310. }
  311. }
  312. })
  313. },
  314. choose() {
  315. let _this = this;
  316. uni.showActionSheet({
  317. title: '上传',
  318. itemList: ['图片', '视频'],
  319. success: (res) => {
  320. console.log(res)
  321. if (res.tapIndex == 0) {
  322. this.chooseimage()
  323. } else {
  324. this.choosevideo()
  325. }
  326. }
  327. })
  328. },
  329. chooseimage() {
  330. let _this = this;
  331. console.log('图片', _this.headers)
  332. uni.chooseImage({
  333. sizeType: ['album', 'camera'],
  334. success(resp) {
  335. resp.tempFiles.forEach((item, index) => {
  336. const task = uni.uploadFile({
  337. url: _this.$HTTP + `/obs`,
  338. filePath: item.path,
  339. name: 'file',
  340. formData: {},
  341. header: _this.headers,
  342. success: res => {
  343. // 判断是否json字符串,将其转为json格式
  344. console.log("结果", res)
  345. // let data = _this.$u.test.jsonString(res
  346. // .data) ? JSON.parse(res.data) : res.data;
  347. let data = JSON.parse(res.data);
  348. if (![200].includes(data.code)) {
  349. // this.uploadError(index, data);
  350. _this.$modal.msg(data.msg)
  351. } else {
  352. if (_this.progress === 100) {
  353. console.log('_this.progress', _this.progress)
  354. //console.log('data----', data)data
  355. console.log('res--', res)
  356. _this.imgArr.push(data.data.url)
  357. console.log('imgArr', _this.imgArr)
  358. _this.$modal.msg('上传成功!')
  359. _this.photo = false;
  360. }
  361. }
  362. },
  363. fail: e => {
  364. console.log(e)
  365. _this.$modal.msg('上传失败!')
  366. //_this.uploadError(index, e);
  367. },
  368. complete: res => {
  369. uni.hideLoading();
  370. _this.uploading = false;
  371. }
  372. });
  373. task.onProgressUpdate(res => {
  374. _this.progress = res.progress;
  375. console.log('onProgressUpdate', res)
  376. console.log('task.onProgressUpdate', _this.progress)
  377. uni.showLoading({
  378. title: '上传中'
  379. })
  380. if (_this.progress != 100) {
  381. _this.loading = false
  382. console.log('_this.loading false', _this.loading)
  383. } else {
  384. _this.loading = true
  385. console.log('_this.loading true', _this.loading)
  386. }
  387. });
  388. })
  389. },
  390. })
  391. },
  392. choosevideo() {
  393. let _this = this;
  394. console.log('视频')
  395. uni.chooseVideo({
  396. sourceType: ['album', 'camera'],
  397. maxDuration: 30,
  398. success(resp) {
  399. const task = uni.uploadFile({
  400. url: _this.$HTTP + `/obs`,
  401. filePath: resp.tempFilePath,
  402. name: 'file',
  403. formData: {},
  404. header: _this.headers,
  405. success: res => {
  406. // 判断是否json字符串,将其转为json格式
  407. let data = JSON.parse(res.data);
  408. if (![200].includes(res.statusCode)) {
  409. this.uploadError(index, data);
  410. } else {
  411. //上传成功
  412. if (_this.progress === 100) {
  413. console.log('_this.progress', _this.progress)
  414. _this.imgArr.push(data.data.url)
  415. console.log('imgArr', _this.imgArr)
  416. _this.$modal.msg('上传成功!')
  417. _this.photo = false;
  418. }
  419. }
  420. },
  421. fail: e => {
  422. _this.$modal.msg('上传失败!')
  423. this.uploadError(index, e);
  424. },
  425. complete: res => {
  426. uni.hideLoading();
  427. _this.uploading = false;
  428. }
  429. });
  430. task.onProgressUpdate(res => {
  431. _this.progress = res.progress;
  432. console.log('onProgressUpdate', res)
  433. uni.showLoading({
  434. title: '上传中'
  435. })
  436. if (_this.progress != 100) {
  437. _this.loading = false
  438. console.log('_this.loading false', _this.loading)
  439. } else {
  440. _this.loading = true
  441. console.log('_this.loading true', _this.loading)
  442. }
  443. });
  444. },
  445. })
  446. },
  447. chooseModel(url, name) {
  448. this.cancelText = '复制';
  449. this.confirmText = "下载";
  450. this.titleText = "温馨提示"
  451. this.popupText = "下载或者复制链接";
  452. this.show_loding = true;
  453. this.fileName = name;
  454. this.fileUrl = url; //文件名称和下载地址赋值
  455. },
  456. //取消按钮
  457. cancel_loding() {
  458. let _this = this;
  459. _this.show_loding = false;
  460. console.log("复制")
  461. if (!_this.isEmpty(_this.fileUrl)) {
  462. console.log(_this.fileUrl)
  463. console.log(_this.fileName)
  464. uni.setClipboardData({
  465. data: _this.fileUrl,
  466. success() {
  467. uni.showToast({
  468. title: '已复制' + _this.fileName + '地址成功 请在浏览器打开',
  469. icon: 'none'
  470. });
  471. },
  472. fail(e) {
  473. console.log("失败", e)
  474. uni.showToast({
  475. title: '复制失败',
  476. icon: 'none'
  477. });
  478. }
  479. });
  480. }
  481. },
  482. //确定按钮
  483. confirm_loding() {
  484. this.show_loding = false;
  485. console.log("下载")
  486. this.download(this.fileUrl, this.fileName);
  487. },
  488. getDownLoadFilePath() {
  489. let cachePath = `${uni.env.USER_DATA_PATH}/downloads`
  490. let fm = uni.getFileSystemManager()
  491. try {
  492. // 访问成功则存在
  493. fm.accessSync(cachePath)
  494. } catch (error) {
  495. // 不存在则新建
  496. fm.mkdirSync(cachePath, true)
  497. }
  498. return cachePath
  499. },
  500. download(url, name) {
  501. let savePath = this.getDownLoadFilePath();
  502. console.log('点击下载', url);
  503. console.log('点击下载333', savePath);
  504. //var savePath = uni.env.USER_DATA_PATH + '/savePath'
  505. uni.downloadFile({
  506. url: url,
  507. success: response => {
  508. if (response.statusCode === 200) {
  509. console.log("数据", response)
  510. uni.getFileSystemManager().saveFile({
  511. tempFilePath: response.tempFilePath,
  512. filePath: `${savePath}/${name}`,
  513. success: (resData) => {
  514. console.log('保存路径', resData.savedFilePath)
  515. console.log("dd", resData)
  516. uni.showToast({
  517. title: '下载成功'
  518. })
  519. },
  520. fail: error => {
  521. console.log('error: ', error)
  522. }
  523. })
  524. }
  525. },
  526. fail: error => {
  527. debugger
  528. console.log("ddd", error)
  529. }
  530. })
  531. },
  532. pickerShow(e) {
  533. this.type = e; //赋值类型
  534. if (e == 'gcmc') {
  535. this.open = true;
  536. getTopPipeNameList().then(response => {
  537. this.selectList = response.data;
  538. });
  539. } else if (e == 'cz') { //材质
  540. this.open = true;
  541. getEnginMaterialQualityList("顶管工程").then(response => {
  542. this.selectList = response.data;
  543. });
  544. } else if (e == 'gg') { //规格
  545. if (this.isEmpty(this.materialValue.id)) {
  546. this.$modal.msg('请选择材质')
  547. } else {
  548. this.open = true;
  549. this.selectList = this.materialList;
  550. }
  551. }
  552. },
  553. changeSelect(item, index) {
  554. // this.index = index;
  555. // this.address = item.communityName;
  556. this.open = false;
  557. if (this.type == 'gcmc') {
  558. this.projectName = item;
  559. uni.showLoading({
  560. title: '加载中'
  561. })
  562. getTopPipeWorkDetails(item.id).then(res => {
  563. uni.hideLoading();
  564. this.gcddValue = res.data.enginAddre; //工程地点
  565. this.gcbmValue = res.data.enginCode; //工程编码
  566. this.sgdwValue = res.data.constructUnit; //施工单位
  567. this.gcgmValue = res.data.enginScale; //工程规模
  568. this.sgzlValue = res.data.constructQuality; //施工质量
  569. this.sgjdValue = res.data.constructSchedule; //施工进度
  570. this.fileArr = res.data.pics;
  571. this.enginId = res.data.enginId;
  572. this.id = res.data.id;
  573. })
  574. } else if (this.type == 'cz') {
  575. this.materialValue = item;
  576. this.specificationValue = ''; //重置规格
  577. //根据材质ID 获取规格数据
  578. getEnginSpecificationsList(item.id).then(res => {
  579. this.materialList = res.data
  580. })
  581. } else if (this.type == 'gg') {
  582. this.specificationValue = item;
  583. }
  584. },
  585. //关闭弹窗
  586. close(e) {
  587. this.open = false
  588. },
  589. //历史
  590. history() {
  591. if (this.isEmpty(this.projectName.id)) {
  592. this.$modal.msg('请选择工程名称')
  593. return
  594. }
  595. getTopPipeHistoryList(this.id, this.objValue.value).then(response => {
  596. this.historyList = response.data
  597. if (response.data.zEngineeringNodeBo.zEngineeringInfoBoList != null) {
  598. this.$refs.refShare.handleShowShare();
  599. } else {
  600. this.$modal.msg("暂无历史信息")
  601. }
  602. });
  603. },
  604. //提交
  605. submit() {
  606. if (this.isEmpty(this.projectName.id)) {
  607. this.$modal.msg('请选择工程名称')
  608. return
  609. }
  610. if (this.isEmpty(this.materialValue.id)) {
  611. this.$modal.msg("请选择材质")
  612. return
  613. }
  614. if (this.isEmpty(this.specificationValue.id)) {
  615. this.$modal.msg("请选择规格")
  616. return
  617. }
  618. if (this.isEmpty(this.inputNumberValue)) {
  619. this.$modal.msg("请输入数量")
  620. return
  621. }
  622. let param = {
  623. id: this.id,
  624. enginId: this.enginId,
  625. enginName: this.projectName.name,
  626. enginAddre: this.gcddValue,
  627. enginCode: this.gcbmValue,
  628. constructUnit: this.sgdwValue,
  629. enginScale: this.gcgmValue,
  630. constructQuality: this.sgzlValue,
  631. constructSchedule: this.sgjdValue,
  632. files: this.fileArr,
  633. zEngineeringNodeBo: {
  634. type: this.objValue.value,
  635. zEngineeringInfoBo: {
  636. constructTime: this.time,
  637. remark: this.projectContent,
  638. zEngiineeringPhotoBoList: this.imgArr,
  639. zEngineeringMaterialBo: [{
  640. materialQuality: this.materialValue.id, //材质
  641. specifications: this.specificationValue.id, //规格
  642. number: this.inputNumberValue //数量
  643. }]
  644. }
  645. }
  646. }
  647. SubmitTopPipeWork(param).then(res => {
  648. if (res.code == '200') {
  649. uni.showToast({
  650. title: res.msg,
  651. icon: 'none',
  652. //显示持续时间为 3秒
  653. duration: 1000
  654. });
  655. setTimeout(function() {
  656. uni.navigateBack();
  657. }, 1000)
  658. }
  659. })
  660. },
  661. }
  662. }
  663. </script>
  664. <style>
  665. .container {
  666. display: flex;
  667. margin-left: 10px;
  668. margin-top: 10px;
  669. margin-right: 10px;
  670. align-items: flex-start;
  671. justify-content: space-between;
  672. }
  673. .text {
  674. font-size: 16px;
  675. color: #333;
  676. }
  677. .background {
  678. border: 15px solid hsla(0, 0%, 100%, .5);
  679. background: white;
  680. background-clip: padding-box;
  681. /*从padding开始往外面裁剪背景*/
  682. }
  683. .btn {
  684. margin-top: 40px;
  685. margin-right: 20px;
  686. margin-bottom: 120px;
  687. margin-left: 20px;
  688. height: 45px;
  689. }
  690. .number {
  691. display: flex;
  692. /* 水平居中显示子元素 */
  693. align-items: flex-start;
  694. /* 垂直居中显示子元素 */
  695. justify-content: space-between;
  696. /* 左右间距等于间距大小 */
  697. padding: 10px;
  698. /* 设置padding以提高视觉效果 */
  699. }
  700. .textarea {
  701. margin-top: 10upx;
  702. width: 100%;
  703. border: 1rpx solid red;
  704. min-height: 100upx;
  705. line-height: 20px;
  706. }
  707. page {
  708. background: #f2f2f2;
  709. }
  710. .flex-x {
  711. display: flex;
  712. align-items: center;
  713. }
  714. .template_title,
  715. .template_title1,
  716. .template_title_list {
  717. height: 90rpx;
  718. background: #fff;
  719. justify-content: space-between;
  720. padding: 0 30rpx;
  721. box-sizing: border-box;
  722. }
  723. .template_title1 {
  724. background: none;
  725. }
  726. .template_title_list {
  727. margin-bottom: 4rpx;
  728. }
  729. .template_title>view,
  730. .template_title1>view {
  731. font-size: 32rpx;
  732. color: #8f8f8f;
  733. flex-shrink: 0;
  734. margin-right: 20rpx;
  735. }
  736. .template_title>input {
  737. font-size: 28rpx;
  738. color: #808080;
  739. text-align: right;
  740. flex-grow: 1;
  741. }
  742. /* 添加内容 */
  743. .add_con>text {
  744. font-size: 40rpx;
  745. color: #f16765;
  746. display: block;
  747. margin-right: 20rpx;
  748. margin-left: 10rpx;
  749. line-height: 44rpx;
  750. }
  751. .add_con>view {
  752. font-size: 32rpx;
  753. color: #7885cb;
  754. }
  755. /* 删除内容 */
  756. .del {
  757. font-size: 32rpx;
  758. color: #f16765;
  759. margin-right: 14rpx;
  760. padding: 20rpx;
  761. }
  762. input {
  763. flex-grow: 1;
  764. font-size: 28rpx;
  765. color: #808080;
  766. }
  767. .btn {
  768. margin-top: 100rpx;
  769. }
  770. </style>