cloud-web-corejs 1.0.121 → 1.0.123

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.
@@ -47,7 +47,7 @@
47
47
  <i class="el-icon-close el-icon"></i>
48
48
  {{ $t1('取 消') }}
49
49
  </el-button>
50
- <el-button type="primary" @click="dialogPrimary" class="button-sty">
50
+ <el-button type="primary" @click="confirmDialog" class="button-sty">
51
51
  <i class="el-icon-check el-icon"></i>
52
52
  {{ $t1('确 定') }}
53
53
  </el-button>
@@ -57,76 +57,9 @@
57
57
 
58
58
  <script>
59
59
  import {selectDialogMixins} from '@base/mixins/selectDialog/index.js';
60
+ import mixin from "./mixins/wfTaskUserRangeDialog";
60
61
 
61
62
  export default {
62
- props: ['visiable', 'multi', 'rows','rangeTableDatas', 'param','current_prefix','modelId','taskDefinitionKey'],
63
- mixins: [selectDialogMixins],
64
- created() {
65
- this.initSetting();
66
- },
67
- mounted() {
68
- this.initTableM1();
69
- },
70
- data() {
71
- var that = this;
72
- return {
73
- showDialog: true,
74
- falseValue: false,
75
- selectMulti: true,
76
- formData: {},
77
- vxeOption: {},
78
- tableData: [],
79
- fieldKey:"userId"
80
- };
81
- },
82
- methods: {
83
- initTableM1() {
84
- this.tableData = this.$baseLodash.cloneDeep(this.rangeTableDatas || []);
85
- let that = this;
86
- let tableOption = {
87
- vue: that,
88
- tableRef: 'table-m1',
89
- tableName: 'wf_task_user_range_dialog-m1',
90
- /*path: this.current_prefix + '/wf_task_user_range/list',
91
- param: () => {
92
- return {
93
- modelId:this.modelId,
94
- taskDefinitionKey:this.taskDefinitionKey,
95
- }
96
- }, */
97
- columns: [
98
- {type: 'checkbox', fixed: 'left', width: 48, resizable: false},
99
- {
100
- title: this.$t1('候选人姓名'),
101
- field: 'nickName',
102
- width: 250,
103
- fixed: 'left'
104
- },
105
- {
106
- width: 47,
107
- fixed: 'right',
108
- title: '',
109
- sortable: false
110
- }
111
- ],
112
- config: {
113
- checkboxConfig: {
114
- checkStrictly: true,
115
- showHeader: this.selectMulti,
116
- trigger: 'row'
117
- },
118
- /* proxyConfig: {
119
- props: {
120
- result: "objx",
121
- total: "objx.length",
122
- }
123
- } */
124
- }
125
- };
126
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
127
- that.vxeOption = opts;
128
- });
129
- }
130
- }
63
+ mixins: [selectDialogMixins,mixin]
131
64
  };
132
65
  </script>
@@ -1,105 +1,131 @@
1
1
  <template>
2
- <form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
3
- :parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
4
- :sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
5
- <el-input-number ref="fieldEditor" v-model="fieldModel" class="full-width-input"
6
- :disabled="field.options.disabled"
7
- :size="field.options.size" :controls-position="field.options.controlsPosition"
8
- :placeholder="getI18nLabel(field.options.placeholder)"
9
- :min="field.options.min" :max="field.options.max"
10
- :precision="field.options.precision" :step="field.options.step"
11
- @focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
12
- @change="handleChangeEvent"
13
- :class="[field.options.showbutton ? '' : 'noButton']"
14
- >
2
+ <form-item-wrapper
3
+ :designer="designer"
4
+ :field="field"
5
+ :rules="rules"
6
+ :design-state="designState"
7
+ :parent-widget="parentWidget"
8
+ :parent-list="parentList"
9
+ :index-of-parent-list="indexOfParentList"
10
+ :sub-form-row-index="subFormRowIndex"
11
+ :sub-form-col-index="subFormColIndex"
12
+ :sub-form-row-id="subFormRowId"
13
+ >
14
+ <el-input-number
15
+ ref="fieldEditor"
16
+ v-model="numberValue"
17
+ class="full-width-input"
18
+ :disabled="field.options.disabled"
19
+ :size="field.options.size"
20
+ :controls-position="field.options.controlsPosition"
21
+ :placeholder="getI18nLabel(field.options.placeholder)"
22
+ :min="field.options.min"
23
+ :max="field.options.max"
24
+ :precision="field.options.precision"
25
+ :step="field.options.step"
26
+ @focus="handleFocusCustomEvent"
27
+ @blur="handleBlurCustomEvent"
28
+ @change="handleChangeEvent"
29
+ :class="[field.options.showbutton ? '' : 'noButton']"
30
+ >
15
31
  </el-input-number>
16
32
  </form-item-wrapper>
17
33
  </template>
18
34
 
19
35
  <script>
20
- import FormItemWrapper from './form-item-wrapper'
21
- import emitter from '../../../../../components/xform/utils/emitter'
22
- import i18n from "../../../../../components/xform/utils/i18n";
23
- import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
36
+ import FormItemWrapper from "./form-item-wrapper";
37
+ import emitter from "../../../../../components/xform/utils/emitter";
38
+ import i18n from "../../../../../components/xform/utils/i18n";
39
+ import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
24
40
 
25
- export default {
26
- name: "number-widget",
27
- componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
28
- mixins: [emitter, fieldMixin, i18n],
29
- props: {
30
- field: Object,
31
- parentWidget: Object,
32
- parentList: Array,
33
- indexOfParentList: Number,
34
- designer: Object,
35
-
36
- designState: {
37
- type: Boolean,
38
- default: false
39
- },
40
-
41
- subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
42
- type: Number,
43
- default: -1
44
- },
45
- subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
46
- type: Number,
47
- default: -1
48
- },
49
- subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
50
- type: String,
51
- default: ''
52
- },
41
+ export default {
42
+ name: "number-widget",
43
+ componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
44
+ mixins: [emitter, fieldMixin, i18n],
45
+ props: {
46
+ field: Object,
47
+ parentWidget: Object,
48
+ parentList: Array,
49
+ indexOfParentList: Number,
50
+ designer: Object,
53
51
 
52
+ designState: {
53
+ type: Boolean,
54
+ default: false,
54
55
  },
55
- components: {
56
- FormItemWrapper,
56
+
57
+ subFormRowIndex: {
58
+ /* 子表单组件行索引,从0开始计数 */ type: Number,
59
+ default: -1,
57
60
  },
58
- inject: ['refList', 'globalOptionData', 'globalModel'],
59
- data() {
60
- return {
61
- oldFieldValue: null, //field组件change之前的值
62
- fieldModel: undefined,
63
- rules: [],
64
- }
61
+ subFormColIndex: {
62
+ /* 子表单组件列索引,从0开始计数 */ type: Number,
63
+ default: -1,
65
64
  },
66
- computed: {
67
-
65
+ subFormRowId: {
66
+ /* 子表单组件行Id,唯一id且不可变 */ type: String,
67
+ default: "",
68
68
  },
69
- beforeCreate() {
70
- /* 这里不能访问方法和属性!! */
69
+ },
70
+ components: {
71
+ FormItemWrapper,
72
+ },
73
+ inject: ["refList", "globalOptionData", "globalModel"],
74
+ data() {
75
+ return {
76
+ oldFieldValue: null, //field组件change之前的值
77
+ fieldModel: null,
78
+ rules: [],
79
+ };
80
+ },
81
+ computed: {
82
+ numberValue: {
83
+ get() {
84
+ let fieldModel = this.fieldModel;
85
+ return fieldModel === null ? undefined : fieldModel;
86
+ },
87
+ set(val) {
88
+ let newValue = val === undefined ? null : val;
89
+ this.fieldModel = newValue
90
+ let currentData =
91
+ this.tableParam && this.tableParam.row
92
+ ? this.tableParam.row
93
+ : this.formModel;
94
+ currentData[this.fieldKeyName] = newValue;
95
+ },
71
96
  },
97
+ },
98
+ beforeCreate() {
99
+ /* 这里不能访问方法和属性!! */
100
+ },
72
101
 
73
- created() {
74
- /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
102
+ created() {
103
+ /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
75
104
  需要在父组件created中初始化!! */
76
- this.registerToRefList()
77
- this.initFieldModel()
78
- this.initEventHandler()
79
- this.buildFieldRules()
105
+ this.registerToRefList();
106
+ this.initFieldModel();
107
+ this.initEventHandler();
108
+ this.buildFieldRules();
80
109
 
81
- this.handleOnCreated()
82
- },
110
+ this.handleOnCreated();
111
+ },
83
112
 
84
- mounted() {
85
- this.handleOnMounted()
86
- },
113
+ mounted() {
114
+ this.handleOnMounted();
115
+ },
87
116
 
88
- beforeDestroy() {
89
- this.unregisterFromRefList()
90
- },
91
-
92
- methods: {
117
+ beforeDestroy() {
118
+ this.unregisterFromRefList();
119
+ },
93
120
 
94
- }
95
- }
121
+ methods: {},
122
+ };
96
123
  </script>
97
124
 
98
125
  <style lang="scss" scoped>
99
- @import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
100
-
101
- .full-width-input {
102
- width: 100% !important;
103
- }
126
+ @import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
104
127
 
128
+ .full-width-input {
129
+ width: 100% !important;
130
+ }
105
131
  </style>