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