|
@@ -22,7 +22,7 @@
|
|
|
<HcCard title="已形成的案卷">
|
|
|
<HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" @row-click="tableRowClick">
|
|
|
<template #key2="{row}">
|
|
|
- <div class="text-link" :class="row.status === 1 ? 'text-green' : 'text-blue'">{{row?.key2}}</div>
|
|
|
+ <div class="text-link" :class="row.isReviewed === 1 ? 'text-green' : 'text-blue'">{{row?.key2}}</div>
|
|
|
</template>
|
|
|
</HcTable>
|
|
|
<template #action>
|
|
@@ -78,7 +78,7 @@
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
- <div class="hc-csc-data-box">
|
|
|
+ <div class="hc-csc-data-box" :style="{height:checkId ? '' : 'calc(100% - 363px)'}">
|
|
|
<HcTable :column="cscTableColumn1" :datas="cscTableData1" :loading="cscTableLoading" :isArrIndex="false" v-if="tabTypeKey === 'tab1'">
|
|
|
<template #name="{row}">
|
|
|
<div :class="row.id === checkId ? 'text-link' : 'text-hover'" @click="changePdf(row)">{{row?.fileName}}</div>
|
|
@@ -116,7 +116,7 @@
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
- <div class="hc-csc-action-box">
|
|
|
+ <div class="hc-csc-action-box" v-if="checkId">
|
|
|
<div class="header-box">
|
|
|
<div class="title">抽检意见:</div>
|
|
|
<div class="extra">
|
|
@@ -131,12 +131,18 @@
|
|
|
<HcIcon name="close"/>
|
|
|
<span>取消查阅</span>
|
|
|
</el-button>
|
|
|
- <el-button type="primary" hc-btn>
|
|
|
+ <el-button type="primary" hc-btn @click="submitOpinion" :loading="submitLoading">
|
|
|
<HcIcon name="check"/>
|
|
|
<span>保存抽检意见</span>
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="btn-box" style="text-align: center;" v-if="checkId.length==0">
|
|
|
+ <el-button hc-btn @click="onCarrySpotChecksDrawerClose">
|
|
|
+ <HcIcon name="close"/>
|
|
|
+ <span>取消查阅</span>
|
|
|
+ </el-button>
|
|
|
+ </div >
|
|
|
</div>
|
|
|
</HcDrawer>
|
|
|
|
|
@@ -157,14 +163,17 @@ import HcTree from "~src/components/tree/hc-tree.vue"
|
|
|
import MetaTable from "./components/meta-table.vue"
|
|
|
import {getStoreValue, setStoreValue} from '~src/utils/storage'
|
|
|
import tuningApi from "~api/archiveConfig/tuning.js";
|
|
|
+import inspectApi from "~api/transfer/inspects.js";
|
|
|
|
|
|
//变量
|
|
|
+
|
|
|
const useAppState = useAppStore()
|
|
|
const projectId = ref(useAppState.getProjectId);
|
|
|
const contractId = ref(useAppState.getContractId);
|
|
|
const projectInfo = ref(useAppState.getProjectInfo);
|
|
|
const isCollapse = ref(useAppState.getCollapse)
|
|
|
const isBubble = ref(useAppState.getBubble);
|
|
|
+const userInfo = ref(useAppState.getUserInfo);
|
|
|
|
|
|
//监听
|
|
|
watch(() => [
|
|
@@ -288,8 +297,19 @@ const tableRowClick = async({row}) => {
|
|
|
checkId.value=''
|
|
|
const url=await viewPdf(row.id)
|
|
|
console.log(url,'url');
|
|
|
-
|
|
|
pdfUrl.value=url
|
|
|
+
|
|
|
+ if(pdfUrl?.value.length>0&& isCarrySpotChecksDrawer.value){
|
|
|
+ setTimeout(() => {
|
|
|
+ serReviewFile()
|
|
|
+ }, 20000);
|
|
|
+ }
|
|
|
+}
|
|
|
+//设置为已查阅
|
|
|
+const serReviewFile=async()=>{
|
|
|
+ const {error, code, data, msg} = await inspectApi.setreview({
|
|
|
+ id: fileInfo.value.id
|
|
|
+ })
|
|
|
}
|
|
|
const checkId=ref('')
|
|
|
const pdfUrl=ref('')
|
|
@@ -299,7 +319,40 @@ const changePdf=(row)=>{
|
|
|
pdfLoading.value=false
|
|
|
pdfUrl.value=row['pdfFileUrl']||''
|
|
|
checkId.value=row.id
|
|
|
+ getopiniondata()
|
|
|
+
|
|
|
+}
|
|
|
+//获取抽检意见
|
|
|
+const getopiniondata=async()=>{
|
|
|
+ const {error, code, data, msg} = await inspectApi.getOpinion({
|
|
|
+ fileId: checkId.value
|
|
|
+ })
|
|
|
+ if (!error && code === 200) {
|
|
|
+ console.log(data,'data');
|
|
|
+ }
|
|
|
+}
|
|
|
+//保存抽检意见
|
|
|
+const submitLoading=ref(false)
|
|
|
+const submitOpinion=async()=>{
|
|
|
+ console.log(reform.value.content,'reform.content');
|
|
|
+ submitLoading.value=true
|
|
|
+ const {error, code, data, msg} = await inspectApi.addOpinion({
|
|
|
+ fileId: checkId.value,
|
|
|
+ archiveId:fileInfo.value.id,
|
|
|
+ opinion:reform.value.content,
|
|
|
+ projectId:projectId.value,
|
|
|
+ userId:userInfo.value.user_id,
|
|
|
+ archiveName:fileInfo.value.name
|
|
|
|
|
|
+ })
|
|
|
+ submitLoading.value=false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ console.log(data,'data');
|
|
|
+ if(data){
|
|
|
+ reform.value.type=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // addOpinion
|
|
|
}
|
|
|
//类型tab数据和相关处理
|
|
|
const tabTypeKey = ref('tab1')
|
|
@@ -424,6 +477,7 @@ const cscTableDataModalClose = () => {
|
|
|
//关闭抽查
|
|
|
const onCarrySpotChecksDrawerClose = () => {
|
|
|
isCarrySpotChecksDrawer.value = false
|
|
|
+ pdfUrl.value=''
|
|
|
}
|
|
|
|
|
|
|
|
@@ -450,4 +504,5 @@ const onmousedown = () => {
|
|
|
|
|
|
<style lang="scss">
|
|
|
@import '~style/transfer/inspects.scss';
|
|
|
+
|
|
|
</style>
|