fl-web-component 1.2.12 → 1.2.13
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/README.md +2 -0
- package/dist/fl-web-component.common.1.js.map +1 -1
- package/dist/fl-web-component.common.2.js.map +1 -1
- package/dist/fl-web-component.common.3.js.map +1 -1
- package/dist/fl-web-component.common.js +129 -86
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/package.json +1 -1
- package/packages/components/com-graphics/index.vue +31 -6
- package/src/utils/flgltf-parser.js +68 -50
- package/src/utils/instance-parser.js +39 -30
- package/packages/components/button/index.vue +0 -26
- package/packages/components/model/api/index.js +0 -421
- package/packages/components/model/api/mock/detecttree.js +0 -58
- package/packages/components/model/api/mock/getmodel-line.js +0 -15834
- package/packages/components/model/api/mock/init.js +0 -1
- package/packages/components/model/api/mock/pbstree.js +0 -826
- package/packages/components/model/api/mock/topology.json +0 -3238
- package/packages/components/model/components/TextOverTooltip/index.vue +0 -84
- package/packages/components/model/components/annotation-toolbar.vue +0 -410
- package/packages/components/model/components/check-proofing-model.vue +0 -39
- package/packages/components/model/components/clipping-type.vue +0 -59
- package/packages/components/model/components/com-dialogWrapper/Readme.md +0 -53
- package/packages/components/model/components/com-dialogWrapper/index.vue +0 -114
- package/packages/components/model/components/detect-panel.vue +0 -339
- package/packages/components/model/components/detect-tree.vue +0 -445
- package/packages/components/model/components/firstPer-panel.vue +0 -109
- package/packages/components/model/components/header-button.vue +0 -470
- package/packages/components/model/components/imageViewer/index.vue +0 -126
- package/packages/components/model/components/import-model.vue +0 -127
- package/packages/components/model/components/location-panel.vue +0 -91
- package/packages/components/model/components/measure-type.vue +0 -59
- package/packages/components/model/components/pbs-tree.vue +0 -497
- package/packages/components/model/components/proof-config.vue +0 -72
- package/packages/components/model/components/proof-for-pc.vue +0 -126
- package/packages/components/model/components/proof-history.vue +0 -300
- package/packages/components/model/components/proof-panel-detail.vue +0 -568
- package/packages/components/model/components/proof-panel.vue +0 -846
- package/packages/components/model/components/proof-project-user.vue +0 -445
- package/packages/components/model/components/proof-publish.vue +0 -130
- package/packages/components/model/components/proof-role.vue +0 -504
- package/packages/components/model/components/props-panel.vue +0 -258
- package/packages/components/model/index.vue +0 -3425
- package/packages/components/model/readme.md +0 -31
- package/packages/components/model/utils/annotation-tool.js +0 -333
- package/packages/components/model/utils/cursor.js +0 -23
- package/packages/components/model/utils/detect-v1.js +0 -329
- package/packages/components/model/utils/index.js +0 -48
- package/packages/components/model/utils/threejs/measure-angle.js +0 -258
- package/packages/components/model/utils/threejs/measure-area.js +0 -281
- package/packages/components/model/utils/threejs/measure-distance.js +0 -209
- package/packages/components/model/utils/threejs/measure-volume.js +0 -97
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="trigger-button">
|
|
4
|
-
<el-button type="text" @click="triggerDialog"><i class="pre-img"></i>用户列表</el-button>
|
|
5
|
-
</div>
|
|
6
|
-
<com-dialog
|
|
7
|
-
v-if="dialogVisible"
|
|
8
|
-
dialog-title="项目用户管理"
|
|
9
|
-
:visible="dialogVisible"
|
|
10
|
-
:popup-width="'50%'"
|
|
11
|
-
:footerDisabled="true"
|
|
12
|
-
@handleClose="handleClose"
|
|
13
|
-
@submitDialogData="submitDialogData"
|
|
14
|
-
>
|
|
15
|
-
<el-row :gutter="10" class="mb8">
|
|
16
|
-
<el-col :span="1.5">
|
|
17
|
-
<el-button
|
|
18
|
-
type="primary"
|
|
19
|
-
icon="el-icon-plus"
|
|
20
|
-
size="small"
|
|
21
|
-
@click="handleAdd"
|
|
22
|
-
v-hasPermi="[`project:user:add:proj:${defaultParams.projectId}`]"
|
|
23
|
-
>新增</el-button
|
|
24
|
-
>
|
|
25
|
-
</el-col>
|
|
26
|
-
</el-row>
|
|
27
|
-
|
|
28
|
-
<el-table max-height="65vh" v-loading="loading" :data="tableData">
|
|
29
|
-
<el-table-column label="序号" type="index" width="80" />
|
|
30
|
-
<el-table-column label="项目用户" prop="userName" show-overflow-tooltip />
|
|
31
|
-
<el-table-column label="项目角色" prop="roleName" show-overflow-tooltip />
|
|
32
|
-
<el-table-column label="操作" width="200" class-name="small-padding fixed-width">
|
|
33
|
-
<template slot-scope="scope">
|
|
34
|
-
<el-button
|
|
35
|
-
size="mini"
|
|
36
|
-
type="text"
|
|
37
|
-
@click="handleEdit(scope.row)"
|
|
38
|
-
v-if="!scope.row.projectManager"
|
|
39
|
-
v-hasPermi="[`project:user:edit:proj:${defaultParams.projectId}`]"
|
|
40
|
-
>修改</el-button
|
|
41
|
-
>
|
|
42
|
-
<el-button
|
|
43
|
-
size="mini"
|
|
44
|
-
type="text"
|
|
45
|
-
@click="handleDelete(scope.row)"
|
|
46
|
-
v-if="!scope.row.projectManager"
|
|
47
|
-
v-hasPermi="[`project:user:remove:proj:${defaultParams.projectId}`]"
|
|
48
|
-
>移除</el-button
|
|
49
|
-
>
|
|
50
|
-
</template>
|
|
51
|
-
</el-table-column>
|
|
52
|
-
</el-table>
|
|
53
|
-
</com-dialog>
|
|
54
|
-
|
|
55
|
-
<com-dialog
|
|
56
|
-
v-if="dialogOperate.visible"
|
|
57
|
-
dialog-title="项目用户"
|
|
58
|
-
:visible="dialogOperate.visible"
|
|
59
|
-
:popup-width="'25%'"
|
|
60
|
-
@handleClose="handleOperateClose"
|
|
61
|
-
@submitDialogData="submitDialogOperateData"
|
|
62
|
-
>
|
|
63
|
-
<el-form ref="formOperate" :model="dialogForm" :rules="formRules" label-width="100px">
|
|
64
|
-
<el-form-item label="项目用户" prop="userId" v-if="dialogForm.operateType != 'edit'">
|
|
65
|
-
<el-select v-model="dialogForm.userId" placeholder="请选择">
|
|
66
|
-
<el-option
|
|
67
|
-
v-for="item in unallocatedUserList"
|
|
68
|
-
:key="item.id"
|
|
69
|
-
:label="item.value"
|
|
70
|
-
:value="item.id"
|
|
71
|
-
>
|
|
72
|
-
</el-option>
|
|
73
|
-
</el-select>
|
|
74
|
-
</el-form-item>
|
|
75
|
-
<el-form-item label="项目角色" prop="roleId">
|
|
76
|
-
<el-select v-model="dialogForm.roleId" placeholder="请选择">
|
|
77
|
-
<el-option v-for="item in roleList" :key="item.id" :label="item.value" :value="item.id">
|
|
78
|
-
</el-option>
|
|
79
|
-
</el-select>
|
|
80
|
-
</el-form-item>
|
|
81
|
-
</el-form>
|
|
82
|
-
</com-dialog>
|
|
83
|
-
</div>
|
|
84
|
-
</template>
|
|
85
|
-
|
|
86
|
-
<script>
|
|
87
|
-
import project from '@/api/projects/projects';
|
|
88
|
-
|
|
89
|
-
import {
|
|
90
|
-
getUnallocatedUserList,
|
|
91
|
-
deleteProofProjectUser,
|
|
92
|
-
getProofProjectUserList,
|
|
93
|
-
getRoleList,
|
|
94
|
-
addProofProjectUser,
|
|
95
|
-
updateProofProjectUser,
|
|
96
|
-
} from '../api/index';
|
|
97
|
-
export default {
|
|
98
|
-
name: 'proofProjectUser',
|
|
99
|
-
data() {
|
|
100
|
-
return {
|
|
101
|
-
dialogVisible: false,
|
|
102
|
-
historyDialogVisible: false,
|
|
103
|
-
tableData: [],
|
|
104
|
-
loading: true,
|
|
105
|
-
historyVersionName: '',
|
|
106
|
-
dialogOperate: {
|
|
107
|
-
visible: false,
|
|
108
|
-
},
|
|
109
|
-
dialogForm: {
|
|
110
|
-
userId: '',
|
|
111
|
-
roleId: '',
|
|
112
|
-
type: 1,
|
|
113
|
-
operateType: '',
|
|
114
|
-
},
|
|
115
|
-
formRules: {
|
|
116
|
-
userId: [{ required: true, message: '请选择项目用户', trigger: 'change' }],
|
|
117
|
-
roleId: [{ required: true, message: '请选择项目角色', trigger: 'change' }],
|
|
118
|
-
},
|
|
119
|
-
unallocatedUserList: [],
|
|
120
|
-
roleList: [],
|
|
121
|
-
};
|
|
122
|
-
},
|
|
123
|
-
components: {
|
|
124
|
-
ComDialog: () => import('./com-dialogWrapper'),
|
|
125
|
-
},
|
|
126
|
-
mounted() {
|
|
127
|
-
const params = { projectId: this.defaultParams.projectId };
|
|
128
|
-
this.getProofProjectUserList(params);
|
|
129
|
-
this.getUnallocatedUserList(params);
|
|
130
|
-
this.getRoleList(params);
|
|
131
|
-
},
|
|
132
|
-
props: {
|
|
133
|
-
defaultParams: {
|
|
134
|
-
type: Object,
|
|
135
|
-
default() {
|
|
136
|
-
return {};
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
computed: {
|
|
141
|
-
projectId() {
|
|
142
|
-
return this.defaultParams.projectId;
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
methods: {
|
|
146
|
-
triggerDialog() {
|
|
147
|
-
this.dialogVisible = !this.dialogVisible;
|
|
148
|
-
console.log(this.dialogVisible);
|
|
149
|
-
},
|
|
150
|
-
/* 弹窗 修改是否让页面显示与隐藏的事件 */
|
|
151
|
-
updateVisible(val) {
|
|
152
|
-
this.dialogVisible = val;
|
|
153
|
-
},
|
|
154
|
-
/* 弹窗 确认 操作 */
|
|
155
|
-
submitDialogData() {
|
|
156
|
-
this.dialogVisible = false;
|
|
157
|
-
},
|
|
158
|
-
/* 弹窗 关闭 操作 */
|
|
159
|
-
handleClose() {
|
|
160
|
-
this.dialogVisible = false;
|
|
161
|
-
},
|
|
162
|
-
/* 弹窗 确认 操作 */
|
|
163
|
-
submitDialogOperateData() {
|
|
164
|
-
this.$refs.formOperate.validate((vaild) => {
|
|
165
|
-
if (vaild) {
|
|
166
|
-
this.dialogForm.projectId = this.defaultParams.projectId;
|
|
167
|
-
if (this.dialogForm.operateType != 'edit') {
|
|
168
|
-
addProofProjectUser(this.dialogForm)
|
|
169
|
-
.then((res) => {
|
|
170
|
-
if (res.code == 200) {
|
|
171
|
-
this.$message({
|
|
172
|
-
type: 'success',
|
|
173
|
-
message: res.msg,
|
|
174
|
-
});
|
|
175
|
-
this.getProofProjectUserList(this.defaultParams);
|
|
176
|
-
this.getUnallocatedUserList(this.defaultParams);
|
|
177
|
-
} else {
|
|
178
|
-
this.$message({
|
|
179
|
-
type: 'error',
|
|
180
|
-
message: res.msg,
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
.catch((err) => {
|
|
185
|
-
// this.$message({
|
|
186
|
-
// type: "error",
|
|
187
|
-
// message: err.msg,
|
|
188
|
-
// });
|
|
189
|
-
})
|
|
190
|
-
.finally(() => {
|
|
191
|
-
this.dialogOperate.visible = false;
|
|
192
|
-
});
|
|
193
|
-
} else {
|
|
194
|
-
updateProofProjectUser(this.dialogForm)
|
|
195
|
-
.then((res) => {
|
|
196
|
-
if (res.code == 200) {
|
|
197
|
-
this.$message({
|
|
198
|
-
type: 'success',
|
|
199
|
-
message: res.msg,
|
|
200
|
-
});
|
|
201
|
-
this.getProofProjectUserList(this.defaultParams);
|
|
202
|
-
} else {
|
|
203
|
-
this.$message({
|
|
204
|
-
type: 'error',
|
|
205
|
-
message: res.msg,
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
})
|
|
209
|
-
.catch((err) => {
|
|
210
|
-
// this.$message({
|
|
211
|
-
// type: "error",
|
|
212
|
-
// message: err.msg,
|
|
213
|
-
// });
|
|
214
|
-
})
|
|
215
|
-
.finally(() => {
|
|
216
|
-
this.dialogOperate.visible = false;
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
} else {
|
|
220
|
-
console.log('error submit');
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
},
|
|
224
|
-
handleAdd() {
|
|
225
|
-
this.dialogForm.operateType = 'add';
|
|
226
|
-
this.dialogOperate.visible = true;
|
|
227
|
-
this.dialogForm.userId = '';
|
|
228
|
-
this.dialogForm.roleId = '';
|
|
229
|
-
},
|
|
230
|
-
/* 弹窗 关闭 操作 */
|
|
231
|
-
handleOperateClose() {
|
|
232
|
-
this.resetForm();
|
|
233
|
-
this.dialogOperate.visible = false;
|
|
234
|
-
},
|
|
235
|
-
getProofProjectUserList(params) {
|
|
236
|
-
project.myProject({ pageNum: 1, pageSize: 10000 }).then((response) => {
|
|
237
|
-
// this.projectList = response.rows;
|
|
238
|
-
const currentProject = response.rows.find(
|
|
239
|
-
(item) => item.id == this.defaultParams.projectId,
|
|
240
|
-
);
|
|
241
|
-
getProofProjectUserList(params)
|
|
242
|
-
.then((res) => {
|
|
243
|
-
this.tableData = res.rows;
|
|
244
|
-
// this.tableData.unshift({
|
|
245
|
-
// userName: currentProject.manager,
|
|
246
|
-
// roleName: '负责人',
|
|
247
|
-
// type: 'manager',
|
|
248
|
-
// });
|
|
249
|
-
})
|
|
250
|
-
.finally(() => {
|
|
251
|
-
this.loading = false;
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
},
|
|
255
|
-
resetForm() {
|
|
256
|
-
this.$refs.formOperate.resetFields();
|
|
257
|
-
this.dialogForm.userId = '';
|
|
258
|
-
this.dialogForm.roleId = '';
|
|
259
|
-
this.dialogForm.operateType = '';
|
|
260
|
-
},
|
|
261
|
-
getRoleList(params) {
|
|
262
|
-
getRoleList(params).then((res) => {
|
|
263
|
-
if (res.code == 200) {
|
|
264
|
-
let data = res.rows;
|
|
265
|
-
this.roleList = data.map((item) => {
|
|
266
|
-
return {
|
|
267
|
-
value: item.roleName,
|
|
268
|
-
id: item.roleId,
|
|
269
|
-
// value: '' + item.userId
|
|
270
|
-
};
|
|
271
|
-
});
|
|
272
|
-
console.log(this.roleList);
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
},
|
|
276
|
-
getUnallocatedUserList(params) {
|
|
277
|
-
getUnallocatedUserList(params).then((res) => {
|
|
278
|
-
if (res.code == 200) {
|
|
279
|
-
let data = res.data;
|
|
280
|
-
this.unallocatedUserList = data.map((item) => {
|
|
281
|
-
return {
|
|
282
|
-
value: item.userName,
|
|
283
|
-
id: item.userId,
|
|
284
|
-
// value: '' + item.userId
|
|
285
|
-
};
|
|
286
|
-
});
|
|
287
|
-
console.log(this.unallocatedUserList);
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
},
|
|
291
|
-
handleDelete(item) {
|
|
292
|
-
this.$confirm(`确认移除用户 "${item.userName}"?`, '移除', {
|
|
293
|
-
confirmButtonText: '确定',
|
|
294
|
-
cancelButtonText: '取消',
|
|
295
|
-
type: 'error',
|
|
296
|
-
})
|
|
297
|
-
.then(() => {
|
|
298
|
-
const { userId, roleId } = item;
|
|
299
|
-
deleteProofProjectUser({
|
|
300
|
-
userId,
|
|
301
|
-
roleId,
|
|
302
|
-
projectId: this.defaultParams.projectId,
|
|
303
|
-
})
|
|
304
|
-
.then((res) => {
|
|
305
|
-
if (res.code != 200) {
|
|
306
|
-
this.$message({
|
|
307
|
-
type: 'error',
|
|
308
|
-
message: res.msg,
|
|
309
|
-
});
|
|
310
|
-
} else {
|
|
311
|
-
this.getProofProjectUserList(this.defaultParams);
|
|
312
|
-
this.getUnallocatedUserList(this.defaultParams);
|
|
313
|
-
this.$message({
|
|
314
|
-
type: 'success',
|
|
315
|
-
message: res.msg,
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
})
|
|
319
|
-
.catch((res) => {
|
|
320
|
-
this.$message({
|
|
321
|
-
type: 'error',
|
|
322
|
-
message: res.msg,
|
|
323
|
-
});
|
|
324
|
-
});
|
|
325
|
-
})
|
|
326
|
-
.catch(() => {});
|
|
327
|
-
},
|
|
328
|
-
handleEdit(item) {
|
|
329
|
-
this.dialogOperate.visible = true;
|
|
330
|
-
this.dialogForm.operateType = 'edit';
|
|
331
|
-
Object.assign(this.dialogForm, item);
|
|
332
|
-
console.log(this.dialogForm);
|
|
333
|
-
},
|
|
334
|
-
},
|
|
335
|
-
};
|
|
336
|
-
</script>
|
|
337
|
-
|
|
338
|
-
<style lang="scss" scoped>
|
|
339
|
-
// .el-table{
|
|
340
|
-
// color: #606266;
|
|
341
|
-
// }
|
|
342
|
-
// .el-table th{
|
|
343
|
-
// background: none;
|
|
344
|
-
// }
|
|
345
|
-
// .el-table tr{
|
|
346
|
-
// background: none;
|
|
347
|
-
// }
|
|
348
|
-
// .el-table thead{
|
|
349
|
-
// color: #fff;
|
|
350
|
-
// }
|
|
351
|
-
// .el-table th.el-table__cell{
|
|
352
|
-
// background: none;
|
|
353
|
-
// }
|
|
354
|
-
::v-deep .el-table {
|
|
355
|
-
display: flex;
|
|
356
|
-
flex-direction: column;
|
|
357
|
-
font-size: 14px;
|
|
358
|
-
line-height: 20px;
|
|
359
|
-
color: #2e3136;
|
|
360
|
-
|
|
361
|
-
// .el-table th{
|
|
362
|
-
// background: none;
|
|
363
|
-
// }
|
|
364
|
-
// .el-table tr{
|
|
365
|
-
// background: none;
|
|
366
|
-
// }
|
|
367
|
-
// .el-table thead{
|
|
368
|
-
// tr{
|
|
369
|
-
// color: #2E3136;
|
|
370
|
-
// }
|
|
371
|
-
// }
|
|
372
|
-
.el-table th.el-table__cell {
|
|
373
|
-
background: none;
|
|
374
|
-
}
|
|
375
|
-
.el-table__header-wrapper {
|
|
376
|
-
flex-shrink: 0;
|
|
377
|
-
}
|
|
378
|
-
.el-table__body-wrapper {
|
|
379
|
-
flex-grow: 1;
|
|
380
|
-
.el-table__row {
|
|
381
|
-
height: 52px;
|
|
382
|
-
background-color: #fff !important;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
.el-table__header-wrapper .el-table__header th,
|
|
386
|
-
.el-table__fixed-header-wrapper .el-table__header th {
|
|
387
|
-
background-color: #f8f8f8 !important;
|
|
388
|
-
color: #2e3136;
|
|
389
|
-
height: 52px;
|
|
390
|
-
box-sizing: border-box;
|
|
391
|
-
padding: 0;
|
|
392
|
-
font-size: 14px;
|
|
393
|
-
line-height: 20px;
|
|
394
|
-
color: #2e3136;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.el-table__fixed-body-wrapper {
|
|
398
|
-
.el-table__row {
|
|
399
|
-
height: 52px;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.el-table__body tr.hover-row {
|
|
404
|
-
td.el-table__cell {
|
|
405
|
-
background-color: #f6f9fa;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.el-table__cell:not(.is-center):not(.is-hidden) {
|
|
410
|
-
button.el-button--text {
|
|
411
|
-
color: #008de9;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// 计数器高度
|
|
416
|
-
.el-input-number .el-input--medium .el-input__inner {
|
|
417
|
-
height: 30px;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.el-dropdown-link {
|
|
421
|
-
color: #008de9;
|
|
422
|
-
}
|
|
423
|
-
// 头部多选按钮
|
|
424
|
-
thead .el-table-column--selection {
|
|
425
|
-
& .el-checkbox {
|
|
426
|
-
margin-left: 4px;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
::v-deep .trigger-button {
|
|
432
|
-
span {
|
|
433
|
-
display: flex;
|
|
434
|
-
align-items: center;
|
|
435
|
-
color: #2e3136;
|
|
436
|
-
}
|
|
437
|
-
.pre-img {
|
|
438
|
-
background-image: url('../../../assets/proof/project_user@2x.png');
|
|
439
|
-
width: 30px;
|
|
440
|
-
height: 30px;
|
|
441
|
-
display: inline-block;
|
|
442
|
-
background-size: cover;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
</style>
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="trigger-button">
|
|
4
|
-
<el-button
|
|
5
|
-
type="text"
|
|
6
|
-
@click="triggerDialog"
|
|
7
|
-
:disabled="disabledBtn"
|
|
8
|
-
v-hasPermi="[`project:version:publish:proj:${defaultParams.projectId}`]"
|
|
9
|
-
><i class="pre-img"></i>发布</el-button
|
|
10
|
-
>
|
|
11
|
-
</div>
|
|
12
|
-
<com-dialog
|
|
13
|
-
v-if="dialogVisible"
|
|
14
|
-
dialog-title="发布校审版本"
|
|
15
|
-
:visible="dialogVisible"
|
|
16
|
-
:popup-width="'25%'"
|
|
17
|
-
@handleClose="handleClose"
|
|
18
|
-
@submitDialogData="submitDialogData"
|
|
19
|
-
>
|
|
20
|
-
<el-form ref="form" :model="dialogForm" :rules="formRules">
|
|
21
|
-
<el-form-item label="校审版本名称" prop="name">
|
|
22
|
-
<el-input v-model="dialogForm.name"></el-input>
|
|
23
|
-
</el-form-item>
|
|
24
|
-
</el-form>
|
|
25
|
-
</com-dialog>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script>
|
|
30
|
-
import * as modelApi from '../api/index';
|
|
31
|
-
|
|
32
|
-
export default {
|
|
33
|
-
name: 'importModel',
|
|
34
|
-
data() {
|
|
35
|
-
return {
|
|
36
|
-
dialogVisible: false,
|
|
37
|
-
dialogForm: {
|
|
38
|
-
name: '',
|
|
39
|
-
},
|
|
40
|
-
formRules: {
|
|
41
|
-
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
|
42
|
-
},
|
|
43
|
-
disabledBtn: true,
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
props: {
|
|
47
|
-
defaultParams: {
|
|
48
|
-
type: Object,
|
|
49
|
-
default() {
|
|
50
|
-
return {};
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
components: {
|
|
55
|
-
ComDialog: () => import('./com-dialogWrapper'),
|
|
56
|
-
},
|
|
57
|
-
methods: {
|
|
58
|
-
triggerDialog() {
|
|
59
|
-
this.dialogVisible = !this.dialogVisible;
|
|
60
|
-
console.log(this.dialogVisible);
|
|
61
|
-
},
|
|
62
|
-
/* 弹窗 修改是否让页面显示与隐藏的事件 */
|
|
63
|
-
updateVisible(val) {
|
|
64
|
-
this.dialogVisible = val;
|
|
65
|
-
},
|
|
66
|
-
/* 弹窗 确认 操作 */
|
|
67
|
-
submitDialogData() {
|
|
68
|
-
this.$refs.form.validate((vaild) => {
|
|
69
|
-
if (vaild) {
|
|
70
|
-
this.dialogForm.projectId = this.defaultParams.projectId;
|
|
71
|
-
|
|
72
|
-
modelApi
|
|
73
|
-
.publishProofVersion(this.dialogForm)
|
|
74
|
-
.then((res) => {
|
|
75
|
-
if (res.code === 200) {
|
|
76
|
-
this.dialogVisible = false;
|
|
77
|
-
this.$message({
|
|
78
|
-
type: 'success',
|
|
79
|
-
message: '当前校审版本已发布',
|
|
80
|
-
});
|
|
81
|
-
this.$emit('getVersionList');
|
|
82
|
-
this.resetForm();
|
|
83
|
-
|
|
84
|
-
setTimeout(() => {
|
|
85
|
-
this.$emit('publishVersion', null);
|
|
86
|
-
}, 1000);
|
|
87
|
-
} else {
|
|
88
|
-
this.$message({ type: 'error', message: res.msg });
|
|
89
|
-
}
|
|
90
|
-
})
|
|
91
|
-
.catch((err) => {
|
|
92
|
-
console.log(err);
|
|
93
|
-
// this.$message({ type: 'error', message: err.msg })
|
|
94
|
-
});
|
|
95
|
-
} else {
|
|
96
|
-
console.log('error submit');
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
},
|
|
100
|
-
/* 弹窗 关闭 操作 */
|
|
101
|
-
handleClose() {
|
|
102
|
-
this.resetForm();
|
|
103
|
-
this.dialogVisible = false;
|
|
104
|
-
},
|
|
105
|
-
resetForm() {
|
|
106
|
-
this.$refs.form.resetFields();
|
|
107
|
-
},
|
|
108
|
-
ableBtn() {
|
|
109
|
-
this.disabledBtn = false;
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
</script>
|
|
114
|
-
|
|
115
|
-
<style lang="scss" scoped>
|
|
116
|
-
::v-deep .trigger-button {
|
|
117
|
-
span {
|
|
118
|
-
display: flex;
|
|
119
|
-
align-items: center;
|
|
120
|
-
color: #2e3136;
|
|
121
|
-
}
|
|
122
|
-
.pre-img {
|
|
123
|
-
background-image: url('../../../assets/proof/publish@2x.png');
|
|
124
|
-
width: 30px;
|
|
125
|
-
height: 30px;
|
|
126
|
-
display: inline-block;
|
|
127
|
-
background-size: cover;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
</style>
|