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
| <template>
| <div ref="container" class="page-list-container">
| <!--数据Table-->
| <yrt-data-list :ref="dataListRef" :editor-ref="editorRef" :data-options="dataOptions" :fields.sync="dataListOptions.fields" :buttons="dataListOptions.buttons" :button-click="buttonClick" :data-list-selections.sync="dataListSelections" :auth-nodes="authNodes">
| </yrt-data-list>
|
| <!--数据编辑器Editor-->
| <yrt-editor :ref="editorRef" :data-list-ref="dataListRef" v-bind="editorOptions" :data-options="dataOptions" :action.sync="editorOptions.action" :visible.sync="editorOptions.config.visible" :detail-button-click="detailButtonClick" :auth-nodes="authNodes" :rules="rules"></yrt-editor>
| </div>
| </template>
|
| <script>
| import baseLayout from "@/components/common/base-layout.vue";
| import { getLodop } from "@/utils/LodopFuncs";
|
| export default {
| name: "tms-basic-pda-print",
| components: {},
| mixins: [baseLayout],
| data() {
| return {
| // 编辑规则验证
| rules: {
| IP: [
| {
| type: "string",
| pattern: /^(?=(\b|\D))(((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))\.){3}((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))(?=(\b|\D))$/,
| message: "IP地址格式不正确"
| },
| {
| type: "string",
| required: true,
| message: "IP地址必填"
| }
| ]
| }
| };
| },
| mounted() {
| // this.getPrintList();
| },
| methods: {
| /**
| * 获得打印机列表
| */
| getPrintList() {
| window.setTimeout(() => {
| var printList = [];
| const LODOP = getLodop();
| var iPrinterCount = LODOP.GET_PRINTER_COUNT();
| for (var i = 0; i < iPrinterCount; i++) {
| const name = LODOP.GET_PRINTER_NAME(i);
| printList.push({
| id: i,
| value: name,
| label: name,
| PrinterName: name
| });
| }
| this.editor.setDropdownData(9000, printList);
| }, 3000);
| }
| }
| };
| </script>
|
|