新增
@@ -124,8 +128,10 @@
item.reviewTime }}
- 隐患明细: {{
- item.hazardDetails }}
+ 隐患明细: {{itemC.hazardDesc}}
+
+
+ 隐患明细: {{itemC.hazardDesc}}
整改要求: {{
@@ -139,41 +145,51 @@
-
-
-
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
@@ -199,20 +215,14 @@
-
-
-
+
@@ -221,16 +231,10 @@
-
- 关闭
-
-
-
@@ -276,7 +280,8 @@ export default {
disabled: {
type: Boolean,
default: false
- }
+ },
+
},
data() {
@@ -315,8 +320,12 @@ export default {
checkPersons: '张三,李四',
checkResultFlag: '不合格',
reviewTime: '2019-04-22 09:30',
- issues: ['1、生产配件机械设备到达年间', '2、配件工艺未达标需要年检机械设备、配件'],
- requirements: ['1、第1条安全一定要过关', '2、第2条,设备需要保养'],
+ hazardDetails:[
+ {
+ hazardStatus:0,
+ hazardDesc:'卫生没整好'
+ }
+ ],
attachmentUrl: '123456789.jPg',
remark: '请相关负责人尽快处理'
},
@@ -325,21 +334,23 @@ export default {
checkPersons: '张三,李四',
checkResultFlag: '不合格',
reviewTime: '2019-04-22 09:30',
- issues: ['1、生产配件机械设备到达年间', '2、配件工艺未达标需要年检机械设备、配件'],
- requirements: ['1、第1条安全一定要过关', '2、第2条,设备需要保养'],
+ hazardDetails:[
+ {
+ hazardStatus:1,
+ hazardDesc:'卫生没整好2'
+ }
+ ],
attachmentUrl: '123456789.jPg',
remark: '请相关负责人尽快处理'
},
],
- detailIdcopy:this.detailId,
btnDisable: false,
user: '',
agencyId: '',
gridList: [], //所属网格list--场所区域
placeTypeList: [], //场所类型
resultArray: [{ value: '0', label: '合格' }, { value: '1', label: '不合格' }],
- equipmentCategoryCodeArray: [],
- list: {},
+ stafflist: [],
formData: {
agencyId:'',
name:'',
@@ -348,10 +359,10 @@ export default {
chargePerson:'',
mobile:'',
nineSmallPlacesFlag:'',
- nineSmallPlacesCategory:''
+ nineSmallPlacesCategory:[]
},
dataRule: {
- agencyId: [{ required: true, message: '所属组织必选', trigger: 'blur' }],
+ agencyId: [{ required: true, message: '所属组织不能为空', trigger: 'blur' }],
name: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
address: [{ required: true, message: '企业地址不能为空', trigger: 'blur' }],
scale: [{ required: true, message: '规模不能为空', trigger: 'blur' }],
@@ -362,7 +373,6 @@ export default {
},
//地图
loading: false,
- searchValue: '',
searchOptions: []
};
},
@@ -371,32 +381,24 @@ export default {
created() {},
async mounted() {
this.getOrgTreeList();
- console.log('detailId', this.detailId);
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.startLoading();
- this.loadCategory();
- // this.loadGrid();
- // this.loadplaceType();
- if (this.pageType != 'add') {
+ this.loadplaceType()
+ if (this.pageType != 'add' && this.pageType != 'patrol') {
this.getDetail();
- } else {
+ }else if(this.pageType == 'patrol') {
+ this.getCompanyDetail()
+ this.getStafflist()
+ }else {
this.initMap();
}
await this.endLoading();
- this.endLoading();
},
methods: {
handleChangeAgency(val) {
- this.sarr = []
- const map = new Map();
- this.getLastItem(
- this.orgOptions,
- val,
- "agencyId"
- );
- this.level = this.sarr[this.sarr.length - 1].level
+ this.formData.agencyId = val.length ? val[val.length - 1] : val[0];
},
getOrgTreeList() {
this.$http
@@ -437,33 +439,6 @@ export default {
patrolAddd(){
this.patrolAdd=true
},
- async loadCategory() {
- const url = '/sys/dict/data/dictlist';
-
- let params = {
- dictType: 'safety_equipment_category'
- };
-
- const { data, code, msg } = await requestPost(url, params);
- if (code === 0) {
- this.equipmentCategoryCodeArray = data;
- } else {
- this.$message.error(msg);
- }
- },
- async loadGrid() {
- const url = '/gov/org/customergrid/gridoption';
- let params = {
- agencyId: this.agencyId,
- purpose: 'query'
- };
- const { data, code, msg } = await requestPost(url, params);
- if (code === 0) {
- this.gridList = data;
- } else {
- this.$message.error(msg);
- }
- },
//场所类型
async loadplaceType() {
const url = '/gov/org/coverage/dict-select-list/enterprise_patrol';
@@ -478,21 +453,35 @@ export default {
this.$message.error(msg);
}
},
+ // 巡查记录
+ async getCompanyDetail(){
+ const url = `/actual/base/companyInfo/showRecord`;
+ const { data, code, msg } = await requestPost(url,{companyId:this.detailId});
+ if (code === 0) {
+ // this.tableData = data;
+ } else {
+ this.$message.error(msg);
+ }
+ },
+ // 获取组织工作人员
+ getStafflist() {
+ let parms = {
+ orgId: this.$store.state.user.agencyId,
+ orgType: "agency",
+ pageNo: 1,
+ pageSize: 100,
+ };
+ this.$http.post("data/aggregator/org/stafflist", parms).then((resp) => {
+ this.stafflist = resp.data.data.staffList;
+ console.log("stafflist", resp.data);
+ });
+ },
async getDetail() {
- const url = `/actual/base/monitoringEquipment/detail/${this.detailIdcopy}`;
- const { data, code, msg } = await requestPost(url);
+ const url = `/actual/base/companyInfo/companyDetail`;
+ const { data, code, msg } = await requestPost(url,{companyId:this.detailId});
if (code === 0) {
console.log('详情数据', data);
this.formData = { ...data };
- // this.remoteMethod("青岛");
- // this.list = this.searchOptions.map(item => {
- // return { value: item.value, label: item.label };
- // });
- // this.formData.location.push(this.list[0].value);
- // this.remoteMethod(this.list[0].label);//调用远程搜索函数
-
-
- // this.remoteMethod("对对对");
this.initMap();
} else {
@@ -501,49 +490,35 @@ export default {
},
handleComfirm() {
- this.save();
- },
- async handleAdd() {
- // this.btnDisable = true;
- // setTimeout(() => {
- // this.btnDisable = false;
- // }, 10000);
- // nextTick(1000);
- // const form = new Promise((resolve, reject) => {
- // this.$refs['form'].validate(valid => {
- // if (valid) resolve();
- // });
- // });
- // const form1 = new Promise((resolve, reject) => {
- // this.$refs['form1'].validate(valid => {
- // if (valid) resolve();
- // });
- // });
- // Promise.all([form1, form])
- // .then(() => {
- // this.addFuwu();
- // })
- // .catch(() => {
- // app.util.validateRule(messageObj);
- // this.btnDisable = false;
- // });
+ if(this.pageType === 'add' || this.pageType === 'edit'){
+ this.$refs['form'].validate(valid => {
+ if (valid){
+ this.save();
+ }
+ });
+ }else if(this.pageType === 'patrol'){
+ this.$refs['form2'].validate(valid => {
+ if (valid){
+ this.save();
+ }
+ });
+ }
+ // this.save();
},
-
async save() {
console.log('this.formData', this.formData);
var url = '';
var params = {};
if (this.pageType == 'add') {
- url = '/actual/base/monitoringEquipment/save';
- } else {
- url = '/actual/base/monitoringEquipment/update';
+ url = '/actual/base/companyInfo/saveCompanyInfo';
+ } else if (this.pageType == 'edit'){
+ url = '/actual/base/companyInfo/updateCompany';
}
params = { ...this.formData };
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success('操作成功');
- this.detailIdcopy=data
- // this.handleCancle();
+ this.handleCancle();
} else if (code >= 8000) {
this.$message.error(msg);
}
@@ -614,8 +589,7 @@ export default {
let { msg, data } = await map.getAddress(lat, lng);
if (msg == 'success') {
- this.formData.location = data.address;
- this.searchValue = data.address;
+ this.formData.address = data.address;
this.searchOptions = [];
}
},
@@ -654,7 +628,7 @@ export default {
map.setMarker(lonlat[1], lonlat[0]);
this.formData.latitude = lonlat[1];
this.formData.longitude = lonlat[0];
- this.formData.location = selPosition.address + selPosition.name;
+ this.formData.address = selPosition.address + selPosition.name;
}
}
};
diff --git a/src/views/modules/resourceManagement/enterprise/index.vue b/src/views/modules/resourceManagement/enterprise/index.vue
index b4add0cdc..d6b6d2a74 100644
--- a/src/views/modules/resourceManagement/enterprise/index.vue
+++ b/src/views/modules/resourceManagement/enterprise/index.vue
@@ -31,7 +31,7 @@
-
@@ -79,25 +79,26 @@
@selection-change="handleSelectionChange" :height="maxTableHeight">
-
-
+
+
-
-
-
-
-
查看
-
-
+
编辑
@@ -106,7 +107,8 @@
type="text">
巡查记录
-
+ 删除
@@ -162,7 +164,7 @@ export default {
nineArray: [{ value: '1', label: '是' }, { value: '0', label: '否' }],
equipmentCategoryCodeArray: [],
pageNo: 1,
- pageSize: window.localStorage.getItem('pageSize') || 20,
+ pageSize:20,
total: 1,
detailId: '',
detailData: {},
@@ -189,29 +191,8 @@ export default {
this.loadplaceType();
this.loadCategory();
this.getTableData();
- this.loadTable();
},
methods: {
- async loadTable() {
- // this.tableLoading = true
-
- const url = "/actual/base/companyInfo/page"
- // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
- let params = {
- agencyId: this.agencyId,
- pageSize: this.pageSize,
- pageNo: this.pageNo,
- ...this.formData
- }
- const { data, code, msg } = await requestPost(url, params)
- if (code === 0) {
- console.log('坎坎坷坷喀喀喀喀喀喀',data)
- this.total = data.total
- this.tableData = data.list
- } else {
- this.$message.error(msg)
- }
- },
handleSelectionChange(val) {
this.multipleSelection = [];
val.forEach(element => {
@@ -270,7 +251,7 @@ export default {
},
async handleExport() {
// 导出
- const url = '/actual/base/monitoringEquipment/export';
+ const url = '/actual/base/companyInfo/export';
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG['apiURL'] + url,
@@ -342,9 +323,8 @@ export default {
.catch(err => { });
},
async del(id) {
- const url = `/actual/base/monitoringEquipment/delete`;
- let idsArr = [id];
- const { data, code, msg } = await requestPost(url, idsArr);
+ const url = `/actual/base/companyInfo/deleteCompany`;
+ const { data, code, msg } = await requestPost(url, {id});
if (code === 0) {
this.$message.success('删除成功!');
this.getTableData();
@@ -353,7 +333,7 @@ export default {
}
},
async getTableData() {
- const url = '/actual/base/monitoringEquipment/page';
+ const url = '/actual/base/companyInfo/page';
// const url = 'http://yapi.elinkservice.cn/mock/330/actual/base/enterprise/list';
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
@@ -393,10 +373,10 @@ export default {
this.getTableData();
},
async handleExportModule() {
- let url = '/actual/base/monitoringEquipment/downloadTemplate';
+ let url = '/actual/base/companyInfo/downloadImportTemplate';
let params = {};
await this.$http({
- method: 'POST',
+ method: 'GET',
url,
responseType: 'blob',
data: params
@@ -467,9 +447,9 @@ export default {
});
const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加
formData.append('file', file.file); //添加文件对象
- formData.append('code', ''); //添加文件对象
+ // formData.append('code', ''); //添加文件对象
await this.$http
- .post('/actual/base/monitoringEquipment/import', formData)
+ .post('/actual/base/companyInfo/import', formData)
.then(res => {
console.log('res-up', res);
if (res.data.code == 0 && res.data.msg == 'success') {