| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808 |
- <template>
- <view class="container">
- <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
- @clickLeft="toBack">
- <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
- <text style="color: white;font-size: 1rem;">{{title}}</text>
- </view>
- </uni-nav-bar>
- <uni-forms ref="baseForm">
- <view class="uni-form-item view-flex-rs" style="margin-top: 0px;">
- <uSection title="巡检总结情况" titleFontSize="0.8rem" type="line" style="width: 100%;">
- <uni-forms-item style="padding-left: 10px;padding-right:10px">
- <uni-easyinput label="总结说明" type="textarea" v-model="baseInfo.reportDesc"
- placeholder="请输入总结说明" />
- </uni-forms-item>
- <uGroup title="总体设施设备图片" margin-top="0px">
- <view class="view-flex-rs" style="margin-top: 0px;">
- <view class="view-flex-cc" style="width: 120px;">
- <view class="img-container">
- <view class="note-image-box">
- <view v-if="baseInfo.photo1Take" class="note-image-item">
- <view class="close-icon" @click="onBasePhoto1DeleteClick()">
- <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
- </view>
- <view class="image-box">
- <image :src="toOss(baseInfo.photo1Url)" mode="widthFix"></image>
- </view>
- </view>
- <view v-else class="note-image-item" @click="getBasePhoto1()">
- <view class="image-box">
- <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="view-flex-cc" style="width: 120px;">
- <view class="img-container">
- <view class="note-image-box">
- <view v-if="baseInfo.photo2Take" class="note-image-item">
- <view class="close-icon" @click="onBasePhoto2DeleteClick()">
- <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
- </view>
- <view class="image-box">
- <image :src="toOss(baseInfo.photo2Url)" mode="widthFix"></image>
- </view>
- </view>
- <view v-else class="note-image-item" @click="getBasePhoto2()">
- <view class="image-box">
- <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </uGroup>
- </uSection>
- </view>
- <uSection title="RTU设备" type="line" titleFontSize="0.8rem" style="width: 100%;">
- <uGroup margin-top="0">
- <uni-forms-item label="品牌" label-width="130px" required>
- <uni-easyinput v-model="rtuInfo.rtuBrandText" placeholder="请录入品牌" />
- </uni-forms-item>
- <uni-forms-item label="型号" label-width="130px" required>
- <uni-easyinput v-model="rtuInfo.rtuModelText" placeholder="请录入型号" />
- </uni-forms-item>
- <uni-forms-item label="更换时间" label-width="130px" required>
- <uni-datetime-picker type="date" :clear-icon="false" v-model="rtuInfo.rtuReplaceDate" />
- </uni-forms-item>
- <uni-forms-item label="上报省市县" label-width="130px" required>
- <checkbox-group @change="datagramToCheckboxChange">
- <label style="margin-right: 10px;font-size: 0.7rem;"
- v-for="(item, index) in datagramIp.items" :key="item.id">
- <checkbox v-if="item.checked" :value="item.id" checked="true" />
- <checkbox v-else :value="item.id" />
- {{item.dictValue}}
- </label>
- </checkbox-group>
- </uni-forms-item>
- <uni-forms-item label="运行状态" label-width="130px" required>
- <radio-group @change="onRtuStatusRadioChange"
- style="display: flex;flex-direction: row;justify-content: flex-start;">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in rtuInfo.runStatus.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === rtuInfo.runStatus.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item>
- <uni-easyinput label="备注说明" type="textarea" v-model="rtuInfo.remark" placeholder="请输入备注说明" />
- </uni-forms-item>
- </uGroup>
- <uGroup title="RTU图片" margin-top="0px">
- <view class="view-flex-rs" style="margin-top: 0px;">
- <view class="view-flex-cc" style="width: 120px;">
- <view class="img-container">
- <view class="note-image-box">
- <view v-if="rtuInfo.photoTake" class="note-image-item">
- <view class="close-icon" @click="onRtuPhotoDeleteClick()">
- <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
- </view>
- <view class="image-box">
- <image :src="toOss(rtuInfo.photoUrl)" mode="widthFix"></image>
- </view>
- </view>
- <view v-else class="note-image-item" @click="getRtuPhoto()">
- <view class="image-box">
- <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </uGroup>
- </uSection>
- <view class="uni-form-item">
- <uSection title="雨量传感器" type="line" titleFontSize="0.8rem" style="width: 100%;">
- <uGroup margin-top="0">
- <uni-forms-item label="是否有雨量计" label-width="130px" required>
- <radio-group @change="onRainActiveRadioChange"
- style="display: flex;flex-direction: row;justify-content: flex-start;">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in rainSensorInfo.active.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === rainSensorInfo.active.current" />
- </view>
- <view style="font-size: 12px;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item label="品牌" label-width="130px" required>
- <uni-easyinput v-model="rainSensorInfo.rainSensorBrandText" placeholder="请录入品牌" />
- </uni-forms-item>
- <uni-forms-item label="型号" label-width="130px" required>
- <uni-easyinput v-model="rainSensorInfo.rainSensorModelText" placeholder="请录入型号" />
- </uni-forms-item>
- <uni-forms-item label="更换时间" label-width="130px" required>
- <uni-datetime-picker type="date" :clear-icon="false"
- v-model="rainSensorInfo.rainSensorReplaceDate" />
- </uni-forms-item>
- <uni-forms-item label="运行状态" label-width="130px" required>
- <radio-group @change="onRainSensorStatusRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in rainSensorInfo.runStatus.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === rainSensorInfo.runStatus.current" />
- </view>
- <view style="font-size: 12px;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item>
- <uni-easyinput label="备注说明" type="textarea" v-model="rainSensorInfo.remark"
- placeholder="请输入备注说明" />
- </uni-forms-item>
- </uGroup>
- <uGroup title="雨量传感器图片" margin-top="0px">
- <view class="view-flex-rs" style="margin-top: 0px;">
- <view class="view-flex-cc" style="width: 120px;">
- <view class="img-container">
- <view class="note-image-box">
- <view v-if="rainSensorInfo.photoTake" class="note-image-item">
- <view class="close-icon" @click="onRainPhotoDeleteClick()">
- <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
- </view>
- <view class="image-box">
- <image :src="toOss(rainSensorInfo.photoUrl)" mode="widthFix"></image>
- </view>
- </view>
- <view v-else class="note-image-item" @click="getRainSensorPhoto()">
- <view class="image-box">
- <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </uGroup>
- </uSection>
- </view>
- <view class="uni-form-item">
- <uSection title="水位传感器" type="line" titleFontSize="0.8rem" style="width: 100%;">
- <uGroup margin-top="0">
- <uni-forms-item label="是否有水位计" label-width="130px" required>
- <radio-group @change="onWaterActiveRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in waterSensorInfo.active.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === waterSensorInfo.active.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item label="品牌" label-width="130px" required>
- <uni-easyinput v-model="waterSensorInfo.waterSensorBrandText" placeholder="请录入品牌" />
- </uni-forms-item>
- <uni-forms-item label="型号" label-width="130px" required>
- <uni-easyinput v-model="waterSensorInfo.waterSensorModelText" placeholder="请录入型号" />
- </uni-forms-item>
- <uni-forms-item label="更换时间" label-width="130px" required>
- <uni-datetime-picker type="date" :clear-icon="false"
- v-model="waterSensorInfo.waterSensorReplaceDate" />
- </uni-forms-item>
- <uni-forms-item label="类型" label-width="130px" required>
- <radio-group @change="onWaterSensorTypeRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in waterLevelSensorType.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === waterLevelSensorType.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item label="运行状态" label-width="130px" required>
- <radio-group @change="onWaterSensorStatusRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in waterSensorInfo.runStatus.items" :key="item.id">
- <view>
- <radio :value="item.id"
- :checked="index === waterSensorInfo.runStatus.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item>
- <uni-easyinput label="备注说明" type="textarea" v-model="waterSensorInfo.remark"
- placeholder="请输入备注说明" />
- </uni-forms-item>
- </uGroup>
- <uGroup title="水位传感器图片" margin-top="0px">
- <view class="view-flex-rs" style="margin-top: 0px;">
- <view class="view-flex-cc" style="width: 120px;">
- <view class="img-container">
- <view class="note-image-box">
- <view v-if="waterSensorInfo.photoTake" class="note-image-item">
- <view class="close-icon" @click="onWaterPhotoDeleteClick()">
- <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
- </view>
- <view class="image-box">
- <image :src="toOss(waterSensorInfo.photoUrl)" mode="widthFix"></image>
- </view>
- </view>
- <view v-else class="note-image-item" @click="getWaterSensorPhoto()">
- <view class="image-box">
- <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </uGroup>
- </uSection>
- </view>
- <view class="uni-form-item">
- <uSection title="墒情传感器" type="line" titleFontSize="0.8rem" style="width: 100%;">
- <uGroup margin-top="0">
- <uni-forms-item label="是否有墒情传感器" label-width="130px" required>
- <radio-group @change="onGroundActiveRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in groundSensorInfo.active.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === groundSensorInfo.active.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item label="品牌" label-width="130px" required>
- <uni-easyinput v-model="groundSensorInfo.groundSensorBrandText" placeholder="请录入品牌" />
- </uni-forms-item>
- <uni-forms-item label="型号" label-width="130px" required>
- <uni-easyinput v-model="groundSensorInfo.groundSensorModelText" placeholder="请录入型号" />
- </uni-forms-item>
- <uni-forms-item label="更换时间" label-width="130px" required>
- <uni-datetime-picker type="date" :clear-icon="false"
- v-model="groundSensorInfo.groundSensorReplaceDate" />
- </uni-forms-item>
- <uni-forms-item label="类型" label-width="130px" required>
- <radio-group @change="onGroundSensorTypeRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in groundSensorType.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === groundSensorType.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item label="运行状态" label-width="130px" required>
- <radio-group @change="onGroundSensorStatusRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in groundSensorInfo.runStatus.items" :key="item.id">
- <view>
- <radio :value="item.id"
- :checked="index === groundSensorInfo.runStatus.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item>
- <uni-easyinput label="备注说明" type="textarea" v-model="groundSensorInfo.remark"
- placeholder="请输入备注说明" />
- </uni-forms-item>
- </uGroup>
- <uGroup title="墒情传感器图片" margin-top="0px">
- <view class="view-flex-rs" style="margin-top: 0px;">
- <view class="view-flex-cc" style="width: 120px;">
- <view class="img-container">
- <view class="note-image-box">
- <view v-if="groundSensorInfo.photoTake" class="note-image-item">
- <view class="close-icon" @click="onGroundPhotoDeleteClick()">
- <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
- </view>
- <view class="image-box">
- <image :src="toOss(groundSensorInfo.photoUrl)" mode="widthFix"></image>
- </view>
- </view>
- <view v-else class="note-image-item" @click="getGroundSensorPhoto()">
- <view class="image-box">
- <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </uGroup>
- </uSection>
- </view>
- <view class="uni-form-item">
- <uSection title="供电系统" type="line" titleFontSize="0.8rem" style="width: 100%;">
- <uGroup margin-top="0">
- <uni-forms-item label="蓄电池容量(AH)" label-width="130px" required>
- <uni-easyinput v-model="powerInfo.batteryModel" placeholder="请录入容量" />
- </uni-forms-item>
- <uni-forms-item label="蓄电池更换时间" label-width="130px" required>
- <uni-datetime-picker type="date" :clear-icon="false"
- v-model="powerInfo.batteryReplaceDate" />
- </uni-forms-item>
- <uni-forms-item label="太阳能板功率(W)" label-width="130px" required>
- <uni-easyinput v-model="powerInfo.sunPowerModel" placeholder="请录入功率" />
- </uni-forms-item>
- <uni-forms-item label="太阳能板更换时间" label-width="130px" required>
- <uni-datetime-picker type="date" :clear-icon="false"
- v-model="powerInfo.sunPowerReplaceDate" />
- </uni-forms-item>
- <uni-forms-item label="运行状态" label-width="130px" required>
- <radio-group @change="onPowerStatusRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in powerInfo.runStatus.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === powerInfo.runStatus.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item>
- <uni-easyinput label="备注说明" type="textarea" v-model="powerInfo.remark"
- placeholder="请输入备注说明" />
- </uni-forms-item>
- </uGroup>
- <uGroup title="供电系统图片" margin-top="0px">
- <view class="view-flex-rs" style="margin-top: 0px;">
- <view class="view-flex-cc" style="width: 120px;">
- <view class="img-container">
- <view class="note-image-box">
- <view v-if="powerInfo.batteryPhotoTake" class="note-image-item">
- <view class="close-icon" @click="onBatteryPhotoDeleteClick()">
- <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
- </view>
- <view class="image-box">
- <image :src="toOss(powerInfo.batteryPhotoUrl)" mode="widthFix"></image>
- </view>
- </view>
- <view v-else class="note-image-item" @click="getBatteryPhoto()">
- <view class="image-box">
- <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="view-flex-cc" style="width: 120px;">
- <view class="img-container">
- <view class="note-image-box">
- <view v-if="powerInfo.sunPhotoTake" class="note-image-item">
- <view class="close-icon" @click="onSunPowerPhotoDeleteClick()">
- <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
- </view>
- <view class="image-box">
- <image :src="toOss(powerInfo.sunPhotoUrl)" mode="widthFix"></image>
- </view>
- </view>
- <view v-else class="note-image-item" @click="getSunPowerPhoto()">
- <view class="image-box">
- <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </uGroup>
- </uSection>
- </view>
- <view class="uni-form-item">
- <uSection title="4G移动网络" type="line" titleFontSize="0.8rem" style="width: 100%;">
- <uGroup margin-top="0">
- <uni-forms-item label="是否使用4G移动网络" label-width="130px" required>
- <radio-group @change="onNetworkActiveRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in networkInfo.active.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === networkInfo.active.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item label="SIM卡号" label-width="130px" required>
- <uni-easyinput v-model="networkInfo.simCcid" placeholder="请录入请录入SIM卡号" />
- </uni-forms-item>
- <uni-forms-item label="开卡单位" label-width="130px" required>
- <uni-easyinput v-model="networkInfo.simPay" placeholder="请录入SIM卡开卡单位" />
- </uni-forms-item>
- <uni-forms-item label="缴费截止时间" label-width="130px" required>
- <uni-datetime-picker type="date" :clear-icon="false" v-model="networkInfo.simPayEndDate" />
- </uni-forms-item>
- <uni-forms-item label="运行状态" label-width="130px" required>
- <radio-group @change="onNetworkStatusRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in networkInfo.runStatus.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === networkInfo.runStatus.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item>
- <uni-easyinput label="备注说明" type="textarea" v-model="networkInfo.remark"
- placeholder="请输入备注说明" />
- </uni-forms-item>
- </uGroup>
- </uSection>
- </view>
- <view class="uni-form-item">
- <uSection title="北斗通讯" type="line" titleFontSize="0.8rem" style="width: 100%;">
- <uGroup margin-top="0">
- <uni-forms-item label="是否使用北斗网络" label-width="130px" required>
- <radio-group @change="onSatelliteActiveRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in satelliteInfo.active.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === satelliteInfo.active.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item label="通讯模式" label-width="130px" required>
- <radio-group @change="onSatelliteModelRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in satelliteModel.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === satelliteModel.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item label="运行状态" label-width="130px" required>
- <radio-group @change="onSatelliteStatusRadioChange" class="view-flex-rs">
- <label style="margin-right: 20px;width:80px;" class="view-flex-rs"
- v-for="(item, index) in satelliteInfo.runStatus.items" :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === satelliteInfo.runStatus.current" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-forms-item>
- <uni-forms-item>
- <uni-easyinput label="备注说明" type="textarea" v-model="satelliteInfo.remark"
- placeholder="请输入备注说明" />
- </uni-forms-item>
- </uGroup>
- </uSection>
- </view>
- </uni-forms>
- <view class="footer">
- <view class="control">
- <view style="display: flex;flex-direction: row;justify-content: flex-start;">
- <view
- style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightblue"
- @click="toSave()">
- <view style="display:flex;flex-direction: column;justify-content: center;">
- <uIcons class="input-uni-icon" type="gear" size="18" color="#999" />
- </view>
- <view style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
- <text style="color:black;font-size:0.6rem">暂存</text>
- </view>
- </view>
- <view
- style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightpink"
- @click="toSubmit()">
- <view style="display:flex;flex-direction: column;justify-content: center;">
- <uIcons class="input-uni-icon" type="location" size="18" color="#999" />
- </view>
- <view style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
- <text style="color:black;font-size:0.6rem">立即提交</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- <u-gap height="70"></u-gap> -->
- </view>
- </template>
- <script>
- import http from '@/http/api.js';
- import {
- pathToBase64,
- base64ToPath
- } from '@/js_sdk/mmmm-image-tools/index.js';
- import {
- oss,
- devUrl,
- prodUrl
- } from '@/common/setting';
- import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
- import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
- import uGroup from '@/uni_modules/uni-group/uni-group.vue'
- import uSection from '@/uni_modules/uni-section/uni-section.vue'
- import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
- import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
- import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
- import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
- import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
- import uCard from '@/uni_modules/uni-card/components/uni-card/uni-card.vue'
- export default {
- components: {
- uNavBar,
- uDataPicker,
- uPagination,
- uBreadcrumb,
- uList,
- uListItem,
- uIcons,
- uGroup,
- uSection,
- uCard,
- },
- onLoad(options) {
- this.rtuCode = options.rtuCode;
- this.baseURL = process.env.NODE_ENV === 'development' ? devUrl : prodUrl;
- //初始化巡检填报字典
- this.getReportDict();
- //查询计划信息
- //this.getPlanInfo();
- },
- data() {
- return {
- pattern: {
- color: '#7A7E83',
- backgroundColor: '#fff',
- selectedColor: '#007AFF',
- buttonColor: '#007AFF',
- iconColor: '#fff'
- },
- content: [{
- iconPath: '/static/images/user/c6.png',
- selectedIconPath: '/static/images/user/c6.png',
- text: '提交',
- active: false
- },
- {
- iconPath: '/static/images/user/c5.png',
- selectedIconPath: '/static/images/user/c5.png',
- text: '保存',
- active: false
- }
- ],
- baseURL: '',
- rtuCode: '',
- //planInfo: {},
- waterLevelSensorType: {
- items: [],
- current: 0,
- },
- groundSensorType: {
- items: [],
- current: 0,
- },
- satelliteModel: {
- items: [],
- current: 0,
- },
- datagramIp: {
- items: [{
- 'id': '0',
- 'checked': false,
- 'dictValue': '发往县'
- }, {
- 'id': '1',
- 'checked': false,
- 'dictValue': '发往市'
- }, {
- 'id': '2',
- 'checked': false,
- 'dictValue': '发往省'
- }],
- current: 0,
- },
- baseInfo: {
- reportDesc: '',
- photo1Url: '',
- photo1Take: false,
- photo2Url: '',
- photo2Take: false
- },
- rtuInfo: {
- remark: '',
- rtuBrand: '',
- rtuBrandText: '',
- rtuModel: '',
- rtuModelText: '',
- rtuReplaceDate: null,
- datagramTo: [{
- text: '发往县',
- value: 0
- }, {
- text: '发往市',
- value: 1
- }, {
- text: '发往省',
- value: 2
- }],
- selectedDatagramTo: [],
- datagramToLevel1: 0,
- datagramToLevel2: 0,
- datagramToLevel3: 0,
- photoUrl: '',
- photoTake: false,
- runStatus: {
- items: [{
- 'id': '0',
- 'dictValue': '正常'
- }, {
- 'id': '1',
- 'dictValue': '故障'
- }],
- current: 0,
- },
- },
- rainSensorInfo: {
- rainSensorBrand: '',
- rainSensorModel: '',
- rainSensorBrandText: '',
- rainSensorModelText: '',
- rainSensorReplaceDate: null,
- remark: '',
- photoUrl: '',
- photoTake: false,
- active: {
- items: [{
- 'id': '0',
- 'dictValue': '有'
- }, {
- 'id': '1',
- 'dictValue': '无'
- }],
- current: 0,
- },
- runStatus: {
- items: [{
- 'id': '0',
- 'dictValue': '正常'
- }, {
- 'id': '1',
- 'dictValue': '故障'
- }],
- current: 0,
- },
- },
- waterSensorInfo: {
- waterSensorBrand: '',
- waterSensorModel: '',
- waterSensorBrandText: '',
- waterSensorModelText: '',
- waterSensorType: '',
- waterSensorReplaceDate: null,
- remark: '',
- photoUrl: '',
- photoTake: false,
- active: {
- items: [{
- 'id': '0',
- 'dictValue': '有'
- }, {
- 'id': '1',
- 'dictValue': '无'
- }],
- current: 0,
- },
- runStatus: {
- items: [{
- 'id': '0',
- 'dictValue': '正常'
- }, {
- 'id': '1',
- 'dictValue': '故障'
- }],
- current: 0,
- },
- },
- groundSensorInfo: {
- groundSensorBrand: '',
- groundSensorModel: '',
- groundSensorBrandText: '',
- groundSensorModelText: '',
- groundSensorType: '',
- groundSensorReplaceDate: null,
- remark: '',
- photoUrl: '',
- photoTake: false,
- active: {
- items: [{
- 'id': '0',
- 'dictValue': '有'
- }, {
- 'id': '1',
- 'dictValue': '无'
- }],
- current: 0,
- },
- runStatus: {
- items: [{
- 'id': '0',
- 'dictValue': '正常'
- }, {
- 'id': '1',
- 'dictValue': '故障'
- }],
- current: 0,
- },
- },
- powerInfo: {
- batteryModel: '',
- batteryReplaceDate: null,
- sunPowerModel: '',
- sunPowerReplaceDate: null,
- batteryPhotoUrl: '',
- batteryPhotoTake: false,
- sunPhotoUrl: '',
- sunPhotoTake: false,
- remark: '',
- active: {
- items: [{
- 'id': '0',
- 'dictValue': '有'
- }, {
- 'id': '1',
- 'dictValue': '无'
- }],
- current: 0,
- },
- runStatus: {
- items: [{
- 'id': '0',
- 'dictValue': '正常'
- }, {
- 'id': '1',
- 'dictValue': '故障'
- }],
- current: 0,
- },
- },
- networkInfo: {
- simCcid: '',
- simPay: '',
- simPayEndDate: null,
- remark: '',
- active: {
- items: [{
- 'id': '0',
- 'dictValue': '有'
- }, {
- 'id': '1',
- 'dictValue': '无'
- }],
- current: 0,
- },
- runStatus: {
- items: [{
- 'id': '0',
- 'dictValue': '正常'
- }, {
- 'id': '1',
- 'dictValue': '故障'
- }],
- current: 0,
- },
- },
- satelliteInfo: {
- satelliteModel: '',
- remark: '',
- active: {
- items: [{
- 'id': '0',
- 'dictValue': '有'
- }, {
- 'id': '1',
- 'dictValue': '无'
- }],
- current: 0,
- },
- runStatus: {
- items: [{
- 'id': '0',
- 'dictValue': '正常'
- }, {
- 'id': '1',
- 'dictValue': '故障'
- }],
- current: 0,
- },
- },
- localImageList: [],
- uploadImageList: [],
- title: '巡检信息填报',
- desc: '',
- }
- },
- computed: {
- getIcon() {
- return path => {
- return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
- }
- },
- },
- onShow() {
- },
- created() {
- },
- methods: {
- toOss(path) {
- return oss + path;
- },
- toBack() {
- uni.navigateBack({
- delta: 1
- })
- },
- toSubmit() {
- var formdata = {};
- // formdata['planId'] = this.planId;
- formdata['rtuCode'] = this.rtuCode;
- formdata['reportDesc'] = this.baseInfo.reportDesc;
- if (this.baseInfo.photo1Take) {
- formdata['basePhoto1Take'] = 1;
- formdata['basePhoto1Url'] = this.baseInfo.photo1Url;
- } else {
- formdata['basePhoto1Take'] = 0;
- }
- if (this.baseInfo.photo2Take) {
- formdata['basePhoto2Take'] = 1;
- formdata['basePhoto2Url'] = this.baseInfo.photo2Url;
- } else {
- formdata['basePhoto2Take'] = 0;
- }
- formdata['rtuStatus'] = this.rtuInfo.runStatus.current;
- formdata['rtuBrand'] = this.rtuInfo.rtuBrandText;
- formdata['rtuModel'] = this.rtuInfo.rtuModelText;
- formdata['rtuReplaceDate'] = this.rtuInfo.rtuReplaceDate;
- formdata['datagramToLevel1'] = this.rtuInfo.datagramToLevel1;
- formdata['datagramToLevel2'] = this.rtuInfo.datagramToLevel2;
- formdata['datagramToLevel3'] = this.rtuInfo.datagramToLevel3;
- formdata['rtuDesc'] = this.rtuInfo.remark;
- if (this.rtuInfo.photoTake) {
- formdata['rtuPhotoTake'] = 1;
- formdata['rtuPhotoUrl'] = this.rtuInfo.photoUrl;
- } else {
- formdata['rtuPhotoTake'] = 0;
- }
- if (this.rainSensorInfo.active.current === 0) {
- formdata['rainSensorActive'] = 1;
- formdata['rainSensorBrand'] = this.rainSensorInfo.rainSensorBrandText;
- formdata['rainSensorModel'] = this.rainSensorInfo.rainSensorModelText;
- formdata['rainSensorReplaceDate'] = this.rainSensorInfo.rainSensorReplaceDate;
- formdata['rainSensorDesc'] = this.rainSensorInfo.remark;
- formdata['rainSensorStatus'] = this.rainSensorInfo.runStatus.current;
- if (this.rainSensorInfo.photoTake) {
- formdata['rainSensorPhotoTake'] = 1;
- formdata['rainSensorPhotoUrl'] = this.rainSensorInfo.photoUrl;
- } else {
- formdata['rainSensorPhotoTake'] = 0;
- }
- } else {
- formdata['rainSensorActive'] = 0;
- }
- if (this.waterSensorInfo.active.current === 0) {
- formdata['waterLevelSensorActive'] = 1;
- formdata['waterSensorType'] = this.waterLevelSensorType.items[this.waterLevelSensorType.current].id;
- formdata['waterSensorBrand'] = this.waterSensorInfo.waterSensorBrandText;
- formdata['waterSensorModel'] = this.waterSensorInfo.waterSensorModelText;
- formdata['waterSensorReplaceDate'] = this.waterSensorInfo.waterSensorReplaceDate;
- formdata['waterSensorDesc'] = this.waterSensorInfo.remark;
- formdata['waterLevelSensorStatus'] = this.waterSensorInfo.runStatus.current;
- if (this.waterSensorInfo.photoTake) {
- formdata['waterSensorPhotoTake'] = 1;
- formdata['waterSensorPhotoUrl'] = this.waterSensorInfo.photoUrl;
- } else {
- formdata['waterSensorPhotoTake'] = 0;
- }
- } else {
- formdata['waterLevelSensorActive'] = 0;
- }
- if (this.groundSensorInfo.active.current === 0) {
- formdata['groundWaterSensorActive'] = 1;
- formdata['groundSensorType'] = this.groundSensorType.items[this.groundSensorType.current].id;
- formdata['groundWaterSensorStatus'] = this.groundSensorInfo.runStatus.current;
- formdata['groundSensorBrand'] = this.groundSensorInfo.groundSensorBrandText;
- formdata['groundSensorModel'] = this.groundSensorInfo.groundSensorModelText;
- formdata['groundSensorReplaceDate'] = this.groundSensorInfo.groundSensorReplaceDate;
- formdata['groundSensorDesc'] = this.groundSensorInfo.remark;
- if (this.groundSensorInfo.photoTake) {
- formdata['groundSensorPhotoTake'] = 1;
- formdata['groundSensorPhotoUrl'] = this.groundSensorInfo.photoUrl;
- } else {
- formdata['groundSensorPhotoTake'] = 0;
- }
- } else {
- formdata['groundWaterSensorActive'] = 0;
- }
- formdata['batteryModel'] = this.powerInfo.batteryModel;
- formdata['batteryReplaceDate'] = this.powerInfo.batteryReplaceDate;
- formdata['sunPowerModel'] = this.powerInfo.sunPowerModel;
- formdata['sunPowerReplaceDate'] = this.powerInfo.sunPowerReplaceDate;
- formdata['powerStatus'] = this.powerInfo.runStatus.current;
- formdata['powerDesc'] = this.powerInfo.remark;
- if (this.powerInfo.batteryPhotoTake) {
- formdata['batteryPhotoTake'] = 1;
- formdata['batteryPhotoUrl'] = this.powerInfo.batteryPhotoUrl;
- } else {
- formdata['batteryPhotoTake'] = 0;
- }
- if (this.powerInfo.sunPhotoTake) {
- formdata['sunPhotoTake'] = 1;
- formdata['sunPhotoUrl'] = this.powerInfo.sunPhotoUrl;
- } else {
- formdata['sunPhotoTake'] = 0;
- }
- if (this.networkInfo.active.current === 0) {
- formdata['networkActive'] = 1;
- formdata['simCcid'] = this.networkInfo.simCcid;
- formdata['simPay'] = this.networkInfo.simPay;
- formdata['simPayEndDate'] = this.networkInfo.simPayEndDate;
- formdata['networkStatus'] = this.networkInfo.runStatus.current;
- formdata['networkDesc'] = this.networkInfo.remark;
- } else {
- formdata['networkActive'] = 0;
- }
- if (this.satelliteInfo.active.current === 0) {
- formdata['satelliteActive'] = 1;
- formdata['satelliteModel'] = this.satelliteModel.items[this.satelliteModel.current].id;
- formdata['satelliteStatus'] = this.satelliteInfo.runStatus.current;
- formdata['satelliteDesc'] = this.satelliteInfo.remark;
- } else {
- formdata['satelliteActive'] = 0;
- }
- var that = this;
- http.request({
- url: '/galaxy-test/equipment/inspection/report/save',
- method: 'POST',
- data: formdata
- }).then(res => {
- if (res.success) {
- uni.showModal({
- content: '填报信息已成功提交',
- showCancel: false,
- success(res) {
- if (res.confirm) {
- uni.navigateBack();
- }
- }
- });
- } else {
- uni.showModal({
- content: '' + res.msg,
- showCancel: false
- });
- }
- }).catch(err => {
- console.log(err)
- })
- },
- toSave() {
- },
- rtuReplaceDateClick(e) {
- console.log('maskClick事件:', e);
- },
- rainSensorReplaceDateClick(e) {
- console.log('maskClick事件:', e);
- },
- waterSensorReplaceDateClick(e) {
- console.log('maskClick事件:', e);
- },
- groundSensorReplaceDateClick(e) {
- console.log('maskClick事件:', e);
- },
- batteryReplaceDateClick(e) {
- console.log('maskClick事件:', e);
- },
- sunPowerReplaceDateClick(e) {
- console.log('maskClick事件:', e);
- },
- simPayEndDateClick(e) {
- console.log('maskClick事件:', e);
- },
- dateFormat(dt) {
- var text = "" + dt.getFullYear();
- text += "-";
- text += ((dt.getMonth() + 1) < 10) ? ("0" + (dt.getMonth() + 1)) : (dt
- .getMonth() +
- 1);
- text += "-";
- text += dt.getDate() < 10 ? "0" + dt.getDate() : dt.getDate();
- text += " ";
- text += dt.getHours() < 10 ? "0" + dt.getHours() : dt.getHours();
- text += ":";
- text += dt.getMinutes() < 10 ? "0" + dt.getMinutes() : dt.getMinutes();
- text += ":";
- text += dt.getSeconds() < 10 ? "0" + dt.getSeconds() : dt.getSeconds();
- return text;
- },
- getReportDict() {
- var that = this;
- var waterLevelSensorTypeDictList = [];
- //查询水位计
- http.request({
- url: '/galaxy-system/dict-biz/dictionary?code=water_level_sensor_type',
- method: 'GET'
- }).then(res => {
- console.log(res.data)
- if (res.data != null) {
- const dictLength = res.data['length'];
- for (var i = 0; i < dictLength; i++) {
- let dict = res.data['' + i];
- waterLevelSensorTypeDictList.push(dict);
- }
- that.waterLevelSensorType.items = waterLevelSensorTypeDictList;
- }
- }).catch(err => {
- console.log(err)
- })
- var groundSensorTypeDictList = [];
- //查询墒情传感器类型
- http.request({
- url: '/galaxy-system/dict-biz/dictionary?code=ground_water_sensor_type',
- method: 'GET'
- }).then(res => {
- console.log(res.data)
- if (res.data != null) {
- const dictLength = res.data['length'];
- for (var i = 0; i < dictLength; i++) {
- let dict = res.data['' + i];
- groundSensorTypeDictList.push(dict);
- }
- that.groundSensorType.items = groundSensorTypeDictList;
- }
- }).catch(err => {
- console.log(err)
- })
- //查询北斗模式
- var satelliteModelDictList = [];
- http.request({
- url: '/galaxy-system/dict-biz/dictionary?code=satellite_model',
- method: 'GET'
- }).then(res => {
- console.log(res.data)
- if (res.data != null) {
- const dictLength = res.data['length'];
- for (var i = 0; i < dictLength; i++) {
- let dict = res.data['' + i];
- satelliteModelDictList.push(dict);
- }
- that.satelliteModel.items = satelliteModelDictList;
- }
- }).catch(err => {
- console.log(err)
- })
- },
- // getPlanInfo() {
- // var that = this;
- // var postData = {};
- // postData['id'] = this.planId;
- // http.request({
- // url: '/galaxy-test/equipment/inspection/plan/detail',
- // method: 'GET',
- // data: postData
- // }).then(res => {
- // console.log(res)
- // if (res.data != null) {
- // that.planInfo = res.data;
- // }
- // }).catch(err => {
- // console.log(err)
- // })
- // },
- onBasePhoto1DeleteClick() {
- this.baseInfo.photo1Take = false;
- },
- onBasePhoto2DeleteClick() {
- this.baseInfo.photo2Take = false;
- },
- onRtuPhotoDeleteClick() {
- this.rtuInfo.photoTake = false;
- },
- onRainPhotoDeleteClick() {
- this.rainSensorInfo.photoTake = false;
- },
- onWaterPhotoDeleteClick() {
- this.waterSensorInfo.photoTake = false;
- },
- onGroundPhotoDeleteClick() {
- this.groundSensorInfo.photoTake = false;
- },
- onBatteryPhotoDeleteClick() {
- this.powerInfo.batteryPhotoTake = false;
- },
- onSunPowerPhotoDeleteClick() {
- this.powerInfo.sunPhotoTake = false;
- },
- onRainActiveRadioChange: function(evt) {
- for (let i = 0; i < this.rainSensorInfo.active.items.length; i++) {
- if (this.rainSensorInfo.active.items[i].id === evt.detail.value) {
- this.rainSensorInfo.active.current = i;
- break;
- }
- }
- },
- onWaterActiveRadioChange: function(evt) {
- for (let i = 0; i < this.waterSensorInfo.active.items.length; i++) {
- if (this.waterSensorInfo.active.items[i].id === evt.detail.value) {
- this.waterSensorInfo.active.current = i;
- break;
- }
- }
- },
- onGroundActiveRadioChange: function(evt) {
- for (let i = 0; i < this.groundSensorInfo.active.items.length; i++) {
- if (this.groundSensorInfo.active.items[i].id === evt.detail.value) {
- this.groundSensorInfo.active.current = i;
- break;
- }
- }
- },
- onNetworkActiveRadioChange: function(evt) {
- for (let i = 0; i < this.networkInfo.active.items.length; i++) {
- if (this.networkInfo.active.items[i].id === evt.detail.value) {
- this.networkInfo.active.current = i;
- break;
- }
- }
- },
- onSatelliteActiveRadioChange: function(evt) {
- for (let i = 0; i < this.satelliteInfo.active.items.length; i++) {
- if (this.satelliteInfo.active.items[i].id === evt.detail.value) {
- this.satelliteInfo.active.current = i;
- break;
- }
- }
- },
- onWaterSensorTypeRadioChange: function(evt) {
- for (let i = 0; i < this.waterLevelSensorType.items.length; i++) {
- if (this.waterLevelSensorType.items[i].id === evt.detail.value) {
- this.waterLevelSensorType.current = i;
- break;
- }
- }
- },
- onGroundSensorTypeRadioChange: function(evt) {
- for (let i = 0; i < this.groundSensorType.items.length; i++) {
- if (this.groundSensorType.items[i].id === evt.detail.value) {
- this.groundSensorType.current = i;
- break;
- }
- }
- },
- onSatelliteModelRadioChange: function(evt) {
- for (let i = 0; i < this.satelliteModel.items.length; i++) {
- if (this.satelliteModel.items[i].id === evt.detail.value) {
- this.satelliteModel.current = i;
- break;
- }
- }
- },
- datagramToCheckboxChange: function(evt) {
- console.log(evt)
- this.rtuInfo.datagramToLevel1 = 0;
- this.rtuInfo.datagramToLevel2 = 0;
- this.rtuInfo.datagramToLevel3 = 0;
- for (let i = 0; i < this.evt.detail.value.length; i++) {
- let c = this.evt.detail.value[i];
- if (c === '0') {
- this.rtuInfo.datagramToLevel1 = 1;
- } else if (c === '1') {
- this.rtuInfo.datagramToLevel2 = 1;
- } else if (c === '2') {
- this.rtuInfo.datagramToLevel3 = 1;
- }
- }
- },
- onRtuStatusRadioChange: function(evt) {
- for (let i = 0; i < this.rtuInfo.runStatus.items.length; i++) {
- if (this.rtuInfo.runStatus.items[i].id === evt.detail.value) {
- this.rtuInfo.runStatus.current = i;
- break;
- }
- }
- },
- onRainSensorStatusRadioChange: function(evt) {
- for (let i = 0; i < this.rainSensorInfo.runStatus.items.length; i++) {
- if (this.rainSensorInfo.runStatus.items[i].id === evt.detail.value) {
- this.rainSensorInfo.runStatus.current = i;
- break;
- }
- }
- },
- onWaterSensorStatusRadioChange: function(evt) {
- for (let i = 0; i < this.waterSensorInfo.runStatus.items.length; i++) {
- if (this.waterSensorInfo.runStatus.items[i].id === evt.detail.value) {
- this.waterSensorInfo.runStatus.current = i;
- break;
- }
- }
- },
- onGroundSensorStatusRadioChange: function(evt) {
- for (let i = 0; i < this.groundSensorInfo.runStatus.items.length; i++) {
- if (this.groundSensorInfo.runStatus.items[i].id === evt.detail.value) {
- this.groundSensorInfo.runStatus.current = i;
- break;
- }
- }
- },
- onPowerStatusRadioChange: function(evt) {
- for (let i = 0; i < this.powerInfo.runStatus.items.length; i++) {
- if (this.powerInfo.runStatus.items[i].id === evt.detail.value) {
- this.powerInfo.runStatus.current = i;
- break;
- }
- }
- },
- onNetworkStatusRadioChange: function(evt) {
- for (let i = 0; i < this.networkInfo.runStatus.items.length; i++) {
- if (this.networkInfo.runStatus.items[i].id === evt.detail.value) {
- this.networkInfo.runStatus.current = i;
- break;
- }
- }
- },
- onSatelliteStatusRadioChange: function(evt) {
- for (let i = 0; i < this.satelliteInfo.runStatus.items.length; i++) {
- if (this.satelliteInfo.runStatus.items[i].id === evt.detail.value) {
- this.satelliteInfo.runStatus.current = i;
- break;
- }
- }
- },
- uploadPhotoCallback(path, photoIndex) {
- if (photoIndex === 'basePhoto1') {
- this.baseInfo.photo1Url = path;
- this.baseInfo.photo1Take = true;
- } else if (photoIndex === 'basePhoto2') {
- this.baseInfo.photo2Url = path;
- this.baseInfo.photo2Take = true;
- } else if (photoIndex === 'rtu') {
- this.rtuInfo.photoUrl = path;
- this.rtuInfo.photoTake = true;
- } else if (photoIndex === 'rain') {
- this.rainSensorInfo.photoUrl = path;
- this.rainSensorInfo.photoTake = true;
- } else if (photoIndex === 'water') {
- this.waterSensorInfo.photoUrl = path;
- this.waterSensorInfo.photoTake = true;
- } else if (photoIndex === 'ground') {
- this.groundSensorInfo.photoUrl = path;
- this.groundSensorInfo.photoTake = true;
- } else if (photoIndex === 'battery') {
- this.powerInfo.batteryPhotoUrl = path;
- this.powerInfo.batteryPhotoTake = true;
- } else if (photoIndex === 'sun') {
- this.powerInfo.sunPhotoUrl = path;
- this.powerInfo.sunPhotoTake = true;
- }
- },
- uploadPhoto(imagePath, photoIndex) {
- var that = this;
- console.log("accessToken:" + uni.getStorageSync('accessToken'));
- console.log("path " + imagePath);
- uni.showLoading({
- title: '上传中'
- });
- uni.uploadFile({
- url: this.baseURL +
- '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
- uni.getStorageSync('accessToken'),
- fileType: 'image',
- filePath: imagePath,
- name: 'file',
- success: (uploadFileRes) => {
- if (uploadFileRes.statusCode == 200) {
- let data = JSON.parse(uploadFileRes.data);
- if (data.success) {
- let path = data.data['name'];
- console.log("paht " + path);
- that.uploadPhotoCallback(path, photoIndex);
- }
- }
- },
- fail: (err) => {
- console.log(err);
- reject('err')
- },
- complete() {
- uni.hideLoading()
- }
- });
- },
- getBasePhoto1() {
- var that = this;
- uni.chooseImage({
- sourceType: ['album', 'camera'],
- success: (res) => {
- const len = res.tempFilePaths.length;
- if (len === 1) {
- res.tempFilePaths.forEach(path => {
- that.uploadPhoto(path, 'basePhoto1');
- })
- } else {
- uni.showModal({
- content: '只能选择一张图片,请确认!',
- showCancel: false
- });
- }
- }
- })
- },
- getBasePhoto2() {
- var that = this;
- uni.chooseImage({
- sourceType: ['album', 'camera'],
- success: (res) => {
- const len = res.tempFilePaths.length;
- if (len === 1) {
- res.tempFilePaths.forEach(path => {
- that.uploadPhoto(path, 'basePhoto2');
- })
- } else {
- uni.showModal({
- content: '只能选择一张图片,请确认!',
- showCancel: false
- });
- }
- }
- })
- },
- getRtuPhoto() {
- var that = this;
- uni.chooseImage({
- sourceType: ['album', 'camera'],
- success: (res) => {
- const len = res.tempFilePaths.length;
- if (len === 1) {
- res.tempFilePaths.forEach(path => {
- that.uploadPhoto(path, 'rtu');
- })
- } else {
- uni.showModal({
- content: '只能选择一张图片,请确认!',
- showCancel: false
- });
- }
- }
- })
- },
- getRainSensorPhoto() {
- var that = this;
- uni.chooseImage({
- sourceType: ['album', 'camera'],
- success: (res) => {
- const len = res.tempFilePaths.length;
- if (len === 1) {
- res.tempFilePaths.forEach(path => {
- that.uploadPhoto(path, 'rain');
- })
- } else {
- uni.showModal({
- content: '只能选择一张图片,请确认!',
- showCancel: false
- });
- }
- }
- })
- },
- getWaterSensorPhoto() {
- var that = this;
- uni.chooseImage({
- sourceType: ['album', 'camera'],
- success: (res) => {
- const len = res.tempFilePaths.length;
- if (len === 1) {
- res.tempFilePaths.forEach(path => {
- that.uploadPhoto(path, 'water');
- })
- } else {
- uni.showModal({
- content: '只能选择一张图片,请确认!',
- showCancel: false
- });
- }
- }
- })
- },
- getGroundSensorPhoto() {
- var that = this;
- uni.chooseImage({
- sourceType: ['album', 'camera'],
- success: (res) => {
- const len = res.tempFilePaths.length;
- if (len === 1) {
- res.tempFilePaths.forEach(path => {
- that.uploadPhoto(path, 'ground');
- })
- } else {
- uni.showModal({
- content: '只能选择一张图片,请确认!',
- showCancel: false
- });
- }
- }
- })
- },
- getBatteryPhoto() {
- var that = this;
- uni.chooseImage({
- sourceType: ['album', 'camera'],
- success: (res) => {
- const len = res.tempFilePaths.length;
- if (len === 1) {
- res.tempFilePaths.forEach(path => {
- that.uploadPhoto(path, 'battery');
- })
- } else {
- uni.showModal({
- content: '只能选择一张图片,请确认!',
- showCancel: false
- });
- }
- }
- })
- },
- getSunPowerPhoto() {
- var that = this;
- uni.chooseImage({
- sourceType: ['album', 'camera'],
- success: (res) => {
- const len = res.tempFilePaths.length;
- if (len === 1) {
- res.tempFilePaths.forEach(path => {
- that.uploadPhoto(path, 'sun');
- })
- } else {
- uni.showModal({
- content: '只能选择一张图片,请确认!',
- showCancel: false
- });
- }
- }
- })
- },
- onSaveClick(e) {
- if ((this.projectInfo.projectId != null && this.projectInfo.projectId.length > 0) &&
- (this.checkAreaDict.id != null && this.checkAreaDict.id.length > 0) &&
- (this.checkItemTypeDict.id != null && this.checkItemTypeDict.id.length > 0) &&
- (this.checkItemLabelDict.id != null && this.checkItemLabelDict.id.length > 0) &&
- (this.checkStandardDict.id != null && this.checkStandardDict.id.length > 0)) {
- try {
- var data = {};
- data['failureHiddenDangerDesc'] = this.failureHiddenDangerDesc;
- data['failureCheckPointDesc'] = this.failureCheckPointDesc;
- data['failureCorrectiveSuggest'] = this.failureCorrectiveSuggest;
- data['failureCheckNo'] = this.checkNo;
- data['failureProjectId'] = this.projectInfo.projectId;
- data['failureCheckArea'] = this.checkAreaDict.id;
- data['failureCheckHiddenDangerType'] = this.checkItemTypeDict.id;
- data['failureCheckHiddenDanger'] = this.checkItemLabelDict.id;
- data['failureCheckHiddenDangerItemPoint'] = this.checkStandardDict.id;
- data['failureCheckHiddenDangerStandard'] = this.checkItemStandardBasisDict.id;
- data['failureHiddenDangerLevel'] = this.hiddenDangerRadio.items[this.hiddenDangerRadio.current]
- .id;
- data['failureCorrectivePlanTime'] = this.planTimeRadio.items[this.planTimeRadio.current]
- .id;
- data['createTime'] = this.dateFormat(new Date());
- data['createUserName'] = this.userInfo1.nick_name;
- this.saveLocalFiles();
- console.log("save " + data);
- var list = uni.getStorageSync('check_report_storage_index');
- if (list != null && list.length > 0) {
- list.push(this.checkNo);
- uni.setStorageSync('check_report_storage_index', list);
- uni.setStorageSync('check_report_storage_' + this.checkNo, data);
- } else {
- list = [];
- list.push(this.checkNo);
- uni.setStorageSync('check_report_storage_index', list);
- uni.setStorageSync('check_report_storage_' + this.checkNo, data);
- }
- var that = this;
- uni.showModal({
- title: '流程确认',
- content: '请选择复制或继续检查',
- cancelText: '复制检查单',
- confirmText: '继续检查',
- success: function(res) {
- if (res.confirm) {
- that.onContinunClick();
- } else if (res.cancel) {
- that.onCopyClick();
- }
- }
- });
- } catch (e) {
- console.log(e)
- uni.showModal({
- content: '保存失败!',
- showCancel: false
- });
- }
- } else {
- uni.showModal({
- content: '请检查必填项',
- showCancel: false
- });
- }
- },
- formReset: function(e) {
- console.log('清空数据')
- },
- }
- }
- </script>
- <style>
- /* page {
- background-color: rgb(240, 242, 244);
- } */
- </style>
- <style lang="scss" scoped>
- .cell-hover-class {
- background-color: rgb(235, 237, 238);
- }
-
- .view-flex-rs {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- }
-
- .view-flex-rc {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- }
-
- .view-flex-re {
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- align-items: center;
- }
-
- .view-flex-cs {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- }
-
- .view-flex-cc {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
-
- .view-flex-ce {
- display: flex;
- flex-direction: column;
- justify-content: flex-end;
- }
-
- .line-body {
- padding-left: 10px;
- padding-right: 10px;
- }
-
- .required-star {
- color: #FF0000;
- font-size: 15px;
- width: 20px;
- text-align: center;
- padding-left: 0px;
- padding-right: 2px;
- }
-
- .item-title {
- color: #909399;
- font-size: 15px;
- }
-
- .mline-text {
- padding-left: 2px;
- width: 100%;
- /* background-color:#909399; */
- height: 70px;
- border: 1px solid #FF5A5F;
- border-radius: 5px;
- }
-
- .footer {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- z-index: 1;
- height: 100rpx;
- padding: 20rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- background-color: #ffffff;
- .ipt {
- width: 380rpx;
- height: 77rpx;
- background: #f7f7f7;
- border-radius: 38px;
- padding: 0 37rpx;
- box-sizing: border-box;
- margin-right: 20rpx;
- }
- .control {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- .block {
- display: flex;
- align-items: center;
- justify-content: center;
- flex: 1;
- }
- .icon {
- height: auto;
- }
- .c {
- width: 41rpx;
- margin-right: 10rpx;
- }
- .s {
- width: 36rpx;
- }
- .t {
- width: 31rpx;
- }
- }
- }
- .container {
- padding: 0 0 100rpx;
- }
- .u-cell-icon {
- width: 36rpx;
- height: 36rpx;
- margin-right: 8rpx;
- }
- .slot-box {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- align-items: center;
- }
- .slot-image {
- /* #ifndef APP-NVUE */
- display: block;
- /* #endif */
- margin-right: 10px;
- width: 30px;
- height: 30px;
- }
- .slot-text {
- flex: 1;
- font-size: 14px;
- color: #4cd964;
- margin-right: 10px;
- }
- .img-container {
- margin-bottom: 0px;
- width: 100px;
- height: 100px;
- .note-image-box {
- margin-top: 0px;
- display: flex;
- flex-wrap: wrap;
- padding: 10px;
- .note-image-item {
- position: relative;
- width: 100%;
- height: 0;
- padding-top: 100%;
- box-sizing: border-box;
- // background-color: #18B566;
- .close-icon {
- display: flex;
- justify-content: center;
- align-items: center;
- position: absolute;
- right: 0px;
- top: 0px;
- width: 22px;
- height: 22px;
- border-radius: 50%;
- background-color: #d5d5d5;
- z-index: 2;
- }
- .image-box {
- display: flex;
- justify-content: center;
- align-items: center;
- position: absolute;
- top: 5px;
- right: 5px;
- border: 5px;
- left: 5px;
- border: 1px #eee solid;
- border-radius: 5px;
- overflow: hidden;
- width: 98%;
- height: 98%;
- }
- }
- }
- }
- .input-body {
- background-color: #fff;
- padding: 10px;
- }
- </style>
|