正式提交

zhangtao
laozt 1 year ago
parent e2e783f98f
commit 742cf9974f

@ -1,46 +1,54 @@
import request from '@/utils/request'
import request from "@/utils/request";
// 查询计划企业列表
export function listEnterprise(query) {
return request({
url: '/pharmaceuticals/bPlanEnterprise/list',
method: 'get',
params: query
})
url: "/pharmaceuticals/bPlanEnterprise/list",
method: "get",
params: query,
});
}
// 查询计划企业详细
export function getEnterprise(id) {
return request({
url: '/system/enterprise/' + id,
method: 'get'
})
url: "/system/enterprise/" + id,
method: "get",
});
}
// 新增计划企业
export function addEnterprise(data) {
return request({
url: '/pharmaceuticals/bPlanEnterprise',
method: 'post',
data: data
})
url: "/pharmaceuticals/bPlanEnterprise",
method: "post",
data: data,
});
}
// 修改计划企业
export function updateEnterprise(data) {
return request({
url: '/pharmaceuticals/bPlanEnterprise',
method: 'put',
data: data
})
url: "/pharmaceuticals/bPlanEnterprise",
method: "put",
data: data,
});
}
// 批量提交企业
export function updateIdList(idList) {
return request({
url: "/pharmaceuticals/bPlanEnterprise/updateIdList?idListStr=" + idList,
method: "post",
});
}
// 删除计划企业
export function delEnterprise(id) {
return request({
url: '/pharmaceuticals/bPlanEnterprise?idList=' + id,
method: 'delete'
})
url: "/pharmaceuticals/bPlanEnterprise?idList=" + id,
method: "delete",
});
}
// 首页表格
@ -50,4 +58,4 @@ export function treeEnterprise(params) {
method: "get",
params,
});
}
}

@ -34,7 +34,11 @@
<el-table-column label="安全风险等级" align="center" prop="riskLevel" />
<el-table-column label="标准化等级" align="center" prop="standLevel" />
<el-table-column label="上次检查时间" align="center" prop="examineEndTime" />
<el-table-column
label="上次检查时间"
align="center"
prop="examineEndTime"
/>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
@ -66,7 +70,7 @@
<div class="selected">
草稿箱(<span> {{ total }} </span>)
</div>
<div class="btn" ref="next">正式提</div>
<div class="btn" ref="next" @click="onSubmit"></div>
</div>
</div>
</template>
@ -80,6 +84,7 @@ import {
getEnterprise,
delEnterprise,
addEnterprise,
updateIdList,
updateEnterprise,
} from "@/api/yingji/enterprise";
@ -149,6 +154,18 @@ export default {
});
},
methods: {
onSubmit() {
console.log();
let ids = []
this.enterpriseList.map(item=>{
ids.push( item.id)
})
updateIdList(ids.join(',')).then((response) => {
this.$modal.msgSuccess("提交成功");
this.getList();
});
},
//
editMonth(row) {
let _this = this;

@ -481,7 +481,7 @@ export default {
console.log(e);
this.addShow = true;
this.detailLoad = true;
enforcingGet(e.longId).then((res) => {
enforcingGet(e.checkId).then((res) => {
for (let key in res.data) {
this.listDes.forEach((value1, index1) => {
if (key == value1.eng) {
@ -537,7 +537,7 @@ export default {
getList() {
this.loads = true;
enforcingDetail(this.searchBefore).then((res) => {
console.log(res);
// console.log(res);
this.tableData = res.rows;
this.total = res.total;
this.loads = false;

Loading…
Cancel
Save