update code

dev-login
haha 2023-08-27 11:00:24 +08:00
parent 16203203d9
commit a5b77289ed
6 changed files with 406 additions and 21 deletions

View File

@ -13,6 +13,7 @@ import journalism from './journalism/index'
import buildNode from './buildNode'
import projectChecking from './projectChecking/index'
import measure from './measure/index'
import materialSeal from './materialSeal/index'
import checkDetection from './checkDetection/index'
import video from './video/index'
import {axios} from '@/utils/request'
@ -32,6 +33,7 @@ export default {
buildNode,
projectChecking,
measure,
materialSeal,
checkDetection,
http:axios,
video

View File

@ -0,0 +1,13 @@
import request from '@/utils/request'
const selectTop20=(data)=> {
return request({
url: `bgscreen/materialSeal/selectTop20`,
method: 'post',
data:data
})
}
export default{
selectTop20
}

View File

@ -190,7 +190,7 @@ export default {
it.existingProblem=objs[0].existingProblem||'';
}
return it;
})
}).sort((a,b)=>b.projectSchedule-a.projectSchedule);
})
},
@ -219,7 +219,7 @@ export default {
let nds=nodes.filter(item=>item.finish && item.projectId==it.id && findNodes.includes(item.lvl.substring(0,2)));
it.nodes=this.$api.buildNode.toTree(nds);
return it;
})
}).sort((a,b)=>b.projectSchedule-a.projectSchedule);
})
},
loadData4(n){
@ -228,7 +228,7 @@ export default {
it.projectName=it.surProject?.projectName||''
it.projectSchedule=it.surProject?.projectSchedule||'1'
return it;
});
}).sort((a,b)=>b.projectSchedule-a.projectSchedule);;
})
},
showDialog(n,cnts) {

View File

@ -135,13 +135,28 @@
</div>
</div>
</module-one-1-1>
<module-one-1-1 label="机械设备管理">
<div class="nav-info" style="padding:20px 20px 12px">
<span class="nav-label">设备总数:</span>
<span class="nav-num">100</span>
<span class="nav-unit"></span>
</div>
<rank-chart :data="mechanicalData" :showval="true" :height="224"></rank-chart>
<module-one-1-1 label="材料封样">
<div class="material-seal-list scroll" :key="'ms'+materialSealEl" style="max-height: 284px;overflow-y: auto;">
<div v-for="(it,idx) in materialSealList" :key="idx" class="material-seal-item">
<div class="material-seal-left">
<el-image :src="it.signFiles+'.min.jpg'" :preview-src-list="[it.signFiles]"></el-image>
</div>
<div class="material-seal-right" @click="showMaterialSeal(it)">
<div><img src="images/title_icon.png"><span class="sp-lbl">封样名称</span></div>
<div class="div-text ">
<div>{{ it.materialName }}</div>
</div>
<div><img src="images/title_icon.png"><span class="sp-lbl">使用部位</span></div>
<div class="div-text ">
<div>{{ it.usePosition }}</div>
</div>
<div><img src="images/title_icon.png"><span class="sp-lbl">封样日期</span></div>
<div class="div-text ">
<div>{{ it.sealDate }}</div>
</div>
</div>
</div>
</div>
</module-one-1-1>
<module-one-1-1 label="实测实量" :key="elCheck">
<div class="warning-info-title measured-data-list" style="padding-left: 20px;">
@ -203,6 +218,7 @@
</div>
<ProblemmodifyDetail ref="probDlg"></ProblemmodifyDetail>
<showCheckingDlg ref="checkDlg"></showCheckingDlg>
<materialSealDetialDlg ref="msDlg"></materialSealDetialDlg>
</div>
</template>
@ -218,14 +234,16 @@ import '../components/idle-list-chart'
import '../components/people-number'
import ProblemmodifyDetail from './components/ProblemmodifyDetail.vue'
import showCheckingDlg from './quality/showCheckingDlg.vue'
import materialSealDetialDlg from './quality/materialSealDetialDlg.vue'
export default {
components:{
ProblemmodifyDetail,showCheckingDlg
ProblemmodifyDetail,showCheckingDlg,materialSealDetialDlg
},
data() {
return {
selDate:'',
elKey:0,
materialSealEl:0,
elSummaryKey:0,
elSummaryPrjKey:0,
elCheck:0,
@ -238,14 +256,7 @@ export default {
fontSize:'12px',
height:'32px'
},
samplingNav:1,
//
mechanicalData:[
{value: '5',prop: '62.5', text: '履带挖掘机'},
{value: '1',prop: '12.5', text: '洒水车'},
{value: '1',prop: '12.5', text: '轮胎装载机'},
{value: 1,prop: '12.5', text: '小轿车'},
],
samplingNav:1,
measuredNav:0,
measuredTotal:0,
measuredText:" 全部",
@ -313,26 +324,47 @@ export default {
}
}]
},
prjs:[]
}
},
created() {
this.init()
},
mounted() {
this.$bus.$on("loadProjects", prjs => {
this.prjs = prjs;
});
this.$bus.$on("projectChange", res => {
this.projectInfo=res;
this.doDeptChane();
this.checkDetection(1);
this.doMeasuredNav(1,'混泥土工程')
this.selectTop20materialSeal();
});
this.$bus.$on("deptChange",dept=>{
this.dept=dept;
this.doDeptChane();
this.checkDetection(1);
this.doMeasuredNav(1,'混泥土工程')
this.selectTop20materialSeal();
});
},
methods: {
showMaterialSeal(it){
this.$refs.msDlg.showDialog(it);
},
selectTop20materialSeal(){
let postData={};
if(this.projectInfo?.id||0==0){
postData.deptId=this.dept?.id||0;
}else{
postData.projectId=this.projectInfo.id;
}
this.$api.materialSeal.selectTop20(postData).then(d=>{
this.materialSealList=d.data||[];
this.materialSealEl++;
});
},
doShowChecking(it){
this.$refs.checkDlg.showDialog(it);
},
@ -345,9 +377,9 @@ export default {
checkType:""+n
};
if(this.projectInfo?.id||0==0){
postData.deptId=this.dept.id;
postData.deptId=this.dept?.id||0;
}else{
postData.projectId=this.projectInfo.id;
postData.projectId=this.projectInfo?.id||0;
}
this.$api.checkDetection.groupByCheckType(postData).then(d=>{
let datas=d.data||[];
@ -699,5 +731,37 @@ export default {
padding:0px 8px;
}
}
.material-seal-list{
.material-seal-item{
padding:8px;
display: flex;
border-bottom: solid 1px #fff;
box-shadow: inset 7px 0px 11px 5px rgb(36 131 167 / 70%);
&:last-child{
border-bottom: none;
}
.material-seal-left{
width:40%;
}
.material-seal-right{
width:60%;
padding-left:12px;
line-height: 24px;
img{
width: 8px;
position: relative;;
top:3px;
}
.sp-lbl{
color: aquamarine;
white-space: nowrap;
}
.div-text{
margin-left:24px;
}
}
}
}
}
</style>

View File

@ -0,0 +1,303 @@
<template>
<MyDialog v-if="show" v-model="show" :width="fontSize == 2 ? '1000px' : '1000px'" height="600px"
:class="'font-size-' + fontSize" class="material-seal-detial-dlg">
<template slot="title">
<div style="display: flex; align-items: center;justify-content: space-between;">
<div :key="elKey" class="header-title">
{{ row.projectName }} - 材料封样详情
</div>
</div>
</template>
<div class="font-size-tools">
<i class="set-font-size font-size2" @click="fontSize = 2" :class="fontSize == 2 ? 'active' : ''">
<svg class="icon svg-icon"
style="width: 32px !important;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3686">
<path
d="M839 875H735.3l-74.1-198.7H358.6L288.7 875H185l276.8-726h100.4L839 875zM632.1 594.3L522.3 292.4c-3.4-9.7-7.2-26.6-11.3-50.6h-2.3c-3.4 21.9-7.4 38.7-11.7 50.6L388.1 594.3h244z"
fill="#fff" p-id="3687"></path>
</svg>
</i>
<i class="set-font-size font-size1" @click="fontSize = 1" :class="fontSize == 1 ? 'active' : ''">
<svg class="icon svg-icon"
style="width: 32px !important;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3686">
<path
d="M839 875H735.3l-74.1-198.7H358.6L288.7 875H185l276.8-726h100.4L839 875zM632.1 594.3L522.3 292.4c-3.4-9.7-7.2-26.6-11.3-50.6h-2.3c-3.4 21.9-7.4 38.7-11.7 50.6L388.1 594.3h244z"
fill="#fff" p-id="3687"></path>
</svg>
</i>
<i class="set-font-size font-size0" @click="fontSize = 0" :class="fontSize == 0 ? 'active' : ''">
<svg class="icon svg-icon"
style="width: 32px !important;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3686">
<path
d="M839 875H735.3l-74.1-198.7H358.6L288.7 875H185l276.8-726h100.4L839 875zM632.1 594.3L522.3 292.4c-3.4-9.7-7.2-26.6-11.3-50.6h-2.3c-3.4 21.9-7.4 38.7-11.7 50.6L388.1 594.3h244z"
fill="#fff" p-id="3687"></path>
</svg>
</i>
</div>
<div class="main-content scroll" style="max-height: 515px;overflow-y: auto;display: flex;">
<div class="data-img" style="width: 50%;">
<el-carousel height="500px" v-if="images && images.length > 0">
<el-carousel-item v-for="item in images" :key="item">
<div style="width: 100%;display: flex;align-items: center;justify-content: center;height: 500px;">
<el-image :src="item" style="width:100%" :preview-src-list="images" />
</div>
</el-carousel-item>
</el-carousel>
</div>
<div class="data-content" style="width: 50%;">
<div><img src="images/title_icon.png"><span class="sp-lbl">封样名称</span></div>
<div class="div-text ">
<div>{{ row.materialName }}</div>
</div>
<div><img src="images/title_icon.png"><span class="sp-lbl">使用部位</span></div>
<div class="div-text ">
<div>{{ row.usePosition }}</div>
</div>
<div><img src="images/title_icon.png"><span class="sp-lbl">指定品牌</span></div>
<div class="div-text ">
<div>{{ row.contractBrand }}</div>
</div>
<div><img src="images/title_icon.png"><span class="sp-lbl">拟用品牌</span></div>
<div class="div-text ">
<div>{{ row.useBrand }}</div>
</div>
<div><img src="images/title_icon.png"><span class="sp-lbl">封样日期</span></div>
<div class="div-text ">
<div>{{ row.sealDate }}</div>
</div>
<div><img src="images/title_icon.png"><span class="sp-lbl">会签单</span></div>
<div class="div-text ">
<div>
<div class="file-item" v-for="(it, idx) in signFiles" :key="idx">
<span>{{ it.name }}</span>
<el-button size="mini" type="text" icon="el-icon-download"
@click="handledownload(it)">下载</el-button>
</div>
</div>
</div>
<div><img src="images/title_icon.png"><span class="sp-lbl">变更单</span></div>
<div class="div-text ">
<div>
<div class="file-item" v-for="(it, idx) in alterationFiles" :key="idx">
<span>{{ it.name }}</span>
<el-button size="mini" type="text" icon="el-icon-download"
@click="handledownload(it)">下载</el-button>
</div>
</div>
</div>
</div>
</div>
</MyDialog>
</template>
<script>
import MyDialog from '../components/MyDialog'
export default {
components: {
MyDialog
},
data() {
return {
elKey: 0,
fontSize: 0,
show: false,
row: null,
images: [],
signFiles: [],
alterationFiles: []
};
},
mounted() {
},
methods: {
handledownload(it) {
window.open(it.url)
},
showDialog(row) {
this.row = row;
this.images = this.getBigProfileImage(row);
this.signFiles = this.getFiles(row.signFiles);
this.alterationFiles = this.getFiles(row.alterationFiles);
this.show = true;
},
getFiles(urls) {
if (!urls) {
return [];
}
return urls.split(",").filter(d => d).map(d => {
let name = d.split("/").pop();
return {
url: d,
name: name
}
});
},
getBigProfileImage(it) {
if (it.imageUrls) {
let tmps = it.imageUrls.split(",").filter(d => d).map(it => {
return it;
})
if (tmps.length > 0) {
return tmps;
}
}
if (it.mainImage && it.mainImage.trim()) {
return [it.mainImage];
}
return [];
},
},
};
</script>
<style lang="less">
.material-seal-detial-dlg {
.popup-project-introduction-min {
transform: translateY(200px);
}
&.font-size-2 {
.header-title {
font-size: 28px;
}
.popup-project-introduction-details {
.main-content {
align-items: start;
font-size: 28px;
line-height: 64px;
.data-content {
line-height: 48px;
.div-text {
margin-left: 48px;
}
img {
top: 0px;
}
.el-button--mini {
font-size: 32px;
}
}
.head-title-tab {
.head-nav {
padding: 12px 36px;
}
}
}
}
}
&.font-size-1 {
.header-title {
font-size: 24px;
}
.popup-project-introduction-details {
.main-content {
font-size: 24px;
line-height: 28px;
.data-content {
line-height: 36px;
.div-text {
margin-left: 36px;
}
.el-button--mini {
font-size: 24px;
}
}
.head-title-tab {
.head-nav {
padding: 12px 36px;
}
}
}
}
}
.popup-project-introduction-details {
padding: 0px !important;
position: relative;
.quality-table {
padding: 0px !important;
}
.font-size-tools {
position: absolute;
top: -40px;
right: 200px;
}
}
.main-content {
padding-top: 20px;
align-items: center;
.data-content {
padding-left: 24px;
line-height: 32px;
.sp-lbl {
color: aquamarine;
white-space: nowrap;
}
.div-text {
margin-left: 24px;
word-break: break-all;
}
img {
position: relative;
top: 3px;
width: 10px;
}
}
}
.head-title-tab {
padding-top: 12px;
display: block;
width: 100%;
}
}</style>

View File

@ -204,6 +204,9 @@ export default {
border-bottom: solid 1px #fff;
padding: 12px 0px 12px 20px;
box-shadow: inset 7px 0px 11px 5px rgb(36 131 167 / 70%);
&:last-child{
border-bottom: none;
}
.data-table{
border-collapse:collapse;
td{