Commit 75c0ee9b authored by tianhongyang's avatar tianhongyang

merge

parent 77175023
......@@ -11,20 +11,44 @@ export default {
required: true,
type: String,
default: ""
},
placeholder: {
type: String,
default: ""
},
clearable: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
popperClass: {
type: String,
default: "dsk-email-options-popper"
}
},
model: {
prop: "emailValue",
event: "update:emailValue"
},
watch: {
emailValue: {
handler(newValue) {
this.comEmailValue = newValue;
},
immediate: true
}
},
data() {
return {
comEmailValue: this.emailValue
};
},
//可访问data属性
created() {
},
//计算集
computed: {
......
......@@ -27,6 +27,13 @@ export default {
default: () => []
}
},
watch: {
currentValue: {
handler(newValue) {
this.initSlidingBar();
}
}
},
model: {
prop: "currentValue",
event: "currentTabChange"
......
......@@ -25,7 +25,7 @@
v-if="comChildModuleInfo.comType == 'phone'" :disabled="isDisabled"></el-input>
<!-- 电子邮箱类型 -->
<dsk-email-input v-model="comChildModuleInfo.componentAttribute.value" :placeholder="comChildModuleInfo.componentAttribute.placeholder"
clearable :disabled="isDisabled" v-if="comChildModuleInfo.comType == 'email'"></dsk-email-input>
:clearable="true" :disabled="isDisabled" v-if="comChildModuleInfo.comType == 'email'"></dsk-email-input>
<!-- 图片类型 -->
</el-form-item>
......
......@@ -190,6 +190,7 @@ export default {
},
tableKeyWidth: 0,
searchTimer: null,
loading: false
};
},
//可访问data属性
......@@ -241,15 +242,27 @@ export default {
try {
if ((keywords || keywords == "0") && keywords?.toString()?.trim() && keywords?.toString()?.trim()?.length >= 1) {
this.clearSearchTimer();
this.searchTimer = setTimeout(async () => {
const result = await this.searchConsultingHandle(keywords.toString().trim());
if (result) {
this.updateTemplate(result);
}
}, 1000);
this.loading = true;
this.$emit("searchLoadingChange", this.loading);
await new Promise((resolve, reject) => {
this.searchTimer = setTimeout(async () => {
try {
const result = await this.searchConsultingHandle(keywords.toString().trim());
if (result) {
this.updateTemplate(result);
}
resolve();
} catch (error) {
reject(error);
}
}, 1000);
});
}
} catch (error) {
console.log(error);
} finally {
this.loading = false;
this.$emit("searchLoadingChange", this.loading);
}
},
async searchConsultingHandle(keywords) {
......@@ -316,7 +329,7 @@ export default {
if (result.advisoryBodyCid) {
const _temp = JSON.parse(JSON.stringify(this.comProjectDetailInfo));
const paramsData = {
isNewAdvisoryBody: _temp.isNewAdvisoryBody,
isNewAdvisoryBody: _temp.isNewAdvisoryBody ? _temp.isNewAdvisoryBody : result.isNewAdvisoryBody,
projectKey: _temp.projectKey,
advisoryBodyCid: _temp.advisoryBody.advisoryBodyCid,
advisoryBodyName: _temp.advisoryBody.advisoryBodyName ?? "",
......
......@@ -25,8 +25,8 @@
<el-button type="primary" @click="editProjectDetail">编辑信息</el-button>
</div>
<div class="save-project-detail-container" v-if="currentList === 'consultingAgency' && isModify" :key="'save-project'">
<el-button type="primary" @click="saveProjectDetail">保存</el-button>
<el-button @click="cancelSave">取消</el-button>
<el-button type="primary" @click="saveProjectDetail" :disabled="loading">保存</el-button>
<el-button @click="cancelSave" :disabled="loading">取消</el-button>
</div>
</transition>
</div>
......@@ -37,7 +37,8 @@
<basic-engineering-information v-if="currentList === 'project'" :projectDetailInfo="projectDetailInfo"></basic-engineering-information>
<!-- 咨询机构结算信息 -->
<consulting-agency v-if="currentList === 'consultingAgency'" :projectDetailInfo="projectDetailInfo" :isModify="isModify"
ref="consultingAgency" @editComProjectDetailSuccess="editComProjectDetailSuccess"></consulting-agency>
ref="consultingAgency" @editComProjectDetailSuccess="editComProjectDetailSuccess"
@searchLoadingChange="searchLoadingChange"></consulting-agency>
</div>
</div>
......@@ -77,7 +78,8 @@ export default {
projectKey: "",
advisoryBodyCid: "",
// 咨询机构结算信息 修改
isModify: false
isModify: false,
loading: false
};
},
//可访问data属性
......@@ -92,17 +94,21 @@ export default {
methods: {
async init() {
try {
const advisoryBodyCid = this.$route.query?.advisoryBodyCid;
const projectKey = this.$route.query?.projectKey;
this.advisoryBodyCid = this.$route.query?.advisoryBodyCid ? this.$route.query?.advisoryBodyCid : "";
this.projectKey = this.$route.query?.projectKey ? this.$route.query?.projectKey : "";
const currentKey = this.$route.query?.currentKey;
// if (!advisoryBodyCid) return this.$message.error("缺少咨询机构ID");
if (!projectKey) return this.$message.error("缺少项目主键");
if (!this.projectKey) return this.$message.error("缺少项目主键");
const detail = await getConsultingOrgProjectDetailApi({
advisoryBodyCid,
projectKey
advisoryBodyCid: this.advisoryBodyCid,
projectKey: this.projectKey
});
if (detail.code == 200 && detail.data) {
this.projectDetailInfo = { ...this.projectDetailInfo, ...detail.data };
}
if (currentKey) {
this.currentList = currentKey;
}
} catch (error) {
console.log(error);
}
......@@ -120,6 +126,14 @@ export default {
if (result.code) {
this.$message.success("更新咨询机构结算信息成功");
this.isModify = false;
this.$router.push({
path: `/redirect/${"consultingOrgManagement/projectDetail"}`,
query: {
projectKey: this.projectKey,
advisoryBodyCid: this.advisoryBodyCid ? this.advisoryBodyCid : data.advisoryBodyCid,
currentKey: "consultingAgency"
}
});
}
} catch (error) {
......@@ -129,6 +143,9 @@ export default {
this.isModify = false;
this.$refs["consultingAgency"].cancelModify();
},
searchLoadingChange(status) {
this.loading = status;
}
},
}
</script>
......@@ -229,6 +246,13 @@ export default {
background-color: #0081ff;
border-color: #0081ff;
}
&.is-disabled {
color: #c0c4cc;
background-image: none;
background-color: #ffffff;
border-color: #e6ebf5;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment