index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. <template>
  2. <div class="data-table" :style="{ marginTop: marginTop }">
  3. <div :style="dataTableContentStyle" v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="data-table-content">
  4. <div v-if="isBtn" class="data-table-btn flex-end">
  5. <el-button size="small" @click="handleAdd" plain type="primary">新增</el-button>
  6. </div>
  7. <template v-if="tableData.length">
  8. <div>
  9. <el-table :data="filteredTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" stripe :show-summary="showSummary" border ref="table" :height="tableHeight ? tableHeight : (minHeight - 8 + 'vh')" class="table infinite-list" style="width: 100%; overflow: auto" @select="selectHandler">
  10. <el-table-column
  11. v-if="selectionEnable"
  12. type="selection"
  13. width="35"
  14. />
  15. <el-table-column v-for="(item, index) in tableColsCopy" :sortable="item.needSort ? true : false" :key="index" :prop="item.columnName" :label="item.columnLabel" :show-overflow-tooltip="showOverflowTooltip">
  16. <template #header>
  17. <span class="colTips">
  18. <el-tooltip :content="item.columnDescribe" placement="top">
  19. <span>{{ item.columnLabel }}</span>
  20. </el-tooltip>
  21. </span>
  22. <span v-if="item.needFilters">
  23. <el-popover placement="bottom" trigger="click" @show="popoverShowHandler(item.columnName)" @hide="popoverHideHandler">
  24. <i slot="reference" :class="[
  25. 'filter-arrow',
  26. 'el-icon-arrow-down',
  27. arrowClass(item.columnName),
  28. ]" />
  29. <el-form>
  30. <el-form-item :label="item.columnLabel">
  31. <el-select v-model="filterValues[item.columnName]" size="small" placeholder="筛选" default-first-option filterable clearable>
  32. <el-option v-for="(option, optionIndex) in tableDataFilters[
  33. item.columnName
  34. ]" :key="option.value + optionIndex" :value="option.value" :label="option.text" />
  35. </el-select>
  36. </el-form-item>
  37. </el-form>
  38. </el-popover>
  39. </span>
  40. </template>
  41. </el-table-column>
  42. <el-table-column fixed="right" label="操作" width="180">
  43. <template slot-scope="scope">
  44. <div class="hd-td">
  45. <div class="hd-tr">
  46. <!-- <el-button class="hrefBtn" type="text" @click="handleHerf(scope.row)" size="small">跳转</el-button> -->
  47. <el-button type="text" @click="handleEdit(scope.row)" size="small" class="rmScs">编辑</el-button>
  48. <el-button class="rmSc" type="text" @click="handleRemove(scope.row)" size="small">删除</el-button>
  49. <el-button class="rmScs" v-if="withColumnSet" type="text" size="small" @click="handleColumnSet(scope.row)">列设置</el-button>
  50. <el-button class="rmScs" v-if="withItemSet" type="text" size="small" @click="handleItemSet(scope.row)">数据项</el-button>
  51. </div>
  52. </div>
  53. </template>
  54. </el-table-column>
  55. </el-table>
  56. <!-- <p v-if="noMore" style="text-align: center">没有更多了</p> -->
  57. </div>
  58. </template>
  59. <template v-else>
  60. <NoData image-width="auto" image-height="100%" />
  61. </template>
  62. </div>
  63. <div class="data-table-dialog">
  64. <!--新增/编辑-->
  65. <Dialog :width="width" :flag="flag">
  66. <div class="dialog-content">
  67. <div class="title">{{ tableTitle }}</div>
  68. <div class="content">
  69. <el-form ref="ruleForm" :model="tableForm" :label-width="labelWidth">
  70. <el-row :gutter="20">
  71. <el-col v-for="(item, index) in tableColsCopy" :key="index" :span="rows">
  72. <el-form-item :label="item.columnLabel">
  73. <template v-if="
  74. item.listqueryTemplateID ||
  75. item.listqueryTemplateID == 0
  76. ">
  77. <el-select size="small" clearable style="width: 100%" v-model="tableForm[item.columnName]" @change="changeSelect(item.columnName)" placeholder="请选择">
  78. <el-option v-for="item in tableOptions[item.columnName]" :key="item.v" :label="item.k" :value="item.v">
  79. </el-option>
  80. </el-select>
  81. </template>
  82. <!-- <template v-else-if="item.dataType == 'longtext'">
  83. <el-input size="small" :rows="1" type="textarea" v-model="tableForm[item.columnName]"></el-input>
  84. </template> -->
  85. <template v-else>
  86. <el-input size="small" v-model="tableForm[item.columnName]" @change="inputChangeHandler(item.columnName)"></el-input>
  87. </template>
  88. </el-form-item>
  89. </el-col>
  90. </el-row>
  91. </el-form>
  92. </div>
  93. <div class="foot right t30">
  94. <el-button size="medium" @click="handleOk" class="r24" type="primary">确定</el-button>
  95. <el-button @click="flag = false" size="medium">取消</el-button>
  96. </div>
  97. </div>
  98. </Dialog>
  99. <Dialog :flag="rmFlag">
  100. <div class="airportInfoDialog">
  101. <div class="title del-title">删除</div>
  102. <div class="content del-content">
  103. <span class="el-icon-error error r10"></span>您是否确认删除<span class="error l10">{{ rmTitle }}</span>
  104. </div>
  105. <div class="foot right Delfoot t30">
  106. <el-button size="medium" class="r24" @click="tableRemove" type="danger">删除</el-button>
  107. <el-button size="medium" @click="rmFlag = false">取消</el-button>
  108. </div>
  109. </div>
  110. </Dialog>
  111. </div>
  112. </div>
  113. </template>
  114. <script>
  115. import { setTableFilters } from "@/utils/table";
  116. import Dialog from "@/layout/components/Dialog/index.vue";
  117. import NoData from "@/components/nodata";
  118. import { Query, GeneralDataReception } from "@/api/dataIntegration";
  119. export default {
  120. name: "DataTable",
  121. props: {
  122. isDialog: {
  123. type: Boolean,
  124. default: true
  125. },
  126. //接口ID
  127. dataId: {
  128. type: [String, Number],
  129. default: ''
  130. },
  131. editId: {
  132. type: [String, Number],
  133. default: ''
  134. },
  135. dataContent: {
  136. type: Object,
  137. default: () => ({})
  138. },
  139. //弹框宽度
  140. width: {
  141. type: String,
  142. default: "560px",
  143. },
  144. //弹框表单-行数
  145. rows: {
  146. type: Number,
  147. default: 3,
  148. },
  149. //弹框-表单文字宽度
  150. labelWidth: {
  151. type: String,
  152. default: "80px",
  153. },
  154. //表格高度
  155. tableHeight: {
  156. type: [String, Number],
  157. default: 0
  158. },
  159. minHeight: {
  160. type: Number,
  161. default: 65,
  162. },
  163. //是否显示新增按钮
  164. isBtn: {
  165. type: Boolean,
  166. default: true,
  167. },
  168. // 是否显示合计行
  169. showSummary: {
  170. type: Boolean,
  171. default: false
  172. },
  173. marginTop: {
  174. type: String,
  175. default: '20px'
  176. },
  177. // 是否可选中行
  178. selectionEnable: {
  179. type: Boolean,
  180. default: false
  181. },
  182. // 懒加载
  183. withLazyLoad: {
  184. type: Boolean,
  185. default: false
  186. },
  187. // 不换行,溢出隐藏
  188. showOverflowTooltip: {
  189. type: Boolean,
  190. default: false
  191. },
  192. // 表格-操作-列设置按钮显示
  193. withColumnSet: {
  194. type: Boolean,
  195. default: false
  196. },
  197. // 表格-操作-项设置按钮显示
  198. withItemSet: {
  199. type: Boolean,
  200. default: false
  201. }
  202. },
  203. components: { Dialog, NoData },
  204. data () {
  205. return {
  206. loading: false,
  207. flag: false,
  208. serviceId: null,
  209. rmFlag: false,
  210. rowTitle: '',
  211. tableCols: [], //表头数据
  212. tableData: [], //表格数据
  213. tableColsCopy: [], //表头数据缓存
  214. tableDataFilters: {}, //表头-下拉数据
  215. filterValues: {}, //表头-下拉-选中数据
  216. tableDataCopy: [], //缓存table数据
  217. tableGroups: [], //表格分组数据
  218. colShowFilter: "", //表头-下拉-箭头
  219. spanArr: [], //表格分组数据缓存
  220. pos: 0, //表格分组计数
  221. tableTitle: "新增", //弹框标题
  222. tableType: "add", //弹框类型=新增/编辑
  223. tableForm: {}, //弹框表单
  224. rmTitle: "", //弹框-删除-标题
  225. tableObj: {}, //增/删/改数据缓存
  226. tableOptions: {}, //弹框-下来数据缓存
  227. tableArrs: [], //重组table-表头下拉
  228. proAll: false //重组时-所有请求是否都完成
  229. };
  230. },
  231. computed: {
  232. dataTableContentStyle() {
  233. const style = {}
  234. if (this.minHeight) {
  235. style['min-height'] = this.minHeight
  236. }
  237. if (this.tableHeight) {
  238. style['height'] = this.tableHeight
  239. }
  240. return style
  241. },
  242. //设置表头-下拉-箭头样式
  243. arrowClass () {
  244. return function (prop) {
  245. let classString = "";
  246. if (this.colShowFilter === prop) {
  247. return "arrow-active";
  248. }
  249. if (
  250. Object.entries(this.tableDataFilters).find(
  251. ([key, arr]) => this.filterValues[prop]
  252. )
  253. ) {
  254. classString += "arrow-blue";
  255. }
  256. return classString;
  257. };
  258. },
  259. //设置表头-下拉-选中数据
  260. filteredTableData () {
  261. return this.tableData.filter((item) => {
  262. let flag = true;
  263. Object.entries(this.filterValues).forEach(([key, value]) => {
  264. if (value !== "" && item[key] !== value) {
  265. flag = false;
  266. }
  267. });
  268. return flag;
  269. });
  270. },
  271. },
  272. // watch: {
  273. // proAll: {
  274. // handler (val) {
  275. // if (val) {
  276. // setTimeout(() => {
  277. // this.setTable()
  278. // }, 200);
  279. // }
  280. // },
  281. // deep: true
  282. // }
  283. // },
  284. mounted () {
  285. this.getQuery();
  286. },
  287. updated() {
  288. this.$refs['table']?.doLayout()
  289. },
  290. methods: {
  291. load(){
  292. // alert(1)
  293. },
  294. changeSelect(data){
  295. if (this.tableForm[data] === '') {
  296. this.tableForm[data] = null
  297. }
  298. this.tableForm[this.tableOptions[data][0].setvalue] = this.tableForm[data];
  299. // console.log(this.tableForm)
  300. },
  301. inputChangeHandler(data) {
  302. if (this.tableForm[data] === '') {
  303. this.tableForm[data] = null
  304. }
  305. },
  306. //获取表格数据
  307. async getQuery () {
  308. try {
  309. this.loading = true;
  310. const { code, returnData } = await Query({
  311. id: this.dataId,
  312. dataContent: Object.values(this.dataContent),
  313. });
  314. if (code == 0) {
  315. const titleColumn = returnData.columnSet.find(item => item.needShow === 1)
  316. if (titleColumn) {
  317. this.rowTitle = titleColumn.columnName
  318. }
  319. this.tableData = returnData.listValues;
  320. this.tableCols = returnData.columnSet;
  321. this.serviceId = returnData.submitID;
  322. setTimeout(() => {
  323. this.initTableData();
  324. this.loading = false;
  325. }, 100);
  326. } else {
  327. this.loading = false;
  328. this.$message.error("获取表格数据失败");
  329. }
  330. } catch (error) {
  331. this.loading = false;
  332. console.log(error);
  333. }
  334. },
  335. //表格-增/删/改
  336. async generalDataReception (data) {
  337. try {
  338. data = {
  339. ...data,
  340. ...this.dataContent
  341. }
  342. const { code, message } = await GeneralDataReception({
  343. serviceId: this.serviceId,
  344. dataContent: JSON.stringify(data),
  345. });
  346. if (code == 0) {
  347. this.$message.success("操作成功");
  348. this.getQuery();
  349. this.flag = false;
  350. this.rmFlag = false;
  351. this.tableObj = {};
  352. this.tableForm = {};
  353. } else {
  354. this.$message.error("操作失败");
  355. this.flag = false;
  356. this.rmFlag = false;
  357. this.tableObj = {};
  358. this.tableForm = {};
  359. }
  360. } catch (error) {
  361. console.log(error);
  362. this.flag = false;
  363. this.rmFlag = false;
  364. this.tableObj = {};
  365. this.tableForm = {};
  366. }
  367. },
  368. // 表格勾选
  369. toggleRowSelection(row, isSelected) {
  370. this.$refs['table'].toggleRowSelection(row, isSelected)
  371. },
  372. // 表格初始勾选
  373. selectTableRows(tableData, selectFlagName) {
  374. tableData.forEach(row => {
  375. this.$refs['table'].toggleRowSelection(row, !!row[selectFlagName])
  376. })
  377. },
  378. //初始化表格
  379. initTableData () {
  380. this.tableColsCopy = this.tableCols.filter((item) => item.needShow);
  381. // console.log(this.tableColsCopy)
  382. this.tableDataCopy = _.cloneDeep(this.tableData);
  383. const datas = _.cloneDeep(this.tableColsCopy);
  384. const reqUts = []
  385. datas.forEach(async (item) => {
  386. this.tableDataFilters[item.columnName] = [];
  387. if (item.needGroup) {
  388. this.tableGroups.push(item.columnName);
  389. }
  390. if (item.listqueryTemplateID || item.listqueryTemplateID == 0) {
  391. this.tableArrs.push(item.columnName)
  392. // const reqUt = this.getSelectData(item.listqueryTemplateID)
  393. // reqUts.push(reqUt)
  394. this.tableOptions[item.columnName] = await this.getSelectData(item.listqueryTemplateID)
  395. // console.log(this.tableOptions[item.columnName])
  396. }
  397. // this.filterValues[item.columnName] = ''
  398. });
  399. setTableFilters(this.tableData, this.tableDataFilters);
  400. this.tableGroup(this.tableData);
  401. this.selectTableRows(this.tableData, 'DeployID')
  402. // this.getSelectDataAll(reqUts)
  403. },
  404. //获取所有获取弹框-下拉数据-请求状态
  405. getSelectDataAll (reqUts) {
  406. Promise.all(reqUts).then(res => {
  407. this.proAll = true
  408. }).catch(err => {
  409. this.proAll = false
  410. })
  411. },
  412. //获取弹框-下拉数据
  413. async getSelectData (id) {
  414. const { code, returnData } = await Query({
  415. id,
  416. dataContent: [],
  417. });
  418. if (code == 0) {
  419. return returnData.listValues;
  420. } else {
  421. return [];
  422. }
  423. },
  424. //重组table-显示名称
  425. setTable () {
  426. this.tableArrs.forEach(item => {
  427. this.tableOptions[item].forEach(p => {
  428. this.tableDataCopy.forEach(msg => {
  429. if (msg[item] == p.v) {
  430. msg[item] = p.k
  431. }
  432. })
  433. this.tableDataFilters[item].forEach(cap => {
  434. if (cap.value == p.v) {
  435. cap.text = p.k
  436. cap.value = p.k
  437. }
  438. })
  439. })
  440. })
  441. this.tableData = this.tableDataCopy
  442. },
  443. //分组
  444. tableGroup (tableData) {
  445. const spanArr = [];
  446. let pos = 0;
  447. let ifYj = this.tableGroups[0];
  448. for (let i = 0; i < tableData.length; i++) {
  449. if (i === 0) {
  450. spanArr.push(1);
  451. } else {
  452. if (tableData[i][ifYj] === tableData[i - 1][ifYj]) {
  453. spanArr[pos] += 1;
  454. spanArr.push(0);
  455. } else {
  456. spanArr.push(1);
  457. pos = i;
  458. }
  459. }
  460. }
  461. this.spanArr = spanArr;
  462. this.pos = pos;
  463. },
  464. popoverShowHandler (prop) {
  465. this.colShowFilter = prop;
  466. },
  467. popoverHideHandler () {
  468. this.colShowFilter = "";
  469. },
  470. //分组
  471. tableSpanMethod ({ row, column, rowIndex, columnIndex }) {
  472. if (this.tableGroups.includes(column["property"])) {
  473. const _row = this.spanArr[rowIndex];
  474. const _col = _row > 0 ? 1 : 0;
  475. return {
  476. rowspan: _row,
  477. colspan: _col,
  478. };
  479. }
  480. },
  481. //合计
  482. getSummaries (param) {
  483. const { columns, data } = param;
  484. const sums = [];
  485. columns.forEach((column, index) => {
  486. this.tableColsCopy.forEach((p) => {
  487. if (column.property == p.columnName && p.needCount) {
  488. const values = data.map((item) => Number(item[column.property]));
  489. if (!values.every((value) => isNaN(value))) {
  490. sums[index] = values.reduce((prev, curr) => {
  491. const value = Number(curr);
  492. if (!isNaN(value)) {
  493. return prev + curr;
  494. } else {
  495. return prev;
  496. }
  497. }, 0);
  498. sums[index] += "";
  499. }
  500. }
  501. });
  502. });
  503. return sums;
  504. },
  505. //弹框-确定
  506. handleOk () {
  507. this.submitClickHandler();
  508. },
  509. //滚动
  510. tableLoad () {
  511. console.log("d");
  512. },
  513. //表格-新增
  514. handleAdd () {
  515. // this.flag = true;
  516. // this.tableType = "add";
  517. // this.tableTitle = "新增";
  518. // this.tableForm = {};
  519. if(this.isDialog ){
  520. this.flag = true;
  521. this.tableType = "add";
  522. this.tableTitle = "新增";
  523. this.tableForm = {};
  524. }
  525. else{
  526. this.$emit("handleAdd");
  527. }
  528. // console.log(this.tableOptions);
  529. },
  530. //表格-编辑
  531. async handleEdit (row) {
  532. if(this.isDialog) {
  533. if (this.editId) {
  534. let data = await this.queryOriginRow(this.editId, row.queryTemplateColumnSetID)
  535. this.tableForm = JSON.parse(JSON.stringify(data))
  536. // this.tableForm =this.tableForm;
  537. // Object.entries(tableForm).forEach(([key, value]) => {
  538. // this.tableForm[key] = value
  539. // })
  540. } else {
  541. this.tableForm = JSON.parse(JSON.stringify(row));
  542. }
  543. this.flag = true;
  544. this.tableType = "edit";
  545. this.tableTitle = "编辑";
  546. } else{
  547. this.$emit("handleEdit",row);
  548. }
  549. },
  550. async queryOriginRow(editId, queryTemplateColumnSetID) {
  551. try {
  552. const { code, returnData } = await Query({
  553. id: editId,
  554. dataContent: [queryTemplateColumnSetID]
  555. })
  556. if (Number(code) === 0) {
  557. return returnData.listValues[0]
  558. } else {
  559. this.$message.error("失败")
  560. }
  561. } catch (error) {
  562. console.log(error)
  563. }
  564. },
  565. //表格-跳转
  566. handleHerf(row){
  567. alert('跳转')
  568. },
  569. // 新增/编辑-确认
  570. submitClickHandler () {
  571. this.$refs["ruleForm"].validate((valid) => {
  572. if (valid) {
  573. if (this.tableType == "add") {
  574. this.tableForm.event = 1;
  575. } else {
  576. this.tableForm.event = 2;
  577. }
  578. this.generalDataReception(this.tableForm);
  579. } else {
  580. return false;
  581. }
  582. });
  583. },
  584. //表格-删除
  585. handleRemove (row) {
  586. this.rmFlag = true;
  587. // this.rmTitle = row.className || row.username || row.serviceName || row.queryTemplateName;
  588. this.rmTitle = row[this.rowTitle]
  589. this.tableObj = row;
  590. },
  591. //表格-删除-确认
  592. tableRemove () {
  593. this.tableObj.event = 3;
  594. this.generalDataReception(this.tableObj);
  595. },
  596. // 表格-跳转列设置页
  597. handleColumnSet(row) {
  598. this.$router.push({
  599. path: '/systemSettings/queryTemplateChild',
  600. query: {
  601. queryTemplateID: row.queryTemplateID
  602. }
  603. })
  604. },
  605. // 表格-跳转数据项设置页
  606. handleItemSet(row) {
  607. this.$router.push({
  608. path: '/systemSettings/datastructureChild',
  609. query: {
  610. dataStructureID: row.dataStructureID
  611. }
  612. })
  613. },
  614. // 表格-选中行
  615. selectHandler(selection, row) {
  616. this.$emit('selection-change', selection, row)
  617. }
  618. },
  619. };
  620. </script>
  621. <style lang="scss" scoped>
  622. .data-table {
  623. width: 100%;
  624. background-color: #fff;
  625. padding: 20px;
  626. ::v-deep .table {
  627. width: 100%;
  628. .cell {
  629. padding: 0;
  630. text-align: center;
  631. font-size: 14px;
  632. font-family: Helvetica, "Microsoft YaHei";
  633. letter-spacing: 0;
  634. }
  635. .cell-click {
  636. cursor: pointer;
  637. color: #2d7cff;
  638. &.cell-clicked {
  639. color: purple;
  640. }
  641. }
  642. .el-table__header-wrapper {
  643. .cell {
  644. font-weight: bold;
  645. color: #101116;
  646. > .el-checkbox {
  647. display: none;
  648. }
  649. }
  650. .has-gutter {
  651. tr {
  652. .bgl-huang {
  653. background: #fcf0b1;
  654. }
  655. }
  656. }
  657. }
  658. .el-table__body-wrapper {
  659. tr.bgl-hui {
  660. background: #d2d6df;
  661. td {
  662. background: #d2d6df;
  663. }
  664. &.redBorder {
  665. position: relative;
  666. &::after {
  667. content: "";
  668. position: absolute;
  669. left: 0;
  670. bottom: 0;
  671. width: 100%;
  672. height: 2px;
  673. background: #e83f82;
  674. }
  675. }
  676. }
  677. }
  678. .rmScs {
  679. width: 48px;
  680. height: 24px;
  681. border-color: #9ebbf7;
  682. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
  683. border-radius: 4px;
  684. display: flex;
  685. align-items: center;
  686. justify-content: center;
  687. float: left;
  688. span {
  689. color: #2d67e3;
  690. }
  691. }
  692. .rmSc {
  693. width: 48px;
  694. height: 24px;
  695. background: #eb2f3b;
  696. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
  697. border-radius: 4px;
  698. display: flex;
  699. align-items: center;
  700. justify-content: center;
  701. span {
  702. color: #ffffff;
  703. }
  704. }
  705. .hrefBtn {
  706. width: 48px;
  707. height: 24px;
  708. background: #6F81BC;
  709. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
  710. border-radius: 4px;
  711. display: flex;
  712. align-items: center;
  713. justify-content: center;
  714. span {
  715. color: #ffffff;
  716. }
  717. }
  718. .el-table__fixed-right {
  719. thead {
  720. div {
  721. color: #101116;
  722. }
  723. }
  724. }
  725. .hd-td {
  726. .hd-tr{
  727. display: flex;
  728. justify-content: center;
  729. flex-direction: row;
  730. padding: 0 8px;
  731. }
  732. }
  733. }
  734. .data-table-btn {
  735. margin-bottom: 20px;
  736. }
  737. }
  738. .filter-arrow {
  739. cursor: pointer;
  740. transition: 0.3s transform;
  741. &.arrow-active {
  742. transform: rotate(-180deg);
  743. }
  744. &.arrow-blue {
  745. color: #2d7cff;
  746. font-weight: bold;
  747. }
  748. }
  749. .el-select-dropdown__item.hover {
  750. background: #d2d6df;
  751. }
  752. </style>