index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="统一社会信用代码" prop="uniCode" label-width="200">
  5. <el-input
  6. v-model="queryParams.uniCode"
  7. placeholder="请输入统一社会信用代码"
  8. clearable
  9. @keyup.enter="handleQuery"
  10. />
  11. </el-form-item>
  12. <el-form-item>
  13. <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
  14. <el-button icon="Refresh" @click="resetQuery">重置</el-button>
  15. </el-form-item>
  16. </el-form>
  17. <el-row :gutter="10" class="mb8">
  18. <el-col :span="1.5">
  19. <el-button
  20. type="warning"
  21. plain
  22. icon="Download"
  23. @click="handleExport"
  24. :disabled="!dishonestyList.length"
  25. v-hasPermi="['basicData:xcrRecordDishonesty:export']"
  26. >导出
  27. </el-button>
  28. </el-col>
  29. </el-row>
  30. <el-table v-loading="loading" :data="dishonestyList" height="650" @selection-change="handleSelectionChange">
  31. <el-table-column label="唯一记录id 主键" align="center" prop="CSID" :show-overflow-tooltip='true'/>
  32. <el-table-column label="姓名/名称" align="center" prop="XM" :show-overflow-tooltip='true'/>
  33. <el-table-column label="类型" align="center" prop="LX" :show-overflow-tooltip='true'/>
  34. <el-table-column label="执行案号" align="center" prop="ZXAH" :show-overflow-tooltip='true'/>
  35. <el-table-column label="组织机构代码" align="center" prop="ZZJGDM" :show-overflow-tooltip='true'/>
  36. <el-table-column label="执行法院" align="center" prop="ZXFY" :show-overflow-tooltip='true'/>
  37. <el-table-column label="发布人" align="center" prop="FBR" :show-overflow-tooltip='true'/>
  38. <el-table-column label="立案时间" align="center" prop="LASJ" width="180">
  39. <template #default="scope">
  40. <span>{{ parseTime(scope.row.LASJ, '{y}-{m}-{d}') }}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="发布时间" align="center" prop="FBSJ" width="180">
  44. <template #default="scope">
  45. <span>{{ parseTime(scope.row.FBSJ, '{y}-{m}-{d}') }}</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="状态" align="center" prop="ZT" :show-overflow-tooltip='true'/>
  49. <el-table-column label="屏蔽时间" align="center" prop="BPSJ" width="180">
  50. <template #default="scope">
  51. <span>{{ parseTime(scope.row.BPSJ, '{y}-{m}-{d}') }}</span>
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="撤销时间" align="center" prop="CXSJ" width="180">
  55. <template #default="scope">
  56. <span>{{ parseTime(scope.row.CXSJ, '{y}-{m}-{d}') }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="失信到期日" align="center" prop="SXDQR" width="180">
  60. <template #default="scope">
  61. <span>{{ parseTime(scope.row.SXDQR, '{y}-{m}-{d}') }}</span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="失信行为情形" align="center" prop="SXXWQX" :show-overflow-tooltip='true'/>
  65. <el-table-column label="承办人ID" align="center" prop="CBRID" :show-overflow-tooltip='true'/>
  66. <el-table-column label="插入时间" align="center" prop="iTime" width="180">
  67. <template #default="scope">
  68. <span>{{ parseTime(scope.row.iTime, '{y}-{m}-{d}') }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="统一社会信用代码" align="center" prop="uniCode" width="200"/>
  72. </el-table>
  73. <div style="position: fixed;bottom: 20px;right: 10px;">
  74. <pagination
  75. v-show="total>0"
  76. :total="total"
  77. v-model:page="queryParams.pageNum"
  78. v-model:limit="queryParams.pageSize"
  79. @pagination="getList"
  80. />
  81. </div>
  82. <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
  83. <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
  84. :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
  85. :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
  86. <el-icon class="el-icon--upload">
  87. <upload-filled/>
  88. </el-icon>
  89. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  90. <template #tip>
  91. <div class="el-upload__tip text-center">
  92. <span>仅允许导入xls、xlsx格式文件。</span>
  93. </div>
  94. </template>
  95. </el-upload>
  96. <template #footer>
  97. <div class="dialog-footer">
  98. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  99. <el-button @click="upload.open = false">取 消</el-button>
  100. </div>
  101. </template>
  102. </el-dialog>
  103. </div>
  104. </template>
  105. <script setup name="Dishonesty">
  106. import {
  107. listDishonesty,
  108. getDishonesty,
  109. delDishonesty,
  110. delDishonestyBatch
  111. } from "@/api/basicData/xcrRecordDishonesty";
  112. import {reactive, ref, toRaw} from "vue";
  113. import {getToken} from "@/utils/auth";
  114. import {ElMessage} from "element-plus";
  115. import {likeQueryMethod} from "@/utils/likeQueryMethod";
  116. const {proxy} = getCurrentInstance();
  117. const dishonestyList = ref([]);
  118. const open = ref(false);
  119. const loading = ref(true);
  120. const showSearch = ref(true);
  121. const ids = ref([]);
  122. const single = ref(true);
  123. const multiple = ref(true);
  124. const total = ref(0);
  125. const title = ref("");
  126. const upload = reactive({
  127. // 是否显示弹出层(用户导入)
  128. open: false,
  129. // 弹出层标题(用户导入)
  130. title: '',
  131. // 是否禁用上传
  132. isUploading: false,
  133. // 设置上传的请求头部
  134. headers: {Authorization: getToken()},
  135. // 上传的地址
  136. url: import.meta.env.VITE_APP_BASE_API + '/xcrRecordDishonesty/importData'
  137. })
  138. const handleFileSuccess = (e) => {
  139. if (e.code == 200) {
  140. ElMessage({
  141. type: "success",
  142. message: e.msg
  143. })
  144. getList()
  145. proxy.$refs['uploadRef']?.clearFiles()
  146. } else {
  147. ElMessage({
  148. type: "error",
  149. message: e.msg
  150. })
  151. proxy.$refs['uploadRef']?.clearFiles()
  152. }
  153. }
  154. function submitFileForm() {
  155. proxy.$refs['uploadRef']?.submit();
  156. upload.open = false;
  157. }
  158. function handleImport() {
  159. upload.open = true
  160. }
  161. const data = reactive({
  162. form: {},
  163. queryParams: {
  164. pageNum: 1,
  165. pageSize: 20,
  166. CSID: null,
  167. XM: null,
  168. LX: null,
  169. ZXAH: null,
  170. ZZJGDM: null,
  171. ZXFY: null,
  172. FBR: null,
  173. LASJ: null,
  174. FBSJ: null,
  175. ZT: null,
  176. BPSJ: null,
  177. CXSJ: null,
  178. SXDQR: null,
  179. SXXWQX: null,
  180. CBRID: null,
  181. iTime: null,
  182. uniCode: ''
  183. },
  184. rules: {
  185. }
  186. });
  187. const {queryParams, form, rules} = toRefs(data);
  188. /** 查询失信记录名单列表 */
  189. function getList() {
  190. loading.value = true;
  191. let toServerObj = likeQueryMethod('uni_code', queryParams.value.uniCode, queryParams.value.pageNum, queryParams.value.pageSize);
  192. listDishonesty(toServerObj).then(response => {
  193. dishonestyList.value = response.records;
  194. total.value = response.total;
  195. loading.value = false;
  196. });
  197. }
  198. // 表单重置
  199. function reset() {
  200. form.value = {
  201. xhCodeId: null,
  202. CSID: null,
  203. XM: null,
  204. LX: null,
  205. ZXAH: null,
  206. ZZJGDM: null,
  207. ZXFY: null,
  208. FBR: null,
  209. LASJ: null,
  210. FBSJ: null,
  211. ZT: null,
  212. BPSJ: null,
  213. CXSJ: null,
  214. SXDQR: null,
  215. SXXWQX: null,
  216. CBRID: null,
  217. iTime: null,
  218. uniCode: ''
  219. };
  220. proxy.resetForm("dishonestyRef");
  221. }
  222. /** 搜索按钮操作 */
  223. function handleQuery() {
  224. queryParams.value.pageNum = 1;
  225. getList();
  226. }
  227. /** 重置按钮操作 */
  228. function resetQuery() {
  229. proxy.resetForm("queryRef");
  230. handleQuery();
  231. }
  232. // 多选框选中数据
  233. function handleSelectionChange(selection) {
  234. ids.value = selection.map(item => item.xhCodeId);
  235. single.value = selection.length != 1;
  236. multiple.value = !selection.length;
  237. }
  238. /** 删除按钮操作 */
  239. async function handleDelete(row) {
  240. const res = await delDishonesty();
  241. if(res.code == 200){
  242. ElMessage({
  243. type:'success',
  244. message:'删除成功'
  245. })
  246. getList();
  247. }
  248. }
  249. /** 批量删除*/
  250. const batchDelete = (row)=>{
  251. const idsToS = row.xhCodeId || ids.value;
  252. (proxy.$modal).confirm('是否确认删除这' + idsToS.length+'条的数据项?').then(function() {
  253. return delDishonestyBatch(toRaw(idsToS));
  254. }).then(() => {
  255. getList();
  256. proxy.$modal.msgSuccess("删除成功");
  257. }).catch(() => {});
  258. }
  259. /** 导出按钮操作 */
  260. function handleExport() {
  261. proxy.download('basicData/xcrRecordDishonesty/export', {
  262. ...queryParams.value
  263. }, `失信记录名单_${new Date().getTime()}.xlsx`)
  264. }
  265. getList();
  266. </script>