From e5ced3e405d2eb5a8772ff4e01e81ed045306475 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 04 八月 2025 00:45:53 +0800
Subject: [PATCH] 字段调整
---
src/views/wel/index.vue | 78 ++++++++++++++++++++++++--------------
1 files changed, 49 insertions(+), 29 deletions(-)
diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index 4df3bf4..9b69456 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -31,15 +31,15 @@
</el-col>
</el-row>
</template>
- <template #menu-left>
+ <!-- <template #menu-left>
<el-button :size="size" type="primary" @click="showAdd()">鏂板鏍硅妭鐐�</el-button>
- </template>
+ </template> -->
<template #name="{ row }">
<span>{{row.name}}</span>
<el-button :size="size" text v-if="row.nodeType != 70" icon="el-icon-setting" type="primary" placeholder="淇敼" @click="showEdit(row)" title="淇敼"></el-button>
- <el-button :size="size" text icon="el-icon-delete" type="primary" @click="showDel(row)" placeholder="鍒犻櫎" title="鍒犻櫎"></el-button>
- <el-button :size="size" text v-if="row.nodeType < 60" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="鏂板瀛愮骇" title="鏂板瀛愮骇"></el-button>
- <el-button :size="size" text v-if="row.nodeType == 60" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="鏂囦欢涓婁紶" title="鏂囦欢涓婁紶"></el-button>
+ <el-button :size="size" text v-if="row.nodeType != 10" icon="el-icon-delete" type="primary" @click="showDel(row)" placeholder="鍒犻櫎" title="鍒犻櫎"></el-button>
+ <el-button :size="size" text v-if="row.nodeType != 60 && row.nodeType != 70" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="鏂板瀛愮骇" title="鏂板瀛愮骇"></el-button>
+ <el-button :size="size" text v-if="row.nodeType == 60 || row.nodeType == 50" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="鏂囦欢涓婁紶" title="鏂囦欢涓婁紶"></el-button>
<!-- 娑夊瘑缃戞墠鏈� -->
<el-button :size="size" text v-if="row.nodeType == 70 && isSM" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="鍗囩増" title="鍗囩増"></el-button>
<!-- 宸ユ帶缃戞墠鏈� -->
@@ -64,7 +64,7 @@
<avue-form v-if="tabsType == 'tab1'" :option="tabsFormOption" v-model="tabsForm"></avue-form>
<span v-else-if="tabsType == 'tab2'">鐗堟湰淇℃伅</span>
<template v-else-if="tabsType == 'tab3'">
- {{fileContent}}
+ <div v-html="convertToHtml(fileContent)"></div>
</template>
<el-dialog title="鍗囩増" append-to-body v-model="upgradeModal" width="500">
<avue-form :option="upgradeModalOption" v-model="upgradeModalForm" @submit="upgradeSubmit" @reset-change="upgradeCancel"></avue-form>
@@ -183,7 +183,7 @@
menuPosition: "right",
column: [
{
- label: '鑺傜偣绫诲瀷',
+ label: '鑺傜偣绫诲瀷1',
prop: 'nodeType',
labelWidth: "120",
type: 'select',
@@ -285,34 +285,45 @@
label: '璁惧',
prop: 'machineCode'
},
+ /*
{
label: '鍥哄寲鐘舵��',
prop: 'abc'
},
+ */
{
label: '閿佸畾鐘舵��',
- prop: 'abc'
+ prop: 'isLocked',
+ formatter: (val, value, label) => {
+ if(val.nodeType == '60' || val.nodeType == '70'){
+ if(value==1){
+ return '宸查攣瀹�';
+ }else{
+ return '鏈攣瀹�';
+ }
+ }
+ }
+
},
{
label: '娴佺▼鐘舵��',
prop: 'flowStatus',
- formatter: (val, value, label) => {
- if(val.nodeType != '70'){
- //闈炵▼搴忚妭鐐�
- return '';
- }else{
-
- if(value==0||value==null){
- return '鏈惎鍔�';
- }else if(value == 1){
- return '瀹℃壒涓�';
- }else if(value == 2){
- return '宸查�氳繃';
- }else{
- return '鏈畾涔�';
- }
- }
- },
+ formatter: (val, value, label) => {
+ if(val.nodeType != '60'){
+ //闈炵▼搴忚妭鐐�
+ return '';
+ }else{
+ if(value==0||value==null){
+ return '鏈惎鍔�';
+ }else if(value == 1){
+ return '瀹℃壒涓�';
+ }else if(value == 2){
+ return '宸查�氳繃';
+ }else{
+ return '鏈畾涔�';
+ }
+ }
+ },
},
{
label: '娴嬭瘯绋嬪簭',
@@ -469,6 +480,9 @@
}
},
methods: {
+ convertToHtml(text) {
+ return text.replace(/\r\n/g, '<br>');
+ },
removeHasChildren(treeData) { //鏌ヨ鏃跺�欎娇鐢紝鍒犳帀hasChildren
return treeData.map(node => {
if (node.children && node.children.length > 0) {
@@ -643,7 +657,7 @@
this.tabsForm.nodeTypeName = item.dictValue;
}
})
- if(this.tabsForm.nodeType < 70) {
+ if(this.tabsForm.nodeType != 70) {
this.tabsOption = this.tabsOption1;
}else {
this.tabsOption = this.tabsOption2;
@@ -715,14 +729,20 @@
showAdd (row) { //鏂板瀛愯妭鐐�
if(!row) {
this.modalTitle = "鏂板鏍硅妭鐐�";
- this.modalForm.nodeType = "10";
+ this.modalForm.nodeType = this.nodeTypeList[0].dictKey;
this.modalForm.parentId = 0;
}else {
- if(row.nodeType == 60) {
+ if(row.nodeType == 60) { //绋嬪簭鍖�
return;
}
+ var defalutNodeType = ""; //涓嬩竴绾ц妭鐐圭被鍨�
+ for(var i=0;i<this.nodeTypeList.length;i++) {
+ if(row.nodeType == this.nodeTypeList[i].dictKey) {
+ defalutNodeType = this.nodeTypeList[i+1].dictKey;
+ }
+ }
this.modalTitle = "鏂板瀛愯妭鐐�";
- this.selectedColumn.nodeType = String(Number(row.nodeType) + 10);
+ this.selectedColumn.nodeType = defalutNodeType;
this.selectedColumn.parentId = row.id;
this.selectedColumn.name = "";
this.selectedColumn.id = "";
--
Gitblit v1.9.3