safecheck-client 3.0.30-8 → 3.0.30-80
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/examples/SafePlan-liaoyuan/App.vue +3 -1
- package/package.json +4 -3
- package/src/components/Util.js +15 -0
- package/src/components/android/AddPlanItem.vue +5 -2
- package/src/components/android/AreaPlan.vue +2 -2
- package/src/components/android/CurrentCreate.vue +1050 -1049
- package/src/components/android/CurrentCreate_new.vue +563 -559
- package/src/components/android/PaperFeedback.vue +1481 -1479
- package/src/components/android/SafecheckOrderV.vue +2 -2
- package/src/components/android/UploadPage.vue +13 -123
- package/src/components/paper/PaperList.vue +9 -2
- package/src/components/paper/PlanChooser.vue +8 -6
- package/src/components/pc/Edit.vue +126 -0
- package/src/components/pc/LodopFuncs.js +159 -0
- package/src/components/pc/NewCheckpaper.vue +9 -5
- package/src/components/pc/PaperEdit.vue +151 -0
- package/src/components/pc/PrintData.vue +243 -0
- package/src/components/pc/PrintTable.vue +241 -0
- package/src/components/pc/SelectCheckPlanAndNoPLan.vue +3 -0
- package/src/components/report/NoCheckplanSafecheck.vue +0 -2
- package/src/components/rongcheng/CheckCurrentCreate.vue +1070 -1062
- package/src/components/rongcheng/PaperStatem.vue +414 -373
- package/src/components/rongcheng/PhoneUpUserinfo.vue +1191 -1241
- package/src/components/rongcheng/SafecheckOrderV.vue +8 -0
- package/src/components/rongcheng/SafecheckUserInfo.vue +988 -569
- package/src/components/rongcheng/report/CheckPlanAreaList.vue +21 -3
- package/src/filiale/fugou/android/AddPlanItem.vue +413 -0
- package/src/filiale/fugou/android.js +10 -0
- package/src/filiale/hanzhong/android/SafecheckDevices.vue +1313 -1313
- package/src/filiale/hanzhong/android/SafecheckOrderV.vue +2 -2
- package/src/filiale/hanzhong/pc/NewCheckpaper.vue +1923 -0
- package/src/filiale/hanzhong/pc.js +4 -1
- package/src/filiale/huatong/android/CurrentCreate.vue +564 -564
- package/src/filiale/huatong/android/SafecheckOrderV.vue +8 -0
- package/src/filiale/jingyang/android/PhoneUpUserinfo.vue +34 -34
- package/src/filiale/jingyang/pc/PaperList.vue +793 -793
- package/src/filiale/kelai/android/AddPlanItem.vue +488 -0
- package/src/filiale/kelai/android.js +1 -0
- package/src/filiale/liaoyuan/android/CurrentCreate.vue +1066 -0
- package/src/filiale/liaoyuan/android.js +1 -0
- package/src/filiale/pingxiang/pc/DefectPaperNew.vue +1 -1
- package/src/filiale/qianneng/android/PaperFeedback.vue +40 -0
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +6 -0
- package/src/filiale/tianke/pc/checkScreen.vue +4 -4
- package/src/filiale/tianke/pc/cq.jpg +0 -0
- package/src/filiale/tianke/pc/qy.jpg +0 -0
- package/src/filiale/tongchuan/android/SafecheckDevices.vue +1 -0
- package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1060 -1090
- package/src/filiale/wensu/android/AndroidDefectDeal.vue +321 -366
- package/src/filiale/wensu/android/AndroidDefectDealItems.vue +480 -0
- package/src/filiale/wensu/android.js +1 -0
- package/src/filiale/wensu/pc/CheckSearchUser.vue +64 -0
- package/src/filiale/wensu/pc/DefectPaperNew.vue +16 -10
- package/src/filiale/wensu/pc/NewCheckpaper.vue +1936 -0
- package/src/filiale/wensu/pc/RoleSelector.vue +4 -1
- package/src/filiale/wensu/pc/checkUserList.vue +50 -0
- package/src/filiale/wensu/pc.js +2 -1
- package/src/filiale/wenxi/pc/DefectPaper.vue +1 -1
- package/src/filiale/wuhai/android/SafecheckOrderV.vue +2069 -2041
- package/src/filiale/wuhai/pc/NewCheckpaper.vue +1281 -1279
- package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1150 -1150
- package/src/filiale/yangchunboneng/android/PaperFeedback.vue +20 -0
- package/src/filiale/yangchunboneng/pc/CheckBookDetails.vue +19 -0
- package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1077 -1077
- package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +849 -849
- package/src/filiale/yangchunboneng/pc/PaperList.vue +727 -727
- package/src/filiale/yongzhou/pc/CheckSearchUser.vue +1092 -0
- package/src/filiale/yongzhou/pc/LodopFuncs.js +159 -0
- package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +252 -0
- package/src/filiale/yongzhou/pc/PaperList.vue +798 -0
- package/src/filiale/yongzhou/pc/PrintData.vue +243 -0
- package/src/filiale/yongzhou/pc/PrintTable.vue +241 -0
- package/src/filiale/yongzhou/pc/communityDetail.vue +35 -12
- package/src/filiale/yongzhou/pc/communityTypeDetailG.vue +28 -14
- package/src/filiale/yongzhou/pc/communityTypeDetailM.vue +28 -14
- package/src/filiale/yongzhou/pc/safeDetail.vue +43 -15
- package/src/filiale/yongzhou/pc/safeStatistics.vue +16 -6
- package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +88 -29
- package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +63 -27
- package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +16 -6
- package/src/filiale/yongzhou/pc/safeTable.vue +10 -2
- package/src/filiale/yongzhou/pc.js +17 -12
- package/src/filiale/zhongsheng/android/CurrentCreate.vue +540 -536
- package/src/filiale/zhongsheng/android/SafecheckUserInfo.vue +151 -53
- package/src/filiale/zhongsheng/pc/NewCheckpaper.vue +14 -0
- package/src/main.js +1 -1
- package/src/safecheck.js +12 -0
@@ -0,0 +1,159 @@
|
|
1
|
+
var CreatedOKLodop7766 = null
|
2
|
+
|
3
|
+
// ====判断是否需要安装CLodop云打印服务器:====
|
4
|
+
function needCLodop () {
|
5
|
+
// return false;
|
6
|
+
try {
|
7
|
+
// 看是什么浏览器
|
8
|
+
var ua = navigator.userAgent
|
9
|
+
// windows,安装
|
10
|
+
if (ua.match(/Windows\sPhone/i) != null) return true
|
11
|
+
// iPhone, 安装
|
12
|
+
if (ua.match(/iPhone|iPod/i) != null) return true
|
13
|
+
// Android, 安装
|
14
|
+
if (ua.match(/Android/i) != null) return true
|
15
|
+
// Edge,安装
|
16
|
+
if (ua.match(/Edge\D?\d+/i) != null) return true
|
17
|
+
// QQ,不安装
|
18
|
+
if (ua.match(/QQBrowser/i) != null) return false
|
19
|
+
|
20
|
+
var verTrident = ua.match(/Trident\D?\d+/i)
|
21
|
+
var verIE = ua.match(/MSIE\D?\d+/i)
|
22
|
+
var verOPR = ua.match(/OPR\D?\d+/i)
|
23
|
+
var verFF = ua.match(/Firefox\D?\d+/i)
|
24
|
+
var x64 = ua.match(/x64/i)
|
25
|
+
if ((verTrident == null) && (verIE == null) && (x64 !== null)) {
|
26
|
+
return true
|
27
|
+
} else if (verFF !== null) {
|
28
|
+
verFF = verFF[0].match(/\d+/)
|
29
|
+
if (verFF[0] >= 42) return true
|
30
|
+
} else if (verOPR !== null) {
|
31
|
+
verOPR = verOPR[0].match(/\d+/)
|
32
|
+
if (verOPR[0] >= 32) return true
|
33
|
+
} else if ((verTrident == null) && (verIE == null)) {
|
34
|
+
var verChrome = ua.match(/Chrome\D?\d+/i)
|
35
|
+
if (verChrome !== null) {
|
36
|
+
verChrome = verChrome[0].match(/\d+/)
|
37
|
+
if (verChrome[0] >= 42) return true
|
38
|
+
}
|
39
|
+
}
|
40
|
+
return false
|
41
|
+
} catch (err) {
|
42
|
+
return true
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
// ====页面引用CLodop云打印必须的JS文件:====
|
47
|
+
if (needCLodop()) {
|
48
|
+
var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement
|
49
|
+
var oscript = document.createElement('script')
|
50
|
+
// 让本机浏览器打印(更优先):
|
51
|
+
oscript.src = 'http://localhost:18000/CLodopfuncs.js?priority=1'
|
52
|
+
head.insertBefore(oscript, head.firstChild)
|
53
|
+
}
|
54
|
+
|
55
|
+
// ====获取LODOP对象的主过程:====
|
56
|
+
function getLodop (oOBJECT, oEMBED) {
|
57
|
+
// 显示提示用的内容
|
58
|
+
var strHtmInstall = "<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='http://113.10.155.131/install_lodop32.zip' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>"
|
59
|
+
var strHtmUpdate = "<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='http://113.10.155.131/install_lodop32.zip' target='_self'>执行升级</a>,升级后请重新进入。</font>"
|
60
|
+
var strHtm64_Install = "<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='http://113.10.155.131/install_lodop64.zip' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>"
|
61
|
+
var strHtm64_Update = "<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='http://113.10.155.131/install_lodop64.zip' target='_self'>执行升级</a>,升级后请重新进入。</font>"
|
62
|
+
var strHtmFireFox = "<br><br><font color='#FF00FF'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>"
|
63
|
+
var strHtmChrome = "<br><br><font color='#FF00FF'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>"
|
64
|
+
var strCLodopInstall = "<br><font color='#FF00FF'>CLodop云打印服务(localhost本地)未安装启动!点击这里<a href='CLodopPrint_Setup_for_Win32NT.zip' target='_self'>执行安装</a>,安装后请刷新页面。</font>"
|
65
|
+
var strCLodopUpdate = "<br><font color='#FF00FF'>CLodop云打印服务需升级!点击这里<a href='CLodopPrint_Setup_for_Win32NT.zip' target='_self'>执行升级</a>,升级后请刷新页面。</font>"
|
66
|
+
|
67
|
+
var LODOP
|
68
|
+
try {
|
69
|
+
var isIE = (navigator.userAgent.indexOf('MSIE') >= 0) || (navigator.userAgent.indexOf('Trident') >= 0)
|
70
|
+
if (needCLodop()) {
|
71
|
+
try {
|
72
|
+
// 调用脚本中的获取打印对象
|
73
|
+
LODOP = getCLodop()
|
74
|
+
} catch (err) {
|
75
|
+
}
|
76
|
+
// 如果没找到打印控件
|
77
|
+
if (!LODOP && document.readyState !== 'complete') {
|
78
|
+
alert('C-Lodop没准备好,请稍后再试!')
|
79
|
+
return
|
80
|
+
}
|
81
|
+
if (!LODOP) {
|
82
|
+
if (isIE) {
|
83
|
+
// document.write(strCLodopInstall)
|
84
|
+
if(confirm('CLodop云打印服务(localhost本地)未安装启动!你确定要安装吗?\n(点击确定进行安装,安装后请刷新页面)')){
|
85
|
+
window.open('download/CLodop_Setup_for_Win32NT.exe')
|
86
|
+
}
|
87
|
+
}
|
88
|
+
else {
|
89
|
+
// document.documentElement.innerHTML = strCLodopInstall + document.documentElement.innerHTML
|
90
|
+
if(confirm('CLodop云打印服务(localhost本地)未安装启动!你确定要安装吗?\n(点击确定进行安装,安装后请刷新页面)')){
|
91
|
+
window.open('download/CLodop_Setup_for_Win32NT.exe')
|
92
|
+
}
|
93
|
+
}
|
94
|
+
return
|
95
|
+
} else { // 找到后的处理
|
96
|
+
if (CLODOP.CVERSION < '2.0.6.2') {
|
97
|
+
if (isIE) document.write(strCLodopUpdate)
|
98
|
+
else {
|
99
|
+
document.documentElement.innerHTML = strCLodopUpdate + document.documentElement.innerHTML
|
100
|
+
}
|
101
|
+
}
|
102
|
+
if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED)
|
103
|
+
if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT)
|
104
|
+
}
|
105
|
+
} else { // 非云服务
|
106
|
+
var is64IE = isIE && (navigator.userAgent.indexOf('x64') >= 0)
|
107
|
+
// =====如果页面有Lodop就直接使用,没有则新建:==========
|
108
|
+
if (oOBJECT !== undefined || oEMBED !== undefined) {
|
109
|
+
if (isIE) LODOP = oOBJECT
|
110
|
+
else LODOP = oEMBED
|
111
|
+
} else if (CreatedOKLodop7766 == null) {
|
112
|
+
LODOP = document.createElement('object')
|
113
|
+
LODOP.setAttribute('width', 0)
|
114
|
+
LODOP.setAttribute('height', 0)
|
115
|
+
LODOP.setAttribute('style', 'position:absolute;left:0px;top:-100px;width:0px;height:0px;')
|
116
|
+
if (isIE) LODOP.setAttribute('classid', 'clsid:2105C259-1E0C-4534-8141-A753534CB4CA')
|
117
|
+
else LODOP.setAttribute('type', 'application/x-print-lodop')
|
118
|
+
document.documentElement.appendChild(LODOP)
|
119
|
+
CreatedOKLodop7766 = LODOP
|
120
|
+
} else LODOP = CreatedOKLodop7766
|
121
|
+
// =====Lodop插件未安装时提示下载地址:==========
|
122
|
+
if ((LODOP == null) || (typeof (LODOP.VERSION) === 'undefined')) {
|
123
|
+
if (navigator.userAgent.indexOf('Chrome') >= 0) {
|
124
|
+
document.documentElement.innerHTML = strHtmChrome + document.documentElement.innerHTML
|
125
|
+
}
|
126
|
+
if (navigator.userAgent.indexOf('Firefox') >= 0) {
|
127
|
+
document.documentElement.innerHTML = strHtmFireFox + document.documentElement.innerHTML
|
128
|
+
}
|
129
|
+
if (is64IE) document.write(strHtm64_Install)
|
130
|
+
else if (isIE) document.write(strHtmInstall)
|
131
|
+
else {
|
132
|
+
document.documentElement.innerHTML = strHtmInstall + document.documentElement.innerHTML
|
133
|
+
}
|
134
|
+
return LODOP
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
// 检查版本
|
139
|
+
if (LODOP.VERSION < '6.2.0.3') {
|
140
|
+
if (needCLodop()) {
|
141
|
+
document.documentElement.innerHTML = strCLodopUpdate + document.documentElement.innerHTML
|
142
|
+
} else if (is64IE) {
|
143
|
+
document.write(strHtm64_Update)
|
144
|
+
} else if (isIE) {
|
145
|
+
document.write(strHtmUpdate)
|
146
|
+
} else {
|
147
|
+
document.documentElement.innerHTML = strHtmUpdate + document.documentElement.innerHTML
|
148
|
+
}
|
149
|
+
return LODOP
|
150
|
+
}
|
151
|
+
// ===如下空白位置适合调用统一功能(如注册语句、语言选择等):===
|
152
|
+
LODOP.SET_LICENSES('西安奥枫软件有限公司', '552C41D5AB0D146FCF77D05CD8AA15A1', '', '')
|
153
|
+
return LODOP
|
154
|
+
} catch (err) {
|
155
|
+
alert('getLodop出错:' + err)
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
export default getLodop
|
@@ -1330,13 +1330,17 @@ export default {
|
|
1330
1330
|
}
|
1331
1331
|
}
|
1332
1332
|
//tag
|
1333
|
-
|
1334
1333
|
//tag)
|
1335
|
-
if (!this.item.f_safecheck_type) {
|
1334
|
+
if (!this.item.f_safecheck_type && Vue.config.safecheck.SafecheckType) {
|
1336
1335
|
this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType['年度普检'][this.item.f_check_type]])
|
1337
|
-
} else {
|
1338
|
-
|
1339
|
-
|
1336
|
+
} else if (Vue.config.safecheck.SafecheckType){
|
1337
|
+
this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_check_type]])
|
1338
|
+
}else {
|
1339
|
+
if(this.item.f_check_type == '民用'){
|
1340
|
+
this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
|
1341
|
+
}else {
|
1342
|
+
this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
|
1343
|
+
}
|
1340
1344
|
}
|
1341
1345
|
//遍历安检项配置
|
1342
1346
|
for (let i in this.config) {
|
@@ -0,0 +1,151 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="flex-row">
|
3
|
+
<div class="basic-main">
|
4
|
+
<criteria-paged :model="model" v-ref:paged @sort="sort">
|
5
|
+
<criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
|
6
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
7
|
+
<div class="row">
|
8
|
+
<div class="form-group col-sm-2">
|
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="示意图标题" >
|
13
|
+
</div>
|
14
|
+
<div class="form-group col-sm-2">
|
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="示意图标题" >
|
19
|
+
</div>
|
20
|
+
<div class="form-group col-sm-2">
|
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" >
|
25
|
+
</div>
|
26
|
+
<div class="form-group col-sm-2">
|
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="单位名称" >
|
31
|
+
</div>
|
32
|
+
<div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
|
33
|
+
<export-excel-safe :data="$parent.$parent.searchData"
|
34
|
+
:field="$parent.$parent.excelHeaders"
|
35
|
+
:choose-col="true"
|
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>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</criteria>
|
44
|
+
<data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
|
45
|
+
<template partial='head'>
|
46
|
+
<tr>
|
47
|
+
<th>
|
48
|
+
<nobr>序号</nobr>
|
49
|
+
</th>
|
50
|
+
<th>
|
51
|
+
<nobr>分公司</nobr>
|
52
|
+
</th>
|
53
|
+
<th>
|
54
|
+
<nobr>单位编号</nobr>
|
55
|
+
</th>
|
56
|
+
<th>
|
57
|
+
<nobr>单位名称</nobr>
|
58
|
+
</th>
|
59
|
+
<th>
|
60
|
+
<nobr>示意图标题</nobr>
|
61
|
+
</th>
|
62
|
+
<th>
|
63
|
+
<nobr>示意图id</nobr>
|
64
|
+
</th>
|
65
|
+
|
66
|
+
<th>
|
67
|
+
<nobr>操作</nobr>
|
68
|
+
</th>
|
69
|
+
</tr>
|
70
|
+
</template>
|
71
|
+
<template partial='body'>
|
72
|
+
<td style="text-align: center">{{ $index+1 }}</td>
|
73
|
+
<td style="text-align: center">{{ row.gas_point_name }}</td>
|
74
|
+
<td style="text-align: center">{{ row.gas_point_id }}</td>
|
75
|
+
<td style="text-align: center">{{ row.gas_point_name }}</td>
|
76
|
+
<td style="text-align: center">{{ row.title }}</td>
|
77
|
+
<td style="text-align: center">{{ row.blob_id }}</td>
|
78
|
+
|
79
|
+
<td style="text-align: center">
|
80
|
+
<button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
|
81
|
+
</td>
|
82
|
+
</template>
|
83
|
+
</data-grid>
|
84
|
+
</criteria-paged>
|
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>
|
99
|
+
</div>
|
100
|
+
</template>
|
101
|
+
|
102
|
+
<script>
|
103
|
+
import {PagedList} from 'vue-client'
|
104
|
+
import Vue from 'vue'
|
105
|
+
import co from 'co'
|
106
|
+
import * as Util from '../Util'
|
107
|
+
import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
|
108
|
+
|
109
|
+
export default {
|
110
|
+
title: '图纸编辑页面',
|
111
|
+
data() {
|
112
|
+
return {
|
113
|
+
searchData: {
|
114
|
+
condition: "1=1",
|
115
|
+
},
|
116
|
+
model: new PagedList('rs/sql/queryPaperEdit', 20, {}),
|
117
|
+
excelHeaders: {
|
118
|
+
'id': '序号',
|
119
|
+
'orgname': '分公司',
|
120
|
+
'gas_point_id': '单位编号',
|
121
|
+
'gas_point_name': '单位名称',
|
122
|
+
'title': '示意图标题',
|
123
|
+
'blob_id': '示意图id',
|
124
|
+
},
|
125
|
+
showModal: false,
|
126
|
+
rowData:''
|
127
|
+
}
|
128
|
+
},
|
129
|
+
methods: {
|
130
|
+
change(row) {
|
131
|
+
this.rowData = row
|
132
|
+
this.showModal = true
|
133
|
+
console.log(this)
|
134
|
+
},
|
135
|
+
search() {
|
136
|
+
this.$refs.paged.$refs.criteria.search()
|
137
|
+
},
|
138
|
+
cancel() {
|
139
|
+
this.showModal = false
|
140
|
+
},
|
141
|
+
selfSearch(args) {
|
142
|
+
this.searchData.condition = args.condition
|
143
|
+
this.model.search(args.condition, args.model, args.condValue)
|
144
|
+
}
|
145
|
+
},
|
146
|
+
|
147
|
+
ready() {
|
148
|
+
|
149
|
+
}
|
150
|
+
}
|
151
|
+
</script>
|
@@ -0,0 +1,243 @@
|
|
1
|
+
<template>
|
2
|
+
<button class="button_export button_spacing" @click='printData()'>打印</button>
|
3
|
+
<modal :show.sync="printshow" v-ref:modal backdrop="false">
|
4
|
+
<header slot="modal-header" class="modal-header text-center">
|
5
|
+
<h4 class="modal-title">打印列选择</h4>
|
6
|
+
<input type="checkbox" class="" id="f_generations" v-model="all">
|
7
|
+
<label for="f_generations" class="font-size">全选</label>
|
8
|
+
</header>
|
9
|
+
<article slot="modal-body">
|
10
|
+
<div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
|
11
|
+
<div class="col-sm-3" v-for="f in fields">
|
12
|
+
<input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">
|
13
|
+
<label :for="'water-owe-details-'+$index" class="font-size">{{f}}</label>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</article>
|
17
|
+
<footer slot="modal-footer" class="modal-footer">
|
18
|
+
<center>
|
19
|
+
<button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>
|
20
|
+
<button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>
|
21
|
+
<print-table-safe :model='model' v-show="false" v-ref:print
|
22
|
+
:printview="printview"
|
23
|
+
:xyprint="xyprint"
|
24
|
+
:top='40' :left='40' :right='40' :bottom='40' :print-name="printName"
|
25
|
+
:thead="thead" :tfoot='tfoot' :attach="attach" :sumhtml="sumhtml"
|
26
|
+
:fields="modelval" :is-selected="isSelected" :printpage="printpage">
|
27
|
+
</print-table-safe>
|
28
|
+
</center>
|
29
|
+
</footer>
|
30
|
+
</modal>
|
31
|
+
</template>
|
32
|
+
|
33
|
+
<script>
|
34
|
+
import co from 'co'
|
35
|
+
|
36
|
+
export default {
|
37
|
+
// data:sql需要的替换字段
|
38
|
+
// sqlurl:导出Excel查询的sql语句
|
39
|
+
// field:需要导出Excel的字段名和对应中文名或hbm配置文件名(全名)
|
40
|
+
// total:统计字段(统计行)
|
41
|
+
// props: ['data', 'sqlurl', 'field', 'total', 'bean', 'chooseCol'],
|
42
|
+
data () {
|
43
|
+
return {
|
44
|
+
printshow: false,
|
45
|
+
all: false,
|
46
|
+
fields: {},
|
47
|
+
modelval: [],
|
48
|
+
thead: '',
|
49
|
+
tfoot: '',
|
50
|
+
//合计数据
|
51
|
+
sumsmodel: {},
|
52
|
+
// 合计超文本
|
53
|
+
sumhtml: ''
|
54
|
+
}
|
55
|
+
},
|
56
|
+
props: {
|
57
|
+
model: {},
|
58
|
+
field: {},
|
59
|
+
printview:{},
|
60
|
+
xyprint:{},
|
61
|
+
starthead: {
|
62
|
+
type:String,
|
63
|
+
default:''
|
64
|
+
},
|
65
|
+
titletable: {
|
66
|
+
type:String,
|
67
|
+
default:''
|
68
|
+
},
|
69
|
+
printName: {},
|
70
|
+
// 默认列
|
71
|
+
defaultfield: {},
|
72
|
+
// 合计数据
|
73
|
+
sumsmodel: {},
|
74
|
+
// 合计数据的列名称配置(当没有找到对应合计的名称时,会从field中找)
|
75
|
+
sumField: {},
|
76
|
+
// 单页合计
|
77
|
+
pageSum: null,
|
78
|
+
isSelected: {
|
79
|
+
type:Boolean,
|
80
|
+
default:false
|
81
|
+
},
|
82
|
+
//设置打印底部信息 如制表人:审核人:。。。
|
83
|
+
footinfo: [],
|
84
|
+
// 设置打印底部信息 其他信息 格式为二维数组 如:[['1','','','4'],['5','','','8']]
|
85
|
+
footmsg: [],
|
86
|
+
printpage: {
|
87
|
+
type:Boolean,
|
88
|
+
default:false
|
89
|
+
},
|
90
|
+
// 全表汇总信息只在最后一页显示
|
91
|
+
sumone: {
|
92
|
+
type:Boolean,
|
93
|
+
default:true
|
94
|
+
},
|
95
|
+
attach: {
|
96
|
+
type: String,
|
97
|
+
default: 'name'
|
98
|
+
},
|
99
|
+
chooserow: {
|
100
|
+
type: Boolean,
|
101
|
+
default: false
|
102
|
+
}
|
103
|
+
},
|
104
|
+
methods: {
|
105
|
+
|
106
|
+
async printData () {
|
107
|
+
console.log('打印。。。', this.model, this.field, this.printName, this.sumsmodel)
|
108
|
+
|
109
|
+
if (this.model.rows.length === 0) {
|
110
|
+
this.$showAlert('请查询需要打印的数据!!', 'warning', 2000)
|
111
|
+
return
|
112
|
+
}
|
113
|
+
this.all = false
|
114
|
+
//默认选择要打印的列
|
115
|
+
this.modelval = this.defaultfield
|
116
|
+
this.fields = this.field
|
117
|
+
console.log('所有打印字段',this.fields)
|
118
|
+
this.printshow = true
|
119
|
+
await this.put()
|
120
|
+
if(this.chooserow){
|
121
|
+
this.print()
|
122
|
+
}
|
123
|
+
},
|
124
|
+
|
125
|
+
put () {
|
126
|
+
// 对Modelval进行排序
|
127
|
+
this.sortModelval()
|
128
|
+
this.getfield()
|
129
|
+
// 组织头数据
|
130
|
+
if(this.titletable!=''){
|
131
|
+
this.thead = `<tr><th colspan=${this.modelval.length}><h1>${this.titletable}</h1></th></tr><tr>`
|
132
|
+
}else{
|
133
|
+
this.thead = `<tr><th colspan=${this.modelval.length}><h1>${this.printName}统计报表</h1></th></tr><tr>`
|
134
|
+
}
|
135
|
+
if(this.starthead!=''){
|
136
|
+
this.thead += `<tr><th colspan=${this.modelval.length}>${this.starthead}</th></tr><tr>`
|
137
|
+
}
|
138
|
+
for (let key of this.modelval) {
|
139
|
+
this.thead += '<th>' + this.fields[key] + '</th>'
|
140
|
+
}
|
141
|
+
this.thead += '</tr>'
|
142
|
+
},
|
143
|
+
// 对选择的列进行排序
|
144
|
+
sortModelval () {
|
145
|
+
console.log('选择列进行排序。。。', this.fields, this.modelval)
|
146
|
+
let sortModel = []
|
147
|
+
Object.keys(this.fields).forEach((key) => {
|
148
|
+
if (this.modelval.includes(key)) {
|
149
|
+
sortModel.push(key)
|
150
|
+
}
|
151
|
+
})
|
152
|
+
this.modelval = sortModel
|
153
|
+
console.log('选择的打印的字段', this.modelval)
|
154
|
+
},
|
155
|
+
|
156
|
+
close () {
|
157
|
+
this.all = false
|
158
|
+
this.modelval = []
|
159
|
+
this.printshow = false
|
160
|
+
this.$dispatch('print-close')
|
161
|
+
},
|
162
|
+
|
163
|
+
print () {
|
164
|
+
if (this.$login.r.includes('限制打印')) {
|
165
|
+
this.$showMessage('你被限制打印, 请联系管理员')
|
166
|
+
return
|
167
|
+
}
|
168
|
+
this.$refs.print.PrintAsFile()
|
169
|
+
this.printshow = false
|
170
|
+
this.$dispatch('print-data')
|
171
|
+
},
|
172
|
+
getfield(){
|
173
|
+
//合计字段打印
|
174
|
+
this.tfoot = ''
|
175
|
+
if(this.sumsmodel){
|
176
|
+
if (this.sumone) {
|
177
|
+
this.sumhtml = `<tr><th colspan=${this.modelval.length} style="border-width: 0;">全表汇总信息: `
|
178
|
+
Object.keys(this.sumsmodel).forEach((key) => {
|
179
|
+
let keyName = this.sumField[key] ? this.sumField[key] : this.fields[key]
|
180
|
+
this.sumhtml += keyName + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
|
181
|
+
})
|
182
|
+
this.sumhtml += '</th></tr>'
|
183
|
+
} else {
|
184
|
+
this.tfoot = `<tr><th colspan=${this.modelval.length} style="border-width: 0;">全表汇总信息: `
|
185
|
+
Object.keys(this.sumsmodel).forEach((key) => {
|
186
|
+
let keyName = this.sumField[key] ? this.sumField[key] : this.fields[key]
|
187
|
+
this.tfoot += keyName + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
|
188
|
+
})
|
189
|
+
this.tfoot += '</th></tr>'
|
190
|
+
}
|
191
|
+
}
|
192
|
+
if (this.pageSum) {
|
193
|
+
this.tfoot += `<tr>`
|
194
|
+
for (let row of this.modelval) {
|
195
|
+
let format = this.pageSum[row]
|
196
|
+
if (format) {
|
197
|
+
this.tfoot += `<td tdata="SubSum" format="${format}" style="border-width: 0;">######</td>`
|
198
|
+
} else {
|
199
|
+
this.tfoot += `<td style="border-width: 0;"></td>`
|
200
|
+
}
|
201
|
+
}
|
202
|
+
this.tfoot += `</tr>`
|
203
|
+
}
|
204
|
+
this.tfoot += `<tr><th colspan=${this.modelval.length} style="border-width: 0;">打印时间: ${this.$login.toStandardTimeString()}</th></tr>`
|
205
|
+
//设置打印底部信息 如制表人:审核人:。。。
|
206
|
+
if(this.footinfo!=null && this.footinfo.length!=0){
|
207
|
+
this.tfoot += `<tr><td colspan=${this.modelval.length} style="border-width: 0;"></td></tr><tr>`
|
208
|
+
for(let i=0;i<this.footinfo.length;i++){
|
209
|
+
this.tfoot += `<th colspan=${this.modelval.length/this.footinfo.length} style="border-width: 0;text-align: left;">${this.footinfo[i]}:</th>`
|
210
|
+
}
|
211
|
+
this.tfoot += `</tr>`
|
212
|
+
}
|
213
|
+
// 设置打印底部信息 其他信息 格式为二维数组 如:[['1','','','4'],['5','','','8']]
|
214
|
+
if (this.footmsg != null && this.footmsg.length != 0) {
|
215
|
+
for (let i = 0; i < this.footmsg.length; i++) {
|
216
|
+
this.tfoot += `<tr style="padding: 0 2px 0 2px"><th style="border: 0" colspan=${this.modelval.length} ><table style="width: 100%;border-width: 0;text-align: left;"><tr>`
|
217
|
+
for (let j = 0; j < this.footmsg[i].length; j++) {
|
218
|
+
// 如果this.footsmg[i]有三个元素 则每个占比 33.33%
|
219
|
+
// 如果this.footsmg[i]有四个元素 则每个占比 25%
|
220
|
+
this.tfoot += `<td style="border-width: 0;text-align: left;width: ${(Number(1) / Number(this.footmsg[i].length) * 100).toFixed(2)}%">${this.footmsg[i][j]}</td>`
|
221
|
+
}
|
222
|
+
this.tfoot += `</tr></table></th></tr>`
|
223
|
+
}
|
224
|
+
}
|
225
|
+
},
|
226
|
+
},
|
227
|
+
watch: {
|
228
|
+
'all' (val) {
|
229
|
+
if (val) {
|
230
|
+
this.modelval = Object.keys(this.fields)
|
231
|
+
} else {
|
232
|
+
this.modelval = []
|
233
|
+
}
|
234
|
+
},
|
235
|
+
'modelval.length' () {
|
236
|
+
this.put()
|
237
|
+
}
|
238
|
+
},
|
239
|
+
computed: {
|
240
|
+
|
241
|
+
}
|
242
|
+
}
|
243
|
+
</script>
|