|
@@ -90,7 +90,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="handleQuery2"><el-icon><Search /></el-icon> 搜索</el-button>
|
|
<el-button type="primary" @click="handleQuery2"><el-icon><Search /></el-icon> 搜索</el-button>
|
|
|
- <el-button :type="queryParams2.ifDuty ? 'danger' : ''" @click="filterDuty">{{ queryParams2.ifDuty ? '显示全部' : '剔除非责任事故' }}</el-button>
|
|
|
|
|
|
|
+ <el-button :type="queryParams2.ifDuty ? 'danger' : ''" @click="filterDuty" v-hasPermi="['acci:month:removeNonResp']">{{ queryParams2.ifDuty ? '显示全部' : '剔除非责任事故' }}</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
@@ -578,6 +578,7 @@ import { Search, RefreshRight, Plus, Download, Delete, Edit, WarningFilled } fro
|
|
|
import { listObjAcci, compoundSaveAcci, delObjAcci, fastReportAcci } from "@/api/slaj/acci"
|
|
import { listObjAcci, compoundSaveAcci, delObjAcci, fastReportAcci } from "@/api/slaj/acci"
|
|
|
import { listBisAcciExpRep, addBisAcciExpRep, updateBisAcciExpRep, delBisAcciExpRep } from "@/api/slaj/acci"
|
|
import { listBisAcciExpRep, addBisAcciExpRep, updateBisAcciExpRep, delBisAcciExpRep } from "@/api/slaj/acci"
|
|
|
import { getToken } from "@/utils/auth"
|
|
import { getToken } from "@/utils/auth"
|
|
|
|
|
+import { parseExpRepFields } from "@/utils/acci"
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
const { proxy } = getCurrentInstance()
|
|
|
const { acci_grad } = proxy.useDict("acci_grad")
|
|
const { acci_grad } = proxy.useDict("acci_grad")
|
|
@@ -605,7 +606,7 @@ const suppTotal = ref(0); const suppQuery = reactive({ pageNum: 1, pageSize: 10
|
|
|
const suppFormOpen = ref(false); const suppForm = ref({}); const suppFormRef = ref(null)
|
|
const suppFormOpen = ref(false); const suppForm = ref({}); const suppFormRef = ref(null)
|
|
|
|
|
|
|
|
const monthFormOpen = ref(false); const monthFormTitle = ref(''); const monthForm = ref({}); const monthFormRef = ref(null)
|
|
const monthFormOpen = ref(false); const monthFormTitle = ref(''); const monthForm = ref({}); const monthFormRef = ref(null)
|
|
|
-const monthProgList = ref([]); const monthFileList = ref([]); const monthFormTab = ref('basic')
|
|
|
|
|
|
|
+const monthProgList = ref([]); const monthFileList = ref([])
|
|
|
|
|
|
|
|
const suppMonthOpen = ref(false); const suppMonthAcciGuid = ref('')
|
|
const suppMonthOpen = ref(false); const suppMonthAcciGuid = ref('')
|
|
|
const suppMonthList = ref([]); const suppMonthIds = ref([]); const suppMonthMultiple = ref(true)
|
|
const suppMonthList = ref([]); const suppMonthIds = ref([]); const suppMonthMultiple = ref(true)
|
|
@@ -614,7 +615,7 @@ const suppMonthFormOpen = ref(false); const suppMonthForm = ref({}); const suppM
|
|
|
|
|
|
|
|
const uploadUrl = import.meta.env.VITE_APP_BASE_API + '/common/upload'
|
|
const uploadUrl = import.meta.env.VITE_APP_BASE_API + '/common/upload'
|
|
|
const uploadHeaders = { Authorization: 'Bearer ' + getToken() }
|
|
const uploadHeaders = { Authorization: 'Bearer ' + getToken() }
|
|
|
-const list2 = ref([]); const total2 = ref(0)
|
|
|
|
|
|
|
+const list2 = ref([]); const total2 = ref(0); const ids2 = ref([]); const multiple2 = ref(true)
|
|
|
const list3 = ref([]); const total3 = ref(0)
|
|
const list3 = ref([]); const total3 = ref(0)
|
|
|
const list4 = ref([]); const total4 = ref(0)
|
|
const list4 = ref([]); const total4 = ref(0)
|
|
|
const list5 = ref([]); const total5 = ref(0)
|
|
const list5 = ref([]); const total5 = ref(0)
|
|
@@ -688,7 +689,8 @@ function handleSupplement(row) {
|
|
|
}
|
|
}
|
|
|
function loadSuppMonthList() {
|
|
function loadSuppMonthList() {
|
|
|
listBisAcciExpRep({ acciGuid: suppMonthAcciGuid.value, pageNum: suppMonthQuery.pageNum, pageSize: suppMonthQuery.pageSize }).then(res => {
|
|
listBisAcciExpRep({ acciGuid: suppMonthAcciGuid.value, pageNum: suppMonthQuery.pageNum, pageSize: suppMonthQuery.pageSize }).then(res => {
|
|
|
- suppMonthList.value = res.rows || []; suppMonthTotal.value = res.total || 0
|
|
|
|
|
|
|
+ suppMonthList.value = (res.rows || []).map(r => parseExpRepFields(r))
|
|
|
|
|
+ suppMonthTotal.value = res.total || 0
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
function handleSuppMonthSelect(s) { suppMonthIds.value = s.map(i => i.guid); suppMonthMultiple.value = !s.length }
|
|
function handleSuppMonthSelect(s) { suppMonthIds.value = s.map(i => i.guid); suppMonthMultiple.value = !s.length }
|
|
@@ -706,7 +708,13 @@ function handleSuppMonthDelete(row) {
|
|
|
function submitSuppMonthForm() {
|
|
function submitSuppMonthForm() {
|
|
|
suppMonthFormRef.value.validate(valid => {
|
|
suppMonthFormRef.value.validate(valid => {
|
|
|
if (!valid) return
|
|
if (!valid) return
|
|
|
- addBisAcciExpRep({ ...suppMonthForm.value, acciGuid: suppMonthAcciGuid.value }).then(() => {
|
|
|
|
|
|
|
+ const note = JSON.stringify({
|
|
|
|
|
+ serInjNum: suppMonthForm.value.serInjNum || '',
|
|
|
|
|
+ casNum: suppMonthForm.value.casNum || '',
|
|
|
|
|
+ econLoss: suppMonthForm.value.econLoss || '',
|
|
|
|
|
+ acciDesc: suppMonthForm.value.acciDesc || ''
|
|
|
|
|
+ })
|
|
|
|
|
+ addBisAcciExpRep({ repTime: suppMonthForm.value.repTime, note: note, acciGuid: suppMonthAcciGuid.value }).then(() => {
|
|
|
proxy.$modal.msgSuccess('保存成功')
|
|
proxy.$modal.msgSuccess('保存成功')
|
|
|
suppMonthFormOpen.value = false
|
|
suppMonthFormOpen.value = false
|
|
|
loadSuppMonthList()
|
|
loadSuppMonthList()
|
|
@@ -715,7 +723,8 @@ function submitSuppMonthForm() {
|
|
|
}
|
|
}
|
|
|
function loadSuppList() {
|
|
function loadSuppList() {
|
|
|
listBisAcciExpRep({ acciGuid: suppAcciGuid.value, pageNum: suppQuery.pageNum, pageSize: suppQuery.pageSize }).then(res => {
|
|
listBisAcciExpRep({ acciGuid: suppAcciGuid.value, pageNum: suppQuery.pageNum, pageSize: suppQuery.pageSize }).then(res => {
|
|
|
- suppList.value = res.rows || []; suppTotal.value = res.total || 0
|
|
|
|
|
|
|
+ suppList.value = (res.rows || []).map(r => parseExpRepFields(r))
|
|
|
|
|
+ suppTotal.value = res.total || 0
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
function handleSuppSelect(s) { suppIds.value = s.map(i => i.guid); suppMultiple.value = !s.length }
|
|
function handleSuppSelect(s) { suppIds.value = s.map(i => i.guid); suppMultiple.value = !s.length }
|
|
@@ -724,7 +733,7 @@ function handleSuppAdd() {
|
|
|
suppFormOpen.value = true
|
|
suppFormOpen.value = true
|
|
|
}
|
|
}
|
|
|
function handleSuppUpdate(row) {
|
|
function handleSuppUpdate(row) {
|
|
|
- suppForm.value = { ...row }
|
|
|
|
|
|
|
+ suppForm.value = parseExpRepFields({ ...row })
|
|
|
suppFormOpen.value = true
|
|
suppFormOpen.value = true
|
|
|
}
|
|
}
|
|
|
function handleSuppDelete(row) {
|
|
function handleSuppDelete(row) {
|
|
@@ -737,9 +746,13 @@ function handleSuppDelete(row) {
|
|
|
function submitSuppForm() {
|
|
function submitSuppForm() {
|
|
|
suppFormRef.value.validate(valid => {
|
|
suppFormRef.value.validate(valid => {
|
|
|
if (!valid) return
|
|
if (!valid) return
|
|
|
|
|
+ const note = JSON.stringify({
|
|
|
|
|
+ serInjNum: suppForm.value.serInjNum || '',
|
|
|
|
|
+ casNum: suppForm.value.casNum || '',
|
|
|
|
|
+ econLoss: suppForm.value.econLoss || '',
|
|
|
|
|
+ acciDesc: suppForm.value.acciDesc || ''
|
|
|
|
|
+ })
|
|
|
const api = suppForm.value.guid ? updateBisAcciExpRep : addBisAcciExpRep
|
|
const api = suppForm.value.guid ? updateBisAcciExpRep : addBisAcciExpRep
|
|
|
- const extra = { serInjNum: suppForm.value.serInjNum, casNum: suppForm.value.casNum, econLoss: suppForm.value.econLoss, acciDesc: suppForm.value.acciDesc }
|
|
|
|
|
- const note = suppForm.value.note ? suppForm.value.note + ' | ' + JSON.stringify(extra) : JSON.stringify(extra)
|
|
|
|
|
api({ guid: suppForm.value.guid, repTime: suppForm.value.repTime, note: note, acciGuid: suppAcciGuid.value }).then(() => {
|
|
api({ guid: suppForm.value.guid, repTime: suppForm.value.repTime, note: note, acciGuid: suppAcciGuid.value }).then(() => {
|
|
|
proxy.$modal.msgSuccess('保存成功')
|
|
proxy.$modal.msgSuccess('保存成功')
|
|
|
suppFormOpen.value = false
|
|
suppFormOpen.value = false
|
|
@@ -758,7 +771,7 @@ function handleExport2() { proxy.download("acci/objacci/export", queryParams2, `
|
|
|
function handleAdd2() {
|
|
function handleAdd2() {
|
|
|
monthFormTitle.value = '事故月报新增'
|
|
monthFormTitle.value = '事故月报新增'
|
|
|
monthForm.value = { sgdwName: '', engName: '', acciWiunType: '', acciCate: '', occuTime: '', serInjNum: '', casNum: '', econLoss: '', acciGrad: '', otlcolGuuiVicm: '', ifDuty: '', ifPhone: '' }
|
|
monthForm.value = { sgdwName: '', engName: '', acciWiunType: '', acciCate: '', occuTime: '', serInjNum: '', casNum: '', econLoss: '', acciGrad: '', otlcolGuuiVicm: '', ifDuty: '', ifPhone: '' }
|
|
|
- monthProgList.value = []; monthFileList.value = []; monthFormTab.value = 'basic'
|
|
|
|
|
|
|
+ monthProgList.value = []; monthFileList.value = []
|
|
|
monthFormOpen.value = true
|
|
monthFormOpen.value = true
|
|
|
}
|
|
}
|
|
|
function handleUpdate2(row) {
|
|
function handleUpdate2(row) {
|