1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198 |
- <template>
- <view>
- <image src="https://cczdsz.cn/app/images/background.png" class="background"></image>
- <view class="project-content">
- <u-form :model="form" ref="form">
- <u-form-item label="用户名称" borderBottom ref="item1" labelWidth="140">
- <u-input v-model="form.userName" placeholder="请输入用户名称" ></u-input>
- </u-form-item>
- <u-form-item label="用户编号" borderBottom ref="item1" labelWidth="140">
- <u-input v-model="form.userNumber" placeholder="请输入用户编号" ></u-input>
- </u-form-item>
- <u-form-item label="用户类型" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.userType" >
- <u-radio @change="userType" v-for="(item, index) in typelist.users_type" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- <u-form-item label="安检时间" labelWidth="150" borderBottom ref="item1">
- <u-input v-model="form.securityCheckTime" borderBottom disabled
- @click="showtime2=true "></u-input>
- <u-picker v-model="showtime2" mode="time" :params="params" @confirm="time2()"></u-picker>
- </u-form-item>
- <view class="small-title">阀门井检查</view>
- <u-row gutter="12">
- <u-col>
- <u-form-item label="阀门外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.valveAppearance" >
- <u-radio @change="valveAppearance" v-for="(item, index) in typelist.exterior" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col>
- <u-col>
- <u-form-item label="开关是否灵敏有效" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.sensitives" >
- <u-radio @change="sensitives" v-for="(item, index) in typelist.sensitive" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- </u-col>
- <view class="small-title">调压箱检查</view>
- <u-col>
- <u-form-item label="类型" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.type" >
- <u-radio @change="type" v-for="(item, index) in typelist.box_type" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col>
- <u-form-item label="箱体外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.cabinetAppearance" >
- <u-radio @change="cabinetAppearance" v-for="(item, index) in typelist.exterior" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <view class="small-title">用气设施检查-锅炉及直燃机设备</view>
- <u-col>
- <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.boilerExterior" >
- <u-radio @change="boilerExterior" v-for="(item, index) in typelist.catering_status"
- :key="index" :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col>
- <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.boilerAppearance" >
- <u-radio @change="boilerAppearance" v-for="(item, index) in typelist.exterior" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <!-- <view class="small-title">用气设施检查-餐饮设施检查</view>
- <u-col>
- <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.cateringStatus" >
- <u-radio @change="cateringStatus" v-for="(item, index) in typelist.catering_status" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col>
- <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.cateringExterior" >
- <u-radio @change="cateringExterior" v-for="(item, index) in typelist.exterior"
- :key="index" :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col> -->
- <view class="small-title">用气设施检查-餐饮设施检查</view>
- <u-col>
- <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.cateringStatus" >
- <u-radio @change="cateringStatus" v-for="(item, index) in typelist.catering_status" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col>
- <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.cateringExterior" >
- <u-radio @change="cateringExterior" v-for="(item, index) in typelist.exterior"
- :key="index" :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <view class="small-title" style="font-size: 32rpx" >燃气管道及设施检查-管道(含公共管道)</view>
- <u-row>
- <u-col>
- <u-form-item label="管道(含公共管道)" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.pipeline" >
- <u-radio @change="pipeline" v-for="(item, index) in typelist.pipeline_type"
- :key="index" :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col>
- <u-form-item label="详情" borderBottom ref="item1" placeholder="请输入编号" labelWidth="120">
- <u-input v-model="form.pipelineLabel" length='20px' placeholder=" "
- type="digit" :clearable="false" @input="checkinletPressure"></u-input>
- </u-form-item>
- </u-col>
- </u-row>
- </u-row>
- <view class="small-title">燃气管道及设施检查-计量表具</view>
- <u-row>
- <u-col>
- <u-form-item label="计量表具" borderBottom ref="item1" placeholder="" labelWidth="200">
- <u-radio-group v-model="form.measuringInstruments" >
- <u-radio @change="measuringInstruments"
- v-for="(item, index) in typelist.measuring_instruments" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <view class="small-title">燃气管道及设施检查-连接管</view>
- <u-col>
- <u-form-item label="金属软管" borderBottom ref="item1" placeholder="" labelWidth="120" >
- <u-radio-group v-model="form.connectingPipe" >
- <u-radio @change="connectingPipe"
- v-for="(item, index) in typelist.connecting_pipe_metal_hose" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col>
- <u-form-item label="胶管,点火棒" borderBottom ref="item1" placeholder="" labelWidth="120" >
- <u-radio-group v-model="form.connectingPipeB" >
- <u-radio @change="connectingPipeB"
- v-for="(item, index) in typelist.connecting_pipe_metal_hose" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- </u-row>
- <view class="small-title">燃气管道及设施检查-凝水杠</view>
- <u-row gutter="12">
- <u-col span="12">
- <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号"
- >
- <u-radio-group v-model="form.condensateBar" >
- <u-radio @change="condensateBar"
- v-for="(item, index) in typelist.condensate_rod_appearance"
- :key="index" :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- </u-row>
- <view class="small-title">燃气管道及设施检查-有无私接私改</view>
- <u-row>
- <u-col>
- <u-form-item label="有无私接私改" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
- <u-radio-group v-model="form.receptionModification" >
- <u-radio @change="receptionModification"
- v-for="(item, index) in typelist.there_is_selflessness_and_private_reform"
- :key="index" :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <view class="small-title">安全设施检查-压力表</view>
- <u-col>
- <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
- <u-radio-group v-model="form.pressureStatus" >
- <u-radio @change="pressureStatus"
- v-for="(item, index) in typelist.pressure_gauge_operation" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <view class="small-title">安全设施检查-紧急切断阀</view>
- <u-col>
- <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
- <u-radio-group v-model="form.emergencyShut" >
- <u-radio @change="emergencyShut"
- v-for="(item, index) in typelist.emergency_shutoff_valve_appearance" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col>
- <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
- <u-radio-group v-model="form.emergencyShutB" >
- <u-radio @change="emergencyShutB"
- v-for="(item, index) in typelist.emergency_shutdown_valve_operation" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- </u-row>
- <view class="small-title">安全设施检查-安全阀</view>
- <u-row> </u-row>
- <u-col>
- <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
- <u-radio-group v-model="form.safetyValve" >
- <u-radio @change="safetyValve"
- v-for="(item, index) in typelist.safety_valve_appearance" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <view class="small-title">安全用气环境检查</view>
- <u-row gutter="12">
- <u-col span="8">
- <u-form-item label="流向标识" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.flowDirection" >
- <u-radio @change="flowDirection"
- v-for="(item, index) in typelist.yes_and_no" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col span="4">
- <u-form-item label=" " borderBottom ref="item1" placeholder="请输入编号" labelWidth="0">
- <u-input v-model="form.flowDirectionLabel" length='15px' placeholder="请输入"
- ></u-input>
- </u-form-item>
- </u-col>
- </u-row>
- <u-row gutter="12">
- <u-col span="8">
- <u-form-item label="有无易燃物" borderBottom ref="item1" placeholder="" labelWidth="160">
- <u-radio-group v-model="form.flammableMaterials" >
- <u-radio @change="flammableMaterials"
- v-for="(item, index) in typelist.yes_and_no" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col span="4">
- <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
- <u-input v-model="form.flammableMaterialsLabel" length='15px' placeholder="请输入"
- ></u-input>
- </u-form-item>
- </u-col>
- </u-row>
- <u-row gutter="12">
- <u-col span="8">
- <u-form-item label="有无占压" borderBottom ref="item1" placeholder="" labelWidth="140">
- <u-radio-group v-model="form.pressure" >
- <u-radio @change="pressure"
- v-for="(item, index) in typelist.yes_and_no" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col span="4">
- <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
- <u-input v-model="form.pressureLabel" length='15px' placeholder="请输入"
- ></u-input>
- </u-form-item>
- </u-col>
- </u-row>
- <u-row gutter="12">
- <u-col span="8">
- <u-form-item label="两气混用" borderBottom ref="item1" placeholder="" labelWidth="140">
- <u-radio-group v-model="form.mixingGases" >
- <u-radio @change="mixingGases"
- v-for="(item, index) in typelist.yes_and_no" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col span="4">
- <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
- <u-input v-model="form.mixingGasesLabel" length='15px' placeholder="请输入"
- ></u-input>
- </u-form-item>
- </u-col>
- </u-row>
- <u-row gutter="12">
- <u-col span="8">
- <u-form-item label="重物搭挂" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.heavyHanging" >
- <u-radio @change="heavyHanging"
- v-for="(item, index) in typelist.yes_and_no" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col span="4">
- <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
- <u-input v-model="form.heavyHangingLabel" length='15px' placeholder="请输入"
- ></u-input>
- </u-form-item>
- </u-col>
- </u-row>
- <u-row gutter="12">
- <u-col span="8">
- <u-form-item label="电线缠绕" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
- <u-radio-group v-model="form.wireTangle" >
- <u-radio @change="wireTangle"
- v-for="(item, index) in typelist.yes_and_no" :key="index"
- :name="item.dictValue">
- {{item.dictLabel}}
- </u-radio>
- </u-radio-group>
- </u-form-item>
- </u-col>
- <u-col span="4">
- <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
- <u-input v-model="form.wireTangleLabel" length='15px' placeholder="请输入"
- ></u-input>
- </u-form-item>
- </u-col>
- </u-row>
- <view class="small-title">其他</view>
- <u-row>
- <u-col>
- <u-form-item label=" " labelWidth="0" borderBottom ref="item1">
- <u-input v-model="form.other" type="textarea" borderBottom placeholder="请填写备注信息内容" maxlength="500"
- ></u-input>
- </u-form-item>
- </u-col>
- <u-col>
- <u-form-item label=" " labelWidth="0" borderBottom ref="item1">
- <u-input v-model="form.WarningColumnInformation" disabled placeholder="请上传照片"></u-input>
- <view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
- <image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
- style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"
- ></image>
- <view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
- <view v-if="item.type == 'image'">
- <image :src="item.url" mode=""
- style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"
- @click="showPhoto(index)">
- </image>
- </view>
- <view v-else>
- <video :src="item"
- style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"></video>
- </view>
- <view @click="remove(index)"
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
- <u-icon name="close" color="#FFFFFF" size="35" ></u-icon>
- </view>
- </view>
- </view>
- </u-form-item>
- </u-col>
- </u-row>
- </u-form>
- <u-button class="from-but" style="margin: 40rpx 0;" @click="save() " v-if="type!=1"
- type='primary'>确认上传</u-button>
- <!-- <u-button class="from-but" style="margin: 40rpx 0;" @click="update()" -->
- <!-- type='primary' v-else>确认修改</u-button>-->
- </view>
- </u-form>
- </view>
- </view>
- </template>
- <script>
- import service from '@/api/index.js'
- export default {
- data() {
- return {
- params: {
- year: true,
- month: true,
- day: true,
- hour: true,
- minute: true,
- second: false
- },
- showtime2:false,
- action: this.$HTTP.webUrl + `/obs`,
- headers: {
- MAuthorization: "wxBearer " + uni.getStorageSync('token')
- },
- url: [],
- showadministrativeOffice:false,
- uploading: false,
- imgArr: [],
- PhotoList: [],
- community: '',
- building: '',
- unit: '',
- imgymxs: [],
- progress: 0, //图片或视频上传百分比
- showxtv: false,
- showvalveWellCondition: false,
- form: {
- userType: 1,
- valveAppearance: 0,
- sensitives: 0,
- type: 0,
- cabinetAppearance: 0,
- boilerAppearance: 0,
- boilerExterior: 0,
- pipeline: 0,
- measuringInstruments: 0,
- cateringStatus: 0,
- cateringExterior: 0,
- connectingPipe: 1,
- connectingPipeB: 1,
- condensateBar: 1,
- receptionModification: 1,
- pressureStatus: 1,
- combustibleGas: 1,
- emergencyShut: 1,
- emergencyShutB: 1,
- safetyValve: 1,
- flowDirectionLabel: '',
- flowDirection: 0,
- flammableMaterials: 0,
- pressure: 0,
- mixingGases: 0,
- heavyHanging: 0,
- wireTangle: 0,
- securityCheckOne: 0,
- securityCheckTwo: 0,
- representative: 0,
- phone: '',
- flammableMaterialsLabel: '',
- pressureLabel: '',
- mixingGasesLabel: '',
- heavyHangingLabel: '',
- wireTangleLabel: ''
- },
- xtvLabel: null,
- valveWellConditioLabel: null,
- // 表单校验
- communityName: '',
- communityId:'',
- time: '',
- showrepairType: false,
- showrepairType: null,
- checked: true,
- typelist: {},
- dictlist: ['yes_and_no','exterior','sensitive','box_type','pipeline_type','measuring_instruments',
- 'catering_status','other_operating_conditions','other_appearance','pressure_gauge_operation','alarm_operation_a','alarm_operation_b',
- 'emergency_shutoff_valve_appearance','emergency_shutdown_valve_operation','safety_valve_appearance','users_type','pressure_regulator_check_type'
- ,'pipelines_include_public_pipelines','measuring_instrument','connecting_pipe_metal_hose','connect_the_tube_the_glue_tube_ignition_rod','condensate_rod_appearance'
- ,'there_is_selflessness_and_private_reform'
- ],
- type: 2,
- id: null,
- AdministrativeOfficeList:[],
- AdministrativeOfficeLabel:null,
- userId:null,createBy:null,
- administrativeOffice:null,
- code:null,
- name:null,
- showBoxDetails:false,
- managementOfficeId:null,
- boxform:{},
- pressureRegulatingBoxDetailsBo:{},
- team:null
- }
- },
- // onReady() {
- // uni.setNavigationBarTitle({
- // title: '调压箱表单'
- // });
- // },
- showPhoto(index) {
- uni.previewImage({
- current: index,
- urls: this.imgArr,
- })
- },
- showPhotos(index) {
- uni.previewImage({
- current: index,
- urls: this.photo,
- })
- },
- onLoad(e) {
- uni.setNavigationBarTitle({
- title: '非居民用户'
- });
- uni.setNavigationBarColor({
- frontColor: '#ffffff',
- backgroundColor: '#2d95f4',
- })
- let time1 = new Date()
- console.log(time1.toLocaleString())
- var year = time1.getFullYear(); //得到年份
- var month = time1.getMonth() + 1; //得到月份
- var date = time1.getDate(); //得到日期
- var hours = time1.getHours(); //获取系统时
- var Min = time1.getMinutes(); //分
- this.type = e.type
- this.id = e.id
- this.managementOfficeId=e.managementOfficeId
- this.time = year + "/" + month + "/" + date + "-" + hours + ":" + Min
- this.getdictsysinfo()
- this.getUserName()
- //this.getAdministrativeOffice(this.userId)
- },
- methods: {
- time2(e) {
- console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
- this.form.securityCheckTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
- },
- checkinletPressure(e) {
- console.log(e)
- //正则表达试
- e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- //重新赋值给input
- this.$nextTick(() => {
- this.form.inletPressure= e
- })
- },
- checkexportPressureMain(e) {
- console.log(e)
- //正则表达试
- e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- //重新赋值给input
- this.$nextTick(() => {
- this.form.exportPressureMain= e
- })
- },
- checkclosingPressureAccessory(e) {
- console.log(e)
- //正则表达试
- e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- //重新赋值给input
- this.$nextTick(() => {
- this.form.closingPressureAccessory= e
- })
- },
- checkexportPressureAccessory(e) {
- console.log(e)
- //正则表达试
- e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- //重新赋值给input
- this.$nextTick(() => {
- this.form.exportPressureAccessory= e
- })
- },
- checkclosingPressureMain(e) {
- console.log(e)
- //正则表达试
- e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- //重新赋值给input
- this.$nextTick(() => {
- this.form.closingPressureMain= e
- })
- },
- checkcutOffPressureMain(e) {
- console.log(e)
- //正则表达试
- e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- //重新赋值给input
- this.$nextTick(() => {
- this.form.cutOffPressureMain= e
- })
- },
- checkcutOffPressureAccessory(e) {
- console.log(e)
- //正则表达试
- e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- //重新赋值给input
- this.$nextTick(() => {
- this.form.cutOffPressureAccessory= e
- })
- },
- checkreleasePressure(e) {
- console.log(e)
- //正则表达试
- e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- //重新赋值给input
- this.$nextTick(() => {
- this.form.releasePressure= e
- })
- },
- getUserName(){
- service.getUserName().then(res=>{
- this.userId=res.id
- this.createBy=res.name
- this.team=res.ranks
- //this.getAdministrativeOffice(res.id)
- console.log(this.communityName)
- })
- },
- getdictsysinfo() {
- let _this = this
- service.getDictInfoList({
- type: this.dictlist
- }).then(res => {
- _this.typelist = res
- if (this.type == 1) {
- service.getpipelineGasUser(this.id).then(res => {
- // this.communityName = res.name
- // this.time = res.createTime
- if (null != res.photoList) {
- res.photoList.forEach(item => {
- let url = {}
- url.url = item
- url.type = 'image'
- this.imgymxs.push(url)
- this.imgArr.push(item)
- })
- }
- // let list = []
- // list = _this.typelist.xtv
- // list.forEach((item) => {
- // if (item.dictValue == res.xtv) {
- // _this.xtvLabel = item.dictLabel
- // }
- // })
- // let list2 = []
- // list2 = _this.typelist.valve_well_condition
- // list2.forEach((item) => {
- // if (item.dictValue == res.valveWellCondition) {
- // _this.valveWellConditioLabel = item.dictLabel
- // }
- // })
- // let list3 = []
- // list3 = _this.typelist.administrative_office
- // list3.forEach((item) => {
- // if (item.dictValue == res.administrativeOffice) {
- // _this.AdministrativeOfficeLabel = item.dictLabel
- // }
- // })
- this.form = res
- // this.managementOfficeId=this.form.parentId
- })
- console.log(res)
- }
- })
- },
- //外观
- userType(e) {
- this.$refs.form.userType = e
- console.log(e)
- },
- valveAppearance(e)
- {
- this.$refs.form.valveAppearance = e
- console.log(e)
- },
- sensitives(e)
- {
- this.$refs.form.sensitives = e
- console.log(e)
- },
- type(e)
- {
- this.$refs.form.type = e
- console.log(e)
- },
- //方砖
- boilerExterior(e) {
- this.$refs.form.boilerExterior = e
- console.log(e)
- },
- //护栏
- boilerAppearance(e) {
- this.$refs.form.boilerAppearance = e
- console.log(e)
- },
- //基础
- cateringStatus(e) {
- this.$refs.form.cateringStatus = e
- console.log(e)
- },
- //压力表
- cateringExterior(e) {
- this.$refs.form.cateringExterior = e
- console.log(e)
- },
- //阀门
- pipeline(e) {
- this.$refs.form.pipeline = e
- console.log(e)
- },
- //调压器
- measuringInstruments(e) {
- this.$refs.form.measuringInstruments = e
- console.log(e)
- },
- connectingPipe(e)
- {
- this.$refs.form.connectingPipe = e
- console.log(e)
- },
- //切断器(放散阀)测试情况
- connectingPipeB(e) {
- this.$refs.form.connectingPipeB = e
- console.log(e)
- },
- condensateBar(e)
- {
- this.$refs.form.condensateBar = e
- console.log(e)
- },
- //过滤器
- receptionModification(e) {
- this.$refs.form.receptionModification = e
- console.log(e)
- },
- pressureStatus(e)
- {
- this.$refs.form.pressureStatus = e
- console.log(e)
- },
- emergencyShut(e) {
- this.$refs.form.emergencyShut = e
- console.log(e)
- },
- emergencyShutB(e) {
- this.$refs.form.emergencyShutB = e
- console.log(e)
- },
- safetyValve(e) {
- this.$refs.form.safetyValve = e
- console.log(e)
- },
- flowDirection(e) {
- this.$refs.form.flowDirection = e
- // this.form.xtv = e[0].value
- // this.xtvLabel = e[0].label
- // console.log(this.xtvLabel)
- },
- flammableMaterials(e)
- {
- this.$refs.form.flammableMaterials = e
- console.log('11111',e)
- },
- pressure(e)
- {
- this.$refs.form.pressure = e
- console.log('11111',e)
- },
- mixingGases(e)
- {
- this.$refs.form.mixingGases = e
- console.log('11111',e)
- },
- heavyHanging(e)
- {
- this.$refs.form.heavyHanging = e
- console.log('11111',e)
- },
- wireTangle(e)
- {
- this.$refs.form.wireTangle = e
- console.log('11111',e)
- },
- update()
- {
- let _this = this
- this.form.processStatus = -1
- // if(this.imgArr.length==0)
- // {
- // this.$UTILS.showPrompt('请上传照片或视频!')
- // return
- // }
- this.form.photoList = this.imgArr
- this.form.team=this.team
- // this.form.unitId = this.unit
- // this.form.areaId = this.id
- // this.form.userId=this.userId
- // this.form.createBy=this.userId
- // this.form.name=this.name
- // this.form.administrativeOffice=this.administrativeOffice
- // this.form.code=this.code
- // this.form.name=this.name
- // this.form.number=this.code
- service.updatepipelineGasUser(this.form).then(res => {
- console.log(res)
- _this.$UTILS.showPrompt('修改成功!')
- // setTimeout(() => {
- // console.log('跳')
- // uni.switchTab({
- // url: '/pages/index/index'
- // })
- // }, 2000)
- // this.form={businessService:0,
- // administrativeOffice:0,
- // businessService:0,
- // isNotXtv:0,
- // appearance:0,
- // squareBrick:0,
- // foundation:0,
- // pressureGage:0,
- // valve:0,
- // isThereALeak:0,
- // voltageRegulator:0,
- // xtv:0,
- // thermostat:0,
- // explosionProofSwitch:0,
- // cutterTested:0,
- // manOfAccessoryAlternating:0,
- // filter:0,
- // specialCaseOfPressureRegulatingFacilities:0,
- // overdueInspectionDays:3,
- // valveWellTesting:true,
- // guardrail:0}
- // this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
- // this.valveWellConditioLabel=''
- // this.xtvLabel=''
- // this.valveWellConditioLabel=''
- // //this.AdministrativeOfficeLabel=''
- // this.form.administrativeOffice=this.administrativeOffice
- // this.form.number=this.code
- // this.imgArr=[]
- // this.imgymxs=[]
- })
- },
- save() {
- let _this = this
- // if(this.imgArr.length==0)
- // {
- // this.$UTILS.showPrompt('请上传照片或视频!')
- // return
- // }
- this.form.photoList = this.imgArr
- // this.form.unitId = this.unit
- // this.form.areaId = this.id
- this.form.userId=this.userId
- this.form.createBy=this.userId
- this.form.team=this.team
- // this.form.parentId=this.managementOfficeId
- // this.form.name=this.name
- // this.form.administrativeOffice=this.administrativeOffice
- // this.form.code=this.code
- // this.form.name=this.name
- // this.form.number=this.code
- service.setpipelineGasUser(this.form).then(res => {
- console.log(res)
- _this.$UTILS.showPrompt('上报成功!')
- // setTimeout(() => {
- // console.log('跳')
- // uni.switchTab({
- // url: '/pages/index/index'
- // })
- // }, 2000)
- this.form={
- userType: 1,
- valveAppearance: 0,
- sensitives: 0,
- type: 0,
- cabinetAppearance: 0,
- boilerAppearance: 0,
- boilerExterior: 0,
- pipeline: 0,
- measuringInstruments: 0,
- cateringStatus: 0,
- cateringExterior: 0,
- connectingPipe: 1,
- connectingPipeB: 1,
- condensateBar: 1,
- receptionModification: 1,
- pressureStatus: 1,
- combustibleGas: 1,
- emergencyShut: 1,
- emergencyShutB: 1,
- safetyValve: 1,
- flowDirectionLabel: '',
- flowDirection: 0,
- flammableMaterials: 0,
- pressure: 0,
- mixingGases: 0,
- heavyHanging: 0,
- wireTangle: 0,
- securityCheckOne: 0,
- securityCheckTwo: 0,
- representative: 0,
- phone: '',
- flammableMaterialsLabel: '',
- pressureLabel: '',
- mixingGasesLabel: '',
- heavyHangingLabel: '',
- wireTangleLabel: ''}
- // this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
- // this.valveWellConditioLabel=''
- // this.xtvLabel=''
- // this.valveWellConditioLabel=''
- // //this.AdministrativeOfficeLabel=''
- // this.form.administrativeOffice=this.administrativeOffice
- // this.form.parentId=this.managementOfficeId
- // this.form.number=this.code
- // this.imgArr=[]
- // this.imgymxs=[]
- })
- },
- choose() {
- let _this = this;
- uni.showActionSheet({
- title: '上传',
- itemList: ['图片', '视频'],
- success: (res) => {
- // console.log(res)
- if (res.tapIndex == 0) {
- this.chooseimage()
- } else {
- this.choosevideo()
- }
- }
- })
- },
- showPhoto(index) {
- uni.previewImage({
- current: index,
- urls: this.imgArr,
- })
- },
- showPhotos(index) {
- uni.previewImage({
- current: index,
- urls: this.photo,
- })
- },
- chooseimage() {
- console.log('图片')
- let _this = this;
- uni.chooseImage({
- sourceType: ['camera'],
- success(resp) {
- console.log('res--uni.chooseMedia', resp);
- resp.tempFiles.forEach((item, index) => {
- const task = uni.uploadFile({
- url: _this.$HTTP.webUrl + `/obs`,
- filePath: item.path,
- name: 'file',
- formData: {},
- header: _this.headers,
- success: res => {
- // 判断是否json字符串,将其转为json格式
- let data = _this.$u.test.jsonString(res.data) ? JSON.parse(
- res.data) : res.data;
- if (![200, 201, 204].includes(res.statusCode)) {
- // this.uploadError(index, data);
- _this.$UTILS.showPrompt('选取失败!')
- } else {
- // 上传成功
- // this.lists[index].response = data;
- // this.lists[index].progress = 100;
- // this.lists[index].error = false;
- // this.$emit('on-success', data, index, this.lists, this
- // .index);
- if (_this.progress === 100) {
- // console.log('_this.progress', _this.progress)
- // console.log('data----', data)
- // console.log('res--', res)
- _this.imgymxs.push({
- url: data.data.url,
- type: 'image'
- })
- _this.imgArr.push(data.data.url)
- // console.log('imgArr', _this.imgArr)
- _this.$UTILS.showPrompt('选取成功!')
- }
- }
- },
- fail: e => {
- _this.$UTILS.showPrompt('选取失败!')
- this.uploadError(index, e);
- },
- complete: res => {
- _this.uploading = false;
- // _this.uploadFile(index + 1);
- // this.$emit('on-change', res, index, this.lists, this
- // .index);
- }
- });
- task.onProgressUpdate(res => {
- // if (res.progress > 0) {
- // this.lists[index].progress = res.progress;
- // this.$emit('on-progress', res, index, this.lists, this.index);
- // }
- _this.progress = res.progress;
- console.log('onProgressUpdate', res)
- uni.showLoading({
- title: '选取中'
- })
- });
- })
- },
- })
- },
- choosevideo() {
- let _this = this;
- console.log('视频')
- uni.chooseVideo({
- sourceType: ['camera'],
- maxDuration: 30,
- success(resp) {
- const task = uni.uploadFile({
- url: _this.$HTTP.webUrl + `/obs`,
- filePath: resp.tempFilePath,
- name: 'file',
- formData: {},
- header: _this.headers,
- success: res => {
- // 判断是否json字符串,将其转为json格式
- let data = _this.$u.test.jsonString(res.data) ? JSON.parse(res.data) :
- res.data;
- if (![200, 201, 204].includes(res.statusCode)) {
- this.uploadError(index, data);
- } else {
- // 上传成功
- // this.lists[index].response = data;
- // this.lists[index].progress = 100;
- // this.lists[index].error = false;
- // this.$emit('on-success', data, index, this.lists, this
- // .index);
- if (_this.progress === 100) {
- console.log('_this.progress', _this.progress)
- console.log('data----', data)
- console.log('res--', res)
- // _this.imgArr.push(data.data.url)
- _this.imgymxs.push({
- url: data.data.url,
- type: 'video'
- })
- _this.imgArr.push(data.data.url)
- console.log('imgArr', _this.imgArr)
- _this.$UTILS.showPrompt('选取成功!')
- }
- }
- },
- fail: e => {
- _this.$UTILS.showPrompt('选取失败!')
- this.uploadError(index, e);
- },
- complete: res => {
- uni.hideLoading();
- _this.uploading = false;
- // _this.uploadFile(index + 1);
- // this.$emit('on-change', res, index, this.lists, this
- // .index);
- }
- });
- task.onProgressUpdate(res => {
- // if (res.progress > 0) {
- // this.lists[index].progress = res.progress;
- // this.$emit('on-progress', res, index, this.lists, this.index);
- // }
- _this.progress = res.progress;
- console.log('onProgressUpdate', res)
- uni.showLoading({
- title: '选取中'
- })
- });
- },
- })
- },
- remove(index) {
- uni.showModal({
- title: '提示',
- content: '是否删除该图片或视频?',
- success: (res) => {
- if (res.confirm) {
- this.imgArr.splice(index, 1);
- this.imgymxs.splice(index, 1);
- console.log('this.imgArr', this.imgArr)
- }
- }
- })
- },
- }
- }
- </script>
- <style>
- .project-content {
- padding: 0rpx 20rpx;
- border-radius: 20rpx;
- width: 90%;
- margin: 0 auto;
- background: #fff;
- }
- .background {
- z-index: -1;
- position: fixed;
- width: 100%;
- height: 100%;
- background-size: 100% 100%;
- }
- .top-left {
- display: flex;
- align-items: center;
- }
- .small-title {
- font-size: 38rpx;
- color: #2d95f4;
- margin: 20rpx 0;
- }
- .form-item {
- display: flex;
- align-items: center;
- font-size: 32rpx;
- border: none;
- }
- .danwei {
- text-align: center;
- line-height: 110rpx;
- }
- .un-row {
- text-align: left;
- }
- .top {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .top-icon {
- font-size: 40rpx;
- color: #2d95f4;
- }
- </style>
|