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
| <template>
| <a-table style="width: 92%;margin-left:25px" ref="table" bordered size="middle" rowKey="id" :columns="columns"
| :rowClassName="tableRowClass" :dataSource="dataSource" :pagination="ipagination" :loading="loading">
| <!--字符串超长截取省略号显示-->
| <span slot="num" slot-scope="text" style="font-weight: bold">
| <j-ellipsis :value="text" :length="15" />
| </span>
| <span slot="name" slot-scope="text" style="font-weight: bold">
| <j-ellipsis :value="text" :length="15" />
| </span>
| <span slot="model" slot-scope="text">
| <j-ellipsis :value="text" :length="15" />
| </span>
| </a-table>
| </template>
|
| <script>
|
| import JDictSelectTag from '@/components/dict/JDictSelectTag'
| import { requestPut, getAction } from '@/api/manage'
| import { JeecgListMixin } from '@/mixins/JeecgListMixin'
| import JInput from '@/components/jeecg/JInput'
| import JEllipsis from "@/components/jeecg/JEllipsis";
| import Tooltip from 'ant-design-vue/es/tooltip'
| export default {
| name: 'PrecisionParametersRight',
| mixins: [JeecgListMixin],
| components: {
| Tooltip,
| JDictSelectTag,
| JInput,
| JEllipsis,
| },
| props: {
| recordSelect: {},
| },
| data() {
| return {
| equipmentId:'',
| selectedRowKeys:[],
| selectionRows:[],
| equipmentAccountId: '',
| disabled: true,
| nodeSelected: {},
| columns: [
| {
| title: '精度参数编码',
| dataIndex: 'precisionParametersNum',
| align: "center",
| ellipsis: true
| },
| {
| title: '精度参数名称',
| dataIndex: 'precisionParametersName',
| align: "center",
| ellipsis: true
| },
| {
| title: '计量单位',
| dataIndex: 'precisionParametersUnitName',
| align: "center",
| ellipsis: true
| },
| {
| title: '初始测定值',
| dataIndex: 'actualValue1',
| align: "center",
| width: 120
| },
| {
| title: '容许范围',
| dataIndex: 'precisionParametersUnitName1',
| align: "center",
| },
| {
| title: '实际测定值',
| dataIndex: 'actualValue',
| align: "center",
| width: 120,
| scopedSlots: { customRender: 'actualValue' }
| },
| {
| title: '备注',
| dataIndex: 'remark',
| align: "center",
| width: 60,
| ellipsis: true
| },
|
|
| ],
| queryParam: {},
| ipagination: {
| current: 1,
| pageSize: 3,
| pageSizeOptions: ['3', '10', '20'],
| showTotal: (total, range) => {
| return range[0] + '-' + range[1] + ' 共' + total + '条'
| },
| showQuickJumper: true,
| showSizeChanger: true,
| total: 0
| },
| url: {
| list: '/eam/equipmentPrecisionParameters/list',
| delete: "/eam/precisionParameters/delete",
| deleteBatch: "/eam/precisionParameters/deleteBatch",
| exportXlsUrl: "/eam/precisionParameters/exportXls",
| importExcelUrl: "eam/precisionParameters/importExcel",
| },
| }
| },
| methods: {
| onSelectChange(selectedRowKeys, selectionRows) {
| this.selectedRowKeys = selectedRowKeys;
| this.selectionRows = selectionRows;
|
| },
| loadData(arg) {
| if (!this.url.list) {
| this.$message.error("请设置url.list属性!")
| return
| }
| if (arg === 1) {
| this.ipagination.current = 1;
| }
| var params = this.getQueryParams();//查询条件
| if (this.equipmentId == '') {
| params.equipmentId = '-1';
| } else {
| params.equipmentId = this.equipmentId
| }
| this.loading = true;
| getAction(this.url.list, params).then((res) => {
| if (res.success) {
| this.dataSource = res.result.records || res.result;
| if (res.result.total) {
| this.ipagination.total = res.result.total;
| } else {
| this.ipagination.total = 0;
| }
| } else {
| this.$message.warning(res.message)
| }
| }).finally(() => {
| this.loading = false
| })
| },
| //禁用状态样式
| tableRowClass(record, index) {
| if (record.status != "1") {
| return "frozenRowClass";
| }
| return "";
| },
| searchReset() {
| if ('-1' != this.nodeSelected.key) {
| this.disabled = false;
| this.queryParam = [];
| this.queryParam.precisionParametersCategoryId = this.nodeSelected.key;
| } else {
| this.disabled = true;
| this.queryParam = [];
| }
| this.loadData(1);
| },
| },
| watch: {
| recordSelect(val) {
| this.nodeSelected = val;
| this.precisionParametersCategoryNumName = this.nodeSelected.rfield1 + "/" + this.nodeSelected.rfield2;
| if ('-1' != this.nodeSelected.key) {
| this.disabled = false;
| this.queryParam = [];
| this.queryParam.precisionParametersCategoryId = this.nodeSelected.key;
| } else {
| this.disabled = true;
| this.queryParam = [];
| }
| this.loadData(1);
| }
| },
|
| }
| </script>
|
| <style lang="less" scoped>
| @import '~@assets/less/common.less';
|
| /deep/ .frozenRowClass {
| color: #c9c9c9;
| }
|
| /deep/ .success {
| color: green;
| }
|
| /deep/ .error {
| color: red;
| }
|
| /deep/ .notShow {
| display: none;
| }
|
| .fontweight {
| font-weight: bold;
| }
| </style>
|
|