|
@@ -134,14 +134,14 @@
|
|
|
</div>
|
|
|
<div class="statusboxitem_top_second">
|
|
|
<span>检测范围</span>
|
|
|
- <el-link type="success" :underline="false">查看</el-link>
|
|
|
+ <el-link type="success" :underline="false" @click="viewDialogTrue(1)">查看</el-link>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="statusboxitem_bottom">
|
|
|
<span>开启检测</span>
|
|
|
<el-switch
|
|
|
- v-model="openvalue"
|
|
|
- style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
|
+ v-model="openTruevalue"
|
|
|
+ style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66"
|
|
|
active-value="100"
|
|
|
inactive-value="0"
|
|
|
/>
|
|
@@ -160,14 +160,14 @@
|
|
|
</div>
|
|
|
<div class="statusboxitem_top_second">
|
|
|
<span>检测范围</span>
|
|
|
- <el-link type="success" :underline="false">查看</el-link>
|
|
|
+ <el-link type="success" :underline="false" @click="viewDialogTrue(2)">查看</el-link>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="statusboxitem_bottom">
|
|
|
<span>开启检测</span>
|
|
|
<el-switch
|
|
|
- v-model="openvalue"
|
|
|
- style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
|
+ v-model="openFullvalue"
|
|
|
+ style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66"
|
|
|
active-value="100"
|
|
|
inactive-value="0"
|
|
|
/>
|
|
@@ -186,14 +186,14 @@
|
|
|
</div>
|
|
|
<div class="statusboxitem_top_second">
|
|
|
<span>检测范围</span>
|
|
|
- <el-link type="success" :underline="false">查看</el-link>
|
|
|
+ <el-link type="success" :underline="false" @click="viewDialogTrue(3)">查看</el-link>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="statusboxitem_bottom">
|
|
|
<span>检测范围</span>
|
|
|
<el-switch
|
|
|
- v-model="openvalue"
|
|
|
- style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
|
+ v-model="openUsevalue"
|
|
|
+ style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66"
|
|
|
active-value="100"
|
|
|
inactive-value="0"
|
|
|
/>
|
|
@@ -212,14 +212,14 @@
|
|
|
</div>
|
|
|
<div class="statusboxitem_top_second">
|
|
|
<span>检测范围</span>
|
|
|
- <el-link type="success" :underline="false">查看</el-link>
|
|
|
+ <el-link type="success" :underline="false" @click="viewDialogTrue(4)">查看</el-link>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="statusboxitem_bottom">
|
|
|
<span>开启检测</span>
|
|
|
<el-switch
|
|
|
- v-model="openvalue"
|
|
|
- style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
|
+ v-model="openSafevalue"
|
|
|
+ style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66"
|
|
|
active-value="100"
|
|
|
inactive-value="0"
|
|
|
/>
|
|
@@ -252,6 +252,13 @@
|
|
|
</div>
|
|
|
|
|
|
</HcCard1>
|
|
|
+
|
|
|
+ <!-- 查看弹窗 -->
|
|
|
+ <HcDialog :show="imageDialog" :title="imageTitle" widths="990px" :footer="false" @close="imageDialogClose">
|
|
|
+ <div >
|
|
|
+ <el-image style="width: 100%; height: 100%" :src="Imageurl" />
|
|
|
+ </div>
|
|
|
+ </HcDialog>
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
@@ -266,16 +273,23 @@ import HcCard1 from './components/hc-card1.vue'
|
|
|
import HcTable1 from './components/hc-table1.vue'
|
|
|
import reportApi from "~api/custody/testing.js";
|
|
|
import {getArrValue, getObjValue, isArrIndex} from "js-fast-way"
|
|
|
-
|
|
|
+import {isJSON} from '~uti/tools'
|
|
|
+import truePng from '~src/assets/testphoto/true.png';
|
|
|
+import fullPng from '~src/assets/testphoto/full.png';
|
|
|
+import usePng from '~src/assets/testphoto/use.png';
|
|
|
+import safePng from '~src/assets/testphoto/safe.png';
|
|
|
|
|
|
//变量
|
|
|
const useAppState = useAppStore()
|
|
|
const projectId = ref(useAppState.getProjectId);
|
|
|
const contractId = ref(useAppState.getContractId);
|
|
|
const projectInfo = ref(useAppState.getProjectInfo);
|
|
|
-const openvalue = ref(true);
|
|
|
+const openTruevalue = ref(false);
|
|
|
+const openFullvalue = ref(true);
|
|
|
+const openUsevalue = ref(true);
|
|
|
+const openSafevalue = ref(true);
|
|
|
const isStatus = ref(true);
|
|
|
-const activeIndex = ref(2);
|
|
|
+const activeIndex = ref(0);
|
|
|
|
|
|
//表头
|
|
|
const tableRef = ref(null)
|
|
@@ -364,18 +378,35 @@ const detection=async()=>{
|
|
|
detectionLoad.value=false
|
|
|
if (!error && code === 200) {
|
|
|
activeIndex.value=data['status']
|
|
|
+ reportId.value=data['id']
|
|
|
isStatus.value=false
|
|
|
-
|
|
|
-
|
|
|
} else {
|
|
|
-
|
|
|
-
|
|
|
+ window?.$message?.error('操作失败')
|
|
|
}
|
|
|
}
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
getReportData()
|
|
|
+ getReportStatusdata()
|
|
|
})
|
|
|
+//获取检测报告状态
|
|
|
+const getReportStatusdata=async()=>{
|
|
|
+ const { error, code, data } = await reportApi.getReportStatus({
|
|
|
+ projectId: projectId.value,
|
|
|
+ })
|
|
|
+ if (!error && code === 200) {
|
|
|
+ console.log(data,'data');
|
|
|
+ if(data===-1){
|
|
|
+ activeIndex.value=0
|
|
|
+ }else{
|
|
|
+ reportId.value=data
|
|
|
+ isStatus.value=false
|
|
|
+ // reportId.value=data
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
//消息数量
|
|
|
const props = defineProps(
|
|
|
{
|
|
@@ -391,17 +422,19 @@ const menumsgCount = ref(props.msgCount)
|
|
|
watch(() => [
|
|
|
props.msgCount,
|
|
|
], ([val]) => {
|
|
|
- console.log(val,'val');
|
|
|
+ if(isJSON(val)){
|
|
|
+ let retrunStatus=JSON.parse(val).status
|
|
|
+ activeIndex.value=retrunStatus
|
|
|
+ }
|
|
|
menumsgCount.value = val
|
|
|
- activeIndex.value=val.status
|
|
|
}
|
|
|
)
|
|
|
//渲
|
|
|
const stepClick = (index) => {
|
|
|
- activeIndex.value = index;
|
|
|
- if (index==0) {
|
|
|
- isStatus.value=true
|
|
|
- }
|
|
|
+ // activeIndex.value = index;
|
|
|
+ // if (index==0) {
|
|
|
+ // isStatus.value=true
|
|
|
+ // }
|
|
|
}
|
|
|
//历史报告
|
|
|
const visible = ref(false)
|
|
@@ -438,6 +471,32 @@ const viewHpdf=(item)=>{
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+//查看真实图片
|
|
|
+const imageDialog=ref(false)
|
|
|
+const Imageurl=ref('')
|
|
|
+const imageTitle=ref('')
|
|
|
+const viewDialogTrue=(type)=>{
|
|
|
+ imageDialog.value=true
|
|
|
+ if(type===1){
|
|
|
+ Imageurl.value=truePng
|
|
|
+ imageTitle.value='真实性检测范围'
|
|
|
+ }else if(type===2){
|
|
|
+ Imageurl.value=fullPng
|
|
|
+ imageTitle.value='完整性检测范围'
|
|
|
+ }else if(type===2){
|
|
|
+ Imageurl.value=usePng
|
|
|
+ imageTitle.value='可以性检测范围'
|
|
|
+ }else{
|
|
|
+ Imageurl.value=safePng
|
|
|
+ imageTitle.value='安全性检测范围'
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+const imageDialogClose=()=>{
|
|
|
+ imageDialog.value=false
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|