From 4187374bbae66190e7eca6f42cc5e61cfae1637f Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期六, 12 八月 2023 13:33:18 +0800
Subject: [PATCH] PDM集成swing界面相关功能开发
---
Source/UBCS-WEB/src/components/template/FlowPath.vue | 181 +++++++++++++++++++++++++++------------------
1 files changed, 109 insertions(+), 72 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/template/FlowPath.vue b/Source/UBCS-WEB/src/components/template/FlowPath.vue
index 2d7a508..2474641 100644
--- a/Source/UBCS-WEB/src/components/template/FlowPath.vue
+++ b/Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -1,11 +1,9 @@
<template>
-
<avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page"
: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>
@@ -13,17 +11,22 @@
export default {
name: 'FlowPath',
props: {
- code: {
- typeof: String,
- required: true,
- default: ""
- }
- },
- watch: {
+ checkStatus: {
+ type: Boolean,
+ default: false
+ },
+ crudLCStatus: {
+ type: String,
+ default: 'Editing'
+ },
+ code: {
+ typeof: String,
+ required: true,
+ default: ""
+ }
},
data() {
return {
-
loading: false,
page: {
currentPage: 1,
@@ -36,65 +39,98 @@
startData: [],
form: {},
option: {
- height: "auto",
- border: true,
- align: 'center',
- menuAlign: 'center',
- index: true,
- searchMenuSpan: 8,
- searchBtn: false,
- emptyBtn: false,
- columnBtn: false,
- defaultSort: {
- prop: 'id,name,description,version',
- order: 'descending'
+ height: "auto",
+ border: true,
+ align: 'center',
+ menu:!this.checkStatus || this.crudLCStatus == 'Editing',
+ menuAlign: 'center',
+ index: true,
+ searchMenuSpan: 8,
+ searchBtn: false,
+ emptyBtn: false,
+ columnBtn: false,
+ editBtn:!this.checkStatus || this.crudLCStatus == 'Editing',
+ delBtn:!this.checkStatus || this.crudLCStatus == 'Editing',
+ addBtn: !this.checkStatus || this.crudLCStatus == 'Editing',
+ defaultSort: {
+ prop: 'id,name,description,version',
+ order: 'descending'
+ },
+ column: [
+ {
+ label: '妯℃澘key',
+ prop: 'modelKey',
+ width: 120,
+ sortable: true,
+ type: 'tree',
+ dicData: [],
+ props: {
+ label: "key",
+ value: "key"
+ },
+ rules: [{
+ required: true,
+ message: '妯℃澘key涓嶈兘涓虹┖',
+ trigger: 'blur'
+ }],
+ nodeClick: (data) => {
+ console.log(data)
+ // 鑺傜偣鐐瑰嚮鐨勬椂鍊欎細鑾峰彇鍒版暟鎹�
+ this.form.modelName = data.name
+ }
+ }, {
+ label: '妯℃澘鍚嶇О',
+ prop: 'modelName',
+ sortable: true,
+ width: 220,
+ addDisabled: true,
+ editDisabled: true,
},
- column: [
- {
- label: '妯℃澘key',
- prop: 'modelKey',
- sortable: true,
- type: 'tree',
- dicData: [],
- props: {
- label: "key",
- value: "key"
- },
- rules: [{
- required: true,
- message: '妯℃澘key涓嶈兘涓虹┖',
- trigger: 'blur'
- }],
- nodeClick: (data) => {
- console.log(data)
- // 鑺傜偣鐐瑰嚮鐨勬椂鍊欎細鑾峰彇鍒版暟鎹�
- this.form.modelName = data.name
- }
- }, {
- label: '妯℃澘鍚嶇О',
- prop: 'modelName',
- sortable: true,
- addDisabled: true,
- editDisabled: true,
- },
- {
- label: '娴佺▼妯℃澘鐢ㄩ��',
- prop: 'buttonTypeKey',
- type: 'tree',
- dicUrl: '/api/ubcs-flow/processTS/tt',
- dicMethod: 'post',
- props: {
- value: "codee",
- label: "namee",
- },
- },
- ]
- },
+ {
+ 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'
+ },
+ ]
+ }
}
},
created() {
this.getStart()
},
+ watch: {
+ code: {
+ handler(newval, oldval) {
+ this.getDataList()
+ }
+ },
+ checkStatus: {
+ handler(newval, oldval) {
+ this.option.delBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.editBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.addBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
+ }
+ },
+ crudLCStatus: {
+ handler(newval, oldval) {
+ this.option.delBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.editBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.addBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
+ }
+ }
+ },
methods: {
async getStart() {
const response = await getStartList()
@@ -111,18 +147,19 @@
},
// 鑾峰彇鍒楄〃
async getDataList() {
- this.loading = false
- console.log(this.search)
+ this.loading = false
+ if(this.code){
const { pageSize, currentPage } = this.page
let param = { size: pageSize, current: currentPage }
const response = await getFlowpathList({ ...param, ...{ templateId: this.code } })
if (response.status === 200) {
- console.log(response)
- this.loading = false
- const data = response.data.data
- this.data = data.records
- this.page.total = data.total
+ this.loading = false
+ const data = response.data.data
+ this.data = data.records
+ this.page.total = data.total
} else this.loading = false
+ }
+
},
// 鏂板
async handleSave(row, done, loading) {
@@ -143,8 +180,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