瀏覽代碼

0310文件共享添加字段

liuhj 2 月之前
父節點
當前提交
ae9dd37c11
共有 1 個文件被更改,包括 58 次插入14 次删除
  1. 58 14
      src/components/OP/SharedFile.vue

+ 58 - 14
src/components/OP/SharedFile.vue

@@ -5,7 +5,7 @@
             <div class="sharedsile-Groups">
                 <div class="sharedsile-Groups-li">
                     <label>文件类型:</label>
-                    <el-select @change="QuerySharedFile" v-model="filetype" clearable filterable placeholder="团组选择"
+                    <el-select size="small" @change="QuerySharedFile" v-model="filetype" clearable filterable placeholder="团组选择"
                         style="width: 150px;">
                         <el-option v-for="item in filetypelist" :key="item.id" :label="item.name" :value="item.id">
                         </el-option>
@@ -13,7 +13,7 @@
                 </div>
                 <div v-if="filetype == 1412" class="sharedsile-Groups-li">
                     <label>团组名称:</label>
-                    <el-select @change="QuerySharedFile" v-model="diIdselect" clearable filterable placeholder="团组选择"
+                    <el-select  size="small" @change="QuerySharedFile" v-model="diIdselect" clearable filterable placeholder="团组选择"
                         style="width: 300px;">
                         <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
                             :value="item.id">
@@ -32,6 +32,19 @@
             </div>
         </div>
         <div class="share-table">
+            <div style="margin-bottom: 8px;">
+                <el-date-picker
+                size="small" 
+                v-model="shdatetime"
+                type="daterange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+                </el-date-picker>
+                <el-input  size="small"  v-model="fileName" placeholder="请输入文件名称搜索" style="width: 300px; margin-right: 10px;"
+                    clearable @clear="handleSearch"></el-input>
+                <el-button  size="small"  type="primary" @click="handleSearch">搜索</el-button>
+            </div>
             <el-table :data="tabledata" border style="width: 100%">
                 <el-table-column prop="fileName" label="文件名称">
                 </el-table-column>
@@ -53,10 +66,14 @@
         <div v-if="filetype == 1412" class="sharedsile-ps">PS:请先选择团组再下载!</div>
         <div v-if="filetype == 1412" class="sharedsile-table">
             <div class="sharedsile-table-tr">
-                <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-name">文件名称</div>
-                <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-type">版本格式</div>
-                <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-Language">语言</div>
-                <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-download">操作</div>
+                <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-name">文件名称
+                </div>
+                <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-type">版本格式
+                </div>
+                <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-Language">语言
+                </div>
+                <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-download">操作
+                </div>
             </div>
             <div class="sharedsile-table-tr">
                 <div class="sharedsile-table-tb tb-name">OP行程单</div>
@@ -90,7 +107,7 @@
                     <el-button size="small" @click="Exportlist(1)" type="primary">下载</el-button>
                 </div>
             </div>
-            <div class="sharedsile-table-tr">
+            <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
                 <div class="sharedsile-table-tb tb-name">倒推表</div>
                 <div class="sharedsile-table-tb tb-type">WORD</div>
                 <div class="sharedsile-table-tb tb-Language">中文</div>
@@ -98,7 +115,7 @@
                     <el-button size="small" @click="PostInvertedListFileDownload" type="primary">下载</el-button>
                 </div>
             </div>
-            <div class="sharedsile-table-tr">
+            <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
                 <div class="sharedsile-table-tb tb-name">出国出境经费审核计算明细</div>
                 <div class="sharedsile-table-tb tb-type">WORD</div>
                 <div class="sharedsile-table-tb tb-Language">中文</div>
@@ -106,7 +123,7 @@
                     <el-button size="small" @click="eptschedule(1, 1005)" type="primary">下载</el-button>
                 </div>
             </div>
-            <div class="sharedsile-table-tr">
+            <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
                 <div class="sharedsile-table-tb tb-name">因公出国(境)经费测算明细表</div>
                 <div class="sharedsile-table-tb tb-type">WORD</div>
                 <div class="sharedsile-table-tb tb-Language">中文</div>
@@ -114,7 +131,7 @@
                     <el-button size="small" @click="eptschedule(1, 1006)" type="primary">下载</el-button>
                 </div>
             </div>
-            <div class="sharedsile-table-tr">
+            <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
                 <div class="sharedsile-table-tb tb-name">四川省商务厅出国经费财政先行审核表</div>
                 <div class="sharedsile-table-tb tb-type">EXCEL</div>
                 <div class="sharedsile-table-tb tb-Language">中文</div>
@@ -122,7 +139,7 @@
                     <el-button size="small" @click="eptschedule(1, 1007)" type="primary">下载</el-button>
                 </div>
             </div>
-            <div class="sharedsile-table-tr">
+            <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
                 <div class="sharedsile-table-tb tb-name">成都市因公临时出国任务和预算审批意见表(外专培训团专用)</div>
                 <div class="sharedsile-table-tb tb-type">WORD</div>
                 <div class="sharedsile-table-tb tb-Language">中文</div>
@@ -130,7 +147,7 @@
                     <el-button size="small" @click="eptschedule(1, 1066)" type="primary">下载</el-button>
                 </div>
             </div>
-            <div class="sharedsile-table-tr">
+            <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
                 <div class="sharedsile-table-tb tb-name">派员单位出(境)任务和预算审批意见表</div>
                 <div class="sharedsile-table-tb tb-type">WORD</div>
                 <div class="sharedsile-table-tb tb-Language">中文</div>
@@ -138,7 +155,7 @@
                     <el-button size="small" @click="eptschedule(2, 1008)" type="primary">下载</el-button>
                 </div>
             </div>
-            <div class="sharedsile-table-tr">
+            <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
                 <div class="sharedsile-table-tb tb-name">省级单位出(境)经费报销单</div>
                 <div class="sharedsile-table-tb tb-type">WORD</div>
                 <div class="sharedsile-table-tb tb-Language">中文</div>
@@ -179,12 +196,26 @@ export default {
             currentPage: 1, // 当前页码
             pageSize: 5, // 每页显示条数
             total: 0, // 总条数
+            isMarketingDepartment:false,
+            fileName:'',
+            shdatetime:[],
         }
     },
     methods: {
+        //处理时间
+        disposeTime(val){
+            var date = new Date(val);
+            var y = date.getFullYear();
+            var m = date.getMonth() + 1;
+            m = m < 10 ? ('0' + m) : m;
+            var d = date.getDate();
+            d = d < 10 ? ('0' + d) : d;
+            let time = y + '-' + m + '-' + d;
+            return time
+        },
         //基础数据
         SharedFileInit() {
-            var url = "/api/Groups/SharedFileInit"
+            var url = "/api/Groups/SharedFileInit?userid="+this.userId+"&portType=1"
             var that = this
             this.$axios({
                 method: 'get',
@@ -195,12 +226,18 @@ export default {
                     that.diIdselect = that.delegationInfoList[0].id;
                     that.filetypelist = res.data.data.dropDownType;
                     that.filetype = that.filetypelist[0].id;
+                    that.isMarketingDepartment=res.data.data.isMarketingDepartment;
                     that.QuerySharedFile();
                 } else {
                     that.$message.error(res.data.msg);
                 }
             })
         },
+        handleSearch(){
+            console.log(this.shdatetime);
+            
+            this.QuerySharedFile();
+        },
         //页面加载
         padeload() {
             var url = "/api/Business/PostGroupNameScreen"
@@ -230,6 +267,9 @@ export default {
         },
         //文件列表
         QuerySharedFile() {
+            if (this.shdatetime==null) {
+                this.shdatetime=[]
+            }
             var url = "/api/Groups/QuerySharedFile"
             var that = this
             this.$axios({
@@ -243,6 +283,9 @@ export default {
                     pageSize: that.pageSize,
                     fileType: that.filetype,
                     diid: that.filetype != 1412 ? 0 : that.diIdselect==""?0:that.diIdselect,
+                    fileName:that.fileName,
+                    startTime:that.shdatetime.length!=0?that.disposeTime(that.shdatetime[0]):"",
+                    endTime:that.shdatetime.length!=0?that.disposeTime(that.shdatetime[1]):"",
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
@@ -542,6 +585,7 @@ export default {
 
 .sharedsile-Groups {
     display: flex;
+    flex-wrap: wrap;
 }
 
 .sharedsile-btn {