1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
| <template>
| <div class="capacity-scope">
| <div style="display: flex;justify-content: space-between">
| <div style="display: flex;">
| <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
| <span style="width: 68px;font-size: 14px;font-weight: 700;color: var(--lims-text-2);">标准号</span>
| <el-input size="small" placeholder="请输入" clearable v-model="searchForm.standardNo"
| @keyup.enter="searchList"></el-input>
| </div>
| <div style="line-height: 30px;">
| <el-button type="primary" size="small" @click="searchList">查询</el-button>
| <el-button size="small" @click="resetSearchForm">重置</el-button>
| </div>
| </div>
| <div style="line-height: 30px;">
| <el-button size="small" type="primary" style="margin-left: 10px;"
| @click="$refs.importDialog.open()">导入</el-button>
| <el-button size="small" style="margin-left: 10px;" type="primary" @click="openFormDia">新 增</el-button>
| </div>
| </div>
| <div>
| <div class="table">
| <lims-table :column="tableColumn" :height="'calc(100vh - 21em)'" :table-data="tableData"
| :table-loading="tableLoading" :page="page" @pagination="pagination">
| </lims-table>
| </div>
| <FormDialog v-if="formDialog" ref="formDialog" @closeDia="closeDia"></FormDialog>
| <EditFormDia v-if="editFormDialog" ref="editFormDialog" @closeEditDia="closeEditDia"></EditFormDia>
| <import-dialog
| ref="importDialog"
| title="导入标准查新"
| :action="action"
| accept=".xls,.xlsx"
| template-url="/import-templates/标准查新导入模板.xlsx"
| template-name="标准查新导入模板.xlsx"
| :tips="[
| '表头为两行,请从第 3 行开始填写数据',
| '标准名称、标准号请填写现行标准的名称和编号',
| '查新来源按“标准网 → 委托情报所 → 标准书店 → 其他”的顺序取第一个非空项',
| '备注列只能填写“替换”或“作废”,留空表示无备注'
| ]"
| @success="searchList"
| />
| </div>
| </div>
| </template>
|
| <script>
| import limsTable from '@/components/Table/lims-table.vue'
| import ImportDialog from '@/components/ImportDialog/index.vue'
| import FormDialog from './component/FormDialog.vue';
| import EditFormDia from './component/EditFormDia.vue';
| import {
| delMethodSearchNew,
| pageMethodSearchNew
| } from '@/api/cnas/process/method/standardNoveltyRetrieval'
|
| export default {
| name: 'StandardNoveltyRetrieval',
| // import 引入的组件需要注入到对象中才能使用
| components: {
| FormDialog,
| limsTable,
| ImportDialog,
| EditFormDia
| },
| data() {
| // 这里存放数据
| return {
| searchForm: {
| standardNo: ''
| },
| tableColumn: [
| {
| label: '标准名称',
| prop: 'methodName',
| minWidth: '100'
| },
| {
| label: '标准号',
| prop: 'standardNo',
| minWidth: '100'
| },
| {
| label: '文件编号',
| prop: 'fileNo',
| minWidth: '100'
| },
| {
| dataType: 'tag',
| label: '是否是新标准',
| prop: 'isNewStandard',
| minWidth: '100',
| formatData: (params) => {
| if (params == 0) {
| return '否';
| } else if (params == 1) {
| return '是';
| } else {
| return null
| }
| },
| formatType: (params) => {
| if (params == 0) {
| return 'danger';
| } else if (params == 1) {
| return 'success';
| } else {
| return null
| }
| }
| },
| {
| label: '新标准名称',
| prop: 'newMethodName',
| minWidth: '100'
| },
| {
| label: '新标准号',
| prop: 'newStandardNo',
| minWidth: '100'
| },
| {
| label: '查新时间',
| prop: 'searchNewTime',
| minWidth: '150'
| },
| {
| label: '查新结果',
| prop: 'searchNewResult',
| minWidth: '140'
| },
| {
| label: '查新人',
| prop: 'searchNewUserName',
| minWidth: '100'
| },
| {
| dataType: 'tag',
| label: '查新记录来源',
| prop: 'searchNewSource',
| minWidth: '100',
| formatData: (params) => {
| if (params == 0) {
| return '标准网';
| } else if (params == 1) {
| return '委托情报';
| } else if (params == 2) {
| return '标准数';
| } else if (params == 3) {
| return '其他';
| } else {
| return null
| }
| },
| formatType: (params) => {
| if (params == 0) {
| return 'success';
| } else if (params == 1) {
| return 'danger';
| } else if (params == 2) {
| return 'warning';
| } else if (params == 3) {
| return 'info';
| } else {
| return null
| }
| }
| },
| {
| label: '来源网址/网站名称',
| prop: 'searchNewWebsite',
| minWidth: '150'
| },
| {
| dataType: 'tag',
| label: '备注',
| prop: 'remark',
| minWidth: '100',
| formatData: (params) => {
| if (params == 0) {
| return '作废';
| } else if (params == 1) {
| return '替换';
| } else {
| return null
| }
| },
| formatType: (params) => {
| if (params == 0) {
| return 'danger';
| } else if (params == 1) {
| return 'success';
| } else {
| return null
| }
| }
| },
| {
| dataType: 'action',
| fixed: 'right',
| label: '操作',
| operation: [
| {
| name: '编辑',
| type: 'text',
| clickFun: (row) => {
| this.openEditFormDia(row);
| },
| },
| {
| name: '删除',
| type: 'text',
| clickFun: (row) => {
| this.handleDelete(row);
| },
| },
| ]
| }
| ],
| tableData: [],
| tableLoading: false,
| page: {
| size: 10,
| current: 1,
| total: 0
| },
| formDialog: false,
| editFormDialog: false,
| };
| },
| mounted() {
| this.searchList()
| },
| // 方法集合
| methods: {
| // 查询列表
| searchList() {
| this.tableLoading = true
| pageMethodSearchNew({ standardNo: this.searchForm.standardNo, ...this.page }).then(res => {
| this.tableLoading = false
| if (res.code === 200) {
| this.tableData = res.data.records
| this.page.total = res.data.total
| }
| }).catch(err => {
| console.log('err---', err);
| this.tableLoading = false
| })
| },
| // 重置查询条件
| resetSearchForm() {
| this.searchForm.standardNo = '';
| this.page.current = 1;
| this.searchList()
| },
| // 操作新增框
| openFormDia(row) {
| this.formDialog = true
| this.$nextTick(() => {
| this.$refs.formDialog.openDia(row)
| })
| },
| // 关闭新增弹框
| closeDia() {
| this.formDialog = false
| this.searchList()
| },
| // 打开修改弹框
| openEditFormDia(row) {
| this.editFormDialog = true
| this.$nextTick(() => {
| this.$refs.editFormDialog.openDia(row)
| })
| },
| // 关闭修改弹框
| closeEditDia() {
| this.editFormDialog = false
| this.searchList()
| },
| // 删除标准查新记录
| handleDelete(row) {
| this.$confirm('是否删除该条查新记录?', '提示', {
| confirmButtonText: '确定',
| cancelButtonText: '取消',
| type: 'warning'
| }).then(() => {
| delMethodSearchNew({ methodSearchNewId: row.methodSearchNewId }).then(res => {
| if (res.code !== 200) return
| this.$message.success('删除成功')
| this.searchList()
| })
| }).catch(() => {
| })
| },
| // 分页
| pagination(page) {
| this.page.size = page.limit
| this.searchList();
| },
| },
| // 用于上传文件的信息
| computed: {
| action() {
| return this.javaApi + '/processMethodSearchNew/importMethodSearchNew'
| }
| },
| };
| </script>
|
|