mooho-base-admin-plus 2.5.36 → 2.6.0
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/history.md +2 -0
- package/package/mooho-base-admin-plus.min.esm.js +1441 -1395
- package/package/mooho-base-admin-plus.min.js +34 -34
- package/package/style.css +1 -1
- package/package.json +1 -1
- package/src/api/task.js +7 -0
- package/src/components/view/view-form.vue +7 -7
- package/src/components/view/view-table.vue +5 -5
- package/src/components/workflow/task-form.vue +14 -10
- package/src/pages/common/todo.vue +19 -8
package/package.json
CHANGED
package/src/api/task.js
CHANGED
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
:model-value="parseData(data, column.code)"
|
|
108
108
|
@update:model-value="$event => setData(data, column.code, $event)"
|
|
109
109
|
:readonly="readonly || column.isReadonly"
|
|
110
|
-
:clearable="
|
|
110
|
+
:clearable="!(readonly || column.isReadonly)"
|
|
111
111
|
:style="{ width: column.controlWidth == null ? null : column.controlWidth + 'px' }"
|
|
112
112
|
:maxlength="column.maxLength"
|
|
113
113
|
:placeholder="column.description"
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
:model-value="parseData(data, column.code)"
|
|
123
123
|
@update:model-value="$event => setData(data, column.code, $event)"
|
|
124
124
|
:readonly="readonly || column.isReadonly"
|
|
125
|
-
:clearable="
|
|
125
|
+
:clearable="!(readonly || column.isReadonly)"
|
|
126
126
|
:style="{ width: column.controlWidth == null ? '100px' : column.controlWidth + 'px' }"
|
|
127
127
|
:placeholder="column.description"
|
|
128
128
|
:max="column.maxValue"
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
:model-value="parseData(data, column.code)"
|
|
137
137
|
@update:model-value="$event => setData(data, column.code, $event)"
|
|
138
138
|
:disabled="readonly || column.isReadonly"
|
|
139
|
-
:clearable="
|
|
139
|
+
:clearable="!(readonly || column.isReadonly)"
|
|
140
140
|
:style="{
|
|
141
141
|
width: column.controlWidth == null ? null : column.controlWidth + 'px',
|
|
142
142
|
'min-width': column.controlWidth == null ? null : column.controlWidth + 'px'
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
@update:model-value="$event => setArrayData(data, column.code, $event)"
|
|
155
155
|
:disabled="readonly || column.isReadonly"
|
|
156
156
|
:multiple="true"
|
|
157
|
-
:clearable="
|
|
157
|
+
:clearable="!(readonly || column.isReadonly)"
|
|
158
158
|
:style="{ width: column.controlWidth == null ? null : column.controlWidth + 'px' }"
|
|
159
159
|
:placeholder="column.description"
|
|
160
160
|
:transfer="true"
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
@update:model-value="$event => setData(data, column.code, $event)"
|
|
170
170
|
:data="getDataSource(data, column)"
|
|
171
171
|
:disabled="readonly || column.isReadonly"
|
|
172
|
-
:clearable="
|
|
172
|
+
:clearable="!(readonly || column.isReadonly)"
|
|
173
173
|
:style="{ width: column.controlWidth == null ? null : column.controlWidth + 'px' }"
|
|
174
174
|
:placeholder="column.description"
|
|
175
175
|
:transfer="true"
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
:disabled="readonly || column.isReadonly"
|
|
185
185
|
:multiple="true"
|
|
186
186
|
:show-checkbox="true"
|
|
187
|
-
:clearable="
|
|
187
|
+
:clearable="!(readonly || column.isReadonly)"
|
|
188
188
|
:style="{ width: column.controlWidth == null ? null : column.controlWidth + 'px' }"
|
|
189
189
|
:placeholder="column.description"
|
|
190
190
|
:transfer="true"
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
:model-value="parseDataWithOther(data, column)"
|
|
266
266
|
@update:model-value="$event => setDataWithOther(data, column.code, $event)"
|
|
267
267
|
:disabled="readonly || column.isReadonly"
|
|
268
|
-
:clearable="
|
|
268
|
+
:clearable="!(readonly || column.isReadonly)"
|
|
269
269
|
:style="{ width: column.controlWidth == null ? '40%' : column.controlWidth + 'px' }"
|
|
270
270
|
:placeholder="column.description"
|
|
271
271
|
:transfer="true"
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
:model-value="parseData(rowData(row, index), column.code)"
|
|
147
147
|
@update:model-value="$event => setData(rowData(row, index), column.code, $event)"
|
|
148
148
|
:readonly="isReadonly(rowData(row, index), column)"
|
|
149
|
-
:clearable="
|
|
149
|
+
:clearable="!isReadonly(rowData(row, index), column)"
|
|
150
150
|
:style="{ width: column.controlWidth == null ? null : column.controlWidth - 8 + 'px' }"
|
|
151
151
|
:maxlength="column.maxLength"
|
|
152
152
|
:pattern="column.pattern"
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
:model-value="parseData(rowData(row, index), column.code)"
|
|
177
177
|
@update:model-value="$event => setData(rowData(row, index), column.code, $event)"
|
|
178
178
|
:readonly="isReadonly(rowData(row, index), column)"
|
|
179
|
-
:clearable="
|
|
179
|
+
:clearable="!isReadonly(rowData(row, index), column)"
|
|
180
180
|
:style="{ width: column.controlWidth == null ? null : column.controlWidth - 8 + 'px' }"
|
|
181
181
|
:placeholder="column.description"
|
|
182
182
|
@on-change="onDataChange(rowData(row, index), column)"
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
:model-value="parseData(rowData(row, index), column.code)"
|
|
190
190
|
@update:model-value="$event => setData(rowData(row, index), column.code, $event)"
|
|
191
191
|
:disabled="isReadonly(rowData(row, index), column)"
|
|
192
|
-
:clearable="
|
|
192
|
+
:clearable="!isReadonly(rowData(row, index), column)"
|
|
193
193
|
:style="{ width: column.controlWidth == null ? null : column.controlWidth - 8 + 'px' }"
|
|
194
194
|
:placeholder="column.description"
|
|
195
195
|
:transfer="true"
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
@update:model-value="$event => setArrayData(rowData(row, index), column.code, $event)"
|
|
206
206
|
:disabled="isReadonly(rowData(row, index), column)"
|
|
207
207
|
:multiple="true"
|
|
208
|
-
:clearable="
|
|
208
|
+
:clearable="!isReadonly(rowData(row, index), column)"
|
|
209
209
|
:style="{ width: column.controlWidth == null ? null : column.controlWidth - 8 + 'px' }"
|
|
210
210
|
:placeholder="column.description"
|
|
211
211
|
:transfer="true"
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
@update:model-value="$event => setDataWithOther(rowData(row, index), column.code, $event)"
|
|
289
289
|
size="small"
|
|
290
290
|
:disabled="isReadonly(rowData(row, index), column)"
|
|
291
|
-
:clearable="
|
|
291
|
+
:clearable="!isReadonly(rowData(row, index), column)"
|
|
292
292
|
:style="{
|
|
293
293
|
width:
|
|
294
294
|
parseDataWithOther(rowData(row, index), column) == '__Other'
|
|
@@ -110,13 +110,15 @@
|
|
|
110
110
|
methods: {
|
|
111
111
|
// 打开
|
|
112
112
|
async open(row) {
|
|
113
|
+
console.log('row', row);
|
|
114
|
+
|
|
113
115
|
let applicationType = row.processInst.applicationType;
|
|
114
116
|
this.outcomes = [];
|
|
115
117
|
this.task = row;
|
|
116
|
-
this.isRejectable = this.task.activityInst.activity.isRejectable;
|
|
117
|
-
this.isBackable = this.task.activityInst.activity.isBackable;
|
|
118
|
-
this.isRedirectable = this.task.activityInst.activity.isRedirectable;
|
|
119
|
-
this.isMessageEnable = this.task.processInst.isMessageEnable;
|
|
118
|
+
this.isRejectable = this.task.activityInst.activity.isRejectable && this.task.status == 'Pending';
|
|
119
|
+
this.isBackable = this.task.activityInst.activity.isBackable && this.task.status == 'Pending';
|
|
120
|
+
this.isRedirectable = this.task.activityInst.activity.isRedirectable && this.task.status == 'Pending';
|
|
121
|
+
this.isMessageEnable = this.task.processInst.isMessageEnable && this.task.status == 'Pending';
|
|
120
122
|
this.isCustom = false;
|
|
121
123
|
|
|
122
124
|
setTimeout(async () => {
|
|
@@ -126,7 +128,7 @@
|
|
|
126
128
|
return;
|
|
127
129
|
} else if (this.task.activityInst.activity.pageMode == 'Component') {
|
|
128
130
|
// 动态组件
|
|
129
|
-
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
131
|
+
this.readonly = !this.task.activityInst.activity.isEditable || this.task.status != 'Pending';
|
|
130
132
|
this.customComponent = markRaw(this.$pages[this.task.activityInst.activity.templateUrl]); // 动态组件
|
|
131
133
|
this.isCustom = true;
|
|
132
134
|
|
|
@@ -143,7 +145,7 @@
|
|
|
143
145
|
});
|
|
144
146
|
} else if (this.task.activityInst.activity.pageMode == 'Form') {
|
|
145
147
|
this.form = this.$refs.form;
|
|
146
|
-
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
148
|
+
this.readonly = !this.task.activityInst.activity.isEditable || this.task.status != 'Pending';
|
|
147
149
|
this.form.init(this.task.activityInst.activity.formViewCode, async view => {
|
|
148
150
|
if (view.dataView.isCustom) {
|
|
149
151
|
this.model = await customModelApi.get(applicationType.model, row.processInst.modelID);
|
|
@@ -167,7 +169,7 @@
|
|
|
167
169
|
return;
|
|
168
170
|
} else if (applicationType.pageMode == 'Component') {
|
|
169
171
|
// 动态组件
|
|
170
|
-
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
172
|
+
this.readonly = !this.task.activityInst.activity.isEditable || this.task.status != 'Pending';
|
|
171
173
|
this.customComponent = markRaw(this.$pages[applicationType.templateUrl]); // 动态组件
|
|
172
174
|
this.isCustom = true;
|
|
173
175
|
|
|
@@ -184,7 +186,7 @@
|
|
|
184
186
|
});
|
|
185
187
|
} else if (applicationType.pageMode == 'Form') {
|
|
186
188
|
this.form = this.$refs.form;
|
|
187
|
-
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
189
|
+
this.readonly = !this.task.activityInst.activity.isEditable || this.task.status != 'Pending';
|
|
188
190
|
this.form.init(applicationType.formViewCode, async view => {
|
|
189
191
|
if (view.dataView.isCustom) {
|
|
190
192
|
this.model = await customModelApi.get(applicationType.model, row.processInst.modelID);
|
|
@@ -208,8 +210,10 @@
|
|
|
208
210
|
return;
|
|
209
211
|
}
|
|
210
212
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
if (this.task.status == 'Pending') {
|
|
214
|
+
let res = await modelApi.query('Outcome', { activityFromID: row.activityInst.activityID });
|
|
215
|
+
this.outcomes = res.data;
|
|
216
|
+
}
|
|
213
217
|
});
|
|
214
218
|
},
|
|
215
219
|
// 自定义组件就绪
|
|
@@ -4,14 +4,25 @@
|
|
|
4
4
|
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
5
|
</div>
|
|
6
6
|
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
<Tabs value="todo">
|
|
8
|
+
<TabPane label="待办" name="todo">
|
|
9
|
+
<view-table ref="table" view-code="TodoList" :select-enable="true">
|
|
10
|
+
<template #filterCommand>
|
|
11
|
+
<Button size="small" type="primary" custom-icon="fa fa-check-double" @click="batchDo">{{ $t('Front_Btn_Batch_Do') }}</Button>
|
|
12
|
+
</template>
|
|
13
|
+
<template #command="{ row }">
|
|
14
|
+
<Button size="small" :title="$t('Front_Btn_Detail')" type="info" custom-icon="fa fa-file-alt" @click="$refs.taskForm.open(row)"></Button>
|
|
15
|
+
</template>
|
|
16
|
+
</view-table>
|
|
17
|
+
</TabPane>
|
|
18
|
+
<TabPane label="已办" name="done">
|
|
19
|
+
<view-table ref="table" view-code="DoneList">
|
|
20
|
+
<template #command="{ row }">
|
|
21
|
+
<Button size="small" :title="$t('Front_Btn_Detail')" type="info" custom-icon="fa fa-file-alt" @click="$refs.taskForm.open(row)"></Button>
|
|
22
|
+
</template>
|
|
23
|
+
</view-table>
|
|
24
|
+
</TabPane>
|
|
25
|
+
</Tabs>
|
|
15
26
|
</Card>
|
|
16
27
|
<task-form ref="taskForm" @on-after-action="$refs.table.loadData()"></task-form>
|
|
17
28
|
</div>
|