|
|
@@ -16,7 +16,7 @@
|
|
|
<el-descriptions-item label="上报单位">{{ form.repOrgGuid }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="上报期间">{{ form.repPeri }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="上报状态">
|
|
|
- <dict-tag :options="rep_stat" :value="form.repStat" />
|
|
|
+ <dict-tag :options="rep_stat" :value="form.repAct" />
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="上报时间">{{ form.repTime }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="退回说明" :span="2">{{ form.returnDesc }}</el-descriptions-item>
|
|
|
@@ -155,7 +155,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="MonthDetail">
|
|
|
-import { getBisOrgMonRepPeri, updateBisOrgMonRepPeri } from "@/api/slaj/hidd"
|
|
|
+import { getBisOrgMonRepPeri, updateBisOrgMonRepPeri, submitMonth, returnMonth, revokeMonth, listBisHiddRecRepWithHidd } from "@/api/slaj/hidd"
|
|
|
import { listObjHidd } from "@/api/slaj/hidd"
|
|
|
import { listAttMedBase, delAttMedBase } from "@/api/slaj/hidd"
|
|
|
|
|
|
@@ -168,6 +168,7 @@ const hiddList = ref([])
|
|
|
const fileList = ref([])
|
|
|
const importList = ref([])
|
|
|
const importSelection = ref([])
|
|
|
+const selectedHiddGuids = ref([])
|
|
|
|
|
|
const hiddLoading = ref(false)
|
|
|
const fileLoading = ref(false)
|
|
|
@@ -210,9 +211,9 @@ function getInfo() {
|
|
|
/** 查询月报隐患列表 */
|
|
|
function getHiddList() {
|
|
|
hiddLoading.value = true
|
|
|
- listObjHidd({ repGuid: form.value.guid }).then(res => {
|
|
|
+ listBisHiddRecRepWithHidd(form.value.guid).then(res => {
|
|
|
hiddLoading.value = false
|
|
|
- hiddList.value = res.rows
|
|
|
+ hiddList.value = res.data
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -238,11 +239,8 @@ function handleReport() {
|
|
|
function submitReport() {
|
|
|
proxy.$refs["reportRef"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- const data = {
|
|
|
- guid: form.value.guid,
|
|
|
- repStat: '1'
|
|
|
- }
|
|
|
- updateBisOrgMonRepPeri(data).then(response => {
|
|
|
+ const guids = selectedHiddGuids.value.length > 0 ? selectedHiddGuids.value : []
|
|
|
+ submitMonth(form.value.guid, guids).then(response => {
|
|
|
proxy.$modal.msgSuccess("上报成功")
|
|
|
reportOpen.value = false
|
|
|
getInfo()
|
|
|
@@ -264,12 +262,7 @@ function handleReturn() {
|
|
|
function submitReturn() {
|
|
|
proxy.$refs["returnRef"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- const data = {
|
|
|
- guid: form.value.guid,
|
|
|
- repStat: '3',
|
|
|
- returnDesc: returnForm.value.returnDesc
|
|
|
- }
|
|
|
- updateBisOrgMonRepPeri(data).then(response => {
|
|
|
+ returnMonth(form.value.guid, returnForm.value.returnDesc).then(response => {
|
|
|
proxy.$modal.msgSuccess("退回成功")
|
|
|
returnOpen.value = false
|
|
|
getInfo()
|
|
|
@@ -291,11 +284,7 @@ function handleRevocation() {
|
|
|
function submitRevocation() {
|
|
|
proxy.$refs["revocationRef"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- const data = {
|
|
|
- guid: form.value.guid,
|
|
|
- repStat: '0'
|
|
|
- }
|
|
|
- updateBisOrgMonRepPeri(data).then(response => {
|
|
|
+ revokeMonth(form.value.guid).then(response => {
|
|
|
proxy.$modal.msgSuccess("撤回成功")
|
|
|
revocationOpen.value = false
|
|
|
getInfo()
|
|
|
@@ -326,10 +315,21 @@ function submitImport() {
|
|
|
proxy.$modal.msgError("请选择要导入的隐患")
|
|
|
return
|
|
|
}
|
|
|
- // 这里需要调用后端接口将隐患关联到月报
|
|
|
+ const existingHiddGuids = new Set(hiddList.value.map(h => h.hiddGuid))
|
|
|
+ for (const item of importSelection.value) {
|
|
|
+ if (!existingHiddGuids.has(item.guid)) {
|
|
|
+ hiddList.value.push({
|
|
|
+ hiddGuid: item.guid,
|
|
|
+ hiddName: item.hiddName,
|
|
|
+ hiddGrad: item.hiddGrad,
|
|
|
+ hiddStat: item.hiddStat,
|
|
|
+ proPart: item.proPart
|
|
|
+ })
|
|
|
+ selectedHiddGuids.value.push(item.guid)
|
|
|
+ }
|
|
|
+ }
|
|
|
proxy.$modal.msgSuccess("导入成功")
|
|
|
importOpen.value = false
|
|
|
- getHiddList()
|
|
|
}
|
|
|
|
|
|
/** 下载附件 */
|