This commit is contained in:
宋伟佳
2021-07-23 17:18:46 +08:00
parent 7802ed69d6
commit 59058f0a63
7 changed files with 312 additions and 298 deletions
+94 -105
View File
@@ -3619,23 +3619,6 @@
"upath": "^1.1.1"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
@@ -4581,94 +4564,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.3.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.3.3.tgz",
"integrity": "sha512-/1GzCuQ6MRORbC+leKTKoTGtpQt60bYe0gDGEextSteA2OM+v201FPha5jzmjQzVhRcwieZeUvezAtG5a/e5cw==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
"dev": true,
"optional": true
},
"chalk": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
"integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"json5": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
"integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
"dev": true,
"optional": true,
"requires": {
"minimist": "^1.2.5"
}
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-style-loader": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz",
@@ -11145,6 +11040,12 @@
"polyline-miter-util": "^1.0.1"
}
},
"popper.js": {
"version": "1.16.1",
"resolved": "https://registry.npm.taobao.org/popper.js/download/popper.js-1.16.1.tgz",
"integrity": "sha1-KiI8s9x7YhPXQOQDcr5A3kPmWxs=",
"dev": true
},
"portfinder": {
"version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
@@ -13627,6 +13528,94 @@
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.22.4.tgz",
"integrity": "sha512-XLI5s0AdqMP2Lf4I4CmdmOq8kjb5DDFGR77wAuxCfpEuYSfhTRyyx6MetgZMiL6Lxa0DasjBOiOcciU3NkL3/Q=="
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.3.3",
"resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.3.3.tgz",
"integrity": "sha1-5EDk6xJ4bhYTi12YthIgjynd9TI=",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995651629&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz",
"integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.1",
"resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz",
"integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626716578584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
"dev": true,
"optional": true
},
"hash-sum": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz",
"integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo=",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
"integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703455199&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
"integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.0.tgz",
+1
View File
@@ -35,6 +35,7 @@
"@vue/cli-service": "~4.5.0",
"less": "^3.13.1",
"less-loader": "^5.0.0",
"popper.js": "^1.16.1",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.27.1"
}
@@ -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();