Commit e0626fd0445ccf344aec6d982daff92a6fe39d96
1 parent
7caa1e00
v1.9 优化设备中的设备台账相关页面,打印不好看问题等
Showing
5 changed files
with
91 additions
and
77 deletions
src/views/community/locationManageList.vue
| @@ -15,13 +15,13 @@ | @@ -15,13 +15,13 @@ | ||
| 15 | <el-input v-model="locationManageInfo.conditions.locationName" | 15 | <el-input v-model="locationManageInfo.conditions.locationName" |
| 16 | :placeholder="$t('locationManage.enterLocationName')" clearable /> | 16 | :placeholder="$t('locationManage.enterLocationName')" clearable /> |
| 17 | </el-col> | 17 | </el-col> |
| 18 | - <el-col :span="6"> | 18 | + <!-- <el-col :span="6"> |
| 19 | <el-select v-model="locationManageInfo.conditions.locationType" | 19 | <el-select v-model="locationManageInfo.conditions.locationType" |
| 20 | :placeholder="$t('locationManage.selectLocationType')" style="width:100%" clearable> | 20 | :placeholder="$t('locationManage.selectLocationType')" style="width:100%" clearable> |
| 21 | <el-option v-for="item in locationTypeOptions" :key="item.value" :label="item.label" | 21 | <el-option v-for="item in locationTypeOptions" :key="item.value" :label="item.label" |
| 22 | :value="item.value" /> | 22 | :value="item.value" /> |
| 23 | </el-select> | 23 | </el-select> |
| 24 | - </el-col> | 24 | + </el-col> --> |
| 25 | <el-col :span="4"> | 25 | <el-col :span="4"> |
| 26 | <el-button type="primary" @click="_queryLocationMethod"> | 26 | <el-button type="primary" @click="_queryLocationMethod"> |
| 27 | <i class="el-icon-search"></i> | 27 | <i class="el-icon-search"></i> |
src/views/inspection/maintainanceItemList.vue
| @@ -35,9 +35,9 @@ | @@ -35,9 +35,9 @@ | ||
| 35 | <el-button type="primary" size="small" @click="handleGoBack"> | 35 | <el-button type="primary" size="small" @click="handleGoBack"> |
| 36 | {{ $t('common.back') }} | 36 | {{ $t('common.back') }} |
| 37 | </el-button> | 37 | </el-button> |
| 38 | - <el-button type="primary" size="small" @click="handleShowDocument"> | 38 | + <!-- <el-button type="primary" size="small" @click="handleShowDocument"> |
| 39 | {{ $t('common.document') }} | 39 | {{ $t('common.document') }} |
| 40 | - </el-button> | 40 | + </el-button> --> |
| 41 | <el-button type="primary" size="small" @click="handleAdd"> | 41 | <el-button type="primary" size="small" @click="handleAdd"> |
| 42 | <i class="el-icon-plus" /> {{ $t('common.add') }} | 42 | <i class="el-icon-plus" /> {{ $t('common.add') }} |
| 43 | </el-button> | 43 | </el-button> |
src/views/machine/equipmentAccountDetailList.vue
| @@ -244,7 +244,7 @@ export default { | @@ -244,7 +244,7 @@ export default { | ||
| 244 | this.$refs.viewImage.open(photo.url) | 244 | this.$refs.viewImage.open(photo.url) |
| 245 | }, | 245 | }, |
| 246 | _printEquipmentDetail() { | 246 | _printEquipmentDetail() { |
| 247 | - window.open(`/#/pages/property/printEquipmentAccountLabel?machineId=${this.equipmentAccountDetail.machineId}`) | 247 | + window.open(`/#/views/resource/printEquipmentAccountLabel?machineId=${this.equipmentAccountDetail.machineId}`) |
| 248 | } | 248 | } |
| 249 | } | 249 | } |
| 250 | } | 250 | } |
src/views/machine/equipmentAccountLang.js
| @@ -48,7 +48,9 @@ export const messages = { | @@ -48,7 +48,9 @@ export const messages = { | ||
| 48 | useUserName: 'User', | 48 | useUserName: 'User', |
| 49 | chargeOrgName: 'Responsible Department', | 49 | chargeOrgName: 'Responsible Department', |
| 50 | chargeUseName: 'Responsible Person', | 50 | chargeUseName: 'Responsible Person', |
| 51 | - remark: 'Remark' | 51 | + remark: 'Remark', |
| 52 | + printEquipmentAccount: 'Print Equipment Account', | ||
| 53 | + selectEquipmentFirst: 'Please select equipment first' | ||
| 52 | } | 54 | } |
| 53 | }, | 55 | }, |
| 54 | zh: { | 56 | zh: { |
| @@ -100,7 +102,9 @@ export const messages = { | @@ -100,7 +102,9 @@ export const messages = { | ||
| 100 | useUserName: '使用人', | 102 | useUserName: '使用人', |
| 101 | chargeOrgName: '责任部门', | 103 | chargeOrgName: '责任部门', |
| 102 | chargeUseName: '责任人', | 104 | chargeUseName: '责任人', |
| 103 | - remark: '备注' | 105 | + remark: '备注', |
| 106 | + printEquipmentAccount: '打印设备资产标签', | ||
| 107 | + selectEquipmentFirst: '请先选择设备' | ||
| 104 | } | 108 | } |
| 105 | } | 109 | } |
| 106 | } | 110 | } |
| 107 | \ No newline at end of file | 111 | \ No newline at end of file |
src/views/resource/printEquipmentAccountLabelList.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="print-equipment-account-label-container"> | 2 | <div class="print-equipment-account-label-container"> |
| 3 | - <el-card> | ||
| 4 | - <div slot="header" class="flex justify-between"> | ||
| 5 | - <span>{{ $t('printEquipmentAccount.machineId') }}:{{ printEquipmentAccountInfo.machineId }}</span> | ||
| 6 | - | ||
| 7 | - <span>{{ $t('printEquipmentAccount.printTime') }}:{{ nowTime }}</span> | 3 | + <div> |
| 4 | + <div class="row"> | ||
| 5 | + <div class="col-sm-4"> | ||
| 6 | + <span>{{ $t('printEquipmentAccount.machineId') }}:{{ printEquipmentAccountInfo.machineId }}</span> | ||
| 7 | + </div> | ||
| 8 | + <div class="col-sm-6"> | ||
| 9 | + <span></span> | ||
| 10 | + </div> | ||
| 11 | + <div class="col-sm-2"> | ||
| 12 | + <span>{{ $t('printEquipmentAccount.printTime') }}:{{ nowTime }}</span> | ||
| 13 | + </div> | ||
| 8 | </div> | 14 | </div> |
| 9 | 15 | ||
| 10 | - <el-table :data="[printEquipmentAccountInfo]" border style="width: 100%; margin-top: 20px; margin-bottom: 0;"> | ||
| 11 | - <el-table-column prop="header" label="" colspan="6" align="center"> | ||
| 12 | - <template> | ||
| 13 | - <span style="font-size: 40px;">{{ $t('printEquipmentAccount.equipmentLabel') }}</span> | ||
| 14 | - </template> | ||
| 15 | - </el-table-column> | ||
| 16 | - <el-table-column prop="content" label="" colspan="2"> | ||
| 17 | - <template slot-scope="scope"> | ||
| 18 | - <el-row :gutter="20" style="font-size: 28px;"> | ||
| 19 | - <el-col :span="12"> | ||
| 20 | - <div>{{ $t('printEquipmentAccount.project') }}:{{ scope.row.yqName }}</div> | ||
| 21 | - </el-col> | ||
| 22 | - <el-col :span="12"> | ||
| 23 | - <div>{{ $t('printEquipmentAccount.locationName') }}:{{ scope.row.locationDetail }}</div> | ||
| 24 | - </el-col> | ||
| 25 | - </el-row> | ||
| 26 | - <el-row :gutter="20" style="font-size: 28px;"> | ||
| 27 | - <el-col :span="12"> | ||
| 28 | - <div>{{ $t('printEquipmentAccount.machineName') }}:{{ scope.row.machineName }}</div> | ||
| 29 | - </el-col> | ||
| 30 | - <el-col :span="12"> | ||
| 31 | - <div>{{ $t('printEquipmentAccount.importanceLevel') }}:{{ scope.row.levelName }}</div> | ||
| 32 | - </el-col> | ||
| 33 | - </el-row> | ||
| 34 | - <el-row :gutter="20" style="font-size: 28px;"> | ||
| 35 | - <el-col :span="12"> | ||
| 36 | - <div>{{ $t('printEquipmentAccount.systemName') }}:{{ scope.row.sysName }}</div> | ||
| 37 | - </el-col> | ||
| 38 | - <el-col :span="12"> | ||
| 39 | - <div>{{ $t('printEquipmentAccount.enableDate') }}:{{ scope.row.firstEnableTime }}</div> | ||
| 40 | - </el-col> | ||
| 41 | - </el-row> | ||
| 42 | - <el-row :gutter="20" style="font-size: 28px;"> | ||
| 43 | - <el-col :span="12"> | ||
| 44 | - <div>{{ $t('printEquipmentAccount.machineBrand') }}:{{ scope.row.brand }}</div> | ||
| 45 | - </el-col> | ||
| 46 | - <el-col :span="12" rowspan="4"> | ||
| 47 | - <div id="qrcode" style="width:200px; height:200px;"></div> | ||
| 48 | - </el-col> | ||
| 49 | - </el-row> | ||
| 50 | - <el-row :gutter="20" style="font-size: 28px;"> | ||
| 51 | - <el-col :span="12"> | ||
| 52 | - <div>{{ $t('printEquipmentAccount.specificationModel') }}:{{ scope.row.model }}</div> | ||
| 53 | - </el-col> | ||
| 54 | - </el-row> | ||
| 55 | - <el-row :gutter="20" style="font-size: 28px;"> | ||
| 56 | - <el-col :span="12"> | ||
| 57 | - <div>{{ $t('printEquipmentAccount.code') }}:{{ scope.row.machineCode }}</div> | ||
| 58 | - </el-col> | ||
| 59 | - </el-row> | ||
| 60 | - <el-row :gutter="20" style="font-size: 28px;"> | ||
| 61 | - <el-col :span="12"> | ||
| 62 | - <div>{{ $t('printEquipmentAccount.responsiblePerson') }}:{{ scope.row.chargeUseName }}</div> | ||
| 63 | - </el-col> | ||
| 64 | - </el-row> | ||
| 65 | - <el-row :gutter="20" style="font-size: 28px;"> | ||
| 66 | - <el-col :span="24" align="center"> | ||
| 67 | - <div>设备标志 严禁损坏</div> | ||
| 68 | - </el-col> | ||
| 69 | - </el-row> | ||
| 70 | - </template> | ||
| 71 | - </el-table-column> | ||
| 72 | - </el-table> | 16 | + <table class="table table-bordered margin-top" style="margin-bottom: 0;"> |
| 17 | + <thead> | ||
| 18 | + <tr> | ||
| 19 | + <th scope="col" colspan="6" class="text-center"> | ||
| 20 | + <span style="font-size: 40px;">{{ $t('printEquipmentAccount.equipmentLabel') }}</span> | ||
| 21 | + </th> | ||
| 22 | + </tr> | ||
| 23 | + </thead> | ||
| 24 | + <tbody style="font-size: 28px;"> | ||
| 25 | + <tr> | ||
| 26 | + <td>{{ $t('printEquipmentAccount.project') }}:{{ printEquipmentAccountInfo.yqName }}</td> | ||
| 27 | + <td>{{ $t('printEquipmentAccount.locationName') }}:{{ printEquipmentAccountInfo.locationDetail }}</td> | ||
| 28 | + </tr> | ||
| 29 | + <tr> | ||
| 30 | + <td>{{ $t('printEquipmentAccount.machineName') }}:{{ printEquipmentAccountInfo.machineName }}</td> | ||
| 31 | + <td>{{ $t('printEquipmentAccount.importanceLevel') }}:{{ printEquipmentAccountInfo.levelName }}</td> | ||
| 32 | + </tr> | ||
| 33 | + <tr> | ||
| 34 | + <td>{{ $t('printEquipmentAccount.systemName') }}:{{ printEquipmentAccountInfo.sysName }}</td> | ||
| 35 | + <td>{{ $t('printEquipmentAccount.enableDate') }}:{{ printEquipmentAccountInfo.firstEnableTime }}</td> | ||
| 36 | + </tr> | ||
| 37 | + <tr> | ||
| 38 | + <td>{{ $t('printEquipmentAccount.machineBrand') }}:{{ printEquipmentAccountInfo.brand }}</td> | ||
| 39 | + <td rowspan="4"> | ||
| 40 | + <div id="qrcode" style="width:200px; height:200px;"></div> | ||
| 41 | + </td> | ||
| 42 | + </tr> | ||
| 43 | + <tr> | ||
| 44 | + <td>{{ $t('printEquipmentAccount.specificationModel') }}:{{ printEquipmentAccountInfo.model }}</td> | ||
| 45 | + </tr> | ||
| 46 | + <tr> | ||
| 47 | + <td>{{ $t('printEquipmentAccount.code') }}:{{ printEquipmentAccountInfo.machineCode }}</td> | ||
| 48 | + </tr> | ||
| 49 | + <tr> | ||
| 50 | + <td>{{ $t('printEquipmentAccount.responsiblePerson') }}:{{ printEquipmentAccountInfo.chargeUseName }}</td> | ||
| 51 | + </tr> | ||
| 52 | + <tr> | ||
| 53 | + <td colspan="2" class="text-center">设备标志 严禁损坏</td> | ||
| 54 | + </tr> | ||
| 55 | + </tbody> | ||
| 56 | + </table> | ||
| 73 | 57 | ||
| 74 | - <div id="print-btn" style="margin-top: 20px;"> | 58 | + <div id="print-btn" class="btn-row"> |
| 75 | <el-button type="primary" class="float-right" @click="_printPurchaseApplyDiv"> | 59 | <el-button type="primary" class="float-right" @click="_printPurchaseApplyDiv"> |
| 76 | <i class="el-icon-check"></i> {{ $t('common.print') }} | 60 | <i class="el-icon-check"></i> {{ $t('common.print') }} |
| 77 | </el-button> | 61 | </el-button> |
| @@ -79,7 +63,7 @@ | @@ -79,7 +63,7 @@ | ||
| 79 | {{ $t('common.cancel') }} | 63 | {{ $t('common.cancel') }} |
| 80 | </el-button> | 64 | </el-button> |
| 81 | </div> | 65 | </div> |
| 82 | - </el-card> | 66 | + </div> |
| 83 | </div> | 67 | </div> |
| 84 | </template> | 68 | </template> |
| 85 | 69 | ||
| @@ -179,6 +163,30 @@ export default { | @@ -179,6 +163,30 @@ export default { | ||
| 179 | padding: 20px; | 163 | padding: 20px; |
| 180 | } | 164 | } |
| 181 | 165 | ||
| 166 | +.row { | ||
| 167 | + display: flex; | ||
| 168 | + flex-wrap: wrap; | ||
| 169 | + margin-bottom: 10px; | ||
| 170 | +} | ||
| 171 | +.col-sm-4 { flex: 0 0 33.3333%; max-width: 33.3333%; } | ||
| 172 | +.col-sm-6 { flex: 0 0 50%; max-width: 50%; } | ||
| 173 | +.col-sm-2 { flex: 0 0 16.6667%; max-width: 16.6667%; } | ||
| 174 | + | ||
| 175 | +.table { | ||
| 176 | + width: 100%; | ||
| 177 | + border-collapse: collapse; | ||
| 178 | +} | ||
| 179 | +.table-bordered { | ||
| 180 | + border: 1px solid #ebeef5; | ||
| 181 | +} | ||
| 182 | +.table-bordered th, | ||
| 183 | +.table-bordered td { | ||
| 184 | + border: 1px solid #ebeef5; | ||
| 185 | + padding: 12px 10px; | ||
| 186 | +} | ||
| 187 | +.text-center { text-align: center; } | ||
| 188 | +.margin-top { margin-top: 20px; } | ||
| 189 | + | ||
| 182 | .float-right { | 190 | .float-right { |
| 183 | float: right; | 191 | float: right; |
| 184 | } | 192 | } |
| @@ -187,6 +195,8 @@ export default { | @@ -187,6 +195,8 @@ export default { | ||
| 187 | margin-top: 20px; | 195 | margin-top: 20px; |
| 188 | } | 196 | } |
| 189 | 197 | ||
| 198 | +.btn-row { margin-top: 20px; } | ||
| 199 | + | ||
| 190 | @media print { | 200 | @media print { |
| 191 | #print-btn { | 201 | #print-btn { |
| 192 | display: none !important; | 202 | display: none !important; |