deviceList.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391
  1. <!--物联设备配置-->
  2. <template>
  3. <div class="deviceList scrollbar-box">
  4. <div class="title-box">
  5. <p class="left-title">传感器</p>
  6. <p class="right-button reset-button-one" @click="backPage">返回</p>
  7. </div>
  8. <div class="for-max-box">
  9. <div class="for-big-box" v-for="(item,index) in listCgq" :key="index">
  10. <p class="for-title-p">{{subjectData.room}}-{{item.type.name}}传感器{{index+1}}</p>
  11. <div class="for-text-box">
  12. <p>网关编号:</p>
  13. <el-tooltip class="item" effect="dark" :content="item.gatewayId" placement="top">
  14. <p>{{item.gatewayId}}</p>
  15. </el-tooltip>
  16. </div>
  17. <div class="for-button-box">
  18. <p @click="editData(5,item)"><i class="el-icon-edit-outline"></i>编辑</p>
  19. <p></p>
  20. <p @click="delSensor(item)"><i class="el-icon-delete"></i>删除</p>
  21. </div>
  22. </div>
  23. <p class="add-for-p" @click="addData(1)"><i class="el-icon-plus"></i>添加传感器</p>
  24. </div>
  25. <div class="title-box" v-if="subjectData.hardwareType==1">
  26. <p class="left-title">智能门禁</p>
  27. </div>
  28. <div class="for-max-box" v-if="subjectData.hardwareType==1">
  29. <div class="for-big-box" v-for="(item,index) in listHK" :key="index" style="width: 350px">
  30. <p class="for-title-p">{{item.type.name}}-{{item.name}}</p>
  31. <div class="for-text-box">
  32. <p>门禁编号:</p>
  33. <el-tooltip class="item" effect="dark" :content="item.hardwareNum" placement="top">
  34. <p>{{item.hardwareNum}}</p>
  35. </el-tooltip>
  36. </div>
  37. <div class="for-text-box">
  38. <p>门禁授权:</p>
  39. <el-checkbox-group v-model="item.controlScope==null?[]:item.controlScope.split(',')" style="margin-top: 6px" disabled>
  40. <el-checkbox label="1" style="margin-right: 8px">关联安全准入</el-checkbox>
  41. <el-checkbox label="2">关联白名单</el-checkbox>
  42. </el-checkbox-group>
  43. </div>
  44. <div class="for-button-box">
  45. <p @click="editData('editEntrance',item)"><i class="el-icon-edit-outline"></i>编辑</p>
  46. <p></p>
  47. <p @click="delEntrance(item)"><i class="el-icon-delete"></i>删除</p>
  48. </div>
  49. </div>
  50. <p class="add-for-p" @click="addData('addEntrance')" style="width: 350px;height: 158px;" v-if="listHK.length<3"><i class="el-icon-plus"></i>添加智能门禁</p>
  51. </div>
  52. <div class="title-box">
  53. <p class="left-title">一体机</p>
  54. </div>
  55. <div class="for-max-box">
  56. <div class="for-big-box" v-for="(item,index) in listYtj" :key="index">
  57. <p class="for-title-p">{{subjectData.room}}-{{item.type.name}}{{index+1}}</p>
  58. <div class="for-text-box">
  59. <p>一体机编号:</p>
  60. <el-tooltip class="item" effect="dark" :content="item.hardwareNum" placement="top">
  61. <p>{{item.hardwareNum}}</p>
  62. </el-tooltip>
  63. </div>
  64. <div class="for-button-box">
  65. <p @click="editData(6,item)"><i class="el-icon-edit-outline"></i>编辑</p>
  66. <p></p>
  67. <p @click="delHardware(item)"><i class="el-icon-delete"></i>删除</p>
  68. </div>
  69. </div>
  70. <p class="add-for-p" @click="addData(2)"><i class="el-icon-plus"></i>添加一体机</p>
  71. </div>
  72. <div class="title-box">
  73. <p class="left-title">控制设备</p>
  74. </div>
  75. <div class="for-max-box">
  76. <div class="for-big-box-two" v-for="(item,index) in listkzsb" :key="index">
  77. <p class="for-title-p">{{subjectData.room}}-{{item.type.name}}传感器{{index+1}}</p>
  78. <div class="for-text-box">
  79. <p>设备编号:</p>
  80. <el-tooltip class="item" effect="dark" :content="item.relayCode" placement="top">
  81. <p>{{item.relayCode}}</p>
  82. </el-tooltip>
  83. </div>
  84. <div class="for-text-box">
  85. <p>设备路由:</p>
  86. <p>{{item.bit}}</p>
  87. </div>
  88. <div class="for-button-box">
  89. <p @click="editData(7,item)"><i class="el-icon-edit-outline"></i>编辑</p>
  90. <p></p>
  91. <p @click="delHardwareTwo(item)"><i class="el-icon-delete"></i>删除</p>
  92. </div>
  93. </div>
  94. <p class="add-for-p-two" @click="addData(3)"><i class="el-icon-plus"></i>添加控制设备</p>
  95. </div>
  96. <div class="title-box">
  97. <p class="left-title">摄像头</p>
  98. </div>
  99. <div class="for-max-box">
  100. <div class="for-big-box" v-for="(item,index) in listSpjk" :key="index">
  101. <p class="camera" v-if="item.isArrest">抓拍</p>
  102. <p class="for-title-p" style="background: none;color: #333;margin-top: 12px;">{{subjectData.room}}-{{item.type.name}}{{index+1}}</p>
  103. <div class="for-text-box">
  104. <p>摄像头编号:</p>
  105. <el-tooltip class="item" effect="dark" :content="item.hardwareNum" placement="top">
  106. <p>{{item.hardwareNum}}</p>
  107. </el-tooltip>
  108. </div>
  109. <!-- <div class="for-text-box">-->
  110. <!-- <p></p>-->
  111. <!-- <el-tooltip class="item" effect="dark" :content="item.hardwareNum" placement="top">-->
  112. <!-- <p>{{item.hardwareNum}}</p>-->
  113. <!-- </el-tooltip>-->
  114. <!-- </div>-->
  115. <div class="for-button-box">
  116. <p @click="editData(8,item)"><i class="el-icon-edit-outline"></i>编辑</p>
  117. <p></p>
  118. <p @click="delHardwareThree(item)"><i class="el-icon-delete"></i>删除</p>
  119. </div>
  120. </div>
  121. <p class="add-for-p-two" @click="addData(4)"><i class="el-icon-plus"></i>添加摄像头</p>
  122. </div>
  123. <div class="title-box" v-if="subjectData.hardwareType==2">
  124. <p class="left-title">电子信息牌</p>
  125. </div>
  126. <div class="for-max-box" v-if="subjectData.hardwareType==2">
  127. <div class="for-big-box" v-for="(item,index) in listXxp" :key="index">
  128. <p class="for-title-p">{{subjectData.room}}-{{item.cardName}}{{index+1}}</p>
  129. <div class="for-text-box">
  130. <p>设备编号:</p>
  131. <el-tooltip class="item" effect="dark" :content="item.cardNum" placement="top">
  132. <p>{{item.cardNum}}</p>
  133. </el-tooltip>
  134. </div>
  135. <div class="for-button-box">
  136. <p @click="editData('editSign',item)"><i class="el-icon-edit-outline"></i>编辑</p>
  137. <p></p>
  138. <p @click="delSign(item)"><i class="el-icon-delete"></i>删除</p>
  139. </div>
  140. </div>
  141. <p class="add-for-p" @click="addData('addSign')" v-if="listXxp.length<1"><i class="el-icon-plus"></i>添加信息牌</p>
  142. </div>
  143. <el-dialog :title="title" :visible.sync="addType" v-if="addType" width="500px" append-to-body>
  144. <el-form ref="form" :model="form" :rules="rules" label-width="110px">
  145. <div v-if="upType == 1 || upType == 5">
  146. <el-form-item label="传感器类型" prop="type">
  147. <el-select v-model="form.type" placeholder="请选择传感器类型" style="width:320px;">
  148. <el-option
  149. v-for="item in sensorAddOptions"
  150. :key="item.enumName"
  151. :label="item.name"
  152. :value="item.enumName">
  153. </el-option>
  154. </el-select>
  155. </el-form-item>
  156. <el-form-item label="网关编号" prop="gatewayId">
  157. <el-input v-model="form.gatewayId" placeholder="请输入网关编号"
  158. maxlength="30" style="width:320px;"/>
  159. </el-form-item>
  160. <el-form-item label="路由" prop="routeNum">
  161. <el-input v-model="form.routeNum" oninput="value=value.replace(/[^0-9.]/g,'')" maxlength="2" placeholder="请输入路由" style="width:320px;"></el-input>
  162. </el-form-item>
  163. <el-form-item label="传感器参数" prop="configName">
  164. <el-input v-model="form.configName" placeholder="请输入传感器参数"
  165. maxlength="30" style="width:320px;"></el-input>
  166. </el-form-item>
  167. <el-form-item label="状态参数" prop="configStatus">
  168. <el-input v-model="form.configStatus" placeholder="请输入状态参数"
  169. maxlength="30" style="width:320px;"></el-input>
  170. </el-form-item>
  171. </div>
  172. <div v-if="upType == 2 || upType == 6">
  173. <el-form-item label="一体机名称" prop="name">
  174. <el-input
  175. style="width:320px;"
  176. v-model="form.name"
  177. placeholder="请输入一体机名称"
  178. maxlength="8"
  179. size="small"
  180. />
  181. </el-form-item>
  182. <el-form-item label="一体机类型" prop="pcType">
  183. <el-select v-model="form.pcType" placeholder="请选择一体机类型" style="width:320px;">
  184. <el-option label="管控一体机" value="0" />
  185. <el-option label="学习一体机" value="1" />
  186. </el-select>
  187. </el-form-item>
  188. <el-form-item label="一体机编号" prop="hardwareNum">
  189. <el-input
  190. style="width:320px;"
  191. v-model="form.hardwareNum"
  192. placeholder="请输入一体机编号"
  193. maxlength="30"
  194. size="small"
  195. />
  196. </el-form-item>
  197. </div>
  198. <div v-if="upType == 3 || upType == 7">
  199. <el-form-item label="设备类型" prop="type">
  200. <el-select v-model="form.type" placeholder="请选择设备类型" style="width:320px;" :disabled="disabledType">
  201. <el-option key="1" label="电源开关" value="1"></el-option>
  202. <el-option key="2" label="智能通风" value="2"></el-option>
  203. </el-select>
  204. </el-form-item>
  205. <el-form-item label="硬件名称" prop="name">
  206. <el-input
  207. v-model="form.name"
  208. placeholder="请输入硬件名称"
  209. clearable
  210. size="small"
  211. maxLength="8"
  212. />
  213. </el-form-item>
  214. <el-form-item label="继电器类型" prop="hardwareType">
  215. <el-radio-group v-model="form.hardwareType">
  216. <el-radio :label="1">老继电器</el-radio>
  217. <el-radio :label="2">新继电器</el-radio>
  218. <el-radio :label="3">泥人继电器</el-radio>
  219. </el-radio-group>
  220. </el-form-item>
  221. <el-form-item label="绑定继电器" prop="relayCode" v-if="form.hardwareType==1 || form.hardwareType==3">
  222. <el-select v-model="form.relayCode" placeholder="请选择继电器" clearable @change="loadRelayNum" @clear="loadClear">
  223. <el-option v-for="relay in relayList"
  224. :key="relay.code"
  225. :label="relay.code"
  226. :value="relay.code">
  227. </el-option>
  228. </el-select>
  229. </el-form-item>
  230. <el-form-item label="继电器编号" prop="relayCode" v-if="form.hardwareType==2">
  231. <el-input
  232. v-model="form.relayCode"
  233. placeholder="请输入继电器编号"
  234. clearable
  235. size="small"
  236. maxlength="20"
  237. />
  238. </el-form-item>
  239. <el-form-item label="继电器位置" prop="bit" >
  240. <el-select v-model="form.bit" placeholder="请选择继电器位置" clearable >
  241. <el-option v-for="lab in relayNumList"
  242. :key="lab.name"
  243. :label="lab.name"
  244. :value="lab.name">
  245. </el-option>
  246. </el-select>
  247. </el-form-item>
  248. <el-form-item label="是否灭火主机" prop="isPcfire">
  249. <el-radio-group v-model="form.isPcfire">
  250. <el-radio :label="0">否</el-radio>
  251. <el-radio :label="1">是</el-radio>
  252. </el-radio-group>
  253. </el-form-item>
  254. <el-form-item label="配置名称" prop="configName" v-if="form.hardwareType == 2">
  255. <el-input v-model="form.configName" maxlength="30" placeholder="请输入配置名称" style="width:320px;"></el-input>
  256. </el-form-item>
  257. <el-form-item label="配置状态" prop="configStatus" v-if="form.hardwareType == 2">
  258. <el-input v-model="form.configStatus" maxlength="30" placeholder="请输入配置状态" style="width:320px;"></el-input>
  259. </el-form-item>
  260. </div>
  261. <div v-if="upType == 4 || upType == 8">
  262. <el-form-item label="硬件名称" prop="name">
  263. <el-input
  264. v-model="form.name"
  265. placeholder="请输入硬件名称"
  266. clearable
  267. size="small"
  268. maxLength="8"
  269. style="width:320px;"
  270. />
  271. </el-form-item>
  272. <el-form-item label="摄像头编号" prop="hardwareNum">
  273. <el-input v-model="form.hardwareNum" placeholder="摄像头编号"
  274. maxlength="30" style="width:320px;"/>
  275. </el-form-item>
  276. <el-form-item label="硬件IP" prop="ipAddress">
  277. <el-input
  278. v-model="form.ipAddress"
  279. placeholder="请输入硬件IP"
  280. clearable
  281. size="small"
  282. maxLength="20"
  283. style="width:320px;"
  284. />
  285. </el-form-item>
  286. <el-form-item label="类型" >
  287. <!-- <el-radio-group v-model="form.pcType">-->
  288. <!-- <el-radio :label="0">火焰算法</el-radio>-->
  289. <!-- <el-radio :label="1">穿戴识别</el-radio>-->
  290. <!-- <el-radio :label="2">违规带离抓拍</el-radio>-->
  291. <!-- </el-radio-group>-->
  292. <el-checkbox-group v-model="form.subType">
  293. <el-checkbox label="0">火焰算法</el-checkbox>
  294. <el-checkbox label="1">穿戴识别</el-checkbox>
  295. <el-checkbox label="2">违规带离抓拍</el-checkbox>
  296. </el-checkbox-group>
  297. </el-form-item>
  298. </div>
  299. <div v-if="upType == 'addEntrance'|| upType=='editEntrance'">
  300. <el-form-item label="门禁编号" prop="hardwareNum">
  301. <el-input
  302. style="width:320px;"
  303. v-model="form.hardwareNum"
  304. placeholder="请输入门禁编号"
  305. maxlength="20"
  306. size="small"
  307. />
  308. </el-form-item>
  309. <el-form-item label="门禁名称" prop="name" >
  310. <el-input
  311. style="width:320px;"
  312. v-model="form.name"
  313. placeholder="请输入门禁名称"
  314. maxlength="8"
  315. size="small"
  316. />
  317. </el-form-item>
  318. <el-form-item label="IP" prop="ipAddress" >
  319. <el-input
  320. style="width:320px;"
  321. v-model="form.ipAddress"
  322. placeholder="请输入IP"
  323. maxlength="15"
  324. size="small"
  325. />
  326. </el-form-item>
  327. <el-form-item label="端口" prop="port" >
  328. <el-input
  329. style="width:320px;"
  330. v-model="form.port"
  331. placeholder="请输入端口"
  332. maxlength="6"
  333. size="small"
  334. />
  335. </el-form-item>
  336. <el-form-item label="设备管理证号" prop="harUser" >
  337. <el-input
  338. style="width:320px;"
  339. v-model="form.harUser"
  340. placeholder="请输入设备管理证号"
  341. maxlength="30"
  342. size="small"
  343. />
  344. </el-form-item>
  345. <el-form-item label="设备管理密码" prop="harPsw" >
  346. <el-input
  347. style="width:320px;"
  348. v-model="form.harPsw"
  349. placeholder="请输入设备管理密码"
  350. maxlength="30"
  351. size="small"
  352. />
  353. </el-form-item>
  354. <el-form-item label="门禁权限" style="margin-bottom: 0">
  355. <el-checkbox-group v-model="form.controlScope">
  356. <el-checkbox label="1" >关联安全准入</el-checkbox>
  357. <el-checkbox label="2">关联白名单</el-checkbox>
  358. </el-checkbox-group>
  359. </el-form-item>
  360. <p style="margin:0 20px 0 104px;color: #FD2A2A;">关联之后申请安全准入或者白名单后自动授权门禁,不关联则需要单独授权门禁</p>
  361. </div>
  362. <div v-if="upType == 'addSign'|| upType=='editSign'">
  363. <el-form-item label="设备编号" prop="cardNum">
  364. <el-input
  365. style="width:320px;"
  366. v-model="form.cardNum"
  367. placeholder="请输入设备编号"
  368. maxlength="30"
  369. size="small"
  370. />
  371. </el-form-item>
  372. <el-form-item label="实验室">
  373. <el-input
  374. style="width:320px;"
  375. v-model="subjectData.name"
  376. placeholder="请选择实验室"
  377. maxlength="20"
  378. size="small"
  379. disabled
  380. />
  381. </el-form-item>
  382. <!-- <el-form-item label="实验室" prop="subjectId">-->
  383. <!-- <el-select-->
  384. <!-- style="width:300px;"-->
  385. <!-- v-model="form.subjectName"-->
  386. <!-- filterable-->
  387. <!-- remote-->
  388. <!-- clearable-->
  389. <!-- reserve-keyword-->
  390. <!-- @focus="selectFocus"-->
  391. <!-- @change="selectChange"-->
  392. <!-- placeholder="请选择实验地点"-->
  393. <!-- :remote-method="userSelectList"-->
  394. <!-- :loading="loading">-->
  395. <!-- <el-option-->
  396. <!-- v-for="item in laboratoryOptions"-->
  397. <!-- :key="item.id"-->
  398. <!-- :label="item.name"-->
  399. <!-- :value="item.id">-->
  400. <!-- </el-option>-->
  401. <!-- </el-select>-->
  402. <!-- </el-form-item>-->
  403. <el-form-item label="安装位置" >
  404. <el-input
  405. style="width:320px;"
  406. v-model="form.location"
  407. placeholder="请输入安装位置"
  408. maxlength="10"
  409. size="small"
  410. />
  411. </el-form-item>
  412. <el-form-item label="关联门禁">
  413. <el-radio-group v-model="form.isStart">
  414. <el-radio :label="1">是</el-radio>
  415. <el-radio :label="2">否</el-radio>
  416. </el-radio-group>
  417. </el-form-item>
  418. </div>
  419. </el-form>
  420. <div slot="footer" class="dialog-footer">
  421. <el-button @click="cancel">取 消</el-button>
  422. <el-button type="primary" @click="submitForm">确 定</el-button>
  423. </div>
  424. </el-dialog>
  425. </div>
  426. </template>
  427. <script>
  428. import {
  429. listBySubjectId,
  430. addSensor,
  431. putSensor,
  432. delSensor,
  433. addHardware,
  434. putHardware,
  435. delHardware,
  436. subjectSignAdd, subjectSignEdit, subjectSignDelete
  437. } from '@/api/laboratory/subject'
  438. import { getSensorList } from "@/api/laboratory/sensor";
  439. import { subjectList } from '@/api/gasManage3_0/gasManage'
  440. import { listRelay } from '@/api/laboratory/relay'
  441. export default {
  442. name: "deviceList",
  443. props:{
  444. subjectData:{},
  445. },
  446. data() {
  447. return {
  448. loading:false,
  449. title:"",
  450. addType:false,
  451. listCgq:[], //传感器
  452. listYtj:[], //一体机
  453. listkzsb:[],
  454. listSpjk:[], //摄像头
  455. listHK:[],//智能门禁
  456. listXxp:[],//电子信息牌
  457. form:{
  458. },
  459. relayList: [],
  460. relayNumList:[
  461. {name:1},
  462. {name:2},
  463. {name:3},
  464. {name:4},
  465. {name:5},
  466. {name:6},
  467. {name:7},
  468. {name:8},
  469. {name:9},
  470. {name:10},
  471. {name:11},
  472. {name:12}
  473. ],
  474. // 表单校验
  475. rules: {
  476. name:[
  477. {required: true, message: '请输入名称', trigger: 'blur'},
  478. { required: true, message: "请输入名称", validator: this.spaceJudgment, trigger: "blur" }
  479. ],
  480. type:[
  481. {required: true, message: '类型不能为空', trigger: 'blur'}
  482. ],
  483. gatewayId:[
  484. {required: true, message: '网关不能为空', trigger: 'blur'},
  485. { required: true, message: "网关不能为空", validator: this.spaceJudgment, trigger: "blur" }
  486. ],
  487. hardwareNum:[
  488. { required: true, message: "请输入编号", trigger: "blur" },
  489. { required: true, message: "请输入编号", validator: this.spaceJudgment, trigger: "blur" }
  490. ],
  491. pcType: [
  492. { required: true, message: "请选择类型", trigger: "blur" },
  493. ],
  494. hardwareType: [
  495. { required: true, message: "请选择设备版本", trigger: "blur" },
  496. ],
  497. relayCode: [
  498. { required: true, message: "请输入设备编号", trigger: "blur" },
  499. { required: true, message: "请输入设备编号", validator: this.spaceJudgment, trigger: "blur" }
  500. ],
  501. bit: [
  502. { required: true, message: "请输入路由", trigger: "blur" },
  503. { required: true, message: "请输入路由", validator: this.spaceJudgment, trigger: "blur" }
  504. ],
  505. ipAddress: [
  506. { required: true, message: "请输入IP", trigger: "blur" },
  507. { required: true, message: "请输入IP", validator: this.spaceJudgment, trigger: "blur" }
  508. ],
  509. port: [
  510. { required: true, message: "请输入端口", trigger: "blur" },
  511. { required: true, message: "请输入端口", validator: this.spaceJudgment, trigger: "blur" }
  512. ],
  513. harUser: [
  514. { required: true, message: "请输入设备管理证号", trigger: "blur" },
  515. { required: true, message: "请输入设备管理证号", validator: this.spaceJudgment, trigger: "blur" }
  516. ],
  517. harPsw: [
  518. { required: true, message: "请输入设备管理密码", trigger: "blur" },
  519. { required: true, message: "请输入设备管理密码", validator: this.spaceJudgment, trigger: "blur" }
  520. ],
  521. cardNum:[
  522. { required: true, message: "请输入设备编号", trigger: "blur" },
  523. { required: true, message: "请输入设备编号", validator: this.spaceJudgment, trigger: "blur" }
  524. ],
  525. subjectId: [
  526. { required: true, message: "请选择实验室", trigger: "blur" }
  527. ],
  528. },
  529. //提交类型
  530. upType:"",
  531. //传感器类型
  532. sensorAddOptions: [],
  533. }
  534. },
  535. created() {
  536. this.listBySubjectId();
  537. this.getSensorList();
  538. this.getRelayList();
  539. },
  540. mounted(){
  541. },
  542. methods:{
  543. selectFocus(){
  544. if(!this.laboratoryOptions[0]){
  545. this.userSelectList("");
  546. }
  547. },
  548. //懒加载实验室
  549. userSelectList(e){
  550. subjectList({name:e,deptId:this.form.deptId}).then(response => {
  551. this.laboratoryOptions = response.data;
  552. });
  553. },
  554. //实验室选择
  555. selectChange(e){
  556. let self = this;
  557. for(let i=0;i<self.laboratoryOptions.length;i++){
  558. if(self.laboratoryOptions[i].id == e){
  559. this.$set(this.form,"subject",self.laboratoryOptions[i]);
  560. this.$set(this.form,"subjectName",self.laboratoryOptions[i].name);
  561. }
  562. }
  563. this.$set(this.form,"subjectId",e);
  564. },
  565. // 取消按钮
  566. cancel() {
  567. this.addType = false;
  568. },
  569. // 查询继电器列表
  570. getRelayList(){
  571. listRelay({"type": 1}).then(response => {
  572. this.relayList = response.data;
  573. if(this.form.relayCode){
  574. let self = this
  575. let num = ""
  576. for(let i=0;i<self.relayList.length;i++){
  577. if(self.relayList[i].code == this.form.relayCode){
  578. num = self.relayList[i].routeNum
  579. }
  580. }
  581. let list = [];
  582. for(let i=0;i<num;i++){
  583. let obj = {
  584. name:i+1
  585. }
  586. list.push(obj);
  587. }
  588. this.relayNumList = list;
  589. }
  590. });
  591. },
  592. loadRelayNum(e){
  593. let self = this;
  594. let num = ""
  595. for(let i=0;i<self.relayList.length;i++){
  596. if(self.relayList[i].code == e){
  597. num = self.relayList[i].routeNum
  598. }
  599. }
  600. let list = [];
  601. for(let i=0;i<num;i++){
  602. let obj = {
  603. name:i+1
  604. }
  605. list.push(obj);
  606. }
  607. console.log(list)
  608. if(list.length>0){
  609. this.relayNumList = list;
  610. }else{
  611. this.relayNumList =[
  612. {name:1},
  613. {name:2},
  614. {name:3},
  615. {name:4},
  616. {name:5},
  617. {name:6},
  618. {name:7},
  619. {name:8},
  620. {name:9},
  621. {name:10},
  622. ]
  623. }
  624. },
  625. //清空按钮
  626. loadClear(){
  627. this.form.bit = '';
  628. },
  629. // 提交
  630. submitForm() {
  631. this.$refs["form"].validate(valid => {
  632. if (valid) {
  633. if(this.upType == 1){
  634. //新增传感器
  635. this.addSensor();
  636. }else if(this.upType == 5){
  637. //编辑传感器
  638. this.putSensor();
  639. }else if(this.upType == 2){
  640. //新增一体机
  641. this.addHardware();
  642. }else if(this.upType == 6){
  643. //编辑一体机
  644. this.putHardware();
  645. }else if(this.upType == 3){
  646. //新增控制设备
  647. this.addHardwareTwo();
  648. }else if(this.upType == 7){
  649. //编辑控制设备
  650. this.putHardwareTwo();
  651. }else if(this.upType == 4){
  652. //新增控制设备
  653. this.addHardwareThree();
  654. }else if(this.upType == 8){
  655. //编辑控制设备
  656. this.putHardwareThree();
  657. }else if(this.upType == 'addEntrance'){
  658. //新增智能门禁
  659. this.addEntrance();
  660. }else if(this.upType == 'editEntrance'){
  661. //编辑智能门禁
  662. this.editEntrance();
  663. }else if(this.upType == 'addSign'){
  664. //新增电子信息牌
  665. this.addSign();
  666. }else if(this.upType == 'editSign'){
  667. //编辑电子信息牌
  668. this.editSign();
  669. }
  670. }
  671. });
  672. },
  673. //删除电子信息牌
  674. delSign(item){
  675. this.$confirm('确认要删除该电子信息牌?', "警告", {
  676. confirmButtonText: "确定",
  677. cancelButtonText: "取消",
  678. type: "warning"
  679. }).then(() => {
  680. // 确定
  681. subjectSignDelete(item.id).then((response) => {
  682. this.msgSuccess(response.msg)
  683. this.addType = false;
  684. this.listBySubjectId();
  685. });
  686. }).catch(function() {
  687. // 取消
  688. });
  689. },
  690. //删除智能门禁
  691. delEntrance(item){
  692. this.$confirm('确认要删除该智能门禁?', "警告", {
  693. confirmButtonText: "确定",
  694. cancelButtonText: "取消",
  695. type: "warning"
  696. }).then(() => {
  697. // 确定
  698. delHardware(item.id).then((response) => {
  699. this.msgSuccess(response.msg)
  700. this.addType = false;
  701. this.listBySubjectId();
  702. });
  703. }).catch(function() {
  704. // 取消
  705. });
  706. },
  707. //新增摄像头
  708. addHardwareThree(){
  709. let obj = {
  710. type:4,
  711. name:this.form.name,
  712. hardwareNum:this.form.hardwareNum,
  713. ipAddress:this.form.ipAddress,
  714. subType:this.form.subType.toString(),
  715. subjectId:this.subjectData.id,
  716. deptId:this.subjectData.deptId,
  717. deptName:this.subjectData.deptName,
  718. }
  719. addHardware(obj).then(response => {
  720. this.msgSuccess(response.msg)
  721. this.addType = false;
  722. this.listBySubjectId();
  723. });
  724. },
  725. //编辑摄像头
  726. putHardwareThree(){
  727. let obj = {
  728. id:this.form.id,
  729. name:this.form.name,
  730. hardwareNum:this.form.hardwareNum,
  731. ipAddress:this.form.ipAddress,
  732. subType:this.form.subType.toString(),
  733. subjectId:this.form.subjectId,
  734. deptId:this.form.deptId,
  735. deptName:this.form.deptName,
  736. }
  737. putHardware(obj).then(response => {
  738. this.msgSuccess(response.msg)
  739. this.addType = false;
  740. this.listBySubjectId();
  741. });
  742. },
  743. //删除摄像头
  744. delHardwareThree(item){
  745. this.$confirm('确认要删除该摄像头?', "警告", {
  746. confirmButtonText: "确定",
  747. cancelButtonText: "取消",
  748. type: "warning"
  749. }).then(() => {
  750. // 确定
  751. delHardware(item.id).then((response) => {
  752. this.msgSuccess(response.msg)
  753. this.addType = false;
  754. this.listBySubjectId();
  755. });
  756. }).catch(function() {
  757. // 取消
  758. });
  759. },
  760. //新增控制设备
  761. addHardwareTwo(){
  762. let obj = {
  763. name:this.form.name,
  764. type:this.form.type,
  765. hardwareType:this.form.hardwareType,
  766. relayCode:this.form.relayCode,
  767. bit:this.form.bit,
  768. configName:this.form.configName,
  769. configStatus:this.form.configStatus,
  770. subjectId:this.subjectData.id,
  771. deptId:this.subjectData.deptId,
  772. deptName:this.subjectData.deptName,
  773. isPcfire:this.form.isPcfire,
  774. }
  775. addHardware(obj).then(response => {
  776. this.msgSuccess(response.msg)
  777. this.addType = false;
  778. this.listBySubjectId();
  779. });
  780. },
  781. //编辑控制设备
  782. putHardwareTwo(){
  783. let obj = {
  784. id:this.form.id,
  785. hardwareType:this.form.hardwareType,
  786. relayCode:this.form.relayCode,
  787. bit:this.form.bit,
  788. configName:this.form.configName,
  789. configStatus:this.form.configStatus,
  790. subjectId:this.form.subjectId,
  791. deptId:this.form.deptId,
  792. deptName:this.form.deptName,
  793. name:this.form.name,
  794. isPcfire:this.form.isPcfire,
  795. }
  796. putHardware(obj).then(response => {
  797. this.msgSuccess(response.msg)
  798. this.addType = false;
  799. this.listBySubjectId();
  800. });
  801. },
  802. //删除控制设备
  803. delHardwareTwo(item){
  804. this.$confirm('确认要删除该一体机?', "警告", {
  805. confirmButtonText: "确定",
  806. cancelButtonText: "取消",
  807. type: "warning"
  808. }).then(() => {
  809. // 确定
  810. delHardware(item.id).then((response) => {
  811. this.msgSuccess(response.msg)
  812. this.addType = false;
  813. this.listBySubjectId();
  814. });
  815. }).catch(function() {
  816. // 取消
  817. });
  818. },
  819. //添加一体机
  820. addHardware(){
  821. let obj = {
  822. type:0,
  823. name:this.form.name,
  824. pcType:this.form.pcType,
  825. hardwareNum:this.form.hardwareNum,
  826. subjectId:this.subjectData.id,
  827. deptId:this.subjectData.deptId,
  828. deptName:this.subjectData.deptName,
  829. }
  830. addHardware(obj).then(response => {
  831. this.msgSuccess(response.msg)
  832. this.addType = false;
  833. this.listBySubjectId();
  834. });
  835. },
  836. //编辑一体机
  837. putHardware(){
  838. let obj = {
  839. id:this.form.id,
  840. name:this.form.name,
  841. pcType:this.form.pcType,
  842. hardwareNum:this.form.hardwareNum,
  843. }
  844. putHardware(obj).then(response => {
  845. this.msgSuccess(response.msg)
  846. this.addType = false;
  847. this.listBySubjectId();
  848. });
  849. },
  850. //删除一体机
  851. delHardware(item){
  852. this.$confirm('确认要删除该一体机?', "警告", {
  853. confirmButtonText: "确定",
  854. cancelButtonText: "取消",
  855. type: "warning"
  856. }).then(() => {
  857. // 确定
  858. delHardware(item.id).then((response) => {
  859. this.msgSuccess(response.msg)
  860. this.addType = false;
  861. this.listBySubjectId();
  862. });
  863. }).catch(function() {
  864. // 取消
  865. });
  866. },
  867. //添加传感器
  868. addSensor(){
  869. let obj = {
  870. type:this.form.type,
  871. gatewayId:this.form.gatewayId,
  872. routeNum:this.form.routeNum,
  873. configName:this.form.configName,
  874. configStatus:this.form.configStatus,
  875. subjectId:this.subjectData.id
  876. }
  877. addSensor(obj).then(response => {
  878. this.msgSuccess(response.msg)
  879. this.addType = false;
  880. this.listBySubjectId();
  881. });
  882. },
  883. //编辑传感器
  884. putSensor(){
  885. let obj = {
  886. type:this.form.type,
  887. id:this.form.id,
  888. gatewayId:this.form.gatewayId,
  889. routeNum:this.form.routeNum,
  890. configName:this.form.configName,
  891. configStatus:this.form.configStatus,
  892. }
  893. putSensor(obj).then(response => {
  894. this.msgSuccess(response.msg)
  895. this.addType = false;
  896. this.listBySubjectId();
  897. });
  898. },
  899. //删除传感器
  900. delSensor(item){
  901. this.$confirm('确认要删除该传感器?', "警告", {
  902. confirmButtonText: "确定",
  903. cancelButtonText: "取消",
  904. type: "warning"
  905. }).then(() => {
  906. // 确定
  907. delSensor(item.id).then((response) => {
  908. this.msgSuccess(response.msg)
  909. this.addType = false;
  910. this.listBySubjectId();
  911. });
  912. }).catch(function() {
  913. // 取消
  914. });
  915. },
  916. //新增智能门禁
  917. addEntrance(){
  918. let obj = {
  919. type:11,
  920. subjectId:this.subjectData.id,
  921. hardwareNum:this.form.hardwareNum,
  922. name:this.form.name,
  923. ipAddress:this.form.ipAddress,
  924. port:this.form.port,
  925. harUser:this.form.harUser,
  926. harPsw:this.form.harPsw,
  927. controlScope:this.form.controlScope.join(','),
  928. }
  929. addHardware(obj).then(response => {
  930. if(response.code==200){
  931. this.msgSuccess(response.msg)
  932. this.addType = false;
  933. this.listBySubjectId();
  934. }else if(response.code==205){
  935. this.$confirm(response.msg, "警告", {
  936. confirmButtonText: "确定",
  937. cancelButtonText: "取消",
  938. type: "warning"
  939. }).then(() => {
  940. // 确定
  941. this.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
  942. }).catch(function() {
  943. // 取消
  944. });
  945. }
  946. });
  947. },
  948. //编辑智能门禁
  949. editEntrance(){
  950. let obj = {
  951. id:this.form.id,
  952. hardwareNum:this.form.hardwareNum,
  953. name:this.form.name,
  954. ipAddress:this.form.ipAddress,
  955. port:this.form.port,
  956. harUser:this.form.harUser,
  957. harPsw:this.form.harPsw,
  958. controlScope:this.form.controlScope.join(','),
  959. subjectId:this.subjectData.id
  960. }
  961. putHardware(obj).then(response => {
  962. this.msgSuccess(response.msg)
  963. this.addType = false;
  964. this.listBySubjectId();
  965. });
  966. },
  967. //新增电子信息牌
  968. addSign(){
  969. let obj = {
  970. subjectId:this.subjectData.id,
  971. subjectName:this.subjectData.name,
  972. cardNum:this.form.cardNum,
  973. location:this.form.location,
  974. isStart:this.form.isStart,
  975. deptId:this.subjectData.deptId,
  976. deptName:this.subjectData.deptName,
  977. }
  978. subjectSignAdd(obj).then(response => {
  979. if(response.code==200){
  980. this.msgSuccess(response.msg)
  981. this.addType = false;
  982. this.listBySubjectId();
  983. }
  984. });
  985. },
  986. //编辑电子信息牌
  987. editSign(){
  988. let obj = {
  989. id:this.form.id,
  990. cardNum:this.form.cardNum,
  991. location:this.form.location,
  992. isStart:this.form.isStart,
  993. subjectId:this.subjectData.id,
  994. subjectName:this.subjectData.name,
  995. deptId:this.subjectData.deptId,
  996. deptName:this.subjectData.deptName,
  997. }
  998. subjectSignEdit(obj).then(response => {
  999. this.msgSuccess(response.msg)
  1000. this.addType = false;
  1001. this.listBySubjectId();
  1002. });
  1003. },
  1004. //添加
  1005. addData(type){
  1006. // this.resetForm("form");
  1007. if(type == 1){
  1008. this.title = '新增传感器';
  1009. this.$set(this,'form',{
  1010. type:"",
  1011. gatewayId:"",
  1012. routeNum:"",
  1013. configName:"",
  1014. configStatus:"",
  1015. });
  1016. }else if(type == 2){
  1017. this.title = '新增一体机';
  1018. this.$set(this,'form',{
  1019. name:"",
  1020. pcType:"",
  1021. hardwareNum:"",
  1022. });
  1023. }else if(type == 3){
  1024. this.title = '新增控制设备';
  1025. this.disabledType = false;
  1026. this.$set(this,'form',{
  1027. name:"",
  1028. type:"",
  1029. hardwareType:1,
  1030. relayCode:"",
  1031. bit:"",
  1032. configName:"",
  1033. configStatus:"",
  1034. isPcfire:0,
  1035. });
  1036. }else if(type == 4){
  1037. this.title = '新增摄像头';
  1038. this.$set(this,'form',{
  1039. hardwareNum:"",
  1040. subType:[],
  1041. });
  1042. }else if(type == 'addEntrance'){
  1043. this.title = '新增智能门禁';
  1044. this.$set(this,'form',{
  1045. hardwareNum:"",
  1046. name:"",
  1047. ipAddress:"",
  1048. port:"",
  1049. harUser:"",
  1050. harPsw:"",
  1051. controlScope:[],
  1052. });
  1053. }else if(type == 'addSign'){
  1054. this.title = '新增电子信息牌';
  1055. this.$set(this,'form',{
  1056. cardNum:"",
  1057. subjectName:"",
  1058. subjectId:"",
  1059. location:"",
  1060. isStart:"",
  1061. deptId:"",
  1062. deptName:"",
  1063. });
  1064. }
  1065. this.addType = true;
  1066. this.upType = type;
  1067. },
  1068. //编辑
  1069. editData(type,row){
  1070. if(type == 5){
  1071. this.title = '编辑传感器';
  1072. this.$set(this,'form',JSON.parse(JSON.stringify(row)));
  1073. this.$set(this.form,'type',JSON.parse(JSON.stringify(row.type.enumName)));
  1074. }else if(type == 6){
  1075. this.title = '编辑一体机';
  1076. this.$set(this,'form',JSON.parse(JSON.stringify(row)));
  1077. this.$set(this.form,'pcType',JSON.parse(JSON.stringify(row.pcType+'')));
  1078. }else if(type == 7){
  1079. this.title = '编辑控制设备';
  1080. this.disabledType = true;
  1081. this.$set(this,'form',JSON.parse(JSON.stringify(row)));
  1082. this.$set(this.form,'type',JSON.parse(JSON.stringify(row.type.code+'')));
  1083. }else if(type == 8){
  1084. this.title = '编辑摄像头';
  1085. this.$set(this,'form',JSON.parse(JSON.stringify(row)));
  1086. if(this.form.subType!='' && this.form.subType!=null ){
  1087. this.form.subType=this.form.subType.split(',')
  1088. }else{
  1089. this.form.subType=[];
  1090. }
  1091. }else if(type == 'editEntrance'){
  1092. this.title = '编辑智能门禁';
  1093. this.$set(this,'form',JSON.parse(JSON.stringify(row)));
  1094. if(row.controlScope){
  1095. this.form.controlScope=row.controlScope.split(',')
  1096. }else{
  1097. this.form.controlScope=[]
  1098. }
  1099. }else if(type=='editSign'){
  1100. this.title = '编辑电子信息牌';
  1101. this.$set(this,'form',JSON.parse(JSON.stringify(row)));
  1102. }
  1103. this.addType = true;
  1104. this.upType = type;
  1105. },
  1106. //获取列表
  1107. listBySubjectId(){
  1108. console.log(this.subjectData)
  1109. let obj = {
  1110. subjectId:this.subjectData.id
  1111. };
  1112. listBySubjectId(obj).then(response => {
  1113. if(response.data.listCgq){
  1114. this.$set(this,'listCgq',response.data.listCgq);
  1115. }
  1116. if(response.data.listYtj){
  1117. this.$set(this,'listYtj',response.data.listYtj);
  1118. }
  1119. if(response.data.listkzsb){
  1120. this.$set(this,'listkzsb',response.data.listkzsb);
  1121. }
  1122. if(response.data.listSpjk){
  1123. //判断是否是抓拍摄像头
  1124. for(let i=0; i< response.data.listSpjk.length;i++){
  1125. response.data.listSpjk[i].isArrest=(response.data.listSpjk[i].subType!=''&& response.data.listSpjk[i].subType!=null);
  1126. }
  1127. this.$set(this,'listSpjk',response.data.listSpjk);
  1128. }
  1129. if(response.data.listHK){
  1130. this.$set(this,'listHK',response.data.listHK);
  1131. }
  1132. if(response.data.listXxp){
  1133. this.$set(this,'listXxp',response.data.listXxp);
  1134. }
  1135. });
  1136. },
  1137. //返回上一页
  1138. backPage(){
  1139. this.$parent.clickPage(1);
  1140. },
  1141. //传感器类型
  1142. getSensorList(){
  1143. getSensorList().then(response => {
  1144. this.sensorAddOptions = response.data;
  1145. });
  1146. },
  1147. }
  1148. }
  1149. </script>
  1150. <style scoped lang="scss">
  1151. .deviceList{
  1152. flex:1;
  1153. display: flex;
  1154. flex-direction: column;
  1155. padding-bottom:20px;
  1156. border-radius:10px!important;
  1157. margin:5px 20px 20px 10px!important;
  1158. box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
  1159. *{
  1160. margin:0;
  1161. }
  1162. .title-box{
  1163. display: flex;
  1164. margin:0 20px;
  1165. .left-title{
  1166. flex:1;
  1167. height:80px;
  1168. line-height:80px;
  1169. color:#0045AF;
  1170. font-size:18px;
  1171. }
  1172. .right-button{
  1173. margin:20px 0;
  1174. }
  1175. }
  1176. .for-max-box{
  1177. margin:0 40px;
  1178. font-weight:500;
  1179. .for-big-box{
  1180. border: 1px solid #E0E0E0;
  1181. display: inline-block;
  1182. overflow: hidden;
  1183. width:280px;
  1184. min-height:158px;
  1185. padding-bottom:10px;
  1186. border-radius: 6px;
  1187. margin:0 20px 20px 0;
  1188. position: relative;
  1189. .camera{
  1190. position: absolute;
  1191. right: 0;
  1192. top: 0;
  1193. width: 50px;
  1194. height: 30px;
  1195. background: #0183FA;
  1196. border-radius: 10px 0px 10px 0px;
  1197. font-size: 14px;
  1198. font-weight: 400;
  1199. color: #FFFFFF;
  1200. line-height: 30px;
  1201. text-align: center;
  1202. }
  1203. .for-title-p{
  1204. background: rgba(182,214,254,1);
  1205. color:#0183FA;
  1206. font-size:16px;
  1207. line-height:40px;
  1208. display:block;
  1209. overflow:hidden;
  1210. text-overflow:ellipsis;
  1211. white-space:nowrap;
  1212. padding:0 16px;
  1213. margin-bottom:10px;
  1214. font-weight:700;
  1215. }
  1216. .for-text-box{
  1217. display: flex;
  1218. padding:0 23px;
  1219. p{
  1220. font-size:14px;
  1221. line-height:30px;
  1222. flex:1;
  1223. }
  1224. p:nth-child(1){
  1225. color:#333;
  1226. text-align: left;
  1227. }
  1228. p:nth-child(2){
  1229. color:#999;
  1230. text-align: right;
  1231. overflow:hidden;
  1232. text-overflow:ellipsis;
  1233. white-space:nowrap;
  1234. }
  1235. }
  1236. .for-button-box{
  1237. display: flex;
  1238. line-height:26px;
  1239. margin-top:10px;
  1240. p{
  1241. text-align: center;
  1242. font-size:14px;
  1243. color:#666666;
  1244. }
  1245. p:nth-child(1){
  1246. flex:1;
  1247. cursor: pointer;
  1248. i{
  1249. color:#1151b4;
  1250. margin-right:10px;
  1251. }
  1252. }
  1253. p:nth-child(2){
  1254. width:2px;
  1255. height:14px;
  1256. margin:6px 0;
  1257. background: #CCCCCC;
  1258. }
  1259. p:nth-child(3){
  1260. flex:1;
  1261. cursor: pointer;
  1262. i{
  1263. color:#ff6868;
  1264. margin-right:10px;
  1265. }
  1266. }
  1267. }
  1268. }
  1269. .for-big-box-two{
  1270. border: 1px solid #E0E0E0;
  1271. display: inline-block;
  1272. overflow: hidden;
  1273. width:280px;
  1274. min-height:158px;
  1275. padding-bottom:10px;
  1276. border-radius: 6px;
  1277. margin:0 20px 20px 0;
  1278. .for-title-p{
  1279. background: rgba(182,214,254,1);
  1280. color:#0183FA;
  1281. font-size:16px;
  1282. line-height:40px;
  1283. display:block;
  1284. overflow:hidden;
  1285. text-overflow:ellipsis;
  1286. white-space:nowrap;
  1287. padding:0 16px;
  1288. margin-bottom:10px;
  1289. font-weight:700;
  1290. }
  1291. .for-text-box{
  1292. display: flex;
  1293. padding:0 23px;
  1294. p{
  1295. font-size:14px;
  1296. line-height:30px;
  1297. flex:1;
  1298. }
  1299. p:nth-child(1){
  1300. text-align: left;
  1301. color:#333;
  1302. }
  1303. p:nth-child(2){
  1304. color:#999;
  1305. text-align: right;
  1306. overflow:hidden;
  1307. text-overflow:ellipsis;
  1308. white-space:nowrap;
  1309. }
  1310. }
  1311. .for-button-box{
  1312. display: flex;
  1313. line-height:26px;
  1314. margin-top:10px;
  1315. p{
  1316. text-align: center;
  1317. font-size:14px;
  1318. color:#666666;
  1319. }
  1320. p:nth-child(1){
  1321. flex:1;
  1322. cursor: pointer;
  1323. i{
  1324. color:#1151b4;
  1325. margin-right:10px;
  1326. }
  1327. }
  1328. p:nth-child(2){
  1329. width:2px;
  1330. height:14px;
  1331. margin:6px 0;
  1332. background: #CCCCCC;
  1333. }
  1334. p:nth-child(3){
  1335. flex:1;
  1336. cursor: pointer;
  1337. i{
  1338. color:#ff6868;
  1339. margin-right:10px;
  1340. }
  1341. }
  1342. }
  1343. }
  1344. .add-for-p{
  1345. font-size:14px;
  1346. border: 1px solid #E0E0E0;
  1347. display: inline-block;
  1348. overflow: hidden;
  1349. width:280px;
  1350. height:130px;
  1351. line-height:130px;
  1352. text-align: center;
  1353. border-radius: 6px;
  1354. color:#999999;
  1355. cursor: pointer;
  1356. margin:0 20px 20px 0;
  1357. i{
  1358. margin-right:10px;
  1359. }
  1360. }
  1361. .add-for-p-two{
  1362. font-size:14px;
  1363. border: 1px solid #E0E0E0;
  1364. display: inline-block;
  1365. overflow: hidden;
  1366. width:280px;
  1367. height:158px;
  1368. line-height:158px;
  1369. text-align: center;
  1370. border-radius: 6px;
  1371. color:#999999;
  1372. cursor: pointer;
  1373. margin:0 20px 20px 0;
  1374. i{
  1375. margin-right:10px;
  1376. }
  1377. }
  1378. }
  1379. }
  1380. </style>