Explorar o código

附件增加word

sugangqiang hai 8 meses
pai
achega
3898be4977

+ 3 - 0
app/common/controller/Api.php

@@ -603,6 +603,8 @@ class Api extends BaseController {
         }
         $mime = $file->getMime();
         switch ($mime) {
+            case "application/msword"://word
+            case "application/vnd.openxmlformats-officedocument.wordprocessingml.document"://word
             case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"://xlsx
             case "application/pdf"://pdf
             case "application/vnd.ms-excel"://xls
@@ -1250,4 +1252,5 @@ class Api extends BaseController {
     public function getEnterpriseData() {
         
     }
+
 }

+ 2 - 0
public/static/modular/gate/talentAllowance/common/talentAllowanceInfo_select.js

@@ -65,6 +65,8 @@ TalentAllowanceInfoDlg.initFileTable = function () {
                         imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
                     } else if (suffix == "zip" || suffix == "rar" || suffix == '7z' || suffix == "ZIP" || suffix == "RAR" || suffix == '7Z') {
                         imgStr = '<a href=\"' + data[key].url + '\">' + data[key].orignName + '</a>';
+                    } else if (suffix == "doc" || suffix == "DOC" || suffix == 'docx' || suffix == "DOCX") {
+                        imgStr = '<a href=\"' + data[key].url + '\">' + data[key].orignName + '</a>';
                     } else {
                         imgStr = '<img class=\"imgUrl\"  src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
                     }

+ 2 - 0
public/static/modular/gate/talentAllowance/common/talentAllowance_info.js

@@ -704,6 +704,8 @@ TalentAllowanceInfoDlg.initFileTable = function () {
                         imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
                     } else if (suffix == "zip" || suffix == "rar" || suffix == '7z' || suffix == "ZIP" || suffix == "RAR" || suffix == '7Z') {
                         imgStr = '<a href=\"' + data[key].url + '\">' + data[key].orignName + '</a>';
+                    } else if (suffix == "doc" || suffix == "DOC" || suffix == 'docx' || suffix == "DOCX") {
+                        imgStr = '<a href=\"' + data[key].url + '\">' + data[key].orignName + '</a>';
                     } else {
                         imgStr = '<img class=\"imgUrl\"  src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
                     }