|
|
|
@ -15,20 +15,27 @@
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="项目分类:">
|
|
|
|
|
<el-select class="ignoreElement" v-model="formInline.projectClassify" placeholder="请选择">
|
|
|
|
|
<!-- <el-select class="ignoreElement" v-model="formInline.projectClassify" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.jjh_project_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
<el-cascader
|
|
|
|
|
v-model="formInline.projectClassify"
|
|
|
|
|
class="ignoreElement project_big_type"
|
|
|
|
|
:options="options"
|
|
|
|
|
:props="props"
|
|
|
|
|
clearable>
|
|
|
|
|
</el-cascader>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="项目名称:">
|
|
|
|
|
<!-- <el-form-item label="项目名称:">
|
|
|
|
|
<el-input v-model.trim="formInline.projectName" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="申报单位:">
|
|
|
|
|
<el-input v-model.trim="formInline.declareUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item label="单位名称:"> <!-- 申报单位 -->
|
|
|
|
|
<el-input v-model.trim="formInline.declareUnit" placeholder="请输入单位名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="状态:">
|
|
|
|
@ -54,13 +61,30 @@
|
|
|
|
|
<section>
|
|
|
|
|
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" :height="tabHeader" :max-height="tabHeader">
|
|
|
|
|
<el-table-column label="年份" key="projectYear" width="200px" prop="projectYear" />
|
|
|
|
|
<el-table-column label="项目名称" key="projectName" width="450px" prop="projectName" />
|
|
|
|
|
<!-- <el-table-column label="项目名称" key="projectName" width="450px" prop="projectName" />
|
|
|
|
|
<el-table-column label="申报单位" key="declareUnit" width="550px" prop="declareUnit" />
|
|
|
|
|
<el-table-column label="项目分类" key="projectClassify" width="250px" prop="projectClassify">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.jjh_project_type" :value="scope.row.projectClassify"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column label="项目大类" key="projectBigType" prop="projectBigType">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.project_categories" :value="scope.row.projectBigType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="项目中类" key="projectMiddleType" prop="projectMiddleType">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="项目小类" key="projectSmallType" prop="projectSmallType">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.project_small_type" :value="scope.row.projectSmallType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位名称" key="declareUnit" prop="declareUnit" />
|
|
|
|
|
<el-table-column label="信用代码" key="creditCode" prop="creditCode" />
|
|
|
|
|
<el-table-column label="状态" key="status" width="200px" prop="status" class-name="table-status">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<p class="statusisZero" v-if="scope.row.status === 0">
|
|
|
|
@ -122,30 +146,29 @@
|
|
|
|
|
></my-pagination>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
<my-dialog :title="title" @close="importClose" ref="importProject" class="project-import-dialog">
|
|
|
|
|
<my-dialog :title="title" @close="importClose" ref="importProject" class="project-import-dialog" width="55%">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form :model="importFrom" size="small" ref="importFrom" label-width="100px" :rules="rules">
|
|
|
|
|
<el-form-item label="项目分类:" class="importFormItem" prop="projectClassify">
|
|
|
|
|
<!-- <el-form-item label="项目大类:" class="importFormItem" prop="projectClassify">
|
|
|
|
|
<el-select class="ignoreElement" v-model="importFrom.projectClassify" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.jjh_project_type"
|
|
|
|
|
v-for="dict in dict.type.project_categories"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="年份:" class="importFormItem" prop="projectYear">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
class="ignoreElement"
|
|
|
|
|
v-model="importFrom.projectYear"
|
|
|
|
|
type="year"
|
|
|
|
|
format="yyyy"
|
|
|
|
|
value-format="yyyy"
|
|
|
|
|
placeholder="选择年">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item label="项目分类:" class="importFormItem" prop="projectClassify">
|
|
|
|
|
<el-cascader
|
|
|
|
|
v-model="importFrom.projectClassify"
|
|
|
|
|
:options="optionsTwo"
|
|
|
|
|
:props="propsTwo"
|
|
|
|
|
@change="handleItemChange"
|
|
|
|
|
>
|
|
|
|
|
</el-cascader>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="importFormItem">
|
|
|
|
|
<!-- <el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-daoru" size="mini" @click="importBtn">导入新项目</el-button> -->
|
|
|
|
|
<div class="btnsFlex">
|
|
|
|
@ -155,7 +178,7 @@
|
|
|
|
|
:limit="1"
|
|
|
|
|
v-show="false"
|
|
|
|
|
accept=".xlsx, .xls"
|
|
|
|
|
:data="importFrom"
|
|
|
|
|
:data="importFromChange"
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
:action="upload.url"
|
|
|
|
|
:disabled="upload.isUploading"
|
|
|
|
@ -179,15 +202,17 @@
|
|
|
|
|
<div class="importExplain">
|
|
|
|
|
<div class="importExplain-title">导入模板说明</div>
|
|
|
|
|
<div class="importExplain-content">
|
|
|
|
|
<span>"项目名称 申报单位 年份"</span>
|
|
|
|
|
<span>"企业名称 统一社会信用代码 年份"</span><br />
|
|
|
|
|
<span>以上字段为excel公共字段,后面的字段可自定义,系统会自动识别并导入</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="importExplain-table">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>项目名称</th>
|
|
|
|
|
<!-- <th>项目分类</th> -->
|
|
|
|
|
<!-- <th>项目名称</th>
|
|
|
|
|
<th>申报单位</th>
|
|
|
|
|
<th>年份</th> -->
|
|
|
|
|
<th>企业名称</th>
|
|
|
|
|
<th>统一社会信用代码</th>
|
|
|
|
|
<th>年份</th>
|
|
|
|
|
<th></th>
|
|
|
|
|
</tr>
|
|
|
|
@ -220,10 +245,10 @@ import myDialog from "@/views/components/myDialog/index.vue"
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
import { clearKey } from "@/utils/object.js"
|
|
|
|
|
import { jProject, jProjectDel } from "@/api/jin_ji_hu/project/index"
|
|
|
|
|
|
|
|
|
|
import { getAllList } from "@/api/system/dict/data";
|
|
|
|
|
export default {
|
|
|
|
|
components:{myPagination,myDialog},
|
|
|
|
|
dicts: ['jjh_project_type', 'bms_approval_status'],
|
|
|
|
|
dicts: ['jjh_project_type', 'bms_approval_status', "project_middle_type", "project_small_type", "project_categories"],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 判断登陆用户是何身份⌈ 01 : 企业 02 : 政务 ⌋
|
|
|
|
@ -236,29 +261,52 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
formInline: {
|
|
|
|
|
projectClassify: '',
|
|
|
|
|
projectName:"",
|
|
|
|
|
projectName:[],
|
|
|
|
|
declareUnit:"",
|
|
|
|
|
projectYear:"",
|
|
|
|
|
status: ''
|
|
|
|
|
},
|
|
|
|
|
options:[
|
|
|
|
|
{
|
|
|
|
|
value: '选项1',
|
|
|
|
|
label: '总部经济'
|
|
|
|
|
},{
|
|
|
|
|
value: '选项2',
|
|
|
|
|
label: '自主品牌先进技术研究院'
|
|
|
|
|
},{
|
|
|
|
|
value: '选项3',
|
|
|
|
|
label: '省现代服务业重点项目'
|
|
|
|
|
},{
|
|
|
|
|
value: '选项4',
|
|
|
|
|
label: '省市服务业领军企业'
|
|
|
|
|
},{
|
|
|
|
|
value: '选项5',
|
|
|
|
|
label: '两业融合试点单位'
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
options: [],
|
|
|
|
|
optionsTwo: [],
|
|
|
|
|
props:{
|
|
|
|
|
checkStrictly:true,
|
|
|
|
|
lazy:true,
|
|
|
|
|
lazyLoad (node, resolve) {
|
|
|
|
|
const { level, data, children } = node;
|
|
|
|
|
if(children?.length == 0 ) {
|
|
|
|
|
getAllList({dictType: data.dict}).then(res=>{
|
|
|
|
|
const nodes = Array.from(res.data).map((item)=>{
|
|
|
|
|
return {
|
|
|
|
|
value:item.dictValue,
|
|
|
|
|
label:item.dictLabel,
|
|
|
|
|
dict:item.remark,
|
|
|
|
|
leaf: level >= 2
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
resolve(nodes)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
propsTwo:{
|
|
|
|
|
lazy:true,
|
|
|
|
|
lazyLoad (node, resolve) {
|
|
|
|
|
const { level, data, children } = node;
|
|
|
|
|
if(children?.length == 0 ) {
|
|
|
|
|
getAllList({dictType: data.dict}).then(res=>{
|
|
|
|
|
const nodes = Array.from(res.data).map((item)=>{
|
|
|
|
|
return {
|
|
|
|
|
value:item.dictValue,
|
|
|
|
|
label:item.dictLabel,
|
|
|
|
|
dict:item.remark,
|
|
|
|
|
leaf: level >= 2
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
resolve(nodes)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
loading:false,
|
|
|
|
|
tableData:[],
|
|
|
|
|
title:"导入新项目",
|
|
|
|
@ -266,6 +314,11 @@ export default {
|
|
|
|
|
projectClassify:"",
|
|
|
|
|
// projectYear:"",
|
|
|
|
|
},
|
|
|
|
|
importFromChange:{
|
|
|
|
|
projectBigType:"",
|
|
|
|
|
projectMiddleType:"",
|
|
|
|
|
projectSmallType:"",
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
projectClassify: [
|
|
|
|
|
{ required: true, message: '请选择项目分类', trigger: 'change' }
|
|
|
|
@ -294,8 +347,12 @@ export default {
|
|
|
|
|
this.formInline.projectClassify = this.$route.params.projectId + '';
|
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
|
}
|
|
|
|
|
if(this.$route.params.projectName) {
|
|
|
|
|
this.formInline.projectName = this.$route.params.projectName;
|
|
|
|
|
// if(this.$route.params.projectName) {
|
|
|
|
|
// this.formInline.projectName = this.$route.params.projectName;
|
|
|
|
|
// this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
|
// }
|
|
|
|
|
if(this.$route.params.declareUnit) {
|
|
|
|
|
this.formInline.declareUnit = this.$route.params.declareUnit
|
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
|
}
|
|
|
|
|
if(this.userType == "01") {
|
|
|
|
@ -303,13 +360,32 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.cancalDebounce();
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
|
|
|
|
|
this.getDataList();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
handleItemChange(value){
|
|
|
|
|
this.importFromChange = {
|
|
|
|
|
projectBigType: value[0],
|
|
|
|
|
projectMiddleType: value[1],
|
|
|
|
|
projectSmallType: value[2],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getDataList(){
|
|
|
|
|
getAllList({dictType:"project_categories"}).then(res=>{
|
|
|
|
|
res.data.map(item => {
|
|
|
|
|
let obj = {};
|
|
|
|
|
obj.value = item.dictValue;
|
|
|
|
|
obj.label = item.dictLabel;
|
|
|
|
|
obj.dict = item.remark;
|
|
|
|
|
this.options.push(obj);
|
|
|
|
|
this.optionsTwo.push(obj);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 列表获取
|
|
|
|
|
getList(){
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -331,6 +407,11 @@ export default {
|
|
|
|
|
current: 1,
|
|
|
|
|
size: 10
|
|
|
|
|
}
|
|
|
|
|
if(this.formInline.projectClassify.length > 0) {
|
|
|
|
|
this.formInline.projectBigType = this.formInline.projectClassify[0]
|
|
|
|
|
this.formInline.projectMiddleType = this.formInline.projectClassify[1]
|
|
|
|
|
this.formInline.projectSmallType = this.formInline.projectClassify[2]
|
|
|
|
|
}
|
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
|
// console.log(this.pagination);
|
|
|
|
|
// console.log(this.formInline);
|
|
|
|
@ -354,6 +435,11 @@ export default {
|
|
|
|
|
this.$refs.importProject.close();
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.$refs.importFrom.resetFields();
|
|
|
|
|
this.importFromChange = {
|
|
|
|
|
projectBigType:"",
|
|
|
|
|
projectMiddleType:"",
|
|
|
|
|
projectSmallType:"",
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 导入事件触发
|
|
|
|
@ -395,9 +481,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 查看详情
|
|
|
|
|
goInfo(row){
|
|
|
|
|
let type = 1;
|
|
|
|
|
if((row.projectBigType == 5 && row.projectMiddleType == 5 && row.projectSmallType == 8) || row.declareUnit == "江南嘉捷电梯股份有限公司" || row.declareUnit == "苏州工业园区文体旅游局") {
|
|
|
|
|
type = 2
|
|
|
|
|
}
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: 'projectInfo',
|
|
|
|
|
query: { userId: row.id }
|
|
|
|
|
query: { userId: row.id,type }
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 删除
|
|
|
|
@ -408,7 +498,7 @@ export default {
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
jProjectDel({ id: row.id }).then((res) => {
|
|
|
|
|
jProjectDel(row.id).then((res) => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|