zihan.wu

feat(customerConfig): 重构客户配置对话框

- 重新设计了客户配置对话框的布局和逻辑
- 新增了口岸选择功能
- 优化了表单验证和数据处理流程
- 改进了文件上传和证书管理
- 统一了样式和组件使用
......@@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => {
store.dispatch('GetInfo').then((res) => {
// if (res.success) {
store.dispatch('GenerateRoutes').then(accessRoutes => {
store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','TEMPLATE_TYPE','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS','METHOD_OF_SIGNATURE']);
store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','TEMPLATE_TYPE','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS','METHOD_OF_SIGNATURE','METHOD_OF_SIGNATURE']);
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
......
......@@ -85,13 +85,35 @@
</el-select>
</Formitem>
</el-col>
<!-- 口岸选择-->
<el-col :span="8" v-if="formData.orderRequester === '2'">
<Formitem label="申报地区" prop="choosePortCode" type="edit">
<el-select
type="text"
id="inputInner-edit-choosePortCode"
v-model="choosePortCode"
clearable
multiple
maxlength="4"
placeholder=""
>
<el-option
v-for="(item, index) in portCodeList"
:key="index"
:label="item"
:value="item"
></el-option>
</el-select>
</Formitem>
</el-col>
</el-row>
<div v-if="formData.orderRequester=='2'">
<div class="checkTitle">
<el-checkbox v-model="formData.qdCheck" @change="changeQDCheckBox()"></el-checkbox>青岛
<div v-if="choosePortCode.includes('TAO')">
<div class="dlTitle">
<!-- <el-checkbox v-model="formData.qdCheck" @change="changeQDCheckBox()"></el-checkbox>-->
青岛
</div>
<el-row :gutter="5">
<!-- <div v-if="isCipherMachine">-->
<!-- <div v-if="isCipherMachine">-->
<!-- 公服DXPID -->
<el-col :span="8">
<Formitem label="公服DXPID" prop="qingdaoUserDxpid" type="edit">
......@@ -100,10 +122,9 @@
class="inputShadow"
id="inputInner-edit-qingdaoUserDxpid"
resize="none"
v-model="formData.qingdaoUserDxpid"
v-model="portConfig.TAO.dxpId"
clearable
placeholder=""
:disabled="!formData.qdCheck"
></el-input>
</Formitem>
</el-col>
......@@ -115,10 +136,9 @@
class="inputShadow"
id="inputInner-edit-qingdaoUserId"
resize="none"
v-model="formData.qingdaoUserId"
v-model="portConfig.TAO.userId"
clearable
placeholder=""
:disabled="!formData.qdCheck"
></el-input>
</Formitem>
</el-col>
......@@ -130,14 +150,13 @@
class="inputShadow"
id="inputInner-edit-qingdaoKey"
resize="none"
v-model="formData.qingdaoKey"
v-model="portConfig.TAO.key"
clearable
placeholder=""
:disabled="!formData.qdCheck"
></el-input>
</Formitem>
</el-col>
<!-- </div>-->
<!-- </div>-->
<el-col :span="8">
<Formitem label="山电DXPID" prop="qingdaoDanyiUserDxpid" type="edit">
<el-input
......@@ -145,10 +164,9 @@
class="inputShadow"
id="inputInner-edit-qingdaoDanyiUserDxpid"
resize="none"
v-model="formData.qingdaoDanyiUserDxpid"
v-model="portConfig.TAO.danyiDxpId"
clearable
placeholder=""
:disabled="!formData.qdCheck"
></el-input>
</Formitem>
</el-col>
......@@ -159,10 +177,9 @@
class="inputShadow"
id="inputInner-edit-qingdaoUserName"
resize="none"
v-model="formData.qingdaoUserName"
v-model="portConfig.TAO.userName"
clearable
placeholder=""
:disabled="!formData.qdCheck"
></el-input>
</Formitem>
</el-col>
......@@ -173,10 +190,9 @@
class="inputShadow"
id="inputInner-edit-qingdaoUserPassword"
resize="none"
v-model="formData.qingdaoUserPassword"
v-model="portConfig.TAO.password"
clearable
placeholder=""
:disabled="!formData.qdCheck"
></el-input>
</Formitem>
</el-col>
......@@ -198,26 +214,21 @@
:auto-upload="true"
:show-file-list="false"
:data="{}"
:before-upload="qingdaoBeforeUpload"
:on-remove="qingdaoHandleRemove"
:on-success="qingdaoHandleSuccess"
:on-change="qingdaoFileChange"
:file-list="qingdaoFileList"
@clearFiles="clearqingdaoFile"
>
</el-upload>
</div>
<div class="fileList" v-if="formData.qingdaoFile != null || formData.qingdaoCertificatePath">
<div class="fileList" v-if="portConfig.TAO.certificateBase64 != '' || portConfig.TAO.certificateName">
<div class="fileList-item">
<div class="uploadbox-fileName" >
<div class="uploadbox-fileName">
<svg-icon
class="el-icon-user-solid"
icon-class="exl"
style="font-size: 18px; color: #de002e"
/>
<Tooltip
:content="formData.qingdaoFile ? formData.qingdaoFile.name : formData.qingdaoCertificatePath.split('/').pop()"
:refName="formData.qingdaoFile ? formData.qingdaoFile.name : formData.qingdaoCertificatePath.split('/').pop()"
:content="portConfig.TAO.certificateName"
:refName="portConfig.TAO.certificateName"
/>
</div>
<div class="uploadbox-option">
......@@ -227,37 +238,61 @@
>
<el-button slot="reference" type="text">{{
$t("entry.upload.del")
}}</el-button>
}}
</el-button>
</el-popconfirm>
</div>
</div>
</div>
</div>
</el-col>
<!-- 加签方式 -->
<el-col :span="8">
<Formitem label="加签方式" prop="methodOfSignature" type="edit">
<el-select
type="text"
id="inputInner-edit-methodOfSignature"
v-model="portConfig.TAO.methodOfSignature"
clearable
maxlength="4"
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict.METHOD_OF_SIGNATURE"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-col>
<!-- 加密方式 -->
<!-- <el-col :span="8">-->
<!-- <Formitem label="加密方式" prop="methodOfSignature" type="edit">-->
<!-- <el-select-->
<!-- type="text"-->
<!-- id="inputInner-edit-methodOfSignature"-->
<!-- v-model="formData.methodOfSignature"-->
<!-- clearable-->
<!-- maxlength="4"-->
<!-- :disabled="!formData.qdCheck"-->
<!-- placeholder=""-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item, index) in $store.getters.dict.METHOD_OF_SIGNATURE"-->
<!-- :key="index"-->
<!-- :label="item.itemChineseName"-->
<!-- :value="item.itemValue"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </Formitem>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <Formitem label="加密方式" prop="methodOfSignature" type="edit">-->
<!-- <el-select-->
<!-- type="text"-->
<!-- id="inputInner-edit-methodOfSignature"-->
<!-- v-model="formData.methodOfSignature"-->
<!-- clearable-->
<!-- maxlength="4"-->
<!-- :disabled="!formData.qdCheck"-->
<!-- placeholder=""-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item, index) in $store.getters.dict.METHOD_OF_SIGNATURE"-->
<!-- :key="index"-->
<!-- :label="item.itemChineseName"-->
<!-- :value="item.itemValue"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </Formitem>-->
<!-- </el-col>-->
</el-row>
<div class="checkTitle">
<el-checkbox v-model="formData.bjCheck" @change="changeBJCheckBox()"></el-checkbox>北京
</div>
<div v-if="choosePortCode.includes('PEK')">
<div class="dlTitle">
<!-- <el-checkbox v-model="formData.bjCheck" @change="changeBJCheckBox()"></el-checkbox>-->
北京
</div>
<el-row :gutter="5">
<!-- DXPID -->
......@@ -268,15 +303,14 @@
class="inputShadow"
id="inputInner-edit-beijingDxpid"
resize="none"
v-model="formData.beijingDxpid"
v-model="portConfig.PEK.dxpId"
clearable
placeholder=""
:disabled="!formData.bjCheck"
></el-input>
</Formitem>
</el-col>
</el-row>
</div>
<section class="dlTitle">
<h3>密码机管理</h3>
......@@ -326,19 +360,14 @@
:auto-upload="true"
:show-file-list="false"
:data="{}"
:before-upload="beforeUpload"
:on-remove="handleRemove"
:on-success="handleSuccess"
:on-change="fileChange"
:file-list="fileList"
@clearFiles="clearFile"
>
</el-upload>
</div>
<!-- 1{{ formData.file }} -->
<div class="fileList" v-if="formData.file != null || formData.certificare">
<div class="fileList-item">
<div class="uploadbox-fileName" >
<div class="uploadbox-fileName">
<svg-icon
class="el-icon-user-solid"
icon-class="exl"
......@@ -356,7 +385,8 @@
>
<el-button slot="reference" type="text">{{
$t("entry.upload.del")
}}</el-button>
}}
</el-button>
</el-popconfirm>
</div>
</div>
......@@ -365,7 +395,6 @@
</el-col>
</el-row>
</div>
</el-form>
</div>
<div class="dialogOption entrySave">
......@@ -373,13 +402,15 @@
class="entrySaveButton"
:disabled="loadings.submitLoading"
@click="submit"
>确 定</el-button
>确 定
</el-button
>
<el-button
class="entrySaveButton"
:disabled="loadings.uploadLoading"
@click="close"
>关 闭</el-button
>关 闭
</el-button
>
</div>
</el-dialog>
......@@ -394,6 +425,7 @@ import {
delCertificate,
delQingdaoCertificate
} from "@/api/system/customer-ai.js";
export default {
props: {
outerVisible: {
......@@ -412,6 +444,7 @@ export default {
type: Object,
default: null,
},
portCodeList: []
// dict: {
// type: Array,
// default() {
......@@ -421,28 +454,36 @@ export default {
},
data() {
return {
//配置模板
portConfig: {
PEK: {
dxpId: '',
},
TAO: {
dxpId: '',
userId: '',
key: '',
danyiDxpId: '',
userName: '',
password: '',
certificateName: '',
certificateBase64: '',
methodOfSignature: ''
}
},
choosePortCode: [],
formData: {
config: {},
id: null,
beijingDxpid: "",
certificare: "",
qingdaoCertificare: "",
clientId: "",
ecomEntCode: "",
ecomEntEmail: "",
ecomEntName: "",
orderRequester: "",
//methodOfSignature: this.getDefaultMethodOfSignature(), // 设置默认值
certificateSerialNumber: "",
certificateIndexNumber: "",
qingdaoKey: "",
qingdaoUserDxpid: "",
qingdaoDanyiUserDxpid:"",
qingdaoUserId: "",
qdCheck: false,
bjCheck: false,
checkboxState:"",//后端要求 北京 和青岛 用这种方式传 第一个是青岛 第二个是北京
file: null,
qingdaoFile: null,
},
rules: {
ecomEntCode: [
......@@ -463,7 +504,7 @@ export default {
orderRequester: [
{
required: true,
trigger: "change",
trigger: "blur",
message: "订单申报方不能为空!",
},
],
......@@ -534,17 +575,23 @@ export default {
if (this.type == "update") {
this.formData = this.active;
// this.formData.file=null;
this.parseCheckboxState(this.active.checkboxState);
}else{
this.formData.orderRequester="1";
// this.parseCheckboxState(this.active.checkboxState);
} else {
// this.formData.orderRequester = "1";
}
}
},
type(newVal) {
if (newVal === "add") {
this.setDefaultMethodOfSignature(); // 确保默认值被设置
if (this.active?.config != null) {
this.choosePortCode = Object.keys(this.active.config)
Object.keys(this.active.config).forEach(key => {
this.portConfig[key] = this.active.config[key]
})
}
},
// type(newVal) {
// if (newVal === "add") {
// this.setDefaultMethodOfSignature(); // 确保默认值被设置
// }
// },
},
// computed: {
// isCipherMachine() {
......@@ -554,47 +601,47 @@ export default {
created() {
// 确保字典数据已加载
if (this.$store.getters.dict.METHOD_OF_SIGNATURE.length > 0) {
this.setDefaultMethodOfSignature();
} else {
// 监听字典数据变化
this.$store.watch(
(state) => state.dict.METHOD_OF_SIGNATURE,
(newVal) => {
if (newVal.length > 0) {
this.setDefaultMethodOfSignature();
}
}
);
}
// if (this.$store.getters.dict.METHOD_OF_SIGNATURE.length > 0) {
// this.setDefaultMethodOfSignature();
// } else {
// // 监听字典数据变化
// this.$store.watch(
// (state) => state.dict.METHOD_OF_SIGNATURE,
// (newVal) => {
// if (newVal.length > 0) {
// this.setDefaultMethodOfSignature();
// }
// }
// );
// }
},
methods: {
getDefaultMethodOfSignature() {
const methodOfSignatureDict = this.$store.getters.dict.METHOD_OF_SIGNATURE;
if (methodOfSignatureDict.length > 0) {
return methodOfSignatureDict[0].itemValue;
}
return "";
},
setDefaultMethodOfSignature() {
this.formData.methodOfSignature = this.getDefaultMethodOfSignature();
},
changeQDCheckBox(){
this.$forceUpdate()
if(!this.formData.qdCheck){
this.formData.qingdaoDanyiUserDxpid="";
this.formData.qingdaoKey="";
this.formData.qingdaoUserDxpid="";
this.formData.qingdaoUserId="";
}
},
changeBJCheckBox(){
this.$forceUpdate()
if(!this.formData.bjCheck){
this.formData.beijingDxpid="";
this.formData.changeBJCheckBox="";
}
},
// getDefaultMethodOfSignature() {
// const methodOfSignatureDict = this.$store.getters.dict.METHOD_OF_SIGNATURE;
// if (methodOfSignatureDict.length > 0) {
// return methodOfSignatureDict[0].itemValue;
// }
// return "";
// },
// setDefaultMethodOfSignature() {
// this.formData.methodOfSignature = this.getDefaultMethodOfSignature();
// },
// changeQDCheckBox() {
// this.$forceUpdate()
// if (!this.formData.qdCheck) {
// this.formData.qingdaoDanyiUserDxpid = "";
// this.formData.qingdaoKey = "";
// this.formData.qingdaoUserDxpid = "";
// this.formData.qingdaoUserId = "";
// }
// },
// changeBJCheckBox() {
// this.$forceUpdate()
// if (!this.formData.bjCheck) {
// this.formData.beijingDxpid = "";
// this.formData.changeBJCheckBox = "";
// }
// },
uploadFile() {
this.$refs.uploadFile.$refs["upload-inner"].handleClick();
},
......@@ -602,21 +649,21 @@ export default {
this.$refs.qingdaoUploadFile.$refs["upload-inner"].handleClick();
},
//文件校验
beforeUpload(val) {
// if (
// val.type !=
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
// ) {
// this.alertWarningMsg("请上传Excel文件!");
// return false;
// } else {
return true;
// }
},
qingdaoBeforeUpload(val) {
return true;
},
fileUpload({ file }) {
// beforeUpload(val) {
// // if (
// // val.type !=
// // "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
// // ) {
// // this.alertWarningMsg("请上传Excel文件!");
// // return false;
// // } else {
// return true;
// // }
// },
// qingdaoBeforeUpload(val) {
// return true;
// },
fileUpload({file}) {
const reader = new FileReader();
reader.readAsDataURL(file);
......@@ -624,38 +671,47 @@ export default {
console.log(e);
let obj = {
file: e.target.result,
name:file.name,
name: file.name,
};
this.formData.file = obj;
};
},
qingdaoFileUpload({ file }) {
qingdaoFileUpload({file}) {
const reader = new FileReader();
reader.readAsDataURL(file);
console.log(file);
reader.onload = (e) => {
console.log(e);
let obj = {
file: e.target.result,
name:file.name,
};
this.formData.qingdaoFile = obj;
this.portConfig.TAO.certificateName = file.name
this.portConfig.TAO.certificateBase64 = e.target.result
// let obj = {
// file: e.target.result,
// name: file.name,
// };
// this.formData.qingdaoFile = obj;
};
},
fileChange(val) {},
qingdaoFileChange(val) {},
handleSuccess() {},
qingdaoHandleSuccess() {},
clearFile() {},
clearqingdaoFile() {},
handleRemove() {
this.fileList = [];
},
qingdaoHandleRemove() {
this.qingdaoFileList = [];
},
// fileChange(val) {
// },
// qingdaoFileChange(val) {
// },
// handleSuccess() {
// },
// qingdaoHandleSuccess() {
// },
// clearFile() {
// },
// clearqingdaoFile() {
// },
// handleRemove() {
// this.fileList = [];
// },
// qingdaoHandleRemove() {
// this.qingdaoFileList = [];
// },
//删除文件
delTypeDFile() {
this.delCertificate();
......@@ -665,50 +721,52 @@ export default {
},
//删除证书
delCertificate(){
if(this.formData.id && this.formData.certificare){
delCertificate(this.formData.id,this.formData.certificare).then((res)=>{
if(res.code==200){
delCertificate() {
if (this.formData.id && this.formData.certificare) {
delCertificate(this.formData.id, this.formData.certificare).then((res) => {
if (res.code == 200) {
this.formData.file = null;
this.formData.certificare="";
this.formData.certificare = "";
// this.msgSuccess("证书删除成功!");
}else{
} else {
this.alertErrorMsg("证书删除失败,请联系管理员!");
}
}).catch((err)=>{
}).catch((err) => {
console.log(err);
this.alertErrorMsg("证书删除失败,请联系管理员!");
})
}else{
} else {
this.formData.file = null;
this.formData.certificare="";
this.formData.certificare = "";
}
},
//删除青岛证书
delQingdaoCertificate(){
if(this.formData.id && this.formData.qingdaoCertificatePath){
delQingdaoCertificate(this.formData.id,this.formData.qingdaoCertificatePath).then((res)=>{
if(res.code==200){
this.formData.qingdaoFile = null;
this.formData.qingdaoCertificatePath="";
// this.msgSuccess("证书删除成功!");
}else{
this.alertErrorMsg("证书删除失败,请联系管理员!");
}
}).catch((err)=>{
console.log(err);
this.alertErrorMsg("证书删除失败,请联系管理员!");
})
}else{
this.formData.qingdaoFile = null;
this.formData.qingdaoCertificatePath="";
}
delQingdaoCertificate() {
// if (this.formData.id && this.formData.qingdaoCertificatePath) {
// delQingdaoCertificate(this.formData.id, this.formData.qingdaoCertificatePath).then((res) => {
// if (res.code == 200) {
// this.formData.qingdaoFile = null;
// this.formData.qingdaoCertificatePath = "";
// // this.msgSuccess("证书删除成功!");
// } else {
// this.alertErrorMsg("证书删除失败,请联系管理员!");
// }
// }).catch((err) => {
// console.log(err);
// this.alertErrorMsg("证书删除失败,请联系管理员!");
// })
// } else {
// this.formData.qingdaoFile = null;
// this.formData.qingdaoCertificatePath = "";
// }
this.portConfig.TAO.certificateBase64 = null;
this.portConfig.TAO.certificateName = null;
},
//查询用户信息详情
searchUserData(id) {
this.loadings.dialogLoading = true;
getUserDetailData({ id: id })
getUserDetailData({id: id})
.then((res) => {
if (res.code === "200") {
this.formData = res.data;
......@@ -724,9 +782,10 @@ export default {
},
//数据保存
submit() {
this.handlePortConfigJson()
this.loadings.dialogLoading = true;
let obj = {};
this.formData.checkboxState=this.checkboxState();
// this.formData.checkboxState = this.checkboxState();
if (this.type == "add") {
this.$refs.formData.validate((valid) => {
if (valid) {
......@@ -742,7 +801,7 @@ export default {
obj = this.formData;
this.clearData(); //清除值
this.updateapi(obj);
if(this.formData.orderRequester==1){
if (this.formData.orderRequester == 1) {
this.delCertificate(); //删除证书
}
} else {
......@@ -751,15 +810,21 @@ export default {
});
}
},
handlePortConfigJson() {
this.formData.config = {}
this.choosePortCode.forEach(portCode => {
this.formData.config[portCode] = JSON.stringify(this.portConfig[portCode])
})
},
addApi(val) {
addCustomerData(val)
.then((res) => {
if (res.code === "200") {
if (this.formData.file) {
this.uploadCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.file.file,this.formData.file.name));
this.uploadCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.file.file, this.formData.file.name));
}
if (this.formData.qingdaoFile) {
this.uploadQingdaoCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.qingdaoFile.file,this.formData.qingdaoFile.name));
this.uploadQingdaoCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.qingdaoFile.file, this.formData.qingdaoFile.name));
}
this.msgSuccess("客户添加成功!");
this.close();
......@@ -817,10 +882,10 @@ export default {
// this.msgSuccess(res.message);
// this.close();
if (this.formData.file) {
this.uploadCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.file.file,this.formData.file.name));
this.uploadCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.file.file, this.formData.file.name));
}
if (this.formData.qingdaoFile) {
this.uploadQingdaoCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.qingdaoFile.file,this.formData.qingdaoFile.name));
this.uploadQingdaoCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.qingdaoFile.file, this.formData.qingdaoFile.name));
}
this.msgSuccess("客户修改成功!");
this.close();
......@@ -836,63 +901,69 @@ export default {
});
},
//后端要求的
checkboxState() {
return `${this.formData.qdCheck},${this.formData.bjCheck}`;
},
// checkboxState() {
// return `${this.formData.qdCheck},${this.formData.bjCheck}`;
// },
//后端要求的
parseCheckboxState(checkboxStateString) {
if(checkboxStateString){
let checkboxStateArray = checkboxStateString.split(',');
let checkboxStateBooleans = checkboxStateArray.map(value => value === 'true');
this.formData.qdCheck=checkboxStateBooleans[0];
this.formData.bjCheck=checkboxStateBooleans[1];
}
},
// parseCheckboxState(checkboxStateString) {
// if (checkboxStateString) {
// let checkboxStateArray = checkboxStateString.split(',');
// let checkboxStateBooleans = checkboxStateArray.map(value => value === 'true');
// this.formData.qdCheck = checkboxStateBooleans[0];
// this.formData.bjCheck = checkboxStateBooleans[1];
// }
//
// },
close() {
this.formData = {
id: null,
beijingDxpid: "",
certificare: "",
clientId: "",
ecomEntCode: "",
ecomEntEmail: "",
ecomEntName: "",
orderRequester: "",
//methodOfSignature: this.getDefaultMethodOfSignature(), // 重置默认值
certificateSerialNumber: "",
certificateIndexNumber: "",
qingdaoKey: "",
qingdaoUserDxpid: "",
qingdaoDanyiUserDxpid:"",
qingdaoUserId: "",
qdCheck: false,
bjCheck: false,
file: null,
};
this.handleRemove();
this.choosePortCode = []
this.clearPortConfig(this.portConfig)
// this.handleRemove();
this.$emit("close");
},
clearData(){
if(this.formData.orderRequester==1){
this.formData.beijingDxpid="";
this.formData.bjCheck="";
this.formData.checkboxState="";
this.formData.qingdaoKey="";
this.formData.qingdaoUserDxpid="";
this.formData.qingdaoDanyiUserDxpid="";
this.formData.qingdaoUserId="";
this.formData.qdCheck="";
this.formData.file=null;
// this.delCertificate(); //删除证书
clearPortConfig(obj) {
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
if (typeof obj[key] === 'object' && obj[key] !== null) {
this.clearPortConfig(obj[key]); // 递归处理嵌套对象
} else {
obj[key] = ''; // 设置为一个空字符串
}
}
}
},
clearData() {
// if (this.formData.orderRequester == 1) {
// this.formData.beijingDxpid = "";
// this.formData.bjCheck = "";
// this.formData.checkboxState = "";
// this.formData.qingdaoKey = "";
// this.formData.qingdaoUserDxpid = "";
// this.formData.qingdaoDanyiUserDxpid = "";
// // this.formData.qingdaoUserId="";
// this.formData.qdCheck = "";
// this.formData.file = null;
// // this.delCertificate(); //删除证书
// }
}
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
.uploadItem {
margin-bottom: 5px;
......@@ -960,16 +1031,19 @@ export default {
font-size: 14px;
color: #333 !important;
margin: 5px;
.el-checkbox {
display: inline-block;
margin-right: 10px;
}
}
.dlTitle{
.dlTitle {
border-bottom: 2px solid #000000;
color:#000000;
color: #000000;
margin-bottom: 12px;
h3{
h3 {
margin-bottom: 8px;
font-weight: 500;
}
......
......@@ -156,6 +156,7 @@
:title="dialogTitle"
:type="editType"
:active="activeData"
:portCodeList="dict.port"
@close="dialogClose"
/>
</div>
......@@ -248,6 +249,9 @@ export default {
align: "left",
},
],
dict:{
port:[]
},
// dict: {
// orderRequester: [
// { name: "企业", code: "ENTERPRISE_DECLARATION", value: "1" },
......