askbot-dragon 1.7.99-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.7.99-beta",
3
+ "version": "1.8.10-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"
@@ -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,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,7 +11,12 @@
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>
@@ -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;
@@ -98,6 +108,7 @@ export default {
98
108
  .buttonText{
99
109
  padding: 0 4px;
100
110
  cursor: pointer;
111
+ color: #366aff;
101
112
  }
102
113
  }
103
114
  }
@@ -111,7 +122,7 @@ export default {
111
122
  }
112
123
  .disabledButton{
113
124
  .buttonText{
114
- color: #A9B3C6;
125
+ color: #A9B3C6!important;
115
126
  }
116
127
  }
117
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>