index.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112
  1. <template>
  2. <div class="app-container" style="padding-top: 20px;height: 120vh;">
  3. <div class="ntgs">
  4. <el-row :gutter="10" class="mb8">
  5. <div class="iuer" style="margin-bottom:10px;">
  6. <div style="display: flex;align-items: center; " class="ingaqe">
  7. <!-- <p class="lqw" style="font-weight: 700;font-size: 15px; margin-bottom: 0;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px;"> 门禁信息</p> -->
  8. <el-select v-model="queryParams.name" placeholder="请选监控名称" clearable>
  9. <el-option
  10. v-for="dict in postList"
  11. :key="dict.indexCode"
  12. :label="dict.name"
  13. :value="dict.name"
  14. />
  15. </el-select>
  16. <div class="ksfpofg" @click="handleQuery">
  17. <!-- <img src="../../../assets/images/icon_sslb_ss.png" alt="" style="width:10px;height: 10px;"> -->
  18. 搜索
  19. </div>
  20. </div>
  21. <!-- <div class="ite">
  22. <div class="ksfpo" @click="osge" v-hasPermi="['system:camera:openDz']">
  23. <img src="../../../assets/images/icon_ssjk_kman_open.png" alt="" style="width:10px;height: 10px;">
  24. 开门</div>
  25. <div class="ksfpo ksfpok" @click="osgef" v-hasPermi="['system:camera:closeDz']">
  26. <img src="../../../assets/images/icon_ssjk_kman_close.png" alt="" style="width:10px;height: 10px;">
  27. 关门</div>
  28. </div> -->
  29. <!-- -->
  30. </div>
  31. <!-- <el-col :span="1.5">
  32. <el-button
  33. type="primary"
  34. plain
  35. icon="el-icon-plus"
  36. size="mini"
  37. @click="handleAdd"
  38. v-hasPermi="['investigate:table:add']"
  39. >新增</el-button>
  40. </el-col>
  41. <el-col :span="1.5">
  42. <el-button
  43. type="danger"
  44. plain
  45. icon="el-icon-delete"
  46. size="mini"
  47. :disabled="multiple"
  48. @click="handleDelete"
  49. v-hasPermi="['investigate:table:remove']"
  50. >删除</el-button>
  51. </el-col> -->
  52. <!-- <el-col :span="1.5">
  53. <el-button
  54. type="warning"
  55. plain
  56. icon="el-icon-download"
  57. size="mini"
  58. @click="handleExport"
  59. v-hasPermi="['investigate:table:export']"
  60. >导出</el-button>
  61. </el-col> -->
  62. <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
  63. </el-row>
  64. <div>
  65. <el-row :gutter="20">
  66. <!-- postList -->
  67. <el-col :span='5'>
  68. <div style="background-color: #fff;border-radius: 10px;padding: 20px 20px;height: 100vh;">
  69. <p style="margin: 0;border-left: 6px solid #03BF8A;margin-left: -20px;padding-left: 10px;font-weight: 800;">通道列表</p>
  70. <div style=" height: 36px;;line-height: 36px;margin-top: 10px;"v-for="(item,index) in 6">
  71. <div style="display: flex;align-items: center;justify-content: space-between;">
  72. <div style="font-size: 16px;
  73. color: #333333;">通道01</div>
  74. <img src="../../../assets/images/icon_htgl_zd.png" alt="" style="width: 10px;height: 12px;">
  75. </div>
  76. </div>
  77. </div>
  78. </el-col>
  79. <!-- v-if="isshoe" -->
  80. <el-col :span='19' style="padding-left: 30px; background-color: #fff;border-radius: 10px;padding: 20px;" >
  81. <div style="display: flex;align-items: center;justify-content: space-between;">
  82. <p style="margin: 0;border-left: 6px solid #03BF8A;margin-left: -20px;padding-left: 10px;font-weight: 800;">实时预览</p>
  83. <div>
  84. <el-button type="danger" plain>删除</el-button>
  85. <el-button type="warning" plain>置顶</el-button>
  86. <el-button type="success" plain>关闭</el-button>
  87. </div>
  88. </div>
  89. 344
  90. <!-- <video
  91. class="videosmall"
  92. ref="videosmallone"
  93. preload="auto"
  94. muted
  95. autoplay
  96. width="95%"
  97. type="rtmp/flv"
  98. >
  99. <source src="" />
  100. </video> -->
  101. </el-col>
  102. <!-- <el-col :span="24">
  103. <div class="ihgswq wrapper" ref="wrapper" style=" overflow: hidden;">
  104. <div class="fijge content nhgwesvq" ref="content" style="width:1610px;">
  105. <div class='shotw ' v-for="(item,index) in postList" :key="index" @click="isfgw(item)" >
  106. <img src="../../../assets/images/fengm.png" alt="">
  107. <img src="../../../assets/images/icon_spjk_play.png" alt="" class="iges">
  108. <p style="font-size: 14px;">{{item.name}}</p>
  109. </div>
  110. </div>
  111. </div>
  112. </el-col> -->
  113. </el-row>
  114. <pagination
  115. v-show="total>0"
  116. :total="total"
  117. :page.sync="queryParams.pageNo"
  118. :limit.sync="queryParams.pageSize"
  119. @pagination="getList"
  120. />
  121. </div>
  122. </div>
  123. <!-- 添加或修改岗位对话框 -->
  124. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  125. <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  126. <el-row>
  127. <el-col :span="24">
  128. <el-form-item label="接待人员" prop="receptionId">
  129. <el-select style="width:100%;" v-model="form.receptionId" placeholder="请选择">
  130. <el-option
  131. v-for="item in ksjegsg"
  132. :key="item.receptionId"
  133. :label="item.receptionName"
  134. :value="item.receptionId"
  135. @click.native="nhgwel(item)"
  136. >
  137. </el-option>
  138. </el-select>
  139. </el-form-item>
  140. </el-col>
  141. </el-row>
  142. </el-form>
  143. <div slot="footer" class="dialog-footer">
  144. <el-button type="primary" @click="submitForm">确 定</el-button>
  145. <el-button @click="cancel">取 消</el-button>
  146. </div>
  147. </el-dialog>
  148. <el-dialog :title="titles" :visible.sync="opens" width="1000px" append-to-body>
  149. <el-form ref="forms" :model="forms" :rules="ruless" label-width="120px">
  150. <el-row>
  151. <el-col :span="8">
  152. <el-form-item label="人员类型" prop="recordType">
  153. <el-select v-model="forms.recordType" placeholder="请选择人员类型" >
  154. <el-option
  155. v-for="dict in dict.type.fange"
  156. :key="dict.value"
  157. :label="dict.label"
  158. :value="dict.value"
  159. />
  160. </el-select>
  161. </el-form-item>
  162. </el-col>
  163. <el-col :span="8">
  164. <el-form-item label="联系人" prop="recordName">
  165. <el-input v-model="forms.recordName" placeholder="请输入联系人" />
  166. </el-form-item>
  167. </el-col>
  168. <el-col :span="8">
  169. <el-form-item label="联系方式" prop="recordPhone">
  170. <el-input v-model="forms.recordPhone" placeholder="请输入联系方式" />
  171. </el-form-item>
  172. </el-col>
  173. <el-col :span="8">
  174. <el-form-item label="出入时间" prop="recordDateTime">
  175. <el-date-picker style="width:100%" clearable
  176. v-model="forms.recordDateTime"
  177. type="date"
  178. value-format="yyyy-MM-dd"
  179. placeholder="请选择 出入时间">
  180. </el-date-picker>
  181. </el-form-item>
  182. </el-col>
  183. <el-col :span="8">
  184. <el-form-item label="记录来源" prop="recordSource">
  185. <el-select v-model="forms.recordSource" placeholder="请选择记录来源" >
  186. <el-option
  187. v-for="dict in dict.type.jluly"
  188. :key="dict.value"
  189. :label="dict.label"
  190. :value="dict.value"
  191. />
  192. </el-select>
  193. </el-form-item>
  194. </el-col>
  195. <el-col :span="8">
  196. <el-form-item label="备注" prop="visitRemark">
  197. <el-input v-model="forms.visitRemark" placeholder="请输入备注" />
  198. </el-form-item>
  199. </el-col>
  200. </el-row>
  201. </el-form>
  202. <div slot="footer" class="dialog-footer">
  203. <el-button type="primary" @click="submitForms">确 定</el-button>
  204. <el-button @click="cancel">取 消</el-button>
  205. </div>
  206. </el-dialog>
  207. <el-dialog title="页面二维码" :visible.sync="opent" width="200px" style="padding: 0;" class="nhgrls" append-to-body>
  208. <div v-show="opent" style="display: flex;justify-content: center;align-items: center;">
  209. <!-- <span>{{'https://qszdh.qs163.cn/pages/index/index?id=' + this.bg}}</span> -->
  210. <!-- <vue-qr :text="'https://qszdh.qs163.cn/pages/index/index?id=' + this.bg" :size="200"></vue-qr> -->
  211. </div>
  212. </el-dialog>
  213. </div>
  214. </template>
  215. <script>
  216. // import { listPost, getPost, delPost, addPost, updatePost,updateFs,updateGx } from "@/api/kaoch/renyuan";
  217. // import { listReservat,camera,cameraIndexCode, listReservatd, getReservat, delReservat, addReservat, updateReservat,setPass,delReservathx,openDz,closeDz } from "@/api/tonggi/houtai";
  218. // import vueQr from "vue-qr";
  219. // import videojs from 'video.js'
  220. // import 'video.js/dist/video-js.css'
  221. // import {videoPlayer} from 'vue-video-player'
  222. // import 'videojs-flash'
  223. // import flvjs from 'flv.js/dist/flv.min.js'
  224. // import flvjs from "flv.js";
  225. import Bscroll from "better-scroll";
  226. export default {
  227. name: "Post",
  228. dicts: ['sys_normal_disable','sys_yes_no','youke','tjzh','youkes','lafafen','fange','jluly'],
  229. // components: {
  230. // vueQr,
  231. // videoPlayer
  232. // },
  233. data() {
  234. return {
  235. // 遮罩层
  236. loading: true,
  237. opent:false,
  238. bg:null,
  239. titles:'',
  240. editableTabsValue:'6',
  241. opens:false,
  242. imageUrl:'@/assets/logo/logo.png',
  243. printObj: {
  244. id: "nhgrew", // 这里是要打印元素的ID
  245. popTitle: "", // 打印的标题
  246. },
  247. pickerOptions:{
  248. disabledDate (time) {
  249. //disabledDate 文档上:设置禁用状态,参数为当前日期,要求返回 Boolean
  250. // return time.getTime() > Date.now()//选当前时间之前的时间
  251. return time.getTime() < Date.now() - 8.64e7;//选当前时间之后的时间
  252. }
  253. },
  254. // 选中数组
  255. ids: [],
  256. // 非单个禁用
  257. single: true,
  258. checkedScoreDataDetails: [],
  259. scoreDataDetailsList:[],
  260. tabPosition:'left',
  261. // 非多个禁用
  262. multiple: true,
  263. // 显示搜索条件
  264. showSearch: true,
  265. // 总条数
  266. total: 0,
  267. // 岗位表格数据
  268. postList: [],
  269. // 弹出层标题
  270. title: "",
  271. // 是否显示弹出层
  272. open: false,
  273. // 查询参数
  274. queryParams: {
  275. pageNo: 1,
  276. pageSize:500,
  277. name:null,
  278. postCode: undefined,
  279. postName: undefined,
  280. status: undefined,
  281. reservatType:undefined
  282. },
  283. // 表单参数
  284. form: {},
  285. // 表单校验
  286. rules: {
  287. receptionId: [
  288. { required: true, message: "不能为空", trigger: "blur" }
  289. ],
  290. },
  291. ruless:{
  292. visitName: [
  293. { required: true, message: "不能为空", trigger: "blur" }
  294. ],
  295. visitPhone: [
  296. { required: true, message: "不能为空", trigger: "blur" }
  297. ],
  298. visitNum: [
  299. { required: true, message: "不能为空", trigger: "blur" }
  300. ],
  301. visitDate: [
  302. { required: true, message: "不能为空", trigger: "blur" }
  303. ],
  304. visitTime: [
  305. { required: true, message: "不能为空", trigger: "blur" }
  306. ],
  307. },
  308. forms:{},
  309. tableMaxHeight:'200',
  310. kje:0,
  311. ksjegsg:[],
  312. Scroll: null,
  313. videoShow: false,
  314. flvPlayer:null,
  315. player: null,
  316. name:null,
  317. isshiwa:false,
  318. isjfwe:{},
  319. isshoe:false
  320. };
  321. },
  322. created() {
  323. // this.getList();
  324. window.onresize = () => {
  325. this.changeTableMaxHeight()
  326. }
  327. this.changeTableMaxHeight()
  328. },
  329. mounted() {
  330. window.onresize = () => {
  331. this.changeTableMaxHeight()
  332. }
  333. this.changeTableMaxHeight()
  334. this.$nextTick(() => {
  335. this.initScroll()
  336. })
  337. },
  338. beforeDestroy() {
  339. this.destoryVideo()
  340. },
  341. methods: {
  342. init(val) { //这个val 就是一个地址,例如: http://192.168.2.201:85/live/9311272c49b845baa2b2810ad9bf3f68.flv 这是个服务器返回给我的一个监控视频流地址
  343. setTimeout(() => { //使用定时器是因为,在mounted声明周期里调用,可能会出现DOM没加载出来的原因
  344. var videoElement = this.$refs.videosmallone; // 获取到html中的video标签
  345. this.isshiwa = true
  346. if (flvjs.isSupported()) {
  347. //因为我这个是复用组件,进来先判断 player是否存在,如果存在,销毁掉它,不然会占用TCP名额
  348. if (this.player !== null) {
  349. this.player.pause();
  350. this.player.unload();
  351. this.player.detachMediaElement();
  352. this.player.destroy();
  353. this.player = null;
  354. }
  355. this.player = flvjs.createPlayer( //创建直播流,加载到DOM中去
  356. {
  357. type: "flv",
  358. url: val, //你的url地址
  359. isLive: true, //数据源是否为直播流
  360. hasAudio: false, //数据源是否包含有音频
  361. hasVideo: true, //数据源是否包含有视频
  362. enableStashBuffer: true, //是否启用缓存区
  363. },
  364. {
  365. enableWorker: false, //不启用分离线程
  366. enableStashBuffer: false, //关闭IO隐藏缓冲区
  367. autoCleanupSourceBuffer: true, //自动清除缓存
  368. lazyLoad: false,
  369. }
  370. );
  371. this.isshoe = true
  372. this.player.attachMediaElement(videoElement); //放到dom中去
  373. //!!!!!!这里需要注意,有的时候load加载完成不一定可以播放,要是播放不成功,用settimeout 给下面的this.player.play() 延时几百毫秒再播放
  374. // setTimeout(this.player.play(), 48000);
  375. setTimeout(() =>{
  376. //到时间时只执行一次就停止
  377. this.player.load();//准备完成
  378. this.player.play()
  379. console.log('播放')
  380. },900)
  381. }
  382. }, 500);
  383. },
  384. createVideo() {
  385. if (flvjs.isSupported()) {
  386. console.log(1)
  387. var videoElement = document.getElementById('myFlvVideo')
  388. console.log(videoElement,flvjs)
  389. this.flvPlayer = flvjs.createPlayer(
  390. {
  391. type: 'application/x-mpegURL',
  392. isLive: true,
  393. hasAudio: false,
  394. url:'https://stream1.freetv.fun/86d463c0006da643e45e26b34875df87059dcba13e69d0a5471b185793c122a2.m3u8'
  395. },
  396. {
  397. cors: true, // 是否跨域
  398. enableWorker: false, // 是否多线程工作
  399. enableStashBuffer: false, // 是否启用缓存
  400. stashInitialSize: 400, // 缓存大小(kb) 默认384kb
  401. autoCleanupSourceBuffer: true // 是否自动清理缓存
  402. }
  403. )
  404. this.flvPlayer.attachMediaElement(videoElement)
  405. this.flvPlayer.load()
  406. this.flvPlayer.play()
  407. console.log(1244)
  408. // 报错重连
  409. this.flvPlayer.on(flvjs.Events.ERROR, (errType, errDetail) => {
  410. console.log('errorType:', errType)
  411. console.log('errorDetail:', errDetail)
  412. if (this.flvPlayer) {
  413. this.destoryVideo()
  414. this.createVideo()
  415. }
  416. })
  417. }
  418. console.log(this.flvPlayer.play())
  419. },
  420. destoryVideo() {
  421. this.player.pause()
  422. this.player.unload()
  423. this.player.detachMediaElement()
  424. this.player.destroy()
  425. this.player = null
  426. },
  427. initScroll() {
  428. // 给内层盒子设置宽度,不设置宽度的话无法滚动
  429. // let width = this.goods.length * 60
  430. // // 如果有外边距,可以这样写。需要去掉最后一个元素的外边距,在后面减一下
  431. // let width = this.goodslength * (60 + 10) - 10
  432. let width = 6 * (200 + 10) - 10
  433. // this.$refs.content.style.width = width + 'px'
  434. this.$nextTick(()=>{
  435. if(!this.Scroll) {
  436. this.Scroll = new Bscroll(this.$refs.wrapper,{
  437. click: true, // 配置允许点击事件
  438. scrollX: true, // 开启横向滚动
  439. eventPassthrough: 'vertical', // 当设置 eventPassthrough 为 'vertical' 的时候,scrollY 无效
  440. mouseWheel: true,
  441. scrollbar: { // 滚动条, 要加相对位置
  442. fade: true
  443. }
  444. })
  445. } else {
  446. this.Scroll.refresh() // 重新计算 better-scroll,当 DOM 结构发生变化的时确保滚动效果正常
  447. }
  448. })
  449. },
  450. /** 查询岗位列表 */
  451. getList() {
  452. this.loading = true;
  453. // this.queryParams
  454. camera(this.queryParams).then(response => {
  455. this.postList = response.data.data.list;
  456. if(response.data.data != null){
  457. if(response.data.data.list.length != 0){
  458. let ne = response.data.data.list[0]
  459. response.data.data.list.filter(rtu=>{
  460. if(rtu.name == '后门道闸'){
  461. console.log(3,rtu)
  462. ne = rtu
  463. return
  464. }
  465. })
  466. this.isfgw(ne)
  467. this.isjfwe =ne
  468. }
  469. }
  470. // this.postList=[{'nsje':null,'visitPhone':null,'isReception':'Y'}]
  471. this.total = response.data.data.total;
  472. this.loading = false;
  473. });
  474. },
  475. getListh() {
  476. this.loading = true;
  477. listReservatd().then(response => {
  478. // this.postList = response.rows;
  479. this.ksjegsg= response.data
  480. // this.total = response.total;
  481. this.loading = false;
  482. });
  483. },
  484. isfgw(val){
  485. this.isjfwe = val
  486. let nhge={cameraIndexCode:val.indexCode}
  487. this.isshiwa = false
  488. this.isshoe= false
  489. cameraIndexCode(nhge.cameraIndexCode).then(response => {
  490. console.log(response.data.data.url)
  491. this.isshoe= true
  492. this.init(response.data.data.url)
  493. this.isshiwa = true
  494. // this.postList = response.rows;
  495. // this.total = response.total;
  496. });
  497. console.log(val,4)
  498. },
  499. osge(){
  500. console.log(this.isjfwe,45)
  501. if(this.isjfwe.name == '后门道闸'){
  502. this.isjfwe.name ='后门抓拍一体机1'
  503. }
  504. let nge={equipmentName:this.isjfwe.name}
  505. openDz(nge).then(response => {
  506. });
  507. },
  508. osgef(){
  509. if(this.isjfwe.name == '后门道闸'){
  510. this.isjfwe.name ='后门抓拍一体机1'
  511. }
  512. let nge={equipmentName:this.isjfwe.name}
  513. closeDz(nge).then(response => {
  514. // this.postList = response.rows;
  515. });
  516. },
  517. ilw(row,val){
  518. this.kje = val
  519. // console.log(row)
  520. if(row.value == 0){
  521. this.queryParams.reservatType = undefined
  522. }else{
  523. this.queryParams.reservatType = row.value
  524. }
  525. console.log(this.kje)
  526. this.queryParams.pageNum = 1
  527. this.getList()
  528. },
  529. nhgwel(item){
  530. this.form.receptionId = item.receptionId
  531. this.form.receptionName = item.receptionName
  532. this.form.receptionPhone = item.phonenumber
  533. },
  534. getPass(row) {
  535. const _this = this
  536. this.$confirm('是否审核通过', "提醒", {
  537. confirmButtonText: "确定",
  538. cancelButtonText: "取消",
  539. type: "warning"
  540. }).then(function() {
  541. return setPass({
  542. visitType: 3,
  543. reservatId: row.reservatId,
  544. // xmStatus:row.xmStatus
  545. })
  546. }).then(() => {
  547. _this.getList();
  548. _this.msgSuccess("提交成功");
  549. })
  550. },
  551. infoBtn(row) {
  552. const _this = this
  553. this.$confirm('是否拒绝', "提醒", {
  554. confirmButtonText: "确定",
  555. cancelButtonText: "取消",
  556. type: "warning"
  557. }).then(function() {
  558. return setPass({
  559. visitType: 2,
  560. reservatId: row.reservatId,
  561. // xmStatus:row.xmStatus
  562. })
  563. }).then(() => {
  564. _this.getList();
  565. _this.msgSuccess("提交成功");
  566. })
  567. },
  568. // 取消按钮
  569. cancel() {
  570. this.open = false;
  571. this.opens = false;
  572. this.reset();
  573. },
  574. // 表单重置
  575. reset() {
  576. this.form = {
  577. receptionId:undefined,
  578. receptionPhone:undefined,
  579. // postSort: 0,
  580. // status: "0",
  581. receptionName: undefined
  582. };
  583. this.resetForm("form");
  584. },
  585. /** 搜索按钮操作 */
  586. handleQuery() {
  587. this.queryParams.pageNum = 1;
  588. this.getList();
  589. },
  590. /** 重置按钮操作 */
  591. resetQuery() {
  592. this.resetForm("queryForm");
  593. this.handleQuery();
  594. },
  595. // 多选框选中数据
  596. handleSelectionChange(selection) {
  597. this.ids = selection.map(item => item.reservatId)
  598. this.single = selection.length!=1
  599. this.multiple = !selection.length
  600. },
  601. nhgeo(row){
  602. this.reset();
  603. this.open = true;
  604. this.title = "分配接待人员";
  605. this.form.reservatId = row.reservatId;
  606. this.form.reservatConfigTimeId=row.reservatConfigTimeId;
  607. this.form.visitDate=row.visitDate
  608. },
  609. handleDeleteh(row){
  610. this.$router.push({
  611. path: '/bjqs',
  612. query: {
  613. 'id':row.reservatId,
  614. 'name':null,
  615. 'names':null,
  616. 'isxz':1
  617. }
  618. })
  619. },
  620. /** 新增按钮操作 */
  621. handleAdd() {
  622. this.forms = {
  623. reservatType:'1'
  624. }
  625. this.opens = true;
  626. this.titles = "添加预约人员";
  627. // this.scoreDataDetailsList = []
  628. // this.$router.push({
  629. // path: '/system/bjq',
  630. // })
  631. // this.$router.push({
  632. // path: '/bjqs',
  633. // query: {
  634. // 'id':null,
  635. // 'name':null,
  636. // 'names':null,
  637. // 'isxz':1
  638. // }
  639. // })
  640. },
  641. /** 修改按钮操作 */
  642. handleUpdate(row) {
  643. this.reset();
  644. const recordId = row.recordId || this.ids
  645. getReservat(recordId).then(response => {
  646. this.forms = response.data;
  647. this.opens = true;
  648. this.title = "修改访问记录";
  649. });
  650. },
  651. /** 提交按钮 */
  652. submitForm: function() {
  653. this.$refs["form"].validate(valid => {
  654. if (valid) {
  655. // if (this.form.reservatId != null) {
  656. updateReservat(this.form).then(response => {
  657. this.$modal.msgSuccess("操作成功");
  658. this.open = false;
  659. this.getList();
  660. });
  661. // } else {
  662. // addReservat(this.form).then(response => {
  663. // this.$modal.msgSuccess("新增成功");
  664. // this.open = false;
  665. // this.getList();
  666. // });
  667. // }
  668. }
  669. });
  670. },
  671. submitForms: function() {
  672. this.$refs["forms"].validate(valid => {
  673. if (valid) {
  674. // if (this.form.reservatId != null) {
  675. // updateReservat(this.forms).then(response => {
  676. // this.$modal.msgSuccess("操作成功");
  677. // this.open = false;
  678. // this.getList();
  679. // });
  680. // } else {
  681. this.forms.visitTime = this.forms.visitTime + '-' + this.forms.visitTime
  682. addReservat(this.forms).then(response => {
  683. this.$modal.msgSuccess("新增成功");
  684. this.opens = false;
  685. this.getList();
  686. });
  687. // }
  688. }
  689. });
  690. },
  691. nglqw(val){
  692. this.opent = true
  693. this.bg = val.investigateTableId
  694. },
  695. iszheg(event){
  696. console.log(event);
  697. // 校验身份证:
  698. console.log(reg.test(this.form.idCard),23741)
  699. if ( reg.test(this.form.idCard)|| _IDre15.test(this.form.idCard)) {
  700. // this.idea();
  701. this.go(this.form.idCard);
  702. // callback()
  703. } else {
  704. if(ncjsle.test(this.form.idCard) || nhyeli.test(this.form.idCard)){
  705. console.log(3)
  706. }else{
  707. if(gnse.test(this.form.idCard) ){
  708. console.log(4)
  709. }else{
  710. if(tw.test(this.form.idCard) || twe.test(this.form.idCard)){
  711. console.log(5)
  712. }else{
  713. this.$message.error('证件格式不正确');
  714. }
  715. }
  716. }
  717. }
  718. },
  719. erw(row){
  720. this.$router.push({
  721. path: '/reny/ewm',
  722. query:{
  723. 'tenantId':row.investigateTableId
  724. }
  725. })
  726. },
  727. hussar_17Click(val) {
  728. const _this = this
  729. var url =process.env.VUE_APP_BASE_API + 'pages/index/index?id=' + val.investigateTableId;
  730. console.log(url,this.$refs.canvas,6)
  731. this.opent = true
  732. QRCode.toCanvas(
  733. canvas,
  734. url,//生成二维码的数据
  735. {width: 100, height:100, margin: 1.5},//margin调整二维码的白边大小
  736. function (error) {
  737. if (error) {
  738. console.log(error);
  739. }
  740. }
  741. );
  742. // console.log(qrcode,987)
  743. },
  744. /** 成绩_子添加按钮操作 */
  745. handleAddScoreDataDetails() {
  746. let obj = {};
  747. obj.duty = "";
  748. obj.idCard = "";
  749. obj.phonenumber = "";
  750. obj.userName = "";
  751. this.scoreDataDetailsList.push(obj);
  752. console.log(this.scoreDataDetailsList)
  753. },
  754. /** 成绩_子删除按钮操作 */
  755. handleDeleteScoreDataDetails() {
  756. if (this.checkedScoreDataDetails.length == 0) {
  757. this.$modal.msgError("请先选择要删除的数据");
  758. } else {
  759. const scoreDataDetailsList = this.scoreDataDetailsList;
  760. const checkedScoreDataDetails = this.checkedScoreDataDetails;
  761. this.scoreDataDetailsList = scoreDataDetailsList.filter(function(item) {
  762. return checkedScoreDataDetails.indexOf(item.index) == -1
  763. });
  764. }
  765. },
  766. /** 复选框选中数据 */
  767. handleScoreDataDetailsSelectionChange(selection) {
  768. this.checkedScoreDataDetails = selection.map(item => item.index)
  769. },
  770. /** 成绩_子序号 */
  771. rowScoreDataDetailsIndex({ row, rowIndex }) {
  772. row.index = rowIndex + 1;
  773. },
  774. /** 删除按钮操作 */
  775. handleDelete(row) {
  776. const postIds = row.recordId || this.ids;
  777. delReservat(postIds).then(response => {
  778. this.$modal.msgSuccess("操作成功");
  779. this.getList();
  780. });
  781. // this.$modal.confirm('是否确认删除数据项?').then(function() {
  782. // return delPost(postIds);
  783. // }).then(() => {
  784. // this.getList();
  785. // this.$modal.msgSuccess("删除成功");
  786. // }).catch(() => {});
  787. },
  788. handleDeletehx(row) {
  789. const postIds = row.reservatId || this.ids;
  790. let nhg={}
  791. nhg.reservatId = postIds
  792. delReservathx(nhg).then(response => {
  793. this.$modal.msgSuccess("操作成功");
  794. this.getList();
  795. });
  796. // this.$modal.confirm('是否确认删除数据项?').then(function() {
  797. // return delPost(postIds);
  798. // }).then(() => {
  799. // this.getList();
  800. // this.$modal.msgSuccess("删除成功");
  801. // }).catch(() => {});
  802. },
  803. // 发送短信
  804. handleUpdatefas(row){
  805. updateFs(row).then(response => {
  806. this.$modal.msgSuccess("发送成功");
  807. // this.getList();
  808. });
  809. },
  810. handleDeletegx(row){
  811. updateGx(row).then(response => {
  812. this.$modal.msgSuccess("发送成功");
  813. // this.getList();
  814. });
  815. },
  816. /** 导出按钮操作 */
  817. handleExport() {
  818. this.download('system/reservat/export', {
  819. ...this.queryParams
  820. }, `预约人员.xlsx`)
  821. },
  822. // 获取屏幕高度
  823. showFilterForm () {
  824. this.filterActive = !this.filterActive
  825. this.changeTableMaxHeight()
  826. },
  827. changeTableMaxHeight () {
  828. let height = document.body.offsetHeight // 网页可视区域高度
  829. // if (this.filterActive) {
  830. // this.tableMaxHeight = height - 320
  831. // } else {
  832. this.tableMaxHeight = height - 350
  833. // }
  834. console.log(height)
  835. }
  836. }
  837. };
  838. </script>
  839. <style lang="scss">
  840. .isjses{
  841. .el-tabs--left .el-tabs__nav-wrap.is-left::after{
  842. width:6px;
  843. }
  844. .el-tabs--left .el-tabs__active-bar.is-left,{
  845. width:6px;
  846. }
  847. }
  848. .ingaqe{
  849. .el-input--medium{
  850. width:100%;
  851. }
  852. }
  853. .nhgrls{
  854. .el-dialog__body{
  855. padding: 0;
  856. }
  857. }
  858. .hyr{
  859. span{
  860. text-decoration:underline;
  861. }
  862. }
  863. </style>
  864. <style scoped lang="scss">
  865. .nghwgq{
  866. display: flex;
  867. flex-direction: column;
  868. justify-content: center;
  869. align-items: center;
  870. margin-top: 90px;
  871. div{
  872. color:#aaa;
  873. }
  874. }
  875. .ihgswq{
  876. // width:100%;
  877. // overflow-x: hidden;
  878. // margin-top: 30px;
  879. }
  880. .fijge{
  881. // width: 110%;
  882. display: flex;
  883. display: -webkit-flex;
  884. justify-content: space-between;
  885. .shotw{
  886. position: relative;
  887. // width:32%;
  888. width: 238px;
  889. height: 140px;
  890. margin-left: 0;
  891. margin-right: 20px;
  892. margin-bottom: 15px;
  893. img{
  894. height: 100%;
  895. cursor:pointer;
  896. }
  897. p{
  898. // bottom:-10px;
  899. margin: 0;
  900. font-weight: bold;
  901. font-size: 16px;
  902. padding: 5px 10px;
  903. cursor:pointer;
  904. }
  905. .iges{
  906. position: absolute;
  907. top:50%;
  908. left:50%;
  909. width:30px;
  910. height: 30px;
  911. transform: translate(-50%,-50%);
  912. cursor:pointer;
  913. }
  914. }
  915. }
  916. .nhgwesvq{
  917. width:1610px !important;
  918. }
  919. .shotw{
  920. position: relative;
  921. margin-left: -20px;
  922. margin-right: -20px;
  923. img{
  924. width:100%;
  925. height: 80vh;
  926. }
  927. p{
  928. position: absolute;
  929. bottom: 0;
  930. left:0;
  931. background-color: rgba(0, 0, 0, .5);
  932. width: 100%;
  933. padding: 13px 5px;
  934. color:#fff;
  935. font-weight: bold;
  936. font-size: 18px;
  937. }
  938. .p{
  939. top:0px;
  940. height: 60px;
  941. margin: 0;
  942. padding-left: 20px;
  943. }
  944. }
  945. .ksfpo{
  946. background-color: #3464EB;
  947. padding: 6px 12px;
  948. border-radius: 4px ;
  949. color:#fff;
  950. cursor:pointer;
  951. }
  952. .ksfpok{
  953. background-color: #FFFFFF;
  954. padding: 5px 11px;
  955. border-radius: 4px;
  956. color:#3464EB;
  957. border: 1px solid #3464EB;
  958. margin-left: 10px;
  959. cursor:pointer;
  960. }
  961. .ksfpofg{
  962. background-color: #75DB75;
  963. padding: 5px 11px;
  964. border-radius: 4px;
  965. color:#FFFFFF;
  966. border: 1px solid #75DB75;
  967. margin-left: 10px;
  968. cursor:pointer;
  969. }
  970. .iuer{
  971. display: flex;
  972. justify-content: space-between;
  973. align-items: center;
  974. .ite{
  975. display: flex;
  976. justify-content: space-between;
  977. align-items: center;
  978. p{
  979. cursor:pointer;
  980. margin: 0;
  981. font-size: 15px;
  982. font-family: PingFang SC;
  983. font-weight: 500;
  984. color:#666666;
  985. padding: 4px 12px;
  986. background: #Fff;
  987. border-radius: 4px;
  988. margin-right: 20px;
  989. position: relative;
  990. }
  991. .actt{
  992. background: #fff;
  993. // border-bottom: 3px solid #5974E0;
  994. // border-radius: 0;
  995. // border-bottom-right-radius: 4px;
  996. color: #5974E0;
  997. }
  998. .actt{
  999. &::after {
  1000. content: "";
  1001. width: 40%;
  1002. height: 5px;
  1003. border-radius: 3px;
  1004. transform: translate(-50%);
  1005. background-color: #5974E0;
  1006. position: absolute;
  1007. left: 50%;
  1008. bottom:-3px;
  1009. }
  1010. }
  1011. }
  1012. }
  1013. .lqw{
  1014. padding: 0 10px;
  1015. margin: 0;
  1016. margin-bottom: 20px;
  1017. }
  1018. .nhgel{
  1019. height: 170px;
  1020. background-color: #313b61;
  1021. width: 100%;
  1022. position: absolute;
  1023. top:0;
  1024. left:0;
  1025. z-index: 0;
  1026. }
  1027. .app-container{
  1028. background-color: #f3f4f6;
  1029. padding-top: 10px;
  1030. height: 180vh;
  1031. }
  1032. .ntgs{
  1033. position: relative;
  1034. // background-color: #fff;
  1035. padding: 5px;
  1036. // border-radius: 5px;
  1037. padding-top: 10px;
  1038. padding: 10px 20px;
  1039. .pagination-container{
  1040. height: 50px;
  1041. }
  1042. }
  1043. .nghfs{
  1044. position: relative;
  1045. background-color: #fff;
  1046. padding-top: 18px !important;
  1047. padding: 5px;
  1048. // border-radius: 5px;
  1049. // margin-bottom: 20px;
  1050. }
  1051. .ksf{
  1052. img{
  1053. width:100%;
  1054. height: 100%;
  1055. }
  1056. }
  1057. .ingwfaq{
  1058. font-weight: bold;
  1059. font-size: 16px;
  1060. }
  1061. </style>