Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yanyizhou
2021-09-02 13:55:56 +08:00
3 changed files with 67 additions and 21 deletions
@@ -66,6 +66,15 @@
:loading="submitLoading" :loading="submitLoading"
v-if="showSubmit" v-if="showSubmit"
>{{ submitBTNTextShow }}</el-button> >{{ submitBTNTextShow }}</el-button>
<el-button
type="primary"
size="small"
class="common-button-primary"
icon="el-icon-check"
@click="handleSubmit"
:loading="submitLoading"
v-if="showConfirm"
>确认</el-button>
</div> </div>
<!-- 组织机构树 --> <!-- 组织机构树 -->
@@ -131,6 +140,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
showConfirm: {
type: Boolean,
default: false
},
// 是否显示委托按钮 // 是否显示委托按钮
showEntrust: { showEntrust: {
type: Boolean, type: Boolean,
@@ -349,14 +349,15 @@ export default {
//动态表单读取 //动态表单读取
getFormFieldList(item) { getFormFieldList(item) {
this.$nextTick(() => { this.$nextTick(() => {
this.qdform = JSON.parse(JSON.stringify(item)); if(item.form === undefined){
this.qdform.prcNum = this.prcNum; this.qdform = JSON.parse(JSON.stringify(item));
this.qdform.prcName = this.prcName; this.qdform.prcNum = this.prcNum;
this.qdform["id"] = item.id; this.qdform.prcName = this.prcName;
this.projectId = item.projectId; this.qdform["id"] = item.id;
this.detailedId = item.detailedListId; }else{
this.getStandData(); this.qdform = item.form
this.getStand(); this.dataList =item.form.dataList
}
}); });
}, },
//查询清单下的标准 //查询清单下的标准
@@ -382,10 +382,13 @@
</div> </div>
</el-drawer> </el-drawer>
<ProcessFooter <ProcessFooter
show-submit show-save
show-confirm
:submitLoading="isSubmit" :submitLoading="isSubmit"
:approval="true" :saveLoading="saveLoading"
@submit="handleSubmit" @submit="handleSubmit"
@save="handleSave"
:approval="true"
> >
</ProcessFooter> </ProcessFooter>
</div> </div>
@@ -395,7 +398,7 @@
import ProcessHeader from "../../components/ProcessHeader"; import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter"; import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle"; import ProcessTitle from "../../components/ProcessTitle";
import { inboundLiaisonDetail, queryDetail } from "api/process"; import { inboundLiaisonDetail, queryDetail, saveTaskForPub } from "api/process";
export default { export default {
name: "xmqdqrStep2", name: "xmqdqrStep2",
@@ -517,14 +520,22 @@ export default {
//动态表单读取 //动态表单读取
getFormFieldList(item) { getFormFieldList(item) {
this.$nextTick(() => { this.$nextTick(() => {
this.qdform = JSON.parse(JSON.stringify(item)); if(item.form === undefined){
this.qdform.prcNum = this.prcNum; this.qdform = JSON.parse(JSON.stringify(item));
this.qdform.prcName = this.prcName; this.qdform.prcNum = this.prcNum;
this.qdform["id"] = item.id; this.qdform.prcName = this.prcName;
// this.projectId = item.projectId; this.qdform["id"] = item.id;
this.detailedId = item.detailedListId; // this.projectId = item.projectId;
// this.getStandData(); //获取清单id 查询对应清单下的标准
this.getStand(); this.detailedId = item.detailedListId;
// this.getStandData();
this.getStand();
}else{
this.qdform = item.form
this.dataList =item.form.dataList
this.detailedId = item.form.detailedListId;
this.getStand();
}
}); });
}, },
//查询清单下的标准 //查询清单下的标准
@@ -549,6 +560,26 @@ export default {
// }); // });
// }); // });
// }, // },
//保存事件
handleSave() {
this.saveLoading = true;
let _formData = new FormData();
this.qdform.dataList = this.dataList
_formData.append("id", this.bpnId || "");
_formData.append("prcType", "10");
_formData.append('taskIds', this.taskIds)
_formData.append("json", JSON.stringify({
form: this.qdform,
commentText: this.commentText
}));
saveTaskForPub(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功");
this.bpnId = res.result;
}).catch(e => {
this.saveLoading = false;
});
},
//提交事件 //提交事件
handleSubmit() { handleSubmit() {
this.isSubmit = true; this.isSubmit = true;
@@ -623,7 +654,7 @@ export default {
this.standList.map(item => { this.standList.map(item => {
let addIndex let addIndex
addIndex = this.dataList.findIndex(items =>{ addIndex = this.dataList.findIndex(items =>{
return items.standId === item.id return items.id === item.id
}) })
if(addIndex > -1){ if(addIndex > -1){
this.$message.warning('请勿重复添加数据') this.$message.warning('请勿重复添加数据')
@@ -656,7 +687,8 @@ export default {
this.pageSize = pageSize; this.pageSize = pageSize;
this.getStand(); this.getStand();
}, },
getStand(data) { //查询清单下的标准
getStand() {
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", { this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", {
id: this.detailedId, id: this.detailedId,
page: this.page, page: this.page,