technicianDialog.vue
3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!-- 修改备注 -->
<template>
<d2-dialog title="查看技师施工图" :is-visible="remarkVisible" class="accountDailog" @closeDialog="handleClose"
@confirmDialog="handleAddConfirm" :noCancel="true" btnOkLabel="返回">
<el-form ref="refundForm" :model="infoForm" :rules="formRules" label-width="150px">
<el-form-item label="技师姓名:">
{{ infoForm.technicianName }}
</el-form-item>
<el-form-item label="子商品名称:">
{{ infoForm.upgradeGoodsName }}
</el-form-item>
<el-form-item label="审核状态:">
<span class="status">{{ infoForm.approveStatus == null ? '未审核' : infoForm.approveStatus == "Y" ? '通过' :
'未通过' }}</span>
</el-form-item>
<el-form-item label="" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" @click="
handleEnlargeImg(infoForm.constructionImgList, 'customerPhoto', index)
" :key="index" :src="item" alt="">
</el-form-item>
</el-form>
<el-image-viewer v-if="imgVisible" :mask-closable="true" zIndex="3000" :on-close="closeImgViewer"
:url-list="imgList" :initial-index="initialIndex" />
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'technicianDialog',
components: {
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
// remark: ''
},
imgVisible: false,
index: 0,
initialIndex: 0,
imgList: [],
imgUrlName: "",
formRules: {
remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }]
}
}
},
props: {
remarkVisible: {
type: Boolean,
default: false
},
detail: {
type: Object,
default: null
}
},
watch: {
},
created() {
},
mounted() {
this.infoForm = deepClone(this.detail)
},
methods: {
closeImgViewer() {
this.imgVisible = false
},
handleEnlargeImg(url, name, index) {
this.imgVisible = !this.imgVisible
// this.imgList = url
console.log("url", url)
this.initialIndex = index
this.imgList = url
this.imgUrlName = name
},
handleAddConfirm() {
this.handleClose(true)
},
handleClose(flag) {
this.$emit('dialogClose', flag)
}
}
}
</script>
<style scoped lang="scss">
.accountDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
::v-deep .el-textarea .el-input__count {
right: 10px;
bottom: -7px;
font-size: 12px;
color: #999999;
background-color: transparent;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
.imgItem {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
padding: 0 10px;
::v-deep .el-form-item__content {
margin-left: 0 !important;
}
}
.img {
width: 120px;
height: 120px;
margin-left: 10px;
}
// .img {}
.status {
color: #2A58AD;
}
</style>