startChecking.vue 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315
  1. <!-- 开始检查 -->
  2. <template>
  3. <view id="startChecking">
  4. <!--选择检查实验室-->
  5. <view class="startCheckingPage" v-if="pageType == 1">
  6. <view class="startCheckingPage-top-box">
  7. <view class="item-picker-box">
  8. <view class="name-p">房间号</view>
  9. <view class="span-p">*</view>
  10. <view class="picker-big-box">
  11. <view class="picker-box">
  12. <input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.fjNumber" placeholder="请选择房间">
  13. <view class="img-box" @click.stop="saoCode">
  14. <img src="@/images/Version2.2/icon_aqjc_sm.png">
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="item-picker-box">
  20. <view class="name-p">实验楼</view>
  21. <view class="span-p"></view>
  22. <view class="picker-big-box">
  23. <view class="picker-box picker-back">
  24. <input class="picker-text" type="text" disabled maxlength="11" v-model="form.buildingName" placeholder="选择房间后自动匹配">
  25. </view>
  26. </view>
  27. </view>
  28. <view class="item-picker-box">
  29. <view class="name-p">实验室</view>
  30. <view class="span-p"></view>
  31. <view class="picker-big-box">
  32. <view class="picker-box picker-back">
  33. <input class="picker-text" type="text" disabled maxlength="11" v-model="form.laboratoryName" placeholder="选择房间后自动匹配">
  34. </view>
  35. </view>
  36. </view>
  37. <view class="item-picker-box">
  38. <view class="name-p">负责人</view>
  39. <view class="span-p"></view>
  40. <view class="picker-big-box">
  41. <view class="picker-box picker-back">
  42. <input class="picker-text" type="text" disabled maxlength="11" v-model="form.fzrName" placeholder="选择房间后自动匹配">
  43. </view>
  44. </view>
  45. </view>
  46. <view class="item-picker-box">
  47. <view class="name-p">联系方式</view>
  48. <view class="span-p"></view>
  49. <view class="picker-big-box">
  50. <view class="picker-box">
  51. <input class="picker-text" type="number" maxlength="11" v-model="form.fzrLxfs" placeholder="请输入联系方式">
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="startCheckingPage-bottom-button" @click="goButton(2)">确定</view>
  57. </view>
  58. <!--录入检查项-->
  59. <view class="check-item-page" v-if="pageType == 2">
  60. <!--录入检查项-->
  61. <view class="user-info-box" @click="goButton(1)">
  62. <view class="user-info-left">
  63. <view class="user-info-min-box">
  64. <img src="@/images/Version2.2/icon_aqjc_sysxx.png">
  65. <view>实验室信息</view>
  66. <view>{{form.laboratoryName}}</view>
  67. </view>
  68. <view class="user-info-min-box">
  69. <img src="@/images/Version2.2/icon-aqjc_fzr.png">
  70. <view>实验室负责人</view>
  71. <view>{{form.fzrName}}</view>
  72. </view>
  73. </view>
  74. <img class="user-info-right" src="@/images/icon_04.png">
  75. </view>
  76. <view class="check-for-max-box" v-if="minPageType == 1">
  77. <view class="check-for-big-box" v-for="(item,index) in form.detailsList" :key="index">
  78. <view class="check-for-button-max-box">
  79. <view class="left-title-p">检查项:</view>
  80. <uni-data-picker :ellipsis="false" :localdata="checkOptionList[index]" :map="{text:'name',value:'id'}"
  81. popup-title="请选择所属目录" @change="(e)=>onchange(e,index)" @nodeclick="onnodeclick"
  82. ref="uniDataPicker" :addType="true" :addIndex="index">
  83. <view class="button-text-p">{{item.jcxName?item.jcxName:'请选择检查项'}}</view>
  84. </uni-data-picker>
  85. </view>
  86. <view class="check-for-button-add-p" @click="dialogClick(index)"> 手动添加检查项 </view>
  87. <view class="check-for-img-max-box">
  88. <view class="left-title-p">隐患图片:</view>
  89. <view class="right-img-box">
  90. <view class="img-box" v-for="(imgUrl,imgIndex) in item.yhImg" :key="imgIndex">
  91. <img class="img-data" :src="configURL+imgUrl">
  92. <img class="position-img" src="@/images/icon_ssp_closure.png" @click="delImg(index,imgIndex)">
  93. </view>
  94. <img class="add-button" src="@/images/icon_07.png" @click="selectImage(item)" v-if="item.yhImg.length<5">
  95. </view>
  96. </view>
  97. <view class="check-for-input-max-box">
  98. <view class="left-title-p">隐患描述:</view>
  99. <textarea type="text" v-model="item.yhMs" maxlength="50" placeholder="请输入问题描述"></textarea>
  100. </view>
  101. <view class="voice">
  102. <view class="voice_t">语音备注:</view>
  103. <view class="voice_b" v-for="(voiceItem,voiceIndex) in item.voice" :key="voiceIndex">
  104. <view class="voice_b_l" @tap="voicePlay(voiceItem.url)"><img class="add-button" src="@/images/icon_yyt.png"/>{{voiceItem.times}}″</view>
  105. <img class="voice_b_r" src="@/images/Version2.3/icon_sczl_sc.png" @tap="voiceDele(index,voiceIndex)"/>
  106. </view>
  107. </view>
  108. <view class="broadcast_m">
  109. <view class="broadcast_m_t" :class="liveType?'broadcast_m_t_back_a':'broadcast_m_t_back_b'" @longpress.stop="recordButton(item,$event)" @touchmove.stop="cancelButton" @touchend.stop="sendButton(item,$event)">
  110. {{liveType?'松开发送':'按住说话'}}
  111. </view>
  112. </view>
  113. <view class="check-for-big-box-position-img-box"
  114. v-if="form.detailsList.length>1"
  115. @click="delDetailsList(index)">
  116. <img src="@/images/icon_ssp_closure.png">
  117. </view>
  118. </view>
  119. </view>
  120. <view class="add-for-item-p" @click="addDanger" v-if="minPageType == 1">+ 新增隐患项</view>
  121. <view class="check-button-box-one" v-if="minPageType == 1" @click="goMinButton(2)">下一步</view>
  122. <!--检查项详情-->
  123. <view class="danger-list-box" v-if="minPageType == 2" @click="goMinButton(1)">
  124. <img class="danger-list-left-img" src="@/images/Version2.2/icon_aqjc_yhsl.png">
  125. <view class="danger-list-left-text">隐患数量</view>
  126. <view class="danger-list-left-num">{{form.detailsList.length}}</view>
  127. <img class="danger-list-right-img" src="@/images/icon_04.png">
  128. </view>
  129. <view class="danger-title-text-p" v-if="minPageType == 2">整改选项</view>
  130. <view class="danger-info-picker-max-box" v-if="minPageType == 2">
  131. <view class="danger-info-picker-box">
  132. <view class="danger-info-picker-title">截止时间</view>
  133. <picker mode="date" @change="deadlineChange">
  134. <input class="picker-text" disabled type="text" v-model="deadline" placeholder="请选择截止时间">
  135. </picker>
  136. </view>
  137. <view class="danger-info-picker-box">
  138. <view class="danger-info-picker-title">整改类型</view>
  139. <picker @change="rectificationTypeChange" :range="rectificationTypeArray">
  140. <input class="picker-text" disabled type="text" v-model="rectificationType" placeholder="请选择整改类型">
  141. </picker>
  142. </view>
  143. <view class="danger-info-picker-box">
  144. <view class="danger-info-picker-title">检查单位</view>
  145. <picker @change="inspectionUnitChange" :range="inspectionUnitArray">
  146. <input class="picker-text" disabled type="text" v-model="inspectionUnit" placeholder="请选择检查单位">
  147. </picker>
  148. </view>
  149. </view>
  150. <!-- 检查名称弹窗 -->
  151. <uni-popup ref="popup" class="inspect_name" type="bottom">
  152. <view class="popup-content">
  153. <view class="inspect_name_t">
  154. <view class="inspect_name_t_l">检查名称:</view>
  155. <input type="text" v-model="form.checkName" maxlength="20" placeholder="请输入检查名称"/>
  156. </view>
  157. <view class="inspect_name_b" @click="releaseFun()">发布</view>
  158. </view>
  159. </uni-popup>
  160. <view class="check-button-box" v-if="minPageType == 2">
  161. <view @click="upDataClick(1)">保存草稿</view>
  162. <view @click="upDataClick(2)">提交检查</view>
  163. </view>
  164. </view>
  165. <!--搜索项-->
  166. <view class="search-max-box" v-if="pageType == 3">
  167. <view class="search-top-input-box">
  168. <input type="text" maxlength="14" placeholder="请输入检查项关键字" @confirm="inputSearch">
  169. </view>
  170. <scroll-view scroll-y @scrolltolower="inputSearch" class="scroll-box">
  171. <view class="search-for-box" v-for="(item,index) in searchList" :key="index">
  172. <view>{{item.name}}</view>
  173. <view>{{item.text}}</view>
  174. </view>
  175. <view class="search-add-item" v-if="searchList[0]">
  176. <view>没有找到对应的检查项</view>
  177. <view>手动添加 >></view>
  178. </view>
  179. <view class="search-null-box" v-if="searchNullType">
  180. <img src="@/images/Version2.2/icon_xzwt_kzt.png">
  181. <view>没有找到对应的问题~</view>
  182. <view>手动添加</view>
  183. </view>
  184. </scroll-view>
  185. </view>
  186. <!-- 添加项 -->
  187. <view class="add-search-max-box" v-if="open">
  188. <view class="add-search-min-box">
  189. <view class="add-search-box">
  190. <view class="add-search-title">检查项名称</view>
  191. <textarea class="add-search-input" type="text" v-model="examinationForm.name" maxlength="30" placeholder="请输入问题名称"></textarea>
  192. </view>
  193. <view class="add-search-box">
  194. <view class="add-search-title">所属目录</view>
  195. <uni-data-picker :ellipsis="false" :localdata="checkOptionListExamination" :map="{text:'name',value:'id'}"
  196. popup-title="请选择所属目录" @change="onchangeTwo" @nodeclick="onnodeclickTwo" >
  197. <view class="add-search-picker">{{examinationForm.value?examinationForm.value:'请选择所属目录'}}</view>
  198. </uni-data-picker>
  199. </view>
  200. </view>
  201. <view class="add-search-button">
  202. <view @click="dialogClickOff">返回</view>
  203. <view @click="addPopupTwoButtonClick">立即添加</view>
  204. </view>
  205. </view>
  206. <!-- 房间选择弹出层 -->
  207. <view class="popup-max-box" v-if="popupType">
  208. <view class="popup-null" @click="popupClick(2)"></view>
  209. <view class="popup-big-box">
  210. <view class="popup-input-box">
  211. <input type="text" maxlength="10" v-model="room" placeholder="请输入房间号">
  212. <view @click="getSelectInfoByRoom">搜索</view>
  213. </view>
  214. <view class="popup-for-max-box">
  215. <view class="popup-for-null" v-if="!roomList[0]">暂无数据</view>
  216. <view class="popup-for-box" v-for="(item,index) in roomList" :key="index">
  217. <view class="name-p">{{item.name}} ({{item.room}})</view>
  218. <view class="button-p" @click="popupClickItem(item)">确定</view>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. <!-- 联级选择器(废弃) -->
  224. <!-- <view class="popup-max-box-two" v-if="popupTwoType">
  225. <view class="popup-null" @click="popupTwoClick(2)"></view>
  226. <view class="popup-big-box">
  227. <view class="popup-two-title-box">检查项</view>
  228. <view class="popup-position-right" @click="popupTypeClick">{{isLingshi == 0?'手动添加':'选择已有'}}</view>
  229. <view class="popup-add-name-box" v-if="isLingshi == 1">
  230. <view>检查项名称:</view>
  231. <input type="text" v-model="addPopupName" placeholder="请输入检查项名称" maxlength="50">
  232. </view>
  233. <view class="popup-top-box">
  234. <view v-if="!popupTopList[0]" style="text-align: center;color:#999;">{{isLingshi == 0?'请选择检查项':'请选择所属目录'}} </view>
  235. <view @click="popupTwoMinItemClick(item,index)" :class="index==popupIndex?'view-inline-block-color':''" v-for="(item,index) in popupTopList" :key="index">{{index==0?item.name:'/'+item.name}}</view>
  236. </view>
  237. <view class="popup-for-max-box">
  238. <view class="popup-for-box" v-for="(item,index) in popupBottomList" :key="index">
  239. <img v-if="item.id == popupMinIndex" class="left-img" src="@/images/icon_6.png">
  240. <img v-if="item.id != popupMinIndex" class="left-img" src="@/images/icon_5.png">
  241. <view class="center-view" @click="popupTwoItemClick(item)">{{item.name}}</view>
  242. <view class="right-img-box" @click="popupTwoImgClick(item)">
  243. <img v-if="item.children" class="right-img" src="@/images/icon_04.png">
  244. </view>
  245. </view>
  246. </view>
  247. <view class="popup-button" @click="popupTwoButtonClick" v-if="isLingshi == 0"
  248. :class="popupMinIndex?'popup-button-colorA':'popup-button-colorB'">确定</view>
  249. <view class="popup-button" @click="addPopupTwoButtonClick" v-if="isLingshi == 1"
  250. :class="popupMinIndex&&addPopupName?'popup-button-colorA':'popup-button-colorB'">添加</view>
  251. </view>
  252. </view> -->
  253. </view>
  254. </template>
  255. <script>
  256. const myaudio = uni.createInnerAudioContext();
  257. import { config } from '@/api/request/config.js'
  258. import { checkRecordAddC,checkRecordAdd,getSelectInfoByRoom, checkOptionList, treeselect,treeDepselect, addTempCheckOption,recordDettailsList,checkRecordUpdate } from '@/api/index.js'
  259. export default {
  260. name: "startChecking",
  261. data() {
  262. return {
  263. configURL:config.base_url,
  264. id:"",
  265. submitStatus:null,
  266. //当前隐患
  267. popupTwoIndex:"",
  268. //新增项or固有
  269. isLingshi:0,
  270. //新增名称
  271. addPopupName:"",
  272. //联级选择器
  273. popupTwoType:false,
  274. popupTopList:[],
  275. popupBottomList:[],
  276. popupIndex:0,
  277. popupMinIndex:"",
  278. popupIndexType:true,
  279. popupData1:{},
  280. popupData2:{},
  281. popupData3:{},
  282. popupData4:{},
  283. //房间弹层 状态
  284. popupType:false,
  285. //房间搜索字段
  286. room:"",
  287. roomList:[],
  288. //页面状态
  289. pageType:1,
  290. //页面子状态
  291. minPageType:1,
  292. //数据
  293. form:{
  294. checkName:'',//检查名称
  295. fjNumber:"",
  296. buildingId:"",
  297. buildingName:"",
  298. laboratoryId:"",
  299. laboratoryName:"",
  300. fzrId:"",
  301. fzrName:"",
  302. fzrLxfs:"",
  303. jcDw:"",
  304. detailsList:[
  305. {
  306. isLingshi:0,
  307. yhImg:[],
  308. voice:[],//语音备忘存储
  309. yhMs:"",
  310. jcxId:"",
  311. jcxName:"",
  312. }
  313. ],
  314. },
  315. //检查项
  316. userData:{
  317. name:"第一教学楼-101号",
  318. userName:"刘轩宇"
  319. },
  320. //检查列表项
  321. forDataList:[
  322. {
  323. dangerImg:[],
  324. dangerText:"",
  325. dangerId:"",
  326. dangerName:"请选择对应检查项",
  327. }
  328. ],
  329. //检查详情选项数据
  330. deadline:"",
  331. rectificationType:"",
  332. rectificationTypeArray:['一般整改','重大整改'],
  333. inspectionUnit:"",
  334. inspectionUnitArray:[],
  335. inspectionUnitArrayData:[],
  336. //搜索回调列表
  337. searchList:[
  338. // {
  339. // name:"检查项名称",
  340. // text:"一级检查项名称内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
  341. // },
  342. // {
  343. // name:"检查项名称",
  344. // text:"一级检查项名称内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
  345. // },
  346. // {
  347. // name:"检查项名称",
  348. // text:"一级检查项名称内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
  349. // },
  350. ],
  351. searchNullType:true,
  352. //检查项
  353. checkOptionList:[],
  354. checkOptionListExamination:[],
  355. //新增检查项
  356. openIndex:"",
  357. open:false,
  358. examinationForm:{
  359. name:"",
  360. value:"",
  361. idList:"",
  362. },
  363. jcxSstkMs:[],
  364. jcxSstkNum:'',
  365. //临时数据组
  366. temporaryIdList:[],
  367. //添加项 目录
  368. uniPicker:"请选择所属目录",
  369. //滑动记录
  370. startPoint:{},
  371. liveType:false,
  372. sendLock: true, //发送锁,当为true时上锁,false时解锁发送
  373. recorderManager : wx.getRecorderManager(),
  374. temporaryData:[],
  375. }
  376. },
  377. onLoad(option) {
  378. this.getCheckOptionListTwo();
  379. this.treeselect();
  380. if(option.id){
  381. this.id = option.id;
  382. this.getInfo();
  383. }else{
  384. this.getCheckOptionList();
  385. }
  386. },
  387. onShow() {
  388. },
  389. methods: {
  390. //语音备忘播放
  391. async voicePlay(item){
  392. myaudio.src = config.base_url+item;
  393. myaudio.play();
  394. },
  395. //语音备忘删除
  396. async voiceDele(index,voiceIndex){
  397. let self = this;
  398. uni.showModal({
  399. title: '',
  400. cancelColor:'#999999',
  401. confirmColor:'#FF6E6E',
  402. content: '确定删除此语音吗?',
  403. success (res) {
  404. if (res.confirm) {
  405. console.log('用户点击确定')
  406. self.form.detailsList[index].voice.splice(voiceIndex,1);
  407. self.$forceUpdate();
  408. } else if (res.cancel) {
  409. console.log('用户点击取消')
  410. }
  411. }
  412. })
  413. },
  414. //录制
  415. recordButton(item,e){
  416. console.log("按下")
  417. let self = this;
  418. if(item.voice.length>=5){
  419. uni.showToast({
  420. title: '语音备忘最多只能上传5条',
  421. icon:"none",
  422. mask:true,
  423. duration: 2000
  424. });
  425. return
  426. }
  427. this.liveType=true;
  428. console.log('录制',e)
  429. this.startPoint = e.touches[0];//记录长按时开始点信息,后面用于计算上划取消时手指滑动的距离。
  430. const options = {
  431. duration: 60000,
  432. sampleRate: 16000,
  433. numberOfChannels: 1,
  434. encodeBitRate: 48000,
  435. format: 'mp3',
  436. frameSize: 50
  437. }
  438. this.recorderManager.start(options);//开始录音
  439. this.recorderManager.onStart(() => {
  440. console.log('recorder start')
  441. })
  442. this.recorderManager.onError((res) => {
  443. console.log(res);
  444. })
  445. wx.showToast({
  446. title: "正在录音,上划取消发送",
  447. icon: "none",
  448. duration: 60000//先定义个60秒,后面可以手动调用wx.hideToast()隐藏
  449. });
  450. this.sendLock = false;//长按时是不上锁的。
  451. },
  452. //取消
  453. cancelButton(e){
  454. console.log("移动")
  455. let self = this;
  456. this.liveType=false;
  457. console.log('取消',e)
  458. let moveLenght = e.touches[e.touches.length - 1].clientY - this.startPoint.clientY; //移动距离
  459. if (Math.abs(moveLenght) > 50) {
  460. wx.showToast({
  461. title: "松开手指,取消发送",
  462. icon: "none",
  463. duration: 60000
  464. });
  465. this.sendLock = true;//触发了上滑取消发送,上锁
  466. } else {
  467. wx.showToast({
  468. title: "正在录音,上划取消发送",
  469. icon: "none",
  470. duration: 60000
  471. });
  472. this.sendLock = false;//上划距离不足,依然可以发送,不上锁
  473. }
  474. },
  475. //发送
  476. sendButton(item,e){
  477. console.log("松开")
  478. let self = this;
  479. this.liveType=false;
  480. console.log('发送',e)
  481. wx.hideToast();//结束录音、隐藏Toast提示框
  482. this.recorderManager.stop();//结束录音
  483. this.recorderManager.onStop((res) => {
  484. if(!this.sendLock){
  485. this.uploadVoice(item,res.duration,res.tempFilePath);
  486. }
  487. console.log('停止录音', res.tempFilePath)
  488. console.log("sendLock",this.sendLock);
  489. })
  490. },
  491. //上传MP3
  492. async uploadVoice(item,times,tempFilePaths){
  493. var self = this;
  494. uni.uploadFile({
  495. url: config.base_url+'/file/upload', //仅为示例,非真实的接口地址
  496. header:{'Authorization':uni.getStorageSync('token')},
  497. filePath: tempFilePaths,
  498. name: 'file',
  499. formData: {
  500. 'user': 'test'
  501. },
  502. success: (uploadFileRes) => {
  503. let res = JSON.parse(uploadFileRes.data);
  504. if(res.code == 200){
  505. console.log("上传成功",res)
  506. console.log(item)
  507. let seconds = Math.round((parseInt(times) % (1000 * 60)) / 1000);
  508. item.voice.push({'times':seconds,'url':res.data.url})
  509. console.log(JSON.stringify(self.voice))
  510. //self.textParseUrlIps(res.data.url);
  511. // self.newData.imgList.push(res.data.url);
  512. }else{
  513. uni.showToast({
  514. title: res.msg,
  515. icon:"none",
  516. mask:true,
  517. duration: 2000
  518. });
  519. }
  520. },
  521. fail: err => {
  522. uni.hideLoading()
  523. },
  524. complete: () => {
  525. }
  526. });
  527. },
  528. //搜索特定检查项
  529. async searchClick(text,index){
  530. console.log("搜索text",text);
  531. console.log("搜索index",index);
  532. let newObj = {
  533. level:4,
  534. searchValue:text
  535. }
  536. const {data} = await checkOptionList(newObj);
  537. if(data.code == 200){
  538. if(data.data[0]){
  539. let list = JSON.parse(JSON.stringify(this.checkOptionList));
  540. list[index] = this.getTreeData(data.data);
  541. this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
  542. console.log('this.$refs.uniDataPicker',this.$refs.uniDataPicker)
  543. this.$refs.uniDataPicker[index].show();
  544. }else{
  545. uni.showToast({
  546. title: '未找到相关检查项',
  547. icon:"none",
  548. mask:true,
  549. duration: 2000
  550. });
  551. }
  552. }
  553. },
  554. //重置检查项
  555. async resetClick(index){
  556. console.log("重置index",index);
  557. let newObj = {
  558. level:4,
  559. }
  560. const {data} = await checkOptionList(newObj);
  561. if(data.code == 200){
  562. let list = JSON.parse(JSON.stringify(this.checkOptionList));
  563. list[index] = this.getTreeData(data.data);
  564. this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
  565. this.$refs.uniDataPicker[index].show();
  566. }
  567. },
  568. async getInfo(){
  569. let self = this;
  570. let obj = {
  571. id:this.id
  572. };
  573. const {data} = await recordDettailsList(obj);
  574. if(data.code == 200){
  575. let obj = JSON.parse(JSON.stringify(data.data));
  576. console.log('详情',obj)
  577. console.log(obj.yhlist[0].voice)
  578. console.log(JSON.parse(obj.yhlist[0].voice))
  579. for(let i=0;i<obj.yhlist.length;i++){
  580. /* 语音格式转换*/
  581. obj.yhlist[i].voice=JSON.parse(obj.yhlist[i].voice)
  582. let text = "";
  583. if(obj.yhlist[i].level1){
  584. text = text + obj.yhlist[i].level1;
  585. }
  586. if(obj.yhlist[i].level2){
  587. text = text + '/'+ obj.yhlist[i].level2;
  588. }
  589. if(obj.yhlist[i].level3){
  590. text = text + '/'+ obj.yhlist[i].level3;
  591. }
  592. if(obj.yhlist[i].level4){
  593. text = text + '/'+ obj.yhlist[i].level4;
  594. }
  595. obj.yhlist[i].level = text;
  596. if(obj.yhlist[i].yhImg){
  597. if(obj.yhlist[i].yhImg[i]){
  598. obj.yhlist[i].yhImg = obj.yhlist[i].yhImg.split(",");
  599. }
  600. }
  601. if(obj.yhlist[i].zmClImg){
  602. if(obj.yhlist[i].zmClImg[i]){
  603. obj.yhlist[i].zmClImg = obj.yhlist[i].zmClImg.split(",");
  604. }
  605. }
  606. if(obj.yhlist[i].yhZghImg){
  607. if(obj.yhlist[i].yhZghImg[i]){
  608. obj.yhlist[i].yhZghImg = obj.yhlist[i].yhZghImg.split(",");
  609. }
  610. }
  611. }
  612. for(let i=0;i<obj.yhlist.length;i++){
  613. if(obj.yhlist[i].isLingshi == 1){
  614. let list = JSON.parse(JSON.stringify(this.checkOptionList));
  615. let minObj = {
  616. id:parseInt(obj.yhlist[i].jcxId+''),
  617. name:obj.yhlist[i].jcxName,
  618. }
  619. list.push(minObj);
  620. this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)));
  621. this.temporaryIdList.push(obj.yhlist[i].jcxId);
  622. }
  623. this.getCheckOptionList();
  624. }
  625. let newOjb = obj.record;
  626. newOjb.detailsList = obj.yhlist;
  627. this.$set(this,'deadline',newOjb.zgjzTime);
  628. if(newOjb.zgType == 0){
  629. this.$set(this,'rectificationType','一般整改');
  630. }else if(newOjb.zgType == 1){
  631. this.$set(this,'rectificationType','重大整改');
  632. }
  633. for(let i=0;i<self.inspectionUnitArrayData.length;i++){
  634. if(self.inspectionUnitArrayData[i].id == newOjb.jcDw){
  635. this.$set(this,'inspectionUnit',self.inspectionUnitArrayData[i].label);
  636. }
  637. }
  638. this.$set(this,'form',newOjb);
  639. }
  640. },
  641. //确认搜索房间
  642. popupClickItem(item){
  643. this.$set(this.form,"fjNumber",item.room)
  644. this.$set(this.form,"deptName",item.deptName)
  645. this.$set(this.form,"buildingId",item.building)
  646. this.$set(this.form,"deptId",item.deptId)
  647. this.$set(this.form,"laboratoryId",item.id)
  648. this.$set(this.form,"buildingName",item.buildName)
  649. this.$set(this.form,"laboratoryName",item.name)
  650. this.$set(this.form,"fzrId",item.userId)
  651. this.$set(this.form,"fzrName",item.safeUserName)
  652. this.$set(this.form,"fzrLxfs",item.safeUserPhone)
  653. this.popupType = false;
  654. },
  655. //联级选择器开关
  656. popupTwoClick(type,index){
  657. if(type == 1){
  658. this.isLingshi = 0;
  659. this.popupTwoIndex = index;
  660. this.addPopupName = "";
  661. this.popupBottomList = JSON.parse(JSON.stringify(this.checkOptionList))
  662. this.popupTwoType = true;
  663. }else if(type == 2){
  664. this.popupTwoType = false;
  665. }
  666. },
  667. //联级选择器添加/选择已有 切换
  668. popupTypeClick(){
  669. if(this.isLingshi == 0){
  670. this.isLingshi = 1;
  671. }else{
  672. this.isLingshi = 0;
  673. }
  674. },
  675. //搜索房间弹层开关
  676. popupClick(type){
  677. if(type == 1){
  678. this.room = "";
  679. this.roomList = [];
  680. this.popupType = true;
  681. }else if(type == 2){
  682. this.popupType = false;
  683. }
  684. },
  685. //搜索房间接口
  686. async getSelectInfoByRoom(){
  687. let self = this;
  688. if(!this.room){
  689. uni.showToast({
  690. title: '请输入要搜索房间号',
  691. icon:"none",
  692. mask:true,
  693. duration: 2000
  694. });
  695. return
  696. }
  697. const {data} = await getSelectInfoByRoom(this.room);
  698. if(data.code==200){
  699. if(data.data[0]){
  700. this.roomList = data.data;
  701. }else{
  702. uni.showToast({
  703. title: '未找到相关房间',
  704. icon:"none",
  705. mask:true,
  706. duration: 2000
  707. });
  708. }
  709. }
  710. },
  711. //主页面切换
  712. goButton(type){
  713. if(type == 1){
  714. this.pageType = 1;
  715. }else if(type == 2){
  716. if(!this.form.fjNumber){
  717. uni.showToast({
  718. title: '请选择房间',
  719. icon:"none",
  720. mask:true,
  721. duration: 2000
  722. });
  723. return
  724. }
  725. this.pageType = 2;
  726. }
  727. },
  728. //调用摄像头
  729. saoCode(){
  730. let self = this;
  731. uni.scanCode({
  732. onlyFromCamera: true,
  733. success: function (res) {
  734. if(res.result.indexOf("code") != -1 && res.result.indexOf("-") != -1 && res.result.indexOf("&") != -1){
  735. let codeRoom = "";
  736. let newList = res.result.split("?")[1].split("&")
  737. let list = newList[0].split("=")[1].split("-")
  738. codeRoom = list[1];
  739. if(codeRoom){
  740. self.roomList = [];
  741. self.room = codeRoom;
  742. self.getSelectInfoByRoom();
  743. self.popupType = true;
  744. }else{
  745. uni.showToast({
  746. title: '请扫描正确的二维码',
  747. icon:"none",
  748. mask:true,
  749. duration: 2000
  750. });
  751. }
  752. }else{
  753. uni.showToast({
  754. title: '请扫描正确的二维码',
  755. icon:"none",
  756. mask:true,
  757. duration: 2000
  758. });
  759. }
  760. }
  761. });
  762. },
  763. /**************************检查项***************************/
  764. //检查项初始化
  765. initialization(){
  766. this.popupTopList = [];
  767. this.popupBottomList = [];
  768. this.popupIndex = 0;
  769. this.popupMinIndex = "";
  770. this.popupIndexType = true;
  771. this.popupData1 = {};
  772. this.popupData2 = {};
  773. this.popupData3 = {};
  774. this.popupData4 = {};
  775. this.$forceUpdate();
  776. },
  777. //检查项确定按钮
  778. popupTwoButtonClick(){
  779. let self = this;
  780. if(!this.popupMinIndex){
  781. uni.showToast({
  782. title: '请选择检查项',
  783. icon:"none",
  784. mask:true,
  785. duration: 2000
  786. });
  787. return
  788. }
  789. let list = [];
  790. for(let i=0;i<self.popupTopList.length;i++){
  791. list.push(self.popupTopList[i].id);
  792. }
  793. let num = 0;
  794. for(let i=0;i<self.temporaryIdList.length;i++){
  795. if(self.temporaryIdList[i] == self.popupTopList[self.popupTopList.length-1].id){
  796. num++
  797. }
  798. }
  799. if(num == 0){
  800. this.$set(this.form.detailsList[this.popupTwoIndex],'isLingshi',0);
  801. }else{
  802. this.$set(this.form.detailsList[this.popupTwoIndex],'isLingshi',1);
  803. }
  804. this.form.detailsList[this.popupTwoIndex].jcxId = JSON.parse(JSON.stringify(list))
  805. this.form.detailsList[this.popupTwoIndex].jcxName = JSON.parse(JSON.stringify(self.popupTopList[self.popupTopList.length-1].name))
  806. this.popupTwoType = false;
  807. this.initialization();
  808. },
  809. //已选中检查项点击事件
  810. popupTwoMinItemClick(item,index){
  811. if(this.popupIndex != index){
  812. this.popupIndex = index;
  813. console.log("index",index)
  814. if(index == 0){
  815. this.popupData2 = {};
  816. this.popupData3 = {};
  817. this.popupData4 = {};
  818. this.popupTopList.splice(1,3);
  819. this.popupBottomList = this.popupData1;
  820. }else if(index == 1){
  821. this.popupData3 = {};
  822. this.popupData4 = {};
  823. this.popupTopList.splice(2,2);
  824. this.popupBottomList = this.popupData2;
  825. }else if(index == 2){
  826. this.popupData4 = {};
  827. this.popupTopList.splice(3,1);
  828. this.popupBottomList = this.popupData3;
  829. }
  830. this.popupMinIndex = "";
  831. this.$forceUpdate();
  832. }
  833. },
  834. //选中检查项
  835. popupTwoItemClick(item){
  836. let obj = {
  837. name:item.name,
  838. id:item.id
  839. }
  840. if(this.popupIndexType){
  841. if(this.popupTopList[0]){
  842. this.popupIndex++
  843. }
  844. this.popupTopList.push(obj);
  845. }else{
  846. this.popupTopList[this.popupTopList.length-1] = obj;
  847. }
  848. this.popupMinIndex = obj.id;
  849. this.popupIndexType = false;
  850. this.$forceUpdate();
  851. },
  852. //查看检查项下一级
  853. popupTwoImgClick(item){
  854. if(item.children){
  855. let obj = {
  856. name:item.name,
  857. id:item.id
  858. }
  859. if(this.popupIndexType){
  860. if(this.popupTopList[0]){
  861. this.popupIndex++
  862. }
  863. this.popupTopList.push(obj);
  864. }else{
  865. this.popupTopList[this.popupTopList.length-1] = obj
  866. }
  867. if(this.popupIndex == 0){
  868. this.popupData1 = JSON.parse(JSON.stringify(this.popupBottomList))
  869. }else if(this.popupIndex == 1){
  870. this.popupData2 = JSON.parse(JSON.stringify(this.popupBottomList))
  871. }else if(this.popupIndex == 2){
  872. this.popupData3 = JSON.parse(JSON.stringify(this.popupBottomList))
  873. }else if(this.popupIndex == 3){
  874. this.popupData4 = JSON.parse(JSON.stringify(this.popupBottomList))
  875. }
  876. this.popupBottomList = JSON.parse(JSON.stringify(item.children))
  877. this.popupMinIndex = "";
  878. this.popupIndexType = true;
  879. this.$forceUpdate();
  880. }
  881. },
  882. //获取检查项
  883. async getCheckOptionList() {
  884. let newObj = {
  885. level:4,
  886. }
  887. const {data} = await checkOptionList(newObj);
  888. if(data.code == 200){
  889. let list = this.getTreeData(data.data);
  890. this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
  891. }
  892. },
  893. async getCheckOptionListTwo() {
  894. let newObj = {
  895. level:3,
  896. }
  897. const {data} = await checkOptionList(newObj);
  898. if(data.code == 200){
  899. let list = this.getTreeData(data.data);
  900. this.checkOptionListExamination = JSON.parse(JSON.stringify(list));
  901. }
  902. },
  903. //获取检查单位
  904. /* async treeselect() {
  905. let self = this;
  906. const {data} = await treeselect({});
  907. if(data.code == 200){
  908. let list = [];
  909. for(let i=0;i<data.data[0].children.length;i++){
  910. let obj = {
  911. id:data.data[0].children[i].id,
  912. label:data.data[0].children[i].label,
  913. }
  914. self.inspectionUnitArray.push(data.data[0].children[i].label)
  915. list.push(obj);
  916. for(let o=0;o<data.data[0].children[i].children.length;o++){
  917. let obj = {
  918. id:data.data[0].children[i].children[o].id,
  919. label:data.data[0].children[i].children[o].label,
  920. }
  921. self.inspectionUnitArray.push(data.data[0].children[i].children[o].label)
  922. list.push(obj);
  923. }
  924. }
  925. this.inspectionUnitArrayData = list;
  926. }
  927. }, */
  928. async treeselect() {
  929. let self = this;
  930. const {data} = await treeselect({});
  931. if(data.code == 200){
  932. let list = [];
  933. for(let i=0;i<data.data[0].children.length;i++){
  934. let obj = {
  935. id:data.data[0].children[i].id,
  936. label:data.data[0].children[i].label,
  937. }
  938. self.inspectionUnitArray.push(data.data[0].children[i].label)
  939. list.push(obj);
  940. for(let o=0;o<data.data[0].children[i].children.length;o++){
  941. let obj = {
  942. id:data.data[0].children[i].children[o].id,
  943. label:data.data[0].children[i].children[o].label,
  944. }
  945. self.inspectionUnitArray.push(data.data[0].children[i].children[o].label)
  946. list.push(obj);
  947. }
  948. }
  949. this.inspectionUnitArrayData = list;
  950. }
  951. },
  952. getTreeData(data){
  953. for(var i=0;i<data.length>0;i++){
  954. if(data[i].children == null||data[i].children.length<=0){
  955. // children若为空数组,则将children设为undefined
  956. data[i].children = undefined;
  957. }else {
  958. // children若不为空数组,则继续 递归调用 本方法
  959. this.getTreeData(data[i].children);
  960. }
  961. }
  962. return data;
  963. },
  964. // 图片上传
  965. selectImage(item) {
  966. let self = this;
  967. if(item.yhImg.length>4){
  968. uni.showToast({
  969. title: '最多上传5张图片',
  970. icon:"none",
  971. mask:true,
  972. duration: 2000
  973. });
  974. return
  975. }
  976. wx.chooseImage({
  977. count: 1,
  978. sizeType: ["original", "compressed"],
  979. sourceType: ["album", "camera"],
  980. success: function(res) {
  981. let tempFilePaths = res.tempFilePaths[0];
  982. self.uploadImg(tempFilePaths,item);
  983. }
  984. });
  985. },
  986. async uploadImg(tempFilePaths,item){
  987. var self = this;
  988. uni.showLoading({
  989. title: '上传中',
  990. mask: true
  991. });
  992. uni.uploadFile({
  993. url: config.base_url+'/file/upload', //仅为示例,非真实的接口地址
  994. header:{'Authorization':uni.getStorageSync('token')},
  995. filePath: tempFilePaths,
  996. name: 'file',
  997. formData: {
  998. 'user': 'test'
  999. },
  1000. success: (uploadFileRes) => {
  1001. let res = JSON.parse(uploadFileRes.data);
  1002. if(res.code == 200){
  1003. item.yhImg.push(res.data.url);
  1004. console.log(res.data.url)
  1005. }else{
  1006. uni.showToast({
  1007. title: res.msg,
  1008. icon:"none",
  1009. mask:true,
  1010. duration: 2000
  1011. });
  1012. }
  1013. },
  1014. fail: err => {},
  1015. complete: () => {
  1016. uni.hideLoading()
  1017. }
  1018. });
  1019. },
  1020. //删除图片
  1021. delImg(index,minIndex){
  1022. this.form.detailsList[index].yhImg.splice(minIndex,1);
  1023. this.$forceUpdate();
  1024. },
  1025. //添加隐患
  1026. addDanger(){
  1027. if(this.form.detailsList.length>19){
  1028. uni.showToast({
  1029. title: '最多添加20个隐患',
  1030. icon:"none",
  1031. mask:true,
  1032. duration: 2000
  1033. });
  1034. return
  1035. }
  1036. let obj = {
  1037. isLingshi:0,
  1038. yhImg:[],
  1039. voice:[],
  1040. yhMs:"",
  1041. jcxId:"",
  1042. jcxName:"",
  1043. }
  1044. this.form.detailsList.push(obj);
  1045. this.getCheckOptionList();
  1046. this.$forceUpdate();
  1047. },
  1048. //删除隐患
  1049. delDetailsList(index){
  1050. this.form.detailsList.splice(index,1);
  1051. this.$forceUpdate();
  1052. },
  1053. //子页面切换
  1054. goMinButton(type){
  1055. let self = this;
  1056. if(type == 1){
  1057. this.minPageType = 1;
  1058. }else if(type == 2){
  1059. for(let i=0;i<self.form.detailsList.length;i++){
  1060. console.log(self.form.detailsList[i])
  1061. console.log(typeof(self.form.detailsList[i].yhMs))
  1062. console.log(typeof(self.form.detailsList[i].voice))
  1063. let num = i+1;
  1064. // if(!self.form.detailsList[i].yhImg[0]){
  1065. // uni.showToast({
  1066. // title: '第'+num+'个隐患项未上传图片',
  1067. // icon:"none",
  1068. // mask:true,
  1069. // duration: 2000
  1070. // });
  1071. // return
  1072. // }else
  1073. /* if(!self.form.detailsList[i].yhMs){
  1074. uni.showToast({
  1075. title: '第'+num+'未填写隐患描述',
  1076. icon:"none",
  1077. mask:true,
  1078. duration: 2000
  1079. });
  1080. return
  1081. }else */ if(!self.form.detailsList[i].jcxName){
  1082. uni.showToast({
  1083. title: '第'+num+'未选择隐患项',
  1084. icon:"none",
  1085. mask:true,
  1086. duration: 2000
  1087. });
  1088. return
  1089. }else if(!self.form.detailsList[i].yhMs && self.form.detailsList[i].voice.length<=0){
  1090. uni.showToast({
  1091. title: '请输入第'+num+'项隐患描述!',
  1092. icon:"none",
  1093. mask:true,
  1094. duration: 2000
  1095. });
  1096. return
  1097. }
  1098. }
  1099. this.minPageType = 2;
  1100. }
  1101. },
  1102. //整改类型选中事件
  1103. rectificationTypeChange(e){
  1104. if(e.target.value == 0){
  1105. this.rectificationType = "一般整改";
  1106. }else if(e.target.value == 1){
  1107. this.rectificationType = "重大整改";
  1108. }
  1109. this.form.zgType = e.target.value;
  1110. },
  1111. //检查单位选中事件
  1112. inspectionUnitChange(e){
  1113. this.form.jcDw = this.inspectionUnitArrayData[e.target.value].id;
  1114. this.form.jcDwName = this.inspectionUnitArrayData[e.target.value].label;
  1115. this.inspectionUnit = this.inspectionUnitArrayData[e.target.value].label;
  1116. },
  1117. //截止时间选中事件
  1118. deadlineChange(e){
  1119. let time = e.target.value.replace(/-/g, '/')
  1120. time = Date.parse(time)
  1121. let time2 = new Date().setHours(0,0,0,0)
  1122. if(time<time2){
  1123. uni.showToast({
  1124. title: '请选择今天或以后的时间',
  1125. icon:"none",
  1126. mask:true,
  1127. duration: 2000
  1128. });
  1129. return
  1130. }
  1131. console.log('picker发送选择改变,携带值为', e.target.value)
  1132. this.form.zgjzTime = e.target.value;
  1133. this.deadline = e.target.value
  1134. },
  1135. //发布
  1136. async releaseFun(){
  1137. let self=this;
  1138. let type=this.submitStatus;
  1139. let obj = JSON.parse(JSON.stringify(this.form))
  1140. for(let i=0;i<obj.detailsList.length;i++){
  1141. if(obj.detailsList[i].jcxName.indexOf("/") != -1){
  1142. let list = obj.detailsList[i].jcxName.split("/");
  1143. obj.detailsList[i].jcxName = list[list.length-1];
  1144. }
  1145. obj.detailsList[i].jcxId = obj.detailsList[i].jcxId + ',';
  1146. obj.detailsList[i].yhImg = obj.detailsList[i].yhImg + '';
  1147. obj.detailsList[i].voice = JSON.stringify(obj.detailsList[i].voice);
  1148. }
  1149. obj.zgStatus = 0;
  1150. if(self.id){
  1151. obj.isCg=0;
  1152. obj.isFabu=1;
  1153. const {data} = await checkRecordUpdate(obj);
  1154. if(data.code == 200){
  1155. uni.showToast({
  1156. title: type == 1?'保存草稿成功':(type == 2?'提交成功':''),
  1157. icon:"none",
  1158. mask:true,
  1159. duration: 2000
  1160. });
  1161. setTimeout(function(){
  1162. uni.navigateBack();
  1163. },2000);
  1164. }
  1165. }else{
  1166. self.saveSubmit(obj,type)
  1167. }
  1168. },
  1169. //保存草稿
  1170. async saveDraft(obj,type){
  1171. obj.isCg=1;
  1172. const {data} = await checkRecordAddC(obj);
  1173. if(data.code == 200){
  1174. uni.showToast({
  1175. title: type == 1?'保存草稿成功':(type == 2?'提交成功':''),
  1176. icon:"none",
  1177. mask:true,
  1178. duration: 2000
  1179. });
  1180. setTimeout(function(){
  1181. uni.navigateBack();
  1182. },2000);
  1183. }
  1184. },
  1185. //立即提交
  1186. async saveSubmit(obj,type){
  1187. obj.isCg=0;
  1188. obj.isFabu=1;
  1189. const {data} = await checkRecordAdd(obj);
  1190. if(data.code == 200){
  1191. uni.showToast({
  1192. title: type == 1?'保存草稿成功':(type == 2?'提交成功':''),
  1193. icon:"none",
  1194. mask:true,
  1195. duration: 2000
  1196. });
  1197. setTimeout(function(){
  1198. uni.navigateBack();
  1199. },2000);
  1200. }
  1201. },
  1202. //提交接口
  1203. async upDataClick(type){
  1204. let self = this;
  1205. this.submitStatus=type;//提交检查和保存草稿箱按钮点击状态保存
  1206. if(!this.form.zgjzTime){
  1207. uni.showToast({
  1208. title: '请选择整改时间',
  1209. icon:"none",
  1210. mask:true,
  1211. duration: 2000
  1212. });
  1213. return
  1214. }
  1215. if(this.form.zgType != 0 && this.form.zgType != 1){
  1216. uni.showToast({
  1217. title: '请选择整改类型',
  1218. icon:"none",
  1219. mask:true,
  1220. duration: 2000
  1221. });
  1222. return
  1223. }
  1224. if(!this.form.jcDw){
  1225. uni.showToast({
  1226. title: '请选择检查单位',
  1227. icon:"none",
  1228. mask:true,
  1229. duration: 2000
  1230. });
  1231. return
  1232. }
  1233. let isVoice=false;
  1234. let obj = JSON.parse(JSON.stringify(this.form))
  1235. for(let i=0;i<obj.detailsList.length;i++){
  1236. if(obj.detailsList[i].jcxName.indexOf("/") != -1){
  1237. let list = obj.detailsList[i].jcxName.split("/");
  1238. obj.detailsList[i].jcxName = list[list.length-1];
  1239. }
  1240. obj.detailsList[i].jcxId = obj.detailsList[i].jcxId + ',';
  1241. obj.detailsList[i].yhImg = obj.detailsList[i].yhImg + '';
  1242. obj.detailsList[i].voice = JSON.stringify(obj.detailsList[i].voice);
  1243. }
  1244. if(type==1){//保存草稿
  1245. self.saveDraft(obj,type)
  1246. }else if(type==2){//提交
  1247. //如果有语音备注,提示
  1248. this.form.detailsList.forEach(function(item){
  1249. if(!item.yhMs && item.voice.length>=0){
  1250. isVoice=true;
  1251. console.log('没有备注,但是有语音')
  1252. return
  1253. }else{
  1254. isVoice=false;
  1255. }
  1256. })
  1257. if(isVoice==true){//有语音
  1258. uni.showModal({
  1259. title: '',
  1260. cancelText:'保存草稿',
  1261. cancelColor:'#999999',
  1262. confirmColor:'#0183FA',
  1263. confirmText:'继续发布',
  1264. content: '当前隐患描述使用语音备注,可以补充文字描述后提交发布或者 保存草稿箱后续发布?',
  1265. success (res) {
  1266. if (res.confirm) {
  1267. console.log('继续发布')
  1268. self.minPageType=1;
  1269. } else if (res.cancel) {
  1270. console.log('保存草稿')
  1271. self.saveDraft(obj,type)
  1272. }
  1273. }
  1274. })
  1275. }else{
  1276. console.log('没有语音')
  1277. self.$refs.popup.open()
  1278. }
  1279. }
  1280. },
  1281. /**************************搜索项***************************/
  1282. //搜索
  1283. inputSearch(event){
  1284. console.log("e",event.detail.value)
  1285. },
  1286. //选中固有检查项(新)
  1287. onchange(e,index) {
  1288. let self = this;
  1289. let val = e.detail.value[e.detail.value.length-1].value
  1290. let num = 0;
  1291. for(let i=0;i<self.temporaryIdList.length;i++){
  1292. if(self.temporaryIdList[i] == val){
  1293. num++
  1294. }
  1295. }
  1296. if(num == 0){
  1297. this.$set(this.form.detailsList[index],'isLingshi',0);
  1298. }else{
  1299. this.$set(this.form.detailsList[index],'isLingshi',1);
  1300. }
  1301. let list = [];
  1302. let listName=[];
  1303. for(let i=0;i<e.detail.value.length;i++){
  1304. list.push(e.detail.value[i].value)
  1305. if(i<3){
  1306. listName.push(e.detail.value[i].text)
  1307. }
  1308. }
  1309. let jcxSstkNum=this.getTreeName(this.checkOptionList[0],e.detail.value[e.detail.value.length-1].value)
  1310. this.$set(this.form.detailsList[index],'jcxSstkNum',jcxSstkNum);
  1311. this.$set(this.form.detailsList[index],'jcxId',list);
  1312. this.$set(this.form.detailsList[index],'jcxSstkMs',listName.join('-'));
  1313. this.$set(this.form.detailsList[index],'jcxName',e.detail.value[e.detail.value.length-1].text);
  1314. },
  1315. //根据id查找父元素
  1316. getTreeName(list,id){
  1317. let _this=this
  1318. for (let i = 0; i < list.length; i++) {
  1319. let a=list[i]
  1320. if(a.id===id){
  1321. return a.code
  1322. }else{
  1323. if(a.children && a.children.length>0){
  1324. let res=_this.getTreeName(a.children,id)
  1325. if(res){
  1326. return res
  1327. }
  1328. }
  1329. }
  1330. }
  1331. },
  1332. onnodeclick(node) {
  1333. console.log("node",node)
  1334. },
  1335. //新增检查项-按钮
  1336. dialogClick(index){
  1337. this.examinationForm.name = "";
  1338. this.examinationForm.value = "";
  1339. this.examinationForm.idList = "";
  1340. this.openIndex = index;
  1341. this.open = true;
  1342. },
  1343. dialogClickOff(){
  1344. this.open = false;
  1345. },
  1346. onchangeTwo(e){
  1347. this.jcxSstkNum=[];
  1348. this.jcxSstkMs='';
  1349. this.$set(this.examinationForm,'value',e.detail.value[e.detail.value.length-1].text);
  1350. this.$set(this.examinationForm,'idList',e.detail.value[e.detail.value.length-1].value);
  1351. let list = [];
  1352. let listName=[];
  1353. for(let i=0;i<e.detail.value.length;i++){
  1354. list.push(e.detail.value[i].value)
  1355. if(i<3){
  1356. listName.push(e.detail.value[i].text)
  1357. }
  1358. }
  1359. console.log(9999)
  1360. console.log(this.checkOptionListExamination)
  1361. let jcxSstkNum=this.getTreeName(this.checkOptionListExamination,e.detail.value[e.detail.value.length-1].value)
  1362. this.jcxSstkNum=jcxSstkNum;
  1363. this.jcxSstkMs=listName.join('-');
  1364. console.log(this.jcxSstkNum)
  1365. console.log(this.jcxSstkMs)
  1366. // this.$forceUpdate();
  1367. },
  1368. onnodeclickTwo(node) {
  1369. console.log("node",node)
  1370. },
  1371. //新增检查项-提交
  1372. async addPopupTwoButtonClick(){
  1373. let self = this;
  1374. if(!this.examinationForm.name){
  1375. uni.showToast({
  1376. title: '请输入检查项名称',
  1377. icon:"none",
  1378. mask:true,
  1379. duration: 2000
  1380. });
  1381. return
  1382. }
  1383. if(!this.examinationForm.value){
  1384. uni.showToast({
  1385. title: '请选择所属目录',
  1386. icon:"none",
  1387. mask:true,
  1388. duration: 2000
  1389. });
  1390. return
  1391. }
  1392. let obj = {
  1393. name:this.examinationForm.name,
  1394. parentId:this.examinationForm.idList
  1395. };
  1396. const {data} = await addTempCheckOption(obj);
  1397. if(data.code == 200){
  1398. let list = JSON.parse(JSON.stringify(this.checkOptionList));
  1399. let obj = {
  1400. id:data.data.id,
  1401. name:data.data.name,
  1402. };
  1403. list.push(obj);
  1404. this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)));
  1405. this.temporaryIdList.push(data.data.id);
  1406. this.$set(this.form.detailsList[this.openIndex],'jcxId',data.data.id);
  1407. this.$set(this.form.detailsList[this.openIndex],'jcxName',data.data.name);
  1408. this.$set(this.form.detailsList[this.openIndex],'isLingshi',1);
  1409. this.$set(this.form.detailsList[this.openIndex],'jcxSstkNum',this.jcxSstkNum);
  1410. this.$set(this.form.detailsList[this.openIndex],'jcxSstkMs',this.jcxSstkMs);
  1411. uni.showToast({
  1412. title: '新增成功',
  1413. icon:"none",
  1414. mask:true,
  1415. duration: 2000
  1416. });
  1417. this.open = false;
  1418. }
  1419. },
  1420. }
  1421. }
  1422. </script>
  1423. <style lang="stylus" scoped>
  1424. #startChecking{
  1425. height: 100%;
  1426. width: 100%;
  1427. display flex
  1428. .startCheckingPage{
  1429. flex:1;
  1430. .startCheckingPage-top-box{
  1431. flex:1;
  1432. margin:20rpx;
  1433. background #fff
  1434. border-radius:20rpx;
  1435. padding:30rpx;
  1436. .item-picker-box{
  1437. display: flex
  1438. margin-bottom:20rpx;
  1439. .name-p{
  1440. width:123rpx;
  1441. line-height:90rpx;
  1442. text-align right
  1443. }
  1444. .span-p{
  1445. width:36rpx;
  1446. color:#FF7373;
  1447. line-height:90rpx;
  1448. }
  1449. .picker-big-box{
  1450. flex:1;
  1451. border:2rpx solid #E0E0E0;
  1452. border-radius:10rpx;
  1453. height:90rpx;
  1454. .picker-box{
  1455. flex:1;
  1456. display flex
  1457. .picker-text{
  1458. flex:1;
  1459. line-height:90rpx;
  1460. margin-left:20rpx;
  1461. color:#999;
  1462. font-size:28rpx;
  1463. }
  1464. input{
  1465. height:90rpx;
  1466. }
  1467. .img-box{
  1468. width:78rpx;
  1469. height:90rpx;
  1470. img{
  1471. width:30rpx;
  1472. height:28rpx;
  1473. margin:34rpx 28rpx;
  1474. }
  1475. }
  1476. }
  1477. .picker-back{
  1478. background:#f5f5f5;
  1479. }
  1480. }
  1481. }
  1482. }
  1483. .startCheckingPage-bottom-button{
  1484. height:100rpx;
  1485. width:650rpx;
  1486. text-align center
  1487. color:#fff;
  1488. background #0183FA
  1489. margin:80rpx auto;
  1490. line-height:100rpx;
  1491. font-size:28rpx;
  1492. border-radius:20rpx;
  1493. }
  1494. }
  1495. .check-item-page{
  1496. flex:1;
  1497. .user-info-box{
  1498. width:710rpx;
  1499. height:200rpx;
  1500. margin:20rpx;
  1501. background #fff
  1502. border-radius:20rpx;
  1503. display flex
  1504. .user-info-left{
  1505. flex:1;
  1506. margin:0 25rpx 0 16rpx;
  1507. .user-info-min-box:nth-child(1){
  1508. border-bottom:1rpx solid #E0E0E0;
  1509. }
  1510. .user-info-min-box{
  1511. display flex
  1512. img{
  1513. height:30rpx;
  1514. width:30rpx;
  1515. margin:37rpx 13rpx 0 16rpx;
  1516. }
  1517. view{
  1518. line-height:100rpx;
  1519. }
  1520. view:nth-child(2){
  1521. font-size:30rpx;
  1522. width:190rpx;
  1523. color:#999999;
  1524. }
  1525. view:nth-child(3){
  1526. width:390rpx;
  1527. display:block;
  1528. overflow:hidden;
  1529. text-overflow:ellipsis;
  1530. white-space:nowrap;
  1531. text-align right;
  1532. font-size:28rpx;
  1533. }
  1534. }
  1535. }
  1536. .user-info-right{
  1537. width:12rpx;
  1538. height:24rpx;
  1539. margin:88rpx 27rpx 0 0;
  1540. }
  1541. }
  1542. .check-for-max-box{
  1543. .check-for-big-box{
  1544. width 710rpx;
  1545. //padding-top:30rpx;
  1546. margin:0 20rpx 20rpx;
  1547. background #fff
  1548. border-radius:20rpx;
  1549. overflow hidden
  1550. position relative;
  1551. padding:20rpx;
  1552. box-sizing border-box;
  1553. .check-for-img-max-box{
  1554. //display flex
  1555. .left-title-p{
  1556. width:150rpx;
  1557. line-height:88rpx;
  1558. text-align right
  1559. font-size:30rpx;
  1560. }
  1561. .right-img-box{
  1562. margin-top:30rpx;
  1563. .img-box{
  1564. display inline-block;
  1565. height:200rpx;
  1566. width:200rpx;
  1567. position relative
  1568. margin:0 20rpx 20rpx 0;
  1569. border-radius 10rpx;
  1570. overflow hidden;
  1571. .img-data{
  1572. height:200rpx;
  1573. width:200rpx;
  1574. }
  1575. .position-img{
  1576. position absolute
  1577. right:0;
  1578. top:0;
  1579. width:36rpx;
  1580. height:36rpx;
  1581. }
  1582. }
  1583. .add-button{
  1584. margin:0 20rpx 20rpx 0;
  1585. border-radius 10rpx;
  1586. overflow hidden;
  1587. display inline-block
  1588. height:200rpx;
  1589. width:200rpx;
  1590. }
  1591. }
  1592. }
  1593. /* 语音备注 */
  1594. .voice{
  1595. .voice_t{
  1596. width:150rpx;
  1597. line-height:88rpx;
  1598. text-align right
  1599. font-size:30rpx;
  1600. }
  1601. .voice_b{
  1602. display flex;
  1603. justify-content flex-start;
  1604. align-items center;
  1605. margin-bottom :30rpx;
  1606. .voice_b_l{
  1607. width: 400rpx;
  1608. height: 40rpx;
  1609. background:rgba(88,175,255,0.3);
  1610. border-radius: 10rpx;
  1611. display flex;
  1612. justify-content flex-start;
  1613. align-items center;
  1614. >img{
  1615. width: 18rpx;
  1616. height: 24rpx;
  1617. margin-left:16rpx;
  1618. margin-right :20rpx;
  1619. }
  1620. }
  1621. .voice_b_r{
  1622. width: 28rpx;
  1623. height: 28rpx;
  1624. margin-left:20rpx;
  1625. }
  1626. }
  1627. }
  1628. .broadcast_m{
  1629. width: 142rpx;
  1630. height: 142rpx;
  1631. position :fixed;
  1632. right :10rpx;
  1633. bottom:188rpx;
  1634. z-index :100;
  1635. .broadcast_m_t{
  1636. width: 142rpx;
  1637. height: 142rpx;
  1638. position :relative;
  1639. font-size: 24rpx;
  1640. font-family: PingFang SC;
  1641. font-weight: 500;
  1642. line-height: 170rpx;
  1643. text-align center
  1644. >img{
  1645. width: 142rpx;
  1646. height: 142rpx;
  1647. position :absolute;
  1648. }
  1649. >label{
  1650. width :100%;
  1651. font-size: 24rpx;
  1652. font-family: PingFang SC;
  1653. font-weight: 500;
  1654. color: #0183FA;
  1655. line-height: 24rpx;
  1656. display :inline-block;
  1657. text-align :center;
  1658. position :absolute;
  1659. top:76rpx;
  1660. }
  1661. /* 按下 */
  1662. .press_color{
  1663. color: #FFFFFF;
  1664. }
  1665. /* 松开 */
  1666. .slip_color{
  1667. color: #0183FA;
  1668. }
  1669. }
  1670. .broadcast_m_t_back_a{
  1671. background:url(@/images/icon_sskz_skfs.png);
  1672. background-size 100%
  1673. color: #FFFFFF;
  1674. }
  1675. .broadcast_m_t_back_b{
  1676. background:url(@/images/icon_sskz_azsh.png);
  1677. background-size 100%
  1678. color: #0183FA;
  1679. }
  1680. .broadcast_m_b{
  1681. font-size: 24rpx;
  1682. font-family: PingFang SC;
  1683. font-weight: 500;
  1684. color: #999999;
  1685. line-height: 24rpx;
  1686. text-align center;
  1687. margin-top :14rpx;
  1688. }
  1689. }
  1690. .check-for-input-max-box{
  1691. //display flex
  1692. margin-top:20rpx;
  1693. .left-title-p{
  1694. width:150rpx;
  1695. line-height:88rpx;
  1696. text-align right
  1697. font-size:30rpx;
  1698. }
  1699. textarea{
  1700. border:1rpx solid #E0E0E0;
  1701. width 630rpx;
  1702. height:210rpx;
  1703. border-radius:10rpx;
  1704. line-height :40rpx;
  1705. padding:20rpx;
  1706. font-size:28rpx;
  1707. }
  1708. }
  1709. .check-for-button-max-box{
  1710. display flex
  1711. margin-top:30rpx;
  1712. margin-bottom:20rpx;
  1713. .left-title-p{
  1714. width:150rpx;
  1715. line-height:88rpx;
  1716. text-align right
  1717. font-size:30rpx;
  1718. }
  1719. .button-text-p{
  1720. border:1rpx solid #E0E0E0;
  1721. width:440rpx;
  1722. height:80rpx;
  1723. border-radius:10rpx;
  1724. line-height :80rpx;
  1725. color: #A2A2A2
  1726. padding:0 20rpx;
  1727. font-size:28rpx;
  1728. display:block;
  1729. overflow:hidden;
  1730. text-overflow:ellipsis;
  1731. white-space:nowrap;
  1732. }
  1733. }
  1734. .check-for-button-add-p{
  1735. text-align center;
  1736. line-height:80rpx;
  1737. color:#007AFF;
  1738. margin-bottom:20rpx;
  1739. }
  1740. .check-for-big-box-position-img-box{
  1741. position absolute
  1742. top:0;
  1743. right:0;
  1744. width:60rpx;
  1745. height:60rpx;
  1746. img{
  1747. width:36rpx;
  1748. height:36rpx;
  1749. margin:12rpx;
  1750. }
  1751. }
  1752. }
  1753. }
  1754. .add-for-item-p{
  1755. width:500rpx;
  1756. height:80rpx;
  1757. border:4rpx dashed #0183FA;
  1758. color:#0183FA;
  1759. font-size:28rpx;
  1760. background #fff
  1761. text-align center
  1762. line-height:80rpx;
  1763. border-radius:10rpx;
  1764. margin:40rpx auto 100rpx;
  1765. }
  1766. .check-button-box-one{
  1767. width:650rpx;
  1768. margin:0 auto 100rpx;
  1769. background: linear-gradient(-45deg, #FA9901, #F28E26);
  1770. text-align:center;
  1771. line-height:100rpx;
  1772. font-size:30rpx;
  1773. color:#fff;
  1774. border-radius:50rpx;
  1775. }
  1776. .check-button-box{
  1777. display flex
  1778. width:650rpx;
  1779. margin:0 auto 100rpx;
  1780. view{
  1781. text-align center
  1782. line-height:100rpx;
  1783. font-size:30rpx;
  1784. color:#fff;
  1785. }
  1786. view:nth-child(1){
  1787. width:325rpx;
  1788. line-height:100rpx;
  1789. background: linear-gradient(-45deg, #FA9901, #F28E26);
  1790. border-bottom-left-radius 50rpx
  1791. border-top-left-radius 50rpx
  1792. }
  1793. view:nth-child(2){
  1794. width:325rpx;
  1795. line-height:100rpx;
  1796. background: linear-gradient(-35deg, #309CFF, #0183FA);
  1797. border-bottom-right-radius 50rpx
  1798. border-top-right-radius 50rpx
  1799. }
  1800. }
  1801. .danger-list-box{
  1802. display flex
  1803. background #fff
  1804. margin:0 20rpx;
  1805. border-radius:20rpx;
  1806. .danger-list-left-img{
  1807. height:30rpx;
  1808. width:30rpx;
  1809. margin:37rpx 13rpx 0 30rpx;
  1810. }
  1811. view{
  1812. line-height:100rpx;
  1813. }
  1814. .danger-list-left-text{
  1815. font-size:30rpx;
  1816. flex:1;
  1817. color:#999999;
  1818. }
  1819. .danger-list-left-num{
  1820. font-size:28rpx;
  1821. margin-right:50rpx;
  1822. }
  1823. .danger-list-right-img{
  1824. width:12rpx;
  1825. height:24rpx;
  1826. margin:38rpx 30rpx 0 0
  1827. }
  1828. }
  1829. .danger-title-text-p{
  1830. line-height:80rpx;
  1831. font-size:30rpx;
  1832. color:#333;
  1833. margin-left:40rpx;
  1834. }
  1835. .danger-info-picker-max-box{
  1836. margin:0 20rpx 100rpx;
  1837. background #fff
  1838. border-radius:20rpx;
  1839. padding:30rpx;
  1840. .danger-info-picker-box:nth-child(1){
  1841. margin-top:0;
  1842. }
  1843. .danger-info-picker-box{
  1844. display flex
  1845. margin-top:26rpx;
  1846. .danger-info-picker-title{
  1847. line-height:80rpx;
  1848. font-size:30rpx;
  1849. color:#333;
  1850. }
  1851. .picker-text{
  1852. width:480rpx;
  1853. height:80rpx;
  1854. border: 2rpx solid #E0E0E0;
  1855. padding-left:20rpx;
  1856. margin-left:20rpx;
  1857. color:#A2A2A2;
  1858. font-size:28rpx;
  1859. line-height 80rpx
  1860. border-radius:10rpx;
  1861. }
  1862. }
  1863. }
  1864. /* 检查名称弹框 */
  1865. .inspect_name{
  1866. .popup-content{
  1867. width: 750rpx;
  1868. height: 350rpx;
  1869. background: #FFFFFF;
  1870. border-radius: 10rpx 10rpx 0px 0px;
  1871. padding :0 50rpx;
  1872. box-sizing :border-box;
  1873. overflow :hidden;
  1874. .inspect_name_t{
  1875. display flex
  1876. margin-top:66rpx;
  1877. .inspect_name_t_l{
  1878. line-height:80rpx;
  1879. font-size:30rpx;
  1880. color:#333;
  1881. }
  1882. >input{
  1883. width:440rpx;
  1884. height:80rpx;
  1885. border: 2rpx solid #E0E0E0;
  1886. padding-left:20rpx;
  1887. margin-left:20rpx;
  1888. color:#A2A2A2;
  1889. font-size:28rpx;
  1890. line-height 80rpx
  1891. border-radius:10rpx;
  1892. }
  1893. }
  1894. .inspect_name_b{
  1895. margin-top :64rpx;
  1896. width: 650rpx;
  1897. height: 80rpx;
  1898. background: linear-gradient(-35deg, #309CFF, #0183FA);
  1899. border-radius: 40rpx;
  1900. font-size: 30rpx;
  1901. font-family: PingFang SC;
  1902. font-weight: 500;
  1903. color: #FFFFFF;
  1904. line-height: 80rpx;
  1905. text-align :center;
  1906. }
  1907. }
  1908. }
  1909. }
  1910. .search-max-box{
  1911. flex:1;
  1912. display flex
  1913. flex-direction column
  1914. .search-top-input-box{
  1915. overflow hidden
  1916. height:150rpx;
  1917. background #fff
  1918. input{
  1919. width:670rpx;
  1920. height:80rpx;
  1921. border:1rpx solid #E0E0E0;
  1922. border-radius:10rpx;
  1923. margin:34rpx auto;
  1924. padding:0 20rpx;
  1925. font-size:28rpx;
  1926. color:#A2A2A2;
  1927. }
  1928. }
  1929. .scroll-box{
  1930. flex:1;
  1931. padding-top:20rpx;
  1932. .search-for-box:nth-child(1){
  1933. view:nth-child(1){
  1934. border-top:none;
  1935. }
  1936. }
  1937. .search-for-box{
  1938. margin:0 20rpx;
  1939. background #fff
  1940. view:nth-child(1){
  1941. line-height:28rpx;
  1942. font-size:28rpx;
  1943. padding-top:20rpx;
  1944. margin:0 20rpx 20rpx;
  1945. border-top:1rpx solid #E0E0E0;
  1946. }
  1947. view:nth-child(2){
  1948. line-height:30rpx;
  1949. font-size:24rpx;
  1950. color:#666;
  1951. margin:0 20rpx;
  1952. padding-bottom:20rpx;
  1953. }
  1954. }
  1955. .search-add-item{
  1956. width:680rpx;
  1957. margin:20rpx auto;
  1958. height:70rpx;
  1959. background #dedede;
  1960. display flex
  1961. border-radius:10rpx;
  1962. view{
  1963. font-size:24rpx;
  1964. line-height:70rpx;
  1965. }
  1966. view:nth-child(1){
  1967. color:#999;
  1968. flex:1;
  1969. margin-left:45rpx;
  1970. }
  1971. view:nth-child(2){
  1972. color:#0183FA;
  1973. margin-right:45rpx;
  1974. }
  1975. }
  1976. .search-null-box{
  1977. img{
  1978. width:274rpx;
  1979. height:274rpx;
  1980. margin:100rpx 0 20rpx 270rpx;
  1981. }
  1982. view:nth-child(2){
  1983. margin:40rpx auto 90rpx;
  1984. color:#999;
  1985. font-size:28rpx;
  1986. text-align center
  1987. }
  1988. view:nth-child(3){
  1989. width:300rpx;
  1990. height:70rpx;
  1991. line-height:70rpx;
  1992. text-align center
  1993. font-size:28rpx;
  1994. color:#fff;
  1995. background #0183FA
  1996. border-radius:50rpx;
  1997. margin:0 auto;
  1998. }
  1999. }
  2000. }
  2001. }
  2002. .add-search-max-box{
  2003. background #fff;
  2004. position fixed;
  2005. width:100%;
  2006. height:100%;
  2007. z-index:100;
  2008. .add-search-min-box{
  2009. background #fff
  2010. border-radius:10rpx;
  2011. padding:30rpx 20rpx;
  2012. margin:20rpx;
  2013. .add-search-box:nth-child(1){
  2014. margin-bottom:30rpx;
  2015. }
  2016. .add-search-box{
  2017. display flex
  2018. .add-search-title{
  2019. flex:1;
  2020. line-height:90rpx;
  2021. margin-right:20rpx;
  2022. font-size:30rpx;
  2023. }
  2024. .add-search-picker{
  2025. border:1rpx solid #E0E0E0;
  2026. width:431rpx;
  2027. padding:25rpx 25rpx;
  2028. // height:90rpx;
  2029. // min-height:90rpx;
  2030. line-height:40rpx;
  2031. color:#888;
  2032. border-radius:10rpx;
  2033. font-size:28rpx;
  2034. }
  2035. .add-search-input{
  2036. width:438rpx;
  2037. padding:20rpx 20rpx;
  2038. border:1rpx solid #E0E0E0;
  2039. height:80rpx;
  2040. line-height:40rpx;
  2041. border-radius:10rpx;
  2042. font-size:28rpx;
  2043. }
  2044. }
  2045. }
  2046. .add-search-button{
  2047. display flex
  2048. width:650rpx;
  2049. margin:0 auto 100rpx;
  2050. view{
  2051. text-align center
  2052. line-height:100rpx;
  2053. font-size:30rpx;
  2054. color:#fff;
  2055. }
  2056. view:nth-child(1){
  2057. width:325rpx;
  2058. line-height:100rpx;
  2059. background: linear-gradient(-45deg, #999, #999);
  2060. border-bottom-left-radius 50rpx
  2061. border-top-left-radius 50rpx
  2062. }
  2063. view:nth-child(2){
  2064. width:325rpx;
  2065. line-height:100rpx;
  2066. background: linear-gradient(-35deg, #309CFF, #0183FA);
  2067. border-bottom-right-radius 50rpx
  2068. border-top-right-radius 50rpx
  2069. }
  2070. }
  2071. }
  2072. .popup-max-box{
  2073. z-index:10;
  2074. height:100%;
  2075. width:100%;
  2076. position fixed;
  2077. background rgba(0,0,0,0.2)
  2078. display flex;
  2079. flex-direction column
  2080. .popup-null{
  2081. flex:1;
  2082. }
  2083. .popup-big-box{
  2084. border-top-left-radius:20rpx;
  2085. border-top-right-radius:20rpx;
  2086. background #fff
  2087. .popup-input-box{
  2088. padding:30rpx 20rpx;
  2089. display:flex;
  2090. input{
  2091. flex:1;
  2092. height:70rpx;
  2093. border:1rpx solid #e0e0e0;
  2094. border-radius:10rpx;
  2095. margin-right:20rpx;
  2096. padding:0 20rpx;
  2097. }
  2098. view{
  2099. background #0183FA
  2100. color:#fff;
  2101. border-radius:10rpx;
  2102. width:140rpx;
  2103. line-height:70rpx;
  2104. text-align center;
  2105. font-size:28rpx;
  2106. }
  2107. }
  2108. .popup-for-max-box{
  2109. margin:0 20rpx 30rpx;
  2110. height:600rpx;
  2111. overflow-y scroll;
  2112. .popup-for-null{
  2113. line-height:100rpx;
  2114. text-align center
  2115. color:#999;
  2116. }
  2117. .popup-for-box{
  2118. display:flex;
  2119. padding:10px 0;
  2120. .name-p{
  2121. flex:1;
  2122. line-height:60rpx;
  2123. }
  2124. .button-p{
  2125. background #0183FA
  2126. color:#fff;
  2127. text-align center
  2128. width:100rpx;
  2129. line-height:60rpx;
  2130. height:60rpx;
  2131. border-radius:10rpx;
  2132. }
  2133. }
  2134. }
  2135. }
  2136. }
  2137. .popup-max-box-two{
  2138. z-index:10;
  2139. height:100%;
  2140. width:100%;
  2141. position fixed;
  2142. background rgba(0,0,0,0.2)
  2143. display flex;
  2144. flex-direction column
  2145. .popup-null{
  2146. flex:1;
  2147. }
  2148. .popup-big-box{
  2149. border-top-left-radius:20rpx;
  2150. border-top-right-radius:20rpx;
  2151. background #fff
  2152. position relative;
  2153. .popup-two-title-box{
  2154. height:80rpx;
  2155. line-height:80rpx;
  2156. padding:0 20rpx;
  2157. font-size:34rpx;
  2158. text-align center;
  2159. border-bottom:1rpx solid #dedede;
  2160. }
  2161. .popup-position-right{
  2162. position absolute;
  2163. top:0;
  2164. right:20rpx;
  2165. line-height:80rpx;
  2166. font-size:28rpx;
  2167. color:#0183FA;
  2168. }
  2169. .popup-add-name-box{
  2170. display flex;
  2171. padding:0 40rpx;
  2172. margin-top:10rpx;
  2173. view:nth-child(1){
  2174. width:200rpx;
  2175. line-height:80rpx;
  2176. }
  2177. input{
  2178. border:1rpx solid #dedede;
  2179. padding:0 20rpx;
  2180. width:400rpx;
  2181. height:60rpx;
  2182. line-height:60rpx;
  2183. margin:10rpx 0 0 ;
  2184. }
  2185. }
  2186. .popup-top-box{
  2187. height:90rpx;
  2188. line-height:80rpx;
  2189. padding:0 20rpx;
  2190. font-size:30rpx;
  2191. margin:10rpx 20rpx;
  2192. overflow-x scroll
  2193. overflow-y hidden
  2194. white-space: nowrap;
  2195. view{
  2196. display inline-block
  2197. }
  2198. .view-inline-block-color{
  2199. border-bottom:4rpx solid #0183FA;
  2200. }
  2201. }
  2202. .popup-for-max-box{
  2203. padding:20rpx 0 0 0 ;
  2204. margin:0 20rpx 30rpx;
  2205. height:600rpx;
  2206. overflow-y scroll;
  2207. .popup-for-box{
  2208. display flex;
  2209. .left-img{
  2210. width:20rpx;
  2211. height:20rpx;
  2212. margin:30rpx;
  2213. }
  2214. .center-view{
  2215. padding:20rpx 0;
  2216. line-height:40rpx;
  2217. flex:1;
  2218. }
  2219. .right-img-box{
  2220. width:80rpx;
  2221. height:80rpx;
  2222. border-radius:50%;
  2223. .right-img{
  2224. width:18rpx;
  2225. height:36rpx;
  2226. margin:22rpx 31rpx;
  2227. }
  2228. }
  2229. }
  2230. }
  2231. .popup-button{
  2232. margin:20rpx auto;
  2233. width:500rpx;
  2234. height:80rpx;
  2235. line-height:80rpx;
  2236. text-align center;
  2237. color:#fff;
  2238. border-radius:20rpx;
  2239. }
  2240. .popup-button-colorA{
  2241. background #0183FA
  2242. }
  2243. .popup-button-colorB{
  2244. background #999
  2245. }
  2246. }
  2247. }
  2248. }
  2249. </style>