parent.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <template>
  2. <div class="contrl">
  3. <div style="width: 95%;">
  4. <div class="title-div">
  5. <span>房地产工作台</span>
  6. </div>
  7. </div>
  8. <!-- <div class="createNew-div" @click="createFolder" >
  9. <img src="../../../assets/icons/folder.png" style="width: 32px; height: 32px; float: left;margin-top: 22px;" />
  10. <span style="margin-left: 10px;">新的项目</span>
  11. <img src="../../../assets/icons/plus.png" style="width: 32px; height: 32px;float: right;margin-top: 22px;" />
  12. </div> -->
  13. <div class="createNew-div" @click="createWord()">
  14. <img src="../../../assets/icons/word.png" style="width: 32px; height: 32px; float: left;margin-top: 22px;" />
  15. <span style="margin-left: 10px;">抵押类报告</span>
  16. <img src="../../../assets/icons/plus.png" style="width: 32px; height: 32px;float: right;margin-top: 22px;" />
  17. </div>
  18. <!-- <div class="createNew-div">
  19. <img src="../../../assets/icons/excel.png" style="width: 32px; height: 32px; float: left;margin-top: 22px;" />
  20. <span style="margin-left: 10px;">新的测算表</span>
  21. <img src="../../../assets/icons/plus.png" style="width: 32px; height: 32px;float: right;margin-top: 22px;" />
  22. </div> -->
  23. <el-tabs v-model="activeName" class="condtion-tabs" @tab-click="handleClick">
  24. <el-tab-pane label="全部项目" name="all">
  25. <div class="example-list">
  26. <el-card class="report-item no-border" shadow="never" v-for="(doc, id) in allPage">
  27. <div class="report-icon">
  28. <img :src="docLog(doc.docType)" style="width: 52px; height: 52px;" />
  29. </div>
  30. <div class="report-text">
  31. <div>
  32. <span class="report-text-type">{{ doc.businessType + doc.businessCate + '【' + doc.docNo + '】' }}</span>
  33. <span> 一 </span>
  34. <span class="report-text-name" @click="docDetail(doc.id)">{{ doc.docName }}</span>
  35. </div>
  36. <div style="padding-top: 5px;">
  37. <span>
  38. <el-icon>
  39. <Avatar />
  40. </el-icon>
  41. {{ doc.consignor }}</span>
  42. <span>
  43. <el-tag style="margin-left: 5px;">
  44. {{ doc.businessType }}
  45. </el-tag>
  46. <el-tag style="margin-left: 5px;" type="success">
  47. {{ doc.businessCate }}
  48. </el-tag>
  49. </span>
  50. <span style="float: right; color:darkgrey">
  51. {{ doc.updateTime }}
  52. </span>
  53. </div>
  54. </div>
  55. <div class="report-button">
  56. <el-icon>
  57. <Download />
  58. </el-icon>
  59. </div>
  60. </el-card>
  61. </div>
  62. <div class="pagination">
  63. <el-pagination background layout="prev, pager, next" style="--el-color-primary: #ff6154"
  64. :page-count="listQuery1.pages" v-model:current-page="listQuery1.current" @current-change="getAllDocuments" />
  65. </div>
  66. </el-tab-pane>
  67. <el-tab-pane label="进行中的项目" name="pending">
  68. <div class="example-list">
  69. <el-card class="report-item no-border" shadow="never" v-for="(doc, id) in allPage">
  70. <div class="report-icon">
  71. <img :src="docLog(doc.docType)" style="width: 52px; height: 52px;" />
  72. </div>
  73. <div class="report-text">
  74. <div>
  75. <span class="report-text-type">{{ doc.businessType + doc.businessCate + '【' + doc.docNo + '】' }}</span>
  76. <span> 一 </span>
  77. <span class="report-text-name">{{ doc.docName }}</span>
  78. </div>
  79. <div style="padding-top: 5px;">
  80. <span>
  81. <el-icon>
  82. <Avatar />
  83. </el-icon>
  84. {{ doc.consignor }}</span>
  85. <span>
  86. <el-tag style="margin-left: 5px;">
  87. {{ doc.businessType }}
  88. </el-tag>
  89. <el-tag style="margin-left: 5px;" type="success">
  90. {{ doc.businessCate }}
  91. </el-tag>
  92. </span>
  93. <span style="float: right; color:darkgrey">
  94. {{ doc.updateTime }}
  95. </span>
  96. </div>
  97. </div>
  98. <div class="report-button">
  99. <el-icon>
  100. <Download />
  101. </el-icon>
  102. </div>
  103. </el-card>
  104. </div>
  105. <div class="pagination">
  106. <el-pagination background layout="prev, pager, next" style="--el-color-primary: #ff6154"
  107. :page-count="listQuery1.pages" v-model:current-page="listQuery1.current" @current-change="getPendingDocuments" />
  108. </div>
  109. </el-tab-pane>
  110. <el-tab-pane label="已完成的项目" name="finished">
  111. <div class="example-list">
  112. <el-card class="report-item no-border" shadow="never" v-for="(doc, id) in allPage">
  113. <div class="report-icon">
  114. <img :src="docLog(doc.docType)" style="width: 52px; height: 52px;" />
  115. </div>
  116. <div class="report-text">
  117. <div>
  118. <span class="report-text-type">{{ doc.businessType + doc.businessCate + '【' + doc.docNo + '】' }}</span>
  119. <span> 一 </span>
  120. <span class="report-text-name">{{ doc.docName }}</span>
  121. </div>
  122. <div style="padding-top: 5px;">
  123. <span>
  124. <el-icon>
  125. <Avatar />
  126. </el-icon>
  127. {{ doc.consignor }}</span>
  128. <span>
  129. <el-tag style="margin-left: 5px;">
  130. {{ doc.businessType }}
  131. </el-tag>
  132. <el-tag style="margin-left: 5px;" type="success">
  133. {{ doc.businessCate }}
  134. </el-tag>
  135. </span>
  136. <span style="float: right; color:darkgrey">
  137. {{ doc.updateTime }}
  138. </span>
  139. </div>
  140. </div>
  141. <div class="report-button">
  142. <el-icon>
  143. <Download />
  144. </el-icon>
  145. </div>
  146. </el-card>
  147. </div>
  148. <div class="pagination">
  149. <el-pagination background layout="prev, pager, next" style="--el-color-primary: #ff6154"
  150. :page-count="listQuery1.pages" v-model:current-page="listQuery1.current" @current-change="getFinishedDocuments" />
  151. </div>
  152. </el-tab-pane>
  153. </el-tabs>
  154. </div>
  155. </template>
  156. <script>
  157. import documentProduction from '@/api/documentProduction';
  158. import wordLog from '../../../assets/icons/word.png'
  159. import excelLog from '../../../assets/icons/excel.png'
  160. import folderLog from '../../../assets/icons/folder.png'
  161. export default {
  162. name: 'houseParent',
  163. data() {
  164. return {
  165. msg: 0,
  166. activeName: 'all',
  167. allPage: [],
  168. listQuery1: {
  169. current: 1,
  170. size: 10,
  171. pages: null,
  172. total: null,
  173. state:null,
  174. },
  175. pendingPage: [],
  176. listQuery2: {
  177. current: 1,
  178. size: 10,
  179. pages: null,
  180. total: null,
  181. state:0
  182. },
  183. finshedPage: [],
  184. listQuery3: {
  185. current: 1,
  186. size: 10,
  187. pages: null,
  188. total: null,
  189. state:1
  190. }
  191. }
  192. },
  193. created() {
  194. this.getAllDocuments();
  195. },
  196. methods: {
  197. createWord() {
  198. this.$router.push('/home/houseWorkbench/consignor')
  199. },
  200. nextFolder(folderName) {
  201. this.$router.push({ path: '/home/house/folder', query: { 'folderName': folderName } })
  202. },
  203. createFolder() {
  204. ElMessageBox.prompt('请输入项目文件夹名称', '', {
  205. confirmButtonText: '创建',
  206. cancelButtonText: '取消',
  207. })
  208. .then(({ value }) => {
  209. ElMessage({
  210. type: 'success',
  211. message: `Your email is:${value}`,
  212. })
  213. })
  214. },
  215. handleClick(tab){
  216. if(tab.props.name==='pending'){
  217. this.getPendingDocuments();
  218. }
  219. if (tab.props.name==='finished'){
  220. this.getFinishedDocuments();
  221. }
  222. if (tab.props.name === 'all'){
  223. this.getAllDocuments();
  224. }
  225. },
  226. getAllDocuments() {
  227. documentProduction.page(this.listQuery1).then(res => {
  228. if (res.code === 200) {
  229. this.allPage = res.data.records;
  230. this.listQuery1.pages = res.data.pages;
  231. }
  232. })
  233. },
  234. getPendingDocuments() {
  235. documentProduction.page(this.listQuery2).then(res => {
  236. if (res.code === 200) {
  237. this.pendingPage = res.data.records;
  238. this.listQuery2.pages = res.data.pages;
  239. }
  240. })
  241. },
  242. getFinishedDocuments() {
  243. documentProduction.page(this.listQuery3).then(res => {
  244. if (res.code === 200) {
  245. this.finshedPage = res.data.records;
  246. this.listQuery3.pages = res.data.pages;
  247. }
  248. })
  249. },
  250. docLog(docType) {
  251. switch (docType) {
  252. case 'CALCULATE_TABLE':
  253. return excelLog;
  254. case 'FOLDER':
  255. return folderLog;
  256. default:
  257. return wordLog;
  258. }
  259. },
  260. docDetail(id){
  261. this.$router.push({path:"/home/houseWorkbench/consignor",query:{'id':id}});
  262. }
  263. }
  264. }
  265. </script>
  266. <style scoped>
  267. .base {
  268. min-height: calc(100vh - 80px);
  269. width: 100%;
  270. }
  271. .content {
  272. margin-left: 160px;
  273. margin-right: 160px;
  274. padding: 50px 20px 20px 20px;
  275. }
  276. .contrl {
  277. width: 70.9%;
  278. border-right: 1.5px #dae1eb solid;
  279. padding: 0px 20px 20px 0px;
  280. float: left;
  281. }
  282. .condtion-tabs {
  283. margin-top: 80px;
  284. min-height: 600px;
  285. }
  286. :deep(.el-tabs__active-bar) {
  287. background-color: #ff6154;
  288. }
  289. :deep(.el-tabs__item.is-active) {
  290. color: #ff6154;
  291. }
  292. :deep(.el-tabs__item:hover) {
  293. color: #ff6154;
  294. }
  295. .title-div {
  296. height: 80px;
  297. line-height: 80px;
  298. width: 200px;
  299. float: left;
  300. font-size: 20px;
  301. font-weight: 900;
  302. }
  303. .createNew-div {
  304. height: 80px;
  305. line-height: 80px;
  306. border: #dae1eb 1.5px solid;
  307. border-radius: 0.6em;
  308. width: 200px;
  309. float: right;
  310. padding-left: 10px;
  311. padding-right: 10px;
  312. margin-left: 20px;
  313. }
  314. .createNew-div:hover {
  315. cursor: pointer;
  316. background-color: #dae1eb;
  317. border: #dae1eb 1.5px solid;
  318. transition: 0.5s;
  319. }
  320. :deep(.el-tabs__nav-wrap:after) {
  321. background-color: white;
  322. }
  323. .null-div {
  324. width: 100%;
  325. height: 100%;
  326. text-align: center;
  327. margin-top: 20%;
  328. color: var(--vt-c-text-light-2);
  329. }
  330. .no-border {
  331. border: none;
  332. }
  333. .no-border:hover {
  334. cursor: pointer;
  335. }
  336. .pagination {
  337. margin-top: 10px;
  338. margin-left: 160px;
  339. width: 58.5%;
  340. justify-content: center;
  341. display: flex;
  342. }
  343. </style>