scorpioyq 2 gadi atpakaļ
vecāks
revīzija
5a69e81d0f
1 mainītis faili ar 282 papildinājumiem un 275 dzēšanām
  1. 282 275
      src/views/home/component/dash.vue

+ 282 - 275
src/views/home/component/dash.vue

@@ -3,165 +3,165 @@
     <div class="flex flex-col padding white-bg">
       <div class="flex flex-align-center tip">
         <el-icon class="ml-20" color="#BC002D">
-          <WarningFilled />
+          <WarningFilled/>
         </el-icon>
         <span class="ml-5"
-          >项目总投资额<span class="main-color bold">{{
+        >项目总投资额<span class="main-color bold">{{
             num ? Number.parseFloat(num).toLocaleString() : '0'
           }}</span
-          >万元</span
+        >万元</span
         >
       </div>
       <div
-        class="flex ml-20 hide-scrollbar full-width flex-wrap"
-        v-show="numList && numList.length > 0"
+          class="flex ml-20 hide-scrollbar full-width flex-wrap"
+          v-show="numList && numList.length > 0"
       >
         <div
-          v-for="(item, index) in numList"
-          :key="item.id"
-          :class="active === index ? 'total-s' : 'total'"
-          class="flex flex-center flex-justify-between mt-20 bold font-16 pointer"
-          @click="switchTab(item, index)"
+            v-for="(item, index) in numList"
+            :key="item.id"
+            :class="active === index ? 'total-s' : 'total'"
+            class="flex flex-center flex-justify-between mt-20 bold font-16 pointer"
+            @click="switchTab(item, index)"
         >
           <span class="sp">{{ item.name }}</span>
           <span class="sp1"
-            >{{ item.number }}<span class="grey font-13">个</span></span
+          >{{ item.number }}<span class="grey font-13">个</span></span
           >
         </div>
       </div>
       <div class="flex flex-center flex-justify-start">
         <base-button
-          class="ml-20 mt-20"
-          icon="Plus"
-          title="新增"
-          v-if="
+            class="ml-20 mt-20"
+            icon="Plus"
+            title="新增"
+            v-if="
             dataType === 'project' &&
             permissions.vaildPermission('project_new_create')
           "
-          @click="showAdd = true"
+            @click="showAdd = true"
         />
         <base-button
-          class="ml-20 mt-20"
-          icon="el-icon-upload"
-          title="数据导入"
-          v-if="dataType === 'project'"
-          @click="diaType = 0"
+            class="ml-20 mt-20"
+            icon="el-icon-upload"
+            title="数据导入"
+            v-if="dataType === 'project'"
+            @click="diaType = 0"
         />
         <base-button
-          class="ml-20 mt-20"
-          icon="el-icon-download"
-          title="数据导出"
-          @click="diaType = 1"
+            class="ml-20 mt-20"
+            icon="el-icon-download"
+            title="数据导出"
+            @click="diaType = 1"
         />
         <base-button
-          class="ml-20 mt-20"
-          type="0"
-          icon="el-icon-download"
-          title="汇总数据导出"
-          @click="diaType = 2"
+            class="ml-20 mt-20"
+            type="0"
+            icon="el-icon-download"
+            title="汇总数据导出"
+            @click="diaType = 2"
         />
         <base-button
-          class="ml-20 mt-20"
-          type="0"
-          icon="el-icon-coordinate"
-          title="项目结转"
-          @click="projectCarry"
+            class="ml-20 mt-20"
+            type="0"
+            icon="el-icon-coordinate"
+            title="项目结转"
+            @click="projectCarry"
         />
         <el-tooltip
-          content="申报的项目必须为已入全国投资项目在线审批监管平台并且已经上报的项目"
+            content="申报的项目必须为已入全国投资项目在线审批监管平台并且已经上报的项目"
         >
           <base-button
-            class="ml-20 mt-20"
-            type="0"
-            icon="el-icon-folder-checked"
-            title="入库申报"
-            v-if="dataType === 'asset'"
-            @click="projectStore"
+              class="ml-20 mt-20"
+              type="0"
+              icon="el-icon-folder-checked"
+              title="入库申报"
+              v-if="dataType === 'asset'"
+              @click="projectStore"
           />
         </el-tooltip>
       </div>
     </div>
     <avue-crud
-      ref="crud"
-      v-model="form"
-      v-model:page="page"
-      :before-open="beforeOpen"
-      :permission="permissions"
-      :data="data"
-      :option="option"
-      :table-loading="loading"
-      class="curd"
-      @row-del="rowDel"
-      @tree-load="treeLoad"
-      @current-change="currentChange"
-      @size-change="sizeChange"
-      @refresh-change="refreshChange"
-      @selection-change="selectionChange"
-      @on-load="onLoad"
+        ref="crud"
+        v-model="form"
+        v-model:page="page"
+        :before-open="beforeOpen"
+        :permission="permissions"
+        :data="data"
+        :option="option"
+        :table-loading="loading"
+        class="curd"
+        @row-del="rowDel"
+        @tree-load="treeLoad"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @selection-change="selectionChange"
+        @on-load="onLoad"
     >
       <template #menu="{ row }">
         <el-button
-          v-if="
+            v-if="
             dataType === 'asset' && row.project_stage !== 7 && row.can_update
           "
-          icon="Upload"
-          type="primary"
-          text
-          @click="report(row)"
+            icon="Upload"
+            type="primary"
+            text
+            @click="report(row)"
         >
           {{ row.is_report === 1 ? '项目已上报' : '项目上报' }}
         </el-button>
         <el-button
-          v-if="
+            v-if="
             (row.report_type === 0 ||
               row.report_type === 1 ||
               row.report_type === 4) &&
             row.can_update
           "
-          text
-          type="primary"
-          icon="el-icon-upload"
-          @click="projectReport(row)"
-          >上报审核
+            text
+            type="primary"
+            icon="el-icon-upload"
+            @click="projectReport(row)"
+        >上报审核
         </el-button>
         <el-button
-          text
-          v-if="
+            text
+            v-if="
             permissions.vaildPermission('projectApprovalBtn') &&
             row.report_type === 2
           "
-          type="primary"
-          icon="el-icon-bell"
-          @click="rowClick(row, 1)"
-          >审核
+            type="primary"
+            icon="el-icon-bell"
+            @click="rowClick(row, 1)"
+        >审核
         </el-button>
         <el-button
-          v-if="
+            v-if="
             row.hasOwnProperty('report_type') &&
             row.report_type === 3 &&
             row.can_update
           "
-          text
-          type="primary"
-          icon="el-icon-upload"
-          @click="projectReportFormal(row)"
-          >上报固定资产
+            text
+            type="primary"
+            icon="el-icon-upload"
+            @click="projectReportFormal(row)"
+        >上报固定资产
         </el-button>
         <el-button
-          text
-          type="primary"
-          icon="el-icon-folder-remove"
-          @click="projectCancel(row)"
-          v-if="row.project_stage !== 7 && row.can_update"
-          >退库
+            text
+            type="primary"
+            icon="el-icon-folder-remove"
+            @click="projectCancel(row)"
+            v-if="row.project_stage !== 7 && row.can_update"
+        >退库
         </el-button>
         <el-button
-          text
-          type="primary"
-          icon="el-icon-delete"
-          @click="rowDel(row)"
-          v-if="row.can_update"
-          >删除
+            text
+            type="primary"
+            icon="el-icon-delete"
+            @click="rowDel(row)"
+            v-if="row.can_update"
+        >删除
         </el-button>
       </template>
       <template #plan_storage_time-header="{ column }">
@@ -169,7 +169,7 @@
           <div class="mr-5">{{ (column || {}).label }}</div>
           <el-tooltip content="红色为计划入库时间,蓝色为实际入库时间">
             <el-icon>
-              <InfoFilled />
+              <InfoFilled/>
             </el-icon>
           </el-tooltip>
         </div>
@@ -177,8 +177,8 @@
       <template #plan_storage_time="{ row }">
         <div class="flex flex-center">
           <div
-            class="mr-5 red"
-            v-if="row.plan_storage_time !== undefined && row.is_storage === 0"
+              class="mr-5 red"
+              v-if="row.plan_storage_time !== undefined && row.is_storage === 0"
           >
             {{ row.plan_storage_time.substring(0, 10) }}
           </div>
@@ -193,7 +193,7 @@
           <div class="mr-5">{{ (column || {}).label }}</div>
           <el-tooltip content="红色为计划开工时间,蓝色为实际开工时间">
             <el-icon>
-              <InfoFilled />
+              <InfoFilled/>
             </el-icon>
           </el-tooltip>
         </div>
@@ -201,8 +201,8 @@
       <template #plan_commencement_time="{ row }">
         <div class="flex flex-center">
           <div
-            class="mr-5 red"
-            v-if="
+              class="mr-5 red"
+              v-if="
               row.plan_commencement_time !== undefined &&
               (row.is_start === undefined || row.is_start === 0)
             "
@@ -219,7 +219,7 @@
           <div>{{ row['$project_stage'] }}</div>
           <el-tooltip :content="row.exit_msg" v-if="row.project_stage === 7">
             <el-icon @click="showReceipt(row.exit_msg)">
-              <InfoFilled />
+              <InfoFilled/>
             </el-icon>
           </el-tooltip>
         </div>
@@ -229,11 +229,11 @@
           <el-tag>{{ row.report_type_name }}</el-tag>
           <el-tooltip :content="row.receipt_msg">
             <el-icon
-              v-if="row.report_type === 4"
-              class="ml-10"
-              @click="showReceipt(row.receipt_msg)"
+                v-if="row.report_type === 4"
+                class="ml-10"
+                @click="showReceipt(row.receipt_msg)"
             >
-              <WarningFilled />
+              <WarningFilled/>
             </el-icon>
           </el-tooltip>
         </div>
@@ -241,116 +241,116 @@
     </avue-crud>
     <!--    新增-->
     <el-dialog
-      v-model="showAdd"
-      append-to-body
-      center
-      title="新增项目"
-      width="35%"
+        v-model="showAdd"
+        append-to-body
+        center
+        title="新增项目"
+        width="35%"
     >
       <div v-loading="addLoading">
         <el-form
-          ref="form"
-          :model="projectForm"
-          class="lab mt-20"
-          label-width="100px"
-          :rules="rules"
+            ref="form"
+            :model="projectForm"
+            class="lab mt-20"
+            label-width="100px"
+            :rules="rules"
         >
           <div class="flex flex-center flex-col mr-20">
             <el-form-item class="full-width" label="项目名称" prop="name">
               <el-input
-                v-model="projectForm.name"
-                clearable
-                placeholder="输入项目名称"
+                  v-model="projectForm.name"
+                  clearable
+                  placeholder="输入项目名称"
               />
             </el-form-item>
             <el-form-item
-              class="full-width"
-              label="项目总投"
-              prop="totalAmount"
+                class="full-width"
+                label="项目总投"
+                prop="totalAmount"
             >
               <el-input
-                v-model="projectForm.totalAmount"
-                type="number"
-                placeholder="输入项目总投(万元)"
+                  v-model="projectForm.totalAmount"
+                  type="number"
+                  placeholder="输入项目总投(万元)"
               >
                 <template #append>(万元)</template>
               </el-input>
             </el-form-item>
             <el-form-item class="full-width" label="项目标签" prop="tags">
               <el-select
-                v-model="projectForm.tags"
-                clearable
-                placeholder="选择项目标签"
-                style="width: 100%"
+                  v-model="projectForm.tags"
+                  clearable
+                  placeholder="选择项目标签"
+                  style="width: 100%"
               >
                 <el-option
-                  v-for="item in tagsList"
-                  :key="item.dictKey"
-                  :label="item.dictValue"
-                  :value="item.dictKey"
+                    v-for="item in tagsList"
+                    :key="item.dictKey"
+                    :label="item.dictValue"
+                    :value="item.dictKey"
                 />
               </el-select>
             </el-form-item>
             <el-form-item class="full-width" label="行业分类" prop="tags">
               <el-select
-                v-model="projectForm.dictKey"
-                clearable
-                placeholder="选择行业分类"
-                style="width: 100%"
+                  v-model="projectForm.dictKey"
+                  clearable
+                  placeholder="选择行业分类"
+                  style="width: 100%"
               >
                 <el-option
-                  v-for="item in industryList"
-                  :key="item.dictKey"
-                  :label="item.dictValue"
-                  :value="item.dictKey"
+                    v-for="item in industryList"
+                    :key="item.dictKey"
+                    :label="item.dictValue"
+                    :value="item.dictKey"
                 />
               </el-select>
             </el-form-item>
             <el-form-item class="full-width" label="建设内容">
               <el-input
-                v-model="projectForm.introduction"
-                :rows="6"
-                clearable
-                placeholder="输入项目建设内容"
-                type="textarea"
+                  v-model="projectForm.introduction"
+                  :rows="6"
+                  clearable
+                  placeholder="输入项目建设内容"
+                  type="textarea"
               />
             </el-form-item>
             <div class="flex flex-center mt-10">
               <base-button
-                class="mr-20"
-                icon="Close"
-                title="取消"
-                type="0"
-                @click="showAdd = false"
+                  class="mr-20"
+                  icon="Close"
+                  title="取消"
+                  type="0"
+                  @click="showAdd = false"
               />
-              <base-button icon="Check" title="保存" @click="projectSave" />
+              <base-button icon="Check" title="保存" @click="projectSave"/>
             </div>
           </div>
         </el-form>
       </div>
     </el-dialog>
     <form-dialog
-      :dialogType="diaType"
-      @close="formDialogClose"
-      @export="exportExcel"
-      :ids="selectList.map(ele => ele.id)"
-      :year="owerQuery.projectYear"
+        :dialogType="diaType"
+        @close="formDialogClose"
+        @export="exportExcel"
+        :ids="selectList.map(ele => ele.id)"
+        :year="owerQuery.projectYear"
     />
     <summary-dialog
-      :dialogType="diaType"
-      @close="diaType = -1"
-      :select-num="selectList.length === 0 ? page.total : selectList.length"
-      @export="exportExcelTotal"
+        :dialogType="diaType"
+        @close="diaType = -1"
+        :select-num="selectList.length === 0 ? page.total : selectList.length"
+        @export="exportExcelTotal"
     />
     <el-dialog v-model="reportShow" width="500px" title="请选择上报时间">
       <div v-if="currentReport">
         <el-date-picker
-          v-model="currentReport.report_time"
-          format="YYYY-MM-DD"
-          class="mb-20"
-          placeholder="选择上报时间"
-          style="width: 100%"
-          value-format="YYYY-MM-DD"
+            v-model="currentReport.report_time"
+            format="YYYY-MM-DD"
+            class="mb-20"
+            placeholder="选择上报时间"
+            style="width: 100%"
+            value-format="YYYY-MM-DD"
         />
       </div>
       <div class="flex flex-center full-width flex-justify-end">
@@ -369,15 +369,15 @@
           </el-radio-group>
         </div>
         <el-input
-          class="mt-20"
-          type="textarea"
-          :rows="5"
-          v-model="approvalMsg"
-          placeholder="请填写审批意见"
+            class="mt-20"
+            type="textarea"
+            :rows="5"
+            v-model="approvalMsg"
+            placeholder="请填写审批意见"
         />
         <div class="full-width flex flex-justify-end mt-20">
           <el-button plain type="primary" @click="showApproval = false"
-            >取消
+          >取消
           </el-button>
           <el-button type="primary" @click="projectApproval">确定</el-button>
         </div>
@@ -390,19 +390,19 @@
 import BaseButton from '../../../components/base-button.vue'
 import permissionStore from '@/store/permission.js'
 import formDialog from '@/views/home/component/form_dialog.vue'
-import { getLazyList } from '@/api/project/index.js'
+import {getLazyList} from '@/api/project/index.js'
 import summaryDialog from '@/views/home/component/summary_dialog.vue'
-import { useStore } from '@/store/user.js'
+import {useStore} from '@/store/user.js'
 import confing from '@/config/website'
-import { ElMessageBox } from 'element-plus'
+import {ElMessageBox} from 'element-plus'
 
 export default {
   name: 'dash',
-  components: { BaseButton, formDialog, summaryDialog },
+  components: {BaseButton, formDialog, summaryDialog},
   setup() {
     const permissions = permissionStore()
     const user = useStore()
-    return { permissions, user }
+    return {permissions, user}
   },
   data() {
     return {
@@ -458,7 +458,7 @@ export default {
             slot: true,
             width: 140,
             dicUrl:
-              '/api/blade-system/dict-biz/dictionary?code=project-situation',
+                '/api/blade-system/dict-biz/dictionary?code=project-situation',
             props: {
               label: 'dictValue',
               value: 'dictKey'
@@ -484,7 +484,7 @@ export default {
             prop: 'dict_key',
             width: 120,
             dicUrl:
-              '/api/blade-system/dict-biz/dictionary?code=industry-classification',
+                '/api/blade-system/dict-biz/dictionary?code=industry-classification',
             props: {
               label: 'dictValue',
               value: 'dictKey'
@@ -574,7 +574,7 @@ export default {
         dictKey: ''
       },
       rules: {
-        name: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
+        name: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
         projectType: [
           {
             required: true,
@@ -603,7 +603,7 @@ export default {
   created() {
     this.dev = sessionStorage.getItem('dev') === 'true'
     const indexLabel = this.option.column.findIndex(
-      sub => sub.prop === 'unit_name'
+        sub => sub.prop === 'unit_name'
     )
     this.dataType = localStorage.getItem('data-type')
     if (this.user.info.viewStage === 1) {
@@ -631,7 +631,7 @@ export default {
     switchTab(item, index) {
       this.active = index
       this.num = this.numList[index].totalAmount
-      this.projectStageQuery = { projectStage: item.dictKey }
+      this.projectStageQuery = {projectStage: item.dictKey}
       this.onLoad(Object.assign(this.owerQuery, this.projectStageQuery))
     },
     onLoad(query = {}) {
@@ -639,32 +639,32 @@ export default {
       if (!Object.hasOwn(this.owerQuery, 'projectYear')) {
         this.owerQuery.projectYear = new Date().getFullYear()
       }
-      const data = { ...this.owerQuery, parentId: this.parentId }
+      const data = {...this.owerQuery, parentId: this.parentId}
       this.queryData = data
       this.$api.project
-        .projectList(this.page.currentPage, this.page.pageSize, this.queryData)
-        .then(res => {
-          this.loading = false
-          if (res.code === 200) {
-            this.data = res.data.records.map(e => {
-              e.projectStage = e.projectStage + ''
-              e.selected = true
-              const xian = e.name.indexOf('县')
-              e.name = this.dev ? e.name.substring(xian + 1) : e.name
-              const status = confing.reportTypes.find(
-                ele => ele.value === e.report_type
-              )
-              if (status) {
-                e.report_type_name = status.label
-              }
-              return e
-            })
-            this.page.total = res.data.total
-          }
-        })
-        .finally(() => {
-          this.loading = false
-        })
+          .projectList(this.page.currentPage, this.page.pageSize, this.queryData)
+          .then(res => {
+            this.loading = false
+            if (res.code === 200) {
+              this.data = res.data.records.map(e => {
+                e.projectStage = e.projectStage + ''
+                e.selected = true
+                const xian = e.name.indexOf('县')
+                e.name = this.dev ? e.name.substring(xian + 1) : e.name
+                const status = confing.reportTypes.find(
+                    ele => ele.value === e.report_type
+                )
+                if (status) {
+                  e.report_type_name = status.label
+                }
+                return e
+              })
+              this.page.total = res.data.total
+            }
+          })
+          .finally(() => {
+            this.loading = false
+          })
     },
     selectionChange(list) {
       this.selectList = list
@@ -683,7 +683,7 @@ export default {
       } else if (type === 'view') {
         const routeData = this.$router.resolve({
           path: '/home/pro_detail',
-          query: { id: this.form.id, projectStage: this.form.project_stage }
+          query: {id: this.form.id, projectStage: this.form.project_stage}
         })
         window.open(routeData.href, '_blank')
       }
@@ -703,10 +703,10 @@ export default {
       getLazyList(tree.id).then(res => {
         this.loading = false
         resolve(
-          res.data.data.childrenList.map(e => {
-            e.project_stage = e.project_stage.toString()
-            return e
-          })
+            res.data.data.childrenList.map(e => {
+              e.project_stage = e.project_stage.toString()
+              return e
+            })
         )
       })
     },
@@ -716,7 +716,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.$api.project.projectRemove({ ids: row.id }).then(res => {
+        this.$api.project.projectRemove({ids: row.id}).then(res => {
           if (res.code === 200) {
             this.$message.success(res.msg)
             this.getNumList()
@@ -737,15 +737,22 @@ export default {
     },
     getTypeList() {
       this.$api.project
-        .typeList({ type: 1, size: 999, current: 1 })
-        .then(res => {
-          this.typeList = res.data.records
-        })
-      this.$api.common.dicList({ code: 'project-tags' }).then(res => {
+          .typeList({type: 1, size: 999, current: 1})
+          .then(res => {
+            this.typeList = res.data.records
+          })
+      this.$api.common.dicList({code: 'project-tags'}).then(res => {
         if (res.code === 200) {
           this.tagsList = res.data
         }
       })
+      this.$api.common
+          .dicList({code: 'industry-classification'})
+          .then(res => {
+            if (res.code === 200) {
+              this.industryList = res.data
+            }
+          })
     },
     report(res) {
       if (res.is_report === 1) {
@@ -762,7 +769,7 @@ export default {
     projectReport(res) {
       this.$confirm('确认上报至管理员进行审核?').then(ele => {
         if (ele === 'confirm') {
-          this.$api.project.upReportType({ id: res.id }).then(res => {
+          this.$api.project.upReportType({id: res.id}).then(res => {
             if (res.code === 200) {
               this.$message.success(res.msg)
               this.refreshChange()
@@ -790,21 +797,21 @@ export default {
       }
       this.showApproval = false
       this.$api.project
-        .approvalProject({
-          id: this.form.id,
-          reportType: this.approvalStatus,
-          receiptMsg: this.approvalMsg
-        })
-        .then(res => {
-          if (res.code === 200) {
-            this.$message.success(res.msg)
-            this.approvalStatus = 3
-            this.approvalMsg = ''
-            this.refreshChange()
-          } else {
-            this.$message.error(res.msg)
-          }
-        })
+          .approvalProject({
+            id: this.form.id,
+            reportType: this.approvalStatus,
+            receiptMsg: this.approvalMsg
+          })
+          .then(res => {
+            if (res.code === 200) {
+              this.$message.success(res.msg)
+              this.approvalStatus = 3
+              this.approvalMsg = ''
+              this.refreshChange()
+            } else {
+              this.$message.error(res.msg)
+            }
+          })
     },
     /**
      * 管理员已经审核通过的项目,上报到固定资产
@@ -813,7 +820,7 @@ export default {
     projectReportFormal(item) {
       this.$confirm('确定上报到固定资产?').then(res => {
         if (res === 'confirm') {
-          this.$api.project.reportToAssets({ ids: item.id }).then(res => {
+          this.$api.project.reportToAssets({ids: item.id}).then(res => {
             if (res.code === 200) {
               this.$message.success(res.msg)
               this.refreshChange()
@@ -833,15 +840,15 @@ export default {
         return
       }
       this.$api.project
-        .projectCarry({ ids: this.selectList.map(ele => ele.id).join(',') })
-        .then(res => {
-          if (res.code === 200) {
-            this.$message.success(res.msg)
-            this.refreshChange()
-          } else {
-            this.$message.error(res.msg)
-          }
-        })
+          .projectCarry({ids: this.selectList.map(ele => ele.id).join(',')})
+          .then(res => {
+            if (res.code === 200) {
+              this.$message.success(res.msg)
+              this.refreshChange()
+            } else {
+              this.$message.error(res.msg)
+            }
+          })
     },
     /**
      * 项目入库预审
@@ -862,43 +869,43 @@ export default {
         }
       })
       ElMessageBox.confirm('确定将已经勾选的项目提交入库预审?', '', {}).then(
-        res => {
-          if (res === 'confirm') {
-            this.$api.project
-              .projectStore({
-                ids: this.selectList.map(ele => ele.id).join(',')
-              })
-              .then(res => {
-                if (res.code === 200) {
-                  this.$message.success(res.msg)
-                } else {
-                  this.$message.error(res.msg)
-                }
-              })
+          res => {
+            if (res === 'confirm') {
+              this.$api.project
+                  .projectStore({
+                    ids: this.selectList.map(ele => ele.id).join(',')
+                  })
+                  .then(res => {
+                    if (res.code === 200) {
+                      this.$message.success(res.msg)
+                    } else {
+                      this.$message.error(res.msg)
+                    }
+                  })
+            }
           }
-        }
       )
     },
     /**
      * 项目退库
      */
     projectCancel(res) {
-      ElMessageBox.prompt('请输入退库原因', '提示', {}).then(({ value }) => {
+      ElMessageBox.prompt('请输入退库原因', '提示', {}).then(({value}) => {
         console.log(value)
         if (value === null || value.length === 0) {
           this.$message.error('请输入退库原因')
           return
         }
         this.$api.project
-          .projectCancel({ id: res.id, exitMsg: value })
-          .then(res => {
-            if (res.code === 200) {
-              this.$message.success(res.msg)
-              this.refreshChange()
-            } else {
-              this.$message.error(res.msg)
-            }
-          })
+            .projectCancel({id: res.id, exitMsg: value})
+            .then(res => {
+              if (res.code === 200) {
+                this.$message.success(res.msg)
+                this.refreshChange()
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
       })
     },
     track(res) {
@@ -956,15 +963,15 @@ export default {
     },
     exportExcel(res, year) {
       const data = Object.assign(
-        { ...this.queryData },
-        {
-          columnName: res,
-          projectIds: this.selectList.map(ele => ele.id).join(','),
-          previewType: 1,
-          projectYear: year
-        }
+          {...this.queryData},
+          {
+            columnName: res,
+            projectIds: this.selectList.map(ele => ele.id).join(','),
+            previewType: 1,
+            projectYear: year
+          }
       )
-      this.$router.push({ query: data, path: '/home/excel' })
+      this.$router.push({query: data, path: '/home/excel'})
     },
     showReceipt(msg) {
       this.$confirm(msg, {
@@ -980,7 +987,7 @@ export default {
         projectIds: this.selectList.map(ele => ele.id).join(','),
         previewType: 2
       }
-      this.$router.push({ query: dataIds, path: '/home/excel' })
+      this.$router.push({query: dataIds, path: '/home/excel'})
     }
   }
 }