vue2-client 1.7.3 → 1.7.5

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.
Files changed (34) hide show
  1. package/package.json +1 -1
  2. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +2 -2
  3. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +4 -3
  4. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +4 -3
  5. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +2 -4
  6. package/src/base-client/components/common/Upload/Upload.vue +4 -9
  7. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +5 -13
  8. package/src/base-client/components/common/XAddNativeForm/index.md +1 -1
  9. package/src/base-client/components/common/XForm/XForm.vue +2 -2
  10. package/src/base-client/components/common/XForm/XFormItem.vue +3 -3
  11. package/src/base-client/components/common/XForm/index.md +2 -2
  12. package/src/base-client/components/common/XFormTable/XFormTable.vue +10 -18
  13. package/src/base-client/components/common/XTable/XTable.vue +2 -2
  14. package/src/base-client/components/common/XTable/index.md +2 -2
  15. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +1 -1
  16. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +1 -1
  17. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +1 -1
  18. package/src/config/default/setting.config.js +2 -0
  19. package/src/layouts/header/HeaderNotice.vue +1 -1
  20. package/src/layouts/header/InstitutionDetail.vue +2 -2
  21. package/src/pages/CreateQueryPage.vue +78 -11
  22. package/src/pages/report/ReportTableHome.vue +1 -1
  23. package/src/pages/resourceManage/orgListManage.vue +2 -2
  24. package/src/pages/system/file/index.vue +3 -3
  25. package/src/services/api/DictionaryDetailsViewApi.js +1 -1
  26. package/src/services/api/LogDetailsViewApi.js +3 -3
  27. package/src/services/api/QueryParamsDetailsViewApi.js +1 -1
  28. package/src/services/api/TicketDetailsViewApi.js +15 -15
  29. package/src/services/api/common.js +76 -20
  30. package/src/services/api/commonTempTable.js +3 -3
  31. package/src/services/api/index.js +2 -2
  32. package/src/services/api/logininfor/index.js +1 -1
  33. package/src/services/api/manage.js +2 -2
  34. package/vue.config.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
@@ -52,10 +52,10 @@
52
52
  </template>
53
53
  <script>
54
54
 
55
- import { post } from '@vue2-client/services/api'
56
55
  import { GetGDMap } from '@vue2-client/utils/map-utils'
57
56
  import { debounce } from 'ant-design-vue/lib/vc-table/src/utils'
58
57
  import { mapState } from 'vuex'
58
+ import { runLogic } from '@vue2-client/services/api/common'
59
59
 
60
60
  export default {
61
61
  name: 'AddressSearchCombobox',
@@ -196,7 +196,7 @@ export default {
196
196
  if (value !== '') {
197
197
  const logicName = this.attr.keyName
198
198
  const logic = logicName.substring(6)
199
- post('/api/system/logic/' + logic, value).then(res => {
199
+ runLogic(logic, value, 'af-system').then(res => {
200
200
  callback(res)
201
201
  })
202
202
  }
@@ -348,8 +348,9 @@ import {
348
348
  addOrEditType,
349
349
  selectDataType
350
350
  } from '@vue2-client/config/CreateQueryConfig'
351
- import { commonApi, post } from '@vue2-client/services/api'
351
+ import { post } from '@vue2-client/services/api'
352
352
  import JsonViewer from 'vue-json-viewer'
353
+ import { getDictionaryParam } from '@vue2-client/services/api/common'
353
354
 
354
355
  const DemoJson = [{
355
356
  value: 'zhejiang',
@@ -522,7 +523,7 @@ export default {
522
523
  flashModal (show = 'None') {
523
524
  const bool = show === 'None' ? !this.visible : !!show
524
525
  if (bool && this.option.length === 0) {
525
- post(commonApi.getDictionaryParam, {}).then(res => {
526
+ getDictionaryParam().then(res => {
526
527
  this.option = res
527
528
  })
528
529
  }
@@ -632,7 +633,7 @@ export default {
632
633
  // 获取所有仓库
633
634
  getStocks () {
634
635
  if (this.stockList.length === 0) {
635
- post('/api/system/logic/getFilesStock', {}).then(res => {
636
+ post('/api/af-system/logic/getFilesStock', {}).then(res => {
636
637
  this.stockList = res.sort((a, b) => b.progress - a.progress)
637
638
  }).catch(e => {})
638
639
  }
@@ -249,8 +249,9 @@ import {
249
249
  addOrEditType,
250
250
  selectDataType
251
251
  } from '@vue2-client/config/CreateQueryConfig'
252
- import { commonApi, post } from '@vue2-client/services/api'
252
+ import { post } from '@vue2-client/services/api'
253
253
  import JsonViewer from 'vue-json-viewer'
254
+ import { getDictionaryParam } from '@vue2-client/services/api/common'
254
255
 
255
256
  const DemoJson = [{
256
257
  value: 'zhejiang',
@@ -366,7 +367,7 @@ export default {
366
367
  flashModal (show = 'None') {
367
368
  const bool = show === 'None' ? !this.visible : !!show
368
369
  if (bool && this.option.length === 0) {
369
- post(commonApi.getDictionaryParam, {}).then(res => {
370
+ getDictionaryParam().then(res => {
370
371
  this.option = res
371
372
  })
372
373
  }
@@ -449,7 +450,7 @@ export default {
449
450
  // 获取所有仓库
450
451
  getStocks () {
451
452
  if (this.stockList.length === 0) {
452
- post('/api/system/logic/getFilesStock', {}).then(res => {
453
+ post('/api/af-system/logic/getFilesStock', {}).then(res => {
453
454
  this.stockList = res.sort((a, b) => b.progress - a.progress)
454
455
  }).catch(e => {})
455
456
  }
@@ -29,8 +29,7 @@
29
29
  <script>
30
30
  import { mapState } from 'vuex'
31
31
  import XAddForm from '@vue2-client/base-client/components/common/XAddForm/XAddForm'
32
- import { post } from '@vue2-client/services/api'
33
- import { getConfigUrl } from '@vue2-client/services/api/common'
32
+ import { parseConfig } from '@vue2-client/services/api/common'
34
33
 
35
34
  export default {
36
35
  name: 'FormGroupEdit',
@@ -85,8 +84,7 @@ export default {
85
84
  })
86
85
  },
87
86
  toEdit (item) {
88
- const url = getConfigUrl(this.serviceName)
89
- post(url, { queryObject: item }).then(res => {
87
+ parseConfig(item, 'SIMPLE_FORM', this.serviceName).then(res => {
90
88
  this.formObj = res
91
89
  const modifyModelData = { data: this.modifyModelData[res.groupName] }
92
90
  this.$refs.xAddForm.init({
@@ -35,9 +35,8 @@
35
35
 
36
36
  <script>
37
37
 
38
- import { post } from '@vue2-client/services/api'
39
38
  import { mapState } from 'vuex'
40
- import { upload } from '@vue2-client/services/api/common'
39
+ import { fileDelete, upload } from '@vue2-client/services/api/common'
41
40
 
42
41
  export default {
43
42
  name: 'uploads',
@@ -68,7 +67,7 @@ export default {
68
67
  },
69
68
  serviceName: {
70
69
  type: String,
71
- default: 'system'
70
+ default: undefined
72
71
  }
73
72
  },
74
73
  computed: {
@@ -117,10 +116,6 @@ export default {
117
116
  formData.append('filesize', (info.file.size / 1024 / 1024).toFixed(4))
118
117
  formData.append('f_operator', this.currUser ? this.currUser.username : '')
119
118
 
120
- // const url = '/api/system/resource'
121
- // if (process.env.NODE_ENV === 'production') {
122
- // url = `/${this.model.stockAlias}/system/resource`
123
- // }
124
119
  upload(formData, this.serviceName, { headers, timeout: 600 * 1000 }).then(res => {
125
120
  // 根据服务端返回的结果判断成功与否,设置文件条目的状态
126
121
  if (res.success) {
@@ -150,8 +145,8 @@ export default {
150
145
  // 删除文件
151
146
  deleteFileItem (file) {
152
147
  if (file.id) {
153
- post('/api/' + this.serviceName + '/entity/t_files', { id: file.id, f_state: '删除' }).then(res => {
154
- }).catch(e => { })
148
+ fileDelete({ id: file.id, f_state: '删除' })
149
+ .then(res => {}).catch(e => { })
155
150
  }
156
151
  // 找到当前文件所在列表的索引
157
152
  const index = this.uploadedFileList.indexOf(file)
@@ -41,7 +41,7 @@
41
41
  import XFormItem from '@vue2-client/base-client/components/common/XForm/XFormItem'
42
42
  import { formatDate } from '@vue2-client/utils/util'
43
43
  import { mapState } from 'vuex'
44
- import { post } from '@vue2-client/services/api'
44
+ import { runLogic } from '@vue2-client/services/api/common'
45
45
 
46
46
  export default {
47
47
  name: 'XAddNativeForm',
@@ -69,7 +69,7 @@ export default {
69
69
  // 表单项集合
70
70
  formItems: [],
71
71
  // 服务名称
72
- serviceName: 'system',
72
+ serviceName: undefined,
73
73
  // 修改有文件的表单时使用
74
74
  files: [],
75
75
  images: [],
@@ -110,7 +110,7 @@ export default {
110
110
  methods: {
111
111
  init (params) {
112
112
  const {
113
- formItems, viewMode, isHandleFormKey = true, serviceName = 'system', isTableTemp = false, modifyModelData = {}, businessType, title, fixedAddForm = {}, getDataParams = {}, simpleFormJsonData = {}
113
+ formItems, viewMode, isHandleFormKey = true, serviceName, isTableTemp = false, modifyModelData = {}, businessType, title, fixedAddForm = {}, getDataParams = {}, simpleFormJsonData = {}
114
114
  } = params
115
115
  this.loaded = false
116
116
  if (typeof formItems === 'string') {
@@ -262,7 +262,8 @@ export default {
262
262
  }
263
263
  // 通过请求追加静默新增:自定义字段
264
264
  for (const item of this.silenceAddJsonData.filter((item) => item.silencePurpose === 'customize')) {
265
- requestForm[item.model] = await this.getSilenceSource(item.silenceSource, requestForm)
265
+ // 获取通过logic静默新增的字段
266
+ requestForm[item.model] = await runLogic(item.silenceSource, requestForm, this.serviceName)
266
267
  }
267
268
  }
268
269
  // 如果是临时表
@@ -301,15 +302,6 @@ export default {
301
302
  })
302
303
  })
303
304
  },
304
- /**
305
- * 获取通过logic静默新增的字段
306
- * @param logicName logic名称
307
- * @param requestParameters 请求参数
308
- */
309
- async getSilenceSource (logicName, requestParameters) {
310
- const result = await post('/api/' + this.serviceName + '/logic/' + logicName, requestParameters)
311
- return result
312
- },
313
305
  // 获取表单字段实际值
314
306
  getRealKey (key) {
315
307
  if (this.isHandleFormKey) {
@@ -70,7 +70,7 @@ export default {
70
70
  if (this.$refs.nativeForm) {
71
71
  this.$refs.nativeForm.init({
72
72
  formItems: res,
73
- serviceName: 'system',
73
+ serviceName: 'af-iot',
74
74
  businessType: '新增',
75
75
  title: '新增告警记录'
76
76
  })
@@ -62,7 +62,7 @@ export default {
62
62
  // 内容加载是否完成
63
63
  loaded: false,
64
64
  // 服务名称
65
- serviceName: 'system',
65
+ serviceName: undefined,
66
66
  // 是否展开条件
67
67
  advanced: false,
68
68
  // 表单Model
@@ -91,7 +91,7 @@ export default {
91
91
  methods: {
92
92
  init (params) {
93
93
  const {
94
- formItems, serviceName = 'system', getDataParams = {}
94
+ formItems, serviceName, getDataParams = {}
95
95
  } = params
96
96
  this.loaded = false
97
97
  this.formItems = JSON.parse(JSON.stringify(formItems))
@@ -304,7 +304,6 @@
304
304
  </template>
305
305
  <script>
306
306
 
307
- import { post } from '@vue2-client/services/api'
308
307
  import { debounce } from 'ant-design-vue/lib/vc-table/src/utils'
309
308
  import XFormCol from '@vue2-client/base-client/components/common/XFormCol'
310
309
  import XBadge from '@vue2-client/base-client/components/common/XBadge'
@@ -314,6 +313,7 @@ import AddressSearchCombobox from '@vue2-client/base-client/components/common/Ad
314
313
  import Upload from '@vue2-client/base-client/components/common/Upload'
315
314
  import moment from 'moment'
316
315
  import XTreeSelect from '@vue2-client/base-client/components/common/XForm/XTreeSelect'
316
+ import { runLogic } from '@vue2-client/services/api/common'
317
317
 
318
318
  export default {
319
319
  name: 'XFormItem',
@@ -378,7 +378,7 @@ export default {
378
378
  },
379
379
  serviceName: {
380
380
  type: String,
381
- default: 'system'
381
+ default: undefined
382
382
  },
383
383
  // 调用logic获取数据源的追加参数
384
384
  getDataParams: {
@@ -498,7 +498,7 @@ export default {
498
498
  if (this.getDataParams && this.getDataParams[this.attr.model]) {
499
499
  Object.assign(value, this.getDataParams[this.attr.model])
500
500
  }
501
- post('/api/' + this.serviceName + '/logic/' + logic, value).then(res => {
501
+ runLogic(logic, value, this.serviceName).then(res => {
502
502
  callback(res)
503
503
  })
504
504
  }
@@ -165,8 +165,8 @@ export default {
165
165
  }
166
166
  },
167
167
  methods: {
168
- getColumnsJson () {
169
- Vue.resetpost(commonApi.getColumnsJson, {str: this.queryParamsName}).then((res) => {
168
+ getConfig () {
169
+ Vue.resetpost(commonApi.getConfig, {str: this.queryParamsName}).then((res) => {
170
170
  this.formItemJson = res.formJson
171
171
  this.columnItemJson = res.columnJson
172
172
  this.loaded = true
@@ -50,10 +50,8 @@ import XForm from '@vue2-client/base-client/components/common/XForm'
50
50
  import XAddForm from '@vue2-client/base-client/components/common/XAddForm'
51
51
  import XTable from '@vue2-client/base-client/components/common/XTable'
52
52
  import XImportExcel from '@vue2-client/base-client/components/common/XImportExcel'
53
- import { addOrModify, getConfigUrl, parseConfigUrl } from '@vue2-client/services/api/common'
54
- import { indexedDB } from '@vue2-client/utils/indexedDB'
53
+ import { addOrModify, getConfig, getConfigByLogic, parseConfig } from '@vue2-client/services/api/common'
55
54
  import { mapState } from 'vuex'
56
- import { post } from '@vue2-client/services/api/restTools'
57
55
 
58
56
  export default {
59
57
  name: 'XFormTable',
@@ -159,45 +157,39 @@ export default {
159
157
  },
160
158
  queryParamsJson: {
161
159
  handler () {
162
- this.getColumnsJsonBySource()
160
+ this.getConfigBySource()
163
161
  },
164
162
  deep: true
165
163
  },
166
164
  queryParamsName: {
167
165
  handler () {
168
- this.getColumnsJson()
166
+ this.getConfig()
169
167
  }
170
168
  }
171
169
  },
172
170
  created () {
173
171
  if (this.queryParamsName) {
174
- this.getColumnsJson()
172
+ this.getConfig()
175
173
  } else if (this.queryParamsJson) {
176
- this.getColumnsJsonBySource()
174
+ this.getConfigBySource()
177
175
  }
178
176
  },
179
177
  methods: {
180
- getColumnsJson () {
178
+ getConfig () {
181
179
  this.loading = true
182
- const url = getConfigUrl(this.serviceName)
183
- indexedDB.getByWeb(this.queryParamsName, url, { configName: this.queryParamsName }, (res) => {
180
+ getConfig(this.queryParamsName, this.serviceName, (res) => {
184
181
  this.updateComponents(res)
185
182
  })
186
183
  },
187
- getColumnsJsonBySource () {
184
+ getConfigBySource () {
188
185
  this.loading = true
189
- const url = parseConfigUrl(this.serviceName)
190
- post(url, {
191
- configType: 'CRUD_FORM',
192
- configContent: this.queryParamsJson
193
- }).then(res => {
186
+ parseConfig(this.queryParamsJson, 'CRUD_FORM', this.serviceName).then(res => {
194
187
  this.updateComponents(res, true)
195
188
  })
196
189
  },
197
190
  getColumnJsonByLogic () {
198
191
  this.loading = true
199
- const url = getConfigUrl(this.serviceName)
200
- indexedDB.getByWeb(`${this.logicName}_${JSON.stringify(this.logicParam)}`, url, { logic: this.logicName, logicParam: this.logicParam }, (res) => {
192
+ getConfigByLogic(this.logicName, this.logicParam, this.serviceName, (res) => {
201
193
  this.updateComponents(res, true)
202
194
  })
203
195
  },
@@ -161,7 +161,7 @@ export default {
161
161
  // 是否允许删除
162
162
  isDelete: false,
163
163
  // 服务名称
164
- serviceName: 'system',
164
+ serviceName: undefined,
165
165
  // 选中用于修改的id
166
166
  selectId: undefined,
167
167
  // 是否为临时表
@@ -225,7 +225,7 @@ export default {
225
225
  tableColumns,
226
226
  buttonState,
227
227
  title,
228
- serviceName = 'system',
228
+ serviceName,
229
229
  viewMode
230
230
  } = params
231
231
  this.queryParams = queryParams
@@ -242,8 +242,8 @@ export default {
242
242
  }
243
243
  },
244
244
  methods: {
245
- getColumnsJson () {
246
- Vue.resetpost(commonApi.getColumnsJson, {str: this.queryParamsName}).then((res) => {
245
+ getConfig () {
246
+ Vue.resetpost(commonApi.getConfig, {str: this.queryParamsName}).then((res) => {
247
247
  this.formItemJson = res.formJson
248
248
  this.columnItemJson = res.columnJson
249
249
  this.loaded = true
@@ -182,7 +182,7 @@ export default {
182
182
  },
183
183
  // 存储查询配置信息
184
184
  saveQueryParams (source) {
185
- return post('/api/system/logic/updateQueryParamsData', {
185
+ return post('/api/af-system/logic/updateQueryParamsData', {
186
186
  id: this.id,
187
187
  source: source
188
188
  }).then(res => {
@@ -36,7 +36,7 @@
36
36
  :before-upload="beforeUpload"
37
37
  :file-list="fileList"
38
38
  :remove="remove"
39
- action="/api/system/file/upload"
39
+ action="/api/af-system/file/upload"
40
40
  list-type="picture-card"
41
41
  name="avatar"
42
42
  @change="handleChange"
@@ -22,7 +22,7 @@
22
22
  :before-upload="beforeUpload"
23
23
  :file-list="fileList"
24
24
  :remove="remove"
25
- action="/api/system/file/upload"
25
+ action="/api/af-system/file/upload"
26
26
  list-type="picture-card"
27
27
  name="avatar"
28
28
  @change="handleChange"
@@ -35,6 +35,8 @@ module.exports = {
35
35
  },
36
36
  footerLinks: [ // 页面底部链接,{link: '链接地址', name: '名称/显示文字', icon: '图标,支持 ant design vue 图标库'}
37
37
  ],
38
+ // 配置的默认命名空间
39
+ defaultServiceName: 'af-system',
38
40
  // 旧系统路径
39
41
  iframeSrc: '../singlepage/page.html',
40
42
  // 兼容旧版本 V3(最新V3产品) OA(公司OA)
@@ -86,7 +86,7 @@ export default {
86
86
  this.institutionDetailVisible = false
87
87
  try {
88
88
  if (this.$login.f.name) {
89
- post('/api/system/logic/getTodo', { name: this.$login.f.name }).then(res => {
89
+ post('/api/af-system/logic/getTodo', { name: this.$login.f.name }).then(res => {
90
90
  this.backlog = [...res]
91
91
  if (this.backlog.length > 0) {
92
92
  const key = `open${Date.now()}`
@@ -81,7 +81,7 @@ export default {
81
81
  return
82
82
  }
83
83
  const otherFiles = []
84
- post('/api/system/logic/getInstitutionDetail', {
84
+ post('/api/af-system/logic/getInstitutionDetail', {
85
85
  id: this.institutionId
86
86
  }).then(res => {
87
87
  res.files.forEach(item => {
@@ -116,7 +116,7 @@ export default {
116
116
  a.click()
117
117
  },
118
118
  confirm_institution () {
119
- post('/api/system/logic/affirmInstitution', {
119
+ post('/api/af-system/logic/affirmInstitution', {
120
120
  data: {
121
121
  tobe: [
122
122
  {
@@ -16,22 +16,50 @@
16
16
  >
17
17
  <a-textarea v-model="importEditJson" placeholder="输入现有的JSON配置"/>
18
18
  </a-modal>
19
- <a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="showDrawer">创建查询配置
20
- </a-button>
21
- <a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="openImportView(1)">导入已有查询配置
22
- </a-button>
23
- <br/>
24
- <a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="showSimpleFormQueryParamsDrawer">
25
- 创建简易表单配置
26
- </a-button>
27
- <a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="openImportView(2)">导入已有简易表单配置
28
- </a-button>
19
+ <a-modal
20
+ :visible="liuliModalVisible"
21
+ title="从琉璃中心获取配置"
22
+ @cancel="liuliModalVisible = false"
23
+ @ok="getLiuLiConfigHandleOk"
24
+ >
25
+ <a-form-model :model="form" :rules="rules" ref="liuliModel">
26
+ <a-form-model-item label="命名空间" prop="namespaceName">
27
+ <a-input v-model="form.namespaceName" :placeholder="'默认值:' + this.defaultServiceName"/>
28
+ </a-form-model-item>
29
+ <a-form-model-item label="配置名称" prop="configName">
30
+ <a-input v-model="form.configName"/>
31
+ </a-form-model-item>
32
+ </a-form-model>
33
+ </a-modal>
34
+ <a-card title="查询配置管理">
35
+ <a-space>
36
+ <a-button type="primary" @click="showDrawer">创建新的配置
37
+ </a-button>
38
+ <a-button type="primary" @click="openImportView(1)">从JSON文本导入
39
+ </a-button>
40
+ <a-button type="primary" @click="openLiuLiConfigModalView(1)">从琉璃中心导入
41
+ </a-button>
42
+ </a-space>
43
+ </a-card>
44
+ <a-card title="简易表单配置管理" style="margin-top: 20px">
45
+ <a-space>
46
+ <a-button type="primary" @click="showSimpleFormQueryParamsDrawer">
47
+ 创建新的配置
48
+ </a-button>
49
+ <a-button type="primary" @click="openImportView(2)">从JSON文本导入
50
+ </a-button>
51
+ <a-button type="primary" @click="openLiuLiConfigModalView(2)">从琉璃中心导入
52
+ </a-button>
53
+ </a-space>
54
+ </a-card>
29
55
  </div>
30
56
  </template>
31
57
 
32
58
  <script>
33
59
  import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
34
60
  import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
61
+ import { mapState } from 'vuex'
62
+ import { getNativeConfig } from 'vue2-client/src/services/api/common'
35
63
 
36
64
  export default {
37
65
  name: 'CreateQueryPage',
@@ -46,10 +74,21 @@ export default {
46
74
  toEditJson: undefined,
47
75
  toEditSimpleFormJson: undefined,
48
76
  importJsonVisible: false,
77
+ liuliModalVisible: false,
49
78
  type: undefined,
50
- importEditJson: ''
79
+ importEditJson: '',
80
+ form: {
81
+ namespaceName: undefined,
82
+ configName: undefined
83
+ },
84
+ rules: {
85
+ configName: [{ required: true, message: '请输入配置名称', trigger: 'blur' }]
86
+ }
51
87
  }
52
88
  },
89
+ computed: {
90
+ ...mapState('setting', ['defaultServiceName'])
91
+ },
53
92
  methods: {
54
93
  showDrawer () {
55
94
  this.visible = true
@@ -57,6 +96,10 @@ export default {
57
96
  showSimpleFormQueryParamsDrawer () {
58
97
  this.createSimpleFormVisible = true
59
98
  },
99
+ openLiuLiConfigModalView (type) {
100
+ this.type = type
101
+ this.liuliModalVisible = true
102
+ },
60
103
  openImportView (type) {
61
104
  this.type = type
62
105
  this.importJsonVisible = true
@@ -75,6 +118,30 @@ export default {
75
118
  }
76
119
  this.importJsonVisible = false
77
120
  },
121
+ getLiuLiConfigHandleOk () {
122
+ try {
123
+ this.$refs.liuliModel.validate(valid => {
124
+ if (valid) {
125
+ getNativeConfig(this.form.configName, this.form.namespaceName).then(res => {
126
+ console.warn(res)
127
+ if (this.type === 1) {
128
+ this.toEditJson = res
129
+ this.showDrawer()
130
+ } else {
131
+ this.toEditSimpleFormJson = res
132
+ this.showSimpleFormQueryParamsDrawer()
133
+ }
134
+ })
135
+ } else {
136
+ return false
137
+ }
138
+ })
139
+ } catch (e) {
140
+ this.$message.error('操作失败:' + e)
141
+ throw e
142
+ }
143
+ this.liuliModalVisible = false
144
+ },
78
145
  }
79
146
  }
80
147
  </script>
@@ -20,7 +20,7 @@
20
20
  },
21
21
  methods: {
22
22
  async getData () {
23
- this.tableData = await post('/api/system/logic/reportTest', {})
23
+ this.tableData = await post('/api/af-system/logic/reportTest', {})
24
24
  console.log('数据=>', JSON.stringify(this.tableData))
25
25
  }
26
26
  }
@@ -52,7 +52,7 @@
52
52
 
53
53
  <script>
54
54
  import { getOrganization, searchFun } from '@vue2-client/base-client/plugins/GetLoginInfoService'
55
- import { getColumnsJson } from '@vue2-client/services/api'
55
+ import { getConfig } from '@vue2-client/services/api'
56
56
  export default {
57
57
  // 组织管理
58
58
  name: 'orgListManage',
@@ -83,7 +83,7 @@
83
83
  created () {
84
84
  },
85
85
  async mounted () {
86
- getColumnsJson('orgListManage', (res) => {
86
+ getConfig('orgListManage', (res) => {
87
87
  this.columnsJson = res
88
88
  })
89
89
  const fun = await getOrganization()
@@ -195,10 +195,10 @@ export default {
195
195
  getStockList () {
196
196
  this.loading = true
197
197
  // 请求仓库列表
198
- post('/api/system/logic/getFilesStock', {}).then(res => {
198
+ post('/api/af-system/logic/getFilesStock', {}).then(res => {
199
199
  this.data = res.sort((a, b) => a.progress - b.progress)
200
200
  // 请求仓库列表
201
- post('/api/system/logic/getFilesColl', {}).then(res => {
201
+ post('/api/af-system/logic/getFilesColl', {}).then(res => {
202
202
  this.coll = res
203
203
  this.loading = false
204
204
  })
@@ -269,7 +269,7 @@ export default {
269
269
  },
270
270
  submitStock () {
271
271
  // 保存仓库信息
272
- post('/api/system/entity/t_files_manager', this.form).then(res => {
272
+ post('/api/af-system/entity/t_files_manager', this.form).then(res => {
273
273
  this.$message.success('提交成功')
274
274
  this.visible = false
275
275
  this.getStockList()
@@ -1,6 +1,6 @@
1
1
  const DictionaryDetailsViewApi = {
2
2
  // 查询:获取字典详情
3
- getDictionaryDetails: '/api/system/logic/getDictionaryDetails'
3
+ getDictionaryDetails: '/api/af-system/logic/getDictionaryDetails'
4
4
  }
5
5
 
6
6
  export { DictionaryDetailsViewApi }
@@ -1,10 +1,10 @@
1
1
  const LogDetailsViewApi = {
2
2
  // 查询:获取日志详情
3
- getLogDetails: '/api/system/logic/foreignaidGetLogDetails',
3
+ getLogDetails: '/api/af-system/logic/foreignaidGetLogDetails',
4
4
  // 查询:获取日志维护记录
5
- getLogRecordList: '/api/system/logic/foreignaidGetRecordList',
5
+ getLogRecordList: '/api/af-system/logic/foreignaidGetRecordList',
6
6
  // 操作:更新日志状态
7
- updateLogStatusData: '/api/system/logic/foreignaidUpdateLogStatus'
7
+ updateLogStatusData: '/api/af-system/logic/foreignaidUpdateLogStatus'
8
8
  }
9
9
 
10
10
  export { LogDetailsViewApi }
@@ -1,6 +1,6 @@
1
1
  const QueryParamsDetailsViewApi = {
2
2
  // 查询:获取查询配置详情
3
- getQueryParamsDetails: '/api/system/logic/getQueryParamsDetails'
3
+ getQueryParamsDetails: '/api/af-system/logic/getQueryParamsDetails'
4
4
  }
5
5
 
6
6
  export { QueryParamsDetailsViewApi }
@@ -1,34 +1,34 @@
1
1
  const TicketDetailsViewApi = {
2
2
  // 查询:获取工单流转详情
3
- getTicketWorkFlowDetails: '/api/system/logic/getTicketWorkFlowDetails',
3
+ getTicketWorkFlowDetails: '/api/af-system/logic/getTicketWorkFlowDetails',
4
4
  // 查询:获取工单详情
5
- getTicketDetails: '/api/system/logic/getTicketDetails',
5
+ getTicketDetails: '/api/af-system/logic/getTicketDetails',
6
6
  // 手动关闭工单
7
- manualCloseTicket: '/api/system/logic/manualCloseTicket',
7
+ manualCloseTicket: '/api/af-system/logic/manualCloseTicket',
8
8
  // 转交工单给其他人
9
- transferTicketToOthers: '/api/system/logic/transferTicketToOthers',
9
+ transferTicketToOthers: '/api/af-system/logic/transferTicketToOthers',
10
10
  // 确认工单,开始处理
11
- confirmTicket: '/api/system/logic/confirmTicket',
11
+ confirmTicket: '/api/af-system/logic/confirmTicket',
12
12
  // 查询:获取订单详情用于订单追踪
13
- getTicketDetailsForUploader: '/api/system/logic/getTicketDetailsForUploader',
13
+ getTicketDetailsForUploader: '/api/af-system/logic/getTicketDetailsForUploader',
14
14
  // 更新:将工单优先级增加
15
- rushTicket: '/api/system/logic/rushTicket',
15
+ rushTicket: '/api/af-system/logic/rushTicket',
16
16
  // 客户手动关闭工单
17
- manualCloseTicketByCustomer: '/api/system/logic/manualCloseTicketByCustomer',
17
+ manualCloseTicketByCustomer: '/api/af-system/logic/manualCloseTicketByCustomer',
18
18
  // 在工单提交页面删除照片
19
- revocationImage: '/api/system/logic/revocationImage',
19
+ revocationImage: '/api/af-system/logic/revocationImage',
20
20
  // 在工单提交页面删除照片
21
- getTicketImages: '/api/system/logic/getTicketImages',
21
+ getTicketImages: '/api/af-system/logic/getTicketImages',
22
22
  // 用户填写附加信息时取消了操作,将已上传的照片清空
23
- removeAllImages: '/api/system/logic/removeAllImages',
23
+ removeAllImages: '/api/af-system/logic/removeAllImages',
24
24
  // 提交用户填写附加信息
25
- AddonDescriptionToTicket: '/api/system/logic/AddonDescriptionToTicket',
25
+ AddonDescriptionToTicket: '/api/af-system/logic/AddonDescriptionToTicket',
26
26
  // 获取用户填写附加信息
27
- getAddonDescription: '/api/system/logic/getAddonDescription',
27
+ getAddonDescription: '/api/af-system/logic/getAddonDescription',
28
28
  // 发起售后工单流程
29
- createTicket: '/api/system/logic/createTicket',
29
+ createTicket: '/api/af-system/logic/createTicket',
30
30
  // 查询:获取所有员工名,供前端展示备选项
31
- getAllEmployeeName: '/api/system/logic/getAllEmployeeName'
31
+ getAllEmployeeName: '/api/af-system/logic/getAllEmployeeName'
32
32
  }
33
33
 
34
34
  export { TicketDetailsViewApi }
@@ -5,10 +5,13 @@ import { blobValidate } from '@vue2-client/utils/common'
5
5
  import errorCode from '@vue2-client/utils/errorCode'
6
6
  import { saveAs } from 'file-saver'
7
7
  import { post } from '@vue2-client/services/api/restTools'
8
+ import setting from '@vue2-client/store/modules/setting'
8
9
 
9
10
  const commonApi = {
10
- // 获取表格列配置
11
+ // 获取配置
11
12
  getConfig: 'logic/getLiuliConfiguration',
13
+ // 获取原生配置
14
+ getNativeConfig: 'logic/getLiuliNativeConfiguration',
12
15
  // 配置解析
13
16
  parseConfig: 'logic/parseConfig',
14
17
  // 通用查询
@@ -19,10 +22,6 @@ const commonApi = {
19
22
  addOrModify: 'logic/commonAddOrModify',
20
23
  // 通用删除
21
24
  delete: 'logic/commonDelete',
22
- // 获取字典键列表
23
- getDictionaryParam: '/api/system/logic/getDictionaryParam',
24
- // 获取所有员工及其部门的级联菜单数据
25
- getEmpTree: '/api/system/logic/getEmpTree',
26
25
  // 导入数据
27
26
  importData: 'logic/importData',
28
27
  // 导出数据
@@ -30,78 +29,130 @@ const commonApi = {
30
29
  // 下载数据
31
30
  download: 'resource/download',
32
31
  // 通用上传
33
- upload: '/resource/upload'
32
+ upload: 'resource/upload',
33
+ // 文件实体操作
34
+ fileEntity: 'entity/t_files',
35
+ // 获取所有员工及其部门的级联菜单数据
36
+ getEmpTree: '/api/af-system/logic/getEmpTree',
34
37
  }
35
38
 
36
- export function getConfigUrl (serviceName = 'system') {
39
+ export function getConfigUrl (serviceName = setting.state.defaultServiceName) {
37
40
  return '/api/' + serviceName + '/' + commonApi.getConfig
38
41
  }
39
42
 
40
- export function parseConfigUrl (serviceName = 'system') {
43
+ export function getNativeConfigUrl (serviceName = setting.state.defaultServiceName) {
44
+ return '/api/' + serviceName + '/' + commonApi.getNativeConfig
45
+ }
46
+
47
+ export function parseConfigUrl (serviceName = setting.state.defaultServiceName) {
41
48
  return '/api/' + serviceName + '/' + commonApi.parseConfig
42
49
  }
43
50
 
44
51
  /**
45
- * 带缓存查询的表格配置文件查询
46
- * @param queryParamsName 配置名称
52
+ * 获取字典键参数
53
+ */
54
+ export function getDictionaryParam () {
55
+ return post('/api/af-system/logic/getDictionaryParam', {})
56
+ }
57
+
58
+ /**
59
+ * 根据配置名获取配置内容
60
+ * @param configName 配置名称
61
+ * @param serviceName 命名空间名称
62
+ * @param callback 回调函数
63
+ */
64
+ export function getConfig (configName, serviceName = setting.state.defaultServiceName, callback) {
65
+ indexedDB.getByWeb(configName, getConfigUrl(serviceName), { configName: configName }, callback)
66
+ }
67
+
68
+ export function getNativeConfig (configName, serviceName = setting.state.defaultServiceName) {
69
+ return post(getNativeConfigUrl(serviceName), { configName: configName })
70
+ }
71
+
72
+ /**
73
+ * 调用Logic获取配置内容
74
+ * @param logicName Logic名称
75
+ * @param parameter Logic调用参数
47
76
  * @param serviceName 命名空间名称
48
77
  * @param callback 回调函数
49
78
  */
50
- export function getColumnsJson (queryParamsName, serviceName = 'system', callback) {
51
- indexedDB.getByWeb(queryParamsName, getConfigUrl(serviceName), { configName: queryParamsName }, callback)
79
+ export function getConfigByLogic (logicName, parameter, serviceName = setting.state.defaultServiceName, callback) {
80
+ indexedDB.getByWeb(`${logicName}_${JSON.stringify(parameter)}`, '/api/' + serviceName + '/logic/' + logicName,
81
+ parameter, callback)
82
+ }
83
+
84
+ /**
85
+ * 配置解析
86
+ * @param configContent 原配置内容
87
+ * @param configType 配置类型
88
+ * @param serviceName 命名空间名称
89
+ */
90
+ export function parseConfig (configContent, configType, serviceName = setting.state.defaultServiceName) {
91
+ const url = parseConfigUrl(serviceName)
92
+ return post(url, {
93
+ configType: configType,
94
+ configContent: configContent
95
+ })
96
+ }
97
+
98
+ /**
99
+ * 通用执行业务逻辑
100
+ */
101
+ export function runLogic (logicName, parameter, serviceName = setting.state.defaultServiceName) {
102
+ return post('/api/' + serviceName + '/logic/' + logicName, parameter)
52
103
  }
53
104
 
54
105
  /**
55
106
  * 通用查询
56
107
  */
57
- export function query (parameter, serviceName = 'system') {
108
+ export function query (parameter, serviceName = setting.state.defaultServiceName) {
58
109
  return post('/api/' + serviceName + '/' + commonApi.query, parameter, null)
59
110
  }
60
111
 
61
112
  /**
62
113
  * 通用表单查询
63
114
  */
64
- export function queryWithResource (parameter, serviceName = 'system') {
115
+ export function queryWithResource (parameter, serviceName = setting.state.defaultServiceName) {
65
116
  return post('/api/' + serviceName + '/' + commonApi.queryWithResource, parameter, null)
66
117
  }
67
118
 
68
119
  /**
69
120
  * 通用新增/修改
70
121
  */
71
- export function addOrModify (parameter, serviceName = 'system') {
122
+ export function addOrModify (parameter, serviceName = setting.state.defaultServiceName) {
72
123
  return post('/api/' + serviceName + '/' + commonApi.addOrModify, parameter, null)
73
124
  }
74
125
 
75
126
  /**
76
127
  * 通用删除
77
128
  */
78
- export function remove (parameter, serviceName = 'system') {
129
+ export function remove (parameter, serviceName = setting.state.defaultServiceName) {
79
130
  return post('/api/' + serviceName + '/' + commonApi.delete, parameter, null)
80
131
  }
81
132
 
82
133
  /**
83
134
  * 通用导入
84
135
  */
85
- export function importData (parameter, serviceName = 'system') {
136
+ export function importData (parameter, serviceName = setting.state.defaultServiceName) {
86
137
  return post('/api/' + serviceName + '/' + commonApi.importData, parameter, null)
87
138
  }
88
139
 
89
140
  /**
90
141
  * 通用导出
91
142
  */
92
- export function exportData (parameter, serviceName = 'system') {
143
+ export function exportData (parameter, serviceName = setting.state.defaultServiceName) {
93
144
  return post('/api/' + serviceName + '/' + commonApi.exportData, parameter, null)
94
145
  }
95
146
 
96
147
  /**
97
148
  * 通用上传
98
149
  */
99
- export function upload (parameter, serviceName = 'system', config) {
150
+ export function upload (parameter, serviceName = setting.state.defaultServiceName, config) {
100
151
  return post('/api/' + serviceName + '/' + commonApi.upload, parameter, config)
101
152
  }
102
153
 
103
154
  // 通用下载
104
- export function download (parameter, filename, serviceName = 'system') {
155
+ export function download (parameter, filename, serviceName = setting.state.defaultServiceName) {
105
156
  const notificationKey = 'download'
106
157
  notification.open({
107
158
  key: notificationKey,
@@ -140,4 +191,9 @@ export function download (parameter, filename, serviceName = 'system') {
140
191
  })
141
192
  }
142
193
 
194
+ // 文件删除
195
+ export function fileDelete (parameter, serviceName = setting.state.defaultServiceName) {
196
+ return post('/api/' + serviceName + '/' + commonApi.fileEntity, parameter)
197
+ }
198
+
143
199
  export { commonApi }
@@ -1,10 +1,10 @@
1
1
  const CommonTempTable = {
2
2
  // 初始化子表
3
- initApplySubTable: '/api/system/logic/initApplySubTable',
3
+ initApplySubTable: '/api/af-system/logic/initApplySubTable',
4
4
  // 创建临时表,根据配置文件动态生成
5
- createTempTable: '/api/system/logic/createTempTable',
5
+ createTempTable: '/api/af-system/logic/createTempTable',
6
6
  // 向临时表中插入数据
7
- insertDataToTempTable: '/api/system/logic/insertDataToTempTable'
7
+ insertDataToTempTable: '/api/af-system/logic/insertDataToTempTable'
8
8
  }
9
9
 
10
10
  export { CommonTempTable }
@@ -1,4 +1,4 @@
1
- import { commonApi, getColumnsJson, query, addOrModify, remove } from '@vue2-client/services/api/common'
1
+ import { commonApi, getConfig, query, addOrModify, remove } from '@vue2-client/services/api/common'
2
2
  import { QueryParamsDetailsViewApi } from '@vue2-client/services/api/QueryParamsDetailsViewApi'
3
3
  import { DictionaryDetailsViewApi } from '@vue2-client/services/api/DictionaryDetailsViewApi'
4
4
  import { LogDetailsViewApi } from '@vue2-client/services/api/LogDetailsViewApi'
@@ -7,7 +7,7 @@ import { get, post } from '@vue2-client/services/api/restTools'
7
7
  import { TicketDetailsViewApi } from '@vue2-client/services/api/TicketDetailsViewApi'
8
8
 
9
9
  export {
10
- commonApi, getColumnsJson, query, addOrModify, remove,
10
+ commonApi, getConfig, query, addOrModify, remove,
11
11
  DictionaryDetailsViewApi,
12
12
  LogDetailsViewApi,
13
13
  manageApi,
@@ -1,6 +1,6 @@
1
1
  const loginforApi = {
2
2
  // 查询:获取系统访问记录
3
- query: '/api/system/logic/getLogininfor'
3
+ query: '/api/af-system/logic/getLogininfor'
4
4
  }
5
5
 
6
6
  export { loginforApi }
@@ -1,8 +1,8 @@
1
1
  const manageApi = {
2
2
  // 查询:获取字典键列表
3
- getDictionaryValue: '/api/system/logic/getDictionaryValue',
3
+ getDictionaryValue: '/api/af-system/logic/getDictionaryValue',
4
4
  // 查询:获取省市区街道三级分类
5
- getDivisionsOhChina: '/api/system/logic/getDivisionsOhChina'
5
+ getDivisionsOhChina: '/api/af-system/logic/getDivisionsOhChina'
6
6
  }
7
7
 
8
8
  export { manageApi }
package/vue.config.js CHANGED
@@ -30,7 +30,7 @@ module.exports = {
30
30
  changeOrigin: true
31
31
  },
32
32
  '/api': {
33
- pathRewrite: { '^/api/system/': '/rs/', '^/api/af-system/': '/rs/' },
33
+ pathRewrite: { '^/api/af-system/': '/rs/' },
34
34
  // pathRewrite: { '^/api': '/' },
35
35
  target: local,
36
36
  changeOrigin: true