From 35ad9903891d319b2fc2662b458bef038f270a4e Mon Sep 17 00:00:00 2001
From: kylin L <452061493@qq.com>
Date: Mon, 5 Aug 2024 22:09:58 +0800
Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=9B=9E=E6=98=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/enforce/sign.vue | 57 ++++++++++++++---------
src/views/enterprise/registrationList.vue | 8 ++--
2 files changed, 40 insertions(+), 25 deletions(-)
diff --git a/src/views/enforce/sign.vue b/src/views/enforce/sign.vue
index ab5bd83..2617ed8 100644
--- a/src/views/enforce/sign.vue
+++ b/src/views/enforce/sign.vue
@@ -166,7 +166,7 @@
(不多于 8张)
-
+
{{ file.name }}
@@ -316,6 +316,7 @@ const data = reactive({
showNom: false,
minDate: null,
maxDate: null,
+ fileListObj: [],
});
var fileSize = 0;
//保存参数
@@ -448,8 +449,8 @@ onMounted(() =>{
submitData.lawEnforcement = success.data.dept.deptName;
submitData.lawEnforcementId = success.data.dept.deptId;
//局级部门
- submitData.bureauDeptName = success.data.bureauDept.deptName;
- submitData.bureauDeptId = success.data.bureauDept.deptId;
+ submitData.bureauDeptName = success.data.dept.deptName;
+ submitData.bureauDeptId = success.data.dept.deptId;
}
},error=>{
@@ -465,17 +466,15 @@ onMounted(() =>{
// },error =>{});
// 查询检查要求字典信息
- getDict({"dictType": "law_field"}, success => {
- for(var i=0; i{});
+ // getDict({"dictType": "law_field"}, success => {
+ // for(var i=0; i{});
//TODO 限制指定时间实现
var a = getBeforeDate(5,new Date());
- console.log(a);
var minDate = a.split("-");
- console.log(minDate);
data.minDate = ref(new Date(minDate[0],minDate[1] - 1 , minDate[2]));
var now = new Date();
let year = now.getFullYear();
@@ -485,8 +484,6 @@ onMounted(() =>{
mon = (mon < 10 ? ('0' + mon) : mon);
day = (day < 10 ? ('0' + day) : day);
data.maxDate = ref(new Date(year,mon -1,day));
- console.log(mon);
- console.log(day);
data.showBl = true;
})
@@ -565,6 +562,16 @@ const dataFillIn = () => {
// submitData.lawCertificateNumText =success.data['lawEnforcer'];
submitData.lawCertificateNumTwoText =success.data['lawEnforcerTwo'];
submitData.subsidiaryerText =success.data['subsidiaryer'];
+ // 附件回显
+ // data.fileListObj.push({ 'url': 'https://fastly.jsdelivr.net/npm/@vant/assets/leaf.jpeg', 'file':{'name':'leaf'} });
+
+ for (var k = 0; k < success.data.fileList.length; k++) {
+ if (k > 8) {break;}
+ data.fileListObj.push({
+ 'url': success.data.fileList[k],
+ 'file': {'name':success.data.fileList[k]}
+ });
+ }
// 执法依据
submitData.lawEnforcementBasis = success.data['lawEnforcementBasis'];
@@ -612,6 +619,14 @@ const tmpSave = () => {
showSuccessToast('临时保存');
submitData.userId = useCommon.userId;
+ // 处理回显附件
+ for(var k=0; k{
submitData.isSubmit = type;
submitData.userId = useCommon.userId;
+ // 处理回显附件
+ for(var k=0; k {
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
data.currentDate = [year, month, day]
- console.log("function currentDate -----: ",year, month, day);
}
const getDateScpoe =() => {
@@ -712,9 +734,6 @@ const getDateScpoe =() => {
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) => {
@@ -752,7 +771,7 @@ const closePopup = () =>{
const reciveData = (item) =>{
data.lawCer[data.lawCerFlag].id = item.userId;
data.lawCer[data.lawCerFlag].text = item.userName;
- data.lawCer[data.lawCerFlag].show = item.userName + " " + item.lawCertificateNum;
+ data.lawCer[data.lawCerFlag].show = item.userName + " " + (null==item.lawCertificateNum?"":item.lawCertificateNum);
// submitData.lawEnforcerTwo = item.userName;
// submitData.lawCertificateNumTwoText = item.userName + " " + item.lawCertificateNum
@@ -784,7 +803,6 @@ const reciveLaw = (item) => {
submitData.uniteCheck = item.uniteCheck;
submitData.remark = item.remark;
- console.log("reciveLaw ----< > ", item)
// 执法人员
submitData.lawEnforcerIdTwo = item.lawEnforcerTwoId;
submitData.lawEnforcerTwo = item.lawEnforcerTwo;
@@ -815,7 +833,6 @@ const beforeRead = (file) =>{
console.log('图片大小2',file.size)
// Toast('请上传20M以下图片');
let that = this
- console.log('aaaaaaaaaaaaaaaaaaaaaaa',file)
return new Promise((resolve) => {
// compressorjs 默认开启 checkOrientation 选项
// 会将图片修正为正确方向
@@ -823,8 +840,6 @@ const beforeRead = (file) =>{
quality: 0.1,
success(result){
let file1 = new File([result], file.name, { type: file.type })
- console.log("File对象", file1);
- console.log("File对象", file1.size);
// uploadFile(file1)
uploadFile(file1,(res) =>{
submitData.fileList.push(res.url)
diff --git a/src/views/enterprise/registrationList.vue b/src/views/enterprise/registrationList.vue
index c3d8825..b3058c6 100644
--- a/src/views/enterprise/registrationList.vue
+++ b/src/views/enterprise/registrationList.vue
@@ -107,10 +107,10 @@