|
|
|
@ -19,15 +19,36 @@
|
|
|
|
|
<div class="planInfo">
|
|
|
|
|
<div class="plan-title">
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div>计划标题:</div>
|
|
|
|
|
<div class="content">{{ title }}</div>
|
|
|
|
|
<div class="year">
|
|
|
|
|
<div class="year-span">年份:</div>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.plannedYear"
|
|
|
|
|
type="month"
|
|
|
|
|
format="yyyy-MM"
|
|
|
|
|
:clearable="false"
|
|
|
|
|
value-format="yyyy-MM"
|
|
|
|
|
placeholder="请选择年份">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="area">
|
|
|
|
|
<div class="area-span">区划:</div>
|
|
|
|
|
<el-cascader
|
|
|
|
|
v-model="form.district"
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
:options="options"
|
|
|
|
|
:props="props"
|
|
|
|
|
@change="handleChange"></el-cascader>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div>计划月份:</div>
|
|
|
|
|
<div class="content">{{ year }}</div>
|
|
|
|
|
<div class="export" @click="exportFile">
|
|
|
|
|
<img src="@/assets/images/export.png" alt="">
|
|
|
|
|
<span>导出excel</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="plan-content">
|
|
|
|
|
<!-- <div class="plan-content">
|
|
|
|
|
<div class="item-two">
|
|
|
|
|
<div>计划内容:</div>
|
|
|
|
|
<div class="content">{{ content }}</div>
|
|
|
|
@ -36,9 +57,6 @@
|
|
|
|
|
<div>备注:</div>
|
|
|
|
|
<div class="content">{{ remark ?remark:'暂无备注'}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="plan-content">
|
|
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tables" v-loading="loading">
|
|
|
|
@ -52,19 +70,25 @@
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="entprName"
|
|
|
|
|
label="企业名称"
|
|
|
|
|
label="计划年月"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="subdistrict"
|
|
|
|
|
label="行政区划"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
width="180"
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="entprName"
|
|
|
|
|
label="企业名称"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
|
prop="address"
|
|
|
|
|
label="企业类型"
|
|
|
|
@ -74,41 +98,26 @@
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="uscCode"
|
|
|
|
|
label="统一社会信用代码"
|
|
|
|
|
label="创建时间"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="isPoint"
|
|
|
|
|
label="是否重点"
|
|
|
|
|
header-align="center"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div
|
|
|
|
|
style="font-family: 'Alibaba PuHuiTi'"
|
|
|
|
|
:class="scope.row.isPoint == '1' ? 'isStyle' : ''"
|
|
|
|
|
>
|
|
|
|
|
<span v-if="scope.row.isPoint == '1'">是</span>
|
|
|
|
|
<span v-if="scope.row.isPoint == '0'">否</span>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" 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)">
|
|
|
|
|
<img src="@/assets/images/look.png" alt="">
|
|
|
|
|
<span>查看</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="change" @click="change(scope.row)">
|
|
|
|
|
<div class="change" @click="change(scope.row)">
|
|
|
|
|
<img src="@/assets/images/change.png" alt="">
|
|
|
|
|
<span>修改</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="delete" @click="deleteItem(scope.row)">
|
|
|
|
|
<img src="@/assets/images/delete.png" alt="">
|
|
|
|
|
<span>删除</span>
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -130,6 +139,13 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
options:[],
|
|
|
|
|
props:{
|
|
|
|
|
value:'county',
|
|
|
|
|
label:'institutionName',
|
|
|
|
|
checkStrictly: true
|
|
|
|
|
},
|
|
|
|
|
disabled:false,
|
|
|
|
|
tableData: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
pages: {
|
|
|
|
@ -137,32 +153,61 @@ export default {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
|
|
|
|
loading: false,
|
|
|
|
|
year: "",
|
|
|
|
|
title: "",
|
|
|
|
|
content: "",
|
|
|
|
|
remark: "",
|
|
|
|
|
form:{
|
|
|
|
|
district:[],
|
|
|
|
|
plannedYear:''
|
|
|
|
|
},
|
|
|
|
|
dept:null,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async open(item) {
|
|
|
|
|
async open(item,dept) {
|
|
|
|
|
console.log(dept)
|
|
|
|
|
this.dept = dept
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
this.getList(item);
|
|
|
|
|
let data = await this.$api.yingji.tree();
|
|
|
|
|
this.commentData(data.data,dept)
|
|
|
|
|
// this.getList(item);
|
|
|
|
|
},
|
|
|
|
|
Close() {
|
|
|
|
|
this.dialogVisible = false;
|
|
|
|
|
this.pages.pageNum = 1;
|
|
|
|
|
this.pages.pageSize = 10;
|
|
|
|
|
},
|
|
|
|
|
// 导出
|
|
|
|
|
exportFile(){
|
|
|
|
|
this.$confirm(`确认根据您的搜索条件导出搜索之后的数据吗?`, "警告", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.download(
|
|
|
|
|
"/pharmaceuticals/bPlanManage/export",
|
|
|
|
|
{
|
|
|
|
|
...this.form,
|
|
|
|
|
},
|
|
|
|
|
`计划管理.xlsx`
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
// 区划级联选择器选择触发
|
|
|
|
|
handleChange(value){
|
|
|
|
|
console.log(value)
|
|
|
|
|
if(value.length == 2) {
|
|
|
|
|
this.form.district = value[1]
|
|
|
|
|
} else {
|
|
|
|
|
this.form.district = value[0]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 获取列表
|
|
|
|
|
async getList(item) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
let data = await this.$api.yingji.bPlanManageTwo(item.id);
|
|
|
|
|
if (data.code == 200) {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
}
|
|
|
|
|
this.year = data.data.plannedYear;
|
|
|
|
|
this.title = data.data.planName;
|
|
|
|
|
this.content = data.data.planContent;
|
|
|
|
|
this.remark = data.data.remark;
|
|
|
|
|
this.tableData = data.data.list;
|
|
|
|
|
},
|
|
|
|
|
// 页码,当前页切换事件
|
|
|
|
@ -173,6 +218,81 @@ export default {
|
|
|
|
|
// 查看
|
|
|
|
|
look(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('取消删除')
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 行政区划获取
|
|
|
|
|
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.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
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
}
|
|
|
|
|
// console.log(this.options)
|
|
|
|
|
},
|
|
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
|
|
if (rowIndex % 2 !== 0) {
|
|
|
|
@ -232,25 +352,88 @@ export default {
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
.item {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex: 1;
|
|
|
|
|
align-items: center;
|
|
|
|
|
div {
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
font-family: "Alibaba PuHuiTi";
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #525966;
|
|
|
|
|
|
|
|
|
|
&:nth-child(1) {
|
|
|
|
|
width: 80px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-family: "Alibaba PuHuiTi";
|
|
|
|
|
.year {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-right: 81px;
|
|
|
|
|
.year-span {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-family: 'Alibaba PuHuiTi';
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #525966;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.content {
|
|
|
|
|
flex: 1;
|
|
|
|
|
.area {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.area-span {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-family: 'Alibaba PuHuiTi';
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #525966;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-cascader {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
width: 276px;
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
height: 33px;
|
|
|
|
|
}
|
|
|
|
|
.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-size: cover;
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 10px;
|
|
|
|
|
height: 7px;
|
|
|
|
|
top: 50%;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-select {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
width: 276px;
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
height: 33px;
|
|
|
|
|
}
|
|
|
|
|
.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 {
|
|
|
|
|
content: "";
|
|
|
|
|
background: url(../../../assets/images/down2.png) center center no-repeat;
|
|
|
|
|
background-size: cover;
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 10px;
|
|
|
|
|
height: 7px;
|
|
|
|
|
transform: rotate(180deg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|