From 930766d03537d803cea4bf468ab2abc44ff42645 Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期三, 19 七月 2023 14:51:29 +0800
Subject: [PATCH] 1、主要解决 mybatis返回map时value值为null,属性和value都不显示问题
---
Source/UBCS-WEB/src/components/template/FlowPath.vue | 47 +++++++++++++++++++++++++++++++++--------------
1 files changed, 33 insertions(+), 14 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/template/FlowPath.vue b/Source/UBCS-WEB/src/components/template/FlowPath.vue
index 2d7a508..36aa624 100644
--- a/Source/UBCS-WEB/src/components/template/FlowPath.vue
+++ b/Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -1,29 +1,29 @@
<template>
-
- <avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page"
+ <avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page" :permission="permissionList"
:search.sync="search" @on-load="getDataList" @row-save="handleSave" @row-del="handleDelete"
@row-update="handleEdit" @refresh-change="handleRefresh" @size-change="handleSizePage"
@current-change="handleCurrentPage">
</avue-crud>
-
</template>
<script>
import { getFlowpathList, getStartList, flowpathSave, flowpathDelete } from '@/api/template/flowpath.js'
+import {mapGetters} from "vuex";
export default {
name: 'FlowPath',
props: {
- code: {
- typeof: String,
- required: true,
- default: ""
- }
- },
- watch: {
+ code: {
+ typeof: String,
+ required: true,
+ default: ""
+ },
+ crudLCStatus: {
+ type: String,
+ default: 'Editing'
+ }
},
data() {
return {
-
loading: false,
page: {
currentPage: 1,
@@ -53,6 +53,7 @@
{
label: '妯℃澘key',
prop: 'modelKey',
+ width:120,
sortable: true,
type: 'tree',
dicData: [],
@@ -74,19 +75,26 @@
label: '妯℃澘鍚嶇О',
prop: 'modelName',
sortable: true,
+ width:220,
addDisabled: true,
editDisabled: true,
},
{
- label: '娴佺▼妯℃澘鐢ㄩ��',
+ label: '妯℃澘鐢ㄩ��',
prop: 'buttonTypeKey',
type: 'tree',
+ width:120,
dicUrl: '/api/ubcs-flow/processTS/tt',
dicMethod: 'post',
props: {
value: "codee",
label: "namee",
},
+ },
+ {
+ label: '妯℃澘鎻忚堪',
+ prop: 'description',
+ type:'textarea'
},
]
},
@@ -95,6 +103,17 @@
created() {
this.getStart()
},
+ computed:{
+ ...mapGetters([ "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.crudLCStatus=='Editing',
+ viewBtn: false,
+ delBtn: this.crudLCStatus=='Editing',
+ editBtn: this.crudLCStatus=='Editing'
+ };
+ },
+ },
methods: {
async getStart() {
const response = await getStartList()
@@ -143,8 +162,8 @@
// 缂栬緫
async handleEdit(row, index, done, loading) {
console.log(row)
- const { modelName, modelKey, buttonTypeKey, id } = row
- let param = { modelName, modelKey, buttonTypeKey, id }
+ const { modelName, modelKey, buttonTypeKey, id ,description} = row
+ let param = { modelName, modelKey, buttonTypeKey, id,description }
const response = await flowpathSave({ ...param, ...{ templateId: this.code } })
if (response.status === 200) {
loading()
--
Gitblit v1.9.3