|
|
|
@ -31,12 +31,12 @@
|
|
|
|
|
<div class="filtrate">
|
|
|
|
|
<div class="select-input">
|
|
|
|
|
<div class="select-span">行政区划:</div>
|
|
|
|
|
|
|
|
|
|
<el-cascader
|
|
|
|
|
v-model="form.subdistrict"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
:options="listOne"
|
|
|
|
|
:props="props"
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
@change="handleChange"
|
|
|
|
|
>
|
|
|
|
|
</el-cascader>
|
|
|
|
@ -136,7 +136,7 @@
|
|
|
|
|
type="selection"
|
|
|
|
|
reserve-selection
|
|
|
|
|
:selectable="checkSelectable"
|
|
|
|
|
width="55"
|
|
|
|
|
width="45"
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -147,17 +147,38 @@
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="subdistrict"
|
|
|
|
|
label="行政区划"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
width="180"
|
|
|
|
|
width="150"
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
|
prop="ecoTypeLarge"
|
|
|
|
|
label="经济类型"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="indusTypeClass"
|
|
|
|
|
label="行业类型"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
|
prop="address"
|
|
|
|
|
label="企业类型"
|
|
|
|
|
prop="majorHazardLevel"
|
|
|
|
|
label="重大危险源等级"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="entprColor"
|
|
|
|
|
label="企业分色"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
@ -166,6 +187,7 @@
|
|
|
|
|
prop="uscCode"
|
|
|
|
|
label="统一社会信用代码"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
width="150"
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -188,27 +210,23 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pagination">
|
|
|
|
|
<my-pagination :total="total" @pagesChange="pagesChange">
|
|
|
|
|
<div>
|
|
|
|
|
重点企业数:<span
|
|
|
|
|
:class="
|
|
|
|
|
count == unCount ? 'selectedNumber' : 'unselectedNumber'
|
|
|
|
|
"
|
|
|
|
|
>{{ unCount }}</span
|
|
|
|
|
>/<span class="sum">{{ count }}</span>
|
|
|
|
|
<div>重点企业数:
|
|
|
|
|
<span :class=" count == unCount ? 'selectedNumber' : 'unselectedNumber'">{{ unCount }}</span>/
|
|
|
|
|
<span class="sum">{{ count }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</my-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="release-planning">
|
|
|
|
|
<div class="inputs centered">
|
|
|
|
|
<div class="inputs-span">计划年份:</div>
|
|
|
|
|
<div class="inputs-span">计划年月:</div>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form2.plannedYear"
|
|
|
|
|
type="month"
|
|
|
|
|
format="yyyy-MM"
|
|
|
|
|
:clearable="false"
|
|
|
|
|
value-format="yyyy-MM"
|
|
|
|
|
placeholder="请选择年份"
|
|
|
|
|
placeholder="请选择年月"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
@ -281,11 +299,14 @@ export default {
|
|
|
|
|
props: {
|
|
|
|
|
value: "county",
|
|
|
|
|
label: "institutionName",
|
|
|
|
|
checkStrictly: true
|
|
|
|
|
},
|
|
|
|
|
multipleSelection: [],
|
|
|
|
|
selected: 0,
|
|
|
|
|
nextStep: false,
|
|
|
|
|
nextText: "下一步",
|
|
|
|
|
workingArea:'',
|
|
|
|
|
subdistrict:'',
|
|
|
|
|
form: {
|
|
|
|
|
subdistrict: [],
|
|
|
|
|
frimType: "",
|
|
|
|
@ -313,6 +334,7 @@ export default {
|
|
|
|
|
unCount: 0,
|
|
|
|
|
unselected: 0,
|
|
|
|
|
selectList: [],
|
|
|
|
|
disabled:false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
@ -323,16 +345,53 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
// 搜索
|
|
|
|
|
filtrate() {
|
|
|
|
|
if (this.form.subdistrict) {
|
|
|
|
|
this.form.subdistrict = this.form.subdistrict[1];
|
|
|
|
|
// if (this.form.subdistrict) {
|
|
|
|
|
// this.subdistrict = this.trimTrailingZeros(this.form.subdistrict);
|
|
|
|
|
// }
|
|
|
|
|
let obj
|
|
|
|
|
// console.log(this.form.subdistrict)
|
|
|
|
|
// 如果是苏州市
|
|
|
|
|
if(!this.disabled) {
|
|
|
|
|
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, 10);
|
|
|
|
|
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);
|
|
|
|
|
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
obj = this.pages
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 不是苏州市是区县
|
|
|
|
|
if(this.dept.parentId == 100) {
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(0, 7);
|
|
|
|
|
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
|
|
|
|
|
} else if(this.dept.parentId == 101){
|
|
|
|
|
this.subdistrict = this.form.subdistrict.slice(0, 10);
|
|
|
|
|
obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let obj = { ...this.pages, ...this.form };
|
|
|
|
|
// obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
|
|
|
|
|
this.getTable(obj);
|
|
|
|
|
},
|
|
|
|
|
// 处理搜索行政区划
|
|
|
|
|
trimTrailingZeros(str) {
|
|
|
|
|
for (let i = str.length - 1; i >= 0; i--) {
|
|
|
|
|
if (str.charAt(i) !== '0') {
|
|
|
|
|
return str.slice(0, i + 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 如果字符串全是零,直接返回原字符串
|
|
|
|
|
return str;
|
|
|
|
|
},
|
|
|
|
|
// 重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form= {
|
|
|
|
|
subdistrict: [],
|
|
|
|
|
subdistrict: this.workingArea,
|
|
|
|
|
frimType: "",
|
|
|
|
|
indusTypeClass: "",
|
|
|
|
|
isPoint: "",
|
|
|
|
@ -356,35 +415,40 @@ export default {
|
|
|
|
|
return row.unselected;
|
|
|
|
|
},
|
|
|
|
|
// 选中企业的获取
|
|
|
|
|
async bPlanEnterprise() {
|
|
|
|
|
let count = 0;
|
|
|
|
|
let data = await this.$api.yingji.bPlanEnterprise();
|
|
|
|
|
this.selectList = data.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.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 open(item) {
|
|
|
|
|
async open(item,dept) {
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
// this.dept = dept
|
|
|
|
|
let data = await this.$api.yingji.tree(); // 行政区划
|
|
|
|
|
this.commentData(data.data,dept);
|
|
|
|
|
this.filtrate()
|
|
|
|
|
if (item == "newlyIncreased") {
|
|
|
|
|
if (this.dept.deptName !== "市局") {
|
|
|
|
|
this.bPlanEnterprise();
|
|
|
|
|
}
|
|
|
|
|
this.getTable(this.pages);
|
|
|
|
|
// if (this.dept.deptName !== "市局") {
|
|
|
|
|
// this.bPlanEnterprise();
|
|
|
|
|
// }
|
|
|
|
|
// this.getTable(this.pages);
|
|
|
|
|
} else {
|
|
|
|
|
this.amendId = item.id;
|
|
|
|
|
this.isamend = true;
|
|
|
|
|
this.getList(item);
|
|
|
|
|
this.getTable(this.pages);
|
|
|
|
|
// this.getTable(this.pages);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 关闭
|
|
|
|
@ -429,6 +493,7 @@ export default {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
let data = await this.$api.yingji.basicList(pages);
|
|
|
|
|
// console.log(data.data.count, '重点企业总数');
|
|
|
|
|
// console.log(this.unCount,'this.unCount')
|
|
|
|
|
this.count = data.data.count;
|
|
|
|
|
data.data.count == this.unselected
|
|
|
|
|
? (this.unCount = data.data.count)
|
|
|
|
@ -436,6 +501,7 @@ export default {
|
|
|
|
|
? (this.unCount = 0)
|
|
|
|
|
: (this.unCount = data.data.count - this.unselected);
|
|
|
|
|
this.total = data.data.total;
|
|
|
|
|
// console.log(this.unselected,'this.unselected')
|
|
|
|
|
if (data.code == 200) {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
}
|
|
|
|
@ -455,36 +521,12 @@ export default {
|
|
|
|
|
getData() {
|
|
|
|
|
var myDate = new Date();
|
|
|
|
|
var year = myDate.getFullYear(); //获取当前年var mon = myDate.getMonth() + 1; //获取当前月
|
|
|
|
|
var mon =
|
|
|
|
|
myDate.getMonth() + 1 < 10
|
|
|
|
|
? "0" + (myDate.getMonth() + 1)
|
|
|
|
|
: myDate.getMonth() + 1 == 0
|
|
|
|
|
? "00"
|
|
|
|
|
: myDate.getMonth() + 1;
|
|
|
|
|
var date =
|
|
|
|
|
myDate.getDate() < 10 ? "0" + myDate.getDate() : myDate.getDate(); //获取当前日
|
|
|
|
|
var hours =
|
|
|
|
|
myDate.getHours() < 10 ? "0" + myDate.getHours() : myDate.getHours(); //获取当前小时
|
|
|
|
|
var minutes =
|
|
|
|
|
myDate.getMinutes() < 10
|
|
|
|
|
? "0" + myDate.getMinutes()
|
|
|
|
|
: myDate.getMinutes(); //获取当前分钟
|
|
|
|
|
var seconds =
|
|
|
|
|
myDate.getSeconds() < 10
|
|
|
|
|
? "0" + myDate.getSeconds()
|
|
|
|
|
: myDate.getSeconds(); //获取当前秒var now = year + "_" + mon + "_" + date + " "+ hours + ":" + minutes + ":" + seconds;
|
|
|
|
|
var now =
|
|
|
|
|
year +
|
|
|
|
|
"-" +
|
|
|
|
|
mon +
|
|
|
|
|
"-" +
|
|
|
|
|
date +
|
|
|
|
|
" " +
|
|
|
|
|
hours +
|
|
|
|
|
":" +
|
|
|
|
|
minutes +
|
|
|
|
|
":" +
|
|
|
|
|
seconds;
|
|
|
|
|
var mon = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1 == 0 ? "00" : myDate.getMonth() + 1;
|
|
|
|
|
var date = myDate.getDate() < 10 ? "0" + myDate.getDate() : myDate.getDate(); //获取当前日
|
|
|
|
|
var hours = myDate.getHours() < 10 ? "0" + myDate.getHours() : myDate.getHours(); //获取当前小时
|
|
|
|
|
var minutes = myDate.getMinutes() < 10 ? "0" + myDate.getMinutes() : myDate.getMinutes(); //获取当前分钟
|
|
|
|
|
var seconds = myDate.getSeconds() < 10 ? "0" + myDate.getSeconds() : myDate.getSeconds(); //获取当前秒var now = year + "_" + mon + "_" + date + " "+ hours + ":" + minutes + ":" + seconds;
|
|
|
|
|
var now = year + "-" + mon + "-" + date + " " + hours + ":" + minutes + ":" + seconds;
|
|
|
|
|
return now;
|
|
|
|
|
},
|
|
|
|
|
// 下一步
|
|
|
|
@ -504,7 +546,7 @@ export default {
|
|
|
|
|
this.$message.error("请至少选择一家企业");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.dept.deptName == "乡镇") {
|
|
|
|
|
if (this.dept.parentId == 101) {
|
|
|
|
|
if (this.count == this.unselected + keyCount) {
|
|
|
|
|
this.nextStep = true;
|
|
|
|
|
this.nextText = "发布计划";
|
|
|
|
@ -533,7 +575,6 @@ export default {
|
|
|
|
|
district,
|
|
|
|
|
enterpriseId,
|
|
|
|
|
createTime,
|
|
|
|
|
keyCount,
|
|
|
|
|
planNumb,
|
|
|
|
|
};
|
|
|
|
|
let data;
|
|
|
|
@ -566,7 +607,7 @@ export default {
|
|
|
|
|
this.form2.planName != "" &&
|
|
|
|
|
this.form2.planContent != ""
|
|
|
|
|
) {
|
|
|
|
|
data = await this.$api.yingji.bPlanManage("post", obj);
|
|
|
|
|
data = await this.$api.yingji.bPlanEnterprise("post", obj);
|
|
|
|
|
if (data.code == 200) {
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
this.$message({
|
|
|
|
@ -587,7 +628,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 区划级联选择器选择触发
|
|
|
|
|
handleChange(value) {
|
|
|
|
|
console.log(value);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
|
|
if (rowIndex % 2 !== 0) {
|
|
|
|
@ -595,23 +636,42 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
},
|
|
|
|
|
commentData(item) {
|
|
|
|
|
if (item instanceof Array) {
|
|
|
|
|
item.map((item) => {
|
|
|
|
|
if (item.children instanceof Array && item.children.length == 0) {
|
|
|
|
|
delete item.children;
|
|
|
|
|
} else {
|
|
|
|
|
this.props.value = "subdistrict";
|
|
|
|
|
this.commentData(item.children);
|
|
|
|
|
commentData(item,dept) {
|
|
|
|
|
item.map((item)=>{
|
|
|
|
|
if(item.children instanceof Array && item.children.length == 0){
|
|
|
|
|
item.county = item.subdistrict
|
|
|
|
|
delete item.children;
|
|
|
|
|
} else {
|
|
|
|
|
// this.props.value = 'subdistrict'
|
|
|
|
|
this.commentData(item.children,dept)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.listOne = item
|
|
|
|
|
if(dept.parentId == 100) {
|
|
|
|
|
this.listOne = this.listOne.filter((item)=>{
|
|
|
|
|
return item.institutionName == dept.deptName
|
|
|
|
|
})
|
|
|
|
|
this.listOne.map((item)=>{
|
|
|
|
|
if(item.institutionName == dept.deptName) {
|
|
|
|
|
this.form.subdistrict = item.county
|
|
|
|
|
this.workingArea = item.county
|
|
|
|
|
delete item.children
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
} else if(dept.parentId == 101) {
|
|
|
|
|
this.listOne.map((item)=>{
|
|
|
|
|
if(item.institutionName == dept.deptName) {
|
|
|
|
|
this.form.subdistrict = item.subdistrict
|
|
|
|
|
this.workingArea = item.county
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
}
|
|
|
|
|
this.listOne = item;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
async mounted() {
|
|
|
|
|
let data = await this.$api.yingji.tree(); // 行政区划
|
|
|
|
|
this.commentData(data.data);
|
|
|
|
|
let listTwo = await this.$api.yingji.dictdata({
|
|
|
|
|
list: "economic_categories",
|
|
|
|
|
}); // 经济类型大类
|
|
|
|
|