djbdisposition.vue
2.72 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
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-19 16:04:58
-->
<template>
<div style="text-align: center" class="djbdisposition">
<el-transfer
style="text-align: left; display: inline-block"
v-model="value4"
filterable
:left-default-checked="[]"
:right-default-checked="[]"
:titles="['全选', '全选']"
:button-texts="['转到左边', '转到右边']"
:format="{
noChecked: '${total}',
hasChecked: '${checked}/${total}'
}"
@change="handleChange"
:data="data">
<span slot-scope="{ option }">{{ option.key }} - {{ option.label }}</span>
</el-transfer>
<div class="btn">
<el-button @click="$popupCacel">取消</el-button>
<el-button type="primary" @click="submitForm" plain>确定</el-button>
</div>
</div>
</template>
<script>
import { updateSysSqywmbsz, getSysSqywmbszDetailById } from '@/api/sysSqywmbsz'
export default {
props: {
formData: {
type: Object,
default: () => { }
}
},
mounted () {
console.log("this.formData",this.formData);
// if (this.formData.bsmMb) {
// this.$startLoading()
// getSysSqywmbszDetailById(this.formData.bsmMb).then(res => {
// this.$endLoading()
// let { result } = res
// this.ruleForm = result ? result : {}
// })
// }
},
data() {
const generateData = _ => {
const data = [];
for (let i = 1; i <= 43; i++) {
data.push({
key: i,
label: `备选项 ${ i }`,
disabled: i % 4 === 0
});
}
return data;
};
return {
data: generateData(),
value4: [],
};
},
methods: {
handleChange(value, direction, movedKeys) {
console.log("shijian ",this.data.value, direction, movedKeys);
},
/**
* @description: submitForm
* @author: renchao
*/
submitForm () {
let that = this
updateSysSqywmbsz(this.ruleForm).then(res => {
if (res.code === 200) {
this.$popupCacel()
that.$message({
message: '修改成功',
type: 'success'
})
}
})
}
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBoxheader.scss";
.djbdisposition{
width: 100%;
height: 700px;
.btn{
margin-top: 20px;
// background-color: salmon;
}
/deep/.el-transfer{
.el-transfer-panel{
width: 400px;
height: 640px;
.el-transfer-panel__body .is-with-footer{
height: 700px;
}
.el-transfer-panel__list.is-filterable{
height: 570px;
}
}
}
}
</style>