emergencyRepairOrder.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. <template>
  2. <view>
  3. <image src="https://cczdsz.cn/app/images//background-from.png" mode="" class="background"></image>
  4. <view class="project-content">
  5. <u-form labelPosition="left" :model="form" :rules="rules" ref="form">
  6. <u-form-item label="工程名称" labelWidth="150" borderBottom ref="item1">
  7. <u-input v-model="form.enginName" borderBottom placeholder="请输入工程名称" ></u-input>
  8. </u-form-item>
  9. <u-form-item label="涉及户数" labelWidth="150" borderBottom ref="item1">
  10. <u-input v-model="form.houseHolds" borderBottom placeholder="请输入涉及户数" ></u-input>
  11. </u-form-item>
  12. <u-form-item label="接警时间" borderBottom ref="item1" labelWidth="150">
  13. <u-input v-model="form.repairTime" borderBottom placeholder="请选择接警时间" disabled
  14. @click="showtime=true "></u-input>
  15. <u-picker v-model="showtime" mode="time" :params="params" @confirm="time()"></u-picker>
  16. </u-form-item>
  17. <u-form-item label="报修人名称" labelWidth="150" borderBottom ref="item1">
  18. <u-input v-model="form.repairName" borderBottom placeholder="请输入报修人名称" ></u-input>
  19. </u-form-item>
  20. <u-form-item label="联系电话" labelWidth="150" borderBottom ref="item1">
  21. <u-input v-model="form.repairPhone" borderBottom placeholder="请输入联系电话"
  22. ></u-input>
  23. </u-form-item>
  24. <u-form-item label="报修类型" labelWidth="150" borderBottom ref="item1">
  25. <u-input v-model="repairTypeLabel" disabled @click=" showrepairType= true;" borderBottom
  26. disabledColor="#ffffff" placeholder="请选择报修类型" ></u-input>
  27. <u-input v-model="labelList.repair_type" disabled borderBottom disabledColor="#ffffff"
  28. placeholder="请选择报修类型" v-if="type==1"></u-input>
  29. <u-select v-model="showrepairType" :list="typelist.repair_type" label-name="dictLabel"
  30. value-name="dictValue" @confirm="repairType()" :value="form.repairType"></u-select>
  31. <u-icon slot="right" name="arrow-right"></u-icon>
  32. </u-form-item>
  33. <u-form-item borderBottom ref="item1">
  34. <view>报修内容</view>
  35. <u-input v-model="form.repairContent" type="textarea" showWordLimit='255' borderBottom
  36. placeholder="请输入报修内容"></u-input>
  37. </u-form-item>
  38. <u-form-item label="到达时间" labelWidth="150" borderBottom ref="item1">
  39. <u-input v-model="form.arrivalTime" borderBottom disabled
  40. @click="showtime4=true "></u-input>
  41. <u-picker v-model="showtime4" mode="time" :params="params" @confirm="time4()"></u-picker>
  42. </u-form-item>
  43. <u-form-item label="损坏原因" labelWidth="150" borderBottom ref="item1">
  44. <u-input v-model="causesOfFamageLabel" disabled @click=" causesOfFamageType = true;"
  45. borderBottom placeholder="请选择损坏原因"></u-input>
  46. <u-input v-model="labelList.causes_of_damage" disabled v-if="type==1" borderBottom
  47. placeholder="请选择损坏原因"></u-input>
  48. <u-select v-model="causesOfFamageType" :list="typelist.causes_of_damage" label-name="dictLabel"
  49. value-name="dictValue" @confirm="causesOfFamage()" :value="form.causesOfFamage"></u-select>
  50. <u-icon slot="right" name="arrow-right"></u-icon>
  51. </u-form-item>
  52. <u-form-item label="施工管径" labelWidth="150" borderBottom ref="item1">
  53. <u-input v-model="form.constructionPipeDiameter" borderBottom
  54. placeholder="请输入施工管径"></u-input>
  55. </u-form-item>
  56. <u-form-item label="管线压力" labelWidth="150" borderBottom ref="item1">
  57. <u-input v-model="pipelinePressureLabel" disabled @click=" pipelinePressureType= true;"
  58. placeholder="请输入管线压力" borderBottom></u-input>
  59. <u-input v-model="labelList.pipeline_pressure" disabled borderBottom v-if="type==1"></u-input>
  60. <u-select v-model="pipelinePressureType" :list="typelist.pipeline_pressure" label-name="dictLabel"
  61. value-name="dictValue" @confirm="pipelinePressure()" :value="form.pipelinePressure"></u-select>
  62. <u-icon slot="right" name="arrow-right"></u-icon>
  63. </u-form-item>
  64. <u-form-item label="停气方式" labelWidth="150" borderBottom ref="item1">
  65. <u-input v-model="form.stopGasMethod" borderBottom
  66. placeholder="请输入停气方式"></u-input>
  67. </u-form-item>
  68. <u-form-item label="使用材料" labelWidth="150" borderBottom ref="item1">
  69. <u-input v-model="form.usingMaterials" borderBottom
  70. placeholder="请输入使用材料" ></u-input>
  71. </u-form-item>
  72. <u-form-item label="维修人" labelWidth="150" borderBottom ref="item1">
  73. <u-input v-model="form.maintenanceName" borderBottom disabled
  74. placeholder="请输入维修人" @click="workerModel=true "></u-input>
  75. <!-- <u-select v-model="workerModel" :list="workerList" label-name="name"
  76. value-name="id" @confirm="Worker()" :value="form.maintenanceName"></u-select> -->
  77. <u-popup v-model="workerModel" style= "height: 200px ;padding: 40rpx 36rpx;"mode="bottom">
  78. <view style="color: #00aaff;margin-left: 10px;">维修人</view>
  79. <u-search placeholder="请输入维修人名称" v-model="namevalue" :action-style="{'font-size':'40rpx'}" :show-action="false" @search="getWorker()"></u-search>
  80. <scroll-view class="scroll-view" scroll-y="true" :scroll-top="scrollTop" style= "padding: 20rpx 36rpx; height: 200px; overflow-y:scroll;" >
  81. <u-checkbox-group width="200px" @change="checkboxGroupChange" style="margin: 0 0 40rpx 0;">
  82. <u-checkbox :customStyle="{marginBottom: '20px'}"
  83. @change="checkboxChange"
  84. v-model="item.checked"
  85. v-for="(item, index) in workerList" :key="item.id"
  86. :name="item.name"
  87. :label="item.name"
  88. >{{item.name}}
  89. </u-checkbox>
  90. </u-checkbox-group>
  91. </scroll-view>
  92. <view style="overflow: hidden;margin: 40rpx 0 0 0; padding: 40rpx 36rpx;">
  93. <u-button @click="workerCancel()" style="width: 46%; float: left;background: #eae9e9;">取消</u-button>
  94. <u-button@click="workerButton()" type="primary" style="width: 46%; float: right;background: #0f59ca !important; color: #fff;">确认</u-button>
  95. </view>
  96. </u-popup>
  97. <u-icon slot="right" name="arrow-right"></u-icon>
  98. </u-form-item>
  99. <u-form-item label="施工时间" labelWidth="150" borderBottom ref="item1">
  100. <u-input v-model="form.constructionTime" borderBottom disabled
  101. @click="showtime3=true "></u-input>
  102. <u-picker v-model="showtime3" mode="time" :params="params" @confirm="time3()"></u-picker>
  103. </u-form-item>
  104. <u-form-item label="现场领导" labelWidth="150" borderBottom ref="item1">
  105. <u-input v-model="form.onSiteLeadership" borderBottom placeholder="请输入现场领导" ></u-input>
  106. </u-form-item>
  107. <u-form-item label="完成时间" labelWidth="150" borderBottom ref="item1">
  108. <u-input v-model="form.maintenanceTime" borderBottom disabled
  109. @click="showtime2=true "></u-input>
  110. <u-picker v-model="showtime2" mode="time" :params="params" @confirm="time2()"></u-picker>
  111. </u-form-item>
  112. <u-form-item label="维修照片" labelWidth="150" borderBottom ref="item1">
  113. <view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
  114. <image src="https://cczdsz.cn/app/images//chooseimg.png" mode=""
  115. style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()" >
  116. </image>
  117. <view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
  118. <view v-if="item.type == 'image'">
  119. <image :src="item.url" mode="" style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"
  120. @click="showPhoto(index)">
  121. </image>
  122. </view>
  123. <view v-else>
  124. <video :src="item" style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"></video>
  125. </view>
  126. <view @click="remove(index)"
  127. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
  128. <u-icon name="close" color="#FFFFFF" size="25" ></u-icon>
  129. </view>
  130. </view>
  131. </view>
  132. </u-form-item>
  133. <u-form-item borderBottom ref="item1">
  134. <view>备注</view>
  135. <u-input v-model="form.remarks" borderBottom type="textarea" ></u-input>
  136. </u-form-item>
  137. </u-form>
  138. <u-button @click="save()" type='primary' v-if="type!=1">确认上传</u-button>
  139. <u-button @click="update()" type='primary' v-else>确认修改</u-button>
  140. </view>
  141. </view>
  142. </template>
  143. <script>
  144. import service from '@/api/index.js'
  145. export default {
  146. data() {
  147. return {
  148. params: {
  149. year: true,
  150. month: true,
  151. day: true,
  152. hour: true,
  153. minute: true,
  154. second: false
  155. },
  156. showtime: false,
  157. action: this.$HTTP.webUrl + `/obs`,
  158. causesOfFamageType: false,
  159. pipelinePressureType: false,
  160. repairTypeLabel: null,
  161. causesOfFamageLabel: null,
  162. pipelinePressureLabel: null,
  163. showtime2: false,
  164. showtime3: false,
  165. showtime4: false,
  166. headers: {
  167. MAuthorization: "wxBearer " + uni.getStorageSync('token')
  168. },
  169. url: [],
  170. uploading: false,
  171. imgArr: [],
  172. imgymxs: [],
  173. causesOfDamage: null,
  174. progress: 0, //图片或视频上传百分比
  175. form: {},
  176. userInfo: {},
  177. showrepairType: false,
  178. community: null,
  179. communityName: null,
  180. dictlist: ['causes_of_damage', 'pipeline_pressure', 'repair_type'],
  181. typelist: {},
  182. typelist2: {},
  183. labelList: {},
  184. type: 2,
  185. id: null,
  186. createBy:null,
  187. workerList:[],
  188. workerModel:false,
  189. WorkerList:[],
  190. WorkerName:null,
  191. userIdList:[],
  192. maintenanceName:null,
  193. namevalue:''
  194. };
  195. },
  196. onLoad(e) {
  197. this.getdictsysinfo()
  198. this.type = e.type
  199. this.id = e.id
  200. uni.setNavigationBarTitle({
  201. title: '抢险维修单'
  202. });
  203. uni.setNavigationBarColor({
  204. frontColor: '#ffffff',
  205. backgroundColor: '#2d95f4',
  206. })
  207. this.getUserName()
  208. this.getWorker()
  209. },
  210. onShow() {},
  211. methods: {
  212. checkboxGroupChange(val)
  213. {
  214. this.WorkerList=val
  215. // this.maintenanceName=this.WorkerList.join(",")
  216. // console.log(111,this.maintenanceName)
  217. },
  218. workerCancel()
  219. {
  220. this.WorkerList=[]
  221. this.workerModel=false
  222. },
  223. workerButton()
  224. {
  225. this.form.maintenanceName=this.WorkerList.join(",")
  226. console.log(111,this.form.maintenanceName)
  227. this.workerModel=false
  228. },
  229. checkboxChange(val)
  230. {
  231. console.log(222,val)
  232. },
  233. getdictsysinfo() {
  234. let _this = this
  235. service.getDictInfoList({
  236. type: this.dictlist
  237. }).then(res => {
  238. _this.typelist = res
  239. if (this.type == 1) {
  240. let _this = this
  241. console.log(this.id)
  242. service.getemergencyRepair(this.id).then(res => {
  243. console.log(_this.typelist)
  244. let list = []
  245. list = _this.typelist.repair_type
  246. list.forEach((item) => {
  247. if (item.dictValue == res.repairType) {
  248. _this.labelList.repair_type = item.dictLabel
  249. }
  250. })
  251. let list2 = []
  252. list2 = _this.typelist.causes_of_damage
  253. list2.forEach((item) => {
  254. if (item.dictValue == res.causesOfDamage) {
  255. _this.labelList.causes_of_damage = item.dictLabel
  256. }
  257. })
  258. let list3 = []
  259. list3 = _this.typelist.pipeline_pressure
  260. list3.forEach((item) => {
  261. if (item.dictValue == res.pipelinePressure) {
  262. _this.labelList.pipeline_pressure = item.dictLabel
  263. }
  264. })
  265. if (null != res.photoList) {
  266. res.photoList.forEach(item => {
  267. let url = {}
  268. url.url = item
  269. url.type = 'image'
  270. this.imgymxs.push(url)
  271. this.imgArr.push(item)
  272. })
  273. }
  274. this.form = res
  275. })
  276. } else {
  277. // this.getwarningPileInfo(e.value)
  278. }
  279. })
  280. },
  281. showPhoto(index) {
  282. uni.previewImage({
  283. current: index,
  284. urls: this.imgArr,
  285. })
  286. },
  287. showPhotos(index) {
  288. uni.previewImage({
  289. current: index,
  290. urls: this.photo,
  291. })
  292. },
  293. getdictinfo(data, value) {
  294. let _this = this
  295. let name = null
  296. service.getDictInfo({
  297. type: data
  298. }).then(res => {
  299. let list = []
  300. list = res
  301. list.forEach((item) => {
  302. if (item.dictValue == value) {
  303. _this.labelList[item.dictType] = item.dictLabel
  304. }
  305. })
  306. })
  307. },
  308. Worker(val)
  309. {
  310. console.log(val)
  311. },
  312. getWorker()
  313. {
  314. service.getWorker({type:'0',name:this.namevalue}).then(res=>{
  315. console.log(res)
  316. this.workerList=res
  317. })
  318. },
  319. time(e) {
  320. console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
  321. this.form.repairTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
  322. },
  323. time2(e) {
  324. console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
  325. this.form.maintenanceTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
  326. },
  327. time3(e) {
  328. console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
  329. this.form.constructionTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
  330. },
  331. time4(e) {
  332. console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
  333. this.form.arrivalTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
  334. },
  335. update()
  336. {
  337. let _this = this
  338. // this.form.unitId=this.unit
  339. if(this.imgArr.length==0)
  340. {
  341. _this.$UTILS.showPrompt('请上传照片!')
  342. return
  343. }
  344. this.form.pressureStatus = null
  345. this.form.photoList = this.imgArr
  346. this.form.userId=this.userId
  347. this.form.createBy=this.userId
  348. service.updateemergencyRepair(this.form).then(res => {
  349. console.log(res)
  350. _this.$UTILS.showPrompt('修改成功!')
  351. // setTimeout(() => {
  352. // console.log('跳')
  353. // uni.switchTab({
  354. // url: '/pages/index/index'
  355. // })
  356. // }, 2000)
  357. // this.form={}
  358. // this.maintenanceName=''
  359. // this.labelList.repair_type=''
  360. // this.repairTypeLabel=''
  361. // this.labelList.causes_of_damage=''
  362. // this.causesOfFamageLabel=''
  363. // this.causesOfFamageType=''
  364. // this.labelList.pipeline_pressure=''
  365. // this.pipelinePressureLabel=''
  366. // this.pipelinePressureType=''
  367. // this.showtime2=''
  368. // this.imgArr=[]
  369. // this.imgymxs=[]
  370. })
  371. },
  372. save() {
  373. let _this = this
  374. // this.form.unitId=this.unit
  375. if(this.imgArr.length==0)
  376. {
  377. _this.$UTILS.showPrompt('请上传照片!')
  378. return
  379. }
  380. this.form.photoList = this.imgArr
  381. this.form.userId=this.userId
  382. this.form.createBy=this.userId
  383. service.setemergencyRepair(this.form).then(res => {
  384. console.log(res)
  385. _this.$UTILS.showPrompt('上报成功!')
  386. // setTimeout(() => {
  387. // console.log('跳')
  388. // uni.switchTab({
  389. // url: '/pages/index/index'
  390. // })
  391. // }, 2000)
  392. this.form={}
  393. this.maintenanceName=''
  394. this.labelList.repair_type=''
  395. this.repairTypeLabel=''
  396. this.labelList.causes_of_damage=''
  397. this.causesOfFamageLabel=''
  398. this.causesOfFamageType=''
  399. this.labelList.pipeline_pressure=''
  400. this.pipelinePressureLabel=''
  401. this.pipelinePressureType=''
  402. this.showtime2=''
  403. this.imgArr=[]
  404. this.imgymxs=[]
  405. })
  406. },
  407. getUserName(){
  408. service.getUserName().then(res=>{
  409. this.userId=res.id
  410. this.createBy=res.name
  411. })
  412. },
  413. repairType(e) {
  414. console.log(e[0])
  415. this.form.repairType = e[0].value
  416. this.repairTypeLabel = e[0].label
  417. },
  418. causesOfFamage(e) {
  419. this.causesOfDamage = e[0].value
  420. this.form.causesOfDamage = e[0].value
  421. console.log(e[0])
  422. this.causesOfFamageLabel = e[0].label
  423. },
  424. pipelinePressure(e) {
  425. console.log(e[0])
  426. this.form.pipelinePressure = e[0].value
  427. this.pipelinePressureLabel = e[0].label
  428. },
  429. choose() {
  430. let _this = this;
  431. uni.showActionSheet({
  432. title: '上传',
  433. itemList: ['图片', '视频'],
  434. success: (res) => {
  435. // console.log(res)
  436. if (res.tapIndex == 0) {
  437. this.chooseimage()
  438. } else {
  439. this.choosevideo()
  440. }
  441. }
  442. })
  443. },
  444. chooseimage() {
  445. console.log('图片')
  446. let _this = this;
  447. uni.chooseImage({
  448. sourceType: ['camera','album'],
  449. success(resp) {
  450. console.log('res--uni.chooseMedia', resp);
  451. resp.tempFiles.forEach((item, index) => {
  452. const task = uni.uploadFile({
  453. url: _this.$HTTP.webUrl + `/obs`,
  454. filePath: item.path,
  455. name: 'file',
  456. formData: {},
  457. header: _this.headers,
  458. success: res => {
  459. // 判断是否json字符串,将其转为json格式
  460. let data = _this.$u.test.jsonString(res.data) ? JSON.parse(
  461. res.data) : res.data;
  462. if (![200, 201, 204].includes(res.statusCode)) {
  463. // this.uploadError(index, data);
  464. _this.$UTILS.showPrompt('选取失败!')
  465. } else {
  466. // 上传成功
  467. // this.lists[index].response = data;
  468. // this.lists[index].progress = 100;
  469. // this.lists[index].error = false;
  470. // this.$emit('on-success', data, index, this.lists, this
  471. // .index);
  472. if (_this.progress === 100) {
  473. // console.log('_this.progress', _this.progress)
  474. // console.log('data----', data)
  475. // console.log('res--', res)
  476. _this.imgymxs.push({
  477. url: data.data.url,
  478. type: 'image'
  479. })
  480. _this.imgArr.push(data.data.url)
  481. // console.log('imgArr', _this.imgArr)
  482. _this.$UTILS.showPrompt('选取成功!')
  483. }
  484. }
  485. },
  486. fail: e => {
  487. _this.$UTILS.showPrompt('选取失败!')
  488. this.uploadError(index, e);
  489. },
  490. complete: res => {
  491. _this.uploading = false;
  492. // _this.uploadFile(index + 1);
  493. // this.$emit('on-change', res, index, this.lists, this
  494. // .index);
  495. }
  496. });
  497. task.onProgressUpdate(res => {
  498. // if (res.progress > 0) {
  499. // this.lists[index].progress = res.progress;
  500. // this.$emit('on-progress', res, index, this.lists, this.index);
  501. // }
  502. _this.progress = res.progress;
  503. console.log('onProgressUpdate', res)
  504. uni.showLoading({
  505. title: '选取中'
  506. })
  507. });
  508. })
  509. },
  510. })
  511. },
  512. choosevideo() {
  513. let _this = this;
  514. console.log('视频')
  515. uni.chooseVideo({
  516. sourceType: ['camera'],
  517. maxDuration: 30,
  518. success(resp) {
  519. const task = uni.uploadFile({
  520. url: _this.$HTTP.webUrl + `/obs`,
  521. filePath: resp.tempFilePath,
  522. name: 'file',
  523. formData: {},
  524. header: _this.headers,
  525. success: res => {
  526. // 判断是否json字符串,将其转为json格式
  527. let data = _this.$u.test.jsonString(res.data) ? JSON.parse(res.data) :
  528. res.data;
  529. if (![200, 201, 204].includes(res.statusCode)) {
  530. this.uploadError(index, data);
  531. } else {
  532. // 上传成功
  533. // this.lists[index].response = data;
  534. // this.lists[index].progress = 100;
  535. // this.lists[index].error = false;
  536. // this.$emit('on-success', data, index, this.lists, this
  537. // .index);
  538. if (_this.progress === 100) {
  539. console.log('_this.progress', _this.progress)
  540. console.log('data----', data)
  541. console.log('res--', res)
  542. // _this.imgArr.push(data.data.url)
  543. _this.imgymxs.push({
  544. url: data.data.url,
  545. type: 'video'
  546. })
  547. _this.imgArr.push(data.data.url)
  548. console.log('imgArr', _this.imgArr)
  549. _this.$UTILS.showPrompt('选取成功!')
  550. }
  551. }
  552. },
  553. fail: e => {
  554. _this.$UTILS.showPrompt('选取失败!')
  555. this.uploadError(index, e);
  556. },
  557. complete: res => {
  558. uni.hideLoading();
  559. _this.uploading = false;
  560. // _this.uploadFile(index + 1);
  561. // this.$emit('on-change', res, index, this.lists, this
  562. // .index);
  563. }
  564. });
  565. task.onProgressUpdate(res => {
  566. // if (res.progress > 0) {
  567. // this.lists[index].progress = res.progress;
  568. // this.$emit('on-progress', res, index, this.lists, this.index);
  569. // }
  570. _this.progress = res.progress;
  571. console.log('onProgressUpdate', res)
  572. uni.showLoading({
  573. title: '选取中'
  574. })
  575. });
  576. },
  577. })
  578. },
  579. remove(index) {
  580. uni.showModal({
  581. title: '提示',
  582. content: '是否删除该图片或视频?',
  583. success: (res) => {
  584. if (res.confirm) {
  585. this.imgArr.splice(index, 1);
  586. this.imgymxs.splice(index, 1);
  587. console.log('this.imgarr', this.imgArr)
  588. }
  589. }
  590. })
  591. },
  592. }
  593. }
  594. </script>
  595. <style lang="scss">
  596. .scroll-view {
  597. white-space: nowrap;
  598. height: 200px;
  599. width: 100%;
  600. }
  601. .u-form-right__content__slot{
  602. display: flex;
  603. }
  604. .background {
  605. z-index: -1;
  606. position: fixed;
  607. width: 100%;
  608. height: 100%;
  609. background-size: 100% 100%;
  610. top: 0;
  611. }
  612. .project-content {
  613. padding: 20rpx;
  614. border-radius: 20rpx;
  615. width: 90%;
  616. margin: 0 auto;
  617. background: #fff;
  618. }
  619. .button {
  620. background: #2d95f4;
  621. }
  622. </style>