Sample_master104.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. <!-- 采样表格
  2. 返回数据示例
  3. {
  4. "id": "24577",
  5. "name": "A相电压",
  6. "offset": 0,
  7. "value": null,
  8. "occur": null,
  9. "iec104": 24577,
  10. "modbus": 40001,
  11. "range": "HOLDING_REGISTER"
  12. },
  13. 无法分页 采样表格无法分页,数据在内存中
  14. 微信聊天记录 边缘代理2开发沟通 - 2023-06-27 采样表格无法分页,数据在内存中
  15. -->
  16. <template>
  17. <div class="table-container" style="padding-top:20px;float: left;width: 100%;">
  18. <!-- 采样模块 -->
  19. <div class="device-values">
  20. <!-- 采样 -->
  21. <div class="title-container">
  22. <div class="title-main">采样值</div>
  23. <div class="title-right">
  24. <div class="check-resaults">
  25. <el-button
  26. icon="el-icon-refresh-left"
  27. class="light-button"
  28. size="mini"
  29. @click="refreshManual(true)"
  30. >刷新</el-button>
  31. </div>
  32. <div class="check-resaults">
  33. <!-- 导入即是上传文件 -->
  34. <el-upload
  35. ref="upload"
  36. :action="importCsvActionStr"
  37. :show-file-list="false"
  38. :auto-upload="false"
  39. accept=".csv"
  40. :on-change="submitUpload"
  41. >
  42. <el-button
  43. class="light-button"
  44. icon="el-icon-upload2"
  45. size="mini"
  46. >导入</el-button>
  47. </el-upload>
  48. </div>
  49. <div class="check-resaults">
  50. <el-button
  51. class="light-button"
  52. icon="el-icon-download"
  53. size="mini"
  54. @click="getPlanExport"
  55. >导出</el-button>
  56. </div>
  57. <div class="check-resaults">
  58. <el-button
  59. icon="el-icon-plus"
  60. type="primary"
  61. size="mini"
  62. :disabled="componentParames.isDisable"
  63. @click="editRow()"
  64. >添加</el-button>
  65. </div>
  66. <div class="check-resaults" style="margin-left: 20px;">
  67. <el-button
  68. icon="el-icon-postcard"
  69. :type="cardModelTag"
  70. size="mini"
  71. @click="swicthCardModel(true)"
  72. >卡片</el-button>
  73. </div>
  74. <div class="check-resaults">
  75. <el-button
  76. icon="el-icon-s-grid"
  77. size="mini"
  78. :type="tableModelTag"
  79. @click="swicthCardModel(false)"
  80. >列表</el-button>
  81. </div>
  82. </div>
  83. </div>
  84. <!-- 查询栏 -->
  85. <div class="table-container" height="auto" style="float: left;width: 100%;margin-bottom: 1rem;">
  86. <span class="title">测点类型:</span>
  87. <el-select v-model="querydata.pointtype" multiple size="mini" clearable placeholder="请选择">
  88. <el-option
  89. v-for="item in pointTypeList"
  90. :key="item.id"
  91. :label="item.name"
  92. :value="item.id"
  93. />
  94. </el-select>
  95. <span class="title" style="margin-left: 2rem;">测点:</span>
  96. <el-input
  97. v-model="querydata.point"
  98. class=""
  99. clearable
  100. placeholder="请输入测点号或名称"
  101. type="text"
  102. style="width:180px;margin-right: 2rem;"
  103. />
  104. <el-button
  105. icon="el-icon-s-grid"
  106. size="mini"
  107. type="primary"
  108. @click="query(false)"
  109. >查询</el-button>
  110. </div>
  111. <!-- 采样卡片 -->
  112. <div v-if="showCard == true" class="table-container" height="auto" style="float: left;width: 100%;">
  113. <div v-for="(item, index) in carddata" :key="index">
  114. <div style="float: left;width: 100%;font-weight: bold;">{{ index }}</div>
  115. <div style="float: left;width: 100%;">
  116. <div v-for="(c, index2) in item" v-show="c.isshow" :key="index2" :class="c.range=='COIL_STATUS' || c.range=='HOLDING_REGISTER' ? 'card card_opt':'card'">
  117. <div class="card-title">{{ c.occur || '-' }}<span v-if="c.range=='COIL_STATUS' || c.range=='HOLDING_REGISTER'" class="card_opt_btn" @click="commandOpt(c)">操作</span></div>
  118. <div style="position: relative;">
  119. <template v-if="c.range=='COIL_STATUS' || c.range=='HOLDING_REGISTER'">
  120. <span class="card-label" style="margin-top: 5%;" :title="`类型:${c.rangeName} 点号:${c.offset}`"><li>{{ c.name }}</li></span>
  121. <div class="card-label-linkline" />
  122. <span v-if="c.relationTag == null" class="card-label" style="margin-top: 20%;color: #999;"><li>未关联点号</li></span>
  123. <span v-else class="card-label" style="margin-top: 20%;" :title="`关联点号:${c.relationTag}`"><li>{{ c.relationTag }}</li></span>
  124. </template>
  125. <template v-else>
  126. <span class="card-label" :title="`类型:${c.rangeName} 点号:${c.offset}`">{{ c.name }}</span>
  127. </template>
  128. <span v-if="c.range=='COIL_STATUS' || c.range=='INPUT_STATUS'" :class="`value_${c.value}`">{{ c.value }}</span>
  129. <span v-else class="value_nubmer">{{ c.value }}</span>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <!-- 采样表格 -->
  136. <div v-if="showCard == false" class="table-container" style="float: left;width: 100%;">
  137. <el-table :key="tableIsUpdate" v-loading="vLoading" :data="tableData.filter((r) => r.isshow)" stripe max-height="300">
  138. <el-table-column prop="iec104" label="104点号" width="100px" />
  139. <el-table-column prop="name" label="测点名称" />
  140. <el-table-column prop="groupingName" label="设备分组" />
  141. <el-table-column prop="rangeName" label="点号类型" width="175px">
  142. <template slot-scope="scope">
  143. <span class="range">{{ scope.row.rangeName }}</span>
  144. </template>
  145. </el-table-column>
  146. <el-table-column prop="offset" label="点号" width="100px" />
  147. <el-table-column prop="value" label="值" width="100px" />
  148. <el-table-column prop="occur" label="时间" width="175px" />
  149. <el-table-column fixed="right" label="操作" width="250px">
  150. <template slot-scope="scope">
  151. <el-button
  152. v-if="scope.row.range=='COIL_STATUS'"
  153. class="table-act"
  154. type="text"
  155. icon="el-icon-setting"
  156. size="small"
  157. @click="commandOpt(scope.row)"
  158. >遥控操作</el-button>
  159. <el-button
  160. v-if="scope.row.range=='HOLDING_REGISTER'"
  161. class="table-act"
  162. type="text"
  163. icon="el-icon-setting"
  164. size="small"
  165. @click="commandOpt(scope.row)"
  166. >遥调操作</el-button>
  167. <el-button
  168. class="table-act"
  169. type="text"
  170. icon="el-icon-edit"
  171. size="small"
  172. @click="editRow(scope.$index)"
  173. >编辑</el-button>
  174. <el-button
  175. class="table-act"
  176. type="text"
  177. icon="el-icon-delete"
  178. size="small"
  179. @click="delRow(scope.$index)"
  180. >删除</el-button>
  181. <el-button
  182. class="table-act"
  183. type="text"
  184. icon="el-icon-data-line"
  185. size="small"
  186. @click="sampleEchart(scope.row)"
  187. >曲线</el-button>
  188. </template>
  189. </el-table-column>
  190. <!-- 隐藏 列 这里不用显示,但是在编辑的时候需要获取此数据 -->
  191. <el-table-column
  192. v-if="false"
  193. prop="deviceCheckId"
  194. label="序号"
  195. />
  196. <!-- 隐藏 列 -->
  197. </el-table>
  198. </div>
  199. <!-- 采样分页
  200. <div class="page-bar">
  201. <pagination
  202. background
  203. layout="pager"
  204. :limit="tablePrames.pageLimit"
  205. :total="tablePrames.paginationTotalElements"
  206. :current-page.sync="tablePrames.paginationNumber"
  207. @pagination="getTableData"
  208. />
  209. </div>
  210. -->
  211. </div>
  212. <!-- 添加/编辑 采样 model -->
  213. <ModelFormSample_master104
  214. v-if="showModelForm"
  215. :model-parames="{
  216. 'curPlanId':componentParames.curPlanId,
  217. 'productId':componentParames.productId,
  218. 'deviceName':componentParames.deviceName,
  219. 'curSuiteId':componentParames.curSuiteId,
  220. 'modelFormData':modelFormData
  221. }"
  222. :sample-data="tableData"
  223. @toggleModel="closeModel"
  224. />
  225. <!-- 遥控遥调操作 model -->
  226. <ModelFormCommandOpt104
  227. v-if="showCommandOpt104ModelForm"
  228. :model-parames="{
  229. 'curPlanId':componentParames.curPlanId,
  230. 'productId':componentParames.productId,
  231. 'deviceName':componentParames.deviceName,
  232. 'curSuiteId':componentParames.curSuiteId,
  233. 'modelFormData':commandOpt104FormData
  234. }"
  235. @toggleModel="closeModel"
  236. />
  237. <!-- #TODO: 以后做成公用 dialog ,不再使用 toggleModel 关闭 dialog -->
  238. <el-dialog
  239. :visible="showEchart"
  240. :before-close="closeSampleEchart"
  241. :title="curPointName"
  242. >
  243. <!-- 采样 曲线 model -->
  244. <ModelSampleEchart
  245. v-if="showEchart"
  246. :model-parames="{
  247. 'curPlanId':componentParames.curPlanId,
  248. 'curPointId':curPointId,
  249. 'curPointName':curPointName
  250. }"
  251. />
  252. </el-dialog>
  253. </div>
  254. </template>
  255. <script>
  256. import {
  257. httpGet,
  258. delRecord,
  259. download
  260. } from '@/api/common-action'
  261. import { dictOptions } from '@/api/dict'
  262. // 显示采样曲线
  263. import ModelSampleEchart from '../components/ModelSampleEchart'
  264. // 添加/编辑 采样
  265. import ModelFormSample_master104 from '../components/ModelFormSample_master104'
  266. import ModelFormCommandOpt104 from '../components/ModelFormCommandOpt104'
  267. // 导入总线
  268. import { EventBus } from '@/main.js'
  269. export default {
  270. name: 'Sample',
  271. components: {
  272. // Pagination,
  273. ModelSampleEchart,
  274. ModelFormSample_master104,
  275. ModelFormCommandOpt104
  276. },
  277. props: {
  278. componentParames: {
  279. type: Object,
  280. default: function() {
  281. return {}
  282. }
  283. }
  284. },
  285. data() {
  286. return {
  287. vLoading: true,
  288. showCard: true, // 卡片显示模式。false时为表格显示模式
  289. cardModelTag: 'primary',
  290. tableModelTag: 'default',
  291. carddata: [],
  292. tableData: [],
  293. pointTypeList: [], // 测点类型列表
  294. querydata: {
  295. pointtype: [],
  296. point: ''
  297. },
  298. commandOpt104FormData: {},
  299. // 采样
  300. tablePrames: {
  301. pageLimit: 5,
  302. paginationNumber: 1,
  303. paginationTotalElements: 1
  304. },
  305. showCommandOpt104ModelForm: false,
  306. // 是否显示 添加/编辑 采样
  307. showModelForm: false,
  308. // 是否显示曲线
  309. showEchart: false,
  310. // 当前采样id
  311. curPointId: '0',
  312. // 当前采样名称
  313. curPointName: '0',
  314. // 导入csv 请求参数
  315. importCsvActionStr: '#',
  316. // 表格是否更新标示,用于解决表格内数据变化了不会刷新的问题
  317. tableIsUpdate: '0'
  318. }
  319. },
  320. // watch: {
  321. // componentParames: {
  322. // handler() {
  323. // // 监听传入的值 是否有变化 ,如有 刷新表格数据
  324. // // console.log('刷新表格数据 componentParames')
  325. // // this.refreshTableData()
  326. // }
  327. // }
  328. // },
  329. created() {
  330. // const envUrl = process.env.VUE_APP_BASE_API
  331. // 网页加载完成后执行
  332. // 接口 导入测点 /test/plan/:plan/points.csv
  333. this.importCsvActionStr = `/test/plan/${this.componentParames.curPlanId}/points.csv`
  334. // console.log('this.importCsvActionStr=', this.importCsvActionStr)
  335. },
  336. mounted() {
  337. EventBus.$off('refreshManualSample')
  338. // 在bus上挂载刷新事件
  339. EventBus.$on('refreshManualSample', this.refreshManual)
  340. this.$nextTick(() => {
  341. // 网页加载完成后执行
  342. this.initFunctions()
  343. })
  344. },
  345. methods: {
  346. swicthCardModel(flag) {
  347. this.showCard = flag
  348. if (flag) {
  349. this.cardModelTag = 'primary'
  350. this.tableModelTag = 'default'
  351. } else {
  352. this.cardModelTag = 'default'
  353. this.tableModelTag = 'primary'
  354. }
  355. },
  356. //
  357. async initFunctions() {
  358. const res = await dictOptions('131')
  359. this.pointTypeList = res
  360. // 所有需要加载时初始化的函数都放这里
  361. // 获取用例列表数据 ,不传分页信息,即采集默认分页获取第一页数据
  362. this.getTableData()
  363. },
  364. // 导出
  365. async getPlanExport() {
  366. // 接口 导出测点 /test/plan/:plan/points.csv
  367. download(`/test/plan/${this.componentParames.curPlanId}/points.csv`).then(res => {
  368. const link = document.createElement('a')
  369. const blob = new Blob([res], {
  370. type: 'application/vnd.ms-excel;charset=utf-8'
  371. })
  372. link.style.display = 'none'
  373. link.href = URL.createObjectURL(blob)
  374. link.setAttribute('download', `导出采样数据-${this.componentParames.curPlanId}.csv`)
  375. document.body.appendChild(link)
  376. link.click()
  377. document.body.removeChild(link)
  378. })
  379. },
  380. query() {
  381. // 采样值查询
  382. console.log(this.querydata)
  383. for (const item in this.carddata) {
  384. this.carddata[item].forEach(element => {
  385. if (this.querydata.point === '' && this.querydata.pointtype.length === 0) {
  386. element.isshow = true
  387. } else {
  388. let isshowflag = false
  389. if (this.querydata.pointtype !== '' && this.querydata.pointtype.indexOf(element.range) > -1) {
  390. isshowflag = true
  391. }
  392. if (this.querydata.point !== '' && (element.name.toLocaleUpperCase().indexOf(this.querydata.point.toLocaleUpperCase()) > -1) || (element.offset + '') === this.querydata.point) {
  393. isshowflag = isshowflag || true
  394. }
  395. element.isshow = isshowflag
  396. }
  397. })
  398. }
  399. this.$forceUpdate()
  400. },
  401. commandOpt(row) {
  402. // 遥控、遥调操作
  403. if (row == null) return
  404. this.commandOpt104FormData = row
  405. this.showCommandOpt104ModelForm = true
  406. },
  407. // 格式化bool值
  408. formatBool(val) {
  409. const rs = val.not.toString()
  410. return rs
  411. },
  412. // 格式化 测试状态
  413. formatState() {
  414. return '未获取'
  415. },
  416. // 获取采样表格数据
  417. getTableData(pageObj) {
  418. this.vLoading = true
  419. pageObj = pageObj || {
  420. page: 0,
  421. limit: this.tablePrames.pageLimit
  422. }
  423. // 获取表格数据-测点列表
  424. // 接口 采样数据查询 /test/execute/:runner/values
  425. // :runner 例:3200000208
  426. httpGet(`/test/execute/${this.componentParames.curPlanId}/values?page=${pageObj.page}&size=${pageObj.limit}`).then((response) => {
  427. this.vLoading = false
  428. delete response.code
  429. this.tableData = response
  430. const groupingNamelist = {}
  431. for (let index = 0; index < response.length; index++) {
  432. const element = response[index]
  433. element['isshow'] = true // 默认为都显示。可通过查询条件更改其值
  434. if (element.groupingName == null || element.groupingName === '') element.groupingName = '未分组'
  435. if (groupingNamelist[element.groupingName]) {
  436. groupingNamelist[element.groupingName].push(element)
  437. } else {
  438. groupingNamelist[element.groupingName] = [element]
  439. }
  440. }
  441. this.carddata = groupingNamelist
  442. this.tablePrames.paginationTotalElements = response.totalElements * 1
  443. // this.requestData.deviceProtocolOptions = response
  444. // 刷新一次状态
  445. this.refreshManual(false)
  446. })
  447. },
  448. // 编辑
  449. editRow(index) {
  450. // console.log('this.tableData[index]=', this.tableData[index].id)
  451. // 如果是添加,则index为空,modelFormData也为空
  452. this.modelFormData = this.tableData[index]
  453. this.showModelForm = true
  454. },
  455. // 删除
  456. delRow(index) {
  457. this.$confirm(
  458. '此操作将永久删除该记录, 是否继续?',
  459. `删除`,
  460. {
  461. confirmButtonText: '确定',
  462. cancelButtonText: '取消',
  463. type: 'warning'
  464. }
  465. )
  466. .then(() => {
  467. // console.log('delRow index=', index)
  468. // 接口 删除测点 /product/model/:product/:tag
  469. // :product 1100000645
  470. // :tag 6386 tag id 为采样列表序号id
  471. const delUrl = `/product/model/${this.componentParames.productId}/${this.tableData[index].id}`
  472. // console.log('delRow delUrl=', delUrl)
  473. delRecord(delUrl).then(() => {
  474. this.$message({
  475. message: '删除成功',
  476. type: 'success',
  477. offset: window.screen.height / 3
  478. })
  479. // 后端成功执行后,前端再删除选中行
  480. this.tableData.splice(index, 1)
  481. })
  482. })
  483. .catch(() => {
  484. this.$message({
  485. type: 'info',
  486. message: '已取消删除',
  487. offset: window.screen.height / 3
  488. })
  489. })
  490. },
  491. // 采样值数据获取
  492. // 手动刷新时,通过models接口获取实时数据信息
  493. // isHand: 是否手动刷新。false表示自动触发 true表示界面刷新按钮操作
  494. refreshManual(isHand) {
  495. // 默认接口 采样数据(高频刷新) /test/execute/:runner/models
  496. var getUrl = `/test/execute/${this.componentParames.curPlanId}/models`
  497. httpGet(getUrl).then(res => {
  498. if (this.tableData.length > 0) {
  499. res.forEach(ritem => {
  500. this.tableData.forEach(item => {
  501. if (item.id === ritem.id) {
  502. item.value = ritem.value
  503. item.occur = ritem.occur
  504. // 解决tableData无法刷新的问题
  505. this.tableIsUpdate = 'sample-' + new Date().getTime()
  506. }
  507. })
  508. for (const item in this.carddata) {
  509. let hasitem = false
  510. for (let i = 0; i < this.carddata[item].length; i++) {
  511. const element = this.carddata[item][i]
  512. if (element.id === ritem.id) {
  513. this.carddata[item][i].value = ritem.value
  514. this.carddata[item][i].occur = ritem.occur
  515. hasitem = true
  516. break
  517. }
  518. }
  519. if (hasitem) {
  520. break
  521. }
  522. }
  523. })
  524. this.$forceUpdate()
  525. }
  526. if (isHand != null && isHand) {
  527. this.$message({
  528. message: '采样值刷新成功',
  529. type: 'success',
  530. duration: 500,
  531. offset: window.screen.height / 3
  532. })
  533. }
  534. // console.log('this.tableData', this.tableData)
  535. })
  536. },
  537. // 导入
  538. submitUpload() {
  539. // 上传文件
  540. this.$refs.upload.submit()
  541. // 上传之后刷新页面查看上传结果
  542. this.getTableData()
  543. },
  544. // 关闭 model
  545. closeModel(modelName, modelShow) {
  546. // console.log('closeModel modelName=', modelName)
  547. // console.log('closeModel modelShow=', modelShow)
  548. switch (modelName) {
  549. // case 'ModelAddStep':
  550. // this.deviceDetail.showModelAddStep = modelShow
  551. // break
  552. case 'ModelFormSample':
  553. this.showModelForm = modelShow
  554. // 操作过用例模态框 刷新一次表格数据
  555. this.getTableData()
  556. break
  557. case 'ModelSampleEchart':
  558. this.showEchart = modelShow
  559. break
  560. case 'ModelFormCommandOpt104':
  561. this.showCommandOpt104ModelForm = false
  562. break
  563. default:
  564. console.log('未获取到 modelName')
  565. break
  566. }
  567. },
  568. // 曲线
  569. sampleEchart(row) {
  570. // 接口 /test/execute/:runner/point/:point/chart?period=pt4h
  571. // :runner 示例 3200000235
  572. // :point 示例 24755
  573. // const getUrl = `/test/execute/${this.componentParames.curPlanId}/point/0/chart?period=pt4h`
  574. // httpGet(getUrl).then(res => {
  575. // // const sampleEchartData = {
  576. // // xAxis: res.xAxis[0],
  577. // // yAxis: res.yAxis[0],
  578. // // series: res.series[0]
  579. // // }
  580. // // const sampleEchartData = {
  581. // // xAxis: { type: 'category', min: '2023-06-14 06:52:46', max: '2023-06-14 10:52:46' },
  582. // // yAxis: res.yAxis[0],
  583. // // series: { data: [820, 932, 901, 934, 1290, 1330, 1320], type: 'line' }
  584. // // }
  585. // const sampleEchartData = res
  586. // const chart = this.$refs.chart
  587. // const myChart = echarts.init(chart)
  588. // myChart.setOption(sampleEchartData)
  589. // // window.addEventListener('resize', function() {
  590. // // myChart.resize()
  591. // // })
  592. // // this.$on('hook:destroyed', () => {
  593. // // window.removeEventListener('resize', function() {
  594. // // myChart.resize()
  595. // // })
  596. // // })
  597. // console.log('sampleEchart 数据获取成功 res=', res)
  598. // console.log('sampleEchart 数据获取成功 sampleEchartData=', sampleEchartData)
  599. // })
  600. // console.log('sampleEchart started 展示方式待定', row.id)
  601. this.curPointId = row.id
  602. this.curPointName = row.name
  603. this.showEchart = true
  604. },
  605. // 关闭Echart弹窗
  606. closeSampleEchart() {
  607. this.showEchart = false
  608. }
  609. }
  610. }
  611. </script>
  612. <style lang="scss" scoped>
  613. .card{
  614. float: left;
  615. width: 13rem;
  616. height: 7rem;
  617. border-radius: 5px;
  618. border: 1px solid #ccc;
  619. margin: 1rem;
  620. font-size: 0.8rem;
  621. }
  622. .card_opt{
  623. background-color: #ededed;
  624. }
  625. .card_opt_btn{
  626. float: right;
  627. cursor: pointer;
  628. }
  629. .card-title{
  630. border-bottom: 1px dotted #ccc;
  631. padding: 0.8rem 0.5rem;
  632. }
  633. .card-label{
  634. margin-top: 11.5%;
  635. top: 0;
  636. left: 0;
  637. width: 65%;
  638. font-size: 0.8rem;
  639. padding-left: 10.5%;
  640. position: absolute;
  641. }
  642. .card-label>li{
  643. white-space: nowrap;
  644. list-style-position:inside;
  645. // text-overflow: ellipsis;
  646. // overflow: hidden;
  647. }
  648. .card-label-linkline{
  649. margin-left: 1.45rem;
  650. height: 31px;
  651. width: 1px;
  652. left: 0;
  653. margin-top: 20px;
  654. top: 0;
  655. position: absolute;
  656. background: #a97272;
  657. z-index: 1;
  658. }
  659. .value_0{
  660. right:0;
  661. top: 0;
  662. width: 20%;
  663. margin: 10px;
  664. text-align: center;
  665. border-radius: 2rem;
  666. border: 1px solid #fff;
  667. padding: 6px 0;
  668. background: rgb(224, 156, 156);
  669. color: #fff;
  670. font-size: 1.5rem;
  671. position: absolute;
  672. }
  673. .value_1{
  674. right:0;
  675. top: 0;
  676. width: 20%;
  677. margin: 10px;
  678. text-align: center;
  679. border-radius: 2rem;
  680. border: 1px solid #fff;
  681. padding: 6px 0;
  682. background: red;
  683. color: #fff;
  684. font-size: 1.5rem;
  685. position: absolute;
  686. }
  687. .value_nubmer{
  688. right:0;
  689. top: 0;
  690. width: 35%;
  691. margin: 10px;
  692. text-align: right;
  693. padding: 13px 0;
  694. font-size: 1.2rem;
  695. position: absolute;
  696. }
  697. .title-container {
  698. display: flex;
  699. justify-content: space-between;
  700. padding: 20px 0;
  701. .title-right {
  702. display: flex;
  703. align-items: center;
  704. .check-resaults {
  705. padding-right: 16px;
  706. .success {
  707. color: #00706b;
  708. }
  709. .faild {
  710. color: #f00;
  711. padding-right: 6px;
  712. }
  713. span {
  714. font-weight: bold;
  715. }
  716. }
  717. }
  718. }
  719. .title-main {
  720. color: #111;
  721. font-weight: bold;
  722. }
  723. // 用例表格样式
  724. .table-container {
  725. // padding: 20px 0;
  726. .el-table {
  727. font-size: 12px;
  728. }
  729. .range {
  730. white-space: nowrap;
  731. }
  732. }
  733. // 底部按钮
  734. .bottom-button {
  735. display: flex;
  736. justify-content: center;
  737. padding-bottom: 20px;
  738. .cancel-plan {
  739. padding-right: 20px;
  740. }
  741. }
  742. // 按钮公用样式
  743. .dark-button {
  744. background-color: #00706B;
  745. border: 1px #00706B solid;
  746. color: #fff;
  747. }
  748. .light-button {
  749. color: #00706B;
  750. border: 1px #00706B solid;
  751. }
  752. </style>