zhangtao
laozt 1 year ago
parent e08a87b2d1
commit c3e60ab508

@ -8,11 +8,11 @@
*/
import request from '@/utils/request'
// 首页表格
export function indexRegionalism(params) {
return request({
url: "/pharmaceuticals/division/tree",
method: "get",
params,
});
}
// // 首页表格
// export function indexRegionalism(params) {
// return request({
// url: "",
// method: "get",
// params,
// });
// }

@ -1,117 +1,110 @@
import request from '@/utils/request'
import request from "@/utils/request";
// 分页条件查询省重点企业
export function listEnterprise(query) {
return request({
url: '/pharmaceuticals/bKeyEnterprise',
method: 'get',
params: query
})
return request({
url: "/pharmaceuticals/bKeyEnterprise",
method: "get",
params: query,
});
}
// 新增省重点企业
export function addEnterprise(data) {
return request({
url: '/pharmaceuticals/bKeyEnterprise',
method: 'post',
data
})
return request({
url: "/pharmaceuticals/bKeyEnterprise",
method: "post",
data,
});
}
//修改省重点企业
export function updateEnterprise(data) {
return request({
url: '/pharmaceuticals/bKeyEnterprise',
method: 'put',
data
})
return request({
url: "/pharmaceuticals/bKeyEnterprise",
method: "put",
data,
});
}
//删除省重点企业
export function deleteEnterprise(data) {
return request({
url: '/pharmaceuticals/bKeyEnterprise',
method: 'delete',
params: data
})
return request({
url: "/pharmaceuticals/bKeyEnterprise",
method: "delete",
params: data,
});
}
//导入省重点企业
export function exportEnterprise(data) {
return request({
url: '/pharmaceuticals/bKeyEnterprise/common/importExcel',
method: 'post',
data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
return request({
url: "/pharmaceuticals/bKeyEnterprise/common/importExcel",
method: "post",
data,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
});
}
//通过主键查询单条省重点企业
export function getEnterprise(id) {
return request({
url: `/pharmaceuticals/bKeyEnterprise/${id}`,
method: 'get',
})
return request({
url: `/pharmaceuticals/bKeyEnterprise/${id}`,
method: "get",
});
}
//查询企业信息列表
export function businessList(data) {
return request({
url: `/pharmaceuticals/info/list`,
method: 'get',
params: data
})
return request({
url: `/pharmaceuticals/info/list`,
method: "get",
params: data,
});
}
//查询执法列表
export function enforcingDetail(data) {
return request({
url: `/pharmaceuticals/bPlanEnterprise/getZhifa`,
method: 'get',
params: data
})
return request({
url: `/pharmaceuticals/bPlanEnterprise/getZhifa`,
method: "get",
params: data,
});
}
//执法列表详情
export function enforcingGet(id) {
return request({
url: `/pharmaceuticals/examine/${id}`,
method: 'get',
})
return request({
url: `/pharmaceuticals/examine/${id}`,
method: "get",
});
}
// 根据字段查询字典信息
export function listDist(query) {
return request({
url: '/pharmaceuticals/dictdata',
method: 'get',
params: query
})
}
//计划企业表数结构
export function planeEnTree(data) {
return request({
url: '/pharmaceuticals/division/tree',
method: 'get',
params:data
})
return request({
url: "/pharmaceuticals/dictdata",
method: "get",
params: query,
});
}
// 行政区划树结构
export function xzTree() {
return request({
url: '/pharmaceuticals/division/tree',
method: 'get',
})
return request({
url: "/pharmaceuticals/division/tree",
method: "get",
});
}
//执法计划工作情况统计
export function workStatistics(data) {
return request({
url: '/pharmaceuticals/bPlanEnterprise/getZhifaCount',
method: 'get',
params:data
})
return request({
url: "/pharmaceuticals/bPlanEnterprise/getZhifaCount",
method: "get",
params: data,
});
}
//各区域执法计划
export function quyuPlan(data) {
return request({
url: '/pharmaceuticals/bPlanEnterprise/getplan',
method: 'get',
params:data
})
return request({
url: "/pharmaceuticals/bPlanEnterprise/getplan",
method: "get",
params: data,
});
}

@ -198,7 +198,6 @@ export default {
},
//
xzList() {
// xzTree().then((res) => {
let treeData = JSON.parse(localStorage.getItem("TREE_DATA"))
treeData.forEach((value, index) => {
this.areaData.push({
@ -215,7 +214,6 @@ export default {
});
}
});
// });
},
//
componendDistrict(district) {

@ -161,7 +161,7 @@
/>
</div>
<!-- 发布计划 -->
<add-dialog ref="addDialog" v-on:close="padlockOne" />
<add-dialog ref="addDialog" v-on:close="closeAddDialog" />
</div>
</template>
<script>
@ -226,8 +226,11 @@ export default {
rules: {},
};
},
methods: {
//
closeAddDialog() {
this.getList();
},
/** 查询计划企业列表 */
getList() {
this.loading = true;
@ -289,39 +292,39 @@ export default {
/** 详情按钮操作 */ handleInfo() {},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getEnterprise(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改计划企业";
});
// this.reset();
// const id = row.id || this.ids;
// getEnterprise(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = "";
// });
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateEnterprise(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addEnterprise(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
// this.$refs["form"].validate((valid) => {
// if (valid) {
// if (this.form.id != null) {
// updateEnterprise(this.form).then((response) => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// } else {
// addEnterprise(this.form).then((response) => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// }
// }
// });
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
const ids = row.id;
this.$modal
.confirm('是否确认删除计划企业编号为"' + ids + '"的数据项?')
.confirm('是否确认删除计划企业的数据项?')
.then(function () {
return delEnterprise(ids);
})

Loading…
Cancel
Save