project-list.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. <template>
  2. <div v-loading="!isAfterRender" element-loading-text="加载中..." class="hc-full">
  3. <hc-table
  4. v-if="isAfterRender" :column="tableColumn" :datas="tableData" :index-style="{ width: 60 }" is-check
  5. :check-style="{ fixed: true, width: 29 }" class="hc-project-list-table" @selection-change="tableCheckChange"
  6. >
  7. <template #key1="{ row }">
  8. <el-link type="primary" @click="rowNameClick(row)">{{ row.key1 }}</el-link>
  9. </template>
  10. <template #action="{ row }">
  11. <el-link v-if="isAdminAuth" type="warning" @click="completion(row)">项目完成情况</el-link>
  12. <el-link type="primary" @click="examine(row)">查看</el-link>
  13. <el-link v-if="isAdminAuth" v-del-com:[delTableItem]="row" type="danger">删除</el-link>
  14. <el-link v-yes-com:[deriveTableItem]="row" type="success">导出</el-link>
  15. </template>
  16. </hc-table>
  17. <!-- 查看详情 -->
  18. <hc-drawer v-model="isDrawer" to-id="hc-main-box" is-close>
  19. <hc-card class="hc-project-list-drawer">
  20. <template #header>
  21. <div class="flex-1 text-center text-[24px] font-bold">项目详情</div>
  22. </template>
  23. <hc-info-table>
  24. <tr>
  25. <hc-info-table-td is-title width="30px" center>项目阶段</hc-info-table-td>
  26. <hc-info-table-td center>开工项目</hc-info-table-td>
  27. <hc-info-table-td is-title width="30px" center>项目类型</hc-info-table-td>
  28. <hc-info-table-td center>高速公路</hc-info-table-td>
  29. </tr>
  30. <tr>
  31. <hc-info-table-td is-title width="30px" center>项目名称</hc-info-table-td>
  32. <hc-info-table-td center>成渝高速</hc-info-table-td>
  33. <hc-info-table-td is-title width="30px" center>建设规模</hc-info-table-td>
  34. <hc-info-table-td center>你猜</hc-info-table-td>
  35. </tr>
  36. <tr>
  37. <hc-info-table-td is-title width="30px" center>开 工 年</hc-info-table-td>
  38. <hc-info-table-td center>2023</hc-info-table-td>
  39. <hc-info-table-td is-title width="30px" center>完 工 年</hc-info-table-td>
  40. <hc-info-table-td center>2024</hc-info-table-td>
  41. </tr>
  42. <tr>
  43. <hc-info-table-td is-title width="30px" center>牵头单位</hc-info-table-td>
  44. <hc-info-table-td center>重庆建设集团</hc-info-table-td>
  45. <hc-info-table-td is-title width="30px" center rowspan="2">配合单位</hc-info-table-td>
  46. <hc-info-table-td center rowspan="2">你猜</hc-info-table-td>
  47. </tr>
  48. <tr>
  49. <hc-info-table-td is-title width="30px" center>责任单位</hc-info-table-td>
  50. <hc-info-table-td center>你猜啊</hc-info-table-td>
  51. </tr>
  52. </hc-info-table>
  53. <div class="hc-project-list-drawer-year">
  54. <el-scrollbar>
  55. <div class="relative p-2 pt-6">
  56. <hc-card-item class="year-detail">
  57. <template #header>
  58. <div class="flex-1 text-center text-[14px]">
  59. <HcDropdown v-model="yearKey" :datas="yearData" />
  60. </div>
  61. </template>
  62. <el-table :data="tableYearData" border class="w-full" :span-method="tableYearMethod">
  63. <el-table-column prop="quarter" label="季度" width="100" align="center" />
  64. <el-table-column prop="month" class-name="line" width="120" align="center">
  65. <template #header>
  66. <div class="hc-table-th-line">
  67. <span class="left">月份</span>
  68. <span class="right">完成情况</span>
  69. </div>
  70. </template>
  71. </el-table-column>
  72. <el-table-column prop="key1" label="计划完成投资额(亿元)" width="100" align="center" />
  73. <el-table-column prop="key2" label="投资完成额(亿元)" width="100" align="center" />
  74. <el-table-column prop="key3" label="投资未完成额(亿元)" width="100" align="center" />
  75. <el-table-column prop="key4" label="全年目标" width="100" align="center" />
  76. <el-table-column prop="key5" label="工作计划" width="100" align="center" />
  77. <el-table-column prop="key6" label="累计进展计划" align="center" />
  78. <el-table-column prop="key7" label="形象进度百分比(%)" width="100" align="center" />
  79. <el-table-column prop="key8" label="工作计划进展计划" align="center" />
  80. </el-table>
  81. <hc-info-table class="mt-[-1px]">
  82. <tr>
  83. <hc-info-table-td is-title width="130px" center>该年累计完成投资(亿元)</hc-info-table-td>
  84. <hc-info-table-td center>14.1</hc-info-table-td>
  85. <hc-info-table-td is-title width="130px" center>该年力争完成投资(亿元)</hc-info-table-td>
  86. <hc-info-table-td center>13.2</hc-info-table-td>
  87. <hc-info-table-td is-title width="130px" center>该年累计未完成投资(亿元)</hc-info-table-td>
  88. <hc-info-table-td center>12.3</hc-info-table-td>
  89. </tr>
  90. </hc-info-table>
  91. <hc-info-table class="mt-[-1px]">
  92. <tr>
  93. <hc-info-table-td is-title width="30px" center>存在问题</hc-info-table-td>
  94. <hc-info-table-td center>-</hc-info-table-td>
  95. <hc-info-table-td is-title width="30px" center>工作问题</hc-info-table-td>
  96. <hc-info-table-td center>-</hc-info-table-td>
  97. </tr>
  98. <tr>
  99. <hc-info-table-td is-title width="30px" center>填报单位</hc-info-table-td>
  100. <hc-info-table-td center>-</hc-info-table-td>
  101. <hc-info-table-td is-title width="30px" center>联系人</hc-info-table-td>
  102. <hc-info-table-td center>-</hc-info-table-td>
  103. </tr>
  104. </hc-info-table>
  105. </hc-card-item>
  106. </div>
  107. </el-scrollbar>
  108. </div>
  109. </hc-card>
  110. </hc-drawer>
  111. <!-- 项目完成情况 -->
  112. <hc-drawer v-model="isCompletionDrawer" to-id="hc-main-box" is-close>
  113. <hc-card class="hc-project-list-drawer" is-action-btn>
  114. <template #header>
  115. <div class="flex-1 text-center text-[24px] font-bold">项目完成情况</div>
  116. </template>
  117. <hc-info-table>
  118. <tr>
  119. <hc-info-table-td is-title width="30px" center>项目名称</hc-info-table-td>
  120. <hc-info-table-td center>成渝高速</hc-info-table-td>
  121. <hc-info-table-td is-title width="30px" center>项目类型</hc-info-table-td>
  122. <hc-info-table-td center>高速公路</hc-info-table-td>
  123. </tr>
  124. </hc-info-table>
  125. <div class="hc-project-list-drawer-year detail">
  126. <el-scrollbar>
  127. <div class="relative p-2 pt-6">
  128. <hc-card-item class="year-detail">
  129. <template #header>
  130. <div class="flex-1 text-center text-[14px]">
  131. <HcDropdown v-model="yearKey" :datas="yearData" />
  132. </div>
  133. </template>
  134. <el-table :data="tableYearData1" border class="w-full" :span-method="tableYearMethod1">
  135. <el-table-column prop="quarter" label="季度" width="100" align="center" />
  136. <el-table-column prop="month" class-name="line" width="120" align="center">
  137. <template #header>
  138. <div class="hc-table-th-line">
  139. <span class="left">月份</span>
  140. <span class="right">完成情况</span>
  141. </div>
  142. </template>
  143. </el-table-column>
  144. <el-table-column prop="key1" label="计划完成投资额(亿元)" width="100" align="center">
  145. <template #default="{ row }">
  146. <hc-body>
  147. <hc-table-input v-model="row.key1" disabled />
  148. </hc-body>
  149. </template>
  150. </el-table-column>
  151. <el-table-column prop="key2" label="投资完成额(亿元)" width="100" align="center">
  152. <template #default="{ row }">
  153. <hc-body>
  154. <hc-table-input v-model="row.key2" />
  155. </hc-body>
  156. </template>
  157. </el-table-column>
  158. <el-table-column prop="key3" label="累计投资完成额(亿元)" width="100" align="center">
  159. <template #default="{ row }">
  160. <hc-body>
  161. <hc-table-input v-model="row.key3" disabled />
  162. </hc-body>
  163. </template>
  164. </el-table-column>
  165. <el-table-column prop="key5" label="工作计划" width="100" align="center">
  166. <template #default="{ row }">
  167. <hc-body>
  168. <hc-table-input v-model="row.key5" type="textarea" disabled />
  169. </hc-body>
  170. </template>
  171. </el-table-column>
  172. <el-table-column prop="key6" label="工作计划进展情况" align="center">
  173. <template #default="{ row }">
  174. <hc-body>
  175. <hc-table-input v-model="row.key6" type="textarea" />
  176. </hc-body>
  177. </template>
  178. </el-table-column>
  179. <el-table-column prop="key7" label="累计进展情况" align="center">
  180. <template #default="{ row }">
  181. <hc-body>
  182. <hc-table-input v-model="row.key7" type="textarea" />
  183. </hc-body>
  184. </template>
  185. </el-table-column>
  186. <el-table-column prop="key8" label="形象进度百分比(%)" width="100" align="center">
  187. <template #default="{ row }">
  188. <hc-body>
  189. <hc-table-input v-model="row.key8" />
  190. </hc-body>
  191. </template>
  192. </el-table-column>
  193. </el-table>
  194. <hc-info-table class="mt-[-1px]">
  195. <tr>
  196. <hc-info-table-td is-title width="30px" center>存在问题</hc-info-table-td>
  197. <hc-info-table-td center>
  198. <el-input v-model="testValue" type="textarea" />
  199. </hc-info-table-td>
  200. <hc-info-table-td is-title width="30px" center>工作建议</hc-info-table-td>
  201. <hc-info-table-td center>
  202. <el-input v-model="testValue" type="textarea" />
  203. </hc-info-table-td>
  204. </tr>
  205. <tr>
  206. <hc-info-table-td is-title width="30px" center>填报单位</hc-info-table-td>
  207. <hc-info-table-td center>
  208. <el-input v-model="testValue" />
  209. </hc-info-table-td>
  210. <hc-info-table-td is-title width="30px" center>联系人</hc-info-table-td>
  211. <hc-info-table-td center>
  212. <el-input v-model="testValue" />
  213. </hc-info-table-td>
  214. </tr>
  215. </hc-info-table>
  216. </hc-card-item>
  217. </div>
  218. </el-scrollbar>
  219. </div>
  220. <template #action>
  221. <el-button type="info" @click="isCompletionDrawer = false">取消</el-button>
  222. <el-button type="warning" @click="isCompletionDrawer = false">保存</el-button>
  223. </template>
  224. </hc-card>
  225. </hc-drawer>
  226. </div>
  227. </template>
  228. <script setup>
  229. import { onMounted, ref, watch } from 'vue'
  230. const props = defineProps({
  231. isAdmin: {
  232. type: Boolean,
  233. default: false,
  234. },
  235. })
  236. //事件
  237. const emit = defineEmits(['tap', 'completion', 'examine', 'del', 'export', 'check'])
  238. //监听权限
  239. const isAdminAuth = ref(props.isAdmin)
  240. watch(() => props.isAdmin, (admin) => {
  241. isAdminAuth.value = admin
  242. })
  243. //渲染完成
  244. const isAfterRender = ref(false)
  245. onMounted(() => {
  246. //表格太复杂,渲染较慢,等页面先加载完成,再渲染表格,不然会卡住一下不动。
  247. //因为表头涉及到年份,如果年份很多,那么会更卡。
  248. setTimeout(() => {
  249. isAfterRender.value = true
  250. }, 200)
  251. })
  252. //表头
  253. const tableColumn = ref([
  254. { key: 'key1', name: '项目名称' },
  255. { key: 'key2', name: '项目类型' },
  256. { key: 'key3', name: '建设规模' },
  257. { key: 'key4', name: '开工年' },
  258. { key: 'key5', name: '完工年' },
  259. { key: 'key6', name: '牵头单位' },
  260. { key: 'key7', name: '配合单位' },
  261. { key: 'key8', name: '责任单位' },
  262. {
  263. name: '2024年',
  264. children: [
  265. { key: 'key9', name: '全年投资(亿元)' },
  266. { key: 'key10', name: '预计一季度完成投资比例(亿元)' },
  267. { key: 'key11', name: '预计二季度完成投资比例(亿元)' },
  268. { key: 'key12', name: '预计三季度完成投资比例(亿元)' },
  269. { key: 'key13', name: '预计四季度完成投资比例(亿元)' },
  270. {
  271. name: '投资完成金额(亿元)',
  272. children: [
  273. {
  274. name: '一季度',
  275. children: [
  276. { key: 'january', name: '1月' },
  277. { key: 'february', name: '2月' },
  278. { key: 'march', name: '3月' },
  279. ],
  280. },
  281. {
  282. name: '二季度',
  283. children: [
  284. { key: 'april', name: '4月' },
  285. { key: 'may', name: '5月' },
  286. { key: 'june', name: '6月' },
  287. ],
  288. },
  289. {
  290. name: '三季度',
  291. children: [
  292. { key: 'july', name: '7月' },
  293. { key: 'august', name: '8月' },
  294. { key: 'september', name: '9月' },
  295. ],
  296. },
  297. {
  298. name: '四季度',
  299. children: [
  300. { key: 'october', name: '10月' },
  301. { key: 'november', name: '11月' },
  302. { key: 'december', name: '12月' },
  303. ],
  304. },
  305. ],
  306. },
  307. { key: 'key15', name: '当年累计完成投资(亿元)' },
  308. { key: 'key16', name: '开工累计完成投资(亿元)' },
  309. { key: 'key17', name: '全年目标' },
  310. { key: 'key18', name: '一季度工作计划' },
  311. { key: 'key19', name: '二季度工作计划' },
  312. { key: 'key20', name: '三季度工作计划' },
  313. { key: 'key21', name: '四季度工作计划' },
  314. {
  315. name: '工作计划完成情况',
  316. children: [
  317. {
  318. name: '1月',
  319. children: [
  320. { key: 'january1', name: '累计进展情况' },
  321. { key: 'january2', name: '当月进展情况' },
  322. { key: 'january3', name: '形象进度百分比' },
  323. ],
  324. },
  325. {
  326. name: '2月',
  327. children: [
  328. { key: 'february1', name: '累计进展情况' },
  329. { key: 'february2', name: '当月进展情况' },
  330. { key: 'february3', name: '形象进度百分比' },
  331. ],
  332. },
  333. {
  334. name: '3月',
  335. children: [
  336. { key: 'march1', name: '累计进展情况' },
  337. { key: 'march2', name: '当月进展情况' },
  338. { key: 'march3', name: '形象进度百分比' },
  339. ],
  340. },
  341. {
  342. name: '4月',
  343. children: [
  344. { key: 'april1', name: '累计进展情况' },
  345. { key: 'april2', name: '当月进展情况' },
  346. { key: 'april3', name: '形象进度百分比' },
  347. ],
  348. },
  349. {
  350. name: '5月',
  351. children: [
  352. { key: 'may1', name: '累计进展情况' },
  353. { key: 'may2', name: '当月进展情况' },
  354. { key: 'may3', name: '形象进度百分比' },
  355. ],
  356. },
  357. {
  358. name: '6月',
  359. children: [
  360. { key: 'june1', name: '累计进展情况' },
  361. { key: 'june2', name: '当月进展情况' },
  362. { key: 'june3', name: '形象进度百分比' },
  363. ],
  364. },
  365. {
  366. name: '7月',
  367. children: [
  368. { key: 'july1', name: '累计进展情况' },
  369. { key: 'july2', name: '当月进展情况' },
  370. { key: 'july3', name: '形象进度百分比' },
  371. ],
  372. },
  373. {
  374. name: '8月',
  375. children: [
  376. { key: 'august1', name: '累计进展情况' },
  377. { key: 'august2', name: '当月进展情况' },
  378. { key: 'august3', name: '形象进度百分比' },
  379. ],
  380. },
  381. {
  382. name: '9月',
  383. children: [
  384. { key: 'september1', name: '累计进展情况' },
  385. { key: 'september2', name: '当月进展情况' },
  386. { key: 'september3', name: '形象进度百分比' },
  387. ],
  388. },
  389. {
  390. name: '10月',
  391. children: [
  392. { key: 'october1', name: '累计进展情况' },
  393. { key: 'october2', name: '当月进展情况' },
  394. { key: 'october3', name: '形象进度百分比' },
  395. ],
  396. },
  397. {
  398. name: '11月',
  399. children: [
  400. { key: 'november1', name: '累计进展情况' },
  401. { key: 'november2', name: '当月进展情况' },
  402. { key: 'november3', name: '形象进度百分比' },
  403. ],
  404. },
  405. {
  406. name: '12月',
  407. children: [
  408. { key: 'december1', name: '累计进展情况' },
  409. { key: 'december2', name: '当月进展情况' },
  410. { key: 'december3', name: '形象进度百分比' },
  411. ],
  412. },
  413. ],
  414. },
  415. { key: 'key23', name: '存在问题' },
  416. { key: 'key24', name: '工作建议' },
  417. { key: 'key25', name: '填报单位' },
  418. { key: 'key26', name: '联系人' },
  419. ],
  420. },
  421. { key: 'action', name: '操作', width: isAdminAuth.value ? 220 : 100, fixed:'right', align: 'center' },
  422. ])
  423. //表格数据
  424. const tableData = ref([
  425. { id: 1, key1: '名称1', key2: '-', key3: '-' },
  426. { id: 2, key1: '名称2', key2: '-', key3: '-' },
  427. { id: 3, key1: '名称3', key2: '-', key3: '-' },
  428. { id: 4, key1: '名称4', key2: '-', key3: '-' },
  429. { id: 5, key1: '名称5', key2: '-', key3: '-' },
  430. ])
  431. //表格被选择
  432. const tableCheckKeys = ref([])
  433. const tableCheckChange = (rows) => {
  434. tableCheckKeys.value = rows
  435. emit('check', rows)
  436. }
  437. //项目名称被点击
  438. const rowNameClick = (row) => {
  439. emit('tap', row)
  440. }
  441. //项目完成情况
  442. const isCompletionDrawer = ref(false)
  443. const completion = (row) => {
  444. isCompletionDrawer.value = true
  445. emit('completion', row)
  446. }
  447. //查看
  448. const isDrawer = ref(false)
  449. const examine = (row) => {
  450. isDrawer.value = true
  451. emit('examine', row)
  452. }
  453. //删除
  454. const delTableItem = ({ item }, resolve) => {
  455. console.log('我被执行了', item)
  456. //这里可以写一些操作,下面是模拟3秒关闭
  457. setTimeout(() => {
  458. resolve()
  459. emit('del', item)
  460. }, 3000)
  461. }
  462. //导出数据
  463. const deriveTableItem = ({ item }, resolve) => {
  464. console.log('我被执行了', item)
  465. //这里可以写一些操作,下面是模拟3秒关闭
  466. setTimeout(() => {
  467. resolve()
  468. emit('export', item)
  469. }, 3000)
  470. }
  471. //批量删除
  472. const batchRemove = () => {
  473. if (!isAdminAuth.value) return
  474. const rows = tableCheckKeys.value
  475. console.log('批量删除', rows)
  476. }
  477. //批量导出
  478. const batchExport = () => {
  479. const rows = tableCheckKeys.value
  480. console.log('批量导出', rows)
  481. }
  482. //年数据
  483. const yearKey = ref('2023')
  484. const yearData = ref([
  485. { key: '2023', label: '2023年' },
  486. { key: '2024', label: '2024年' },
  487. ])
  488. //年份表格数据
  489. const tableYearData = ref([
  490. { quarter: '一季度', month: '1月', key1: '13', key2: '1.1', key3: '11.9' },
  491. { quarter: '一季度', month: '2月', key1: '13', key2: '1.2', key3: '10.7' },
  492. { quarter: '一季度', month: '3月', key1: '13', key2: '1.3', key3: '9.4' },
  493. { quarter: '二季度', month: '4月', key1: '14', key2: '1.4', key3: '1.1' },
  494. { quarter: '二季度', month: '5月', key1: '14', key2: '1.5', key3: '1.2' },
  495. { quarter: '二季度', month: '6月', key1: '14', key2: '1.6', key3: '1.3' },
  496. { quarter: '三季度', month: '7月', key1: '15', key2: '1.7', key3: '1.1' },
  497. { quarter: '三季度', month: '8月', key1: '15', key2: '1.8', key3: '1.2' },
  498. { quarter: '三季度', month: '9月', key1: '15', key2: '1.9', key3: '1.3' },
  499. { quarter: '四季度', month: '10月', key1: '16', key2: '2.0', key3: '1.1' },
  500. { quarter: '四季度', month: '11月', key1: '16', key2: '2.1', key3: '1.2' },
  501. { quarter: '四季度', month: '12月', key1: '16', key2: '2.1', key3: '1.3' },
  502. ])
  503. //合并列或行
  504. const tableYearMethod = ({ rowIndex, columnIndex }) => {
  505. return setSpanMethod(columnIndex, rowIndex)
  506. }
  507. //年份表格数据
  508. const tableYearData1 = ref([
  509. { quarter: '一季度', month: '1月', key1: '13', key2: '1.1', key3: '11.9' },
  510. { quarter: '一季度', month: '2月', key1: '13', key2: '1.2', key3: '10.7' },
  511. { quarter: '一季度', month: '3月', key1: '13', key2: '1.3', key3: '9.4' },
  512. { quarter: '二季度', month: '4月', key1: '14', key2: '1.4', key3: '1.1' },
  513. { quarter: '二季度', month: '5月', key1: '14', key2: '1.5', key3: '1.2' },
  514. { quarter: '二季度', month: '6月', key1: '14', key2: '1.6', key3: '1.3' },
  515. { quarter: '三季度', month: '7月', key1: '15', key2: '1.7', key3: '1.1' },
  516. { quarter: '三季度', month: '8月', key1: '15', key2: '1.8', key3: '1.2' },
  517. { quarter: '三季度', month: '9月', key1: '15', key2: '1.9', key3: '1.3' },
  518. { quarter: '四季度', month: '10月', key1: '16', key2: '2.0', key3: '1.1' },
  519. { quarter: '四季度', month: '11月', key1: '16', key2: '2.1', key3: '1.2' },
  520. { quarter: '四季度', month: '12月', key1: '16', key2: '2.1', key3: '1.3' },
  521. ])
  522. //合并列或行
  523. const tableYearMethod1 = ({ rowIndex, columnIndex }) => {
  524. return setSpanMethod(columnIndex, rowIndex, false)
  525. }
  526. const testValue = ref('')
  527. const setSpanMethod = (column, row, isAllYear = true) => {
  528. if (column === 0) { //第一列
  529. const rows = [0, 3, 6, 9], irows = [1, 2, 4, 5, 7, 8, 10, 11]
  530. if (rows.indexOf(row) !== -1) {
  531. //主要季度隐藏
  532. return { rowspan: 3, colspan: 1 }
  533. } else if (irows.indexOf(row) !== -1) {
  534. //非主要的季度隐藏
  535. return { rowspan: 0, colspan: 0 }
  536. } else {
  537. return { rowspan: 1, colspan: 1 }
  538. }
  539. } else if (column === 2) { //第三列
  540. const rows = [0, 3, 6, 9], irows = [1, 2, 4, 5, 7, 8, 10, 11]
  541. if (rows.indexOf(row) !== -1) {
  542. //主要隐藏
  543. return { rowspan: 3, colspan: 1 }
  544. } else if (irows.indexOf(row) !== -1) {
  545. //非主要的隐藏
  546. return { rowspan: 0, colspan: 0 }
  547. } else {
  548. return { rowspan: 1, colspan: 1 }
  549. }
  550. } else if (column === 5) { //第六列
  551. if (isAllYear) {
  552. if (row === 0) {
  553. return { rowspan: 12, colspan: 1 }
  554. } else if (row > 0 && row < 12) {
  555. return { rowspan: 0, colspan: 0 }
  556. } else {
  557. return { rowspan: 1, colspan: 1 }
  558. }
  559. } else {
  560. const rows = [0, 3, 6, 9], irows = [1, 2, 4, 5, 7, 8, 10, 11]
  561. if (rows.indexOf(row) !== -1) {
  562. //主要隐藏
  563. return { rowspan: 3, colspan: 1 }
  564. } else if (irows.indexOf(row) !== -1) {
  565. //非主要的隐藏
  566. return { rowspan: 0, colspan: 0 }
  567. } else {
  568. return { rowspan: 1, colspan: 1 }
  569. }
  570. }
  571. } else if (column === 6) { //第七列
  572. if (isAllYear) {
  573. const rows = [0, 3, 6, 9], irows = [1, 2, 4, 5, 7, 8, 10, 11]
  574. if (rows.indexOf(row) !== -1) {
  575. //主要隐藏
  576. return { rowspan: 3, colspan: 1 }
  577. } else if (irows.indexOf(row) !== -1) {
  578. //非主要的隐藏
  579. return { rowspan: 0, colspan: 0 }
  580. } else {
  581. return { rowspan: 1, colspan: 1 }
  582. }
  583. }
  584. }
  585. }
  586. defineExpose({
  587. batchRemove,
  588. batchExport,
  589. })
  590. </script>
  591. <style lang="scss">
  592. .hc-project-list-table .el-table[hc].new {
  593. --el-table-header-bg-color: #101010;
  594. --el-table-header-text-color: #fff;
  595. --el-table-text-color: #101010;
  596. thead.is-group th.el-table__cell {
  597. background: var(--el-table-header-bg-color);
  598. }
  599. thead .el-table-fixed-column--left.el-table__cell,
  600. thead .el-table-fixed-column--right.el-table__cell {
  601. background: var(--el-table-header-bg-color) !important;
  602. }
  603. tbody .el-table-fixed-column--left.el-table__cell,
  604. tbody .el-table-fixed-column--right.el-table__cell {
  605. background: var(--el-table-tr-bg-color) !important;
  606. }
  607. .el-table__body tr.current-row>td.el-table__cell {
  608. background-color: var(--el-table-current-row-bg-color) !important;
  609. }
  610. }
  611. .hc-project-list-drawer-year {
  612. position: relative;
  613. border: 1px solid #dddddd;
  614. border-top: 0;
  615. height: calc(100% - 170px);
  616. &.detail {
  617. height: calc(100% - 34px);
  618. }
  619. .year-detail {
  620. padding: 14px;
  621. background: #f7f7f7;
  622. border-radius: 5px;
  623. .hc-card-item-header {
  624. border-bottom: 1px solid #ecebeb;
  625. padding-bottom: 10px;
  626. .item-header {
  627. justify-content: center;
  628. }
  629. }
  630. .el-table {
  631. --el-table-border-color: #dcdcdc;
  632. --el-table-header-text-color: #101010;
  633. --el-table-row-hover-bg-color: transparent;
  634. }
  635. .el-table th.el-table__cell.line {
  636. padding: 0;
  637. height: 100%;
  638. .cell {
  639. padding: 0;
  640. height: 100%;
  641. display: contents;
  642. }
  643. .hc-table-th-line {
  644. position: relative;
  645. height: 100%;
  646. font-size: 14px;
  647. display: contents;
  648. .left {
  649. position: absolute;
  650. bottom: 6px;
  651. left: 10px;
  652. }
  653. .right {
  654. position: absolute;
  655. top: 6px;
  656. right: 6px;
  657. font-size: 13px;
  658. }
  659. &::after {
  660. content: '';
  661. position: absolute;
  662. top: 36px;
  663. left: -20px;
  664. width: 180px;
  665. height: 1px;
  666. background: #dcdcdc;
  667. transform: rotate(27deg);
  668. }
  669. }
  670. }
  671. .el-table .el-table__cell .cell {
  672. .hc-new-main-body_content {
  673. padding: 4px !important;
  674. .el-input, .el-textarea {
  675. height: 100%;
  676. .el-input__inner {
  677. text-align: center;
  678. }
  679. .el-textarea__inner {
  680. height: 100%;
  681. }
  682. }
  683. }
  684. }
  685. }
  686. }
  687. </style>