|
|
|
@ -69,8 +69,8 @@
|
|
|
|
|
<div class="select-span">行业类型:</div>
|
|
|
|
|
<el-select v-model="form.indusTypeClass" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in listThree"
|
|
|
|
|
:key="item.dictValue"
|
|
|
|
|
v-for="(item,index) in listThree"
|
|
|
|
|
:key="index"
|
|
|
|
|
:label="item.dictLabel"
|
|
|
|
|
:value="item.dictValue"
|
|
|
|
|
>
|
|
|
|
@ -81,7 +81,7 @@
|
|
|
|
|
<div class="select-span">是否重点:</div>
|
|
|
|
|
<el-select v-model="form.isPoint" placeholder="请选择">
|
|
|
|
|
<el-option label="是" value="1"></el-option>
|
|
|
|
|
<el-option label="否" value="0"></el-option>
|
|
|
|
|
<el-option label="否" value="2"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="select-input">
|
|
|
|
@ -202,7 +202,7 @@
|
|
|
|
|
:class="scope.row.isPoint == '1' ? 'isStyle' : ''"
|
|
|
|
|
>
|
|
|
|
|
<span v-if="scope.row.isPoint == '1'">是</span>
|
|
|
|
|
<span v-if="scope.row.isPoint == '0'">否</span>
|
|
|
|
|
<span v-if="scope.row.isPoint == '2'">否</span>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -334,7 +334,7 @@ export default {
|
|
|
|
|
loading: false,
|
|
|
|
|
isamend: false,
|
|
|
|
|
amendId: "",
|
|
|
|
|
// count: 0,
|
|
|
|
|
count: 0,
|
|
|
|
|
// unCount: 0,
|
|
|
|
|
// unselected: 0,
|
|
|
|
|
selectList: [],
|
|
|
|
@ -346,6 +346,20 @@ export default {
|
|
|
|
|
dept: (state) => state.user.dept,
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
watch:{
|
|
|
|
|
tableData:{
|
|
|
|
|
handler(newData,oldData){
|
|
|
|
|
newData.map((item)=>{
|
|
|
|
|
if(item.isPoint == 1) {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.multipleTable.toggleRowSelection(item,false);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
deep:true,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 搜索
|
|
|
|
|
filtrate() {
|
|
|
|
@ -359,11 +373,11 @@ export default {
|
|
|
|
|
if(this.form.subdistrict.length > 0){
|
|
|
|
|
if(this.form.subdistrict.length == 2) {
|
|
|
|
|
this.form.subdistrict = this.form.subdistrict[1]
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(0, 11);
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(1, 11);
|
|
|
|
|
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
|
|
|
|
|
} else if(this.form.subdistrict.length == 1) {
|
|
|
|
|
this.form.subdistrict = this.form.subdistrict[0]
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(0, 7);
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(1, 8);
|
|
|
|
|
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
@ -371,11 +385,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 不是苏州市是区县
|
|
|
|
|
if(this.dept.parentId == 100) {
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(0, 7);
|
|
|
|
|
if(this.dept.ancestors.split(',').length == 2) {
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(1, 8);
|
|
|
|
|
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
|
|
|
|
|
} else if(this.dept.parentId == 101){
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(0, 11);
|
|
|
|
|
} else if(this.dept.ancestors.split(',').length == 3){
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(1, 11);
|
|
|
|
|
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -419,41 +433,41 @@ export default {
|
|
|
|
|
return row.unselected;
|
|
|
|
|
},
|
|
|
|
|
// 选中企业的获取
|
|
|
|
|
// async bPlanEnterprise() {
|
|
|
|
|
// let count = 0;
|
|
|
|
|
// let data = await this.$api.yingji.bPlanEnterprise();
|
|
|
|
|
// this.selectList = data.data;
|
|
|
|
|
// console.log(data)
|
|
|
|
|
// data.data.map((item) => {
|
|
|
|
|
// item["uscCode"] = item.enterpriseId;
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// this.$refs.multipleTable.toggleRowSelection(item, false);
|
|
|
|
|
// });
|
|
|
|
|
// if (item.isPoint == 1) {
|
|
|
|
|
// count += 1;
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// console.log(count,'count')
|
|
|
|
|
// this.unselected = count;
|
|
|
|
|
// },
|
|
|
|
|
async bPlanEnterprise() {
|
|
|
|
|
let count = 0;
|
|
|
|
|
let data = await this.$api.yingji.bPlanEnterpriseList();
|
|
|
|
|
this.selectList = data.data;
|
|
|
|
|
console.log(data)
|
|
|
|
|
data.data.map((item) => {
|
|
|
|
|
item["uscCode"] = item.enterpriseId;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.multipleTable.toggleRowSelection(item, false);
|
|
|
|
|
});
|
|
|
|
|
if (item.isPoint == '1') {
|
|
|
|
|
count += 1;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// console.log(count,'count')
|
|
|
|
|
this.unselected = count;
|
|
|
|
|
},
|
|
|
|
|
// 乡镇获取企业重点总数
|
|
|
|
|
async gettownNumbers(){
|
|
|
|
|
let data = await this.$api.yingji.getBydistrict({district:this.form.subdistrict})
|
|
|
|
|
this.count = data.data;
|
|
|
|
|
},
|
|
|
|
|
// 打开
|
|
|
|
|
async open(item,dept) {
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
// this.dept = dept
|
|
|
|
|
let data = await this.$api.yingji.tree(); // 行政区划
|
|
|
|
|
this.commentData(data.data,dept);
|
|
|
|
|
this.bPlanEnterprise();
|
|
|
|
|
this.filtrate()
|
|
|
|
|
if (item == "newlyIncreased") {
|
|
|
|
|
// 判断如若是镇级即将所有重点企业全选
|
|
|
|
|
// if(dept.parentId == 101){
|
|
|
|
|
// this.tableData.map((item)=>{
|
|
|
|
|
// if(item.isPoint == 1) {
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// this.$refs.multipleTable.toggleRowSelection(item);
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
if(dept.ancestors.split(',').length == 3){
|
|
|
|
|
this.gettownNumbers();
|
|
|
|
|
}
|
|
|
|
|
// this.getTable(this.pages);
|
|
|
|
|
} else {
|
|
|
|
|
this.amendId = item.id;
|
|
|
|
@ -520,8 +534,14 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 页码,当前页切换事件
|
|
|
|
|
pagesChange(pages) {
|
|
|
|
|
this.getTable(pages);
|
|
|
|
|
this.pages = pages;
|
|
|
|
|
console.log(this.form)
|
|
|
|
|
if(this.dept.ancestors.split(',').length == 2){
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(1, 8);
|
|
|
|
|
} else if(this.dept.ancestors.split(',').length == 3){
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(1, 11);
|
|
|
|
|
}
|
|
|
|
|
this.getTable({...pages,...this.form,subdistrict:this.subdistrict});
|
|
|
|
|
},
|
|
|
|
|
// 选中的数据
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
@ -557,14 +577,14 @@ export default {
|
|
|
|
|
this.$message.error("请至少选择一家企业");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if (this.dept.parentId == 101) {
|
|
|
|
|
// if (this.count == this.unselected + keyCount) {
|
|
|
|
|
// this.nextStep = true;
|
|
|
|
|
// this.nextText = "发布计划";
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$message.error("请将重点企业全选");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (this.dept.ancestors.split(',').length == 3) {
|
|
|
|
|
if (this.count == this.unselected + keyCount) {
|
|
|
|
|
this.nextStep = true;
|
|
|
|
|
this.nextText = "发布计划";
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error("请将重点企业全选");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this.nextStep = true;
|
|
|
|
|
this.nextText = "发布计划";
|
|
|
|
@ -613,6 +633,8 @@ export default {
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
this.Close("newsuccess");
|
|
|
|
|
} else {
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
@ -643,7 +665,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.listOne = item
|
|
|
|
|
if(dept.parentId == 100) {
|
|
|
|
|
if(dept.ancestors.split(',').length == 2) {
|
|
|
|
|
this.listOne = this.listOne.filter((item)=>{
|
|
|
|
|
return item.institutionName == dept.deptName
|
|
|
|
|
})
|
|
|
|
@ -655,7 +677,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
} else if(dept.parentId == 101) {
|
|
|
|
|
} else if(dept.ancestors.split(',').length == 3) {
|
|
|
|
|
this.listOne.map((item)=>{
|
|
|
|
|
if(item.institutionName == dept.deptName) {
|
|
|
|
|
this.form.subdistrict = item.subdistrict
|
|
|
|
@ -791,7 +813,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-select {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
width: 160px;
|
|
|
|
|
width: 180px;
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
height: 33px;
|
|
|
|
|
}
|
|
|
|
|