|
|
@ -309,12 +309,13 @@ const data = reactive({ |
|
|
lawFieldShow: false, |
|
|
lawFieldShow: false, |
|
|
lawField_columns: [], |
|
|
lawField_columns: [], |
|
|
lawFieldText:"", |
|
|
lawFieldText:"", |
|
|
|
|
|
tempDate: null, |
|
|
currentDate: [], |
|
|
currentDate: [], |
|
|
showTimePicker: false, |
|
|
showTimePicker: false, |
|
|
minDate:null, |
|
|
|
|
|
maxDate:null, |
|
|
|
|
|
showBl:false, |
|
|
showBl:false, |
|
|
showNom: false, |
|
|
showNom: false, |
|
|
|
|
|
minDate: null, |
|
|
|
|
|
maxDate: null, |
|
|
}); |
|
|
}); |
|
|
var fileSize = 0; |
|
|
var fileSize = 0; |
|
|
//保存参数 |
|
|
//保存参数 |
|
|
@ -422,7 +423,6 @@ onMounted(() =>{ |
|
|
submitData.checkCss = route?.query?.checkCss; |
|
|
submitData.checkCss = route?.query?.checkCss; |
|
|
data.isNoScan = route?.query?.isNoScan; |
|
|
data.isNoScan = route?.query?.isNoScan; |
|
|
|
|
|
|
|
|
currentDate(); |
|
|
|
|
|
// let dateLimit = new Date(); |
|
|
// let dateLimit = new Date(); |
|
|
// data.maxDate = new Date(this.$moment(dateLimit).format('YYYY/MM/DD')); |
|
|
// data.maxDate = new Date(this.$moment(dateLimit).format('YYYY/MM/DD')); |
|
|
|
|
|
|
|
|
@ -458,7 +458,9 @@ onMounted(() =>{ |
|
|
// getLinkageByValueAndParentId("law_item", "100"); |
|
|
// getLinkageByValueAndParentId("law_item", "100"); |
|
|
getLinkageByValueAndParentId("check_item", "100"); |
|
|
getLinkageByValueAndParentId("check_item", "100"); |
|
|
//初始化时间 |
|
|
//初始化时间 |
|
|
submitData.enforcementTime = formattedTime(new Date()); |
|
|
currentDate(); |
|
|
|
|
|
// getDateScpoe(); |
|
|
|
|
|
// submitData.enforcementTime = formattedTime(new Date()); |
|
|
// getDict({},success =>{ |
|
|
// getDict({},success =>{ |
|
|
|
|
|
|
|
|
// },error =>{}); |
|
|
// },error =>{}); |
|
|
@ -479,7 +481,7 @@ onMounted(() =>{ |
|
|
let year = now.getFullYear(); |
|
|
let year = now.getFullYear(); |
|
|
let mon = now.getMonth() + 1; |
|
|
let mon = now.getMonth() + 1; |
|
|
let day = now.getDate(); |
|
|
let day = now.getDate(); |
|
|
|
|
|
|
|
|
mon = (mon < 10 ? ('0' + mon) : mon); |
|
|
mon = (mon < 10 ? ('0' + mon) : mon); |
|
|
day = (day < 10 ? ('0' + day) : day); |
|
|
day = (day < 10 ? ('0' + day) : day); |
|
|
data.maxDate = ref(new Date(year,mon -1,day)); |
|
|
data.maxDate = ref(new Date(year,mon -1,day)); |
|
|
@ -684,12 +686,41 @@ const currentDate =() => { |
|
|
const month = (now.getMonth() + 1).toString().padStart(2, '0'); |
|
|
const month = (now.getMonth() + 1).toString().padStart(2, '0'); |
|
|
const day = now.getDate().toString().padStart(2, '0'); |
|
|
const day = now.getDate().toString().padStart(2, '0'); |
|
|
data.currentDate = [year, month, day] |
|
|
data.currentDate = [year, month, day] |
|
|
|
|
|
console.log("function currentDate -----: ",year, month, day); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const getDateScpoe =() => { |
|
|
|
|
|
let date = new Date(); |
|
|
|
|
|
let frontDate = new Date() |
|
|
|
|
|
let year = date.getFullYear(); |
|
|
|
|
|
frontDate.setDate(frontDate.getDate() - 5)//前7天减7,前N天减N |
|
|
|
|
|
let dateArr1 = [frontDate.getMonth() + 1,frontDate.getDate()]; |
|
|
|
|
|
let dateArr2 = [date.getMonth() + 1,date.getDate()]; |
|
|
|
|
|
//开始格式是M,经过以下循环变为MM |
|
|
|
|
|
for (let i = 0; i < dateArr1.length; i++) { |
|
|
|
|
|
if (dateArr1[i] >= 1 && dateArr1[i] <= 9) { |
|
|
|
|
|
dateArr1[i] = "0" + dateArr1[i]; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < dateArr2.length; i++) { |
|
|
|
|
|
if (dateArr2[i] >= 1 && dateArr2[i] <= 9) { |
|
|
|
|
|
dateArr2[i] = "0" + dateArr2[i]; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
data.minDate = new Date(year, dateArr1[0], dateArr1[1]); |
|
|
|
|
|
data.maxDate = new Date(year, dateArr2[0], dateArr2[1]); |
|
|
|
|
|
let strDate1 =year +"/" + dateArr1[0] +"/" +dateArr1[1] +" " |
|
|
|
|
|
let strDate2 =year +"/" + dateArr2[0] +"/" +dateArr2[1] +" " |
|
|
|
|
|
let time_list = [strDate1,strDate2] //[2023-08-31,2023-09-07] |
|
|
|
|
|
console.log("getDateScpoe ----- ", time_list); |
|
|
|
|
|
console.log("function getMinDate -----: ",year, month, day) |
|
|
|
|
|
console.log("function getMaxDate -----: ",year, month, day) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const onConfirm = (time) => { |
|
|
const onConfirm = (time) => { |
|
|
if (time != null) { |
|
|
if (time != null) { |
|
|
var times = time.selectedValues; |
|
|
var times = time.selectedValues; |
|
|
submitData.checkTime = times[0] + "-" + times[1] + "-" + times[2]; |
|
|
submitData.enforcementTime = times[0] + "-" + times[1] + "-" + times[2]; |
|
|
data.tempDate = times[1] + "月" + times[2] + "号"; |
|
|
data.tempDate = times[1] + "月" + times[2] + "号"; |
|
|
} |
|
|
} |
|
|
data.showTimePicker = false; |
|
|
data.showTimePicker = false; |
|
|
@ -751,6 +782,22 @@ const reciveLaw = (item) => { |
|
|
submitData.lawText = item.enterpriseName; |
|
|
submitData.lawText = item.enterpriseName; |
|
|
submitData.lawEnforcementItemText = item.checkItemText; |
|
|
submitData.lawEnforcementItemText = item.checkItemText; |
|
|
submitData.uniteCheck = item.uniteCheck; |
|
|
submitData.uniteCheck = item.uniteCheck; |
|
|
|
|
|
|
|
|
|
|
|
console.log("reciveLaw ----< > ", item) |
|
|
|
|
|
// 执法人员 |
|
|
|
|
|
submitData.lawEnforcerIdTwo = item.lawEnforcerTwoId; |
|
|
|
|
|
submitData.lawEnforcerTwo = item.lawEnforcerTwo; |
|
|
|
|
|
var lawEnforcer2ShowStr = item.lawEnforcer2Show; |
|
|
|
|
|
if ((null != submitData.lawEnforcerIdTwo && submitData.lawEnforcerIdTwo.length > 0) |
|
|
|
|
|
&& (null != submitData.lawEnforcerTwo && submitData.lawEnforcerTwo.length > 0)) { |
|
|
|
|
|
var tmpEnforceId = submitData.lawEnforcerIdTwo.split(','); |
|
|
|
|
|
var tmpEnforceText = submitData.lawEnforcerTwo.split(','); |
|
|
|
|
|
var lawEnforcer2Show = lawEnforcer2ShowStr.split(','); |
|
|
|
|
|
data.lawCer = []; |
|
|
|
|
|
for (var i = 0; i < tmpEnforceId.length; i++) { |
|
|
|
|
|
data.lawCer.push({text: tmpEnforceText[i], id: tmpEnforceId[i], show: lawEnforcer2Show[i]}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const beforeRead = (file) =>{ |
|
|
const beforeRead = (file) =>{ |
|
|
@ -796,32 +843,6 @@ const beforeRead = (file) =>{ |
|
|
}); |
|
|
}); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
const getBeforeDate = (num, time) =>{ |
|
|
|
|
|
let n = num; |
|
|
|
|
|
let d = ''; |
|
|
|
|
|
if(time) { |
|
|
|
|
|
d = new Date(time); |
|
|
|
|
|
} else { |
|
|
|
|
|
d = new Date(); |
|
|
|
|
|
} |
|
|
|
|
|
let year = d.getFullYear(); |
|
|
|
|
|
let mon = d.getMonth() + 1; |
|
|
|
|
|
let day = d.getDate(); |
|
|
|
|
|
if(day <= n) { |
|
|
|
|
|
if(mon > 1) { |
|
|
|
|
|
mon = mon - 1; |
|
|
|
|
|
} else { |
|
|
|
|
|
year = year - 1; |
|
|
|
|
|
mon = 12; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
d.setDate(d.getDate() - n); |
|
|
|
|
|
year = d.getFullYear(); |
|
|
|
|
|
mon = d.getMonth() + 1; |
|
|
|
|
|
day = d.getDate(); |
|
|
|
|
|
let s = year + "-" + (mon < 10 ? ('0' + mon) : mon) + "-" + (day < 10 ? ('0' + day) : day); |
|
|
|
|
|
return s; |
|
|
|
|
|
} |
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
<style lang="less" scoped> |
|
|
|