|
@@ -56,13 +56,13 @@
|
|
|
<!-- 抽检记录详情 -->
|
|
|
<hc-new-dialog v-model="isOpinionModal" title="抽检记录详情" widths="60%" is-table :footer="false" @close="onOpinionModalClose">
|
|
|
<div class="hc-table-opinion-text">
|
|
|
- <div class="title">案卷题名:安康至来凤国家高速公路奉节至巫山....</div>
|
|
|
+ <div class="title">案卷题名:{{ opRow.archiveName }}</div>
|
|
|
<div class="opinion-text">
|
|
|
<div class="text-1">抽检意见:</div>
|
|
|
<div v-if="!opinionTextEdit" class="text-2">{{ opinionText }}</div>
|
|
|
<div v-if="opinionTextEdit" class="text-2 input">
|
|
|
<el-input v-model="opinionText" style="flex: 1;" :rows="3" placeholder="请输入抽检意见" type="textarea" resize="none" />
|
|
|
- <el-button class="ml-4" hc-btn type="primary" @click="opinionTextEditHihe">保存</el-button>
|
|
|
+ <el-button class="ml-4" hc-btn type="primary" :loading="submitLoading" @click="opinionTextEditHihe">保存</el-button>
|
|
|
</div>
|
|
|
<div v-if="!opinionTextEdit" class="text-blue text-hover icon-1" @click="opinionTextEditShow">
|
|
|
<HcIcon name="edit-2" />
|
|
@@ -85,6 +85,7 @@ import { useRouter } from 'vue-router'
|
|
|
import TableStats from './components/conclusion/table-stats.vue'
|
|
|
import TableOpinion from './components/conclusion/table-opinion.vue'
|
|
|
import TableScore from './components/conclusion/table-score.vue'
|
|
|
+import initialgApi from '~api/initial/initial'
|
|
|
|
|
|
//变量
|
|
|
const router = useRouter()
|
|
@@ -122,8 +123,11 @@ const searchFormScore = ref({
|
|
|
|
|
|
//查看意见
|
|
|
const isOpinionModal = ref(false)
|
|
|
-const tableOpinionTap = () => {
|
|
|
+const opRow = ref({})
|
|
|
+const tableOpinionTap = (row) => {
|
|
|
isOpinionModal.value = true
|
|
|
+ opRow.value = row
|
|
|
+ opinionText.value = row.opinion
|
|
|
}
|
|
|
const onOpinionModalClose = () => {
|
|
|
isOpinionModal.value = false
|
|
@@ -136,8 +140,21 @@ const opinionTextEdit = ref(false)
|
|
|
const opinionTextEditShow = () => {
|
|
|
opinionTextEdit.value = true
|
|
|
}
|
|
|
+const submitLoading = ref(false)
|
|
|
+const opinionTextEditHihe = async () => {
|
|
|
+ submitLoading.value = true
|
|
|
+ const { error, code, data, msg } = await initialgApi.saveInspect({
|
|
|
+ ... opRow.value,
|
|
|
+ opinion:opinionText.value,
|
|
|
+
|
|
|
+ })
|
|
|
+ submitLoading.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window.$message.success(msg)
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
-const opinionTextEditHihe = () => {
|
|
|
opinionTextEdit.value = false
|
|
|
}
|
|
|
|