askbot-dragon 1.7.99-beta → 1.8.11-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.7.99-beta",
3
+ "version": "1.8.11-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -10,8 +10,9 @@
10
10
  :class="disabled || isDisabled ? 'disabledItem' : ''"
11
11
  >
12
12
  <el-image
13
- style="width: 60px!important; height: 60px!important;"
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 || !checkImage ? 'disabledButton' : ''">
27
+ <div class="answerButton" v-if="msg.content.handleSettings && msg.content.handleSettings.length > 0" :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
@@ -135,18 +141,21 @@ export default {
135
141
  .buttonText{
136
142
  padding: 0 4px;
137
143
  cursor: pointer;
144
+ color: #366aff;
138
145
  }
139
146
  }
140
147
  .disabledItem{
141
148
  .checkIcon{
142
149
  background-color: #edf2fc!important;
143
150
  }
151
+ .centerIcon{
152
+ background: #366aff!important;
153
+ }
144
154
  }
145
155
  }
146
156
  .disabledButton{
147
-
148
157
  .buttonText{
149
- color: #A9B3C6;
158
+ color: #A9B3C6!important;
150
159
  }
151
160
  }
152
161
  </style>
@@ -11,12 +11,17 @@
11
11
  :key="item._metadata.id"
12
12
  :disabled="disabled || isDisabled"
13
13
  >
14
- <el-avatar :size="16" :src="item.url" v-if="item.url" style="margin-right: 4px;flex: none" v-if="item.url"></el-avatar>
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 || checkList.length === 0 ? 'disabledButton' : ''">
24
+ <div class="answerButton" v-if="msg.content.handleSettings && msg.content.handleSettings.length > 0" :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,6 +55,11 @@ 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
64
  if (this.disabled || this.isDisabled || this.checkList.length === 0){
55
65
  return
@@ -72,9 +82,9 @@ export default {
72
82
  padding: 8px 0;
73
83
  background-color: #ffffff;
74
84
  /deep/.el-checkbox-group{
75
- display: flex;
76
- align-items: center;
77
- flex-direction: column;
85
+ //display: flex;
86
+ //align-items: center;
87
+ //flex-direction: column;
78
88
  .el-checkbox{
79
89
  margin-right: 0!important;
80
90
  margin-bottom: 10px;
@@ -84,6 +94,7 @@ export default {
84
94
  display: flex;
85
95
  align-items: center;
86
96
  color: #000000;
97
+ white-space: pre-line;
87
98
  }
88
99
  }
89
100
  }
@@ -98,6 +109,7 @@ export default {
98
109
  .buttonText{
99
110
  padding: 0 4px;
100
111
  cursor: pointer;
112
+ color: #366aff;
101
113
  }
102
114
  }
103
115
  }
@@ -111,7 +123,7 @@ export default {
111
123
  }
112
124
  .disabledButton{
113
125
  .buttonText{
114
- color: #A9B3C6;
126
+ color: #A9B3C6!important;
115
127
  }
116
128
  }
117
129
  </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" v-if="msg.content.handleSettings && msg.content.handleSettings.length > 0" :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>