sunyadv 5 năm trước cách đây
mục cha
commit
16f4977f85

+ 1 - 0
ys_vue/build/webpack.prod.conf.js

@@ -54,6 +54,7 @@ var webpackConfig = merge(baseWebpackConfig, {
       filename: config.build.index,
       template: 'index.html',
       inject: true,
+      favicon: './cloud.ico',
       minify: {
         removeComments: true,
         collapseWhitespace: true,

+ 18 - 16
ys_vue/src/views/mold/moldDetail.vue

@@ -143,7 +143,7 @@
             
             <!-- 上传 报废5 时 -->
             <el-button
-                v-show="activeTab == 5 && update == 1 && abandonAble"
+                v-show="activeTab == 5 && update == 1 && abandonAble && moldDetail.managerId == user.id"
                 size="mini"
                 type="primary"
                 style="float: right;"
@@ -411,7 +411,7 @@
         <!-- 操作记录 -->
         <el-col :span="24" class="title">
                 {{activeTab == 4?"更新":"操作"}}记录
-                <el-button v-if="(user.subordinateType == 0 || user.subordinateType == 1 || user.id == moldDetail.managerId) && activeTab != 4" size="mini" type="primary" style="float: right;" @click="centerDialog5Visible = true">导出</el-button>
+                <el-button v-if="(user.subordinateType == 0 || user.subordinateType == 1 || user.id == moldDetail.managerId) && activeTab != 4" size="mini" type="primary" style="float: right;" @click="centerDialog5Visible = true;recordTime=''">导出</el-button>
             </el-col>
             <el-table v-show="activeTab != 4" :data="operations" highlight-current-row v-loading="listLoading" style="width: 100%;">
                 <el-table-column type="index" width="40"></el-table-column>
@@ -897,7 +897,7 @@
             checkUpdateState(){
                 this.updateAble = true;
                 this.documents.update.forEach(item => {
-                    if(item.state != "-1" || item.state != "-2"){
+                    if(item.state != "-1" && item.state != "-2"){
                         //有进行中的更新申请 现在不能再申请更新了
                         this.updateAble = false;
                     }
@@ -908,7 +908,7 @@
             checkAbandonState(){
                 this.abandonAble = true;
                 this.documents.abandon.forEach(item => {
-                    if(item.state != "-1" || item.state != "-2"){
+                    if(item.state != "-1" && item.state != "-2"){
                         //有进行中的报废申请 现在不能再申请报废了
                         this.abandonAble = false;
                     }
@@ -1496,20 +1496,22 @@
                     });
                 }else{
                     this.centerDialog5Visible = false;
-                    this.http.post( this.port.mold.exportOperationExcel, {
-                        mouldId: this.detailId,
-                        startTime: this.recordTime[0],
-                        endTime: this.recordTime[1]
-                    },
+                    this.http.get( this.port.mold.exportOperationExcel+ "?mouldId=" + this.detailId 
+                        + "&startTime=" + util.formatDate.format(new Date(this.recordTime[0]), 'yyyy-MM-dd')
+                        + "&endTime=" + util.formatDate.format(new Date(this.recordTime[1]), 'yyyy-MM-dd'),
                     res => {
                         if (res.code == "ok") {
-                            let aTag = document.createElement('a');
-                            let blob = new Blob([res.data]);
-                            var arr = res.data.split("/");
-                            aTag.download = arr.pop();
-                            aTag.href = URL.createObjectURL(blob);
-                            aTag.click();              
-                            URL.revokeObjectURL(blob);
+                            // let aTag = document.createElement('a');
+                            // let blob = new Blob([res.data]);
+                            // var arr = res.data.split("/");
+                            // aTag.download = arr.pop();
+                            // aTag.href = URL.createObjectURL(blob);
+                            // aTag.click();              
+                            // URL.revokeObjectURL(blob);
+                            let a = document.createElement('a')
+                            a.setAttribute('download', res.data.split("/")[2]);
+                            a.setAttribute("href", res.data);
+                            a.click();
                         } else {
                             this.$message({
                                 message: res.msg,

+ 9 - 6
ys_vue/src/views/mold/moldDownload.vue

@@ -230,15 +230,18 @@ export default {
     },
     //具体的下载
     downloadPost(type) {
-        this.http.post(
-            this.port.mold.moldFileDowloadFile,{
-                ids: this.selectedArray.join(","),
-                dwgType: type
-            },
+        this.http.get(
+            this.port.mold.moldFileDowloadFile + 
+                "?ids="+ this.selectedArray.join(",") + 
+                "&dwgType=" + type
+            ,
             res => {
                 this.listLoading = false;
                 if (res.code == "ok") {
-                    console.log(res);
+                    // let a = document.createElement('a')
+                    // a.setAttribute('download', res.data.splice("/")[2]);
+                    // a.setAttribute("href", res.data);
+                    // a.click();
                 } else {
                     this.$message({
                         message: res.msg,

+ 1 - 1
ys_vue/src/views/project/competence.vue

@@ -114,7 +114,7 @@
 				editFormVisible: false,//编辑界面是否显示
                 editLoading: false,
                 roleList: [
-                    {name:'修改',val:0,label:'uploadPower',uploadPower:false},
+                    {name:'上传',val:0,label:'uploadPower',uploadPower:false},
                     {name:'下载',val:1,label:'dowloadPower',dowloadPower:false},
                     {name:'浏览',val:2,label:'viewPower',viewPower:false},
                     {name:'审批',val:3,label:'approvalPower',approvalPower:false}