startChecking.vue 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318
  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. if(data.data[0].children[i].children){
  939. for(let o=0;o<data.data[0].children[i].children.length;o++){
  940. let obj = {
  941. id:data.data[0].children[i].children[o].id,
  942. label:data.data[0].children[i].children[o].label,
  943. }
  944. self.inspectionUnitArray.push(data.data[0].children[i].children[o].label)
  945. list.push(obj);
  946. }
  947. }else{
  948. self.inspectionUnitArray.push(data.data[0].children[i].label)
  949. list.push(obj);
  950. }
  951. }
  952. this.inspectionUnitArrayData = list;
  953. }
  954. },
  955. getTreeData(data){
  956. for(var i=0;i<data.length>0;i++){
  957. if(data[i].children == null||data[i].children.length<=0){
  958. // children若为空数组,则将children设为undefined
  959. data[i].children = undefined;
  960. }else {
  961. // children若不为空数组,则继续 递归调用 本方法
  962. this.getTreeData(data[i].children);
  963. }
  964. }
  965. return data;
  966. },
  967. // 图片上传
  968. selectImage(item) {
  969. let self = this;
  970. if(item.yhImg.length>4){
  971. uni.showToast({
  972. title: '最多上传5张图片',
  973. icon:"none",
  974. mask:true,
  975. duration: 2000
  976. });
  977. return
  978. }
  979. wx.chooseImage({
  980. count: 1,
  981. sizeType: ["original", "compressed"],
  982. sourceType: ["album", "camera"],
  983. success: function(res) {
  984. let tempFilePaths = res.tempFilePaths[0];
  985. self.uploadImg(tempFilePaths,item);
  986. }
  987. });
  988. },
  989. async uploadImg(tempFilePaths,item){
  990. var self = this;
  991. uni.showLoading({
  992. title: '上传中',
  993. mask: true
  994. });
  995. uni.uploadFile({
  996. url: config.base_url+'/file/upload', //仅为示例,非真实的接口地址
  997. header:{'Authorization':uni.getStorageSync('token')},
  998. filePath: tempFilePaths,
  999. name: 'file',
  1000. formData: {
  1001. 'user': 'test'
  1002. },
  1003. success: (uploadFileRes) => {
  1004. let res = JSON.parse(uploadFileRes.data);
  1005. if(res.code == 200){
  1006. item.yhImg.push(res.data.url);
  1007. console.log(res.data.url)
  1008. }else{
  1009. uni.showToast({
  1010. title: res.msg,
  1011. icon:"none",
  1012. mask:true,
  1013. duration: 2000
  1014. });
  1015. }
  1016. },
  1017. fail: err => {},
  1018. complete: () => {
  1019. uni.hideLoading()
  1020. }
  1021. });
  1022. },
  1023. //删除图片
  1024. delImg(index,minIndex){
  1025. this.form.detailsList[index].yhImg.splice(minIndex,1);
  1026. this.$forceUpdate();
  1027. },
  1028. //添加隐患
  1029. addDanger(){
  1030. if(this.form.detailsList.length>19){
  1031. uni.showToast({
  1032. title: '最多添加20个隐患',
  1033. icon:"none",
  1034. mask:true,
  1035. duration: 2000
  1036. });
  1037. return
  1038. }
  1039. let obj = {
  1040. isLingshi:0,
  1041. yhImg:[],
  1042. voice:[],
  1043. yhMs:"",
  1044. jcxId:"",
  1045. jcxName:"",
  1046. }
  1047. this.form.detailsList.push(obj);
  1048. this.getCheckOptionList();
  1049. this.$forceUpdate();
  1050. },
  1051. //删除隐患
  1052. delDetailsList(index){
  1053. this.form.detailsList.splice(index,1);
  1054. this.$forceUpdate();
  1055. },
  1056. //子页面切换
  1057. goMinButton(type){
  1058. let self = this;
  1059. if(type == 1){
  1060. this.minPageType = 1;
  1061. }else if(type == 2){
  1062. for(let i=0;i<self.form.detailsList.length;i++){
  1063. console.log(self.form.detailsList[i])
  1064. console.log(typeof(self.form.detailsList[i].yhMs))
  1065. console.log(typeof(self.form.detailsList[i].voice))
  1066. let num = i+1;
  1067. // if(!self.form.detailsList[i].yhImg[0]){
  1068. // uni.showToast({
  1069. // title: '第'+num+'个隐患项未上传图片',
  1070. // icon:"none",
  1071. // mask:true,
  1072. // duration: 2000
  1073. // });
  1074. // return
  1075. // }else
  1076. /* if(!self.form.detailsList[i].yhMs){
  1077. uni.showToast({
  1078. title: '第'+num+'未填写隐患描述',
  1079. icon:"none",
  1080. mask:true,
  1081. duration: 2000
  1082. });
  1083. return
  1084. }else */ if(!self.form.detailsList[i].jcxName){
  1085. uni.showToast({
  1086. title: '第'+num+'未选择隐患项',
  1087. icon:"none",
  1088. mask:true,
  1089. duration: 2000
  1090. });
  1091. return
  1092. }else if(!self.form.detailsList[i].yhMs && self.form.detailsList[i].voice.length<=0){
  1093. uni.showToast({
  1094. title: '请输入第'+num+'项隐患描述!',
  1095. icon:"none",
  1096. mask:true,
  1097. duration: 2000
  1098. });
  1099. return
  1100. }
  1101. }
  1102. this.minPageType = 2;
  1103. }
  1104. },
  1105. //整改类型选中事件
  1106. rectificationTypeChange(e){
  1107. if(e.target.value == 0){
  1108. this.rectificationType = "一般整改";
  1109. }else if(e.target.value == 1){
  1110. this.rectificationType = "重大整改";
  1111. }
  1112. this.form.zgType = e.target.value;
  1113. },
  1114. //检查单位选中事件
  1115. inspectionUnitChange(e){
  1116. this.form.jcDw = this.inspectionUnitArrayData[e.target.value].id;
  1117. this.form.jcDwName = this.inspectionUnitArrayData[e.target.value].label;
  1118. this.inspectionUnit = this.inspectionUnitArrayData[e.target.value].label;
  1119. },
  1120. //截止时间选中事件
  1121. deadlineChange(e){
  1122. let time = e.target.value.replace(/-/g, '/')
  1123. time = Date.parse(time)
  1124. let time2 = new Date().setHours(0,0,0,0)
  1125. if(time<time2){
  1126. uni.showToast({
  1127. title: '请选择今天或以后的时间',
  1128. icon:"none",
  1129. mask:true,
  1130. duration: 2000
  1131. });
  1132. return
  1133. }
  1134. console.log('picker发送选择改变,携带值为', e.target.value)
  1135. this.form.zgjzTime = e.target.value;
  1136. this.deadline = e.target.value
  1137. },
  1138. //发布
  1139. async releaseFun(){
  1140. let self=this;
  1141. let type=this.submitStatus;
  1142. let obj = JSON.parse(JSON.stringify(this.form))
  1143. for(let i=0;i<obj.detailsList.length;i++){
  1144. if(obj.detailsList[i].jcxName.indexOf("/") != -1){
  1145. let list = obj.detailsList[i].jcxName.split("/");
  1146. obj.detailsList[i].jcxName = list[list.length-1];
  1147. }
  1148. obj.detailsList[i].jcxId = obj.detailsList[i].jcxId + ',';
  1149. obj.detailsList[i].yhImg = obj.detailsList[i].yhImg + '';
  1150. obj.detailsList[i].voice = JSON.stringify(obj.detailsList[i].voice);
  1151. }
  1152. obj.zgStatus = 0;
  1153. if(self.id){
  1154. obj.isCg=0;
  1155. obj.isFabu=1;
  1156. const {data} = await checkRecordUpdate(obj);
  1157. if(data.code == 200){
  1158. uni.showToast({
  1159. title: type == 1?'保存草稿成功':(type == 2?'提交成功':''),
  1160. icon:"none",
  1161. mask:true,
  1162. duration: 2000
  1163. });
  1164. setTimeout(function(){
  1165. uni.navigateBack();
  1166. },2000);
  1167. }
  1168. }else{
  1169. self.saveSubmit(obj,type)
  1170. }
  1171. },
  1172. //保存草稿
  1173. async saveDraft(obj,type){
  1174. obj.isCg=1;
  1175. const {data} = await checkRecordAddC(obj);
  1176. if(data.code == 200){
  1177. uni.showToast({
  1178. title: type == 1?'保存草稿成功':(type == 2?'提交成功':''),
  1179. icon:"none",
  1180. mask:true,
  1181. duration: 2000
  1182. });
  1183. setTimeout(function(){
  1184. uni.navigateBack();
  1185. },2000);
  1186. }
  1187. },
  1188. //立即提交
  1189. async saveSubmit(obj,type){
  1190. obj.isCg=0;
  1191. obj.isFabu=1;
  1192. const {data} = await checkRecordAdd(obj);
  1193. if(data.code == 200){
  1194. uni.showToast({
  1195. title: type == 1?'保存草稿成功':(type == 2?'提交成功':''),
  1196. icon:"none",
  1197. mask:true,
  1198. duration: 2000
  1199. });
  1200. setTimeout(function(){
  1201. uni.navigateBack();
  1202. },2000);
  1203. }
  1204. },
  1205. //提交接口
  1206. async upDataClick(type){
  1207. let self = this;
  1208. this.submitStatus=type;//提交检查和保存草稿箱按钮点击状态保存
  1209. if(!this.form.zgjzTime){
  1210. uni.showToast({
  1211. title: '请选择整改时间',
  1212. icon:"none",
  1213. mask:true,
  1214. duration: 2000
  1215. });
  1216. return
  1217. }
  1218. if(this.form.zgType != 0 && this.form.zgType != 1){
  1219. uni.showToast({
  1220. title: '请选择整改类型',
  1221. icon:"none",
  1222. mask:true,
  1223. duration: 2000
  1224. });
  1225. return
  1226. }
  1227. if(!this.form.jcDw){
  1228. uni.showToast({
  1229. title: '请选择检查单位',
  1230. icon:"none",
  1231. mask:true,
  1232. duration: 2000
  1233. });
  1234. return
  1235. }
  1236. let isVoice=false;
  1237. let obj = JSON.parse(JSON.stringify(this.form))
  1238. for(let i=0;i<obj.detailsList.length;i++){
  1239. if(obj.detailsList[i].jcxName.indexOf("/") != -1){
  1240. let list = obj.detailsList[i].jcxName.split("/");
  1241. obj.detailsList[i].jcxName = list[list.length-1];
  1242. }
  1243. obj.detailsList[i].jcxId = obj.detailsList[i].jcxId + ',';
  1244. obj.detailsList[i].yhImg = obj.detailsList[i].yhImg + '';
  1245. obj.detailsList[i].voice = JSON.stringify(obj.detailsList[i].voice);
  1246. }
  1247. if(type==1){//保存草稿
  1248. self.saveDraft(obj,type)
  1249. }else if(type==2){//提交
  1250. //如果有语音备注,提示
  1251. this.form.detailsList.forEach(function(item){
  1252. if(!item.yhMs && item.voice.length>=0){
  1253. isVoice=true;
  1254. console.log('没有备注,但是有语音')
  1255. return
  1256. }else{
  1257. isVoice=false;
  1258. }
  1259. })
  1260. if(isVoice==true){//有语音
  1261. uni.showModal({
  1262. title: '',
  1263. cancelText:'保存草稿',
  1264. cancelColor:'#999999',
  1265. confirmColor:'#0183FA',
  1266. confirmText:'继续发布',
  1267. content: '当前隐患描述使用语音备注,可以补充文字描述后提交发布或者 保存草稿箱后续发布?',
  1268. success (res) {
  1269. if (res.confirm) {
  1270. console.log('继续发布')
  1271. self.minPageType=1;
  1272. } else if (res.cancel) {
  1273. console.log('保存草稿')
  1274. self.saveDraft(obj,type)
  1275. }
  1276. }
  1277. })
  1278. }else{
  1279. console.log('没有语音')
  1280. self.$refs.popup.open()
  1281. }
  1282. }
  1283. },
  1284. /**************************搜索项***************************/
  1285. //搜索
  1286. inputSearch(event){
  1287. console.log("e",event.detail.value)
  1288. },
  1289. //选中固有检查项(新)
  1290. onchange(e,index) {
  1291. let self = this;
  1292. let val = e.detail.value[e.detail.value.length-1].value
  1293. let num = 0;
  1294. for(let i=0;i<self.temporaryIdList.length;i++){
  1295. if(self.temporaryIdList[i] == val){
  1296. num++
  1297. }
  1298. }
  1299. if(num == 0){
  1300. this.$set(this.form.detailsList[index],'isLingshi',0);
  1301. }else{
  1302. this.$set(this.form.detailsList[index],'isLingshi',1);
  1303. }
  1304. let list = [];
  1305. let listName=[];
  1306. for(let i=0;i<e.detail.value.length;i++){
  1307. list.push(e.detail.value[i].value)
  1308. if(i<3){
  1309. listName.push(e.detail.value[i].text)
  1310. }
  1311. }
  1312. let jcxSstkNum=this.getTreeName(this.checkOptionList[0],e.detail.value[e.detail.value.length-1].value)
  1313. this.$set(this.form.detailsList[index],'jcxSstkNum',jcxSstkNum);
  1314. this.$set(this.form.detailsList[index],'jcxId',list);
  1315. this.$set(this.form.detailsList[index],'jcxSstkMs',listName.join('-'));
  1316. this.$set(this.form.detailsList[index],'jcxName',e.detail.value[e.detail.value.length-1].text);
  1317. },
  1318. //根据id查找父元素
  1319. getTreeName(list,id){
  1320. let _this=this
  1321. for (let i = 0; i < list.length; i++) {
  1322. let a=list[i]
  1323. if(a.id===id){
  1324. return a.code
  1325. }else{
  1326. if(a.children && a.children.length>0){
  1327. let res=_this.getTreeName(a.children,id)
  1328. if(res){
  1329. return res
  1330. }
  1331. }
  1332. }
  1333. }
  1334. },
  1335. onnodeclick(node) {
  1336. console.log("node",node)
  1337. },
  1338. //新增检查项-按钮
  1339. dialogClick(index){
  1340. this.examinationForm.name = "";
  1341. this.examinationForm.value = "";
  1342. this.examinationForm.idList = "";
  1343. this.openIndex = index;
  1344. this.open = true;
  1345. },
  1346. dialogClickOff(){
  1347. this.open = false;
  1348. },
  1349. onchangeTwo(e){
  1350. this.jcxSstkNum=[];
  1351. this.jcxSstkMs='';
  1352. this.$set(this.examinationForm,'value',e.detail.value[e.detail.value.length-1].text);
  1353. this.$set(this.examinationForm,'idList',e.detail.value[e.detail.value.length-1].value);
  1354. let list = [];
  1355. let listName=[];
  1356. for(let i=0;i<e.detail.value.length;i++){
  1357. list.push(e.detail.value[i].value)
  1358. if(i<3){
  1359. listName.push(e.detail.value[i].text)
  1360. }
  1361. }
  1362. console.log(9999)
  1363. console.log(this.checkOptionListExamination)
  1364. let jcxSstkNum=this.getTreeName(this.checkOptionListExamination,e.detail.value[e.detail.value.length-1].value)
  1365. this.jcxSstkNum=jcxSstkNum;
  1366. this.jcxSstkMs=listName.join('-');
  1367. console.log(this.jcxSstkNum)
  1368. console.log(this.jcxSstkMs)
  1369. // this.$forceUpdate();
  1370. },
  1371. onnodeclickTwo(node) {
  1372. console.log("node",node)
  1373. },
  1374. //新增检查项-提交
  1375. async addPopupTwoButtonClick(){
  1376. let self = this;
  1377. if(!this.examinationForm.name){
  1378. uni.showToast({
  1379. title: '请输入检查项名称',
  1380. icon:"none",
  1381. mask:true,
  1382. duration: 2000
  1383. });
  1384. return
  1385. }
  1386. if(!this.examinationForm.value){
  1387. uni.showToast({
  1388. title: '请选择所属目录',
  1389. icon:"none",
  1390. mask:true,
  1391. duration: 2000
  1392. });
  1393. return
  1394. }
  1395. let obj = {
  1396. name:this.examinationForm.name,
  1397. parentId:this.examinationForm.idList
  1398. };
  1399. const {data} = await addTempCheckOption(obj);
  1400. if(data.code == 200){
  1401. let list = JSON.parse(JSON.stringify(this.checkOptionList));
  1402. let obj = {
  1403. id:data.data.id,
  1404. name:data.data.name,
  1405. };
  1406. list.push(obj);
  1407. this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)));
  1408. this.temporaryIdList.push(data.data.id);
  1409. this.$set(this.form.detailsList[this.openIndex],'jcxId',data.data.id);
  1410. this.$set(this.form.detailsList[this.openIndex],'jcxName',data.data.name);
  1411. this.$set(this.form.detailsList[this.openIndex],'isLingshi',1);
  1412. this.$set(this.form.detailsList[this.openIndex],'jcxSstkNum',this.jcxSstkNum);
  1413. this.$set(this.form.detailsList[this.openIndex],'jcxSstkMs',this.jcxSstkMs);
  1414. uni.showToast({
  1415. title: '新增成功',
  1416. icon:"none",
  1417. mask:true,
  1418. duration: 2000
  1419. });
  1420. this.open = false;
  1421. }
  1422. },
  1423. }
  1424. }
  1425. </script>
  1426. <style lang="stylus" scoped>
  1427. #startChecking{
  1428. height: 100%;
  1429. width: 100%;
  1430. display flex
  1431. .startCheckingPage{
  1432. flex:1;
  1433. .startCheckingPage-top-box{
  1434. flex:1;
  1435. margin:20rpx;
  1436. background #fff
  1437. border-radius:20rpx;
  1438. padding:30rpx;
  1439. .item-picker-box{
  1440. display: flex
  1441. margin-bottom:20rpx;
  1442. .name-p{
  1443. width:123rpx;
  1444. line-height:90rpx;
  1445. text-align right
  1446. }
  1447. .span-p{
  1448. width:36rpx;
  1449. color:#FF7373;
  1450. line-height:90rpx;
  1451. }
  1452. .picker-big-box{
  1453. flex:1;
  1454. border:2rpx solid #E0E0E0;
  1455. border-radius:10rpx;
  1456. height:90rpx;
  1457. .picker-box{
  1458. flex:1;
  1459. display flex
  1460. .picker-text{
  1461. flex:1;
  1462. line-height:90rpx;
  1463. margin-left:20rpx;
  1464. color:#999;
  1465. font-size:28rpx;
  1466. }
  1467. input{
  1468. height:90rpx;
  1469. }
  1470. .img-box{
  1471. width:78rpx;
  1472. height:90rpx;
  1473. img{
  1474. width:30rpx;
  1475. height:28rpx;
  1476. margin:34rpx 28rpx;
  1477. }
  1478. }
  1479. }
  1480. .picker-back{
  1481. background:#f5f5f5;
  1482. }
  1483. }
  1484. }
  1485. }
  1486. .startCheckingPage-bottom-button{
  1487. height:100rpx;
  1488. width:650rpx;
  1489. text-align center
  1490. color:#fff;
  1491. background #0183FA
  1492. margin:80rpx auto;
  1493. line-height:100rpx;
  1494. font-size:28rpx;
  1495. border-radius:20rpx;
  1496. }
  1497. }
  1498. .check-item-page{
  1499. flex:1;
  1500. .user-info-box{
  1501. width:710rpx;
  1502. height:200rpx;
  1503. margin:20rpx;
  1504. background #fff
  1505. border-radius:20rpx;
  1506. display flex
  1507. .user-info-left{
  1508. flex:1;
  1509. margin:0 25rpx 0 16rpx;
  1510. .user-info-min-box:nth-child(1){
  1511. border-bottom:1rpx solid #E0E0E0;
  1512. }
  1513. .user-info-min-box{
  1514. display flex
  1515. img{
  1516. height:30rpx;
  1517. width:30rpx;
  1518. margin:37rpx 13rpx 0 16rpx;
  1519. }
  1520. view{
  1521. line-height:100rpx;
  1522. }
  1523. view:nth-child(2){
  1524. font-size:30rpx;
  1525. width:190rpx;
  1526. color:#999999;
  1527. }
  1528. view:nth-child(3){
  1529. width:390rpx;
  1530. display:block;
  1531. overflow:hidden;
  1532. text-overflow:ellipsis;
  1533. white-space:nowrap;
  1534. text-align right;
  1535. font-size:28rpx;
  1536. }
  1537. }
  1538. }
  1539. .user-info-right{
  1540. width:12rpx;
  1541. height:24rpx;
  1542. margin:88rpx 27rpx 0 0;
  1543. }
  1544. }
  1545. .check-for-max-box{
  1546. .check-for-big-box{
  1547. width 710rpx;
  1548. //padding-top:30rpx;
  1549. margin:0 20rpx 20rpx;
  1550. background #fff
  1551. border-radius:20rpx;
  1552. overflow hidden
  1553. position relative;
  1554. padding:20rpx;
  1555. box-sizing border-box;
  1556. .check-for-img-max-box{
  1557. //display flex
  1558. .left-title-p{
  1559. width:150rpx;
  1560. line-height:88rpx;
  1561. text-align right
  1562. font-size:30rpx;
  1563. }
  1564. .right-img-box{
  1565. margin-top:30rpx;
  1566. .img-box{
  1567. display inline-block;
  1568. height:200rpx;
  1569. width:200rpx;
  1570. position relative
  1571. margin:0 20rpx 20rpx 0;
  1572. border-radius 10rpx;
  1573. overflow hidden;
  1574. .img-data{
  1575. height:200rpx;
  1576. width:200rpx;
  1577. }
  1578. .position-img{
  1579. position absolute
  1580. right:0;
  1581. top:0;
  1582. width:36rpx;
  1583. height:36rpx;
  1584. }
  1585. }
  1586. .add-button{
  1587. margin:0 20rpx 20rpx 0;
  1588. border-radius 10rpx;
  1589. overflow hidden;
  1590. display inline-block
  1591. height:200rpx;
  1592. width:200rpx;
  1593. }
  1594. }
  1595. }
  1596. /* 语音备注 */
  1597. .voice{
  1598. .voice_t{
  1599. width:150rpx;
  1600. line-height:88rpx;
  1601. text-align right
  1602. font-size:30rpx;
  1603. }
  1604. .voice_b{
  1605. display flex;
  1606. justify-content flex-start;
  1607. align-items center;
  1608. margin-bottom :30rpx;
  1609. .voice_b_l{
  1610. width: 400rpx;
  1611. height: 40rpx;
  1612. background:rgba(88,175,255,0.3);
  1613. border-radius: 10rpx;
  1614. display flex;
  1615. justify-content flex-start;
  1616. align-items center;
  1617. >img{
  1618. width: 18rpx;
  1619. height: 24rpx;
  1620. margin-left:16rpx;
  1621. margin-right :20rpx;
  1622. }
  1623. }
  1624. .voice_b_r{
  1625. width: 28rpx;
  1626. height: 28rpx;
  1627. margin-left:20rpx;
  1628. }
  1629. }
  1630. }
  1631. .broadcast_m{
  1632. width: 142rpx;
  1633. height: 142rpx;
  1634. position :fixed;
  1635. right :10rpx;
  1636. bottom:188rpx;
  1637. z-index :100;
  1638. .broadcast_m_t{
  1639. width: 142rpx;
  1640. height: 142rpx;
  1641. position :relative;
  1642. font-size: 24rpx;
  1643. font-family: PingFang SC;
  1644. font-weight: 500;
  1645. line-height: 170rpx;
  1646. text-align center
  1647. >img{
  1648. width: 142rpx;
  1649. height: 142rpx;
  1650. position :absolute;
  1651. }
  1652. >label{
  1653. width :100%;
  1654. font-size: 24rpx;
  1655. font-family: PingFang SC;
  1656. font-weight: 500;
  1657. color: #0183FA;
  1658. line-height: 24rpx;
  1659. display :inline-block;
  1660. text-align :center;
  1661. position :absolute;
  1662. top:76rpx;
  1663. }
  1664. /* 按下 */
  1665. .press_color{
  1666. color: #FFFFFF;
  1667. }
  1668. /* 松开 */
  1669. .slip_color{
  1670. color: #0183FA;
  1671. }
  1672. }
  1673. .broadcast_m_t_back_a{
  1674. background:url(@/images/icon_sskz_skfs.png);
  1675. background-size 100%
  1676. color: #FFFFFF;
  1677. }
  1678. .broadcast_m_t_back_b{
  1679. background:url(@/images/icon_sskz_azsh.png);
  1680. background-size 100%
  1681. color: #0183FA;
  1682. }
  1683. .broadcast_m_b{
  1684. font-size: 24rpx;
  1685. font-family: PingFang SC;
  1686. font-weight: 500;
  1687. color: #999999;
  1688. line-height: 24rpx;
  1689. text-align center;
  1690. margin-top :14rpx;
  1691. }
  1692. }
  1693. .check-for-input-max-box{
  1694. //display flex
  1695. margin-top:20rpx;
  1696. .left-title-p{
  1697. width:150rpx;
  1698. line-height:88rpx;
  1699. text-align right
  1700. font-size:30rpx;
  1701. }
  1702. textarea{
  1703. border:1rpx solid #E0E0E0;
  1704. width 630rpx;
  1705. height:210rpx;
  1706. border-radius:10rpx;
  1707. line-height :40rpx;
  1708. padding:20rpx;
  1709. font-size:28rpx;
  1710. }
  1711. }
  1712. .check-for-button-max-box{
  1713. display flex
  1714. margin-top:30rpx;
  1715. margin-bottom:20rpx;
  1716. .left-title-p{
  1717. width:150rpx;
  1718. line-height:88rpx;
  1719. text-align right
  1720. font-size:30rpx;
  1721. }
  1722. .button-text-p{
  1723. border:1rpx solid #E0E0E0;
  1724. width:440rpx;
  1725. height:80rpx;
  1726. border-radius:10rpx;
  1727. line-height :80rpx;
  1728. color: #A2A2A2
  1729. padding:0 20rpx;
  1730. font-size:28rpx;
  1731. display:block;
  1732. overflow:hidden;
  1733. text-overflow:ellipsis;
  1734. white-space:nowrap;
  1735. }
  1736. }
  1737. .check-for-button-add-p{
  1738. text-align center;
  1739. line-height:80rpx;
  1740. color:#007AFF;
  1741. margin-bottom:20rpx;
  1742. }
  1743. .check-for-big-box-position-img-box{
  1744. position absolute
  1745. top:0;
  1746. right:0;
  1747. width:60rpx;
  1748. height:60rpx;
  1749. img{
  1750. width:36rpx;
  1751. height:36rpx;
  1752. margin:12rpx;
  1753. }
  1754. }
  1755. }
  1756. }
  1757. .add-for-item-p{
  1758. width:500rpx;
  1759. height:80rpx;
  1760. border:4rpx dashed #0183FA;
  1761. color:#0183FA;
  1762. font-size:28rpx;
  1763. background #fff
  1764. text-align center
  1765. line-height:80rpx;
  1766. border-radius:10rpx;
  1767. margin:40rpx auto 100rpx;
  1768. }
  1769. .check-button-box-one{
  1770. width:650rpx;
  1771. margin:0 auto 100rpx;
  1772. background: linear-gradient(-45deg, #FA9901, #F28E26);
  1773. text-align:center;
  1774. line-height:100rpx;
  1775. font-size:30rpx;
  1776. color:#fff;
  1777. border-radius:50rpx;
  1778. }
  1779. .check-button-box{
  1780. display flex
  1781. width:650rpx;
  1782. margin:0 auto 100rpx;
  1783. view{
  1784. text-align center
  1785. line-height:100rpx;
  1786. font-size:30rpx;
  1787. color:#fff;
  1788. }
  1789. view:nth-child(1){
  1790. width:325rpx;
  1791. line-height:100rpx;
  1792. background: linear-gradient(-45deg, #FA9901, #F28E26);
  1793. border-bottom-left-radius 50rpx
  1794. border-top-left-radius 50rpx
  1795. }
  1796. view:nth-child(2){
  1797. width:325rpx;
  1798. line-height:100rpx;
  1799. background: linear-gradient(-35deg, #309CFF, #0183FA);
  1800. border-bottom-right-radius 50rpx
  1801. border-top-right-radius 50rpx
  1802. }
  1803. }
  1804. .danger-list-box{
  1805. display flex
  1806. background #fff
  1807. margin:0 20rpx;
  1808. border-radius:20rpx;
  1809. .danger-list-left-img{
  1810. height:30rpx;
  1811. width:30rpx;
  1812. margin:37rpx 13rpx 0 30rpx;
  1813. }
  1814. view{
  1815. line-height:100rpx;
  1816. }
  1817. .danger-list-left-text{
  1818. font-size:30rpx;
  1819. flex:1;
  1820. color:#999999;
  1821. }
  1822. .danger-list-left-num{
  1823. font-size:28rpx;
  1824. margin-right:50rpx;
  1825. }
  1826. .danger-list-right-img{
  1827. width:12rpx;
  1828. height:24rpx;
  1829. margin:38rpx 30rpx 0 0
  1830. }
  1831. }
  1832. .danger-title-text-p{
  1833. line-height:80rpx;
  1834. font-size:30rpx;
  1835. color:#333;
  1836. margin-left:40rpx;
  1837. }
  1838. .danger-info-picker-max-box{
  1839. margin:0 20rpx 100rpx;
  1840. background #fff
  1841. border-radius:20rpx;
  1842. padding:30rpx;
  1843. .danger-info-picker-box:nth-child(1){
  1844. margin-top:0;
  1845. }
  1846. .danger-info-picker-box{
  1847. display flex
  1848. margin-top:26rpx;
  1849. .danger-info-picker-title{
  1850. line-height:80rpx;
  1851. font-size:30rpx;
  1852. color:#333;
  1853. }
  1854. .picker-text{
  1855. width:480rpx;
  1856. height:80rpx;
  1857. border: 2rpx solid #E0E0E0;
  1858. padding-left:20rpx;
  1859. margin-left:20rpx;
  1860. color:#A2A2A2;
  1861. font-size:28rpx;
  1862. line-height 80rpx
  1863. border-radius:10rpx;
  1864. }
  1865. }
  1866. }
  1867. /* 检查名称弹框 */
  1868. .inspect_name{
  1869. .popup-content{
  1870. width: 750rpx;
  1871. height: 350rpx;
  1872. background: #FFFFFF;
  1873. border-radius: 10rpx 10rpx 0px 0px;
  1874. padding :0 50rpx;
  1875. box-sizing :border-box;
  1876. overflow :hidden;
  1877. .inspect_name_t{
  1878. display flex
  1879. margin-top:66rpx;
  1880. .inspect_name_t_l{
  1881. line-height:80rpx;
  1882. font-size:30rpx;
  1883. color:#333;
  1884. }
  1885. >input{
  1886. width:440rpx;
  1887. height:80rpx;
  1888. border: 2rpx solid #E0E0E0;
  1889. padding-left:20rpx;
  1890. margin-left:20rpx;
  1891. color:#A2A2A2;
  1892. font-size:28rpx;
  1893. line-height 80rpx
  1894. border-radius:10rpx;
  1895. }
  1896. }
  1897. .inspect_name_b{
  1898. margin-top :64rpx;
  1899. width: 650rpx;
  1900. height: 80rpx;
  1901. background: linear-gradient(-35deg, #309CFF, #0183FA);
  1902. border-radius: 40rpx;
  1903. font-size: 30rpx;
  1904. font-family: PingFang SC;
  1905. font-weight: 500;
  1906. color: #FFFFFF;
  1907. line-height: 80rpx;
  1908. text-align :center;
  1909. }
  1910. }
  1911. }
  1912. }
  1913. .search-max-box{
  1914. flex:1;
  1915. display flex
  1916. flex-direction column
  1917. .search-top-input-box{
  1918. overflow hidden
  1919. height:150rpx;
  1920. background #fff
  1921. input{
  1922. width:670rpx;
  1923. height:80rpx;
  1924. border:1rpx solid #E0E0E0;
  1925. border-radius:10rpx;
  1926. margin:34rpx auto;
  1927. padding:0 20rpx;
  1928. font-size:28rpx;
  1929. color:#A2A2A2;
  1930. }
  1931. }
  1932. .scroll-box{
  1933. flex:1;
  1934. padding-top:20rpx;
  1935. .search-for-box:nth-child(1){
  1936. view:nth-child(1){
  1937. border-top:none;
  1938. }
  1939. }
  1940. .search-for-box{
  1941. margin:0 20rpx;
  1942. background #fff
  1943. view:nth-child(1){
  1944. line-height:28rpx;
  1945. font-size:28rpx;
  1946. padding-top:20rpx;
  1947. margin:0 20rpx 20rpx;
  1948. border-top:1rpx solid #E0E0E0;
  1949. }
  1950. view:nth-child(2){
  1951. line-height:30rpx;
  1952. font-size:24rpx;
  1953. color:#666;
  1954. margin:0 20rpx;
  1955. padding-bottom:20rpx;
  1956. }
  1957. }
  1958. .search-add-item{
  1959. width:680rpx;
  1960. margin:20rpx auto;
  1961. height:70rpx;
  1962. background #dedede;
  1963. display flex
  1964. border-radius:10rpx;
  1965. view{
  1966. font-size:24rpx;
  1967. line-height:70rpx;
  1968. }
  1969. view:nth-child(1){
  1970. color:#999;
  1971. flex:1;
  1972. margin-left:45rpx;
  1973. }
  1974. view:nth-child(2){
  1975. color:#0183FA;
  1976. margin-right:45rpx;
  1977. }
  1978. }
  1979. .search-null-box{
  1980. img{
  1981. width:274rpx;
  1982. height:274rpx;
  1983. margin:100rpx 0 20rpx 270rpx;
  1984. }
  1985. view:nth-child(2){
  1986. margin:40rpx auto 90rpx;
  1987. color:#999;
  1988. font-size:28rpx;
  1989. text-align center
  1990. }
  1991. view:nth-child(3){
  1992. width:300rpx;
  1993. height:70rpx;
  1994. line-height:70rpx;
  1995. text-align center
  1996. font-size:28rpx;
  1997. color:#fff;
  1998. background #0183FA
  1999. border-radius:50rpx;
  2000. margin:0 auto;
  2001. }
  2002. }
  2003. }
  2004. }
  2005. .add-search-max-box{
  2006. background #fff;
  2007. position fixed;
  2008. width:100%;
  2009. height:100%;
  2010. z-index:100;
  2011. .add-search-min-box{
  2012. background #fff
  2013. border-radius:10rpx;
  2014. padding:30rpx 20rpx;
  2015. margin:20rpx;
  2016. .add-search-box:nth-child(1){
  2017. margin-bottom:30rpx;
  2018. }
  2019. .add-search-box{
  2020. display flex
  2021. .add-search-title{
  2022. flex:1;
  2023. line-height:90rpx;
  2024. margin-right:20rpx;
  2025. font-size:30rpx;
  2026. }
  2027. .add-search-picker{
  2028. border:1rpx solid #E0E0E0;
  2029. width:431rpx;
  2030. padding:25rpx 25rpx;
  2031. // height:90rpx;
  2032. // min-height:90rpx;
  2033. line-height:40rpx;
  2034. color:#888;
  2035. border-radius:10rpx;
  2036. font-size:28rpx;
  2037. }
  2038. .add-search-input{
  2039. width:438rpx;
  2040. padding:20rpx 20rpx;
  2041. border:1rpx solid #E0E0E0;
  2042. height:80rpx;
  2043. line-height:40rpx;
  2044. border-radius:10rpx;
  2045. font-size:28rpx;
  2046. }
  2047. }
  2048. }
  2049. .add-search-button{
  2050. display flex
  2051. width:650rpx;
  2052. margin:0 auto 100rpx;
  2053. view{
  2054. text-align center
  2055. line-height:100rpx;
  2056. font-size:30rpx;
  2057. color:#fff;
  2058. }
  2059. view:nth-child(1){
  2060. width:325rpx;
  2061. line-height:100rpx;
  2062. background: linear-gradient(-45deg, #999, #999);
  2063. border-bottom-left-radius 50rpx
  2064. border-top-left-radius 50rpx
  2065. }
  2066. view:nth-child(2){
  2067. width:325rpx;
  2068. line-height:100rpx;
  2069. background: linear-gradient(-35deg, #309CFF, #0183FA);
  2070. border-bottom-right-radius 50rpx
  2071. border-top-right-radius 50rpx
  2072. }
  2073. }
  2074. }
  2075. .popup-max-box{
  2076. z-index:10;
  2077. height:100%;
  2078. width:100%;
  2079. position fixed;
  2080. background rgba(0,0,0,0.2)
  2081. display flex;
  2082. flex-direction column
  2083. .popup-null{
  2084. flex:1;
  2085. }
  2086. .popup-big-box{
  2087. border-top-left-radius:20rpx;
  2088. border-top-right-radius:20rpx;
  2089. background #fff
  2090. .popup-input-box{
  2091. padding:30rpx 20rpx;
  2092. display:flex;
  2093. input{
  2094. flex:1;
  2095. height:70rpx;
  2096. border:1rpx solid #e0e0e0;
  2097. border-radius:10rpx;
  2098. margin-right:20rpx;
  2099. padding:0 20rpx;
  2100. }
  2101. view{
  2102. background #0183FA
  2103. color:#fff;
  2104. border-radius:10rpx;
  2105. width:140rpx;
  2106. line-height:70rpx;
  2107. text-align center;
  2108. font-size:28rpx;
  2109. }
  2110. }
  2111. .popup-for-max-box{
  2112. margin:0 20rpx 30rpx;
  2113. height:600rpx;
  2114. overflow-y scroll;
  2115. .popup-for-null{
  2116. line-height:100rpx;
  2117. text-align center
  2118. color:#999;
  2119. }
  2120. .popup-for-box{
  2121. display:flex;
  2122. padding:10px 0;
  2123. .name-p{
  2124. flex:1;
  2125. line-height:60rpx;
  2126. }
  2127. .button-p{
  2128. background #0183FA
  2129. color:#fff;
  2130. text-align center
  2131. width:100rpx;
  2132. line-height:60rpx;
  2133. height:60rpx;
  2134. border-radius:10rpx;
  2135. }
  2136. }
  2137. }
  2138. }
  2139. }
  2140. .popup-max-box-two{
  2141. z-index:10;
  2142. height:100%;
  2143. width:100%;
  2144. position fixed;
  2145. background rgba(0,0,0,0.2)
  2146. display flex;
  2147. flex-direction column
  2148. .popup-null{
  2149. flex:1;
  2150. }
  2151. .popup-big-box{
  2152. border-top-left-radius:20rpx;
  2153. border-top-right-radius:20rpx;
  2154. background #fff
  2155. position relative;
  2156. .popup-two-title-box{
  2157. height:80rpx;
  2158. line-height:80rpx;
  2159. padding:0 20rpx;
  2160. font-size:34rpx;
  2161. text-align center;
  2162. border-bottom:1rpx solid #dedede;
  2163. }
  2164. .popup-position-right{
  2165. position absolute;
  2166. top:0;
  2167. right:20rpx;
  2168. line-height:80rpx;
  2169. font-size:28rpx;
  2170. color:#0183FA;
  2171. }
  2172. .popup-add-name-box{
  2173. display flex;
  2174. padding:0 40rpx;
  2175. margin-top:10rpx;
  2176. view:nth-child(1){
  2177. width:200rpx;
  2178. line-height:80rpx;
  2179. }
  2180. input{
  2181. border:1rpx solid #dedede;
  2182. padding:0 20rpx;
  2183. width:400rpx;
  2184. height:60rpx;
  2185. line-height:60rpx;
  2186. margin:10rpx 0 0 ;
  2187. }
  2188. }
  2189. .popup-top-box{
  2190. height:90rpx;
  2191. line-height:80rpx;
  2192. padding:0 20rpx;
  2193. font-size:30rpx;
  2194. margin:10rpx 20rpx;
  2195. overflow-x scroll
  2196. overflow-y hidden
  2197. white-space: nowrap;
  2198. view{
  2199. display inline-block
  2200. }
  2201. .view-inline-block-color{
  2202. border-bottom:4rpx solid #0183FA;
  2203. }
  2204. }
  2205. .popup-for-max-box{
  2206. padding:20rpx 0 0 0 ;
  2207. margin:0 20rpx 30rpx;
  2208. height:600rpx;
  2209. overflow-y scroll;
  2210. .popup-for-box{
  2211. display flex;
  2212. .left-img{
  2213. width:20rpx;
  2214. height:20rpx;
  2215. margin:30rpx;
  2216. }
  2217. .center-view{
  2218. padding:20rpx 0;
  2219. line-height:40rpx;
  2220. flex:1;
  2221. }
  2222. .right-img-box{
  2223. width:80rpx;
  2224. height:80rpx;
  2225. border-radius:50%;
  2226. .right-img{
  2227. width:18rpx;
  2228. height:36rpx;
  2229. margin:22rpx 31rpx;
  2230. }
  2231. }
  2232. }
  2233. }
  2234. .popup-button{
  2235. margin:20rpx auto;
  2236. width:500rpx;
  2237. height:80rpx;
  2238. line-height:80rpx;
  2239. text-align center;
  2240. color:#fff;
  2241. border-radius:20rpx;
  2242. }
  2243. .popup-button-colorA{
  2244. background #0183FA
  2245. }
  2246. .popup-button-colorB{
  2247. background #999
  2248. }
  2249. }
  2250. }
  2251. }
  2252. </style>