|
@ -15,7 +15,6 @@ |
|
|
<el-option v-for="item in equipmentCategoryCodeArray" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
<el-option v-for="item in equipmentCategoryCodeArray" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="24" align="right"> |
|
|
<el-col :span="24" align="right"> |
|
@ -72,8 +71,10 @@ |
|
|
<el-table-column fixed="right" label="操作" align="center" width="130"> |
|
|
<el-table-column fixed="right" label="操作" align="center" width="130"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button> |
|
|
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button> |
|
|
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text" v-if="agencyId==scope.row.agencyId">编辑</el-button> |
|
|
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text" v-if="agencyId == scope.row.agencyId"> |
|
|
<el-button @click="handleDel(scope.row)" type="text" size="small" class="" v-if="agencyId==scope.row.agencyId">删除</el-button> |
|
|
编辑 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button @click="handleDel(scope.row)" type="text" size="small" class="" v-if="agencyId == scope.row.agencyId">删除</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
@ -135,7 +136,7 @@ export default { |
|
|
placeTypeList: [], //场所类型 |
|
|
placeTypeList: [], //场所类型 |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
resultArray: [{ value: '0', label: '合格' }, { value: '1', label: '不合格' }], |
|
|
resultArray: [{ value: '0', label: '合格' }, { value: '1', label: '不合格' }], |
|
|
equipmentCategoryCodeArray: [{ value: '0', label: '九小场所' }, { value: '1', label: '企事业单位' }], |
|
|
equipmentCategoryCodeArray: [], |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: window.localStorage.getItem('pageSize') || 20, |
|
|
pageSize: window.localStorage.getItem('pageSize') || 20, |
|
|
total: 1, |
|
|
total: 1, |
|
@ -157,7 +158,7 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.user = this.$store.state.user; |
|
|
this.user = this.$store.state.user; |
|
|
this.agencyId = this.user.agencyId; |
|
|
this.agencyId = this.user.agencyId; |
|
|
console.log("this.agencyId",this.agencyId) |
|
|
console.log('this.agencyId', this.agencyId); |
|
|
this.loadGrid(); |
|
|
this.loadGrid(); |
|
|
this.loadplaceType(); |
|
|
this.loadplaceType(); |
|
|
this.getTableData(); |
|
|
this.getTableData(); |
|
@ -189,14 +190,14 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//场所类型 |
|
|
//场所类型 |
|
|
async loadplaceType() { |
|
|
async loadplaceType() { |
|
|
const url = '/gov/org/coverage/dict-select-list/enterprise_patrol'; |
|
|
const url = '/sys/dict/data/dictlist'; |
|
|
let params = { |
|
|
let params = { |
|
|
// agencyId: this.agencyId, |
|
|
dict_type: 'common_service_equipment_category' |
|
|
// purpose: 'query' |
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.placeTypeList = data; |
|
|
this.equipmentCategoryCodeArray = data; |
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg); |
|
|
this.$message.error(msg); |
|
|
} |
|
|
} |
|
@ -239,7 +240,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
handleAdd(row, type) { |
|
|
handleAdd(row, type) { |
|
|
console.log(row) |
|
|
console.log(row); |
|
|
if (row.id) { |
|
|
if (row.id) { |
|
|
this.detailId = row.id; |
|
|
this.detailId = row.id; |
|
|
} |
|
|
} |
|
@ -279,7 +280,8 @@ export default { |
|
|
}, |
|
|
}, |
|
|
async del(id) { |
|
|
async del(id) { |
|
|
const url = '/actual/base/commonServiceEquipment/delete'; |
|
|
const url = '/actual/base/commonServiceEquipment/delete'; |
|
|
const { data, code, msg } = await requestPost(url, id); |
|
|
let idArr=[id] |
|
|
|
|
|
const { data, code, msg } = await requestPost(url, idArr); |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.$message.success('删除成功!'); |
|
|
this.$message.success('删除成功!'); |
|
|
this.getTableData(); |
|
|
this.getTableData(); |
|
|