run-test.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953
  1. <script setup lang="ts">
  2. import { ref } from "vue";
  3. import titHeader from "./components/tit-header.vue";
  4. import ConfigDataAndDevice from "./components/configDataAndDevice.vue";
  5. import { useWebSocket } from "@vueuse/core";
  6. import { useCommonStoreHook } from "@/store";
  7. import { getTestProjectList } from "@/api/project";
  8. import { CheckboxValueType } from "element-plus";
  9. import {
  10. searchExcutingGlobalData,
  11. searchExcutingInstrumentConfig,
  12. searchExecuteStatistics,
  13. searchInstrumentStatus,
  14. searchTestMachineConfig,
  15. searhTestType,
  16. startExecuteProjects,
  17. stopExecuteProjects,
  18. } from "@/api/project/excute";
  19. const route = useRoute();
  20. interface VersionItem {
  21. testLocation: string;
  22. productCode: string;
  23. testType: string;
  24. }
  25. const formLabelAlign = ref<VersionItem>({
  26. testLocation: "",
  27. productCode: "",
  28. testType: "",
  29. });
  30. // 选择的执行终端
  31. const selectedExcutingMachine = ref<any>();
  32. const drawer = ref(false);
  33. onMounted(async () => {
  34. getAllTestTypes();
  35. getExcutingMachines();
  36. getTestProjectTopList();
  37. getSattisticData();
  38. });
  39. const topProAllList = ref<any[]>([]);
  40. const topProSelectedList = ref<any[]>([]);
  41. const checkAll = ref(false);
  42. const isIndeterminate = ref(true);
  43. // 根据状态改变已经选择的项目的上方的名字
  44. const getSelectedStatusValue = (status: number) => {
  45. // 1:未测试 2:正在测试 3:测试合格 4:测试不合格
  46. let value = ["", "", ""]; //上方名字 中间icon class
  47. switch (status) {
  48. case 1:
  49. value = ["未开始", "", "bg-normal"];
  50. break;
  51. case 2:
  52. value = ["测试中", "Frame", "bg-progress"];
  53. break;
  54. case 3:
  55. value = ["合格", "gougou", "bg-success"];
  56. break;
  57. case 4:
  58. value = ["失败", "chacha", "bg-error"];
  59. break;
  60. default:
  61. value = ["未开始", "", "bg-normal"];
  62. }
  63. return value;
  64. };
  65. const handleCheckAllChange = (val: CheckboxValueType) => {
  66. topProSelectedList.value = val
  67. ? topProAllList.value.map((item) => item.id)
  68. : [];
  69. isIndeterminate.value = false;
  70. };
  71. const handletopProSelectedListChange = (value: CheckboxValueType[]) => {
  72. const checkedCount = value.length;
  73. checkAll.value = checkedCount === topProAllList.value.length;
  74. isIndeterminate.value =
  75. checkedCount > 0 && checkedCount < topProAllList.value.length;
  76. };
  77. // 获取顶部测试项目
  78. const getTestProjectTopList = () => {
  79. getTestProjectList({ engineeringId: route?.params?.engineerId })
  80. .then((result) => {
  81. topProAllList.value = result.data;
  82. topProAllList.value[0].status = 1;
  83. topProAllList.value[1].status = 2;
  84. topProAllList.value[2].status = 3;
  85. topProAllList.value[3].status = 4;
  86. topProSelectedList.value = result.data.map((item) => item.id); // 默认选中全部
  87. })
  88. .finally(() => {
  89. getExcutingGlobalMachines();
  90. getExcutingGlobalData();
  91. });
  92. };
  93. // 顶部展示的项目 是弹窗选中的项目
  94. const topOnShowProList = computed(() => {
  95. return topProAllList.value.filter((item) =>
  96. topProSelectedList.value.includes(item.id)
  97. );
  98. });
  99. // 下面左边第一列
  100. const allTestTypes = ref<any[]>([]);
  101. const getAllTestTypes = () => {
  102. searhTestType().then((result) => {
  103. allTestTypes.value = result.data;
  104. });
  105. };
  106. // 下边第二列
  107. const excutingMachinesList = ref<any[]>([]); // 所有执行终端
  108. const getExcutingMachines = () => {
  109. searchTestMachineConfig(route?.params?.engineerId as string).then(
  110. (result) => {
  111. excutingMachinesList.value = result.data;
  112. }
  113. );
  114. };
  115. const testingMachines = ref<any[]>([]); // 所有routeData里面的测试仪器
  116. const getExcutingGlobalMachines = async () => {
  117. let res = await searchExcutingInstrumentConfig(
  118. route?.params?.engineerId as string,
  119. topProAllList.value.map((item) => item.id)
  120. );
  121. testingMachines.value = res.data;
  122. // 拿到仪器数据之后 调用接口查看仪器是否在线
  123. // let status = await searchInstrumentStatus(testingMachines.value);
  124. };
  125. // 最下方全局数据
  126. const excutingGlobalData = ref<any[]>([]);
  127. const getExcutingGlobalData = async () => {
  128. let res = await searchExcutingGlobalData(
  129. route?.params?.engineerId as string,
  130. topProAllList.value.map((item) => item.id)
  131. );
  132. excutingGlobalData.value = res.data;
  133. };
  134. // 配置这次执行的工程相关的数据和仪器
  135. const configDrawerVisible = ref(false);
  136. // 开始测试相关
  137. const isTesting = ref(false);
  138. const currentTestingProject = ref<any>();
  139. const startToRunTest = async () => {
  140. if (!checkStartEnable()) return;
  141. let params = {
  142. configList: testingMachines.value,
  143. engineeringId: route.params.engineerId,
  144. globalDataList: excutingGlobalData.value,
  145. projectList: topProSelectedList.value,
  146. ...formLabelAlign.value,
  147. executeTerminal: selectedExcutingMachine.value.id,
  148. };
  149. let res = await startExecuteProjects(params);
  150. currentTestingProject.value = res.data;
  151. isTesting.value = true;
  152. };
  153. const stopTesting = async () => {
  154. let res = await stopExecuteProjects(currentTestingProject.value?.id);
  155. isTesting.value = false;
  156. currentTestingProject.value = {};
  157. getSattisticData();
  158. };
  159. // 查询下边统计数据
  160. const statisticsData = ref<object>();
  161. const getSattisticData = () => {
  162. searchExecuteStatistics(route?.params?.engineerId as string).then(
  163. (result) => {
  164. statisticsData.value = result.data;
  165. }
  166. );
  167. };
  168. // ===== websocket ====
  169. const logList = ref<any[]>([]); //日志数据
  170. const testingWSData = computed(() => {
  171. // 根据选择的测试项目的名字作为key,值是空数组用来存放 日志数据
  172. console.log("aa", topProSelectedList);
  173. let data = {};
  174. topProSelectedList.value.forEach((id) => {
  175. // 根据id去所有的数据中找对应的项目
  176. let project = topProAllList.value.find((item) => item.id == id);
  177. data[project.projectName] = [];
  178. });
  179. return data;
  180. });
  181. const wsClient = useWebSocket(import.meta.env.VITE_WEBSOCKET_URL as string, {
  182. autoReconnect: {
  183. retries: 300,
  184. delay: 3000,
  185. onFailed() {
  186. console.log("长链接失败");
  187. },
  188. },
  189. // heartbeat: {
  190. // message: "ping",
  191. // interval: 1000,
  192. // pongTimeout: 1000,
  193. // },
  194. heartbeat: false,
  195. onConnected: () => {
  196. console.log("长链接成功");
  197. },
  198. onDisconnected: () => {
  199. console.log("长链接断开");
  200. },
  201. onMessage: (msg) => {
  202. if (wsClient.data.value) {
  203. let msgType = wsClient.data.value?.msgtype ?? "";
  204. // 执行过程日志
  205. if (msgType == 1) {
  206. // let l = { data: { log: "label: 直流电源" }, msgtype: 1 };
  207. let logData = wsClient.data.value?.data?.log;
  208. if (logData) {
  209. logList.value.push(logData);
  210. }
  211. }
  212. // 测试数据
  213. else if (msgType === 2) {
  214. // {
  215. // "msgtype": 2,
  216. // "data": {
  217. // "status": 1, // 1:未测试 2:正在测试 3:测试合格 4:测试不合格
  218. // "dataContent": "",
  219. // "dataItem": "",
  220. // "EngineeringId": "",
  221. // "projectId": "",
  222. // }
  223. // }
  224. let logData = wsClient.data.value?.data;
  225. if (logData) {
  226. // 根据 projectId 去已经选择的项目中找到名字
  227. let project = topProSelectedList.value.find(
  228. (item) => item.id == logData.projectId
  229. );
  230. project.status = logData.status;
  231. let proName = project?.projectName;
  232. testingWSData.value[proName].push(logData);
  233. }
  234. }
  235. // 测试仪器列表状态
  236. else if (msgType === 3) {
  237. // {
  238. // "msgtype": 3,
  239. // "data": [{
  240. // "deviceNo":"", /* 设备编号 */
  241. // "devcieState":"" /* 0不在线,1在线 */
  242. // }
  243. // ]
  244. // }
  245. let devData = wsClient.data.value?.data ?? [];
  246. devData.forEach((item) => {
  247. // 根据 instrumentId 去已经选择的仪器中找到名字
  248. let machine = testingMachines.value.find(
  249. (machine) => machine.instrumentId == item.instrumentId
  250. );
  251. if (machine) {
  252. machine.deviceState = item.deviceState; // 更新仪器状态
  253. }
  254. });
  255. }
  256. }
  257. console.log("长链接的消息", data.value);
  258. },
  259. });
  260. onMounted(() => {
  261. wsClient.open();
  262. });
  263. onBeforeUnmount(() => {
  264. wsClient.close();
  265. });
  266. const checkStartEnable = (): boolean => {
  267. let enable = true;
  268. if (!selectedExcutingMachine.value) {
  269. ElMessage.warning("请选择执行终端");
  270. enable = false;
  271. }
  272. if (!formLabelAlign.value.productCode) {
  273. ElMessage.warning("请输入产品编号");
  274. enable = false;
  275. }
  276. if (!formLabelAlign.value.testType) {
  277. ElMessage.warning("请选择测试类型");
  278. enable = false;
  279. }
  280. if (!formLabelAlign.value.testLocation) {
  281. ElMessage.warning("请输入测试地点");
  282. enable = false;
  283. }
  284. if (topProSelectedList.value.length < 1) {
  285. ElMessage.warning("请选择测试项目");
  286. enable = false;
  287. }
  288. return enable;
  289. };
  290. </script>
  291. <template>
  292. <div class="runtest">
  293. <div class="content-A">
  294. <div class="drawerbtn" @click="drawer = true">
  295. <svg-icon icon-class="project-config" />
  296. </div>
  297. <el-scrollbar height="100%">
  298. <div class="test-list">
  299. <!-- // 1:未测试 2:正在测试 3:测试合格 4:测试不合格-->
  300. <div
  301. v-for="item in topOnShowProList"
  302. :key="item.id"
  303. class="test-list-item"
  304. :class="item.status == '2' ? 'active' : ''"
  305. >
  306. <div class="body" :class="['success']">
  307. <div
  308. class="line"
  309. :class="getSelectedStatusValue(item.status)[2]"
  310. ></div>
  311. <div class="head">
  312. {{ getSelectedStatusValue(item.status)[0] }}
  313. </div>
  314. <div class="icon">
  315. <svg-icon
  316. v-if="item.status == '3'"
  317. icon-class="gougou"
  318. class="svg svg-success"
  319. />
  320. <svg-icon
  321. v-else-if="item.status == '4'"
  322. icon-class="chacha"
  323. class="svg svg-error"
  324. />
  325. <svg-icon
  326. v-else-if="item.status == '2'"
  327. icon-class="Frame"
  328. class="svg svg-progress"
  329. />
  330. </div>
  331. <div class="name">{{ item.projectName }}</div>
  332. </div>
  333. </div>
  334. </div>
  335. </el-scrollbar>
  336. </div>
  337. <div class="content-B">
  338. <div class="content-B-1">
  339. <titHeader icon-class="csgcxx" tit="测试工程信息" />
  340. <el-form
  341. label-position="top"
  342. label-width="auto"
  343. :model="formLabelAlign"
  344. ref="ruleFormRef"
  345. >
  346. <el-form-item label="产品编号" prop="productCode">
  347. <el-input v-model="formLabelAlign.productCode" />
  348. </el-form-item>
  349. <el-form-item label="测试类型" prop="testType">
  350. <el-select
  351. v-model="formLabelAlign.testType"
  352. placeholder="选择测试类型"
  353. >
  354. <el-option
  355. v-for="item in allTestTypes"
  356. :key="item.dictValue"
  357. :label="item.dictLabel"
  358. :value="item.dictValue"
  359. />
  360. </el-select>
  361. </el-form-item>
  362. <el-form-item label="测试地点" prop="testLocation">
  363. <el-input v-model="formLabelAlign.testLocation" />
  364. </el-form-item>
  365. </el-form>
  366. </div>
  367. <div class="content-B-2">
  368. <titHeader icon-class="zxzd-yq" tit="执行终端/仪器" />
  369. <el-form
  370. label-position="top"
  371. label-width="auto"
  372. :model="formLabelAlign"
  373. style="max-width: 600px"
  374. ref="ruleFormRef"
  375. >
  376. <el-form-item label="执行终端">
  377. <div class="select-div">
  378. <el-select
  379. class="select-item"
  380. v-model="selectedExcutingMachine"
  381. placeholder="选择执行终端"
  382. >
  383. <el-option
  384. v-for="item in excutingMachinesList"
  385. :key="item.id"
  386. :label="item.instrumentName"
  387. :value="item"
  388. />
  389. </el-select>
  390. <!-- <el-button class="test-min-btn" type="primary">-->
  391. <!-- <svg-icon icon-class="refresh1" size="18" />-->
  392. <!-- </el-button>-->
  393. </div>
  394. </el-form-item>
  395. </el-form>
  396. <div>
  397. <!-- <svg-icon icon-class="gougou" class="svg-success" />-->
  398. <span>{{ selectedExcutingMachine?.ip }}</span>
  399. </div>
  400. <div class="csyq-tit">
  401. <span>测试仪器</span>
  402. <!-- <el-button class="test-min-btn" type="primary">-->
  403. <!-- <svg-icon icon-class="project-config" size="18" />-->
  404. <!-- </el-button>-->
  405. </div>
  406. <el-scrollbar class="content-B-height-2">
  407. <div class="csyq-list">
  408. <div
  409. v-for="(item, index) in testingMachines"
  410. :key="index"
  411. class="csyq-item"
  412. >
  413. <div>
  414. <span class="item-icon">
  415. <svg-icon
  416. v-if="item.deviceState == '1'"
  417. icon-class="gougou"
  418. class="svg-success"
  419. />
  420. <svg-icon v-else icon-class="chacha" class="svg-error" />
  421. </span>
  422. <span>{{ item.configName }}</span>
  423. </div>
  424. <div>{{ item.configIp }}</div>
  425. </div>
  426. </div>
  427. </el-scrollbar>
  428. </div>
  429. <div class="content-B-3">
  430. <titHeader icon-class="zxgcrz" tit="执行过程日志" />
  431. <el-scrollbar class="content-B-height-3">
  432. <div class="content-log">
  433. <span v-for="(item, index) in logList" :key="index">{{
  434. item?.label
  435. }}</span>
  436. </div>
  437. </el-scrollbar>
  438. </div>
  439. <div class="content-B-4">
  440. <!-- <el-button class="test-min-btn" type="primary">-->
  441. <!-- <svg-icon icon-class="refresh1" />-->
  442. <!-- </el-button>-->
  443. <titHeader icon-class="cssj" tit="测试数据" />
  444. <div class="cssj-row-flex">
  445. <span>序号</span>
  446. <span>数据项</span>
  447. <span>数据内容</span>
  448. </div>
  449. <el-scrollbar class="content-B-height-4">
  450. <div v-for="(proName, index) in Object.keys(testingWSData)">
  451. <div class="cssj-tit">项目名称: {{ proName }}</div>
  452. <div
  453. v-for="(data, index) in testingWSData[proName]"
  454. :key="index"
  455. class="cssj-row-flex"
  456. >
  457. <span>{{ index }}</span>
  458. <span>{{ data?.dataItem }}</span>
  459. <span>{{ data?.dataContent }}</span>
  460. </div>
  461. </div>
  462. </el-scrollbar>
  463. </div>
  464. </div>
  465. <div class="content-C">
  466. <div class="left">
  467. <div class="test-btn progress" @click="configDrawerVisible = true">
  468. <svg-icon icon-class="project-config" />
  469. 全局配置
  470. </div>
  471. <div>
  472. <p><span>产品:</span><span>变频模块</span></p>
  473. <p><span>工程类型:</span><span>变频模块</span></p>
  474. </div>
  475. </div>
  476. <div class="center">
  477. <div class="center-item">
  478. <div class="center-num">10</div>
  479. <div class="center-tit">今日检测产品数量</div>
  480. </div>
  481. <div class="center-item">
  482. <div class="center-num">10</div>
  483. <div class="center-tit">历史检测产品数量</div>
  484. </div>
  485. </div>
  486. <div class="right">
  487. <div>已用时:300s</div>
  488. <!-- <div class="test-btn progress" @click="startToRunTest">-->
  489. <!-- <svg-icon icon-class="start-test" />-->
  490. <!-- 开始测试-->
  491. <!-- </div>-->
  492. <el-button
  493. type="primary"
  494. class="test-btn progress"
  495. @click="startToRunTest"
  496. :loading="isTesting"
  497. >
  498. <template #icon>
  499. <svg-icon icon-class="start-test" />
  500. </template>
  501. 开始测试
  502. </el-button>
  503. <div class="test-btn error" @click="stopTesting">
  504. <svg-icon icon-class="stop-test" />
  505. 停止测试
  506. </div>
  507. </div>
  508. </div>
  509. <el-drawer v-model="drawer" direction="rtl" class="test-drawer">
  510. <template #header>
  511. <div class="test-drawer-header">选择测试项</div>
  512. </template>
  513. <template #default>
  514. <el-checkbox
  515. v-model="checkAll"
  516. :indeterminate="isIndeterminate"
  517. @change="handleCheckAllChange"
  518. >
  519. 全选
  520. </el-checkbox>
  521. <el-scrollbar>
  522. <el-checkbox-group
  523. v-model="topProSelectedList"
  524. @change="handletopProSelectedListChange"
  525. class="drawer-list"
  526. >
  527. <div
  528. v-for="item in topProAllList"
  529. :key="item.id"
  530. class="drawer-list-item"
  531. >
  532. <el-checkbox label="" :value="item.id" />
  533. <span>{{ item.projectName }}</span>
  534. </div>
  535. </el-checkbox-group>
  536. </el-scrollbar>
  537. </template>
  538. <template #footer>
  539. <div style="flex: auto">
  540. <el-button>取消</el-button>
  541. <el-button type="primary">保存</el-button>
  542. </div>
  543. </template>
  544. </el-drawer>
  545. <el-drawer
  546. v-model="configDrawerVisible"
  547. :with-header="false"
  548. :append-to-body="true"
  549. :destroy-on-close="true"
  550. size="800"
  551. direction="ltr"
  552. >
  553. <ConfigDataAndDevice
  554. v-model:devices-data="testingMachines"
  555. v-model:data-list="excutingGlobalData"
  556. @close="configDrawerVisible = false"
  557. />
  558. </el-drawer>
  559. </div>
  560. </template>
  561. <style scoped lang="scss">
  562. $color-success: #8fe200;
  563. $color-error: #f83c64;
  564. $color-progress: #3cbaff;
  565. .test-btn {
  566. width: 130px;
  567. height: 36px;
  568. line-height: 36px;
  569. margin: 0 auto;
  570. color: var(--hj-white-1);
  571. text-align: center;
  572. border-radius: 4px 4px 4px 4px;
  573. cursor: pointer;
  574. }
  575. .progress {
  576. background: var(--hj-bg1);
  577. }
  578. .error {
  579. background: var(--hj-bg2);
  580. }
  581. .test-min-btn {
  582. margin-left: 4px;
  583. flex: 0 0 36px;
  584. width: 25px;
  585. height: 30px;
  586. text-align: center;
  587. line-height: 36px;
  588. background: #e6f1fc;
  589. border-radius: 4px 4px 4px 4px;
  590. border: 1px solid #a3d0fd;
  591. font-size: var(--hj-fs-22);
  592. color: var(--fc-color-7);
  593. }
  594. .svg-normal {
  595. background-color: $hj-white-1;
  596. }
  597. .svg-success {
  598. color: $color-success;
  599. }
  600. .svg-error {
  601. color: $color-error;
  602. }
  603. .svg-progress {
  604. color: $color-progress;
  605. }
  606. .bg-normal {
  607. background-color: $hj-white-1;
  608. }
  609. .bg-error {
  610. background-color: $color-error;
  611. }
  612. .bg-success {
  613. background-color: $color-success;
  614. }
  615. .bg-progress {
  616. background-color: $color-progress;
  617. }
  618. .runtest {
  619. position: absolute;
  620. top: 0;
  621. left: 0;
  622. right: 0;
  623. bottom: 0;
  624. width: 100%;
  625. height: 100%;
  626. overflow: hidden;
  627. font-size: var(--hj-fs-12);
  628. .content-A {
  629. position: relative;
  630. width: 100%;
  631. height: 300px;
  632. background: linear-gradient(180deg, #404040 0%, #505050 100%);
  633. border-radius: 0px 0px 0px 0px;
  634. :deep(.el-scrollbar__view) {
  635. height: 100%;
  636. }
  637. .drawerbtn {
  638. position: absolute;
  639. z-index: 10;
  640. right: 10px;
  641. top: 10px;
  642. width: 36px;
  643. height: 36px;
  644. font-size: var(--hj-fs-22);
  645. color: var(--hj-white-1);
  646. cursor: pointer;
  647. }
  648. .test-list {
  649. display: flex;
  650. justify-content: center;
  651. height: 100%;
  652. }
  653. .test-list-item {
  654. flex-shrink: 0;
  655. display: flex;
  656. align-items: center;
  657. justify-content: center;
  658. width: 142px;
  659. height: 100%;
  660. text-align: center;
  661. &.active {
  662. background: linear-gradient(
  663. 180deg,
  664. rgba(255, 255, 255, 0) 0%,
  665. #ffffff 100%
  666. );
  667. }
  668. .body {
  669. background: linear-gradient(180deg, #707070 0%, #515151 100%);
  670. box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
  671. border: 1px solid #7e7e7e;
  672. border-radius: 5px;
  673. margin: auto;
  674. width: 108px;
  675. height: 240px;
  676. color: var(--hj-white-1);
  677. cursor: pointer;
  678. .line {
  679. width: 100%;
  680. height: 6px;
  681. border-radius: 5px 5px 0px 0px;
  682. }
  683. .head {
  684. margin: 0 14px;
  685. color: var(--fc-color-8);
  686. padding: 7px 0;
  687. border-bottom: 1px solid #a8a8a8;
  688. }
  689. .icon {
  690. margin: 0 auto;
  691. width: 36px;
  692. height: 36px;
  693. margin-top: 50px;
  694. margin-bottom: 50px;
  695. font-size: var(--hj-fs-32);
  696. }
  697. .name {
  698. font-weight: bold;
  699. font-size: var(--hj-fs-14);
  700. }
  701. }
  702. }
  703. }
  704. .content-B {
  705. width: 100%;
  706. //min-height: 300px;
  707. height: calc(100vh - $main-header-height - 300px - 64px);
  708. background-color: $hj-white-1;
  709. //margin-bottom: 70px;
  710. display: flex;
  711. .content-B {
  712. &-1,
  713. &-2,
  714. &-3,
  715. &-4 {
  716. margin-top: 30px;
  717. padding: 0 18px;
  718. border-left: 1px solid #afb9d0;
  719. }
  720. &-1 {
  721. border-left: none;
  722. }
  723. }
  724. .content-B-1 {
  725. flex: 0 0 19%;
  726. }
  727. .content-B-2 {
  728. flex: 0 0 22%;
  729. .select-div {
  730. display: flex;
  731. width: 100%;
  732. .select-item {
  733. flex: 1;
  734. }
  735. }
  736. .csyq-tit {
  737. display: flex;
  738. justify-content: space-between;
  739. height: 36px;
  740. line-height: 36px;
  741. font-size: var(--hj-fs-14);
  742. font-weight: bold;
  743. color: var(--fc-color-5);
  744. }
  745. .csyq-list {
  746. .csyq-item {
  747. font-size: var(--hj-fs-12);
  748. display: flex;
  749. justify-content: space-between;
  750. height: 30px;
  751. line-height: 30px;
  752. border-bottom: 1px solid var(--fc-color-5);
  753. .item-icon {
  754. font-size: var(--hj-fs-22);
  755. margin-right: 8px;
  756. }
  757. }
  758. }
  759. }
  760. .content-B-3 {
  761. flex: 0 0 19%;
  762. .content-log {
  763. font-weight: 400;
  764. font-size: var(--hj-fs-12);
  765. color: var(--fc-color-5);
  766. line-height: 18px;
  767. }
  768. }
  769. .content-B-4 {
  770. flex: 0 0 40%;
  771. position: relative;
  772. .test-min-btn {
  773. position: absolute;
  774. right: 20px;
  775. }
  776. .cssj-tit {
  777. height: 26px;
  778. line-height: 26px;
  779. text-align: center;
  780. font-weight: bolder;
  781. font-size: var(--hj-fs-12);
  782. color: var(--fc-color-5);
  783. }
  784. .cssj-row-flex {
  785. display: flex;
  786. height: 31px;
  787. line-height: 31px;
  788. border-bottom: 1px solid var(--fc-color-5);
  789. font-size: var(--hj-fs-14);
  790. > span:nth-of-type(1) {
  791. flex: 0 0 13%;
  792. text-align: center;
  793. }
  794. > span:nth-of-type(2) {
  795. flex: 0 0 45%;
  796. }
  797. > span:nth-of-type(3) {
  798. flex: 0 0 42%;
  799. text-align: center;
  800. }
  801. }
  802. }
  803. }
  804. .content-C {
  805. position: absolute;
  806. bottom: 0;
  807. left: 0;
  808. width: 100%;
  809. height: 64px;
  810. background: linear-gradient(180deg, #434343 0%, #4f4f4f 100%);
  811. display: flex;
  812. justify-content: space-between;
  813. .left {
  814. padding: 0 12px;
  815. display: flex;
  816. justify-content: space-between;
  817. align-items: center;
  818. p {
  819. display: block;
  820. line-height: 10px;
  821. color: var(--hj-white-1);
  822. margin-left: 15px;
  823. span {
  824. font-size: var(--hj-fs-14);
  825. &:nth-of-type(1) {
  826. font-weight: 400;
  827. }
  828. &:nth-of-type(2) {
  829. font-weight: bold;
  830. }
  831. }
  832. }
  833. }
  834. .center {
  835. display: flex;
  836. text-align: right;
  837. align-items: center;
  838. .center-item {
  839. min-width: 140px;
  840. .center-tit {
  841. font-size: var(--hj-fs-12);
  842. color: var(--hj-white-1);
  843. line-height: 16px;
  844. }
  845. .center-num {
  846. font-weight: bold;
  847. font-size: var(--hj-fs-18);
  848. color: var(--hj-white-1);
  849. line-height: 21px;
  850. border-bottom: 1px solid var(--hj-white-1);
  851. }
  852. }
  853. }
  854. .right {
  855. display: flex;
  856. align-self: center;
  857. align-content: center;
  858. align-items: center;
  859. font-size: var(--hj-fs-12);
  860. color: var(--hj-white-1);
  861. > div {
  862. margin-left: 12px;
  863. }
  864. }
  865. }
  866. :deep(.test-drawer) {
  867. background: linear-gradient(180deg, #434343 0%, #4f4f4f 100%);
  868. box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
  869. }
  870. .test-drawer-header {
  871. font-weight: 400;
  872. font-size: var(--hj-fs-14);
  873. color: var(--hj-white-1);
  874. line-height: 19px;
  875. text-align: left;
  876. font-style: normal;
  877. text-transform: none;
  878. }
  879. .drawer-list {
  880. font-size: var(--hj-fs-12);
  881. .drawer-list-item {
  882. height: 36px;
  883. line-height: 36px;
  884. margin-bottom: 12px;
  885. padding: 0 12px;
  886. background: linear-gradient(180deg, #656565 0%, #555555 100%);
  887. box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.25);
  888. border-radius: 4px 4px 4px 4px;
  889. color: var(--hj-white-1);
  890. }
  891. }
  892. }
  893. .content-B-height-2 {
  894. height: calc(100vh - $main-header-height - 300px - 64px - 228px);
  895. }
  896. .content-B-height-3 {
  897. height: calc(100vh - $main-header-height - 300px - 64px - 90px);
  898. }
  899. .content-B-height-4 {
  900. height: calc(100vh - $main-header-height - 300px - 64px - 120px);
  901. }
  902. </style>