From a9ca0823ab8f33ca85abebcf6ec4a8da235adb49 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期二, 30 一月 2024 14:36:49 +0800 Subject: [PATCH] 开发业务接口 --- company/src/components/business/dispatchReview.vue | 132 +++++++++++++++++++++++++++++-------------- 1 files changed, 88 insertions(+), 44 deletions(-) diff --git a/company/src/components/business/dispatchReview.vue b/company/src/components/business/dispatchReview.vue index 9d1ce17..6a3dfad 100644 --- a/company/src/components/business/dispatchReview.vue +++ b/company/src/components/business/dispatchReview.vue @@ -1,54 +1,57 @@ <template> <GlobalWindow :title="title" - width="50%" + width="100%" :visible.sync="visible" :confirm-working="isWorking" > - <div class="box"> - <div class="box_label">淇濋櫓鏂规锛氬钩瀹変繚闄╅泧涓昏矗浠婚櫓B鐗�</div> + <!-- 椹冲洖閫�鍥炵敵璇� --> + <div class="form"> + <div class="form_item"> + <div class="form_item_label"><span>*</span>瀹℃牳璇存槑锛�</div> + <div class="form_item_val"> + <el-input type="textarea" v-model="form.checkInfo" :rows="2" placeholder="璇疯緭鍏�"></el-input> + </div> + </div> + </div> + + <div class="box" v-for="(item, index) in duSolutionList" :key="index"> + <div class="box_label">淇濋櫓鏂规锛歿{item.solutionName}}</div> <el-table - :data="tableData" + v-if="item.duWorktypeList && item.duWorktypeList.length>0" + :data="item.duWorktypeList" border style="width: 100%"> - <el-table-column - prop="date" - label="鏃ユ湡"> - </el-table-column> - <el-table-column - prop="name" - label="濮撳悕"> - </el-table-column> - <el-table-column - prop="address" - label="鍦板潃"> - </el-table-column> + <el-table-column label="搴忓彿" width="80px"> + <template slot-scope="scope"> + <span>{{scope.$index + 1}}</span> + </template> + </el-table-column> + <el-table-column + prop="workTypeName" + label="鎵�灞炲伐绉�"> + </el-table-column> + <el-table-column + prop="name" + label="鎿嶄綔瑙嗛"> + <template slot-scope="{row}"> + <video loop controls width="150px" height="150px" :src="row.videoUrlFull"></video> + </template> + </el-table-column> + <el-table-column + label="鐘舵��"> + <template slot-scope="{row}"> + <span v-if="row.status === 0">寰呭鏍�</span> + <span v-if="row.status === 1">瀹℃牳閫氳繃</span> + <span v-if="row.status === 2">瀹℃牳涓嶉�氳繃</span> + </template> + </el-table-column> </el-table> - </div> - <!-- 椹冲洖閫�鍥炵敵璇� --> - <el-dialog - title="瀹℃牳纭" - :visible.sync="visible5" - :show-close="false" - :close-on-click-modal="false" - width="30%" - center> - <div class="form"> - <div class="form_item"> - <div class="form_item_label"><span>*</span>瀹℃牳璇存槑锛�</div> - <div class="form_item_val"> - <el-input type="textarea" :rows="2" placeholder="璇疯緭鍏�"></el-input> - </div> - </div> - </div> - <span slot="footer" class="dialog-footer"> - <el-button @click="visible5 = false">鍙� 娑�</el-button> - <el-button type="primary" @click="visible5 = false">纭� 瀹�</el-button> - </span> - </el-dialog> + </div> <template v-slot:footer> - <el-button type="primary" @click="visible5 = true">瀹℃牳閫氳繃</el-button> - <el-button @click="visible5 = true">瀹℃牳閫�鍥�</el-button> + <el-button type="primary" @click="doSubmit(1)">瀹℃牳閫氳繃</el-button> + <el-button type="danger" @click="doSubmit(2)">瀹℃牳閫�鍥�</el-button> + <el-button @click="visible=false">鍙栨秷</el-button> </template> </GlobalWindow> </template> @@ -56,6 +59,7 @@ <script> import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' + import {checkWorktype} from "@/api/business/dispatchUnit"; export default { name: 'dispatchReview', extends: BaseOpera, @@ -64,9 +68,10 @@ return { // 琛ㄥ崟鏁版嵁 form: { - id: null, - editDate: '' + checkInfo:'', + duSolutionList:[] }, + duSolutionList:[], // 楠岃瘉瑙勫垯 rules: { }, @@ -81,6 +86,44 @@ }) }, methods: { + open(title, target){ + this.title=title + this.visible=true + this.form ={} + this.form = target; + this.duSolutionList=[] + var duSolutionList = this.form.duSolutionList; + duSolutionList.forEach(item => { + var worktyps = item.duWorktypeList; + var flag = 0; + var tempworktyps = new Array(); + worktyps.forEach(item1 => { + if(item1.status == null || item1.status == 0){ + //濡傛灉鏄緟瀹℃牳宸ョ + flag = 1; + tempworktyps.push(item1); + } + if(flag ==1){ + this.duSolutionList.push({duWorktypeList:tempworktyps,solutionName:item.solutionName}) + } + }) + }) + + console.log(this.form) + }, + doSubmit(type){ + this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�') + .then(() => { + this.isWorking = true + checkWorktype({id:this.form.id,checkInfo:this.form.checkInfo,worktypeStatus:type}) + .then(response => { + this.visible = false + this.$emit('success') + }).catch(err => { + this.$tip.apiFailed(err) + }) + }) + } } } @@ -101,6 +144,7 @@ display: flex; align-items: center; flex-direction: column; + margin-bottom: 50px; .form_span { width: 100%; display: flex; @@ -122,13 +166,13 @@ width: 100%; display: flex; align-items: center; - margin-bottom: 20px; + margin-bottom: 50px; &:last-child { margin: 0 !important; } .form_item_label { flex-shrink: 0; - width: 170px; + //width: 170px; color: black; font-size: 14px; span { -- Gitblit v1.9.3