fl-web-component 1.2.12 → 1.2.14
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 +4 -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 +140 -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 +42 -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,568 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- 添加批注 -->
|
|
3
|
-
<div>
|
|
4
|
-
<el-dialog
|
|
5
|
-
v-if="showDialog"
|
|
6
|
-
title="视点"
|
|
7
|
-
confirm-text="确定"
|
|
8
|
-
width="60%"
|
|
9
|
-
custom-class="test-dialog"
|
|
10
|
-
:append-to-body="true"
|
|
11
|
-
:visible.sync="showDialog"
|
|
12
|
-
:fullscreen="isClient"
|
|
13
|
-
:show-close="!this.isClient"
|
|
14
|
-
:before-close="beforeClose"
|
|
15
|
-
>
|
|
16
|
-
<el-row v-loading="loading" :gutter="20" type="flex" justify="center">
|
|
17
|
-
<el-col
|
|
18
|
-
:span="16"
|
|
19
|
-
style="border-radius: 6px; position: relative; height: 530px; background: #f6f6f6"
|
|
20
|
-
>
|
|
21
|
-
<div
|
|
22
|
-
class="image-edit-container"
|
|
23
|
-
v-show="!readOnlyMode"
|
|
24
|
-
v-if="!isClient"
|
|
25
|
-
v-hasPermi="btnPermission"
|
|
26
|
-
>
|
|
27
|
-
<i class="el-icon-edit-outline image-edit" @click="clickEdit"></i>
|
|
28
|
-
</div>
|
|
29
|
-
<ImageViewer
|
|
30
|
-
ref="ImageViewrRef"
|
|
31
|
-
:image-url="screenshotUrl"
|
|
32
|
-
:isErrorImage="isErrorImage"
|
|
33
|
-
/>
|
|
34
|
-
</el-col>
|
|
35
|
-
<!-- 新增批注内容 -->
|
|
36
|
-
<!-- :disabled="disabledDetailForm" -->
|
|
37
|
-
<el-col :span="8">
|
|
38
|
-
<el-descriptions :column="1" v-if="readOnlyMode || isClient">
|
|
39
|
-
<el-descriptions-item label="所属专业">{{ postName }}</el-descriptions-item>
|
|
40
|
-
<el-descriptions-item label="问题描述">
|
|
41
|
-
<el-input
|
|
42
|
-
type="textarea"
|
|
43
|
-
:rows="3"
|
|
44
|
-
size="medium"
|
|
45
|
-
placeholder="请输入"
|
|
46
|
-
v-model="detailModel.description"
|
|
47
|
-
disabled
|
|
48
|
-
>
|
|
49
|
-
</el-input>
|
|
50
|
-
</el-descriptions-item>
|
|
51
|
-
</el-descriptions>
|
|
52
|
-
<el-form
|
|
53
|
-
v-else
|
|
54
|
-
@submit.native.prevent
|
|
55
|
-
:model="detailModel"
|
|
56
|
-
ref="detailForm"
|
|
57
|
-
:inline="true"
|
|
58
|
-
label-width="68px"
|
|
59
|
-
class="detail-form"
|
|
60
|
-
>
|
|
61
|
-
<el-form-item label="所属专业" prop="postId">
|
|
62
|
-
<el-select v-model="detailModel.postId" placeholder="请选择">
|
|
63
|
-
<el-option
|
|
64
|
-
v-for="item in postList"
|
|
65
|
-
:key="item.postId"
|
|
66
|
-
:label="item.postName"
|
|
67
|
-
:value="item.postId"
|
|
68
|
-
:disabled="item.disabled"
|
|
69
|
-
>
|
|
70
|
-
</el-option>
|
|
71
|
-
</el-select>
|
|
72
|
-
</el-form-item>
|
|
73
|
-
<el-form-item label="问题描述" prop="description">
|
|
74
|
-
<el-input
|
|
75
|
-
type="textarea"
|
|
76
|
-
:rows="3"
|
|
77
|
-
size="medium"
|
|
78
|
-
placeholder="请输入"
|
|
79
|
-
v-model="detailModel.description"
|
|
80
|
-
>
|
|
81
|
-
</el-input>
|
|
82
|
-
<!-- <el-input
|
|
83
|
-
|
|
84
|
-
v-model="detailModel.desc"
|
|
85
|
-
prefix-icon="el-icon-search"
|
|
86
|
-
placeholder="请输入"
|
|
87
|
-
clearable
|
|
88
|
-
size="small"
|
|
89
|
-
@keyup.enter.native="handleQuery"
|
|
90
|
-
/> -->
|
|
91
|
-
</el-form-item>
|
|
92
|
-
</el-form>
|
|
93
|
-
<el-divider content-position="left">回复</el-divider>
|
|
94
|
-
<el-form
|
|
95
|
-
v-if="isClient"
|
|
96
|
-
ref="form"
|
|
97
|
-
:model="detailModel"
|
|
98
|
-
label-width="68px"
|
|
99
|
-
class="reply-form"
|
|
100
|
-
:rules="rules"
|
|
101
|
-
>
|
|
102
|
-
<el-form-item label="解决人" prop="solveBy">
|
|
103
|
-
<el-select v-model="detailModel.solveBy" placeholder="请选择">
|
|
104
|
-
<el-option
|
|
105
|
-
v-for="item in userList"
|
|
106
|
-
:key="item.userId"
|
|
107
|
-
:label="item.userName"
|
|
108
|
-
:value="item.userName"
|
|
109
|
-
>
|
|
110
|
-
</el-option>
|
|
111
|
-
</el-select>
|
|
112
|
-
</el-form-item>
|
|
113
|
-
|
|
114
|
-
<el-form-item label="解决意见" prop="status">
|
|
115
|
-
<el-select v-model="detailModel.status" placeholder="请选择">
|
|
116
|
-
<el-option
|
|
117
|
-
v-for="item in filterStatusOpt"
|
|
118
|
-
:key="item.value"
|
|
119
|
-
:label="item.label"
|
|
120
|
-
:value="item.value"
|
|
121
|
-
>
|
|
122
|
-
</el-option>
|
|
123
|
-
</el-select>
|
|
124
|
-
</el-form-item>
|
|
125
|
-
|
|
126
|
-
<!-- <el-form-item label="视点截图">
|
|
127
|
-
<el-image
|
|
128
|
-
v-if="detailModel.replyPrintscreen"
|
|
129
|
-
:src="`//${detailModel.replyPrintscreen}`"
|
|
130
|
-
:preview-src-list="[`//${detailModel.replyPrintscreen}`]"
|
|
131
|
-
>
|
|
132
|
-
</el-image>
|
|
133
|
-
<span v-else>暂无</span>
|
|
134
|
-
</el-form-item> -->
|
|
135
|
-
<el-form-item label="备注" prop="remark">
|
|
136
|
-
<el-input
|
|
137
|
-
type="textarea"
|
|
138
|
-
:rows="2"
|
|
139
|
-
size="small"
|
|
140
|
-
placeholder="请输入"
|
|
141
|
-
v-model="detailModel.remark"
|
|
142
|
-
/>
|
|
143
|
-
</el-form-item>
|
|
144
|
-
<el-form-item label="创建时间" prop="createTime">
|
|
145
|
-
{{ detailModel.createTime }}
|
|
146
|
-
</el-form-item>
|
|
147
|
-
<el-form-item label="回复时间" prop="replyTime"
|
|
148
|
-
>{{ detailModel.replyTime }}
|
|
149
|
-
</el-form-item>
|
|
150
|
-
</el-form>
|
|
151
|
-
<el-descriptions :column="1" v-else>
|
|
152
|
-
<el-descriptions-item label="解决人">{{ detailModel.solveBy }}</el-descriptions-item>
|
|
153
|
-
<el-descriptions-item label="解决意见">{{ proofStatus }}</el-descriptions-item>
|
|
154
|
-
<el-descriptions-item label="备注">{{ detailModel.remark }}</el-descriptions-item>
|
|
155
|
-
<el-descriptions-item label="创建时间">{{
|
|
156
|
-
detailModel.createTime
|
|
157
|
-
}}</el-descriptions-item>
|
|
158
|
-
<el-descriptions-item label="回复时间">{{
|
|
159
|
-
detailModel.replyTime
|
|
160
|
-
}}</el-descriptions-item>
|
|
161
|
-
</el-descriptions>
|
|
162
|
-
</el-col>
|
|
163
|
-
</el-row>
|
|
164
|
-
<span v-show="!readOnlyMode" slot="footer" class="dialog-footer">
|
|
165
|
-
<el-button @click="close(true, true)">取消</el-button>
|
|
166
|
-
<el-button v-if="isClient" type="primary" @click="clickSave" :loading="updatingOpinion"
|
|
167
|
-
>保存</el-button
|
|
168
|
-
>
|
|
169
|
-
<el-button
|
|
170
|
-
v-else
|
|
171
|
-
type="primary"
|
|
172
|
-
@click="clickSave"
|
|
173
|
-
:loading="updatingOpinion"
|
|
174
|
-
v-hasPermi="btnPermission"
|
|
175
|
-
>保存</el-button
|
|
176
|
-
>
|
|
177
|
-
</span>
|
|
178
|
-
</el-dialog>
|
|
179
|
-
</div>
|
|
180
|
-
</template>
|
|
181
|
-
<script>
|
|
182
|
-
import ImageViewer from './imageViewer';
|
|
183
|
-
export default {
|
|
184
|
-
components: {
|
|
185
|
-
ImageViewer,
|
|
186
|
-
},
|
|
187
|
-
props: {
|
|
188
|
-
dialogVisible: {
|
|
189
|
-
type: Boolean,
|
|
190
|
-
default: false,
|
|
191
|
-
},
|
|
192
|
-
// 批注前初始的文档文件数据
|
|
193
|
-
fileData: {
|
|
194
|
-
type: Object,
|
|
195
|
-
default: () => {},
|
|
196
|
-
},
|
|
197
|
-
// 批注后文件的数据
|
|
198
|
-
annotationFileData: {
|
|
199
|
-
type: Object,
|
|
200
|
-
default: () => {},
|
|
201
|
-
},
|
|
202
|
-
// // 列表id 用于查看详情
|
|
203
|
-
// dataId: {
|
|
204
|
-
// type: Number,
|
|
205
|
-
// default: 0
|
|
206
|
-
// },
|
|
207
|
-
// 操作类型
|
|
208
|
-
moduleType: {
|
|
209
|
-
type: String,
|
|
210
|
-
default: 'add',
|
|
211
|
-
},
|
|
212
|
-
detailProps: {
|
|
213
|
-
type: Object,
|
|
214
|
-
default: () => {},
|
|
215
|
-
},
|
|
216
|
-
postList: {
|
|
217
|
-
type: Array,
|
|
218
|
-
default: () => [],
|
|
219
|
-
},
|
|
220
|
-
userList: {
|
|
221
|
-
type: Array,
|
|
222
|
-
default: () => [],
|
|
223
|
-
},
|
|
224
|
-
isClient: {
|
|
225
|
-
type: Boolean,
|
|
226
|
-
default: false,
|
|
227
|
-
},
|
|
228
|
-
readOnlyMode: {
|
|
229
|
-
type: Boolean,
|
|
230
|
-
default: false,
|
|
231
|
-
},
|
|
232
|
-
updatingOpinion: {
|
|
233
|
-
type: Boolean,
|
|
234
|
-
default: false,
|
|
235
|
-
},
|
|
236
|
-
defaultParams: {
|
|
237
|
-
type: Object,
|
|
238
|
-
default() {
|
|
239
|
-
return {};
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
computed: {
|
|
244
|
-
screenshotUrl: {
|
|
245
|
-
get() {
|
|
246
|
-
// console.log(this.detailModel.previewScreenshotData)
|
|
247
|
-
const screenshotUrl =
|
|
248
|
-
this.detailModel.previewScreenshotData || `//${this.detailModel.problemPrintscreen}`;
|
|
249
|
-
return screenshotUrl;
|
|
250
|
-
},
|
|
251
|
-
set(val) {
|
|
252
|
-
this.detailModel.problemPrintscreen = val;
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
detailModel: {
|
|
256
|
-
get() {
|
|
257
|
-
const detailData = Object.keys(this.detailProps).length
|
|
258
|
-
? this.detailProps
|
|
259
|
-
: Object.keys(this.detailData).length
|
|
260
|
-
? this.detailData
|
|
261
|
-
: {};
|
|
262
|
-
|
|
263
|
-
return detailData;
|
|
264
|
-
},
|
|
265
|
-
},
|
|
266
|
-
isErrorImage() {
|
|
267
|
-
return !(this.detailModel.previewScreenshotData || this.detailModel.problemPrintscreen);
|
|
268
|
-
},
|
|
269
|
-
solveBy() {
|
|
270
|
-
const item = this.userList.find((item) => item.value === this.detailModel.solveBy);
|
|
271
|
-
return item && item.value;
|
|
272
|
-
},
|
|
273
|
-
proofStatus() {
|
|
274
|
-
const item = this.filterStatusOpt.find((item) => item.value === this.detailModel.status);
|
|
275
|
-
return item && item.label;
|
|
276
|
-
},
|
|
277
|
-
postName() {
|
|
278
|
-
const item = this.postList.find((item) => item.postId === this.detailModel.postId);
|
|
279
|
-
return item && item.postName;
|
|
280
|
-
},
|
|
281
|
-
isEditing() {
|
|
282
|
-
return this.detailProps.id != undefined;
|
|
283
|
-
},
|
|
284
|
-
btnPermission() {
|
|
285
|
-
const btnPermission = this.isEditing
|
|
286
|
-
? [`project:opinion:edit:proj:${this.defaultParams.projectId}`]
|
|
287
|
-
: [`project:opinion:add:proj:${this.defaultParams.projectId}`];
|
|
288
|
-
return btnPermission;
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
data() {
|
|
292
|
-
return {
|
|
293
|
-
loading: false,
|
|
294
|
-
dialogLoading: false,
|
|
295
|
-
form: {},
|
|
296
|
-
imageUrl: '', // 图片路径
|
|
297
|
-
// nickName: this.filterUser(store.getters.userId), // 用户名
|
|
298
|
-
// userName: store.getters.name, // 用户登录名
|
|
299
|
-
// departName: JSON.parse(sessionStorage.getItem('dept')).deptName, // 部门
|
|
300
|
-
chooseUserDialog: false,
|
|
301
|
-
// fileId: '',
|
|
302
|
-
confirmText: '提交',
|
|
303
|
-
detailData: {},
|
|
304
|
-
filterStatusOpt: [
|
|
305
|
-
{
|
|
306
|
-
value: '0',
|
|
307
|
-
label: '未处理',
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
value: '1',
|
|
311
|
-
label: '已处理',
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
value: '2',
|
|
315
|
-
label: '待确认',
|
|
316
|
-
},
|
|
317
|
-
],
|
|
318
|
-
showDialog: false,
|
|
319
|
-
rules: {
|
|
320
|
-
solveBy: [{ required: true, message: '请选择解决人', trigger: 'blur' }],
|
|
321
|
-
},
|
|
322
|
-
};
|
|
323
|
-
},
|
|
324
|
-
watch: {
|
|
325
|
-
dialogVisible(val) {
|
|
326
|
-
if (val) {
|
|
327
|
-
this.showDialog = true;
|
|
328
|
-
} else {
|
|
329
|
-
this.showDialog = false;
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
showDialog(val) {
|
|
333
|
-
val === false && this.close(true);
|
|
334
|
-
},
|
|
335
|
-
},
|
|
336
|
-
created() {
|
|
337
|
-
if (this.moduleType === 'add') {
|
|
338
|
-
// this.fileId = this.annotationFileData.fileId
|
|
339
|
-
// this.getUserList() // 获取用户列表
|
|
340
|
-
// this.perview() // 预览
|
|
341
|
-
} else {
|
|
342
|
-
// this.moduleType === 'operation' && this.getUserList() // 获取用户列表
|
|
343
|
-
this.handleDetail();
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
methods: {
|
|
347
|
-
perview() {
|
|
348
|
-
let _this = this;
|
|
349
|
-
perview({ id: this.fileId })
|
|
350
|
-
.then((res) => {
|
|
351
|
-
let reader = new FileReader();
|
|
352
|
-
reader.readAsDataURL(res); // 转换为base64
|
|
353
|
-
reader.onload = function () {
|
|
354
|
-
_this.imageUrl = reader.result;
|
|
355
|
-
_this.$refs.ImageViewrRef.resetImage();
|
|
356
|
-
};
|
|
357
|
-
})
|
|
358
|
-
.finally(() => {
|
|
359
|
-
this.loading = false;
|
|
360
|
-
});
|
|
361
|
-
},
|
|
362
|
-
// 详情
|
|
363
|
-
handleDetail() {
|
|
364
|
-
this.loading = true;
|
|
365
|
-
detail({ id: this.dataId }).then((res) => {
|
|
366
|
-
if (res.code === 200) {
|
|
367
|
-
this.detailData = res.data;
|
|
368
|
-
// 撤回状态
|
|
369
|
-
if (res.data.status === '2' && this.moduleType === 'view')
|
|
370
|
-
this.detailData.recordList = [res.data];
|
|
371
|
-
// 流程字段 操作模式并当前登陆人 = 创建人
|
|
372
|
-
if (
|
|
373
|
-
this.moduleType === 'operation' &&
|
|
374
|
-
this.detailData.createBy === this.userName &&
|
|
375
|
-
this.detailData.recordList.length === 0
|
|
376
|
-
) {
|
|
377
|
-
this.form.operateState = '0';
|
|
378
|
-
this.$nextTick(() => {
|
|
379
|
-
this.$refs.form.clearValidate('operateState'); // 移除校验
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
this.fileId = res.data.fileId;
|
|
383
|
-
this.perview();
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
},
|
|
387
|
-
// 下一处理人 输入建议
|
|
388
|
-
querySearch(queryString, cb) {
|
|
389
|
-
var restaurants = this.userList;
|
|
390
|
-
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
|
391
|
-
// 调用 callback 返回建议列表的数据
|
|
392
|
-
if (results.length === 0) {
|
|
393
|
-
this.form.nextUser = '';
|
|
394
|
-
this.form.nextUserName = '';
|
|
395
|
-
this.$set(this.form, 'nextUserName', '');
|
|
396
|
-
}
|
|
397
|
-
cb(results);
|
|
398
|
-
},
|
|
399
|
-
createFilter(queryString) {
|
|
400
|
-
return (restaurant) => {
|
|
401
|
-
return restaurant.nickName.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
|
|
402
|
-
};
|
|
403
|
-
},
|
|
404
|
-
// 选择处理人
|
|
405
|
-
handleSelect(item) {
|
|
406
|
-
this.form.nextUser = item.userName;
|
|
407
|
-
this.form.nextUserName = item.nickName;
|
|
408
|
-
this.$set(this.form, 'nextUserName', item.nickName);
|
|
409
|
-
this.$nextTick(() => {
|
|
410
|
-
this.$refs.form.clearValidate('nextUserName'); // 移除校验
|
|
411
|
-
});
|
|
412
|
-
},
|
|
413
|
-
// 提交/撤回/操作处理
|
|
414
|
-
dialogConfirm() {
|
|
415
|
-
let that = this;
|
|
416
|
-
let timer = null;
|
|
417
|
-
switch (this.moduleType) {
|
|
418
|
-
case 'view':
|
|
419
|
-
this.revokeAnnotations(); // 撤销
|
|
420
|
-
break;
|
|
421
|
-
|
|
422
|
-
default:
|
|
423
|
-
timer = setTimeout(() => {
|
|
424
|
-
that.$refs.form.validate((valid) => {
|
|
425
|
-
if (valid) {
|
|
426
|
-
that.moduleType === 'add' && that.addAnnotations();
|
|
427
|
-
that.moduleType === 'operation' && that.operateAnnotations();
|
|
428
|
-
clearTimeout(timer);
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
}, 300);
|
|
432
|
-
break;
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
|
-
// 新增批注
|
|
436
|
-
addAnnotations() {
|
|
437
|
-
this.dialogLoading = true;
|
|
438
|
-
let params = {
|
|
439
|
-
// projectId: store.getters.projectId,
|
|
440
|
-
name: this.fileData.fileName,
|
|
441
|
-
origFileId: this.fileData.fileId, // 原始的文件id
|
|
442
|
-
fileId: this.annotationFileData.fileId,
|
|
443
|
-
// deptName: store.getters.deptName,
|
|
444
|
-
type: 'doc', // model:模型。doc:文档
|
|
445
|
-
};
|
|
446
|
-
// 添加批注
|
|
447
|
-
add(Object.assign(params, this.form))
|
|
448
|
-
.then((res) => {
|
|
449
|
-
this.$message({
|
|
450
|
-
type: res.code === 200 ? 'success' : 'error',
|
|
451
|
-
message: res.msg,
|
|
452
|
-
});
|
|
453
|
-
if (res.code === 200) this.$emit('handleAdd');
|
|
454
|
-
})
|
|
455
|
-
.finally(() => {
|
|
456
|
-
this.dialogLoading = false;
|
|
457
|
-
});
|
|
458
|
-
},
|
|
459
|
-
// 撤销
|
|
460
|
-
revokeAnnotations() {
|
|
461
|
-
this.dialogLoading = true;
|
|
462
|
-
revoke({ id: this.detailData.id })
|
|
463
|
-
.then((res) => {
|
|
464
|
-
this.$message({
|
|
465
|
-
type: res.code === 200 ? 'success' : 'error',
|
|
466
|
-
message: res.msg,
|
|
467
|
-
});
|
|
468
|
-
if (res.code === 200) this.close(true);
|
|
469
|
-
})
|
|
470
|
-
.finally(() => {
|
|
471
|
-
this.dialogLoading = false;
|
|
472
|
-
});
|
|
473
|
-
},
|
|
474
|
-
// 操作 处理
|
|
475
|
-
operateAnnotations() {
|
|
476
|
-
this.dialogLoading = true;
|
|
477
|
-
let params = {
|
|
478
|
-
id: this.detailData.id,
|
|
479
|
-
// fileId: this.detailData.fileId,
|
|
480
|
-
// deptName: store.getters.deptName
|
|
481
|
-
};
|
|
482
|
-
operate(Object.assign(params, this.form))
|
|
483
|
-
.then((res) => {
|
|
484
|
-
this.$message({
|
|
485
|
-
type: res.code === 200 ? 'success' : 'error',
|
|
486
|
-
message: res.msg,
|
|
487
|
-
});
|
|
488
|
-
if (res.code === 200) this.close(true);
|
|
489
|
-
})
|
|
490
|
-
.finally(() => {
|
|
491
|
-
this.dialogLoading = false;
|
|
492
|
-
});
|
|
493
|
-
},
|
|
494
|
-
// 关闭弹窗 refresh 判断是否需要刷新列表数据
|
|
495
|
-
close(refresh, resetForm) {
|
|
496
|
-
if (this.isClient && resetForm) {
|
|
497
|
-
this.$refs.form.resetFields();
|
|
498
|
-
}
|
|
499
|
-
this.$emit('close', refresh);
|
|
500
|
-
},
|
|
501
|
-
dialogConfirmChooseUser(list) {
|
|
502
|
-
this.form.nextUser = list[0].label;
|
|
503
|
-
this.$set(this.form, 'nextUserName', list[0].nickName);
|
|
504
|
-
this.$nextTick(() => {
|
|
505
|
-
this.$refs.form.clearValidate('nextUserName'); // 移除校验
|
|
506
|
-
});
|
|
507
|
-
this.chooseUserDialog = false;
|
|
508
|
-
},
|
|
509
|
-
clickEdit() {
|
|
510
|
-
this.$emit('clickEditPic', this.detailModel);
|
|
511
|
-
},
|
|
512
|
-
clickSave() {
|
|
513
|
-
if (this.isClient) {
|
|
514
|
-
this.$refs['form'].validate(async (valid) => {
|
|
515
|
-
if (valid) {
|
|
516
|
-
this.handleSave();
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
} else {
|
|
520
|
-
this.handleSave();
|
|
521
|
-
}
|
|
522
|
-
},
|
|
523
|
-
handleSave(reset) {
|
|
524
|
-
this.close(true, reset);
|
|
525
|
-
this.$emit('clickSaveBtn', this.detailModel);
|
|
526
|
-
},
|
|
527
|
-
beforeClose() {
|
|
528
|
-
// this.detailData = {};
|
|
529
|
-
this.close(true);
|
|
530
|
-
},
|
|
531
|
-
},
|
|
532
|
-
};
|
|
533
|
-
</script>
|
|
534
|
-
<style lang="scss" scoped>
|
|
535
|
-
.nextUser {
|
|
536
|
-
position: relative;
|
|
537
|
-
i {
|
|
538
|
-
position: absolute;
|
|
539
|
-
bottom: 4px;
|
|
540
|
-
right: 10px;
|
|
541
|
-
z-index: 1;
|
|
542
|
-
color: #c2d8e6;
|
|
543
|
-
font-size: 20px;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
.list-item {
|
|
547
|
-
padding: 12px;
|
|
548
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.09);
|
|
549
|
-
}
|
|
550
|
-
.operation {
|
|
551
|
-
padding: 12px;
|
|
552
|
-
border-top: 1px solid rgba(0, 0, 0, 0.09);
|
|
553
|
-
}
|
|
554
|
-
.image-edit-container {
|
|
555
|
-
cursor: pointer;
|
|
556
|
-
float: right;
|
|
557
|
-
width: 36px;
|
|
558
|
-
height: 36px;
|
|
559
|
-
background: #fff;
|
|
560
|
-
border-radius: 5px;
|
|
561
|
-
display: flex;
|
|
562
|
-
justify-content: center;
|
|
563
|
-
align-items: center;
|
|
564
|
-
.image-edit {
|
|
565
|
-
font-size: 32px;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
</style>
|