vue2-client 1.9.169 → 1.9.171

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": "vue2-client",
3
- "version": "1.9.169",
3
+ "version": "1.9.171",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -16,6 +16,11 @@ const props = defineProps({
16
16
  type: String,
17
17
  required: false,
18
18
  default: undefined
19
+ },
20
+ prompt: {
21
+ type: String,
22
+ required: false,
23
+ default: undefined
19
24
  }
20
25
  })
21
26
 
@@ -122,7 +127,7 @@ const onMouseDown = (e) => {
122
127
  </a-select>
123
128
  </div>
124
129
  </template>
125
- <XConversation ref="xConversationRef"/>
130
+ <XConversation ref="xConversationRef" :prompt="prompt"/>
126
131
  </a-modal>
127
132
  </div>
128
133
  </template>
@@ -962,6 +962,9 @@ export default {
962
962
  this.form[item.model] = JSON.parse(modifyModelData.data[item.model])
963
963
  }
964
964
  } catch (e) {
965
+ if (modifyModelData.data[item.model]) {
966
+ this.form[item.model] = modifyModelData.data[item.model]
967
+ }
965
968
  }
966
969
  }
967
970
  // 追加版本号信息
@@ -6,9 +6,17 @@ export default {
6
6
  name: 'Demo',
7
7
  components: { XAddNativeForm },
8
8
  mounted () {
9
- getConfigByNameAsync('caseHistoryForm', 'af-his').then(res => {
9
+ getConfigByNameAsync('routineButtonCRUD', 'af-his').then(res => {
10
10
  console.log('===res', res)
11
- this.$refs.xAddFrom.init(res)
11
+ this.$refs.xAddFrom.init(Object.assign(res, {
12
+ modifyModelData: {
13
+ data: {
14
+ selected_f_project_details: {
15
+ f_oxygen_method: '1'
16
+ }
17
+ }
18
+ }
19
+ }))
12
20
  })
13
21
  },
14
22
  methods: {
@@ -23,7 +23,7 @@
23
23
  placeholder="Type your message..."
24
24
  @pressEnter="sendMessage"
25
25
  />
26
- <a-button type="primary" @click="sendMessage">Send</a-button>
26
+ <a-button type="primary" @click="sendMessage">发送</a-button>
27
27
  </div>
28
28
  </div>
29
29
  <a-spin :spinning="!loading"/>
@@ -69,6 +69,12 @@ export default {
69
69
  }
70
70
  },
71
71
  name: 'XConversation',
72
+ props: {
73
+ prompt: {
74
+ type: String,
75
+ default: undefined
76
+ }
77
+ },
72
78
  data () {
73
79
  return {
74
80
  serviceName: undefined,
@@ -136,7 +142,8 @@ export default {
136
142
  this.messages[this.messages.length - 1].text = await postByServiceName(this.renderConfig.api, {
137
143
  userMessage,
138
144
  model: this.renderConfig.aiModel,
139
- chatId: this.renderConfig.chatId || moment().format('YYYYMMDDHHmmss')
145
+ chatId: this.renderConfig.chatId || moment().format('YYYYMMDDHHmmss'),
146
+ prompt: this.prompt
140
147
  }, this.serviceName)
141
148
  this.$forceUpdate()
142
149
  } else if (this.renderConfig.streamApi) {
@@ -147,7 +154,8 @@ export default {
147
154
  {
148
155
  userMessage,
149
156
  model: this.renderConfig.aiModel,
150
- chatId: this.renderConfig.chatId || moment().format('YYYYMMDDHHmmss')
157
+ chatId: this.renderConfig.chatId || moment().format('YYYYMMDDHHmmss'),
158
+ prompt: this.prompt
151
159
  }, {},
152
160
  (data) => {
153
161
  this.messages[this.messages.length - 1].text = `${this.messages[this.messages.length - 1]?.text || ''}${data}`
@@ -220,10 +228,10 @@ export default {
220
228
  padding: 8px;
221
229
  background: #fff;
222
230
  border-top: 1px solid #d9d9d9;
231
+ gap: 10px;
223
232
  }
224
233
 
225
234
  .chat-input a-input {
226
235
  flex: 1;
227
- margin-right: 8px;
228
236
  }
229
237
  </style>
@@ -83,7 +83,7 @@ routerResource.example = {
83
83
  {
84
84
  path: 'default',
85
85
  name: '示例页面',
86
- // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
86
+ component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
87
87
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
88
88
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
89
89
  // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
@@ -96,7 +96,7 @@ routerResource.example = {
96
96
  // component: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue'),
97
97
  // component: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
98
98
  // component: () => import('@vue2-client/base-client/components/common/XPrint/Demo.vue'),
99
- component: () => import('@vue2-client/base-client/components/AI/demo.vue'),
99
+ // component: () => import('@vue2-client/base-client/components/AI/demo.vue'),
100
100
  meta: {
101
101
  // 菜单中不显示
102
102
  invisible: true,