|
|
@@ -3,168 +3,227 @@
|
|
|
<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">{{ num ? Number.parseFloat(num).toLocaleString() : '0' }}</span>万元</span>
|
|
|
+ <span class="ml-5"
|
|
|
+ >项目总投资额<span class="main-color bold">{{
|
|
|
+ num ? Number.parseFloat(num).toLocaleString() : '0'
|
|
|
+ }}</span
|
|
|
+ >万元</span
|
|
|
+ >
|
|
|
</div>
|
|
|
- <div class="flex ml-20 hide-scrollbar" style="overflow-x: scroll;width: 86vw;"
|
|
|
- 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)'
|
|
|
+ <div
|
|
|
+ class="flex ml-20 hide-scrollbar"
|
|
|
+ style="overflow-x: scroll; width: 86vw"
|
|
|
+ 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)"
|
|
|
>
|
|
|
- <span class=" sp">{{ item.name }}</span>
|
|
|
- <span class=" sp1 ">{{ item.number }}<span class="grey font-13">个</span></span>
|
|
|
+ <span class="sp">{{ item.name }}</span>
|
|
|
+ <span class="sp1"
|
|
|
+ >{{ 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="新增"
|
|
|
- @click="showAdd = true"/>
|
|
|
- <base-button class="ml-20 mt-20" icon="el-icon-upload" title="数据导入"
|
|
|
- @click="diaType = 0"/>
|
|
|
- <base-button 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"/>
|
|
|
+ <div class="flex flex-center flex-justify-start">
|
|
|
+ <base-button
|
|
|
+ class="ml-20 mt-20"
|
|
|
+ icon="Plus"
|
|
|
+ title="新增"
|
|
|
+ @click="showAdd = true"
|
|
|
+ />
|
|
|
+ <base-button
|
|
|
+ class="ml-20 mt-20"
|
|
|
+ icon="el-icon-upload"
|
|
|
+ title="数据导入"
|
|
|
+ @click="diaType = 0"
|
|
|
+ />
|
|
|
+ <base-button
|
|
|
+ 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"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <avue-crud ref="crud"
|
|
|
- v-model="form"
|
|
|
- v-model:page="page"
|
|
|
- :before-open="beforeOpen"
|
|
|
- :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='user.info.viewStage !== 1' icon="Upload" type='primary' text @click="track(row)"> {{
|
|
|
- row.is_report === 1 ? "项目已上报" : "项目上报"
|
|
|
- }}
|
|
|
+ <avue-crud
|
|
|
+ ref="crud"
|
|
|
+ v-model="form"
|
|
|
+ v-model:page="page"
|
|
|
+ :before-open="beforeOpen"
|
|
|
+ :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="user.info.viewStage !== 1"
|
|
|
+ icon="Upload"
|
|
|
+ type="primary"
|
|
|
+ text
|
|
|
+ @click="track(row)"
|
|
|
+ >
|
|
|
+ {{ row.is_report === 1 ? '项目已上报' : '项目上报' }}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
- <template #plan_storage_time-header="{column}">
|
|
|
- <div class='flex flex-center'>
|
|
|
- <div class='mr-5'>{{ (column || {}).label }}</div>
|
|
|
- <el-tooltip content='红色为计划开工时间,蓝色为实际开工时间'>
|
|
|
+ <template #plan_storage_time-header="{ column }">
|
|
|
+ <div class="flex flex-center">
|
|
|
+ <div class="mr-5">{{ (column || {}).label }}</div>
|
|
|
+ <el-tooltip content="红色为计划开工时间,蓝色为实际开工时间">
|
|
|
<el-icon>
|
|
|
- <InfoFilled/>
|
|
|
+ <InfoFilled />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <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 '>
|
|
|
+ <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"
|
|
|
+ >
|
|
|
{{ row.plan_storage_time.substring(0, 10) }}
|
|
|
</div>
|
|
|
- <div class='mr-5 blue' v-else>{{ row.storage_time ? row.storage_time.substring(0, 10) : '' }}</div>
|
|
|
+ <div class="mr-5 blue" v-else>
|
|
|
+ {{ row.storage_time ? row.storage_time.substring(0, 10) : '' }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
- <template #plan_commencement_time-header="{column}">
|
|
|
- <div class='flex flex-center'>
|
|
|
- <div class='mr-5'>{{ (column || {}).label }}</div>
|
|
|
- <el-tooltip content='红色为计划开工时间,蓝色为实际开工时间'>
|
|
|
+ <template #plan_commencement_time-header="{ column }">
|
|
|
+ <div class="flex flex-center">
|
|
|
+ <div class="mr-5">{{ (column || {}).label }}</div>
|
|
|
+ <el-tooltip content="红色为计划开工时间,蓝色为实际开工时间">
|
|
|
<el-icon>
|
|
|
- <InfoFilled/>
|
|
|
+ <InfoFilled />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template #plan_commencement_time="{row}">
|
|
|
- <div class='flex flex-center'>
|
|
|
- <div class='mr-5 red'
|
|
|
- v-if='row.plan_commencement_time !== undefined && (row.is_start === undefined ||row.is_start === 0 )'>{{
|
|
|
- row.plan_commencement_time.substring(0, 10)
|
|
|
- }}
|
|
|
+ <template #plan_commencement_time="{ row }">
|
|
|
+ <div class="flex flex-center">
|
|
|
+ <div
|
|
|
+ class="mr-5 red"
|
|
|
+ v-if="
|
|
|
+ row.plan_commencement_time !== undefined &&
|
|
|
+ (row.is_start === undefined || row.is_start === 0)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{ row.plan_commencement_time.substring(0, 10) }}
|
|
|
+ </div>
|
|
|
+ <div class="mr-5 blue" v-else>
|
|
|
+ {{ row.start_time ? row.start_time.substring(0, 10) : '' }}
|
|
|
</div>
|
|
|
- <div class='mr-5 blue' v-else>{{ row.start_time ? row.start_time.substring(0, 10) : '' }}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<!-- 新增-->
|
|
|
- <el-dialog 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">
|
|
|
+ <el-dialog
|
|
|
+ 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"
|
|
|
+ >
|
|
|
<div class="flex flex-center flex-col mr-20">
|
|
|
- <el-form-item class="full-width" label="项目名称" prop='name'>
|
|
|
+ <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'>
|
|
|
+ <el-form-item
|
|
|
+ class="full-width"
|
|
|
+ label="项目总投"
|
|
|
+ prop="totalAmount"
|
|
|
+ >
|
|
|
<el-input
|
|
|
- v-model="projectForm.totalAmount"
|
|
|
- clearable
|
|
|
- placeholder="输入项目总投(万元)"
|
|
|
+ v-model="projectForm.totalAmount"
|
|
|
+ clearable
|
|
|
+ placeholder="输入项目总投(万元)"
|
|
|
>
|
|
|
<template #append>(万元)</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item class="full-width" label="项目类型" prop='projectType'>-->
|
|
|
- <!-- <el-select-->
|
|
|
- <!-- v-model="projectForm.projectType"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- placeholder="选择项目类型"-->
|
|
|
- <!-- style="width: 100%"-->
|
|
|
- <!-- >-->
|
|
|
- <!-- <el-option-->
|
|
|
- <!-- v-for="item in typeList"-->
|
|
|
- <!-- :key="item.id"-->
|
|
|
- <!-- :label="item.name"-->
|
|
|
- <!-- :value="item.id"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-select>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <el-form-item class="full-width" label="项目标签" prop='tags'>
|
|
|
+ <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="建设内容">
|
|
|
<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"/>
|
|
|
- <base-button icon="Check" title="保存" @click="projectSave"/>
|
|
|
+ <base-button
|
|
|
+ class="mr-20"
|
|
|
+ icon="Close"
|
|
|
+ title="取消"
|
|
|
+ type="0"
|
|
|
+ @click="showAdd = false"
|
|
|
+ />
|
|
|
+ <base-button icon="Check" title="保存" @click="projectSave" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <form-dialog :dialogType="diaType" @close="formDialogClose" @export='exportExcel' :ids='selectList'/>
|
|
|
- <summary-dialog :dialogType="diaType" @close="diaType = -1"
|
|
|
- :select-num='selectList.length === 0 ? page.total : selectList.length'
|
|
|
- @export='exportExcelTotal'/>
|
|
|
+ <form-dialog
|
|
|
+ :dialogType="diaType"
|
|
|
+ @close="formDialogClose"
|
|
|
+ @export="exportExcel"
|
|
|
+ :ids="selectList"
|
|
|
+ />
|
|
|
+ <summary-dialog
|
|
|
+ :dialogType="diaType"
|
|
|
+ @close="diaType = -1"
|
|
|
+ :select-num="selectList.length === 0 ? page.total : selectList.length"
|
|
|
+ @export="exportExcelTotal"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -179,12 +238,12 @@ import { useStore } from '@/store/user.js'
|
|
|
export default {
|
|
|
name: 'dash',
|
|
|
components: { BaseButton, formDialog, summaryDialog },
|
|
|
- setup () {
|
|
|
+ setup() {
|
|
|
const permissions = permissionStore()
|
|
|
const user = useStore()
|
|
|
return { permissions, user }
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
dialogLoading: false,
|
|
|
disable: false,
|
|
|
@@ -228,7 +287,8 @@ export default {
|
|
|
prop: 'project_stage',
|
|
|
type: 'select',
|
|
|
width: 120,
|
|
|
- dicUrl: '/api/blade-system/dict-biz/dictionary?code=project-situation',
|
|
|
+ dicUrl:
|
|
|
+ '/api/blade-system/dict-biz/dictionary?code=project-situation',
|
|
|
props: {
|
|
|
label: 'dictValue',
|
|
|
value: 'dictKey'
|
|
|
@@ -304,7 +364,8 @@ export default {
|
|
|
label: '认定时间',
|
|
|
prop: 'year',
|
|
|
width: 160
|
|
|
- }]
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
page: {
|
|
|
size: 10,
|
|
|
@@ -324,9 +385,7 @@ export default {
|
|
|
introduction: ''
|
|
|
},
|
|
|
rules: {
|
|
|
- name: [
|
|
|
- { required: true, message: '请输入项目名称', trigger: 'blur' }
|
|
|
- ],
|
|
|
+ name: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
|
|
projectType: [
|
|
|
{
|
|
|
required: true,
|
|
|
@@ -351,12 +410,15 @@ export default {
|
|
|
dev: false
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
this.dev = sessionStorage.getItem('dev') === 'true'
|
|
|
const index = this.option.column.findIndex(sub => sub.prop === 'lot')
|
|
|
- const indexLabel = this.option.column.findIndex(sub => sub.prop === 'responsible_unit')
|
|
|
+ const indexLabel = this.option.column.findIndex(
|
|
|
+ sub => sub.prop === 'responsible_unit'
|
|
|
+ )
|
|
|
console.log(indexLabel)
|
|
|
- if (this.user.info.viewStage === 1) { // 发改
|
|
|
+ if (this.user.info.viewStage === 1) {
|
|
|
+ // 发改
|
|
|
this.option.column[index].hide = true
|
|
|
this.option.column[indexLabel].label = '责任单位'
|
|
|
} else {
|
|
|
@@ -375,40 +437,43 @@ export default {
|
|
|
this.getTypeList()
|
|
|
this.getNumList()
|
|
|
},
|
|
|
- unmounted () {
|
|
|
+ unmounted() {
|
|
|
sessionStorage.removeItem('selectList')
|
|
|
},
|
|
|
methods: {
|
|
|
- switchTab (item, index) {
|
|
|
+ switchTab(item, index) {
|
|
|
this.active = index
|
|
|
this.num = this.numList[index].totalAmount
|
|
|
this.projectStageQuery = { projectStage: item.dictKey }
|
|
|
this.onLoad(Object.assign(this.owerQuery, this.projectStageQuery))
|
|
|
},
|
|
|
- onLoad (query = {}) {
|
|
|
+ onLoad(query = {}) {
|
|
|
this.loading = true
|
|
|
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
|
|
|
- return e
|
|
|
- })
|
|
|
- this.page.total = res.data.total
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ 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
|
|
|
+ return e
|
|
|
+ })
|
|
|
+ this.page.total = res.data.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
- selectionChange (list) {
|
|
|
+ selectionChange(list) {
|
|
|
this.selectList = list.map(sub => sub.id)
|
|
|
},
|
|
|
- beforeOpen (done, type) {
|
|
|
+ beforeOpen(done, type) {
|
|
|
if (['edit'].includes(type)) {
|
|
|
if (this.user.info.account !== '15368241401') {
|
|
|
this.$confirm('暂未授权使用', {
|
|
|
@@ -419,7 +484,11 @@ export default {
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
path: '/home/details',
|
|
|
- query: { id: this.form.id, type: '0', ownerId: this.form.createUser }
|
|
|
+ query: {
|
|
|
+ id: this.form.id,
|
|
|
+ type: '0',
|
|
|
+ ownerId: this.form.createUser
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
} else if (type === 'view') {
|
|
|
@@ -429,43 +498,44 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- currentChange (currentPage) {
|
|
|
+ currentChange(currentPage) {
|
|
|
this.page.current = currentPage
|
|
|
},
|
|
|
- sizeChange (pageSize) {
|
|
|
+ sizeChange(pageSize) {
|
|
|
this.page.size = pageSize
|
|
|
},
|
|
|
- refreshChange () {
|
|
|
+ refreshChange() {
|
|
|
this.onLoad()
|
|
|
},
|
|
|
- treeLoad (tree, treeNode, resolve) {
|
|
|
+ treeLoad(tree, treeNode, resolve) {
|
|
|
this.loading = true
|
|
|
getLazyList(tree.id).then(res => {
|
|
|
this.loading = false
|
|
|
- resolve(res.data.data.childrenList.map(e => {
|
|
|
- e.project_stage = e.project_stage.toString()
|
|
|
- return e
|
|
|
- }))
|
|
|
+ resolve(
|
|
|
+ res.data.data.childrenList.map(e => {
|
|
|
+ e.project_stage = e.project_stage.toString()
|
|
|
+ return e
|
|
|
+ })
|
|
|
+ )
|
|
|
})
|
|
|
},
|
|
|
- rowDel (row) {
|
|
|
+ rowDel(row) {
|
|
|
this.$confirm('确定删除选择的项目?', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$api.project.projectRemove({ ids: row.id }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message.success(res.msg)
|
|
|
- this.onLoad()
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg)
|
|
|
- }
|
|
|
- })
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.project.projectRemove({ ids: row.id }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.onLoad()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
})
|
|
|
+ })
|
|
|
},
|
|
|
- getNumList (data) {
|
|
|
+ getNumList(data) {
|
|
|
this.$api.project.userNunList(data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.numList = res.data.projectStage
|
|
|
@@ -473,27 +543,38 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getTypeList () {
|
|
|
- this.$api.project.typeList({ type: 1, size: 999, current: 1 }).then(res => {
|
|
|
- this.typeList = res.data.records
|
|
|
- })
|
|
|
+ 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 => {
|
|
|
if (res.code === 200) {
|
|
|
this.tagsList = res.data
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- track (res) {
|
|
|
+ track(res) {
|
|
|
if (res.is_report === 1) {
|
|
|
this.$message.error('该项目已经上报')
|
|
|
return
|
|
|
}
|
|
|
- this.$confirm(res.project_stage === 1 ? '上报后该项目情况将更新为正式项目,请确认项目相关信息已经审核完成' : '是否确定进行项目上报', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- const data = { id: res.id, is_report: 1, project_stage: res.project_stage === 1 ? 2 : res.project_stage }
|
|
|
+ this.$confirm(
|
|
|
+ res.project_stage === 1
|
|
|
+ ? '上报后该项目情况将更新为正式项目,请确认项目相关信息已经审核完成'
|
|
|
+ : '是否确定进行项目上报',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ const data = {
|
|
|
+ id: res.id,
|
|
|
+ is_report: 1,
|
|
|
+ project_stage: res.project_stage === 1 ? 2 : res.project_stage
|
|
|
+ }
|
|
|
this.$api.project.proUpdate(data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.onLoad()
|
|
|
@@ -504,12 +585,12 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- projectSave () {
|
|
|
+ projectSave() {
|
|
|
if (this.disable) {
|
|
|
this.$message.error('正在处理,请稍后...')
|
|
|
return
|
|
|
}
|
|
|
- this.$refs.form.validate((valid) => {
|
|
|
+ this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
this.disable = true
|
|
|
this.addLoading = true
|
|
|
@@ -528,22 +609,32 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- formDialogClose () {
|
|
|
+ formDialogClose() {
|
|
|
if (this.diaType === 0) {
|
|
|
this.onLoad()
|
|
|
}
|
|
|
this.diaType = -1
|
|
|
},
|
|
|
- exportExcel (res) {
|
|
|
- const data = Object.assign({ ...this.queryData }, {
|
|
|
- columnName: res,
|
|
|
- projectIds: this.selectList.join(','),
|
|
|
- previewType: 1
|
|
|
- })
|
|
|
+ exportExcel(res, year) {
|
|
|
+ console.log(year)
|
|
|
+ const data = Object.assign(
|
|
|
+ { ...this.queryData },
|
|
|
+ {
|
|
|
+ columnName: res,
|
|
|
+ projectIds: this.selectList.join(','),
|
|
|
+ previewType: 1,
|
|
|
+ year
|
|
|
+ }
|
|
|
+ )
|
|
|
this.$router.push({ query: data, path: '/home/excel' })
|
|
|
},
|
|
|
- exportExcelTotal (item) {
|
|
|
- const dataIds = { ...this.queryData, ...item, projectIds: this.selectList.join(','), previewType: 2 }
|
|
|
+ exportExcelTotal(item) {
|
|
|
+ const dataIds = {
|
|
|
+ ...this.queryData,
|
|
|
+ ...item,
|
|
|
+ projectIds: this.selectList.join(','),
|
|
|
+ previewType: 2
|
|
|
+ }
|
|
|
this.$router.push({ query: dataIds, path: '/home/excel' })
|
|
|
}
|
|
|
}
|
|
|
@@ -554,7 +645,7 @@ export default {
|
|
|
.tip {
|
|
|
width: 260px;
|
|
|
height: 38px;
|
|
|
- background-color: #FBF6ED;
|
|
|
+ background-color: #fbf6ed;
|
|
|
font-weight: 500;
|
|
|
flex-wrap: nowrap;
|
|
|
margin-left: 20px;
|
|
|
@@ -569,13 +660,13 @@ export default {
|
|
|
box-shadow: 2px 2px 10px 2px rgba(113, 73, 39, 0.3);
|
|
|
|
|
|
.sp {
|
|
|
- color: #ECAB56;
|
|
|
+ color: #ecab56;
|
|
|
white-space: nowrap;
|
|
|
margin-left: 20px;
|
|
|
}
|
|
|
|
|
|
.sp1 {
|
|
|
- color: #ECAB56;
|
|
|
+ color: #ecab56;
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
}
|
|
|
@@ -585,7 +676,7 @@ export default {
|
|
|
height: 50px;
|
|
|
border-radius: 10px;
|
|
|
margin-right: 20px;
|
|
|
- background-color: #F0F2F7;
|
|
|
+ background-color: #f0f2f7;
|
|
|
|
|
|
.sp {
|
|
|
color: #707070;
|