myAudit.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. <template>
  2. <div class="myAudit">
  3. <el-collapse value="1">
  4. <el-collapse-item title="我的待办" name="1">
  5. <template slot="title">
  6. <svg-icon icon-class="我的待办" />
  7. <span class="myLine">我的待办</span>
  8. <img
  9. src="@/static/images/refresh.svg"
  10. alt=""
  11. class="panel-icon el-icon-refresh new-ref"
  12. @click.stop="refresh"
  13. >
  14. </template>
  15. <div class="taskType">
  16. <div
  17. v-for="(item, index) in itemList"
  18. :key="index"
  19. :class="selectTask==item.key?'isborder task':'task'"
  20. @click="typeChange(item, index)"
  21. >
  22. <span :class="selectTask==item.key?'selectTaskName':'taskName'">{{ item.name }}</span>
  23. <span class="taskQuan">{{ '(' + item.quantity + ')' }}</span>
  24. </div>
  25. </div>
  26. <div>
  27. <!-- v-if="itemList && itemList.length > 0"-->
  28. <el-row v-if="itemList && itemList.length > 0" class="comp-box">
  29. <el-col :span="24">
  30. <!-- tableDataList-->
  31. <el-table v-loading="loading" :header-cell-style="{ background: 'rgba(0,0,0,0)!important' }" :data="tableDataList" row-class-name="g_table_row">
  32. <el-table-column align="center" type="index" width="30" />
  33. <el-table-column label="标题" width="150">
  34. <template scope="scope">
  35. <el-tooltip class="item" effect="dark" :content="scope.row.title" placement="top">
  36. <div class="chaochuyingcang">
  37. <el-link type="primary" :underline="false" @click="rowClick(scope.row)">
  38. <div class="chaochuyingcang" style="width: 150px">{{ scope.row.title }}</div>
  39. </el-link>
  40. </div>
  41. </el-tooltip>
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="来源" prop="srcUserName" />
  45. <el-table-column align="center" header-align="center" label="接收时间" prop="createdAt" width="180" />
  46. </el-table>
  47. <div class="table-page">
  48. <div class="unSelect" @mouseleave="handleLeave" @mouseover="handleEnter" @click.stop="morePc">
  49. 全部<img :src="isSelectAll?selectAll:unSelectAll" class="iconRight">
  50. </div>
  51. <el-pagination
  52. :current-page.sync="currentPage"
  53. :page-size="tablePageSize"
  54. layout="total, prev, pager, next"
  55. :total="allpage"
  56. @current-change="handlePageChange"
  57. />
  58. </div>
  59. </el-col>
  60. </el-row>
  61. <el-row v-if="!itemList || itemList.length <= 0" class="comp-box" style="padding-top: 90px; text-align: center; font-size: 16px;">
  62. 暂无消息
  63. </el-row>
  64. </div>
  65. </el-collapse-item>
  66. </el-collapse>
  67. <el-dialog
  68. append-to-body
  69. :title="dialogTitle"
  70. :visible.sync="dialogVisible"
  71. width="75%"
  72. top="50px"
  73. >
  74. <!-- <company-form v-if="dialogVisible" ref="companyForm" :is-handle="true" :is-view="false" @handleClose="handleClose" />-->
  75. <indexCompanyShow v-if="dialogVisible" ref="companyForm" :is-handle="true" :is-view="false" @handleClose="handleClose" />
  76. </el-dialog>
  77. <apply-payment-confirm ref="applyPaymentConfirm" @getData="getDataList()" />
  78. <apply-check-in ref="applyCheckIn" @getData="getDataList()" />
  79. <apply-contract ref="applyContract" @getData="getDataList()" />
  80. <apply-receivables-adjust ref="applyReceivablesAdjust" @getData="getDataList()" />
  81. <apply-invoice-red ref="applyInvoiceRed" @getData="getDataList()" />
  82. <apply-buying-more ref="applyBuyingMore" @getData="getDataList()" />
  83. <apply-finance ref="applyFinance" @getData="getDataList()" />
  84. </div>
  85. </template>
  86. <script>
  87. // import BasePanel from '../base/baseListPanel'
  88. import Base from '@/views/base/base'
  89. import BaseData from '@/views/base/baseData'
  90. // import CompanyForm from '@/views/company/companyForm.vue'
  91. import indexCompanyShow from '@/views/prove/indexCompanyShow'
  92. import myBus from '@/static/utils/myBus'
  93. import applyPaymentConfirm from '@/views/workflow/components/myProcess/applyPaymentConfirm.vue'
  94. import applyCheckIn from '@/views/workflow/components/myProcess/applyCheckIn.vue'
  95. import applyContract from '@/views/workflow/components/myProcess/applyContract.vue'
  96. import applyReceivablesAdjust from '@/views/workflow/components/myProcess/applyReceivablesAdjust.vue'
  97. import applyInvoiceRed from '@/views/workflow/components/myProcess/applyInvoiceRed.vue'
  98. import applyBuyingMore from '@/views/workflow/components/myProcess/applyBuyingMore.vue'
  99. import applyFinance from '@/views/workflow/components/myProcess/applyFinance.vue'
  100. export default {
  101. name: 'PendingAudit',
  102. components: { applyFinance, applyBuyingMore, applyInvoiceRed, applyReceivablesAdjust, applyContract, applyCheckIn,
  103. applyPaymentConfirm, indexCompanyShow },
  104. // extends: BasePanel,
  105. mixins: [Base, BaseData],
  106. data() {
  107. return {
  108. loading: false,
  109. tablePageSize: 5,
  110. tableDataList: [],
  111. selectTask: -1,
  112. selectUrl: '',
  113. itemList: [],
  114. isSelectAll: false,
  115. selectAll: require('../../../static/images/iconRight.svg'),
  116. unSelectAll: require('../../../static/images/unselectAll.svg'),
  117. dialogVisible: false,
  118. dialogTitle: '',
  119. selectItem: ''
  120. }
  121. },
  122. mounted() {
  123. const _this = this
  124. _this.initData()
  125. // _this.getHandleSize()
  126. // _this.getDataList(0)
  127. },
  128. methods: {
  129. // 刷新
  130. refresh: function() {
  131. // this.getHandleSize()
  132. this.currentPage = 1
  133. // this.getDataList()
  134. this.initData()
  135. },
  136. handleClose(refresh) {
  137. this.dialogVisible = false
  138. if (refresh) {
  139. this.refresh()
  140. }
  141. },
  142. // 获取key位置
  143. getKeyIndex: function() {
  144. let keyIndex = -1
  145. this.itemList.some((item, index) => {
  146. if (item.key == this.selectTask) {
  147. keyIndex = index
  148. return true
  149. }
  150. })
  151. return keyIndex
  152. },
  153. initData: function() {
  154. this.itemList = []
  155. this.baseRequest('getHandleSize', {}).then(res => {
  156. res.data.data.forEach(element => {
  157. this.itemList.push(element)
  158. })
  159. if (this.selectTask == -1) {
  160. if (this.itemList.length > 0) {
  161. this.selectTask = this.itemList[0].key
  162. this.selectUrl = this.itemList[0].url
  163. this.getMenuDetail(this.itemList[0].name)
  164. } else {
  165. this.selectTask = 999999
  166. this.selectUrl = ''
  167. }
  168. }
  169. this.getDataList()
  170. }).catch(() => {
  171. })
  172. },
  173. // 获取待办各类型数据
  174. getHandleSize: function() {
  175. this.itemList = []
  176. this.baseRequest('getHandleSize', {}).then(res => {
  177. console.log('获取待办各类型数据_:', res)
  178. res.data.data.forEach(element => {
  179. this.itemList.push(element)
  180. })
  181. }).catch(() => {
  182. })
  183. },
  184. // 获取菜单详情
  185. getMenuDetail(e) {
  186. this.baseRequest('getListPermissionByName', { name: e }).then((res) => {
  187. console.log(res)
  188. this.selectItem = res.data
  189. })
  190. },
  191. // 类型点击事件
  192. typeChange: function(item, index) {
  193. this.selectTask = item.key
  194. this.selectUrl = item.url
  195. this.currentPage = 1
  196. this.getDataList()
  197. this.getMenuDetail(item.name)
  198. },
  199. // 获取对应类型的数据
  200. getDataList: function() {
  201. const _this = this
  202. _this.loading = true
  203. _this.tableDataList = []
  204. const keyIndex = this.getKeyIndex()
  205. if (keyIndex > -1) {
  206. const reqData = {
  207. type: this.selectTask,
  208. pageNum: _this.currentPage,
  209. pageSize: _this.tablePageSize
  210. }
  211. this.baseRequest('handleList', reqData).then(res => {
  212. if (res.data.rows) {
  213. _this.tableDataList = []
  214. res.data.rows.forEach(function(item) {
  215. _this.tableDataList.push(item)
  216. })
  217. _this.allpage = res.data.total
  218. this.itemList[keyIndex].quantity = res.data.total
  219. }
  220. _this.loading = false
  221. })
  222. .catch(() => {
  223. })
  224. } else {
  225. _this.loading = false
  226. }
  227. },
  228. handlePageChange: function(val) {
  229. this.currentPage = val
  230. this.getDataList()
  231. },
  232. handleEnter() {
  233. this.isSelectAll = true
  234. },
  235. handleLeave() {
  236. this.isSelectAll = false
  237. },
  238. rowClick: function(row) {
  239. console.log('行数据——:', row)
  240. if (row.routeParam) {
  241. const postData = this.queryURLParams('http://www.baidu.com?' + row.routeParam)
  242. switch (row.handleType) {
  243. case '1' :
  244. this.$refs.applyPaymentConfirm.setVisible(true, postData) // 付款流程
  245. break
  246. case '2' :
  247. this.$refs.applyCheckIn.setVisible(true, postData) // 入驻流程
  248. break
  249. case '3' :
  250. this.$refs.applyContract.setVisible(true, postData) // 合同用章流程
  251. break
  252. case '4' :
  253. this.$refs.applyReceivablesAdjust.setVisible(true, postData) // 应收款调整流程
  254. break
  255. case '5' :
  256. this.$refs.applyInvoiceRed.setVisible(true, postData) // 发票红冲流程
  257. break
  258. case '6' :
  259. this.$refs.applyBuyingMore.setVisible(true, postData) // 回购流程
  260. break
  261. case '7' :
  262. this.$refs.applyFinance.setVisible(true, postData) // 上交财政流程
  263. break
  264. }
  265. }
  266. // else {
  267. // this.$router.push(row.routeUrl + '?' + row.routeParam)
  268. // }
  269. },
  270. morePc: function() {
  271. localStorage.removeItem('Navbar')
  272. this.$nextTick(() => {
  273. localStorage.setItem('Navbar', JSON.stringify(this.selectItem))
  274. this.$router.push(this.selectUrl)
  275. myBus.$emit('menuChild1', { ...this.selectItem })
  276. })
  277. // this.$router.push(this.selectUrl)
  278. // if (this.morePsRouter) {
  279. // this.$router.push(this.morePsRouter)
  280. // }
  281. },
  282. queryURLParams(URL) {
  283. const url = URL.split('?')[1]
  284. const urlSearchParams = new URLSearchParams(url)
  285. const params = Object.fromEntries(urlSearchParams.entries())
  286. return params
  287. },
  288. baseRequest(opUrl, postData) {
  289. return this.$channel.globleRequest('WorkPanelController', opUrl, postData, 'project')
  290. },
  291. baseFlowRequest(prefix, opUrl, postData) {
  292. return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
  293. }
  294. }
  295. }
  296. </script>
  297. <style lang="scss">
  298. .myAudit {
  299. .el-table{
  300. border-bottom: 1px solid #E6E6E6;
  301. th,td{
  302. border-bottom: none;
  303. }
  304. }
  305. .el-icon{
  306. color: green;
  307. }
  308. .isborder{
  309. box-sizing:border-box;
  310. -webkit-box-sizing:border-box;
  311. border-bottom: 3px solid #4A8139;
  312. }
  313. .cell {
  314. display: -webkit-box;
  315. -webkit-box-orient: vertical;
  316. overflow: hidden;
  317. -webkit-line-clamp: 1;
  318. text-overflow: ellipsis;
  319. }
  320. .table-page {
  321. display: flex !important;
  322. align-items: center !important;
  323. justify-content: space-between !important;
  324. padding: 5px 20px;
  325. .selectAll {
  326. color: rgba(244, 83, 32, 1);
  327. display: flex;
  328. align-items: center;
  329. font-size: 12px;
  330. cursor: pointer;
  331. }
  332. .iconRight {
  333. margin-left: 2px;
  334. }
  335. .unSelect {
  336. color: rgba(153, 153, 153, 1);
  337. display: flex;
  338. align-items: center;
  339. font-size: 12px;
  340. cursor: pointer;
  341. }
  342. .unSelect:hover {
  343. color: rgba(244, 83, 32, 1);
  344. }
  345. }
  346. .el-pagination__total {
  347. display: none !important;
  348. }
  349. .el-pager li.active {
  350. color: #F8BF23 !important;
  351. background: rgba(245, 245, 245, 0.5);
  352. }
  353. .taskType {
  354. //display: flex;
  355. //align-items: center;
  356. border-top: 1px solid rgba(230, 230, 230, 1);
  357. height: 40px;
  358. margin-left: 0.39vw;
  359. padding-top: 10px;
  360. .task {
  361. display: inline-flex;
  362. align-items: center;
  363. margin-left: 0.851vw;
  364. cursor: pointer;
  365. white-space: nowrap;
  366. .taskName {
  367. color: #333333;
  368. font-size: 14px;
  369. }
  370. .selectTaskName {
  371. color: #4A8139;
  372. font-size: 14px;
  373. }
  374. .taskQuan {
  375. color: #f6c56e;
  376. font-size: 14px;
  377. margin-left: 3px;
  378. }
  379. }
  380. .taskName:hover {
  381. color: rgba(36, 36, 100, 0.7) !important;
  382. }
  383. }
  384. .el-table__body-wrapper {
  385. min-height: 185px !important;
  386. &::-webkit-scrollbar {
  387. display: none !important;
  388. }
  389. }
  390. .el-table__empty-block {
  391. min-height: 185px !important;
  392. }
  393. .el-collapse-item__content {
  394. height: 331px;
  395. }
  396. .el-table:before {
  397. height: 0px !important;
  398. }
  399. .el-collapse-item__arrow {
  400. display: none !important;
  401. }
  402. .new-ref {
  403. right: 10px !important;
  404. }
  405. .el-button--warning {
  406. background-color: rgba(70, 122, 235, 0) !important;
  407. color: rgba(70, 122, 235, 1) !important;
  408. border: none !important;
  409. }
  410. .el-button--mini {
  411. padding: 5px 15px !important;
  412. }
  413. }
  414. .myLine {
  415. //border-left: 3px solid rgba(81, 68, 157, 1);
  416. padding-left: 5px;
  417. height: 16px;
  418. display: flex;
  419. align-items: center;
  420. font-weight: 600;
  421. color: #264987 !important;
  422. }
  423. .el-table__cell {
  424. }
  425. .el-table__header {
  426. th {
  427. background: rgba(245, 245, 245, 1) !important;
  428. }
  429. }
  430. </style>