123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498 |
- <!--
- *@description: 工程历史详情
- *@author: yh Fu
- *@date: 2024-1-8 10:04:23
- *@version: V1.0.5
- -->
- <template>
- <div style="width: 100%;height: 100%;">
- <el-dialog
- :visible.sync="dialogVisible"
- title=""
- width="60%"
- append-to-body
- custom-class="ConstructionDetailsDialog">
- <el-tabs type="card" v-model="activeNames" @tab-click="viewSource" class="projectTabs">
- <el-tab-pane
- :label="e.label"
- :name="e.value"
- v-for="(e,idx) in currentDicts"
- :key="idx"
- >
- <el-collapse
- class="rmOldPie"
- v-for="(e,idx) in currentCollapses"
- :key="idx"
- >
- <el-collapse-item :name="idx">
- <template slot="title">
- <div style="display: flex;width: 100%;height: 100%;">
- <div
- style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
- </div>
- <h2 style="margin-left: 1%;font-weight: 700;">{{ e.updateTime }}</h2>
- </div>
- </template>
- <!-- 人员信息 -->
- <div>
- 负责人:{{ e.headName }}
- 施工人:{{ e.constructUser }}
- 负责人电话:{{ e.headPhone }}
- 施工人电话:{{ e.constructPhone }}
- </div>
- <hr>
- <!-- 用料明细 -->
- <div
- v-for="(i,index) in e.zEngineeringMaterialBo || [] "
- :key="index"
- >
- <el-form :model="nodeInfo" class="nodeForm">
- <el-form-item
- :prop="i.materialQuality"
- label-width="50px"
- label="材质"
- v-show="i.materialQuality != null"
- >
- <!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
- <!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
- <el-select v-model="i.materialQuality" placeholder="请选择材质" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
- <el-option
- v-for="e in materialQualityList"
- :key="e.id"
- :label="e.name"
- :value="e.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- :prop="i.specifications"
- label-width="50px"
- label="规格"
- v-show="i.specifications != null"
- >
- <el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
- <el-option
- v-for="e in specificationsList"
- :key="e.id"
- :label="e.name"
- :value="e.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- :prop="i.number + ''"
- label-width="50px"
- label="数量"
- v-show="i.number != null"
- >
- <div class="block" style="display: inline-block; margin-right: 20px;">
- <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" type="number" :disabled="status == 'read-only' "/>
- </div>
- </el-form-item>
- <el-form-item
- :prop="i.corrosionLevel"
- label="腐蚀等级"
- v-show="i.corrosionLevel != null"
- >
- <!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
- <!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
- <el-select v-model="i.corrosionLevel" placeholder="请选择腐蚀等级" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
- <el-option
- v-for="e in corrosionLevelList"
- :key="e.dictValue"
- :label="e.dictLabel"
- :value="e.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- :prop="i.visitType"
- label-width="50px"
- label="上门类型"
- v-show="i.visitType != null"
- >
- <!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
- <!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
- <el-select v-model="i.visitType" placeholder="请选择上门类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
- <el-option
- v-for="e in dict.type.visit_type"
- :key="e.value"
- :label="e.label"
- :value="e.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- :prop="i.selfClosingValveType"
- label-width="50px"
- label="自闭阀类型"
- v-show="i.selfClosingValveType != null"
- >
- <!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
- <!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
- <el-select v-model="i.selfClosingValveType" placeholder="请选择自闭阀类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
- <el-option
- v-for="e in dict.type.self_closing_valve_type"
- :key="e.value"
- :label="e.label"
- :value="e.value"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <!-- <el-input size="mini" v-if="i.brand" style="width: 80%" v-model="i.brand" placeholder="请输入品牌">
- <template slot="prepend">品牌</template>
- </el-input>
- <el-input v-if="i.visitType" size="mini" v-model="i.visitType" placeholder="请输入品牌">
- <template slot="prepend">上门类型</template>
- </el-input>
- <el-input size="mini" v-if="i.corrosionLevel" v-model="i.corrosionLevel" placeholder="请输入品牌">
- <template slot="prepend">腐蚀等级</template>
- </el-input>
- <el-input size="mini" v-if="i.selfClosingValveType" v-model="i.selfClosingValveType"
- placeholder="请输入品牌">
- <template slot="prepend">自闭阀类型</template>
- </el-input> -->
- </div>
- <!-- <el-form-item label="照片" :prop="e.zEngiineeringPhotoBoList" class="obsImage"> -->
- <ObsImageUpload
- :class=" status == 'read-only' ? '' : obsImageUpload"
- ref="obsImageUpload"
- :limit="9999"
- :fileType="['png', 'jpg', 'jpeg']"
- @input="getUrl"
- :value="e.zEngiineeringPhotoBoList"
- :disabled="status == 'read-only' "
- ></ObsImageUpload>
- <!-- </el-form-item> -->
- <hr>
- </el-collapse-item>
- </el-collapse>
- </el-tab-pane>
- <button class="check" @click="checkWorking" v-if="currentStatus == 'check' && reviewStatus " style="width: 80px;border: none;">审核</button>
- <button class="check" @click="updateNodeOption" style="width: 94px;border: none;cursor: pointer;" v-if="currentStatus != 'check'">修改</button>
- </el-tabs>
- </el-dialog>
- <!-- 审核 -->
- <el-dialog
- title="审核"
- :visible.sync="checkingVisible"
- width="30%"
- class="checkingDialog"
- :before-close="handleClose">
- <el-form :model="checkingInfo" ref="checking" class="nodeForm">
- <el-form-item
- label-width="70px"
- label="审核状态"
- >
- <el-select v-model="checkingInfo.reviewStatus" placeholder="请选择审核状态" style="width: 100%" label="审核状态">
- <el-option
- v-for="e in reviewStatusList"
- :key="e.label"
- :label="e.label"
- :value="e.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- label-width="70px"
- label="审核内容"
- >
- <div class="block" style="display: inline-block; margin-right: 20px;">
- <el-input
- v-model="checkingInfo.reviewContent"
- placeholder="请输入审核内容"
- type="textarea"
- style="width: 100%"/>
- </div>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="checkingVisible = false">取 消</el-button>
- <el-button type="primary" @click=checkingSubmit>确 定</el-button>
- </span>
- </el-dialog>
- </div>
-
- </template>
- <script>
- import {
- getEnginMaterialQualityList, // 材质
- getEnginSpecificationsList, // 规格
- getDictType, // 腐蚀程度
- } from '@/api/zdsz/enginee'
- export default {
- name: 'ConstructionDetails',
- dicts:[
- 'visit_type',
- 'self_closing_valve_type',
- ],
- props: ['currentCollapses','nodeDetailType','enginType','status'],
- data() {
- return {
- currentDicts: [], // 当前类型工程节点项
- dialogVisible: false,
- activeNames: '',
- reviewStatusList:[
- {
- value:'1',
- label:'通过'
- },
- {
- value:'0',
- label:'不通过'
- }
- ], // 审核状态option
- corrosionLevelList:[], // 腐蚀等级option
- materialQualityList:[], // 材质
- specificationsList:[], // 规格
- materialComponList:[],
- nodeInfo:{
- backfillTime:'', // 回填时间
- constructTime:'',
- constructAccordingDrawings:'',
- segmentedCompressionQualified:'',
- zEngiineeringPhotoBoList:[], // 照片集合
- zEngineeringMaterialBo:[], // 用料集合
- remark:'',
- },
- checkingInfo:{
- reviewStatus:'', // 审核状态
- reviewContent:'', // 审核内容
- engInfoId:'', // 节点Id
- createTime:'', // 工程创建时间
- },
- currentStatus:null,
- checkingVisible:null,
- }
- },
- created(){
- // 获取材质
- getEnginMaterialQualityList({enginType:this.enginType}).then(res => {
- console.log('材质',res)
- this.materialQualityList = res.data
- })
- // 获取腐蚀等级
- getDictType({dictType:'corrosion_level'}).then(res => {
- console.log('腐蚀等级',res)
- this.corrosionLevelList = res.data
- })
- },
- mounted() {
- },
- computed:{
- reviewStatus(){
- let flag = null
- try {
- flag = currentCollapses[0].zEngineeringReviewBo.reviewStatus != '1' ? true : false
- } catch (error) {
- flag = true
- }
- return flag
- }
- },
- watch: {
- // 此处监听variable变量,当期有变化时执行
- currentDicts(item1, item2) {
- // item1为新值,item2为旧值
- console.log('item1为新值,item2为旧值', item1[0].value)
- this.activeNames = item1[0].value
- this.$parent.viewNodeSource(item1[0].value)
- },
- currentCollapses(){
- let materialQuality = []
- try {
- materialQuality = this.currentCollapses[0].zEngineeringMaterialBo[0].materialQuality
- } catch (error) {
- materialQuality = []
- }
- if(materialQuality){
- getEnginSpecificationsList({materId:materialQuality}).then(res => {
- console.log('规格',res.data)
- this.specificationsList = res.data
- })
- }
- }
- },
- methods: {
- // 提交审核
- checkingSubmit(){
- try {
- this.checkingInfo.engInfoId = this.currentCollapses[0].id
- } catch (error) {
- this.checkingInfo.engInfoId = null
- }
- this.$emit('checkWorking',this.checkingInfo)
- },
- // 查看单节点历史
- viewSource(e) {
- console.log(this.$parent)
- this.$parent.viewNodeSource(e.name)
- },
- // 单项审核
- checkWorking() {
- if(this.currentStatus == 'check'){
- this.checkingVisible = true
- }
- },
- updateNodeOption(){
- console.log(this.activeNames)
- console.log('最新面板',this.currentCollapses)
- this.$emit('updateNodeOption',this.currentCollapses)
- },
- // 查看历史
- open(dicts, type = null,currentStatus = null) {
- this.currentStatus = currentStatus
- this.checkingVisible = false
- if (type == '1' || type == '2') {
- // 工业 市政
- this.$parent.viewNodeSource()
- this.currentDicts = [
- {
- value: "历史数据",
- label: "历史数据"
- }
- ]
- } else if (type === '危险作业工程') {
- this.$parent.viewNodeSource()
- this.currentDicts = [
- {
- value: "历史数据",
- label: "历史数据"
- }
- ]
- } else {
- console.log(dicts)
- debugger
- this.dialogVisible = true
- this.currentDicts = dicts
- }
- this.dialogVisible = true
- },
- // 获取材质规格
- getEnginSpecificationsList(e,idx){
- getEnginSpecificationsList({materId:e.materialQuality}).then(res => {
- console.log('规格',res.data)
- this.specificationsList = res.data
- })
- },
- getUrl(url,idx) {
- this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e=>e.url):[];
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .nodeForm{
- .el-form-item__content{
- display: flex;
- }
- }
- ::v-deep .obsImageUpload{
- .el-upload--picture-card{
- display: block !important;
- }
- }
- ::v-deep .obsImageUpload >div{
- display: flex;
- }
- ::v-deep .el-dialog {
- height: 85%;
- .el-dialog__body {
- overflow: hidden;
- height: 94%;
- }
- }
- ::v-deep .el-upload--picture-card {
- display: none;
- }
- .ConstructionDetailsDialog {
- position: absolute;
- .projectTabs {
- height: 100%;
- overflow: hidden;
- overflow-y: scroll;
- margin-top: 4%;
- ::v-deep .el-tabs__content {
- margin-top: 1%;
- }
- ::v-deep .el-tabs__nav {
- border: none;
- overflow: hidden;
- overflow-x: scroll;
- }
- ::v-deep .el-tabs__item {
- // width: 47%;
- border: 1px solid #797979;
- border-radius: 5px;
- }
- ::v-deep .el-tabs__item.is-active {
- background-color: #169BD5;
- color: #fff;
- }
- ::v-deep .el-tabs__header {
- position: fixed;
- width: 53%;
- border: none;
- top: 13%;
- }
- ::v-deep .el-collapse-item__wrap {
- padding: 0 4%;
- }
- .check {
- position: fixed;
- right: 22.1%;
- top: 13.1%;
- height: 4.6%;
- background-color: #CC9900;
- color: #fff;
- }
- }
- .projectTabs::-webkit-scrollbar {
- display: none;
- }
- ::v-deep .rmOldPie {
- .el-collapse-item {
- border: none;
- }
- }
- }
- ::v-deep .checkingDialog{
- height: 50%;
- margin-top: 6%;
- .el-dialog__body{
- height: 72%;
- }
- .el-textarea__inner{
- width: 246%;
- height: 140px;
- }
- }
- </style>
|