cloud-web-corejs 1.0.54-dev.628 → 1.0.54-dev.629

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.628",
4
+ "version": "1.0.54-dev.629",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -5,6 +5,7 @@
5
5
  :key="widget.id" @click.native.stop="selectWidget(widget)" :visible="!widget.options.hidden">
6
6
  <template #button>
7
7
  <!-- <el-button class="button-sty" icon="el-icon-search" v-if="widget.options.tableRef">新增</el-button>-->
8
+
8
9
  <div class="grid-cell">
9
10
  <draggable
10
11
  :list="widget.buttonWidgetList"
@@ -21,7 +22,7 @@
21
22
  :is="subWidget.type + '-widget'"
22
23
  :widget="subWidget"
23
24
  :designer="designer"
24
- :key="subWidget.id"
25
+ :key="subWidget.id"
25
26
  :parent-list="widget.buttonWidgetList"
26
27
  :index-of-parent-list="swIdx"
27
28
  :parent-widget="widget"
@@ -145,7 +146,7 @@ export default {
145
146
  methods: {
146
147
  checkContainerMove(evt) {
147
148
  return true;
148
- }
149
+ },
149
150
  }
150
151
  }
151
152
  </script>
@@ -120,7 +120,9 @@ export default {
120
120
  let datas = $grid.getTableData().tableData;
121
121
  let fieldKey = this.fieldKey;
122
122
  this.checkRows.forEach((checkRow) => {
123
- let row = datas.find((row) => row[fieldKey] == checkRow[fieldKey]);
123
+ let row = datas.find(
124
+ (row) => row[fieldKey] == checkRow[fieldKey]
125
+ );
124
126
  if (row) {
125
127
  $grid.setCheckboxRow(row, true);
126
128
  }
@@ -168,7 +170,9 @@ export default {
168
170
  width: "1200px",
169
171
  fullscreen: this.option.fullscreen,
170
172
  };
171
- config = Object.assign({}, config, this.option.dialogConfig, { customClass });
173
+ config = Object.assign({}, config, this.option.dialogConfig, {
174
+ customClass,
175
+ });
172
176
  config.title = this.$t1(config.title);
173
177
  return config;
174
178
  },
@@ -181,7 +185,9 @@ export default {
181
185
  if (this.option.showFooter == false) {
182
186
  classStr = classStr + " nfootBtn";
183
187
  }
184
- config = Object.assign({}, config, this.option.bodyConfig, { class: classStr });
188
+ config = Object.assign({}, config, this.option.bodyConfig, {
189
+ class: classStr,
190
+ });
185
191
  return config;
186
192
  },
187
193
  },
@@ -233,7 +239,9 @@ export default {
233
239
  : {};
234
240
  this.layoutType = this.formJson.formConfig.layoutType;
235
241
  let formConfig = this.formJson.formConfig;
236
- if (formConfig.searchDialogUniqueField) {
242
+ if (this.options.fieldKey) {
243
+ this.fieldKey = this.options.fieldKey;
244
+ } else if (formConfig.searchDialogUniqueField) {
237
245
  this.fieldKey = formConfig.searchDialogUniqueField;
238
246
  }
239
247
  /*this.$nextTick(() => {
@@ -268,7 +276,8 @@ export default {
268
276
  return this.$grid;
269
277
  },
270
278
  initShowFormField() {
271
- let showFormField = this.formJson.formConfig.searchDialogNameField || null;
279
+ let showFormField =
280
+ this.formJson.formConfig.searchDialogNameField || null;
272
281
  if (!showFormField) {
273
282
  // let widgetList = this.formJson.widgetList;
274
283
  let dataTableWidget = this.getDataTableWidget();
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="{ 'has-logo': showLogo }">
2
+ <div :class="{ 'has-logo': showLogo,telescopMenu:!isMenu }">
3
3
  <!-- <logo v-if="showLogo" :collapse="isCollapse" /> -->
4
4
 
5
5
  <div class="hamburger-box" ref="hamhurger" @click="openUserInfo">
@@ -122,6 +122,7 @@
122
122
  :unique-opened="true"
123
123
  @mouseleave="showNav()"
124
124
  ref="seconMenus"
125
+ :collapse="!isMenu"
125
126
  >
126
127
  <el-scrollbar wrap-class="scrollbar-wrapper" id="menuUl">
127
128
  <el-submenu
@@ -268,6 +269,9 @@ import createCompanyDialog from "@base/layout/components/createCompany/createCom
268
269
  export default {
269
270
  props: {
270
271
  option: Object,
272
+ isMenu: {
273
+ type: Boolean
274
+ }
271
275
  },
272
276
  components: {
273
277
  userInfo,
@@ -844,6 +848,7 @@ export default {
844
848
  font-size: 12px;
845
849
  color: rgba(255, 255, 255, 0.65);
846
850
 
851
+
847
852
  > div {
848
853
  color: #fff;
849
854
  font-size: 13px;
@@ -887,6 +892,7 @@ export default {
887
892
  line-height: 16px;
888
893
  overflow: hidden;
889
894
  vertical-align: middle;
895
+ white-space: nowrap;
890
896
  }
891
897
 
892
898
  &.name {
@@ -910,7 +916,7 @@ export default {
910
916
  text-align: center;
911
917
 
912
918
  p {
913
- margin: 0;
919
+ margin: 0;display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
914
920
  }
915
921
  }
916
922
 
@@ -1420,7 +1426,6 @@ export default {
1420
1426
  }
1421
1427
  }
1422
1428
  }
1423
-
1424
1429
  // .el-submenu .el-menu {
1425
1430
  // height: auto !important;
1426
1431
  // }
@@ -1,10 +1,15 @@
1
1
  <template>
2
- <defaultView></defaultView>
2
+ <defaultView :isMenu.sync="isMenu"></defaultView>
3
3
  </template>
4
4
 
5
5
  <script>
6
6
  import defaultView from "./default.vue";
7
7
  export default {
8
+ props: {
9
+ isMenu: {
10
+ type: Boolean
11
+ }
12
+ },
8
13
  data() {
9
14
  return {};
10
15
  },
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <div id="tags-view-container" class="navbar-tag">
3
+ <div @click="$baseEventBus.$emit('triggerMenu')" class="telescopMenuIcon"><i class="iconfont" :class="isMenu?'icon-shouqi':'icon-shouqi-copy'"></i></div>
3
4
  <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
4
5
  <router-link
5
6
  v-for="tag in visitedViews"
@@ -63,6 +64,11 @@ import path from 'path'
63
64
 
64
65
  export default {
65
66
  components: {ScrollPane},
67
+ props: {
68
+ isMenu: {
69
+ type: Boolean
70
+ }
71
+ },
66
72
  data() {
67
73
  return {
68
74
  visible: false,
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <div class="app-wrapper openSidebar">
3
- <sidebar class="sidebar-container" :class="{ hoverold: hoverSidebar }" @selfClose="hoverSidebar = false"
4
- @selfEnter="hoverSidebar = true"/>
5
- <div class="main-container">
6
- <div class="fixed-header">
7
- <tags-view v-if="needTagsView"/>
2
+ <div :class="{'app-wrapper openSidebar':showSidebar,'empty-home-wrapper':!showSidebar}">
3
+ <sidebar v-show="showSidebar" class="sidebar-container" :class="{ hoverold: hoverSidebar }" @selfClose="hoverSidebar = false"
4
+ @selfEnter="hoverSidebar = true" :isMenu.sync="isMenu"/>
5
+ <div :class="{'main-container':showSidebar,telescopMenu:!isMenu}">
6
+ <div class="fixed-header" v-show="showSidebar">
7
+ <tags-view v-if="needTagsView" :isMenu.sync="isMenu"/>
8
8
  </div>
9
9
  <app-main v-if="showAppMain" ref="appMain"/>
10
10
  </div>
@@ -38,6 +38,10 @@ export default {
38
38
  withoutAnimation: this.sidebar.withoutAnimation,
39
39
  mobile: this.device === 'mobile'
40
40
  };
41
+ },
42
+ showSidebar() {
43
+ let result = true
44
+ return result;
41
45
  }
42
46
  },
43
47
  data() {
@@ -45,7 +49,8 @@ export default {
45
49
  hoverSidebar: false,
46
50
  showAppMain: false,
47
51
  showModifyPasswordDialog: true,
48
- passwordStatus: 2
52
+ passwordStatus: 2,
53
+ isMenu:true
49
54
  };
50
55
  },
51
56
  created() {
@@ -57,6 +62,9 @@ export default {
57
62
  success: res => {
58
63
  }
59
64
  });
65
+ this.$baseEventBus.$on("triggerMenu",(value)=>{
66
+ this.isMenu = !this.isMenu;
67
+ });
60
68
  },
61
69
  async mounted() {
62
70
  if (sessionStorage.getItem('toHome') == '1') {
@@ -120,7 +128,7 @@ export default {
120
128
  padding-top: 2px;
121
129
  //box-shadow:0 2px 6px rgba(0,0,0,0.04);
122
130
  //background:#FFF;
123
- border-bottom: solid 2px $baseColor;
131
+ // border-bottom: solid 2px $baseColor;
124
132
  display: -moz-box;
125
133
  display: -webkit-box;
126
134
  display: box;
@@ -0,0 +1,411 @@
1
+ import tableForm from "@base/components/table/tableForm.vue";
2
+ import editView from "@base/views/bd/setting/form_template/edit.vue";
3
+ import itemList from "@base/views/bd/setting/form_template/itemList.vue";
4
+ import formScriptList from "@base/views/bd/setting/form_script/form_list.vue";
5
+ import indexUtil from "@base/utils";
6
+ import {getBdFlag} from "@base/api/user";
7
+ import designer from "@base/views/user/form/vform/designer.vue";
8
+ import {getJsxBtnList, getJsxStatus} from "@base/views/bd/setting/utils/index";
9
+
10
+ let modules = {};
11
+ modules = {
12
+ name: 'bd_form_template:list',
13
+ components: {
14
+
15
+ tableForm,
16
+ editView,
17
+ itemList,
18
+ formScriptList,
19
+ designer
20
+ },
21
+ data() {
22
+ return {
23
+ isFullscreen: false,
24
+ formDesTabs: 'first',
25
+ activeName: 'second',
26
+ dataId: 0,
27
+ showEdit: false,
28
+ vxeOption: {},
29
+ formData: {},
30
+ showDesingerDialog: false,
31
+ formCode: null,
32
+ formName: null,
33
+ templateId: null,
34
+ currentFormTemplate: null,
35
+
36
+ showItemEdit: false,
37
+ showParamEdit: false,
38
+ vxeOption1: {},
39
+ editId: '',
40
+ itemEditId: '',
41
+ pRow: null,
42
+ currentRow: {},
43
+ serviceId: null,
44
+ itemServiceId: null,
45
+
46
+ showWfDialog: false,
47
+ wfUrl: '',
48
+ ph: '',
49
+ dialogActiveName: 'first',
50
+ showFunctionScriptList: false,
51
+ showUserDialog: false,
52
+ wfAssignData: [],
53
+ wfAssignCallback: null,
54
+ wfAssignMulti: true,
55
+
56
+ showPositionDialog: false,
57
+ wfAssignPositionData: [],
58
+ wfAssignPositionCallback: null,
59
+
60
+ showFormTemplateDialog: false,
61
+ wfAssignFormTemplateCallback: null,
62
+
63
+ showScriptDescriptionDialog: false,
64
+ showWfDiyAttributeEdit: false,
65
+
66
+ showFtHistoryDialog: false,
67
+ operateFtHistory: null,
68
+
69
+ defaultProps: {
70
+ label: 'name', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
71
+ children: [],
72
+ isLeaf: 'leaf'
73
+ },
74
+ showItemView: false,
75
+
76
+ currentFormType: {},
77
+ editFormTypeId: null,
78
+ showFormTypeDialog: false,
79
+ showFormScriptList: false,
80
+ addProjectTagOption: {
81
+ url: USER_PREFIX + `/formTemplate/saveTag`,
82
+ tableDatas: () => {
83
+ return this.$refs["table-m1"].getCheckboxRecords(true);
84
+ },
85
+ reqData: (tagDatas, tableDatas) => {
86
+ let sids = tableDatas.map(item => item.sid);
87
+ let tagCodes = tagDatas.map(item => item.tagCode);
88
+ let reqData = {
89
+ tagCodes,
90
+ sids
91
+ };
92
+ return reqData;
93
+ },
94
+ callback: () => {
95
+ this.searchEvent()
96
+ }
97
+ },
98
+ deleteProjectTagOption: {
99
+ url: USER_PREFIX + `/formTemplate/deleteTag`,
100
+ tableDatas: () => {
101
+ return this.$refs["table-m1"].getCheckboxRecords(true);
102
+ },
103
+ reqData: (tagDatas, tableDatas) => {
104
+ let sids = tableDatas.map(item => item.sid);
105
+ let tagCodes = tagDatas.map(item => item.tagCode);
106
+ let reqData = {
107
+ tagCodes,
108
+ sids
109
+ };
110
+ return reqData;
111
+ },
112
+ callback: () => {
113
+ this.searchEvent()
114
+ }
115
+ },
116
+ showProjectTagDialog3: false,
117
+ checkTags: [],
118
+ isDev: true,
119
+ menuKindAuth: {},
120
+ showTree: false,
121
+
122
+ showWfObjConfigDialog: false,
123
+ formTemplate: null
124
+ };
125
+ },
126
+ computed: {
127
+ currentMenuKindId() {
128
+ return this.currentFormType?.id || null
129
+ },
130
+ currentMenuKindName() {
131
+ return this.currentFormType?.name || null
132
+ }
133
+ },
134
+ watch: {
135
+ formDesTabs(val) {
136
+ if (this.showFormScriptList == false && val == 'second') {
137
+ this.showFormScriptList = true;
138
+ }
139
+ }
140
+ },
141
+ mounted() {
142
+ this.getBdEnv();
143
+ this.initTableList();
144
+ this.initWfWinParam();
145
+ },
146
+ methods: {
147
+ searchEvent() {
148
+ this.$refs['table-m1'].commitProxy('reload');
149
+ },
150
+ resetEvent() {
151
+ this.formData = {};
152
+ this.checkTags = [];
153
+ this.$refs['table-m1'].commitProxy('reload');
154
+ },
155
+ openEditDialog(row) {
156
+ let formCode = row?.formCode || null;
157
+ /*this.dataId = !id || typeof id == 'object' ? 0 : id;
158
+ this.activeName = 'first';
159
+ this.showItemEdit = false;
160
+ this.$openEditView('showEdit');*/
161
+ if (!formCode) {
162
+ this.dataId = formCode;
163
+ this.activeName = 'first';
164
+ this.$openEditView('showEdit');
165
+ } else {
166
+ this.$refs.xTabs.openEditTab(row);
167
+ }
168
+
169
+ },
170
+ openDesingerDialog(row, callback) {
171
+ this.formCode = row.formCode;
172
+ this.formName = row.formName;
173
+ this.currentFormTemplate = row;
174
+ this.isFullscreen = false;
175
+ this.showDesingerDialog = true;
176
+ this.designerSaveCallback = callback ?? null;
177
+ },
178
+ openDesingerDialogByChild({row, callback}) {
179
+ this.openDesingerDialog(row, callback)
180
+ },
181
+ reflushTemplateList() {
182
+ this.searchEvent();
183
+ this.designerSaveCallback && this.designerSaveCallback();
184
+ },
185
+ handleFullscreen() {
186
+ let isFullscreen = this.isFullscreen;
187
+ if (!isFullscreen) {
188
+ indexUtil.addClass(document.body, "hideMenu");
189
+ } else {
190
+ indexUtil.removeClass(document.body, "hideMenu");
191
+ }
192
+ this.isFullscreen = !isFullscreen;
193
+ },
194
+ openFtHistoryDialog(row) {
195
+ this.operateFtHistory = row;
196
+ this.showFtHistoryDialog = true;
197
+ },
198
+ confirmFtHistoryDialog(row) {
199
+ this.searchEvent();
200
+ },
201
+ closeFormDesignwinEvent(done) {
202
+ this.$baseConfirm(this.$t1('请确认"已保存"报表模板,是否继续关闭?')).then(() => {
203
+ indexUtil.removeClass(document.body, "hideMenu");
204
+ done && done();
205
+ });
206
+ },
207
+ getSearchParam() {
208
+ let tagCodes = null;
209
+ if (this.checkTags.length) {
210
+ tagCodes = this.checkTags.map(item => item.tagCode);
211
+ }
212
+ let currentFormType = this.currentFormType || {}
213
+ return {
214
+ ...this.formData,
215
+ tagCodes,
216
+ menuKindCode: currentFormType.menuKindCode || null,
217
+ history: false
218
+ };
219
+ },
220
+ initTableList() {
221
+ let that = this;
222
+ let tableOption = {
223
+ vue: this,
224
+ tableRef: 'table-m1',
225
+ tableName: 'bd_form_template_list-m2',
226
+ path: USER_PREFIX + '/formTemplate/listPageWf',
227
+ param: () => {
228
+ return this.getSearchParam();
229
+ },
230
+ columns: [
231
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
232
+ {
233
+ title: this.$t1('模板名称'),
234
+ field: 'formName',
235
+ width: 250,
236
+ fixed: 'left'
237
+ },
238
+ {
239
+ title: this.$t1('模板编码'),
240
+ field: 'formCode',
241
+ width: 250
242
+ },
243
+ {field: 'serviceName', title: this.$t1('服务名'), width: 150},
244
+ {
245
+ title: this.$t1('更新时间'),
246
+ field: 'modifyDate',
247
+ width: 150
248
+ },
249
+ {
250
+ title: this.$t1('创建时间'),
251
+ field: 'createDate',
252
+ width: 150
253
+ },
254
+ {
255
+ width: 120,
256
+ fixed: 'right',
257
+ title: '',
258
+ sortable: false,
259
+ slots: {
260
+ default: ({row}) => {
261
+ return getJsxBtnList([
262
+ {
263
+ iconName: "iconfont icon-liuchengguanli-shejiqi_liucheng",
264
+ content: this.$t1('流程单据维护'),
265
+ onclick: () => {
266
+ this.openWfObjConfigDialog(row);
267
+ }
268
+ }
269
+ ]);
270
+ }
271
+ }
272
+ }
273
+ ],
274
+ searchColumns: [
275
+ {title: this.$t1('模板名称'), field: "formName", type: "input", common: true},
276
+ {title: this.$t1('模板编码'), field: "formCode", type: "input", common: true}
277
+ ],
278
+ config: {
279
+
280
+ },
281
+ };
282
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
283
+ this.vxeOption = opts;
284
+ this.showTree = true;
285
+ });
286
+ },
287
+ chooseCellM1(row) {
288
+ this.currentRow = row;
289
+ this.showItemView = true;
290
+ },
291
+ openWfDesignDialog(actModelId) {
292
+ //wfType 0:单据流程,1:场景流程
293
+ let serviceId = this.currentRow.serviceName;
294
+ this.wfUrl = WEB_PREFIX + '/activiti-explorer/modeler.html?wfType=0&serviceId=' + serviceId + '&modelId=' + actModelId;
295
+ this.dialogActiveName = 'first';
296
+ this.showWfDialog = true;
297
+ },
298
+ closeDesignwinEvent(done) {
299
+ this.$baseConfirm(this.$t1('请确认"已保存"流程模板,是否继续关闭?')).then(() => {
300
+ this.showWfDialog = false;
301
+ // this.showDesingerDialog = false;
302
+ });
303
+ },
304
+ initWfWinParam() {
305
+ this.initCloseWfDesignWin();
306
+ this.initWinUserDialog();
307
+ this.initWinPositionDialog();
308
+ this.initSysParamForWf();
309
+ this.initWinFormTemplateDialog();
310
+ this.initWinScriptDescriptionDialog();
311
+ },
312
+ initCloseWfDesignWin() {
313
+ window.closeWfDesignWin = () => {
314
+ this.showWfDialog = false;
315
+ };
316
+ },
317
+ initWinUserDialog() {
318
+ window.openAssignUserDialog = opts => {
319
+ this.wfAssignMulti = opts.multi;
320
+ this.wfAssignData = opts.data || [];
321
+ this.wfAssignCallback = opts.callback;
322
+ this.showUserDialog = true;
323
+ };
324
+ },
325
+ confirmUser(rows) {
326
+ this.wfAssignCallback(rows);
327
+ },
328
+ initWinPositionDialog() {
329
+ window.openAssignPositionDialog = opts => {
330
+ this.wfAssignPositionData = opts.data || [];
331
+ this.wfAssignPositionCallback = opts.callback;
332
+ this.showPositionDialog = true;
333
+ };
334
+ },
335
+ initSysParamForWf() {
336
+ let webPrefix = WEB_PREFIX;
337
+ let baseApi = process.env.VUE_APP_BASE_API;
338
+ window.sysParamForWf = {
339
+ webPrefix,
340
+ baseApi
341
+ }
342
+ },
343
+ confirmPosition(rows) {
344
+ this.wfAssignPositionCallback(rows);
345
+ },
346
+ initWinFormTemplateDialog() {
347
+ window.openAssignFormTemplateDialog = opts => {
348
+ this.wfAssignFormTemplateCallback = opts.callback;
349
+ this.showFormTemplateDialog = true;
350
+ };
351
+ },
352
+ confirmFormTemplate(rows) {
353
+ this.wfAssignFormTemplateCallback(rows);
354
+ },
355
+ initWinScriptDescriptionDialog() {
356
+ window.openScriptDescriptionDialog = opts => {
357
+ this.showScriptDescriptionDialog = true;
358
+ };
359
+ },
360
+ handleFormDesignClose() {
361
+ this.formDesTabs = 'first';
362
+ this.showFormScriptList = false;
363
+ },
364
+ openProjectTagDialog3() {
365
+ this.showProjectTagDialog3 = true;
366
+ },
367
+ confirmProjectTagDialog3(rows) {
368
+ this.checkTags = rows;
369
+ },
370
+ getTabNames() {
371
+ return this.checkTags.map(item => item.tagName).join(",");
372
+ },
373
+ jsonImport() {
374
+ this.$jsonImport({
375
+ saveUrl: USER_PREFIX + '/form_develop/importFormTemplate',
376
+ showResult: true,
377
+ resultColumns: [
378
+ {title: this.$t1('模板名称'), field: "formName", type: "input", common: true},
379
+ {title: this.$t1('模板编码'), field: "formCode", type: "input", common: true},
380
+ ],
381
+ callback: () => {
382
+ this.searchEvent();
383
+ }
384
+ });
385
+ },
386
+ jsonExport() {
387
+ this.$jsonExport({
388
+ targetRef: "table-m1",
389
+ url: USER_PREFIX + "/form_develop/exportFormTemplate",
390
+ abcEnabled: true,
391
+ editAuth: this.currentFormType.editAuth,
392
+ selectTypeAuth: this.currentFormType.selectTypeAuth
393
+ })
394
+ },
395
+ getBdEnv() {
396
+ getBdFlag({
397
+ success: res => {
398
+ this.isDev = res.objx == 1
399
+ }
400
+ });
401
+ },
402
+ openWfObjConfigDialog(row) {
403
+ this.formTemplate = row;
404
+ this.showWfObjConfigDialog = true;
405
+
406
+ },
407
+ confirmWfObjConfigDialog() {
408
+ }
409
+ }
410
+ };
411
+ export default modules