页面代码优化,代办事项列表和代办审核
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="wrap" >
|
||||
<ul id="dataList" class="dataList">
|
||||
<li class="item" v-for="(item,i) in 4" :key="i">
|
||||
<li class="item" v-for="(item,i) in todolist" :key="i">
|
||||
<div class="left">
|
||||
<div class="repairName"><span class="name">维修申请</span><span class="carCode">苏AB6768</span></div>
|
||||
<div class="addressName">苏州老张汽车修理厂</div>
|
||||
<div class="time">2023-05-12 12:30:30 张三</div>
|
||||
<div class="repairName"><span class="name">{{ item.toDoType.label }}</span><span class="carCode">{{item.plateNumber ? item.plateNumber : "无"}}</span></div>
|
||||
<div class="addressName">{{ item.address }}</div>
|
||||
<div class="time">{{item.toDoTime}} {{item.userName}}</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<button class="nopass" @click="noPass">不通过</button>
|
||||
<button class="pass" @click="pass">通过</button>
|
||||
<button class="nopass" @click="noPass(item)">不通过</button>
|
||||
<button class="pass" @click="passThrough(item)">通过</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -17,27 +17,38 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getToDoList} from "@/api/order"
|
||||
import {getToDoList,toDoAudit} from "@/api/order"
|
||||
export default {
|
||||
name: "toDoList",
|
||||
data(){
|
||||
return{
|
||||
|
||||
todolist:[],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
async getList(){
|
||||
let result=await getToDoList()
|
||||
console.log("result",result)
|
||||
let result=await getToDoList();
|
||||
if(result.code === 200){
|
||||
this.todolist=result.data;
|
||||
console.log("this.todolist",this.todolist)
|
||||
}
|
||||
},
|
||||
noPass(){
|
||||
console.log("不通过")
|
||||
async noPass(item){
|
||||
let result=await toDoAudit({
|
||||
toDoId:item.toDoId,
|
||||
toDoType:item.toDoType.code
|
||||
})
|
||||
console.log("不通过",item,result)
|
||||
},
|
||||
pass(){
|
||||
console.log("通过")
|
||||
async passThrough(item){
|
||||
let result=await toDoAudit({
|
||||
toDoId:item.toDoId,
|
||||
toDoType:item.toDoType.code
|
||||
})
|
||||
console.log("通过",item,result)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -45,9 +56,9 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
.wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@include wh(100%,100%);
|
||||
box-sizing: border-box;
|
||||
padding: 13px 13px 0 13px;
|
||||
background-color: #F4F5F7;
|
||||
@ -59,8 +70,7 @@ export default {
|
||||
|
||||
.item {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@include flexColBet;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
@ -106,10 +116,8 @@ button {
|
||||
}
|
||||
|
||||
.pass {
|
||||
border: none;
|
||||
border: 1px solid #2A5094 !important;
|
||||
background: #2A5094;
|
||||
color: white;
|
||||
@include bgFontColor(white,#2A5094);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user