index.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571
  1. <template>
  2. <div class="data-table" :style="{ marginTop: marginTop }">
  3. <div
  4. :style="dataTableContentStyle"
  5. v-loading="loading"
  6. element-loading-text="拼命加载中"
  7. element-loading-spinner="el-icon-loading"
  8. element-loading-background="rgba(0, 0, 0, 0.8)"
  9. class="data-table-content"
  10. >
  11. <div
  12. :class="isStatus || isStatuser ? 'flex' : 'flex-end'"
  13. class="data-table-btn"
  14. >
  15. <div v-if="isStatus || isStatuser" class="vStatus">
  16. <slot name="header" />
  17. </div>
  18. <template v-if="isBtn">
  19. <template v-if="isAuth">
  20. <el-button
  21. v-if="btnAuthAdd"
  22. size="small"
  23. @click="handleAdd"
  24. plain
  25. type="primary"
  26. >新增</el-button
  27. >
  28. </template>
  29. <template v-else>
  30. <el-button size="small" @click="handleAdd" plain type="primary"
  31. >新增</el-button
  32. >
  33. </template>
  34. </template>
  35. </div>
  36. <template v-if="tableData.length">
  37. <div>
  38. <el-table
  39. v-el-table-infinite-scroll="load"
  40. :data="filteredTableData"
  41. :summary-method="getSummaries"
  42. :span-method="tableSpanMethod"
  43. :tree-props="treeProps"
  44. :row-key="rowKeyTree"
  45. stripe
  46. :show-summary="showSummary"
  47. border
  48. ref="table"
  49. :height="tableHeight ? tableHeight : minHeight - 8 + 'vh'"
  50. class="table infinite-list"
  51. style="width: 100%; overflow: auto"
  52. @select="selectHandler"
  53. >
  54. <el-table-column
  55. v-if="selectionEnable"
  56. type="selection"
  57. width="35"
  58. />
  59. <el-table-column v-if="isStatus" width="55">
  60. <template slot-scope="scope">
  61. <div class="tableStatus">
  62. <div
  63. v-if="filteredTableData[scope.$index].nodeState == '运行'"
  64. class="status0"
  65. >
  66. <span class="icon"></span>
  67. </div>
  68. <div
  69. v-else-if="
  70. filteredTableData[scope.$index].nodeState == '停止'
  71. "
  72. class="status1"
  73. >
  74. <span class="icon"></span>
  75. </div>
  76. <div v-else class="status2"><span class="icon"></span></div>
  77. </div>
  78. </template>
  79. </el-table-column>
  80. <el-table-column
  81. v-for="(item, index) in tableColsCopy"
  82. :sortable="item.needSort ? true : false"
  83. :key="index"
  84. :prop="item.columnName"
  85. :label="item.columnLabel"
  86. :show-overflow-tooltip="showOverflowTooltip"
  87. >
  88. <template #header>
  89. <span class="colTips">
  90. <el-tooltip :content="item.columnDescribe" placement="top">
  91. <span>{{ item.columnLabel }}</span>
  92. </el-tooltip>
  93. </span>
  94. <span v-if="item.needFilters">
  95. <el-popover
  96. placement="bottom"
  97. trigger="click"
  98. @show="popoverShowHandler(item.columnName)"
  99. @hide="popoverHideHandler"
  100. >
  101. <i
  102. slot="reference"
  103. :class="[
  104. 'filter-arrow',
  105. 'el-icon-arrow-down',
  106. arrowClass(item.columnName),
  107. ]"
  108. />
  109. <el-form>
  110. <el-form-item :label="item.columnLabel">
  111. <el-select
  112. v-model="filterValues[item.columnName]"
  113. size="small"
  114. placeholder="筛选"
  115. default-first-option
  116. filterable
  117. clearable
  118. >
  119. <el-option
  120. v-for="(option, optionIndex) in tableDataFilters[
  121. item.columnName
  122. ]"
  123. :key="option.value + optionIndex"
  124. :value="option.value"
  125. :label="option.text"
  126. />
  127. </el-select>
  128. </el-form-item>
  129. </el-form>
  130. </el-popover>
  131. </span>
  132. </template>
  133. </el-table-column>
  134. <el-table-column fixed="right" label="操作" :width="fixedWidth">
  135. <template slot-scope="scope">
  136. <div class="hd-td">
  137. <div class="hd-tr">
  138. <template v-if="isStatus">
  139. <el-button
  140. type="text"
  141. @click="handleLook(scope.row)"
  142. size="small"
  143. class="rmScs"
  144. >查看</el-button
  145. >
  146. <template
  147. v-if="
  148. scope.row.serviceTypeCode == 2 ||
  149. scope.row.serviceTypeCode == 4
  150. "
  151. >
  152. <el-button
  153. type="text"
  154. v-if="scope.row.nodeState == '停止'"
  155. @click="stateChangeHandler(scope.row)"
  156. size="small"
  157. class="rmScs"
  158. >启动</el-button
  159. >
  160. <el-button
  161. type="text"
  162. v-if="scope.row.nodeState == '运行'"
  163. @click="stateChangeHandler(scope.row)"
  164. size="small"
  165. class="rmScs"
  166. >停止</el-button
  167. >
  168. </template>
  169. </template>
  170. <!-- <el-button class="hrefBtn" type="text" @click="handleHerf(scope.row)" size="small">跳转</el-button> -->
  171. <template v-if="isAuth">
  172. <el-button
  173. v-if="btnAuthEdit"
  174. type="text"
  175. @click="handleEdit(scope.row)"
  176. size="small"
  177. class="rmScs"
  178. >编辑</el-button
  179. >
  180. </template>
  181. <template v-else>
  182. <el-button
  183. type="text"
  184. @click="handleEdit(scope.row)"
  185. size="small"
  186. class="rmScs"
  187. >编辑</el-button
  188. >
  189. </template>
  190. <template v-if="isAuth">
  191. <el-button
  192. v-if="btnAuthDel"
  193. class="rmSc"
  194. type="text"
  195. @click="handleRemove(scope.row)"
  196. size="small"
  197. >删除</el-button
  198. >
  199. </template>
  200. <template v-else>
  201. <el-button
  202. class="rmSc"
  203. type="text"
  204. @click="handleRemove(scope.row)"
  205. size="small"
  206. >删除</el-button
  207. >
  208. </template>
  209. <el-button
  210. class="rmScs"
  211. v-if="withColumnSet"
  212. type="text"
  213. size="small"
  214. @click="handleColumnSet(scope.row)"
  215. >列设置</el-button
  216. >
  217. <el-button
  218. class="rmScs"
  219. v-if="withItemSet"
  220. type="text"
  221. size="small"
  222. @click="handleItemSet(scope.row)"
  223. >数据项</el-button
  224. >
  225. <template v-if="withlodSet">
  226. <template v-if="isAuth">
  227. <el-button
  228. class="rmScser"
  229. v-if="btnAuthWithlodSet"
  230. type="text"
  231. size="small"
  232. @click="handlelodSet(scope.row)"
  233. >航站设置</el-button
  234. >
  235. </template>
  236. <template v-else>
  237. <el-button
  238. class="rmScser"
  239. type="text"
  240. size="small"
  241. @click="handlelodSet(scope.row)"
  242. >航站设置</el-button
  243. >
  244. </template>
  245. </template>
  246. <template v-if="withnodeSet">
  247. <template v-if="isAuth">
  248. <el-button
  249. v-if="btnAuthWithnodeSet"
  250. class="rmScser"
  251. type="text"
  252. size="small"
  253. @click="handlenodeSet(scope.row)"
  254. >位置设置</el-button
  255. >
  256. </template>
  257. <template v-else>
  258. <el-button
  259. class="rmScser"
  260. type="text"
  261. size="small"
  262. @click="handlenodeSet(scope.row)"
  263. >位置设置</el-button
  264. >
  265. </template>
  266. </template>
  267. <el-button
  268. v-if="withPreview"
  269. type="text"
  270. size="small"
  271. class="rmScs"
  272. @click="handlePreview(scope.row)"
  273. >预览</el-button
  274. >
  275. </div>
  276. </div>
  277. </template>
  278. </el-table-column>
  279. </el-table>
  280. <!-- <p v-if="noMore" style="text-align: center">没有更多了</p> -->
  281. </div>
  282. </template>
  283. <template v-else>
  284. <NoData image-width="auto" image-height="100%" />
  285. </template>
  286. </div>
  287. <div class="data-table-dialog">
  288. <!--新增/编辑-->
  289. <Dialog :width="width" :isBody="isBody" :flag="flag">
  290. <div class="dialog-content">
  291. <div class="title">{{ tableTitle }}</div>
  292. <div class="contents">
  293. <el-form
  294. ref="ruleForm"
  295. :model="tableForm"
  296. :label-width="labelWidth"
  297. >
  298. <el-row :gutter="20">
  299. <el-col
  300. v-for="(item, index) in tableColsCopy"
  301. :key="index"
  302. :span="rows"
  303. >
  304. <el-form-item :label="item.columnLabel">
  305. <template
  306. v-if="
  307. item.listqueryTemplateID ||
  308. item.listqueryTemplateID == 0
  309. "
  310. >
  311. <el-select
  312. v-if="asShow"
  313. class="input-shadow"
  314. size="small"
  315. filterable
  316. default-first-option
  317. style="width: 100%"
  318. v-model="tableForm[item.columnName]"
  319. @change="changeSelect(item.columnName, item)"
  320. placeholder="请选择"
  321. >
  322. <el-option
  323. v-for="item in tableOptions[item.columnName]"
  324. :key="item.v ? item.v : item.planDepartureApt"
  325. :label="item.k ? item.k : item.planDepartureApt"
  326. :value="
  327. item.setlabel === 'positionDescribe'
  328. ? item.v
  329. : item.v != undefined
  330. ? item.v
  331. : item.planDepartureApt
  332. "
  333. >
  334. </el-option>
  335. </el-select>
  336. </template>
  337. <template v-else-if="item.dataType == 'longtext'">
  338. <el-input
  339. size="small"
  340. :rows="1"
  341. type="textarea"
  342. @change="inputChangeHandler(item.columnName)"
  343. v-model="tableForm[item.columnName]"
  344. ></el-input>
  345. </template>
  346. <template v-else-if="item.dataType == 'datetime'">
  347. <el-date-picker
  348. value-format="yyyy-MM-dd"
  349. v-model="tableForm[item.columnName]"
  350. :rows="1"
  351. type="datetime"
  352. placeholder="选择日期时间"
  353. @change="inputChangeHandler(item.columnName)"
  354. >
  355. </el-date-picker>
  356. </template>
  357. <template v-else-if="item.dataType == 'number'">
  358. <el-input
  359. size="small"
  360. v-model.number="tableForm[item.columnName]"
  361. onkeyup="value=value.replace(/[^1-9]/g,'')"
  362. @change="inputChangeHandler(item.columnName)"
  363. ></el-input>
  364. </template>
  365. <template v-else>
  366. <el-input
  367. size="small"
  368. v-model="tableForm[item.columnName]"
  369. @change="inputChangeHandler(item.columnName)"
  370. ></el-input>
  371. </template>
  372. </el-form-item>
  373. </el-col>
  374. </el-row>
  375. </el-form>
  376. </div>
  377. <div class="foot right">
  378. <el-button
  379. size="medium"
  380. @click="handleOk"
  381. class="r24"
  382. type="primary"
  383. >确定</el-button
  384. >
  385. <el-button @click="eledite" size="medium">取消</el-button>
  386. </div>
  387. </div>
  388. </Dialog>
  389. <Dialog :isBody="isBody" :flag="rmFlag">
  390. <div class="airportInfoDialog">
  391. <div class="title del-title">删除</div>
  392. <div class="content del-content">
  393. <span class="el-icon-error error r10"></span>您是否确认删除<span
  394. class="error l10"
  395. >{{ rmTitle }}</span
  396. >
  397. </div>
  398. <div class="foot right Delfoot">
  399. <el-button
  400. size="medium"
  401. class="r24"
  402. @click="tableRemove"
  403. type="danger"
  404. >删除</el-button
  405. >
  406. <el-button size="medium" @click="rmFlag = false">取消</el-button>
  407. </div>
  408. </div>
  409. </Dialog>
  410. </div>
  411. </div>
  412. </template>
  413. <script>
  414. import request from "@/utils/request";
  415. import { setTableFilters } from "@/utils/table";
  416. import Dialog from "@/layout/components/Dialog/index.vue";
  417. import NoData from "@/components/nodata";
  418. import { translateDataToTreeAllTreeMsg } from "@/utils/validate";
  419. import {
  420. Query,
  421. GeneralDataReception,
  422. Start,
  423. Stop,
  424. } from "@/api/dataIntegration";
  425. export default {
  426. name: "DataTable",
  427. props: {
  428. isDialog: {
  429. type: Boolean,
  430. default: true,
  431. },
  432. tableup: {
  433. type: Boolean,
  434. default: false,
  435. },
  436. //接口ID
  437. dataId: {
  438. type: [String, Number],
  439. default: "",
  440. },
  441. editId: {
  442. type: [String, Number],
  443. default: "",
  444. },
  445. dataContent: {
  446. type: Object,
  447. default: () => ({}),
  448. },
  449. //是否显示状态
  450. isStatus: {
  451. type: Boolean,
  452. default: false,
  453. },
  454. //是否显示名称
  455. isStatuser: {
  456. type: Boolean,
  457. default: false,
  458. },
  459. //弹框宽度
  460. width: {
  461. type: String,
  462. default: "560px",
  463. },
  464. //弹框表单-行数
  465. rows: {
  466. type: Number,
  467. default: 3,
  468. },
  469. //弹框-表单文字宽度
  470. labelWidth: {
  471. type: String,
  472. default: "80px",
  473. },
  474. //表格高度
  475. tableHeight: {
  476. type: [String, Number],
  477. default: 0,
  478. },
  479. minHeight: {
  480. type: Number,
  481. default: 65,
  482. },
  483. //是否显示树形表格
  484. isTree: {
  485. type: Boolean,
  486. default: false,
  487. },
  488. //树形props
  489. treeProps: {
  490. type: Object,
  491. default: function () {
  492. return { children: "children", hasChildren: "hasChildren" };
  493. },
  494. },
  495. //树形标识id
  496. rowKeyTree: {
  497. type: String,
  498. default: "companyID",
  499. },
  500. //是否显示新增按钮
  501. isBtn: {
  502. type: Boolean,
  503. default: true,
  504. },
  505. // 是否显示合计行
  506. showSummary: {
  507. type: Boolean,
  508. default: false,
  509. },
  510. marginTop: {
  511. type: String,
  512. default: "0px",
  513. },
  514. // 是否可选中行
  515. selectionEnable: {
  516. type: Boolean,
  517. default: false,
  518. },
  519. // 懒加载
  520. withLazyLoad: {
  521. type: Boolean,
  522. default: false,
  523. },
  524. // 不换行,溢出隐藏
  525. showOverflowTooltip: {
  526. type: Boolean,
  527. default: false,
  528. },
  529. // 表格-操作-列设置按钮显示
  530. withColumnSet: {
  531. type: Boolean,
  532. default: false,
  533. },
  534. // 表格-操作-项设置按钮显示
  535. withItemSet: {
  536. type: Boolean,
  537. default: false,
  538. },
  539. // 表格-操作-项设置按钮显示
  540. withlodSet: {
  541. type: Boolean,
  542. default: false,
  543. },
  544. // 表格-操作-节点按钮显示
  545. withnodeSet: {
  546. type: Boolean,
  547. default: false,
  548. },
  549. // 表格-操作-查询模板预览
  550. withPreview: {
  551. type: Boolean,
  552. default: false,
  553. },
  554. //操作列宽度
  555. fixedWidth: {
  556. type: String,
  557. default: "180px",
  558. },
  559. //弹框是否显示在body上
  560. isBody: {
  561. type: Boolean,
  562. default: false,
  563. },
  564. //新增按钮权限
  565. authAdd: {
  566. type: String,
  567. default: "",
  568. },
  569. //编辑按钮权限
  570. authEdit: {
  571. type: String,
  572. default: "",
  573. },
  574. //删除按钮权限
  575. authDel: {
  576. type: String,
  577. default: "",
  578. },
  579. //位置设置权限
  580. authWithnodeSet: {
  581. type: String,
  582. default: "",
  583. },
  584. //航站设置权限
  585. authWithlodSet: {
  586. type: String,
  587. default: "",
  588. },
  589. //是否启用权限按钮
  590. isAuth: {
  591. type: Boolean,
  592. default: false,
  593. },
  594. },
  595. components: { Dialog, NoData },
  596. data() {
  597. return {
  598. asShow: true,
  599. loading: false,
  600. flag: false,
  601. serviceId: null,
  602. rmFlag: false,
  603. rowTitle: "",
  604. page: 0,
  605. noMore: false,
  606. tableCols: [], //表头数据
  607. tableData: [], //表格数据
  608. tableColsCopy: [], //表头数据缓存
  609. tableDataFilters: {}, //表头-下拉数据
  610. filterValues: {}, //表头-下拉-选中数据
  611. tableDataCopy: [], //缓存table数据
  612. tableGroups: [], //表格分组数据
  613. colShowFilter: "", //表头-下拉-箭头
  614. spanArr: [], //表格分组数据缓存
  615. pos: 0, //表格分组计数
  616. tableTitle: "新增", //弹框标题
  617. tableType: "add", //弹框类型=新增/编辑
  618. tableForm: {}, //弹框表单
  619. rmTitle: "", //弹框-删除-标题
  620. tableObj: {}, //增/删/改数据缓存
  621. tableOptions: {}, //弹框-下来数据缓存
  622. tableArrs: [], //重组table-表头下拉
  623. proAll: false, //重组时-所有请求是否都完成
  624. roles: JSON.parse(sessionStorage.getItem("userAuthList")) ?? [],
  625. tableOptionscp: {},
  626. tabledatacopy: {},
  627. };
  628. },
  629. computed: {
  630. dataTableContentStyle() {
  631. const style = {};
  632. if (this.minHeight) {
  633. style["min-height"] = this.minHeight;
  634. }
  635. if (this.tableHeight) {
  636. style["height"] = this.tableHeight;
  637. }
  638. return style;
  639. },
  640. //设置表头-下拉-箭头样式
  641. arrowClass() {
  642. return function (prop) {
  643. let classString = "";
  644. if (this.colShowFilter === prop) {
  645. return "arrow-active";
  646. }
  647. if (
  648. Object.entries(this.tableDataFilters).find(
  649. ([key, arr]) => this.filterValues[prop]
  650. )
  651. ) {
  652. classString += "arrow-blue";
  653. }
  654. return classString;
  655. };
  656. },
  657. //设置表头-下拉-选中数据
  658. filteredTableData() {
  659. if (this.isTree) {
  660. this.tableData = translateDataToTreeAllTreeMsg(
  661. this.tableData,
  662. "parentID",
  663. "companyID"
  664. );
  665. }
  666. return this.tableData.filter((item) => {
  667. let flag = true;
  668. Object.entries(this.filterValues).forEach(([key, value]) => {
  669. if (value !== "" && item[key] !== value) {
  670. flag = false;
  671. }
  672. });
  673. return flag;
  674. });
  675. },
  676. btnAuthAdd() {
  677. if (this.roles.includes(this.authAdd)) {
  678. return true;
  679. } else {
  680. return false;
  681. }
  682. },
  683. btnAuthEdit() {
  684. if (this.roles.includes(this.authEdit)) {
  685. return true;
  686. } else {
  687. return false;
  688. }
  689. },
  690. btnAuthDel() {
  691. if (this.roles.includes(this.authDel)) {
  692. return true;
  693. } else {
  694. return false;
  695. }
  696. },
  697. btnAuthWithnodeSet() {
  698. if (this.roles.includes(this.authWithnodeSet)) {
  699. return true;
  700. } else {
  701. return false;
  702. }
  703. },
  704. btnAuthWithlodSet() {
  705. if (this.roles.includes(this.authWithlodSet)) {
  706. return true;
  707. } else {
  708. return false;
  709. }
  710. },
  711. },
  712. watch: {
  713. dataContent: {
  714. handler(val) {
  715. if (val) {
  716. if (val.companyID) {
  717. this.resetTable();
  718. this.getQuery();
  719. }
  720. }
  721. },
  722. deep: true,
  723. },
  724. //监听机场变更的id 不可删除
  725. // dataId: {
  726. // if(val) {
  727. //
  728. // if (val.companyID) {
  729. // this.resetTable();
  730. // this.getQuery();
  731. // }
  732. // },
  733. // },
  734. },
  735. mounted() {
  736. this.getQuery();
  737. },
  738. updated() {
  739. this.$refs["table"]?.doLayout();
  740. },
  741. methods: {
  742. eledite() {
  743. this.flag = false;
  744. const arrbegin = _.cloneDeep(this.tableOptionscp);
  745. this.tableOptions = arrbegin;
  746. },
  747. load() {
  748. //
  749. if (!this.isTree) {
  750. if (this.noMore || this.loading) {
  751. return;
  752. }
  753. this.getQuery();
  754. }
  755. },
  756. resetTable() {
  757. this.page = 0;
  758. this.noMore = false;
  759. this.tableData = [];
  760. },
  761. changeSelect(data, name) {
  762. if (this.tableForm[data] === "") {
  763. this.tableForm[data] = null;
  764. }
  765. this.tableForm[this.tableOptions[data][0].setvalue] =
  766. this.tableForm[data];
  767. const arrbegin = _.cloneDeep(this.tabledatacopy);
  768. if (this.tableForm.beginNode) {
  769. this.tableOptions.beginPosition = arrbegin.beginPosition.filter(
  770. (i) => i.nodeCode === this.tableForm.beginNode
  771. );
  772. arrbegin.beginPosition.forEach((element) => {
  773. if (element.v === this.tableForm.beginPosition) {
  774. if (element.nodeCode !== this.tableForm.beginNode) {
  775. this.tableForm.beginPosition = null;
  776. }
  777. }
  778. });
  779. // let arr = [];
  780. // this.tableOptions.beginPosition.forEach((element) => {
  781. // arr.push(element.nodeCode);
  782. // });
  783. // if (
  784. // !arr.includes(this.tableForm.beginPosition) &&
  785. // this.tableForm.beginNode
  786. // ) {
  787. // this.tableForm.beginPosition = null;
  788. // }
  789. this.asShow = false;
  790. this.asShow = true;
  791. }
  792. if (this.tableForm.beginPosition && !this.tableForm.beginNode) {
  793. arrbegin.beginPosition.forEach((element) => {
  794. if (this.tableForm.beginPosition === element.v) {
  795. this.tableForm.beginNode = element.nodeCode;
  796. }
  797. });
  798. }
  799. if (this.tableForm.endNode) {
  800. this.tableOptions.endPosition = arrbegin.endPosition.filter(
  801. (i) => i.nodeCode === this.tableForm.endNode
  802. );
  803. arrbegin.endPosition.forEach((element) => {
  804. if (element.v === this.tableForm.endPosition) {
  805. if (element.nodeCode !== this.tableForm.endNode) {
  806. this.tableForm.endPosition = null;
  807. }
  808. }
  809. });
  810. this.asShow = false;
  811. this.asShow = true;
  812. }
  813. if (this.tableForm.endPosition && !this.tableForm.endNode) {
  814. arrbegin.endPosition.forEach((element) => {
  815. if (this.tableForm.endPosition === element.v) {
  816. this.tableForm.endNode = element.nodeCode;
  817. }
  818. });
  819. }
  820. },
  821. inputChangeHandler(data) {
  822. if (this.tableForm[data] === "") {
  823. this.tableForm[data] = null;
  824. }
  825. },
  826. //获取表格数据
  827. async getQuery() {
  828. try {
  829. this.loading = true;
  830. const { code, returnData } = await Query({
  831. id: this.dataId,
  832. needPage: ++this.page,
  833. dataContent: Object.values(this.dataContent),
  834. });
  835. if (code == 0) {
  836. if (returnData.listValues.length === 0) {
  837. this.page--;
  838. this.noMore = true;
  839. this.loading = false;
  840. }
  841. const titleColumn = returnData.columnSet.find(
  842. (item) => item.needShow === 1
  843. );
  844. if (titleColumn) {
  845. this.rowTitle = titleColumn.columnName;
  846. }
  847. this.tableData.push(...returnData.listValues);
  848. this.tableCols = returnData.columnSet;
  849. this.serviceId = returnData.submitID;
  850. setTimeout(() => {
  851. this.initTableData();
  852. this.loading = false;
  853. }, 100);
  854. } else {
  855. this.page--;
  856. this.loading = false;
  857. this.$message.error("获取表格数据失败");
  858. }
  859. } catch (error) {
  860. this.page--;
  861. this.loading = false;
  862. }
  863. },
  864. //表格-增/删/改
  865. async generalDataReception(data) {
  866. try {
  867. data = {
  868. ...data,
  869. ...this.dataContent,
  870. };
  871. const { code, message } = await GeneralDataReception({
  872. serviceId: this.serviceId,
  873. dataContent: JSON.stringify(data),
  874. });
  875. if (code == 0) {
  876. this.$message.success("操作成功");
  877. this.resetTable();
  878. this.getQuery();
  879. this.flag = false;
  880. this.rmFlag = false;
  881. this.tableObj = {};
  882. this.tableForm = {};
  883. // this.$router.go(0);
  884. } else {
  885. this.$message.error("操作失败");
  886. this.flag = false;
  887. this.rmFlag = false;
  888. this.tableObj = {};
  889. this.tableForm = {};
  890. }
  891. } catch (error) {
  892. this.flag = false;
  893. this.rmFlag = false;
  894. this.tableObj = {};
  895. this.tableForm = {};
  896. }
  897. },
  898. // 表格勾选
  899. toggleRowSelection(row, isSelected) {
  900. this.$refs["table"].toggleRowSelection(row, isSelected);
  901. },
  902. // 表格初始勾选
  903. selectTableRows(tableData, selectFlagName) {
  904. tableData.forEach((row) => {
  905. this.$refs["table"].toggleRowSelection(row, !!row[selectFlagName]);
  906. });
  907. this.$emit("selectionAll", this.$refs.table.selection);
  908. },
  909. //初始化表格
  910. initTableData() {
  911. this.tableColsCopy = this.tableCols.filter((item) => item.needShow);
  912. this.tableDataCopy = _.cloneDeep(this.tableData);
  913. const datas = _.cloneDeep(this.tableColsCopy);
  914. // const reqUts = [];
  915. datas.forEach(async (item) => {
  916. this.tableDataFilters[item.columnName] = [];
  917. if (item.needGroup) {
  918. this.tableGroups.push(item.columnName);
  919. }
  920. if (item.listqueryTemplateID || item.listqueryTemplateID == 0) {
  921. this.tableArrs.push(item.columnName);
  922. // const reqUt = this.getSelectData(item.listqueryTemplateID)
  923. // reqUts.push(reqUt)
  924. if (!this.tableOptions[item.columnName]) {
  925. //开始位置beginPosition 结束位置endPosition (区分开始结束位置必须传null)
  926. if (
  927. item.columnName !== "beginPosition" &&
  928. item.columnName !== "endPosition"
  929. ) {
  930. this.tableOptions[item.columnName] = await this.getSelectData(
  931. item.listqueryTemplateID
  932. );
  933. } else {
  934. this.tableOptions[item.columnName] = await this.getSelectData(
  935. item.listqueryTemplateID,
  936. null
  937. );
  938. this.tabledatacopy[item.columnName] = _.cloneDeep(
  939. this.tableOptions[item.columnName]
  940. );
  941. }
  942. } else {
  943. if (
  944. item.columnName === "beginPosition" ||
  945. item.columnName === "endPosition"
  946. ) {
  947. this.tableOptions[item.columnName] = await this.getSelectData(
  948. item.listqueryTemplateID,
  949. null
  950. );
  951. }
  952. }
  953. //
  954. }
  955. // this.filterValues[item.columnName] = ''
  956. });
  957. setTableFilters(this.tableData, this.tableDataFilters);
  958. this.tableGroup(this.tableData);
  959. this.selectTableRows(this.tableData, "DeployID");
  960. this.tableOptionscp = _.cloneDeep(this.tableOptions);
  961. const arrbegin = _.cloneDeep(this.tableOptions);
  962. if (arrbegin) {
  963. setTimeout(() => {
  964. this.tableData.forEach((element) => {
  965. if (this.tableOptions.beginNode) {
  966. arrbegin.beginNode.forEach((res) => {
  967. if (res.v === element.beginNode) {
  968. element.beginNode = res.k;
  969. }
  970. });
  971. arrbegin.endNode.forEach((res) => {
  972. if (res.v == element.endNode) {
  973. element.endNode = res.k;
  974. }
  975. });
  976. arrbegin.calculationBasis.forEach((res) => {
  977. if (res.v == element.calculationBasis) {
  978. element.calculationBasis = res.k;
  979. }
  980. });
  981. //位置
  982. this.tabledatacopy.beginPosition.forEach((res) => {
  983. if (res.v == element.beginPosition) {
  984. element.beginPosition = res.k;
  985. }
  986. });
  987. this.tabledatacopy.endPosition.forEach((res) => {
  988. if (res.v == element.endPosition) {
  989. element.endPosition = res.k;
  990. }
  991. });
  992. }
  993. });
  994. }, 100);
  995. }
  996. // this.getSelectDataAll(reqUts)
  997. },
  998. //获取所有获取弹框-下拉数据-请求状态
  999. getSelectDataAll(reqUts) {
  1000. Promise.all(reqUts)
  1001. .then((res) => {
  1002. this.proAll = true;
  1003. })
  1004. .catch((err) => {
  1005. this.proAll = false;
  1006. });
  1007. },
  1008. //获取弹框-下拉数据
  1009. async getSelectData(id, name) {
  1010. // name ? [name] : name === null ? [null]: [],
  1011. const { code, returnData } = await Query({
  1012. id,
  1013. dataContent: name ? [name] : name === null ? [null] : [],
  1014. });
  1015. if (code == 0) {
  1016. return returnData.listValues;
  1017. } else {
  1018. return [];
  1019. }
  1020. },
  1021. //重组table-显示名称
  1022. setTable() {
  1023. this.tableArrs.forEach((item) => {
  1024. this.tableOptions[item].forEach((p) => {
  1025. this.tableDataCopy.forEach((msg) => {
  1026. if (msg[item] == p.v) {
  1027. msg[item] = p.k;
  1028. }
  1029. });
  1030. this.tableDataFilters[item].forEach((cap) => {
  1031. if (cap.value == p.v) {
  1032. cap.text = p.k;
  1033. cap.value = p.k;
  1034. }
  1035. });
  1036. });
  1037. });
  1038. this.tableData = this.tableDataCopy;
  1039. },
  1040. //分组
  1041. tableGroup(tableData) {
  1042. const spanArr = [];
  1043. let pos = 0;
  1044. let ifYj = this.tableGroups[0];
  1045. for (let i = 0; i < tableData.length; i++) {
  1046. if (i === 0) {
  1047. spanArr.push(1);
  1048. } else {
  1049. if (tableData[i][ifYj] === tableData[i - 1][ifYj]) {
  1050. spanArr[pos] += 1;
  1051. spanArr.push(0);
  1052. } else {
  1053. spanArr.push(1);
  1054. pos = i;
  1055. }
  1056. }
  1057. }
  1058. this.spanArr = spanArr;
  1059. this.pos = pos;
  1060. },
  1061. popoverShowHandler(prop) {
  1062. this.colShowFilter = prop;
  1063. },
  1064. popoverHideHandler() {
  1065. this.colShowFilter = "";
  1066. },
  1067. //分组
  1068. tableSpanMethod({ row, column, rowIndex, columnIndex }) {
  1069. if (this.tableGroups.includes(column["property"])) {
  1070. const _row = this.spanArr[rowIndex];
  1071. const _col = _row > 0 ? 1 : 0;
  1072. return {
  1073. rowspan: _row,
  1074. colspan: _col,
  1075. };
  1076. }
  1077. },
  1078. //合计
  1079. getSummaries(param) {
  1080. const { columns, data } = param;
  1081. const sums = [];
  1082. columns.forEach((column, index) => {
  1083. this.tableColsCopy.forEach((p) => {
  1084. if (column.property == p.columnName && p.needCount) {
  1085. const values = data.map((item) => Number(item[column.property]));
  1086. if (!values.every((value) => isNaN(value))) {
  1087. sums[index] = values.reduce((prev, curr) => {
  1088. const value = Number(curr);
  1089. if (!isNaN(value)) {
  1090. return prev + curr;
  1091. } else {
  1092. return prev;
  1093. }
  1094. }, 0);
  1095. sums[index] += "";
  1096. }
  1097. }
  1098. });
  1099. });
  1100. return sums;
  1101. },
  1102. //弹框-确定
  1103. handleOk() {
  1104. this.submitClickHandler();
  1105. },
  1106. //滚动
  1107. tableLoad() {},
  1108. //表格-新增
  1109. handleAdd() {
  1110. // this.flag = true;
  1111. // this.tableType = "add";
  1112. // this.tableTitle = "新增";
  1113. // this.tableForm = {};
  1114. if (this.isDialog) {
  1115. this.flag = true;
  1116. this.tableType = "add";
  1117. this.tableTitle = "新增";
  1118. this.tableForm = {};
  1119. } else {
  1120. this.$emit("handleAdd");
  1121. }
  1122. //
  1123. },
  1124. //表格-编辑
  1125. async handleEdit(row) {
  1126. if (this.tableup) {
  1127. this.$router.push({
  1128. path: "/BasicsData/warningEdit",
  1129. query: {
  1130. id: row.alarmSceneId,
  1131. },
  1132. });
  1133. } else {
  1134. if (this.isDialog) {
  1135. if (this.editId) {
  1136. let data = await this.queryOriginRow(
  1137. this.editId,
  1138. row.queryTemplateColumnSetID
  1139. );
  1140. this.tableForm = JSON.parse(JSON.stringify(data));
  1141. } else {
  1142. this.tableForm = JSON.parse(JSON.stringify(row));
  1143. if (this.tableForm.beginNode) {
  1144. const datas = _.cloneDeep(this.tableColsCopy);
  1145. // const reqUts = [];
  1146. datas.forEach(async (item) => {
  1147. if (item.columnLabel === "开始位置") {
  1148. this.tableOptions.beginNode.forEach((element) => {
  1149. if (this.tableForm.beginNode == element.k) {
  1150. this.tableForm.beginNode = element.v;
  1151. }
  1152. });
  1153. this.tableOptions.beginPosition = await this.getSelectData(
  1154. item.listqueryTemplateID,
  1155. this.tableForm.beginNode
  1156. );
  1157. this.asShow = false;
  1158. this.asShow = true;
  1159. }
  1160. });
  1161. }
  1162. if (this.tableForm.endNode) {
  1163. const datas = _.cloneDeep(this.tableColsCopy);
  1164. // const reqUts = [];
  1165. datas.forEach(async (item) => {
  1166. if (item.columnLabel === "结束位置") {
  1167. this.tableOptions.endNode.forEach((element) => {
  1168. if (this.tableForm.endNode == element.k) {
  1169. this.tableForm.endNode = element.v;
  1170. }
  1171. });
  1172. this.tableOptions.endPosition = await this.getSelectData(
  1173. item.listqueryTemplateID,
  1174. this.tableForm.endNode
  1175. );
  1176. this.asShow = false;
  1177. this.asShow = true;
  1178. }
  1179. });
  1180. }
  1181. if (this.tableOptions.beginPosition) {
  1182. this.tableOptions.beginPosition.forEach((res) => {
  1183. if (res.k == this.tableForm.beginPosition) {
  1184. this.tableForm.beginPosition = res.v;
  1185. }
  1186. });
  1187. }
  1188. //位置
  1189. if (this.tableOptions.calculationBasis) {
  1190. this.tableOptions.calculationBasis.forEach((res) => {
  1191. if (res.k == this.tableForm.calculationBasis) {
  1192. this.tableForm.calculationBasis = res.v;
  1193. }
  1194. });
  1195. }
  1196. // if (this.tableOptions.endPosition) {
  1197. // this.tableOptions.endPosition.forEach((res) => {
  1198. // if (res.k == this.tableForm.endPosition) {
  1199. // this.tableForm.endPosition = res.v;
  1200. // }
  1201. // });
  1202. // }
  1203. }
  1204. this.flag = true;
  1205. this.tableType = "edit";
  1206. this.tableTitle = "编辑";
  1207. } else {
  1208. this.$emit("handleEdit", row);
  1209. }
  1210. }
  1211. },
  1212. async queryOriginRow(editId, queryTemplateColumnSetID) {
  1213. try {
  1214. const { code, returnData } = await Query({
  1215. id: editId,
  1216. dataContent: [queryTemplateColumnSetID],
  1217. });
  1218. if (Number(code) === 0) {
  1219. return returnData.listValues[0];
  1220. } else {
  1221. this.$message.error("失败");
  1222. }
  1223. } catch (error) {}
  1224. },
  1225. //表格-跳转
  1226. handleHerf(row) {
  1227. alert("跳转");
  1228. },
  1229. // 新增/编辑-确认
  1230. submitClickHandler() {
  1231. this.$refs["ruleForm"].validate((valid) => {
  1232. if (valid) {
  1233. if (this.tableType == "add") {
  1234. this.tableForm.event = 1;
  1235. } else {
  1236. this.tableForm.event = 2;
  1237. }
  1238. this.generalDataReception(this.tableForm);
  1239. } else {
  1240. return false;
  1241. }
  1242. });
  1243. },
  1244. //表格-删除
  1245. handleRemove(row) {
  1246. this.rmFlag = true;
  1247. // this.rmTitle = row.className || row.username || row.serviceName || row.queryTemplateName;
  1248. this.rmTitle = row[this.rowTitle];
  1249. this.tableObj = row;
  1250. },
  1251. //表格-删除-确认
  1252. tableRemove() {
  1253. this.tableObj.event = 3;
  1254. this.generalDataReception(this.tableObj);
  1255. },
  1256. // 表格-跳转列设置页
  1257. handleColumnSet(row) {
  1258. this.$router.push({
  1259. path: "/systemSettings/queryTemplateChild",
  1260. query: {
  1261. queryTemplateID: row.queryTemplateID,
  1262. },
  1263. });
  1264. },
  1265. // 表格-跳转数据项设置页
  1266. handleItemSet(row) {
  1267. this.$router.push({
  1268. path: "/systemSettings/datastructureChild",
  1269. query: {
  1270. dataStructureID: row.dataStructureID,
  1271. },
  1272. });
  1273. },
  1274. // 表格-跳转航站设置页
  1275. handlelodSet(row) {
  1276. this.$router.push({
  1277. path: "/BasicsData/airportInfoChild",
  1278. query: {
  1279. IATACode: row.IATACode,
  1280. },
  1281. });
  1282. },
  1283. // 表格-节点置页
  1284. handlenodeSet(row) {
  1285. this.$router.push({
  1286. path: "/BasicsData/deployNodeChild",
  1287. query: {
  1288. nodeCode: row.nodeCode,
  1289. },
  1290. });
  1291. },
  1292. // 表格-查看
  1293. handleLook(row) {
  1294. this.$router.push({
  1295. name: "serviceTopology",
  1296. params: {
  1297. serviceID: row.serviceID,
  1298. serviceName: row.serviceName,
  1299. },
  1300. });
  1301. },
  1302. // 表格-启动/停止
  1303. async stateChangeHandler(row) {
  1304. const runState = row.runState == "运行" ? 0 : 1;
  1305. const serviceID = row.serviceID;
  1306. // this.changeBtn(runState, serviceID);
  1307. this.changeState(runState, serviceID);
  1308. },
  1309. // 表格-选中行
  1310. selectHandler(selection, row) {
  1311. this.$emit("selection-change", selection, row);
  1312. },
  1313. // 表格-查询模板预览
  1314. handlePreview(row) {
  1315. this.$emit("preview", row);
  1316. },
  1317. async changeBtn(state, id) {
  1318. let res = null;
  1319. // const { code, message } = await GeneralDataReception({
  1320. // serviceId: 61,
  1321. // dataContent: JSON.stringify(obj)
  1322. // })
  1323. if (state) {
  1324. res = await Start({
  1325. serviceId: id,
  1326. });
  1327. } else {
  1328. res = await Stop({
  1329. serviceId: id,
  1330. });
  1331. }
  1332. if (res.code == 0) {
  1333. this.$message.success(res.message);
  1334. this.resetTable();
  1335. this.getQuery();
  1336. } else {
  1337. this.$message.error(res.message);
  1338. }
  1339. },
  1340. async changeState(runState, serviceID) {
  1341. try {
  1342. const operate = runState ? "start" : "stop";
  1343. const {
  1344. code,
  1345. returnData: { listValues },
  1346. } = await Query({
  1347. id: DATACONTENT_ID.sysServiceNodeListId,
  1348. dataContent: [serviceID],
  1349. });
  1350. if (Number(code) === 0) {
  1351. if (listValues.length) {
  1352. Promise.all(
  1353. listValues.map((node) =>
  1354. request({
  1355. url: `${node.serviceURL}${operate}`,
  1356. method: "post",
  1357. data: {
  1358. serviceId: serviceID,
  1359. },
  1360. })
  1361. )
  1362. ).then((results) => {
  1363. if (results.every((result) => Number(result.code) === 0)) {
  1364. this.$message.success("操作成功");
  1365. } else {
  1366. this.$message.error("操作失败");
  1367. }
  1368. });
  1369. }
  1370. } else {
  1371. this.$message.error("查询节点失败");
  1372. }
  1373. } catch (error) {}
  1374. },
  1375. },
  1376. };
  1377. </script>
  1378. <style lang="scss" scoped>
  1379. .data-table {
  1380. width: 100%;
  1381. // background-color: #fff;
  1382. // padding: 20px;
  1383. .data-table-content {
  1384. height: 100%;
  1385. }
  1386. ::v-deep .table {
  1387. width: 100%;
  1388. .cell {
  1389. padding: 0;
  1390. text-align: center;
  1391. font-size: 14px;
  1392. font-family: Helvetica, "Microsoft YaHei";
  1393. letter-spacing: 0;
  1394. }
  1395. .cell-click {
  1396. cursor: pointer;
  1397. color: #2d7cff;
  1398. &.cell-clicked {
  1399. color: purple;
  1400. }
  1401. }
  1402. .el-table__header-wrapper {
  1403. .cell {
  1404. font-weight: bold;
  1405. color: #101116;
  1406. > .el-checkbox {
  1407. display: none;
  1408. }
  1409. }
  1410. .has-gutter {
  1411. tr {
  1412. .bgl-huang {
  1413. background: #fcf0b1;
  1414. }
  1415. }
  1416. }
  1417. }
  1418. .el-table__body-wrapper {
  1419. tr.bgl-hui {
  1420. background: #d2d6df;
  1421. td {
  1422. background: #d2d6df;
  1423. }
  1424. &.redBorder {
  1425. position: relative;
  1426. &::after {
  1427. content: "";
  1428. position: absolute;
  1429. left: 0;
  1430. bottom: 0;
  1431. width: 100%;
  1432. height: 2px;
  1433. background: #e83f82;
  1434. }
  1435. }
  1436. }
  1437. }
  1438. .rmScs {
  1439. width: 48px;
  1440. height: 24px;
  1441. border-color: #9ebbf7;
  1442. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
  1443. border-radius: 4px;
  1444. display: flex;
  1445. align-items: center;
  1446. justify-content: center;
  1447. float: left;
  1448. span {
  1449. color: #2d67e3;
  1450. }
  1451. }
  1452. .rmScser {
  1453. width: 60px;
  1454. height: 24px;
  1455. border-color: #9ebbf7;
  1456. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
  1457. border-radius: 4px;
  1458. display: flex;
  1459. align-items: center;
  1460. justify-content: center;
  1461. float: left;
  1462. span {
  1463. color: #2d67e3;
  1464. }
  1465. }
  1466. .rmSc {
  1467. width: 48px;
  1468. height: 24px;
  1469. background: #eb2f3b;
  1470. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
  1471. border-radius: 4px;
  1472. display: flex;
  1473. align-items: center;
  1474. justify-content: center;
  1475. span {
  1476. color: #ffffff;
  1477. }
  1478. }
  1479. .hrefBtn {
  1480. width: 48px;
  1481. height: 24px;
  1482. background: #6f81bc;
  1483. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
  1484. border-radius: 4px;
  1485. display: flex;
  1486. align-items: center;
  1487. justify-content: center;
  1488. span {
  1489. color: #ffffff;
  1490. }
  1491. }
  1492. .tableStatus {
  1493. font-size: 14px;
  1494. .icon {
  1495. width: 14px;
  1496. height: 14px;
  1497. background: #2d67e3;
  1498. border-radius: 2px;
  1499. display: inline-block;
  1500. vertical-align: middle;
  1501. position: relative;
  1502. top: -2px;
  1503. }
  1504. .status0 {
  1505. position: relative;
  1506. top: 5px;
  1507. }
  1508. .status1 {
  1509. position: relative;
  1510. top: 5px;
  1511. .icon {
  1512. background-color: #afb4bf;
  1513. }
  1514. }
  1515. .status2 {
  1516. position: relative;
  1517. top: 5px;
  1518. .icon {
  1519. background-color: #eb2f3b;
  1520. }
  1521. }
  1522. }
  1523. .el-table__fixed-right {
  1524. thead {
  1525. div {
  1526. color: #101116;
  1527. }
  1528. }
  1529. }
  1530. .hd-td {
  1531. .hd-tr {
  1532. display: flex;
  1533. justify-content: center;
  1534. flex-direction: row;
  1535. padding: 0 8px;
  1536. }
  1537. }
  1538. }
  1539. .data-table-btn {
  1540. margin-top: 13px;
  1541. line-height: 32px;
  1542. margin-bottom: 20px;
  1543. }
  1544. }
  1545. .filter-arrow {
  1546. cursor: pointer;
  1547. transition: 0.3s transform;
  1548. &.arrow-active {
  1549. transform: rotate(-180deg);
  1550. }
  1551. &.arrow-blue {
  1552. color: #2d7cff;
  1553. font-weight: bold;
  1554. }
  1555. }
  1556. .el-select-dropdown__item.hover {
  1557. background: #d2d6df;
  1558. }
  1559. .data-table-dialog {
  1560. ::v-deep .dialog-content {
  1561. .el-form-item__content {
  1562. line-height: 41px;
  1563. }
  1564. }
  1565. }
  1566. </style>