Commit 75c0ee9b authored by tianhongyang's avatar tianhongyang

merge

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