|
|
|
@ -28,7 +28,8 @@
|
|
|
|
|
format="yyyy-MM"
|
|
|
|
|
:clearable="false"
|
|
|
|
|
value-format="yyyy-MM"
|
|
|
|
|
placeholder="请选择年份">
|
|
|
|
|
placeholder="请选择年份"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="area">
|
|
|
|
@ -39,7 +40,8 @@
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
:options="options"
|
|
|
|
|
:props="props"
|
|
|
|
|
@change="handleChange"></el-cascader>
|
|
|
|
|
@change="handleChange"
|
|
|
|
|
></el-cascader>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btns">
|
|
|
|
@ -106,7 +108,7 @@
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ scope.row.createTime.split(' ')[0] }}</span>
|
|
|
|
|
<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">
|
|
|
|
@ -144,17 +146,17 @@
|
|
|
|
|
import myPagination from "@/views/components/myPagination/index.vue";
|
|
|
|
|
import dialogInfo from "@/views/components/dialogInfo/index.vue";
|
|
|
|
|
export default {
|
|
|
|
|
components: { myPagination ,dialogInfo},
|
|
|
|
|
components: { myPagination, dialogInfo },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
options:[],
|
|
|
|
|
props:{
|
|
|
|
|
value:'county',
|
|
|
|
|
label:'institutionName',
|
|
|
|
|
checkStrictly: true
|
|
|
|
|
options: [],
|
|
|
|
|
props: {
|
|
|
|
|
value: "county",
|
|
|
|
|
label: "institutionName",
|
|
|
|
|
checkStrictly: true,
|
|
|
|
|
},
|
|
|
|
|
disabled:false,
|
|
|
|
|
disabled: false,
|
|
|
|
|
tableData: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
pages: {
|
|
|
|
@ -162,17 +164,17 @@ export default {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
|
|
|
|
loading: false,
|
|
|
|
|
form:{
|
|
|
|
|
district:[],
|
|
|
|
|
plannedYear:''
|
|
|
|
|
form: {
|
|
|
|
|
district: [],
|
|
|
|
|
plannedYear: "",
|
|
|
|
|
},
|
|
|
|
|
dept:null,
|
|
|
|
|
dept: null,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async open(item,dept) {
|
|
|
|
|
async open(item, dept) {
|
|
|
|
|
// console.log(dept)
|
|
|
|
|
this.dept = dept
|
|
|
|
|
this.dept = dept;
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
// let data = await this.$api.yingji.tree();
|
|
|
|
|
// this.commentData(data.data,dept)
|
|
|
|
@ -184,30 +186,30 @@ export default {
|
|
|
|
|
this.pages.pageSize = 10;
|
|
|
|
|
},
|
|
|
|
|
// 导出
|
|
|
|
|
exportFile(){
|
|
|
|
|
exportFile() {
|
|
|
|
|
this.$confirm(`确认根据您的搜索条件导出搜索之后的数据吗?`, "警告", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.download(
|
|
|
|
|
"/pharmaceuticals/bPlanManage/export",
|
|
|
|
|
{
|
|
|
|
|
...this.form,
|
|
|
|
|
},
|
|
|
|
|
`计划管理.xlsx`
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.download(
|
|
|
|
|
"/pharmaceuticals/bPlanManage/export",
|
|
|
|
|
{
|
|
|
|
|
...this.form,
|
|
|
|
|
},
|
|
|
|
|
`计划管理.xlsx`
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
// 区划级联选择器选择触发
|
|
|
|
|
handleChange(value){
|
|
|
|
|
console.log(value)
|
|
|
|
|
if(value.length == 2) {
|
|
|
|
|
this.form.district = value[1]
|
|
|
|
|
handleChange(value) {
|
|
|
|
|
console.log(value);
|
|
|
|
|
if (value.length == 2) {
|
|
|
|
|
this.form.district = value[1];
|
|
|
|
|
} else {
|
|
|
|
|
this.form.district = value[0]
|
|
|
|
|
this.form.district = value[0];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 获取列表
|
|
|
|
@ -221,100 +223,101 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 页码,当前页切换事件
|
|
|
|
|
pagesChange(pages) {
|
|
|
|
|
let obj = {...pages,...this.form}
|
|
|
|
|
let obj = { ...pages, ...this.form };
|
|
|
|
|
this.getList(obj);
|
|
|
|
|
this.pages = pages;
|
|
|
|
|
},
|
|
|
|
|
// 搜索
|
|
|
|
|
select(){
|
|
|
|
|
select() {
|
|
|
|
|
// const { district,plannedYear } = this.form
|
|
|
|
|
this.pages.pageNum = 1;
|
|
|
|
|
this.pages.pageSize = 10;
|
|
|
|
|
let obj = {...pages,...this.form}
|
|
|
|
|
let obj = { ...pages, ...this.form };
|
|
|
|
|
this.getList(obj);
|
|
|
|
|
},
|
|
|
|
|
// 重置
|
|
|
|
|
reset(){
|
|
|
|
|
reset() {
|
|
|
|
|
Object.keys(this.form).forEach((key) => (this.form[key] = ""));
|
|
|
|
|
this.pages.pageNum = 1;
|
|
|
|
|
this.pages.pageSize = 10;
|
|
|
|
|
this.getList(this.pages)
|
|
|
|
|
this.getList(this.pages);
|
|
|
|
|
},
|
|
|
|
|
// 查看
|
|
|
|
|
look(row){
|
|
|
|
|
look(row) {
|
|
|
|
|
this.$refs.dialoginfo.open(row);
|
|
|
|
|
},
|
|
|
|
|
// 修改
|
|
|
|
|
change(row){
|
|
|
|
|
change(row) {
|
|
|
|
|
// this.$refs.myDialog.open(row,this.dept)
|
|
|
|
|
},
|
|
|
|
|
// 删除
|
|
|
|
|
deleteItem(row){
|
|
|
|
|
let idList = [];
|
|
|
|
|
idList.push(row.id)
|
|
|
|
|
this.$modal.confirm("你确认要删除该条数据吗?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(async() => {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
try {
|
|
|
|
|
let downloadLoadingInstance = Loading.service({
|
|
|
|
|
text: "正在删除计划,请稍候",
|
|
|
|
|
spinner: "el-icon-loading",
|
|
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
});
|
|
|
|
|
// let data = await this.$api.yingji.bPlanManage('delete',_,{idList:idList.join(',')})
|
|
|
|
|
// if(data.code == 200) {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// downloadLoadingInstance.close();
|
|
|
|
|
// this.$message({
|
|
|
|
|
// message: '删除成功',
|
|
|
|
|
// type: 'success'
|
|
|
|
|
// });
|
|
|
|
|
// let { district} = this.form;
|
|
|
|
|
// let obj = {...this.pages,district}
|
|
|
|
|
// this.getList(obj);
|
|
|
|
|
// }
|
|
|
|
|
} catch (error) {
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
console.log(error)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
console.log('取消删除')
|
|
|
|
|
});
|
|
|
|
|
deleteItem(row) {
|
|
|
|
|
let idList = [];
|
|
|
|
|
idList.push(row.id);
|
|
|
|
|
this.$modal
|
|
|
|
|
.confirm("你确认要删除该条数据吗?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(async () => {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
try {
|
|
|
|
|
let downloadLoadingInstance = Loading.service({
|
|
|
|
|
text: "正在删除计划,请稍候",
|
|
|
|
|
spinner: "el-icon-loading",
|
|
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
});
|
|
|
|
|
// let data = await this.$api.yingji.bPlanManage('delete',_,{idList:idList.join(',')})
|
|
|
|
|
// if(data.code == 200) {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// downloadLoadingInstance.close();
|
|
|
|
|
// this.$message({
|
|
|
|
|
// message: '删除成功',
|
|
|
|
|
// type: 'success'
|
|
|
|
|
// });
|
|
|
|
|
// let { district} = this.form;
|
|
|
|
|
// let obj = {...this.pages,district}
|
|
|
|
|
// this.getList(obj);
|
|
|
|
|
// }
|
|
|
|
|
} catch (error) {
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
console.log(error);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
console.log("取消删除");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 行政区划获取
|
|
|
|
|
commentData(item,dept){
|
|
|
|
|
item.map((item)=>{
|
|
|
|
|
if(item.children instanceof Array && item.children.length == 0){
|
|
|
|
|
item.county = item.subdistrict
|
|
|
|
|
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,this.dept)
|
|
|
|
|
this.commentData(item.children, this.dept);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.options = item
|
|
|
|
|
if(dept.parentId == 100) {
|
|
|
|
|
this.options = this.options.filter((item)=>{
|
|
|
|
|
return item.institutionName == dept.deptName
|
|
|
|
|
})
|
|
|
|
|
this.options.map((item)=>{
|
|
|
|
|
if(item.institutionName == dept.deptName) {
|
|
|
|
|
this.form.district = item.county
|
|
|
|
|
delete item.children
|
|
|
|
|
});
|
|
|
|
|
this.options = item;
|
|
|
|
|
if (dept.parentId == 100) {
|
|
|
|
|
this.options = this.options.filter((item) => {
|
|
|
|
|
return item.institutionName == dept.deptName;
|
|
|
|
|
});
|
|
|
|
|
this.options.map((item) => {
|
|
|
|
|
if (item.institutionName == dept.deptName) {
|
|
|
|
|
this.form.district = item.county;
|
|
|
|
|
delete item.children;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
} else if(dept.parentId == 101) {
|
|
|
|
|
this.options.map((item)=>{
|
|
|
|
|
if(item.institutionName == dept.deptName) {
|
|
|
|
|
this.form.district = item.subdistrict
|
|
|
|
|
} else if (dept.parentId == 101) {
|
|
|
|
|
this.options.map((item) => {
|
|
|
|
|
if (item.institutionName == dept.deptName) {
|
|
|
|
|
this.form.district = item.subdistrict;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
}
|
|
|
|
|
// console.log(this.options)
|
|
|
|
@ -384,7 +387,7 @@ export default {
|
|
|
|
|
margin-right: 81px;
|
|
|
|
|
.year-span {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-family: 'Alibaba PuHuiTi';
|
|
|
|
|
font-family: "Alibaba PuHuiTi";
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #525966;
|
|
|
|
|
line-height: 40px;
|
|
|
|
@ -396,7 +399,7 @@ export default {
|
|
|
|
|
align-items: center;
|
|
|
|
|
.area-span {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-family: 'Alibaba PuHuiTi';
|
|
|
|
|
font-family: "Alibaba PuHuiTi";
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #525966;
|
|
|
|
|
line-height: 40px;
|
|
|
|
@ -408,9 +411,13 @@ export default {
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
height: 33px;
|
|
|
|
|
}
|
|
|
|
|
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-down::before {
|
|
|
|
|
.el-input
|
|
|
|
|
.el-input__suffix
|
|
|
|
|
.el-input__suffix-inner
|
|
|
|
|
.el-icon-arrow-down::before {
|
|
|
|
|
content: "";
|
|
|
|
|
background: url(../../../assets/images/down2.png) center center no-repeat;
|
|
|
|
|
background: url(../../../assets/images/down2.png) center center
|
|
|
|
|
no-repeat;
|
|
|
|
|
background-size: cover;
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 10px;
|
|
|
|
@ -427,14 +434,21 @@ export default {
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
height: 33px;
|
|
|
|
|
}
|
|
|
|
|
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up {
|
|
|
|
|
.el-input
|
|
|
|
|
.el-input__suffix
|
|
|
|
|
.el-input__suffix-inner
|
|
|
|
|
.el-icon-arrow-up {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up::before {
|
|
|
|
|
.el-input
|
|
|
|
|
.el-input__suffix
|
|
|
|
|
.el-input__suffix-inner
|
|
|
|
|
.el-icon-arrow-up::before {
|
|
|
|
|
content: "";
|
|
|
|
|
background: url(../../../assets/images/down2.png) center center no-repeat;
|
|
|
|
|
background: url(../../../assets/images/down2.png) center center
|
|
|
|
|
no-repeat;
|
|
|
|
|
background-size: cover;
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 10px;
|
|
|
|
@ -446,7 +460,8 @@ export default {
|
|
|
|
|
.btns {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.export,.newProject {
|
|
|
|
|
.export,
|
|
|
|
|
.newProject {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
@ -459,7 +474,7 @@ export default {
|
|
|
|
|
span {
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-family: 'Alibaba PuHuiTi';
|
|
|
|
|
font-family: "Alibaba PuHuiTi";
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -471,22 +486,22 @@ export default {
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
font-family: 'Alibaba PuHuiTi';
|
|
|
|
|
font-family: "Alibaba PuHuiTi";
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
background: #FDAB5B;
|
|
|
|
|
background: #fdab5b;
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
.reset {
|
|
|
|
|
background-color: #2378EC;
|
|
|
|
|
background-color: #2378ec;
|
|
|
|
|
}
|
|
|
|
|
.export {
|
|
|
|
|
background-color: #2378EC;
|
|
|
|
|
background-color: #2378ec;
|
|
|
|
|
margin-right: 30px;
|
|
|
|
|
}
|
|
|
|
|
.newProject {
|
|
|
|
|
background-color: #28B384;
|
|
|
|
|
background-color: #28b384;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// .export {
|
|
|
|
@ -570,7 +585,9 @@ export default {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
.look,.change,.delete {
|
|
|
|
|
.look,
|
|
|
|
|
.change,
|
|
|
|
|
.delete {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-right: 30px;
|
|
|
|
@ -583,13 +600,13 @@ export default {
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
font-family: Alibaba PuHuiTi;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #045FFD;
|
|
|
|
|
color: #045ffd;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.delete {
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
span {
|
|
|
|
|
color: #F71052;
|
|
|
|
|
color: #f71052;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|