12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589 |
- <template>
- <scroll-view>
- <view class="background">
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 工程名称
- </view>
- <!-- <view v-if="this.isEmpty(this.projectName.id)" style="margin-top: 10;"
- @click="pickerShow('gcmc',0)">
- <span style="color: darkgray;">请选择工程名称</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view> -->
- <view class="uni-list-cell-db" style="margin-top: 10;">
- <span style="color: black;">{{enginName}}</span>
- <!-- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image> -->
- </view>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 工程类型
- </view>
- <!-- <view v-if="this.isEmpty(this.projectType.dictValue)" style="margin-top: 10;">
- <span style="color: darkgray;">请选择工程类型</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view> -->
- <view class="uni-list-cell-db" style="margin-top: 10;">
- <span style="color: black;">{{enginType}}</span>
- <!-- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image> -->
- </view>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>建设单位</text>
- <input class="uni-input" type="text" v-model="jsdwValue" maxlength="100" disabled="true"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>项目负责人</text>
- <input class="uni-input" type="text" v-model="xmfzrValue" maxlength="16" disabled="true"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>现场负责人</text>
- <input class="uni-input" type="text" v-model="xcfzrValue" maxlength="16" disabled="true"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>设计单位</text>
- <input class="uni-input" type="text" v-model="sjdwValue" maxlength="100" disabled="true"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>设计负责人</text>
- <input class="uni-input" type="text" v-model="sjfzrValue" maxlength="16" disabled="true"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>设计联系电话</text>
- <input class="uni-input" type="number" v-model="sjPhoneValue" disabled="true" maxlength="11"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>监理单位</text>
- <input class="uni-input" type="text" v-model="jldwValue" maxlength="100" disabled="true"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>监理负责人</text>
- <input class="uni-input" type="text" v-model="jlfzrValue" maxlength="16" disabled="true"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>监理联系电话</text>
- <input class="uni-input" type="number" v-model="jlPhoneValue" disabled="true" maxlength="11"
- style="margin-left: 10px;text-align: right;"></input>
- </view>
- </view>
- <view class="uni-list">
- <view class="align-items">
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <view v-for="(item,index) in fileArr" :key="index" style="position: relative;">
- <view
- v-if="item.picUrl.substring(item.picUrl.length - 3) == 'png' || item.picUrl.substring(item.picUrl.length - 3) == 'jpg'||item.picUrl.substring(item.picUrl.length-4)=='jpeg' ">
- <image :src="item.picUrl" mode=""
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhotoFile(fileImageArr.indexOf(item.picUrl))">
- </image>
- </view>
- <view v-else-if="item.picUrl.substring(item.picUrl.length - 3) == 'mp4'">
- <video :src="item.picUrl"
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view v-else @click="chooseModel(item.picUrl,item.fileName)">
- {{item.fileName}}
- </view>
- </view>
- </view>
- </view>
- </view>
- <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
- subtitleKey="id" v-model="name"></SelectPicker>
- <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
- titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
- </view>
- <view class="background">
- <view>
- <view class="uni-list">
- <view
- style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- {{objValue.value}}
- <span
- style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
- @click="history">历史</span>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 施工时间
- </view>
- <view @click="openDatetimePicker()">
- <span style="color: black;">{{time}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view class="uni-common-mt" style="width: 100%;">
- <text class="uni-title uni-common-pl">施工内容</text>
- <view style="width: 100%;box-sizing: border-box;">
- <textarea class="textarea" placeholder="请输入施工内容" maxlength="255"
- placeholder-style="padding: 10rpx;"
- style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
- auto-height v-model="projectContent"></textarea>
- </view>
- </view>
- </view>
- <view
- v-if="objValue.value=='焊接、防腐'||objValue.value=='架空管线'||objValue.value=='下管'||objValue.value=='沟下连头'||objValue.value=='全貌照片'||objValue.value=='顶管材料米数'||objValue.value=='焊接'">
- <view v-for="(a,index) in czggslList" :key="index" class="num-style">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 材质
- </view>
- <view class="uni-list-cell-db" @click="pickerShow('cz',index)">
- <span style="color: black;">{{a.cz.id==''?'请选择材质':a.cz.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 规格
- </view>
- <view class="uni-list-cell-db" @click="pickerShow('gg',index)">
- <span style="color: black;">{{a.gg.id==''?'请选择规格':a.gg.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>米 数</text>
- <!-- style="margin-left: 10px;text-align: right;" -->
- <view style="display: flex; justify-content: right; width: 70%;">
- <input class="uni-input" type="number" v-model="a.sl.inputIntegerNumberValue"
- maxlength="6"
- style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
- <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
- <input class="uni-input" type="number" v-model="a.sl.inputDecimalNumberValue"
- maxlength="1"
- style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
- </view>
- </view>
- <button v-if="index!=0" @click="this.czggslList.splice(index,1)" class="sc-btn">删除</button>
- </view>
- <button @click="this.czggslList.push({cz:{id: '',name: ''},gg:{id: '',name: ''},sl: {
- inputIntegerNumberValue: '',
- inputDecimalNumberValue: ''
- }})" class="tj-btn">添加</button>
- </view>
- </view>
- <view
- v-if="objValue.value!='回填、撤场'&&objValue.value!='调压柜'&&objValue.value!='阀井'&&objValue.value!='顶管材料米数'">
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('other')">
- </image>
- <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'other')">
- </image>
- </view>
- <view v-else>
- <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'other')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-else-if="objValue.value=='回填、撤场'">
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传回填前照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('htq')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgHtqArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'htq')">
- </image>
- </view>
- <view v-else>
- <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'htq')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传警示带铺设照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('jsdps')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgJspsArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode=""
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'jsdps')">
- </image>
- </view>
- <view v-else>
- <video :src="item"
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'jsdps')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传回填后照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('hth')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgHthArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode=""
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'hth')">
- </image>
- </view>
- <view v-else>
- <video :src="item"
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'hth')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-else-if="objValue.value=='调压柜'">
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传调压箱铭牌照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Box')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgBoxArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Box')">
- </image>
- </view>
- <view v-else>
- <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Box')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传调压箱内石粉回填照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Sfht')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgSfhtArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Sfht')">
- </image>
- </view>
- <view v-else>
- <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Sfht')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传调压箱防雷接地照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Fljd')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgFljdArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode=""
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Fljd')">
- </image>
- </view>
- <view v-else>
- <video :src="item"
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Fljd')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传调压箱底腿连接照片</view>
- <view class=""
- style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
- @click="choose('Dtlj')" v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgDtljArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode=""
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Dtlj')">
- </image>
- </view>
- <view v-else>
- <video :src="item"
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Dtlj')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')"
- style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传调压箱护栏及地面硬化(远景)照片</view>
- <view class=""
- style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
- @click="choose('Hldmyh')" v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgHldmyhArr" :key="index"
- style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode=""
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Hldmyh')">
- </image>
- </view>
- <view v-else>
- <video :src="item"
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Hldmyh')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')"
- style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-else-if="objValue.value=='阀井'">
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传套管照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Tg')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgTgArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Tg')">
- </image>
- </view>
- <view v-else>
- <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Tg')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传内壁抹灰照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Nbmh')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgNbmhArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Nbmh')">
- </image>
- </view>
- <view v-else>
- <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Nbmh')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传防护网照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Fhw')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgFhwArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode=""
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Fhw')">
- </image>
- </view>
- <view v-else>
- <video :src="item"
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Fhw')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传调八角照片</view>
- <view class=""
- style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode=""
- style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Bj')"
- v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgBjArr" :key="index" style="position: relative;">
- <view
- v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode=""
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
- @click="showPhoto(index,'Bj')">
- </image>
- </view>
- <view v-else>
- <video :src="item"
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index,'Bj')"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')"
- style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="action-btn">
- <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
- </view>
- <bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.value"></bottom-sheet>
- <yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
- :time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
- <!-- 下载提示页面 -->
- <mypopup :show="show_loding" :popupText="popupText" :titleText="titleText" :cancelText="cancelText"
- :confirmText="confirmText" @close="cancel_loding" @confirm="confirm_loding">
- </mypopup>
- </scroll-view>
- </template>
- <script>
- import SelectPicker from '../../components/selectPicker/select_picker.vue'
- import bottomSheet from '../../components/bottomSheet/bottomSheetMoreNew.vue'
- import mypopup from '../../components/mypopup/mypopup.vue'
- import {
- getDicts
- } from "@/api/system/dict/data";
- import {
- getEnginMaterialQualityList,
- getEnginSpecificationsList,
- getRoomProjectList,
- getRoomProjectId,
- SubmitengineeringNew,
- getengineeringNameListNew,
- getEngineeringDetailsNew,
- getEngineeringHistoryListNew,
- getEnginProjectDetailsByParams
- } from '@/api/common'
- import {
- getToken
- } from '../../utils/auth';
- export default {
- components: {
- SelectPicker,
- bottomSheet,
- mypopup
- },
- data() {
- return {
- historyList: {}, //历史数据
- show_loding: false,
- popupText: '', //对话框内容
- titleText: '',
- cancelText: '',
- confirmText: '',
- zEngineeringMaterialBo: [], //给后台传的值 用料列表
- czggslList: [{
- cz: {
- id: '',
- name: ''
- },
- gg: {
- id: '',
- name: ''
- },
- sl: {
- inputIntegerNumberValue: '',
- inputDecimalNumberValue: ''
- }
- }, ],
- conLists: [],
- headers: {
- Authorization: "Bearer " + getToken()
- },
- time: '', //施工时间
- loading: false,
- loadingFile: false,
- projectType: {}, //工程类型
- open: false,
- objValue: '', //上一页面传过来的值 新增接口用
- openDict: false,
- specificationValue: {}, //规格
- projectContent: '', //施工内容
- materialValue: {}, //材质
- selectList: [],
- dictOptions: [],
- imgArr: [],
- fileArr: [],
- fileImageArr: [],
- fileNameArr: [],
- type: '',
- jlPhoneValue: '', //监理电话
- jlfzrValue: '', //监理负责人
- jldwValue: '', //监理单位
- sjPhoneValue: '', //设计电话
- sjfzrValue: '', //设计负责人
- sjdwValue: '', //设计单位
- xcfzrValue: '', //现场负责人
- xmfzrValue: '', //项目负责人
- jsdwValue: '', //建设单位
- projectName: '', //工程名称
- SelectIndex: '', //选择的索引值
- fileUrl: '', //点击的文件地址
- fileName: '', //点击的文件名称
- enginList: {}, //工程信息
- enginId: '', //工程id
- createTime: '',
- infonId: '', //info id
- imgHtqArr: [],
- imgJspsArr: [],
- imgHthArr: [],
- //调压柜
- imgSfhtArr: [],
- imgFljdArr: [],
- imgBoxArr: [],
- imgDtljArr: [],
- imgHldmyhArr: [],
- //阀井
- imgTgArr: [],
- imgNbmhArr: [],
- imgFhwArr: [],
- imgBjArr: [],
- enginName: '',
- enginType: '',
- enginTitle: '',
- enginValue: '',
- }
- },
- created() {
- this.time = this.traversalTime(new Date().getTime()) //在data里定义变量-nowTime
- },
- onLoad(options) {
- if ('params' in options) {
- this.objValue = JSON.parse(decodeURIComponent(options.params));
- this.enginName = this.objValue.name;
- this.enginType = this.objValue.enginType;
- this.enginTitle = this.objValue.title;
- this.enginValue = this.objValue.value;
- }
- // this.projectName = item
- // 获取工程信息
- uni.showLoading({
- title: '加载中'
- })
- getEnginProjectDetailsByParams(this.enginName, this.enginType, this.enginTitle).then(
- response => {
- uni.hideLoading();
- // this.enginList = response.data
- this.jlPhoneValue = response.data.supervisionPhone; //监理电话
- this.jlfzrValue = response.data.supervisionHead; //监理负责人
- this.jldwValue = response.data.supervisionUnit; //监理单位
- this.sjPhoneValue = response.data.designPhone; //设计电话
- this.sjfzrValue = response.data.designHead; //设计负责人
- this.sjdwValue = response.data.designUnit; //设计单位
- this.xcfzrValue = response.data.sceneHead; //现场负责人
- this.xmfzrValue = response.data.projectHead; //项目负责人
- this.jsdwValue = response.data.constructUnit; //建设单位
- this.enginId = response.data.id; //工程id
- this.fileArr = response.data.pics
- this.createTime = response.data.createTime;
- this.fileArr.forEach((list, index) => {
- if (list.picUrl.substring(list.picUrl.length - 3) == 'png' || list.picUrl
- .substring(list.picUrl.length - 3) == 'jpg' || list.picUrl.substring(list
- .picUrl.length - 4) == 'jpeg') {
- this.fileImageArr.push(list.picUrl)
- }
- });
- });
- },
- methods: {
- //判断是否选择
- isEmpty(str) {
- return (!str || 0 === str.length);
- },
- handleSubmit(e) {
- this.time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
- },
- //获取当前时间
- traversalTime(timestamp) {
- //timestamp(时间戳)是整数,否则要parseInt转换
- let time = new Date(timestamp);
- let y = time.getFullYear();
- let m = time.getMonth() + 1;
- let d = time.getDate();
- let h = time.getHours();
- let mm = time.getMinutes();
- let s = time.getSeconds();
- return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this.addTimes(
- mm) + ':' + this.addTimes(s);
- },
- addTimes(m) {
- return m < 10 ? '0' + m : m
- },
- // 打开picker
- openDatetimePicker() {
- this.$refs.myPicker.show();
- },
- // 关闭picker
- closeDatetimePicker() {
- this.$refs.myPicker.hide();
- },
- pickerShow(e, index) {
- this.SelectIndex = index;
- this.type = e; //赋值类型
- if (e == 'cz') { //材质
- this.open = true;
- getEnginMaterialQualityList("工业工程").then(response => {
- this.selectList = response.data;
- });
- } else if (e == 'gg') { //规格
- if (this.isEmpty(this.czggslList[index].cz.id)) {
- this.$modal.msg('请选择材质')
- // this.czggslList[index].cz = this.materialValue.id
- } else {
- this.open = true;
- this.selectList = this.materialList;
- }
- } else if (e == 'gclx') { //工程类型
- this.openDict = true;
- getDicts("industry_engin_type").then(response => {
- this.dictOptions = response.data;
- });
- } else if (e == 'gcmc') { //工程名称
- // if (this.isEmpty(this.projectType.dictValue)) {
- // this.$modal.msg('请选择工程类型')
- // return
- // }
- // this.open = true;
- // //请求
- // getengineeringNameListNew(this.projectType.dictValue, this.objValue.title).then(response => {
- // this.selectList = response.data;
- // });
- }
- },
- showPhotoFile(index) {
- uni.previewImage({
- current: index,
- urls: this.fileImageArr,
- })
- },
- showPhoto(index, e) {
- let typeArr = [];
- let newArr = [];
- if (e == 'other') {
- typeArr = this.imgArr;
- } else if (e == 'htq') {
- typeArr = this.imgHtqArr;
- } else if (e == 'jsdps') {
- typeArr = this.imgJspsArr;
- } else if (e == 'hth') {
- typeArr = this.imgHthArr;
- } else if (e == 'Box') {
- typeArr = this.imgBoxArr;
- } else if (e == 'Sfht') {
- typeArr = this.imgSfhtArr;
- } else if (e == 'Fljd') {
- typeArr = this.imgFljdArr;
- } else if (e == 'Dtlj') {
- typeArr = this.imgDtljArr;
- } else if (e == 'Hldmyh') {
- typeArr = this.imgHldmyhArr;
- } else if (e == 'Tg') {
- typeArr = this.imgTgArr;
- } else if (e == 'Nbmh') {
- typeArr = this.imgNbmhArr;
- } else if (e == 'Fhw') {
- typeArr = this.imgFhwArr;
- } else if (e == 'Bj') {
- typeArr = this.imgBjArr;
- }
- typeArr.forEach((item, index) => {
- if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
- item.substring(item.length - 4) == 'jpeg') {
- newArr.push(item)
- }
- });
- uni.previewImage({
- current: index,
- urls: newArr,
- })
- },
- remove(index, e) {
- let _this = this;
- uni.showModal({
- title: '提示',
- content: '是否删除该图片或视频?',
- success: (res) => {
- if (res.confirm) {
- if (e == 'other') {
- _this.imgArr.splice(index, 1)
- } else if (e == 'htq') {
- _this.imgHtqArr.splice(index, 1)
- } else if (e == 'jsdps') {
- _this.imgJspsArr.splice(index, 1)
- } else if (e == 'hth') {
- _this.imgHthArr.splice(index, 1)
- } else if (e == 'Box') {
- this.imgBoxArr.splice(index, 1)
- } else if (e == 'Sfht') {
- this.imgSfhtArr.splice(index, 1)
- } else if (e == 'Fljd') {
- this.imgFljdArr.splice(index, 1)
- } else if (e == 'Dtlj') {
- this.imgDtljArr.splice(index, 1)
- } else if (e == 'Hldmyh') {
- this.imgHldmyhArr.splice(index, 1)
- } else if (e == 'Tg') {
- this.imgTgArr.splice(index, 1)
- } else if (e == 'Nbmh') {
- this.imgNbmhArr.splice(index, 1)
- } else if (e == 'Fhw') {
- this.imgFhwArr.splice(index, 1)
- } else if (e == 'Bj') {
- this.imgBjArr.splice(index, 1)
- }
- }
- }
- })
- },
- choose(e) {
- let _this = this;
- uni.showActionSheet({
- title: '上传',
- itemList: ['图片', '视频'],
- success: (res) => {
- if (res.tapIndex == 0) {
- this.chooseimage(e)
- } else {
- this.choosevideo(e)
- }
- }
- })
- },
- chooseimage(e) {
- let _this = this;
- uni.chooseImage({
- sizeType: ['album', 'camera'],
- success(resp) {
- resp.tempFiles.forEach((item, index) => {
- const task = uni.uploadFile({
- url: _this.$HTTP + `/obs`,
- filePath: item.path,
- name: 'file',
- formData: {},
- header: _this.headers,
- success: res => {
- let data = JSON.parse(res.data);
- if (![200].includes(data.code)) {
- _this.$modal.msg(data.msg)
- } else {
- if (_this.progress === 100) {
- if (e == 'other') {
- _this.imgArr.push(data.data.url)
- } else if (e == 'htq') {
- _this.imgHtqArr.push(data.data.url)
- } else if (e == 'jsdps') {
- _this.imgJspsArr.push(data.data.url)
- } else if (e == 'hth') {
- _this.imgHthArr.push(data.data.url)
- } else if (e == 'Box') {
- _this.imgBoxArr.push(data.data.url)
- } else if (e == 'Sfht') {
- _this.imgSfhtArr.push(data.data.url)
- } else if (e == 'Fljd') {
- _this.imgFljdArr.push(data.data.url)
- } else if (e == 'Dtlj') {
- _this.imgDtljArr.push(data.data.url)
- } else if (e == 'Hldmyh') {
- _this.imgHldmyhArr.push(data.data.url)
- } else if (e == 'Tg') {
- _this.imgTgArr.push(data.data.url)
- } else if (e == 'Nbmh') {
- _this.imgNbmhArr.push(data.data.url)
- } else if (e == 'Fhw') {
- _this.imgFhwArr.push(data.data.url)
- } else if (e == 'Bj') {
- _this.imgBjArr.push(data.data.url)
- }
- _this.$modal.msg('上传成功!')
- }
- }
- },
- fail: e => {
- _this.$modal.msg('上传失败!')
- },
- complete: res => {
- uni.hideLoading();
- _this.uploading = false;
- }
- });
- task.onProgressUpdate(res => {
- _this.progress = res.progress;
- uni.showLoading({
- title: '上传中'
- })
- if (_this.progress != 100) {
- _this.loading = false
- } else {
- _this.loading = true
- }
- });
- })
- },
- })
- },
- choosevideo(e) {
- let _this = this;
- uni.chooseVideo({
- sourceType: ['album', 'camera'],
- maxDuration: 30,
- success(resp) {
- const task = uni.uploadFile({
- url: _this.$HTTP + `/obs`,
- filePath: resp.tempFilePath,
- name: 'file',
- formData: {},
- header: _this.headers,
- success: res => {
- // 判断是否json字符串,将其转为json格式
- let data = JSON.parse(res.data);
- if (![200].includes(res.statusCode)) {
- this.uploadError(index, data);
- } else {
- //上传成功
- if (_this.progress === 100) {
- if (e == 'other') {
- _this.imgArr.push(data.data.url)
- } else if (e == 'htq') {
- _this.imgHtqArr.push(data.data.url)
- } else if (e == 'jsdps') {
- _this.imgJspsArr.push(data.data.url)
- } else if (e == 'hth') {
- _this.imgHthArr.push(data.data.url)
- } else if (e == 'Box') {
- _this.imgBoxArr.push(data.data.url)
- } else if (e == 'Sfht') {
- _this.imgSfhtArr.push(data.data.url)
- } else if (e == 'Fljd') {
- _this.imgFljdArr.push(data.data.url)
- } else if (e == 'Dtlj') {
- _this.imgDtljArr.push(data.data.url)
- } else if (e == 'Hldmyh') {
- _this.imgHldmyhArr.push(data.data.url)
- } else if (e == 'Tg') {
- _this.imgTgArr.push(data.data.url)
- } else if (e == 'Nbmh') {
- _this.imgNbmhArr.push(data.data.url)
- } else if (e == 'Fhw') {
- _this.imgFhwArr.push(data.data.url)
- } else if (e == 'Bj') {
- _this.imgBjArr.push(data.data.url)
- }
- _this.$modal.msg('上传成功!')
- //_this.photo = false;
- }
- }
- },
- fail: e => {
- _this.$modal.msg('上传失败!')
- this.uploadError(index, e);
- },
- complete: res => {
- uni.hideLoading();
- _this.uploading = false;
- }
- });
- task.onProgressUpdate(res => {
- _this.progress = res.progress;
- uni.showLoading({
- title: '上传中'
- })
- if (_this.progress != 100) {
- _this.loadingFile = false
- } else {
- _this.loadingFile = true
- }
- });
- },
- })
- },
- changeSelectDict(item, index) {
- this.openDict = false;
- this.projectType = item
- this.projectName = ''; //重置工程名称
- this.jlPhoneValue = ''; //重置监理电话
- this.jlfzrValue = ''; //重置监理负责人
- this.jldwValue = ''; //重置监理单位
- this.sjPhoneValue = ''; //重置设计电话
- this.sjfzrValue = ''; //重置设计负责人
- this.sjdwValue = ''; //重置设计单位
- this.xcfzrValue = ''; //重置现场负责人
- this.xmfzrValue = ''; //重置项目负责人
- this.jsdwValue = ''; //重置建设单位
- this.enginId = ''; //重置工程id
- this.fileArr = '';
- this.fileImageArr = [];
- this.createTime = '';
- this.infonId = '';
- },
- changeSelect(item, index) {
- // this.index = index;
- // this.address = item.communityName;
- this.open = false;
- if (this.type == 'cz') {
- this.materialValue = item;
- this.specificationValue = ''; //重置规格
- //根据材质ID 获取规格数据
- getEnginSpecificationsList(item.id).then(res => {
- this.materialList = res.data
- this.czggslList[this.SelectIndex].cz.id = this.materialValue.id
- this.czggslList[this.SelectIndex].cz.name = this.materialValue.name
- })
- } else if (this.type == 'gg') {
- this.specificationValue = item;
- this.czggslList[this.SelectIndex].gg.id = this.specificationValue.id
- this.czggslList[this.SelectIndex].gg.name = this.specificationValue.name
- } else if (this.type == 'gcmc') {
- this.projectName = item
- //根据工程id 获取工程信息
- uni.showLoading({
- title: '加载中'
- })
- getEngineeringDetailsNew(item.id).then(response => {
- uni.hideLoading();
- // this.enginList = response.data
- this.jlPhoneValue = response.data.supervisionPhone; //监理电话
- this.jlfzrValue = response.data.supervisionHead; //监理负责人
- this.jldwValue = response.data.supervisionUnit; //监理单位
- this.sjPhoneValue = response.data.designPhone; //设计电话
- this.sjfzrValue = response.data.designHead; //设计负责人
- this.sjdwValue = response.data.designUnit; //设计单位
- this.xcfzrValue = response.data.sceneHead; //现场负责人
- this.xmfzrValue = response.data.projectHead; //项目负责人
- this.jsdwValue = response.data.constructUnit; //建设单位
- this.enginId = response.data.id; //工程id
- this.fileArr = response.data.pics
- this.createTime = response.data.createTime;
- //this.infonId = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0].id
- this.fileArr.forEach((list, index) => {
- if (list.picUrl.substring(list.picUrl.length - 3) == 'png' || list.picUrl
- .substring(list.picUrl.length - 3) == 'jpg' || list.picUrl.substring(list
- .picUrl.length - 4) == 'jpeg') {
- this.fileImageArr.push(list.picUrl)
- }
- });
- });
- }
- },
- //关闭弹窗
- close(e) {
- this.open = false
- },
- //关闭弹窗
- closeDict(e) {
- this.openDict = false
- },
- chooseModel(url, name) {
- this.cancelText = '复制';
- this.confirmText = "下载";
- this.titleText = "温馨提示"
- this.popupText = "下载或者复制链接";
- this.show_loding = true;
- this.fileName = name;
- this.fileUrl = url; //文件名称和下载地址赋值
- },
- //取消按钮
- cancel_loding() {
- let _this = this;
- _this.show_loding = false;
- if (!_this.isEmpty(_this.fileUrl)) {
- uni.setClipboardData({
- data: _this.fileUrl,
- success() {
- uni.showToast({
- title: '已复制' + _this.fileName + '地址成功 请在浏览器打开',
- icon: 'none'
- });
- },
- fail(e) {
- uni.showToast({
- title: '复制失败',
- icon: 'none'
- });
- }
- });
- }
- },
- //确定按钮
- confirm_loding() {
- this.show_loding = false;
- this.download(this.fileUrl, this.fileName);
- },
- getDownLoadFilePath() {
- let cachePath = `${uni.env.USER_DATA_PATH}/downloads`
- let fm = uni.getFileSystemManager()
- try {
- // 访问成功则存在
- fm.accessSync(cachePath)
- } catch (error) {
- // 不存在则新建
- fm.mkdirSync(cachePath, true)
- }
- return cachePath
- },
- download(url, name) {
- let savePath = this.getDownLoadFilePath();
- //var savePath = uni.env.USER_DATA_PATH + '/savePath'
- uni.downloadFile({
- url: url,
- success: response => {
- if (response.statusCode === 200) {
- uni.getFileSystemManager().saveFile({
- tempFilePath: response.tempFilePath,
- filePath: `${savePath}/${name}`,
- success: (resData) => {
- uni.showToast({
- title: '下载成功'
- })
- },
- fail: error => {}
- })
- }
- }
- })
- },
- //历史
- history() {
- // if (this.isEmpty(this.projectType.dictValue)) {
- // this.$modal.msg('请选择工程类型')
- // return
- // }
- // if (this.isEmpty(this.projectName.id)) {
- // this.$modal.msg('请选择工程名称')
- // return
- // }
- getEngineeringHistoryListNew(this.enginId, this.objValue.value).then(response => {
- this.historyList = response.data
- if (response.data.zEngineeringNodeBo != null) {
- this.$refs.refShare.handleShowShare();
- } else {
- this.$modal.msg("暂无历史信息")
- }
- });
- },
- submit() {
- // if (this.isEmpty(this.projectType.dictValue)) {
- // this.$modal.msg('请选择工程类型')
- // return
- // }
- // if (this.isEmpty(this.projectName.id)) {
- // this.$modal.msg('请选择工程名称')
- // return
- // }
- if (this.objValue.value == '焊接、防腐' || this.objValue.value == '架空管线' || this.objValue.value == '下管' || this
- .objValue.value == '沟下连头' || this.objValue.value == '全貌照片' || this.objValue.value == '顶管材料米数' || this
- .objValue.value == '焊接') {
- try {
- this.czggslList.forEach((list) => {
- if (this.isEmpty(list.cz.id)) {
- this.$modal.msg('材质不能为空')
- throw new Error('End Loop')
- }
- if (this.isEmpty(list.gg.id)) {
- this.$modal.msg('规格不能为空')
- throw new Error('End Loop')
- }
- if (this.isEmpty(list.sl.inputIntegerNumberValue)) {
- this.$modal.msg("请输入米数")
- throw new Error('End Loop')
- }
- })
- } catch (e) {
- if (e.message === 'End Loop') throw e
- }
- this.zEngineeringMaterialBo = [];
- this.czggslList.forEach((list) => {
- this.zEngineeringMaterialBo.push({
- materialQuality: list.cz.id,
- specifications: list.gg.id,
- number: list.sl.inputIntegerNumberValue + (list.sl
- .inputDecimalNumberValue ==
- '' ?
- '' : "." + list.sl.inputDecimalNumberValue)
- })
- })
- }
- if (this.objValue.value == '回填、撤场') {
- if (this.imgHtqArr.length <= 0 && this.imgJspsArr.length <= 0 && this.imgHthArr.length <= 0) {
- this.$modal.msg('请上传照片')
- return
- }
- // if (this.imgJspsArr.length <= 0) {
- // this.$modal.msg('请上传警示带铺设照片')
- // return
- // }
- // if (this.imgHthArr.length <= 0) {
- // this.$modal.msg('请上传回填后照片')
- // return
- // }
- }
- if (this.objValue.value == '调压柜') {
- if (this.imgBoxArr.length <= 0) {
- this.$modal.msg('请上传调压箱铭牌照片')
- return
- }
- if (this.imgSfhtArr.length <= 0) {
- this.$modal.msg('请上传调压箱内石粉回填照片')
- return
- }
- if (this.imgFljdArr.length <= 0) {
- this.$modal.msg('请上传调压箱防雷接地照片')
- return
- }
- if (this.imgDtljArr.length <= 0) {
- this.$modal.msg('请上传调压箱底腿连接照片')
- return
- }
- if (this.imgHldmyhArr.length <= 0) {
- this.$modal.msg('请上传调压箱护栏及地面硬化(远景)照片')
- return
- }
- } else if (this.objValue.value == '阀井') {
- if (this.imgTgArr.length <= 0) {
- this.$modal.msg('请上传套管照片')
- return
- }
- if (this.imgNbmhArr.length <= 0) {
- this.$modal.msg('请上传内壁抹灰照片')
- return
- }
- if (this.imgFhwArr.length <= 0) {
- this.$modal.msg('请上传防护网照片')
- return
- }
- if (this.imgBjArr.length <= 0) {
- this.$modal.msg('请上传八角照片')
- return
- }
- } else {
- if (this.objValue.value != '顶管材料米数') {
- if (this.imgArr.length <= 0) {
- this.$modal.msg('请上传照片或视频')
- return
- }
- }
- }
- // if (this.loading == false) {
- // this.$modal.msg('照片或视频未上传完毕,无法提交!')
- // return
- // }
- let param = {
- id: this.enginId, //工程id
- enginName: this.projectName.name, //工程名称
- enginType: this.projectType.dictValue, // 工程类型
- constructUnit: this.jsdwValue, // 建筑单位
- projectHead: this.xmfzrValue, // 项目负责人
- sceneHead: this.xcfzrValue, // 现场负责人
- designUnit: this.sjdwValue, // 设计单位
- designHead: this.sjfzrValue, // 设计负责人
- designPhone: this.sjPhoneValue, // 设计联系电话
- supervisionUnit: this.jldwValue, // 监理单位
- supervisionHead: this.jlfzrValue, // 监理负责人
- supervisionPhone: this.jlPhoneValue, // 监理联系电话
- enginClassification: this.objValue.title, // 工程分类 上一页面传过来的
- createTime: this.createTime,
- zEngineeringNodeBo: {
- type: this.objValue.value,
- zEngineeringInfoBo: {
- //engInfoId: this.infonId,
- remark: this.projectContent, //施工内容
- constructTime: this.time, //施工时间
- zEngiineeringPhotoBoList: this.imgArr, //照片集合
- zEngiineeringPhotoBoListOne: this.imgHtqArr,
- zEngiineeringPhotoBoListTwo: this.imgJspsArr,
- zEngiineeringPhotoBoListThree: this.imgHthArr,
- boxBrand: this.imgBoxArr,
- stonePowder: this.imgSfhtArr,
- lightning: this.imgFljdArr,
- bottomLeg: this.imgDtljArr,
- groundHardening: this.imgHldmyhArr,
- cannula: this.imgTgArr,
- wallPlaster: this.imgNbmhArr,
- protectiveNet: this.imgFhwArr,
- starAnise: this.imgBjArr,
- zEngineeringMaterialBo: this.zEngineeringMaterialBo // 用料对象
- }
- }
- }
- uni.showLoading()
- SubmitengineeringNew(param).then(res => {
- if (res.code == '200') {
- uni.hideLoading()
- uni.showToast({
- title: res.msg,
- icon: 'none',
- //显示持续时间为 3秒
- duration: 2000
- });
- setTimeout(function() {
- uni.navigateBack();
- }, 1000)
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .container {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 10px;
- position: relative;
- }
- .uni-list {
- border: 1xp solid #eee;
- }
- .to-right-icon {
- width: 15px;
- height: 15px;
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- }
- .text {
- font-size: 16px;
- color: #333;
- }
- .background {
- // border: 15px solid hsla(0, 0%, 100%, .5);
- background: white;
- background-clip: padding-box;
- padding: 20rpx;
- border-radius: 20rpx;
- margin: 20rpx;
- /*从padding开始往外面裁剪背景*/
- }
- .btn {
- width: 715rpx;
- height: 69rpx;
- background: #79A4F0;
- border-radius: 6rpx;
- font-size: 25rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 69rpx;
- margin-top: 40rpx;
- margin-bottom: 100rpx;
- }
- .number {
- display: flex;
- /* 水平居中显示子元素 */
- align-items: flex-start;
- /* 垂直居中显示子元素 */
- justify-content: space-between;
- /* 左右间距等于间距大小 */
- padding: 10px;
- /* 设置padding以提高视觉效果 */
- }
- .textarea {
- margin-top: 10upx;
- width: 100%;
- border: 1rpx solid red;
- min-height: 100upx;
- line-height: 20px;
- }
- .tj-btn {
- height: 69rpx;
- background: #3184f0;
- border-radius: 6rpx;
- font-size: 25rpx;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 69rpx;
- margin: 40rpx 70rpx;
- }
- .sc-btn {
- height: 69rpx;
- background: #f0686b;
- border-radius: 6rpx;
- font-size: 25rpx;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 69rpx;
- margin: 40rpx;
- }
- .num-style {
- background: #e8f4f9;
- margin: 20rpx;
- padding: 10rpx;
- border-radius: 20rpx;
- border: 1px solid #d4e3f0;
- }
- </style>
|