From 17efddc6a667670dca682bf36b51a43e99615e6d Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期三, 16 十月 2024 15:59:38 +0800 Subject: [PATCH] 代码初始化 --- admin/src/components/business/OperaCarUseBookWindow.vue | 171 +++++++++++++++++++++++++++++++------------------------- 1 files changed, 95 insertions(+), 76 deletions(-) diff --git a/admin/src/components/business/OperaCarUseBookWindow.vue b/admin/src/components/business/OperaCarUseBookWindow.vue index 146c5de..8321ae4 100644 --- a/admin/src/components/business/OperaCarUseBookWindow.vue +++ b/admin/src/components/business/OperaCarUseBookWindow.vue @@ -12,10 +12,10 @@ <div class="time">鎻愪氦鏃堕棿锛歿{model.createDate}}</div> </div> <span class="right" v-if="model.status === 0">鐢宠涓�</span> - <span class="right" v-if="model.status === 1">寰呭鎵�</span> + <span class="right" v-if="model.status === 1">瀹℃壒涓�</span> <span class="right" style="background:#53b76f " v-if="model.status === 2">瀹℃壒閫氳繃</span> <span class="right" style="background:#dc362e " v-if="model.status === 3">瀹℃壒涓嶉�氳繃</span> - <span class="right" style="background:#dc362e " v-if="model.status === 4">宸插彇娑�</span> + <span class="right" style="background:#B2B2B2; " v-if="model.status === 4">宸叉挙閿�</span> </div> <div class="info"> <div class="title">鍏姟杞︾敵璇蜂俊鎭�</div> @@ -43,8 +43,8 @@ </div> <div class="item"> <div class="label">鐩殑鍦扮被鍒�</div> - <div class="value status-green" v-if="model.type === 0">銆愬競鍐呯敤杞︺��</div> - <spdivan class="value status-red" v-if="model.type === 1">銆愬競鍐呯敤杞︺��</spdivan> + <div class="value status-green" v-if="model.type == 0">銆愬競鍐呯敤杞︺��</div> + <div class="value status-red" v-if="model.type == 1">銆愬競澶栫敤杞︺��</div> </div> <div class="item"> <div class="label">鐩殑鍦�</div> @@ -67,17 +67,17 @@ <div class="item" v-for="(item,index) in model.approveDateVO.approveList" :key="item.id"> <div class="separate" v-if=" (index < model.approveDateVO.approveList.length-1)"></div> <div class="info"> - <img src="@/assets/icons/ic_tongguo.png" class="iconnew" v-if="(item.type !=1 &&item.status ==2)"/> - <img src="@/assets/icons/ic_dangqian.png" class="iconnew" v-if="(item.type !=1 &&item.status==1)"/> - <img src="@/assets/icons/ic_jujue.png" class="iconnew" v-if="(item.type !=1 &&item.status==3)"/> - <img src="@/assets/icons/ic_grey.png" class="iconnew" v-if="item.type ==1 || (item.status==null || item.status==0 )"/> + <img src="@/assets/icons/ic_tongguo.png" class="iconnew" v-if="( item.status ==2)"/> + <img src="@/assets/icons/ic_dangqian.png" class="iconnew" v-if="( item.status==1)"/> + <img src="@/assets/icons/ic_jujue.png" class="iconnew" v-if="( item.status==3)"/> + <img src="@/assets/icons/ic_grey.png" class="iconnew" v-if=" (item.status==null || item.status==0 )"/> <div style="display: inline" v-if="item.approveType !=1"> <img v-if="item.faceImg!=null && item.faceImg !=''" :src="item.faceImg" class="avatar" alt="" /> <img v-if="item.faceImg ==null ||item.faceImg ==''" src="@/assets/avatar/man.png" class="avatar" alt="" /> </div> - <div style="display: inline" v-if="item.approveType ==1"> - <img v-if="item.status == 1" src="@/assets/icons/ic_chaosong.png" class="avatar" alt="" /> - <img v-if="item.status != 1" src="@/assets/icons/ic_duoren.png" class="avatar" alt="" /> + <div style="display: inline" v-if="item.approveType == 1"> + <img v-if="item.type !=1" src="@/assets/icons/ic_duoren.png" class="avatar" alt="" /> + <img v-if="item.type == 1" src="@/assets/icons/ic_chaosong.png" class="avatar" alt="" /> </div> <div class="content"> <div class="line"> @@ -88,7 +88,7 @@ <div class="company"> {{ item.memberName }} <div style="display: inline" v-if="item.statusInfo!=null && item.statusInfo!=''"> - <span class="status-green">{{item.statusInfo ||''}}</span>锛� + 锛�<span class="status-green">{{item.statusInfo ||''}}</span>锛� </div> </div> </div> @@ -98,10 +98,10 @@ {{ item.checkInfo || '' }} </div> <div v-if="item.approveType == 1 " class="childList"> - <div style="display: inline" v-for="item1 in item.approveList" :key="item1.id"> + <div class="m_content company" v-for="item1 in item.approveList" :key="item1.id"> <img v-if="item1.faceImg!=null && item1.faceImg !=''" :src="item1.faceImg" class="avatar" alt="" /> <img v-if="item1.faceImg ==null ||item1.faceImg ==''" src="@/assets/avatar/man.png" class="avatar" alt="" /> - <span style="display: inline-block"> {{item1.memberName}}</span> + <span > {{item1.memberName}}</span> </div> </div> </div> @@ -110,8 +110,8 @@ </div> <!-- --> <template v-slot:footer> - <el-button @click="isShowProblem = true" type="primary" v-if="model.approveDateVO!=null&& model.approveDateVO.canBeApproved!=null &&model.approveDateVO.canBeApproved ==1 " class="status-red">鍚屾剰</el-button> - <el-button @click="isBackProblem=true" type="danger" v-if="model.approveDateVO!=null&& model.approveDateVO.canBeApproved!=null &&model.approveDateVO.canBeApproved ==1 " >鎷掔粷</el-button> + <el-button @click="agreeOpen" type="primary" v-if="model.approveDateVO!=null&& model.approveDateVO.canBeApproved!=null &&model.approveDateVO.canBeApproved ==1 " class="status-red">鍚屾剰</el-button> + <el-button @click="jectOpen" type="danger" v-if="model.approveDateVO!=null&& model.approveDateVO.canBeApproved!=null &&model.approveDateVO.canBeApproved ==1 " >鎷掔粷</el-button> <el-button @click="visible=false">杩斿洖</el-button> </template> <el-dialog @@ -122,9 +122,10 @@ :visible.sync="isShowProblem" width="480px" > - <el-form :model="dealForm" ref="dealForm" > - <el-form-item label="娲捐溅鍙告満" prop="driverId" required v-if="model.approveDateVO!=null && model.approveDateVO.drvierParam ===1"> - <el-select v-model="transForm.driverId" style="width: 300px" filterable clearable placeholder="璇烽�夋嫨娲鹃仯鍙告満"> + <el-form :model="dealForm" :rules="rules" ref="dealForm" > + <!-- <el-form-item label="娲捐溅鍙告満" prop="driverId" required v-if="model.approveDateVO!=null && model.approveDateVO.driverParam === 1"> --> + <el-form-item label="娲捐溅鍙告満" prop="driverId" v-if="model.approveDateVO!=null && model.approveDateVO.driverParam == 1"> + <el-select v-model="dealForm.driverId" style="width: 300px" filterable clearable placeholder="璇烽�夋嫨娲鹃仯鍙告満"> <el-option v-for="item in memberList" :key="item.id" @@ -138,7 +139,7 @@ type="textarea" placeholder="璇峰~鍐欒鏄�" :rows="4" - v-model="backForm.checkInfo" + v-model="dealForm.checkInfo" /> </el-form-item> </el-form> @@ -177,6 +178,7 @@ import BaseOpera from '@/components/base/BaseOpera' import GlobalWindow from '@/components/common/GlobalWindow' import { driveList } from '@/api/business/member' +import { approveDo } from '@/api/business/approve' import { mapState } from 'vuex' export default { name: 'OperaCarUseBookWindow', @@ -198,6 +200,9 @@ }, backForm: { checkInfo: null + }, + rules: { + driverId: [{ required: true, message: '璇烽�夋嫨娲鹃仯鍙告満', trigger: 'blur' }] } } }, @@ -216,13 +221,14 @@ if (!valid) { return } - this.$dialog.actionConfirm('鎿嶄綔纭', '鎮ㄧ‘璁ゆ彁浜よ闅愭偅澶勭悊鎯呭喌鍚楋紵') + this.$dialog.actionConfirm('鎿嶄綔纭', '鎮ㄧ‘璁ゅ悓鎰忚鐢宠鍚楋紵') .then(() => { this.dealing = true - this.api.dealHiddenDanger({ - id: this.dataId, - status: 1, - driverId: this.dealForm.driveId, + approveDo({ + objId: this.dataId, + objType: this.model.type == 1 ? 4 : 3, + status: 2, + driverId: this.dealForm.driverId, checkInfo: this.dealForm.checkInfo }) .then(res => { @@ -236,29 +242,36 @@ }) }) }, + agreeOpen () { + this.isShowProblem = true + this.$set(this.dealForm, 'checkInfo', '') + this.loadMemberList() + }, + jectOpen () { + this.isBackProblem = true + this.backForm = { + checkInfo: null + } + }, backDo () { this.$refs.backForm.validate((valid) => { if (!valid) { return } - this.$dialog.actionConfirm('鎿嶄綔纭', '鎮ㄧ‘璁ら��鍥炶闅愭偅澶勭悊鎯呭喌鍚楋紵') - .then(() => { - this.dealing = true - this.api.dealHiddenDanger({ - id: this.dataId, - status: 2, - checkInfo: this.backForm.checkInfo - }) - .then(res => { - this.$tip.apiSuccess('閫�鍥炴垚鍔�') - this.getDetail() - this.isBackProblem = false - }) - .catch(e => { - }) - .finally(() => { - this.dealing = false - }) + approveDo({ + objId: this.dataId, + objType: this.model.type == 1 ? 4 : 3, + status: 3, + checkInfo: this.backForm.checkInfo + }).then(res => { + this.$tip.apiSuccess('閫�鍥炴垚鍔�') + this.getDetail() + this.isBackProblem = false + }) + .catch(e => { + }) + .finally(() => { + this.dealing = false }) }) }, @@ -286,10 +299,6 @@ this.dealForm.driveId = res.driveId }) }, - handleTransfer () { - this.isShowTransfer = true - this.loadMemberList() - }, loadMemberList () { driveList({}).then(res => { this.memberList = res @@ -300,14 +309,6 @@ </script> <style lang="scss" scoped> -.side_title{ - font-weight: 600; - font-size: 18px; - color: #111111; - margin-bottom: 20px; - margin-left: 20px; - margin-top: 20px; -} .upload_box { width: 84px; height: 84px; @@ -326,7 +327,14 @@ font-size: 12px; } } - +.side_title{ + font-weight: 600; + font-size: 18px; + color: #111111; + margin-bottom: 20px; + margin-left: 20px; + margin-top: 20px; +} .modal_wrap { display: flex; height: 100%; @@ -363,6 +371,7 @@ } .value { + flex: 1; color: #111111; } } @@ -440,8 +449,34 @@ position: absolute; border-left: 2px dashed #cccccc; left: 31px; - height: calc(100% - 24px); - top: 34px; + height: calc(100% - 36px); + top: 49px; + } + .avatar { + width: 40px; + height: 40px; + border-radius: 50%; + margin: 0 12px 0 16px; + //border: 1px solid; + } + .childList{ + display: flex; + flex-wrap: wrap; + margin-left: 100px; + } + .company { + font-size: 13px; + color: #888888; + .status { + color: #00ba67; + } + } + .m_content{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin-bottom: 4px; } .info { display: flex; @@ -475,13 +510,6 @@ color:gray; font-size: 24px; } - .avatar { - width: 40px; - height: 40px; - border-radius: 50%; - margin: 0 12px 0 16px; - //border: 1px solid; - } .content { flex: 1; .line { @@ -497,13 +525,6 @@ .time { color: #888888; } - .company { - font-size: 13px; - color: #888888; - .status { - color: #00ba67; - } - } } } } @@ -512,11 +533,9 @@ border-radius: 4px; padding: 13px 15px; color: #666666; - margin-left: 120px; + margin-left: 100px; } - .childList { - margin-left: 120px; - } + } } } -- Gitblit v1.9.3