阅行客电子档案
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.

152 lines
5.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="app-container archives-container">
  3. <div class="container-main" style="justify-content: flex-start;">
  4. <CategoryTree ref="categoryTree" @nodeClick="handleNodeClick" />
  5. <div v-if="currentCategory && currentCategory.isType !== 1" class="elect-cont-right">
  6. <div class="connection-header collect-header">
  7. <h4 class="is-anjuan">{{ currentCategory && currentCategory.cnName }} </h4>
  8. <div class="head-search">
  9. <date-range-picker v-model="blurryTime" class="date-item" />
  10. <rrOperation />
  11. </div>
  12. <crudOperation>
  13. <template v-slot:right>
  14. <el-button size="mini" @click="doLoalHitch">
  15. <i class="iconfont icon-bendiguajie" />
  16. 本地挂接
  17. </el-button>
  18. <el-button :loading="crud.downloadLoading" size="mini" :disabled="crud.selections.length === 0" @click="doExport(crud.selections)">
  19. <i class="iconfont icon-daochu" />
  20. 导出
  21. </el-button>
  22. </template>
  23. </crudOperation>
  24. </div>
  25. <el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler" @row-dblclick="handleDetail">
  26. <el-table-column type="selection" align="center" width="55" />
  27. <el-table-column prop="code" label="编号" width="300" />
  28. <el-table-column prop="create_by" label="操作人" width="100" />
  29. <el-table-column prop="create_time" label="操作时间">
  30. <template slot-scope="scope">
  31. <div>{{ scope.row.create_time | parseTime }}</div>
  32. </template>
  33. </el-table-column>
  34. <el-table-column prop="type" label="重复检验方式" />
  35. <el-table-column prop="filed" label="挂接字段" />
  36. <el-table-column prop="total" label="挂接结果" width="240">
  37. <template slot-scope="scope">
  38. <div> {{ scope.row.total }} 条原文成功<span class="success-status"> {{ scope.row.success }} </span>失败<span class="error-status"> {{ scope.row.error }} </span></div>
  39. </template>
  40. </el-table-column>
  41. </el-table>
  42. <!--分页组件-->
  43. <pagination v-if="crud.data.length !== 0" />
  44. </div>
  45. </div>
  46. <LocalForm ref="localForm" :current-category="currentCategory" />
  47. <HitchDetail ref="mDetail" />
  48. </div>
  49. </template>
  50. <script>
  51. // import crudConnection from '@/api/system/role'
  52. import crudRoles from '@/api/system/role'
  53. import CRUD, { presenter, header, crud } from '@crud/crud'
  54. import DateRangePicker from '@/components/DateRangePicker'
  55. import rrOperation from '@crud/RR.operation'
  56. import crudOperation from '@crud/CRUD.operation'
  57. import pagination from '@crud/Pagination'
  58. import CategoryTree from '@/views/components/categoryTree'
  59. import LocalForm from './module/form'
  60. import HitchDetail from './module/detail'
  61. // import { exportFile } from '@/utils/index'
  62. // import qs from 'qs'
  63. import { mapGetters } from 'vuex'
  64. import tableData from './table.json'
  65. export default {
  66. name: 'BatchConnection',
  67. components: { CategoryTree, LocalForm, HitchDetail, DateRangePicker, rrOperation, crudOperation, pagination },
  68. cruds() {
  69. return [
  70. CRUD({
  71. title: '批量挂接', url: 'api/role/initRoleList',
  72. crudMethod: { ...crudRoles },
  73. optShow: {
  74. add: false,
  75. edit: false,
  76. del: false,
  77. reset: true,
  78. download: false,
  79. group: false
  80. }
  81. })
  82. ]
  83. },
  84. mixins: [presenter(), header(), crud()],
  85. props: {
  86. },
  87. data() {
  88. return {
  89. currentCategory: null,
  90. blurryTime: null,
  91. formVisible: false
  92. }
  93. },
  94. computed: {
  95. ...mapGetters([
  96. 'baseApi'
  97. ])
  98. },
  99. created() {
  100. },
  101. mounted() {
  102. },
  103. methods: {
  104. [CRUD.HOOK.beforeRefresh]() {
  105. if (this.blurryTime) {
  106. this.crud.query.startTime = this.blurryTime[0]
  107. this.crud.query.endTime = this.blurryTime[1]
  108. }
  109. },
  110. [CRUD.HOOK.afterRefresh]() {
  111. this.crud.data = tableData
  112. },
  113. handleNodeClick(data) {
  114. this.currentCategory = data
  115. },
  116. doLoalHitch() {
  117. this.$nextTick(() => {
  118. this.$refs.localForm.localHitchVisible = true
  119. })
  120. },
  121. handleDetail() {
  122. this.$refs.mDetail.hitchDetialVisible = true
  123. },
  124. doExport(data) {
  125. crud.downloadLoading = true
  126. this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
  127. confirmButtonText: '继续',
  128. cancelButtonText: '取消',
  129. type: 'warning',
  130. dangerouslyUseHTMLString: true
  131. }).then(() => {
  132. const ids = []
  133. data.forEach(val => {
  134. ids.push(val.id)
  135. })
  136. // const params = {
  137. // 'roleIds': ids
  138. // }
  139. // exportFile(this.baseApi + '/api/role/exportRole?' + qs.stringify(params, { indices: false }))
  140. }).catch(() => {
  141. })
  142. }
  143. }
  144. }
  145. </script>
  146. <style lang="scss" scoped>
  147. @import "~@/assets/styles/collect-reorganizi.scss";
  148. </style>