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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.5.36",
4
+ "version": "2.6.0",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
package/src/api/task.js CHANGED
@@ -61,5 +61,12 @@ export default {
61
61
  method: 'post',
62
62
  data: filter
63
63
  });
64
+ },
65
+ queryMyDone(filter) {
66
+ return request({
67
+ url: `api/${res}/queryMyDone`,
68
+ method: 'post',
69
+ data: filter
70
+ });
64
71
  }
65
72
  };
@@ -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="true"
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="true"
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="true"
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="true"
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="true"
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="true"
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="true"
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="true"
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="true"
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="true"
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="true"
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="true"
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
- let res = await modelApi.query('Outcome', { activityFromID: row.activityInst.activityID });
212
- this.outcomes = res.data;
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
- <view-table ref="table" view-code="TodoList" :select-enable="true">
8
- <template #filterCommand>
9
- <Button size="small" type="primary" custom-icon="fa fa-check-double" @click="batchDo">{{ $t('Front_Btn_Batch_Do') }}</Button>
10
- </template>
11
- <template #command="{ row }">
12
- <Button size="small" :title="$t('Front_Btn_Detail')" type="info" custom-icon="fa fa-file-alt" @click="$refs.taskForm.open(row)"></Button>
13
- </template>
14
- </view-table>
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>