|
@@ -151,50 +151,7 @@
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="line" v-show="!unchangeableShip || shipFileList.length">
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">船舶证书 :</div>
|
|
|
|
|
- <Uploader
|
|
|
|
|
- :params="shipParams"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- @onSendFileList="getShipFileList"
|
|
|
|
|
- :fileList="shipFileList"
|
|
|
|
|
- ></Uploader>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="line" v-show="!unchangeableShip || annualFileList.length">
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">船舶年审合格证 :</div>
|
|
|
|
|
- <Uploader
|
|
|
|
|
- :params="{ type: '5', userId: 0, location: '' }"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- @onSendFileList="getAnnualFileList"
|
|
|
|
|
- :fileList="annualFileList"
|
|
|
|
|
- ></Uploader>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="line" v-show="!unchangeableShip || shipNationFileList.length">
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">船舶国籍证书 :</div>
|
|
|
|
|
- <Uploader
|
|
|
|
|
- :params="{ type: '6', userId: 0, location: '' }"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- @onSendFileList="getShipNationFileList"
|
|
|
|
|
- :fileList="shipNationFileList"
|
|
|
|
|
- ></Uploader>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="line" v-show="!unchangeableShip || operatingFileList.length">
|
|
|
|
|
- <div class="info-line">
|
|
|
|
|
- <div class="info-line-title">营运证 :</div>
|
|
|
|
|
- <Uploader
|
|
|
|
|
- :params="{ type: '7', userId: 0, location: '' }"
|
|
|
|
|
- :disabled="unchangeableShip"
|
|
|
|
|
- @onSendFileList="getOperatingFileList"
|
|
|
|
|
- :fileList="operatingFileList"
|
|
|
|
|
- ></Uploader>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <Certs ref="certs"></Certs>
|
|
|
<div class="df aic jcfe">
|
|
<div class="df aic jcfe">
|
|
|
<el-button v-if="unchangeableShip" type="primary" @click="change(0)">
|
|
<el-button v-if="unchangeableShip" type="primary" @click="change(0)">
|
|
|
修改
|
|
修改
|
|
@@ -229,17 +186,12 @@ export default {
|
|
|
let shipDetail = ref({});
|
|
let shipDetail = ref({});
|
|
|
let idFrontFile = ref([]);
|
|
let idFrontFile = ref([]);
|
|
|
let idBackFile = ref([]);
|
|
let idBackFile = ref([]);
|
|
|
- let shipFileList = ref([]);
|
|
|
|
|
- let annualFileList = ref([]);
|
|
|
|
|
- let shipNationFileList = ref([]);
|
|
|
|
|
- let operatingFileList = ref([]);
|
|
|
|
|
let unchangeableShipOwner = ref(true);
|
|
let unchangeableShipOwner = ref(true);
|
|
|
let unchangeableShip = ref(true);
|
|
let unchangeableShip = ref(true);
|
|
|
async function getUserDetail() {
|
|
async function getUserDetail() {
|
|
|
let res = await api.getUserDetail({
|
|
let res = await api.getUserDetail({
|
|
|
userId: route.query.userId,
|
|
userId: route.query.userId,
|
|
|
});
|
|
});
|
|
|
- console.log(res.data.result);
|
|
|
|
|
if (res.data.status == 0) {
|
|
if (res.data.status == 0) {
|
|
|
let r = res.data.result;
|
|
let r = res.data.result;
|
|
|
|
|
|
|
@@ -307,33 +259,7 @@ export default {
|
|
|
shipname,
|
|
shipname,
|
|
|
tonnage,
|
|
tonnage,
|
|
|
};
|
|
};
|
|
|
- shipFileList.value = [];
|
|
|
|
|
- annualFileList.value = [];
|
|
|
|
|
- shipNationFileList.value = [];
|
|
|
|
|
- operatingFileList.value = [];
|
|
|
|
|
- for (let i of shipCerts) {
|
|
|
|
|
- i.url = i.viewUrl;
|
|
|
|
|
- switch (i.type) {
|
|
|
|
|
- case 5: {
|
|
|
|
|
- annualFileList.value.push(i);
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- case 6: {
|
|
|
|
|
- shipNationFileList.value.push(i);
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- case 7: {
|
|
|
|
|
- operatingFileList.value.push(i);
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- default: {
|
|
|
|
|
- shipFileList.value.push(i);
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ certs.value.initCerts(shipCerts);
|
|
|
} else {
|
|
} else {
|
|
|
ElNotification({
|
|
ElNotification({
|
|
|
type: "error",
|
|
type: "error",
|
|
@@ -361,26 +287,11 @@ export default {
|
|
|
function idBackUploadSuccess(list) {
|
|
function idBackUploadSuccess(list) {
|
|
|
idBackFile.value = list;
|
|
idBackFile.value = list;
|
|
|
}
|
|
}
|
|
|
- function getShipFileList(list) {
|
|
|
|
|
- shipFileList.value = list;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function getAnnualFileList(list) {
|
|
|
|
|
- annualFileList.value = list;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function getShipNationFileList(list) {
|
|
|
|
|
- shipNationFileList.value = list;
|
|
|
|
|
- }
|
|
|
|
|
- function getOperatingFileList(list) {
|
|
|
|
|
- operatingFileList.value = list;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
let userDetailCache = ref({});
|
|
let userDetailCache = ref({});
|
|
|
let idFrontFileCache = ref([]);
|
|
let idFrontFileCache = ref([]);
|
|
|
let idBackFileCache = ref([]);
|
|
let idBackFileCache = ref([]);
|
|
|
let shipDetailCache = ref({});
|
|
let shipDetailCache = ref({});
|
|
|
- let shipFileListCache = ref([]);
|
|
|
|
|
function change(type) {
|
|
function change(type) {
|
|
|
if (type) {
|
|
if (type) {
|
|
|
userDetailCache.value = _.cloneDeep(userDetail.value);
|
|
userDetailCache.value = _.cloneDeep(userDetail.value);
|
|
@@ -389,7 +300,7 @@ export default {
|
|
|
unchangeableShipOwner.value = false;
|
|
unchangeableShipOwner.value = false;
|
|
|
} else {
|
|
} else {
|
|
|
shipDetailCache.value = _.cloneDeep(shipDetail.value);
|
|
shipDetailCache.value = _.cloneDeep(shipDetail.value);
|
|
|
- shipFileListCache.value = _.cloneDeep(shipFileList.value);
|
|
|
|
|
|
|
+ certs.value.editCerts();
|
|
|
unchangeableShip.value = false;
|
|
unchangeableShip.value = false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -412,9 +323,7 @@ export default {
|
|
|
if (!_.isEqual(shipDetail.value, shipDetailCache.value)) {
|
|
if (!_.isEqual(shipDetail.value, shipDetailCache.value)) {
|
|
|
shipDetail.value = _.cloneDeep(shipDetailCache.value);
|
|
shipDetail.value = _.cloneDeep(shipDetailCache.value);
|
|
|
}
|
|
}
|
|
|
- if (!_.isEqual(shipFileList.value, shipFileListCache.value)) {
|
|
|
|
|
- shipFileList.value = _.cloneDeep(shipFileListCache.value);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ certs.value.cancelEditCerts();
|
|
|
unchangeableShip.value = true;
|
|
unchangeableShip.value = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -464,55 +373,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
getUserDetail();
|
|
getUserDetail();
|
|
|
} else {
|
|
} else {
|
|
|
- shipDetail.value.shipCerts = [];
|
|
|
|
|
- for (let i of shipFileList.value) {
|
|
|
|
|
- if (i.id) {
|
|
|
|
|
- shipDetail.value.shipCerts.push(i);
|
|
|
|
|
- } else {
|
|
|
|
|
- shipDetail.value.shipCerts.push({
|
|
|
|
|
- downloadUrl: i.response.result.downloadUrl,
|
|
|
|
|
- fileKey: i.response.result.key,
|
|
|
|
|
- viewUrl: i.response.result.viewUrl,
|
|
|
|
|
- type: 2,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- for (let i of annualFileList.value) {
|
|
|
|
|
- if (i.id) {
|
|
|
|
|
- shipDetail.value.shipCerts.push(i);
|
|
|
|
|
- } else {
|
|
|
|
|
- shipDetail.value.shipCerts.push({
|
|
|
|
|
- downloadUrl: i.response.result.downloadUrl,
|
|
|
|
|
- fileKey: i.response.result.key,
|
|
|
|
|
- viewUrl: i.response.result.viewUrl,
|
|
|
|
|
- type: 5,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- for (let i of shipNationFileList.value) {
|
|
|
|
|
- if (i.id) {
|
|
|
|
|
- shipDetail.value.shipCerts.push(i);
|
|
|
|
|
- } else {
|
|
|
|
|
- shipDetail.value.shipCerts.push({
|
|
|
|
|
- downloadUrl: i.response.result.downloadUrl,
|
|
|
|
|
- fileKey: i.response.result.key,
|
|
|
|
|
- viewUrl: i.response.result.viewUrl,
|
|
|
|
|
- type: 6,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- for (let i of operatingFileList.value) {
|
|
|
|
|
- if (i.id) {
|
|
|
|
|
- shipDetail.value.shipCerts.push(i);
|
|
|
|
|
- } else {
|
|
|
|
|
- shipDetail.value.shipCerts.push({
|
|
|
|
|
- downloadUrl: i.response.result.downloadUrl,
|
|
|
|
|
- fileKey: i.response.result.key,
|
|
|
|
|
- viewUrl: i.response.result.viewUrl,
|
|
|
|
|
- type: 7,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ shipDetail.value.shipCerts = certs.value.sendCerts();
|
|
|
let postData = {
|
|
let postData = {
|
|
|
...shipDetail.value,
|
|
...shipDetail.value,
|
|
|
userId: route.query.userId,
|
|
userId: route.query.userId,
|
|
@@ -533,16 +394,19 @@ export default {
|
|
|
});
|
|
});
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
}
|
|
}
|
|
|
|
|
+ certs.value.disabled = true;
|
|
|
|
|
+
|
|
|
getUserDetail();
|
|
getUserDetail();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ let certs = ref(null);
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getUserDetail();
|
|
getUserDetail();
|
|
|
});
|
|
});
|
|
|
return {
|
|
return {
|
|
|
idFrontUploadSuccess,
|
|
idFrontUploadSuccess,
|
|
|
idBackUploadSuccess,
|
|
idBackUploadSuccess,
|
|
|
- getShipFileList,
|
|
|
|
|
getUserDetail,
|
|
getUserDetail,
|
|
|
userDetail,
|
|
userDetail,
|
|
|
shipDetail,
|
|
shipDetail,
|
|
@@ -556,13 +420,7 @@ export default {
|
|
|
router,
|
|
router,
|
|
|
idFrontFile,
|
|
idFrontFile,
|
|
|
idBackFile,
|
|
idBackFile,
|
|
|
- shipFileList,
|
|
|
|
|
- annualFileList,
|
|
|
|
|
- shipNationFileList,
|
|
|
|
|
- operatingFileList,
|
|
|
|
|
- getAnnualFileList,
|
|
|
|
|
- getShipNationFileList,
|
|
|
|
|
- getOperatingFileList,
|
|
|
|
|
|
|
+ certs,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|