修改样式及新增计划

lijinlong^2
吕天方 1 year ago
parent d3eb58a1a7
commit 69437c7d1a

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-11 15:38:21
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 09:30:39
* @LastEditTime: 2023-09-27 12:39:14
*/
import request from '@/utils/request'
@ -44,7 +44,7 @@ export default {
},
bPlanManageTwo(id){
return request({
url: `/pharmaceuticals/bPlanManage/${id}`,
url: `/pharmaceuticals/bPlanEnterprise/${id}`,
method:'get',
});
},

@ -57,7 +57,7 @@
<div class="select-span">经济类型:</div>
<el-select v-model="form.economicsType" placeholder="请选择">
<el-option
v-for="item in listTwo"
v-for="item in optionstwo.economic_categories"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
@ -69,7 +69,7 @@
<div class="select-span">行业类型:</div>
<el-select v-model="form.indusTypeClass" placeholder="请选择">
<el-option
v-for="(item,index) in listThree"
v-for="(item,index) in optionstwo.category"
:key="index"
:label="item.dictLabel"
:value="item.dictValue"
@ -88,7 +88,7 @@
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option
v-for="item in listFour"
v-for="item in optionstwo.major_hazard_level"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
@ -100,7 +100,7 @@
<div class="select-span">企业分色:</div>
<el-select v-model="form.entprColor" placeholder="请选择">
<el-option
v-for="item in listFive"
v-for="item in optionstwo.entpr_color"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
@ -175,6 +175,16 @@
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<div>
{{
filterTable(
optionstwo.major_hazard_level,
scope.row.majorHazardLevel
)
}}
</div>
</template>
</el-table-column>
<el-table-column
prop="entprColor"
@ -284,11 +294,12 @@ export default {
dialogVisible: false,
tableData: [],
listOne: [],
listTwo: [],
listThree: [],
listFour: [],
listFive: [],
// listTwo: [],
// listThree: [],
// listFour: [],
// listFive: [],
options:[],
optionstwo:[],
props: {
value: "county",
label: "institutionName",
@ -361,6 +372,19 @@ export default {
}
},
methods: {
filterTable(a, b) {
let arr = [];
if (!b) return;
if (a == this.optionstwo.major_hazard_level) {
arr = a.filter((value) => {
return "0" + value.dictValue == b;
});
}
arr = a.filter((value) => {
return value.dictValue == b;
});
return arr[0].dictLabel;
},
//
filtrate() {
// if (this.form.subdistrict) {
@ -437,14 +461,16 @@ export default {
let count = 0;
let data = await this.$api.yingji.bPlanEnterpriseList();
this.selectList = data.data;
console.log(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;
if (item.isPoint == 1 && this.dept.ancestors.split(',').length == 3) {
if(item.district == this.form.subdistrict){
count += 1;
}
}
});
// console.log(count,'count')
@ -578,6 +604,8 @@ export default {
return;
}
if (this.dept.ancestors.split(',').length == 3) {
// console.log(this.unselected,'this.unselected')
// console.log(keyCount,'keyCount')
if (this.count == this.unselected + keyCount) {
this.nextStep = true;
this.nextText = "发布计划";
@ -615,7 +643,7 @@ export default {
if (this.isamend) {
obj = { ...obj, id: this.amendId };
data = await this.$api.yingji.bPlanManage("put", obj);
data = await this.$api.yingji.bPlanEnterprise("put", obj);
if (data.code == 200) {
downloadLoadingInstance.close();
this.$message({
@ -690,18 +718,20 @@ export default {
},
},
async mounted() {
let listTwo = await this.$api.yingji.dictdata({
list: "economic_categories",
}); //
let listThree = await this.$api.yingji.dictdata({ list: "category" }); //
let listFour = await this.$api.yingji.dictdata({
list: "major_hazard_level",
}); //
let listFive = await this.$api.yingji.dictdata({ list: "entpr_color" }); //
this.listTwo = listTwo.data.economic_categories;
this.listThree = listThree.data.category;
this.listFour = listFour.data.major_hazard_level;
this.listFive = listFive.data.entpr_color;
// let listTwo = await this.$api.yingji.dictdata({
// list: "economic_categories",
// }); //
// let listThree = await this.$api.yingji.dictdata({ list: "category" }); //
// let listFour = await this.$api.yingji.dictdata({
// list: "major_hazard_level",
// }); //
// let listFive = await this.$api.yingji.dictdata({ list: "entpr_color" }); //
let dictdata = await this.$api.yingji.dictdata({ list: "economic_categories,category,major_hazard_level,entpr_color",})
this.optionstwo = dictdata.data;
// this.listTwo = listTwo.data.economic_categories;
// this.listThree = listThree.data.category;
// this.listFour = listFour.data.major_hazard_level;
// this.listFive = listFive.data.entpr_color;
},
};
</script>

@ -42,11 +42,13 @@
@change="handleChange"></el-cascader>
</div>
</div>
<div class="item">
<div class="export" @click="exportFile">
<div class="btns">
<!-- <div class="export" @click="exportFile">
<img src="@/assets/images/export.png" alt="">
<span>导出excel</span>
</div>
</div> -->
<div class="select-btn reset" @click="select"></div>
<div class="select-btn" @click="reset"></div>
</div>
</div>
<!-- <div class="plan-content">
@ -107,7 +109,7 @@
<span>{{ scope.row.createTime.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
<!-- <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
<template slot-scope="scope">
<div class="tabs-btns">
<div class="look" @click="look(scope.row)">
@ -124,7 +126,7 @@
</div>
</div>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
</div>
<div class="pagination">
@ -174,7 +176,7 @@ export default {
this.dialogVisible = true;
// let data = await this.$api.yingji.tree();
// this.commentData(data.data,dept)
this.getList(item);
this.getList(this.pages);
},
Close() {
this.dialogVisible = false;
@ -209,9 +211,9 @@ export default {
}
},
//
async getList(item) {
async getList(obj) {
this.loading = true;
let data = await this.$api.yingji.planmx(this.pages);
let data = await this.$api.yingji.planmx(obj);
if (data.code == 200) {
this.loading = false;
}
@ -219,9 +221,25 @@ export default {
},
//
pagesChange(pages) {
this.getList(pages);
let obj = {...pages,...this.form}
this.getList(obj);
this.pages = pages;
},
//
select(){
// const { district,plannedYear } = this.form
this.pages.pageNum = 1;
this.pages.pageSize = 10;
let obj = {...pages,...this.form}
this.getList(obj);
},
//
reset(){
Object.keys(this.form).forEach((key) => (this.form[key] = ""));
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.getList(this.pages)
},
//
look(row){
this.$refs.dialoginfo.open(row);
@ -425,24 +443,70 @@ export default {
}
}
}
.export {
.btns {
display: flex;
align-items: center;
justify-content: center;
background-color: #2378EC;
padding: 6px 19px;
cursor: pointer;
img {
width: 22px;
margin-right: 10px;
.export,.newProject {
display: flex;
align-items: center;
justify-content: center;
padding: 6px 19px;
cursor: pointer;
img {
width: 22px;
margin-right: 10px;
}
span {
color: #ffffff;
font-size: 14px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
}
}
span {
color: #ffffff;
font-size: 14px;
.select-btn {
width: 120px;
height: 34px;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
font-weight: 500;
color: #ffffff;
cursor: pointer;
background: #FDAB5B;
margin-left: 20px;
}
.reset {
background-color: #2378EC;
}
.export {
background-color: #2378EC;
margin-right: 30px;
}
.newProject {
background-color: #28B384;
}
}
// .export {
// display: flex;
// align-items: center;
// justify-content: center;
// background-color: #2378EC;
// padding: 6px 19px;
// cursor: pointer;
// img {
// width: 22px;
// margin-right: 10px;
// }
// span {
// color: #ffffff;
// font-size: 14px;
// font-family: 'Alibaba PuHuiTi';
// font-weight: 400;
// }
// }
}
.plan-content {
display: flex;

@ -4,14 +4,14 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-13 16:49:27
* @LastEditTime: 2023-09-27 13:51:27
-->
<template>
<div class="container-main" ref="main">
<div class="enforce-the-law-title">
<div class="filtrate-condition">
<div class="select-input">
<div class="select-span">:</div>
<div class="select-span">:</div>
<el-date-picker
v-model="form.plannedYear"
type="month"
@ -68,7 +68,7 @@
>
<el-table-column
prop="plannedYear"
label="计划年"
label="计划年"
width="180"
header-align="center"
>

@ -4,14 +4,14 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-11 16:47:11
* @LastEditTime: 2023-09-27 13:52:16
-->
<template>
<div class="container-main" ref="main">
<div class="enforce-the-law-title">
<div class="filtrate-condition">
<div class="select-input">
<div class="select-span">:</div>
<div class="select-span">:</div>
<div>
<el-date-picker
v-model="queryParms.year"
@ -88,7 +88,7 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="year" label="计划年" header-align="center">
<el-table-column prop="year" label="计划年" header-align="center">
<template slot-scope="scope">
{{ $moment(new Date(scope.row.year)).format("yyyy-MM") }}
</template>

@ -4,21 +4,21 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 10:55:54
* @LastEditTime: 2023-09-27 14:00:22
-->
<template>
<div class="plan-management">
<div class="plan-topBox">
<div class="drup-downs">
<div class="year">
<div class="year-span">:</div>
<div class="year-span">:</div>
<el-date-picker
v-model="form.plannedYear"
type="month"
format="yyyy-MM"
:clearable="false"
value-format="yyyy-MM"
placeholder="请选择年">
placeholder="请选择年">
</el-date-picker>
</div>
<div class="area">
@ -66,7 +66,7 @@
</el-table-column>
<el-table-column
prop="plannedYear"
label="计划年"
label="计划年"
width="180"
header-align="center"
>
@ -80,8 +80,8 @@
>
</el-table-column>
<el-table-column
prop="planNumb"
label="计划企业数量"
prop="entprName"
label="企业名称"
header-align="center"
>
</el-table-column>
@ -188,44 +188,46 @@
label:'institutionName',
checkStrictly: true
},
tableData: [{
id: 1,
amount: '260',
district: '苏州市',
planNumb: '200',
keyCount:10,
children: [{
id: 31,
amount: '220',
district: '吴中区',
planNumb: '30',
keyCount:10,
}, {
id: 32,
amount: '200',
district: '姑苏区',
planNumb: '20',
keyCount:10,
}]
}, {
id: 2,
amount: '330',
district: '木渎镇',
planNumb: '200',
keyCount:10,
}, {
id: 256,
amount: '350',
district: '东山镇',
planNumb: '200',
keyCount:10,
}, {
id: 257,
amount: '300',
district: '吴江区',
planNumb: '200',
keyCount:10,
}],
tableData: [
// {
// id: 1,
// amount: '260',
// district: '',
// planNumb: '200',
// keyCount:10,
// children: [{
// id: 31,
// amount: '220',
// district: '',
// planNumb: '30',
// keyCount:10,
// }, {
// id: 32,
// amount: '200',
// district: '',
// planNumb: '20',
// keyCount:10,
// }]
// }, {
// id: 2,
// amount: '330',
// district: '',
// planNumb: '200',
// keyCount:10,
// }, {
// id: 256,
// amount: '350',
// district: '',
// planNumb: '200',
// keyCount:10,
// }, {
// id: 257,
// amount: '300',
// district: '',
// planNumb: '200',
// keyCount:10,
// }
],
pages:{
pageSize:10,
pageNum:1
@ -247,10 +249,17 @@
watch:{
form:{
handler(newForm) {
let { district, plannedYear} = newForm
// console.log(newForm)
// let districtTwo,obj
// if(this.dept.ancestors.split(',').length == 2) {
// districtTwo = district.split(1,8)
// obj = { ...this.pages, ...newForm,district:districtTwo };
// } else if(this.dept.ancestors.split(',').length == 3){
// districtTwo = district.split(1,11)
// obj = { ...this.pages, ...newForm,district:districtTwo };
// }
let obj = obj = { ...this.pages, ...newForm };
// district = district[1]
let obj = {...this.pages,district,plannedYear}
this.getList(obj)
},
deep:true,
@ -344,7 +353,7 @@
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let data = await this.$api.yingji.bPlanManage('delete',_,{idList:idList.join(',')})
let data = await this.$api.yingji.bPlanEnterprise('delete',_,{idList:idList.join(',')})
if(data.code == 200) {
this.loading = false;
downloadLoadingInstance.close();
@ -379,6 +388,9 @@
this.loading = false;
}
this.tableData = res.data.list;
this.tableData.map((item)=>{
item['planNumb'] = 1
})
this.total = res.data.total
},
commentData(item,dept){
@ -391,7 +403,7 @@
}
})
this.options = item
if(dept.parentId == 100) {
if(dept.ancestors.split(',').length == 2) {
this.options = this.options.filter((item)=>{
return item.institutionName == dept.deptName
})
@ -402,7 +414,7 @@
}
})
this.disabled = true;
} else if(dept.parentId == 101) {
} else if(dept.ancestors.split(',').length == 3) {
this.options.map((item)=>{
if(item.institutionName == dept.deptName) {
this.form.district = item.subdistrict
@ -424,8 +436,8 @@
// this.main.height = relativeHeight - 80
// console.log(this.main.height)
// })
// let data = await this.$api.yingji.tree();
// this.commentData(data.data,this.dept)
let data = await this.$api.yingji.tree();
this.commentData(data.data,this.dept)
this.getList(this.pages);
},
}

Loading…
Cancel
Save