workflow-editor 0.9.87-dw → 0.9.87-dw-pv1

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": "workflow-editor",
3
- "version": "0.9.87-dw",
3
+ "version": "0.9.87-dw-pv1",
4
4
  "description": "流程编辑器",
5
5
  "main": "lib/workflow-editor.umd.min.js",
6
6
  "private": false,
@@ -33,7 +33,7 @@
33
33
  "element-ui": "2.15.3",
34
34
  "eslint": "5.16.0",
35
35
  "eslint-plugin-vue": "5.2.2",
36
- "imatrix-ui": "2.9.8-dw",
36
+ "imatrix-ui": "2.9.14-dw-pv1",
37
37
  "node-sass": "4.12.0",
38
38
  "nprogress": "^0.2.0",
39
39
  "sass-loader": "^7.1.0",
@@ -6,8 +6,8 @@ function getHttp() {
6
6
  return window.$http
7
7
  }
8
8
  const processService = {
9
- fetchFormFields(formCode, formVersion) {
10
- getHttp().get(Vue.prototype.baseAPI + '/wf-editor/workflow-editors/form-fields?formCode=' + formCode + '&formVersion=' + formVersion).then(resultFields => {
9
+ fetchFormFields(formCode, formVersion, publishVersion) {
10
+ getHttp().get(Vue.prototype.baseAPI + '/wf-editor/workflow-editors/form-fields?formCode=' + formCode + '&formVersion=' + formVersion + '&publishVersion=' + publishVersion).then(resultFields => {
11
11
  const formFields = resultFields.formFields
12
12
  const subFormFields = resultFields.subFormFields
13
13
  getStore().commit('wfEditor/setFormCode', formCode)
@@ -1,10 +1,11 @@
1
1
  <template>
2
- <el-form-item :label="label">
3
- <el-checkbox-group v-model="tools">
4
- <el-checkbox label="mail">
5
- {{ $t('workflowEditorPublicModel.mail') }}
6
- </el-checkbox>
7
- <el-checkbox label="sms">
2
+ <div>
3
+ <el-form-item :label="label">
4
+ <el-checkbox-group v-model="tools">
5
+ <el-checkbox label="mail">
6
+ {{ $t('workflowEditorPublicModel.mail') }}
7
+ </el-checkbox>
8
+ <!-- <el-checkbox label="sms">
8
9
  {{ $t('workflowEditorPublicModel.message') }}
9
10
  </el-checkbox>
10
11
  <el-checkbox label="app">
@@ -12,9 +13,16 @@
12
13
  </el-checkbox>
13
14
  <el-checkbox label="dingding">
14
15
  {{ $t('workflowEditorPublicModel.dingding') }}
15
- </el-checkbox>
16
- </el-checkbox-group>
17
- </el-form-item>
16
+ </el-checkbox> -->
17
+ <el-checkbox label="custom">
18
+ {{ $t('workflowEditorPublicModel.custom') }}
19
+ </el-checkbox>
20
+ </el-checkbox-group>
21
+ </el-form-item>
22
+ <el-form-item v-if="tools.indexOf('custom')>=0" :label="$t('workflowEditor.common.customMsg')">
23
+ <el-input v-model="myCustomMsg" />
24
+ </el-form-item>
25
+ </div>
18
26
  </template>
19
27
  <script>
20
28
  export default {
@@ -27,6 +35,10 @@ export default {
27
35
  value: {
28
36
  type: String,
29
37
  default: null
38
+ },
39
+ customMsg: {
40
+ type: String,
41
+ default: null
30
42
  }
31
43
  },
32
44
  data() {
@@ -34,13 +46,21 @@ export default {
34
46
  if (this.value && this.value !== '' && this.value !== null) {
35
47
  tools = this.value.split(',')
36
48
  }
49
+ let myCustomMsg = ''
50
+ if (this.customMsg && this.customMsg !== '' && this.customMsg !== null) {
51
+ myCustomMsg = this.customMsg
52
+ }
37
53
  return {
38
- tools
54
+ tools,
55
+ myCustomMsg
39
56
  }
40
57
  },
41
58
  watch: {
42
59
  tools(val) {
43
60
  this.$emit('input', this.tools.join(','))
61
+ },
62
+ myCustomMsg(val) {
63
+ this.$emit('input-msg', this.myCustomMsg)
44
64
  }
45
65
  }
46
66
  }
@@ -0,0 +1,72 @@
1
+ <template>
2
+ <div>
3
+ <el-card class="box-card">
4
+ <div slot="header" class="clearfix">
5
+ <span>{{ $t('workflowEditor.common.taskNotice') }}</span>
6
+ </div>
7
+ <el-form :model="model" label-width="80px">
8
+ <common-notice-tool v-model="noticeObj.informType" :label="$t('workflowEditor.common.notificationMethod')" :custom-msg="noticeObj.customMsg" @input-msg="setCustomMsg" />
9
+ <el-form-item :label="$t('workflowEditor.task.selectMailTemplate')">
10
+ <select-mail-templates v-model="noticeObj.mailTemplateCode" @set-value="setMailTemplateCode" />
11
+ </el-form-item>
12
+ </el-form>
13
+ </el-card>
14
+ <el-card class="box-card" style="margin-top: 10px">
15
+ <div slot="header" class="clearfix">
16
+ <span>{{ $t('workflowEditor.common.reminderNotice') }}</span>
17
+ </div>
18
+ <reminder v-model="reminderObj" />
19
+ </el-card>
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ import Reminder from './reminder.vue'
25
+ import CommonNoticeTool from './common-notice-tool'
26
+ import SelectMailTemplates from './select-mail-template.vue'
27
+ export default {
28
+ name: 'NoticeReminder',
29
+ components: {
30
+ Reminder,
31
+ CommonNoticeTool,
32
+ SelectMailTemplates
33
+ },
34
+ props: {
35
+ reminderValue: {
36
+ type: [Object, String],
37
+ default: null
38
+ },
39
+ taskNoticeValue: {
40
+ type: Object,
41
+ default: null
42
+ }
43
+ },
44
+ data() {
45
+ let reminderObj = {}
46
+ if (this.reminderValue !== null && this.reminderValue !== undefined && this.reminderValue !== '') {
47
+ reminderObj = this.reminderValue
48
+ }
49
+ let noticeObj = {}
50
+ if (this.taskNoticeValue !== null && this.taskNoticeValue !== undefined && this.taskNoticeValue !== '') {
51
+ noticeObj = this.taskNoticeValue
52
+ }
53
+ return {
54
+ reminderObj: reminderObj,
55
+ noticeObj: noticeObj
56
+ }
57
+ },
58
+ methods: {
59
+ // 关闭选择邮件模板弹框
60
+ setMailTemplateCode(mailTemplateCode) {
61
+ this.noticeObj.mailTemplateCode = mailTemplateCode
62
+ },
63
+ setCustomMsg(msg) {
64
+ this.noticeObj.customMsg = msg
65
+ }
66
+ }
67
+ }
68
+ </script>
69
+
70
+ <style lang="scss" scoped>
71
+
72
+ </style>
@@ -6,7 +6,7 @@
6
6
  />
7
7
  </el-form-item>
8
8
  <div v-if="showNotice">
9
- <common-notice-tool v-model="model.informType" :label="$t('workflowEditor.common.notificationMethod')" />
9
+ <common-notice-tool v-model="model.informType" :label="$t('workflowEditor.common.notificationMethod')" :custom-msg="model.customMsg" @input-msg="setCustomMsg" />
10
10
  <el-form-item v-if="model.informType && model.informType.length > 0 && model.informType.indexOf('mail') !== -1" :label="$t('workflowEditor.task.selectMailTemplate')">
11
11
  <select-mail-templates v-model="model.noticeMailTemplateCode" @set-value="setMailTemplateCode" />
12
12
  </el-form-item>
@@ -91,6 +91,9 @@ export default {
91
91
  // 关闭选择邮件模板弹框
92
92
  setMailTemplateCode(mailTemplateCode) {
93
93
  this.model.noticeMailTemplateCode = mailTemplateCode
94
+ },
95
+ setCustomMsg(msg) {
96
+ this.model.customMsg = msg
94
97
  }
95
98
  }
96
99
  }
@@ -6,7 +6,7 @@
6
6
  />
7
7
  </el-form-item>
8
8
  <div v-if="showReminder">
9
- <common-notice-tool v-model="model.remindType" :label="$t('workflowEditor.task.urgingMethod')" />
9
+ <common-notice-tool v-model="model.remindType" :label="$t('workflowEditor.task.urgingMethod')" :custom-msg="model.reminderCustomMsg" @input-msg="setReminderCustomMsg" />
10
10
  <el-form-item v-if="model.remindType && model.remindType.length > 0 && model.remindType.indexOf('mail') !== -1" :label="$t('workflowEditor.task.selectMailTemplate')">
11
11
  <select-mail-templates v-model="model.noticeMailTemplateCode" @set-value="setMailTemplateCode" />
12
12
  </el-form-item>
@@ -34,7 +34,7 @@
34
34
  <el-form-item :label="$t('workflowEditor.task.timesOfUrging')" size="mini">
35
35
  <el-input-number v-model="model.remindTimes" controls-position="right" :min="1" :max="99" style="width:90px" />
36
36
  </el-form-item>
37
- <common-notice-tool v-model="model.noticeType" :label="$t('workflowEditor.common.notificationMethod')" />
37
+ <common-notice-tool v-model="model.noticeType" :label="$t('workflowEditor.common.notificationMethod')" :custom-msg="model.noticeCustomMsg" @input-msg="setNoticeCustomMsg" />
38
38
  <el-form-item :label="$t('workflowEditor.common.notifyPersonnel')" style="margin-bottom:5px">
39
39
  <el-checkbox v-model="model.containTransferUser">
40
40
  {{ $t('workflowEditor.task.includingHandoverPersonnel') }}
@@ -168,6 +168,12 @@ export default {
168
168
  },
169
169
  selectData(selection, row) {
170
170
  this.multiSelectData = selection
171
+ },
172
+ setReminderCustomMsg(msg) {
173
+ this.model.reminderCustomMsg = msg
174
+ },
175
+ setNoticeCustomMsg(msg) {
176
+ this.model.noticeCustomMsg = msg
171
177
  }
172
178
  }
173
179
  }
@@ -29,7 +29,8 @@
29
29
  <auto-filled-fields v-model="model.ref.autoFilledFields" />
30
30
  </el-tab-pane>
31
31
  <el-tab-pane :label="$t('workflowEditor.task.reminderSettings')" name="reminders">
32
- <reminder v-model="model.ref.reminder" />
32
+ <!-- <reminder v-model="model.ref.reminder" /> -->
33
+ <notice-reminder :reminder-value="model.ref.reminder" :task-notice-value="model.ref.taskNotice" />
33
34
  </el-tab-pane>
34
35
  <el-tab-pane :label="$t('workflowEditor.task.eventProcessing')" name="events">
35
36
  <events v-model="model.ref.events" />
@@ -46,9 +47,10 @@ import BasicProperties from './human-task/basic-properties'
46
47
  import PermissionSettings from './human-task/permission-settings'
47
48
  import TransactorSettings from './common/transactor-settings'
48
49
  import AutoFilledFields from './common/auto-filled-fields'
49
- import Reminder from './common/reminder'
50
+ // import Reminder from './common/reminder'
50
51
  import Variables from './common/variables'
51
52
  import Events from './human-task/events'
53
+ import NoticeReminder from './common/notice-reminder.vue'
52
54
  export default {
53
55
  name: 'HumanTaskPropertiesEditor',
54
56
  components: {
@@ -56,9 +58,10 @@ export default {
56
58
  TransactorSettings,
57
59
  PermissionSettings,
58
60
  AutoFilledFields,
59
- Reminder,
61
+ // Reminder,
60
62
  Events,
61
- Variables
63
+ Variables,
64
+ NoticeReminder
62
65
 
63
66
  },
64
67
  props: {
@@ -69,6 +72,9 @@ export default {
69
72
  },
70
73
  data() {
71
74
  console.log(this.model)
75
+ if (this.model.ref.taskNotice === undefined) {
76
+ this.model.ref.taskNotice = {}
77
+ }
72
78
  return {
73
79
  activeTab: 'basicProperties'
74
80
  }
@@ -53,7 +53,7 @@
53
53
  <el-row>
54
54
  <el-col :span="12">
55
55
  <el-form-item :label="$t('workflowEditor.process.system')" prop="model.systemCode" :rules="[requiredRule]">
56
- <el-select v-model="model.systemCode" :placeholder="$t('workflowEditorMessage.pleaseSelect')">
56
+ <el-select v-model="model.systemCode" :placeholder="$t('workflowEditorMessage.pleaseSelect')" @change="changeSystem(model.systemCode, null)">
57
57
  <el-option
58
58
  v-for="item in allSystems"
59
59
  :key="item.code"
@@ -63,12 +63,26 @@
63
63
  </el-select>
64
64
  </el-form-item>
65
65
  </el-col>
66
+ <el-col :span="12">
67
+ <el-form-item :label="$t('workflowEditor.process.systemVersion')" :rules="[requiredRule]">
68
+ <el-select v-model="systemPublishVersion" :placeholder="$t('workflowEditorMessage.pleaseSelect')" @change="changeVersion">
69
+ <el-option
70
+ v-for="item in systems"
71
+ :key="item.publishVersion"
72
+ :label="item.publishVersion"
73
+ :value="item.publishVersion"
74
+ />
75
+ </el-select>
76
+ </el-form-item>
77
+ </el-col>
78
+ </el-row>
79
+ <el-row>
66
80
  <el-col :span="12">
67
81
  <el-form-item :label="$t('workflowEditor.process.affiliatedBranch')">
68
82
  <el-select v-model="model.branchCode" clearable :placeholder="$t('workflowEditorMessage.pleaseSelect')">
69
83
  <el-option
70
- v-for="item in allBranches"
71
- :key="item.code"
84
+ v-for="(item, index) in allBranches"
85
+ :key="item.code+'-'+index"
72
86
  :label="item.name"
73
87
  :value="item.code"
74
88
  />
@@ -82,11 +96,12 @@
82
96
  </el-form>
83
97
  </template>
84
98
  <script>
85
- import { mapMutations } from 'vuex'
99
+ import { mapGetters, mapMutations } from 'vuex'
86
100
  import processService from '../../process-service'
87
101
  import { getI18n } from '../../../../workflow-editor/src/util'
88
102
  import i18nInput from '../common/i18n-input'
89
103
  import { getUsername } from 'imatrix-ui/src/utils/auth'
104
+ import authApi from 'imatrix-ui/src/utils/auth-api'
90
105
  export default {
91
106
  name: 'BasicProperties',
92
107
  components: {
@@ -128,22 +143,40 @@ export default {
128
143
  trigger: 'blur'
129
144
  },
130
145
  isSelectAdmin: false,
131
- selectedForm: []
146
+ selectedForm: [],
147
+ systemPublishVersion: null,
148
+ sysCode: null,
149
+ systems: []
150
+
132
151
  }
133
152
  },
153
+ computed: {
154
+ ...mapGetters('wfEditor', [
155
+ 'systemVersion', 'systemCode'
156
+ ])
157
+ },
134
158
  created() {
135
159
  this.getAdminNameWhenUpdate()
136
- this.listAllForms()
160
+ // this.listAllForms()
137
161
  this.listAllProcessTypes()
138
162
  this.listAllSystems()
139
163
  this.listAllBranches()
140
164
  // TODO 流程创建人先写死,现在的资源路径都是匿名的无法获得当前用户
141
165
  // this.model.creator = 'admin'
142
- if(!this.model.creator){
166
+ if (!this.model.creator) {
143
167
  this.model.creator = getUsername()
144
168
  }
145
169
  this.setProcessCode(this.formModel.code)
146
- this.setSystemCode(this.model.systemCode)
170
+ if (this.model.systemCode) {
171
+ // 编辑修改流程
172
+ this.setSystemCode(this.model.systemCode)
173
+ } else {
174
+ // 新建流程, model systemCode为空
175
+ this.model.systemCode = this.systemCode
176
+ }
177
+ this.systemPublishVersion = parseInt(authApi.getSessionCache('wf_editor_systemVersion'))
178
+ this.changeSystem(this.systemCode, this.systemPublishVersion)
179
+ this.listAllForms(this.systemCode, this.systemPublishVersion)
147
180
  },
148
181
  mounted() {
149
182
  // 支持.snyc修饰符的写法
@@ -157,11 +190,15 @@ export default {
157
190
  this.$watch('model.systemCode', function(newVal, oldVal) {
158
191
  this.setSystemCode(newVal)
159
192
  })
193
+ this.$watch('systemPublishVersion', function(newVal, oldVal) {
194
+ this.setSystemVersion(newVal)
195
+ })
160
196
  },
161
197
  methods: {
162
198
  ...mapMutations('wfEditor', [
163
199
  'setFormFields',
164
200
  'setSystemCode',
201
+ 'setSystemVersion',
165
202
  'setProcessCode'
166
203
  ]),
167
204
  handleChange(values) {
@@ -171,7 +208,7 @@ export default {
171
208
  this.model.formCode = formInfo.substring(formInfo.indexOf('/') + 1, formInfo.lastIndexOf('/'))
172
209
  this.model.formVersion = formInfo.substring(formInfo.lastIndexOf('/') + 1)
173
210
  // 表单改变时,重新获取表单字段并放到vuex中
174
- processService.fetchFormFields(this.model.formCode, this.model.formVersion)
211
+ processService.fetchFormFields(this.model.formCode, this.model.formVersion, this.systemPublishVersion)
175
212
  },
176
213
  // 弹出人员树
177
214
  selectAdmin() {
@@ -196,8 +233,8 @@ export default {
196
233
  this.isSelectAdmin = false
197
234
  },
198
235
  // 获得对应表单列表
199
- listAllForms() {
200
- this.$http.get(this.baseAPI + '/wf-editor/workflow-editors/forms').then(systemAndForms => {
236
+ listAllForms(systemCode, publishVersion) {
237
+ this.$http.get(this.baseAPI + '/wf-editor/workflow-editors/forms?systemCode=' + systemCode + '&publishVersion=' + publishVersion).then(systemAndForms => {
201
238
  // 设置表单信息
202
239
  const selectedFormInfo = this.model.formCode + '/' + this.model.formVersion
203
240
  // 修改时,获得默认选中的表单项
@@ -266,6 +303,20 @@ export default {
266
303
  },
267
304
  setI18nValue(i18nKey) {
268
305
  this.model.i18nKey = i18nKey
306
+ },
307
+ changeSystem(systemCode, systemPublishVersion) {
308
+ this.systemPublishVersion = systemPublishVersion
309
+ this.allForms = []
310
+ this.$http.get(this.baseAPI + '/wf-editor/systems/getPublishVersionsByCode/' + systemCode).then(result => {
311
+ if (result) {
312
+ this.systems = result
313
+ } else {
314
+ this.systems = []
315
+ }
316
+ })
317
+ },
318
+ changeVersion() {
319
+ this.listAllForms(this.model.systemCode, this.systemPublishVersion)
269
320
  }
270
321
  }
271
322
  }
@@ -28,6 +28,8 @@
28
28
 
29
29
  // import modulePageService from '@/subsystems/mms/api/module-page'
30
30
  import Vue from 'vue'
31
+ import { mapGetters } from 'vuex'
32
+ import authApi from 'imatrix-ui/src/utils/auth-api'
31
33
 
32
34
  export default {
33
35
  props: {
@@ -43,6 +45,11 @@ export default {
43
45
  selection: []
44
46
  }
45
47
  },
48
+ computed: {
49
+ ...mapGetters('wfEditor', [
50
+ 'systemVersion'
51
+ ])
52
+ },
46
53
  watch: {
47
54
  conditionList: {
48
55
  handler(newValue, oldValue) {
@@ -53,7 +60,7 @@ export default {
53
60
  created() {
54
61
  this.baseURL = Vue.prototype.baseURL
55
62
  if (this.pageFormCode) {
56
- this.listURL = '/wf-editor/workflow-editors/modulePages/' + this.pageFormCode
63
+ this.listURL = '/wf-editor/workflow-editors/modulePages/' + this.pageFormCode + '/' + parseInt(authApi.getSessionCache('wf_editor_systemVersion'))
57
64
  }
58
65
  },
59
66
  methods: {
@@ -26,7 +26,8 @@
26
26
  <notice-settings v-model="model.properties.inform" />
27
27
  </el-tab-pane>
28
28
  <el-tab-pane :label="$t('workflowEditor.process.reminderSettings')" name="reminders">
29
- <reminder v-model="model.properties.reminder" />
29
+ <!-- <reminder v-model="model.properties.reminder" /> -->
30
+ <notice-reminder :reminder-value="model.properties.reminder" :task-notice-value="model.properties.taskNotice" />
30
31
  </el-tab-pane>
31
32
  <el-tab-pane :label="$t('workflowEditor.process.parameterSsetting')" name="parameterSettings">
32
33
  <parameter-settings :model="model.properties.parameterSettings" />
@@ -44,21 +45,23 @@
44
45
  import convert from 'xml-js'
45
46
  import BasicProperties from './process/basic-properties'
46
47
  import PermissionSettings from './process/permission-settings'
47
- import Reminder from './common/reminder'
48
+ // import Reminder from './common/reminder'
48
49
  import ParameterSettings from './process/parameter-settings'
49
50
  import Events from './process/events'
50
51
  import Variables from './common/variables'
51
52
  import NoticeSettings from './process/notice-settings.vue'
53
+ import NoticeReminder from './common/notice-reminder.vue'
52
54
  export default {
53
55
  name: 'ProcessPropertiesEditor',
54
56
  components: {
55
57
  BasicProperties,
56
58
  PermissionSettings,
57
- Reminder,
59
+ // Reminder,
58
60
  ParameterSettings,
59
61
  Events,
60
62
  Variables,
61
- NoticeSettings
63
+ NoticeSettings,
64
+ NoticeReminder
62
65
  },
63
66
  props: {
64
67
  model: {
@@ -70,6 +73,9 @@ export default {
70
73
  // if (this.model.properties.inform === undefined) {
71
74
  // this.model.properties.inform = {}
72
75
  // }
76
+ if (this.model.properties.taskNotice === undefined) {
77
+ this.model.properties.taskNotice = {}
78
+ }
73
79
  return {
74
80
  activeTab: 'basicProperties'
75
81
  }
@@ -22,6 +22,7 @@ const getters = {
22
22
  processCode: state => state.processCode,
23
23
  processI18n: state => state.processI18n,
24
24
  subtableConditionMap: state => state.subtableConditionMap,
25
- propSettingKeyList: state => state.propSettingKeyList
25
+ propSettingKeyList: state => state.propSettingKeyList,
26
+ systemVersion: state => state.systemVersion
26
27
  }
27
28
  export default getters
@@ -118,6 +118,9 @@ const wfEditor = {
118
118
  },
119
119
  setPropSettingKeyList(state, propSettingKeyList) {
120
120
  state.propSettingKeyList = propSettingKeyList
121
+ },
122
+ setSystemVersion(state, systemVersion) {
123
+ state.systemVersion = systemVersion
121
124
  }
122
125
  }
123
126
  }
@@ -99,6 +99,7 @@ import processService from './process-service'
99
99
  import FileSaver from 'file-saver'
100
100
  import Prism from 'prismjs'
101
101
  import AdminSaveDialog from './main/admin-save-dialog'
102
+ import authApi from 'imatrix-ui/src/utils/auth-api'
102
103
  export default {
103
104
  name: 'WorkflowEditor',
104
105
  components: {
@@ -127,6 +128,16 @@ export default {
127
128
  readonly: {
128
129
  type: Boolean,
129
130
  default: false
131
+ },
132
+ // 系统编码,新增时选中的系统编码,或修改时流程定义所属的系统编码
133
+ systemCode: {
134
+ type: String,
135
+ default: null
136
+ },
137
+ // 系统版本号,修改时流程定义中的系统版本号,例如:v1.0.0,新增不会使用该属性
138
+ systemPublishVersion: {
139
+ type: Number,
140
+ default: null
130
141
  }
131
142
  },
132
143
  data: function() {
@@ -143,7 +154,7 @@ export default {
143
154
  },
144
155
  computed: {
145
156
  ...mapGetters(
146
- 'wfEditor', ['componentToDraw', 'taches', 'transitions', 'contextMenuVisible']
157
+ 'wfEditor', ['componentToDraw', 'taches', 'transitions', 'contextMenuVisible', 'systemVersion']
147
158
  ),
148
159
  ...mapGetters([
149
160
  'sidebar'
@@ -163,6 +174,10 @@ export default {
163
174
  }
164
175
  },
165
176
  created: function() {
177
+ authApi.setSessionCache('wf_editor_systemVersion', this.systemPublishVersion)
178
+ if (this.systemCode) {
179
+ this.setSystemCode(this.systemCode)
180
+ }
166
181
  // 打开或新建流程图时先清空画布,开发过程中代码热更新的时候可以避免节点重复
167
182
  this.clearCanvas()
168
183
  if (this.id) {
@@ -181,7 +196,6 @@ export default {
181
196
  }
182
197
  },
183
198
  mounted: function() {
184
-
185
199
  },
186
200
  methods: {
187
201
  ...mapMutations('wfEditor', [
@@ -189,6 +203,7 @@ export default {
189
203
  'clearCanvas',
190
204
  'setContextMenuVisible',
191
205
  'setSystemCode',
206
+ 'setSystemVersion',
192
207
  'setProcessCode'
193
208
  ]),
194
209
  showContextMenu(event) {
@@ -208,6 +223,9 @@ export default {
208
223
  this.process = processObj.process
209
224
  if (this.process && this.process.properties && this.process.properties.basicProperties) {
210
225
  this.setSystemCode(this.process.properties.basicProperties.systemCode)
226
+ } else {
227
+ // 新增时,将传过来的系统编码缓存起来
228
+ this.setSystemCode(this.systemCode)
211
229
  }
212
230
  if (this.process && this.process.attr) {
213
231
  this.setProcessCode(this.process.attr.code)
@@ -223,7 +241,7 @@ export default {
223
241
  const formVersion = processProperties.formVersion
224
242
  if (formCode && formCode !== '' && formVersion) {
225
243
  // 取出formFields放到vuex中
226
- processService.fetchFormFields(processProperties.formCode, processProperties.formVersion)
244
+ processService.fetchFormFields(processProperties.formCode, processProperties.formVersion, this.systemPublishVersion)
227
245
  }
228
246
  },
229
247
  packageUrlParam(url) {
@@ -301,7 +319,8 @@ export default {
301
319
  } else {
302
320
  // 表示新建
303
321
  const param = {
304
- xml: xml
322
+ xml: xml,
323
+ publishVersion: this.systemPublishVersion
305
324
  }
306
325
  this.$http.post(this.baseAPI + '/wf-editor/workflow-definitions', param).then(definition => {
307
326
  this.definitionId = definition.id
@@ -323,7 +342,8 @@ export default {
323
342
  },
324
343
  packageSaveXmlParam(xml) {
325
344
  const param = {
326
- xml: xml
345
+ xml: xml,
346
+ publishVersion: this.systemPublishVersion
327
347
  }
328
348
  if (this.definitionId) {
329
349
  // 表示已保存过,新流程定义的id
package/src/i18n/i18n.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue'
2
- import locale from '@gcommon/gcommon-ui/lib/locale'
2
+ import locale from 'element-ui/lib/locale'
3
3
  import VueI18n from 'vue-i18n'
4
4
  import en from './langs/en'
5
5
  import cn from './langs/cn'