log.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078
  1. <template>
  2. <div class="content-box">
  3. <div class="left">
  4. <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
  5. <span class="cameratxt">业务日志</span>
  6. </div>
  7. <div>
  8. <div class="middle">
  9. <div class="filter">
  10. <div class="condition">
  11. <el-input
  12. :clearable="true"
  13. @clear="searchBtn"
  14. v-model="searchInput.keyWord"
  15. class="sel"
  16. placeholder="请输入任务名称"
  17. />
  18. <el-select v-model="value" class="sel" placeholder="执行方式">
  19. <el-option label="Mariadb 数据库" value="1" />
  20. <el-option label="MySQL6.0 及以下数据库" value="2" />
  21. <el-option label="MySQL8.0 及以下数据库" value="3" />
  22. <el-option label="Oracle 10g、11g 数据库" value="3" />
  23. <el-option label="PostgreSQL 数据库" value="3" />
  24. </el-select>
  25. <el-select v-model="value" class="sel" placeholder="任务状态">
  26. <el-option label="已启动" value="1" />
  27. <el-option label="停止" value="2" />
  28. </el-select>
  29. <el-input
  30. :clearable="true"
  31. @clear="searchBtn"
  32. v-model="searchInput.keyWord"
  33. class="sel"
  34. placeholder="请输入目的表名"
  35. />
  36. <el-button
  37. color="rgba(0, 97, 255, 1)"
  38. type="primary"
  39. class="search"
  40. @click="searchBtn"
  41. ><el-icon>
  42. <Search />
  43. </el-icon>
  44. <span>查询</span></el-button
  45. >
  46. </div>
  47. </div>
  48. <!-- 按钮列表 -->
  49. <!-- <div class="gongneng">
  50. <el-button
  51. type="primary"
  52. color="rgba(0, 97, 255, 1)"
  53. @click="addClick"
  54. plain
  55. >新建身份</el-button
  56. >
  57. </div> -->
  58. </div>
  59. <div class="footer" v-loading="loading">
  60. <el-table
  61. :row-class-name="tableRowClassName"
  62. :data="tableData.list"
  63. @selection-change="handleSelectionChange"
  64. style="width: 100%"
  65. :header-cell-style="{
  66. background: 'rgba(240, 243, 247, 1)',
  67. height: '50px',
  68. }"
  69. >
  70. <el-table-column align="center" type="selection" width="55" />
  71. <el-table-column
  72. width="55"
  73. align="center "
  74. type="index"
  75. label="序号"
  76. />
  77. <el-table-column align="center" prop="name" label="任务名称" />
  78. <el-table-column align="center" prop="department" label="业务部门" />
  79. <el-table-column align="center" prop="source" label="来源库" />
  80. <el-table-column align="center" prop="targetKu" label="目的库" />
  81. <el-table-column align="center" prop="targetB" label="目的表" />
  82. <el-table-column
  83. align="center"
  84. prop="interchangerName"
  85. label="交换机名称"
  86. />
  87. <el-table-column align="center" prop="identifying" label="执行标识" />
  88. <el-table-column align="center" prop="way" label="执行方式" />
  89. <el-table-column align="center" prop="status" label="执行状态">
  90. <template #default="scope">
  91. <span class="normal">{{ scope.row.status }}</span>
  92. </template>
  93. </el-table-column>
  94. <el-table-column
  95. align="center"
  96. prop="timeStart"
  97. label="执行开始时间"
  98. />
  99. <el-table-column align="center" prop="timeEnd" label="执行结束时间" />
  100. <el-table-column align="center" prop="elapsedTime" label="耗时" />
  101. <el-table-column
  102. align="center"
  103. prop="readVolume"
  104. label="读取数据量"
  105. />
  106. <el-table-column align="center" prop="addVolume" label="增加数据量" />
  107. <el-table-column
  108. align="center"
  109. prop="updateVolume"
  110. label="更新数据量"
  111. />
  112. <el-table-column
  113. align="center"
  114. prop="errorVolume"
  115. label="错误数据量"
  116. />
  117. <el-table-column align="center" label="操作" width="80">
  118. <template #default="scope">
  119. <div class="edit">
  120. <div class="look" @click="editClick(scope.row)">查看</div>
  121. </div>
  122. </template>
  123. </el-table-column>
  124. </el-table>
  125. </div>
  126. <!-- 分页组件 -->
  127. <div class="pageSize">
  128. <span></span>
  129. <el-pagination
  130. background
  131. :current-page="currentPage"
  132. :page-size="pageSize"
  133. layout="total, prev, pager, next, jumper, slot"
  134. :total="total"
  135. @update:current-page="handleCurrentChange"
  136. />
  137. </div>
  138. <!-- 编辑按钮 -->
  139. <el-dialog
  140. class="editDialog"
  141. v-model="editVisible"
  142. :close-on-click-modal="false"
  143. :close-on-press-escape="false"
  144. title="日志详情"
  145. align-center
  146. width="600"
  147. :before-close="cancelEdit"
  148. >
  149. <div>
  150. {"log":"2023/12/18 17:22:18 - 0c8ee93ef21d4c96abd6a381657b6e91 -
  151. Dispatching started for transformation
  152. [0c8ee93ef21d4c96abd6a381657b6e91]\n2023/12/18 17:22:25 - table
  153. input.0 - Finished reading query, closing connection.\n2023/12/18
  154. 17:22:25 - table input.0 - Finished processing (I=35677, O=0, R=0,
  155. W=35677, U=0, E=0)\n2023/12/18 17:22:26 - table output.0 - Finished
  156. processing (I=35677, O=0, R=35677, W=35677, U=0,
  157. E=0)\n","finished":false,"stepMeasure":[["table
  158. input","0","0","35677","35677","0","0","0","0","Finished","5.0s","
  159. 7,121","-"],["table
  160. output","0","35677","35677","35677","0","0","0","0","Running","6.8s","
  161. 5,278"," 0/0"],["error
  162. data","0","0","0","0","0","0","0","0","Finished","6.8s"," 0","-"]]}
  163. </div>
  164. <div class="options">
  165. <el-button @click="cancelEdit">关闭</el-button>
  166. </div>
  167. </el-dialog>
  168. </div>
  169. <div class="bgImg" v-if="bgImg">
  170. <el-carousel
  171. @click="bgImg = false"
  172. ref="bgImgs"
  173. indicator-position
  174. arrow="always"
  175. :autoplay="false"
  176. trigger
  177. >
  178. <el-carousel-item v-for="item in bgImgList" :key="item.id">
  179. <img :src="item.url" alt="" />
  180. </el-carousel-item>
  181. </el-carousel>
  182. </div>
  183. </div>
  184. </template>
  185. <script setup>
  186. import {
  187. ref,
  188. reactive,
  189. watch,
  190. nextTick,
  191. onBeforeMount,
  192. onUnmounted,
  193. } from "vue";
  194. import { useRouter } from "vue-router";
  195. import { ElMessage, ElMessageBox } from "element-plus";
  196. import { Calendar } from "@element-plus/icons-vue";
  197. import vidiconsApi from "@/api/vidicons.js";
  198. import { dayjs } from "element-plus";
  199. import lodash from "lodash";
  200. import axios from "axios";
  201. import { useStore } from "vuex";
  202. const store = useStore();
  203. const api = ref("");
  204. const router = useRouter();
  205. // 表格数据
  206. const loading = ref(false);
  207. const tableData = reactive({
  208. list: [
  209. {
  210. name: "标准库教职工-bpmx中间库", // 任务名称
  211. department: "部门通用", //业务部门
  212. source: "标准数据库", //来源库
  213. targetKu: "bpmX中间库", // 目的库
  214. targetB: "GXJG_JZGJCSJZLB", // 目的表
  215. interchangerName: "交换机172.16.40.40", //交换机名称
  216. identifying: "自动执行", // 执行标识
  217. way: "间隔执行", //执行方式
  218. status: "执行中", //执行状态
  219. timeStart: "2023-12-15 11:06:12", //执行开始时间
  220. timeEnd: "2023-12-15 11:06:12", //执行结束时间
  221. elapsedTime: "-", // 耗时
  222. readVolume: "-", // 读取数据量
  223. addVolume: "-", // 增加数据量
  224. updateVolume: "-", // 更新数据量
  225. errorVolume: "-", // 错误数据量
  226. },
  227. {
  228. name: "标准库学生-bpmx中间库", // 任务名称
  229. department: "部门通用", //业务部门
  230. source: "标准数据库", //来源库
  231. targetKu: "bpmX中间库", // 目的库
  232. targetB: "GXXS_XSJBSJZL", // 目的表
  233. interchangerName: "交换机172.16.40.40", //交换机名称
  234. identifying: "自动执行", // 执行标识
  235. way: "间隔执行", //执行方式
  236. status: "执行中", //执行状态
  237. timeStart: "2023-12-15 11:06:12", //执行开始时间
  238. timeEnd: "2023-12-15 11:06:12", //执行结束时间
  239. elapsedTime: "-", // 耗时
  240. readVolume: "-", // 读取数据量
  241. addVolume: "-", // 增加数据量
  242. updateVolume: "-", // 更新数据量
  243. errorVolume: "-", // 错误数据量
  244. },
  245. {
  246. name: "密码", // 任务名称
  247. department: "部门通用", //业务部门
  248. source: "新认证正式库", //来源库
  249. targetKu: "教务数据库", // 目的库
  250. targetB: "GXJG_JZGJCSJZLB", // 目的表
  251. interchangerName: "交换机172.16.40.40", //交换机名称
  252. identifying: "自动执行", // 执行标识
  253. way: "间隔执行", //执行方式
  254. status: "执行成功", //执行状态
  255. timeStart: "2023-12-15 11:06:12", //执行开始时间
  256. timeEnd: "2023-12-15 11:06:12", //执行结束时间
  257. elapsedTime: "8秒", // 耗时
  258. readVolume: "35676", // 读取数据量
  259. addVolume: "0", // 增加数据量
  260. updateVolume: "0", // 更新数据量
  261. errorVolume: "0", // 错误数据量
  262. },
  263. ],
  264. });
  265. const searchInput = reactive({
  266. keyWord: "",
  267. createTime: "",
  268. }); // 搜索按钮数据
  269. const currentPage = ref(1); // 当前页
  270. const pageSize = ref(10);
  271. const total = ref(5); // 当前总数
  272. // 编辑功能
  273. const editVisible = ref(false);
  274. const editRef = ref();
  275. const editRuleForm = reactive({
  276. userDepartment: "", // 用户部门
  277. userName: "", // 用户名
  278. userRoles: "", // 用户角色
  279. schoolCard: "", // 微校卡号
  280. idNumber: "", // 身份证号
  281. fingerprint: "", // 指纹
  282. id: "",
  283. });
  284. // 查看房型列表
  285. const getList = async () => {
  286. // loading.value = true;
  287. // let data = {
  288. // page: currentPage.value,
  289. // rows: pageSize.value,
  290. // hName: searchInput.keyWord, // 房型名称
  291. // managerId: sessionStorage.getItem("token"),
  292. // };
  293. // let res = await axios({
  294. // method: "post",
  295. // url: api.value + "/mhotel/housequeryPage.action",
  296. // headers: {
  297. // // token: sessionStorage.getItem("token"),
  298. // // user_head: sessionStorage.getItem("userhead"),
  299. // },
  300. // params: data,
  301. // });
  302. // console.log(res, "房型管理");
  303. // if (res.data.code == 200) {
  304. // loading.value = false;
  305. // tableData.list = res.data.data.pageList;
  306. // total.value = res.data.data.total;
  307. // // ElMessage({
  308. // // type: "success",
  309. // // showClose: true,
  310. // // message: res.data.message,
  311. // // center: true,
  312. // // });
  313. // } else {
  314. // loading.value = false;
  315. // ElMessage({
  316. // type: "error",
  317. // showClose: true,
  318. // message: res.data.message,
  319. // center: true,
  320. // });
  321. // }
  322. };
  323. // 搜索功能
  324. const searchBtn = lodash.debounce(async () => {
  325. getList();
  326. }, 300);
  327. //编辑按钮 (-------------------------------------------)
  328. const editClick = async () => {
  329. editVisible.value = true;
  330. // let data = {
  331. // linkId: row.id,
  332. // };
  333. // let res = await axios({
  334. // method: "post",
  335. // url: api.value + "/mhotel/uploadgetByLinkId.action",
  336. // headers: {},
  337. // params: data,
  338. // });
  339. // console.log(res, "编辑中查找图片");
  340. // if (res.data.code == 200) {
  341. // // res.data.data.fileInfoList.forEach((item) => {
  342. // // item.uid = item.id;
  343. // // });
  344. // // fileList.list = res.data.data.fileInfoList;
  345. // // ruleForm.fileListJson = fileList.list;
  346. // res.data.data.forEach((item) => {
  347. // item.uid = item.id;
  348. // });
  349. // fileList.list = res.data.data;
  350. // ruleForm.fileListJson = fileList.list;
  351. // // ElMessage({
  352. // // type: "success",
  353. // // showClose: true,
  354. // // message: res.data.message,
  355. // // center: true,
  356. // // });
  357. // } else {
  358. // ElMessage({
  359. // type: "error",
  360. // showClose: true,
  361. // message: res.data.message,
  362. // center: true,
  363. // });
  364. // }
  365. };
  366. const cancelEdit = () => {
  367. editVisible.value = false;
  368. editRef.value.resetFields();
  369. };
  370. // // 树形结构 复选框被触发
  371. // const handleCheckChange = (data, checked, indeterminate) => {
  372. // // console.log(data, checked, indeterminate);
  373. // if (data.list) {
  374. // // console.log(data.list);
  375. // } else {
  376. // if (checked) {
  377. // roomNumRef.value.setCheckedKeys([data.id]);
  378. // }
  379. // let keys = roomNumRef.value.getCheckedKeys();
  380. // console.log(keys);
  381. // editRuleForm.roomNum = keys;
  382. // }
  383. // };
  384. // // 树形结构 被点击时触发
  385. // const roomNumClick = (data, node, component) => {
  386. // // * @description: node - click 节点被点击时的回调
  387. // // * @param {*} data 该节点所对应的对象
  388. // // * @param {*} node 节点对应的 Node
  389. // // * @param {*} component 节点组件本身
  390. // console.log("子组件触发 node-click 事件", data, node, component);
  391. // // buildIdsRef.value.setCheckedKeys(item.build);
  392. // };
  393. // 确定编辑
  394. const confirmEdit = (formEl) => {
  395. if (!formEl) return;
  396. formEl.validate(async (valid, fields) => {
  397. if (valid) {
  398. }
  399. });
  400. };
  401. //删除按钮
  402. const del = async (row) => {
  403. let data = {
  404. id: row.id,
  405. };
  406. // let res = await axios({
  407. // method: "post",
  408. // url: api.value + "/mhotel/housedelHouser.action",
  409. // headers: {
  410. // // token: sessionStorage.getItem("token"),
  411. // // user_head: sessionStorage.getItem("userhead"),
  412. // },
  413. // params: data,
  414. // });
  415. // if (res.data.code == 200) {
  416. // if (tableData.list.length == 1 && currentPage.value != 1) {
  417. // currentPage.value = currentPage.value - 1;
  418. // }
  419. // getList();
  420. // ElMessage({
  421. // type: "success",
  422. // showClose: true,
  423. // message: res.data.message,
  424. // center: true,
  425. // });
  426. // } else {
  427. // ElMessage({
  428. // type: "error",
  429. // showClose: true,
  430. // message: res.data.message,
  431. // center: true,
  432. // });
  433. // }
  434. // console.log(res);
  435. };
  436. // 指纹录取 下一步 (-------------------------------------------------)
  437. const entering = () => {
  438. addFingerprintVisible.value = true;
  439. step.list = [
  440. { id: 1, title: "" },
  441. { id: 2, title: "" },
  442. { id: 3, title: "" },
  443. { id: 4, title: "" },
  444. ];
  445. stepindex.value = 0;
  446. var wsUrl = "ws://localhost:8181/";
  447. let websocket = new WebSocket(wsUrl);
  448. ws.value = websocket;
  449. websocket.onopen = function (evt) {
  450. var params = { type: 101, data: null };
  451. websocket.send(JSON.stringify(params));
  452. };
  453. websocket.onmessage = function (evt) {
  454. // console.log(evt.data, "输出指纹数据");
  455. let data = JSON.parse(evt.data);
  456. if (data.type == 0) {
  457. console.log(JSON.parse(evt.data).data.portNames[1]); // 获取到 USB接口
  458. let params1 = {
  459. type: 1,
  460. data: {
  461. type: 0,
  462. portName: JSON.parse(evt.data).data.portNames[1],
  463. baudRate: 115200,
  464. },
  465. };
  466. websocket.send(JSON.stringify(params1));
  467. } else if (data.type == 110) {
  468. console.log("已获取设备信息");
  469. } else if (data.type == 11) {
  470. var params2 = {
  471. type: 2,
  472. data: {
  473. totalStep: 4,
  474. },
  475. };
  476. websocket.send(JSON.stringify(params2));
  477. } else if (data.type == 21) {
  478. if (data.data.step == 0) {
  479. // console.log("请按压指纹");
  480. ElMessage({
  481. message: "请开始按压指纹",
  482. type: "success",
  483. });
  484. } else {
  485. // console.log(`请按下同一指纹,第${data.data.step}次按压`);
  486. if (data.data.step <= 4) {
  487. step.list.forEach((item) => {
  488. if (item.id == data.data.step) {
  489. item.title = `请按下同一指纹,第${data.data.step}次录入指纹成功`;
  490. }
  491. });
  492. }
  493. stepindex.value = data.data.step;
  494. }
  495. // _this.$message.warning("请将手指按在传感器上");
  496. if (data.data.step > 4) {
  497. var params = {
  498. type: 3,
  499. data: {
  500. id: data.data.id,
  501. },
  502. };
  503. websocket.send(JSON.stringify(params));
  504. }
  505. } else if (data.type == 31) {
  506. editRuleForm.fingerprint = data.data.template;
  507. console.log(data.data.template, "指纹数据");
  508. addFingerprintVisible.value = false;
  509. ws.value.close();
  510. ElMessage({
  511. message: "指纹录取成功",
  512. type: "success",
  513. });
  514. // setTimeout(() => {
  515. // _this.fingerprintShow = false;
  516. // ws.value.close();
  517. // }, 1500);
  518. } else {
  519. ElMessage({
  520. message: "设备连接失败,请刷新重新录入",
  521. type: "error",
  522. });
  523. }
  524. };
  525. websocket.onclose = function (evt) {
  526. console.log("关闭连接");
  527. // ws.value.close();
  528. };
  529. websocket.onerror = function (evt) {
  530. // console.log("错误提示");
  531. };
  532. };
  533. // 关闭指纹录入
  534. const cancelAddFingerprint = () => {
  535. addFingerprintVisible.value = false;
  536. // var wsUrl = "ws://localhost:8181/";
  537. // const websocket = new WebSocket(wsUrl);
  538. ws.value.close();
  539. };
  540. // 读卡操作(---------------------------------------------)
  541. const Card = () => {
  542. var wsUrl = "ws://localhost:8181/";
  543. let websocket = new WebSocket(wsUrl);
  544. // wsidentityCard.value = websocket;
  545. websocket.onopen = function (evt) {
  546. var params = { type: 104, data: null };
  547. websocket.send(JSON.stringify(params));
  548. };
  549. websocket.onmessage = function (evt) {
  550. let data = JSON.parse(evt.data);
  551. console.log(data);
  552. if (data.type == 141) {
  553. identityCardTitle.value = "请插入设备";
  554. identityCardIndex.value = 0;
  555. } else if (data.type == 150) {
  556. identityCardTitle.value = "配置失败,请放置卡片";
  557. identityCardIndex.value = 1;
  558. } else if (data.type == 140) {
  559. console.log(data.data.uid, "读取的卡号");
  560. identityCardIndex.value = 2;
  561. identityCardTitle.value = "读卡中";
  562. if (data.data.uid) {
  563. setTimeout(() => {
  564. identityCardIndex.value = 3;
  565. identityCardTitle.value = "读卡成功";
  566. }, 1500);
  567. }
  568. editRuleForm.idNumber = data.data.uid;
  569. // ElMessage({
  570. // type: "success",
  571. // showClose: true,
  572. // message: "添加卡片成功",
  573. // center: true,
  574. // });
  575. // identityCardTitle.value = "获取卡号成功";
  576. // addIdentityCardVisible.value = false;
  577. // identityCardVisible.value = false;
  578. // identityCardRef.value.resetFields();
  579. // setTimeout(() => {
  580. // _this.icCardShow = false;
  581. // }, 2000);
  582. }
  583. };
  584. };
  585. // 身份证读卡 下一步
  586. const readCard = () => {
  587. addIdentityCardVisible.value = true;
  588. Card();
  589. };
  590. // 重试 身份卡
  591. const retry = () => {
  592. // identityCardNum.value = "";
  593. Card();
  594. };
  595. const cancelAddIdentityCard = () => {
  596. addIdentityCardVisible.value = false;
  597. identityCardIndex.value = 0;
  598. };
  599. // 多选框功能
  600. const handleSelectionChange = (val) => {
  601. console.log(val);
  602. selectData.list = val;
  603. };
  604. //导出功能
  605. // const importExcel = async () => {
  606. // if (searchInput.createTime == null) {
  607. // searchInput.createTime = "";
  608. // }
  609. // let data = new FormData();
  610. // data.set("car_number", searchInput.carnumber);
  611. // data.set("create_time", searchInput.createTime);
  612. // let res = await axios({
  613. // method: "post",
  614. // url: api.value + "/carBook/cinfotoExcel.action",
  615. // headers: {
  616. // token: sessionStorage.getItem("token"),
  617. // },
  618. // data: data,
  619. // });
  620. // // console.log(res, "导出账号");
  621. // if (res.data.code == 200) {
  622. // // const elt = document.createElement("a");
  623. // // elt.setAttribute(
  624. // // "href",
  625. // // "https://chtech.ncjti.edu.cn/carstop" + res.data.downurl
  626. // // );
  627. // // elt.setAttribute("download", "file.png");
  628. // // elt.style.display = "none";
  629. // // document.body.appendChild(elt);
  630. // // elt.click();
  631. // var downloadPath = "https://chtech.ncjti.edu.cn/carstop" + res.data.downurl;
  632. // console.log("获得地址数据:", downloadPath);
  633. // var downloadLink = document.createElement("a");
  634. // downloadLink.style.display = "none"; // 使其隐藏
  635. // downloadLink.href = downloadPath;
  636. // downloadLink.download = "";
  637. // downloadLink.click();
  638. // document.body.appendChild(downloadLink);
  639. // document.body.removeChild(downloadLink);
  640. // ElMessage({
  641. // type: "success",
  642. // showClose: true,
  643. // message: res.data.message,
  644. // center: true,
  645. // });
  646. // } else {
  647. // ElMessage({
  648. // type: "error",
  649. // showClose: true,
  650. // message: res.data.message,
  651. // center: true,
  652. // });
  653. // }
  654. // };
  655. // 表格斑马纹颜色修改
  656. const tableRowClassName = ({ row, rowIndex }) => {
  657. if (rowIndex % 2 === 0) {
  658. return "even";
  659. } else if (rowIndex % 2 !== 0) {
  660. return "odd";
  661. }
  662. return "";
  663. };
  664. // 分页
  665. const handleCurrentChange = (value) => {
  666. // console.log(value);
  667. currentPage.value = value;
  668. getList();
  669. };
  670. onBeforeMount(async () => {
  671. api.value = store.state.user.api;
  672. getList();
  673. });
  674. onUnmounted(() => {
  675. // document.removeEventListener("keyup", Enters);
  676. });
  677. </script>
  678. <style scoped lang="scss">
  679. .content-box {
  680. width: 97.5%;
  681. height: 89%;
  682. margin: 20px auto;
  683. background-color: #fff;
  684. color: #fff;
  685. display: flex;
  686. flex-direction: column;
  687. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  688. .left {
  689. // width: calc(100wh - 40px);
  690. display: flex;
  691. align-items: center;
  692. height: 60px;
  693. margin: 0 30px;
  694. border-bottom: 1px solid #ccc;
  695. color: rgb(0, 0, 0);
  696. font-size: 18px;
  697. font-weight: 600;
  698. span {
  699. margin-right: 20px;
  700. cursor: pointer;
  701. }
  702. .is_active {
  703. color: rgba(111, 182, 184, 1);
  704. }
  705. }
  706. .middle {
  707. width: 96%;
  708. margin: 0 auto;
  709. color: #000;
  710. // border-bottom: 1px solid rgb(231, 231, 231);
  711. .filter {
  712. display: flex;
  713. flex-wrap: wrap;
  714. align-items: center;
  715. margin: 10px 0 0 0;
  716. .search {
  717. color: #fff;
  718. }
  719. .condition {
  720. display: flex;
  721. align-items: center;
  722. margin: 10px 10px 10px 0;
  723. .sel {
  724. margin-right: 10px;
  725. }
  726. :deep(.el-input .el-input__inner) {
  727. font-size: 14px;
  728. }
  729. }
  730. }
  731. .gongneng {
  732. margin: 10px 0 20px 0;
  733. span {
  734. color: #fff;
  735. }
  736. .el-button {
  737. margin-right: 10px;
  738. }
  739. }
  740. :deep(.cont) {
  741. width: 60%;
  742. margin: 20px auto;
  743. }
  744. :deep(.download) {
  745. display: flex;
  746. align-items: center;
  747. margin: 10px;
  748. }
  749. :deep(.download span) {
  750. font-size: 16px;
  751. margin-left: 20px;
  752. }
  753. :deep(.cont .el-button) {
  754. margin-left: 60px;
  755. margin-bottom: 30px;
  756. }
  757. :deep(.cont .accomplish) {
  758. width: 100%;
  759. display: flex;
  760. justify-content: center;
  761. }
  762. :deep(.cont .accomplish .el-button) {
  763. width: 50%;
  764. margin: 0;
  765. }
  766. }
  767. .footer {
  768. width: 96%;
  769. height: 550px;
  770. margin: 10px auto 30px;
  771. .el-table--fit {
  772. height: 100%;
  773. :deep(.el-table__header-wrapper) {
  774. background-color: #000;
  775. font-size: 14px;
  776. tr {
  777. // color: #000;
  778. }
  779. }
  780. :deep(.el-table__row) {
  781. height: 50px;
  782. font-size: 14 px;
  783. // color: #000;
  784. &:hover {
  785. td {
  786. background-color: rgba(223, 236, 254, 1);
  787. }
  788. }
  789. }
  790. :deep(.el-table__row):nth-child(2n) {
  791. .el-table-fixed-column--right {
  792. background-color: rgba(240, 243, 247, 1);
  793. }
  794. }
  795. :deep(.el-table__row td) {
  796. padding: 0;
  797. border: 0;
  798. .normal {
  799. background-color: rgb(139, 195, 74);
  800. color: #fff;
  801. padding: 5px;
  802. }
  803. }
  804. .el-button--primary {
  805. margin-left: 5px;
  806. }
  807. :deep(.el-table__body .even) {
  808. background-color: #fff;
  809. }
  810. :deep(.el-table__body .odd) {
  811. background-color: rgba(240, 243, 247, 1);
  812. }
  813. :deep(.edit) {
  814. display: flex;
  815. align-items: center;
  816. justify-content: center;
  817. color: rgba(111, 182, 184, 1);
  818. }
  819. :deep(.look) {
  820. padding: 0 10px;
  821. cursor: pointer;
  822. color: rgba(30, 125, 251, 1);
  823. }
  824. .del {
  825. padding: 0 10px;
  826. color: rgba(212, 48, 48, 1);
  827. cursor: pointer;
  828. }
  829. // :deep(.look):hover {
  830. // color: red;
  831. // }
  832. // :deep(.del):hover {
  833. // color: red;
  834. // }
  835. }
  836. }
  837. // 编辑按钮
  838. :deep(.editDialog) {
  839. // height: 420px;
  840. border-radius: 11px;
  841. .el-dialog__header {
  842. border-radius: 11px 11px 0 0;
  843. background: rgba(237, 241, 245, 1);
  844. font-weight: 600;
  845. margin: 0;
  846. .el-dialog__headerbtn {
  847. outline: none;
  848. }
  849. }
  850. .el-dialog__body {
  851. padding: 20px 30px 10px 30px;
  852. .options {
  853. margin: 50px 20px 20px 0;
  854. width: 100%;
  855. display: flex;
  856. flex-direction: row-reverse;
  857. .queding {
  858. color: #fff;
  859. margin-left: 15px;
  860. }
  861. }
  862. }
  863. }
  864. // 指纹弹窗
  865. :deep(.fingerprint) {
  866. width: 611px;
  867. height: 486px;
  868. border-radius: 11px;
  869. .el-dialog__header {
  870. border-radius: 11px 11px 0 0;
  871. background: rgba(237, 241, 245, 1);
  872. font-weight: 600;
  873. margin: 0;
  874. .el-dialog__headerbtn {
  875. outline: none;
  876. }
  877. }
  878. .el-dialog__body {
  879. padding: 0;
  880. .elbody {
  881. display: flex;
  882. justify-content: space-between;
  883. align-items: center;
  884. padding: 20px 20px;
  885. font-size: 18px;
  886. color: #000;
  887. border-bottom: 0.5px solid #ccc;
  888. i {
  889. cursor: pointer;
  890. }
  891. }
  892. }
  893. .el-dialog__footer {
  894. .el-button--primary {
  895. background: rgba(41, 109, 227, 1);
  896. }
  897. }
  898. }
  899. // 身份证读取
  900. :deep(.addIdentityCard) {
  901. // height: 420px;
  902. border-radius: 11px;
  903. .el-dialog__header {
  904. border-radius: 11px 11px 0 0;
  905. background: rgba(237, 241, 245, 1);
  906. font-weight: 600;
  907. margin: 0;
  908. .el-dialog__headerbtn {
  909. outline: none;
  910. }
  911. }
  912. .el-dialog__body {
  913. padding: 30px 20px 10px 20px;
  914. height: 330px;
  915. font-size: 16px;
  916. font-weight: 600;
  917. color: #000;
  918. .el-steps {
  919. width: 600px;
  920. transform: translateX(90px);
  921. margin: 0 0 40px 0;
  922. }
  923. .title {
  924. text-align: center;
  925. }
  926. .icons {
  927. display: flex;
  928. justify-content: center;
  929. img {
  930. width: 70px;
  931. margin: 40px 0;
  932. }
  933. .loading {
  934. animation: move 3s linear;
  935. }
  936. @keyframes move {
  937. 0% {
  938. transform: rotate(0);
  939. }
  940. 100% {
  941. transform: rotate(360deg);
  942. }
  943. }
  944. }
  945. .retry {
  946. text-align: center;
  947. span {
  948. color: red;
  949. padding: 0 8px;
  950. cursor: pointer;
  951. }
  952. }
  953. }
  954. }
  955. .pageSize {
  956. display: flex;
  957. align-items: center;
  958. justify-content: space-between;
  959. margin: 0 30px;
  960. span {
  961. color: #000;
  962. }
  963. .el-pagination {
  964. // width: 1600px;
  965. :deep(.el-pagination__total) {
  966. color: #000;
  967. }
  968. :deep(.el-pagination__goto) {
  969. color: #000;
  970. }
  971. :deep(.el-pagination__classifier) {
  972. color: #000;
  973. }
  974. :deep(.el-input__wrapper) {
  975. border: 1px solid rgba(0, 0, 0, 1);
  976. border-radius: 5px;
  977. box-shadow: none;
  978. }
  979. :deep(.el-pager li) {
  980. margin: 0 5px;
  981. border: 1px solid rgba(0, 0, 0, 1);
  982. border-radius: 5px;
  983. background-color: transparent;
  984. }
  985. :deep(.el-pager li.is-active) {
  986. // background-color: rgba(0, 97, 255, 0.8);
  987. border: 1px solid rgba(0, 97, 255, 1);
  988. color: rgba(0, 97, 255, 1);
  989. }
  990. :deep(.btn-prev) {
  991. margin-right: 5px;
  992. border: 1px solid rgba(0, 0, 0, 1);
  993. border-radius: 5px;
  994. background-color: transparent;
  995. }
  996. :deep(.btn-next) {
  997. margin-left: 5px;
  998. border: 1px solid rgba(0, 0, 0, 1);
  999. border-radius: 5px;
  1000. background-color: transparent;
  1001. }
  1002. }
  1003. }
  1004. }
  1005. .el-input {
  1006. width: 192px;
  1007. }
  1008. </style>