index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. <template>
  2. <div class="header-actions" v-if="getActionList.length != 0 &&getActionList.length>2">
  3. <div class="overflow-box">
  4. <el-button v-for="(item, index) in getActionList" :key="index" :type="item.type || 'primary'" :plain="item.plain || false"
  5. v-bind="getHeaderActions(item)" @click="item.action" :disabled="item.disabled || false">
  6. {{ item.text }}
  7. </el-button>
  8. </div>
  9. </div>
  10. <div class="stat-warp" v-if="statConfig.length != 0" :class="statWarpHeight > 200 && isMore ? 'show-more' : ''">
  11. <div class="title">
  12. <select v-model="statSelectVal" v-if="statConfig.length > 1" @change="changeStatData">
  13. <option :value="index" v-for="(i, index) in statConfig" :key="index">
  14. {{ i.label }}
  15. </option>
  16. </select>
  17. <div v-if="statConfig.length === 1">{{ statConfig[0].label }}</div>
  18. </div>
  19. <div class="more-btn" @click="isMore = !isMore" v-if="statWarpHeight > 200">
  20. <span>
  21. <i v-if="!isMore" class="iconfont icon-btn_xiala22"></i>
  22. <i v-else class="iconfont icon-btn_shouqi22"></i>
  23. </span>
  24. </div>
  25. <ul id="statWarp">
  26. <li v-show="!i.data" :class="'theme' + i.type" v-for="(i, index) in statConfig[statSelectVal].data" :key="index"
  27. @click="i.click ? i.click(i, index) : ''" :style="i.click ? 'cursor: pointer' : ''">
  28. <div class="label">{{ i.label }}</div>
  29. <div class="num">{{ i.num }}</div>
  30. </li>
  31. <li v-show="i.data" v-for="(i, index) in statConfig[statSelectVal].data" :key="index" class="multi-data" :class="'theme' + i.type"
  32. @click="i.click ? i.click(i, index) : ''" :style="i.click ? 'cursor: pointer' : ''">
  33. <div class="label">{{ i.label }}</div>
  34. <div class="num-warp">
  35. <div class="num-box" v-for="(j, jindex) in i.data" :key="jindex">
  36. <div class="num-small" :style="'color:' + j.color">
  37. {{ j.num }}
  38. </div>
  39. <div class="label-small">{{ j.label }}</div>
  40. </div>
  41. </div>
  42. </li>
  43. </ul>
  44. </div>
  45. <div class="table-list-container by-table" v-loading="loading" v-if="!hideAll">
  46. <!-- v-if="!hideHeader" -->
  47. <header v-if="false" class="header">
  48. <h2>{{ title }}</h2>
  49. </header>
  50. <div class="by-search" v-if="!hideSearch">
  51. <div style="display: flex">
  52. <div v-if="getActionList.length != 0 &&getActionList.length <=2" style="margin-right:10px">
  53. <el-button v-for="(item, index) in getActionList" :key="index" :type="item.type || 'primary'" :plain="item.plain || false"
  54. v-bind="getHeaderActions(item)" @click="item.action" :disabled="item.disabled || false">
  55. {{ item.text }}
  56. </el-button>
  57. </div>
  58. <div class="by-dropdown" v-for="(i, index) in selectConfigCopy" :key="i.prop" style="margin-right: 10px">
  59. <div v-if="i.type" class="selectTime" style="display:flex;align-items:center">
  60. <span style="font-size:14px;height:32px;margin-right:15px">{{i.label || ''}}</span>
  61. <el-date-picker v-model="pagination[i.prop]" type="date" size="small" :placeholder="i.placeholder" style="width:120px"
  62. value-format="YYYY-MM-DD" @change="searchItemSelctOne(i,pagination[i.prop],pagination[i.propOne])" />
  63. <span style="margin-right:15px">-</span>
  64. <el-date-picker v-model="pagination[i.propOne]" type="date" size="small" :placeholder="i.placeholderOne" style="width:120px"
  65. value-format="YYYY-MM-DD" @change="searchItemSelctOne(i,pagination[i.prop],pagination[i.propOne])" />
  66. </div>
  67. <div v-else>
  68. <div class="by-dropdown-title">
  69. <!-- {{i.label || i.labelCopy}} -->
  70. {{
  71. pagination[i.prop]
  72. ? i.data.find((j) => j.value === pagination[i.prop])
  73. ? i.data.find((j) => j.value === pagination[i.prop]).label
  74. : i.label
  75. : i.labelCopy
  76. }}
  77. <i style="margin-left: 5px" class="iconfont icon-iconm_xialan1"></i>
  78. </div>
  79. <ul class="by-dropdown-lists">
  80. <li @click="searchItemSelct('all', i, index)" v-if="i.isShowAll === false ? i.isShowAll : true" style="">
  81. {{ $t("common.all") }}
  82. </li>
  83. <li v-for="j in i.data" :key="j.value || j.dictKey" @click="searchItemSelct(j, i)" style="">
  84. {{ j.label || j.dictValue }}
  85. </li>
  86. </ul>
  87. </div>
  88. </div>
  89. </div>
  90. <div style="display: flex">
  91. <el-input :placeholder="$t('common.pleaseEnterKeywords')" suffix-icon="search" size="mini" v-model="pagination.keyword"
  92. @keyup.enter="searchFn">
  93. </el-input>
  94. <el-button type="primary" style="margin-left: 10px" size="default" @click="searchFn">{{ $t("common.search") }}</el-button>
  95. <div class="more-icon" @click="retrievalModalFn">
  96. <img src="@/assets/images/iconm_xiangyzk.png" alt="" />
  97. </div>
  98. </div>
  99. </div>
  100. <component :is="containerTag">
  101. <div class="filter-form-container">
  102. <slot />
  103. </div>
  104. <el-table ref="hocElTable" :data="source" v-if="!hideTable" style="width: 100%" v-bind="$attrs" v-on="tableEvents" row-key="id" :tree-props="{
  105. children: 'children',
  106. hasChildren: 'hasChildren',
  107. }" :height="tableHeight">
  108. <el-table-column v-for="(item, index) in configData" :key="index" v-bind="getAttrsValue(item)" :type="item.type || ''" :selectable="
  109. (rowData, rowIndex) => isSelectable(rowData, rowIndex, item)
  110. ">
  111. <template #header v-if="item.attrs.isNeedHeaderSlot">
  112. <slot :name="item.attrs.headerSlot" :headerLabel="item.attrs.label" v-if="item.attrs.headerSlot">
  113. 头部插槽占位符
  114. </slot>
  115. </template>
  116. <template #default="scope" v-if="!item.type">
  117. <slot :name="item.attrs.slot" :item="scope.row" :headerLabel="item.attrs.label" v-if="item.attrs.slot">
  118. 插槽占位符
  119. </slot>
  120. <div v-else-if="isFunction(getValue(scope, item))">
  121. <component :is="renderTypeList[getMatchRenderFunction(item)].target" :cell-list="getValue(scope, item)()" :row="scope.row"
  122. :parent="getParent" @click="
  123. ($event) => {
  124. handleNativeClick(getAttrsValue(item), $event, item);
  125. }
  126. " />
  127. </div>
  128. <div v-else>
  129. {{ getValue(scope, item) }}
  130. </div>
  131. </template>
  132. </el-table-column>
  133. </el-table>
  134. <el-row v-if="!hidePagination" class="table-pagination" justify="end" type="flex">
  135. <el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="getPagination.pageNum"
  136. :page-size="getPagination.pageSize" :total="getPagination.total" @size-change="handleSizeChange"
  137. @current-change="handlePageChange" />
  138. </el-row>
  139. </component>
  140. </div>
  141. </template>
  142. <script>
  143. import { isFunction as isFn, isBoolean } from "./type";
  144. import ElementsMapping from "./ElementsMapping";
  145. import ComponentsMapping from "./ComponentsMapping";
  146. import { computed, defineComponent, getCurrentInstance, ref, watch } from "vue";
  147. import expand from "./expand";
  148. import Sortable from "sortablejs";
  149. export default defineComponent({
  150. name: "Table",
  151. components: {
  152. ElementsMapping,
  153. ComponentsMapping,
  154. },
  155. props: {
  156. hideSearch: {
  157. type: Boolean,
  158. default: false,
  159. },
  160. onMoreSearch: {
  161. type: Boolean,
  162. default: true,
  163. },
  164. hideAll: {
  165. type: Boolean,
  166. default: false,
  167. },
  168. hideTable: {
  169. type: Boolean,
  170. default: false,
  171. },
  172. //顶部搜索下拉配置
  173. selectConfig: {
  174. type: Array,
  175. default() {
  176. return [];
  177. },
  178. },
  179. // 获取表格元数据时携带的参数
  180. filterParams: {
  181. type: Object,
  182. default() {
  183. return {};
  184. },
  185. },
  186. // 表格加载 loading
  187. loading: {
  188. type: Boolean,
  189. default: false,
  190. },
  191. // 表格名称
  192. title: {
  193. type: String,
  194. default: "",
  195. },
  196. // 表格元数据
  197. source: {
  198. type: Array,
  199. required: true,
  200. default() {
  201. return [];
  202. },
  203. },
  204. tableHeight: {
  205. type: Number,
  206. required: false,
  207. },
  208. searchConfig: {
  209. type: Object,
  210. default() {
  211. return {
  212. keyword: "",
  213. };
  214. },
  215. },
  216. statConfig: {
  217. type: Array,
  218. default() {
  219. return [];
  220. },
  221. },
  222. // 指定外层容器的渲染组件
  223. containerTag: {
  224. type: String,
  225. default: "div",
  226. },
  227. // 是否隐藏表头
  228. hideHeader: {
  229. type: Boolean,
  230. default: false,
  231. },
  232. // 是否隐藏分页
  233. hidePagination: {
  234. type: Boolean,
  235. default: false,
  236. },
  237. // 分页配置
  238. pagination: {
  239. type: Object,
  240. default() {
  241. return {};
  242. },
  243. },
  244. // 表格配置文件
  245. config: {
  246. type: Array,
  247. default() {
  248. return [];
  249. },
  250. },
  251. // 表头右上方的按钮组
  252. actionList: {
  253. type: Array,
  254. default() {
  255. return [{ text: "", action: () => {} }];
  256. },
  257. },
  258. // element table 原生事件
  259. tableEvents: {
  260. type: Object,
  261. default() {
  262. return {};
  263. },
  264. },
  265. searchKey: {
  266. type: String,
  267. default: "keyword",
  268. },
  269. // 是否显示过滤的全部选项
  270. // isShowAll: {
  271. // type: Boolean,
  272. // default: true,
  273. // },
  274. },
  275. setup(props) {
  276. const { proxy } = getCurrentInstance();
  277. // 过滤出有属性的
  278. // const configData = ref([]);
  279. // configData.value = proxy.config.filter((x) => x && x.attrs);
  280. const configData = computed(() => proxy.config.filter((x) => x && x.attrs));
  281. // console.log(configData.value, "ssssssssss");
  282. const selectConfigCopy = computed(() => {
  283. return props.selectConfig.map((item) => {
  284. if (!item.labelCopy) item.labelCopy = { ...item }.label;
  285. return item;
  286. });
  287. });
  288. let isMore = ref(false);
  289. const changeStatData = () => {
  290. statWarpHeight.value = document.getElementById("statWarp").offsetHeight;
  291. };
  292. let statWarpHeight = ref(0);
  293. watch(
  294. proxy.statConfig,
  295. (newValue, oldValue) => {
  296. setTimeout(() => {
  297. //获取statWarp的height
  298. statWarpHeight.value =
  299. document.getElementById("statWarp").offsetHeight;
  300. }, 500);
  301. },
  302. { immediate: true }
  303. );
  304. let statSelectVal = ref(0);
  305. const retrievalModal = ref(false);
  306. const getAttrsValue = (item) => {
  307. const { attrs } = item;
  308. const result = {
  309. ...attrs,
  310. };
  311. delete result.prop;
  312. return result;
  313. };
  314. const renderTypeList = ref({
  315. render: {},
  316. renderHTML: {
  317. target: "elements-mapping",
  318. },
  319. renderComponent: {
  320. target: "components-mapping",
  321. },
  322. renderMoreBtn: {
  323. target: "more-btn",
  324. },
  325. });
  326. const getParent = computed(() => {
  327. return proxy.$parent;
  328. });
  329. const getPagination = computed(() => {
  330. const params = {
  331. pageNum: 1,
  332. pageSize: 10,
  333. total: 0,
  334. };
  335. return Object.assign({}, params, props.pagination);
  336. });
  337. const getActionList = computed(() => {
  338. return props.actionList
  339. .slice()
  340. .reverse()
  341. .filter((it) => it.text);
  342. });
  343. const getValue = (scope, configItem) => {
  344. const prop = configItem.attrs.prop;
  345. const renderName = getMatchRenderFunction(configItem);
  346. const renderObj = renderTypeList.value[renderName];
  347. if (renderObj && isFunction(configItem[renderName])) {
  348. return renderObj.target
  349. ? getRenderValue(scope, configItem, {
  350. name: renderName,
  351. type: "bind",
  352. })
  353. : getRenderValue(scope, configItem);
  354. }
  355. return scope.row[prop];
  356. };
  357. const getRenderValue = (
  358. scope,
  359. item,
  360. fn = { name: "render", type: "call" }
  361. ) => {
  362. const prop = item.attrs.prop;
  363. const propValue = prop && scope.row[prop];
  364. scope.row.$index = scope.$index;
  365. const args = propValue !== undefined ? propValue : scope.row;
  366. return item[fn.name][fn.type](getParent.value, args);
  367. };
  368. // 匹配 render 开头的函数
  369. const getMatchRenderFunction = (obj) => {
  370. return Object.keys(obj).find((key) => {
  371. const matchRender = key.match(/^render.*/);
  372. return matchRender && matchRender[0];
  373. });
  374. };
  375. const isFunction = (fn) => {
  376. return isFn(fn);
  377. };
  378. const searchFn = (val) => {
  379. if (props.loading) return;
  380. proxy.$emit(
  381. "getList",
  382. Object.assign(props.filterParams, {
  383. [props.searchKey]: props.pagination.keyword,
  384. })
  385. );
  386. };
  387. const retrievalModalFn = () => {
  388. proxy.$emit("moreSearch", "");
  389. //获取父组件定义的moreSearch方法
  390. };
  391. const handlePageChange = (val) => {
  392. proxy.$emit(
  393. "getList",
  394. Object.assign(props.filterParams, { pageNum: val })
  395. );
  396. };
  397. const handleSizeChange = (val) => {
  398. proxy.$emit(
  399. "getList",
  400. Object.assign(props.filterParams, { pageSize: val })
  401. );
  402. };
  403. const getHeaderActions = (item) => {
  404. return {
  405. ...item.attrs,
  406. };
  407. };
  408. const stopBubbles = (e) => {
  409. const event = e || window.event;
  410. if (event && event.stopPropagation) {
  411. event.stopPropagation();
  412. } else {
  413. event.cancelBubble = true;
  414. }
  415. };
  416. const handleNativeClick = ({ isBubble }, e, item) => {
  417. // 考虑到单元格内渲染了组件,并且组件自身可能含有点击事件,故添加了阻止冒泡机制
  418. // 若指定 isBubble 为 false,则当前单元格恢复冒泡机制
  419. if (isBoolean(isBubble) && !isBubble) return;
  420. stopBubbles(e);
  421. };
  422. //下拉搜索相关
  423. const searchItemSelct = (item, i, index = 0) => {
  424. if (item == "all") {
  425. i.label = { ...props.selectConfig[index] }.labelCopy;
  426. i.label = props.selectConfig[index].labelCopy;
  427. proxy.$emit(
  428. "getList",
  429. Object.assign(props.filterParams, { [i.prop]: "" })
  430. );
  431. return;
  432. }
  433. i.label = item.label || item.dictValue;
  434. proxy.$emit(
  435. "getList",
  436. Object.assign(props.filterParams, {
  437. [i.prop]: item.value || item.dictKey,
  438. })
  439. );
  440. };
  441. const searchItemSelctOne = (item, prop, propOne) => {
  442. if (prop && propOne) {
  443. proxy.$emit(
  444. "getList",
  445. Object.assign(props.filterParams, {
  446. [item.prop]: prop,
  447. [item.propOne]: propOne,
  448. })
  449. );
  450. } else if (prop == null && propOne == null) {
  451. proxy.$emit(
  452. "getList",
  453. Object.assign(props.filterParams, {
  454. [item.prop]: prop,
  455. [item.propOne]: propOne,
  456. })
  457. );
  458. }
  459. };
  460. const isSelectable = (row, index, item) => {
  461. if (item.type === "selection") {
  462. if (item.attrs && item.attrs.checkAtt) {
  463. if (row[item.attrs.checkAtt]) {
  464. return row[item.attrs.checkAtt];
  465. }
  466. } else {
  467. return true;
  468. }
  469. }
  470. };
  471. const hocElTable = ref();
  472. return {
  473. configData,
  474. getParent,
  475. getPagination,
  476. renderTypeList,
  477. getActionList,
  478. getAttrsValue,
  479. getValue,
  480. getRenderValue,
  481. getMatchRenderFunction,
  482. isFunction,
  483. handlePageChange,
  484. handleSizeChange,
  485. getHeaderActions,
  486. stopBubbles,
  487. handleNativeClick,
  488. searchFn,
  489. searchItemSelct,
  490. searchItemSelctOne,
  491. selectConfigCopy,
  492. isSelectable,
  493. retrievalModal,
  494. retrievalModalFn,
  495. statSelectVal,
  496. statWarpHeight,
  497. isMore,
  498. changeStatData,
  499. hocElTable,
  500. };
  501. },
  502. });
  503. </script>
  504. <style>
  505. .table-list-container th {
  506. color: #333 !important;
  507. }
  508. .by-table td .el-button + .el-button {
  509. margin-left: 0 !important;
  510. }
  511. .by-table td .el-button {
  512. background: none !important;
  513. margin: 0 !important;
  514. padding: 8px 6px !important;
  515. }
  516. .el-checkbox__input.is-disabled .el-checkbox__inner {
  517. background-color: #dee1e6;
  518. border-color: #b2b4b9;
  519. }
  520. .el-table .cell {
  521. line-height: 34px;
  522. }
  523. </style>
  524. <style lang="scss" scoped>
  525. .sortableActive {
  526. background: #f5f7fa !important;
  527. }
  528. .show-more {
  529. height: auto !important;
  530. }
  531. .stat-warp {
  532. margin-bottom: 20px;
  533. background: #fff;
  534. padding: 0 20px;
  535. height: 200px;
  536. overflow: hidden;
  537. position: relative;
  538. .more-btn {
  539. position: absolute;
  540. right: 0;
  541. bottom: 0;
  542. left: 0;
  543. height: 40px;
  544. cursor: pointer;
  545. font-size: 12px;
  546. line-height: 30px;
  547. text-align: center;
  548. background: linear-gradient(
  549. 180deg,
  550. rgba(255, 255, 255, 0) 0%,
  551. rgba(255, 255, 255, 0.8) 100%
  552. );
  553. i {
  554. color: #999;
  555. }
  556. }
  557. .title {
  558. height: 60px;
  559. select {
  560. height: 60px;
  561. border: none;
  562. outline: none;
  563. -webkit-appearance: none;
  564. appearance: none;
  565. font-size: 14px;
  566. font-weight: bold;
  567. background: url("@/assets/images/sanjiao.png") no-repeat right center;
  568. padding-right: 20px;
  569. }
  570. div {
  571. height: 60px;
  572. font-size: 14px;
  573. font-weight: bold;
  574. line-height: 60px;
  575. }
  576. }
  577. ul {
  578. padding: 0;
  579. overflow: hidden;
  580. margin: 0;
  581. li {
  582. list-style: none;
  583. min-width: 285px;
  584. box-sizing: border-box;
  585. margin: 0 20px 20px 0;
  586. background: #eff6ff;
  587. float: left;
  588. overflow: hidden;
  589. padding: 20px;
  590. color: #333333;
  591. border-radius: 10px;
  592. .label {
  593. font-size: 14px;
  594. }
  595. .label::before {
  596. width: 10px;
  597. height: 10px;
  598. content: "";
  599. border-radius: 50%;
  600. background: #0084ff;
  601. display: inline-block;
  602. margin-right: 10px;
  603. }
  604. .num {
  605. margin-top: 10px;
  606. font-size: 24px;
  607. font-weight: bold;
  608. }
  609. }
  610. //#F5F3FF #9E64ED
  611. .theme2 {
  612. background: #f5f3ff;
  613. .label::before {
  614. background: #9e64ed;
  615. }
  616. }
  617. //#FFF1E1 #FF9315
  618. .theme3 {
  619. background: #fff1e1;
  620. .label::before {
  621. background: #ff9315;
  622. }
  623. }
  624. //#E2FBE8 #39C55A
  625. .theme4 {
  626. background: #e2fbe8;
  627. .label::before {
  628. background: #39c55a;
  629. }
  630. }
  631. .theme5 {
  632. background: #ffebe9;
  633. .label::before {
  634. background: #f94539;
  635. }
  636. }
  637. .theme6 {
  638. background: #e4f9f9;
  639. .label::before {
  640. background: #53cbcb;
  641. }
  642. }
  643. .multi-data {
  644. .label::before {
  645. display: none;
  646. }
  647. .label {
  648. font-size: 14px;
  649. font-weight: bold;
  650. color: #333;
  651. margin-bottom: 8px;
  652. }
  653. .num-warp {
  654. overflow: hidden;
  655. .num-box {
  656. float: left;
  657. min-width: 80px;
  658. margin-right: 20px;
  659. .num-small {
  660. font-size: 16px;
  661. font-weight: bold;
  662. margin-bottom: 8px;
  663. }
  664. .label-small {
  665. color: #666;
  666. font-size: 14px;
  667. }
  668. }
  669. }
  670. }
  671. }
  672. }
  673. .by-search {
  674. display: flex;
  675. justify-content: space-between;
  676. margin-bottom: 10px;
  677. .more-icon {
  678. float: right;
  679. cursor: pointer;
  680. // line-height: 32px;
  681. text-align: center;
  682. margin-left: 5px;
  683. }
  684. }
  685. .by-dropdown {
  686. position: relative;
  687. text-align: left;
  688. height: 32px;
  689. z-index: 1010;
  690. padding: 0 10px;
  691. transition: all 0.5s ease;
  692. cursor: pointer;
  693. line-height: 32px;
  694. .by-dropdown-title {
  695. font-size: 14px;
  696. background-color: #fff;
  697. }
  698. ul {
  699. position: absolute;
  700. left: 0;
  701. top: 32px;
  702. padding: 0;
  703. margin: 0;
  704. z-index: 100;
  705. display: none;
  706. white-space: nowrap;
  707. min-width: 80px;
  708. li {
  709. list-style: none;
  710. font-size: 12px;
  711. height: 30px;
  712. padding: 0 10px;
  713. text-align: left;
  714. line-height: 30px;
  715. }
  716. li:hover {
  717. background-color: #eff6ff;
  718. color: #0084ff;
  719. }
  720. }
  721. }
  722. .by-dropdown::before {
  723. display: block;
  724. width: 1px;
  725. content: " ";
  726. position: absolute;
  727. height: 14px;
  728. top: 8px;
  729. background-color: #ddd;
  730. right: 0;
  731. z-index: 1011;
  732. }
  733. .by-dropdown:hover {
  734. background: #ffffff;
  735. border-radius: 2px 2px 2px 2px;
  736. opacity: 1;
  737. ul {
  738. background: #ffffff;
  739. box-shadow: 0px 2px 16px 1px rgba(0, 0, 0, 0.06);
  740. border-radius: 2px 2px 2px 2px;
  741. opacity: 1;
  742. display: block;
  743. text-align: left;
  744. }
  745. }
  746. .header-actions {
  747. flex: 1;
  748. overflow-x: auto;
  749. padding: 20px;
  750. background: #fff;
  751. margin-bottom: 20px;
  752. .overflow-box {
  753. :deep() .el-button:nth-child(1) {
  754. margin-left: 10px;
  755. }
  756. }
  757. }
  758. .table-list-container {
  759. background: #fff;
  760. padding: 15px;
  761. .table-pagination {
  762. padding-top: 20px;
  763. }
  764. .header {
  765. display: flex;
  766. padding-bottom: 20px;
  767. }
  768. .el-table {
  769. :deep() th {
  770. font-size: 14px;
  771. }
  772. :deep() td {
  773. font-size: 14px;
  774. }
  775. }
  776. }
  777. .by-dropdown-lists {
  778. max-height: 50vh;
  779. overflow-y: auto;
  780. line-height: 1;
  781. }
  782. :deep(.selectTime .el-input__wrapper) {
  783. box-shadow: none;
  784. }
  785. :deep(.selectTime .el-input__inner) {
  786. color: #000 !important;
  787. font-size: 14px !important;
  788. }
  789. :deep(.selectTime .el-input .el-input__icon) {
  790. color: #000 !important;
  791. font-size: 14px !important;
  792. }
  793. </style>