修改样式及新增计划

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

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

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

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

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

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

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

Loading…
Cancel
Save