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

This commit is contained in:
fanlin
2021-07-23 17:20:11 +08:00
7 changed files with 312 additions and 298 deletions
@@ -253,7 +253,7 @@
class="common-button-primary"
size="small"
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
@click="selectionList">
@click="queryDetailsData">
查询
</el-button>
</el-form-item>
@@ -573,7 +573,7 @@
class="common-button-default"
size="small"
v-btn-permission="'3480a13964a18e000196e4d5bc6ef117'"
@click="clearSearch">清空
@click="clearStandSearch">清空
</el-button>
</el-form-item>
</el-form>
@@ -898,6 +898,10 @@ export default {
this.listForm.signFlag = 2;
}
},
queryDetailsData(){
this.page = 1
this.selectionList()
},
// //判断当前选中的是哪个清单
selectionList(type) {
type = this.listType;
@@ -947,11 +951,13 @@ export default {
countryArea: "",
detailedListName: ""
};
this.selectionList();
},
clearStandSearch(){
this.standardSearch = {
standType: "",
standNumber: ""
};
this.selectionList();
this.addList();
},
//点击添加事件
@@ -999,73 +1005,74 @@ export default {
},
//保存事件
handleSave() {
this.saveLoading = true;
let _formData = new FormData();
_formData.append("createUser", this.$store.getters.userInfo.userId);
_formData.append("createUserName", this.$store.getters.userInfo.uName);
_formData.append("prcType", this.$route.query.type);
_formData.append("json", JSON.stringify({
prcForm: this.prcForm,
sarAccessInfoList: this.sarAccessInfoList,
sarAccessInfoListADMIN: this.sarAccessInfoListADMIN,
bzqdForm: this.bzqdForm,
listInfo: this.listInfo,
id: this.id
}));
this.saveLoading = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '4')
_formData.append('json', JSON.stringify({
form: this.form,
roleForm: this.roleForm,
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功");
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false;
});
this.saveLoading = false
})
},
//提交事件
handleSubmit() {
let json = this.listForm;
this.listForm.fileId = this.fileIds.join(",");
this.listForm.fileName = this.fileListName.join(",");
this.listForm.model = this.listForm.fileId;
this.listForm.modelName = this.listForm.fileName;
// let json = Object.assign(this.listForm, this.roleForm)
json.zrUserId = this.roleForm.dockUser; //会签人
json.jlUserId = this.roleForm.directorUser; //业务经理
// (如果是业务经理应该这样写 后续需要更改 例:json.jlUserId = this.roleForm.directorUser;)
json.applyUpdUserId = this.roleForm.ministerUser; // 修订人
json.approvalOpinion = "";
json.prcCreateUser = this.$store.getters.userInfo.userId;
json.prcCreateUserName = this.$store.getters.userInfo.account;
json.standName = this.listForm.listName;
json.standId = this.listForm.standId;
this.$refs["qdfbForm"].validate((valid) => {
if (valid) {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.$http.get("lawss/activiti/startProcess", { type: "4" }, {
_this: this
}, res => {
if (res.ok) {
this.$http.post("lawss/activiti/completeTask", {
taskIds: res.data,
userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
});
}
});
} else {
return this.$message.warning("请完善人员信息");
}
});
} else {
return this.$message.warning("请完善基础信息");
}
});
if(this.dataList.length < 1){
this.$message.warning('标准不能为空')
}else{
let json = this.listForm;
this.listForm.fileId = this.fileIds.join(",");
this.listForm.fileName = this.fileListName.join(",");
this.listForm.model = this.listForm.fileId;
this.listForm.modelName = this.listForm.fileName;
json.zrUserId = this.roleForm.dockUser; //会签人
json.jlUserId = this.roleForm.directorUser; //业务经理
json.applyUpdUserId = this.roleForm.ministerUser; // 修订人
json.approvalOpinion = "";
json.prcCreateUser = this.$store.getters.userInfo.userId;
json.prcCreateUserName = this.$store.getters.userInfo.uName;
json.standName = this.listForm.listName;
json.standId = this.listForm.standId;
this.$refs["qdfbForm"].validate((valid) => {
if (valid) {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.$http.get("lawss/activiti/startProcess", { type: "4" }, {
_this: this
}, res => {
if (res.ok) {
this.$http.post("lawss/activiti/completeTask", {
taskIds: res.data,
userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
});
}
});
} else {
return this.$message.warning("请完善人员信息");
}
});
} else {
return this.$message.warning("请完善基础信息");
}
});
}
},
// 删除上传的文件
delFileInfo(file, fileList) {
@@ -21,14 +21,6 @@
>
<el-row :gutter="24">
<el-col :span="24">
<!-- <el-form-item label="选择清单" prop="orgName" class="add-form-item form-item-disabled">-->
<!-- <el-radio-group v-model="listType" @change="selectionList">-->
<!-- <el-radio label="country">国家/地区清单</el-radio>-->
<!-- <el-radio label="project">项目清单</el-radio>-->
<!-- <el-radio label="other">其他清单</el-radio>-->
<!-- </el-radio-group>-->
<!-- <el-button size="mini" type="primary" style="margin-left: 40px;" @click="choiceShow">选择清单</el-button>-->
<!-- </el-form-item>-->
<el-form-item label="清单名称" prop="listName" class="add-form-item form-item-disabled">
<el-input
disabled
@@ -37,14 +29,6 @@
clearable
></el-input>
</el-form-item>
<!-- <el-form-item label="适用区域" prop="applyRegion" class="add-form-item form-item-disabled">-->
<!-- <el-input-->
<!-- disabled-->
<!-- v-model="listForm.applyRegion"-->
<!-- placeholder="请输入适用区域"-->
<!-- clearable-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="清单说明" prop="descriptionList" class="add-form-item form-item-disabled">
<el-input
disabled
@@ -54,11 +38,11 @@
></el-input>
</el-form-item>
<el-form-item label="附件" prop="modelName" class="add-form-item form-item-disabled">
<el-input
v-if="listForm.modelName == null || this.listForm.modelName== 'undefined' || this.listForm.modelName == '' "
placeholder="暂无数据"
>
</el-input>
<el-input
v-if="listForm.modelName == null || this.listForm.modelName== 'undefined' || this.listForm.modelName == '' "
placeholder="暂无数据"
>
</el-input>
<el-input
v-else
v-model="listForm.modelName"
@@ -73,20 +57,23 @@
</process-title>
<el-table
:data="dataList"
style="width: 100%; border: 1px solid #ccc;"
row-key="standId"
height="70%"
border
height="64.6%"
style="width: 100%"
@selection-change="selectStandChange"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
fontWeight: 'bold', height: '48px'}">
<el-table-column
prop="code"
fixed="left"
width="180px"
label="标准号">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}</a>
<a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }}
{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
@@ -171,7 +158,7 @@
sortable="custom"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD') : '' }}</span>
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
@@ -179,7 +166,7 @@
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD') : '' }}</span>
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
@@ -187,7 +174,7 @@
label="审批意见"
align="center">
<template slot-scope="scope">
<span>{{scope.row.commentText}}</span>
<span>{{ scope.row.commentText }}</span>
</template>
</el-table-column>
<el-table-column
@@ -195,14 +182,13 @@
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : '未完成'}}</span>
<span>{{ scope.row.endTime ? "已完成" : "未完成" }}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
<ProcessFooter
show-submit
:submitLoading="isSubmit"
@@ -217,6 +203,7 @@ import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { inboundLiaisonDetail, queryDetail } from "api/process";
import seeDatalis from "@/pages/localTool/standContrast/pages/seeDatalis";
export default {
name: "bzqdfbStep2",
@@ -233,7 +220,7 @@ export default {
loading: false,
dataList: [],//清单里的标准数据
active: "1",
userId:this.$store.getters.userInfo.userId,
userId: this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
listType: "country", //选择的清单类型
@@ -277,17 +264,18 @@ export default {
};
},
methods: {
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
processTable() {
this.$http.get("lawss/activiti/get_list_by_instance", {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : '',
sortWord: this.shunxu ? this.paixu : "",
shunxu: this.shunxu
}, {
loading: 'loading',
loading: "loading",
_this: this
}, res => {
this.detailData = res
}, e => {})
this.detailData = res;
}, e => {
});
},
//tab发生变化
handleTabs(name) {
@@ -304,34 +292,48 @@ export default {
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg)
this.getFormFieldList(processForm)
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
}
}).catch(e => {
})
})
});
});
},
/**
* @description: 动态表单读取
*/
getFormFieldList (item) {
getFormFieldList(item) {
this.$nextTick(() => {
this.listForm = JSON.parse(JSON.stringify(item))
this.listForm.prcNum = this.prcNum
this.listForm.prcName = this.prcName
this.listForm['id'] = item.id
this.listForm.dataList = item.dataList
this.dataList = item.dataList
this.listForm.applyUpdUserId = item.applyUpdUserId
this.listForm.jlUserId = item.jlUserId
this.listForm.zrUserId = item.zrUserId
})
this.listForm = JSON.parse(JSON.stringify(item));
this.listForm.prcNum = this.prcNum;
this.listForm.prcName = this.prcName;
this.listForm["id"] = item.id;
this.listForm.dataList = item.dataList;
this.dataList = item.dataList;
this.listForm.applyUpdUserId = item.applyUpdUserId;
this.listForm.jlUserId = item.jlUserId;
this.listForm.zrUserId = item.zrUserId;
});
},
//保存事件
handleSave() {
},
handlePreview(item) {
if (item.id) {
let routeUrl = this.$router.resolve({
name: "OtherStandardDetails",
params: {
id: item.standId,
pageType: item.standType + "_STAND"
}
});
window.open(routeUrl.href, "_blank");
} else {
this.$message.warning("暂无关联的标准");
}
},
//提交事件
handleSubmit() {
@@ -345,16 +347,16 @@ export default {
this.listForm.standId = this.listForm.standId;
this.listForm.signFlag = "";
const json = JSON.stringify(this.listForm);
this.$http.post('lawss/activiti/completeTask', {
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message)
this.$router.push('/processCenter')
this.$message.success(res.message);
this.$router.push("/processCenter");
}
}, e => {
@@ -406,14 +408,15 @@ export default {
}
},
computed: {
listNoDataText () {
return this.processType === 1 ? '暂无待办流程' : '暂无已办流程'
},
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
watch: {},
mounted() {
this.processTable()
this.getData()
this.getFileInfo()
this.processTable();
this.getData();
this.getFileInfo();
// console.log(this.$store.getters.getHandleInfo);
}
};
@@ -590,7 +590,7 @@ export default {
let _formData = new FormData();
_formData.append("createUser", this.$store.getters.userInfo.userId);
_formData.append("createUserName", this.$store.getters.userInfo.uName);
_formData.append("prcType", this.$route.query.type);
_formData.append("prcType", '5');
_formData.append("json", JSON.stringify({
prcForm: this.prcForm,
sarAccessInfoList: this.sarAccessInfoList,
@@ -614,7 +614,7 @@ export default {
} else {
var json = Object.assign(this.listForm, this.roleForm)
json.prcCreateUser = this.$store.getters.userInfo.userId;
json.prcCreateUserName = this.$store.getters.userInfo.account;
json.prcCreateUserName = this.$store.getters.userInfo.uName;
json.standId = this.listForm.standId;
json.XCXSSRQ = this.sarAccessListDatas[0].xcxssrqgj
json.ZCCSSRQ = this.sarAccessListDatas[0].zccssrqgj
@@ -490,7 +490,7 @@ export default {
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '2')
_formData.append('prcType', '6')
_formData.append('json', JSON.stringify({
form: this.form,
roleForm: this.roleForm,
@@ -508,7 +508,7 @@ export default {
handleSubmit(){
var json = Object.assign(this.listForm, this.roleForm)
json.prcCreateUser = this.$store.getters.userInfo.userId;
json.prcCreateUserName = this.$store.getters.userInfo.account;
json.prcCreateUserName = this.$store.getters.userInfo.uName;
json.standId = this.listForm.standId;
this.$refs['listForm'].validate((valid) => {
if (valid) {
@@ -48,13 +48,13 @@
<el-table
:data="dataList"
style="width: 100%"
row-key= "id"
row-key= "standId"
height="70%"
border
@selection-change="selectStandChange"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
>
<el-table-column
type="selection"
width="55"
@@ -70,13 +70,13 @@
label="标准名称"
>
</el-table-column>
<el-table-column label="责任人" prop="liablePeople" align="center">
<el-table-column label="责任人" prop="workPeople" align="center">
<template slot-scope="scope">
<div v-if="scope.row.liablePeople == undefined">
<div v-if="scope.row.workPeople == undefined">
{{ "请选择责任人" }}
</div>
<div v-else class="fileClass">
{{ scope.row.liablePeople || "-" }}
{{ scope.row.workPeople || "-" }}
</div>
</template>
</el-table-column>
@@ -198,7 +198,7 @@ export default {
selectList: [],
treeData: [], // 人员数据
roleForm: {
liablePeople: ""
workPeople: ""
},
peopleFlag: true,
nodeList: [],
@@ -222,6 +222,13 @@ export default {
};
},
methods: {
// load(tree, treeNode, resolve) {
// setTimeout(() => {
// resolve(
// this.listForm.children
// )
// }, 1000)
// },
processTable() {
this.$http.get("lawss/activiti/get_list_by_instance", {
prcNum: this.$route.query.prcNum,
@@ -257,50 +264,43 @@ export default {
},
//动态表单读取
getFormFieldList(item) {
const listForm = JSON.parse(JSON.stringify(item));
const { breakdownList, dataList } = listForm
listForm.prcNum = this.prcNum;
listForm.prcName = this.prcName;
this.listForm = listForm
listForm["id"] = item.id;
listForm.dataList = item.dataList;
dataList.forEach(stand => {
stand.hasChildren = true
console.log(stand);
const children = []
breakdownList.forEach(childItem => {
if (stand.standId === childItem.standId) {
const childItemData = {
id: childItem.id,
standId: '条款号: '+ childItem.itemsNum,
standName: '条款名称: '+ childItem.itemsName
this.$nextTick(() => {
this.listForm = JSON.parse(JSON.stringify(item));
this.listForm.prcNum = this.prcNum;
this.listForm.prcName = this.prcName;
this.listForm["id"] = item.id;
this.listForm.dataList = item.dataList;
this.dataList = item.dataList;
this.dataList.distributePerson = item.dataList[0].distributePerson;
this.listForm.breakdownList = item.breakdownList;
this.listForm.children = item.breakdownList;
let children = []
item.breakdownList.forEach(
item => {
let aa = {
key: item.standId,
id:item.id,
standId:'条款号: '+ item.itemsNum,
standName:'条款名称: '+ item.itemsName,
workPeople: '请选择责任人'
}
children.push(childItemData)
children.push(aa)
}
)
this.dataList.forEach(key => {
key['children'] = []
children.forEach(breakDown => {
if (key.standId === breakDown.key) {
key['children'].push(breakDown)
}
})
if( key['children'].length === 0) {
delete key['children']
}
})
if (children.length) {
stand.children = children
stand.hasChildren = true
}
})
// dataList.distributePerson = item.dataList[0].distributePerson;
// listForm.breakdownList = item.breakdownList;
// listForm.children = item.breakdownList;
// let children = []
// item.breakdownList.forEach(
// item=>{
// let aa = {
// id:item.id,
// standId:'条款号: '+ item.itemsNum,
// standName:'条款名称: '+ item.itemsName,
// }
// children.push(aa)
// }
// )
// this.listForm.children = children;
this.dataList = dataList
console.log(this.dataList)
console.log(this.dataList)
this.listForm.children = children;
});
},
//保存事件
handleSave() {
@@ -309,7 +309,7 @@ export default {
//提交事件
handleSubmit() {
this.listForm.dataList.forEach(item => {
if (item.liablePeople !== undefined) {
if (item.workPeople !== undefined) {
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
@@ -331,7 +331,7 @@ export default {
}
});
},
//批量操作按钮
//批量分发按钮
batchOperation(id) {
console.log(this.selectList);
if (this.selectList.length === 0) {
@@ -362,18 +362,33 @@ export default {
},
checkedRole(data) {
// 选取负责人时的操作
let mis = [];
let deposit = new Map();
let mis2 = new Map();
this.selectList.forEach(item => {
item.liablePeople = data[0].name;
item.liablePeopleId = data[0].id;
mis.push(item.standId);
});
this.dataList.forEach(item => {
if (!mis.includes(item.standId)) {
this.selectList.push(item);
item.workPeople = data[0].name;
item.workPeopleId = data[0].id;
mis2.set(item.standId,item)
if (item.children !== undefined ){
item.children.forEach(items =>{
deposit.set(items.standId,items)
})
}
});
this.dataList = this.selectList;
this.dataList.forEach(item => {
if (undefined!==mis2.get(item.standId)){
item=deposit.get(item.standId)
} else {
if (item.children !== undefined && mis2.get(item.standId)===undefined) {
item.children.forEach(items => {
if (undefined !== deposit.get(items.standId)) {
items = deposit.get(items.standId)
}
})
}
}
});
console.log(this.dataList);
// this.dataList = this.selectList;
this.$refs.selection.clearSelection();
this.modalshowflag = false;
},
@@ -386,8 +401,7 @@ export default {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
async mounted() {
// const res = await xx()
mounted() {
this.processTable();
this.getData();
this.getTree();