Browse Source

优化页面

master
李磊 3 years ago
parent
commit
8cfd8a1477
  1. 39
      src/views/device_management/index.vue

39
src/views/device_management/index.vue

@ -219,7 +219,7 @@
<el-date-picker v-model="form.checkLastDate" style="width: 215px;" value-format="yyyy-MM-dd" clearable type="date" placeholder="选择去年校验日期" />
</el-form-item>
<el-form-item v-show="ifMeasure" label="下次校验日期:" prop="checkDate">
<el-date-picker v-model="form.checkDate" style="width: 215px;" value-format="yyyy-MM-dd" clearable type="date" placeholder="选择今年校验日期" />
<el-date-picker v-model="form.checkDate" style="width: 215px;" value-format="yyyy-MM-dd" clearable type="date" placeholder="选择今年校验日期" />
</el-form-item>
</el-tab-pane>
</el-tabs>
@ -299,17 +299,6 @@ const defaultForm = form({
checkDate: ''
})
//
const PrefixPlusText = {
props: ['value', 'functions'],
template: `
<el-tag v-if="functions(value) === '在用'" effect="dark"><span v-html="functions(value)"></span></el-tag>
<el-tag v-else-if="functions(value) === '停用'" type="danger" effect="dark"><span v-html="functions(value)"></span></el-tag>
<el-tag v-else-if="functions(value) === '待报废'" type="warning" effect="dark"><span v-html="functions(value)"></span></el-tag>
<el-tag v-else type="info" effect="dark"><span v-html="functions(value)"></span></el-tag>
`
}
export default {
name: 'InstrumentList',
components: { Pagination, Query, Crud, CustomTable, Edit, TreeSelect, Move },
@ -400,18 +389,17 @@ export default {
instrumentId: 0,
moveDialogVisible: false,
ifMeasure: false
// pickerOptions1: {
// //disabledDate
// disabledDate: (time) => {
// // setMonth()
// let currentTime = this.value1;
// let threeMonths = currentTime.setMonth(currentTime.getMonth()+3);
// //
// currentTime.setMonth(currentTime.getMonth()-3)
// return time.getTime() < this.value1 || time.getTime() > threeMonths ;
// }
// }
/* pickerOptions1: {
//disabledDate
disabledDate: (time) => {
// setMonth()
let currentTime = this.value1;
let threeMonths = currentTime.setMonth(currentTime.getMonth()+3);
//
currentTime.setMonth(currentTime.getMonth()-3)
return time.getTime() < this.value1 || time.getTime() > threeMonths ;
}
}*/
}
},
mounted() {
@ -505,7 +493,6 @@ export default {
getDicDataListByTypeName({ typeCode: 'use_purpose' }).then(data => { this.usePurposeList = data })
//
getDicDataListByTypeName({ typeCode: 'verification_cycle' }).then(data => { this.cycleList = data })
},
//
getDepartmentValue(value) {
@ -541,7 +528,7 @@ export default {
// }
// return color
// },
getTableRowClassName({ row, rowIndex }) {
getTableRowClassName({ row, rowIndex }) {
// row.index = rowIndex
const nextTime = new Date(row.checkDate).getTime()
const currentTime = new Date().getTime()

Loading…
Cancel
Save