From d768706fc26c7874a8ce5ad41ee4a62b8bde426d Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期二, 17 十月 2023 10:45:03 +0800
Subject: [PATCH] 校验关键属性规则写到后面
---
Source/UBCS-WEB/src/components/file/main.vue | 54 +++++++++++++++++++++++++++++++++++-------------------
1 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/file/main.vue b/Source/UBCS-WEB/src/components/file/main.vue
index 2391abf..8444c92 100644
--- a/Source/UBCS-WEB/src/components/file/main.vue
+++ b/Source/UBCS-WEB/src/components/file/main.vue
@@ -1,21 +1,22 @@
<template>
<basic-container>
<avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :page.sync="page"
- :before-open="beforeOpen"
- :permission="permissionList"
- v-model="form"
- ref="crud"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ :before-open="beforeOpen"
+ :permission="permissionList"
+ v-model="form"
+ ref="crud"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @row-click="selectedRowClick"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad">
<template slot="menuLeft">
<el-button v-if="hasUpload" type="primary"
size="small"
@@ -63,8 +64,8 @@
<script>
import {getList, getFile,upload,update, remove,download} from "@/api/resource/file";
import {mapGetters} from "vuex";
-import {dateFormat} from "@/util/date";
import {validatenull} from "@/util/validate";
+import func from "@/util/func";
export default {
props: ["options","visible","ownbizOid"],
@@ -87,7 +88,7 @@
hasDel:validatenull(this.options.hasDel) ? true :this.options.hasDel,
hasDownload:validatenull(this.options.hasDownload) ? true :this.options.hasDownload,
option: {
- height:(this.options.tableHeight?this.options.tableHeight:'200'),
+ height:(this.options.tableHeight?this.options.tableHeight:'400'),
calcHeight: 30,
tip: false,
searchShow: false,
@@ -380,15 +381,23 @@
let data=new FormData();
if(row && row.oid){
data.append('fileOids',row.oid)
- download(data)
+ this.downloadFile(data);
}else{
if (this.selectionList.length === 0) {
this.$message.warning("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
return;
}
data.append('fileOids',this.oids)
- download(data);
+ this.downloadFile(data);
}
+ },
+ downloadFile(data){
+ download(data).then(res=>{
+ // console.log(res);
+ if(res){
+ func.downloadFileByBlobHandler(res);
+ }
+ });
},
rowDel(row) {
this.$confirm("纭畾灏嗛�夋嫨鏂囦欢鍒犻櫎?", {
@@ -449,6 +458,13 @@
},
selectionChange(list) {
this.selectionList = list;
+ this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
+ },
+ selectedRowClick(row){
+ this.selectionList = row;
+ this.$refs.crud.toggleSelection();
+ this.$refs.crud.setCurrentRow(row);
+ this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
},
selectionClear() {
this.selectionList = [];
--
Gitblit v1.9.3