@@ -299,6 +299,7 @@ export default {
props: {
value: "county",
label: "institutionName",
+ checkStrictly: true
},
multipleSelection: [],
selected: 0,
@@ -344,12 +345,38 @@ export default {
methods: {
// 搜索
filtrate() {
- if (this.form.subdistrict) {
- this.subdistrict = this.trimTrailingZeros(this.form.subdistrict);
+ // if (this.form.subdistrict) {
+ // this.subdistrict = this.trimTrailingZeros(this.form.subdistrict);
+ // }
+ let obj
+ // console.log(this.form.subdistrict)
+ // 如果是苏州市
+ if(!this.disabled) {
+ if(this.form.subdistrict.length > 0){
+ if(this.form.subdistrict.length == 2) {
+ this.form.subdistrict = this.form.subdistrict[1]
+ this.subdistrict = this.form.subdistrict.slice(0, 10);
+ obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
+ } else if(this.form.subdistrict.length == 1) {
+ this.form.subdistrict = this.form.subdistrict[0]
+ this.subdistrict = this.form.subdistrict.slice(0, 7);
+ obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
+ }
+ } else {
+ obj = this.pages
+ }
+ } else {
+ // 不是苏州市是区县
+ if(this.dept.parentId == 100) {
+ this.subdistrict = this.form.subdistrict.slice(0, 7);
+ obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
+ } else if(this.dept.parentId == 101){
+ this.subdistrict = this.form.subdistrict.slice(0, 10);
+ obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
+ }
}
- // let obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
- let obj = { ...this.pages, ...this.form };
- this.getTable(this.pages);
+ // obj = { ...this.pages, ...this.form,subdistrict:this.subdistrict };
+ this.getTable(obj);
},
// 处理搜索行政区划
trimTrailingZeros(str) {
@@ -466,7 +493,7 @@ export default {
this.loading = true;
let data = await this.$api.yingji.basicList(pages);
// console.log(data.data.count, '重点企业总数');
- console.log(this.unCount,'this.unCount')
+ // console.log(this.unCount,'this.unCount')
this.count = data.data.count;
data.data.count == this.unselected
? (this.unCount = data.data.count)
@@ -474,7 +501,7 @@ export default {
? (this.unCount = 0)
: (this.unCount = data.data.count - this.unselected);
this.total = data.data.total;
- console.log(this.unselected,'this.unselected')
+ // console.log(this.unselected,'this.unselected')
if (data.code == 200) {
this.loading = false;
}
@@ -601,11 +628,7 @@ export default {
},
// 区划级联选择器选择触发
handleChange(value) {
- if(value.length == 2) {
- this.form.subdistrict = value[1]
- } else {
- this.form.subdistrict = value[0]
- }
+
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
diff --git a/src/views/components/dialogTwo/index.vue b/src/views/components/dialogTwo/index.vue
index f60a41a..94c2655 100644
--- a/src/views/components/dialogTwo/index.vue
+++ b/src/views/components/dialogTwo/index.vue
@@ -19,15 +19,36 @@
-
计划标题:
-
{{ title }}
+
+
-
计划月份:
-
{{ year }}
+
+

+
导出excel
+
-
+
@@ -52,19 +70,25 @@
>
-
+
+
+
-
-
-
- 是
- 否
-
-
-
-
+
查看
-
+
@@ -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;
}
}
}
diff --git a/src/views/yingji/planManage.vue b/src/views/yingji/planManage.vue
index 8693275..dcbc02d 100644
--- a/src/views/yingji/planManage.vue
+++ b/src/views/yingji/planManage.vue
@@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
- * @LastEditTime: 2023-09-25 15:19:55
+ * @LastEditTime: 2023-09-26 13:14:38
-->
@@ -30,25 +30,14 @@
+
+ @change="handleChange"> -->