|
|
|
@ -76,13 +76,6 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="select-input">
|
|
|
|
|
<div class="select-span">行业类型:</div>
|
|
|
|
|
<el-radio-group v-model="form.isPoint">
|
|
|
|
|
<el-radio label="1">是</el-radio>
|
|
|
|
|
<el-radio label="0">否</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="select-input">
|
|
|
|
|
<div class="select-span">是否重点:</div>
|
|
|
|
|
<el-select v-model="form.isPoint" placeholder="请选择">
|
|
|
|
@ -124,7 +117,6 @@
|
|
|
|
|
<div class="btns">
|
|
|
|
|
<div class="select-btn" @click="filtrate">搜索</div>
|
|
|
|
|
<div class="select-btn reset" @click="reset">重置</div>
|
|
|
|
|
<!-- <div class="select-btn select-btn1">导入</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- </div> -->
|
|
|
|
|
</div>
|
|
|
|
@ -136,7 +128,7 @@
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
tooltip-effect="light"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
row-key="id"
|
|
|
|
|
row-key="uscCode"
|
|
|
|
|
:row-class-name="tableRowClassName"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -187,34 +179,20 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column prop="" label="选择" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div class="look" @click="chec(scope.row)">
|
|
|
|
|
<el-checkbox v-model="scope.row.is"></el-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pagination">
|
|
|
|
|
<my-pagination
|
|
|
|
|
:total="total"
|
|
|
|
|
@pagesChange="pagesChange"
|
|
|
|
|
></my-pagination>
|
|
|
|
|
>
|
|
|
|
|
<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>
|
|
|
|
|
<!-- <el-select v-model="form2.year" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in options"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form2.plannedYear"
|
|
|
|
|
type="month"
|
|
|
|
@ -223,7 +201,6 @@
|
|
|
|
|
value-format="yyyy-MM"
|
|
|
|
|
placeholder="请选择年份">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
<!-- <img class="data_icon" src="@/assets/images/down2.png" alt=""> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="inputs centered">
|
|
|
|
|
<div class="inputs-span">计划标题:</div>
|
|
|
|
@ -279,6 +256,7 @@
|
|
|
|
|
<script>
|
|
|
|
|
import myPagination from "@/views/components/myPagination/index.vue";
|
|
|
|
|
import { Loading } from "element-ui";
|
|
|
|
|
import { mapState } from "vuex";
|
|
|
|
|
export default {
|
|
|
|
|
components: { myPagination },
|
|
|
|
|
data() {
|
|
|
|
@ -321,8 +299,17 @@ export default {
|
|
|
|
|
loading:false,
|
|
|
|
|
isamend:false,
|
|
|
|
|
amendId:'',
|
|
|
|
|
count:0,
|
|
|
|
|
unCount:0,
|
|
|
|
|
unselected:0,
|
|
|
|
|
selectList:[],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed:{
|
|
|
|
|
...mapState({
|
|
|
|
|
dept: (state) => state.user.dept,
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 搜索
|
|
|
|
|
filtrate(){
|
|
|
|
@ -341,16 +328,42 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 当前行的checkBox是否可以勾选
|
|
|
|
|
checkSelectable(row){
|
|
|
|
|
console.log(row)
|
|
|
|
|
return row
|
|
|
|
|
row['unselected'] = true;
|
|
|
|
|
this.selectList.map((item)=>{
|
|
|
|
|
if(item.enterpriseId == row.uscCode) {
|
|
|
|
|
row['unselected'] = false;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// console.log(row)
|
|
|
|
|
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 open(item) {
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
if(item == 'newlyIncreased') {
|
|
|
|
|
if(this.dept.deptName !== '市局') {
|
|
|
|
|
this.bPlanEnterprise();
|
|
|
|
|
}
|
|
|
|
|
this.getTable(this.pages);
|
|
|
|
|
} else {
|
|
|
|
|
this.amendId = item.id
|
|
|
|
|
this.amendId = item.id;
|
|
|
|
|
this.isamend = true;
|
|
|
|
|
this.getList(item);
|
|
|
|
|
this.getTable(this.pages);
|
|
|
|
@ -359,15 +372,19 @@ export default {
|
|
|
|
|
// 关闭
|
|
|
|
|
Close(item) {
|
|
|
|
|
this.dialogVisible = false;
|
|
|
|
|
this.tableData = [];
|
|
|
|
|
this.multipleSelection = [];
|
|
|
|
|
this.isamend = false;
|
|
|
|
|
this.nextStep = false;
|
|
|
|
|
this.nextText = "下一步";
|
|
|
|
|
Object.keys(this.form).forEach(key=>this.form[key]='')
|
|
|
|
|
Object.keys(this.form2).forEach(key=>this.form2[key]='')
|
|
|
|
|
Object.keys(this.form).forEach(key=>this.form[key]='');
|
|
|
|
|
Object.keys(this.form2).forEach(key=>this.form2[key]='');
|
|
|
|
|
this.unCount = 0;
|
|
|
|
|
this.pages.pageNum = 1;
|
|
|
|
|
this.pages.pageSize = 10;
|
|
|
|
|
this.selected = 0;
|
|
|
|
|
// this.getTable(this.pages);
|
|
|
|
|
this.unselected = 0;
|
|
|
|
|
this.count = 0;
|
|
|
|
|
if(item == 'newsuccess') {
|
|
|
|
|
this.$emit('close')
|
|
|
|
|
}
|
|
|
|
@ -393,7 +410,9 @@ export default {
|
|
|
|
|
async getTable(pages){
|
|
|
|
|
this.loading = true;
|
|
|
|
|
let data = await this.$api.yingji.basicList(pages);
|
|
|
|
|
|
|
|
|
|
// console.log(data.data.count, '重点企业总数');
|
|
|
|
|
this.count = data.data.count;
|
|
|
|
|
this.unCount = data.data.count - this.unselected;
|
|
|
|
|
this.total = data.data.total;
|
|
|
|
|
if(data.code == 200) {
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -409,8 +428,6 @@ export default {
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
this.multipleSelection = val;
|
|
|
|
|
this.selected = this.multipleSelection.length;
|
|
|
|
|
// console.log(val)
|
|
|
|
|
console.log(this.multipleSelection)
|
|
|
|
|
},
|
|
|
|
|
// 计算当前时间
|
|
|
|
|
getData(){
|
|
|
|
@ -426,9 +443,32 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 下一步
|
|
|
|
|
async next() {
|
|
|
|
|
let arr = [];
|
|
|
|
|
let arr2 = [];
|
|
|
|
|
let keyCount = 0;
|
|
|
|
|
this.multipleSelection.map((item)=>{
|
|
|
|
|
arr.push(item.subdistrict);
|
|
|
|
|
arr2.push(item.uscCode);
|
|
|
|
|
if(item.isPoint == '1') {
|
|
|
|
|
keyCount++;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (this.$refs.next.innerText == "下一步") {
|
|
|
|
|
this.nextStep = true;
|
|
|
|
|
this.nextText = "发布计划";
|
|
|
|
|
if(this.multipleSelection.length == 0) {
|
|
|
|
|
this.$message.error('请至少选择一家企业');
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(this.dept.deptName == '乡镇'){
|
|
|
|
|
if(this.count == (this.unselected + keyCount)) {
|
|
|
|
|
this.nextStep = true;
|
|
|
|
|
this.nextText = "发布计划";
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('请将重点企业全选');
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.nextStep = true;
|
|
|
|
|
this.nextText = "发布计划";
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
let downloadLoadingInstance = Loading.service({
|
|
|
|
|
text: this.isamend ? "正在修改计划,请稍后" : "正在发布计划,请稍后",
|
|
|
|
@ -436,17 +476,8 @@ export default {
|
|
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
});
|
|
|
|
|
// console.log(this.form2);
|
|
|
|
|
console.log(this.multipleSelection);
|
|
|
|
|
let arr = [];
|
|
|
|
|
let arr2 = [];
|
|
|
|
|
let keyCount = 0;
|
|
|
|
|
this.multipleSelection.map((item)=>{
|
|
|
|
|
arr.push(item.subdistrict);
|
|
|
|
|
arr2.push(item.uscCode);
|
|
|
|
|
if(item.isPoint == '1') {
|
|
|
|
|
keyCount++;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// console.log(this.multipleSelection);
|
|
|
|
|
|
|
|
|
|
let district = arr.join(',');
|
|
|
|
|
let enterpriseId = arr2.join(',');
|
|
|
|
|
let createTime = this.getData();
|
|
|
|
@ -718,7 +749,7 @@ export default {
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
.tables {
|
|
|
|
|
background-color: #eaf2fd;
|
|
|
|
|
// background-color: #eaf2fd;
|
|
|
|
|
::v-deep .el-table {
|
|
|
|
|
.success-row {
|
|
|
|
|
background-color: rgba(234, 242, 253, 0.25);
|
|
|
|
@ -753,6 +784,15 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
.pagination {
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
.unselectedNumber {
|
|
|
|
|
color: #F71052;
|
|
|
|
|
}
|
|
|
|
|
.selectedNumber {
|
|
|
|
|
color: #48E1BB;
|
|
|
|
|
}
|
|
|
|
|
.sum {
|
|
|
|
|
color: #48E1BB;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.release-planning {
|
|
|
|
|
padding: 0 10px 0 0;
|
|
|
|
|