dev01 2 years ago
parent
commit
794284be96

public/temp/鐮斿彂椤圭洰楠屾敹鎶ュ憡妯℃澘.docx → public/temp/AcceptanceReport.docx


public/temp/椤圭洰璐熻矗浜哄強鐮斿彂浜哄憳妯℃澘.xls → public/temp/person.xls


BIN
public/temp/projectProposal.doc


BIN
public/temp/鐮旂┒鎴愭灉鎶ュ憡妯℃澘.xls


+ 1 - 1
src/utils/request.js

@@ -148,7 +148,7 @@ service.interceptors.response.use(res => {
 // 通用下载方法
 export function download(url, params, filename) {
   downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
-  return service.get(url, params, {
+  return service.post(url, params, {
     transformRequest: [(params) => { return tansParams(params) }],
     headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
     responseType: 'blob'

+ 2 - 2
src/views/admin/project/index.vue

@@ -216,7 +216,7 @@
         })
       },
       handleDownload(row) {
-        downLoadZip('/project/download/' +row.id, "项目附件")
+        downLoadZip('/ent/data/download/' +row.id, "项目附件")
       },
       handleDownloadBatch() {
         if(this.selectCount <= 0) {
@@ -224,7 +224,7 @@
           return
         }
         const delIds = this.ids.join(',')
-        downLoadZip('/project/download/' +delIds, "项目附件")
+        downLoadZip('/ent/data/download/' +delIds, "项目附件")
       },
       //编辑
       handleEdit(row) {

+ 188 - 185
src/views/common/registerFirst.vue

@@ -1,6 +1,6 @@
-<template>
+<template>
   <div class="app-container">
-    <div class="content">
+    <div class="content">
       <el-form ref="form" :model="form" :rules="registerRules" label-width="200px">
         <table class="table_register media">
           <tr>
@@ -15,9 +15,7 @@
             <th><span style="color: red;">*</span>统一社会信用代码</th>
             <td>
               <el-form-item label-width="0" prop="license">
-                <el-input type="text" @change="validLicense"
-                  v-model="form.license"
-                  placeholder="请输入统一社会信用代码">
+                <el-input type="text" @change="validLicense" v-model="form.license" placeholder="请输入统一社会信用代码">
                 </el-input>
               </el-form-item>
             </td>
@@ -26,9 +24,7 @@
             <th><span style="color: red;">*</span>注册资金</th>
             <td>
               <el-form-item label-width="0" prop="regCapital">
-                <el-input type="text"
-                  v-model="form.regCapital"
-                  placeholder="请输入注册资金">
+                <el-input type="text" v-model="form.regCapital" placeholder="请输入注册资金">
                   <template slot="append">万元</template>
                 </el-input>
               </el-form-item>
@@ -36,7 +32,8 @@
             <th><span style="color: red;">*</span>工商注册时间</th>
             <td>
               <el-form-item label-width="0" prop="regDate">
-                <el-date-picker v-model="form.regDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"></el-date-picker>
+                <el-date-picker v-model="form.regDate" type="date" placeholder="选择日期"
+                  value-format="yyyy-MM-dd"></el-date-picker>
               </el-form-item>
             </td>
           </tr>
@@ -45,7 +42,8 @@
             <td>
               <el-form-item label-width="0" prop="regType">
                 <el-select v-model="form.regType" filterable>
-                  <el-option v-for="item in regTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
+                  <el-option v-for="item in regTypeOptions" :key="item.dictValue" :label="item.dictLabel"
+                    :value="item.dictValue"></el-option>
                 </el-select>
               </el-form-item>
             </td>
@@ -53,7 +51,8 @@
             <td>
               <el-form-item label-width="0" prop="mainProducts">
                 <el-select v-model="form.mainProducts" style="width: 220px;" filterable>
-                  <el-option v-for="(item,index) in mainProductsOptions" :label="item.dictLabel" :key="index" :value="item.dictValue">{{item.dictLabel}}</el-option>
+                  <el-option v-for="(item, index) in mainProductsOptions" :label="item.dictLabel" :key="index"
+                    :value="item.dictValue">{{ item.dictLabel }}</el-option>
                 </el-select>
               </el-form-item>
             </td>
@@ -79,22 +78,27 @@
             <td colspan="3">
               <el-col :span="8">
                 <el-form-item label-width="0" prop="provinceId">
-                  <el-select v-model="form.provinceId" placeholder="省" @change="getCityData" style="width: 220px;" filterable>
-                    <el-option v-for="(item,index) in provinceDataList" :key="index" :label="item.name" :value="item.id"></el-option>
+                  <el-select v-model="form.provinceId" placeholder="省" @change="getCityData" style="width: 220px;"
+                    filterable>
+                    <el-option v-for="(item, index) in provinceDataList" :key="index" :label="item.name"
+                      :value="item.id"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item prop="cityId" label-width="0px">
-                  <el-select v-model="form.cityId" placeholder="市" @change="getDistrictData" style="width: 220px;" filterable>
-                    <el-option v-for="(item, index) in cityDataList" :key="index" :label="item.name" :value="item.id"></el-option>
+                  <el-select v-model="form.cityId" placeholder="市" @change="getDistrictData" style="width: 220px;"
+                    filterable>
+                    <el-option v-for="(item, index) in cityDataList" :key="index" :label="item.name"
+                      :value="item.id"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label-width="0px" prop="districtId">
                   <el-select v-model="form.districtId" placeholder="区" style="width: 220px;" filterable>
-                    <el-option v-for="(item, index) in districtDataList" :key="index" :label="item.name" :value="item.id"></el-option>
+                    <el-option v-for="(item, index) in districtDataList" :key="index" :label="item.name"
+                      :value="item.id"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -213,7 +217,8 @@
             <td>
               <el-form-item label-width="0" prop="listedFlag">
                 <el-radio-group v-model="form.listedFlag">
-                  <el-radio v-for="(item, index) in yesOrNoOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
+                  <el-radio v-for="(item, index) in yesOrNoOptions" :key="index"
+                    :label="item.dictValue">{{ item.dictLabel }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </td>
@@ -233,7 +238,8 @@
             <td>
               <el-form-item label-width="0" prop="investFlag">
                 <el-radio-group v-model="form.investFlag">
-                  <el-radio v-for="(item, index) in yesOrNoOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
+                  <el-radio v-for="(item, index) in yesOrNoOptions" :key="index"
+                    :label="item.dictValue">{{ item.dictLabel }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </td>
@@ -254,7 +260,8 @@
             <td>
               <el-form-item label-width="0" prop="techFlag">
                 <el-radio-group v-model="form.techFlag">
-                  <el-radio v-for="(item, index) in yesOrNoOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
+                  <el-radio v-for="(item, index) in yesOrNoOptions" :key="index"
+                    :label="item.dictValue">{{ item.dictLabel }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </td>
@@ -274,7 +281,8 @@
             <td>
               <el-form-item label-width="0" prop="deductionFlag">
                 <el-radio-group v-model="form.deductionFlag">
-                  <el-radio v-for="(item, index) in yesOrNoOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
+                  <el-radio v-for="(item, index) in yesOrNoOptions" :key="index"
+                    :label="item.dictValue">{{ item.dictLabel }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </td>
@@ -284,7 +292,8 @@
             <th><span style="color: red;">*</span>企业营业执照</th>
             <td colspan="3">
               <el-form-item label-width="3" prop="licensePath" ref="licenseUpload">
-                <ImageUpload @input="handleLicenseSuccess" :params="params" :limit="limit" :value="form.licensePath" :fileSize="fileSize"></ImageUpload>
+                <ImageUpload @input="handleLicenseSuccess" :params="params" :limit="limit" :value="form.licensePath"
+                  :fileSize="fileSize"></ImageUpload>
               </el-form-item>
             </td>
           </tr>
@@ -292,15 +301,8 @@
             <th>其他附件</th>
             <td colspan="3">
               <el-form-item prop="attachIds" label-width="0">
-                <el-upload
-                  class="upload-demo"
-                  :action="action"
-                  :on-preview="handlePreview"
-                  :before-remove="beforeRemove"
-                  :on-success="handleFileSuccess"
-                  multiple
-                  :data="params"
-                  :file-list="form.fileList">
+                <el-upload class="upload-demo" :action="action" :on-preview="handlePreview" :before-remove="beforeRemove"
+                  :on-success="handleFileSuccess" multiple :data="params" :file-list="form.fileList">
                   <el-button size="small" type="primary">点击上传</el-button>
                 </el-upload>
               </el-form-item>
@@ -311,48 +313,46 @@
             <th>文件水印</th>
             <td colspan="3">
               <el-form-item label-width="0" prop="logo" ref="logoUpload">
-                <ImageUpload @input="handleLogoSuccess" :params="params" :limit="limit" :value="form.logo" :fileSize="fileSize"></ImageUpload>
+                <ImageUpload @input="handleLogoSuccess" :params="params" :limit="limit" :value="form.logo"
+                  :fileSize="fileSize"></ImageUpload>
               </el-form-item>
             </td>
           </tr>
         </table>
-      <el-row :gutter="40" style="margin-top: 20px;">
-        <el-col :span="24">
-          <el-form-item style="width:100%;text-align: center;" label-width="0px">
-            <el-button
-              :loading="loading"
-              size="medium"
-              type="primary"
-              @click.native.prevent="handleRegister" style="width: 100px;">
-              <span v-if="!loading">注册</span>
-              <span v-else>注 册 中...</span>
-            </el-button>
-            <el-button size="medium" type="primary" style="width: 100px;" @click="cancel">取消</el-button>
-          </el-form-item>
-        </el-col>
-      </el-row>
-    </el-form>
-    </div>
-  </div>
-</template>
-
+        <el-row :gutter="40" style="margin-top: 20px;">
+          <el-col :span="24">
+            <el-form-item style="width:100%;text-align: center;" label-width="0px">
+              <el-button :loading="loading" size="medium" type="primary" @click.native.prevent="handleRegister"
+                style="width: 100px;">
+                <span v-if="!loading">注册</span>
+                <span v-else>注 册 中...</span>
+              </el-button>
+              <el-button size="medium" type="primary" style="width: 100px;" @click="cancel">取消</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+  </div>
+</template>
+
 <script>
-
-import { getCodeImg, registerEntApi,getEntUserById,entUserAudit,enterUserNoToken,getEnclosureApi,deleteEnclosureApi } from "@/api/login";
-import {getProvinceDataApi,getRegionChildrenApi,validLicenseApi} from "@/api/common/common"
-import { regTypeOptions,mainProductsOptions,yesOrNoOptions } from "@/utils/dataFormat"
+
+import { getCodeImg, registerEntApi, getEntUserById, entUserAudit, enterUserNoToken, getEnclosureApi, deleteEnclosureApi } from "@/api/login";
+import { getProvinceDataApi, getRegionChildrenApi, validLicenseApi } from "@/api/common/common"
+import { regTypeOptions, mainProductsOptions, yesOrNoOptions } from "@/utils/dataFormat"
 import FileUpload from '@/components/FileUpload'
 import ImageUpload from '@/components/ImageUpload'
-import { validIDcard,validAmount} from '@/utils/validate'
-import { validNumber,validZh } from '@/utils/validate'
-
-export default {
+import { validIDcard, validAmount } from '@/utils/validate'
+import { validNumber, validZh } from '@/utils/validate'
+
+export default {
   name: "First",
   components: {
     FileUpload,
     ImageUpload
-  },
-  data() {
+  },
+  data() {
     return {
       action: process.env.VUE_APP_BASE_API + "/common/attach/upload", // 上传的图片服务器地址
       tokenVisile: false,
@@ -370,14 +370,14 @@ export default {
       list: [],
       token: '',
       cityName: '',
-      districtName: '',
+      districtName: '',
       codeUrl: "",
       regTypeOptions: regTypeOptions,
       mainProductsOptions: mainProductsOptions,
       yesOrNoOptions: yesOrNoOptions,
       provinceDataList: [],
       cityDataList: [],
-      districtDataList: [],
+      districtDataList: [],
       form: {
         startDate: '',
         endDate: '',
@@ -385,20 +385,20 @@ export default {
         provinceId: '',
         cityId: '',
         districtId: '',
-        mainProducts: '',
-        userName: "",
+        mainProducts: '',
+        userName: "",
         techFlag: 1,
         listedFlag: 1,
         investFlag: 1,
-        deductionFlag: 1
-      },
-      registerRules: {
+        deductionFlag: 1
+      },
+      registerRules: {
         userName: [
           { required: true, trigger: "blur", message: "请输入您的账号" },
           { min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
         ],
         email: [
-          { required: true, trigger: ["blur", "change"], message: "请输入邮箱",type: "email", },
+          { required: true, trigger: ["blur", "change"], message: "请输入邮箱", type: "email", },
         ],
         entName: [
           { required: true, trigger: "blur", message: "请输入企业名称" },
@@ -406,11 +406,11 @@ export default {
         ],
         license: [
           { required: true, trigger: "blur", message: "请输入统一社会信用代码" },
-          {min: 18,max: 18, message: '请输入正确的统一社会信用代码格式', trigger: 'blur' }
+          { min: 18, max: 18, message: '请输入正确的统一社会信用代码格式', trigger: 'blur' }
         ],
         regCapital: [
           { required: true, trigger: "blur", message: "请输入注册资金" },
-          { validator: validAmount, trigger: 'blur'}
+          { validator: validAmount, trigger: 'blur' }
         ],
         regDate: [
           { required: true, trigger: "change", message: "请选择工商注册时间" },
@@ -423,12 +423,12 @@ export default {
         ],
         address: [
           { required: true, trigger: "blur", message: "请输入通信地址" },
-          {max: 200, message: '最多输入200个字符', trigger: 'blur' }
+          { max: 200, message: '最多输入200个字符', trigger: 'blur' }
         ],
         zipCode: [
           { required: true, trigger: "blur", message: "请输入邮政编码" },
-          { validator: validNumber, trigger: 'blur'},
-          {max: 6, message: '最多输入6位数字', trigger: 'blur' }
+          { validator: validNumber, trigger: 'blur' },
+          { max: 6, message: '最多输入6位数字', trigger: 'blur' }
         ],
         provinceId: [
           { required: true, trigger: "change", message: "请选择省份" },
@@ -441,15 +441,15 @@ export default {
         ],
         taxOffice: [
           { required: true, trigger: "blur", message: "企业所得税主管税务机关" },
-          {max: 30, message: '最多输入30个字符', trigger: 'blur' }
+          { max: 30, message: '最多输入30个字符', trigger: 'blur' }
         ],
         legalName: [
           { required: true, trigger: "blur", message: "请输入姓名" },
-          {max: 30, message: '最多输入30个字符', trigger: 'blur' }
+          { max: 30, message: '最多输入30个字符', trigger: 'blur' }
         ],
         legalIdCard: [
           { required: true, trigger: "blur", message: "请输入身份证号码" },
-          { validator: validIDcard, trigger: 'blur'}
+          { validator: validIDcard, trigger: 'blur' }
         ],
         legalMobile: [
           { required: true, trigger: "blur", message: "请输入手机号码" },
@@ -461,11 +461,11 @@ export default {
         ],
         linkName: [
           { required: true, trigger: "blur", message: "请输入姓名" },
-          {max: 30, message: '最多输入30个字符', trigger: 'blur' }
+          { max: 30, message: '最多输入30个字符', trigger: 'blur' }
         ],
         linkIdCard: [
           { required: true, trigger: "blur", message: "请输入身份证号码" },
-          { validator: validIDcard, trigger: 'blur'}
+          { validator: validIDcard, trigger: 'blur' }
         ],
         linkMobile: [
           { required: true, trigger: "blur", message: "请输入手机号码" },
@@ -480,21 +480,21 @@ export default {
         ],
         listingCode: [
           { required: true, trigger: "blur", message: "请输入企业上市代码" },
-          {max: 30, message: '最多输入30个字符', trigger: 'blur' }
+          { max: 30, message: '最多输入30个字符', trigger: 'blur' }
         ],
         investFlag: [
           { required: true, trigger: "change", message: "请选择是否引入风险投资" },
         ],
         investCapital: [
           { required: true, trigger: "blur", message: "请输入风险投资金额" },
-          { validator: validAmount, trigger: 'blur'}
+          { validator: validAmount, trigger: 'blur' }
         ],
         techFlag: [
           { required: true, trigger: "change", message: "请选择是否为高新企业" },
         ],
         techCode: [
           { required: true, trigger: "blur", message: "请输入高新企业编号" },
-          {max: 30, message: '最多输入30个字符', trigger: 'blur' }
+          { max: 30, message: '最多输入30个字符', trigger: 'blur' }
         ],
         deductionFlag: [
           { required: true, trigger: "change", message: "请选择是否做加计扣除" },
@@ -502,27 +502,27 @@ export default {
         licensePath: [
           { required: true, trigger: "change", message: "请上传营业执照附件" },
         ],
-      },
-      loading: false,
+      },
+      loading: false,
       captchaOnOff: true,
-      returnFlag: true
-    };
-  },
-  created() {
+      returnFlag: true
+    };
+  },
+  created() {
     this.getCode();
     this.getProvinceData()
     this.token = this.$route.query.token || ''
-    if(this.token) {
+    if (this.token) {
       this.getData()
-    }
-  },
+    }
+  },
   methods: {
     handlePreview(file) {
       if (file) {
         const addTypeArray = file.name.split(".");
         const addType = addTypeArray[addTypeArray.length - 1];
         let filePath = ""
-        if(file.id) {
+        if (file.id) {
           filePath = file.url
         } else {
           filePath = file.response.data.url
@@ -546,20 +546,20 @@ export default {
             message: "该文件类型暂不支持预览",
             type: "warning",
           });
-           return false;
+          return false;
         }
       }
     },
     beforeRemove(file, fileList) {
-      if(file.id) {
+      if (file.id) {
         const id = file.id
         let _this = this
         return this.$confirm('是否确认删除该数据?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-        }).then(function() {
-          return deleteEnclosureApi(_this.token,id);
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return deleteEnclosureApi(_this.token, id);
         }).then(() => {
           this.$modal.msgSuccess("删除成功");
         })
@@ -568,26 +568,26 @@ export default {
     handleFileSuccess(response, file, fileList) {
       this.form.attachIds = []
       fileList.forEach(item => {
-        if(item.id) {
+        if (item.id) {
           this.form.attachIds.push(item.id)
-        }else {
+        } else {
           this.form.attachIds.push(item.response.data.id)
         }
       })
     },
     validLicense(val) {
-      if(val) {
+      if (val) {
         validLicenseApi(val).then(res => {
           // true存在
-          if(res.data) {
+          if (res.data) {
             this.$message.error('统一社会信用代码已经存在,不可以重复注册');
           }
         })
       }
-      
+
     },
     getEnclosureData() {
-      getEnclosureApi(this.token,this.attachType, this.dataId).then(res => {
+      getEnclosureApi(this.token, this.attachType, this.dataId).then(res => {
         this.list = res.data.records
         this.list.map(item => {
           item.name = item.fileName
@@ -603,20 +603,20 @@ export default {
         this.form = res.data || {}
         this.dataId = res.data.id || ""
         this.params.dataId = this.dataId || ""
-        if(this.dataId) {
+        if (this.dataId) {
           this.getEnclosureData()
         }
         this.form.provinceId = res.data.provinceId
-        if(this.form.provinceId) {
+        if (this.form.provinceId) {
           getRegionChildrenApi(this.form.provinceId).then(res => {
-            if(res.code == 200) {
+            if (res.code == 200) {
               this.cityDataList = res.data
             }
           })
         }
-        if(this.form.cityId) {
+        if (this.form.cityId) {
           getRegionChildrenApi(this.form.cityId).then(res => {
-            if(res.code == 200) {
+            if (res.code == 200) {
               this.districtDataList = res.data
             }
           })
@@ -646,14 +646,14 @@ export default {
       this.form.cityId = ''
       this.form.districtId = ''
       getRegionChildrenApi(this.form.provinceId).then(res => {
-        if(res.code == 200) {
+        if (res.code == 200) {
           this.cityDataList = res.data
 
           let obj = this.provinceDataList.find(item => {
             return item.id == this.form.provinceId
           })
           this.provinceName = obj.name
-          this.form.taxOffice = '国家税务总局'+this.provinceName+'税务局'
+          this.form.taxOffice = '国家税务总局' + this.provinceName + '税务局'
         }
       })
     },
@@ -661,14 +661,14 @@ export default {
     getDistrictData() {
       this.form.districtId = ''
       getRegionChildrenApi(this.form.cityId).then(res => {
-        if(res.code == 200) {
+        if (res.code == 200) {
           this.districtDataList = res.data
 
           let obj = this.cityDataList.find(item => {
             return item.id == this.form.cityId
           })
           this.cityName = obj.name
-          this.form.taxOffice = '国家税务总局'+this.cityName+'税务局'
+          this.form.taxOffice = '国家税务总局' + this.cityName + '税务局'
         }
       })
     },
@@ -677,19 +677,19 @@ export default {
         return item.id == this.form.districtId
       })
       this.districtName = obj.name
-      this.form.taxOffice = '国家税务总局'+this.districtName+'税务局'
+      this.form.taxOffice = '国家税务总局' + this.districtName + '税务局'
     },
     getProvinceData() {
       getProvinceDataApi().then(res => {
-        if(res.code == 200) {
+        if (res.code == 200) {
           this.provinceDataList = res.data
           this.form.provinceId = '1481196860266852481'
           getRegionChildrenApi(this.form.provinceId).then(res => {
-            if(res.code == 200) {
+            if (res.code == 200) {
               this.cityDataList = res.data
               this.form.cityId = '1481196860266852482'
               getRegionChildrenApi(this.form.cityId).then(res => {
-                if(res.code == 200) {
+                if (res.code == 200) {
                   this.districtDataList = res.data
                 }
               })
@@ -698,21 +698,21 @@ export default {
         }
       })
       this.form.taxOffice = '国家税务总局长沙市税务局'
-    },
-    getCode() {
-      getCodeImg().then(res => {
-        this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
-        if (this.captchaOnOff) {
-          this.codeUrl = "data:image/gif;base64," + res.img;
-          this.form.uuid = res.uuid;
-        }
-      });
-    },
+    },
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
+        if (this.captchaOnOff) {
+          this.codeUrl = "data:image/gif;base64," + res.img;
+          this.form.uuid = res.uuid;
+        }
+      });
+    },
     handleRegister() {
-      this.$refs.form.validate((valid,obj) => {
-        if (valid) {
+      this.$refs.form.validate((valid, obj) => {
+        if (valid) {
           this.loading = true;
-          if(this.token) {
+          if (this.token) {
             entUserAudit(this.token, this.form).then(res => {
               this.$alert("注册信息修改成功", '系统提示', {
                 dangerouslyUseHTMLString: true,
@@ -721,31 +721,32 @@ export default {
                 this.$store.dispatch('LogOut').then(() => {
                   this.$router.push("/login");
                 })
-              }).catch(() => {});
+              }).catch(() => { });
             }).catch(() => {
               this.loading = false;
             })
           } else {
             validLicenseApi(this.form.license).then(res => {
-              if(res.data) {
+              if (res.data) {
                 this.$message.error('统一社会信用代码已经存在,不可以重复注册');
                 this.loading = false;
-              }else {
+              } else {
                 registerEntApi(this.form).then(res => {
-                  const userName = this.form.userName;
-                  this.$alert("<font color='red'>您已注册成功,账户为统一信用代码,密码为默认123456。请等待审核通过后登录平台进行操作。</font>", '系统提示', {
-                    dangerouslyUseHTMLString: true,
-                    type: 'success'
-                  }).then(() => {
-                    this.$router.push("/login");
-                  }).catch(() => {});
+                  if (res.code == 200) {
+                    this.$alert("<font color='red'>您已注册成功,账户为统一信用代码,密码为默认123456。请等待审核通过后登录平台进行操作。</font>", '系统提示', {
+                      dangerouslyUseHTMLString: true,
+                      type: 'success'
+                    }).then(() => {
+                      this.$router.push("/login");
+                    }).catch(() => { });
+                  }
                 }).catch(() => {
                   this.loading = false;
                 })
               }
             })
-          }
-        }else {
+          }
+        } else {
           const a = []
           for (let key in obj) {
             a.push(obj[key][0].message)
@@ -755,49 +756,51 @@ export default {
             type: "warning"
           })
           return false
-        }
-      });
+        }
+      });
     },
     cancel() {
       this.$router.go(-1);
-    }
-  }
-};
-</script>
-
-<style lang="scss" scoped>
-  .content {
-    width: 1200px;
-    margin: 0 auto;
-    overflow: hidden;
-  }
-  .register {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    height: 900px;
-    overflow-y: auto;
-    scroll-behavior: auto;
-    background-image: url("../../assets/images/login-background.jpg");
-    background-size: cover;
-  }
-  .title {
-    margin: 0px auto 30px auto;
-    text-align: center;
-    color: #FFFFFF;
+    }
   }
-  // @media ( max-width : 850px) {
-  //   .media {
-  //     display: none !important;
-  //   }
-  // }
-  // @media ( min-width: 850px ) {
-  //   .media-short {
-  //     display: none !important;
-  //   }
-  // }
-  .th_tips {
-    color: #4882B5;
-    font-size: 16px;
-  }
-</style>
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+  width: 1200px;
+  margin: 0 auto;
+  overflow: hidden;
+}
+
+.register {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 900px;
+  overflow-y: auto;
+  scroll-behavior: auto;
+  background-image: url("../../assets/images/login-background.jpg");
+  background-size: cover;
+}
+
+.title {
+  margin: 0px auto 30px auto;
+  text-align: center;
+  color: #FFFFFF;
+}
+
+// @media ( max-width : 850px) {
+//   .media {
+//     display: none !important;
+//   }
+// }
+// @media ( min-width: 850px ) {
+//   .media-short {
+//     display: none !important;
+//   }
+// }
+.th_tips {
+  color: #4882B5;
+  font-size: 16px;
+}</style>

+ 355 - 318
src/views/enterprise/project/components/enclosure-edit.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="app-container">
     <div>
-      <b style="color: red;font-size: 15px;">根据您填报的项目信息,系统自动将需要上传的文件列出,每种类型文件只能上传单个文件(大小限制4M),如有多个请打包上传!</b><br><b style="color: red;font-size: 15px;">技术人员上传1-7项相关文件,财务人员上传8-10项相关文件。当技术、财务资料达到 100%时,可提交项目申报。</b>
+      <b style="color: red;font-size: 15px;">根据您填报的项目信息,系统自动将需要上传的文件列出,每种类型文件只能上传单个文件(大小限制4M),如有多个请打包上传!</b><br><b
+        style="color: red;font-size: 15px;">技术人员上传1-7项相关文件,财务人员上传8-10项相关文件。当技术、财务资料达到 100%时,可提交项目申报。</b>
     </div>
     <h3 class="toolbar">
       <!-- <span class="title">加计扣除备查资料清单</span> -->
@@ -12,36 +13,39 @@
     <el-form ref="form" :model="form" label-width="180px">
       <div class="table-con">
         <table class="table_register mt20 tablebar" style="width: 100%;">
-              <tr>
-                <th colspan="4" class="th_title">1、项目计划书
-                </th>
-              </tr>
-              <tr>
-                <th>项目计划书导入</th>
-                <td colspan="3">
-                  <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('9')" v-if="techFlag && list9.length<=0">上传</el-button>
-                </td>
-              </tr>
-              <tr>
-                <th>下载</th>
-                <td colspan="3">
-                  <ul>
-                    <li v-for="(item, index) in list9" :key="index" style="margin: 2px;">
-                      <el-row :gutter="20">
-                        <el-col :span="12">
-                          <a :href="item.url">{{item.fileName}}</a>
-                        </el-col>
-                        <el-col :span="12">
-                          <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                          <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
-                        </el-col>
-                      </el-row>
-                    </li>
-                  </ul>
+          <tr>
+            <th colspan="4" class="th_title">1、项目计划书
+            </th>
+          </tr>
+          <tr>
+            <th>项目计划书导入</th>
+            <td colspan="3">
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('9')"
+                v-if="techFlag && list9.length <= 0">上传</el-button>
+            </td>
+          </tr>
+          <tr>
+            <th>下载</th>
+            <td colspan="3">
+              <ul>
+                <li v-for="(item, index) in list9" :key="index" style="margin: 2px;">
+                  <el-row :gutter="20">
+                    <el-col :span="12">
+                      <a :href="item.url">{{ item.fileName }}</a>
+                    </el-col>
+                    <el-col :span="12">
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="techFlag">删除</el-button>
+                    </el-col>
+                  </el-row>
+                </li>
+              </ul>
 
-                </td>
-              </tr>
-            </table>
+            </td>
+          </tr>
+        </table>
 
         <table class="table_register mt20 tablebar" style="width: 100%;">
 
@@ -49,33 +53,36 @@
             <th colspan="4" class="th_title">2、研发项目验收报告
             </th>
           </tr>
-            <tr>
-              <th>验收报告导入</th>
-              <td colspan="3">
-                <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('10')" v-if="techFlag && list10.length <= 0">上传</el-button>
-                <el-button type="primary" size="mini">
-                  <a href="/temp/研发项目验收报告模板.docx">模板下载</a>
-                </el-button>
-              </td>
-            </tr>
-            <tr>
-              <th>下载</th>
-              <td colspan="3">
-                <ul>
-                  <li v-for="(item, index) in list10" :key="index" style="margin: 2px;">
-                    <el-row :gutter="20">
-                      <el-col :span="12">
-                        <a :href="item.url">{{item.fileName}}</a>
-                      </el-col>
-                      <el-col :span="12">
-                        <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                        <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
-                      </el-col>
-                    </el-row>
-                  </li>
-                </ul>
-              </td>
-            </tr>
+          <tr>
+            <th>验收报告导入</th>
+            <td colspan="3">
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('10')"
+                v-if="techFlag && list10.length <= 0">上传</el-button>
+              <el-button type="primary" size="mini">
+                <a href="/temp/AcceptanceReport.docx">模板下载</a>
+              </el-button>
+            </td>
+          </tr>
+          <tr>
+            <th>下载</th>
+            <td colspan="3">
+              <ul>
+                <li v-for="(item, index) in list10" :key="index" style="margin: 2px;">
+                  <el-row :gutter="20">
+                    <el-col :span="12">
+                      <a :href="item.url">{{ item.fileName }}</a>
+                    </el-col>
+                    <el-col :span="12">
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="techFlag">删除</el-button>
+                    </el-col>
+                  </el-row>
+                </li>
+              </ul>
+            </td>
+          </tr>
 
         </table>
         <table class="table_register mt20 tablebar" style="width: 100%;">
@@ -86,7 +93,8 @@
           <tr>
             <th>研究过程资料导入</th>
             <td colspan="3">
-              <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('11')" v-if="techFlag && list11.length <= 0">上传</el-button>
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('11')"
+                v-if="techFlag && list11.length <= 0">上传</el-button>
             </td>
           </tr>
           <tr>
@@ -96,11 +104,13 @@
                 <li v-for="(item, index) in list11" :key="index" style="margin: 2px;">
                   <el-row :gutter="20">
                     <el-col :span="12">
-                      <a :href="item.url">{{item.fileName}}</a>
+                      <a :href="item.url">{{ item.fileName }}</a>
                     </el-col>
                     <el-col :span="12">
-                      <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                      <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="techFlag">删除</el-button>
                     </el-col>
                   </el-row>
                 </li>
@@ -116,9 +126,10 @@
           <tr>
             <th>决议文件导入</th>
             <td colspan="3">
-              <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('1')" v-if="techFlag && list1.length <= 0">上传</el-button>
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('1')"
+                v-if="techFlag && list1.length <= 0">上传</el-button>
               <el-button type="primary" size="mini">
-                <a href="/temp/项目立项书模板.doc">模板下载</a>
+                <a href="/temp/projectProposal.doc">模板下载</a>
               </el-button>
             </td>
           </tr>
@@ -129,11 +140,13 @@
                 <li v-for="(item, index) in list1" :key="index" style="margin: 2px;">
                   <el-row :gutter="20">
                     <el-col :span="12">
-                      <a :href="item.url">{{item.fileName}}</a>
+                      <a :href="item.url">{{ item.fileName }}</a>
                     </el-col>
                     <el-col :span="12">
-                      <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                      <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="techFlag">删除</el-button>
                     </el-col>
                   </el-row>
                 </li>
@@ -149,9 +162,10 @@
           <tr>
             <th>研发人员名单导入</th>
             <td colspan="3">
-              <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('2')" v-if="techFlag && list2.length <= 0">上传</el-button>
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('2')"
+                v-if="techFlag && list2.length <= 0">上传</el-button>
               <el-button type="primary" size="mini">
-                <a href="/temp/项目负责人及研发人员模板.xls">模板下载</a>
+                <a href="/temp/person.xls">模板下载</a>
               </el-button>
 
             </td>
@@ -163,11 +177,13 @@
                 <li v-for="(item, index) in list2" :key="index" style="margin: 2px;">
                   <el-row :gutter="20">
                     <el-col :span="12">
-                      <a :href="item.url">{{item.fileName}}</a>
+                      <a :href="item.url">{{ item.fileName }}</a>
                     </el-col>
                     <el-col :span="12">
-                      <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                      <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="techFlag">删除</el-button>
                     </el-col>
                   </el-row>
                 </li>
@@ -185,7 +201,8 @@
             <td>
               <el-form-item prop="contractFlag" label-width="0">
                 <el-radio-group v-model="form.contractFlag" :disabled="disabledFlag">
-                  <el-radio v-for="(item, index) in booleanOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
+                  <el-radio v-for="(item, index) in booleanOptions" :key="index"
+                    :label="item.dictValue">{{ item.dictLabel }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </td>
@@ -194,7 +211,8 @@
             <tr>
               <th>研究开发合同导入</th>
               <td colspan="3">
-                <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('3')" v-if="techFlag && list3.length <= 0">上传</el-button>
+                <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('3')"
+                  v-if="techFlag && list3.length <= 0">上传</el-button>
               </td>
             </tr>
             <tr>
@@ -204,11 +222,13 @@
                   <li v-for="(item, index) in list3" :key="index" style="margin: 2px;">
                     <el-row :gutter="20">
                       <el-col :span="12">
-                        <a :href="item.url">{{item.fileName}}</a>
+                        <a :href="item.url">{{ item.fileName }}</a>
                       </el-col>
                       <el-col :span="12">
-                        <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                        <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
+                        <el-button type="primary" icon="el-icon-download" size="mini"
+                          @click="handleDownload(item.id)">下载</el-button>
+                        <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                          v-if="techFlag">删除</el-button>
                       </el-col>
                     </el-row>
                   </li>
@@ -228,7 +248,8 @@
           <tr>
             <th>“研发支出”辅助账及汇总表导入</th>
             <td colspan="3">
-              <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('6')" v-if="techFlag && list6.length <= 0">上传</el-button>
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('6')"
+                v-if="techFlag && list6.length <= 0">上传</el-button>
             </td>
           </tr>
           <tr>
@@ -238,11 +259,13 @@
                 <li v-for="(item, index) in list6" :key="index" style="margin: 2px;">
                   <el-row :gutter="20">
                     <el-col :span="12">
-                      <a :href="item.url">{{item.fileName}}</a>
+                      <a :href="item.url">{{ item.fileName }}</a>
                     </el-col>
                     <el-col :span="12">
-                      <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                      <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="techFlag">删除</el-button>
                     </el-col>
                   </el-row>
                 </li>
@@ -260,7 +283,8 @@
             <td>
               <el-form-item prop="appraisalFlag" label-width="0">
                 <el-radio-group v-model="form.appraisalFlag" :disabled="disabledFlag">
-                  <el-radio v-for="(item, index) in booleanOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
+                  <el-radio v-for="(item, index) in booleanOptions" :key="index"
+                    :label="item.dictValue">{{ item.dictLabel }}</el-radio>
                 </el-radio-group>
               </el-form-item>
             </td>
@@ -269,7 +293,8 @@
             <tr>
               <th>科技主管部门鉴定意见导入</th>
               <td colspan="3">
-                <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('7')" v-if="techFlag && list7.length <= 0">上传</el-button>
+                <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('7')"
+                  v-if="techFlag && list7.length <= 0">上传</el-button>
               </td>
             </tr>
             <tr>
@@ -279,11 +304,13 @@
                   <li v-for="(item, index) in list7" :key="index" style="margin: 2px;">
                     <el-row :gutter="20">
                       <el-col :span="12">
-                        <a :href="item.url">{{item.fileName}}</a>
+                        <a :href="item.url">{{ item.fileName }}</a>
                       </el-col>
                       <el-col :span="12">
-                        <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                        <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="techFlag">删除</el-button>
+                        <el-button type="primary" icon="el-icon-download" size="mini"
+                          @click="handleDownload(item.id)">下载</el-button>
+                        <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                          v-if="techFlag">删除</el-button>
                       </el-col>
                     </el-row>
                   </li>
@@ -303,7 +330,8 @@
           <tr>
             <th>费用分配说明导入</th>
             <td colspan="3">
-              <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('4')" v-if="finFlag && list4.length <= 0">上传</el-button>
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('4')"
+                v-if="finFlag && list4.length <= 0">上传</el-button>
             </td>
           </tr>
           <tr>
@@ -313,11 +341,13 @@
                 <li v-for="(item, index) in list4" :key="index" style="margin: 2px;">
                   <el-row :gutter="20">
                     <el-col :span="12">
-                      <a :href="item.url">{{item.fileName}}</a>
+                      <a :href="item.url">{{ item.fileName }}</a>
                     </el-col>
                     <el-col :span="12">
-                      <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                      <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="finFlag">删除</el-button>
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="finFlag">删除</el-button>
                     </el-col>
                   </el-row>
                 </li>
@@ -333,7 +363,8 @@
           <tr>
             <th>资料导入</th>
             <td colspan="3">
-              <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('5')"v-if="finFlag && list5.length <= 0">上传</el-button>
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('5')"
+                v-if="finFlag && list5.length <= 0">上传</el-button>
             </td>
           </tr>
           <tr>
@@ -343,11 +374,13 @@
                 <li v-for="(item, index) in list5" :key="index" style="margin: 2px;">
                   <el-row :gutter="20">
                     <el-col :span="12">
-                      <a :href="item.url">{{item.fileName}}</a>
+                      <a :href="item.url">{{ item.fileName }}</a>
                     </el-col>
                     <el-col :span="12">
-                      <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                      <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="finFlag">删除</el-button>
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="finFlag">删除</el-button>
                     </el-col>
                   </el-row>
                 </li>
@@ -363,7 +396,8 @@
           <tr>
             <th>优惠明细表导入</th>
             <td colspan="3">
-              <el-button type="primary"  icon="el-icon-upload2" size="mini" @click="handleUpload('8')" v-if="finFlag && list8.length <= 0">上传</el-button>
+              <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleUpload('8')"
+                v-if="finFlag && list8.length <= 0">上传</el-button>
             </td>
           </tr>
           <tr>
@@ -373,11 +407,13 @@
                 <li v-for="(item, index) in list8" :key="index" style="margin: 2px;">
                   <el-row :gutter="20">
                     <el-col :span="12">
-                      <a :href="item.url">{{item.fileName}}</a>
+                      <a :href="item.url">{{ item.fileName }}</a>
                     </el-col>
                     <el-col :span="12">
-                      <el-button type="primary"  icon="el-icon-download" size="mini" @click="handleDownload(item.id)">下载</el-button>
-                      <el-button type="primary"  icon="el-icon-delete" size="mini" @click="handleDelete(item.id)" v-if="finFlag">删除</el-button>
+                      <el-button type="primary" icon="el-icon-download" size="mini"
+                        @click="handleDownload(item.id)">下载</el-button>
+                      <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleDelete(item.id)"
+                        v-if="finFlag">删除</el-button>
                     </el-col>
                   </el-row>
                 </li>
@@ -390,7 +426,8 @@
         <el-row :gutter="40">
           <el-col :span="24">
             <el-form-item style="width:100%;text-align: center;" label-width="0px" class="mt20">
-              <el-button :loading="loading" size="medium" type="primary" @click.native.prevent="submitForm" style="width: 100px;">保存</el-button>
+              <el-button :loading="loading" size="medium" type="primary" @click.native.prevent="submitForm"
+                style="width: 100px;">保存</el-button>
               <el-button size="medium" type="primary" style="width: 100px;" @click="cancel">取消</el-button>
             </el-form-item>
           </el-col>
@@ -399,246 +436,246 @@
     </el-form>
     <!-- 技术 -->
 
-    <upload-enclosure ref="uploadEnclosure" v-if="enclosureVisible" @refreshData="getList()" :dataId="dataId" :attachType="'PROJECT'"></upload-enclosure>
+    <upload-enclosure ref="uploadEnclosure" v-if="enclosureVisible" @refreshData="getList()" :dataId="dataId"
+      :attachType="'PROJECT'"></upload-enclosure>
   </div>
 </template>
 
 <script>
-  import {getEnclosureApi,deleteEnclosureApi,getProjectInfoApi,downloadApi,declareUpdateApi} from '@/api/enterprise/project/project'
-  import UploadEnclosure from './UploadEnclosure'
-  import { getExtend, readBuffer, render } from '@/utils/util';
-  import { parse } from 'qs';
-  import axios from 'axios'
-  import FileUpload from '@/components/FileUpload'
-  import { downLoadZip } from "@/utils/zipdownload";
-  import { booleanOptions } from "@/utils/dataFormat"
-  export default {
-    components: {
-      UploadEnclosure,
-      FileUpload
+import { getEnclosureApi, deleteEnclosureApi, getProjectInfoApi, downloadApi, declareUpdateApi } from '@/api/enterprise/project/project'
+import UploadEnclosure from './UploadEnclosure'
+import { getExtend, readBuffer, render } from '@/utils/util';
+import { parse } from 'qs';
+import axios from 'axios'
+import FileUpload from '@/components/FileUpload'
+import { downLoadZip } from "@/utils/zipdownload";
+import { booleanOptions } from "@/utils/dataFormat"
+export default {
+  components: {
+    UploadEnclosure,
+    FileUpload
+  },
+  props: {
+    type: {
+      type: String
     },
-    props: {
-      type: {
-        type: String
+    info: {
+      type: Object,
+      default: function () {
+        return {}
+      }
+    }
+  },
+  data() {
+    return {
+      disabledFlag: false,
+      form: {
+        contractFlag: false,
+        reportFlag: false,
+        appraisalFlag: false
       },
-      info: {
-        type: Object,
-        default: function () {
-          return {}
+      booleanOptions: booleanOptions,
+      total: 0,
+      enclosureVisible: false,
+      list: [],
+      id: this.$route.query.id,
+      dataId: undefined,
+      attachType: 'FINACIAL',
+      loading: false,
+      selectionList: [],
+      ids: '',
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10
+      },
+      list1: [],
+      list2: [],
+      list3: [],
+      list4: [],
+      list5: [],
+      list6: [],
+      list7: [],
+      list8: [],
+      list9: [],
+      list10: [],
+      list11: []
+    };
+  },
+  computed: {
+    userType() {
+      return this.$store.state.user.userType
+    },
+    techFlag() {
+      let roleType = this.$store.state.user.userType
+      return this.type != 'view' ? ['ENT_TECH', 'ADMIN', 'ENT_ADMIN'].includes(roleType) : false //判断是否为技术
+    },
+    finFlag() {
+      let roleType = this.$store.state.user.userType
+      return this.type != 'view' ? ['ENT_FIN', 'ADMIN', 'ENT_ADMIN'].includes(roleType) : false //判断是否为财务
+    },
+    finFileFlag() {
+      let roleType = this.$store.state.user.userType
+      return ['ENT_FIN'].includes(roleType)
+    }
+  },
+  created() {
+    this.id = this.$route.query.id || undefined;
+    if (this.id) {
+      this.getList()
+    }
+    if (this.finFileFlag) {
+      this.disabledFlag = true
+    }
+  },
+  methods: {
+    getList() {
+      getEnclosureApi(this.attachType, this.id).then(res => {
+        if (res.code == 200) {
+          this.list = res.data.records
+          this.list1 = []
+          this.list2 = []
+          this.list3 = []
+          this.list4 = []
+          this.list5 = []
+          this.list6 = []
+          this.list7 = []
+          this.list8 = []
+          this.list9 = []
+          this.list10 = []
+          this.list11 = []
+          this.list.map(item => {
+            if (item.fileType == 'file1') {
+              this.list1.push(item)
+            }
+            if (item.fileType == 'file2') {
+              this.list2.push(item)
+            }
+            if (item.fileType == 'file3') {
+              this.list3.push(item)
+            }
+            if (item.fileType == 'file4') {
+              this.list4.push(item)
+            }
+            if (item.fileType == 'file5') {
+              this.list5.push(item)
+            }
+            if (item.fileType == 'file6') {
+              this.list6.push(item)
+            }
+            if (item.fileType == 'file7') {
+              this.list7.push(item)
+            }
+            if (item.fileType == 'file8') {
+              this.list8.push(item)
+            }
+            if (item.fileType == 'file9') {
+              this.list9.push(item)
+            }
+            if (item.fileType == 'file10') {
+              this.list10.push(item)
+            }
+            if (item.fileType == 'file11') {
+              this.list11.push(item)
+            }
+          })
+          this.total = res.data.total
         }
-      }
+      })
     },
-    data() {
-      return {
-        disabledFlag: false,
-        form: {
-          contractFlag: false,
-          reportFlag: false,
-          appraisalFlag: false
-        },
-        booleanOptions: booleanOptions,
-        total: 0,
-        enclosureVisible: false,
-        list: [],
-        id: this.$route.query.id,
-        dataId: undefined,
+    handleUpload(type) {
+      let params = {
         attachType: 'FINACIAL',
-        loading: false,
-        selectionList: [],
-        ids: '',
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10
-        },
-        list1: [],
-        list2: [],
-        list3: [],
-        list4: [],
-        list5: [],
-        list6: [],
-        list7: [],
-        list8: [],
-        list9: [],
-        list10: [],
-        list11: []
-      };
-    },
-    computed: {
-      userType() {
-        return this.$store.state.user.userType
-      },
-      techFlag() {
-        let roleType = this.$store.state.user.userType
-        return this.type != 'view' ? ['ENT_TECH', 'ADMIN', 'ENT_ADMIN'].includes(roleType) : false //判断是否为技术
-      },
-      finFlag() {
-        let roleType = this.$store.state.user.userType
-        return this.type != 'view' ? ['ENT_FIN', 'ADMIN', 'ENT_ADMIN'].includes(roleType) : false //判断是否为财务
-      },
-      finFileFlag() {
-        let roleType = this.$store.state.user.userType
-        return ['ENT_FIN'].includes(roleType)
+        fileType: 'file' + type,
+        dataId: this.id
       }
+      this.enclosureVisible = true
+      this.$nextTick(() => {
+        this.$refs.uploadEnclosure.init(params)
+      })
     },
-    created() {
-      this.id = this.$route.query.id || undefined;
-      if(this.id) {
-        this.getList()
-      }
-      if(this.finFileFlag) {
-        this.disabledFlag = true
-      }
+    /** 导出按钮操作 */
+    // handleDownload(id) {
+    //   this.download(`/common/attach/${id}`, {
+    //   }, `附件`)
+    // },
+    handleDownload(id) {
+      window.open(process.env.VUE_APP_BASE_API + `/common/attach/${id}`)
     },
-    methods: {
-      getList() {
-        getEnclosureApi(this.attachType,this.id).then(res => {
-          if(res.code == 200) {
-            this.list = res.data.records
-            this.list1 = []
-            this.list2 = []
-            this.list3 = []
-            this.list4 = []
-            this.list5 = []
-            this.list6 = []
-            this.list7 = []
-            this.list8 = []
-            this.list9 = []
-            this.list10 = []
-            this.list11 = []
-            this.list.map(item => {
-              if(item.fileType == 'file1') {
-                this.list1.push(item)
-              }
-              if(item.fileType == 'file2') {
-                this.list2.push(item)
-              }
-              if(item.fileType == 'file3') {
-                this.list3.push(item)
-              }
-              if(item.fileType == 'file4') {
-                this.list4.push(item)
-              }
-              if(item.fileType == 'file5') {
-                this.list5.push(item)
-              }
-              if(item.fileType == 'file6') {
-                this.list6.push(item)
-              }
-              if(item.fileType == 'file7') {
-                this.list7.push(item)
-              }
-              if(item.fileType == 'file8') {
-                this.list8.push(item)
-              }
-              if(item.fileType == 'file9') {
-                this.list9.push(item)
-              }
-              if(item.fileType == 'file10') {
-                this.list10.push(item)
-              }
-              if(item.fileType == 'file11') {
-                this.list11.push(item)
-              }
-            })
-            this.total = res.data.total
-          }
-        })
-      },
-      handleUpload(type) {
-        let params = {
-          attachType: 'FINACIAL',
-          fileType: 'file'+type,
-          dataId: this.id
-        }
-        this.enclosureVisible = true
-        this.$nextTick(() => {
-          this.$refs.uploadEnclosure.init(params)
-        })
-      },
-      /** 导出按钮操作 */
-      // handleDownload(id) {
-      //   this.download(`/common/attach/${id}`, {
-      //   }, `附件`)
-      // },
-      handleDownload(id) {
-        window.open(process.env.VUE_APP_BASE_API+`/common/attach/${id}`)
-      },
-      handleDownloadBatch() {
-        let id = this.id
-        downLoadZip(`/ent/data/download/${id}`, "加计扣除备查资料清单")
+    handleDownloadBatch() {
+      let id = this.id
+      downLoadZip(`/ent/data/download/${id}`, "加计扣除备查资料清单")
+      this.getList();
+    },
+    // 从url加载
+    handleView(row) {
+      let routeUrl = this.$router.resolve({
+        path: '/enclosurePreview',
+        query: { url: row.url, fileName: row.fileName, id: row.id }
+      });
+      window.open(routeUrl.href, "_blank");
+    },
+    handleDelete(id) {
+      this.$confirm('是否确认删除该数据?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return deleteEnclosureApi(id);
+      }).then(() => {
+        this.queryParams.pageNum = 1;
         this.getList();
-      },
-      // 从url加载
-      handleView(row) {
-        let routeUrl = this.$router.resolve({
-          path: '/enclosurePreview',
-          query: {url: row.url,fileName: row.fileName,id: row.id}
-        });
-        window.open(routeUrl.href, "_blank");
-      },
-      handleDelete(id) {
-        this.$confirm('是否确认删除该数据?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-            return deleteEnclosureApi(id);
-          }).then(() => {
-            this.queryParams.pageNum = 1;
-            this.getList();
-            this.$modal.msgSuccess("删除成功");
-          })
-      },
-      // 取消全选
-      selectAll(selection) {
-        if (selection.length == 0) {
-          let list = this.selectedList.filter(item => !this.list.some(ele => ele.id === item.id));
-          this.selectionList = list;
-        }
-      },
-      handleSelectionChange(val) {
-        this.selectionList = val;
-        if(this.selectionList.length > 0) {
-          let selectionIds = []
-          for (let i = 0, len = this.selectionList.length; i < len; i++) {
-          	selectionIds.push(this.selectionList[i].id)
-          }
-          this.ids = selectionIds.join(',')
-        }else {
-          this.ids = ''
+        this.$modal.msgSuccess("删除成功");
+      })
+    },
+    // 取消全选
+    selectAll(selection) {
+      if (selection.length == 0) {
+        let list = this.selectedList.filter(item => !this.list.some(ele => ele.id === item.id));
+        this.selectionList = list;
+      }
+    },
+    handleSelectionChange(val) {
+      this.selectionList = val;
+      if (this.selectionList.length > 0) {
+        let selectionIds = []
+        for (let i = 0, len = this.selectionList.length; i < len; i++) {
+          selectionIds.push(this.selectionList[i].id)
         }
-      },
-      submitForm() {
-        declareUpdateApi(this.form).then(res => {
-          this.$alert('保存成功', '提示', {
-            confirmButtonText: '确定',
-            callback: action => {
-              this.loading = false
-              this.$store.dispatch("tagsView/delView", this.$route);
-              this.$router.go(-1);
-            }
-          })
-        })
-      },
-      cancel() {
-        this.$store.dispatch("tagsView/delView", this.$route); // 关闭当前tab
-        this.$router.go(-1);
+        this.ids = selectionIds.join(',')
+      } else {
+        this.ids = ''
       }
     },
-    watch: {
-      info: {
-        immediate: true,
-        handler (obj) {
-          if(obj) {
-            this.form = Object.assign({}, this.form, obj)
+    submitForm() {
+      declareUpdateApi(this.form).then(res => {
+        this.$alert('保存成功', '提示', {
+          confirmButtonText: '确定',
+          callback: action => {
+            this.loading = false
+            this.$store.dispatch("tagsView/delView", this.$route);
+            this.$router.go(-1);
           }
+        })
+      })
+    },
+    cancel() {
+      this.$store.dispatch("tagsView/delView", this.$route); // 关闭当前tab
+      this.$router.go(-1);
+    }
+  },
+  watch: {
+    info: {
+      immediate: true,
+      handler(obj) {
+        if (obj) {
+          this.form = Object.assign({}, this.form, obj)
         }
       }
     }
-  };
-  </script>
+  }
+};
+</script>
 
 </script>
 
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>

+ 2 - 2
src/views/enterprise/project/index.vue

@@ -218,7 +218,7 @@
         })
       },
       handleDownload(row) {
-        downLoadZip('/project/download/' +row.id, "项目附件")
+        downLoadZip('/ent/data/download/' +row.id, "项目附件")
       },
       handleDownloadBatch() {
         if(this.selectCount <= 0) {
@@ -226,7 +226,7 @@
           return
         }
         const delIds = this.ids.join(',')
-        downLoadZip('/project/download/' +delIds, "项目附件")
+        downLoadZip('/ent/data/download/' +delIds, "项目附件")
       },
       //提交申报
       handleDeclare(row) {

+ 1 - 1
src/views/system/user/profile/index.vue

@@ -8,7 +8,7 @@
           </div>
           <div>
             <div class="text-center">
-              <userAvatar :user="user" />
+              <userAvatar :user="user" @refreshData="getUser()" />
             </div>
             <ul class="list-group list-group-striped">
               <li class="list-group-item">

+ 1 - 0
src/views/system/user/profile/userAvatar.vue

@@ -128,6 +128,7 @@ export default {
           this.open = false;
           this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
           store.commit('SET_AVATAR', this.options.img);
+          this.$emit("refreshData")
           this.$modal.msgSuccess("修改成功");
           this.visible = false;
         });