feat: 流程设计数据回显

This commit is contained in:
tony
2022-12-15 08:13:53 +08:00
parent f8a4d8f9a7
commit 8c8dfa1c0f
9 changed files with 119 additions and 219 deletions

View File

@@ -50,11 +50,19 @@
</template>
<script>
import { listExpression, getExpression, delExpression, addExpression, updateExpression } from "@/api/system/expression";
import { listExpression } from "@/api/system/expression";
export default {
name: "Expression",
dicts: ['sys_common_status'],
// 接受父组件的值
props: {
selectValues: {
type: Number,
default: 0,
required: false
}
},
data() {
return {
// 遮罩层
@@ -83,9 +91,18 @@ export default {
expression: null,
status: null,
},
radioSelected:null
radioSelected: this.selectValues
};
},
watch: {
selectValues: {
immediate: true,
handler(newVal) {
console.log(newVal,"selectValues")
this.radioSelected = newVal
}
}
},
created() {
this.getList();
},
@@ -112,7 +129,6 @@ export default {
// 单选框选中数据
handleSingleExpSelect(selection) {
this.radioSelected = selection.id;//点击当前行时,radio同样有选中效果
// console.log( this.radioSelected ,"handleSingleExpSelect");
this.$emit('handleSingleExpSelect',selection);
},
}

View File

@@ -16,7 +16,7 @@
</el-form-item>
</el-form>
<el-table v-if="selectType === 'multiple'" v-loading="loading" :data="roleList" @selection-change="handleMultipleRoleSelect">
<el-table v-if="selectType === 'multiple'" v-loading="loading" :data="roleList" @selection-change="handleMultipleRoleSelect">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="角色编号" prop="roleId" width="120" />
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" />

View File

@@ -97,9 +97,16 @@ export default {
components: { Treeselect },
// 接受父组件的值
props: {
checkType: String,
default: 'multiple',
required: false
selectValues: {
type: Number | String,
default: 0,
required: false
},
checkType: {
type: String,
default: 'multiple',
required: true
},
},
data() {
return {
@@ -166,6 +173,13 @@ export default {
// 根据名称筛选部门树
deptName(val) {
this.$refs.tree.filter(val);
},
selectValues: {
immediate: true,
handler(newVal) {
console.log(newVal,"user-selectValues")
this.radioSelected = newVal
}
}
},
created() {