|
|
@ -15,7 +15,6 @@ import { getAreasData } from "@/api/areas/index"; |
|
|
|
|
|
|
|
import { reqCountMixins } from "@/mixins/reqCount"; |
|
|
|
import { paginationMixins } from "@/mixins/commonPagination"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "InspectionItems", |
|
|
|
components: { |
|
|
@ -32,12 +31,24 @@ export default { |
|
|
|
name: "", |
|
|
|
planDateArr: [], |
|
|
|
}, |
|
|
|
pickerOption: { |
|
|
|
disabledDate(time) {//只能选择5年数据 |
|
|
|
choiceDate: '', |
|
|
|
pickerOption: { // 设置不能选择的日期 |
|
|
|
onPick: ({ maxDate, minDate }) => { |
|
|
|
this.choiceDate = minDate.getTime() |
|
|
|
if (maxDate) { |
|
|
|
this.choiceDate = ''; |
|
|
|
} |
|
|
|
}, |
|
|
|
disabledDate: (time) => {//只能选择5年数据 |
|
|
|
let curDate = (new Date()).getTime(); |
|
|
|
let three = 5 * 12 * 30 * 24 * 3600 * 1000; |
|
|
|
let threeMonths = curDate - three; |
|
|
|
return time.getTime() > Date.now() || time.getTime() < threeMonths; |
|
|
|
let min = curDate + three; |
|
|
|
let max = curDate - three; |
|
|
|
if (this.choiceDate) { |
|
|
|
return time.getTime() < max || time.getTime() > min; |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
currentRow: {}, |
|
|
@ -429,7 +440,7 @@ export default { |
|
|
|
> |
|
|
|
<el-button |
|
|
|
style="margin-right: 16px" |
|
|
|
v-if="scope.row.status == 0" |
|
|
|
v-if="scope.row.status == 0 || scope.row.status == 3" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
@click="handleSubmit(scope.row)" |
|
|
@ -447,7 +458,7 @@ export default { |
|
|
|
> |
|
|
|
<el-button |
|
|
|
style="margin-right: 16px" |
|
|
|
v-if="scope.row.status == 0" |
|
|
|
v-if="scope.row.status == 0 || scope.row.status == 3" |
|
|
|
@click="handleEdit(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|