|
@@ -1,91 +1,118 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
<!-- 表格导入-->
|
|
<!-- 表格导入-->
|
|
|
- <el-dialog v-model='showImport'
|
|
|
|
|
- append-to-body
|
|
|
|
|
- center
|
|
|
|
|
- title="数据表格导入"
|
|
|
|
|
- @close="close"
|
|
|
|
|
- width="45%">
|
|
|
|
|
- <div class='flex flex-center flex-col'>
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="showImport"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ center
|
|
|
|
|
+ title="数据表格导入"
|
|
|
|
|
+ @close="close"
|
|
|
|
|
+ width="45%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="flex flex-center flex-col">
|
|
|
<div class="flex flex-center full-width flex-justify-start">
|
|
<div class="flex flex-center full-width flex-justify-start">
|
|
|
<span class="bold mr-20">文件上传</span>
|
|
<span class="bold mr-20">文件上传</span>
|
|
|
<div>
|
|
<div>
|
|
|
- <uploads ref='upload' max="9" btn-text="点击进行文件上传" @before="before" @success="upload"
|
|
|
|
|
- @error='loading = false'
|
|
|
|
|
- :loading='loading'
|
|
|
|
|
- :data='dept'
|
|
|
|
|
- :action='action'
|
|
|
|
|
- accept=".xlsx"/>
|
|
|
|
|
|
|
+ <uploads
|
|
|
|
|
+ ref="upload"
|
|
|
|
|
+ max="9"
|
|
|
|
|
+ btn-text="点击进行文件上传"
|
|
|
|
|
+ @before="before"
|
|
|
|
|
+ @success="upload"
|
|
|
|
|
+ @error="loading = false"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ :data="dept"
|
|
|
|
|
+ :action="action"
|
|
|
|
|
+ accept=".xlsx"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <span class='bold ml-10 mr-10'>是否是汇总表</span>
|
|
|
|
|
- <el-switch v-model='gather'/>
|
|
|
|
|
|
|
+ <span class="bold ml-10 mr-10">是否是汇总表</span>
|
|
|
|
|
+ <el-switch v-model="gather" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div class='flex flex-center' v-if='gather === false'>
|
|
|
|
|
- <span class='bold ml-10 mr-10'>项目所属机构:</span>
|
|
|
|
|
|
|
+ <div class="flex flex-center" v-if="gather === false">
|
|
|
|
|
+ <span class="bold ml-10 mr-10">项目所属机构:</span>
|
|
|
<div>
|
|
<div>
|
|
|
<el-autocomplete
|
|
<el-autocomplete
|
|
|
- v-model='deptName'
|
|
|
|
|
- clearable
|
|
|
|
|
- placeholder="快速搜索机构"
|
|
|
|
|
- prefix-icon="Search"
|
|
|
|
|
- :trigger-on-focus="false"
|
|
|
|
|
- :fetch-suggestions="querySearchDept"
|
|
|
|
|
- @select="handleSelectDept"
|
|
|
|
|
|
|
+ v-model="deptName"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ placeholder="快速搜索机构"
|
|
|
|
|
+ prefix-icon="Search"
|
|
|
|
|
+ :trigger-on-focus="false"
|
|
|
|
|
+ :fetch-suggestions="querySearchDept"
|
|
|
|
|
+ @select="handleSelectDept"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex flex-justify-start full-width">
|
|
<div class="flex flex-justify-start full-width">
|
|
|
- <span class="font-12 mt-10"
|
|
|
|
|
- style="color:#E24141">注意:文件格式需要为Excel表格,表格必须要有项目名称及责任单位名称两项内容,才能确保系统成功解析文件。</span>
|
|
|
|
|
|
|
+ <span class="font-12 mt-10" style="color: #e24141"
|
|
|
|
|
+ >注意:文件格式需要为Excel表格,表格必须要有项目名称及责任单位名称两项内容,才能确保系统成功解析文件。</span
|
|
|
|
|
+ >
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-divider/>
|
|
|
|
|
- <div class="hide-scrollbar full-width" style="height: 20vh;overflow-x: scroll" v-loading='loading'>
|
|
|
|
|
- <div v-if='attaches.length === 0' class='full-width flex flex-center '>
|
|
|
|
|
- <el-empty image-size='100'/>
|
|
|
|
|
|
|
+ <el-divider />
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="hide-scrollbar full-width"
|
|
|
|
|
+ style="height: 20vh; overflow-x: scroll"
|
|
|
|
|
+ v-loading="loading"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div v-if="attaches.length === 0" class="full-width flex flex-center">
|
|
|
|
|
+ <el-empty image-size="100" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="flex flex-justify-between flex-center mt-5" v-for="item in attaches" :key="item">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="flex flex-justify-between flex-center mt-5"
|
|
|
|
|
+ v-for="item in attaches"
|
|
|
|
|
+ :key="item"
|
|
|
|
|
+ >
|
|
|
<span class="blue">{{ item.name }}</span>
|
|
<span class="blue">{{ item.name }}</span>
|
|
|
<el-icon color="#DCAE64" size="16px" @click="removeFile(item)">
|
|
<el-icon color="#DCAE64" size="16px" @click="removeFile(item)">
|
|
|
- <CircleCloseFilled/>
|
|
|
|
|
|
|
+ <CircleCloseFilled />
|
|
|
</el-icon>
|
|
</el-icon>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex flex-center mt-20 mb-5">
|
|
<div class="flex flex-center mt-20 mb-5">
|
|
|
- <base-button title="重置" type="0" icon="Refresh"/>
|
|
|
|
|
- <base-button class="ml-15" title="导入" icon="el-icon-upload" @click='importExcel'/>
|
|
|
|
|
|
|
+ <base-button title="重置" type="0" icon="Refresh" />
|
|
|
|
|
+ <base-button
|
|
|
|
|
+ class="ml-15"
|
|
|
|
|
+ title="导入"
|
|
|
|
|
+ icon="el-icon-upload"
|
|
|
|
|
+ @click="importExcel"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<!-- 表格导出-->
|
|
<!-- 表格导出-->
|
|
|
- <el-dialog v-model='showExport'
|
|
|
|
|
- append-to-body
|
|
|
|
|
- center
|
|
|
|
|
- @close="close"
|
|
|
|
|
- title="数据表格导出"
|
|
|
|
|
- width="75%">
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="showExport"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ center
|
|
|
|
|
+ @close="close"
|
|
|
|
|
+ title="数据表格导出"
|
|
|
|
|
+ width="75%"
|
|
|
|
|
+ >
|
|
|
<div class="flex flex-col">
|
|
<div class="flex flex-col">
|
|
|
<el-autocomplete
|
|
<el-autocomplete
|
|
|
- v-model="keyWords"
|
|
|
|
|
- clearable
|
|
|
|
|
- placeholder="字段信息快速搜索"
|
|
|
|
|
- prefix-icon="Search"
|
|
|
|
|
- :trigger-on-focus="false"
|
|
|
|
|
- :fetch-suggestions="querySearch"
|
|
|
|
|
- @select="handleSelect"
|
|
|
|
|
|
|
+ v-model="keyWords"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ placeholder="字段信息快速搜索"
|
|
|
|
|
+ prefix-icon="Search"
|
|
|
|
|
+ :trigger-on-focus="false"
|
|
|
|
|
+ :fetch-suggestions="querySearch"
|
|
|
|
|
+ @select="handleSelect"
|
|
|
/>
|
|
/>
|
|
|
<div class="flex flex-wrap flex-align-center">
|
|
<div class="flex flex-wrap flex-align-center">
|
|
|
- <div class="flex flex-center padding radius box-shadow mr-20 mt-20 pointer"
|
|
|
|
|
- v-for="(item,index) in fieldType" :key='item.id'
|
|
|
|
|
- :class="item.count > 0 ? 'box-s' : 'box'"
|
|
|
|
|
- @click='switchTab(item,index)'>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="flex flex-center padding radius box-shadow mr-20 mt-20 pointer"
|
|
|
|
|
+ v-for="(item, index) in fieldType"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :class="item.count > 0 ? 'box-s' : 'box'"
|
|
|
|
|
+ @click="switchTab(item, index)"
|
|
|
|
|
+ >
|
|
|
<div class="flex flex-col flex-center">
|
|
<div class="flex flex-col flex-center">
|
|
|
<span class="bold font-16 text-center">{{ item.dictValue }}</span>
|
|
<span class="bold font-16 text-center">{{ item.dictValue }}</span>
|
|
|
<div class="flex flex-center">
|
|
<div class="flex flex-center">
|
|
|
<el-icon color="#81D0B2">
|
|
<el-icon color="#81D0B2">
|
|
|
- <SuccessFilled/>
|
|
|
|
|
|
|
+ <SuccessFilled />
|
|
|
</el-icon>
|
|
</el-icon>
|
|
|
<span class="grey-9 font-12">已选{{ item.count }}项目</span>
|
|
<span class="grey-9 font-12">已选{{ item.count }}项目</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -93,75 +120,84 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-divider/>
|
|
|
|
|
- <div v-loading='loading' class="hide-scrollbar full-width">
|
|
|
|
|
- <!-- <div v-if='attaches.length === 0' class='full-width flex flex-center '>-->
|
|
|
|
|
- <!-- <el-empty image-size='100'/>-->
|
|
|
|
|
- <!-- </div>-->
|
|
|
|
|
|
|
+ <el-divider />
|
|
|
|
|
+ <div v-loading="loading" class="hide-scrollbar full-width">
|
|
|
<div class="flex flex-justify-start flex-center">
|
|
<div class="flex flex-justify-start flex-center">
|
|
|
- <span class="bold grey ml-5 ">字段选择</span>
|
|
|
|
|
- <el-checkbox v-if='fieldType[selectIndex]' class='ml-20' v-model='fieldType[selectIndex].checkAll'
|
|
|
|
|
- @change='allChange'>全 选
|
|
|
|
|
|
|
+ <span class="bold grey ml-5">字段选择</span>
|
|
|
|
|
+ <el-checkbox
|
|
|
|
|
+ v-if="fieldType[selectIndex]"
|
|
|
|
|
+ class="ml-20"
|
|
|
|
|
+ v-model="fieldType[selectIndex].checkAll"
|
|
|
|
|
+ @change="allChange"
|
|
|
|
|
+ >全 选
|
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
|
- <div class='flex flex-center' v-if='selectIndex === 2'>
|
|
|
|
|
- <div class='bold ml-10 text-right' style='width: 80px'>筛选:</div>
|
|
|
|
|
|
|
+ <div class="flex flex-center" v-if="selectIndex === 2">
|
|
|
|
|
+ <div class="bold ml-10 text-right" style="width: 80px">筛选:</div>
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-model="year"
|
|
|
|
|
- clearable
|
|
|
|
|
- placeholder="选择年份"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
|
|
+ v-model="year"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ placeholder="选择年份"
|
|
|
|
|
+ style="width: 200px"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in years"
|
|
|
|
|
- :key="item + `年`"
|
|
|
|
|
- :label="item + `年`"
|
|
|
|
|
- :value="item"
|
|
|
|
|
|
|
+ v-for="item in years"
|
|
|
|
|
+ :key="item + `年`"
|
|
|
|
|
+ :label="item + `年`"
|
|
|
|
|
+ :value="item"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-model="season"
|
|
|
|
|
- clearable
|
|
|
|
|
- class='ml-20 mr-20'
|
|
|
|
|
- placeholder="选择季度"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
|
|
+ v-model="month"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ class="ml-10"
|
|
|
|
|
+ placeholder="选择月份"
|
|
|
|
|
+ style="width: 200px"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in seasons"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
|
|
+ v-for="item in months"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ :value="item.value"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-if='season === "" '
|
|
|
|
|
- v-model="month"
|
|
|
|
|
- clearable
|
|
|
|
|
- placeholder="选择月份"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ icon="el-icon-search"
|
|
|
|
|
+ class="ml-20"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="search(false)"
|
|
|
|
|
+ >搜 索</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
|
+ class="ml-20"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ plain
|
|
|
|
|
+ @click="resetKey"
|
|
|
|
|
+ >清 空</el-button
|
|
|
>
|
|
>
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in months"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
-
|
|
|
|
|
- <el-button icon='el-icon-search' class='ml-20' type='primary' @click='search(false)'>搜 索</el-button>
|
|
|
|
|
- <el-button icon='el-icon-delete' class='ml-20' type='primary' plain @click='resetKey'>清 空</el-button>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="height: 320px;overflow-x: scroll" v-if='selectIndex !== -1'>
|
|
|
|
|
- <div class="flex flex-wrap ">
|
|
|
|
|
-
|
|
|
|
|
- <div v-if='selectIndex ===2' class=' full-width'>
|
|
|
|
|
- <div v-for='item in fieldType[selectIndex].groupList' :key='item.id' class='mt-10 full-width border'>
|
|
|
|
|
- <div class='flex flex-wrap'>
|
|
|
|
|
- <div v-for='sub in item' :key='sub.id' class='pointer item'>
|
|
|
|
|
- <el-checkbox v-model='sub.checked' :label="sub.code" size="large"
|
|
|
|
|
- @change='change(selectIndex,index)'>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="height: 320px; overflow-x: scroll"
|
|
|
|
|
+ v-if="selectIndex !== -1"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="flex flex-wrap">
|
|
|
|
|
+ <div v-if="selectIndex === 2" class="full-width">
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="item in fieldType[selectIndex].groupList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ class="mt-10 full-width border"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="flex flex-wrap">
|
|
|
|
|
+ <div v-for="sub in item" :key="sub.id" class="pointer item">
|
|
|
|
|
+ <el-checkbox
|
|
|
|
|
+ v-model="sub.checked"
|
|
|
|
|
+ :label="sub.code"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ @change="change(selectIndex, index)"
|
|
|
|
|
+ >
|
|
|
{{ sub.dictValue }}
|
|
{{ sub.dictValue }}
|
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
|
</div>
|
|
</div>
|
|
@@ -169,20 +205,45 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div v-else v-for="(item,index) in fieldType[selectIndex].params" :key='item.id'
|
|
|
|
|
- class="pointer item" style='height: 30px'>
|
|
|
|
|
- <el-checkbox v-model='item.checked' :label="item.code" size="large" @change='change(selectIndex,index)'>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-else
|
|
|
|
|
+ v-for="(item, index) in fieldType[selectIndex].params"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ class="pointer item"
|
|
|
|
|
+ style="height: 30px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-checkbox
|
|
|
|
|
+ v-model="item.checked"
|
|
|
|
|
+ :label="item.code"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ @change="change(selectIndex, index)"
|
|
|
|
|
+ >
|
|
|
{{ item.dictValue }}
|
|
{{ item.dictValue }}
|
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-empty v-else description='点击上方按钮,选择字段'/>
|
|
|
|
|
|
|
+ <el-empty v-else description="点击上方按钮,选择字段" />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex flex-center mt-20 mb-5">
|
|
<div class="flex flex-center mt-20 mb-5">
|
|
|
- <base-button title="重置" @click='resetParams' type="0" icon="Refresh"/>
|
|
|
|
|
- <base-button title="保存配置" @click='saveConfigParams' class='ml-15' icon="Upload"/>
|
|
|
|
|
- <base-button class="ml-15" title="导出预览" icon="el-icon-download" @click='exportExcel'/>
|
|
|
|
|
|
|
+ <base-button
|
|
|
|
|
+ title="重置"
|
|
|
|
|
+ @click="resetParams"
|
|
|
|
|
+ type="0"
|
|
|
|
|
+ icon="Refresh"
|
|
|
|
|
+ />
|
|
|
|
|
+ <base-button
|
|
|
|
|
+ title="保存配置"
|
|
|
|
|
+ @click="saveConfigParams"
|
|
|
|
|
+ class="ml-15"
|
|
|
|
|
+ icon="Upload"
|
|
|
|
|
+ />
|
|
|
|
|
+ <base-button
|
|
|
|
|
+ class="ml-15"
|
|
|
|
|
+ title="导出预览"
|
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
|
+ @click="exportExcel"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</div>
|
|
</div>
|
|
@@ -197,19 +258,19 @@ import { unique } from '@/utils/tools.js'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'form_dialog',
|
|
name: 'form_dialog',
|
|
|
components: { BaseButton, uploads },
|
|
components: { BaseButton, uploads },
|
|
|
- setup () {
|
|
|
|
|
|
|
+ setup() {
|
|
|
const user = useStore()
|
|
const user = useStore()
|
|
|
return { user }
|
|
return { user }
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
dialogType: {
|
|
dialogType: {
|
|
|
- type: String,
|
|
|
|
|
|
|
+ type: Number,
|
|
|
default: -1
|
|
default: -1
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
dialogType: {
|
|
dialogType: {
|
|
|
- handler (val) {
|
|
|
|
|
|
|
+ handler(val) {
|
|
|
if (val === 0) {
|
|
if (val === 0) {
|
|
|
this.showImport = true
|
|
this.showImport = true
|
|
|
} else if (val === 1) {
|
|
} else if (val === 1) {
|
|
@@ -224,16 +285,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
immediate: true
|
|
immediate: true
|
|
|
- },
|
|
|
|
|
- season: {
|
|
|
|
|
- handler (val) {
|
|
|
|
|
- if (val.length > 0) {
|
|
|
|
|
- this.month = ''
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- data () {
|
|
|
|
|
|
|
+ data() {
|
|
|
return {
|
|
return {
|
|
|
deptName: '',
|
|
deptName: '',
|
|
|
deptList: [],
|
|
deptList: [],
|
|
@@ -261,25 +315,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
years: [],
|
|
years: [],
|
|
|
year: '',
|
|
year: '',
|
|
|
- seasons: [
|
|
|
|
|
- {
|
|
|
|
|
- name: '第一季度',
|
|
|
|
|
- value: 1
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '第二季度',
|
|
|
|
|
- value: 2
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '第三季度',
|
|
|
|
|
- value: 3
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '第四季度',
|
|
|
|
|
- value: 4
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
- season: '',
|
|
|
|
|
months: [
|
|
months: [
|
|
|
{
|
|
{
|
|
|
name: '1-2月',
|
|
name: '1-2月',
|
|
@@ -329,11 +364,11 @@ export default {
|
|
|
month: ''
|
|
month: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created () {
|
|
|
|
|
|
|
+ created() {
|
|
|
this.init()
|
|
this.init()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- init () {
|
|
|
|
|
|
|
+ init() {
|
|
|
const tmp = new Date().getFullYear()
|
|
const tmp = new Date().getFullYear()
|
|
|
this.year = tmp
|
|
this.year = tmp
|
|
|
for (let i = 0; i < tmp - 2017; i++) {
|
|
for (let i = 0; i < tmp - 2017; i++) {
|
|
@@ -344,7 +379,7 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 获取督查情况
|
|
* 获取督查情况
|
|
|
*/
|
|
*/
|
|
|
- getInspects (status) {
|
|
|
|
|
|
|
+ getInspects(status) {
|
|
|
const data = { status }
|
|
const data = { status }
|
|
|
this.$api.inspect.list(Object.assign(this.page, data)).then(res => {
|
|
this.$api.inspect.list(Object.assign(this.page, data)).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -352,7 +387,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getDict (code) {
|
|
|
|
|
|
|
+ getDict(code) {
|
|
|
this.$api.common.dicList({ code }).then(res => {
|
|
this.$api.common.dicList({ code }).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
if (code === 'inspect_type') {
|
|
if (code === 'inspect_type') {
|
|
@@ -370,10 +405,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- close () {
|
|
|
|
|
|
|
+ close() {
|
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
|
},
|
|
},
|
|
|
- upload (res) {
|
|
|
|
|
|
|
+ upload(res) {
|
|
|
this.attaches = res.fileList
|
|
this.attaches = res.fileList
|
|
|
this.$message.success('操作成功')
|
|
this.$message.success('操作成功')
|
|
|
this.showImport = false
|
|
this.showImport = false
|
|
@@ -381,53 +416,69 @@ export default {
|
|
|
this.deptName = ''
|
|
this.deptName = ''
|
|
|
this.close()
|
|
this.close()
|
|
|
},
|
|
},
|
|
|
- before (files) {
|
|
|
|
|
|
|
+ before(files) {
|
|
|
this.attaches = files
|
|
this.attaches = files
|
|
|
},
|
|
},
|
|
|
- removeFile (item) {
|
|
|
|
|
|
|
+ removeFile(item) {
|
|
|
this.attaches = this.attaches.filter(sub => sub.uid !== item.uid)
|
|
this.attaches = this.attaches.filter(sub => sub.uid !== item.uid)
|
|
|
},
|
|
},
|
|
|
- switchTab (item, index) {
|
|
|
|
|
|
|
+ switchTab(item, index) {
|
|
|
this.fieldType[index].isSelect = !this.fieldType[index].isSelect
|
|
this.fieldType[index].isSelect = !this.fieldType[index].isSelect
|
|
|
this.selectIndex = index
|
|
this.selectIndex = index
|
|
|
- if (index === 2) { // 年度投资情况
|
|
|
|
|
- this.$api.params.paramsList({
|
|
|
|
|
- type: this.fieldType[this.selectIndex].dictKey,
|
|
|
|
|
- year: this.year,
|
|
|
|
|
- season: this.season,
|
|
|
|
|
- month: this.month
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ if (index === 2) {
|
|
|
|
|
+ // 年度投资情况
|
|
|
|
|
+ this.$api.params
|
|
|
|
|
+ .paramsList({
|
|
|
|
|
+ type: this.fieldType[this.selectIndex].dictKey,
|
|
|
|
|
+ year: this.year,
|
|
|
|
|
+ month: this.month
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.parseList(res.data, index, false)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$api.params
|
|
|
|
|
+ .paramsList({
|
|
|
|
|
+ type: this.fieldType[index].dictKey,
|
|
|
|
|
+ export: 1,
|
|
|
|
|
+ year: '',
|
|
|
|
|
+ month: ''
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
this.parseList(res.data, index, false)
|
|
this.parseList(res.data, index, false)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- this.$api.params.paramsList({
|
|
|
|
|
- type: this.fieldType[index].dictKey,
|
|
|
|
|
- export: 1,
|
|
|
|
|
- year: '',
|
|
|
|
|
- season: '',
|
|
|
|
|
- month: ''
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- this.parseList(res.data, index, false)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 组装数据
|
|
* 组装数据
|
|
|
* @param list
|
|
* @param list
|
|
|
* @param index
|
|
* @param index
|
|
|
*/
|
|
*/
|
|
|
- parseList (list, index, reset) {
|
|
|
|
|
- const tmps = list.map(e => {
|
|
|
|
|
- e.checked = e.checked === 1 ? true : reset ? false : this.fieldType[index].params === undefined ? false : this.fieldType[index].params.findIndex(sub => sub.id === e.id) > -1
|
|
|
|
|
- return e
|
|
|
|
|
- }).filter(sub => sub.code !== 'name')
|
|
|
|
|
|
|
+ parseList(list, index, reset) {
|
|
|
|
|
+ const tmps = list
|
|
|
|
|
+ .map(e => {
|
|
|
|
|
+ e.checked =
|
|
|
|
|
+ e.checked === 1
|
|
|
|
|
+ ? true
|
|
|
|
|
+ : reset
|
|
|
|
|
+ ? false
|
|
|
|
|
+ : this.fieldType[index].params === undefined
|
|
|
|
|
+ ? false
|
|
|
|
|
+ : this.fieldType[index].params.findIndex(sub => sub.id === e.id) >
|
|
|
|
|
+ -1
|
|
|
|
|
+ return e
|
|
|
|
|
+ })
|
|
|
|
|
+ .filter(sub => sub.code !== 'name')
|
|
|
if (this.fieldType[index].params !== undefined && reset === false) {
|
|
if (this.fieldType[index].params !== undefined && reset === false) {
|
|
|
const d = tmps.filter(ele => {
|
|
const d = tmps.filter(ele => {
|
|
|
- return this.fieldType[index].params.findIndex(sub => sub.id === ele.id) === -1
|
|
|
|
|
|
|
+ return (
|
|
|
|
|
+ this.fieldType[index].params.findIndex(sub => sub.id === ele.id) ===
|
|
|
|
|
+ -1
|
|
|
|
|
+ )
|
|
|
})
|
|
})
|
|
|
for (let i = 0; i < d.length; i++) {
|
|
for (let i = 0; i < d.length; i++) {
|
|
|
this.fieldType[index].params.push(d[i])
|
|
this.fieldType[index].params.push(d[i])
|
|
@@ -437,26 +488,36 @@ export default {
|
|
|
}
|
|
}
|
|
|
// list to params
|
|
// list to params
|
|
|
// 排序 ,去重,返回type 关键词数组 list
|
|
// 排序 ,去重,返回type 关键词数组 list
|
|
|
- const keys = unique(this.fieldType[index].params.sort((val1, val2) => {
|
|
|
|
|
- if (val1.frontSort < val2.frontSort) return -1
|
|
|
|
|
- if (val1.frontSort > val2.frontSort) return 0
|
|
|
|
|
- return 0
|
|
|
|
|
- }).map(sub => sub.type))
|
|
|
|
|
|
|
+ const keys = unique(
|
|
|
|
|
+ this.fieldType[index].params
|
|
|
|
|
+ .sort((val1, val2) => {
|
|
|
|
|
+ if (val1.frontSort < val2.frontSort) return -1
|
|
|
|
|
+ if (val1.frontSort > val2.frontSort) return 0
|
|
|
|
|
+ return 0
|
|
|
|
|
+ })
|
|
|
|
|
+ .map(sub => sub.type)
|
|
|
|
|
+ )
|
|
|
// 分组数据
|
|
// 分组数据
|
|
|
this.fieldType[index].groupList = []
|
|
this.fieldType[index].groupList = []
|
|
|
keys.forEach(sub => {
|
|
keys.forEach(sub => {
|
|
|
- this.fieldType[index].groupList.push(this.fieldType[index].params.filter(item => item.type === sub))
|
|
|
|
|
|
|
+ this.fieldType[index].groupList.push(
|
|
|
|
|
+ this.fieldType[index].params.filter(item => item.type === sub)
|
|
|
|
|
+ )
|
|
|
})
|
|
})
|
|
|
- this.fieldType[index].count = this.fieldType[index].params.filter(e => e.checked).length
|
|
|
|
|
- this.fieldType[index].checkAll = this.fieldType[index].count === this.fieldType[index].params.length
|
|
|
|
|
|
|
+ this.fieldType[index].count = this.fieldType[index].params.filter(
|
|
|
|
|
+ e => e.checked
|
|
|
|
|
+ ).length
|
|
|
|
|
+ this.fieldType[index].checkAll =
|
|
|
|
|
+ this.fieldType[index].count === this.fieldType[index].params.length
|
|
|
},
|
|
},
|
|
|
- importExcel () {
|
|
|
|
|
|
|
+ importExcel() {
|
|
|
if (this.attaches && this.attaches.length === 0) {
|
|
if (this.attaches && this.attaches.length === 0) {
|
|
|
this.$message.error('请选择要上传的文件')
|
|
this.$message.error('请选择要上传的文件')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if (this.gather) {
|
|
if (this.gather) {
|
|
|
- this.action = '/api//wutong-parse-file/import-excel/v1/parse-summary-excel'
|
|
|
|
|
|
|
+ this.action =
|
|
|
|
|
+ '/api//wutong-parse-file/import-excel/v1/parse-summary-excel'
|
|
|
} else {
|
|
} else {
|
|
|
if (this.dept === null) {
|
|
if (this.dept === null) {
|
|
|
this.$message.error('请选择项目所属机构')
|
|
this.$message.error('请选择项目所属机构')
|
|
@@ -473,51 +534,64 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.$refs.upload.submit()
|
|
this.$refs.upload.submit()
|
|
|
},
|
|
},
|
|
|
- change (parentIndex, index) {
|
|
|
|
|
|
|
+ change(parentIndex, index) {
|
|
|
const tmp = this.fieldType[parentIndex].params.filter(e => e.checked)
|
|
const tmp = this.fieldType[parentIndex].params.filter(e => e.checked)
|
|
|
this.fieldType[parentIndex].count = tmp.length
|
|
this.fieldType[parentIndex].count = tmp.length
|
|
|
for (let i = 0; i < tmp.length; i++) {
|
|
for (let i = 0; i < tmp.length; i++) {
|
|
|
this.resultParams.push(tmp[i])
|
|
this.resultParams.push(tmp[i])
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- allChange (res) {
|
|
|
|
|
- this.fieldType[this.selectIndex].params = this.fieldType[this.selectIndex].params.map(sub => {
|
|
|
|
|
|
|
+ allChange(res) {
|
|
|
|
|
+ this.fieldType[this.selectIndex].params = this.fieldType[
|
|
|
|
|
+ this.selectIndex
|
|
|
|
|
+ ].params.map(sub => {
|
|
|
sub.checked = res
|
|
sub.checked = res
|
|
|
return sub
|
|
return sub
|
|
|
})
|
|
})
|
|
|
const tmp = this.fieldType[this.selectIndex].params.filter(e => e.checked)
|
|
const tmp = this.fieldType[this.selectIndex].params.filter(e => e.checked)
|
|
|
this.fieldType[this.selectIndex].count = tmp.length
|
|
this.fieldType[this.selectIndex].count = tmp.length
|
|
|
},
|
|
},
|
|
|
- resetParams () {
|
|
|
|
|
- this.fieldType[this.selectIndex].params = this.fieldType[this.selectIndex].params.map(sub => {
|
|
|
|
|
|
|
+ resetParams() {
|
|
|
|
|
+ this.fieldType[this.selectIndex].params = this.fieldType[
|
|
|
|
|
+ this.selectIndex
|
|
|
|
|
+ ].params.map(sub => {
|
|
|
sub.checked = false
|
|
sub.checked = false
|
|
|
return sub
|
|
return sub
|
|
|
})
|
|
})
|
|
|
this.fieldType[this.selectIndex].count = 0
|
|
this.fieldType[this.selectIndex].count = 0
|
|
|
},
|
|
},
|
|
|
- exportExcel () {
|
|
|
|
|
- const params = this.fieldType.filter(sub => sub.params).map(sub => sub.params)
|
|
|
|
|
|
|
+ exportExcel() {
|
|
|
|
|
+ const params = this.fieldType
|
|
|
|
|
+ .filter(sub => sub.params)
|
|
|
|
|
+ .map(sub => sub.params)
|
|
|
const tmps = [].concat.apply([], params)
|
|
const tmps = [].concat.apply([], params)
|
|
|
const tmpsList = tmps.filter(sub => sub.checked)
|
|
const tmpsList = tmps.filter(sub => sub.checked)
|
|
|
if (tmpsList && tmpsList.length > 0) {
|
|
if (tmpsList && tmpsList.length > 0) {
|
|
|
const result = tmpsList.map(sub => sub.code).join(',')
|
|
const result = tmpsList.map(sub => sub.code).join(',')
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
- this.$emit('export', 'name,' + result)
|
|
|
|
|
|
|
+ this.$emit('export', 'name,' + result, this.year)
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error('未选择任何字段进行导出')
|
|
this.$message.error('未选择任何字段进行导出')
|
|
|
}
|
|
}
|
|
|
this.attaches = []
|
|
this.attaches = []
|
|
|
},
|
|
},
|
|
|
- querySearchDept (key, cb) {
|
|
|
|
|
|
|
+ querySearchDept(key, cb) {
|
|
|
if (key && key.length === 0) {
|
|
if (key && key.length === 0) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- const parentId = [0, 2].includes(this.user.info.viewStage) ? this.user.info.parentDeptId : this.user.info.deptId
|
|
|
|
|
|
|
+ const parentId = [0, 2].includes(this.user.info.viewStage)
|
|
|
|
|
+ ? this.user.info.parentDeptId
|
|
|
|
|
+ : this.user.info.deptId
|
|
|
this.$api.system.getDeptLazy({ deptName: key, parentId }).then(res => {
|
|
this.$api.system.getDeptLazy({ deptName: key, parentId }).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
const tmp = res.data.map(sub => {
|
|
const tmp = res.data.map(sub => {
|
|
|
- const item = { value: sub.deptName, label: sub.deptName, deptId: sub.id, areaCode: sub.areaCode }
|
|
|
|
|
|
|
+ const item = {
|
|
|
|
|
+ value: sub.deptName,
|
|
|
|
|
+ label: sub.deptName,
|
|
|
|
|
+ deptId: sub.id,
|
|
|
|
|
+ areaCode: sub.areaCode
|
|
|
|
|
+ }
|
|
|
return item
|
|
return item
|
|
|
})
|
|
})
|
|
|
cb(tmp)
|
|
cb(tmp)
|
|
@@ -525,7 +599,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
}, 500)
|
|
}, 500)
|
|
|
},
|
|
},
|
|
|
- querySearch (string, cb) {
|
|
|
|
|
|
|
+ querySearch(string, cb) {
|
|
|
if (string && string.length === 0) {
|
|
if (string && string.length === 0) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -541,10 +615,10 @@ export default {
|
|
|
})
|
|
})
|
|
|
}, 500)
|
|
}, 500)
|
|
|
},
|
|
},
|
|
|
- handleSelectDept (item) {
|
|
|
|
|
|
|
+ handleSelectDept(item) {
|
|
|
this.dept = item
|
|
this.dept = item
|
|
|
},
|
|
},
|
|
|
- handleSelect (item) {
|
|
|
|
|
|
|
+ handleSelect(item) {
|
|
|
const sub = item
|
|
const sub = item
|
|
|
sub.search = true
|
|
sub.search = true
|
|
|
sub.checked = true
|
|
sub.checked = true
|
|
@@ -555,7 +629,9 @@ export default {
|
|
|
this.fieldType[index].params = []
|
|
this.fieldType[index].params = []
|
|
|
this.fieldType[index].params.push(sub)
|
|
this.fieldType[index].params.push(sub)
|
|
|
} else {
|
|
} else {
|
|
|
- const subIndex = this.fieldType[index].params.findIndex(ele => ele.id === sub.id)
|
|
|
|
|
|
|
+ const subIndex = this.fieldType[index].params.findIndex(
|
|
|
|
|
+ ele => ele.id === sub.id
|
|
|
|
|
+ )
|
|
|
if (subIndex > -1) {
|
|
if (subIndex > -1) {
|
|
|
this.fieldType[index].params[subIndex].checked = true
|
|
this.fieldType[index].params[subIndex].checked = true
|
|
|
} else {
|
|
} else {
|
|
@@ -563,29 +639,33 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.$message.success(item.dictValue + '已勾选成功')
|
|
this.$message.success(item.dictValue + '已勾选成功')
|
|
|
- this.fieldType[index].params.count = this.fieldType[index].params.filter(sub => sub.checked).length
|
|
|
|
|
|
|
+ this.fieldType[index].params.count = this.fieldType[
|
|
|
|
|
+ index
|
|
|
|
|
+ ].params.filter(sub => sub.checked).length
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- resetKey () {
|
|
|
|
|
|
|
+ resetKey() {
|
|
|
this.year = ''
|
|
this.year = ''
|
|
|
- this.season = ''
|
|
|
|
|
this.month = ''
|
|
this.month = ''
|
|
|
this.search(false)
|
|
this.search(false)
|
|
|
},
|
|
},
|
|
|
- search (clean) {
|
|
|
|
|
- this.$api.params.paramsList({
|
|
|
|
|
- type: this.fieldType[this.selectIndex].dictKey,
|
|
|
|
|
- year: this.year,
|
|
|
|
|
- season: this.season,
|
|
|
|
|
- month: this.month
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- this.parseList(res.data, this.selectIndex, true)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ search(clean) {
|
|
|
|
|
+ this.$api.params
|
|
|
|
|
+ .paramsList({
|
|
|
|
|
+ type: this.fieldType[this.selectIndex].dictKey,
|
|
|
|
|
+ year: this.year,
|
|
|
|
|
+ month: this.month
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.parseList(res.data, this.selectIndex, true)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- saveConfigParams () {
|
|
|
|
|
- const tmp = this.fieldType.filter(sub => sub.params).map(sub => sub.params)
|
|
|
|
|
|
|
+ saveConfigParams() {
|
|
|
|
|
+ const tmp = this.fieldType
|
|
|
|
|
+ .filter(sub => sub.params)
|
|
|
|
|
+ .map(sub => sub.params)
|
|
|
const tmps = [].concat.apply([], tmp)
|
|
const tmps = [].concat.apply([], tmp)
|
|
|
const tmpsList = tmps.filter(sub => sub.checked).map(sub => sub.id)
|
|
const tmpsList = tmps.filter(sub => sub.checked).map(sub => sub.id)
|
|
|
this.$api.params.saveConfigParams(tmpsList).then(res => {
|
|
this.$api.params.saveConfigParams(tmpsList).then(res => {
|
|
@@ -608,10 +688,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.box-s {
|
|
.box-s {
|
|
|
- border: 1px solid #AC9A7C;
|
|
|
|
|
|
|
+ border: 1px solid #ac9a7c;
|
|
|
width: 120px;
|
|
width: 120px;
|
|
|
height: 50px;
|
|
height: 50px;
|
|
|
- color: #D1A55F;
|
|
|
|
|
|
|
+ color: #d1a55f;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item {
|
|
.item {
|
|
@@ -625,7 +705,7 @@ export default {
|
|
|
width: 120px;
|
|
width: 120px;
|
|
|
height: 50px;
|
|
height: 50px;
|
|
|
border: 1px solid transparent;
|
|
border: 1px solid transparent;
|
|
|
- background: #F1F2F7;
|
|
|
|
|
|
|
+ background: #f1f2f7;
|
|
|
color: #707070;
|
|
color: #707070;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|