safecheck-client 3.0.30-50 → 3.0.30-52
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/package.json +133 -133
- package/src/App.vue +31 -31
- package/src/components/Util.js +15 -0
- package/src/components/pc/Edit.vue +111 -35
- package/src/components/pc/PaperEdit.vue +56 -53
- package/src/filiale/fugou/android/AddPlanItem.vue +413 -0
- package/src/filiale/fugou/android.js +10 -0
- package/src/filiale/wensu/pc/DefectPaperNew.vue +1138 -1138
- package/src/filiale/wensu/pc/RoleSelector.vue +150 -150
- package/src/filiale/yangchunboneng/pc/CheckBookDetails.vue +213 -213
- package/src/main.js +33 -33
@@ -1,47 +1,123 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
</div>
|
2
|
+
<div>
|
3
|
+
<button @click="handleClick">渲染</button>
|
4
|
+
<button @click="savePaper">保存</button>
|
5
|
+
<iframe v-if="showSketchPage" :src="sketchPageSrc" id="aaaa2" style="width: 100%; height: 600px;"></iframe>
|
6
|
+
</div>
|
8
7
|
</template>
|
9
8
|
|
10
9
|
<script>
|
10
|
+
import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
|
11
|
+
import * as util from "../Util"
|
12
|
+
|
11
13
|
export default {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
title: 'App',
|
15
|
+
data() {
|
16
|
+
return {
|
17
|
+
inputText: '',
|
18
|
+
showSketchPage: false,
|
19
|
+
sketchPageSrc: '/sketch',
|
20
|
+
sketchId: '',
|
21
|
+
title: '',
|
22
|
+
paperMessage: ''
|
23
|
+
};
|
24
|
+
},
|
25
|
+
props: {
|
26
|
+
row: {
|
27
|
+
type: Object
|
28
|
+
}
|
29
|
+
},
|
30
|
+
ready() {
|
31
|
+
if (this.row) {
|
32
|
+
try {
|
33
|
+
let hex = Buffer.from(this.row.blob, 'hex').toString('utf8');
|
34
|
+
if (!hex.includes('{')) {
|
35
|
+
this.inputText = Buffer.from(hex, 'hex').toString('utf8');
|
36
|
+
} else {
|
37
|
+
this.inputText = hex;
|
38
|
+
}
|
39
|
+
} catch (e) {
|
40
|
+
this.$showMessage('网络异常请联系管理员')
|
41
|
+
}
|
42
|
+
}
|
43
|
+
this.handleClick()
|
44
|
+
},
|
45
|
+
methods: {
|
46
|
+
handleClick() {
|
47
|
+
this.showSketchPage = true;
|
48
|
+
this.$nextTick(() => {
|
49
|
+
const sketchIframe = document.getElementById('aaaa2');
|
50
|
+
|
51
|
+
window.addEventListener('message', (event) => {
|
52
|
+
if (JSON.parse(event.data.param).gadgets.length > 0) {
|
53
|
+
this.paperMessage = event.data.param;
|
54
|
+
}
|
55
|
+
});
|
56
|
+
|
57
|
+
sketchIframe.contentWindow.postMessage(this.inputText, '*');
|
58
|
+
})
|
19
59
|
},
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
};
|
41
|
-
}); // 逻辑空着
|
60
|
+
savePaper() {
|
61
|
+
if (!this.paperMessage) {
|
62
|
+
this.$showMessage('请先点击左上角保存图标')
|
63
|
+
return
|
64
|
+
}
|
65
|
+
let param = JSON.parse(this.paperMessage)
|
66
|
+
if (!param.title) {
|
67
|
+
this.$showMessage('请填写示意图标题')
|
68
|
+
return
|
69
|
+
}
|
70
|
+
param.sketchId = param.sketchId ? param.sketchId : util.generateUUID()
|
71
|
+
let gadgets = param.gadgets
|
72
|
+
if (gadgets.length > 0) {
|
73
|
+
var jsonString = JSON.stringify(param);
|
74
|
+
var reqdata = {
|
75
|
+
blob: Buffer.from(jsonString,'utf8').toString('hex'),
|
76
|
+
orgid: this.$login.f.orgid,
|
77
|
+
orgname: this.$login.f.orgs,
|
78
|
+
title: param.title,
|
79
|
+
sketchId: param.sketchId
|
42
80
|
}
|
81
|
+
new HttpResetClass().load('POST', 'rs/logic/savePaperEdit', {data: reqdata}).then(res => {
|
82
|
+
if (res.data.code === 200) {
|
83
|
+
this.$showMessage('保存成功')
|
84
|
+
} else {
|
85
|
+
this.$showMessage('保存失败')
|
86
|
+
}
|
87
|
+
})
|
88
|
+
}
|
43
89
|
},
|
90
|
+
hexToBytes(hex) {
|
91
|
+
for (var bytes = [], c = 0; c < hex.length; c += 2)
|
92
|
+
bytes.push(parseInt(hex.substring(c, 2), 16));
|
93
|
+
return new Uint8Array(bytes);
|
94
|
+
},
|
95
|
+
decodeHexStringToJSON(hexString) {
|
96
|
+
// 去除前缀 "0x"
|
97
|
+
var cleanHexString = hexString.slice(2);
|
98
|
+
|
99
|
+
// 将十六进制字符串转换为字节数组
|
100
|
+
var byteArray = this.hexToBytes(cleanHexString);
|
101
|
+
|
102
|
+
// 创建 Blob 对象
|
103
|
+
var blob = new Blob([byteArray], {type: 'application/json'});
|
44
104
|
|
105
|
+
// 读取 Blob 为文本
|
106
|
+
return new Promise(function(resolve, reject) {
|
107
|
+
var reader = new FileReader();
|
108
|
+
reader.onloadend = function() {
|
109
|
+
resolve(reader.result);
|
110
|
+
};
|
111
|
+
reader.onerror = function() {
|
112
|
+
reject(reader.error);
|
113
|
+
};
|
114
|
+
reader.readAsText(blob, 'UTF-8');
|
115
|
+
});
|
116
|
+
}
|
117
|
+
},
|
118
|
+
// beforeDestroy() {
|
119
|
+
// this.savePaper()
|
120
|
+
// }
|
45
121
|
}
|
46
122
|
</script>
|
47
123
|
|
@@ -6,32 +6,37 @@
|
|
6
6
|
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
7
7
|
<div class="row">
|
8
8
|
<div class="form-group col-sm-2">
|
9
|
-
<label class="font_normal_body"
|
10
|
-
<input type="text" class="input_search" v-model="model.
|
11
|
-
|
9
|
+
<label class="font_normal_body">用户编号</label>
|
10
|
+
<input type="text" class="input_search" v-model="model.title"
|
11
|
+
condition="tui.f_userinfo_code like '%{}%'"
|
12
|
+
style="width: 60%" placeholder="示意图标题" >
|
12
13
|
</div>
|
13
14
|
<div class="form-group col-sm-2">
|
14
|
-
<label class="font_normal_body"
|
15
|
-
<input type="text" class="input_search" v-model="model.
|
16
|
-
|
15
|
+
<label class="font_normal_body">示意图标题</label>
|
16
|
+
<input type="text" class="input_search" v-model="model.title"
|
17
|
+
condition="tcs.title like '%{}%'"
|
18
|
+
style="width: 60%" placeholder="示意图标题" >
|
17
19
|
</div>
|
18
20
|
<div class="form-group col-sm-2">
|
19
|
-
<label class="font_normal_body"
|
20
|
-
<input type="text" class="input_search" v-model="model.
|
21
|
-
|
21
|
+
<label class="font_normal_body">示意图id</label>
|
22
|
+
<input type="text" class="input_search" v-model="model.blob_id"
|
23
|
+
condition="tcs.blob_id like '%{}%'"
|
24
|
+
style="width: 60%" placeholder="示意图id" >
|
22
25
|
</div>
|
23
26
|
<div class="form-group col-sm-2">
|
24
|
-
<label class="font_normal_body"
|
25
|
-
<input type="text" class="input_search" v-model="model.
|
26
|
-
|
27
|
+
<label class="font_normal_body">单位名称</label>
|
28
|
+
<input type="text" class="input_search" v-model="model.gas_point_name"
|
29
|
+
condition="tcs.gas_point_name like '%{}%'"
|
30
|
+
style="width: 60%" placeholder="单位名称" >
|
27
31
|
</div>
|
28
32
|
<div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
|
29
33
|
<export-excel-safe :data="$parent.$parent.searchData"
|
30
34
|
:field="$parent.$parent.excelHeaders"
|
31
35
|
:choose-col="true"
|
32
|
-
sqlurl="rs/logic/SafeExportExcel" sql-name="
|
33
|
-
template-name='
|
34
|
-
<button class="button_spacing button_search" @click="$parent.$parent.
|
36
|
+
sqlurl="rs/logic/SafeExportExcel" sql-name="queryPaperEdit"
|
37
|
+
template-name='图纸编辑'></export-excel-safe>
|
38
|
+
<button class="button_spacing button_search" @click="$parent.$parent.search()">查询</button>
|
39
|
+
<button class="button_spacing button_search" @click="$parent.$parent.change()">新建</button>
|
35
40
|
</div>
|
36
41
|
</div>
|
37
42
|
</div>
|
@@ -40,61 +45,58 @@
|
|
40
45
|
<template partial='head'>
|
41
46
|
<tr>
|
42
47
|
<th>
|
43
|
-
<nobr
|
48
|
+
<nobr>序号</nobr>
|
44
49
|
</th>
|
45
50
|
<th>
|
46
|
-
<nobr
|
51
|
+
<nobr>分公司</nobr>
|
47
52
|
</th>
|
48
53
|
<th>
|
49
|
-
<nobr
|
54
|
+
<nobr>单位编号</nobr>
|
50
55
|
</th>
|
51
56
|
<th>
|
52
57
|
<nobr>单位名称</nobr>
|
53
58
|
</th>
|
54
59
|
<th>
|
55
|
-
<nobr
|
56
|
-
</th>
|
57
|
-
<th>
|
58
|
-
<nobr>分公司</nobr>
|
60
|
+
<nobr>示意图标题</nobr>
|
59
61
|
</th>
|
60
62
|
<th>
|
61
63
|
<nobr>示意图id</nobr>
|
62
64
|
</th>
|
65
|
+
|
63
66
|
<th>
|
64
67
|
<nobr>操作</nobr>
|
65
68
|
</th>
|
66
69
|
</tr>
|
67
70
|
</template>
|
68
71
|
<template partial='body'>
|
69
|
-
|
70
|
-
<td style="text-align: center">{{ row.
|
72
|
+
<td style="text-align: center">{{ $index+1 }}</td>
|
73
|
+
<td style="text-align: center">{{ row.gas_point_name }}</td>
|
71
74
|
<td style="text-align: center">{{ row.gas_point_id }}</td>
|
72
75
|
<td style="text-align: center">{{ row.gas_point_name }}</td>
|
73
76
|
<td style="text-align: center">{{ row.title }}</td>
|
74
|
-
<td style="text-align: center">{{ row.
|
75
|
-
|
76
|
-
<td style="text-align: center">{{ row.blod_id }}</td>
|
77
|
+
<td style="text-align: center">{{ row.blob_id }}</td>
|
78
|
+
|
77
79
|
<td style="text-align: center">
|
78
|
-
<button class="button_spacing button_search-1" @click='change(row)'>查看</button>
|
80
|
+
<button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
|
79
81
|
</td>
|
80
82
|
</template>
|
81
83
|
</data-grid>
|
82
84
|
</criteria-paged>
|
83
85
|
</div>
|
86
|
+
<modal :show.sync="showModal" v-ref:modal backdrop="false" :width="1200">
|
87
|
+
<div slot="modal-header" class="modal-header">
|
88
|
+
<h4 class="modal-title">
|
89
|
+
打开图纸编辑
|
90
|
+
</h4>
|
91
|
+
</div>
|
92
|
+
<div slot="modal-body" class="modal-body">
|
93
|
+
<edit :row="rowData" v-if="showModal"></edit>
|
94
|
+
</div>
|
95
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
96
|
+
<button class="button_search" @click="cancel">取消</button>
|
97
|
+
</div>
|
98
|
+
</modal>
|
84
99
|
</div>
|
85
|
-
<modal :show.sync="showModal" v-ref:modal backdrop="false" :width="1200">
|
86
|
-
<div slot="modal-header" class="modal-header">
|
87
|
-
<h4 class="modal-title">
|
88
|
-
打开图纸编辑
|
89
|
-
</h4>
|
90
|
-
</div>
|
91
|
-
<div slot="modal-body" class="modal-body">
|
92
|
-
<edit></edit>
|
93
|
-
</div>
|
94
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
95
|
-
<button class="button_search" @click="cancel">取消</button>
|
96
|
-
</div>
|
97
|
-
</modal>
|
98
100
|
</template>
|
99
101
|
|
100
102
|
<script>
|
@@ -110,34 +112,35 @@ export default {
|
|
110
112
|
return {
|
111
113
|
searchData: {
|
112
114
|
condition: "1=1",
|
113
|
-
f_plan_id: "",
|
114
|
-
f_approved: '',
|
115
|
-
f_entry_status: '',
|
116
|
-
f_no_checkplan: '',
|
117
|
-
f_filialeid: `('${this.$login.f.orgid}')`
|
118
115
|
},
|
119
116
|
model: new PagedList('rs/sql/queryPaperEdit', 20, {}),
|
120
117
|
excelHeaders: {
|
121
|
-
'
|
118
|
+
'id': '序号',
|
119
|
+
'orgname': '分公司',
|
122
120
|
'gas_point_id': '单位编号',
|
123
|
-
'gas_point_name': '
|
124
|
-
'title': '
|
125
|
-
'
|
126
|
-
'title1': '分公司',
|
127
|
-
'blod_id': '示意图id',
|
121
|
+
'gas_point_name': '单位名称',
|
122
|
+
'title': '示意图标题',
|
123
|
+
'blob_id': '示意图id',
|
128
124
|
},
|
129
125
|
showModal: false,
|
126
|
+
rowData:''
|
130
127
|
}
|
131
128
|
},
|
132
129
|
methods: {
|
133
|
-
change() {
|
130
|
+
change(row) {
|
131
|
+
this.rowData = row
|
134
132
|
this.showModal = true
|
133
|
+
console.log(this)
|
135
134
|
},
|
136
135
|
search() {
|
137
136
|
this.$refs.paged.$refs.criteria.search()
|
138
137
|
},
|
139
138
|
cancel() {
|
140
139
|
this.showModal = false
|
140
|
+
},
|
141
|
+
selfSearch(args) {
|
142
|
+
this.searchData.condition = args.condition
|
143
|
+
this.model.search(args.condition, args.model, args.condValue)
|
141
144
|
}
|
142
145
|
},
|
143
146
|
|