<template>
|
<div class="main">
|
<div class="main_header">
|
<div class="header_item">
|
<span class="header_label">项目名称:</span>
|
<el-select v-model="projectId" clearable placeholder="请选择项目" @change="changeHeaderProject">
|
<el-option
|
v-for="item in projectData"
|
:key="item.proId"
|
:label="item.proName"
|
:value="item.proId">
|
</el-option>
|
</el-select>
|
</div>
|
<div class="header_item">
|
<span class="header_label">环号:</span>
|
<el-input v-model="ringNum" clearable placeholder="请输入环号"></el-input>
|
</div>
|
<div class="header_item">
|
<span class="header_label">生产班组:</span>
|
<el-select v-model="groupId" clearable placeholder="请选择生产班组">
|
<el-option
|
v-for="item in groupData"
|
:key="item.groupId"
|
:label="item.groupName"
|
:value="item.groupId">
|
</el-option>
|
</el-select>
|
</div>
|
<div class="header_item">
|
<span class="header_label">质量标注:</span>
|
<el-select v-model="checkResult" clearable placeholder="请选择质量标注">
|
<el-option label="合格" :value="1"></el-option>
|
<el-option label="不合格" :value="2"></el-option>
|
<el-option label="报废" :value="3"></el-option>
|
</el-select>
|
</div>
|
<div class="header_item">
|
<span class="header_label">配筋:</span>
|
<el-select v-model="reinforcement" clearable placeholder="请选择配筋">
|
<el-option
|
v-for="item in reinforcementData"
|
:key="item.hasSteel"
|
:label="item.dictName"
|
:value="item.hasSteel">
|
</el-option>
|
</el-select>
|
</div>
|
<div class="header_item">
|
<span class="header_label">注浆孔:</span>
|
<el-select v-model="groutingHoles" clearable placeholder="请选择注浆孔">
|
<el-option
|
v-for="item in groutingHolesData"
|
:key="item.groutingHoles"
|
:label="item.dictName"
|
:value="item.groutingHoles">
|
</el-option>
|
</el-select>
|
</div>
|
<div class="header_item">
|
<span class="header_label">块号:</span>
|
<el-select v-model="blockNum" clearable placeholder="请选择块号">
|
<el-option
|
v-for="item in blockNumData"
|
:key="item.blockNum"
|
:label="item.dictName"
|
:value="item.blockNum">
|
</el-option>
|
</el-select>
|
</div>
|
<div class="header_item">
|
<span class="header_label">入模时间:</span>
|
<el-date-picker
|
v-model="inModTime"
|
type="daterange"
|
range-separator="至"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
</div>
|
<!-- <div class="header_item">
|
<span class="header_label">浇筑日期:</span>
|
<el-date-picker
|
v-model="pouringTime"
|
type="daterange"
|
range-separator="至"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
</div> -->
|
<div class="header_item">
|
<span class="header_label">质检时间:</span>
|
<el-date-picker
|
v-model="checkTime"
|
type="daterange"
|
range-separator="至"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
</div>
|
<div class="header_item">
|
<el-button v-if="showButton('search')" icon="el-icon-search" @click="searchDuctpiecePLMList(true)">查询</el-button>
|
<el-button v-if="showButton('insert')" icon="el-icon-download" @click="propInsert()">新增管片</el-button>
|
<el-button v-if="showButton('insert')" icon="el-icon-download" @click="exportExcel()">导出Excel</el-button>
|
</div>
|
</div>
|
<div class="main_content">
|
<el-table
|
v-loading="loading"
|
:data="ductpieceList"
|
height="100%">
|
<el-table-column label="序号" width="60" align="center">
|
<template #default="scope">
|
<span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="ringNum" label="环号" align="center"></el-table-column>
|
<el-table-column prop="proName" label="项目名称" align="center"></el-table-column>
|
<el-table-column prop="pipeNum" label="管片编号" align="center"></el-table-column>
|
<el-table-column prop="turnName" label="转向" align="center"></el-table-column>
|
<el-table-column prop="reinforcementName" label="配筋" align="center"></el-table-column>
|
<el-table-column prop="groutingHolesName" label="注浆孔" align="center"></el-table-column>
|
<el-table-column prop="blockNumName" label="块号" align="center"></el-table-column>
|
<el-table-column prop="mouldNum" label="模具" align="center"></el-table-column>
|
<el-table-column prop="intoModTime" label="入模时间" align="center"></el-table-column>
|
<!-- <el-table-column prop="pouringTime" label="浇筑时间" align="center"></el-table-column> -->
|
<el-table-column prop="checkTime" label="质检时间" align="center"></el-table-column>
|
<el-table-column prop="groupName" label="生产班组" align="center"></el-table-column>
|
<el-table-column label="质量标注" align="center">
|
<template #default="{ row }">
|
<div>
|
{{ row.checkResult == 0 ? '未质检' : row.checkResult == 1 ? '合格' : row.checkResult == 2 ? '不合格' : row.checkResult == 3 ? '报废' : ''}}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column label="操作" align="center" width="300">
|
<template #default="{ row }">
|
<template v-if="showButton('update') && row.checkResult !== 1">
|
<el-button class="table_btn" size="mini" @click="propIssue(row)">存在问题</el-button>
|
</template>
|
<el-button class="table_btn" size="mini" v-if="showButton('update') && row.checkResult == 0" @click="propUpdate(row)">修改环号</el-button>
|
<el-button class="table_btn" size="mini" v-if="showButton('delete')" @click="propCheckHistory(row)">质量追溯</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<div class="main_footer">
|
<el-pagination
|
background
|
@current-change="changePageNum"
|
@size-change="changePageSize"
|
:current-page="pageNum"
|
:page-sizes="[10, 20, 50, 100]"
|
:page-size="pageSize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total">
|
</el-pagination>
|
</div>
|
<el-dialog
|
class="prop_dialog"
|
title="存在问题"
|
:visible.sync="asyncDuctPiece"
|
width="35%">
|
<el-form ref="form" :model="formDuctPiece" :rules="rulesDuctPiece" label-width="auto" class="rule_form">
|
<el-form-item label="质检结果:">
|
<span class="issue_status">{{checkResultStr}}</span>
|
</el-form-item>
|
<el-form-item label="存在问题:">
|
<el-input
|
v-model="formDuctPiece.existProblem"
|
type="textarea"
|
disabled
|
placeholder="请输入存在问题"></el-input>
|
</el-form-item>
|
<el-form-item label="问题图片:">
|
<div class="problem_content">
|
<el-image
|
v-for="item in fileList"
|
:key="item.id"
|
class="problem_image"
|
:src="item.url">
|
</el-image>
|
</div>
|
</el-form-item>
|
<el-form-item label="问题处理结果:">
|
<el-input
|
v-model="formDuctPiece.exeProResult"
|
type="textarea"
|
clearable
|
placeholder="请输入问题处理结果"></el-input>
|
</el-form-item>
|
<el-form-item label="备注:">
|
<el-input
|
v-model="formDuctPiece.exeProNote"
|
type="textarea"
|
clearable
|
placeholder="请输入备注"
|
maxlength="200"
|
show-word-limit></el-input>
|
</el-form-item>
|
</el-form>
|
<div slot="footer">
|
<el-button @click="asyncDuctPiece = false">取 消</el-button>
|
<el-button class="submit_btn" @click="submitInsertForm()">提 交</el-button>
|
</div>
|
</el-dialog>
|
<!-- 质量追溯 -->
|
<el-dialog
|
class="prop_dialog"
|
title="质量追溯"
|
:visible.sync="asyncRetrospect"
|
width="70%">
|
<div class="retrospect_content">
|
<div class="retrospect_content_title">
|
钢筋笼信息
|
</div>
|
<div class="retrospect_content_table">
|
<div
|
class="table_item"
|
:style="{width: `calc(100% / ${asyncCageInfo.length})`}"
|
v-for="item in asyncCageInfo"
|
:key="item.id">
|
<div class="table_item_chunk table_th">{{item.label}}</div>
|
<div class="table_item_chunk table_td">{{
|
item.value === 'steelCheckResult' ? showCheckResult(retrospectInfo[item.value]) : retrospectInfo[item.value]}}
|
</div>
|
</div>
|
</div>
|
<div class="retrospect_content_title">
|
模具信息
|
</div>
|
<div class="retrospect_content_table">
|
<div
|
class="table_item"
|
:style="{width: `calc(100% / ${asyncMouldInfo.length})`}"
|
v-for="item in asyncMouldInfo"
|
:key="item.id">
|
<div class="table_item_chunk table_th">{{item.label}}</div>
|
<div class="table_item_chunk table_td">{{retrospectInfo[item.value]}}</div>
|
</div>
|
</div>
|
<div class="retrospect_content_title">
|
管片信息
|
</div>
|
<div class="retrospect_content_table">
|
<div
|
class="table_item"
|
:style="{width: `calc(100% / ${asyncDuctpieceInfo.length})`}"
|
v-for="item in asyncDuctpieceInfo"
|
:key="item.id">
|
<div class="table_item_chunk table_th">{{item.label}}</div>
|
<div class="table_item_chunk table_td">{{retrospectInfo[item.value]}}</div>
|
</div>
|
</div>
|
</div>
|
</el-dialog>
|
<el-dialog
|
class="prop_dialog"
|
:title="asyncTitle ? '新增管片' : '修改环号'"
|
:visible.sync="asyncInsert"
|
width="35%">
|
<el-form ref="formInsert" :model="formInsert" :rules="rulesInsert" label-width="auto" class="rule_form">
|
<el-form-item label="项目名称:" prop="proId" v-if="asyncTtile">
|
<el-select v-model="formInsert.proId" clearable placeholder="请选择项目信息" @change="getAllSteelPipeData">
|
<el-option
|
v-for="item in projectData"
|
:key="item.proId"
|
:label="item.proName"
|
:value="item.proId">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="环号:" prop="ringNum">
|
<el-input v-model="formInsert.ringNum" clearable placeholder="请输入环号"></el-input>
|
</el-form-item>
|
</el-form>
|
<div slot="footer">
|
<el-button @click="asyncInsert = false">取 消</el-button>
|
<el-button class="submit_btn" @click="asyncTitle ? submitInsertPipe() : submitUpdatePipe()">提 交</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import { cageInfo, mouldInfo, ductpiedceInfo } from '../file/retrospect';
|
import { buttonPinia } from '../../../pinia';
|
import { downLoadFile, throttle } from '../../../plugins/public';
|
export default {
|
data() {
|
return {
|
projectId: '',
|
projectData: [],
|
ringNum: '', // 环号
|
groupId: '', // 班组
|
groupData: [], // 班组信息
|
checkResult: '', // 质量标注
|
reinforcement: '', // 配筋
|
reinforcementData: [], // 配筋信息
|
groutingHoles: '', // 注浆孔
|
groutingHolesData: [], // 注浆孔信息
|
blockNum: '', // 块号
|
blockNumData: [], // 块号信息
|
inModTime: '', // 入模时间
|
pouringTime: '', // 浇筑时间
|
checkTime: '', // 质检时间
|
pageNum: 1,
|
pageSize: 10,
|
total: 0,
|
loading: false,
|
ductpieceList: [],
|
asyncDuctPiece: false, // 存在问题弹窗
|
formDuctPiece: {}, // 表单信息
|
rulesDuctPiece: {}, // 表单校验规则
|
issueType: '',
|
asyncRetrospect: false, // 质量追溯弹窗
|
asyncCageInfo: cageInfo, // 钢筋笼信息
|
asyncMouldInfo: mouldInfo, // 模具信息
|
asyncDuctpieceInfo: ductpiedceInfo, // 管片信息
|
retrospectInfo: {},// 质量追溯信息
|
pipeId: '',
|
checkResultStr: '',
|
asyncTitle: true,
|
asyncInsert: false,
|
formInsert: {},
|
rulesInsert: {
|
proId: [{
|
required: true,
|
message: '请选择项目名称',
|
trigger: 'blur'
|
}],
|
ringNum: [{
|
required: true,
|
message: '请输入环号',
|
trigger: 'blur'
|
}],
|
},
|
proData: [],
|
steelData: [],
|
mouldData: [],
|
}
|
},
|
mounted() {
|
this.getAllProjects();
|
this.getAllGroupData();
|
this.searchDuctpiecePLMList(true);
|
},
|
methods: {
|
// 根据项目获取钢筋笼 模具信息
|
async getAllSteelPipeData(proId) {
|
this.steelData = [];
|
this.mouldData = [];
|
const { data } = await this.$api.DuctpiecePLM.getAllSteelPipeData({
|
proId: proId
|
});
|
this.steelData = data.steel;
|
this.mouldData = data.mod;
|
},
|
// 获取全部班组
|
async getAllGroupData() {
|
const { data } = await this.$api.DuctpiecePLM.getAllGroupData();
|
this.groupData = data;
|
},
|
// 获取全部项目
|
async getAllProjects() {
|
const { data } = await this.$api.Engineer.getAllProjects();
|
this.projectData = data;
|
},
|
// 查询管片信息
|
searchDuctpiecePLMList(bol) {
|
if(bol) {
|
this.pageNum = 1;
|
}
|
this.loading = true;
|
this.ductpieceList = [];
|
this.$api.DuctpiecePLM.searchDuctpiecePLMList({
|
pageNum: this.pageNum,
|
pageSize: this.pageSize,
|
proId: this.projectId,
|
ringNum: this.ringNum,
|
groupId: this.groupId,
|
checkResult: this.checkResult,
|
reinforcement: this.reinforcement,
|
groutingHoles: this.groutingHoles,
|
blockNum: this.blockNum,
|
inModStartTime: this.inModTime ? this.inModTime[0] + ' 00:00:00' : '',
|
inModEndTime: this.inModTime ? this.inModTime[1] + ' 23:59:59' : '',
|
pouringStartTime: this.pouringTime ? this.pouringTime[0] + ' 00:00:00' : '',
|
pouringEndTime: this.pouringTime ? this.pouringTime[1] + ' 23:59:59' : '',
|
checkStartTime: this.checkTime ? this.checkTime[0] + ' 00:00:00' : '',
|
checkEndTime: this.checkTime ? this.checkTime[1] + ' 23:59:59' : ''
|
}).then((res) => {
|
if(res.success) {
|
this.total = res.data.total;
|
this.ductpieceList = res.data.list;
|
}
|
this.loading = false;
|
}).catch(() => {
|
this.loading = false;
|
})
|
},
|
// 打开新增管片信息
|
propInsert() {
|
this.asyncTitle = true;
|
this.asyncInsert = true;
|
this.getAllProjects();
|
},
|
// 打开修改环号信息
|
propUpdate(row) {
|
this.asyncTitle = false;
|
this.asyncInsert = true;
|
this.$set(this.formInsert, 'pipeNum', row.pipeNum);
|
this.$set(this.formInsert, 'ringNum', row.ringNum);
|
},
|
// 导出Excel
|
exportExcel() {
|
this.$api.System.GETEXPORTTOKENDATA({
|
ringNum: this.ringNum,
|
groupId: this.groupId,
|
checkResult: this.checkResult,
|
reinforcement: this.reinforcement,
|
groutingHoles: this.groutingHoles,
|
blockNum: this.blockNum,
|
inModStartTime: this.inModTime[0],
|
inModEndTime: this.inModTime[1],
|
pouringStartTime: this.pouringTime[0],
|
pouringEndTime: this.pouringTime[1],
|
checkStartTime: this.checkTime[0],
|
checkEndTime: this.checkTime[1]
|
}).then((res) => {
|
if(res.success) {
|
downLoadFile(res.data, '/m/pipeInfo/export');
|
}
|
})
|
},
|
// 打开存在问题
|
propIssue(row) {
|
this.pipeId = row.pipeId
|
this.checkResultStr = row.checkResultStr;
|
this.issueType = row.type;
|
this.asyncDuctPiece = true;
|
this.$api.DuctpiecePLM.getProblemInfo({
|
pipeId: row.pipeId
|
}).then((res) => {
|
if(res.success) {
|
this.$set(this.formDuctPiece, 'pipeCheckId', res.data.pipeCheckId);
|
this.$set(this.formDuctPiece, 'existProblem', res.data.existProblem);
|
this.$set(this.formDuctPiece, 'exeProResult', res.data.exeProResult);
|
this.$set(this.formDuctPiece, 'exeProNote', res.data.exeProNote);
|
this.fileList = res.data.files.map((item, index) => {
|
return {
|
id: index + 1,
|
url: `https://szpipe.thhy-tj.com/${item}`
|
}
|
})
|
}
|
})
|
},
|
// 打开质量追溯
|
propCheckHistory(row) {
|
this.asyncRetrospect = true;
|
this.retrospectInfo = {};
|
this.$api.DuctpiecePLM.getCheckHistoryInfo({
|
pipeId: row.pipeId
|
}).then((res) => {
|
if(res.success) {
|
this.retrospectInfo = res.data;
|
}
|
})
|
},
|
// 提交存在问题
|
submitInsertForm: throttle(function() {
|
const params = Object.assign({}, this.formDuctPiece);
|
params.checkResultStr = this.checkResultStr;
|
params.pipeId = this.pipeId;
|
this.$api.DuctpiecePLM.insertIssueInfo(params).then((res) => {
|
if(res.success) {
|
this.asyncDuctPiece = false;
|
this.searchDuctpiecePLMList(true);
|
this.$message.success('添加成功!');
|
} else {
|
this.$message.warning(res.statusMsg);
|
}
|
})
|
}, 3000),
|
// 提交新增管片信息
|
submitInsertPipe: throttle(function() {
|
this.$refs.formInsert.validate((valid) => {
|
if(valid) {
|
const params = Object.assign({}, this.formInsert);
|
this.$api.DuctpiecePLM.insertPipeData(params).then((res) => {
|
if(res.statusMsg === 'ok') {
|
this.asyncInsert = false;
|
this.searchDuctpiecePLMList(true);
|
this.$message.success('新增成功!');
|
} else {
|
this.$message.warning(res.statusMsg);
|
}
|
})
|
}
|
})
|
}, 3000),
|
// 提交修改环号信息
|
submitUpdatePipe: throttle(function() {
|
this.$refs.formInsert.validate((valid) => {
|
if(valid) {
|
const params = Object.assign({}, this.formInsert);
|
this.$api.DuctpiecePLM.updataRingNumData(params).then((res) => {
|
if(res.statusMsg === 'ok') {
|
this.asyncInsert = false;
|
this.searchDuctpiecePLMList(true);
|
this.$message.success('修改成功!');
|
} else {
|
this.$message.warning(res.statusMsg);
|
}
|
})
|
}
|
})
|
}, 3000),
|
//
|
showCheckResult(value) {
|
return !value ? '' : value == 1 ? '合格' : '存在问题';
|
},
|
// 根据项目获取尺寸 配筋 块号信息
|
changeHeaderProject(data) {
|
this.blockNum = '';
|
this.reinforcement = '';
|
this.groutingHoles = '';
|
this.groutingHolesData = [];
|
this.blockNumData = [];
|
this.reinforcementData = [];
|
if(data) {
|
this.$api.Basics.getProjectSystemInfoData({
|
proId: data
|
}).then((res) => {
|
this.groutingHolesData = res.data.proGroutings;
|
this.blockNumData = res.data.proBloks;
|
this.reinforcementData = res.data.proHas;
|
})
|
}
|
},
|
// 切换页数
|
changePageNum(page) {
|
this.pageNum = page;
|
this.searchDuctpiecePLMList();
|
},
|
// 切换每页条数
|
changePageSize(size) {
|
this.pageSize = size;
|
this.searchDuctpiecePLMList();
|
},
|
// 判断按钮权限信息
|
showButton(str) {
|
const pinia = buttonPinia();
|
return pinia.$state.buttonInfo.includes(str);
|
},
|
},
|
watch: {
|
asyncDuctpieceInfo(bol) {
|
if(!bol) {
|
this.formDuctPiece = {};
|
this.pipeId = '';
|
this.checkResultStr = '';
|
this.fileList = [];
|
}
|
},
|
asyncInsert(bol) {
|
if(!bol) {
|
this.steelData = [];
|
this.mouldData = [];
|
this.formInsert = {};
|
this.$refs.formInsert.resetFields();
|
}
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
@import '../../../style/layout-main.scss';
|
|
.issue_status {
|
color: #F42829;
|
}
|
|
.retrospect_content {
|
padding: 0 0 20px 0;
|
|
.retrospect_content_title {
|
position: relative;
|
padding: 0 15px 15px;
|
font-size: 16px;
|
font-weight: 600;
|
color: #FFF;
|
border-bottom: 1px solid #0d5274;
|
|
&::before {
|
content: "";
|
position: absolute;
|
top: 50%;
|
left: 0;
|
transform: translateY(-85%);
|
width: 3px;
|
height: 50%;
|
background: #18F6F8;
|
}
|
}
|
|
.retrospect_content_table {
|
display: flex;
|
margin: 10px 10px 10px 0;
|
|
.table_item {
|
border: 1px solid #1CB7E0;
|
border-right: none;
|
|
&:last-child {
|
border-right: 1px solid #1CB7E0;
|
}
|
|
.table_item_chunk {
|
padding: 10px;
|
color: #18F6F8;
|
text-align: center;
|
}
|
|
.table_th {
|
border-bottom: 1px solid #1CB7E0;
|
background: #082F57;
|
}
|
}
|
}
|
}
|
|
.problem_content {
|
display: flex;
|
flex-wrap: wrap;
|
|
.problem_image {
|
margin: 5px 10px;
|
width: 100px;
|
height: 100px;
|
}
|
}
|
|
::v-deep .el-date-editor .el-range-separator {
|
color: #fff !important;
|
}
|
</style>
|