阅行客电子档案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

306 lines
9.9 KiB

1 year ago
  1. <template>
  2. <div class="app-container">
  3. <div class="container-main">
  4. <div class="elect-cont-left">
  5. <div class="head-container">
  6. <el-select v-model="form.fondsId" placeholder="请选择" style="width: 225px;" @change="changeFondsValue($event)">
  7. <el-option
  8. v-for="(item,index) in fondsOptions"
  9. :key="index"
  10. :label="item.fondsName"
  11. :value="item.id"
  12. />
  13. </el-select>
  14. </div>
  15. <div class="container-left">
  16. <span class="right-top-line" />
  17. <span class="left-bottom-line" />
  18. <ul class="left-annual-type">
  19. <li class="active">本单位填报6</li>
  20. <li>下级上报0</li>
  21. <li>汇总上报0</li>
  22. </ul>
  23. </div>
  24. </div>
  25. <div class="elect-cont-right">
  26. <div class="head-container" style="position: relative;">
  27. <crudOperation :permission="permission">
  28. <template v-slot:middle>
  29. <el-button slot="reference" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">
  30. <i class="iconfont icon-shanchu" />
  31. 删除
  32. </el-button>
  33. </template>
  34. </crudOperation>
  35. <div class="double-click-btn" style="top: 3px;"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看年报详情</span></div>
  36. </div>
  37. <div class="container-right">
  38. <span class="right-top-line" />
  39. <span class="left-bottom-line" />
  40. <el-table
  41. ref="table"
  42. v-loading="loading"
  43. class="archives-table"
  44. :data="tableData"
  45. @selection-change="crud.selectionChangeHandler"
  46. @row-click="clickRowHandler"
  47. @row-dblclick="handleDbClick"
  48. >
  49. <el-table-column type="selection" align="center" width="55" />
  50. <el-table-column label="年度" prop="year" />
  51. <el-table-column label="统计模板" prop="template" min-width="150px" />
  52. <el-table-column label="填报单位" prop="unit" />
  53. <el-table-column label="创建人" prop="creator" />
  54. <el-table-column prop="create_time" label="创建日期">
  55. <template slot-scope="scope">
  56. <div>{{ scope.row.create_time | parseTime }}</div>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="备注" prop="remark" />
  60. <el-table-column label="状态" prop="status" align="center">
  61. <template slot-scope="scope">
  62. <!-- <div>{{ scope.row.status === 0 ? '录入中' : '已汇总' }}</div> -->
  63. <span v-if="scope.row.status === 0" class="row-state row-physical state-active">录入中</span>
  64. <span v-else class="row-state row-binding state-active">已汇总</span>
  65. </template>
  66. </el-table-column>
  67. <!-- <el-table-column label="操作" align="center" prop="deptsStatus" /> -->
  68. </el-table>
  69. <!--分页组件-->
  70. <!-- <pagination v-if="crud.data.length!==0" /> -->
  71. </div>
  72. </div>
  73. </div>
  74. <el-dialog append-to-body :close-on-click-modal="false" :before-close="handleCloseDialog" :visible.sync="detailVisible" title="详情">
  75. <div class="setting-dialog">
  76. <ul class="annual-dialog-detail">
  77. <li class="detail-item">
  78. <div class="detail-item-left">年度</div>
  79. <div class="detail-item-right">{{ detailContent && detailContent.year }}</div>
  80. </li>
  81. <li class="detail-item">
  82. <div class="detail-item-left">年报模板</div>
  83. <div class="detail-item-right">2019</div>
  84. </li>
  85. <li class="detail-item">
  86. <div class="detail-item-left">填报单位</div>
  87. <div class="detail-item-right">{{ detailContent && detailContent.unit }}</div>
  88. </li>
  89. <li class="detail-item">
  90. <div class="detail-item-left">报表模板</div>
  91. <div class="detail-item-right">{{ detailContent && detailContent.template }}</div>
  92. </li>
  93. <li class="detail-item">
  94. <div class="detail-item-left">填报人</div>
  95. <div class="detail-item-right">{{ detailContent && detailContent.creator }}</div>
  96. </li>
  97. <li class="detail-item">
  98. <div class="detail-item-left">上报至</div>
  99. <div class="detail-item-right">{{ detailContent && detailContent.upToUint }}</div>
  100. </li>
  101. <li class="detail-item">
  102. <div class="detail-item-left">上报日期</div>
  103. <div class="detail-item-right">{{ detailContent && detailContent.upToDate | parseTime }}</div>
  104. </li>
  105. <li class="detail-item">
  106. <div class="detail-item-left">备注</div>
  107. <div class="detail-item-right">{{ detailContent && detailContent.remark }}</div>
  108. </li>
  109. <li class="detail-item">
  110. <div class="detail-item-left">附件列表</div>
  111. <div class="detail-item-right" />
  112. </li>
  113. </ul>
  114. <div slot="footer" class="dialog-footer">
  115. <!-- <router-link to="/local-html">跳转到本地HTML文件</router-link> -->
  116. <el-button type="primary" @click="goToHtml">报表详情</el-button>
  117. <!-- <el-button type="text" @click="detailVisible=false">确定</el-button> -->
  118. </div>
  119. </div>
  120. </el-dialog>
  121. </div>
  122. </template>
  123. <script>
  124. import crudDept from '@/api/system/dept'
  125. import { FetchFondsAll } from '@/api/system/fonds'
  126. import CRUD, { presenter, header, form, crud } from '@crud/crud'
  127. import crudOperation from '@crud/CRUD.operation'
  128. const defaultForm = { id: null, fondsId: null }
  129. const data = [
  130. {
  131. 'year': 2024,
  132. 'template': '《档案室基本情况表》(2019版)',
  133. 'unit': '武汉飞天智能',
  134. 'creator': '系统管理员',
  135. 'create_time': '1706078799000',
  136. 'status': 1,
  137. 'remark': '',
  138. 'upToUint': '',
  139. 'upToDate': null
  140. },
  141. {
  142. 'year': 2023,
  143. 'template': '《档案室基本情况表》(2019版)',
  144. 'unit': '武汉飞天智能',
  145. 'creator': '系统管理员',
  146. 'create_time': '1706078799000',
  147. 'status': 1,
  148. 'remark': '',
  149. 'upToUint': '武汉飞天智能',
  150. 'upToDate': '1706078799000'
  151. },
  152. {
  153. 'year': 2022,
  154. 'template': '《档案室基本情况表》(2019版)',
  155. 'unit': '武汉飞天智能',
  156. 'creator': '系统管理员',
  157. 'create_time': '1706078799000',
  158. 'status': 1,
  159. 'remark': '',
  160. 'upToUint': '',
  161. 'upToDate': null
  162. },
  163. {
  164. 'year': 2021,
  165. 'template': '《档案室基本情况表》(2019版)',
  166. 'unit': '武汉飞天智能',
  167. 'creator': '系统管理员',
  168. 'create_time': '1706078799000',
  169. 'status': 1,
  170. 'remark': '',
  171. 'upToUint': '',
  172. 'upToDate': null
  173. },
  174. {
  175. 'year': 2020,
  176. 'template': '《档案室基本情况表》(2019版)',
  177. 'unit': '武汉飞天智能',
  178. 'creator': '系统管理员',
  179. 'create_time': '1706078799000',
  180. 'status': 1,
  181. 'remark': '',
  182. 'upToUint': '',
  183. 'upToDate': null
  184. },
  185. {
  186. 'year': 2019,
  187. 'template': '《档案室基本情况表》(2019版)',
  188. 'unit': '武汉飞天智能',
  189. 'creator': '系统管理员',
  190. 'create_time': '1706078799000',
  191. 'status': 1,
  192. 'remark': '',
  193. 'upToUint': '',
  194. 'upToDate': null
  195. }
  196. ]
  197. export default {
  198. name: 'AnnualReportStatistics',
  199. components: { crudOperation },
  200. cruds() {
  201. return CRUD({ title: '年报统计', idField: 'deptsId', url: 'api/depts/initDeptsList', crudMethod: { ...crudDept }, optShow: {
  202. add: false,
  203. edit: false,
  204. del: false,
  205. reset: false,
  206. download: false,
  207. group: false
  208. },
  209. queryOnPresenterCreated: false
  210. })
  211. },
  212. mixins: [presenter(), header(), form(defaultForm), crud()],
  213. data() {
  214. return {
  215. permission: {
  216. add: ['admin'],
  217. edit: ['admin'],
  218. del: ['admin']
  219. },
  220. fondsOptions: [],
  221. form: {
  222. 'fondsId': null
  223. },
  224. loading: false,
  225. tableData: data,
  226. detailVisible: false,
  227. detailContent: {}
  228. }
  229. },
  230. mounted() {
  231. this.getFondsDatas()
  232. },
  233. methods: {
  234. getFondsDatas() {
  235. FetchFondsAll().then(res => {
  236. this.fondsOptions = res
  237. if (this.fondsOptions.length > 0) {
  238. this.form.fondsId = this.fondsOptions[0].id
  239. }
  240. })
  241. },
  242. changeFondsValue(value) {
  243. const obj = this.fondsOptions.find(function(item) {
  244. return item.id === value
  245. })
  246. console.log('obj', obj)
  247. },
  248. clickRowHandler(row) {
  249. this.$refs.table.clearSelection()
  250. this.$refs.table.toggleRowSelection(row)
  251. },
  252. handleDbClick(row) {
  253. this.detailVisible = true
  254. this.detailContent = row
  255. },
  256. handleCloseDialog() {
  257. this.detailVisible = false
  258. },
  259. goToHtml() {
  260. // 这里的 'test.html' 是你放在 public 目录下的 HTML 文件名称
  261. // window.location.href = 'report/annual.htm'
  262. window.open('report/annual.htm', '_blank')
  263. }
  264. }
  265. }
  266. </script>
  267. <style lang="scss" scoped>
  268. .left-annual-type{
  269. // padding: 20px 0;
  270. line-height: 36px;
  271. font-size: 14px;
  272. color: #0c0e1e;
  273. li{
  274. padding: 0 10px;
  275. &:hover,
  276. &.active{
  277. background-color: #e8f2ff;
  278. color: #0348f3;
  279. cursor: default;
  280. }
  281. }
  282. }
  283. .annual-dialog-detail{
  284. .detail-item{
  285. display: flex;
  286. justify-content: flex-start;
  287. line-height: 38px;
  288. font-size: 16px;
  289. .detail-item-left{
  290. width: 120px;
  291. text-align: right;
  292. }
  293. .detail-item-right{
  294. color: #0c0e1e;
  295. }
  296. }
  297. }
  298. </style>