askbot-dragon 1.7.98-beta → 1.8.10-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
:class="disabled || isDisabled ? 'disabledItem' : ''"
|
|
11
11
|
>
|
|
12
12
|
<el-image
|
|
13
|
-
style="width:
|
|
13
|
+
style="width: 120px!important; height: 120px!important;"
|
|
14
14
|
:src="item.url"
|
|
15
|
+
:preview-src-list="previewList(msg.content.options)"
|
|
15
16
|
fit="cover">
|
|
16
17
|
</el-image>
|
|
17
18
|
<div class="checkIcon"
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
</div>
|
|
24
25
|
</div>
|
|
25
26
|
</div>
|
|
26
|
-
<div class="answerButton" :class="disabled || isDisabled ? 'disabledButton' : ''">
|
|
27
|
+
<div class="answerButton" :class="disabled || isDisabled || !checkImage ? 'disabledButton' : ''">
|
|
27
28
|
<div class="buttonText"
|
|
28
29
|
v-for="(item,index) in msg.content.handleSettings"
|
|
29
30
|
:key="index"
|
|
@@ -63,6 +64,11 @@ export default {
|
|
|
63
64
|
},
|
|
64
65
|
},
|
|
65
66
|
methods:{
|
|
67
|
+
previewList(options){
|
|
68
|
+
let arr = [];
|
|
69
|
+
arr = options.map(item => item.url)
|
|
70
|
+
return arr
|
|
71
|
+
},
|
|
66
72
|
selectImage(item){
|
|
67
73
|
if (this.disabled || this.isDisabled){
|
|
68
74
|
return
|
|
@@ -70,7 +76,7 @@ export default {
|
|
|
70
76
|
this.checkImage = item;
|
|
71
77
|
},
|
|
72
78
|
imageSelectionConfirm(item){
|
|
73
|
-
if (this.disabled || this.isDisabled){
|
|
79
|
+
if (this.disabled || this.isDisabled || !this.checkImage){
|
|
74
80
|
return
|
|
75
81
|
}
|
|
76
82
|
this.isDisabled = true;
|
|
@@ -135,6 +141,7 @@ export default {
|
|
|
135
141
|
.buttonText{
|
|
136
142
|
padding: 0 4px;
|
|
137
143
|
cursor: pointer;
|
|
144
|
+
color: #366aff;
|
|
138
145
|
}
|
|
139
146
|
}
|
|
140
147
|
.disabledItem{
|
|
@@ -144,9 +151,8 @@ export default {
|
|
|
144
151
|
}
|
|
145
152
|
}
|
|
146
153
|
.disabledButton{
|
|
147
|
-
|
|
148
154
|
.buttonText{
|
|
149
|
-
color: #A9B3C6;
|
|
155
|
+
color: #A9B3C6!important;
|
|
150
156
|
}
|
|
151
157
|
}
|
|
152
158
|
</style>
|
|
@@ -11,12 +11,17 @@
|
|
|
11
11
|
:key="item._metadata.id"
|
|
12
12
|
:disabled="disabled || isDisabled"
|
|
13
13
|
>
|
|
14
|
-
<el-
|
|
14
|
+
<el-image
|
|
15
|
+
style="width: 32px; height: 32px;margin-right: 4px;flex: none"
|
|
16
|
+
:src="item.url"
|
|
17
|
+
v-if="item.url"
|
|
18
|
+
:preview-src-list="previewList(msg.content.options)"
|
|
19
|
+
fit="cover" v-if="item.url"></el-image>
|
|
15
20
|
{{ item.text }}
|
|
16
21
|
</el-checkbox>
|
|
17
22
|
</el-checkbox-group>
|
|
18
23
|
</div>
|
|
19
|
-
<div class="answerButton" :class="disabled || isDisabled ? 'disabledButton' : ''">
|
|
24
|
+
<div class="answerButton" :class="disabled || isDisabled || checkList.length === 0 ? 'disabledButton' : ''">
|
|
20
25
|
<div class="buttonText"
|
|
21
26
|
v-for="(item,index) in msg.content.handleSettings"
|
|
22
27
|
:key="index"
|
|
@@ -50,8 +55,13 @@ export default {
|
|
|
50
55
|
},
|
|
51
56
|
},
|
|
52
57
|
methods:{
|
|
58
|
+
previewList(options){
|
|
59
|
+
let arr = [];
|
|
60
|
+
arr = options.map(item => item.url)
|
|
61
|
+
return arr
|
|
62
|
+
},
|
|
53
63
|
multipleChoiceConfirm(item){
|
|
54
|
-
if (this.disabled || this.isDisabled){
|
|
64
|
+
if (this.disabled || this.isDisabled || this.checkList.length === 0){
|
|
55
65
|
return
|
|
56
66
|
}
|
|
57
67
|
this.isDisabled = true;
|
|
@@ -69,13 +79,12 @@ export default {
|
|
|
69
79
|
.multipleList{
|
|
70
80
|
display: flex;
|
|
71
81
|
justify-items: flex-start;
|
|
72
|
-
border-bottom: 1px solid #EEEEEE;
|
|
73
82
|
padding: 8px 0;
|
|
74
83
|
background-color: #ffffff;
|
|
75
84
|
/deep/.el-checkbox-group{
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
flex-direction: column;
|
|
85
|
+
//display: flex;
|
|
86
|
+
//align-items: center;
|
|
87
|
+
//flex-direction: column;
|
|
79
88
|
.el-checkbox{
|
|
80
89
|
margin-right: 0!important;
|
|
81
90
|
margin-bottom: 10px;
|
|
@@ -99,6 +108,7 @@ export default {
|
|
|
99
108
|
.buttonText{
|
|
100
109
|
padding: 0 4px;
|
|
101
110
|
cursor: pointer;
|
|
111
|
+
color: #366aff;
|
|
102
112
|
}
|
|
103
113
|
}
|
|
104
114
|
}
|
|
@@ -112,7 +122,7 @@ export default {
|
|
|
112
122
|
}
|
|
113
123
|
.disabledButton{
|
|
114
124
|
.buttonText{
|
|
115
|
-
color: #A9B3C6;
|
|
125
|
+
color: #A9B3C6!important;
|
|
116
126
|
}
|
|
117
127
|
}
|
|
118
128
|
</style>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="outputComponents">
|
|
3
|
+
<div class="outputText" v-if="msg.content.prompt">
|
|
4
|
+
{{ msg.content.prompt }}
|
|
5
|
+
</div>
|
|
6
|
+
<el-table
|
|
7
|
+
:data="tableData"
|
|
8
|
+
style="width: 100%"
|
|
9
|
+
height="250"
|
|
10
|
+
@selection-change="handleSelectionChange"
|
|
11
|
+
v-if="msg.content.tableTemplate &&
|
|
12
|
+
(msg.content.tableTemplate == 1 || msg.content.tableTemplate == 2 || msg.content.tableTemplate == 3)"
|
|
13
|
+
:header-cell-style="{ backgroundColor: '#F6F8FD', height: '40px', color: '#000000', fontWeight: 400 }"
|
|
14
|
+
:row-style="{ height: '40px', color: '#000000' }"
|
|
15
|
+
>
|
|
16
|
+
<el-table-column
|
|
17
|
+
type="selection"
|
|
18
|
+
v-if="msg.content.tableTemplate == 2 || msg.content.tableTemplate == 3"
|
|
19
|
+
align="center"
|
|
20
|
+
:selectable="checkSelectable"
|
|
21
|
+
width="55">
|
|
22
|
+
</el-table-column>
|
|
23
|
+
<el-table-column
|
|
24
|
+
fixed
|
|
25
|
+
prop="name"
|
|
26
|
+
label="产品名称"
|
|
27
|
+
width="150">
|
|
28
|
+
</el-table-column>
|
|
29
|
+
<el-table-column
|
|
30
|
+
prop="number"
|
|
31
|
+
label="产品编号"
|
|
32
|
+
align="center"
|
|
33
|
+
width="120"
|
|
34
|
+
>
|
|
35
|
+
</el-table-column>
|
|
36
|
+
<el-table-column
|
|
37
|
+
prop="inventory"
|
|
38
|
+
label="产品库存"
|
|
39
|
+
align="center"
|
|
40
|
+
width="80">
|
|
41
|
+
</el-table-column>
|
|
42
|
+
<el-table-column
|
|
43
|
+
prop="consumption"
|
|
44
|
+
label="今日平均消耗量"
|
|
45
|
+
align="center"
|
|
46
|
+
width="120">
|
|
47
|
+
</el-table-column>
|
|
48
|
+
</el-table>
|
|
49
|
+
<div class="handleButton" :class="disabled || isDisabled || selection.length === 0 ? 'disabledButton' : ''">
|
|
50
|
+
<div class="buttonText"
|
|
51
|
+
v-for="(item,index) in msg.content.handleSettings"
|
|
52
|
+
:key="index"
|
|
53
|
+
@click="confirmFun(item)"
|
|
54
|
+
>
|
|
55
|
+
{{ item }}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
export default {
|
|
63
|
+
name: "outputCom",
|
|
64
|
+
data(){
|
|
65
|
+
return{
|
|
66
|
+
isDisabled:false,
|
|
67
|
+
selection:[],
|
|
68
|
+
tableData:[
|
|
69
|
+
{
|
|
70
|
+
name:"正新香辣大鸡排",
|
|
71
|
+
number:"ZX78OIJ867",
|
|
72
|
+
inventory:"88",
|
|
73
|
+
consumption:"24"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name:"正新香辣大鸡排",
|
|
77
|
+
number:"ZX78OIJ867",
|
|
78
|
+
inventory:"88",
|
|
79
|
+
consumption:"24"
|
|
80
|
+
},{
|
|
81
|
+
name:"正新香辣大鸡排",
|
|
82
|
+
number:"ZX78OIJ867",
|
|
83
|
+
inventory:"88",
|
|
84
|
+
consumption:"24"
|
|
85
|
+
}
|
|
86
|
+
,{
|
|
87
|
+
name:"正新香辣大鸡排",
|
|
88
|
+
number:"ZX78OIJ867",
|
|
89
|
+
inventory:"88",
|
|
90
|
+
consumption:"24"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
props:{
|
|
96
|
+
msg:{
|
|
97
|
+
type:Object,
|
|
98
|
+
default(){
|
|
99
|
+
return {}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
disabled:{
|
|
103
|
+
type:Boolean,
|
|
104
|
+
default:false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
methods:{
|
|
108
|
+
checkSelectable(){
|
|
109
|
+
return !this.disabled && !this.isDisabled
|
|
110
|
+
},
|
|
111
|
+
handleSelectionChange(val){
|
|
112
|
+
this.selection = val;
|
|
113
|
+
},
|
|
114
|
+
confirmFun(item){
|
|
115
|
+
if (this.disabled || this.isDisabled || this.selection.length == 0){
|
|
116
|
+
return
|
|
117
|
+
}
|
|
118
|
+
this.isDisabled = true;
|
|
119
|
+
this.$emit('confirmFun',item,this.selection,this.msg)
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
<style scoped lang="less">
|
|
126
|
+
.outputComponents{
|
|
127
|
+
.outputText{
|
|
128
|
+
padding-bottom: 10px;
|
|
129
|
+
}
|
|
130
|
+
.handleButton{
|
|
131
|
+
padding-top: 10px;
|
|
132
|
+
width: 100%;
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
border-top: 1px solid #EEEEEE;
|
|
137
|
+
.buttonText{
|
|
138
|
+
padding: 0 4px;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
color: #366aff;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
.disabledButton {
|
|
144
|
+
.buttonText {
|
|
145
|
+
color: #A9B3C6 !important;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
</style>
|