index.vue 45 KB

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