【修改bug】修改级联显示数据 修改弹窗样式 修改流程已办待办

This commit is contained in:
zhoulingpo
2023-04-27 14:55:37 +08:00
parent fb1bac303b
commit 1b2d472b62
4 changed files with 182 additions and 175 deletions
+2 -2
View File
@@ -1169,14 +1169,14 @@ export default {
.head { .head {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20px;
.btn { .btn {
cursor: pointer; cursor: pointer;
} }
} }
.tree { .tree {
margin-top: 30px; margin-top: 10px;
padding: 0px 50px 50px 50px; padding: 0px 50px 50px 50px;
height: 500px; height: 500px;
.custom-tree-node { .custom-tree-node {
+21 -18
View File
@@ -4,7 +4,8 @@
<div class="form"> <div class="form">
<el-form ref="form" :model="form" label-width="80px" :show-message="false"> <el-form ref="form" :model="form" label-width="80px" :show-message="false">
<el-form-item label="上级标签" required> <el-form-item label="上级标签" required>
<el-cascader v-model="form.nodeLabel" placeholder="请选择上级标签" :options="cascaderOptions" filterable :props="{ checkStrictly: true }" clearable > <el-cascader v-model="form.nodeLabel" placeholder="请选择上级标签" :options="cascaderOptions" filterable
:props="{ checkStrictly: true }" clearable >
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
@@ -46,25 +47,23 @@ export default {
orderNum: '', orderNum: '',
remark: '' remark: ''
}, },
cascaderOptions:[ cascaderOptions: [],
],
// rule: {
// label: [
// { required: true, trigger: '' }
// ],
// nodeLabel: [
// { required: true, trigger: '' }
// ],
// orderNum: [
// { required: true, trigger: '' },
//
// ],
//
// },
}; };
}, },
methods: { methods: {
//用递归方式去除children
getTreeData(data) {
for (var i = 0; i < data.length; i++) {
if (data[i].children.length < 1) {
// children若为空数组,则将children设为undefined
data[i].children = undefined;
} else {
// children若不为空数组,则继续 递归调用 本方法
this.getTreeData(data[i].children);
}
}
return data;
},
// 必填项 // 必填项
checkReportF() { checkReportF() {
let test = /^[1-9]\d*$/ let test = /^[1-9]\d*$/
@@ -94,9 +93,10 @@ export default {
done(); done();
}, },
open(node, data) { open(node, data) {
this.cascaderOptions = []
this.$api.report.labelList().then(res => { this.$api.report.labelList().then(res => {
console.log('666', res); console.log('666', res);
this.cascaderOptions=res.data this.cascaderOptions = this.getTreeData(res.data)
if (node && data) { if (node && data) {
let id = data.id let id = data.id
this.$api.report.labelNodeList(id).then(res => { this.$api.report.labelNodeList(id).then(res => {
@@ -197,16 +197,19 @@ export default {
line-height: 40px; line-height: 40px;
width: 80%; width: 80%;
} }
::v-deep .el-cascader { ::v-deep .el-cascader {
height: 40px !important; height: 40px !important;
line-height: 40px !important; line-height: 40px !important;
width: 90%; width: 90%;
} }
::v-deep .el-cascader .el-input__inner { ::v-deep .el-cascader .el-input__inner {
height: 40px !important; height: 40px !important;
line-height: 40px !important; line-height: 40px !important;
width: 100%; width: 100%;
} }
::v-deep .el-popper .el-cascader-menu .el-cascader-node__label { ::v-deep .el-popper .el-cascader-menu .el-cascader-node__label {
width: 160px !important; width: 160px !important;
overflow: hidden; overflow: hidden;
@@ -124,6 +124,7 @@ export default {
query: { query: {
id: this.$route.query.id, id: this.$route.query.id,
type:'yiban', type:'yiban',
taskDefinitionKey:row.taskDefinitionKey
} }
}) })
}else{ }else{
@@ -132,6 +133,7 @@ export default {
query: { query: {
id: this.$route.query.id, id: this.$route.query.id,
type:'yiban', type:'yiban',
taskDefinitionKey:row.taskDefinitionKey
} }
}) })
} }
@@ -112,14 +112,16 @@ export default {
this.$router.push({ this.$router.push({
path: '/permission/launch', path: '/permission/launch',
query: { query: {
id: this.$route.query.id id: this.$route.query.id,
taskDefinitionKey:row.taskDefinitionKey
} }
}) })
}else{ }else{
this.$router.push({ this.$router.push({
path: '/permission/examine', path: '/permission/examine',
query: { query: {
id: this.$route.query.id id: this.$route.query.id,
taskDefinitionKey:row.taskDefinitionKey
} }
}) })
} }