startChecking.vue 68 KB

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